#off-topic-lounge-text
1 messages · Page 12 of 1
tbf they allow a lot more for the model to work on
but, from what I remember, many other models easily passed that test at the time
since it's a trivial question
solved by adding four letters to one of the identifiers
Did it get it? I hit my o1 preview limit so I had to do it with o1-mini
To make your Rust code compile and pass all the provided tests, you'll need to adjust the trait bound on the bind function. Specifically, change the trait bound from Fn to FnOnce. This is necessary because some of your closures capture variables by move, which requires the FnOnce trait.
Here's the corrected code:
fn bind<T, F: FnOnce(T) -> Option<T>>(f: F, fa: Option<T>) -> Option<T> {
match fa {
Some(a) => f(a),
None => None,
}
}
// don't change anything below
fn main() {
assert_eq!(bind(|x: i32| Some(x + 3), Some(2)), Some(5));
assert_eq!(bind(|x: i32| Some(x + 3), None), None);
assert_eq!(bind(|_: i32| None, Some(2)), None);
assert_eq!(bind(|_: i32| None, None), None);
assert_eq!(bind(|x: &str| Some(x), Some("apple")), Some("apple"));
assert_eq!(bind(|_: &str| Some("banana"), Some("apple")), Some("banana"));
let banana = "banana".to_string();
assert_eq!(
bind(|_: String| Some(banana), Some("apple".to_string())),
Some("banana".to_string()),
);
}
Explanation of Changes
- Trait Bound Adjustment:
- Before:
F: Fn(T) -> Option<T> - After:
F: FnOnce(T) -> Option<T>
- Before:
The FnOnce trait is more flexible as it allows the closure to consume variables it captures (i.e., take ownership). This is essential for closures that move captured variables, such as the closure in your last test case where banana is moved into the closure.
-
Ensuring Proper Usage of
bind:- The
bindfunction remains generic and works with different types, includingi32,&str, andString. - By using
FnOnce, you ensure that all closures, whether they capture by reference or by move, are supported.
- The
-
Including
mainFunction:- To run the assertions, they need to be inside a
mainfunction or a test module. Here, they're placed insidemainfor simplicity.
- To run the assertions, they need to be inside a
Additional Notes
-
Why Not
FnorFnMut?Fn: Suitable for closures that do not consume any captured variables. However, your last test case requires movingbanana, whichFncannot handle.FnMut: Allows mutable access to captured variables but still doesn't support moving ownership likeFnOnce.
-
Ownership Considerations:
- When dealing with owned types like
String, it's common to requireFnOncebecause the closure might need to take ownership of the variable.
- When dealing with owned types like
By making this change, your bind function becomes more versatile and can handle all the provided test cases without any compilation errors.
Do you have another one that the models struggle with?
additional notes are still bs but at least the code works
these four are the ones that AI has passed so far
What’s another one you’ve tried and it doesn’t get?
this one I remember trying on other models and it didn't find a working solution:
https://parrrate.github.io/exercises/exercises/get_functions.html
from my attempts to get AI to do it, its best results (i.e. the ones that can be built at all) caused memory leaks
oh, and also, giving the AI the link (if it's capable of interpreting HTML) is effectively giving it the solution because that's embedded on the page
some services/models with that capability enabled can unobfuscate the solution but still can't explain it
Ok ima just send you images since it wrote a lot
I've just noticed it actually failed lol (it changed stuff below the line)
I guess it's overtrained to put main even if it's not needed
It’s gonna be one long ass image since the other code solving from earlier is still there
I really want to try with o1 preview but I need to wait till September 20 to reset limits 💀
I'd count that as a pass even though it's suboptimal
Mmmm
Ok what’s another one? I want one where it fails completely
it failed, will still fail with lifetime error
it did not address covariance at all in the solution
mmm ok I see
seems mostly fine except for misunderstating what "positive" means
so AI can finally understand associated output types I guess
although
that code is terribly cursed
hmm
but okay enough for a pass
it's slightly misusing the word Strategy which is surprising given how much Java has definitely got into its training data
Ok I’ll come in 5 days to try it with o1 preview. Unless they reset the limits or something
it's definitely a massive improvement compared to previous models I've seen attempt these
@glossy otter I have come to you once again to request screenshare perms
Sorry hemlo @buoyant kestrel
@neon portal Is your way a good practice or I can do like this?
I would be explicit.
!zen
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
"Explicit is better than implicit."
"Namespaces are one honking great idea -- let's do more of those!"
I believe mine is good practice given zen.
Okay I will change it. Thanks.
My pleasure.
@unborn sorrel Can I get stream perms?
!stream 1047793849008914512 1h
✅ @maiden maple can now stream until <t:1726506239:f>.
Thanks
@neon portal What is the purpose of utils.py?
asking you
hmm
Thanks
Brb
E
Hi
@DH
@still peak
where r u from
i am fron India
u know any experienced python dev?
what's the threshold for "experienced"
what are you using those "bots" for?
what an unexpected PB improvement
https://minesweeper.online/game/3753839970
casually playing to spend time and ending up with a top 428 result
@still peak have ever you played it competitively before?
the real gameplay starts when statistics get involved
those are important for winrate, but help with speed records too
since often it's faster to guess rather than go safe
2.7 is officially dead
very cursed
reminds of how Pascal is used in schools and universities still
"just like Latin"
stable because no one actually uses it
where I live exams allow:
С++, Java, C#, Pascal, Python
I'm actually surprised C# is there, didn't expect that
@primal bison 👋
docker run -it --rm python:2.7
!gil
The command you are trying to time doesn't exist. Use .help for a list of commands.
I have no idea what I'm doing with those commands nvm
@still peak if you have Docker installed and need to use Python 2.7, then you can just start the interpreter as is
@slate axle in case of Python, there isn't really any PSF-approved stuff
so yeah, maybe somewhat official, but not official official
@jolly rain helper means part of staff but not a moderator
if you have any concerns, DM @subtle palm
I meant there is no PSF-approved certification
as far as I know
What does psf mean?
Python Software Foundation
Hi everyone! I'd like to stream my progress on a project to share it with the community but I'm not able to do that. Are there any rules to use this voice channel?
I've checked the rules channel and other channels to see if I can do that\
But haven't found anything yet
You can join Voice chat 0 and ask the admin (Mr. hemlock) he will give you permission
Thanks for that! Do I have to speak in the microfone to ask for that?
No you can ask in #voice-chat-text-0
Awesome, thanks again
def convolucao(matriz: list, mascara: list):
count = 0
matriz_final = []
for k in range(len(matriz)):
nova_matriz_temp = []
for l in range(len(matriz[k])):
numero_final = abs((matriz[k][l] * mascara[2][2])
+ (matriz[k-1][l] * mascara[1][2] if matriz[k-1][l] in matriz else 0)
+(matriz[k-1][l-1] * mascara[1][1] if matriz[k-1][l] in matriz else 0)
+(matriz[k][l-1] * mascara[2][1] if matriz[k-1][l] in matriz else 0)
+(matriz[k+1][l-1] * mascara[3][1] if matriz[k-1][l] in matriz else 0)
+(matriz[k+1][l] * mascara[3][2] if matriz[k-1][l] in matriz else 0)
+(matriz[k+1][l+1] * mascara[3][3] if matriz[k-1][l] in matriz else 0)
+(matriz[k][l+1] * mascara[2][3] if matriz[k-1][l] in matriz else 0)
+(matriz[k-1][l+1] * mascara[1][3] if matriz[k-1][l] in matriz else 0))
nova_matriz_temp.append(numero_final)
matriz_final.append(nova_matriz_temp)
return matriz_final
sobel_x = [[1, 0, -1], [2, 0, -2], [1, 0, -1]]
sobel_y = [[1, 2, 1], [0, 0, 0], [-1, -2, -1]]
then it should be GM LUA
!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
heyy coders
im new in coding
just one month i have started python
can someone tell me how can build my logic strong
Ok I'm back. My rates have reset for o1 preview. Tbh, I'm not sure how much better it is than o1 mini, particularly at coding.
OK heres what I got for this one. Tell me if you cant open the chat. https://chatgpt.com/share/66ef4e7c-c724-8006-8762-c3714f24d666
hmm
oh ok try this one. It has all the things we tried last time but wit o1 preview
if it doesnt load I'll just send screenshots
still no content
ok i'll just send screenshots give me a sec
ok ima just send video
I can't test if it actually compiles, but
bind -- fail (I know it won't compile);
get functions -- pass (creative but massively overengineered; the AI is clearly not trained enough on VTable code);
boolstream -- fail (fixed variance but broke the interface);
all errors -- pass (but code is unacceptably bad, mini did way better);
Ok I see. Ok i'll be back again once the full model is released
give it to me
guy did like 10 msgs for one sentence
✅ @atomic spire can now stream until <t:1727363133:f>.
@atomic spire Would you prefer to stream up in VC0, or is here fine?
Just thought I'd ask
who know scraping
!stream 1041366872882413632
✅ @trim knot can now stream until <t:1727366329:f>.
what do you guys think of this im trying to train VGG16 to recognize pictures
What is VGG16
That's what im wondering
(rn not busy)
apache 2.0 license allows commercial use afaik
have you watched through all four of these?
#voice-chat-text-0 message
GPL with certain restrictions too
everyone is using Linux commercially
and that's GPL
not really
you must publish modifications
> modified or derivative
the main issue is linking of libraries
(i.e. anyone can just put an API around it and publish that API wrapper)
well, laws don't really protect either
the general idea is:
don't be entitled to gain anything from people using your code
can you provide the same paid service on your own?
if yes, then BSL
BSL prevents that
as in others can't resell your product
("people" includes companies in this case)
I see.
BSL normally is applied to some sort of service;
something that you can run, not a library
if you don't sell your own thing, others are free to sell that thing because BSL doesn't apply in that case
i.e. they don't compete with your business because there is no business
BSL often comes up as a result of a relicensing, for example, in the case of Redis
it did not make as much of an impact because many resellers were already using forks and reimplementations
so for cloud companies it was only "should we continue calling this Redis or not?"
I'd prefer having an actual business model instead
Oxide are open-sourcing everything they have in part because software isn't what they're selling
this type of scientific research is a completely separate field from business
exactly
there is no product
it's still mostly just research and speculation
funding and grants is not a stable business model
quantum is just a money burning pit at the moment, so trying to apply the same principles, that production software uses, will likely fail
IBM recently acquired HashiCorp, and that's more reality-adjacent
how would companies be using the project?
if at all
support/consulting contracts seem like a reasonable option for that case
!e ```py
class BubbleGrouper:
def init(self, k):
self.data = {i: {i} for i in range(k)}
def entangle(self, a, b):
union = self.data[a] | self.data[b]
for key in union:
self.data[key] = union
grouper = BubbleGrouper(4)
print(grouper.data)
grouper.entangle(0, 1)
print(grouper.data)
grouper.entangle(2, 3)
print(grouper.data)
grouper.entangle(1, 2)
print(grouper.data)```
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | {0: {0}, 1: {1}, 2: {2}, 3: {3}}
002 | {0: {0, 1}, 1: {0, 1}, 2: {2}, 3: {3}}
003 | {0: {0, 1}, 1: {0, 1}, 2: {2, 3}, 3: {2, 3}}
004 | {0: {0, 1, 2, 3}, 1: {0, 1, 2, 3}, 2: {0, 1, 2, 3}, 3: {0, 1, 2, 3}}
whenever résumé discussions come up, I remember this
@neon portal
There are probably optimisations, but...eh.
quadratic
there is disjoint-set/union-find thing
idk how to implement it
including "unrelated" things is fine afaik
graphic design sounds beneficial to mention
and, moreover, it is not unrelated to software engineering
I probably could have used a list instead of a dictionary, actually.
!e ```py
class BubbleGrouper:
def init(self, k):
self.data = [{i} for i in range(k)]
def entangle(self, a, b):
union = self.data[a] | self.data[b]
for index in union:
self.data[index] = union
grouper = BubbleGrouper(4)
print(grouper.data)
grouper.entangle(0, 1)
print(grouper.data)
grouper.entangle(2, 3)
print(grouper.data)
grouper.entangle(1, 2)
print(grouper.data)```
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | [{0}, {1}, {2}, {3}]
002 | [{0, 1}, {0, 1}, {2}, {3}]
003 | [{0, 1}, {0, 1}, {2, 3}, {2, 3}]
004 | [{0, 1, 2, 3}, {0, 1, 2, 3}, {0, 1, 2, 3}, {0, 1, 2, 3}]
see what the company specifically asks for
oh, Oxide has recently opened a position for a software engine
time to read through it
hmm
if C#, then Java too
Java is very slowly outengineering C#
Java is everywhere
"if Java is so bad, then who put it in three billion devices?"
freelancing is more harder
for freelancing it's still somewhat important to write down what you can do and what your experience is I'd expect
freelancing is very competitive, right
but, you can pick a niche
and have more probabilities to get a job
i try it as a graphic designer and you need to be relay good and have chepe prices
at the beginning, I think we need to get focus on gaining good reviews
more reviews, you can validate your work and with it, increase the prices fairly
It's hard asf ngl
In my case, Linkedin never worked
to get a job
nobody even checks your resume and just getting ignored at cold speaking to recruiters
I don't even have a résumé
make a portfolio
for dual-license it's simpler to have the paid one provide something specific to its users not just the right of use of normally copyleft software in commercial setting
and also you can't really do copyleft+commercial entirely right
when you do that, you're kind of almost violating your own license
it can only work okay-ish-ly if all the copyleft code you're making the product based on is your own
so for external contributions it means copyright assignment
sell support and extra features not the base thing
though, again, that works better with services not libraries
with libraries it's integration consulting only; there is no deployment to provide support for (there is nothing to deploy)
((either way it's just "company pays you so they can get you to help them use it"))
it is a pre trained model for image classification
an AI model?
Your post said you are trying to train so I figure that's what you mean. I'd love to train AI or build AI models but not sure where to start lol
from what i studied people don't build AI models they use pretrained models and train them on their nrper dataset
proper dataset *
Those pretrained models were built by someone, no?
^
i guess yes
Aliens?😂👀
!e
import random
print("str")
difficulty = input("What difficulty will you like? (E)ffortless, E(a)sy, (M)edium, (H)ard, (I)nsane, E(x)treme, (U)nreal, Im(p)ossible: ")
if difficulty.upper() == "E": # difficulties
secret_num = random.randint(5, 25)
elif difficulty.upper() == "A":
secret_num = random.randint(5, 49)
elif difficulty.upper() == "M":
secret_num = random.randint(5, 69)
elif difficulty.upper() == "H":
secret_num = random.randint(5, 140)
elif difficulty.upper() == "I":
secret_num = random.randint(2, 300)
elif difficulty.upper() == "X":
secret_num = random.randint(2, 1000)
elif difficulty.upper() == "U":
secret_num = random.randint(2, 3965)
elif difficulty.upper() == "P":
secret_num = random.randint(2, 8000)
secret_num_found = False
while not secret_num_found: # check if you have the number
guess = input("Guess a number: ")
percentage_closeness = int((1 - (abs(secret_num - int(guess)) / abs(secret_num))) * 100)
percentage_closeness = max(0, min(percentage_closeness, 100))
if percentage_closeness == 100:
print(f"The secret number was {secret_num}! congrats!")
secret_num_found = True
else:
print(f"You are {percentage_closeness}% close to the secret number!")
print(secret_num)
awh
!e
py```
difficulty_ranges = {
"E": (5, 25),
"A": (5, 49),
"M": (5, 69),
"H": (5, 140),
"I": (2, 300),
"X": (2, 1000),
"U": (2, 3965),
"P": (2, 8000)
}
Use something like this as an alternative to the if statements
❓
hi i just downloaded visual code studio can someone recomend me a good tutorial to start?
Use AI and ask her to help you learn the basics. Or ask her to build you a plan to learn python from knowing nothing to being job ready or whatever goal you have in mind
My AI identifies as a ditzy big butt chocolate woman
!e
code
Oh I see
Hello , anyone here have experienced deploying flask app in HEROKU with dependencies of tf.keras
The build always failed for slugsize is 600mb while on heroku it's 500mb..
hello community, i was wondering if anyone can help me in regards to how to run a test file on a file that i am using to type code on? I am a little confused on how to do it
Bro dm ill send u some books
...dont u know ..
Hi everyone,i'm a beginner to this coding world.can anyone give advice on how to become a freelancer. So, what level of tech skills people expect from a freelancer. Also, what are the easy skills to learn through which I can start my freelancing career.
So what are the ways we can use python and chatgpt to do freelancing.
I really cant help u with py.
Try bein frontend developer u can learn it quikly i needed olny 3 weeks to become good u have lot of courses i suggest u go thru brocodes courses bout html css and javascript.
Create few projects use free ais and start bein freelancer.
Ok bro
To start freelancing in coding, first learn the basics of programming. Most clients want you to know one skill well, like HTML, CSS, or JavaScript. Web development is a good skill to start because many people need it, and it’s easier for beginners. You can also learn WordPress or how to make simple websites. As you get better, practice solving problems and talking to clients clearly.
Ok bro
How will I get a client?
any one can help me with this error it come's when I want to start the bot
PS D:\Upload\MusicBots\MusicBotGskr\music_bot> python main.py TOKEN: ( MY TOKEN I CAN'T SHERE IT ) Traceback (most recent call last): File "D:\Upload\MusicBots\MusicBotGskr\music_bot\main.py", line 30, in <module> asyncio.run(main()) File "D:\Upload\MusicBots\Python\Lib\asyncio\runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "D:\Upload\MusicBots\Python\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Upload\MusicBots\Python\Lib\asyncio\base_events.py", line 687, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "D:\Upload\MusicBots\MusicBotGskr\music_bot\main.py", line 25, in main await bot.add_cog(help_cog(bot)) ^^^^^^^^ NameError: name 'help_cog' is not defined
name 'help_cog' is not defined 😉 so you are missing something
Hi everyone! I asked for permission to live stream my coding sessions to get some experience with people seeing me working at the end I couldn't get access to any channel. Currently, I'm solving CTF challenges with python and I'd like to use any channel at 10 pm EST. I know I would be given access for a short period of time to start with and later I could use channels for longer.
hey guys i need help with converting my code into an .exe (not for malisious reasons ofc), my code is consistant of 2 folders with 2 .py files, one being the main title that will activate the game and the other the game, it also uses png's and mp3's. i tried looking it up and tried using pyinstaller, py2exe, auto-py-to-exe. but nothing works, i also tried reinstalling python and updating it. if you can help me it would be great but i dont mind if this would be too much yapping of me and too complicated. -eeuwa
The error message NameError: name 'help_cog' is not defined suggests that in your code, the help_cog is being used before it's defined or imported properly.
To resolve this, let's break down a few things you should check:
- Check if the help_cog Class is Defined
- Ensure Correct Capitalization
- Check Import Path
- Ensure the File Exists
Syntactically Awesome Style Sheets
NameError: name 'help_cog' is not defined
Python cannot find a definition for help_cog when you attempt to add it as a cog to your bot. This is a common issue when working with Discord bots using discord.py or similar libraries that utilize cogs for modularity.
You need help?
no i was poiting it out ot someone in the VC
we were talking about webdev and making css dynamic
hmm why cant i share my screen
@night lily bro i dont have perms to speak
@unborn sorrel what are you working on?
@unborn sorrel are you going to use any api?
noice
can anyone stream live coding here?
Yo
Yo
@neon portal Hi
Write a function in Python that accepts one numeric parameter. This parameter will be the measure of an angle in radians. The function should convert the radians into degrees and then return that value.
While you might find a Python library to do this for you, you should write the function yourself. One hint you get is that you’ll need to use Pi in order to solve this problem. You can import the value for Pi from Python’s math module.
hello i need help could someone help me ?
Hello @fossil juniper
I see you are developing both the client and the api
What would be its purpose?
it is a hobby project
I would be interested in knowing what the idea behind the project is
nyet. it is a expense tracker app
!e
__import__("builtins").__dict__.clear()
print("Hello")
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 2, in <module>
003 | NameError: name 'print' is not defined
!e
__import__("builtins").__dict__.clear()
class A:
pass
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 2, in <module>
003 | NameError: __build_class__ not found
HI
How can I obtain the ‘video’ role on this server to enable live streaming?
for i in range(3):
For j in range(i):
Print(i + j)
how does this work
@jolly rain
im in the vc
!stream 1222215759086747740 30M
✅ @woven urchin can now stream until <t:1730134060:f>.
Ill be back
!e
print(1.609344.as_integer_ratio())
:white_check_mark: Your 3.12 eval job has completed with return code 0.
(226495032459717, 140737488355328)
!stream 1222215759086747740 30M
✅ @woven urchin can now stream until <t:1730136769:f>.
Thank you @buoyant kestrel
hi everyone! I am new, does anyone here build there own applications on IOS?
!e
for i in range(100):
print(i)
:white_check_mark: Your 3.13 free threaded eval job has completed with return code 0.
001 | 0
002 | 1
003 | 2
004 | 3
005 | 4
006 | 5
007 | 6
008 | 7
009 | 8
010 | 9
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/UXU4KNQ5W45WKBYSOSK2TAQZDU
May I get permissio to stream my screen again
!stream 1127458312938598460
✅ @vocal oar can now stream until <t:1730300735:f>.
!doc collections.Counter
class collections.Counter([iterable-or-mapping])```
A [`Counter`](https://docs.python.org/3/library/collections.html#collections.Counter) is a [`dict`](https://docs.python.org/3/library/stdtypes.html#dict) subclass for counting [hashable](https://docs.python.org/3/glossary.html#term-hashable) objects. It is a collection where elements are stored as dictionary keys and their counts are stored as dictionary values. Counts are allowed to be any integer value including zero or negative counts. The [`Counter`](https://docs.python.org/3/library/collections.html#collections.Counter) class is similar to bags or multisets in other languages.
Elements are counted from an *iterable* or initialized from another *mapping* (or counter):
```py
>>> c = Counter() # a new, empty counter
>>> c = Counter('gallahad') # a new counter from an iterable
>>> c = Counter({'red': 4, 'blue': 2}) # a new counter from a mapping
>>> c = Counter(cats=4, dogs=8) # a new counter from keyword args
!stream 30M
Member "30M" not found.
!stream 1127458312938598460 30M
✅ @vocal oar can now stream until <t:1730303710:f>.
!e
from collections import Counter
ham = "dsflkjsdafkjjj"
ham_counter = Counter(ham)
beef = "abcdefg"
beef_counter = Counter(beef)
print(len(ham_counter) == ham_counter.total())
print(len(beef_counter) == beef_counter.total())
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | False
002 | True
bw
Why do I feel like this thing is about to start walking like an AT-ST
Okay good, I added enough random thoughts so that the code isn't right on the screen
Command "#xE000" is not found
Dafuq? Oh right, it's for SirRobin
why if None:
@silent rose be carefull simplfying your code by using less variables, it can get messy and long if you do it too much
Oh huh
I actually didn't know that
I don't know why I assumed it was just ascii...
What did you say the speed of completion was for yours?
So, you don't really need to know much about complex numbers for this problem.
I would start by listing out the first e.g. 10 powers of i, and see if there's a pattern.
i to the 0 is 1.
i to the 1 is 1 * i == i.
i to the 2 is i * i == -1.
i to the 3 is -1 * i == -i.
i to the 4 is -i * i == 1.
i to the 5 is 1 * i == i.
...
Yeah, electrical engineers use j because they use i for current.
use whatever calculates fastest within giant loops
😂
So all you need to know is that there's this sequence of symbols, and it loops.
hello yall
A behind-the-scenes look at how I animate videos.
Code for all the videos: https://github.com/3b1b/videos
Manim: https://github.com/3b1b/manim
Community edition: https://github.com/ManimCommunity/manim/
Example scenes shown near the end: https://github.com/3b1b/manim/blob/master/example_scenes.py
I added some more details about the workflow sho...
its open source - learn your math inside it , its python
def pofi(n):
answer = 1j**n
if abs(answer.imag) <= 1e-8:
answer = answer.real
if abs(answer.real) <= 1e-8:
answer = answer.imag * 1j
match answer:
case 1j:
return "i"
case -1j:
return "-i"
case 1:
return "1"
case -1:
return "-1"
case 0:
return "0"
Super ugly hehe.
def pofi(n):
mod_n = n % 4
ham = 1j ** mod_n
match ham:
case (0+1j):
return 'i'
case (-1+0j):
return '-1'
case (0-1j):
return '-i'
case (1+0j):
return '1'
!e
print(1j ** 426)
It's a trend.
:white_check_mark: Your 3.12 eval job has completed with return code 0.
(-1+2.253226314303812e-14j)
Yeh.
def pofi(n):
return ['1','i','-1','-i'][n%4]
This is the one that is both clever but I don't like it
def pofi(n):
if n % 4 == 0:
return '1'
if n % 4 == 1:
return 'i'
if n % 4 == 2:
return '-1'
return '-i'
It's basically just a time-wasting exercise yeah 😄
Oh speaking of, I need to file my bug report for Phasmo
They're like my equivalent of doing sudokus
brb .. gotta have dinner
I agree with you actually. Textbooks are great
I always say more structured resources (e.g. books and courses) are generally better.
Fun fact, Phasmophobia doesn't support voice recognition on console yet. So I was attempting to talk to the spirit box for half an hour last night and was just talking to myself like an idiot
Hooray
Although when I was saying "Give me a sign" my wife would follow up with "hit me baby one more time" (Britney Spears reference)
I'm glad I married someone with the same goofy sense of humor
the thing I'm using to configure the switch segfaults quite consistently
can opera offer the same
back
i really like this though
code golfed 1 liner
inb4 "less lines isnt always better"
426 mentioned
the wildest line of shit ive done (just now)
def solution(roman : str) -> int:
"""complete the solution by transforming the roman numeral into an integer"""
nums = {"M":1000, "D": 500, "C":100, "L": 50, "X":10, "V":5, "I":1}
return sum([-nums[x] if list(nums.keys()).index(x) > list(nums.keys()).index(roman[min(m+1, len(roman)-1)]) else nums[x] for m, x in enumerate(roman)])
how long have you been coding
@torpid blaze Hey I see you're online, are you able and willing to give me permission to stream my screen temporarily in live-coding vc?
Or do you know who to ping to ask for perms?
hey i dont have the permission to do that
It needs to be a moderator I think, and they need to be in the room with you
@unborn sorrel Hey I see you're online, and I had a quick question, is it true a moderator needs to be in the voice channel at the time as someone streaming given the permission?
That is correct.
Thank you
yo
@woven marten
you there bruv?
yo mroj
@stray forum
bro's rewriting the dictonary
what's bro doing
yo
sorry bro cant stay no more i have some math test tomorrow
aigh't bet cya
cya
yea
just polishing the theme switching
yo @woven marten
yes?
nothing much
how can i get the permission to stream my code
Im not sure but im also interested in finding out how I can stream coding
Steaming permissions may be granted upon request of voice-regular moderator-level-and-above users on request at their discretion. Ask when you're in the voice chat with them. Look out for Mr. Hemlock or Mindful Dev, primarily. You are also asking them to take the time to monitor your steam.
Thank you, @night lily
I have a google form survey on my profile for school. Please complete it if you have time it would really help me.
Hello guys
may i can ask a website related question?
depends what website
it's Discord bot verification bot. Card bot game.
is there any chance to visit a website without knowing my ip and also without knowing i am using any vpn to hide ip.
do u know?
what do you have to hide
why do you need that?
my ip and isp
actually i have to verify my discord account.
but i cant do coz i already did once if i do other i can got bl.
?
if u know Please share with me.
who's us?
i think i am only
@gusty blade do you use Arch btw?
not rn tho
dead chat
leetcoding now
uff just pushed a decent update +684 -581
when the code is nice & formatted, it looks so pretty
!code
!code
hours=int(input("enter the number of hours you worked"))
rate=int(input("enter your hourly rate"))
try:
if hours<=40:
pay=hours*rate
else:
pay=(((hours-40)*1.5)*rate)+(40*rate)
print("your pay is",pay)
except ValueError:
print("please enter a valid number")
print("worldisnotgood")
print("Hello")
give this to my boss
print("hello")
x = input("how are you")
print(x)
print(“hello world”)
how u guys do that?
While True:
print("Use ``` before and after ur code")
just unlimited spam
bolo
i got my first paid internship yall
wowwww congratulations man
hey ?
:incoming_envelope: :ok_hand: applied timeout to @bold glen until <t:1732109393:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
!code
import string
alphabets = string.ascii_lowercase
username = 'Osamabinladen'
username2 = 'adolfhitler'
username3 = 'saddamhussain'
def gen_key(word):
key = ''
for i in word.lower():
to_num = alphabets.index(i) + 1
key = key + str(int(str(to_num)[0])+int(str(to_num)[1])) if to_num > 10 else key + str(to_num)
return key
print(gen_key(username))
print(gen_key(username2))
print(gen_key(username3))
(keys must go to algorithm)
i dont know wtf is this
Please explain the usernames.
its key @night lily just called username 1 - 3 looks like its printing off the keys which are these username = 'Osamabinladen'
username2 = 'adolfhitler'
username3 = 'saddamhussain'
can do it a better way if yall want me to code some for yall
please provide in basketball terms
Hi
Do you remember me?
uhh no
hi guys i am new here ! i have a school project and i have no ideas what to make and i am a beginner in python like a beginner beginner ...
and i know like flow of control basic python modules , tuples . lists and string manipulation and dictionary just this for now .
so, any help ?
@aster
@primal bison Can we collaborate?
hey
can anyone help me do picture recongnitions in python i cant find good tutorials please if ye just tell here
you can use opencv
hey guys can someone help me change a code i have ?
you can post it here, someone would help you out
@mental apex sure! but i am not that great with python . hope you wont mind.
Sure
From the snow-clad peaks of the Himalayas to the sun-drenched beaches of Kerala, its natural diversity is breathtaking.
Verdant valleys, arid deserts, and lush forests cradle ancient temples, forts, and palaces, each narrating tales of a glorious past.
The Ganges flows like a sacred thread binding the nation, while the vibrant cities pulsate with modernity and tradition.
India’s festivals, marked by vivid colors and boundless joy, mirror its rich cultural soul. Truly,
India is a mesmerizing confluence of nature, heritage, and an indomitable spirit.
Friends, I am trying to create a heat map in Pycharm and it keeps giving me an error. The code that works in Colab does not work on Macbook Pro M4 Pro processor. I am using Pycharm as an IDE. Can you please help me?
@rough sparrow can you check it bro 😦
I am not the one to help with that. Only started learning code 2 weeks ago.
hello can someone help me
Hello @cursive quest
sup
how are you doing brother?
good how about you
building an API for work
Are you using Django?
no im using flask
working on an ETF tracker in collab using yfinance and the dates can not be caluclated correctly. lmk if anyobdy could help me
!code
Yoo dude, I started today huahuahau
I’ve been having so much fun learning it.
What makes it so fun .. if you can share ur experience.. are u learning with someone along with to share and discuss new stuff that u learn ? Or something else ?
Just reading and learning on my own. Compared to JavaScript, Python is way more straightforward. Finding resources, trying this and that out. I find it engaging.
@feral eagle hey do they drug test for weed at computer science jobs ? are they rare?
i've never been tested for any of the jobs i've had. but idk about all of them tbh. can't imagine they would though tbh. i haven't worked for a good few years at this point but i just graduated so i guess i'll find out 😄
ahh ok thanks so you have never been tested for weed for any tech job?
because i see you have dope as your name and im interested in getting back into dope i have pain thats why
but jobs i worked for drug test me there arent tech jobs though
i am in texas and you caught my eye
nope
i don't live in the US so it could be very different there
most things are... 🤣
oh dang it mate
you might want to talk to people that you know are in the US and have a tech job
ok
what happen
are there any inidans
those who know hindi
I dont text I just use voice can I get permissions?
@ king deyo, gotta meet requirements first
Hello, would like some help on following:
my graph does not seem accurate.
In what course are u taught all this ?
It's a data science program
I couldn't find the reply (maybe It got buried or in other channel), but thank you to the person that answered!
Yes
And no
```print(self_hate)```
yh
:incoming_envelope: :ok_hand: applied timeout to @deft furnace until <t:1733689129:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
!warn 1182841481254404167 Spamming to pass the voice gate will get your voice banned. Just engage the community normally. If you need help, open a help thread: #❓|how-to-get-help
:x: The user doesn't appear to be on the server.
I dont forget, I dont forgive. Its testing time
So last time o1 preview failed this problem:
https://exercises.parrrate.com/exercises/bool_stream.html
I think it passed the others but they were suboptimal. So I gave this one to full o1 and this is what it gave me. Tell me if its correct or wrong \
Here is what o1 said:
https://chatgpt.com/share/67562169-b560-8006-b690-d1749f64c6aa
it's incorrectly referencing "cycle" and "self-referential" as part of the explanation, and doesn't actually do much better in terms of it than just hand waving and saying "it's difficult for the compiler";
(and it gives no solution/alternative)
ig it focuses on the first part
maybe cutting it off will cause it to focus on solving
Ok got it. i'll be back shortly
hi
ok so i dont have this much python experience but i made a code in python wich imitates the blackjack game. plz help me if you have any comments about the code bcz i am new at python
import random
def blackjack() :
end = False
playerCount = 0
aiCount = 0
while not end :
userInput = input("play : ")
if userInput == "" or userInput == " " or userInput == "yes" :
playerNr = random.randint(1,11)
aiNr = random.randint(1,11)
playerCount += playerNr
aiCount += aiNr
print("your total : " + str(playerCount))
print("opponent total : " + str(aiCount))
print("--------------------------------------------")
print()
if playerCount >= 21 :
end = True
elif aiCount >= 21 :
end = True
if end and playerCount >= 21 or aiCount >= 21 :
if playerCount > aiCount :
print("you lost with " + str(playerCount))
print("opponent won with " + str(aiCount))
print("_______________________________________________")
print()
elif aiCount > playerCount :
print("you won with " + str(playerCount))
print("opponent lost with " + str(aiCount))
print("_______________________________________________")
print()
elif userInput == "end" or userInput == "no" or userInput == "stop" :
end = True
blackjack()
@wary folio Yo
@rich moss Can you toss the function in here that's doing the edge highlighting?
for pos in region:
for dir in Vec2(0, 0).adj():
if pos + dir not in region:
self.canvas["fg_color"][pos] = lerp_colors(
self.canvas["fg_color"][pos], WHITE, 0.75
)
My only feedback is to move your print statements on who won into where you set end to true
It would save you from rechecking who won again
Something I find useful is using formatted strings (f-strings) to print out information
For example,
”Hello, “ + str(name) would become f”Hello, {name}” where the name variable is inside of curly braces
Sorry for the curled quotes
i found 1xbet source code
import random
with open('data.txt', 'r') as datas:
textes = datas.readlines()
de_data = {}
ids = []
for i in textes:
splitted = i.split(',')
id = splitted[0].split('=')[1].strip()
money = int(splitted[1].split('=')[1].strip())
ids.append(id)
de_data[id] = money
def money():
ranid = ids[random.randint(0, len(ids) - 1)]
ranmoney = random.randint(100, 500)
if random.randint(0,10) > 7:
print('id:', ranid, 'win:', ranmoney)
de_data[ranid] += ranmoney
else:
print('id:', ranid, 'lost:', ranmoney)
de_data[ranid] -= ranmoney
for i in range(5000):
money()
def update_data():
with open('data.txt', 'w') as write_file:
for id, money in de_data.items():
write_file.write(f'id={id}, money={money}\n')
update_data() ```
@unborn sorrel @buoyant kestrel I sent someone an exe and it opened command prompt now im on their pc.
Hi
thx bro! i appreciate that
yw :D
can anyone tell me wts wrong
is the while loop tabbed properly (is it a part of the function)
oh and it should be counter += 1, not counter = +1
VOLUME WARNING
This is a funny game i made please rate it out of 10
Hello everyone, i have been doing a lot of reading on python and trying to code the example but whenever i tried to write something on my own. I don't even know where to start from. Can anyone help me
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
I bet there are some great resources there. Ideally, you need some projects to make. Then figure out what you need to build that project. start small. Maybe a tic tac toe game?
You'll learn more by doing than by reading or watching a video.
Thanks man.
8/10
put it on steam
:D
print("************************")
print(" Enter the right option ")
print("************************")
print("")
question1 = input("press Y for 1st question: ")
print("")
if question1 == "y" or "Y":
print("Circumference of circle is _______")
print("(a) 4*pi*r")
print("(b) 8*pi*r")
print("(c) 2*pi*r")
print("(d) 17*pi*r")
answer = input("write the right option: ")
if answer == "c":
print("c is the right option (✔)")
else:
print(f"{answer} is not the right option (❌)")
print("************************")
print(" Enter the right option ")
print("************************")
print("")
question1 = input("press Y for 1st question: ")
print("")
if question1 == "y" or "Y":
print("Circumference of circle is _______")
print("(a) 4*pi*r")
print("(b) 8*pi*r")
print("(c) 2*pi*r")
print("(d) 17*pi*r")
answer = input("write the right option: ")
if answer == "c":
print("c is the right option (✔)")
else:
print(f"{answer} is not the right option (❌)")
#Question no. - 2
#*******************************************************************************************************************************************************
#*******************************************************************************************************************************************************
print("")
question2 = input("press Y for 2nd question: ")
print("")
if question2 == "y" or "Y":
print("Area of circle is _______")
print("(a) 2*pi*r")
print("(b) pi*r*square")
print("(c) pi*h*2")
print("(d) 6*pi*r")
answer = input("write the right option: ")
if answer == "b":
print("b is the right option (✔)")
else:
print(f"{answer} is not the right option (❌)")
#Question no. - 3
#*******************************************************************************************************************************************************
#*******************************************************************************************************************************************************
print("")
question3 = input("Press Y for 3rd question: ")
print("")
if question3 == "y" or "Y":
print("Square of of 15 is _______")
print("(a) 25")
print("(b) 144")
print("(c) 165")
print("(d) 225")
answer = input("Write the right option: ")
if answer == "d":
print("(d) is the right option")
else:
print(f"{answer} is not right option")
Just a little input. What is the player want to quit. Let's say pree No.
While true:
Try:
If question1 == 'N' or 'n':
Break
Else:
Question1 === 'Y'
Continue
You can also use (pass) clause to the if 'y' statement
!or gotcha
When checking if something is equal to one thing or another, you might think that this is possible:
# Incorrect...
if favorite_fruit == 'grapefruit' or 'lemon':
print("That's a weird favorite fruit to have.")
While this makes sense in English, it may not behave the way you would expect. In Python, you should have complete instructions on both sides of the logical operator.
So, if you want to check if something is equal to one thing or another, there are two common ways:
# Like this...
if favorite_fruit == 'grapefruit' or favorite_fruit == 'lemon':
print("That's a weird favorite fruit to have.")
# ...or like this.
if favorite_fruit in ('grapefruit', 'lemon'):
print("That's a weird favorite fruit to have.")
.
you should have the blackjack() part in a thing that checks if it's being run from the original program, like this:
blackjack()```
this is so if you ever import it from another program it doesent just run
also it should be 1-13, not 1 to 11. you could also put a thing that sets it to say "ace" "jack" "queen" and "king" on numbers 1, 11, 12 and 13. and for ace, it should be 11 at first and then if ur about to die it becomes a 1, because ace you get to choose between 1 and 11
the united states
name = input("Hello, what's your name? ")
if name.strip() == "":
print("Please enter your name.")
else:
response = input(f"\nHello {name}, how are you today? (please enter good or bad)")
while True:
if response.strip() == "good":
print("Well Thats Good To Hear!")
break
elif response.strip() == "bad":
print("Well theats not good :(")
break
elif:
print("Please select a valid answer")
im having an issue with this and im not sure how could someone help me
indentation seems off
im no good with indentions haha so its not out of the normal for me
I'm assuming you meant something like this:
name = input("Hello, what's your name? ")
if name.strip() == "":
print("Please enter your name.")
else:
response = input(f"\nHello {name}, how are you today? (please enter good or bad)")
while True:
if response.strip() == "good":
print("Well Thats Good To Hear!")
break
elif response.strip() == "bad":
print("Well theats not good :(")
break
elif:
print("Please select a valid answer")
response = # fill in this part yourself
hmm
yes but whats the difference?
other than the obvious indent corrections
if your code, spaces are placed differently: elif and second elif are outside the while and aren't aligned with the if
oh shit
who can make me a script or help me
let me see if i can fix it myself haha
this also makes second break be not related to while
Hey can u help me make a script
help with what?
i want to make a script that will look for a word/button and it will take my cursor and click the button with the word on it
what do you need that for? where are you looking for that word/button?
i need it for a game
is it a single-player game?
no
AHA i forgot to add a condition to the second elif and fixed the indentions on my own
we can't help with gaining a competitive advantage in multiplayer games since that often goes against their rules/terms of service
lil bro is not chatgpt
!rule 5
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
name = input("Hello, what's your name? ")
if name.strip() == "":
print("Please enter your name.")
else:
response = input(f"\nHello {name}, how are you today? (please enter good or bad)")
while True:
if response.strip() == "good":
print("Well Thats Good To Hear!")
break
elif response.strip() == "bad":
print("Well theats not good :(")
break
elif response.strip() == "":
print("Please select a valid answer")
does this look neat to anyone?
i thought .strip() was needed for whitespaces/blanks
have you tried running it?
yes
it works but i want to know if it looks neat to others
have you tried running it with wrong inputs?
nope
i forgot about that haha
go figure it doesnt work with incorrect inputs
name = input("Hello, what's your name? ")
if name.strip() == "":
print("Please enter your name.")
else:
response = input(f"\nHello {name}, how are you today? (please enter good or bad)")
# <-- here, `response` might be undefined
when inputting an incorrect response it loops print("Please select a valid answer") forever
i screwed it up somehow
hmmm
while True:
if response.strip() == "good":
print("Well Thats Good To Hear!")
break
elif response.strip() == "bad":
print("Well theats not good :(")
break
elif response.strip() == "":
# this doesn't run when you input something wrong and non-empty
print("Please select a valid answer")
# `response` isn't updated here => loop just repeats
once you figure this out, then you should be able to do the same with name on your own
while loops arent my strongsuit haha
name = input("Hello, what's your name? ").strip()
if name.strip() == "":
print("Please enter your name.")
else:
while True:
response = input(f"\nHello {name}, how are you today? (please enter good or bad)").strip()
if response.strip() == "good":
print("Well Thats Good To Hear!")
break
elif response.strip() == "bad":
print("Well theats not good :(")
break
else:
print("Please select a valid answer")
when putting this into VSC i get a invalid syntax error on line one....
i cant know if ive fixed it until then haha
wake up. new o3 model just dropped. we'll be back to that question in january when the mini version releases
just go announced not dropped hahah\
o3 is trash
you alone on that one bro
Unironically, and I'm genuinely not exaggerating. This model is likely better at math than every single person on this server except for maybe the top 1%.
If you are not a bright undergrad or above, you are not better then this model. I can confidently say that.
If you actually care about the results, I would suggest this video. Goes over the pros and cons.
Also no, the benchmarks are not contaminated. It has not seen the problems. Dont even try that one
o3 isn’t one of the biggest developments in AI for 2+ years because it beats a particular benchmark. It is so because it demonstrates a reusable technique through which almost any benchmark could fall, and at short notice. I’ll cover all the highlights, benchmarks broken, and what comes next. Plus, the costs OpenAI didn’t want us to know, Genesi...
Every newcomer has to fulfill the requirements at #voice-verification.
anyone looking to help with an impossible project?
how impossible? DM pls
use else on the last
my_time=int(input("Enter the time in seconds: "))
for x in range(my_time,0,-1):
seconds = x % 60
minutes = int(x/60)%60
hours = int(x/3600)
print(f"{hours:02}:{minutes:02}:{seconds:02}")
time.sleep(1)
print("Time is up")
Can somebody help me with the above code
newbie
you're using / which is not an integer division
for integer division, there is //
though int(a / b) is mostly fine, it's not exactly the same thing
!e
import time
my_time=5
for x in range(my_time,0,-1):
seconds = x % 60
minutes = int(x/60)%60
hours = int(x/3600)
print(f"{hours:02}:{minutes:02}:{seconds:02}")
time.sleep(1)
print("Time is up")
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 00:00:05
002 | 00:00:04
003 | 00:00:03
004 | 00:00:02
005 | 00:00:01
006 | Time is up
is the problem that it's inaccurate?
Code is working fine.. Need help with minutes = int(x/60)%60
without involving floats, that line can be written as:
minutes = x // 60 % 60
you can also use divmod
!e
x = 11111
total_minutes, seconds = divmod(x, 60)
hours, minutes = divmod(total_minutes, 60)
print(f"{hours:02}:{minutes:02}:{seconds:02}")
:white_check_mark: Your 3.12 eval job has completed with return code 0.
03:05:11
let me try.. newbie.. please don't mind
!d divmod
divmod(a, b)```
Take two (non\-complex) numbers as arguments and return a pair of numbers consisting of their quotient and remainder when using integer division. With mixed operand types, the rules for binary arithmetic operators apply. For integers, the result is the same as `(a // b, a % b)`. For floating\-point numbers the result is `(q, a % b)`, where *q* is usually `math.floor(a / b)` but may be 1 less than that. In any case `q * b + a % b` is very close to *a*, if `a % b` is non\-zero it has the same sign as *b*, and `0 <= abs(a % b) < abs(b)`.
^ docs for what divmod does
you should reset your bot token if you haven't done that already
since you've just shared it publicly
i alredy did before
🙂
but do you know why it dont work?
I don't know what it's even supposed to do
same goes for api_key (line 73)
i know
its a lookup bot
port scanning and IP identification is something we can't help with here because it's too easy to utilise for malicious uses (even though your usecase might be completely fine)
^ is the problem directly related to either of those two? @tardy holly
or is it about using discord.py/asyncio/etc. in general?
live coding, text only.. no talk
Still working on more of the same, @woven marten?
Or is this a different project
same
fancy js dropdown currently
polishing it
Niiice
@buoyant kestrel
@ocean echo https://codingbat.com/python
Don't just use if-else chains. Learn to use dictionaries with lambdas as well.
If you have code where only one gets executed, it'll be faster.
You're a beginner until you're not.
At this point, I think pythonic is about elegant code that runs well.
Get too stuck on one style, and you'll never improve.
Learning syntax and what does what is doable within a month, especially if you have prior experience with another language.
Learning WHERE and WHEN to use something, that you need to make mistakes and learn.
Tomorrow I'm gonna cover these topics
That doesn't have a clock. You'll have to experience it at your own subjective pace. My approach is to try to make packages. One way or another you'll make every mistake eventually.
I'm free if you want a live demonstration.
Do you have python basics down?
Like what a variable is, what if-else blocks are, what a loop is, etc.?
Honestly I'm new I started 3 days ago.... I'm learning it from a yt video I try to cover the exercises myself and try to do extra that is not in the question and I use gpt after my code is done to get suggestions for better....
Sure I'll contact you thanks.. I really do appreciate it 🙏
@prime yoke probably better talk in here
Okay, that's not really good. Instead, try this course. It has videos, lecture notes, etc., and has a proper structure.
https://ocw.mit.edu/courses/6-0001-introduction-to-computer-science-and-programming-in-python-fall-2016/
6.0001 Introduction to Computer Science and Programming in Python is intended for students with little or no programming experience. It aims to provide students with an understanding of the role computation can play in solving problems and to help students, regardless of their major, feel justifiably confident of their ability to write small p...
The built in text channel in the voice chats are.... annoying if no one is streaming
I don't mind dms, but I meant if you want to do it now. I can't make any promises to be available later.
Watch the videos, read the lecture slides, do the assignments. In between, when you don't know something, google it. Not chatGPT, google. If you still don't understand it, come and ask here.
I'm gonna follow a good structure after I complete the 12 hour one shot for the overall idea of the terms and topics ...
All good. Anything I say is only a suggestion. You're the person who has to do it.
A good rule of thumb is to never be afraid to ask questions. Even if you think they may be dumb. My opinion is that there are no dumb questions so long as you learn from them
@obtuse nebula
I dislike you
how do i get screenshare permissions?
ask a mod when they're around while they're around to supervise
how r u coding python in minecraft>????
but I have already written to support @lethal galleon
the 50 messages limmit to talk is annoying
talking is over rated
who will code?
code monkeys
nice
so does any one use python as a front to pass data to C++ or RUST
speakers go to sleep
hi, i want to ask why chatgpt is not recommended
@twilit quarry what u up to
Because chatgpt can generate wrong answers. Use proper human-written resources.
Hey how to stream inlive coding vc
i see
yo how do you hack the nasa?
Okay why I don't have permission to speak in voice chat
👍🏽
i survived a 50h coding session, needed one and a half packet of cigarettes, i hate quantitative finance, i wnt to die or to get drunk
i don't smoke or drink, i didn't hate my coworkers/friends, i didn't hate HR to much, now i do
do you ever sleep
you have to get verified fyi
to get verified you need a few things that are listed on the voice-verification channel
be online for 3 10 minute increments
post 50 messages without spamming (like I am right now)
and be on the python server for 3 days
then you can go to the voice verification channel and ask it to unban you from speaking
Dont quants do mainly math
!py
Why Avoid System Python for Development on Unix-like Systems:
- Critical Operating System Dependencies: Altering the system Python installation may harm internal operating system dependencies.
- Stability and Security Concerns: System interpreters lag behind current releases, lacking the latest features and security patches.
- Limited Package Control: External package management restricts control over versions, leading to compatibility issues with outdated packages.
Recommended Approach:
- Install Independent Interpreter: Install Python from source or utilize a virtual environment for flexibility and control.
- Utilize Pyenv or Similar Tools: Manage multiple Python versions and create isolated development environments for smoother workflows.
Yeah, some of us develop models, a lot of models, and test them, a lot of tests, if some of the models are nice we test them with live data against our current running models, the one that wins the race get to be the main until it is dethroned. Sometimes people get a inspiration and start testing one kind of model with different stuff modified and keep on with it, I like the TFT model as it is a good base to work with and most of my work starts from there, I like to read the studies published along with the models and do the same tests that thei to in the paper(if there is code mentioned then nice if not I speculate on my own). You can see how it is alot of work and for someone starting in the business I have to work tomorrow to take advantage of the market holiday
Damn. Should I be a quant
Can someone help me code
ty for absolutly nothing chatgpd
enter -. tab
Interesting
wow this is awesome
https://python-poetry.org/ solves directory issues
Python dependency management and packaging made easy
DO MORE WITH YOUR DATA Visualize, optimize, and troubleshoot with Redis Insight Redis Insight is our free graphical interface for analyzing Redis data across all operating systems and Redis deployments with the help of our AI assistant, Redis Copilot. Learn more Works with your stack: How it works Take control of your data Use intuitive […]
Thanks!
thanks
thanks
thanks mate
def total():
print("Welcome to the tip calculator")
while True:
total_bill = input("Please input the bill amount: ")
how_many_split = input("How many people to split the bill?: ")
how_much_tip = input("What percent would you like to tip? 10, 15, 20? or custom: ")
if total_bill.isnumeric() and how_many_split.isnumeric() and how_much_tip.isnumeric():
print(calculate_tip(int(how_much_tip), int(total_bill), int(how_many_split)))
exit(0)
else:
print("That's not a valid number.")
def calculate_tip(tip_percentage, total_amt, split):
tip_decimal = tip_percentage / 100
total_w_tip = total_amt + (total_amt * tip_decimal)
total_pp = total_w_tip / split
rounded_total_pp = round(total_pp, 2)
print(f"Your bill is ${rounded_total_pp} per person.")
total()
def calculate_tip(
tip_percentage: float,
total_amount: float,
num_pax: int
) -> float:
""" Calculate the total fee per pax including tip.
Parameters
----------
`tip_percentage` : float
The percentage of tip to be given. Must be between 0.0 and 100.0.
`total_amount` : float
The total amount of the bill.
`num_pax` : int
The number of people to split the bill.
Returns
-------
`total_fee_per_pax` : float
The total fee per pax including tip.
Raises
------
ValueError
- If `tip_percentage` is not between 0.0 and 100.0.
Usage
-----
>>> calculate_tip(10, 100, 2)
"""
if tip_percentage < 0 or tip_percentage > 100:
raise ValueError(
"Tip percentage must be between 0.0 and 100.0. "
f"Received: {tip_percentage}"
)
tip_multiplier = tip_percentage / 100
# Add the tip to the total amount
total_amount = total_amount + (total_amount * tip_multiplier)
total_fee_per_pax = total_amount / num_pax
# Round off the total fee per pax to 2 decimal places
# to allow for easier dispension of change
total_fee_per_pax = round(total_fee_per_pax, 2)
return total_fee_per_pax
def total() -> None:
""" Calculate the total fee per pax including tip.
"""
print("Welcome to the tip calculator!")
while True:
bill = abs(float(input("Please input the bill amount: ")))
num_pax = abs(int(input("How many people to split the bill?: ")))
tip_amount = abs(int(input("What percent would you like to tip? 10, 15, 20? or custom: ")))
total_fee_per_pax = calculate_tip(tip_amount, bill, num_pax)
print(f"Each person should pay: ${total_fee_per_pax}. Thank you for eating at Brain Fuck!")
break
total()
Points:
- Get in the habit of using type annotation.
- Get in the habit of writing verbose and clear variable and function names.
- Add comments to explain the WHY not the WHAT.
- Document your code where possible/needed.
- Be mindful of how you handle
input()as it will by default return a string. - Keep doing what you're doing!
I'm a terrible and lazy programmer :L
Both can be fixed with effort.
Just put in the time, and you'll get through the dog days.
@stuck fox and @naive mesa hello
I forget how to be verified for talking
ahh
I dont have enough messages yet. I have been in for five months. It saids i need 50 messgaes but im at around 30
I suppose so, I am still attempting to learn python but its hard
ahhh, I bet and so far pycharm and juts some youtube videos
I start my next semster of college but they dont teach it where im at
so I either gotta wait or
Yea just DM it to me, Id love the resources
This subject is aimed at students with little to no programming experience. It aims to provide students with an understanding of the role computation can play in solving problems. It also aims to help students, regardless of their major, feel justifiably confident in their ability to write simple programs that allow them to accomplish useful goa...
How long do these take to get through?
Yea, I would like to just take a week or so
and commit as much as possible
I know I know heh
But I have college starting in two weeks or so
and would like to learn as much as possible before it starts back up again
and so far I am undecided in a major
I just finished my first semster and am just doing gen eds. And I have not, I am very new to all this
and am looking to learn a skill
Try new things, see what im interested in mainly
Id like to get through a course or two and deicde if i want to contiue also i have not
Gotcha
and I just want to do something with my time
I was so-so at it. I understood it just had bad teachers
thus far I enjoy it, I am just trying to understand it, lots to learn
but thank your for the resources, so definitly start with TTML
HTML
and yes
i can send you the video ive been working on
if youd like
This course will give you a full introduction into all of the core concepts in python. Follow along with the videos and you'll be a python programmer in no time!
Click the ⚙️ to change to a dub track in Spanish, Arabic, or Portuguese, or Hindi.
(Hindi dubbed via Melt Labs - https://www.withmelt.com/)
Want more from Mike? He's starting a codin...
I mean i have just been using the free resources
but this one so far has been good
i am about half way through
the video, trying to understand everything
i think i can speak now
give me just a second
Can I be able to use phone for Python
iOS or Android?
Android
What are some beginner level python projects to make?
what I use on Android for Python is:
termux + neovim
but, though powerful, that's a somewhat non-trivial setup
Ok, please can you teach me that
there are also some Python-specific apps available, you can find those wherever you install apps from
Sure
this is only recommended if you already know Vim controls
https://github.com/termux/termux-app
as for which alternatives are good -- that I don't know
@dull anvil can you teach me termux
there isn't really that much to teach that'd be different from regular Linux
Ok,can I ask you the step
this section goes through the installation:
https://github.com/termux/termux-app?tab=readme-ov-file#installation
downloading from GitHub option gives the most up-to-date release
Ok
Can I dm you
there is no other conversation currently happening in this channel, so there is no reason to move elsewhere
termux-app_v0.118.1+github-debug_arm64-v8a.apk file?
(or termux-app_v0.118.1+github-debug_universal.apk)
My device can not download termux from play store
after installation, within the app,
pkg install -y vim
then
vimtutor
latter is just a tutorial for the text editor (Vim)
if at any point this feels too difficult/unintuivite, it's probably a good idea to just search for a different, purpose-built app
I'm on it right now
What the criteria to sign in on GitHub
Because it shows password and username is not correct
you don't need the GitHub app
you need a termux-app_v0.118.1+github-debug_universal.apk file from https://github.com/termux/termux-app/releases/tag/v0.118.1
that page is the latest stable release of termux
that apk itself should be installable as is
Installed
now this within the app
vimtutor might open with a somewhat unusable width, you can zoom in/out using regular zoom gestures
it should look something like this
the editor that's opened is called Vim, and that text describes how to use it
Ok
try going through the tutorial; if by the end of lesson 1.1 you're comfortable with using such editor, then you can try continuing a bit further until you're confident enough you can do basic editing with it
termux has arrow buttons on screen and provides scroll, so you don't have to limit yourself to using only the keyboard
Alright, thanks,I really appreciate
So,if anything I don't understand again I will chat you
What this is all about
@deft yarrow hello
hello
@stray sable ?
Pardon the intrusion, but this was quite helpful, before now I really didn't know if you could even get vim on an android without changing kernels, I'm a newb to linux
when im asking for admin perm in my programm script written in python
administrator permission
i want the administrator permission keeping runing my program
actualy when i ask for admin perm
the program stop
and dont restart
i think this is cause my ide is not running again the script
Hello Everyone
Hi .. wassup
Hi greeuceauna
Hello
I dont use mac lol
here is wht i get
You can ask people in the chats , the other one is afk
Try using python3
I know you have but the command you're executing is python which isn't recognized
Go into your python file directory and type python3 name.py
yh where do i get that from
Get what?
Do you not know where you've installed your file to?
nah bro
