#voice-chat-text-0
1 messages ยท Page 22 of 1
โ @terse dove can now stream until <t:1665508106:f>.
can anyone help with a python file data manipulation project?
reminds me of php $_SESSION stuff
For handling sessions?
thanks (:
Hope it helps
#web-development will know more than me, though. So if you get stuck, they'll be better to ask
I'm personally only just know relearning Django
But I know most of the broad strokes and what not
good point, i'll probably go in there the next time i get lost lol
Most of my knowledge is a mixture of experience, bullshit, and bullshit I'm basing on experience.
And research
Usually a mixture of all
Python is an interpreted, interactive, object-oriented, open-source programming language.
thanks
@amber raptor https://learn.microsoft.com/en-us/partner-center/solutions-partner-azure wanted to show u this
brb, someone managed to replicate an issue on their rig.
Yep, partnership
yap
ok
and where is python ๐ณ
i do know python
sorry for late response
i just forget to write it down i mean i hardlly even use discord im more used to irc
Ya there is my question above
.
u a new dev in python?
Yes
oh~
sorry my wifi is slow
im connected to proxychains
it kinda suck
oh
why did u left
bruh
oh nvm
where did you learn python
@hard crow If you're wondering why you can't talk, check out the #voice-verification channel. That'll tell you what you need to know about our voice gate
I don't want to read all of this #voice-verification
just do the command
I haven't even read lmao
and I still can't for some reason
๐
@whole bear
idk
im sus
yeah ik, I just like listening to others
ur voice is kinda low btw
yeah
are you talking to me pythonically or English I don't understand
hallelujah IT WORKS
gun position, where are you bro??? Don't say your in war
this?
def loops(n):
if n % 2 == 0:
for i in range(1, n, 2):
print(i)
for i in range(n, 0, -2):
print(i)
else:
for i in range(1, n + 1, 2):
print(i)
for i in range(n, 0, -2):
print(i)
print(loops(13))
1
3
5
7
9
11
13
13
11
9
7
5
3
1
None
my output is that
but i want it like this
how do i put it in a line
nah im talking abt this problem
Cs50p
doesnt change anything
bruh, wait one sec
!e
def loops(n):
if n % 2 == 0:
for i in range(1, n, 2):
print(i)
for i in range(n, 0, -2):
print(i)
else:
for i in range(1, n + 1, 2):
print(i)
for i in range(n, 0, -2):
print(i)
print(loops(13))
@quartz terrace :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1
002 | 3
003 | 5
004 | 7
005 | 9
006 | 11
007 | 13
008 | 13
009 | 11
010 | 9
011 | 7
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/behimapugu.txt?noredirect
def loops(n):
if n % 2 == 0:
for i in range(1, n, 2):
print(i,end="")
for i in range(n, 0, -2):
print(i,end="")
else:
for i in range(1, n + 1, 2):
print(i,end="")
for i in range(n, 0, -2):
print(i,end="")
print(loops(13))
!e
def loops(n):
if n % 2 == 0:
for i in range(1, n, 2):
print(i,end="")
for i in range(n, 0, -2):
print(i,end="")
else:
for i in range(1, n + 1, 2):
print(i,end="")
for i in range(n, 0, -2):
print(i,end="")
print(loops(13))
@quartz terrace :white_check_mark: Your 3.11 eval job has completed with return code 0.
135791113131197531None
lol
the None is a bug you found btw
!e
def loops(n):
if n % 2 == 0:
for i in range(1, n, 2):
print(i,end="")
print("")
for i in range(n, 0, -2):
print(i,end="")
else:
for i in range(1, n + 1, 2):
print(i,end="")
for i in range(n, 0, -2):
print(i,end="")
print(loops(13))
@quartz terrace :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 5
002 | print("")
003 | IndentationError: unexpected indent
!e
def loops(n):
if n % 2 == 0:
for i in range(1, n, 2):
print(i,end="")
print("")
for i in range(n, 0, -2):
print(i,end="")
else:
for i in range(1, n + 1, 2):
print(i,end="")
print("")
for i in range(n, 0, -2):
print(i,end="")
print(loops(13))
@quartz terrace :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 11
002 | print("")
003 | ^
004 | IndentationError: unindent does not match any outer indentation level
!e
def loops(n):
if n % 2 == 0:
for i in range(1, n, 2):
print(i,end="")
print("")
for i in range(n, 0, -2):
print(i,end="")
else:
for i in range(1, n + 1, 2):
print(i,end="")
print("")
for i in range(n, 0, -2):
print(i,end="")
print(loops(13))
@quartz terrace :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1
002 | 3
003 | 5
004 | 7
005 | 9
006 | 11
007 | 13
008 | 131197531None
!e
def loops(n):
if n % 2 == 0:
for i in range(1, n, 2):
print(i,end="")
print("")
for i in range(n, 0, -2):
print(i,end="")
else:
for i in range(1, n + 1, 2):
print(i,end="")
print ()
for i in range(n, 0, -2):
print(i,end="")
print(loops(13))
@full marsh :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 5
002 | print("")
003 | ^
004 | IndentationError: unindent does not match any outer indentation level
just a print a new line when you want it idk what your trying to do
!e
def loops(n):
if n % 2 == 0:
for i in range(1, n, 2):
print(i,end="")
print("")
for i in range(n, 0, -2):
print(i,end="")
else:
for i in range(1, n + 1, 2):
print(i,end="")
print("")
for i in range(n, 0, -2):
print(i,end="")
print(loops(13))
@quartz terrace :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 135791113
002 | 131197531None
!e
def loops(n):
if n % 2 == 0:
for i in range(1, n, 2):
print(i,end="")
print("")
for i in range(n, 0, -2):
print(i,end="")
else:
for i in range(1, n + 1, 2):
print(i,end="")
print("")
for i in range(n, 0, -2):
print(i,end="")
print()
print(loops(13))
@full marsh :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 135791113
002 | 131197531
003 | None
!e
def loops(n):
if n % 2 == 0:
for i in range(1, n, 2):
print(i,end="")
print("")
for i in range(n, 0, -2):
print(i,end="")
else:
for i in range(1, n + 1, 2):
print(i,end="")
print("")
for i in range(n, 0, -2):
print(i,end="")
print()
loops(13)
@full marsh :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 135791113
002 | 131197531
!e
def loops(n):
if n % 2 == 0:
for i in range(1, n, 2):
print(i,end=" ")
print("")
for i in range(n, 0, -2):
print(i,end=" ")
else:
for i in range(1, n + 1, 2):
print(i,end=" ")
print("")
for i in range(n, 0, -2):
print(i,end=" ")
print()
loops(13)
@full marsh :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1 3 5 7 9 11 13
002 | 13 11 9 7 5 3 1
why is VC so boring af smh
you're not "muted"
how many messages i sent so far?
oh ok
then?
what do i do then
yea
i just wanna see if i got more than 50 messages
it looks like a game
what game are you making
isn't ncurses something for building TUIs?
we can use terminal based applications for everything, why do we use bloated GUI!?!?
echo -e "\033[31;1;4mHello\033[0m"
echo -e "\033[38;2;255;82;197;48;2;155;106;0mHello"
bro its 12 and I can barely focus
and I didn't see any dms tbh
idk
r u moroccan
im some useless creature
r u human
not even close
r u white
like water?
yeah
why r u asking
depending on ur answer i will know where u from
im not
Earth?
ofc ur from earth but ik more precisely
on the land?
more precisely than that lol
in a country?
ok good job
so all the west is gone
now theres only africa and asia left
then
u said ur not muslim
which gets rid of north of africa and middle east
why is the west gone
cuz u said ur not white lol
is teh west just for white ๐คฃ
no like originally
and im white lmfao
now = datetime.now()
dimensions = int(arg)
if dimensions < 0 or dimensions > 2500:
dimensions = 1000
print(f'Person command was used at {now.strftime("%m/%d/%Y %H:%M:%S")}')
r = requests.get("https://thispersondoesnotexist.com/image")
image_file = io.BytesIO(r.content)
file1 = Image.open(image_file).convert('RGB')
file1.save("Img/person.PNG")
image3 = Image.open('Img/person.PNG')
new_image = image3.resize((dimensions, dimensions))
new_image.save('Img/personImage500.PNG')
await ctx.send("This Person Doesnt Exist!",
file=discord.File("Img/personImage500.PNG",
filename="personImage500.PNG"))```
worthless piece of shit what are you doing here
being a worthless piece of shit duh
arg = 1000
async def person(ctx, *, arg = "1000"):
now = datetime.now()
dimensions = int(arg)
if dimensions < 0 or dimensions > 2500:
dimensions = 1000
print(f'Person command was used at {now.strftime("%m/%d/%Y %H:%M:%S")}')
r = requests.get("https://thispersondoesnotexist.com/image")
image_file = io.BytesIO(r.content)
file1 = Image.open(image_file).convert('RGB')
file1.save("Img/person.PNG")
image3 = Image.open('Img/person.PNG')
new_image = image3.resize((dimensions, dimensions))
new_image.save('Img/personImage500.PNG')
await ctx.send("This Person Doesnt Exist!",
file=discord.File("Img/personImage500.PNG",
filename="personImage500.PNG"))
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Why cant I talkk
#voice-verification
you
sure your lips are open?
can you guys help out after you are done you think?
is that supposed to be a jokeee๐ญ
idk I sometimes leave my lips closed
bro what ๐คฃ
thats your advice for me ? Sorry but I dont take advices ๐
im trying to be useful bro
shrek do you think you can help me out for something afterwards?
me too brooo
@stiff girder can you help me out maybe?
not everyone is born useful
sorry for your case
@stiff girder
are you good at python btw ?
who?
I can try, but dont expect anything
uh, average skill, im not reallyinto the language
can we go on a private call ?
the person that is not useful ๐
nah
i cant talk tho is that alright?
it is not
okok
being useless is useful, right??
in what language are you proficient ?
I might need a bit of help in Python
you're not useless
nothing really, I keep learning something for a couple of hours, lose motivation, start a new thing, repeat
why is that ๐ญ
brain damage
is there a way to private you or something ?
welpp okay
sry can't rn now
bah okay we good
the reason I join VCs is just because im lonely and I want some company
no offense but I was trying to be the company duh
I'll probably be around a while later. Maybe an hour or two.
the reason I join is because I want to expand my knowledge about python
I really love this stuff
this is good
If anyone has Python questions, I might be able to field some.
whats that supposed to mean ?
Greaattt
he'll be here in an hour or two?
He is often around, but he's just woken up and hasn't had breakfast nor watched the tv he wants to watch, yet.
Why can't I iterate through a list and keep modifying it
You're adding/subtracting elements?
removing
yes
o I'm going to lseep rn
yeah I'm following
Actually, I think that's not the right example.
ohw okay
!e py things = list("abcdef") for thing in things: del things[-1] print(thing)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | a
002 | b
003 | c
Wait, are you sure it's a list and not s dictionary?
I'm positive its list
!e py d = {"a": "b", "c": "d"} for k in d: del d[k]
@somber heath :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | RuntimeError: dictionary changed size during iteration
Right, but it might give you weird problems if you're not careful.
It's not so much that you can't remove or add things from a list while you for loop over it, it's that you probably shouldn't.
things[-1] is supposed to give you the last item , no ?
Yes.
!e
code
!e py for i in (0, 1, 2, -1, -2, -3): print("abc"[i])
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | a
002 | b
003 | c
004 | c
005 | b
006 | a
how do I write some code in the chat
!code if it fits
Here's how to format Python code on Discord:
```py
print('Hello world!')
```
These are backticks, not quotes. Check this out if you can't find the backtick key.
!paste if it does not
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 floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
Can you provide a representative code example that demonstrates the funky behaviour you're seeing?
I should have kept my earlier example as it was.
!e py things = list("abcdef") for thing in things: del things[0] print(thing)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | a
002 | c
003 | e
could someone walk me through a code verbally while we step through it on python tutor?
!e py things = list("abcdef") for thing in things: if thing == "c": del things[0] print(thing)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | a
002 | b
003 | c
004 | e
005 | f
things == ['b', 'c', 'd', 'e', 'f']
how
yes
like i share my screen and someone explains what they are seeing in pythontutor
Screen sharing requires admin/moderator intervention.
@somber heath
o
Typically, you'd be on vc when a mod/admin happens to come in and you'd ask them nicely.
thank yuuu
You're asking them to hang around and watch you stream.
ok. i can't do it right this moment just trying to line something up for later or tomorrow
what is the matter
have to eat
oh nothing i just don't understand how it works
Am I the guy?
yes๐
it was converted from java by google's codex jaun
I've never been the guy.
oh you're the guy, guy
I'm the guy!
what are u ๐๐๐
wait
Fuck knows.
can't one just screenshare via a private disc call?
I'm off. Later.
โฎ๏ธ
discord is new to me
try out and let me know
ya
Sorry, I was distracted elsewhere.
ahghangnafafa
are you a federal agent
glowie
i know it
i smell it
the mods are onto me
after I posted a video on how to make methamphetamine
Shall I call them?
the feds
I meant the mods.
why would you do that champ
haven't done anything wrong
Be kind. Create. Breathe. Sing.
A state of affairs worth maintaining, I think.
Don't vote for bullies.
the mods are bullies
unless
I feel like
you're silently
Was there something you needed to ask?
making methamphetamines
I am new to Python and just approaching an ambitious first project... I thought maybe someone could give me some input
What's the project?
oh you know just trying to recreate jarvis
tf is that
the ai from ironman, I want my own personal voice assistant
and like how new are you and stuff
I would like suggest simple before advanced
I have been coding for a month
Okay, so you're looking at text to speech, speech recognition, natural language processing, unsupervised machine learning and a boatload of disciplines I could never hope to comprehend in my lifetime. As projects for new programmers go, you're right, it's ambitious. To the point I would say that you're aiming far too high too early.
Start out with the basics, first.
Build your way up.
Reach, but reach with an understanding of how far you can realistically reach.
Per reaching out.
Make love, not war
- Jesus H Christ
I have actually made pretty good progress, but hit a barrier which I need to pass until I can proceed onto tensorflow to give it near consciousness... but yes I still need to get more familiar with all the basic python concepts and statements
what
I mean, if you manage to create consciousness and can prove it, step up and collect your Nobel prize.
google engineer already proved a chatbot to be sentient
!e py print(sum(range(1, 11)))
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
55
Hm?
9+2 = 11
That would seem to be the popular opinion on the matter.
trueeeeee
I don't think Python would like it, though.
This is what I call the moss argument.
Interpreted languages have an inherent bottleneck compared with compiled languages, yes. All things being equal, well-written Python code is slower than the equivalent well-written C++ code.
Poorly written C++ is liable to be slower than well-written Python, and Python comes with options for rocket boosters to give compiled languages more of a run for their money.
but c++ got the funny {} that shit honestly helps me read code better
But sure. If speed is all you care about, C++ is fine.
python is like a good multi tool
c++ and shit is when you want to focus on something specific
Python's primary advantage is, perhaps, its relatively friendly syntax and ease of use.
@slow minnow ๐
and that attracts a lot of people to it, meaning its ecosystem is well developed and maintained
robust
im new to python and im codeing a bot and i thought thjis would be the perfect server to join
truee but for program development I could not find anything that really suited me with python
like GUI
wise
Python is at the forefront of ML development. Yes, the underlaying stuff is in C, but then what isn't, eventually?
Scientific computing, etc
yea python good for computer science and shit
Each language to its own use cases.
It's not a competition.
(It absolutely is a competition.)
idk these javascript frameworks acting like its a competition hard
0.5 milliseconds faster and that's the thing everyone switches to
You're not wrong.
what's that one thing that google was releasing for like c++ 2.0 or something
Carbon thats it
It looks epic
unlike rust
all my homies hate rust
opal
Python Vs Ruby who you siding with
I'll give you a hint: You don't get any points for guessing correctly.
okay
using all my brain power
we are the python discord server
hint 1
many channels about python
hint 2
I'm thinkinnnnnnn
Python
Ta ta.
hows everyone doin?
Doing, as I would say.
er
I mean
like
I'll explain that
"How's it going?"
"It's going."
"How are you doing?"
"I'm doing."
Mhm.
just joined gotta earn my roles
what do you think the best free python course would be?
Course, I don't know. I direct people to Corey Schafer's Youtube.
ive been watching freecodecamp
ill have to check it out
have you been working on anything cool lately?
im still learning but im gonna make my own DAW(Digital Audio Workstation)
me too
@brazen basaltHi hi. ๐
Oh, hi. Yes.
hello @red cypress
Hii Shashank
how are you doing
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
did that help you @red cypress
k
So do you want to build a project for your academic purpose ?
See there are a lot of open-source projects available online.......you can refer to GitHub for those repositories and get a gist of them......and later on try to build it via integration with different python modules
There is nthin specific.......depends on the interest and kind of stream in which you're willing to move ahead
hello @somber heath
opal
@somber heath you got time to help me set up a virtual environment?
alright
Just eating some breakfast
That's big enough
The biggest we've had here was about chonky babybell cheese sized. Though elsewhere has had like small tennis ball sized.
Hail?
Yes.
All I got was a couple of clouds
Catsocoatl?
quetzalcoatl
I thought you were making a cat pun on it.
@wind raptor
Mmm. Sweet, precious eagle cactus fruit.
G'day
!stream 924010347264897024
โ @lunar haven can now stream until <t:1665583767:f>.
Degrease.
Ha
On of my friends thought it was "quote on quote" and would type it out like that
It was great
Back in a bit
I'm trying to voice verify
I'm also unable to chat.
I'm chatting in the voice-chat-O
Not in your Voice Chat 0, yes, I agree, thank you, I'm here to learn.
!e ```py
import dis
dis.dis("""
a = 1
print(str(a) + " test")
""")
@faint ermine :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 0 0 RESUME 0
002 |
003 | 2 2 LOAD_CONST 0 (1)
004 | 4 STORE_NAME 0 (a)
005 |
006 | 3 6 PUSH_NULL
007 | 8 LOAD_NAME 1 (print)
008 | 10 PUSH_NULL
009 | 12 LOAD_NAME 2 (str)
010 | 14 LOAD_NAME 0 (a)
011 | 16 PRECALL 1
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/rehegimufe.txt?noredirect
!e
import dis
dis.dis("""
print("hola")
""")
@distant sonnet :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 0 0 RESUME 0
002 |
003 | 2 2 PUSH_NULL
004 | 4 LOAD_NAME 0 (print)
005 | 6 LOAD_CONST 0 ('hola')
006 | 8 PRECALL 1
007 | 12 CALL 1
008 | 22 RETURN_VALUE
!e
import dis
dis.dis("""
for i in range(10):
pass
""")
@distant sonnet :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 0 0 RESUME 0
002 |
003 | 2 2 PUSH_NULL
004 | 4 LOAD_NAME 0 (range)
005 | 6 LOAD_CONST 0 (10)
006 | 8 PRECALL 1
007 | 12 CALL 1
008 | 22 GET_ITER
009 | >> 24 FOR_ITER 2 (to 30)
010 | 26 STORE_NAME 1 (i)
011 |
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/rurarunuzi.txt?noredirect
With the Python compiler Nuitka you create protected binaries out of your Python source code.
@red cypress chat here please
this is why you cant hear me:
there you go!
Thanks @faint ermine
def ham(spam: Bacon):
just chat a bit more in text and then you can verify to be able to use voice
Yeah that's ryt....actually I had a query
It's so cursed
can we go to this channel and discuss some of the code^
Thank you for letting me drop in guys, I'll catch you all again sometime.
!e
for x in 0,1,2:print("fbboaaorz"[x::3])
@distant sonnet :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | foo
002 | bar
003 | baz
Hiii all
Can anyone tell me how to automate data filtering in excel using pandas ?
I wanted to fetch the data based on customized date filter and display the data in tabular format
@vivid palm would know better on stuff like that but I don't know if she's busy or not
Most people are set to DnD permanently it seems, so I never know
Unfortunately I haven't messed too much with Pandas
okayyy...okayy...np....will check
did u check masking with pandas?
No.....not as of now.....would u recommend me to refer some specific functions in the pandas library
But masking won't be required as I don't need to replace any value......I just needed to extract the dataset based on date custom filter in excel
Okayy....okaay.....will refer it....maybe before masking I need to apply the functionalities
@dusk raven .....Basically I've to implement this custom date filter in Excel using pandas and extract the data
Bรผrostรผhle mit Armlehnen zum Verstellen & Rollen โค Ergonomische Drehstรผhle & Arbeitsstรผhle โ Bestelle den anpassbaren Bรผrostuhl per Click & Collect | JYSK
Aeron at Herman Miller Store. Find stylish home furnishings and accessories for every room and outdoor space.
Shop Embody Gaming Chair and see our wide selection of Gaming Chairs at Herman Miller. In stock, exclusive, and ready to ship -- authentic modern furniture from iconic designers.
The Embody office chair increases the physical harmony between people and their technology. It sets a new benchmark for ergonomic seating that supports healthy movement.
Shop Eames Lounge Chair and Ottoman and see our wide selection of Lounge Chairs & Ottomans at Herman Miller. In stock, exclusive, and ready to ship -- authentic modern furniture from iconic designers.
iirc the only difference is some Logitech logos and some dodgy cooling thing
All it takes is one sit to understand exactly why our one-of-a-kind Fuf collection has brought bean bags out of your grandparentโs dusty basement and into college campuses, bedrooms, and living rooms around the world. With all sorts of sizes and colors available, all perfectly filled with our cozy shredded foam, the ha
!stream 117231997331570695
โ @whole bear can now stream until <t:1665591567:f>.
@lunar haven Thanks for the stream. Was enjoyable to watch
!stream 924010347264897024
โ @lunar haven can now stream until <t:1665591758:f>.
@lunar haven Can you stop it and start the stream again? It's not loading for me
can anyone help me understand some code
Sure, what's the code
I feel personally attacked
If you know that you shouldn't be asking it, as in you wouldn't asking it while an admin's around, then you shouldn't ask it at all in the server
no ill will to you but consequence is important
it's specifically you
the question is normal
Well now I'm very curious
'
From me, no
Then just ask the question
i dm'd you
!name-main
if __name__ == '__main__'
This is a statement that is only true if the module (your source code) it appears in is being run directly, as opposed to being imported into another module. When you run your module, the __name__ special variable is automatically set to the string '__main__'. Conversely, when you import that same module into a different one, and run that, __name__ is instead set to the filename of your module minus the .py extension.
Example
# foo.py
print('spam')
if __name__ == '__main__':
print('eggs')
If you run the above module foo.py directly, both 'spam'and 'eggs' will be printed. Now consider this next example:
# bar.py
import foo
If you run this module named bar.py, it will execute the code in foo.py. First it will print 'spam', and then the if statement will fail, because __name__ will now be the string 'foo'.
Why would I do this?
โข Your module is a library, but also has a special case where it can be run directly
โข Your module is a library and you want to safeguard it against people running it directly (like what pip does)
โข Your module is the main program, but has unit tests and the testing framework works by importing your module, and you want to avoid having your main code run during the test
!e 1_000_000
@quasi condor :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e
5+5
print(_)
@quasi condor :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | NameError: name '_' is not defined
@rugged root what's this called
!e ```py
def f():
return 1
print(_)
@faint ermine :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 3, in <module>
003 | NameError: name '_' is not defined
Awning I think
ah
well, I fixed one today
it has a handle you turn to crank it in
it went in about halfway
then started slipping and zoomed back out
this cap was at the end of the big cloth roll
there was a square metal shaft which went in
originally the hole in the cap above was square too
but now the square shaft was slipping in it
a store nearby turned out to have one of these caps left in stock for โฌ18
replaced the cap and it works like a charm
was a pain to hang it back up tho
does anyone know why this only prints the last df call?
#Get Egg Recipes
test_url2 = 'https://www.allrecipes.com/recipes/148/breakfast-and-brunch/eggs/'
t = get_recipes_from_page(test_url2)
df2 = pd.DataFrame(get_recipes_from_page(test_url2))
df2
#Get French Toast Recipes
test_url3 = 'https://www.allrecipes.com/recipes/149/breakfast-and-brunch/french-toast/'
t = get_recipes_from_page(test_url3)
df3 = pd.DataFrame(get_recipes_from_page(test_url3))
df3
#Get Smoothie Recipes
test_url4 = 'https://www.allrecipes.com/recipes/138/drinks/smoothies/'
t = get_recipes_from_page(test_url4)
df4 = pd.DataFrame(get_recipes_from_page(test_url4))
df4
in
#Get Egg Recipes
test_url2 = 'https://www.allrecipes.com/recipes/148/breakfast-and-brunch/eggs/'
t = get_recipes_from_page(test_url2)
df2 = pd.DataFrame(get_recipes_from_page(test_url2))
df2
#Get French Toast Recipes
test_url3 = 'https://www.allrecipes.com/recipes/149/breakfast-and-brunch/french-toast/'
t = get_recipes_from_page(test_url3)
df3 = pd.DataFrame(get_recipes_from_page(test_url3))
df3
#Get Smoothie Recipes
test_url4 = 'https://www.allrecipes.com/recipes/138/drinks/smoothies/'
t = get_recipes_from_page(test_url4)
df4 = pd.DataFrame(get_recipes_from_page(test_url4))
df4
when you write
df2 = pd.DataFrame(get_recipes_from_page(test_url2))
df2
what's the second df2 doing?
prints df2
don't you think writing print(df2) would be a bit clearer
pretty sure it would fix your problem too
not sure tho
yes but it wouldn't be a dataframe
sorry, you heard the admin, I can't help you
@rugged root ik you know who i am now
but its either this
or i give my tuition money to a private tutor
ill respect ur server
but dude i have no other option, office hours for this class are 1 hr a week
i have no choice
evading your ban is not respecting the server
you can join the appeals server and make an appeal, not circumvent our moderation
what am i meant to do then mina?
!ban 1029165821068587059 Ban evasion and and violating rule 5. You haven't respected our server or our rules. In fact even on this account, you've already had a warning.
i did wrong
:incoming_envelope: :ok_hand: applied ban to @wicked folio permanently.
you'll see in a bit
Whoops
you're good
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
def len(obj):
return obj.__len__()
I.... I've never had that happen before
It shouldn't do that
Desktop client or web?
Yeah I'm going to give you - that might do it - probationary temp for 3 weeks since you consistently stream good stuff. Break my trust, I break your kneecaps. And my heart
https://NatalyDawnMusic.com - Click to see Nataly on tour!
Gardenview out now, listen on Spotify (https://sptfy.com/gardenview) or wherever you listen to music.
Save this song on Spotify: https://spoti.fi/2r3Yqkh
Follow us on instagram: https://instagram.com/pomplamoosemusic
Become a patron of our music (to vote on the songs we cover and get...
Mkay, you've got the perms, @lunar haven
!e
from dis import dis
def add_one(num):
return num + 1
print(dis(add_one))
@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 3 0 RESUME 0
002 |
003 | 4 2 LOAD_FAST 0 (num)
004 | 4 LOAD_CONST 1 (1)
005 | 6 BINARY_OP 0 (+)
006 | 10 RETURN_VALUE
007 | None
1..10```
gotta jump out
my company is still using IronPython 2.7 lol
oof
.net python go brrr
Yes we use it has a hook from c++

@lunar haven Looks like it's common enough. It might just be the case if your code didn't create the file. Python will default to writing things in UTF-8 in a certain way
But I guess it may not in other cases?
Don't know exactly, most of what I just said was guessing
But I guess if it works, just keep doing the encoding thing
Just don't think I've had to do that
Maybe
Oh huh
ive had issues with it writing cp1xxx on windows by default
Okay I for some reason thought that open defaulted the encoding argument to UTF-8
I've had that happen once or twice. Was a bitch figuring that out.
open()'s default for encoding is None
that happen to me. They only show the most expensive
"If encoding is not specified, the default is platform dependent."
Huh
What OS?
Right
My guess is that it's trying to read it using the weird Windows encoding
But to make it system agnostic, putting the encoding would solve it
Sure sure
Which is weird
Like
They can lie
Well
I would call myself a "faithful servant"
cop, art thou a cop
if thou liest I shall attack thee
How Do You Prove A Real Estate Agentโs Breach Of Fiduciary Duty? Call Business Law Attorney William Bloch to schedule an initial consultation: (310) 477-7767
Yeah i figured it out
voice-chat-0-text ?
True, thought about that one, too
Feels weird having it after the number, though
Actually
idk, i think voice-text-0 works well
๐
@vivid palm Thou hast abandoned us
What's your favorite PEP? xd
.topic
Gazpacho (Spanish pronunciation: [ษกaฮธหpatสo]; Southern peninsular Spanish: [ษกahหpa(t)สo]) or Gaspacho (Portuguese: [ษกษสหpaสu]), also called Andalusian gazpacho, is a cold soup and drink made of raw, blended vegetables. It originated in the southern regions of the Iberian peninsula and spread into other areas. Gazpacho is widely eaten in Spain an...
i really like pumpkin soup
Melon soup is a soup prepared with melon as a primary ingredient. Melons such as bitter melon, cantaloupe, crenshaw melon, honeydew (casaba melon) and winter melon may be used, among others. Some melon soups are prepared with whole pieces of melon, and others use purรฉed melon. Some are served hot, while others are served chilled. Some cold varie...
its like ham
yeah greak people are really laid back ๐
they have tourist season and non-tourist season
thats crazy
need help setting up visual studio code for C , it just won't work
what am i missing
did you tried to follow a tutorial?
@strong arch Would you mute your mic when you're not speaking?
We're getting odd background noise
@quiet needle #microcontrollers
@crystal fox https://github.com/MrHemlock/auto_guild
Be back when I get in the van
http://KEXP.ORG presents Delvon Lamarr Organ Trio performing during their warm-up set, live at Little London Plane during Upstream Music Fest. Recorded May 13, 2017.
Songs:
Move On Up
Memphis
Untitled
Host: Troy Nelson
Audio Engineer: Kevin Suggs
Cameras: Jim Beckmann, Alaia D'Alessandro & Justin Wilmore
Director: Scott Holpainen
Editor: Alaia...
and does it work if you run it @lunar haven ? ๐
If you want a quick way to silence that typing error message, you can use ```py
assert fns is not None
If you always expect this to be the case.
Try/except is the way to go if you want to handle this error case ๐
Oh sorry, you wouldn't use try/except here actually, you would just use a regular if fns is not None.
Oh were you not talking to me earlier? ๐
use this @lunar haven
it's better
okie
bye
bye
Narrator: He was not back
oh, sweet sound of science ๐
@neat acorn yep ๐
your mic sound kinda wierd
yep, programming is hard ๐
or you can be jack of all traits, master at none
you don't have to remember everything, documentation exist for a reason ๐
@lunar haven pandas is smart enough to take care of file opening. It is smart enough to distinguish between file object and file path.
Yeah was too in my head to get back on
I know it
Shut up I'm old now ๐ฅฒ
@whole bear https://pypi.org/project/blessed/
@worn flax If you're wondering why you can't talk, check out the #voice-verification channel. That'll tell you what you need to know about our voice gate
bye everyone !
Er, yeah the conversation moved on ๐
Quadratic Data Grid
I guess that's essentially how a spreadsheet works, but in a notebook format.
๐
Erm, I was just about to head off but what do you need help with @astral plank ?
Heyy ๐
Everyone just left :C
Erm, not bad, yourself?
Ah ๐
You get the enjoyment of learning it for the first time again I guess
bbye
hey guys i wanna write a function to store age in and whenever i call it again it prints the age only not the whole process of inputting the age. im aware that the code i wrote here does just that but ive been trying to create what i want for almost 2 hours now this code is just to give u an idea for what i want to create.
I need help with my python project.
guys does anybody have 2min to help me with easy code im a python beginner i dont know how to add 1 more if to if ๐
!stream 717134648567791657
โ @astral plank can now stream until <t:1665623446:f>.
@rugged tundra I'm in VC-0 if you wanna chat
elif?
Hello
i dont think i can talk yet
aaand that sucks :/
but the day will come
where i will gain the ability to talk to other snakefans
about why i suck at coding
aand then get better at coding
but
this day might be in the far future
noone can know
oh
hi
ok
nice avatar btw
you are from ukraine?
oh
cool
i am also from ukraine
so i have a question about python
i cant download library
ill show error screen
i dont know how to solve it
:(
Where you see the >>> is the REPL
Don't do it in the repl.
Do it in your command prompt.
firstly you need to not run the command in the repl like opalmist said
secondly, that's not the cmmand you should be running
thank you
the command you should be running (ifI remember correctly) is python -m pip install pyautogui
If you're on Windows, py -m pip install pyautogui
Niiice
great
@oak schooner ๐
i cant
it doesnt work ((
can be any problems if in the way to python.exe will be ukrainian/russian named files?
You should consider upgrading via the 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\python.exe -m pip install --upgrade pip' command.
and it says this thing
py -m pip install --upgrade pip?
That's usually just a suggestion.
hello
hi
@gentle flint
https://maps.app.goo.gl/Y23phenssJ4t6Hik6
@subtle stone ๐
Sorry, just now clicked that you were heading out
My brain is not with me today
@rugged root why did the channel change name to #voice-chat-text-0? Was it to avoid confusion with the built-in text channel of #751591688538947646?
Yeah, people were a bit getting confused which to write in
Yo ๐
Erm, not bad ๐
@gentle flint
Years ago, Googleโs Street View program expanded from streets to virtually everywhere, thanks to Googleโs Trekker program that put 360-degree Street View cameras into a single backpack. Today, Google announced its upgraded Trekker backpack, which is significantly smaller and lighter than before. The old one weighed in at about 44 pounds. Itโs no...
bb in 15m
how to enable transcription?
hai everyone, I'm a human today
Hello ๐, how are you guys doing?
I'm doing bad asf, wbu? ๐บ
I'm good, tnx
@brisk locust
Excuse me gentlemen, what am I wrong here?
nun1=input(int("10"))
nun2=input(int("20"))
if=nun1>nun2
print("the first value and the largest")
else:
if=nun2>nun1
print("the second and largest value")
if= isnt a thing in python
you likely meant if nun2 > nun1:
also, input(int("10")) this converts the string "10" to the int 10 and then prints that to the terminal with the input function
the input function will pause and wait for user input
that means: writing in the terminal
thank you so much
how many pushups can you do?
3
wanna do a set of 3 with me
nah
back pains currently
wtf
why delete the message
ruckenschmerzen
i delete everything
apparently
if you search from maroloccio i only have 2 messages
but why?
maroloccio:
well i want to save storage
i want to put these KBs in a bank
and then one day i want to do something great with these savingslike a piggy bank
like a piggy bank
i can send a gdpr for deletion
to save a few KBs
yes
the economy of this doesn't work
:(
it's ill conceived
it's not economical
because it's wasteful
it's like chasing my own tail
my efforts are wasteful
especially because i always say the same thing, more or less
yes my idea is ill conceived
i am going to send MYSELF a gdpr
let me save a few kbs
let me waste a little energy
with mouse clicks. a few kcal
High energy. Restless.
disclaimer: dont use, its bad
!server
woah I thought it was created last month
lol why not, Python is the most popular
Fair
SELECT * FROM table
INSERT INTO table (value, value2) VALUES ({userinput}, {userinput2})
userinput: '; SELECT * FROM table;
def get_user_by_ID(ID):
x.execute("SELECT * FROM users WHERE ID=:ID",{'ID': ID})
return x.fetchone()
:ID
wrong, open to injections
def get_user_by_ID(ID):
x.execute(f"SELECT * FROM users WHERE ID={ID}")
return x.fetchone()
GET /api/products?q='; SHOW ALL TABLES;
obviously not in voice, but I hope this is an example of doing it the wrong way
wrong, open to injections
literally first line
yes, but you said that after someone elses example
and there's no correct example here
ye we were talking about injections
sure - have at it
this should be correct?
it uses the libraries :ID formatting which should clean

55,331
302,843