#python-discussion
1 messages Β· Page 252 of 1
So you use it to create PDFs?
i dont even understand how to begin to tackle that. I pulled a table off of wikipedia and it almost melted my brain.
I just need to do more of that type of thing.
eli5:
what's your general flow with that anyway? You mentioned typst, using some regex a while ago.
So scrape job posting, ingest into some logic. Then output to typst in some different formats with some markdown templates?
whats pandas for? What gets put into dataframes?
data. spreadsheet data especially. anything that has rows or columns or both.
Xelf when he frames the data: now this is πΌ
I still do a lot of postgres -> pandas dataframes -> html render of a dataframe.
it's just easy. and you can do an awful lot of dataframe manipulations before serving it.
dataframe:
columns replaced with links to the character page, rows replaced with links that drill down, cells replaced with checkmarks, but it's still a dataframe
hello! i'm new
hullo new, I'm xelf
hi
hi
Thanks now I can cheat
enjoy
!kick 1336231308560433184 sharing js cheats as their first message
:ok_hand: applied kick to @solid totem.
I havn't seen kick done before, what's that do?
That's they're first message?π
Kicks people out the server
removes them from the server but they can rejoin
so like a very light ban. neat. reminds me of old irc days
Stronger than a warning, not yet a ban.
No argument from me.
I believe that's their goal
Man dealing with memory in C is like driving a big bus on one of those narrow mountain roads in the Peruvian Andes. One tiny deviation from the path and you fall to your death = segmentation fault. π΅βπ«
I kinda wish I would've been able to file a security report for the developers but I guess I can't now.
Try c++ lmao
If you're lucky. Sometimes it's keep driving until it blows up 3 hours later and good luck finding it.
I was about to debug all those linker errors but then realized i forgot to link to luaπ
segmentation fault is the worst error message ever. It's basically "bruh, your app crashed. You did a wrong somewhere. Good luck."
I think I figured out what was causing the errors.
Sometimes yes
well that's better than creating larger bug that will make you drive straight into nuke testing facility
I got a job once, because in the interview someone asked me a c memory management question, not expecting me to have the answer as she had been struggling with it all week and was hoping for a fresh perspective, but I solved the problem in the interview and got the job. π
dealing with memory is not realy that bad....
nice
There's at least a core dump...
When you get used to it
Nice!
yeah, never underestimate a fresh perspective. π
Wish I was that smart
You get used to it?
Somewhat i can barely debug in this thingπ
I gotta develop discipline like uhhπ
the time I haven't touched compiled languages before I'm scared on managing memory but as I realized it's just a matter of tending to a crying ticking baby bomb
I spent the first 6 or so years of my career working on a video processing system with no OS. It ran on bare metal, TI DSP. In C. No debugger. Logging coming out of a RS232 port.
Get this i forgot to free memory from one of my objects earlier. Almost caused a memory leak. Actually I still think I did cause a memory leak before I fixed it.
π
Can't pay me enough to do that
still remember my fist memory leak
The good ol days
That was my first engineering job. I had been hired to do support and help with QA for the product. Lead engineer was trying to find someone but couldn't. He suggested I do a project to show I could fill that role so I wrote an HTTP server to handle the config for it. No filesystem so it was essentially function pointers for each page.
Everyone remembers their first.
π
I remember this one time I caused a memory leak in sdlπ
right time right place, more about being lucky.
was ur solution RIIR
Is a tiling window manager good for programming?
Could be.
Lucky I won't choke or lucky enough to get a question i actually know the answer to?π
Ive just installed arch with hyprland on a vm and i really like how hyprland works (kitty wonβt work though ;-;)
That was the nice thing about embedded - we statically allocated 99% of things and the few things that weren't were dynamically allocated at startup and persistent. The only reason they were dynamically allocated was because we needed to know what resolution we were recording at and the determined how many buffers we could have.
Iβve never used arch or hypr before but it seems really cool and I think I could get used to it
How big is that vm in storage when you installed it?
Umm not that much, why?
A good interview you'll talk through the problem with the interviewer and be a 
I think like 8gb storage?
I've had great interviews, and I've had terrible interviews. It was the same me in both interviews, sometimes it's not you that is the problem or reason an interview went bad.
Tryna estimate the amount of resources my computer needs for my vm
Sometimes it's the interviewer.
I think 4gb is recommended for arch
Good Timezone chat
Good because im on 30π
I had 20gb left so I had to do a bit of tidying, Iβm on 90gb now but I still feel like thatβs not much
4gb is enough for every distro and os except win 11
Would have over a 100 but uhhh kinda don't wanna get rid of fortnite yet(haven't opened it in months)
Imagine running a windows vm in windows
Sadly all too often. =/ Especially when you consider that some interviewers are devs that would rather not have been put on interview duty.
Yeah omg I checked Fortnite and itβs 100gb π
I also have genshinπ
π no wonder you have no storage
Love my rpgs
Lmao yeaπ
Surely thereβs a way for them to make Fortnite and Genshin smaller
rm -rf?
move them to your cellphone. that'll free up space.
What if I enjoy playing on pc(I do)
If I do swap to Linux Iβll need to find a new device to play Fortnite on anyway
I donβt know if Iβm able to play it on phone though
You should add meπ
I barely play it haha, Iβm just the designated duo for my friend group when someone needs someone to play
wow - 150gb.
I think im losing interest i can't bring myself to play it anymore π
It's also poorly designed interviews - like live coding exercises.
Hello, im new, do u think that learn py its worth?
I started chapter 1 season 2/3, gameβs peak was chapter 3/4, itβs been downhill since, although Ch7 isnβt the worst and OG season 7 is amazing
100%
That's very little
you can get a lot out of coding interviews if they're done right. I like to ask very easy questions to set the candidate at ease, put them in familiar territory and then exlpore from there.
I think im losing interest and for some reason Minecraft seems more fun nowπ
compared to what ?
there are bigger games out there for sure, but that's still a lot.
Idk because I didn't have context what the 150gb was for lol
Nahh I canβt with Minecraft, I like playing older versions but the game feels to easy to progress through now, I feel like I have to choose not to progress so quickly, like Iβm not really having to survive in survival mode
disk space consumed by having World of Warcraft installed.
Mods exist for this reason
Our technical interview is looking at code and dissecting it, not writing it. A couple of trick questions but enough meat to be able to get a good sense of understanding. I don't think there is any value in live coding exercises.
I like all the new features and mechanics, I think the gameβs progression has never really changed though, and beating the ender dragon and going to the end city is still the end point of progression
Iβm still waiting for that end update
Play mods
Yeah I agree that pure interviewing questions are not great. Especially one that require domain knowledge of having seen a particular trick before, But I still find it a useful way to engage in dialog about something we're both familiar with.
@vale wasp did you ever worked with esp32? i'm curious to the hardware you used for the bare metal stuff
Only mod pack I love is Antimatter Chemistry, itβs a completely different feel from regular Minecraft but I find it so fun, you start with nothing in a white void and break down and combine atoms to create everything you use
There's also another perk, if I ask you to write a function that could have been a one liner and you struggle with it, that might lead to an interesting conversation too.
Im good at coming up with great ideas so im gonna make a mod one day
We start with "What is a dict and what is a list and why would you choose one over the other?" and about 5 questions later show an anonymized function that flattens a dictionary and ask them to tell us what it does. Each question getting a bit harder. We don't care about domain knowledge so much as how well you think and understand the basic concepts.
Just need ideas lmao
I don't remember what DSP it was.
A what function that whats a what π₯²
domain knowledge is key tho
Am I the only one that somewhat understood that
bank = {"Cash":0}
def action():
print("Press D to deposit money, W to withdraw")
action = input("Type your action: ")
if action == "D":
deposit(bank)
def deposit(bank):
deposit_amount = input("How much money do you want to deposit: ")
bank["Cash"] = deposit_amount
print(bank["Cash"])
action()
```is this correct? It does what I expect.
Press D to deposit money, W to withdraw
Type your action: D
How much money do you want to deposit: 67
67
Imagine a dictionary that contains multiple things, some of which are dictionaries. It's nested. Now imagine you want it flattened.
Itβs 4am and Iβve been arguing with hyprland to get kitty to run for the past hour π
Wouldn't i just iterate over the whole thing and add each element into a list of some sort?
You can learn domain knowledge. I care about the foundation.
I wouldn't call it "correct" in general, but it might be correct for the specific case you have,
like do you care about what happens if you deposit money into an account that already has money in it?
You mean when hiring a junior dev? i agree with you
Is that a problem? I mean it will just add more money if theres already money in it?
if you deposit 10, then deposit 5, the user will only have 5 instead of 15
well, that's not what your code does. is why I was asking
let me try this
It's a recursive function that creates a new dictionary from the old one. When it hits a dictionary it flattens it by making each key in the child dictionary be key[0].key[1] - it's recursive.
You are setting the balance not depositing more money
I mean for any dev.
The best way to build an balance is using a list (history) of the "transactions" (money added or removed)
and adding money or removing money should be dealt like a database transaction, like an atomic action
You might want to open a thread in #1035199133436354600 - that way it will be easier to follow.
bank = {"Cash":10}
def action():
print("Press D to deposit money, W to withdraw")
action = input("Type your action: ")
if action == "D":
deposit(bank)
def deposit(bank):
deposit_amount = int(input("How much money do you want to deposit: "))
bank["Cash"] += deposit_amount
print(bank["Cash"])
action()
``` @runic flower fixed?
Press D to deposit money, W to withdraw
Type your action: D
How much money do you want to deposit: 5
15
Nice.
@vale wasp aren't we moving from simple coders to true solution architects?
Now implement withdraw and transactions history ?
uh history? i am creating the withdraw func rn
then do afterwards
```What does this error mean?
accounts = {}
class Account:
def __init__(self, name: str, cash: float = 0.0):
self.name = name
self.cash = cash
accounts[self.name] = self
def __repr__(self):
return f'Account(name={self.name}, cash={self.cash})'
def deposit(self, amount: float):
self.cash += amount
def withdraw(self, amount: float):
self.cash -= amount
def transfer(self, amount: float, account: Account):
self.withdraw(amount)
account.deposit(amount)
Account('John')
Account('David',15)
accounts['John'].deposit(100)
accounts['John'].transfer(40,accounts['David'])
print(accounts)
Is this code good or bad ;w;
Let's see the code you're running
bank = {"Cash":10}
def action():
print("Press D to deposit money, W to withdraw, C to check cash")
action = input("Type your action: ")
if action == "D":
deposit(bank)
elif action == "W":
withdraw(bank)
elif action == "C":
check_cash(bank)
def deposit(bank):
deposit_amount = int(input("How much money do you want to deposit: "))
bank["Cash"] += deposit_amount
print(f"Cash: {bank["Cash"]}")
def withdraw(bank):
if withdraw_amount <= bank["Cash"]:
withdraw_amount = int(input("How much money do you want to withdraw: "))
bank["Cash"] -= withdraw_amount
print(f"Remaining cash: {bank["Cash"]}")
def check_cash(bank):
print(f"Total cash: {bank["Cash"]}")
loop = input("Exit? E to exit Y to keep the program running")
while loop != "E":
action()
This is looking good, but I'd consider moving the accounts dictionary to be a class attribute
withdraw amount should be defined before the statement
wdym? so before the init you have the account dict?
and you should have some guards in your deposit/withdraw. Right now you can withdraw as much money as you like, regardless of what's in your account
yeah yeah i noticed
π«‘
Yes, and then it would be accessed with Account.accounts
class Account:
accounts = {}
def __init__(self, name: str, cash: float = 0.0):
self.name = name
self.cash = cash
Account.accounts[self.name] = self
Account.accounts['John'].deposit(100)
Account.accounts['John'].transfer(40,Account.accounts['David'])
print(Account.accounts)
Yeah perfect
:D thanks! is that just so you don't have a random accounts dict that you are only using for that Account class, but is able to be messed with by other code?
yeah, it just makes it a bit more clear and organized
I always feel a bit on edge (idk if that's the right term to use) when making a dictionary like this inside a Class as a way to store instances of that class, it feels wrong
I think it's ok, but structurally you might want to have an AccountManager class, and that can be responsible for creating/storing/etc for Accounts

What would that class be?
just some class with functions like AccountManager.create_account("jimmy") ? and the accounts are stored as AccountManager.accounts
yeah, but then that way the dictionary could be an instance attribute
Every time I do a new thing in C I find a new way to crash. Who knew there were sooooo many things that can go wrong.
The C in C stands for Crashing
Segmentation fault, idiot!
lol NOOOoooooOO this time it was a "bus error!'
jfc scan a barcode and enter two verification numbers for aws...
and yet we have new data leak scandals every week
I'm very very smart. I know this cause ChatGPT is always telling me I am asking very smart questions!

π
Guys...this might sound dumb, but how do I study effectively? I've heard of this technique where I study for 25 minutes and then take a 5 minute break...but it's like, every time I try to sit and concentrate, I can't stay focused. :/
put away your phone and devices
uninstall tiktok
I assume they're doing that for each 25 minute block
if you are reading on an electronic device, download the document and turn on airplane mode
What are you studying?
i dont do 25 minute blocks myself, i just study until i am hungry or tired, then i eat or sleep respectively, and then go back to studying
Watching CS50P on YouTube, and I got a smattering of books on my Kindle.
@steady rain
Start with the smallest amount of time you can before you feel that "lost focus" feeling. Take a five minute break. Repeat. Do this for an hour or two and then just do other things. Do this daily. Study until you can't, five minute break, and repeat. An hour or two a day. You build up your ability to study the same way you build up the ability to lift weights, run, or anything else.
use the cs50p website to watch the lectures
I put on Minecraft music and close everything but what I need open
works for me
might not work for you though
People are giving answers that seem to assume you're being actively distracted by devices and such. Is that the problem, @leaden solar, or is it something internal?
I think it's something internal, tbh.
I've never had to study like this before. I breezed through high school with straight As without ever studying and now I'm 29 with no degree because of disability, trying to break into tech because I'm tired of living off of social security. :/ Hopefully that makes sense.
Computers are such a broad field, I know I won't understand it all...
Preoct's advice seems like it could work for something internal as well
picture your project in it's underwear
My advice is focused on two things: It's perfectly okay to feel like you can't focus. It's also something you can learn to do. It just takes effort. That's the hard part.
Thank you. @robust ledge
Are you planning to get a degree? It's pretty much impossible to break into tech without one.
unless you start at the very bottom like tech support and get a certification course or smth
Thank you, everyone.
I can't start a degree for another 3 years. My student loans were discharged last year and now I'm going through this monitoring period, so I'm just trying to self-study for now.
I hope that works out.
Since you've been watching a video course, maybe you should pause and try practicing something in a way that's more hands-on, to keep it engaging.
Okay. So, like, read a Python book and practice programming out of that?
where can i find a job like that
It doesn't matter if it's a book or video course or what. The important part is that you write some code that uses the concepts you purportedly learn. It doesn't need to be useful.
Hm...okay. π
being dedicated and competent can get you far
specially when people are so lazy nowdays
Build anything useful while others are doomscrolling
its never been this easy right?
i dont know how you would find a job like that where you are
No, right now it's harder to get a job in tech than it has been for a long time.
that sounds like an overly broad generalization without foundation
I know I'm basically gambling that the job market will magically get better in the next few years...
@steady rain
i'm talking about building anything, development has been shit since bootcamps and AI
It probably will.
Good to hear.
luck favors the prepared.
So max out along all the dimensions!
- Education - get a degree
- Experience - get internships
- Skills - Make projects
Luck is what happens when preparation meets opportunity - Seneca
I have like four tshirts that say variations of "luck is what happens when you're Irish"
Unless you lived in Belfast during the troubles
The only thing I can think of actually making is a digital version of a card game I'm trying to make. But there's so much interesting computer stuff I wanna do...software, Web development, cybersecurity, system administration...
you have plenty of time! Just start somewhere
So far I know a bit of Python and Linux...but that's it, really.
Learning to focus and study is a skill you can improve, like running can build endurance. It happens over time, with prolonged exercise. You have to practice stuying and focusing for it to get better. But it can absolutely improve.
nods Okay.
You can maybe make a text-based version of the game first, and then work towards making it GUI
I've heard of making GUIs with something called TKinter, is that a good idea? I've also heard of using PyGame...
where are you at in your progress? fizzbuzz? tic tac toe?
I think people tend to find tkinter kinda frustrating
those are both milestones worth working toward if you havent
I've done fizz buzz before. No tic tac toe.
I know what functions are, but constantly get stuck on OOP stuff...
Don't worry too much about "understanding OOP" as an abstract concept. Just focusing on writing and using classes.
OOP is sort of an abstract concept when you're writing toy projects, I wouldn't worry to much about it but ...
What what?
frustrated? by what?
Using tkinter
I have Python Crash Course on my Kindle. I'll keep chugging along here.
tkinter can be fairly clunky and is fairly limited in features compared to other GUI options
I'd rather write a gui in turtle than tkinter no joke
but turtle is tkinter
tkinter minus the suck
I really don't like tkinter, nothing is done in a way that makes sense imo
But you don't have to know that it's tkinter
It's encapsulated
Hey, that's part of OOP
Streamlit makes it crazy easy to do UIs
But you sort of have to know what it does behind the scenes
how can i change the bar where file, edit, debug, etc is to something other than white?
In vs code?
There will be a setting in which u can change the color
Looks cool, although I wouldn't use it personally
pyside is life for UI
Editor setting something
yea there's dark mode but it doesn't seem to change that sadly, nor does windows settings
I'm sure it was said before. While you're reading and exploring just make sure you're building things. Anything. Silly things. Things that break. Things that interest you. Build, explore, and train your mind to be curious.
Hmm π€
Use vs code lol then
It was said 
I'm making my own gui framework for python currently, it's honestly been pretty fun if a little frustrating at times
U can apply themes too
@steady rain @robust ledge I'll pick up studying tomorrow, it's 1 AM here. :/ Thank you all for your advice.
In vs code
East Coast Best coast
Which one
ah yea i might do vs code but i was reading some comments of people saying start with IDLE to learn a bit before switching
Can I contribute
I figured as much. This place is good for it. I'm quite out of it and just finishing a thought that was 20 minutes ago.
@steady rain definitely, lol. XD
Yeahh cuz vs code gives snippets and shit so u don't have to type alot
TinyXUI #user-interfaces message
its like -25 with windchill where im at on the east coast..not the best coast right now xD
Once I upload the git repo sure
Use IDLE for now I will figure out the setting once I am at my pc
heard that, ty
Idle is good for beginners
nuh uh
It doesnt provide ai slop
used idle long enough to know I hated it
lol
as mentioned, there's Thonny
but IDLE comes with python
is there any tool that can coonvert my python0.9 code to python3.13
didnt know of thonny, does look neat
more hurdles is generally bad for beginners
you have what code now?
Yes
i grabbed python crash course, that a good starting point?
What u coding now
starting in np++ wasn't bad but autocomplete and standard plugins arn't going to inhibit anyones learning imo
python version 0.9
how?
I am at the point where I can just look for docs and code myself but I am so lazy
nothing...computercraft in minecraft maybe? lol
probably not
just rewrite the code if it isn't super complex
also why are you using python 0.9 π
what museum did you find that in?
Using python as a baby
last time i tried to learn coding was ages ago, but its always been interesting to me
Python in baby stage
i wrote it in my mid 50s
U wrote python ?
Is guido van russom ur friend
no i wrote the python0.9 code back then
exactly
Damn
It can be, but you should also code projects for fun to gain knowledge
Even computer graphics came out commercially in 1960s
in their mid 50s
yea i only learn by doing but wanted something to read
Ohh
meaning, when they were 50-59 years old
I misunderstood that
xd
ergo, sometime in the 2050s most likely
Okie
python was definitely not a thing in 1955
It is not
were they doin the punch cards in the 50s or am i decades off
Fortran and cobol
my grandpa was programming in cobol back them π
no still not
Before fortran ?
google says fortran 1957 the compiler was released
Dang π«
yall are gullible
So we are not even completed a century and we got ai
cobol 1960
From human manually programming chips by hand to let ai do everything
What a journey it was
we're not at the point of ai doing everything
Cyberpunk 2077 is looking real
Idk what will happen to tech after 10 years
Tech grows exponentialy
Moore's law right?
That's my law
mb
Moore stoled it
moore's law is tech will double in speed and halve in size transistor numbers will double every 2 years
Close enough
soon, we will have entire rooms full of transistors!
But no ram and no gpus
guess what ram and gpus are made of
shareholders' dreams and goals
mini CPUs

the took the CPUs and used a shinkray on them, then put a bunch of them together
metal
well, silicon is not metal
bits of sand that get hit with lightning until they cooperate
There is moore's law for ai and semiconductors too
Ai one is more exponential
and more fake
I was reading your guys' conversation about Moore's Law and thinking DeMorgan's Law, and I'm like "what negations are you talking about for AI"
the AI part is a techbro thing, dont worry about it
cyncial: e = mc^2 + ai
what
P = Ξ΅ΟTβ΄ is the Stefan-Boltzmann law
wow 4, what is that a cube
No it's s 67-dimensional sphere
(that's the ref)
it disappoints me that is is not as much as a self-burn as everybody says it is, because e=mc^2 is not the full equation π
development of what?
py
eh, it's basically the same
tbf, for at object at rest, the other half is 0
It's a triangle equation too, which is more fascinating but also makes sense
The triangular inequality for vectors?
so that's why video games are made of triangles
||x + y|| <= ||x|| + ||y||
what does || mean
absolute value ig
Norm since x and y are vectors, but I've seen it written as just single bars too
(isn't that |x|?)
it's the minimum amount of points required to represent a 3d shape
don't worry I'm not being serious
oh lol
||a|| is the magnitide of vector a
how many points are required to uniquely define a sphere including position?
sorry I forgot some parts of that sentence
wouldn't it be 4?
circle is 3
IIRC I annoyed people
radius, x, y, z
I meant "on the perimeter" or whatever perimeter is for 3d shapes
4 numbers, two points: one in the cneter, one on the perimiter
the question was how many points, not how many individual values
for circles, it's 3
and if it's on the surface, it's also 3.
Hm
no
4
And they can't be in a circle themselves
how many points are required in 3d space to uniquely define a sphere such that the points lie on the surface of the sphere?
3 points form a triangle, but there are two possible spheres for that triangle, so you need 4 points to be fully discriminant
apparently the points have to be non-coplanar
3 non-colinear points define a circle.
i vote that those three non-colinear also define a sphere.
I wish I had a decent 3-d drawing software
9 points?
those points are not non-coplanar in 3d space tho
three in each plane. that makes 9
You know how two points define two circles?
two points define an infinite number of circles @jagged belfry (if on the perimeter of course, as we are talking about)
Aren't any three points coplanar
think i meant colinear for 2 and 3 d
les gooo
now make the sphere bigger.. the triangle still fits on the surface, just closer to the pole
dang
and i'm upgrading to 4. one point must be non-co{line/plane/etc}er for {2/3/etc} space, which, for 3d, requires at least 4 points
you can squeeze the ball through the triangle
would be a nice animation if it had some acceleration and deceleration
new vote: an n-sphere is defined by n+2 points that do not collectively share an (n+1)-plane.
apparently a sphere is a 2-sphere, not a 3-sphere. Β―_(γ)_/Β―
naur
Same principle applies to circles
so y'all are mathematicians too?
no
You can actaully solve this analytically
hmm. and we're deciding the minimum number of coplanar points required to create a sphere?
true..
even an infinite number of coplanar points cannot unique define a sphere
so one x and one y, three equations. three points. sounds about right. except they won't be coplanar. do they have to be coplanar?
coplanar points are degenerate matrices :3
ok im out this is mathing too hard
z = x + y is the same equation as 2z = 2x + 2y
true. so that does make it coplanar then. right?
yes
it was me π
why are we having this conversation again
because we stopped having this conversation before?
last time i think we concluded that the question is not specific enough
i.e. what does it mean for points to uniquely define a sphere
slightly off-topic, I know, but is there an active discord server where I can ask about game design?
judging by bast's images above, "uniquely up to rotation" because translation is being considered
that's my memory as well, it dependsβ’
The question this time was more specific
not just "points to define a sphere" but points on the surface
and it must use points
cramer's theorem moment
i'm just gonna drop the term general position here since i think that's what you're discussing
and then i will leave the convo because i don't want to think about geometry on a sunday afternoon
it's sunday morning
and I'd much rather think about geometry than do my stupid dumb 4-page english essay
do your homework
"afternoon" is kinda pushing it tbh
don't waste your money
but it's sooo terrible
english was forced upon me, I had no choice in the matter.
how i can back run in python?
this is exactly the reason you to go school. that they force you to study things you realistically wouldn't on your own
everyone says self-teaching is great, but it's only great if you can also power through the stuff you dislike
school forces it down your throat lol
write it in python. It's almost english
i would too, but i'm preoccupied with an integral rn, and i would rather do that than geometry
heyyo stickie
you want an easy math problem
"""
once upon a time...
"""
it better be easy this is like my 5th nerdsnipe this week
I self-taught for several years and passed all my exams. Including english.
Then I chose to go to school and I have 6 subjects I absolutely love and have passion for. Then there's English.
What's bothering me is I don't even need high marks in english for university, since only my best 6 subjects count
is this australia?
It will still be super important for your career
a/(b+c) + b/(a+c) + c/(a+b) = 4
find smallest distinct positive integer values of a,b,c
there's always gonna be stuff you have to do that you don't like
but do I have to do it at higher level?
Why won't everyone just let me take it at ordinary?
No one will take seriously someone who expresses themselves like a middle schooler
Plus there is a say that languages will limit your thoughts
also like explain to me exactly how knowing a million quotes from poems and Shakespeare will help a career in... say... software dev
It's not about knowing them it's about understanding them
language is important, sure. Why is literature important
if it teaches you to communicate more clearly, do it. and do it well. you know what our chief complaint for people with masters and phd is? being great at what they do, and presenting so poorly that no one listens or understands
Being able to take apart language is incredibly helpful in development
oh this is easy
(154476802108746166441951315019919837485664325669565431700026634898253202035277999, 36875131794129999827197811565225474825492979968971970996283137471637224634055579,4373612677928697257861252602371390152816537558161613618621437993378423467772036)
Granted star trek quotes are far more popular than Shakespeare
Naming things is one of the hardest problems in programming
ya cheater
I'd be fine with english if it was just language, since I actually understand why I need that. But why is literature forced on us as well?
so that you can also read well?
to become a well rounded human
also this should probably be moved to off-topic
it will force you to study english so that in futurer when you are a product manager and have to communicate with non technical people , you wont have as much trouble expressing your thoughts
(this is obviously an exaggeration but the point isnt that , the quotes or the poem is important , rather the learning is )
identifying the problem as a prior solved problem is also a skill 
the futurer: the time that goes after the time that will come
fine. same general question, but with equation equal to 6
you will have to read and write documentations, papers, convince people about your ideas and projects, etc.
def __str__(self):
return f"Planet: {self.name} | Type: {self.planet_type} | Star: {self.star}"
print(planet_1.__str__())```
why we do ``print(planet_1)`` to call the str method whereas in the other normal methods we use the dot notation to call those? (there was more in this code, i only kept the part which i had doubt in)
why we cant call it like I have written above
!e
class Foo:
def __str__(self):
return 'this is a foo instance'
f = Foo()
print(f.__str__())
:white_check_mark: Your 3.14 eval job has completed with return code 0.
this is a foo instance
print automatically converts whatever object it is printing to str
and __str__ is responsible for the string representation of your instance
then that's what happens if you try and convert your instance to an int
so if you do int(planet_1), what would you expect the result to be?
TypeError
yes, unless you define __int__
ohh okk
!e
class Foo:
def __int__(self):
return 123
f = Foo()
print(int(f))
:white_check_mark: Your 3.14 eval job has completed with return code 0.
123
ahh okk alright
hey everyone how's it going ?
its fine..
i am just scanning past my DSA and Algorithm Analysis coursework..
i really wanted to study these stuff seriously.. but i think i don't have much time for that
i don't like properly understand a recursive function and i already did like some questions on recurrence relations from my syllabus..
just studying the syllabus now...
I personally avoid recursive functions and use an iterative alternative with a collections.deque instead because python doesn't support "proper tail calls" or "tail-call elimination" because the core team would rather preserve tracebacks for debugging
hm i dont understand much but yeah, you mean making your own stack.. ?
Besides the usual suspects (ex: factorial), you could try something fun:
Define a tree with operations like +-/* that take two children or numbers. And write a function that recursively compute the result
although obviously if your recursive solution would work with tail-call elimination you don't need a collections.deque
Hello everyone
hm not good with trees either.. how would you like make trees is it like making a linked list..?
yeah making your own stack, it used to be that collections.deque could grow much larger than the python stack. In python 3.11+ the call stack can be configured to be able to grow arbitrarily large
okay, then take a step back and wait a bit until you get more familar with them
that's besides the point when someone is trying to learn about trees and recursion
okk
trees are like https://www.geeksforgeeks.org/python/trees-in-python/
yea thats what i was trying to say i wanted to like understand these data structures. we had some introduction to trees and graphs but it was more like theoritcal
trees and recursion go hand in hand
nice!
They are fun concepts to learn and play with!
these are trees that can maintain order
oh ok
a frequent pattern is to split the space in two (left vs right child). And imagine you keep adding data to it, you want that order to be maintained while keeping the tree balanced
I have a question
In C text characters are changed to ASCII (numbers)
So characters have a corresponding number in ASCII
I assume numbers like 10 have a different ASCII value
There is an infinite set of positive integers. Does thag mean there exists what I will call a "more" infinite set of ASCII Characters to cover up those numbers
hm
"10" dont have ascii "1" and "0" does
in "10"
not integer 10
integer is converted to binary
Ahh I see. I have been pondering this for quite sometime now
ascii is for character strings
Noted
A C string is an array of char, with a NUL (zero) byte indicating the end of the string, and each char indicating a character. Chars are bytes.
The C string "abc" occupies 4 bytes: 97, 98, 99, 0.
There's only 255 nonzero values, which constrains a C string to some 8 bit character set.
There's a wchar_t type for a wider range; may have misspelled this.
Most modern systems use Unicode strings for text, which aims to cover every human language.
Some, like Python, use Unicode code points. Some encode code points directly, often as UTF8, like Go.
I had a blast writing unicode decoders
I wanted to make the most performant one possible. After a great deal of consideration, I learned that you really do get better performance from a branching decoder with normal human language, thanks to branch prediction
Thanks for taking your time to write this
I have another question tho.
If I type hello,world in my text editor,it immediately intpreted to ascii?
You'll need to be more specific
In C ofc
What "your text editor" sees and displays isn't the same as what the python interpreter see's and displays
As well, it depends on the encoding. A text file is just a sequence of bytes. How you interpret those bytes is a matter of convention, and choice. Nearly every modern tool is going to be using Unicode, though
hm idk much about how it works but.. a keyboard is an IO device. so there would be some drivers. and your text editor would probably communicate to it through OS. i assume there would be some buffer or something.
to store these
so it might be converted immediately i think
I see. The deeper the rabbit hole get,the more fun I have
or if its not then, the display device won't be able to show the change obviously.
Hi, can anyone help me out with how I can use python programming in civil engineering?
i am not sure am just saying what i think might happen
This is a bit like asking "how can I use a hammer in construction"
XD
Depends on what task
More specifically: you don't learn python to engage in an industry. You learn the industry, and you learn to use Python (among many, many other tools) along the way
oh like u use it for making 3d graphics?
like engineering graphics
Kinda. Like I want to use it to figure out how long will my construction lasts
hm i think u should share more about the problem you are trying to solve
Like I created a building with some materials but I want to know that how long will gonna hold that building up in a good shape with that material until the materials used ran lifetime
maybe you could make some algorithm or something. but you need to be like sure about all the parameters and how does it affect the building
I see
Would it be possible to make a past paper tracker in Python - like when it question per question scores for each question where a user enters a score and it gives them feedback for their score and what topics to revise?
heh
a long long time ago we made an app for a competition and that was what i did (in js, but same idea)
-# we won btw
I am thinking of using a web front end, a python backend (maybe Google and Microsoft login in) and a database in SQL Server Studio
So I only just got the news that apparently programmers are effectively losing their jobs en-masse as AI takes over. And that the ones who survive are basically just babysitting the LLM while it does most of the work. Anyone able to ring in with what's actually going on?
sounds pretty good
I don't know if I have the skills to do it though
AI code is trash
oh yea totally, dont learn programming at all, absolutely dont learn any coding at all, only vibe code and dont check the output, definitely do not learn programming to check the LLM output
good morning
morning!
I mean I'd imagine that it is. I don't think an AI would care to comment their code, which means that trying to debug it and figure out what's going on would be an absolute nightmare.
make sure you do not learn programming until at least after I get a job
I pray you're being sarcastic.
they'll approximate strings of text for whatever purpose you tell them too, but ultimately they will always be approximations. stop getting your news from executives
The most I can currently do is make very very simple #functions
Plus the idea that all you do is sign off on whatever slop the AI puts out, and if something goes wrong it comes down on YOUR head?
and if something goes right AI gets the credit!
well u wont get better if u dont try anything harder
amazing!
i know...
Exactly!! It sounds absolutely asanine!!
not the authors of the repos that the AI companies stole to train their model, no no
clearly the model wrote the code
totally not stolen from human-written repos
Send help I'm stuck awake
That's why I wanted to figure out what's actually going on with the whole debacle. And whether or not AI taking over the job market was true or not.
sudo systemctl sleep
what OS is that
in a sense, but when the bubble pops it wont just be IT jobs that will be effected
From the sounds of things its a train full of TNT on a collision course with a dumpster fire
it's not a distro, it's systemd apparently https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#High_level_interface_(systemd)
my brain doesn't run Linux
everything runs linux
my brain isn't currently running Linux
Like when the AI bubble pops, what happens to all those programmers that got laid off, or told to just check for bugs and syntax errors?
I consumed some sleepy things and they didn't do the sleepy
so now's it's 2:30 in the morning
when the AI hard codes a interpreter for a programming language, do you think it's possible to just check for bugs and syntax errors?
no one can see the future
this is not a strawman argument btw
someone actually showed up to this discord with an interpreter written by LLM
and i kid you not, the interpreter uses regex to parse each line of code
that's fun
I'm just spooked that if I go through the trouble to learn python, I'm signing up to just babysit an artificial brain.
Because that sounds like a soulsucking hell.
well you are definitely signing up for a soulsucking hell of people with absolutely no technical knowledge trying to tell you how to do your job when you know programming and they don't
whats the best way to learn python and more precisly (backend dev)
No I get that, I know that's par for the course. I just want to know if a bug exists, its my fault, not the cookie-cutter AI's creation.
I want to know I'm still pouring my soul into my creations, not signing off or checking on something bound to explode.
if you want to have no ai bugs, dont use AI
please do not pour your soul into your creations, you can pour your blood, sweat and tears, but not your soul please, you will end up as an eternal ghoul forever doomed to roam the earth without peace
Its the damned headlines claiming AI can just make entire programs from scratch and all programmers are doomed to just sign off on whatever it makes.
no one is forcing u to use ai
its a tool and it makes writing things faster
makes writing bugs faster too
do you trust that media knows what they are talking about?
cue the shencomix "1000 calculations per second AND THEY ARE ALL WRONG" meme
Spooks someone prepping for a career that said career is taking a short drive off a cliff.
this is not the first time we have had this, will not be the last. this is just the first time you have heard about it
....... All of this because I asked Gemini and GPT. Which are just checking headlines themselves...
I feel like an absolute baboon.
Worrying for an hour only to be reminded "When has this ever been right?
if the world where only filled with expertice, then you would loose because you do not have experience
you need people with experience
Create a store in a production line with
> add store --production-line-name Cookies
```bringing the topic back to programming, for people who use clis predominantly, do you think this command is too long?
you could have a short flag alias
like -line
are tuples any faster than lists if I only need an immutable array?
probably
insignificant difference in python
in what context? lookups?
map()
so lookup, no they are the same
notice how they're not saying that AI will replace <insert any repetitive job> in other industries... the headlines are just clickbait really, if the product were what is promised SWE jobs would still be necessary and AI would be taking care of all things administrative... people associate AI with SWE though so that's their marketing pitch
is map(int,(input(),input())) any faster than map(int,[input(),input()])
So no then.
indexing in both cases are O(1)
the conversation moved on without me π
i read it
might as well use a tuple if I'm not mutating it though
i think you're right
yeah, that is a good idea
in a cli is list production_line better or list production-line better?
in your opinion
not argument btw, subcommand
β¨-β© is easier to type
ok
I havent had that many recently
that you've noticed :^
I have finally found the usefulness of writing tests, I refactored a bunch of code and the tests passed, no need for too much manual testing
I should have done this so much earlier...
class pre_chosen_args:
def __init__(self, func) -> None:
print("init")
self.func = func
self.args = None
self.kwargs = None
def __call__(self, *args, **kwargs):
if self.args == None and self.kwargs == None:
self.args = args
self.kwargs = kwargs
return self
self.kwargs.update(kwargs) # pyright: ignore[reportCallIssue, reportArgumentType]
print(self.kwargs)
self.func(*(list(self.args) + list(args)), **self.kwargs) # pyright: ignore[reportArgumentType]
@pre_chosen_args
def heal(amount: int, user:str):
print(f"healed {user} for {amount} hp")
return "working"
I've got like this pre chosen arguments for a function thing
Can anyone tell me how can I download pandas in phone?
generally speaking the way to get an almost-proper python interpreter on phone is Termux
no idea if pandas will work. prooobably yes?
Some guy said yes but when I try in termux atleast 3 or 4 time it's stuck
class Potions:
LESSER_POTION_OF_HEALING = Potion("Lesser Potion of Healing", "Heals for 10 hp", used=potions_effects.heal(amount=10))
GREATER_POTION_OF_HEALING = Potion("Greater Potion of Healing", "Heals for 50 hp", used=potions_effects.heal(amount = 50))
but when i do this i get an error
File "c:\tmp\rox\storage\python_programs\xorp\main.py", line 25, in Potions
GREATER_POTION_OF_HEALING = Potion("Greater Potion of Healing", "Heals for 50 hp", used=potions_effects.heal(amount = 50))
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "c:\tmp\rox\storage\python_programs\xorp\potions_effects.py", line 16, in call
self.func(*(list(self.args) + list(args)), **self.kwargs) # pyright: ignore[reportArgumentType]
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: heal() missing 1 required positional argument: 'user'
The .heal seems to expect you to pass user there?
My heart is filled only with true love for you; only because I love you do I need to think about anything else...
@verbal wedge
this will be easier to read if you link to a pastebin with the code.
Do you think that i am impacting readability by using walrus and intersection validation in the expression?
class KeyboardInputSystem(esper.Processor):
def process(self) -> None:
for entity, rki in esper.get_component(ReceiveKeyboardInput):
if pressed := keyboard.get_pressed() & rki.keys:
esper.add_component(entity, KeyPressed(pressed))
if released := keyboard.get_released() & rki.keys:
esper.add_component(entity, KeyReleased(released))
I personally think its not that hard to read it but idk
it's fine, for me
i know i could put the interseciton in the variables and than do the check
Might depend who is looking at your code, but ig that people should be able to guess the operator precedence here
it is the lack of spacing everywhere except between those two ifs is what makes me uneasy
Where do you need more spacing?
Im trying to follow the pep rules the ones that i learned, so please, if you know any that i missed, let me know, im open to learn new things
personally I usually use lists because it's nice to have something other than parentheses
but that's personal preference
how can I code MCMC?
markov chain monte carlo?
"too bored of parentheses" is definitely a reason of all time
well not too bored
yes
if you have 4 layers of parens it's nice to turn that into like 2 layers of parens, a square bracket, and then a paren
cursed to write lisp for the rest of eternity
what probability distribution?
lispurgatory
bell curve
does it have to be MCMC? Usually i would just box muller transform
@slate moon okay
assuming that bell curve = normal distribution
yes
https://paste.pythondiscord.com/IGOQ
https://paste.pythondiscord.com/JDFA
it's basically meant to let me pick args and then be able to overwrite them later so we can have like set types of healing potions and stuff
showing the error again could be helpful. Is prechosen_args like functools.partial?
what's that npw
File "c:\tmp\rox\storage\python_programs\xorp\main.py", line 25, in Potions
GREATER_POTION_OF_HEALING = Potion("Greater Potion of Healing", "Heals for 50 hp", used=potions_effects.heal(amount = 50))
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "c:\tmp\rox\storage\python_programs\xorp\potions_effects.py", line 16, in __call__
self.func(*(list(self.args) + list(args)), **self.kwargs) # pyright: ignore[reportArgumentType]
see what i think is happening when i set it up the first time with lesser potion of healing, the prechosen args are set, so then i think i'm tryna call it the second time
but i just don't know how to fix that
have you seen functools.partial?
yeah i'm searhcing it up one second
sort of yeah
basically i want to:
LESSER_POTION_OF_HEALING = Potion("Lesser Potion of Healing", "Heals for 10 hp", used=...)
GREATER_POTION_OF_HEALING = Potion("Greater Potion of Healing", "Heals for 50 hp", used=potions_effects.heal(amount = 50))
make it so that lesser heals 10 and greater heals 50
hi chat
im kinda a new learner so i was wondering if anyone wanna have a look at smth i made for no reason?
its 50 line i dont think i can put it here tho
import pickle
import time
file = ("Storage.txt")
while True:
op = input("""What do you want to do?
1. Create new note
2. Clear all note
3. Show all notes
4. Exit\n""")
if op == ("1"):
try:
fileobj = open(file, 'rb')
ls = pickle.load(fileobj)
fileobj.close
except:
ls = []
note = input("Add a note to store: ")
ls.append(note)
fileobj = open(file, 'wb')
pickle.dump(ls, fileobj)
fileobj.close
print("Your file has been saved succesfully.")
elif op == ("2"):
ls = []
fileobj = open(file, 'wb')
pickle.dump(ls, fileobj)
fileobj.close
print("All notes have been deleted")
elif op == ("3"):
try:
fileobj = open(file, 'rb')
ls = pickle.load(fileobj)
fileobj.close
if len(ls) == 0:
print("You do not have any notes stored yet")
else:
print("\n", ls)
except:
print("You do not have any notes saved yet.")
elif op == ("4"):
print("Commencing shut down...")
time.sleep(1)
print("Saving files...")
time.sleep(0.5)
print("Files saved.")
break
else:
print("Invalid operation.")
# I added the countdown just for fun.
# By Sahil```
-# Honestly I don't think I can still make it without occasionally checking out yt and stuff
looks good, but when closing a file, you need to call the close method (with parentheses). fileobj.close on its own doesn't actually do anything. You could also consider using open with the with keyword so the closing happens automatically (there are examples of this here: https://docs.python.org/3.14/tutorial/inputoutput.html#tut-files)
You also don't need the parentheses around string literals (if op == ('1'):); if op == '1': also works
hi there
you usually want to avoid using "bare" excepts (i.e., when you don't specify what type of exception that you expect to be raised)
wanted to ask guys what should i learn first in python i wanna learn code
I'm beginerr and starting python can any expert give any suggestion please which should I avoid or which should I do .?
same please
Learn machine code
WAYY easier than Python
or how about Malbolge REALLY easy too
- Automate the Boring Stuff is a really good book for complete beginners and it's free to read online:
- If you prefer to watch video tutorials Corey Schafer's playlist is also really good
- I also recommend Harvardβs free online course CS50P: Introduction to Programming with Python
- Python Programming MOOC 2025 is an alternative online course with lots of integrated practice problems you can do directly in the browser
dont take his advice instead learn Machine code or Malbolge
please dont troll
I'd pick one those to get started
super easy stuffs man
@round storm
Learn malbolge it is the basic requirements for coding like !print is easy there or if you wanna be a bit more complex learn Machine code @round storm
it's not the first time you have sent troll messages
''whatever helps me'' ahh comment
whats going on here
he is jking ??
Nah man the first time i learned machine code its easy
okkk thank you brother
!mute 1349011248989208709 1d trolling messages are not appreciated here
:incoming_envelope: :ok_hand: applied timeout to @bold compass until <t:1770641889:f> (1 day).
who i should listen to
prob not the guy who got muted
this is good
i personally recommend the 3rd one in that list, but the others are good too
a good book is perfect to get you started
okay thanks
tysm all β€οΈβπ₯
Guys can you tell me what type of project should I build using python for data science??

what are your interests?
Also, good morning everyone!
Morning!
How do l read the book automate the boring stuff with python?
Build projects that target specific skills. Check out data camp there are plenty of projects right there
it's free on his website.
Is it a nice book and do you guys recommend it?
it's an interesting approach, it assumes you're not a programmer and want to be able to write useful things as fast as possible.
Have you read it?
it's generally considered to be very good.
I have read it, although I came to it after I already knew Python. It's recommended regularly for good reason
Not much (just enough to help people), but I've chatted with the author, and helped a lot of people with the problems in it.
Okay it will be on my bucket list
Nice really cool
I like how the book tried to make you actually try and play with the code... But I've met enough newbies here who still don't do that - they skim the text and jump straight into exercises and get confused what they need to do...
But i haven't followed the book myself, just read some parts out of curiosity how it explains stuff
Is there any way to speed up small matrix (3x3) and vectors ops (cross and dots)? I am performing only a 1-2 dozen at 2000hz, and i think numpy isnt great at speeding up small arrays
reason is i am performing mΓΆller-trumbore/havel-herout ray triangle intersection, and i need to make this function fast
raw python frequently is faster than numpy on very small data. have you tried that?
Have you considered, and I know it's a meme, but just not using python? Seems your task is very CPU heavy and depending on it's exact shape a language with better multi threading support might really help
Im using cython now
pytor-
tap into cuda for your tic tac toe app lol
sounds like a very gpu-ish problem
could be a portfolio project
are you trying to do this yourself or are you open to looking at packages that have functions for mΓΆller-trumbore/havel-herout ray triangle intersection ?
I would be fine with that but i would like to write the code myself because i am not using this for raycasting scenes or graphics
a note about using Cython:
the fewer times you call out to Cython from Python, the better the performance is going to be. if you are calling into Cython 100 times for the sake of going over 100 different objects, it's best to provide all the objects to Cython in a container, call Cython once, and have the iteration over the objects done on the Cython side
Im planning on doing everything computr heavy in pure cython, no calls out.
the reason people use gpus for vectorized computations has nothing to do with graphics but it's a bit of a moot point if you're not using numpy
Does cython have more overhead than regular Python functions?
Its compiled beforehand no?
it's more that calling into a Cython function from Python incurs a CFFI overhead, so you want to make each call as worth it as possible.
calls between Cython functions, if they are written as C functions, will happen at C speed
googling is getting me a lot of ai written answer that say use python for MΓΆllerβTrumbore and then write a c module for the HavelβHerout. Which seems to be about expected. =/
Ah alright, good to know
This is absolutely a weird question, but is there any particular reason for clearing a widget to just nuke some object that has almost nothing to do with it before that object even exists? This is maddening and anywhere I put the clear either does nothing at all or self-destructs because it randomly destroys part of a path.
Was planning on reading a book about cython
Been using it for some efficient data loading code for a ML model
Cdef functions are transpiled to C
there's only a couple of them out there, and I think they haven't been revised recently - I don't think they talk about the "pure Python" syntax that is now the recommended way to use Cython (unless you're calling extern functions)
What's the context.
Hmm
If you dont use the gil and dont call capi then it just a c func
I also saw jinja like syntax, where you have .pyx.tp which seemed kinda scuffed lol
Sklearn uses it
i shouldve written my other projects in C and just used cython to port them. Instead i did a massive extern block.
another library you might look at is if numba gives you a sufficient speed up to make it worth using.
Numba can unroll matrix ops into scalars?
i mightve misread that from somwhere
But that would be great instead of manually unrolling my code into 27 scalars
it was all magic to me, but I got some rediculous speed out of it a couple years ago.
My bad. Trying to make a color palette editor for a game, and I need to clear the palette menu when a new character or skin is selected to refill it with only the ones belonging to what was selected. But somehow, clearing that seemingly also pre-emptively destroys the palette that was just loaded and the program dies because it needs that to assemble a path to a JSON to pull colors from.
Seems all cython books are old af indeed :/
Ah sorry. sounds more like something specific to what you've been working on. Maybe make a copy so they're separate entities and take a look at what is happening as you debug it?
OOh so there is one with actuall projects because this is the most importtant thing
The cython devs are pretty responsive on github issues and their mailing lists.
Guys how do you people find github repos with nice projects
https://groups.google.com/g/cython-users?pli=1 for instance
github repos with nice projects?
Found a book that covers it: Fast Python: Write Efficient Code with Cython, Concurrency, and More, from 2023
each github repo tends to be one project
Id rather read a book and then use it in practice.
I'm not sure I even can do anything to debug it besides adding a bunch of prints, which is an enormous pain. Every IDE specifically for Python that I've tried complains about being unable to find PyQt6 and I can't point any of them to my Python installed with Homebrew on the off chance that somehow fixes it.
Yeah but even the one thing do you just search up the niche or?
Consider reading https://cython.readthedocs.io/en/latest/ like a book
Hmm, ill see if I can download to my ereader :p
i guess yea, if i need something i just search "github <thing im looking for>"
ooh year makes sense
Like for contribution?
so you can build it
"build" is a technical term btw
wdym
you build something when you take the source code and compile it
I dont think thats what they mean
the word you were looking for was probably develop
or "contribute to"
(not a word, i know)
Im starting to learn python does anyone know a good place to learn it?
!res
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
guys i have question
ive been making the discord bot but i keep running into a problem with the shop thing
i am trying to merge gta heists like !cayo perico and other everything worked untill i needed to set !buy stuff command
cause i needed to make different categories but still !buy command only works with 1 category
ill send the code,also i havent worked on it for almost a year so yeah
suree
functools.partial is very useful
What's the use
class Shop(commands.Cog):
def init(self, bot):
self.bot = bot
# Prices for roles
item_prices = {
"master grinder": 100000000, # 100 million
"supreme grinder": 70000000, # 70 million
"major grinder": 50000000 # 50 million
}
# Role IDs mapped to roles
role_ids = {
"master grinder": 1333016781782253672,
"supreme grinder": 1333016913202249749,
"major grinder": 1333016979950538783
}
Hey @turbid valley!
```py
print('Hello, world!')
```
This will result in the following:
print('Hello, world!')```
its one category for the roles
i've got a game and there's different types of healing potions so i can make one that heals 50 and one that heals 10
USE THE BACKTICKS
the other is for cars,utilites like apartments (which are required for heists) and other stuff
!d functools.partial
functools.partial(func, /, *args, **keywords)```
Return a new [partial object](https://docs.python.org/3/library/functools.html#partial-objects) which when called will behave like *func* called with the positional arguments *args* and keyword arguments *keywords*. If more arguments are supplied to the call, they are appended to *args*. If additional keyword arguments are supplied, they extend and override *keywords*. Roughly equivalent to...
step bro, caps lock stuck
no it runs smoothly just shop py makes me problem
and !buy command
can i send an image?
no as in strucutre your code like this:
code
not this
code
open a #1035199133436354600 thread
you can paste images in there
yeah ik
how do i make it like that
so put three of these at the start and end of your code: `
can i dm you?
no
!res
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
bro what java even useful for
I see,but i don't understand why not just give different parameters
And separate calls
java is simple and powerful
Can someone help, basically I know like a good amount of python but I dnt know what project is gonna be best for me and it is overwhelming
so like websites? what ab javascript tho and should i just learn c++ since it has way more uses especially for software
The Kindling projects page contains a list of projects and ideas programmers can tackle to build their skills and knowledge.
Omg ty
honestly i dont rly wanna do web dev unless im using ai to print out the css and html for me
i prefer the actual like coding part thats not for the looks
i already know python
i wonder why people are so afraid of frontend
I like html css and i spend hours debugging a simple issue

Its so fun....π

i think this might be a curse-of-knowledge thing for me
ive uploaded
you cannot eat money ohno
i mean idk i cant even host a site without money
Hello, people! I'm @gilded bane, an amateur Python programmer, and I'm new to the server. It'd be highly appreciated if somebody could help me explore the server.
I started to use tailwind and i think it saves me some time but.. yk i spend hours trying to reiterate different styles and debugging in css
click on the buttons in the sidebar and take a look around.
what's there to explore in the server
you can check the channels yourself
!paste
So that everyone can easily read your code, you can paste it in this website:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
You can host a site for no money.
Thanks, bro!
Thanks!
https://paste.pythondiscord.com/FNWA
my potion inventory system is done pls criticise it
also does anyone have suggestion ,im gonna finish the discord bot and ive been doing it from scratch,
I am thinking of converting my old mobile phone into a server. But idk how hard will it be...
oh where?
i find it funny that hosting a site can be done for free, but domains, something which does not require any cost at all, costs money
what if i want my own domain
yeah true
do you think it has good specs for it?
so far, the domain cost ($10) was the biggest expesnse I had in setting up a site. even the cloudflare tunnel was free.
also what kind of server
exactly!
on any spare computer you have at home.
Yeah it should work but even if i got it working i think i have to plug it on every day and the battery may become a issue
(not counting my internet cost which I was already paying)
web
don't bother, you'd get a super-locked down, minimalist, unreliable, resourceless weak arm machine which will have at most niche use cases
||forgot to mention you will need to either fight android to run executables or use some kind of virtual machine which will cut down your processing power further||
Ah
also, you don't have to have your own domain, you can use your ip address or get a domain name that redirects to your ip address for free.
Yeah why do we pay for domain.
Just for like authenticity?
brand recognition?
also by making them cost something it then requires some minimal effort so we don't get flooded with them.
ICANN administrative fees i think
Yah that might be an issue
the infrastructure cost is covered by the dns
the domain name in of itself doesnt incur any costs
π·ππππ πππππ
π½π
so the certificate is free then?
π³ππππππ ππ π ππππ π’ ππππππ
guys
say github pages with a custom domain
where should one start to learn python in 2026
πΆππ π ππππ πππ πππππ ππππππππ
suggestion
!resources is a good start, the courses are well rated
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
Stop typing in monospace
π±πππ?
yup
πΏπ’ππππ ππ’ ππππππ πππππ
π½π
πΈ ππ ππππππππππ
π½π
πΈ ππ πππ ππ πππ ππππ ππππ π ππππππ ππππ
https://paste.pythondiscord.com/FNWA
my potion inventory system is done pls criticise it
what is that
mono space font
π»ππ
ones u might see in your terminal
Describe yourself using only colors and shapes.
"I'll take things an AI would say for 500"
πππππ πππππππππ
or in a code editor
Describe why time flies like an arrow but fruit flies like a banana?
Answer the questions
ππ³
490
indeed
Stop typing in monospace because it's not accessible to basic screen readers.
CΛΛoΛΛoΛΛlΛΛ
What about this?
That's not a font. Font is a setting in an app. That is Unicode part for mathematical symbols
readable it just goes in a codeblock
You're a codeblock
true
This is just formatting, the glyphs behind it are read normally
π»ππ
hi everyon
Oh, so you don't care about accessibility? You should read python's diversity statement then
πππ πππ’π ππππ ππ’ππ ππππ ππππ
π²π ππ½ππππΉ π πππ·πΆπ·ππ π½πΆππ πΆ ππππ πΆππΆπΎπππ πΆππππππΆππ π»ππππ.
let's stop spamming, especially in the monospace characters
ππππ ππ πππππππππππππ’