#voice-chat-text-0
1 messages · Page 70 of 1
You know a LOT more things than me
so like if i spent around 2 hours everyday for 6 months would i be able to create it
sorry im asking dumb questions
Sure, don't see why not. Just gotta work for it, lots of research
might just outsource
alright
my original plan was to get like basic understanding then outsource the work
No no, they're not dumb questions. It's not a dumb question if you learn from it
Bearizona
is there like a website to see all python libraries?
@terse needle That's what makes the song itself Ironic
k bye for now
don't miss me🥲
It's a meta thing
I'll take position on Java similar to that of bcantrill:
I'm glad it preventively reduces the number of code written in C++
bye @golden sonnet
So pretty much all the libraries are on PyPI, where pip gets the packages it installs.
ah i see
However, you'll typically look for packages with google or by word of mouth
I usually look for stuff like that by saying python 3 [thing here] So probably in this case python 3 stock trading. You'll probably find articles about it, which will mention libraries and what not
alright
i mean
i think if i try just messing around with stuff
i can learn
idk i hate like the classroom-esq setting
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
where its like individually learning things
⬜
--kick james
this is a nice flag
We've got tons of options listed for getting a handle on self education
This is a nice flag
where did all "u"/"you" names go
daamn, it takes me too long to join the trend
I'll be honest, I've been tuning you guys out for the past few minutes
your the worst class clown tbf
what would the topic be for what im trying to accomplish?
!ban @lavish rover
mustafa is just a teachers pet
Bhailang is dynamically typed toy programming language, based on an inside joke, written in Typescript. Created by Aniket Singh and Rishabh Tripathi.
Nothing like office politics to start the day
guess you don't know me at all lmao
Well, I'd recommend getting the basics of the language down if you haven't already. Need a firm foundation to work from. From there.... perhaps the folks in #data-science-and-ml can help with that kind of stuff? Not really sure, honestly
gotcha
i don't have any basics
lmfao
(*joining the trend after it ended*)
whois lmao?
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
I'd recommend looking at "A Byte of Python"
Or if youtube videos are more your jam, we've got a couple channels listed on the resources page that are great
I just personally prefer reading so I can go at my own pace
Aren't you supposed to be on a work call sir
And of course you can always ask questions here for clarification on concepts and what not
Me? Already did that like.... an hour ago
Time flies
he is, just people don't prefer to have him as IT support i guess
is corey a good one?
Yep, he's great
or like that mosh guy or wtvr his name is
from ultralytics.yolo.v8.detect import DetectionPredictor
import cv2
import pyttsx3
model=YOLO("C:/Users/USER/Desktop/py/best.pt")
results=model.predict(source="0", show=True)
print(results)``` how to add audio file upon prediction of object
I personally like Corey. And not just because I've chatted with him before
whois corey?
Corey Schafer
You have?
Welcome to my Channel. This channel is focused on creating tutorials and walkthroughs for software developers, programmers, and engineers. We cover topics for all different skill levels, so whether you are a beginner or have many years of experience, this channel will have something for you.
We've already released a wide variety of videos on to...
thank you so much man
Any time!
I cant find any youtube videos
i really appreciate the help 🙏
Happy to help, it's why I'm here
What kind of starting point are you needing?
hemlock usally is the one that asks for help. how the tables have turned
That's news to me
How do I play an audio file or text to speech upon object detection ```from ultralytics import YOLO
from ultralytics.yolo.v8.detect import DetectionPredictor
import cv2
import pyttsx3
model=YOLO("C:/Users/USER/Desktop/py/best.pt")
results=model.predict(source="0", show=True)
print(results)```
Huh I don't actually know. I haven't futzed around with those libraries before
Well actually wait
What are the results if it does detect and if it doesn't
still failing @hoary olive
0: 480x640 1 drone, 561.0ms this is what I get in the terminal
"Party Rock Anthem" is a song by American music duo LMFAO, featuring British singer Lauren Bennett and American music producer GoonRock. It was released as the first single from their second album Sorry for Party Rocking in 2011.
The single went to number one by the late summer of 2011 in Australia, Belgium, Brazil, Canada, Denmark, France, Germ...
the detection happens at most once during script's execution, right?
(so, like, not a service-ish thing running all the time, just a one-time check)
Yeah I was in college at that time
dont worry maybe one day
man their band got fed up
@mossy cedar Well you're not wrong
they had this fight
well no I cant
AYO WTF
he hates me
So is the issue that you can't play audio files at all or just in the case of detection
if you can convert results to bool of whether the detection happen, then probably you can
dont worry i hate you too ❤️ ! /s joking
0: 480x640 1 drone, 561.0ms these are the results in terminal upon detection
while True:
if detected():
break
time.sleep(...)
make_a_sound()
😢
from ultralytics.yolo.v8.detect import DetectionPredictor
import cv2
model=YOLO("C:/Users/USER/Desktop/py/best.pt")
results=model.predict(source="0", show=True)
print(results)``` how do I add it in this code and play the mp3?
so, two parts:
implement def detected() -> bool:
implement def make_a_sound() -> None:
funny?
wait a sec, I have a code for something similar
Bio Sharpies
there is a package
That specific brand of markers
I used sounddevice to play audio, including playing from files
(((or maybe you can just call ffplay)))
though not great for mp3
from playsound import playsound
playsound('audio.mp3')
this is fine
I have no idea of the bool logic you have spoken
kinda new sry
looks like you need some way to determine whether or not something was detected, right?
yea
what nestle used to do
can you give an example of results in case it detected an in case it didn't?
0: 480x640 1 drone, 561.0ms these are the results in terminal upon detection
and if no detection?
Hes def 37
0: 480x640 1 drone, 561.0ms detection 0: 480x640 654.0ms no detection
looks like this may work
detected = ',' in str(results)
though
what type is results?
print(type(results))
print(dir(results))
it returns video, class name, number of classes , image size
I think magical girl knows this, but they had these alternatives to milk (from mothers). and they had this group go to africa and advertise this. so it got popular right? but this milk had sum shit within it which made the kids addicted to it, so more demand. Not too sure about this part, but this is what a recal. And then there was this huge lawsuit about them brainwashing innocent women and .... This is because the mothers had to supply the milk, because they didnt have money to buy it from nestle
hes 80
most definitely
is there a way to access the number of detected objects?
80 sounds hot
@magic rose can you run this and show the output?
bro this isnt funny
Addictive Milk Additives
Also a good album name
doubt he has wood 😉
same results @vocal basin
monical + top hat + cane + spatz shoes + x + y + z
replace print(results) with print(results.boxes)
it should output only the detections, I guess
I can't stand funding our local schools... dreadful, push those little brats out into the cold I say. Then we should be pooing outside our homes like god intended. I just love the smell of fresh sewage in the morning.
welp bad brain today
though it may error, tbh
excuse my slip ups
Oh god.... AI generated filler episodes
still the same @vocal basin
what's the output?
(did you save the file?)
the same output
Icepick and a steady hand
this output
HA
fun fact
what does print(type(results)) print?
it can't print the same
they actually burn a layer on your eyes
@mossy cedar So glad you caught yourself there
because your eye isnt actually smooth
So very very glad you caught yourself
so this way the contact goes on smoothly
YES SIRR
@mossy cedar Please please please please don't be creepy
Let's just
Not
Pretty sure I've called you out on this before
COMN JUST CHILLING
thats weird
same results
im tired too
suck ....
Hmmmmmmmmmmmmmmmmmmmm
i cant wait for my week to finish...
Literally nothing
hemlock????
I make a joke from time to time
hes the worst C# developer
@magic rose
what's the code now? are sure it's saved?
if it does print(type(results)) and if the source file is saved, the output can't be the same as before
certified
Yeah, fuck that Hemlock guy
you idiot 🤣
i quit @hoary olive
print(type(...)) can't give this results
Trying to remember how many there were
he has kids i quit @hoary olive
but i dont. joking
💀
I'll take that out of context as a description of AF
@vocal basin I just found out something
can you just stop being creepy @mossy cedar ?
we dont need a print statement
from ultralytics.yolo.v8.detect import DetectionPredictor
import cv2
from playsound import playsound
model=YOLO("C:/Users/USER/Desktop/py/best.pt")
model.predict(source="0", show=True)
this works fine
because of show=True
yes
woah woah chill bud
if you want to access that from the program, you need to remove show=True
and use results
first of all, find out what print(type(results)) prints
Aight
it should be either "dict" or "Results"
Hey you!
Yeah, you!
Heck you man
dawg hes with "hemlock guy"
unfortunately I keep getting the same ouptut no matter what
My favorite anime of all time: Mushi-shi
@proven fox @willow light you guys talk from experience i see
So good
did you save the script file? or is it auto-saved?
autosave
I still stand by Macross Frontier
supply and demand brother , supply some good ones for me ;) 20-40m prefered
my head is hurting been going on this for 6 hrs on a 7 line code
"predicted good things"?
take a walk around the block drink some water then come back to it'
gonna head out yall
but I got a deadline tom
have a nice day

you are stuck on it. take a 2 minute break away from it and come back with a fresh perspective. also water helps @magic rosewith headaches
I already took a break yesterday.. I am again doing it now. no progress
Charles Darwin simulator
"In the compiler alone":
a horror movie about a programmer finding themselves working on an ancient custom Fortran compiler, who joined just days before the last person working on it died of old age, trying to save the company from going out of business
HA
Infinite number of coders writing an infinite number of lines will eventually write the Necronomicon?
infinite number of coders writing an infinite number of lines will eventually implement half of C++ specification
It's not bad if you turn it up
cya @hoary olive
"time machine"
a horror movie about a gamer that is transported back into time and stuck using an old dialup connection trying to download his favorite fps game
yeah, sorry i got it on max
dk what else i can do
Don't lie to him
@willow light try jack and coke@mossy cedar
Give me cider any day
Love it Lancebot
scotch plain is amazing
I'm more a fan of bourbon. I have a bottle of Elijah Craig that I'm going through VERY slowly
@vocal basin
i just noticed something
all the terminal lines are in red
I printed a yes statement
its in white
It's foul
so technically theres no terminal output?
Haaaaate the taste
ish dat ur doggoo aww sooo cuuuteee
It's not licorice
Strawberry usually
Sugar
Standard Twizzlers flavor is strawberry
They also have cherry
whats the closest thing to alchohol but not alohol
how to get high without geting high-
as for close to ethanol but not ethanol, there's methanol
just don't drink it, it's much less intoxicating and much more toxic
the gym usually works for that.
Where!?
GIVE
if you want the good candy, just go to The Cape
I thought "methanol." was too cruel of a response, so did the ~~formatting~~
y
was going to say "baseball bat" too
yes i do like sucking on things
I usually just swallow twizzlers whole.
That does not sound pleasant
As in 1000 layers of itself?
Not about competing. Just having fun
Yeah! You at least need some cocaine too!!
No, I'm a hobbyist
I'm administrative support at an accounting firm
Mostly do IT work
I'm an SRE, and Python is my preferred language for doing work.
Although increasingly I've been using Go and TypeScript.
@proven fox Dude please mute if you're going to cough
Jesus
Mucus
Please don't
No please
@proven fox Not overly appropriate for here
Majority yes
And boy howdy did they
There's already models for that
Anime images
mage.space
It's a site
They have a lot of models listed
What’s a dolly
mage.space HAS midjourney on it
Yes
AI generate me
Dall-E
Don't share
Can I use to generate myself
Hard to generate what we have no context for
There are several models, such as the Global Forecast System, the North American Model, the European Centre for Medium-range Weather Forecasts, the New Mesoscale Model, the High Resolution Rapid Refresh, etc.
I still need to get a better handle on the pixel art ones
do my cat first
Mine too
It'll bounce the link if it isn't white listed
And I don't know if it - ah we must have added it. Oh no wait, I think verified ones are also in the clear
They have a generator on there
cute kitty
Okay now where to go
I’ll stick with this AI generated image
@willow light Well played
Can we not with this creepy sexual stuff?
@mossy cedar
Not in the server, guys
Don't care what you do, just not here in the server
@proven fox Satanic
Yes, how dare I try to enforce the rules of the server
What a bastard I am
get 'em boss!
a
@proven fox You want to stream your game? Plenty of other servers for that
Enjoy
I remember asking whether something (that can reasonably be qualified as from the second list) was fine and getting an answer that it was okay or at least that it wouldn't get restricted
@proven fox
there are different definitions of OOP
python's OOP includes most things like Java except for static typing
also
Java
Java's lambdas aren't really objects
same for C#
OOP isn't spaghetti
OOP is just popular and people who write spaghetti code usually go for popular things
!e
print(issubclass(type, object))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
hmm
python's dynamic nature in some sense allow for more of "everything is an object"
even namespaces are objects
if my understanding is correct, each time you refer to a variable, you do a dictionary lookup
that's
something to be worried about, I think
same for most dynamic languages
!e
print(type(globals()))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
<class 'dict'>
true
anime's ass
its good
but the theme is too dark
i mean the brightness lvl
of the movie
its all made in a very low light theme
for sum reason
sorry come again?
couldnt hear you
ps?
one
13 cel
!e
from collections import defaultdict
d = defaultdict(lambda: 0)
d.update(__builtins__.__dict__)
exec("print(a, b, c)", d)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
0 0 0
20 ml of ethanol, iirc
Yeah I sleep terribly when I've had a drink
and around 40~50 is the upper limit for any correlation with benefits
wat how?
I've had the best sleep of my life
I think you fall to sleep quicker, but the quality of the sleep is worse 🤔
Just stumble in...
Throw myself in bed...
Roll off the dog...
play minesweeper
Maybe this is an old person thing 
Sleep all night that way
spread the addiction
Since when are you old?
My memory has you in college
30, so by PyDis standards I'm ancient 😄
Part time
ic ic
True
.minesweeper start
:x: @stuck furnace, please enable DMs to play minesweeper.
:C
I was around 2230
now it's 2288
"progress"
I've betrayed minesweeper for chess
Just press CTRL + SHIFT + I in your browser and cookie clicker is completed
because people in chess actually decrease their rating compared to me
after 0 games, I went up from 50.1% to 51.4%
Then fire ze missiles!
I've got to head off now 👋
Bye LX!
(I've actually mostly heard it pronounced ki/khi not tshi)

It got me thinking about the time and effort I had to give to my bestiee and I was so happy to be able to get a decent amount of sleep
Ox-Scythe?
I would open the mic if you had permission to do so
Game dev is hard
!e
file = """Maria Loves Playing Handball Except Alone
Jacob Likes Soccer Except With His Friends"""
a = file.split('\n')
print(a[0][20:])
@verbal zenith :white_check_mark: Your 3.11 eval job has completed with return code 0.
['Maria Loves Playing Handball Except Alone', 'Jacob Likes Soccer Except With His Friends']
Handball Except Alone
Maria Loves Playing Handball Except Alone
Jacob Likes Soccer Except With His Friends
!e
file = """Maria Loves Playing Handball Except Alone
Jacob Likes Soccer Except With His Friends"""
a = file.split('\n')
print(a[0][20:])
Handball except alone
@verbal zenith :white_check_mark: Your 3.11 eval job has completed with return code 0.
Handball Except Alone
!e
file = """Maria Loves HighSpeed Handball Except Alone
Jacob Likes Soccer Except With His Friends"""
a = file.split('\n')
print(a[0][20:])
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
d Handball Except Alone
!e
file = """Maria Loves Playing Handball Except Alone
Jacob Likes Soccer Except With His Friends"""
a = file.split(' ')
a = [b.split('\n') for b in a]
@verbal zenith :white_check_mark: Your 3.11 eval job has completed with return code 0.
['Maria', 'Loves', 'Playing', 'Handball', 'Except', 'Alone\nJacob', 'Likes', 'Soccer', 'Except', 'With', 'His', 'Friends']
!e
file = """Maria Loves Playing Handball Except Alone
Jacob Likes Soccer Except With His Friends"""
a = file.split(' ')
a [x for y in a for x in y]
print(a)
@verbal zenith :white_check_mark: Your 3.11 eval job has completed with return code 0.
[['Maria'], ['Loves'], ['Playing'], ['Handball'], ['Except'], ['Alone', 'Jacob'], ['Likes'], ['Soccer'], ['Except'], ['With'], ['His'], ['Friends']]
!e
file = """Maria Loves Playing Handball Except Alone
Jacob Likes Soccer Except With His Friends"""
print([file[i%2::2] for i in range(5)])
@arctic spire :white_check_mark: Your 3.11 eval job has completed with return code 0.
['MraLvsPaigHnbl xetAoeJcbLksSce xetWt i red', 'ai oe lyn adalEcp ln\nao ie ocrEcp ihHsFins', 'MraLvsPaigHnbl xetAoeJcbLksSce xetWt i red', 'ai oe lyn adalEcp ln\nao ie ocrEcp ihHsFins', 'MraLvsPaigHnbl xetAoeJcbLksSce xetWt i red']
Is this the desired output?
nope
!e
file = """Maria Loves Playing Handball Except Alone
Jacob Likes Soccer Except With His Friends"""
a = file.split(' ')
a = [x for y in [z.split('\n') if '\n' in z else z for z in a] for x in y]
print(a)
No equals
@verbal zenith :white_check_mark: Your 3.11 eval job has completed with return code 0.
['M', 'a', 'r', 'i', 'a', 'L', 'o', 'v', 'e', 's', 'P', 'l', 'a', 'y', 'i', 'n', 'g', 'H', 'a', 'n', 'd', 'b', 'a', 'l', 'l', 'E', 'x', 'c', 'e', 'p', 't', 'A', 'l', 'o', 'n', 'e', '\n', 'J', 'a', 'c', 'o', 'b', 'L', 'i', 'k', 'e', 's', 'S', 'o', 'c', 'c', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'W', 'i', 't', 'h', 'H', 'i', 's', 'F', 'r', 'i', 'e', 'n', 'd', 's']
!e
from re import split as resplit
file = """Maria Loves Playing Handball Except Alone
Jacob Likes Soccer Except With His Friends"""
a = file.split(' ')
a = [x for y in [resplit('\n', a) for z in a] for x in y]
print(a[a.index('Handball'):a.index('\n')])
@verbal zenith :white_check_mark: Your 3.11 eval job has completed with return code 0.
['Handball', 'Except', 'Alone', 'Jacob', 'Likes', 'Soccer', 'Except', 'With', 'His', 'Friends']
so i dont want to print after the end of the sentence
!e
from re import split as resplit
file = """Maria Loves Playing Handball Except Alone
Jacob Likes Soccer Except With His Friends"""
a = file.split(' ')
a = [x for y in [resplit('(\n)', z) for z in a] for x in y]
print(a)
print(a[a.index('Handball'):a.index('\n')])
@verbal zenith :x: Your 3.11 eval job has completed with return code 1.
001 | ['Maria', 'Loves', 'Playing', 'Handball', 'Except', 'Alone', 'Jacob', 'Likes', 'Soccer', 'Except', 'With', 'His', 'Friends']
002 | Traceback (most recent call last):
003 | File "<string>", line 8, in <module>
004 | ValueError: '\n' is not in list
!e
from re import split as resplit
with open(txt).read() as file:
a = [x for y in [resplit('(\n)', z) for z in file.split(' ')] for x in y]
print(" ".join(a[a.index('Handball'):a.index('\n')]))
@verbal zenith :white_check_mark: Your 3.11 eval job has completed with return code 0.
Handball Except Alone
from re import split as resplit
import getpass
usrname = getpass.getuser()
file = open(f"C:/Users/{usrname}/AppData/Local/Temp/testing123.txt").read()
a = file.split(' ')
a = [x for y in [resplit('(\n)', z) for z in a] for x in y]
print(" ".join(a[a.index('Handball'):a.index('\n')]))
I found out GitHub Actions takes this today
Was very suprised
IDK
a: [name: hemlock,
name: rabbit,
3,
4,
5]```
Never seen it in workflows before
!eval
import yaml
print(yaml.load("""
a: [name: hemlock,
name = rabbit,
3,
4,
5]
"""))
@sweet lodge :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 | TypeError: load() missing 1 required positional argument: 'Loader'
deployment.yaml line 51
pyyaml~=6.0```
!e python test = (""" a: [name: hemlock, name = rabbit, 3, 4, 5] """) import yaml a = yaml.load(test) print(a)
@amber raptor :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 9, in <module>
003 | NameError: name 'Loader' is not defined
!e python test = (""" a: [name: hemlock, name = rabbit, 3, 4, 5] """) import yaml a = yaml.load(test, Loader=yaml.Loader) print(a)
@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.
{'a': [{'name': 'hemlock'}, 'name = rabbit', 3, 4, 5]}
🎉

!e python test = (""" software_version: 3.1.4""") import yaml a = yaml.load(test, Loader=yaml.Loader) print(type(a['software_version']))
@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.
<class 'str'>
!e python import json a=json.loads("""{software_version: 3.1.4}""") print(a)
@amber raptor :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 | File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads
004 | return _default_decoder.decode(s)
005 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
006 | File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
007 | obj, end = self.raw_decode(s, idx=_w(s, 0).end())
008 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
009 | File "/usr/local/lib/python3.11/json/decoder.py", line 353, in raw_decode
010 | obj, end = self.scan_once(s, idx)
011 | ^^^^^^^^^^^^^^^^^^^^^^
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/imapayonud.txt?noredirect
!e ```py
test = ("""
software_version: 012
""")
import yaml
a = yaml.load(test, Loader=yaml.Loader)
print(a['software_version'])
@stuck furnace :white_check_mark: Your 3.11 eval job has completed with return code 0.
10
!eval 
from tomllib import loads
print(loads("""
[project]
name = "imsosorry"
version = "1.2.0"
description = "Sometimes it can be necessary to call upon the ancient arts..."
"""))
@sweet lodge :white_check_mark: Your 3.11 eval job has completed with return code 0.
{'project': {'name': 'imsosorry', 'version': '1.2.0', 'description': 'Sometimes it can be necessary to call upon the ancient arts...'}}
!eval 
from tomllib import loads
print(loads("""
[project]
name = "imsosorry"
version = 1.2.0
description = "Sometimes it can be necessary to call upon the ancient arts..."
"""))
@sweet lodge :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 | File "/usr/local/lib/python3.11/tomllib/_parser.py", line 127, in loads
004 | raise suffixed_err(
005 | tomllib.TOMLDecodeError: Expected newline or end of document after a statement (at line 4, column 14)
Hola birdo
this is why you don't talk on discord and drive at the same time
oh god this audio quality
What
maybe dust off one of those 130 something abandoned projects you have lying around
No
I'm working on an SSG
They're abandoned
Much to Aboo's pleasure
I need a new thing
In Rust, of course
Perhaps
You think differently?
i'm built differently
It's okay birdo
One day you'll grow up and you'll learn about the devoops and the packaging and you'll be a real developer

And then really hate programmers
That's devops' job
devopoloper
👋
one said that to fight your ocd you should put your hands inside a really dirty trash can and just mess around it
like go deep and stuf
idk if it works tho
Do frozen gyoza count?
Dumplings are intimidating (well, they can be). But they also are, in fact, delicious. No matter what you stuff them with, the concept of pillowy, soft dough encasing a luscious, super flavorful filling is enough to warm you up from inside to out. Well, with our homemade dumpling recipe, we’re bringing that warm, fuzzy feeling right to your very...
We have dumplings, but they're the kind without any filling.
Like matzah.
Pretty much
we have 0 🙂
Congrats, you are getting slightly less terrible McDonalds
Australian McDonnalds is decent.
i'm pretty sure those spiders can eat u
we have the hottest place on earth if you are interested
Haven't eaten McDonalds overseas unless it was on a military base which imports from US.
I can appreciate that from a security perspective, but that's also one of the more aggressively American things I've read.
"McDonalds next door? Fff! Fuck that. I'm having American cow!"
It's not security, it's morale boosting. It's so American military members feel like they are still in America.
Makes a sense.
If you ever saw military housing overseas, it screams "AMERICAN SUBURBS!"
Do they hire actors to play Karens and HOA busybodies?
I assume there are regs for upkeep.
Nope, don't need to, just have First Sergeant wife do it.
Yea, there are a bunch of regs and you get dinged for not doing it.
They flipped it?
scientific is kelvin tho
kelvin is too hard
also c is based on freezing and boiling
so you can have a good understanding of how much it actually is
I don't follow.
It used to say "OpalMist [and [x | x others]] reacted with <emoji>".
nope there was an update the other day it probably happend then
Yah.
@storm crystal 👋
this studies bring nothing new
my point is u have to go to a t30 school in order to be a competitive applicant for investment banking
yes, it has always be like that
yeah
GOING TO HELP WITH MATH HOMEWORK.
yes, it is kind trash
it is why i am not really enjoy to go in finance at university
i am targeting like hedge funds job
i don't understand why he get angry so fast lol
Because I don't like being mansplained to.
i am living in canada and i know that brand
brotha
i wasnt trying to mansplain to u
i was asking u if u know what Dunkin Donuts is
i know ppl in California who don't know what it is
so i dont expect someone who doesnt live in east coast america to know what it is
but there is no Dunkin Donuts in canada
why are you here if you don't develop, i'm curious
it don't took a lot of times to learn python
ah yeah
i did one already but it was kinda trash
To do that you need a big team and funding
You know Hedge Funds like Citadelle spend like thousands of milions to do that
Like it is kinda easy to do but if you like crazy win rate of trade, it is barely impossible
yes, some best bot can do around 20% by year
you don't need crazy rate
just need to past like bank trade
bank usually do like max 6% year
as a casual trade with medium risk i do around 15% by year
if he can beat me maybe
It will need a lot of learning
for a good bots probablly around 200k hours of trainning or more
nah you can run it in like 10 computer and speed up
it is kinda like cryptomining
yes, it is like that chatgpt has been train
i say a 200k hours but idk cuz like i am very far to be a pro in machine learning
you will need like tons of data of market
to train it
like he close position to fast or don't enter at right time
he is like human
he do the same mistake as us cuz he is not god
@whole bear 👋
I've committed too much time towards working with this mod
https://ocdoc.cil.li/
as for python, yes/no input doesn't seem to be built-in but there definitely are some packaged implementations of it
large interactive CLI tools do have to reuse that functionality and refine it, so maybe steal take (and credit the authors)
user_input = input(...).casefold() #or str.lower or str.upper
if user_input in (...):
...
elif user_input in (...):
...
else:
...```
that letter as always serves an example
yes, the correct comparison is A.casefold() in {B.casefold()}
(if for any reason unicode's casefold algorithm or specific cases get changed)
Jon Skeet usually gives Mongolian vowel separator as an example of symbols moving around between character sets
that one got moved twice
(the first thing referenced in that video)
https://youtu.be/JIlO_EebEQI
What language could be complete without some horrible abuse? If you can't do terrible, evil things with it, how could you ever create works of great art?
Of course, anyone can write plain bad code. The trick for really evil code is to make it attractive; to make it seduce you with it utility, brevity and general glamour. Pierce that attractive e...
probably, also input(...).casefold().strip()
and maybe something like elif not user_input: for default option
what a great weather was yesterday
"N/A"
Make love, not war. Get vaccinated. Wear a mask. Wear it on your face. Don't vote for bullies. An educated world rewards everyone. Be brave. Be kind. Create. Breathe. Sing.
@somber heath
above all else, drink moxie
that commit name
it's giant
"maybe", one of the typical commit words
@somber heath your very rude person they shouldn’t be on our note
the commit was last to change a license file, so I thought it was boring because licensing but no
!rule 2
2. Follow the Discord Community Guidelines and Terms Of Service.
I don't respond well to racism. What can I say?
even if it happened then what?
I wasn’t he races
Telling me, you don’t have time for me and you said something else as well
any amount others' guilt doesn't absolve the entirety of yours
coming with my verified account
if you have default bindings, ctrl+alt+L I might suggest
(fix the style)
"I found another library to do it"
like a JS dev not wanting to write the code checking whether a number is odd
though isodd/iseven packages aren't too well for that remark because they actually have reasons to exist
because those checks aren't perfectly trivial
I've just listened to some generated "music" ("sound"/"sounds" rather)
I don't understand why it is the way it is
like, I know this is not some sort of AI, it's just an equation that's converted through wave-to-midi tools
but it just sounds too varied at some points
just one big rounding error
listening to this is addictive for me
idk why
maybe because of how unpredictable/unstructured that thing sounds
!e ```py
class MyClass:
def my_function_or_method(self, a, b):
pass
my_instance = MyClass()
my_instance.my_function_or_method(1, 2)
MyClass.my_function_or_method(1, 2)```
@somber heath :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 7, in <module>
003 | TypeError: MyClass.my_function_or_method() missing 1 required positional argument: 'b'
# a common error is to do
detector = Detector # incorrect
# instead of
detector = Detector(...) # probably correct
detector = htm.handdetector
I'd expect there to be () at the end
read what PyCharm shows you more often
idk if it does the "did you mean to instantiate?" thing
would be great if it did
it's less unconventional for things like iterators (see itertools.* and range)
because they almost behave like generators
so, like, in some way indistinguishable from function calls
@strong thunder 👋
@buoyant cradle 👋
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
hi mist
im new to programming
im learning to code now
do you know of a great place to chat with new programmers?
ok
thanks
thanks
im doing some studying on python for a career change
greetings
online
greetings speedro
i cant find any local affordable courses right now in my area
here :)
You can read through documentations / papers aswell. or youtube
@velvet axle 👋
im looking for a place where i can talk about programming and coding
i hope to get pass the voice verification soon
🤷 😄
I have a list of x number of dictionaries with 2 key:value pairs in each dictionary.
Each dictionary contains the same keys, but the values of the keys are a mix of different and similar compared to each dictionary.
I want to compare all the dictionaries to each other and print the ones that have more than one occurrence of a certain value
[{1:”a”, 2:”b”}, {1:”c”, 2:”d”}, {1:”a”, 2:”e”}, {1:”f”, 2:”b”}]
!e py import pathlib paths = [*pathlib.Path('/').rglob('*')] print(paths)
@somber heath :x: Your 3.11 eval job has completed with return code 143 (SIGTERM).
[PosixPath('/usr'), PosixPath('/snekbox'), PosixPath('/lib64'), PosixPath('/lib'), PosixPath('/etc'), PosixPath('/usr/local'), PosixPath('/usr/lib'), PosixPath('/usr/local/bin'), PosixPath('/usr/local/lib'), PosixPath('/usr/local/bin/python3.11'), PosixPath('/usr/local/bin/python3'), PosixPath('/usr/local/bin/python'), PosixPath('/usr/local/lib/python3.11'), PosixPath('/usr/local/lib/libpython3.11.so.1.0'), PosixPath('/usr/local/lib/libpython3.so'), PosixPath('/usr/local/lib/pkgconfig'), PosixPath('/usr/local/lib/libpython3.11.so'), PosixPath('/usr/local/lib/python3.11/stringprep.py'), PosixPath('/usr/local/lib/python3.11/modulefinder.py'), PosixPath('/usr/local/lib/python3.11/_markupbase.py'), PosixPath('/usr/local/lib/python3.11/signal.py'), PosixPath('/usr/local/lib/python3.11/statistics.py'), PosixPath('/usr/local/lib/python3.11/pty.py'), PosixPath('/usr/local/lib/python3.11/ntpath.py'), PosixPath('/usr/local/lib/python3.11/rlcompleter.py'), PosixPath('/usr/local/lib/python3.11/mai
... (truncated - too long)
Full output: too long to upload
!d collections.Counter
class collections.Counter([iterable-or-mapping])```
A [`Counter`](https://docs.python.org/3/library/collections.html#collections.Counter "collections.Counter") is a [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "dict") subclass for counting hashable objects. It is a collection where elements are stored as dictionary keys and their counts are stored as dictionary values. Counts are allowed to be any integer value including zero or negative counts. The [`Counter`](https://docs.python.org/3/library/collections.html#collections.Counter "collections.Counter") class is similar to bags or multisets in other languages.
Elements are counted from an *iterable* or initialized from another *mapping* (or counter):
```py
>>> c = Counter() # a new, empty counter
>>> c = Counter('gallahad') # a new counter from an iterable
>>> c = Counter({'red': 4, 'blue': 2}) # a new counter from a mapping
>>> c = Counter(cats=4, dogs=8) # a new counter from keyword args
@hoary olive :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e
import os
os.mkdir('/home/ok')
print(os.listdir('/home'))
@hoary olive :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 | FileNotFoundError: [Errno 2] No such file or directory: '/home/ok'
!e
import os
path = 'usr/home/ok/'
try:
os.mkdir(path)
except OSError as error:
print(error)
@hoary olive :white_check_mark: Your 3.11 eval job has completed with return code 0.
[Errno 2] No such file or directory: '/home/ok/'
It's easy to find duplicates in a Python list. And removing duplicates is even easier. There are several methods in Python. The best way to
[{1:”a”, 2:”b”}, {1:”c”, 2:”d”}, {1:”a”, 2:”e”}, {1:”f”, 2:”b”}]
print
[{1:”a”, 2:”b”}, {1:”a”, 2:”e”}, {1:”f”, 2:”b”}]
!e py import collections data = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4] count = collections.Counter(data) print(count)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
Counter({4: 4, 3: 3, 2: 2, 1: 1})
Four fours, three threes, two twos, one one.
Or...
!e py data = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4] seen = set() for element in data: if element in seen: print(f'{element} is a duplicate!') seen.add(element)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 2 is a duplicate!
002 | 3 is a duplicate!
003 | 3 is a duplicate!
004 | 4 is a duplicate!
005 | 4 is a duplicate!
006 | 4 is a duplicate!
and usecase?
so why not count?
why use os when there is pathlib?
isnt count more optimized?
I stand by my opinion that, for most applications, os.fsync is almost the only useful function from os module
Counter is faster in theory, but has higher fixed overhead, especially compared to str.count, which can scan the underlying C array with direct memory comparisons, where list.count has to do rich comparisons for each element; converting moves to a list of single characters nearly triples the time for foo1 in local tests, from 448 ns to 1.3 μs (while foo2 actually gets a tiny bit faster, dropping from 5.6 μs to 5.48 μs).
@nova oriole @steady crater 👋
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
def compare_dicts(dict_list):
value_count = {}
for dictionary in dict_list:
for value in dictionary.values():
if value not in value_count:
value_count[value] = 1
else:
value_count[value] += 1
result = []
for dictionary in dict_list:
for value in dictionary.values():
if value_count[value] > 1:
result.append(dictionary)
break
return result
!e
import time
start = time.time()
print([4, 2, 3, 3, 4, 5, 4, 2, 4, 1].count(4))
end = time.time()
print("moew + %s" % (end - start))
@hoary olive :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 4
002 | moew + 0.00023889541625976562
input = [{1:"a", 2:"b"}, {1:"c", 2:"d"}, {1:"a", 2:"e"}, {1:"f", 2:"b"}]
print(compare_dicts(input))
[{1: 'a', 2: 'b'}, {1: 'f', 2: 'b'}]
what's the specification for the function?
!e
import time
start = time.time()
import collections
data = [4, 2, 3, 3, 4, 5, 4, 2, 4, 1]
count = collections.Counter(data)
print(count[4])
end = time.time()
print("moew + %s" % (end - start))
@hoary olive :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 4
002 | moew + 0.006192207336425781
def compare_dicts(dict_list):
value_count = {}
for dictionary in dict_list:
for value in dictionary.values():
if value not in value_count:
value_count[value] = 1
else:
value_count[value] += 1
result = []
for dictionary in dict_list:
for value in dictionary.values():
if value_count[value] > 1:
result.append(dictionary)
break
return result
input = [{1:"a", 2:"b"}, {1:"c", 2:"d"}, {1:"a", 2:"e"}, {1:"f", 2:"b"}]
print(compare_dicts(input))
not a big of a difference, but still a bit slower
using % for formatting in python
what length are you testing on?
length and sample count
this is literally measuring import time
!e
import time
import collections
start = time.time()
data = [4, 2, 3, 3, 4, 5, 4, 2, 4, 1]
count = collections.Counter(data)
print(count[4])
end = time.time()
print("moew + %s" % (end - start))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 4
002 | moew + 0.00015664100646972656
"look, it's 40 times faster"
man im an idiot
value_count = {}
for dictionary in dict_list:
for value in dictionary.values():
if value not in value_count:
value_count[value] = 1
else:
value_count[value] += 1
result = []
for dictionary in dict_list:
for value in dictionary.values():
if value_count[value] > 1:
result.append(dictionary)
break
return result
input_dicts = [{1:"a", 2:"b"}, {1:"c", 2:"d"}, {1:"a", 2:"e"}, {1:"f", 2:"b"}]
print(compare_dicts(input_dicts))
what do you mean?
!e ```
data = [4, 2, 3, 3, 4, 5, 4, 2, 4, 1]
print(len(data))
too small to get proper results
to get valid data, you should either
repeat this test multiple times without any prints/anything between samples
or
use longer input
thats what the code logic is
I learned this the hard way
("thanks" to import aiohttp)
also, that time I learned to never use python for anything similar to CGI
this one does
check it
try running
it was fun hanging out with you guys. i'll be back tomorrow
!e py import collections a = [{1:"a", 2:"b"}, {1:"c", 2:"d"}, {1:"a", 2:"e"}, {1:"f", 2:"b"}] b = [] for d in a: b.extend(d.values()) count = collections.Counter(b) print(count)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
Counter({'a': 2, 'b': 2, 'c': 1, 'd': 1, 'e': 1, 'f': 1})
he doesnt want to print C and D
!e
import random
nums = random.getrandbits(128)
moew = ','.join(nums)
!e```
def compare_dicts(dict_list):
value_count = {}
for dictionary in dict_list:
for value in dictionary.values():
if value not in value_count:
value_count[value] = 1
else:
value_count[value] += 1
result = []
for dictionary in dict_list:
for value in dictionary.values():
if value_count[value] > 1:
result.append(dictionary)
break
return result
input_dicts = [{1:"a", 2:"b"}, {1:"c", 2:"d"}, {1:"a", 2:"e"}, {1:"f", 2:"b"}]
print(compare_dicts(input_dicts))```
@sharp urchin :white_check_mark: Your 3.11 eval job has completed with return code 0.
[{1: 'a', 2: 'b'}, {1: 'a', 2: 'e'}, {1: 'f', 2: 'b'}]
!e
import random
nums = str(random.getrandbits(128))
moew = ','.join(nums)
print(moew)
@hoary olive :white_check_mark: Your 3.11 eval job has completed with return code 0.
1,4,1,5,8,3,0,4,8,3,6,4,4,7,7,0,2,0,0,2,1,4,3,2,3,9,0,3,9,8,8,0,9,1,1,0,2,7,3
!e
import time
import collections
start = time.time()
data = [1,4,1,5,8,3,0,4,8,3,6,4,4,7,7,0,2,0,0,2,1,4,3,2,3,9,0,3,9,8,8,0,9,1,1,0,2,7,3
]
count = collections.Counter(data)
print(count[4])
end = time.time()
print("moew + %s" % (end - start))
@hoary olive :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 5
002 | moew + 0.00010395050048828125
hope the code's fine now
@hardy torrent 👋
cool then:)
!e
import time
start = time.time()
data = [1,4,1,5,8,3,0,4,8,3,6,4,4,7,7,0,2,0,0,2,1,4,3,2,3,9,0,3,9,8,8,0,9,1,1,0,2,7,3
]
print(data.count(4))
end = time.time()
print("moew + %s" % (end - start))
@hoary olive :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 5
002 | moew + 3.5762786865234375e-05
hey bro, what's up
last time I was graphing performance comparison data, it was based on samples totalling around 260'040'000'000 elements (4 algorithms; 2167 tests; 30'000'000 elements a test)
we can do that
and it still is not clear on some samples what performs better
i'll just do that on w3schools editor 💀
nums = str(random.getrandbits(260000000))
should be accurate enough?
','.join(nums)
!d os.urandom
os.urandom(size, /)```
Return a bytestring of *size* random bytes suitable for cryptographic use.
This function returns random bytes from an OS-specific randomness source. The returned data should be unpredictable enough for cryptographic applications, though its exact quality depends on the OS implementation.
On Linux, if the `getrandom()` syscall is available, it is used in blocking mode: block until the system urandom entropy pool is initialized (128 bits of entropy are collected by the kernel). See the [**PEP 524**](https://peps.python.org/pep-0524/) for the rationale. On Linux, the [`getrandom()`](https://docs.python.org/3/library/os.html#os.getrandom "os.getrandom") function can be used to get random bytes in non-blocking mode (using the [`GRND_NONBLOCK`](https://docs.python.org/3/library/os.html#os.GRND_NONBLOCK "os.GRND_NONBLOCK") flag) or to poll until the system urandom entropy pool is initialized.
this should be in secrets but it's in os
secrets seems to focus on number generation specifically, for which sampling via byte strings may be suboptimal in terms of performance/security
perhaps telling python to generate 260M Integers is not the best idea
I once envisioned a use case for about 500TB of ram. Didn't mean it was a good idea.
less harmful way to get 260M ints
a = [0] * 260_000_000
I can dream.
I'm off for the while. Ta-ta, all.
!e
phase(complex(-1.0, 0.0))
@hoary olive :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'phase' is not defined. Did you mean: 'hash'?
!e
from cmath import phase
print(phase(complex(-1.0, 0.0)))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
3.141592653589793
i thought you could access cmath without importing it for some reason :/
im not a python programmer
I don't remember that many non-mathematical languages where maths function would be in the global namespace by default (as builtins/prelude)
Discrd PTB is for some reason taking 2x cpu as python
thank you guys @sharp urchin @somber heath
@hardy torrent 👋
hey duke
@cunning lake 👋
@sturdy finch 👋
write in chat
Sure. 🙂
there is a function i want to do but i can't
Describe it.
i will help youuuuuuuuuu
I am GOd
OpalMist is a nerddddddddddddddddddddddddddddddd
YEEEEEEEEEEEEEEEEEEEEEEE
now i'm making owo bot in discord maybe you know owo hunt bot i want to do this i will send a message if she writes lost in chat she will write a different text if she writes won i want her to write a different text(dişil)
Hm. One moment.
do you know
uwuwise?
YES HE MUST KNOW HE IS A NERDD
hmm
https://github.com/gitautas/slowo A friend has written this library and it should also be running on this Discord server's Python bot, but I'm not sure about that.
why am i mute how can i open it
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
by LP, one way or another
Is the issue bot integration, or the uwuification, itself?
Yes. I will not.
wait doesn't the repo name mean "word" in Eastern European languages?
(I'm wondering if it's a pun)
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.
@covert hedge do you know
YESSS I KNOW EVERYTHING
I AM REINCARNATION OF GOD
example of describing a function (here, from the excepted behaviour we can deduce that f takes one argument and returns its square)
>>> f(0)
0
>>> f(1)
1
>>> f(3)
9
>>> f(-2)
4
@sturdy finchScreenshots are also acceptable.
Can you be specific as to your problem?
but I want her to read something written in the chat and respond accordingly in the discord chat(dişil)
I understand what is meant by Discord bot. I understand you're doing an owo thing. But what's the problem?
the issue is to make a correct response for the text, right?
not with receiving/sending messages, right?
yes
yes
so, like this for uwuify (stealing from letsbuilda/imsosorry)
>>> uwuify("small")
'smol'
Look, what I'm doing now is writing a message to the owo bot, I need to reply to it as a user, if the bot writes a word about the word won, I will write a message accordingly, but if the word lost is mentioned, I will write a different message.
I am using pyautogui library
what does this have to do with bots?
user automation?
!rule 5
5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.
Are you using PyAutoGui to write text into Discord?
yes
@digital sky 👋
We can't help. Sorry. 🙂
this is quite enough to qualify as !rule 5
I can show you if I open a broadcast dm why don't you come
That is my choice.
I am happy to assist where I can in this environment.
Your project is not something I am permitted to help with.
there exist people (for example, me) who try to avoid violating the rules, sorry
please, read #rules and discord ToS
okey
I somehow moved up from top2288 to top2286 in minesweeper online
either some people got banned or some difficulty changes happened (those changes may drop trophy count)
@somber crest 👋
hey man Im trying to unmute mic lol
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
👋
@flint hollow 👋
"I claim this as an AI art piece"
https://cdn.discordapp.com/attachments/412357430186344448/1070900607969394689/maybe_sounds.mp3
React is JS/TS
though two people helped the computer produce it
and there was zero intelligence involved
tensorflow
when working with react, do we need css and html or react does it for you?
to connect react with django, is api the only option?
idk if it is but it should be
My kingdom for a midi file.
Also, "AHHHHH!"







