#python-discussion

1 messages Β· Page 76 of 1

naive canopy
#

lets say you generate energy by burning coal

#

or lets say or by solar power

vague zephyr
visual juniper
#

and you want to solve it by putting the data center in the space ? pithink

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

visual juniper
#

automate the boring stuff with python in particular is a good free ebook

naive canopy
#

i do resist this idea myself

#

@steady rain i know you definitely have more knowledge than me so do you feel any approach which could improve data storage in like 10 years

#

i mean like the way of looking to the problem

visual juniper
#

biological data storage >

steady rain
wise yarrow
#

something like this but rescaled?

naive canopy
visual juniper
naive canopy
#

like some startup was working on storing data or encrypting in the form of dna sequences so yes like it has great potential in increasing storage size

#

but reading or compute is slower

visual juniper
#

its just a fart in the wind at this point tho , im not sure how promising it is in the next 10 years

naive canopy
#

yes

#

man no cap but i feel what would happen to quantum computing

#

i wanted to learn but like its too hectic i feel it looks interesting but a lot of consistency is required

visual juniper
#

i dont understand what quantum computing does rn to guess what it would do if it had more storage

#

but i have heard the bottle neck in quantum computing isnt data but making a big enough CPU with enough error corrected qbits

naive canopy
#

yes

#

actually yes

#

quantum error correction is the problem

visual juniper
#

anyways, im out

naive canopy
#

ok

dusk oriole
naive canopy
#

man i am asking myself

silver plover
charred siren
#

idk anything about this but they're doing research with dna data storage

lost lagoon
silver plover
#

We've been promised holographic storage for decades

naive canopy
#

look research scope is infinite

visual juniper
#

what even is holographic storage πŸ’€

naive canopy
#

idk

lost lagoon
#

on which contex

visual juniper
#

sounds like a pyramid scheme name for storage

lost lagoon
#

real lol

charred siren
naive canopy
#

nvm changing the topic of the convo

#

any project one can work on regarding mathematic or physics

silver plover
#

Neurram and some of the approximate cpu architecures are really interesting: where if you trade precision for approximate accuracy, you can 'unlock' different performance profiles

visual juniper
naive canopy
#

you are right but i mean like which simplifies some specific hardship so it has more scope or reach

mossy sigil
#

@naive canopy how's it going homie

naive canopy
#

good man

mossy sigil
#

doing AOC?

naive canopy
#

did 1 day then had exams

mossy sigil
#

ahh

visual juniper
#

maybe some sort of visualizer 🀷

naive canopy
#

i have built a collatz based application

#

sorry i meant

#

collatz visualiser

#

but man i like want to offer a service

spring minnow
visual juniper
#

most of the popular things and apps originate from a problem founder personally experienced and is trying to solve

naive canopy
#

there should be scope

#

i want my time to be utilised in helping people or even offering some fun service

waxen cave
visual juniper
#

voulenteering is pretty helpful

naive canopy
#

its literally everywhere

naive canopy
#

like something which people suffer in mathematics or physics and its not yet been made easy]

#

and we can make it easier by offering a service

young flare
#

i was working on a library putting together a bunch of noise functions

naive canopy
#

look for example pandas was a great library then came polars faster more efficient more scalable
like we build a better solution than existing

visual juniper
#

there isnt a good game engine for python , you can maybe look into that , will involve tons and tons of maths and physics

naive canopy
#

then ?

young flare
#

still working on it

naive canopy
visual juniper
#

like unity , but with python

naive canopy
#

i understand

visual juniper
#

but you dont like the idea ?

naive canopy
#

man but this is not a one man project

visual juniper
#

its not , but you can start and see where it goes

naive canopy
visual juniper
#

why do you want to make something in a month that is never done before and will help a lot of people

charred siren
naive canopy
#

ye

#

yes

charred siren
#

you mentioned the word "service" like 4 times tho which i thought was funny

visual juniper
#

xd

#

try to contribute to existing open source projects

stray field
charred siren
#

for hobby projects, nobody woke up one day and decided to make these tools, they make it usually because they need a tool to solve some personal hardship

stray field
#

the SQL also included materialized views, so I also kind of cheated by caching

naive canopy
#

man actually i am myself troubled a lot
my main motivation came from dwsim which is a open source simulation software
now i am learning pyqt so like i am planning to build something not that rigid but helpful

visual juniper
charred siren
#

yea and they get nailed to the metaphorical cross by the people that enjoy their work enough

#

oss core dev crisis is a phenomenon and it's always so explosive

naive canopy
#

what

neat pawn
#

Why is my selenium headless mode opening browser ?

#

Is it normal ?

charred siren
naive canopy
#

idk

visual juniper
neat pawn
tribal sierra
#

hi

cerulean ravine
charred siren
#

nedbat dropping wisdom πŸ—£οΈ πŸ”₯

visual juniper
naive canopy
#

no cap

neat pawn
tribal sierra
#

i read the rules

#

anything else i should know?

neat pawn
edgy krakenBOT
#

Hey @neat pawn!

Please edit your message to use a code block

Add a py after the three backticks.

```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
neat pawn
#

@visual juniper Do you see ?

naive canopy
#

#Use this

tribal sierra
#

better call saul

naive canopy
#

better call saul

visual juniper
naive canopy
#

Man what if we build a wiki or fandom based site ?

#

good idea ??

pastel sluice
#

None of the issues I have ever seen with such sites have been technological, though

visual juniper
pastel sluice
#

they have always been about curation - audience, participants, and content - and that's a community-building problem and not a tech problem

visual juniper
#

crypto scam , nice

naive canopy
#

ik

#

great images are not visible

charred siren
#

are these people whose accounts have been compromised?

unborn lagoon
#

<@&831776746206265384> ducky_concerned

naive canopy
#

yes i feel now yes

#

surely compromised

charred siren
#

or just bots planted ages ago lol who knows

visual juniper
#

πŸ’€
raid is approaching

unborn lagoon
swift sparrow
#

!compban 198596235395858432

edgy krakenBOT
#

:incoming_envelope: :ok_hand: applied ban to @lapis marsh until <t:1765553414:f> (4 days).

naive canopy
#

dont say that typa shit man

swift sparrow
#

!compban 1290814900859572339

edgy krakenBOT
#

:incoming_envelope: :ok_hand: applied ban to @granite bramble until <t:1765553432:f> (4 days).

naive canopy
#

sir we have safety right

charred siren
#

2 at once is so funny

visual juniper
#

wont they expire after so long

sand hornet
charred siren
hasty island
frozen narwhal
#

I made a ransom ware BUT FOR MYSELF ONLY NO ONE else, also it just shutdowns ur pc but in a like idk how do I explain

harsh swallow
sand hornet
#

And I told them about this in 2019, explicitly defining the issue before it was a big big issue

harsh swallow
sand hornet
frozen narwhal
#

I called it ransomware bcs I put the troll massege as "deleting system 32"

#

lol

sand hornet
#

Just encrypt all user data and offer to decrypt it at a price tag, then it's ransomware

harsh swallow
#

I remember at some workshop during science camp we decided to do the last man standing game and we were shutting off other people's computer via ssh

sand hornet
#

Otherwise best I've got is adware/malware/trollware

frozen narwhal
harsh swallow
charred siren
frozen narwhal
harsh swallow
charred siren
frozen narwhal
#

add authentication I guess

sand hornet
# frozen narwhal oh what's adware I never heard of it?

usually just spams ads, it's like installing 30 toolbars for random search engines you've never heard of to your browser. Or like Clippy is technically adware but bro can be converted to malware and spyware pretty easily

frozen narwhal
# charred siren ?

if ur trying to like log out or anything deactivate it if ur tokens are stolen

harsh swallow
frozen narwhal
#

so it's like trying to watch a 1 hour video on yt and it shows adds every 15 mins

sand hornet
frozen narwhal
#

also do NOT add authentication to ur main email bcs u wont be able to log in if ur out of it

charred siren
#

i mean if my account was ever compromised i would change my password and 2fa, it's no biggie. i just wish they had like a common feature to just log out of all sessions

frozen narwhal
#

or if ur phone breaks and it needs repair so..

charred siren
#

but like the only way your account gets compromised is if u install and run some sketchy app lol

vestal reef
sand hornet
frozen narwhal
charred siren
frozen narwhal
#

yes but it'll take a while

charred siren
#

?

sand hornet
charred siren
frozen narwhal
frozen narwhal
sand hornet
frozen narwhal
#

no one gets it :/.

charred siren
#

but 2fa codes are not a strictly mobile device procedure

sand hornet
#

Finished my half a cup of half caf, and now I just wanna be able to focus πŸ™

honest bay
#

Can anyone find debugpy.2023.XXX vsix file for me?
I've searched all over the internet but can't find it

frozen narwhal
#

so I can use it on pc??

#

I couldn't find one wdym?

sand hornet
#

vsix cat_toungue_funny

#

Also, search term python vsix 2023 did prove to get some results

dry garden
#

I ve been debugging for 3 hours and I got absolutely no where, my mind is burning rn

charred siren
#

lol

wheat remnant
#

i love python

cyan wolf
wheat remnant
cyan wolf
#

not sure

north pilot
#

Anyone know anything about Telnet communication?

#

im making a honeypot for Telnet scanners but ive come into a problem where they disconnect before they bruteforce my login page

#

if this is against TOS in anyway please lmk and ill delete my msg asap

inland karma
#

i have done that in the past, but it is for sure not something we will discuss here, it is information someone with mallisious intent can take and missuse

cyan wolf
#

Is telnet still used or attacked

frosty oriole
#

telnet in the big 25

dull dune
#

you're seeing port scans, they're just trying to find available/open services

acoustic tartan
#

So i know how to do OOP in python but when/why would you?

dull dune
#

when it makes sense

#

for example: when you have several pieces of related data and some functionality taht specifically applies to that data

ancient sequoia
#

we need college courses on sense-making

dull dune
#

I would argue that building software is an exercise in making a tiny sliver of the world make sense

ancient sequoia
#

and it's so subtle

ashen cipher
#

twenny five

dull dune
#

but: there's a tendency to over-apply OOP, so try to consciously question it everytime you go to write a class. it's a good tool, ti's widely useful, but not everything should be a class/object

#

oh, and also prefer composition over inheritance

north pilot
ancient sequoia
#

@acoustic tartan as @dull dune said, if you can observe a common pattern (stable over multiple uses) it's worth trying to make it an interface and then each use becomes a class implementing it with its own specificity

dull dune
#

^ I think that's a bit too broad, and could also apply to a function

#

you see repetition, the question is what's the right way to abstract it

dull dune
#

"I often want to hit this API endpoint to get data for a list of products", cool, that sounds like a function.

"I often want to hit this API to get data for a list of products, but the API requires that I first hit an auth endpoint to get a token, and then send that token wtih each subsequent erquest" could be a good use for a class, as it has tightly-coupled data (the token and wether or not you've authenticated already) and functionality tightly coupled to that data (you ahve to send the token wtih each request, and autehnticate if you haven't already)

#

now, you could also solve that with just a function!

#

but that's the joy of building software: the interesting problems don't have one clear answer

acoustic tartan
#

Ok ok i definitely get it better

#

Not fully but i think ill fuck around with it a bit and see whats up

#

Thank you very muchπŸ™

dull dune
#

yeah, it's an experience thing. keep at it, the choice will become clearer over time

acoustic tartan
#

Awesome thanks again!

sand jewel
#

Does anyone has SMPS 😭 i need it

cyan wolf
#

Are you building pc

pastel sluice
sand jewel
cyan wolf
#

Ac to dc

#

Converter power supply

sand jewel
#

I am building pc i don't have SMPS

pastel sluice
#

!offtopic you might want to ask in a more relevant forum.

edgy krakenBOT
viscid hinge
#

morning coders

cyan wolf
#

Going to sleep coders

sand jewel
dusty mountain
#

Helloo

sand jewel
#

Hola

viscid hinge
sand jewel
viscid hinge
#

games night nice

sand jewel
iron vector
#

Hi everyone πŸ™‚

sand jewel
iron vector
#

SMPS?

sand jewel
edgy fractal
#

what is an easy to use drawing library for python?
i have heard of pygame and raylib but have no experience with either of them

sand jewel
#

I ineed

iron vector
frosty oriole
#

that too

iron vector
sand jewel
pastel sluice
viscid hinge
cyan wolf
viscid hinge
edgy fractal
pastel sluice
cyan wolf
#

Isn't pillow for image processing

#

Does it allow drawing

pastel sluice
cyan wolf
#

Oo

pastel sluice
#

also:

edgy fractal
#

i want it to be intaractive too
like you press a button and a new node get added to tree

pastel sluice
#

ok, that's much more complicated.

inland karma
#

sounds like something you would have to make yourself

edgy fractal
#

but which one of these libraries you guys mentioned can help me with that?
pygame i assume?

pastel sluice
#

something like pygame would be a must for interactivity

edgy fractal
#

what about turtle ?

viscid hinge
#

what about turtle head

pastel sluice
#

I don't think turtle would give you the interactivity you want

cyan wolf
charred siren
#

i didn't know turtle could actually accept input but it doesn't seem very expansive lol

cyan wolf
#

But since you asked python

viscid hinge
#

what are you trying to do? make a game?

cyan wolf
#

Pygame i think

charred siren
#

i mean it can capture keyboard and mouse events

#

which is probably all you need tbf, so my remark about it being limited is probably wrong

charred siren
#

godot for building a gui?

#

miiight be a little overkill

edgy fractal
#

speaking of all of these game engines
how about raylib ? i have heard its super easy to learn

gleaming knoll
#

raylib is good for drawing simple shapes yes, literally has DrawRectangle DrawCircle etc
though if you want to do something more involved it is basically opengl

viscid hinge
eager smelt
cyan wolf
viscid hinge
#

you can easily export and host on websites like itch

#

i acutally started learing gdscript first, then python after

eager smelt
#

apparently it's experimental in v4?

#

oh, v3 also supports exporting to HTML5

#

idk what the difference is though

grizzled stratus
#

I've been seeing more and more people talking about picking up Godot, honestly...

viscid hinge
viscid hinge
#

i have made lots of cool things with it

#

its so addictive.

grizzled stratus
#

It'd be nice to check it out. I've been working pretty much exclusively in data, so if it isn't a spreadsheet or a database, I basically haven't touched it yet.

eager smelt
grizzled stratus
#

But building an actual thing that people can interact with sounds like a lot of fun.

viscid hinge
viscid hinge
rigid sapphire
#

How is this Godot related to python pithink

daring surge
#

Thoughts on the glassworm attack?

viscid hinge
eager smelt
finite tree
rigid sapphire
#

Similar yeah

rigid sapphire
#

Maybe

viscid hinge
# rigid sapphire Not sure if I agree

from the docs
GDScript is a high-level, object-oriented, imperative, and gradually typed programming language built for Godot. It uses an indentation-based syntax similar to languages like Python. Its goal is to be optimized for and tightly integrated with Godot Engine, allowing great flexibility for content creation and integration.

rigid sapphire
#

It's still not python

grizzled stratus
#

I dunno man. There are some similarities with Python just based on what looks like semantic whitespace, but some of the function declarations and declaring variables with the var keyword almost makes it look like Python and JavaScript had a lovechild.

finite tree
#

That's like saying haskell is like python because it also uses indentation

daring surge
# finite tree what now?

If you are asking what's that, it's a malware using some private use area Unicode to hide the malicious code and it infected some extensions

viscid hinge
grizzled stratus
#

Fair.

daring surge
finite tree
rigid sapphire
#

So should we start discussing registers here

finite tree
dusty mountain
rigid sapphire
charred siren
daring surge
rugged star
rigid sapphire
finite tree
charred siren
#

be the joybait you want to see in the world guys

rigid sapphire
#

I was here to see comprehensions

mossy sigil
rigid sapphire
#

And I see ppl yap about Godot

#

+W+

daring surge
#

I don't know about how does that even work all I know it's just some special unicode that made the whole suspicious code into this ' ' and it infected some Vs code extensions

#

I have no idea how either

viscid hinge
#

yap yap

finite tree
#

very simple setting in all editors

#

just display whitespace

#

github has it on by default nowadays iirc

charred siren
rigid sapphire
#
            +    +
                !
               W
\+-----/.    \----+/
finite tree
#

!offtopic stop arguing about what goes and doesnt go here

edgy krakenBOT
viscid hinge
#

whats a good use case for t-strings?

finite tree
rigid sapphire
daring surge
finite tree
#

zero width spaces

viscid hinge
charred siren
daring surge
#

But just read that blog maybe you'll be able to get something I couldn't explain

finite tree
#

you can have functions to sanitise the user input before turning the tstring into an sql request

charred siren
#

you should stick to the safety provided by whatever sql library you're using

grizzled stratus
#

If you're looking to sanitize user input, libraries have their own functionality for that.

finite tree
charred siren
finite tree
#

from pep750:

As a result, incautious use of f-strings can lead to security vulnerabilities. For example, a user executing a SQL query with sqlite3 may be tempted to use an f-string to embed values into their SQL expression, which could lead to a SQL injection attack. Or, a developer building HTML may include unescaped user input in the string, leading to a cross-site scripting (XSS) vulnerability.

#

they're designed to make it easier to sanitise user inputs as the stuff you want to insert into the template can be sanitised seperately then turned into a string

silver plover
fair anchor
#

xkcd 327

charred siren
#

reinventing a pretty nice wheel

viscid hinge
#

i listened to a podcasst on them

charred siren
#

πŸ‘€

#

python podcast? please share

viscid hinge
#

its called talk python to me, lots of episodes

#

but there are a lot of python podcsats... The real python podcast is another good one

charred siren
#

huh

#

been a while since i even thought about podcasts tbf

#

esp after i got rid of spotify

#

thanks will look into it

viscid hinge
#

I HIGHLY RECOMMEND PODCAST ADDICT APP

#

sorry caps

charred siren
#

why are you yelling at me 😟

#

lol

frozen narwhal
#

WHAT

#

MY RANSOMWARE WAS GONNA DELETE MY SYSTEM 32

#

WHAT DID I SCRIPT GNG

#

and it told me "this file is dangerous"

#

wait.

bright shoal
frozen narwhal
#

I was dumb enough to put "deleting system 32" πŸ₯€βœŒοΈ

hasty island
#

and that kids, is why you should not try run malware outside a sandbox

frozen narwhal
#

dw I fixed it

#

it just shutdowns it now

#

spooky way tho

charred siren
#

0.2/10 bait

frozen narwhal
#

no

nocturne bluff
#

why does this return this

viscid hinge
#

my pc is my sandbox

#

fast and loose

hasty island
nocturne bluff
frozen narwhal
nocturne bluff
#

anyone can help really quickly

frozen narwhal
#

idk if I can help but lemme see

nocturne bluff
#

idk check the thread

sand jewel
#

I like python but I hate python

grizzled stratus
#

I think that's a normal response to any programming language, tbh.

sand jewel
charred siren
#

the urge to pull my hair out when i encounter cyclic imports

sand jewel
#

But I like the python language

visual juniper
sand jewel
grizzled stratus
#

The times I've done it, I've just moved the import itself to the function where I need it and that's seemed to get around most of it.

cerulean ravine
#

import the module instead of the items in the module

nocturne bluff
#

why does wmic need to be installed now in win11

#

what tf is this

charred siren
cerulean ravine
charred siren
delicate solar
#

Anyone able to quickly alpha test my VCS POC i made in a day?

#

i need someone good at breaking things

grizzled stratus
grizzled stratus
sand jewel
delicate solar
grizzled stratus
#

So the long and short of it is that we're allowing one thing to get fully loaded before we try to access. Therefore we get both modules and names, yeah?

#

Or rather we get the names within the module.

sand jewel
soft coral
sand jewel
soft coral
#

Just postponing importing the actual function until it's used

crystal carbon
#

hello guys

#

i wonder how python makes money

#

any ideas?

visual juniper
#

sponsers

cerulean ravine
crystal carbon
soft coral
#

Yeah alright makes sense. Cool nontheless

sand jewel
grizzled stratus
grizzled stratus
crystal carbon
#

yes

grizzled stratus
#

I think they get sponsored by corporations and then also donations.

#

Grants, etc.

buoyant jay
acoustic spear
#

yoooooo

buoyant jay
#

i will gbt it

crystal carbon
#

when i hack peoples money accounts using python, i will donate money to python as a thank oyu

charred siren
sand jewel
cerulean ravine
buoyant jay
grizzled stratus
#

Yeah I was gonna say it would be easiest to enforce that sort of convention at the beginning of a project rather than if you've got to refactor.

charred siren
sand jewel
crystal carbon
#

bro chill

#

i wont get caught

acoustic spear
sand jewel
#

On my phone

acoustic spear
buoyant jay
#

even on my laptop

acoustic spear
#

its cuz u cant send photo in here

#

and a gif counts as photo it think

buoyant jay
#

oooo i see

sand jewel
acoustic spear
visual juniper
#

only text and emojis can be sent by peasents

acoustic spear
sand jewel
viscid hinge
sand jewel
#

I am going to build a pcπŸ₯Ά

viscid hinge
#

nice, its like lego but even easier

visual juniper
#

more expensive

viscid hinge
#

and you can sweat on legos

#

not good to sweat on ram

sand jewel
#

Good night everybody πŸ˜ͺπŸ˜ͺ

hybrid elbow
#

Hello everyone πŸ€—πŸ‘‹

#

I am new here

harsh swallow
hybrid nebula
runic flower
hybrid nebula
#

how does ctypes deal with struct return types?

charred siren
fresh heath
#

I am a full-stack developer.

charred siren
brisk gazelle
#

What's a plauncher?

robust ledge
#

Obfustacted code and likely a token grabber.

brisk gazelle
#

Scandalous.

harsh swallow
#

Lib with one release, released as 1.6.3 only 4 days ago, by a new user... And by the description - doesn't do anything the person above claims
<@&831776746206265384> "ad" for a potentially malicious lib

brisk gazelle
#

Oh, right.

bright shoal
#

nice try

robust ledge
#

I can't verifiy and report it to pypi at the moment.

bright shoal
#
    author="MikeFrone",
    author_email="telnetlehaxor@proton.me",
#

always a good sign

gaunt badge
#

!cban 145919785211920384 distributing malware

gaunt badge
#

oh, right

jagged belfry
#

!purgeban 145919785211920384 malware

edgy krakenBOT
#

:incoming_envelope: :ok_hand: applied ban to @open cargo permanently.

gaunt badge
#

Petition to bring back !cban

jagged belfry
#

Someone logged into pypi to report the project?

visual juniper
#

he need to do the mod tutorial

bright shoal
bright shoal
jagged belfry
#

It really wasn't subtle tbh

bright shoal
#

yeah it isn't, hit our heuristics πŸ₯€

#

last time the threat actor was active they were dropping something called "Honey Stealer"

brisk gazelle
#

What a bother.

robust ledge
#

Poor poohbear

bright shoal
fervent matrix
harsh swallow
#

Because someone confused compban with cban

gaunt badge
robust ledge
#

when non staff know the commands faster than staff yarrSip

fervent matrix
harsh swallow
#

Time to learn to use pban. Purge

robust ledge
#

mmm, peanutbutter ban

fervent matrix
#

.topic

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

Suggest more topics here!

harsh anchor
#

perforce is terrible

fervent matrix
frail stirrup
#

i just am trying to crawl out of tutorial hell

#

but i cant really learn by errors if i dont know how to make the errors to begin with

harsh anchor
#

what have you made so far?

charred tusk
worn moth
robust ledge
# verbal wedge

I've got that cli for the writing progress tracking app I use that I need to write for November ~~'25. ~~ '26.

fervent matrix
frail stirrup
harsh anchor
#

Java is great

frail stirrup
#

I made some others I just put what I liked most

worn moth
fervent matrix
radiant granite
#

Hi guys

fervent matrix
hybrid nebula
charred siren
#

what did you find

hybrid nebula
#

if I return a struct { char[9] } I see the first four bytes returned as an integer
if I return a struct { char[4096] } I see a segfault

charred siren
#

hsaha

hybrid nebula
radiant granite
#

How do I get python libraries installed

hybrid nebula
viscid hinge
#

very noob question here. If i made a program with tkinter and had other mnodules imported. how does the computer that runs the program install the modules?

charred siren
hybrid nebula
#

register size though...

charred siren
#

shrug not my expertise, any of this

dry garden
#

I really wanna get into low level

desert stump
#

i have a computer science mock exam tmr for gcse and all i know is the print cmd i need to learn these topics, 6.1 Develop Code
6.1.3 Be able to convert algorithms (flowcharts) into programs

6.2 Constructs
Understand and use programming constructs such as sequence, selection (if/else), and iteration (loops)

6.3 Data Types and Structures
Use and understand different data types (e.g., integer, string, boolean)

Work with data structures including 2D lists/arrays

6.4 Input/Output
Handle user input and display output

Read from and write to external files

6.5 Operators
Use arithmetic, relational, and logical operators

Understand and apply the MODULUS operator (e.g., x % y)

6.6 Subprograms
Create and use functions or procedures to structure code

Understand parameters, return values, and scope

#

what do i do gng

charred siren
#

accept that ur just cooked

harsh anchor
desert stump
#

im set 1 maths and triple science so im a quick learner if that helpsπŸ₯€

charred siren
#

cooked πŸ˜ƒ πŸ‘

desert stump
#

on how to code

desert stump
dry garden
desert stump
#

from where

charred siren
#

programming is famously the one thing that makes or breaks comp sci students. its definitely not easy stuff

dry garden
#

There is the Mozilla docs, or the python docs you ll find all that

silver plover
naive ermine
fair anchor
#

I mean, if it's just a mock exam you could procrastinate learning all that. It's a future-you problem.

harsh anchor
desert stump
hybrid nebula
dry garden
charred siren
dry garden
#

I also dont get why become a cs student if you are not into programming

charred siren
#

money and parents

harsh anchor
silver plover
desert stump
#

cs used to be my fav subject😐

hybrid nebula
harsh anchor
granite wyvern
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.

dry garden
fair anchor
granite wyvern
desert stump
desert stump
granite wyvern
silver plover
desert stump
granite wyvern
#

OTOH, I've a friend who once remarked that he and I are the only 2 people he knows who ended up in their dream work. I'm a software dev and/or sysadmin. And he's a mechanic.

silver plover
desert stump
#

i have an engineering mock aswell im so finishedπŸ’”

dry garden
# desert stump no clue what that is

I d recommend a channel called traversy media if you wanna dive into some concepts, you can also grab an hour javascript crash course to grasp some concepts (oop and arrays etc)

desert stump
golden mortar
# desert stump bro this resource page is confusing which option do i click, also by python tuto...

These are all introductory Python courses for beginners:
Automate the Boring Stuff is a really good book for complete beginners and it's free to read online: https://automatetheboringstuff.com/#toc
If you prefer to watch video tutorials Corey Schafer's playlist is also really good: https://www.youtube.com/playlist?list=PL-osiE80TeTskrapNbzXhwoFUiLCjGgY7
I also recommend Harvard’s free online course, CS50P: Introduction to Programming with Python: https://pll.harvard.edu/course/cs50s-introduction-programming-python
This is an alternative online course with lots of integrated practice problems you can do directly in the browser: https://programming-25.mooc.fi/

hybrid nebula
# hybrid nebula register size though...

I can't read assembly. I can read LLVM IR though.
Apparently a 16-byte struct gets returned as { i64, i64 } but a 17-byte struct-returning function now takes a return pointer

granite wyvern
bitter ermine
#

@desert stump if you have your mock tomorrow and you genuinely don't know the content then you're cooked. Have you dedicated time to learning outside the class if the teacher isn't great?

desert stump
hybrid nebula
granite wyvern
desert stump
# bitter ermine <@773609230515175475> if you have your mock tomorrow and you genuinely don't kno...

I tried revising before by myself when i couldnt learn from my teacher but i ran into a similiar problem online where the videos online didnt help me much and if they did id just forget it the next day, i didnt continue to try study for it because i had several other subjects i needed to focus on and just figured id learn cs later on when i actually needed it (which as you can see rn isnt a very good idea)

dry garden
granite wyvern
desert stump
desert stump
granite wyvern
desert stump
granite wyvern
desert stump
#

for now ill try learn all i can but i think im cooked

silver plover
subtle needle
# granite wyvern This forum is about trying to help people.

I have two files, one .bin and the other .json, on my PC. I need to move them into the Free Fire application, to a specific folder, but I can't restart my phone. Does anyone know if it's possible to move these two files into Free Fire bypassing the sandbox block or using a script? Please help me.

granite wyvern
#

For tomorrow, you're cooked. Unless you already know more that it seems to us. But treat it as an exercise, and just do as well as you can.

Also, writing an informal English language solution to a problem is a first step, so using that, even as a preamble to some solution, ought to be good for some credit.

granite wyvern
subtle needle
desert stump
silver plover
granite wyvern
subtle needle
silver plover
desert stump
subtle needle
#

I pay money

granite wyvern
edgy krakenBOT
#

9. Do not offer or ask for paid work of any kind.

silver plover
naive ermine
#

Also we don't allow discussions of hacks / bypasses which it seems you want to do @subtle needle

desert stump
silver plover
solar tapir
#

need invite link

desert stump
#

uh okay what command do i learn after the print command

granite wyvern
silver plover
desert stump
#

int(input("Something")

silver plover
#

Match your parens first

granite wyvern
#

That's nearly legal. Got a question?

desert stump
#

fruits = ("Banana, Strawberry")

#

for x fruits:

worn moth
#
fruits = ("Banana", "Strawberry")
subtle needle
runic flower
# subtle needle I need so much help

I did some google searches, and it looks like it is not a python project, so you might not find much help here in the channel for discussing python.
it looks like there are discord servers for freefire so you might get better help in one of their rooms.

viscid hinge
#

are you watching "intermadiate Python Programminf Course" by freeCodeCamp?

desert stump
#

im watching Python Tutorial for Beginners 2: Strings - Working with Textual Data
by corey schafer

subtle needle
edgy krakenBOT
#
The for-else block

In Python it's possible to attach an else clause to a for loop. The code under the else block will be run when the iterable is exhausted (there are no more items to iterate over). Code within the else block will not run if the loop is broken out using break.

Here's an example of its usage:

numbers = [1, 3, 5, 7, 9, 11]

for number in numbers:
    if number % 2 == 0:
        print(f"Found an even number: {number}")
        break
    print(f"{number} is odd.")
else:
    print("All numbers are odd. How odd.")

Try running this example but with an even number in the list, see how the output changes as you do so.

desert stump
obtuse lichen
#

Are there any experts here?

#

I'm a newbie

worn moth
runic flower
obtuse lichen
#

I'd like to ask if it's still worthwhile to learn programming now? Will it be rendered obsolete by AI?

granite wyvern
runic flower
obtuse lichen
obtuse lichen
#

I'm afraid that if I learn Python, I'll be rendered obsolete by AI. I don't know how far I need to learn it to avoid being left behind.

charred siren
granite wyvern
golden mortar
young flare
obtuse lichen
#

Furthermore, my English is very poor, so learning programming will be more difficult for me compared to native speakers.

granite wyvern
obtuse lichen
#

I am using Google Translate

desert stump
#

fruits = ("Apple", "Orange")
if x = fruits
print("Correct")
else:
print("Incorrect")

old owl
#

Hello, I'm new to the server :)

I don't professionally use Python (I'm an amateur pretty much ._.)
pretty much just joined this server to submit random code snippets I make when I'm bored

charred siren
worn moth
granite wyvern
# obtuse lichen I am using Google Translate

Ah, ok.

Anyway, that does just make things more roundabout. But programming is about problem solving, not English / not English. Although Python's keywords are English and such. But there are only so many.

old owl
desert stump
#

error in line 2

granite wyvern
worn moth
# desert stump why it doesnt work

you are trying to assign fruits to x in if statement (you probably wanted to use comparasion operator ==),
also x doesn't exists.
also i see problems with identation

young flare
pastel sluice
old owl
pastel sluice
obtuse lichen
#

I want to make Python programming my career, but I'm worried it will be rendered obsolete by artificial intelligence. What level of proficiency does Python need to reach to avoid becoming obsolete?

young flare
# obtuse lichen I am studying hard.

Good! Just work hard and everything will fall in place, don't worry too much about the things outside of your control and focus on the things you can

old owl
obtuse lichen
#

Give me a goal that I won't be eliminated from.

pastel sluice
obtuse lichen
#

Okay, sorry.

charred siren
golden mortar
#

Right now the only people outcompeted by AI are nearly useless.

young flare
# obtuse lichen I want to make Python programming my career, but I'm worried it will be rendered...

Ask yourself, how does one measure their skill level? You will need to proficient enough so that companies will deem you worthy to hire you. On the other hand you will never stop learning in this industry so there is no specific goal that once you obtain you'll magically get hired by any company. There are skills outside of programming too that you will need to get a job, like communication and social networking too.

worn moth
# obtuse lichen Python + C++

it's not actually the language, this is in general programming
you can solve the task with any language you want but the way and how you solve this is the most difficult

obtuse lichen
#

Thank you, you are all very kind.

#

❀️

young flare
#

πŸ™πŸΏ

#

shat suddenly died

worn moth
#

.topic

verbal wedgeBOT
#
**Where's the strangest place you've seen Python?**

Suggest more topics here!

young flare
#

i feel like python has become so common i wouldn't be surprised to see it anywhere

old owl
#

One time I saw a shop that reminded me of the python logo

#

it was a clinic

#

I was so confused if it was an off-brand Python logo used for the company or smth

pallid gorge
#
    with open(file, 'r', encoding="utf-8") as json_file:
        json_data = json.load(json_file)
        if isinstance(json_data, dict):
            json_data = list(json_data.values())

Yo guys. i am currently writing a function that can write json files to a database but i am in a small problem. I have a json file that is 2 gb large but when i use this function it takes too long to load and sometimes it does not even load. Does anyone know something t hat can work faster.

young flare
hybrid elbow
#

What do u guys do

young flare
#

json isnt meant to handle large data

old owl
#

I'm gonna post this rn because I gtg

young flare
#

its just a text file afterall, with a funny syntax put into it

old owl
#

I liked the old-fashioned style of CLI, and my personal favourite code (thought probably useless) was when I made a stylized "print()" function. It's definitely not useful but with some bugfixing, I could see this being used as a pretty cool cosmetic thing for CLI games or stuff like that :0

#
import time
import sys

def typewriter(word: str, letter: float, longchar: float, setlong: set):
    
    import time
    import sys
    
    # Checking for validity of parameters

    if not isinstance(word, str) or word == "":
        print("Error: Word parameter not acceptable")
    elif not isinstance(letter, float) or letter == "":
        print("Error: Letter parameter not acceptable")
    elif not isinstance(longchar, float) or word == "":
        print("Error: LongChar parameter not acceptable")
    
    else:
        if not isinstance(setlong, str) or setlong == "":
            setlong = "!@#$%^&*()<>?/;:{[]}\\|+-*/ ,"
        for i in range(len(word)+1):
            print(f"{word[:i]}β–ˆ")
            sys.stdout.write(f"\033[1A")
            if word[i-1] in set(setlong):
                time.sleep(longchar)
            else:
                time.sleep(letter)
            i = i+1
        print(f"\r{word[:i]} ")
        sys.stdout.write("\033[1B")

typewriter("Hello, World! ^^", 0.1, 0.2, "")
muted rampart
old owl
#

alr I gtg bye for now πŸ‘‹

worn moth
young flare
unborn lagoon
smoky meadow
#

Do you think use of AI is a good idea when learning Python? I mean in terms of usage for help?

south bison
#

finished making my face recognition script 😁

worn moth
#

that the purpose of typehints (not talking about dataclasses)

finite tree
worn moth
finite tree
runic flower
young flare
gaunt badge
#

!compban 757857050695827526

edgy krakenBOT
#

:incoming_envelope: :ok_hand: applied ban to @jaunty haven until <t:1765573849:f> (4 days).

runic flower
#

should be banned just for that username.

stray field
pallid gorge
#

what did he send

worn moth
worn moth
#

diabolical

finite tree
#

menace to society

finite tree
stray field
young flare
#

optimize-flag-not-supported

finite tree
runic flower
stray field
#

might as well assert False

runic flower
grave tree
#

!otn a optimize flag not supported

edgy krakenBOT
#

:ok_hand: Added optimize-flag-not-supported to the names list.

stray field
#
assert sys.flags.optimize, "optimize flag is REQUIRED"
runic flower
#

alright, enough goofing off, back to my github docker auto build action optimisation

#

ciao all!

young flare
#

cya

pallid gorge
#

Is loading json file with ijson faster than normal json.load

silver plover
pastel sluice
runic flower
silver plover
young flare
runic flower
silver plover
#

in other words, with act, you're doing the coordination & running locally. With self-hosted, GHA does the coordination, but it's run locally.

runic cairn
#

Who know to code with python

true umbra
#

Are there people working as a data scientist by any chance here?

#

Or anyone doing a data science degree?

runic cairn
#

@true umbra do u have roblox cheats

runic cairn
#

Do u play 99 nigths in the forest? @true umbra

edgy krakenBOT
runic cairn
#

Who play 99 nigths in the roest

radiant granite
cyan niche
#

i hate computer science

#

i hate coding

#

i want to drop this class

#

fml

radiant granite
#

Your problem

#

Not ours

broken meadow
#

best sockest tut?

steady rain
steady rain
# radiant granite Your problem

this server is largely about helping people. you don't have to help if you don't feel like it, but don't tell people off, either.

cyan niche
#

this might as well be manderin

steady rain
cyan niche
#

i have to do the jetbot stuff lol if you google it it shoudl pop up but thats the robotics stuff im having to do

runic flower
# cyan niche i want to drop this class

programming gets progressively easier the more you do it. but intro classes can also be horribly taught.
Is there a specific issue you're having? Ask about it.

cyan niche
runic flower
#

my kid did an intro class where on one project he got the wrong answer for including a \n at the end of the file.
so next project he made sure not to include the \n, only to get it wrong because the answer expected it.
sometimes it's not your fault something didn't work, so just ask about it.

#

my favorite was when they compared students answers to a multiline text variable, but at some point a formatter indented the text, so every line had 4 extra spaces at the start and the teachers "correct answer" didn't match the problem.

cyan niche
#

yea idk im so lost at this point idk

runic flower
cyan niche
#

yea well currently im trying to install the extensions to start this lol

#

very lost rn I could be in narnia for all I know

runic flower
#

more like camelot here. πŸ™‚

cyan niche
#

anychance I could just send you photos/screenshare and show you it lol you might understand alot better than me

grave tree
runic flower
#

You can open a thread in #1035199133436354600 and post screen shots there, but typically text is preferred.

wintry ingot
#

Why python has a gil ? How if I don't want to have gil ?

surreal knot
grave tree
viscid hinge
#

yeh why do you not want the GIL

grave tree
viscid hinge
#

yes

runic flower
viscid hinge
#

do,.......you?

worn moth
grave tree
#

Yes. I'm confused by your question of "why do you not want the GIL", since it's a pretty common request for anyone who wants parallel threading but not spawn multiple processes

runic flower
#

I'm with spoojitkat here, most GIL questions are resolved by kowing what it is what it does and what versions of python are out there.

grave tree
#

We do get people who hear about something called the "GIL" and that it's bad, but don't know much beyond that. So I want to make sure the people who ask about it knows what it does

viscid hinge
#

right, im confused why im being ask why im asking why someone doesnt want a GIL

compact eagle
#

youtubers tend to picture gil as some evil tool
i run from these youtubers

viscid hinge
#

is it pronouced gil like gif or gil like gif

gaunt badge
#

like in gif

viscid hinge
#

got it

gaunt badge
#

(not like in jiff)

viscid hinge
#

lol

#

the jill

cerulean ravine
viscid hinge
#

i think guido said the GIL will remain until there are no single core machines left

grave tree
cerulean ravine
viscid hinge
tropic current
#

I can't do python projects without the help of AI, I usually feel lost without using it,and I don't know if it wrong

silver plover
worn moth
tropic current
rare gazelle
tropic current
#

Is there a better way to make use of ai

silver plover
tropic current
silver plover
#

So, when you're stuck, you could: 1. spend more time thinking. 2. experiment / try different approaches. 3. read about the problem or other solutions.... or: Z: Ask an AI to solve it for you

tropic current
silver plover
#

If an AI solved it, you missed out on most of the learning.

tropic current
robust ledge
#

Agreed. Failing to succeed is some of the most valuable time spent learning.

golden mortar
rare gazelle
#

there are usually good sources for any problem u encounter

golden mortar
#

The issue with AI is that it's too tempting to just ask for the solution.

rare gazelle
#

ai isn't one of them in my opinion

#

resources*

#

i use ai a lot, but u can't really compare chatgpt answer with a realpython thread

snow sail
#

hello, is there a solution for the pkg_resources deprecation warning?

silver plover
snow sail
tropic current
#

Thank you all,I fully understand... I'll try to "avoid" the use of ai in my future projects

rare gazelle
#

i think playing backwards and forwards with ai is what i do

silver plover
snow sail
#

vpython

silver plover
snow sail
#

oh well actually yes it works, i thought it was giving an error on the import

#

me not an expert xD

#

thank you

granite wyvern
#

It's probably more for the author of vpython (or something it uses) than for you.

wintry ingot
#

Well I would like to make an OSINT tool for this I asked that

bleak moth
#

It's like "You can do this, it's valid, and I can compile it, but you better make damn sure you know what you're doing for it to work."

granite wyvern
#

Well, logging messages typically have levels like debug, info, warningg, error. "warning" is usually a "this may not be what is intended" kinds of things, and "errors" are "did not work".

#

So a warning might be "you left this out and I'm guessing blah". And an error is "blah was not specified, quitting!"

bleak moth
#

Yeah, it's a little different in the compiling context.

granite wyvern
#

It's really not. Often a warning is dodgy but legal syntax and errors abort the compile.

bleak moth
#

I just recall the times I've tried to compile C/C++ and it compiles but doesn't link, or compiles and links, but then segfaults at runtime.

granite wyvern
#

Yeah, but that's not logging. That's memory mismanagement.

bleak moth
#

Hence why I said it's a bit different

granite wyvern
#

Rummages for a compile example:

CSS[~/hg/css-pilfer(hg:pilfer)]fleet2*> gcc vt/_scan.c
vt/_scan.c:2:10: fatal error: 'Python.h' file not found
    2 | #include <Python.h>
      |          ^~~~~~~~~~
1 error generated.
CSS[~/hg/css-pilfer(hg:pilfer)]fleet2*1>

See the word "error" there? My code was not compiled and rejected.

I'll try to find a warning level message for comparison.

abstract ibex
#

how does comparisons work on python

#

πŸ€”

steady rain
#

Less than, less or equal, greather than, etc.

abstract ibex
#

u serious ? 😭

#

wait i forgot what i asked 😭 ok that makes sense

#

but

steady rain
#

You forgot what you asked, which was still on screen, in one minute?

abstract ibex
#

yes 😭

#

consider 4 < 10

steady rain
#

It calls (4).__lt__(10)

abstract ibex
#

which does what

steady rain
#

Calls C code to compare ints

abstract ibex
#

i was surprised that heapq can compete with sorted for getting top N. to me it doesn't make sense.

steady rain
#

I think __lt__ specifically is the one that's used by sorted and list.sort

grim axle
abstract ibex
#

not heapsort

#

just heapify + pop top k elems

#

k << n

#

but importantly, n is not too big

grim axle
#

!d heapq.heapify - just basic heap pithink

edgy krakenBOT
#

heapq.heapify(x)```
Transform list *x* into a min-heap, in-place, in linear time.
grim axle
#

I think

rare gazelle
steady rain
rare gazelle
#

even if it has rt?

#

i mean gt

#

or ge to be fair sounds more valid

abstract ibex
#

imho heapq is impl on python while sorted surely its native codes. so asymptotic behavior is dwarfed by the screeching fast C code vs. slow bytecode

#

but this does not seem to be the case

#

so my question is what is slowing down the GOAT

#

how can the GOAT lose

rare gazelle
#

gt makes sense as well

cerulean ravine
#

@abstract ibex what code did you use that shows heapq being faster?

rare gazelle
#

if a < b then b > a

cerulean ravine
#

@abstract ibex btw, you often mean afaik when you say imho

abstract ibex
#

sorry

rare gazelle
#
class a:
    def __init__(self, b):
        self.b = b

    def __gt__(self, other_a):
        return self.b > other_a.b

    def __repr__(self):
        return str(self.b)


print(sorted(map(a, [3,1,2])))

that works

#

ge didn't work

#

actually ge doesn't make sense in this case...

#

oh nvm it does

#

like not a >= b

steel whale
cerulean ravine
steel whale
frosty oriole
#

wild

steel whale
silver plover
#

No linkedin spam or advertising here, thank you.

proud prism
#

ddd

#

adawd

iron vector
#

Im gonna do something mature

abstract ibex
#

W

brisk gazelle
brisk gazelle
#

Yes, strings with a length greater than zero are truthy.

zealous lion
abstract ibex
#

just discovered that 😭

#

but thank u

tight flax
#

πŸ‘‹

rugged barn
#

Good timezone

stray field
#

Is there any point in using a custom JSONDecoder in json.loads?

cerulean ravine
stray field
#

I was able to do that with just object_hook

cerulean ravine
wintry ingot
#

Sherlock is too slow, I guess python was a bad choice to write this tool

wintry ingot
cerulean ravine
wintry ingot
cerulean ravine
rotund steppe
#

How is a mathematics degree for getting into ds/ml?