#python-discussion
1 messages Β· Page 129 of 1
Time is not bad until some random manager decides that "daily reports" should be based on the local time zone and then flips out when they go on vacation and the daily report numbers they're seeing are not the same numbers their staff are seeing. π
"Make them see my numbers" No.
sounds like yall need a moon outpost
Mars
Hi
Also a fun time was HR setting a deadline of midnight 12:00am Friday, and me trying to explain that what they were asking for was 1 minute after 11:59pm Thursday, where as they wanted 1 minute before 12:01am Saturday.
Good night I got to go sleep
ah, mercury days are 4200 hours long. that should do nicely
mmm, mercury π₯¬
Thanks for sharing, enjoy your time.sleep()!
Print ("thanks ππ»")
xelf
that's blocking
soon nobody else can do anything either
i see deadlines literally set at 11:59 pm often because of this
start measuring things in "Pluto years".
clocks settable to 2400 when
it is the better way.
00:00 anyone
which lead to software closing it out exactly at 11:59 which is awkward for literal last-minute people
but still definitely yes
I'm in 3:50 AM
oh I was not asking what time it is for people
About what
see the conversation
???
Forget it
Sorry I'm new and I don't how to work's this server
My bad but I going to sleep π΄
Are you in Yakutsk? It's alsmost 4am in YAKT.
Is this in Japan
that word doesn't look Japanese to me
it's also almost noon in JST (Japan) but no YAKT would be Siberia.
Who would guess Siberia first?
Someone that plays Risk a lot. π
Oh I'm in north Africa
it's 4:56AM in egypt
I'm in Morocco
I see
North West Africa
yeah, I did a google search, and got the wrong info. LOL
Yes I know they are in another side of the earth
I hate Ai
When you said Africa I went back to double check, because no way are they off by 1 hour from each other.
indeed, they are not*
they don't are?
Huh?
Oh
yeah.
me to google: "where is it 4am right now if it is 7pm PT"
Ai Overview:
When it is 7 pm PT (Pacific Time), it is 4 am the next day in the time zones that are 9 hours ahead of Universal Time Coordinated (UTC+9). Pacific Time is typically UTC-8 (Standard Time) or UTC-7 (Daylight Saving Time). To find 4 am, which is 9 hours ahead of UTC, we look for locations in the UTC+9 time zone.
Areas where it would be 4 am include cities in:
Japan Standard Time (JST) - which covers all of Japan.
Korea Standard Time (KST) - which covers all of South Korea.
Eastern Indonesia Time (WIT) - which covers parts of Indonesia.
Palau Time (PWT) - which covers the island nation of Palau.
Yakutsk Time (YAKT) - which covers a large region of Eastern Siberia, Russia.
should have checked harder.
Bro
I think I was just excited to see Yakutsk mentioned. π
Wish Ai you use
In this case it was literally just a google search, and it auto pops up an overview at the top, I guess that would be gemini
My favorite Ai is Gemini
I'm more partial to windows copilot. It's not perfect.
Yeah
my favourite AI is Jarvis
Copilot is fine I'm just not the biggest fan of it
I don't know that before
from Iron Man
Hold on let me searching
asking copilot "where is it 5am right now if it is 7pm PT"
Places in UTC+2 (where it is 5am when it is 7pm PT)
These include:
South Africa (Johannesburg, Cape Town), Egypt (Cairo), Israel (Tel Aviv, Jerusalem), Finland, (and more)
Is it right?
Oh I know that before Ai
Yeah
I'm too sleepy to brain
Just gimme the answer
gemini can be very smart
yeah, copilot was right, gemini was far far off.
And accurate in information
Doesn't copilot auto search the web tho
coplipt is gpt5
I know that
Doesn't mean it finds the right result
was it gemini flash?
If it's rolled out to you*
But they can wrap it a bit
when i call gemini smart, i do not include flash
Fair man
ah really? it was gpt4 before though.
Did you know that human memory is larger than Ai
kinda weird then. i know gemini is capable of waay more than basic addition/subtraction with time zones
Who coulda thunk it
Microsoft Copilot is GPT 4, with GPT 5 rolling out
GitHub Copilot has a variety of models available, depending on your plan, which does include Gemini, both Flash and Pro
Gotta have like 6 asterisks when talking about AI π©
We could talk about python and not AI. Avoid all the asterisks.
pet peeve that microsoft owns github, and yet both end up using copilot as the name for related but very different products
The only thing I hate about Ai is the generation of images and videos.
Why
I use it to make a lot of basic graphics that I'm to lazy to make myself
The ai video I get but
so what's your favorite made in python ai?
people tend to use it for propoganda, such deepfakes etc
I don't have one. Tend not to use it at all.
Wow super impressive
These days I can no longer distinguish between artificial and real intelligence because the generation of videos and images has developed so dramatically.
I think the ai videos have to much room for error to be useful but I can use the images and tweak them quicker if need be
Yes and not
Wydm
Honestly, Ai has made our lives much easier, but we shouldn't rely on it for everything.
what about the ai voice tho, do you hate it aswell?
The ai videos and ai voice is a disaster waiting to happen in my opinion
anyone working any Python projects?
Yes, his voice always sounds like he has a cold.
I'm working on a weather bot
Like 3 mo into it
Show us
Bet
Why?
Can I send the server link or am I gonna get in trouble
π¨οΈ
can you share a github link too ?

oops wrong reply
The GitHub is private until it's completed then Imma open source it
Yes, I made an integrated VirusTotal (virus detector) + ChatGPT setup, so it can summarize what it finds based on the detected malware :D
Do you create code on GitHub?
I use vs code then I upload that to the GitHub
Ah, prob fine to share the link anyway
Working on configuring git so I can rollback easier
Honestly, I still don't know how GitHub works.
it's worth learning, and the basics are incredibly easy
I'm ok at it and can do what I need to with it but other than that I'm useless
Yes, only with willpower.
Do y'all want me to open source it now
you don't need to keep it a secret now. open it.
Mark Zuckerberg
yes, why not?
Open source it from the start
I hate mark Zuckerberg
this is off-topic.
I'll share it in a minute
Sorry
Most of my stuff starts as me talking it through here, then the repo is public from the start
Yes quickly
I'm working on it chill
Hii
Give us a hint or description of what the program does.
Bro the pfp β οΈ
What's the story behind you posting this picture?
Nothing. I just liked it
Do you know what's in my profile picture?
it's a clown
Any clown
Are you serious? This is a TV series on HBO
It's a bot
The readme was made by ai so there very well could be errors
To tell the whether
Correct
Weather
I did it to learn python
no idea
Very well
So far I only solved a couple of leetcode problems only
I needed motivation to actually begin so now I have code to maintain
Yeah that's a good way to go
Hey by the way
What is exactocast
Are u working
I see
it seems cool
Thanks
I don't have access to go to there
How do I get access
I didn't understand
I don't really know how to turn it on.
Any way thank y'all good night
hi gusy
Hey all
Good Morning
does anyone know how many jupyter notebooks I can run on my machine at a time ?
I'll send the invite link
Venv
I've been given 5 assignments in total all of them need to use SARIMAX and ARIMA models and for some reason SARIMAX models is taking a lot of time just to fit
so I'm thinking of parallelly start with another ones
But I don't want to run into the process issues
after all I love my laptop.... π
There isn't a specific limit. Why?
because of this
If they're using all the cores of your CPU during the compute stuff there is probably no point to running then concurrently. They might even make overall CPU less efficient.
My only reservation to going open source longer is that I want to integrate a paid api for more data and to make that feasible i need to make some money off it
You can run as many notebooks as you want, but they all have to share the same amount of hardware on your computer.
if you're unfortunate enough to have to work with statsmodels, its implementations of (s)arima(x) are noticeably slower than alternatives
Make sense, @acoustic stag ?
right, sorry has to take a call
Tell them we said hello.
So It's not a good option is that what you're saying ?
considering it might take more time than usual
Depends on how many cores and how much memory your laptop has. But since it's a laptop, probably not enough to run multiple of this.
any way to check it out ?
Hello, peoples, Is there anyone with free time who would like to test a platform I created?
Look up your laptop make and model online
What OS is it
you can just run 1 sarimax, and look at cpu usage from like task manager
if it's close to 100% then running a second notebook will not help
You'd know if you physically took apart the laptop and added more cores or more memory. Those aren't configuration settings
best linter pls π₯Ί
ruff
@acoustic stag look at this https://support.microsoft.com/en-us/windows/find-out-how-many-cores-a-processor-on-a-windows-device-has-3126ef99-0247-33b3-81fc-065e9fb0c35b
Open Task Manager, then select the Performance tab to see how many cores and logical processors the processor on a Windows device has.
well currently I'm running 1 jupyter notebook 1 sarimax model to fit over multiple pdq combinations
and it's uisng 65% of my cpu, 91% of memory (not sure why)
Cores - 4
Logical processors - 8
also what if I switch to google colab ?
will it be a little more faster as it uses hosted environment ?
once I'm done with the assignment I can simply download it
Or just open 2 notebooks.
Run the first fit compute, and time it.
Then rerun that fit, and the fit from the second notebook at the same time.
Is the first fit a lot slower?
If so, you're probably better just running them one at a time.
well that's the thing day after tomorrow is the deadline for the assignment
so don't have that much of time
i seee. idk about how to monetize stuff but good luck
Sorry to all in this server
Why
I get a ban from Hak5 π₯²
why not both?
you're saying I should do may be 2 assignments locally and 3 assignments on colab ?
It's a jupyter notebook? Can you run the fit in it's cell, then keep that around and only rn the rest of the cells as needed? I'm assuming the time probalem is the cost of running the same fit many times during debugging?
You could certainly try it. I would not expect colab to give you heaps of CPU, but it might be better CPU.
If that's easy to try.
Sell everything, buy farmland. Only solution /jk
Well clearly a temp ban. Just don't do whatever it was again.
Apologies accpted, welcome back.
What did you do
Hoo. Have you tried farmland?
is python.land a good place to learn python
No but if I sell everything and have "fuck you" monies and live in the middle of nowhere, I'll clearly have no problems right? (I'm being sarcastic and I'm exaggerating anyways)
No, it's permanent.
I asked them about the hack
Some other server?
Yes
well honestly I had to skip the debugging phase
and directly go for the actual one because of tight deadlines
!rule tos
We have similar rules here I would guess.
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
and I'm taking gpt's help to do so
So I shouldn't ask
yeah I mean like it's another machine to run your code on (I'm not really sure how running multiple colabs work for how much cpu you actually get tho)
go to kaggle too if that's not too hard to setup
well I already have used colab before but I like jupyter notebook than colab
Well you could describe what you're trying to do and see if people think it's against the rules. If you're unsure.
they are literally the same thing for all intents and purposes...
is python.land a good place to learn python
My curiosity is just bringing me trouble
True but I think network connection is a factor in case of colab and it's not in case of local jupyter notebook
your colab will continue running even if you lose connection
ohh I wasn't aware about it
!res general
Resource quality is questionable. I'd pick one of the curated resources here, such as Automate the Boring Stuff with Python or Harvard's CS50P, which are both free online.
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
I thought things start breaking up in colab if the connection is lost in between
Spit it out already
Hi
What
thank you
What you did to get banned
Would someone wanna crtitique my small little project?
you get 1 hour or something i think, after which it closes your instance
Sure
I was testing out downloading and file managing in python alongside some OOP
I asked them how to stβ¬@l my neighbor's Wi-Fi
I'll take a better look at it when I get home and can run it in my VM but it looks interesting
Alrighty :D
Why select 2 airports and how do I define which one is primary and which one is secondary? https://github.com/ant-xy/ATC-Automation/blob/main/main.py#L116-L122 My country is so small, we only have 1 airport tho
main.py lines 116 to 122
print(f"[{Fore.GREEN}*{Style.RESET_ALL}] Please select your Primary and Secondary airports in the respective order.")
primaryAirport = airportSelect()
secondAirport = airportSelect()
primAirport = Path(primaryAirport[0], primaryAirport[1], primaryAirport[2], None)
secAirport = Path(secondAirport[0], secondAirport[1], secondAirport[2], None)```
I don't think I would have this kind of info on hand https://github.com/ant-xy/ATC-Automation/blob/main/main.py#L108-L109
main.py lines 108 to 109
aircraftType = input("Please enter aircraft type: ")
aircraftID = input("Please enter aircraft ID: ")```
Ah, primary airport is the airport the plane is going to fly from, the secondary airport is where it will fly to
oh lol. Could have done a "From Airport" to "To Airport" or Departure and Arrival or Flying off and Destination... Lots of other proper words than Primary and Secondary
It doesnt really matter, you can type in anything you want since it doesnt affect the system
Then you might as well omit it?
I participated in a programming and artificial intelligence competition at my school.
What should I do?
What do you have to do for the competition?
Good point, but i considered it a nice to have feature.
You participated. So it already happened?
Creating an artificial intelligence program using Python
What kind of AI? To do what?
Are they expecting you to train a model or make API calls to a proprietary ai service?
Like chatgpt
That's hardly a competition. More like copying and pasting what ChatGPT can do. What are you supposed to compete for?
It only offers a basic service, less than GBT Chat.
how do you make money with prorgamming skills?
By offering and selling solutions to people's problems for money
No, it's just a test of your programming skills.
Getting a full time job as a developer.
There are way more people trying to do "side hustles" with programming than there is demand.
oh then, go for it.
where do I find people who have programming problems
It didn't start
I dont think that will be possible as a high schooler
You can go to a freelance website like upwork for Fiverr. The competition will be fierce.
Try asking your neighbors, and people really close to you. Then extend from there. Network around. Connect with people.
You should focus on doing well in school so that you can get a degree in computer science or similar.
thats the plan
In the meantime, I don't think you'll be able to earn any money
that kinda sucks, I currently have a part time job but I can only get like 2 shifts per week so I'm trying to come up with another way to make money
Video titled "Stop Writing Useless Python!", last clip of the video:
Try creating your own program using everything taught in this video:
Take input from the user
Clean it using string methods
Make decisions using conditions
Print meaningful output
That's useful? Mmkay
Is this self-promotion?
"make programs that actually react"
...
react?
And I guess you can't get a second job, because you have to maintain enough availability with the first one just to get those two shifts?
no thank you
yes, I also don't have time to get a second job that doesn't have a flexible schedule
reatc js
Umm Sup?
Hlo I am also a python young coder (15 years old)
Python channel is on a slow mo mode..
i also joined math server and it is growing very fast
oh
very young...if you are interested in programming
you will go very far
I do coding in a phone (2GB RAM) on termux ubuntu
I make a python project, you can see in my GitHub repo
thats some dedication
What editor do you use in termux?
I use geany in ubuntu in termux, but previously I use neovim
I'm surprisingly impressed that you can run Geany with that phone spec
what is Geany
average smart phone..or somethjng special in it
like vs code?
Worst specs Iβve ever seen insane
I use modded ubuntu (from GitHub)
Crazy
You should get a laptop
I know html, css, js, python, java, c++, many modules in python like PyQt5, django, and many so
he is 15 years old...will his parents agree for a high performing pc
who said anything about high performing
I am in class 10, when I come in 11th, my parents will take me a new phone or later a laptop also
just thought
Opt for a desktop PC instead of a laptop. You can then upgrade the parts whenever its affordable to.
i got my first laptop when i came in college
i am switiching my career
not very exciting
but that is what i wanna do now
I start coding in my 9th class, and I created many project, my op project is an code editor (https://github.com/procoder178/k-ide.git)
Not a good time to build any sort of pc right now
Not right now. Later-ish.
but we dont know when it will get better either, could be few months , could be a year
or maybe never
glad I built my PC in march with parts I bought back in February of this year.

I do
What are you all doing here daily?
nuthin
Working?
just chillin
Or I guess more accurately -- escaping working
Discussing
This is more accurate
python-discussing for sure
Yeah.
But a little
not a single message for one and a half hour
Then send some
a while ago, i sent a you killed chat emoji here after a 45ish-minute pause (via reaction, so as to not unkill chat). apparently, that's considered quite rude
print(print(print(print(print(print(print(print(print(print(print(print(print(("hello"))))))))))))))
How do web scrapers still exist and scrape with cloudflare and other companies protecting the web? Hypothetically, what actions do these companies need to take to remove bots once and for all from the web? We dont care about user experience here at all
don't care about ux at all huh?
bring down your website
no site, no bots
Bruh you know what i mean
that's about the only real way to do it. bots are a fact of life for online sites. cloudflare probably greatly reduces their volume, but you cannot remove them completely without, essentially, national governments (and militaries, likely) hunting down the bot hubs
Why not though?
also, a lot of the deadlier bots nowadays are big-time corporate ai crawlers from places like openai or anthropic
you can code a bot to crawl the web in a manner that overlaps the way a human does. most won't, as this is inefficient and slow, but if you want to remove them all, you have to account for those. and while you may not care about ux, losing customers is unacceptable for a lot of businesses
I see
captcha test work? if i understood your message right
you can buy captcha solving services that enslave hire massive groups of ultra-poor exploited fellas in (generally) third-world countries that'll solve you maybe a few thousand per hour for a few bucks (the human solvers get maybe a few cents per solve)
India...are you poking india
i'm sure there's a large group of those organizations in india, sure. but that's also a consequence of having a billion people
its no.1 in population..
and a population of a huge amount of youngsters...
businesses will invest in it..
Alright, that does bypass it. I cant think of any other method
btw i heard that tution cost is very high in other countries than INDIA
Thereβs all types of people in every country
I donβt think they were trying to diss India
In conclusion, crawlers can never be stopped fully
i know...i needed a topic to talk
needed ?
gemini..is this a word
I do get random LinkedIn connection requests from dudes in India though idk why
not with the current internet at least, no. if you remade it, you could probably enact systems to prevent such things
How would you imagine that work?
When i first introduced to facebook in 2008 or 09 something,
my main focus was just to make a huge list of friends...that was like a social status in my country then.
Dang
what you do then?
easiest way is have a whitelist system of connections. if you want to connect to discord, for example, then you have to be on discord's list of explicitly approved users beforehand. otherwise, as far as you're concerned, there's no such thing as discord. combine this with a web-of-trust type system, and if you got on the list but then later abused it, discord would share the abuse, and you would be removed from the lists of potentially millions of websites
I'm not sure I like the power dynamics of that system...
you could implement a voting-type system, but yes, it trades the bot problem with problems of its own
there are no perfect systems of any type in any field, just systems that sacrifice stuff the creators considered less important when they were made in exchange for stuff considered more important
does insta bot exists?
there are bots for all major social meda platforms
I was surprised first when a reel told me to send a message like 'hi'in comments and he will send you the message, of something that catches my attention, in the dm
the third google result for me for "instagram bot" alleges it's "human-like", presumably to avoid detection
the old os support, android 5+, might be a red flag for the detectors, though
good morning guys
this is like the same type of "central" system used in banks
running on an ancient stack of COBOL?
Has anyone managed to solve the ICPC 2025 Online Winter Challenge?
never heard of it
dont ask to ask , just ask your question
from codeforces
never heard of it
I made a python travel itinerary generator using flask framework, and used two apis.
The output was generated using visual crossing api and google studio ai api.
Initially it used to run well but later it suddenly stopped generating output after some days
did you check your logs, etc?
I meant the loan / credit card system
Didnβt get you. How do I do it?
you don't have logging set up in your app? how are you running it?
So no error messages?
I don't know about the VSCode.
Can you put print() statements around your API callsto show when they start and when they return? Trying to pin down what part of the programme is hanging.
Okay
You may end up putting in quite a few until you can see where things are stallong.
Okay got it
You haen't got any "bare excepts" have you? Things like:
try:
something...
except:
pass # ignore whatever went wrong
@trail girder ^^
is anyone here familiar with playwright that can help me
What're you struggling with
You've been spamming this and I see this as promotion. <@&831776746206265384>
i'm trying to scrape car listings from a site and basically after 150 or so i get this error Error navigating pages for McLaren: Page.goto: net::ERR_HTTP_RESPONSE_CODE_FAILURE at
and cant scrape anymore , like it doesn't access to anything
What are you using for scraping and what error code are you getting
What is after 150? What is the full error message?
Error navigating pages for McLaren: Page.goto: net::ERR_HTTP_RESPONSE_CODE_FAILURE at https://www.autoscout24.com/offers/mclaren-gt-exterior-elite-paint-plateaux-gasoline-grey-e8609ddd-4a1b-45d7-b533-d31a366afceb?sort=standard&desc=0&position=174&source_otp=t10&source=listpage_search-results&order_bucket=unknown&boost_level=t10&applied_boost_level=t10&relevance_adjustment=organic&boosting_product=none Call log: - navigating to "https://www.autoscout24.com/offers/mclaren-gt-exterior-elite-paint-plateaux-gasoline-grey-e8609ddd-4a1b-45d7-b533-d31a366afceb?sort=standard&desc=0&position=174&source_otp=t10&source=listpage_search-results&order_bucket=unknown&boost_level=t10&applied_boost_level=t10&relevance_adjustment=organic&boosting_product=none", waiting until "domcontentloaded"
i mean i guess they are blocking my ip or something, right now im using only one agent and i try adding stealth, also im doing it sync, i dont know if i should do it async
waiting until "domcontentloaded"
your script is running too fast
slow down zoomer
i guess ahah, but when sould i slow it down? after every link?
π€·ββοΈ
next_page = page.locator('button[aria-label="Go to next page"]')
if next_page.get_attribute("aria-disabled") != "true":
next_page.click()
page.wait_for_load_state("domcontentloaded")
time.sleep(random.uniform(1, 2))
this is what i have for now for each page should i do the same for each link
do you have any idea man
Thanks
I had made the project long back, I donβt remember if I used them .
But right now the issue is that all of a sudden my VScode isnβt opening Iβm sooo confused
reinstall vscode maybe?
did you update windows?
there is an issue with updating windows and windows breaking the shortcut to the vscode binary
guess how i know
It happened to you too
Yeah I might have to reinstall I guess
Yes recently
you wont have to
there's a fix
just search it on google
well, I didnt have to reinstall vscode
(assuming we met the same issue, of course)
I hope so
Good afternoon
good afternoon too
How's everyone doing this wonderful day
wasting time playing games...
Doing good, just spending time well playing games
Not as bad as doing absolutely nothing..
Nice
Any one for projects collaboration
i wonder if pair programming is a common thing in a CS course
Group projects are common I think
Error processing listing: Locator.wait_for: Timeout 5000ms exceeded.
Call log:
- waiting for locator("script[type='application/ld+json']").nth(1)
does anyone know how to fix this thing on playwright? after scraping 150 or so cars it stops working
today was a rest day for me so I spent the entire day watching a vod
We have had group projects but no mandated pair programming yet, tho tbf I'm just done one semester
But I wonder , will this keep happening after a few updates as well?
Very cool
it happened to me once
in like 6 years
Ah okay
are you using playwright headless?
Personally, I dropped vsc cuz their updates kept breaking stuff and enabling random ai features I never asked for lol
codium is still good though
I see
Might be thatβs the reason my project literally stopped working all of a sudden. It used to work well earlier
hey
Does codium enable random ai features too?
if it does, it's a bug
Lol
I'll check codium if I get tired of zed
yeah i put headless = True, but with headless = False its the same i just get an error_net thing
Error navigating pages for McLaren: Page.goto: net::ERR_HTTP_RESPONSE_CODE_FAILURE at
that error code sounds like just a network error
if you open devtools you can see the http response code of the http request
it happens after i correctly get 150 cars data, so maybe its because they detect its a bot? i try to put a 5 seconds time sleep after each page but it still happens..
I don't think vsc should actually affect your project's working, it's just bad development environment atp
it happens on linux too
it might be
you should probably double check the TOS of the website to see if scraping is prohibited
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
how can i fix.. last year with beautifulsoup i scraped 10000 cars, i wanted to do a database with 100k cars this time but my old beautifuolsup script didnt work at all, so now im trying to use this playwright but ye it stops fast..
fix the voice of the video very bad voice
ok
thanx for the feedback, I really appreciate it
You may want to first learn python before teaching others
I learned it 2 years ago
Can you give an example?
maybe I have forget some basics but still
if choice == "report":
report = coffee_machine.report()
print(report)
if i just wrote pritn(coffee_machine.report()) it'll print memory location
but assigning it a variable makes it print the information
You forgot the basics... so shouldn't you re learn them instead of teaching incomplete/incorrect stuff
omg java
What does that method return?
its python
it's a coffee joke
can you show the complete code i.e what coffee_machine.report() does?
bruh
Why bruh me π
This shouldn't be the case.
These 2 things:
x = something
print(x)
and
print(something)
should do exactly the same thing.
What drink would you like? latte/espresso/cappuccino/
report
Water: 300ml
Milk: 200ml
Coffee: 100g
None
however without doing report = coffee_machine.report()
and just doing ``` print(coffee_machine.report())
gives me a memory location
FYI this is OOP and im using classes and methods from another file
Hey @stone rune!
Make sure you put your code on a new line following py. There must not be any spaces after py.
Here is an example of how it should look:
```py
print('Hello, world!')
```
This will result in the following:
print('Hello, world!')```
you are right, I should revise right before making teh video
did you return a <Map> or a <Generator>
show your code for the report function
Even so.
I'm wondering if they forgot the brackets.
@stone rune can you show us the memory address version of the output?
Can you show the code that defines the report method and it's code block?
uh huh
Do you still have the memory address output in your terminal? Can you scroll back to it?
Iβm on team βforgot the bracketsβ - probably the most likely thing
must have been the wind (that caused the error)
You must've forgot to call the method while printing it directly
we can pretend thats true
no it clears everytime i run. im in pycharm
dont worry its working now
!e
There's always a reason.
Look:
def f(): return 3
print(f()) # 3
print(f) # prints the address of the f function
:white_check_mark: Your 3.14 eval job has completed with return code 0.
001 | 3
002 | <function f at 0x7fd52a9bf320>
unless i forgot to () at the end
alright alright
We were wodnering that.
yeah probably forgot to call it.
not sure, my brain doesnt store that much memory
Any code about coffee not written in Java or JavaScript is a missed opportunity tbh
let's change topic
.topic
Suggest more topics here!
java script
That's what the terminals for! Scroll back, see if the output is there.
@pallid garden didnt miss it
it's the script that helps me brew coffee
my pycharm clears it
everytime i run
it's written in of course, python
Rude.
And my code about snakes is written in Java
pycharm has a code history function
My code about iron oxidation is written in C++
My code about stop signs is written in Rust
i woke up in the morning suddenly realizing that i had been storing my app's data in a HashMap
I wish i knew what that meant
but i store my apps data on my pc
essentially you can't write to the session data from multiple threads
because one of the thread would always have the lock
luckily, i found a crate to solve it
using claude?
a hashmap, in rust, is like a dict in python
why does your mind go to claude?
when did claude enter this conversation
Imagine if all languages had a consistent naming system.
Funnily enough I do actually have two snake themed projects both fully written in rust
would be so good ryt?
Everything is about β¨AIβ¨ donβt you know

yesterday
what does #fdl mean?
how is the development status? is the app _maturin_βg?
thank you thank you
A Wild Python will bite you.
I think we should nuke this server, it's supposed to make people code but we instead spend time talking
i lost internet connection yesterday and finished the graph module of my app
So True
in record time
i hope you lose it again
Why is there no cymbal emoji
thank you
I had to settle for using a CD
my pleasure
because we're not cymbal minded here.
hi
Hey!
Write a script to nuke all servers so people can code without wasting time talking
Hlo
Hey π
exactly! that's how we get half life 3 to release!
very good idea
What are you doing?
wasting time on discord
Iβve only just gotten up, and apparently the first thing I do is check pydis
.topic
average aoc completionist mentality lmao
friendly reminder to clean your trash on computer by running sudo rm -rf /usr/bin (If it's not obv I'm joking)
why does my code print none ??????
AOC 2015βs difficulty curve is interesting
lmao
OMG
you'll probably get asked to delete the message
Hi everyone. I'm trying to learn Python, but I don't think I'm improving my coding skills significantly. Do you have any tips?
but it's pretty funny
why does this give me 'none none'
from coffee_maker import CoffeeMaker
from money_machine import MoneyMachine
from menu import Menu
coffee_machine = CoffeeMaker()
money_machine = MoneyMachine()
menu = Menu()
machine_on = True
while machine_on:
choice = input(f"What drink would you like? {menu.get_items()}\n")
if choice == "report":
print(coffee_machine.report(), money_machine.report())
this is my terminal
What drink would you like? latte/espresso/cappuccino/
report
Water: 300ml
Milk: 200ml
Coffee: 100g
Money: $0
None None
Itβs like the cross section of a beach - from the sea, you have a gentle slope - then you face a vertical cliff at the end of that slope
keep programming, a project you get into would be best, but a site like codewars can offer you simple challenges to "level up" on.
because the classes code is a very bad code, it doesn't return anything
Have you tried your hands at any projects?
oh
do you know what's the difference between returning and printing?
wot
yes,
the func is printing
yep
if you dont return anything then it's equivalent to returning None
oh
ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
OMGGGGGGGGGGGGGGG
im double printing
you know what is something that is actually super good in rust?
clippy
clippy catches a lot of these silly mistakes for me
i wish there was an equivalent in python
Does Ruff do the same thing
yes , functions should always return , i would argue it's dumb to use print() inside functions ._.
(For Debugging Purposes use Logs)*
kinda but not as comprehensive
I know Pycharm will warn me if I donβt put returns everywhere
I canβt remember if thereβs a Ruff thing though
Depends on the context, may not always be dumb
why's a programming lagnuage named after what happens to metal
one guy names it after a snake, the other metal
Sometimes you are writing a script where you do want to output a print though
another guy will soon name a coding language after a candle
because it gives burn out
I can't think of a context where printing something rather than returning it is beneficial
why's c named after a letter? why's python named after a comedy troupe?
why did you stick with your birth name
I like to write my code verbosely for Advent of Code but even I would not use logging to show the output
the etymology of the name is a fungus called rust, which looks like rusting metal. it's named after this fungus because of the resiliency of the fungus
I mean you can do print(func(input))
who said I did?
But usually you would do that in a function itself
oh hell no
The conventional way to run a script is to have main() as an entry point
santa
Well for some text based games you could have functions like game, menu, shop, etc which have their own gameplay within them - which include printing
Seems I saw somewhere that C is short for Cheetah
(no)
good point ryt , also idk why i forgot about main() π
anyways you guys are a total distraction i hope this server gets nuked
there was a language called B, and C came after that
That makes more sense
mostly I can't be bothered to set up proper logging for debug prints :P
same
lmao
like it's 2 lines I've copied somewhere which I paste
Unless im doing something at a large scale I don't bother with logging
If I really want debugging, or even slightly want it, Iβll do it
But for a script I wonβt
btw I honestly believed bin was trash during the inital days of using linux I'm thankful I never deleted it
Lmao
Knowing nothing about Linux I like to think etc is just named after the acronym etcetera - just a place to put random stuff, etc etc
.topic
Suggest more topics here!
Itβs helped distract me from Python
/dev is devices not developer π€£
guys what good commands would you consider for a utility bot that can be used anywhere
Same good time burner
I had a Leetle obsession for a while which I got from here
All the websites for programming puzzles Iβve gotten from this server which has helped me learn Python better
oh can you please share them with me
To be honest the only ones are leetle and Advent of Code. Thereβs a third one about projects I forgot the name of - one second
I liked leetle for a while, there would be like 10 1 liners in a row, and then a longer one.
Alright thank you
The website is a little iffy though
Some of the problems that have two arguments have them switched around the wrong way
yeah, I've seen that sometimes.
My thought is that itβs where the parameters appear switched around in the sample input. It looks like the function is being called with kwargs but itβs being called positionally
The other one is https://codingchallenges.fyi/
I like this for larger projects
Tbh I should do this more than AoC
Description will go into a meta tag in <head />
Lmao
Looks like there hasn't been a new one for a few days.
||```py
max((n for n in arr if n==arr.count(n)),default=-1)
Oh interesting
Guys i got a question, what are the prospects of installing a malicious python library
I misspelled scipy into scypy and i thought wsl was a library and i didn't know it was a non linux thing
I did uninstall them very fast though
It is a package https://pypi.org/project/scypy/#scypy-0.0.8-py3-none-any.whl
oh my bad
I thought it was and turns out there is one
i went to the wrong url
Its a fake scipy so im worried if there are prospects of malware
i went to pypi.org/scypy instead
Thats what worries me
How can i check for if anything was truly malicious
by vikki.flover whose name is actually russian and whose only other project is torche
...seems trustworthy...
joined half a year ago...
Should i run this lib called safety?
you can inspect the files I guess
hi guys
oh, it's a whl
where general chat?
this is the Python general chat. we also have offtopic channels.
general chat about python or general chat about regular talk ?
just for rehular talk
What would you suggest i do
!topic
There are three off-topic channels:
The channel names change every night at midnight UTC and are often fun meta references to jokes or conversations that happened on the server.
See our off-topic etiquette page for more guidance on how the channels should be used.
oh
these 3 are "general"
guys why then i import keyboard its error?
because something is wrong
if you want to understand whats wrong then you will have to show the error
did you install it ?
not sure how one would inspect a binary wheel
oh wait the torche one seems legitimate... although the coding style is weird (returning strings of source code)
like, pip install keyboard?
yes
Hopefully a false positive then?
its error then i install pip
can you show the error you get when you run pip install keyboard ?
yes
and make sure to copy paste the error message , you cant send photos in this channel
i typing on phone now
Hlllllllllooooooooo
Good timezone
good timezone to you too
Is there anymore i could do?
any more what
I checked temp i checked os i checked with pip check i checked pip list i checked all my python files
For the fake scipy thing
Alright thanks
Guys what was the link of the code editor where people share their code here?
!paste
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
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.
Thanks!
do y'all believe that comments are failures
yes
functions essentially take input, and optionally return output
There are appropriate usages and less appropriate usages.
a failure because code should be self-explanatory?
Maybe you might want to return the string to be later printed?
A bit unnecessary to have a function at all.
yes, exactly that
people say you should refactor the commented piece of code into a function, but I think that's excessive
Not at all.
i also think it's excessive. past a certain complexity, even with clear code and comments, things will be difficult to understand
and tbh i don't think it's worth the indirection
There are some zealots that think every comment can be reified as some code construct. I think that's obviously wrong
zealots are usually wrong
a common argument is that comments can lie
function and variable names can lie, too
whenever you compute something inside a function, and then you want to use the result outside the function, your options are either global variables or using return. return is preferable because global variables make it increasingly difficult to know when you will have unexpected side effects in your code
I mainly write code for myself, so my philosophy is that if I get confused (or predict I will get confused) when revisiting a bit of code I'll write a comment explaining why I chose to do something
return makes a value "visible" outside of a function. maybe reading about scope can help here
def func():
return "Hello, world."
print(func())
# is like
print("Hello, world.")```A function is a collection of code that can be run on demand. Once it has completed, it returns, making the call to the function be replaced by the object given to the return keyword, if any.
How do you guys check for malicious libraries?
!return
In what context?
A value created inside a function can't be used outside of it unless you return it.
Consider the following function:
def square(n):
return n * n
If we wanted to store 5 squared in a variable called x, we would do:
x = square(5). x would now equal 25.
Common Mistakes
>>> def square(n):
... n * n # calculates then throws away, returns None
...
>>> x = square(5)
>>> print(x)
None
>>> def square(n):
... print(n * n) # calculates and prints, then throws away and returns None
...
>>> x = square(5)
25
>>> print(x)
None
Things to note
print()andreturndo not accomplish the same thing.print()will show the value, and then it will be gone.- A function will return
Noneif it ends without areturnstatement. - When you want to print a value from a function, it's best to return the value and print the function call instead, like
print(square(5)).
For the mainstream ones, most of us don't. In general, we shouldn't have to.
by only using the popular ones ;)
How do you check if a library is malicious, i downloaded this fake scipy and it was scypy and this wsl that i realized wsl wasn't actually a library, im doing everything i can right now to check if i did but i don't think im doing enough
How'd you download a fake scipy?
someone is typosquatting scypy
typosquatting?
I forgot it was called scipy and not scypy
Precisely yes
Ah. I hate that.
by using anaconda, which does test the validity and safety of the contents in its main repo π
oops, yes i meant typosquatting
Can't pypi do something about those?
So many libs have that problem. like, vortex vs vortex-data, or ibis vs ibis-framework.
Be more like java...
"org.package.name" or something?
huh, I assumed pypi prevents you from making a package that's named too similar to existing ones π€
why does java use reverse domain anyway
Im checking registries right now, i checked all python files cleared pip cache cleared temp no py files checked local roaming and locallow
Do you want psycopg1, psycopg2 or psycopg3?
I just realized AI made me stop write comments
You can read the source code of a package through https://inspector.pypi.io/
Did you install scypy?
the fear of your work being called AI Generated that you don't write comments.
Yes then i uninstalled it in a few seconds
Its got no github repos no description
So long as you didn't import it or run any of it, you'll be fine.
lol
you can never be too safe, though
Yeah im checking everything i can
it's easy to tell whether a comment is ai-generated or not
I checked procmon and scheduled tasks
No. Installing or pip downloading a package can run arbitrary code.
(because of setup.py)
Package shadowing?
whattttttt
Oh. Really? Disappointing.
that sounds dangerous
if you downloaded in venv only 1 thing just delete the venv
I have a suspicious term python file checking keywords
I downloaded through pip on gitbash
it'll still be in pip's cache
I did clear pips cache
thank god for pyproject.toml and [project]
nice
When I pip install something, I expect files to be moved into places, not for shit to get run.
This is a thing in every package manager pretty much. Some packages want to do stuff upon installation.
For example: if you download aiohttp, it has Cython code that needs to be compiled.
I miss trusting things.
npm has this, cargo has this
Yeah
I'll recheck the python library files and all installed libs
What packages did you install? Is it just scypy and wsl? Those don't look malicious
now you've got to mistrust them π₯
Those 2 yes
I can send all installed packages today
I don't trust anything. I have to act outside of that trust to operate at all. It's deeply uncomfortable
I'm not expert, I also don't see anything scary in scypy.
well theoretically the library upon downloading could've already ran a script and downloaded all your data and sent it. or downloaded a virus onto your system. It's not too far fetched to think this.
These are all
annotated-types 0.7.0
anyio 4.12.0
Authlib 1.6.6
certifi 2025.11.12
cffi 2.0.0
charset-normalizer 3.4.4
click 8.3.1
colorama 0.4.6
contourpy 1.3.3
cryptography 46.0.3
cycler 0.12.1
dparse 0.6.4
filelock 3.20.1
fonttools 4.61.1
h11 0.16.0
httpcore 1.0.9
httpx 0.28.1
idna 3.11
Jinja2 3.1.6
joblib 1.5.3
kiwisolver 1.4.9
markdown-it-py 4.0.0
MarkupSafe 3.0.3
marshmallow 4.1.2
matplotlib 3.10.8
mdurl 0.1.2
mpmath 1.3.0
narwhals 2.14.0
networkx 3.6.1
nltk 3.9.2
numpy 2.4.0
packaging 25.0
pandas 2.3.3
pillow 12.0.0
pip 25.3
plotly 6.5.0
pycparser 2.23
pydantic 2.12.5
pydantic_core 2.41.5
Pygments 2.19.2
pyparsing 3.3.1
python-dateutil 2.9.0.post0
pytz 2025.2
regex 2025.11.3
requests 2.32.5
rich 14.2.0
ruamel.yaml 0.18.17
ruamel.yaml.clib 0.2.15
safety-schemas 0.0.16
scikit-learn 1.8.0
scipy 1.16.3
seaborn 0.13.2
shellingham 1.5.4
six 1.17.0
sympy 1.14.0
tenacity 9.1.2
threadpoolctl 3.6.0
tomlkit 0.13.3
tqdm 4.67.1
typer 0.21.0
typing_extensions 4.15.0
typing-inspection 0.4.2
tzdata 2025.3
urllib3 2.6.2
holy
pip download executing arbitrary code is completely bonkers because of the safe-looking name, and it's never gonna be fixed
Sorry for the long list
.
They came with other libraries not manually installed
But, in this case, it doesn't seem like that's true.
Like pandas
downloadation lol
downloading stuff doesn't imply running code?
pygame, manim, PyQt , tkinter many trusted libraries you missed
^
pypa/pip#12465
This is the install list i ran pip install numpy scipy sympy pandas matplotlib seaborn plotly scikit-learn networkx
It does though
As I understand it, "installing, or downloading, a wheel doesnβt run arbitrary Python code"
(wheel being the operative part, not a source dist)
oh i didn't mean pip download specifically
like, the act of downloading in general
how so
i mean, apart from the code that actually makes the network request and puts the file on your filesystem
First, that code didn't execute if you merely installed the wheel and didn't import.
Second, that code won't run because it contains ipython line magics like !pip install and %matplotlib.
(I am also not an expert in this field, just giving you my opinion)
what exists?
oh i didnt know % existed
This library
anyone can upload a package to PyPI
you don't need approval from anyone to upload a banana-lib that just does print("banana") when you import it
Big Banana might sure you for copyright
In general: be very careful when interacting with pip or anything dependency related. It's easy to typo things, so copy pasting package names is a good idea. Even if the package name is three characters long, copy and paste the package name from the github README of the project.
Man i didn't think it would be this bad
This isn't my first time either so im genuinely distraught
If it's a library you've never heard of, and it's not extremely popular, read all of its source code through inspector.pypi.org
I've installed a fair few of these libraries before
Yes thats new to me
including setup.py and wherever the dependencies of the library are listed
(because the source code could be benign, but it could depend on a malicious project instead)
heyy
i finished that password manager of mine
wanna see?
i wonder if there's an audiomack client
you can share with everyone here
I don't know much about this topic, but people here seem to hate anaconda and switching from it
Haskell has a cool project called Stackage
Stackage provides consistent sets of Haskell packages, known to build together and pass their tests before becoming Stackage Nightly snapshots and LTS (Long Term Support) releases.
if you looked at the source code of scypy you can tell that it's just someone trying to learn scipy and added their project to pypi in confusion
Im thinking it might be an assignment of some sort, its 4k lines in one of the files, the other have 0 to few
i'm not sure why tbh
it's my go to
hello
relax, said the conda
we are programmed to install
you can uninstall anytime you like
but you can never leave
golang is so easy
Not sure how thoroughly Stackage is checking the security of these packages. But maybe some day in the future we will evolve some sort of trusted repositories like that that you can rely on. Like: instead of downloading stuff from PyPI, you download scientific packages from numpy-repository, and common async I/O packages from aio-libs-repository.
Of course, big companies already have their own PyPI mirrors. But e.g. developer machines are still at risk when they're trying out new packages
no fp
def zadachki(number):
if number == 0:
return'''
1 - classification/bank.csv + ΠΌΠ°ΡΡΠΈΡΡ + ΠΎΠΏΡΠΈΠΌΠΈΠ·Π°ΡΠΎΡΡ
2 - classification/bank.csv + ΠΌΠ°ΡΡΠΈΡΡ + Π΄ΡΠΎΠΏΠ°ΡΡΡ
3 - classification/bank.csv. + ΠΌΠ°ΡΡΠΈΡΡ + Π½Π΅ΡΠ±Π°Π»Π°Π½ΡΠΈΡΠΎΠ²
4 - regression/bike_cnt.csv + BatchNorm
5 - regression/gold.csv + ΠΎΠΏΡΠΈΠΌΠΈΠ·Π°ΡΠΎΡΡ
6 - images/sign_language.zip + ΠΌΠ°ΡΡΠΈΡΡ + PCA
7 - images/sign_language.zip + ΡΠ°Π·Π½ΡΠ΅ conv
8 - images/eng_handwritten.zip + ΡΠ°Π½Π½ΡΡ ΠΎΡΡΠ°Π½ΠΎΠ²ΠΊΠ°
9 - images/clothes_multi.zip + ΡΠ°Π·Π½ΡΠ΅ Π»Π΅ΠΉΠ±Π»Ρ
10 - images/chars.zip + Π°ΡΠ³ΠΌΠ΅Π½ΡΠ°ΡΠΈΡ'''
Hey @orchid vortex!
You are using the wrong character instead of backticks. Use ```, not '''.
What is it doing
wdym fp
i just used it to wrap audiomack's api so
So do you guys think im safe?
i think so
oh, you mean compiler?
gofumpt
gofmt
yea
i need to better plan out my projects
when i finish something i take too long to think of what to do next
me too, I complete a project and then do nothing for a week
tabs π
oh boy, another tabs vs spaces debate?!
It helps organizing changes and new features into a to-do list, so that you can one by one check them
I think that debate might be a bit skewed in a Python server π
yea
Im hoping its a false positive
The commit itself should be used just to bring you to a checkpoint, before working on potential breaking changes
Is there anyway to scan its code to check for anything malicious?
PyPI already does some scanning on its own and removes some malicious packages
that is fairly recent though, right?
I think so
Is there anymore i can do? I checked the code, checked all my files, checked some registries, checked schedules, checked local locallow roaming all python files all pip files cleared cache remove and checked with the gitbash commands if they exist and i checked whether there is anything in startups shell and process startups
But you're ultimately responsible for what code you install and run on your computer
You could run an antivirus, I guess
what's mrt
if you're very concerned, you can always wipe your os
Malicious software removal tool
Yeah, if you're in doubt and you want peace of mind, you can always just nuke your system and install it anew
I already did that so recently i could do it again
Something that worries me is that a prevalent file being scanned is payload.vsix
that's a vscode extension
Do you have some VSCode extensions installed?
let's not use a nuclear bomb to kill a fly that we think we saw the shadow of