#python-discussion

1 messages Β· Page 129 of 1

fiery yarrow
#

people always talk about how time is a nightmare because of timezones, but the real reason is because of (astro)physics, which is why "universal time" can refer to any of like 6ish different clocks and why things like "day" have more than one meaning

runic flower
fiery yarrow
#

sounds like yall need a moon outpost

scenic finch
#

Mars

pulsar dragon
#

Hi

runic flower
#

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.

pulsar dragon
#

Good night I got to go sleep

fiery yarrow
#

ah, mercury days are 4200 hours long. that should do nicely

dry pike
#

mmm, mercury πŸ₯¬

runic flower
pulsar dragon
fiery yarrow
#

xelf
that's blocking
soon nobody else can do anything either

ashen jungle
runic flower
fiery yarrow
#

clocks settable to 2400 when

runic flower
dry pike
#

00:00 anyone

ashen jungle
ashen jungle
pulsar dragon
dry pike
#

18:50PM here

#

:)

dry pike
pulsar dragon
dry pike
#

see the conversation

pulsar dragon
#

No sorry

#

I stay hard

dry pike
pulsar dragon
#

Sorry I'm new and I don't how to work's this server

#

My bad but I going to sleep 😴

runic flower
pulsar dragon
dry pike
#

that word doesn't look Japanese to me

runic flower
charred tusk
#

Who would guess Siberia first?

runic flower
pulsar dragon
dry pike
#

it's 4:56AM in egypt

pulsar dragon
dry pike
#

I see

pulsar dragon
#

North West Africa

dry pike
#

wait why is xelf saying almost 4am in Japan

#

it's almost noon in Japan

charred tusk
#

11:58β€―AM
Saturday, December 27, 2025 (GMT+9)
Time in Tokyo, Japan

#

huh

runic flower
pulsar dragon
pulsar dragon
runic flower
#

When you said Africa I went back to double check, because no way are they off by 1 hour from each other.

grim axle
#

indeed, they are not*

dry pike
#

they don't are?

pulsar dragon
runic flower
# dry pike AI?

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.

runic flower
#

I think I was just excited to see Yakutsk mentioned. πŸ™‚

runic flower
pulsar dragon
#

My favorite Ai is Gemini

exotic badge
#

Real

#

Gemini is lit

runic flower
#

I'm more partial to windows copilot. It's not perfect.

pulsar dragon
#

Yeah

dry pike
#

my favourite AI is Jarvis

exotic badge
#

Copilot is fine I'm just not the biggest fan of it

pulsar dragon
dry pike
#

from Iron Man

pulsar dragon
exotic badge
#

That's a classic

runic flower
#

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)

pulsar dragon
charred tusk
#

Yeah
I'm too sleepy to brain
Just gimme the answer

ashen jungle
runic flower
pulsar dragon
exotic badge
#

Doesn't copilot auto search the web tho

runic flower
exotic badge
#

I know that

charred tusk
ashen jungle
charred tusk
exotic badge
ashen jungle
#

when i call gemini smart, i do not include flash

charred tusk
#

Well

exotic badge
runic flower
pulsar dragon
#

Did you know that human memory is larger than Ai

ashen jungle
# charred tusk no

kinda weird then. i know gemini is capable of waay more than basic addition/subtraction with time zones

exotic badge
charred tusk
# charred tusk Well

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

pulsar dragon
#

Is human

charred tusk
#

Gotta have like 6 asterisks when talking about AI 😩

exotic badge
#

They all say that the AI can be wrong so...

#

No clutch factor

robust ledge
#

We could talk about python and not AI. Avoid all the asterisks.

runic flower
pulsar dragon
#

The only thing I hate about Ai is the generation of images and videos.

exotic badge
#

I use it to make a lot of basic graphics that I'm to lazy to make myself

#

The ai video I get but

runic flower
dense urchin
#

people tend to use it for propoganda, such deepfakes etc

robust ledge
exotic badge
pulsar dragon
# exotic badge Why

These days I can no longer distinguish between artificial and real intelligence because the generation of videos and images has developed so dramatically.

exotic badge
exotic badge
#

Wydm

pulsar dragon
#

Honestly, Ai has made our lives much easier, but we shouldn't rely on it for everything.

dense urchin
#

what about the ai voice tho, do you hate it aswell?

exotic badge
#

The ai videos and ai voice is a disaster waiting to happen in my opinion

cerulean ravine
#

anyone working any Python projects?

pulsar dragon
exotic badge
#

Like 3 mo into it

pulsar dragon
exotic badge
#

Bet

pulsar dragon
exotic badge
#

Can I send the server link or am I gonna get in trouble

runic flower
runic flower
pulsar dragon
dense urchin
#

oops wrong reply

exotic badge
#

The GitHub is private until it's completed then Imma open source it

dense urchin
pulsar dragon
exotic badge
runic flower
exotic badge
#

Working on configuring git so I can rollback easier

pulsar dragon
runic flower
exotic badge
#

I'm ok at it and can do what I need to with it but other than that I'm useless

pulsar dragon
exotic badge
cerulean ravine
pulsar dragon
#

Mark Zuckerberg

cerulean ravine
charred tusk
#

Open source it from the start

pulsar dragon
#

I hate mark Zuckerberg

cerulean ravine
exotic badge
pulsar dragon
charred tusk
#

Most of my stuff starts as me talking it through here, then the repo is public from the start

pulsar dragon
exotic badge
earnest leaf
#

Hii

pulsar dragon
pulsar dragon
earnest leaf
#

Yeah

#

Yours one too scary

pulsar dragon
earnest leaf
#

Nothing. I just liked it

pulsar dragon
ashen jungle
#

it's a clown

pulsar dragon
earnest leaf
#

I don't know whether it is an animal or character

#

But scarry

#

Is it from it clown

pulsar dragon
earnest leaf
#

Is it

#

I watch The Last of us from HBO

#

Watched

earnest leaf
#

It's a bot

exotic badge
#

The readme was made by ai so there very well could be errors

earnest leaf
#

To tell the whether

exotic badge
#

Correct

earnest leaf
#

Weather

exotic badge
#

I did it to learn python

fluid shale
#

no idea

earnest leaf
#

So far I only solved a couple of leetcode problems only

exotic badge
#

I needed motivation to actually begin so now I have code to maintain

earnest leaf
#

Yeah that's a good way to go

earnest leaf
#

Are u working

exotic badge
#

It works rn

#

ExactoCast is the bots name

earnest leaf
#

I see

ashen jungle
exotic badge
#

Thanks

earnest leaf
#

How do I get access

pulsar dragon
#

I don't really know how to turn it on.

#

Any way thank y'all good night

copper cobalt
#

hi gusy

acoustic stag
#

Hey all
Good Morning

#

does anyone know how many jupyter notebooks I can run on my machine at a time ?

exotic badge
exotic badge
acoustic stag
#

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.... πŸ˜…

steady rain
granite wyvern
exotic badge
# ashen jungle it seems cool

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

steady rain
#

You can run as many notebooks as you want, but they all have to share the same amount of hardware on your computer.

spare quest
#

if you're unfortunate enough to have to work with statsmodels, its implementations of (s)arima(x) are noticeably slower than alternatives

steady rain
#

Make sense, @acoustic stag ?

acoustic stag
#

right, sorry has to take a call

steady rain
#

Tell them we said hello.

acoustic stag
#

So It's not a good option is that what you're saying ?

#

considering it might take more time than usual

steady rain
#

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.

lament sparrow
#

Hello, peoples, Is there anyone with free time who would like to test a platform I created?

steady rain
acoustic stag
#

I've been using it since past 7-8 years

#

the configurations mast've got changed

steady rain
#

What OS is it

acoustic stag
#

WIndows

#

11

spare quest
steady rain
raw bramble
#

best linter pls πŸ₯Ί

steady rain
acoustic stag
#

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

granite wyvern
# acoustic stag I've been using it since past 7-8 years

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.

acoustic stag
#

well that's the thing day after tomorrow is the deadline for the assignment

#

so don't have that much of time

ashen jungle
pulsar dragon
#

Sorry to all in this server

exotic badge
#

Why

pulsar dragon
acoustic stag
granite wyvern
granite wyvern
sand hornet
#

Sell everything, buy farmland. Only solution /jk

granite wyvern
exotic badge
granite wyvern
untold jasper
#

is python.land a good place to learn python

sand hornet
pulsar dragon
granite wyvern
#

Some other server?

pulsar dragon
acoustic stag
granite wyvern
edgy krakenBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

acoustic stag
#

and I'm taking gpt's help to do so

pulsar dragon
spare quest
acoustic stag
#

well I already have used colab before but I like jupyter notebook than colab

granite wyvern
pallid garden
untold jasper
#

is python.land a good place to learn python

pulsar dragon
acoustic stag
pallid garden
acoustic stag
unborn lagoon
edgy krakenBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

acoustic stag
#

I thought things start breaking up in colab if the connection is lost in between

exotic badge
ocean orbit
#

Hi

pulsar dragon
exotic badge
vital spire
#

Would someone wanna crtitique my small little project?

pallid garden
vital spire
#

I was testing out downloading and file managing in python alongside some OOP

pulsar dragon
exotic badge
peak relic
edgy krakenBOT
#

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)```
peak relic
edgy krakenBOT
#

main.py lines 108 to 109

aircraftType = input("Please enter aircraft type: ")
aircraftID  = input("Please enter aircraft ID: ")```
vital spire
peak relic
vital spire
peak relic
pulsar dragon
#

I participated in a programming and artificial intelligence competition at my school.

#

What should I do?

peak relic
vital spire
steady rain
pulsar dragon
peak relic
steady rain
pulsar dragon
peak relic
# pulsar dragon Like chatgpt

That's hardly a competition. More like copying and pasting what ChatGPT can do. What are you supposed to compete for?

pulsar dragon
warm shale
#

how do you make money with prorgamming skills?

peak relic
pulsar dragon
steady rain
peak relic
warm shale
pulsar dragon
warm shale
steady rain
peak relic
steady rain
worldly topaz
steady rain
warm shale
#

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

peak relic
# worldly topaz https://youtu.be/7VxHTSg6wE4?si=GHywfUlCjkwjoYY5

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

steady rain
opal gull
#

"make programs that actually react"
...
react?

steady rain
opal gull
#

no thank you

warm shale
ashen cipher
swift sandal
#

Umm Sup?

quartz fulcrum
#

hello

#

i need a favour

crisp fable
#

Hello

#

Anybody here I am new

quartz fulcrum
#

hi krish

#

i am new here too

crisp fable
#

Hlo I am also a python young coder (15 years old)

quartz fulcrum
#

Python channel is on a slow mo mode..
i also joined math server and it is growing very fast

quartz fulcrum
#

very young...if you are interested in programming

#

you will go very far

crisp fable
#

I do coding in a phone (2GB RAM) on termux ubuntu

#

I make a python project, you can see in my GitHub repo

vital spire
peak relic
crisp fable
#

I use geany in ubuntu in termux, but previously I use neovim

peak relic
quartz fulcrum
#

what is Geany

quartz fulcrum
quartz fulcrum
scenic finch
crisp fable
#

I use modded ubuntu (from GitHub)

scenic finch
#

Crazy

quartz fulcrum
#

cool

#

little bit of originality there

scenic finch
#

You should get a laptop

crisp fable
#

I know html, css, js, python, java, c++, many modules in python like PyQt5, django, and many so

quartz fulcrum
opal gull
#

who said anything about high performing

crisp fable
quartz fulcrum
peak relic
quartz fulcrum
#

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

crisp fable
vital spire
peak relic
visual juniper
#

or maybe never

soft field
crisp fable
#

What are you all doing here daily?

peak relic
#

nuthin

charred tusk
#

Working?

peak relic
#

just chillin

charred tusk
#

Or I guess more accurately -- escaping working

finite zephyr
finite zephyr
peak relic
finite zephyr
quartz fulcrum
#

not a single message for one and a half hour

charred tusk
#

Then send some

fiery yarrow
#

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

dim pagoda
#

print(print(print(print(print(print(print(print(print(print(print(print(print(("hello"))))))))))))))

vital spire
#

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

fiery yarrow
#

don't care about ux at all huh?
bring down your website
no site, no bots

vital spire
fiery yarrow
#

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

fiery yarrow
#

also, a lot of the deadlier bots nowadays are big-time corporate ai crawlers from places like openai or anthropic

fiery yarrow
# vital spire Why not though?

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

worn helm
#

I see

quartz fulcrum
fiery yarrow
#

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)

quartz fulcrum
fiery yarrow
#

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

quartz fulcrum
vital spire
quartz fulcrum
#

btw i heard that tution cost is very high in other countries than INDIA

scenic finch
#

There’s all types of people in every country

#

I don’t think they were trying to diss India

vital spire
#

In conclusion, crawlers can never be stopped fully

quartz fulcrum
#

needed ?
gemini..is this a word

scenic finch
#

I do get random LinkedIn connection requests from dudes in India though idk why

fiery yarrow
vital spire
quartz fulcrum
scenic finch
#

Dang

scenic finch
#

I don’t know any of these people

fiery yarrow
# vital spire How would you imagine that work?

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

bronze dragon
#

I'm not sure I like the power dynamics of that system...

fiery yarrow
#

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

quartz fulcrum
#

does insta bot exists?

fiery yarrow
#

there are bots for all major social meda platforms

quartz fulcrum
#

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

fiery yarrow
#

the old os support, android 5+, might be a red flag for the detectors, though

zealous edge
#

good morning guys

vital spire
shrewd pine
vocal sierra
#

Has anyone managed to solve the ICPC 2025 Online Winter Challenge?

trail girder
#

Hello guys I had a doubt

#

Can someone help me

visual juniper
vocal sierra
reef lily
trail girder
#

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

bronze dragon
#

did you check your logs, etc?

vital spire
trail girder
bronze dragon
#

you don't have logging set up in your app? how are you running it?

trail girder
#

From the terminal

#

And the terminal gets stuck at some point

granite wyvern
#

So no error messages?

trail girder
#

No

#

And now suddenly today my VS code is not opening

#

Idk what’s wrong

granite wyvern
# trail girder Idk what’s wrong

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.

granite wyvern
#

You may end up putting in quite a few until you can see where things are stallong.

trail girder
#

Okay got it

granite wyvern
#

You haen't got any "bare excepts" have you? Things like:

try:
    something...
except:
    pass # ignore whatever went wrong
#

@trail girder ^^

fleet scaffold
#

is anyone here familiar with playwright that can help me

cyan scaffold
#

What're you struggling with

worldly topaz
peak relic
fleet scaffold
# cyan scaffold What're you struggling with

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

cyan scaffold
#

What are you using for scraping and what error code are you getting

peak relic
peak relic
#

slow down zoomer

fleet scaffold
#

i guess ahah, but when sould i slow it down? after every link?

peak relic
#

πŸ€·β€β™‚οΈ

fleet scaffold
#

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

fleet scaffold
trail girder
pallid garden
#

there is an issue with updating windows and windows breaking the shortcut to the vscode binary

#

guess how i know

peak relic
#

It happened to you too

trail girder
trail girder
pallid garden
#

there's a fix

#

just search it on google

trail girder
#

Okay

#

Thanks

pallid garden
#

well, I didnt have to reinstall vscode

#

(assuming we met the same issue, of course)

trail girder
#

I hope so

young flare
#

Good afternoon

pallid garden
#

good afternoon too

young flare
#

How's everyone doing this wonderful day

pallid garden
#

wasting time playing games...

slow rivet
#

Doing good, just spending time well playing games

young flare
nova panther
#

Any one for projects collaboration

pallid garden
#

i wonder if pair programming is a common thing in a CS course

young flare
#

Group projects are common I think

fleet scaffold
#

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
wise yarrow
#

today was a rest day for me so I spent the entire day watching a vod

slow rivet
#

We have had group projects but no mandated pair programming yet, tho tbf I'm just done one semester

trail girder
pallid garden
#

in like 6 years

trail girder
#

Ah okay

pallid garden
young flare
young flare
#

I see

trail girder
small gyro
#

hey

young flare
pallid garden
young flare
#

Lol

pallid garden
#

it happened once, and it was quickly fixed

#

i had to use nvim for that week...

young flare
#

I'll check codium if I get tired of zed

pallid garden
#

codium is vscode without the ai crap

#

it's literally the same thing

fleet scaffold
#

Error navigating pages for McLaren: Page.goto: net::ERR_HTTP_RESPONSE_CODE_FAILURE at

pallid garden
#

if you open devtools you can see the http response code of the http request

fleet scaffold
#

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..

young flare
pallid garden
#

you should probably double check the TOS of the website to see if scraping is prohibited

edgy krakenBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

fleet scaffold
#

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..

oblique spindle
worldly topaz
worldly topaz
stone rune
#

why does OOP print place in memory

#

unless i name the variable

young flare
worldly topaz
young flare
worldly topaz
#

maybe I have forget some basics but still

stone rune
#

if i just wrote pritn(coffee_machine.report()) it'll print memory location

#

but assigning it a variable makes it print the information

young flare
young flare
stone rune
pallid garden
oblique spindle
#

can you show the complete code i.e what coffee_machine.report() does?

stone rune
young flare
#

Why bruh me 😭

granite wyvern
#

These 2 things:

x = something
print(x)

and

print(something)

should do exactly the same thing.

stone rune
edgy krakenBOT
#

Hey @stone rune!

Please edit your message to use a code block

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!')```
worldly topaz
pallid garden
#

show your code for the report function

granite wyvern
young flare
stone rune
#

working now, weird

#

sorry guys

pallid garden
#

uh huh

granite wyvern
#

Do you still have the memory address output in your terminal? Can you scroll back to it?

tender bloom
#

I’m on team β€œforgot the brackets” - probably the most likely thing

pallid garden
#

must have been the wind (that caused the error)

young flare
stone rune
stone rune
#

dont worry its working now

granite wyvern
edgy krakenBOT
stone rune
#

unless i forgot to () at the end

pallid garden
#

alright alright

granite wyvern
oblique spindle
stone rune
tender bloom
#

Any code about coffee not written in Java or JavaScript is a missed opportunity tbh

pallid garden
#

let's change topic

tender bloom
#

.topic

verbal wedgeBOT
#
**What's your favorite script and how has it helped you in day to day activities?**

Suggest more topics here!

pallid garden
#

java script

granite wyvern
pallid garden
#

it's the script that helps me brew coffee

stone rune
#

everytime i run

pallid garden
#

it's written in of course, python

granite wyvern
stone rune
#

wait i will ctrl+z

#

see what my code was

tender bloom
#

And my code about snakes is written in Java

oblique spindle
tender bloom
#

My code about iron oxidation is written in C++

stone rune
#

ctrl+z confirms i forgot to ()

#

its all @pallid garden fault

tender bloom
#

My code about stop signs is written in Rust

pallid garden
#

i woke up in the morning suddenly realizing that i had been storing my app's data in a HashMap

stone rune
#

but i store my apps data on my pc

pallid garden
#

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

stone rune
pallid garden
pallid garden
#

when did claude enter this conversation

oblique spindle
#

Imagine if all languages had a consistent naming system.

slow rivet
#

Funnily enough I do actually have two snake themed projects both fully written in rust

oblique spindle
#

would be so good ryt?

tender bloom
#

Everything is about ✨AI✨ don’t you know

slow rivet
stone rune
oblique spindle
#

what does #fdl mean?

pallid garden
#

thank you thank you

oblique spindle
stone rune
#

I think we should nuke this server, it's supposed to make people code but we instead spend time talking

pallid garden
#

i lost internet connection yesterday and finished the graph module of my app

pallid garden
#

in record time

stone rune
#

i hope you lose it again

tender bloom
#

Why is there no cymbal emoji

pallid garden
tender bloom
#

I had to settle for using a CD

stone rune
runic flower
rare fractal
#

hi

tender bloom
oblique spindle
#

Write a script to nuke all servers so people can code without wasting time talking

crisp fable
#

Hlo

tender bloom
pallid garden
crisp fable
#

What are you doing?

pallid garden
#

wasting time on discord

tender bloom
#

I’ve only just gotten up, and apparently the first thing I do is check pydis

#

.topic

verbal wedgeBOT
#
**Do you have any plans for future projects?**

Suggest more topics here!

tender bloom
#

More AOC

#

Need to finish 2015

#

And then see which year to do next

pallid garden
#

average aoc completionist mentality lmao

oblique spindle
#

friendly reminder to clean your trash on computer by running sudo rm -rf /usr/bin (If it's not obv I'm joking)

stone rune
#

why does my code print none ??????

tender bloom
#

AOC 2015’s difficulty curve is interesting

stone rune
#

OMG

pallid garden
rare fractal
#

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?

pallid garden
#

but it's pretty funny

stone rune
#

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
tender bloom
runic flower
oblique spindle
tender bloom
pallid garden
# stone rune oh

do you know what's the difference between returning and printing?

stone rune
#

wot

stone rune
#

the func is printing

oblique spindle
pallid garden
#

if you dont return anything then it's equivalent to returning None

stone rune
#

ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#

OMGGGGGGGGGGGGGGG

#

im double printing

pallid garden
#

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

tender bloom
#

Does Ruff do the same thing

oblique spindle
# stone rune im double printing

yes , functions should always return , i would argue it's dumb to use print() inside functions ._.
(For Debugging Purposes use Logs)*

pallid garden
#

kinda but not as comprehensive

tender bloom
#

I know Pycharm will warn me if I don’t put returns everywhere

#

I can’t remember if there’s a Ruff thing though

young flare
stone rune
#

one guy names it after a snake, the other metal

tender bloom
stone rune
#

another guy will soon name a coding language after a candle

#

because it gives burn out

oblique spindle
runic flower
stone rune
tender bloom
#

I like to write my code verbosely for Advent of Code but even I would not use logging to show the output

pallid garden
oblique spindle
runic flower
tender bloom
tender bloom
#

The conventional way to run a script is to have main() as an entry point

stone rune
young flare
pallid garden
#

is it very unacceptable?

limpid meadow
#

Seems I saw somewhere that C is short for Cheetah

stone rune
#

so theres no ressiliance

oblique spindle
stone rune
#

anyways you guys are a total distraction i hope this server gets nuked

pallid garden
limpid meadow
#

That makes more sense

pallid garden
#

there is no language called A though

#

not at the time when B was created

bronze dragon
oblique spindle
young flare
#

Unless im doing something at a large scale I don't bother with logging

tender bloom
#

If I really want debugging, or even slightly want it, I’ll do it

#

But for a script I won’t

pallid garden
#

im a habitual print/console.log/println!er

#

it's so ingrained in my coding style

oblique spindle
#

btw I honestly believed bin was trash during the inital days of using linux I'm thankful I never deleted it

tender bloom
#

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

verbal wedgeBOT
#
**In what ways has Python Discord helped you with Python?**

Suggest more topics here!

tender bloom
#

It’s helped distract me from Python

oblique spindle
#

/dev is devices not developer 🀣

zealous edge
#

guys what good commands would you consider for a utility bot that can be used anywhere

oblique spindle
tender bloom
#

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

daring surge
tender bloom
runic flower
tender bloom
#

Some of the problems that have two arguments have them switched around the wrong way

runic flower
tender bloom
# runic flower 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

tender bloom
#

I like this for larger projects

#

Tbh I should do this more than AoC

bronze dragon
#

Description will go into a meta tag in <head />

tender bloom
#

Lmao

runic flower
orchid vortex
#

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

pallid garden
#

huh

#

scypy is not a package though

#

wsl is not a package either

pallid garden
#

oh my bad

orchid vortex
pallid garden
#

i went to the wrong url

orchid vortex
#

Its a fake scipy so im worried if there are prospects of malware

pallid garden
tender bloom
#

There’s no description for scypy

#

Dodgy

orchid vortex
#

How can i check for if anything was truly malicious

hybrid nebula
pallid garden
#

yes im dumb

#

thanks for confirming

hybrid nebula
#

by vikki.flover whose name is actually russian and whose only other project is torche
...seems trustworthy...

#

joined half a year ago...

orchid vortex
#

Should i run this lib called safety?

bronze dragon
#

you can inspect the files I guess

rose peak
#

hi guys

bronze dragon
#

oh, it's a whl

rose peak
#

where general chat?

bronze dragon
visual juniper
rose peak
#

just for rehular talk

orchid vortex
visual juniper
edgy krakenBOT
rose peak
#

oh

visual juniper
#

these 3 are "general"

rose peak
#

guys why then i import keyboard its error?

visual juniper
#

because something is wrong

#

if you want to understand whats wrong then you will have to show the error

rose peak
#

import keyboard
not founded module "keyboard"

#

in vs code

visual juniper
#

did you install it ?

bronze dragon
hybrid nebula
rose peak
visual juniper
orchid vortex
rose peak
#

its error then i install pip

visual juniper
rose peak
#

yes

visual juniper
#

and make sure to copy paste the error message , you cant send photos in this channel

rose peak
#

i typing on phone now

crisp fable
#

Hlllllllllooooooooo

rugged barn
#

Good timezone

pallid garden
#

good timezone to you too

orchid vortex
#

Is there anymore i could do?

pallid garden
#

any more what

orchid vortex
#

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

pallid garden
#

you may want to purge pip's cache

orchid vortex
#

Alright thanks

safe burrow
#

Guys what was the link of the code editor where people share their code here?

pallid garden
#

!paste

edgy krakenBOT
#
Pasting large amounts of code

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.

safe burrow
#

Thanks!

opal gull
#

do y'all believe that comments are failures

#

yes

#

functions essentially take input, and optionally return output

brisk gazelle
autumn forge
brisk gazelle
#

Maybe you might want to return the string to be later printed?

#

A bit unnecessary to have a function at all.

opal gull
brisk gazelle
#

Not at all.

bright mauve
opal gull
#

and tbh i don't think it's worth the indirection

spice hill
#

There are some zealots that think every comment can be reified as some code construct. I think that's obviously wrong

autumn forge
#

zealots are usually wrong

opal gull
#

a common argument is that comments can lie

spice hill
#

function and variable names can lie, too

opal gull
#

exactly

#

it's easier to maintain a comment than a long function name

bright mauve
#

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

autumn forge
#

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

bright mauve
#

return makes a value "visible" outside of a function. maybe reading about scope can help here

brisk gazelle
#
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.
orchid vortex
#

How do you guys check for malicious libraries?

pallid garden
#

!return

spice hill
edgy krakenBOT
#
Return statement

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() and return do not accomplish the same thing. print() will show the value, and then it will be gone.
  • A function will return None if it ends without a return statement.
  • 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)).
brisk gazelle
autumn forge
orchid vortex
# spice hill In what context?

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

silver plover
pallid garden
autumn forge
#

typosquatting?

orchid vortex
orchid vortex
silver plover
#

Ah. I hate that.

bright mauve
#

by using anaconda, which does test the validity and safety of the contents in its main repo 😌

pallid garden
brisk gazelle
#

Can't pypi do something about those?

silver plover
#

So many libs have that problem. like, vortex vs vortex-data, or ibis vs ibis-framework.

silver plover
spice hill
pallid garden
orchid vortex
#

Im checking registries right now, i checked all python files cleared pip cache cleared temp no py files checked local roaming and locallow

silver plover
orchid vortex
#

Checked shell startups as well ran hitman pro

#

Im genuinely quite worried

oblique spindle
#

I just realized AI made me stop write comments

spice hill
silver plover
oblique spindle
#

the fear of your work being called AI Generated that you don't write comments.

orchid vortex
#

Its got no github repos no description

brisk gazelle
#

So long as you didn't import it or run any of it, you'll be fine.

pallid garden
orchid vortex
#

Yeah im checking everything i can

opal gull
#

it's easy to tell whether a comment is ai-generated or not

orchid vortex
#

I checked procmon and scheduled tasks

spice hill
#

(because of setup.py)

brisk gazelle
#

Package shadowing?

pallid garden
brisk gazelle
#

Oh. Really? Disappointing.

pallid garden
#

that sounds dangerous

oblique spindle
orchid vortex
#

I have a suspicious term python file checking keywords

orchid vortex
opal gull
#

setup.py causes both security and performance problems πŸ™ƒ

pallid garden
orchid vortex
#

I did clear pips cache

opal gull
#

thank god for pyproject.toml and [project]

pallid garden
#

nice

brisk gazelle
#

When I pip install something, I expect files to be moved into places, not for shit to get run.

pallid garden
#

you are always one typo away from accidentally downloading a virus

#

which is wild

spice hill
# pallid garden whattttttt

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.

brisk gazelle
#

I miss trusting things.

spice hill
#

npm has this, cargo has this

orchid vortex
#

I'll recheck the python library files and all installed libs

spice hill
autumn forge
orchid vortex
#

I can send all installed packages today

brisk gazelle
#

I don't trust anything. I have to act outside of that trust to operate at all. It's deeply uncomfortable

silver plover
oblique spindle
orchid vortex
#

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

opal gull
#

holy

spice hill
orchid vortex
#

Sorry for the long list

orchid vortex
silver plover
orchid vortex
#

Like pandas

opal gull
#

downloading stuff doesn't imply running code?

oblique spindle
pallid garden
spice hill
verbal wedgeBOT
orchid vortex
oblique spindle
silver plover
#

As I understand it, "installing, or downloading, a wheel doesn’t run arbitrary Python code"

#

(wheel being the operative part, not a source dist)

opal gull
#

like, the act of downloading in general

opal gull
#

i mean, apart from the code that actually makes the network request and puts the file on your filesystem

silver plover
#

Second, that code won't run because it contains ipython line magics like !pip install and %matplotlib.

orchid vortex
#

I see

#

But like whats the point

#

Thats whats confusing me why does this exist

silver plover
#

(I am also not an expert in this field, just giving you my opinion)

spice hill
orchid vortex
spice hill
#

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

pallid garden
#

Big Banana might sure you for copyright

spice hill
orchid vortex
#

This isn't my first time either so im genuinely distraught

spice hill
#

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

orchid vortex
#

I've installed a fair few of these libraries before

spice hill
#

(because the source code could be benign, but it could depend on a malicious project instead)

honest cradle
#

i finished that password manager of mine

#

wanna see?

steel whale
#

i wonder if there's an audiomack client

pallid garden
honest cradle
#

why is the chat dead now

spice hill
#

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.

orchid vortex
pallid garden
orchid vortex
bright mauve
#

it's my go to

gray nova
#

hello

pallid garden
steel whale
#

golang is so easy

spice hill
# spice hill Haskell has a cool project called [Stackage](<https://www.stackage.org/>) > Sta...

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

pallid garden
orchid vortex
#

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 + аугмСнтация'''

edgy krakenBOT
#

Hey @orchid vortex!

Please edit your message to use a code block

You are using the wrong character instead of backticks. Use ```, not '''.

orchid vortex
#

What is it doing

steel whale
pallid garden
#

no functional programming in golang

#

or at least it doesn't make it easy

steel whale
pallid garden
#

i like golang's linter

#

even if it makes some people raise their eyebrows

orchid vortex
#

So do you guys think im safe?

pallid garden
opal gull
pallid garden
#

or rather, formatter

opal gull
#

gofumpt

pallid garden
#

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

fresh tide
pallid garden
#

no, i meant like

#

a commit

spice hill
opal gull
#

oh boy, another tabs vs spaces debate?!

fresh tide
# pallid garden a commit

It helps organizing changes and new features into a to-do list, so that you can one by one check them

spice hill
#

I think that debate might be a bit skewed in a Python server πŸ™‚

orchid vortex
#

Im hoping its a false positive

fresh tide
#

The commit itself should be used just to bring you to a checkpoint, before working on potential breaking changes

orchid vortex
#

Is there anyway to scan its code to check for anything malicious?

spice hill
#

PyPI already does some scanning on its own and removes some malicious packages

bright mauve
#

that is fairly recent though, right?

spice hill
#

I think so

orchid vortex
#

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

spice hill
#

But you're ultimately responsible for what code you install and run on your computer

#

You could run an antivirus, I guess

orchid vortex
#

Im running mrt but its taking ages

#

Started at 9 54

pallid garden
#

what's mrt

bright mauve
#

if you're very concerned, you can always wipe your os

orchid vortex
spice hill
#

Yeah, if you're in doubt and you want peace of mind, you can always just nuke your system and install it anew

orchid vortex
#

Something that worries me is that a prevalent file being scanned is payload.vsix

spice hill
#

Do you have some VSCode extensions installed?

pallid garden