#voice-chat-text-0
1 messages Β· Page 34 of 1
PEP 8 is the official style guide for Python. It includes comprehensive guidelines for code formatting, variable naming, and making your code easy to read. Professional Python developers are usually required to follow the guidelines, and will often use code-linters like flake8 to verify that the code they're writing complies with the style guide.
More information:
β’ PEP 8 document
β’ Our PEP 8 song! :notes:
!zen
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!
no what i mean is that all the thing i code now at least is just thing to show in the terminal i can't do with this Much
always see youtubers do cool thing with machine learning and i really want to do it to
the tutul model is used for do art right?
what is tkinter?
i saw a lot of vides that suggest to lean numpy, pandas and Matplotlib waht do you think about them?
are you here?
i try this one time like a week ago and this what i think
no i know just python
what you suggest to learn first turtle, tkinter or numpy
hi
what up?
good and u?
i think i am going to try it thank you very much
tkinter is an GUI library right ?
good bey
I've tried it, it's good and not complicated
yeah I know
let's say I wanna play a video by its URL like IPTV as example do you know how ?
what's this?
oh, where I live we have some of this but a bit bigger , there is so much of them in the desert
I'm in Algeria
I'm not sure if it's the same ones as we have here but we call it "ΨΆΨ¨" in Arabic, probably something like this in English "Thab"
most of IPTV URLs is .m3u or .m3u8 , its not videos , something like live stream
yeah I know VLC work
but I want to play it with python , is there a way ?
I've searched , I found video library which can play a video which located in the PC not by URL,
Sooo , which language can do this ?
oh , ok thx
brb
thx, I'll keep searching, if I didn't find maybe I will go for another language
@royal oak π
yo
l
title = """\nHi welcome to Ayden's calculator.\n
To start type in 2 numbers you want to use!"""
print(title)
num1 = input("enter your first number: ")
num2 = input("enter your second number : ")
result1 = float(num1) + float(num2)
result2 = float(num1) - float(num2)
result3 = float(num1) ** float(num2)
result4 = float(num1) / float(num2)
result5 = float(num1) * float(num2)
title2 = """\nOkay so now that you've typed 2 numbers now type either +, -, **, * or / to use the calculator.\nOh and make sure when using exponents the biggest number in math is 10 ** 308 so if you go even 1 over that number you get an error\n """
print(title2)
question = input("do you want plus, minus, exponents, multiplication or division? ")
if question == "+":
print(result1)
elif question == "-":
print(result2)
# This is how we pick between + - ** / *
elif question == "**":
print(result3)
elif question == "/":
print(result4)
elif question == "*":
print(result5)
@rain gale
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
answered some questions, but don't have 50 messages yet
I agree, look at AoC channel to see how people name their variables. Many names are not meaningful
Hello again @somber heath
yeah
anyone learning data science over here
??
i have doubts
Questions on that subject may be directed to the #data-science-and-ml channel.
You could also create a help thread. #βο½how-to-get-help
oh thank you.
@heavy vale
yes? @lethal thunder
can you hear me?
yes
i can hear u
nah
i gt it
i figured it out
what?
can u repeat?
yeah
git
hub
lol
i use like
num py
for machine learning sci - kit
@surreal wyvern why r u talking like in a drunk way
if u dont mind?
go with the flow
@somber heath idk if you remember me but i think ive understood functions better now
That's pleasing news.
Hi vc0
it is im still working on it tho
but its going better
rslts=map(fun,lst)
!e py vs = ["1", "2", "3"] alpha = list(map(int, vs)) beta = [int(v) for v in vs] print(alpha) print(beta)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | [1, 2, 3]
002 | [1, 2, 3]
map(int, vs)
(int(v) for v in vs)```
[*map(int, vs)]
list(map(int, vs))```
Starred unpacking.
Hi
@signal rapids @jaunty mesa π
hi
@crisp dove π
hey !
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
what's is this for ?
what do you mean by this
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.
!e py print("Hello, world.")
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
Hello, world.
!e
py
print("Hi VC0")
@trail mural :x: Your 3.10 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'py' is not defined
!e
print("Hi VC0")
@trail mural :white_check_mark: Your 3.11 eval job has completed with return code 0.
Hi VC0
!e
code
!eval [python_version] <code, ...>
Can also use: e
Run Python code and get the results.
This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside of them.
By default your code is run on Python's 3.11 beta release, to assist with testing. If you run into issues related to this Python version, you can request the bot to use Python 3.10 by specifying the python_version arg and setting it to 3.10.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!
@fickle nimbus π
!e
vc0 = ["Frehtzio","hajaa","me","Mr_x_Sky","OpalMist","the_7g_boi"]
for i in vc0:
print("Hello " + i)
@trail mural :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | Hello Frehtzio
002 | Hello hajaa
003 | Hello me
004 | Hello Mr_x_Sky
005 | Hello OpalMist
006 | Hello the_7g_boi
hello
hello
i may have a dumb question
def foo(num : int):
print(num)
a = foo("What's the point")
what's the point to declare
no no what's the point to declare a int if a can pass a string
xD
!e ```py
def func():
print("A")
return "B"
result = func()
print(result)```
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | A
002 | B
π
Hi Maroloccio
______________________________
it looks like an illusion but I can see the tiny gap inn between
like a kitkat
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
so you know right ?
right know i am learning fastapi but i got a doubt about declaring in a function
no
let me show you
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.
the part that i don' t understand is
user_credentials:OAuth2PasswordRequestForm = Depends()
i making user credentials being like type Auth2PasswordRequestForm
or something ?
yes i need Depends it give me a error if not
the thins is if a do not declare user_credentials to be OAuth2PasswordRequestForm it gives a error thats the part i don't understand
this
this?
so how are you able to bypass this
r--this--
rthis
~~this~~
so to type that you need
\~\~this\~\~
|~|~this|~|~
so if a if fastapi and i declare to be a "int", and i pass a string it will gime an error right ?
or ;~:~this:~:~
** in
thanks i was getting nuts with this
------------------------------
straight line^
..~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.................................
|||||||||||||||||||||||||||||||||||||||||||||||
||this||
\\\\\\\\\\\\\\\\\\\
------------------------------------------------------------------------------------------------------------------
hi NEXT PARAGRAPH -------------------------------------------------------
how can you write a paragraph with multiple lines? @vocal basin AF
not ```
this
this
but more like
this
this
when you click enter it sends the message
f
oh
so easy
nice
where do you learn all this?
u read through documentation?
how
do thta
<bkah>
:incoming_envelope: :ok_hand: applied mute to @lethal thunder until <t:1669985413:f> (10 minutes) (reason: duplicates rule: sent 4 duplicated messages in 10s).
The <@&831776746206265384> have been alerted for review.
!unmute 660505628803858434
:incoming_envelope: :ok_hand: pardoned infraction mute for @lethal thunder.
Calm down π
my snip and sketch broke
when i do windowskey+shift+s it just says: S
S
S
when i google <t:1669984825:R> there is only 1 result and it is a picutre of some crayons
did you try to turn it off then on again
i am chinese
short for SAM TURRET
A surface-to-air missile (SAM), also known as a ground-to-air missile (GTAM) or surface-to-air guided weapon (SAGW), is a missile designed to be launched from the ground to destroy aircraft or other missiles. It is one type of anti-aircraft system; in modern armed forces, missiles have replaced most other forms of dedicated anti-aircraft weapon...
i ce land
you say iceland really weird
is that how you pronounce it
no IKEA
Azerbaijan: azz-uhr-beh-JAHN. ah-zhur-BYE-jan.
Brunei: Brew-NEE
Djibouti: jeh-BOO-tee
Bru - nye
Thailand: TYE-land
THIGH-land
but what about people who do meth
do you know a good class of big O
What
yes
i want to know more about average case
set of functions with a certain asymptotic
resistance to cryptanalysis is that some kind of math xD
hmm
Vi fΓ₯r fΓΆlja tvΓ₯ extrema adelsmΓ€n som hΓ₯ller Γstermalm i ett guldgrepp.
StΓΆd oss pΓ₯ Patreon: https://www.patreon.com/freudianslip
Eller swisha oss pΓ₯: 0702516089
Stort tack!
Manus, regi och redigering:
Martin Arnell och Gustav BennegΓ₯rd
SkΓ₯despelare:
Martin Arnell
Gustav BennegΓ₯rd
Pontus Olgrim
Dan Lilja
Linnea Pihl
Rojan Telo
Albin Westerlin...
okay what about a class that you recomend
kirti you sound spanish
this looks advance for me xD
yes sir
wellp i gotta eat thanks for everything bye
byee
hello
66
wenomechainasama
79 reviews voor Royal HaskoningDHV. Een gratis kijkje achter de schermen bij bedrijven: reviews en salarissen, anoniem geplaatst door werknemers.
moon
mond in dutch is mouth
@gentle flint
exactly that
ah can you pronounce that for me after this convo
Provided to YouTube by CDBaby
Dr. Beauchef, Penguin Dentist Β· Kneebody
Low Electrical Worker
β 2008 Kneebody
Released on: 2008-01-01
Auto-generated by YouTube.
just wanna share this cool song
i speak switz
@rugged tundra
byee
/report
You too!
25 unseen videos of Tesla road rages, fails, and crashes. In this episode we get to see how Tesla Autopilot FSD Beta, Enhanced Autopilot and Automatic Emergency braking save lives, avoid crashes and how it reacts to different situations.
β‘Submit your Teslacam or Tesla Sentry video to be featured:
https://forms.gle/YFtXSeDScYQAJvwg7
β‘ WHAM B...
what do you think about mark zukerberg @crystal fox
@crystal fox what do you think about yourself then LOL
π
is mr bisk trolling us?
by roasting billionaire
usko time waste gardya kya
maile
mero ta free time ho yo tei vayera
cuz i m tired now
i did lot of productive stuff today
so
"Shut the fuck up" - @crystal fox LOL
@crystal fox what do you think about kim jong un
π€£
*mr. bisk
(1987-2023)
make it 2023 since its december
hes so mad π
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
import requests
import bs4
web_url = "https://subscene.com"
headers = {
'User-Agent': "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0"}
def search_subtitles(name):
url = f"{web_url}/subtitles/searchbytitle"
r = requests.post(url, headers=headers, params={'query': name})
if r.status_code == 200:
return r.content
def parse_html(content):
soup = bs4.BeautifulSoup(content, 'lxml')
return soup
def extract_links(soup):
subtitle_links = []
for i in soup.findAll('a'):
subtitle_links.append(i.get('href'))
return subtitle_links
search_string = input("Search Subtitles: ")
content = search_subtitles(search_string)
soup = parse_html(content)
subs = extract_links(soup)
subs = list(set([i for i in subs if i.startswith('/subtitles')]))
def get_subtitle_count(subs):
return len(subs)
def validate_user_subtitle_choice(user_choice, subs):
if user_choice.isdigit():
if 1 <= int(user_choice) <= get_subtitle_count(subs):
return True
else:
return False
else:
return False
def convert_to_int(user_choice):
return int(user_choice)
#subs = fuzzy_match(search_string, subs
def display_subtitle_links(sub):
for i, sub in enumerate(subs):
print(i + 1, sub.replace("/subtitles/", ""))
display_subtitle_links(subs)
def get_user_subtitle_choice(start_choice, last_choice):
return input(f'\nChoose Subtitle ({start_choice}-{last_choice}): ')
def main(subs):
user_choice = get_user_subtitle_choice(1, get_subtitle_count(subs))
print('\n')
# loop until user enters valid choice
while not validate_user_subtitle_choice(user_choice, subs):
print("Invalid choice, try again")
user_choice = get_user_subtitle_choice(1, get_subtitle_count(subs))
user_choice = convert_to_int(user_choice)
if __name__ == '__main__':
main(subs)
why am i getting a isdigit error?
in the validate_user_subtitle_choice
function
is it cause im inputing a int?
Hey, is anyone knowledgeable on asyncio?
the Senior
is it cause im doing convert_to_int(user_choice)?
and then calling it
ok let me try
Alright so I have a socket open on my local IP for an RPC client for discord. Now, I need to be listening to event asynchroneously right, so that what I do (screenshot one). Now I want to have two corouties run forever, but I can't make them run asynchroneously as tasks, they wait for one another (screenshot two (NOT USING WORKER FUNCTION).
Oh yeah that comes from other tests
how would i handle str input?
ValueError: invalid literal for int() with base 10: 'sdfsdf'
It's supposed to be create_task, still they wait for eachother, the thing is there isn't events being sent all the time.
this is what you get if you input str
in the validate user choice function
i was just typing random stuff
to test
Please let's talk about anything except that person 
how would i get the while loop working for letter input and not just number input
?
@lethal thunder @random ridge @whole bear @crystal fox
Just going to create arguments.
While no events are being sent, then it completely stops fetching tasks
Erm, who was that asking to stream sorry?
me
Cause I need them to work at the same time.
One sec.
i need help with my python script
Bisk said it for me π
It will wait until there is an event sent as well
!stream 764030779352154114
β @robust lichen can now stream until <t:1669999651:f>.
It's only 5 minutes, but you can keep the stream going for as long as you want.
When I leave the channel, I'll have to revoke streaming perms. Just warning you in advance.
I'll be around for ~20 minutes.
Same please
What will you be streaming sorry?
go to voice chat 2
My code, I'm struggling with some asyncio stuff
Erm one sec.
I'll also go to AF's channel cause he was the one to help me...
Right ok. I need to supervise and can only be in one channel at a time 
!stream 370576698481180674
β @random ridge can now stream until <t:1669999884:f>.
Well yep, that's why we have the rule 
/shrug
/shurg
(β―Β°β‘Β°οΌβ―οΈ΅ β»ββ»
(β―Β°β‘Β°οΌβ―οΈ΅ β»ββ»
β¬ββ¬ γ( γ-γγ)
I had a typo
/srugh
Β―_(γ)_/Β―
/shruh
/sgurh
Β―_(γ)_/Β―
(β―Β°β‘Β°οΌβ―οΈ΅ β»ββ»
(β―Β°β‘Β°οΌβ―οΈ΅ β»ββ»
β¬ββ¬ γ( γ-γγ)
banan
Yep. DMs closed though sorry.
Otherwise I get lots of angry people I banned in my DMs 
Info at the bottom on staff roles.
No no. As long as you're not mis-behaving you're fine π
#rules This will give you a good idea of what can get you banned for.
!eval
code
!eval [python_version] <code, ...>
Can also use: e
Run Python code and get the results.
This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside of them.
By default your code is run on Python's 3.11 beta release, to assist with testing. If you run into issues related to this Python version, you can request the bot to use Python 3.10 by specifying the python_version arg and setting it to 3.10.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!
Right ok. I'm heading back to the other channel...
!eval print("hello world") @random ridge
@robust lichen :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 1
002 | print("hello world") <@β370576698481180674>
003 | ^
004 | SyntaxError: invalid syntax
π
!eval print("hello world") @random ridge
@robust lichen :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 1
002 | print("hello world") <@β370576698481180674>
003 | ^
004 | SyntaxError: invalid syntax
Yeah wrong channel
hey guys the library tkinter is a good library to learn for a beginner?
sure for gui's
download_url = f"https://chromedriver.storage.googleapis.com/{version_number}/chromedriver_{{'linux': 'linux64', 'darwin': 'mac64', 'win32': 'win32'}[sys.platform]}.zip"
download_url = f"https://chromedriver.storage.googleapis.com/%s/chromedriver_%s.zip".format(version_number, {'linux': 'linux64', 'darwin': 'mac64', 'win32': 'win32'}[sys.platform])
dawg wtf is that
messed up zip file
ok
the problem is that everything works for me if I run it from a computer. And if I run from hosting, I get an empty list
sorry for such poor code construction, I've been doing this for a long time and I don't know python well
replit
yea
you're appending it to results[]
but its still returning empty
odd
send the file here
ill try running it
ok, wait
btw. On the hosting, it gives out something like "no characters found" because of this, the list is empty
hm
it seems to me that the bot is hindered by a captcha or something like protection
maybe change your headers
I already did, there were headers(replit) on the google
the requests also did not pass normally
I'll try it now
oh, then I need to run through hosting
I just wanted to do in debug bot
wait
do you need to output "items"?
think so
ok
I tried to output items, it gives me an empty list. Now I have brought out "soup" and I don't have enough space to copy from the hosting console
try without items
this is
it seems to me that the problem starts in this line py items = soup.findAll('a', class_ = 'Link SortTable-row')
when are the searching items from the html site
send me the website link
ok
https://worldofwarcraft.com/us-us/search/character?q=Π·ΠΎΡΡΠ΅Ρ
after q. You can enter any name, I entered my character
there should come out two characters with this nickname. From the realm "azuregos" and "gordunni"
theres no results for that name
maybe why?
Russian nickname seems to be found only through the IP of the russian computer idk.
maybe cause your hosting isnt finding your name (or whoevers name it is)
and then it returns a empty list
It's true. Only I don't understand why I have these characters
the site finds them
When I open it
ok
I'll try with a different nickname
bruh, I'll try then with the nickname "asmongold", then all the more it should find
also outputs an empty list
the problem is in headers, it seems to me. But I have already found the headers of the replit
And I've already tried
ok
I don't understand what you're saying. But I have a "chrome" browser
'User-Agent': "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0"}
use my headers
nope
sup
in the console []
@limber basalt were are u from
Russia
I would find a character by name through the blizzard api. But they don't have this in the database and have to make a direct request with the wow site
bye i wanna sleep
my code doesn't work on replit
but it does work on my machine
i know it works on windows too
and mac
so maybe dont use replit
I would run on heroku hosting. But in order to put a bot there for free, you need to recreate the account every month
I don't feel like doing it somehow
maybe you know other free hosting sites for the bot
nope
ok
I will need to leave my computer on all the time. But I don't want to do this, the bot will just turn off when I turn off the pc. The bot uses 20-30 people and I don't want there to be such breaks
is that what I'm going to type in google right now
I'll go then, thanks for the help
hey could someone get in a vc with me and help me work on something idk what im doing
import example.cpp
#[pyfunction]
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
Ok((a + b).to_string())
}
import pyfunction
maturin develop
matruin develop example.rs
@faint ermine compile "hello world" in C and import that module in python as an example?
@robust lichen It's you.
@somber heath do you even know python bruh?
@robust lichen Are you using the right microphone/settings?
@somber heath do ever have one of those days where you think you gotta fart... but when you fart its not entirely a fart.
just happened i got to take a showrr lmao brb
cant unmute for some reason
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@robust lichen sounds like youer in a pickle
why no perms to speak
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Because a subset of people see a large, public server as a good target.
The voice gate is a regretable but effective foil against them.
Screamers, gigglers, blowers, trolls, yes.
gigglers
lol
yk what channel i would go to for help developing a http project
i have 0 experience in py
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
I'd cover the foundations of Python, first. @broken plinth
whee
wqheer
omg thats you talking I tought i had a video playing in the backgeound and forgot
I gotchu
so where would i learn the foundations
Corey Schafer's Youtube playlists.
ye i see seems pretty good
alright
so after that you think ill be ready to follow a yt tut on how to make one
yea I realized
i was trying to build something
and all these problems rlly deluded me
alr sounds good m8 im gonna watch these videos and see where it gets me
thanks
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
My name is Oli, also known as Mumbo Jumbo and I make videos on the popular voxel based game 'Minecraft'. I focus mainly on the technical elements of the game, doing tutorials on various elements of redstone to try and make you better, and hopefully give you something you can show off to your friends. I also have a long running Vanilla Survival ...
thanks Bot
I am not a bot.π
bruh
anybody play with pyautoit ?
HELLO EVERYBODY
hi
how is a CodingAverageDailyDayRoutine Going on
very well
that s what I like to hear
too occidental life style kind of life form being
where at?
Montreal
can I ask
question related to
....Coding
here
VERY WELL
you guysknow how to get this FRUIT NAME Cell value from the Fruit Email cell reference
with open pyxl
building what
i dont like pandas
right
what was the name of the first library
pardon me
Source code: Lib/csv.py
The so-called CSV (Comma Separated Values) format is the most common import and export format for spreadsheets and databases. CSV format was used for many years prior to attempts to describe the format in a standardized way in RFC 4180. The lack of a well-defined standard means that subtle differences often exist in the data produced and consumed by different applications. These differences can make it annoying to process CSV files from multiple sources. Still, while the delimiters and quoting characters vary, the overall format is similar enough that it is possible to write a single module which can efficiently manipulate such data, hiding the details of reading and writing the data from the programmer.
nice!
i want to exrtract it
for making lists
iterators...
idk the terms although
taking it
making lists
using those lists as refrences within another process
i will check it out
intersting
na, my average brain iq wont allow to process more info now
i dont lik this library
any specific Function within openpyxl
would be nice
it was nice no talking but typing tome
have a good one!
ok bye you too!
I need to reboot ... it seems ....
@robust lichen what happened? why u leave
@safe pumice https://youtu.be/iYWzMvlj2RQ
News article: http://silicon-news.com/news/2012/06/17/linus-torvalds-nvidia-fuck-you/
Linus Torvalds reveals his true feelings for Nvidia.

!d str.lower
str.lower()```
Return a copy of the string with all the cased characters [4](https://docs.python.org/3/library/stdtypes.html#id15) converted to lowercase.
The lowercasing algorithm used is described in section 3.13 of the Unicode Standard.
!e py text = "AbCdEfG" result = text.lower() print(result)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
abcdefg
var jam = arr[1]
var jam = subtitle_links[1]
!e py examples = ['example', 'example2'] print(examples[0]) print(examples[1])
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | example
002 | example2
def extract_links(soup):
subtitle_links = []
for i in soup.findAll('a'):
subtitle_links.append(i.get('href'))
return subtitle_links
python subtitle_fetch.py
Search Subtitles: Deadpool
1 deadpool-2
2 ashes-from-the-deadpool-2-motion-pictures-soundtrack
3 deadpool
4 cline-dion-ashes-from-the-deadpool-2-motion-picture-soundtrack-2018
Choose Subtitle (1-4): 2
@stark jay π
hi
Hi image search.image search("show files/8.png")
How can I scan in selected window instead of scanning in full screen
PyAutoGui?
imagesearch.imagesearch
def metinevur(self, rectangles, wincap):
if len(rectangles) > 0:
kala = imagesearch.imagesearch(("files/Foto5.png"))
kala_x = kala[0]
if kala_x == -1:
targets = self.vision.get_click_points(rectangles)
target = wincap.get_screen_position(targets[0])
pos = (target[0],target[1])
pyautogui.moveTo(pos)
sol = dd_dll.DD_btn(1) ;dd_dll.DD_btn(2)
pydirectinput.click(sol)
try:
if self.windowName.get() == "":
messagebox.showwarning("Hata","BaΕlamadan Γnce Oyun EkranΔ±nΔ± SeΓ§")
return
wincap = ekranYakala(self.windowName.get())
if self.metinler.get() == "freya1":
self.cascade = cv2.CascadeClassifier(r"files/Servers/For/freya1.xml" )```
it was made here, but
pee pee poo poo moment
def extract_links(soup):
subtitle_links = []
for i in soup.findAll('a'):
subtitle_links.append(i.get('href'))
return subtitle_links
newarr = extract_links(soup)
userInput = 2
output = newarr[userInput]
python subtitle_fetch.py
Search Subtitles: Deadpool
1 deadpool-2
2 ashes-from-the-deadpool-2-motion-pictures-soundtrack
3 deadpool
4 cline-dion-ashes-from-the-deadpool-2-motion-picture-soundtrack-2018
Choose Subtitle (1-4): 2
examples = ['example', 'example2']
print(examples[user_input - 1])
hi
!e ```py
things = ["apples", "oranges", "pears"]
for i, v in enumerate(things, start = 1):
print(i, v)
while True: #This loop makes sure the user gives something valid
try:
idx = 2 #user_input = int(input("Number: ")) - 1
break
except ValueError:
pass
#user typed 3
print(things[idx])```
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1 apples
002 | 2 oranges
003 | 3 pears
004 | pears
I don't check range validity here, but you should.
The user may give 0 or negative or something too large.
exiting without interrupting
!e py for idx in [0, 1, 2, -1, -2, -3, 3]: print("abc"[idx])
@somber heath :x: Your 3.11 eval job has completed with return code 1.
001 | a
002 | b
003 | c
004 | c
005 | b
006 | a
007 | Traceback (most recent call last):
008 | File "<string>", line 2, in <module>
009 | IndexError: string index out of range
def main(subs):
user_choice = get_user_subtitle_choice(1, get_subtitle_count(subs))
print('\n')
# loop until user enters valid choice
while not validate_user_subtitle_choice(user_choice, subs):
print("Invalid choice, try again")
user_choice = get_user_subtitle_choice(1, get_subtitle_count(subs))
user_choice = convert_to_int(user_choice)
idx = int(user_choice) - 1
if __name__ == '__main__':
main(subs)
!e int("abc")
@somber heath :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 | ValueError: invalid literal for int() with base 10: 'abc'
!e py try: int("abc") except ValueError: print("Caught.")
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
Caught.
def main(subs):
user_choice = get_user_subtitle_choice(1, get_subtitle_count(subs))
print('\n')
# loop until user enters valid choice
while not validate_user_subtitle_choice(user_choice, subs):
print("Invalid choice, try again")
user_choice = get_user_subtitle_choice(1, get_subtitle_count(subs))
user_choice = convert_to_int(user_choice)
idx = int(user_choice) - 1
print(subs[idx])
if __name__ == '__main__':
main(subs)
data = ["1 deadpool-2","2 ashes-from-the-deadpool-2-motion-pictures-soundtrack","3 deadpool","4 cline-dion-ashes-from-the-deadpool-2-motion-picture-soundtrack-2018"]
print("please enter your choice")
for layer in range(0,len(data)):
print(data[layer])
userInput = 2
array1 = []
inputswitcher=""
while inputswitcher!= "X":
antal=str(input())
inputswitcher=antal
fff = inputswitcher.isnumeric()
if(fff):
if((fff < len(data) + 1) and (fff > 0)):
array1.append(int(antal))
print("out of length")
for layer in range(0,len(array1)):
print(data[array1[layer]])
data = ["1 deadpool-2","2 ashes-from-the-deadpool-2-motion-pictures-soundtrack","3 deadpool","4 cline-dion-ashes-from-the-deadpool-2-motion-picture-soundtrack-2018"]
print("please enter your choice")
for layer in range(0,len(data)):
print(data[layer])
userInput = 2
array1 = []
inputswitcher=""
while inputswitcher!= "X":
antal=str(input())
inputswitcher=antal
fff = inputswitcher.isnumeric()
if(fff):
if((fff < len(data) + 1) and (fff > 0)):
array1.append(int(antal))
print("out of length")
for layer in range(0,len(array1)):
print(data[array1[layer]])
def display_subtitle_links(data):
for i, sub in enumerate(data):
print(i + 1, sub.replace("/subtitles/", ""))
display_subtitle_links(data)
@grim iris π
this one?
while not validate_user_subtitle_choice(user_choice, subs):
print("Invalid choice, try again")
user_choice = get_user_subtitle_choice(1, get_subtitle_count(subs))
data = ["1 deadpool-2","2 ashes-from-the-deadpool-2-motion-pictures-soundtrack","3 deadpool","4 cline-dion-ashes-from-the-deadpool-2-motion-picture-soundtrack-2018"]
print("please enter your choice")
for layer in range(len(data)):
print(data[layer])
userInput = 2
array1 = []
inputswitcher=""
while inputswitcher!= "X":
inputswitcher = input()
if(inputswitcher.isnumeric()):
if((inputswitcher.isnumeric() < len(data) + 1) and (inputswitcher.isnumeric() > 0)):
array1.append(int(inputswitcher))
print("out of length")
for layer in range(len(array1)):
print(data[array1[layer]])
data = ["1 deadpool-2","2 ashes-from-the-deadpool-2-motion-pictures-soundtrack","3 deadpool","4 cline-dion-ashes-from-the-deadpool-2-motion-picture-soundtrack-2018"]
choices = []
while True:
film_choice = input("Enter a film number:")
if film_choice == "quit": break
if film_choice.isnumeric() and (int(film_choice) > 0 or int(film_choice) < len(data)):
choices.append(int(film_choice))
else:
print("Invalid input! Enter a number between 1 and " + str(len(data)))
continue
for c in choices:
print(data[c-1])
@robust lichen @safe pumice ^
hy
@stone pike π
hey*
hello
in this vc
@robust lichen really your a Elon Musk fan?
bruh
hi
hello
are you here @steel sluice
someone know how to use THE libary Pillow
yo uknow?
ok
Scammer on your way... @surreal wyvern
Drought is scarcity of water for crops (farmed food) prediction using ml
@lethal thunder
Photopea Online Photo Editor lets you edit photos, apply effects, filters, add text, crop or resize pictures. Do Online Photo Editing in your browser for free!
S
@lethal thunder someone already help me but thk
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@whole bear π
How are u doing. I didn't have voice premission
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Ya I'm new here, it's fine
Kim Jong-un appears to react stony faced after the US president jokes with reporters during a working lunch in Singapore, where the two leaders met for an historic summit on North Korea and the denuclearisation of the Korean peninsula
Subscribe to Guardian News βΊ http://bit.ly/guardianwiressub
Support the Guardian βΊ https://theguardian.com/supp...
@neon dagger π
hieee
hello
hello
I have a problem
def twoSum(self, nums: List[int], target: int) -> List[int]:
What it means
Type hinting? Function/method definition?
This describes a method definition. It should accept two arguments. The first argument should be a list of ints. The second argument should be an int. The method should return a list of ints.
aaa thanks!!
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
You can return the answer in any order.
I wrote this
class Solution:
def twoSum(self,nums,target):
n = []
y = 0
for enum,number in enumerate(nums):
if number == nums[0]:
y= number
continue
elif number +y == target:
n.append(enum - 1)
n.append(enum)
y = number
continue
elif number + y != target:
y = number
continue
return n
@stray niche https://adventofcode.com
omg
it's so big
@whole bear
What is your answer?
on first day
no
How you do this? π
yhm
yea
yea
yea
yhm you use json?
you used json for convert?
byee, have a nice day yall
bye
import pandas as pd
df = pd.read_csv('iris.csv')
arr = df.to_numpy()
print(arr)
no. why would you use json?
@torn fable here was my solution for the first one. we're reading a txt file, not a json file
# Find the Elf carrying the most Calories. How many total Calories is
# that Elf carrying?
from pathlib import Path
def max_sum_block(input_txt):
block_sums = []
for block in input_txt.split('\n\n'):
block_sum = sum(map(int, block.split('\n')))
block_sums.append(block_sum)
return max(block_sums)
input_txt = Path('input').read_text()[:-1]
print(max_sum_block(input_txt))
Thanks for answer, it's to hard for me now I am newbie
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Hi @tulip plover @lethal thunder !
It's me
22
you got it xD
Morocco
you?
Arabic
with a dialect
what about you?
How much python do you guys know?
I do
yes
awesome!
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
I need 50 messages I guess
oh not really I came once asking for help cuz I am new to programming
awesome!
would you be willing to explain the flow of execution of a simple function for me?
I do\
no no
I know what it is
I have a function written
and I need to understand the logic how it works
def factorial(n):
if n == 0:
return 1
else:
recurse = factorial(n-1)
result = n * recurse
return result
print(factorial(3))
this is it
I tried a debugger
It's hard to explain through text xD
!code
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.
def factorial(n):
if n == 0:
return 1
else:
recurse = factorial(n-1)
result = n * recurse
return result
print(factorial(3))
yep
it's going to decrement using this line
and check again
definitely
oh can't sry xD
<@&831776746206265384> can i get permission to share my screen
i want to help @gaunt topaz
i want to help
qfdqfqEF
WGFAWG
HELLO
WHY ARE MY WORDS INVISIBLE
HELP
Nwklg'RG
GEJRG
can anyoedn see my words
yes we can see em
its invisible wfor me
never heard of it thanks man!
You can only ask a Mod who is already present in VC
its okay
ok
An intro to recursion, and how to write a factorial function in Python using recursion.
RELATED VIDEOS:
βΊ Lambda Functions: https://youtu.be/Ob9rY6PQMfI
βΊ Unpacking Variables: https://youtu.be/Dd7SwbCpOSQ
βΊ Iterating Lists: https://youtu.be/W4qU4YeC-cs
βΊ Generators: https://youtu.be/Bzfu83LiEZs
βΊ Progress Bar: https://youtu.be/qVHM3ly-Amg
βΊ Dat...
I think what I can't comprehend is how does the variable n start incrementing again
thanks!!
@knotty gazelle
have a good one!
you too
main.py': [Errno 2] No such file or directory
can anyone tell me why pycharm gives that error
cause the directory does not exisdt
or the file path is misspelled
Thank you Δ±m gonna try
@gaunt topaz
Hi
hi
hows it going guys
how it going 4 u?
good how is going for u?
working on a python problem
any of you familiar with linear time in python?
My code must run within a 3 second time frame for any input, so efficiency matters, I was wondering if anyone is familiar with linear time for python, to speed up my code.
I am a newbie sorry
npppppp
what is the code
@trail mural are you good with python?
whats ur question?
def factorial(n):
if n == 0:
return 1
else:
recurse = factorial(n-1)
result = n * recurse
return result
print(factorial(3))
would you be able to explain the flow of execution of this function?
your execution starts with the print
1 sec
since n is not == 0 you then go to the else
yes
when you assign the variable recurse you call a new instance of the factorial function with n-1 (2)
you do this till n becomes 0
and it checks again
yep
then you go back to the last called recurse assignnment and return the result until you reach the first instance of the method
does that make any sense
I think my understanding stops when: return 1 gets executed
debugger shows that
that 1 from return 1 gets assigned to n
when n == 0 you return 1 to the recurse variable which n == 1
so then result becomes 1 * 1
and you return 1 again
and then you go back to the previous recurse variable where n == 2
so then result = 2 * 1
then you reach the first time you called the function with 3
so you do 3 * 2
would it be correct if I say that 1 from return 1 gets assigned to the variable recurse and then goes to calculate the variable result
what exactly makes it increment till it reaches 3 again?
no lemme try
I got how it decrement
ye?
oh!!!
got it!
I just spent 10 minutes wondering why my list wouldn't append until I realised I assigned it inside a loop.
do it with -1
:)
;-;
Hello. Sorry for my english =)
I have a task. Automation mouse keyboard in a given program. I tried libraries: PyAutoGUI, keyword, mouse , ahk - they work in windows, but they don't work in the program I need. The program has protection against automation.
What other libraries can I try?
I dont know. In my view, the mouse and keyboard work like this:hardware-driver-win api- windows. It looks like the program blocks the win api and works directly with the driver.
I found one clicker. It works in this program, but has extremely poor functionality. He installs his drivers and works through them.
I use python third day. What is it?? =)
What up @trail mural? =)
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
A programming language? =P
23:30]AF: git?
[23:30]AF: rebase?
rip i about it =)
Git is a distributed version control system - use it to share code, and make sure you can always get back to a "working version" of your code.
Rebase is like doing surgery in an OT, when you got a bachelor's in chemical engineering.
(For many IT professionals, methinks)
Then there's more commits to be pushed? x) Read: Squashed
@last thistle Don't know Tkinter, but I've used it since 2014 if that's any help?
I think that makes sense
I don't know him personnally
I'm trying to get my gui to form with however big the user wants the GUI to be
me?
It was a bad joke ;-;
Ohhhh hahaha
@warm jackal how is the weather?
Cold, I'm actually cold in my fingers. I thought the chill could be a lazy-drop in for the icing recommended to me by my physiotherapist for my tendinitis in my hands/fingers... =,(
How's the weather wherever it is you are?
It's cold over here, just above freezing. I am contemplating going on a walk in shorts...
should be able to voice verify >:)
Hahaha, thanks x) Where / how did you see the count?
Awww, I was hoping for a counter =( Thanks all the same guys!
does this not work?
/bows to being outclassed
NL2NL
yh thats what i've been trying to use
but the language im choosing is apparently 'invalid'
unless im doing it wrong which is probably the most likely case
talking to me?
yh the problem is
my laptop died
and my updated code is on there, so i've got an earlier version without the translation
atm i have a window with a button, and i need that button to translate the window to a different language when its pressed
[['cat', 'bat'], [10, 20, 30, 40, 50]]
can we quickly go in a call
itll be 2 min
ill just explain it quicker
private call btw
im calling you now
!e
list_of_things = [['cat', 'bat'], [10, 20, 30, 40, 50]]
print(list_of_things[0][0])
@trail mural :white_check_mark: Your 3.11 eval job has completed with return code 0.
cat
!e
list_of_things = [['cat', 'bat'], [10, 20, 30, 40, 50]]
print(list_of_things[-1][-1])
@trail mural :white_check_mark: Your 3.11 eval job has completed with return code 0.
50
@tulip plover No
Not yet i just need 50 messages
No not on this server
I did join a week ago
@warm jackal Dont smell their breath
hey
@safe pumice I want to learn it
yes
i dont know anything about it yet but im going to learn it
Prehensile feet are lower limbs that possess prehensility, the ability to grasp like a hand. They are most commonly observed in monkeys, some of which also possess prehensile tails, and apes. The term prehensile means "able to grasp" (from the Latin prehendere, to take hold of, to grasp).Due to the development of bipedalism in humans, the hands...
!code
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.
spam = ['cat', 'bat', 'rat', 'elephant']
print(spam[1:3])
why do it not print elephant
!e
spam = ['cat', 'bat', 'rat', 'elephant']
print(spam[1:3])
@trail mural :white_check_mark: Your 3.11 eval job has completed with return code 0.
['bat', 'rat']
spam = ['cat', 'bat', 'rat', 'elephant']
print(spam[3])
!e
spam = ['cat', 'bat', 'rat', 'elephant']
print(spam[3])
@molten sigil :white_check_mark: Your 3.11 eval job has completed with return code 0.
elephant
!e
spam = ['cat', 'bat', 'rat', 'elephant']
print(spam)
@molten sigil :white_check_mark: Your 3.11 eval job has completed with return code 0.
['cat', 'bat', 'rat', 'elephant']
!e
spam = ['cat', 'bat', 'rat', 'elephant']
print(spam[1:4])
@trail mural :white_check_mark: Your 3.11 eval job has completed with return code 0.
['bat', 'rat', 'elephant']