#voice-chat-text-0
1 messages ยท Page 52 of 1
groat
They're both Dutchies
Same
Wait, who are you?
Any or all
Specifically to cook
Also it'd rust otherwise
China has claimed to
Oh right that's what it was
hemlock you had food sir?
Some crackers. I have had no time
No
what is low whistle
Spinning rims, under glow
dinner?
a whistle
it is low
low like low pitch?
I'll post a video
byeee
Hey Rab
Hi.
https://youtube.com/watch?v=CbV05y63-Dw @stray niche
Alexander Levack, whistle and Highland pipe. Filmed at the City Halls in Glasgow. For more: http://bbc.co.uk/youngtrad
the sort of flute thing
oh its your twin
interesting
I was looking forward to seeing you play
cloned in secrecy
secrets out now
Secretions out
very cool
that's just a recorder
Recorders don't have to be plastic
recroder sounds not this good
heyluu hoomaaans
Hii diam
im okay
@rugged root can I have streaming permission again? :(
Maybe later, I'm swamped with work right now
are you mentioning me @stray niche by any chance? didnt really hear yout then
@rugged root okhaay No issues
Hurdy Gurdy is a cool instrument
That's the one with the crank, right?
It's also what you would say if you're making fun of how Swedish people speak
good people tend to apologize by the way
It gets compressed, it gets high pitched, please don't oof
It gets sharp through the mic
Piercing would be a better word, I suppose
back in a bit
cya
Projects
Contributing to open source, that kind of stuff
But yeah, it's really up in the air
#career-advice can give you a better idea of what might help in your given region, @acoustic sable
Its so funny Orpheus is literally sitting infront of the speakers and listening to yall's conversation
seems like she enjoys
Back in a sec, have to call the psyche
often time she sits infront of the speaker and listens to whatever crap I play
I guess she likes sound.....
yes diameter always feeds her good food
these days she mostly eats beans
sometimes she sleeps while standing and yk the funny part
she slips and falls like a slide and then she again fixes her posture and sleeps XDDD
I just watch and laugh in my head ๐
it melts my heart always
If someone restores the gun will it work ? I guess it should
Unless they blocked up the barrel it should fire
high chance the pipe is blocked
@quasi condor @mild quartz brawlhalla?
yes give me 5
guh
Might be for like pedigree animals or something
Seriously, less than 10 minutes
SO tired
You're also sleep deprived, @stray niche
DOWN WITH THE BOURGEOISIE
nice cat
Back later
bye
byeee
yes. we just boil
Da fuq is that
a phone exploder
Powerline adapter?
Ah
Spite
45
Ethernet is RJ-45
-sighs-
CAT 6 and lower is an RJ-45 plug
Dude have you seen the new CAT plug?
It's so friggin' weird
There is a new plug?
Shit, hold on
I could swear there was...
But now I can't find it
Well shit, I can't find it
Oh well
O....kay?
what is that, ๐
@zenith radish JS or TS
Hello ๐
I cannot for the life of me find it. I could swear I was reading about a different plug head other than the regular RJ-45
What is the best channel to ask smth about selenium
any idea what the name might be? The RJ-61 looks almost identical
I might be thinking of a fiber connection
Yeah, that's looking like what I'm remembering
Yeah, it was these weird bastards
My B
Depends how large the cat is
When Lucky was a bit chunkier, it was like being stomped on
I have mental issues because of sockets
Quite
Looks like there are quite a few different connectors used for fiber :/
Saves me the effort of using my vocal cords
The demons
When cats just stare off into space at what appears to be nothing
It's the demons
Does somebody know why the client disconnects after connecting in python?
Might need more details than that
Whats details do you need?
What client, what connection, what's the code
Hey @ashen wave!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
the code is tooooo long
Is it on a repo or something?
What all is it doing
Like what's the overall project
a client connection after login but if you want to run a function on the server or get information from the server it checks if you are logged in
Does the program connect and then end? Is there anything keeping the program open? Event loop or something?
a while true loop and a try
Are you using a with?
for opening files to let the server write down the active users so yes
So can i have permission for streaming?
I don't think hamsters give a shit
It's better to have the code where we can look through it ourselves. Streaming doesn't really help much. Also I don't have a lot of time, sorry
what about i send it in your dms?
Or just upload it to a repo or use a pastebin
i hate skids
if nobody knows this code or skids it until i am finished with this project i get 80$
I think the hamsters you are talking about dont eat
A test botnet not for bad things
!tvmute 719972719336226897 1d Do not unmute just to make obnoxious noises. Be respectful of other users in the call.
:incoming_envelope: :ok_hand: applied voice mute to @whole bear until <t:1673040590:f> (1 day).

See you, Grote
Actually given your infraction history, I'm changing it to a permanent one
poor guy
Odds are very likely you're just going to troll again, and I just don't have the patience
k
ok i go now
There we go, now it's kicked in
That's not something we're going to assist with
For testing purposes or otherwise
Hey xv
Does the job
!pypi aiosqlite
However the writes are very quick
@vast fog When you catch the events and what not you'll get the context. Server ID, user ID, etc.
@whole bear Yo
bye again
@midnight agate Yo
Can you show that block of code?
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.
@vast fog
@high acorn You'd be posting in here rather than in the built in voice/text channel thing
You'd be pooping a whole chia pet
I want to stream @rugged root ๐ฅบ
I'm about to leave work
that means we can hear youuu
sir im new to this discord thing .. sorry if my conduct was out of place
Welcome to discord
i will share the code snippet .
Heyy @molten pewter
# Encode rest of features
for name in train_with_labels.columns:
if name.startswith('x'): # only selecting features, not labels
# Find the dominant data type in a column
column_type, _ = max(Counter(map(lambda x: str(type(x)), train_with_labels[name])).items(), key = lambda x:x[1])
if column_type == str(str):
train_with_labels[name] = train_with_labels[name].astype(str)
#test[name] = map(str, test[name])
names_categorical.append(name)
#extra
#print name, len(np.unique(train_with_labels[name]))
#elif column_type == float:
#mn = train_with_labels[name].median()
#X_numerical.append(train_with_labels[name].fillna(mn))
#X_test_numerical.append(test[name].fillna(-999))
else:
X_numerical.append(train_with_labels[name].fillna(-999))
# X_test_numerical.append(test[name].fillna(-999))
this code was essentially written in py 2.7 , i am tryna modify it into py3.10
india its 3.39
i am from india
๐
my name is shan
shan kuriakose
Cheers, everyone! Hey, Mr Please! You talking to yourself again?
Hello from the states.
hello ๐
So, I have a question MagicalGirl...?
my name is so so obious , one can guess my state , my religion and if that person is more intellegent , may be which part of kerala
india is a beautiful place , every hour by the train , you will be in a new place , new culture and even better a new different brand new language
So, I have watch a decent amount of Gravitas, is that a legitmate Indian news outlet, or is it just a part of the U.S propaganda machine?
southern karnataka
i dont think bjp has that agenda,
mr please , yeah ,,news is always rigged
sam , did you try for upsc , just as i did
hahaha
I haven't. What is upsc?
upper limit is 32
mr i was talking to sam .. upsc , is supposed to be toughest exam in the plannet
Sorry
np ๐
you know i came here , hoping to find a legacy codder who worked with machine learning in python 2.0 ๐
2.0 is legacy
Here in the states many place you cannot grow anything larger than 12' x 12'.
just kidding
yeah ๐ i dont do cannabies
i am the son of a farmer , i carry that legacy
๐
whats the time there?
nearing 430
evenin ?
its 4 am morning
@winged hinge byeee. You also go sleeeep it's 4
meow!
@high acorn you also sleeep
I was gonna say, you up early or late?
i am so invested in this code , i think i will stay up for a bit more time
What are you writing?
this is for a personal project, years ago , kaggle hosted a multi label , multi class problem , the solutioins was obiously written using python 2.x .. now world is using python 3.x .. so i am in the process of updating
i think the competition was in 2011
Composition is one of the key concepts of object-oriented programming languages, like Java. You can use it to reuse existing code, design clean APIs, and change the implementation of a class used in a composition without adapting any external clients. Take a look at these explanations and examples.
is it similar to destructring in javasript
javascript
i love python , recently i picked up javascript .. especially , that node and react
What is a good second language to pick up after Python? I'm in the middle of a career change.
Imma learn JavaScript after python
i think i know this , it works similar
i would argue python is more than enough , its one true love
java script is beautiful , there is a famous dictom , everything that can be written in java script will eventually be written in java script
i didnot understand you mate
okay .. i will try
yeah .. thats true
javascript has a limitation like that , its not a true object oriented language if you ask me
im not an expert ..
How powerful is Python for building GUIs without import libraries?
to build a gui in almost any language you need to use a library
like TKinter
C, C++, Java, you name it
there is a difference between object based (js) and object oriented languages
py is an object oriented language, where as js is object based
tkinder is good
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
based
for data science , i think stream lit is actually lit
that really wasn't at all their question
class Address:
def __init__(self, street: str):
self.street = street
class Person:
def __init__(self, name: str, age: int, address: Address):
self.name = name
self.age = age
self.address = address
i was actually saying that js is not rue object oriented
home = Address("Ham")
So, I'm just starting out with Python after a significant amt. of research and no action other than getting caught up in the proverbial "tutorial cycle" and learning nothing because I wasn't actively applying it. I'm studying cisco and python atm are there any good books you'd suggest that would teach the syntax of javascript so thqat I don't get overwhelmed?
dave = Person("Dave", 24, home)
I'll check it out.
bro , i work in and around many languages now , i think what is more important is picking one language and learning in to the core . python is the easiest .. if i started the journey with c or c++ i would have already quit this long time ago
js is simple
you will love it
I did quit C++ a long time ago
languages change so as syntax but the logic , that is more important
did any of you try advent of code this year
heyy can you guys help me understand why i got slowed (MUTED ) in the general chat
General is always slowed
@rugged root
even now i cant i say hello in there ๐ , i thought i broke some rules
happy to meet you all
@peak juniper This one for this vc.
ok.
hey, @somber heath so do the requirements for voice start over since I left the server yesterday?
*last night
I assumed they would, by default. I meant to merely logout.
whoopsies
bummer
my voice sux anyways
I do believe I'm "tone deaf"
Hey, man, I'll tell you what tho I appreciate you being so amicable. I'll be honest part of the reason I haven't participated in forums since like 97 is because of how harsh I was at such a young age and how I know others can be to nubes
I didn't know how.
I thought leaving the server was but a temporary thing
^
I didn't know that "logging out" was but an option
I have never accesssed a gear for logging out
I noticed.
I noticed earlier that a burst was stopped at like 6 or 7
unlike the days of old where we could just flood the server in icm
So where are you from?
Ahhh cheers mate!
I have a good friend that attended Uni in Austraila
Albeit I call it college here in the states.
Pretty sure it was in Melbourne.
So, are you a master dev? Either, or.... I've decided to go face first into python as of late.
And I appreciate your shivalry.
Modesty?
I like it.
There are others!?
lol
I speak this to lehmans alike.
@somber heath morning! Have a nice day
mastery is a mindset
About to head to sleep. See you tomorrow!
I suppose then.
In order to be a good leader must be a good follower, in essence...
I am about to leave a job right now due to the supposed facts we are discussing, which only reiderates my disposition for being in this chat in the first place.
peopl?
sad
What's the solution?
Chris Lattner is a world-class software & hardware engineer, leading projects at Apple, Tesla, Google, and SiFive. Please support this podcast by checking out our sponsors:
- Blinkist: https://blinkist.com/lex and use code LEX to get a free week of premium
- Neuro: https://www.getneuro.com and use code LEX to get 15% off
- MasterClass: https://m...
Jave > Python?
I got stuck in the loop with no application.
In terms of overall?
lemme redifine? In terms of developing GUIs?
Ahhh yes, that Is indeed what I have come to appreciate about it.
for i in range("hello"):
print(i)
for(let i=0; i<standard_data; i++){ // compute colours
if(query_final.includes(standard_data[i]['name'])){
deck_colours += standard_data[i]['colors']
}
}
vs
for(let i=0; i<standard_data.length; i++){ // compute colours
if(query_final.includes(standard_data[i]['name'])){
deck_colours += standard_data[i]['colors']
}
}
could i get some help with node.js coding?
@onyx glen you're better of checking out one of the js servers
Or maybe #web-development.
because i got a syntax error and i've tried to fix it but it's not running
does anyone here know node.js
@somber heath do you know any other programming languages other than this? ( python )
oh
i currently only know a decent amount of node.js, but my goal is to learn either python or java
I'm going to get off for dinner, bye
@austere lava let me know when you find a node.js server.
Almost bedtime. Goodnight everyone.
later

Hell, Opal
@somber heath are you allergic to frogs?
Hello, @somber heath
!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!
I agree.
Eggs before chickens.
Were dinosaurs even real?
I'm not being facetious.
Manufactured?
But what does a theory need to be to be considered theory?
80 percent fact?
Correlation does not imply causation.
Hence a bag of skittles.
So let fear dictate?
Rubbish
I wouldn't either.
How big is the bag of skittles?
But isn't there a 1 percent chance it's possible?
God is in the rain.
I was quoting V for Vendetta.
I feel as if AI has "God-like" principles. Laws by which it must be governed by.
Freewill isn't finite.
Freewill is and it isn't. Hence its essense.
Every action.
To deep to type from a phones keyboard.
Seems that all to often we are bound by relativism.
@topaz beacon ๐
hey
i need helo
help
I am noob in python and I want to use pandas for analysing a excel sheet
!voice @whole bear
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
LoL im perma muted
I'd talk to the #data-science-and-ml channel or you can look at #โ๏ฝhow-to-get-help.
@topaz beacon
thanks
can you suggest any good source material for beginner in python
@somber heath
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
Also Corey Schafer's YouTube playlist for Python beginners.
@somber heath i love Ukraine
Beware the tutorial loop.
whats that?
like never ending tutorial reading
like always reading introductory stuff
Indeed.
so i have that cow logo i want to increase the size but...
and adjust the padding but in djgango but at the end is html
but i dont know where to modifiy the css
``css`@font-face {
font-family: 'icomoon';
src: url('fonts/icomoon.eot?xqakzy');
src: url('fonts/icomoon.eot?xqakzy#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?xqakzy') format('truetype'),
url('fonts/icomoon.woff?xqakzy') format('woff'),
url('fonts/icomoon.svg?xqakzy#icomoon') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
}
[class^="icon-"], [class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icomoon' !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-happycow:before {
content: "\e900";
color: #ffffff;
}
.icon-pencil:before {
content: "\e905";
}
damm
๐
@font-face {
font-family: 'icomoon';
src: url('fonts/icomoon.eot?xqakzy');
src: url('fonts/icomoon.eot?xqakzy#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?xqakzy') format('truetype'),
url('fonts/icomoon.woff?xqakzy') format('woff'),
url('fonts/icomoon.svg?xqakzy#icomoon') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
}
[class^="icon-"], [class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icomoon' !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-happycow:before {
content: "\e900";
color: #ffffff;
}
.icon-pencil:before {
content: "\e905";
}
@livid loom ๐
hallo
well, seems that i cannot be verified
yes its bc i just entered
yes, do make sense
but i was just going to ask a question tbh
I'm okay with it. Sucks I left the server tho
I'm sure many filter themselves
do you remember who was asking about Python books?
nm I think it was Rock
The thing is that Im using a site API to extract data but I needed to filter specific datas from all of the ones im receiving
@fast spade ๐
hello!
Hey @livid loom!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
Beginning programming with python for dummies is decent. ISBN 978-1-119-45789-3
!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.
{
"code": "0",
"msg": "success",
"data": [
{
"symbol": "BTC",
"openInterest": 9093130130.827152,
"h4OIChangePercent": -0.29,
"openInterestAmount": 540285.233173092,
"oIChangePercent": -2.83,
"rate": 100,
"volUsd": 8658638005.588413,
"exchangeName": "All",
"h1OIChangePercent": -0.15,
"exchangeLogo": "https://cdn.sampyun.com/static/blank.png",
"h24Change": -2.83,
"volChangePercent": -46.14,
"avgFundingRate": 0.004658527532169472
},
do you know how can I get just like the symbol?
"symbol", i mean
yes
for d in obj['data']:
d['symbol']```
oh ok
with a function
i ll try
its saying obj is not defined
ohhhhhh my god sorry
im dumb
@cosmic swallow ๐
Many people will handle it based on the pretense that you will take further action, becuase they don't want to expend the energy on it.
I beleive that may be what @somber heath is implying.
i tried and its showing that string indices must be integers
!e py "abc"["a"]
@somber heath :x: Your 3.11 eval job has completed with return code 1.
001 | <string>:1: SyntaxWarning: str indices must be integers or slices, not str; perhaps you missed a comma?
002 | Traceback (most recent call last):
003 | File "<string>", line 1, in <module>
004 | TypeError: string indices must be integers, not 'str'
@ripe lantern :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 3, in <module>
003 | KeyError: 0
@ripe lantern :white_check_mark: Your 3.11 eval job has completed with return code 0.
{'symbol': 'Hello World'}
@ripe lantern :white_check_mark: Your 3.11 eval job has completed with return code 0.
{'symbol': 'BTC', 'openInterest': 9093130130.827152, 'h4OIChangePercent': -0.29, 'openInterestAmount': 540285.233173092, 'oIChangePercent': -2.83, 'rate': 100, 'volUsd': 8658638005.588413, 'exchangeName': 'All', 'h1OIChangePercent': -0.15, 'exchangeLogo': 'https://cdn.sampyun.com/static/blank.png', 'h24Change': -2.83, 'volChangePercent': -46.14, 'avgFundingRate': 0.004658527532169472}
@ripe lantern :white_check_mark: Your 3.11 eval job has completed with return code 0.
BTC
@ripe lantern :white_check_mark: Your 3.11 eval job has completed with return code 0.
BTC
@ripe lantern :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | Hello
002 | Hello
003 | Hello
004 | Hello
005 | Hello
006 | Hello
007 | Hello
008 | Hello
009 | Hello
010 | Hello
011 | Hello
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/oqiginolaz.txt?noredirect
off topic, but can you pass a parameter as an actual argument?
@ripe lantern :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | {'code': '0', 'msg': 'success', 'data': [{'symbol': 'BTC', 'openInterest': 9093130130.827152, 'h4OIChangePercent': -0.29, 'openInterestAmount': 540285.233173092, 'oIChangePercent': -2.83, 'rate': 100, 'volUsd': 8658638005.588413, 'exchangeName': 'All', 'h1OIChangePercent': -0.15, 'exchangeLogo': 'https://cdn.sampyun.com/static/blank.png', 'h24Change': -2.83, 'volChangePercent': -46.14, 'avgFundingRate': 0.004658527532169472}]}
002 | {'code': '0', 'msg': 'success', 'data': [{'symbol': 'BTC', 'openInterest': 9093130130.827152, 'h4OIChangePercent': -0.29, 'openInterestAmount': 540285.233173092, 'oIChangePercent': -2.83, 'rate': 100, 'volUsd': 8658638005.588413, 'exchangeName': 'All', 'h1OIChangePercent': -0.15, 'exchangeLogo': 'https://cdn.sampyun.com/static/blank.png', 'h24Change': -2.83, 'volChangePercent': -46.14, 'avgFundingRate': 0.004658527532169472}]}
003 | {'code': '0', 'msg': 'success', 'data': [{'symbol': 'BTC', 'openInterest': 9093130130.827152, 'h4OIChangePercent': -0.29
... (truncated - too long, too many lines)
Full output: too long to upload
def wrapper(*args, **kwargs):
@tribal cargo ๐
hello!
@ripe lantern :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | work took 2.7150148525834084e-05 seconds, averaging 2.715014852583408e-07 seconds per iteration.
002 | work2 took 2.9919901862740517e-05 seconds, averaging 2.9919901862740516e-07 seconds per iteration.
def callable(parameter): #parameter = argument
... #Do what you want with the parameter (a variable, a reference to an object) here
argument = "abc"
callable(argument) #argument becomes an argument here. argument is a variable, a reference to an object```
thanks for the suggestions @somber heath !
!e py print("abc"[0]) print("abc"[1]) print("abc"[2]) print("abc"[-1]) print("abc"[-2]) print("abc"[-3])
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | a
002 | b
003 | c
004 | c
005 | b
006 | a
@tight dagger ๐
This is an example of subscription, the square brackets after an object. Here, a subscription by index position.
a appears at index positions 0 and -3
Thanks @somber heath
@ripe lantern :white_check_mark: Your 3.11 eval job has completed with return code 0.
a
Positive indexes reference from the left. Negatives from the right.
-1 is "The last thing in the sequence"
What would be the most prominent use case in which we reference dictionaries? Other than things like NLP?
Indexing is specifically for ordered sequences. Subscription by key is something different.
Dictionaries are subscriptable by key.
Not by index.
could we then make it a callable oject to trigger an event?
@strong thunder ๐
hi
bet. But what if for example I want to print all of the times that symbol = btc??
It wouldnโt work simply taking the [0] off right??
!e py d = {'apple': 'fruit', 7: 'number', 2: 5} print(d['apple']) print(d[7]) #7 here is a key, not an index. print(d[2]) #as is 2 here
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | fruit
002 | number
003 | 5
Thanks @somber heath
bye
damn it!
i still can't speak
hello @somber heath
wait voice verification room? I thought it just involved sending messages
hold on
hello opal
hello opal
This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/python/azure/ or our ve...
@vocal basin hey what happened
!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!
!e print("Hello World")
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
Hello World
!e import turtle [turtle.right(i) turtle.forward(i) i in range(100)]
@whole bear :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 1
002 | import turtle [turtle.right(i) turtle.forward(i) i in range(100)]
003 | ^
004 | SyntaxError: invalid syntax
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!
!e import turtle \n print("hello world")
@whole bear :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 1
002 | import turtle \n print("hello world")
003 | ^
004 | SyntaxError: unexpected character after line continuation character
!e print ('python python is cool')
@onyx glen :white_check_mark: Your 3.10 eval job has completed with return code 0.
python python is cool
!e print([i and i+1 for i in range(10)])
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
[0, 2, 3, 4, 5, 6, 7, 8, 9, 10]
!e print([i and i for i in range(10)])
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
!e print([i*2 and i+2 for i in range(10)])
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
[0, 3, 4, 5, 6, 7, 8, 9, 10, 11]
I made so @rugged root is FIFA icon card .
Thanks
@somber heath could you help me out?
I can't answer that until you say what the problem is.
i was just asking if like your available for me to ask
also could we go to a diff vc?, dont wanna disrupt these guy's game
brb
!e py import numpy as np p = 5, 6 q = 9, 20 steps = 10 arr = np.linspace(p, q, steps) print(arr)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | [[ 5. 6. ]
002 | [ 5.44444444 7.55555556]
003 | [ 5.88888889 9.11111111]
004 | [ 6.33333333 10.66666667]
005 | [ 6.77777778 12.22222222]
006 | [ 7.22222222 13.77777778]
007 | [ 7.66666667 15.33333333]
008 | [ 8.11111111 16.88888889]
009 | [ 8.55555556 18.44444444]
010 | [ 9. 20. ]]
!d math.dist
math.dist(p, q)```
Return the Euclidean distance between two points *p* and *q*, each given as a sequence (or iterable) of coordinates. The two points must have the same dimension.
Roughly equivalent to:
```py
sqrt(sum((px - qx) ** 2.0 for px, qx in zip(p, q)))
``` New in version 3.8.
!e py import math p = 5, 6 q = 9, 20 dist = math.dist(p, q) print(dist)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
14.560219778561036
!d math.ceil
math.ceil(x)```
Return the ceiling of *x*, the smallest integer greater than or equal to *x*. If *x* is not a float, delegates to [`x.__ceil__`](https://docs.python.org/3/reference/datamodel.html#object.__ceil__ "object.__ceil__"), which should return an [`Integral`](https://docs.python.org/3/library/numbers.html#numbers.Integral "numbers.Integral") value.
win32api.mouse_event(win32con.MOUSEEVENTF_MOVE, MouseMovementX, MouseMovementY)
!d os
Source code: Lib/os.py
This module provides a portable way of using operating system dependent functionality. If you just want to read or write a file see open(), if you want to manipulate paths, see the os.path module, and if you want to read all the lines in all the files on the command line see the fileinput module. For creating temporary files and directories see the tempfile module, and for high-level file and directory handling see the shutil module.
Notes on the availability of these functions:
!d pathlib
New in version 3.4.
Source code: Lib/pathlib.py
This module offers classes representing filesystem paths with semantics appropriate for different operating systems. Path classes are divided between pure paths, which provide purely computational operations without I/O, and concrete paths, which inherit from pure paths but also provide I/O operations.
If youโve never used this module before or just arenโt sure which class is right for your task, Path is most likely what you need. It instantiates a concrete path for the platform the code is running on.
Pure paths are useful in some special cases; for example:
not an expert but we had fpga course in college last semester
we emulated a mips32 processor
@somber smelt
we "coded" it in fpga
fpga is basicly hardware but in software
field programmable gate array
it was in the course to learn about using verilog
it was an example
fpga "compiles" to gate and wire and connections
i think what you were thinking about emulation and my emulation is a bit different
there is some nes emulator out there, which matches to the original logic gate to logic gate
yeah
Yum
!e print([i and i for i in range(5000)])
@ashen wave :white_check_mark: Your 3.11 eval job has completed with return code 0.
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
... (truncated - too long)
Full output: too long to upload
!e print([i and i for i in range(300)])
@ashen wave :white_check_mark: Your 3.11 eval job has completed with return code 0.
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
... (truncated - too long)
Full output: https://paste.pythondiscord.com/ceqehohesi.txt?noredirect
!e if 2 < 3:
print("Hello i am from Microsoft support how can i help you?")
@ashen wave :white_check_mark: Your 3.11 eval job has completed with return code 0.
Hello i am from Microsoft support how can i help you?
!e import os
@ashen wave :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e import sys
@ashen wave :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e import sys
import time
time.sleep(3)
@ashen wave :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e import sys
import time
print("exiting")
time.sleep(3)
sys.exit()
@ashen wave :white_check_mark: Your 3.11 eval job has completed with return code 0.
exiting
wassup
import speech_recognition as sr
import pysrt
def generate_subtitles(audio_path, output_path):
# Print the audio path to make sure it is correct
print(f"Audio path: {audio_path}")
# Load the audio file
audio = sr.AudioFile(audio_path)
r = sr.Recognizer()
# Create an empty SubRip file
subtitles = pysrt.SubRipFile()
# Iterate through the audio by segments
with audio as source:
source = 0
for segment in r.recognize_google(source, language="en-US"):
# Get the start and end times of the segment
start_time = segment.start_time
end_time = segment.end_time
# Create a new subtitle with the recognized text and the start and end times
subtitle = pysrt.SubRipItem(index=i, start=start_time, end=end_time, text=segment.text)
# Add the subtitle to the SubRip file
subtitles.append(subtitle)
i += 1
# Save the SubRip file to the output path
subtitles.save(output_path, encoding='utf-8')
# Example usage
generate_subtitles("subtitles.wav", "subtitles.srt")
my main goal with this is to make a tool using open ai's whisper to make subtitles for me with perfect timing and export it as a srt file
i am in no way qualified to be a coder and this is most likely a 1 time thing, i am mainly just doing youtube
and not code
i am having some problems with the code
installs:
pip install SpeechRecognition
pip install pysrt
does anyone use AWS
@candid herald ๐
@somber heath cant talk rn but i got something you could help me with
you see the white box, how could i literally just create a white box like that to always stay ontop of my screen
like not a window just a white outline of 320x320
and it has to be in the middle of the screen
@somber heath any ideas?
Hey @fickle plaza!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
Hey @fickle plaza!
It looks like you tried to attach file type(s) that we do not allow (.bat). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a, .csv, .json.
Feel free to ask in #community-meta if you think this is a mistake.
You: "Why can't I share my screen?"
Me: Okay, so the reason you can't-
You: *leaves*
Me: ...
You: *Rejoins*
Me: "Okay, so the reason you can't-
You: Blah blah blah.
Me: *Okay, so the reason you can'-
You: Blah blah blah
Me: ...
You: Okay, sorry, go on, you can talk.
Me: Okay, so the reason you can't-
You: Blah blah blah.```
@timber lake ๐
Hi
hey
How did you install Python?
I had gone to the python site and downloaded the exe file
I should download with the pip "discord :) requests"
I do not know
No I also tried to delete it and download it seeing that there was a check but nothing changed
I did not understand
?
WORK
YESS
the command "pip" work
tysm!
hello
Hi
how are you?
why anxious?
oh okay
im still having some trouble with my code
can i stream?
ohhhh okay
its just u need to see the code to try and help me ig
!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.
!paste
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.
print("Hello, world.")
print("Goodbye.")```
there u have it
so what i need there is to run through all the sequences and search for the inputed motif
yes but now its mostly done
sequence name the length of said sequence and the times it apears
the name is there
its the output required to pass the assignment
do you think you can do it pls?
i can't use functions or classes
what?
yes it has to be linear
yeah
and I don't know how
most of it is from chatgpt
!e py from string import ascii_lowercase as alphabet for i, _ in enumerate(alphabet): print(alphabet[i: i + 7])
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | abcdefg
002 | bcdefgh
003 | cdefghi
004 | defghij
005 | efghijk
006 | fghijkl
007 | ghijklm
008 | hijklmn
009 | ijklmno
010 | jklmnop
011 | klmnopq
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/sahedanoso.txt?noredirect
!d slice
class slice(stop)``````py
class slice(start, stop, step=1)```
Return a [slice](https://docs.python.org/3/glossary.html#term-slice) object representing the set of indices specified by `range(start, stop, step)`. The *start* and *step* arguments default to `None`. Slice objects have read-only data attributes `start`, `stop`, and `step` which merely return the argument values (or their default). They have no other explicit functionality; however, they are used by NumPy and other third-party packages. Slice objects are also generated when extended indexing syntax is used. For example: `a[start:stop:step]` or `a[start:stop, i]`. See [`itertools.islice()`](https://docs.python.org/3/library/itertools.html#itertools.islice "itertools.islice") for an alternate version that returns an iterator.
hello!
!e py print("abcdefghij"[3:7])
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
defg
@unborn scaffold ๐
hi
@frosty star
"Push the button...push the button...don't push the button...push the button..."
@spiral pebble ๐
You are very lonely aren't you ,because no one is talking
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Where are you from?
@somber heath
Awww nice
you sound swedish
I'm from Israel
I'm a beginner in Python so my biggest project is rock paper scissors ๐
Hii ๐
Hi
yes
Bye @stray niche
:incoming_envelope: :ok_hand: applied mute to @unborn scaffold until <t:1673099886:f> (10 minutes) (reason: newlines rule: sent 102 newlines in 10s).
The <@&831776746206265384> have been alerted for review.
!unmute 559730966571253760
:incoming_envelope: :ok_hand: pardoned infraction mute for @unborn scaffold.
please use a paste service for longer code snippets
@naive dew
I need help understanding object oriented programming
whats your issue?
today i learned: I hate* data analysis.. the amount cleaning data work is getting out of hand, but processes to streamline it are developing.. just dealing with "business types" of people how they want fancy data is so aggrevating to undo it back and forth from raw data.
hi
@naive dew do u like Jordan Peterson
Hello hello
@vapid cedar ๐
i can't speak
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!voice
I'm just coming to the salon i don't have 50message so can e go in another salon i would like to aske you something ? (i'm frznch so my english is bad)
i have work (for school) and i must send en python program so i train in a file that teacher send but i can't realise something..
it's hard to explain..
Show the code.
okay but i'm 16 so i just starting also it's very basic ๐
Itโs okay, we support all beginners
Hypothetical: What is the fourth thing in a list of three things?
!e py print("abc"[0]) print("abc"[1]) print("abc"[2])
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | a
002 | b
003 | c
!e py print("abc"[3])
i have a question but to explain you need to understand instructions, it's good ?
@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 | IndexError: string index out of range
!e py d = ["AAA", "BBB", "CCC"] print(d[0]) print(d[1]) print(d[2]) print(d[3])
@somber heath :x: Your 3.11 eval job has completed with return code 1.
001 | AAA
002 | BBB
003 | CCC
004 | Traceback (most recent call last):
005 | File "<string>", line 5, in <module>
006 | IndexError: list index out of range
I don't understand what you just did?
What is the fourth thing in a sequence of three things?
It can't be answered.
Have an IndexError.
There is no element at index position 3 (fourth position).
I need to create a new list from an old list. I have to sort the basic list to keep only the "metal" bands but in my program (line 16) I put "== Metal" it doesn't work
ok no problem
๐
thanks
== "Metal"
Heyo
how to rest setting to default
tkinker
!voiceverify
It needs to be in the #voice-verification room, I believe.
Hey there. Yeah, I'd wondered why it returned nothing, then I headed there.
@whole bear ๐
hi
!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.
@crystal flare ๐
It keeps visiting a friend of mine in his backyard
Weโre in Malaysia :0
It even lets him pet it
Awh.
The green-billed malkoha (Phaenicophaeus tristis) is a species of non-parasitic cuckoo found throughout Indian Subcontinent and Southeast Asia. The birds are waxy bluish black with a long graduated tail with white tips to the tail feathers. The bill is prominent and curved. These birds are found in dry scrub and thin forests.
Thank Google lens.
its ok u can get voice ops pretty quick
what I gotta do man?
u just have to chat a bit in text ๐
!voice
just havent joined vc
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
I hate it im not a typer
Aye jack black
hahaha
I remember that
It was mental the screaming
@lucid blade fellas i dont want to be a pain but would youns be able to help me out a second?
I was probs one of the people in it screaming im ngl
So basically Im trying to webscrape this website but Im having an issue lol so theres a script on the website that holds a youtube url i dont know how to target it
Automate getting work
its for youtube editing
nope ahha
aight bet g
Alright Ill get a translator
See Im trying to learn python because Im trying to like figure out how to get youtube editing work better because I edit for people lol
@lucid blade what IDE do I use for it?
Im using pycharms
pip install regex?
see I was using BS4
Thats actually ticket very new to this was looking at BS4 todo this
Beautiful Soup
@lavish rover Apparently, Aecor needs a regex library to be considered a proper programming language.
@little jay ๐
I did that
ill show you
So like that was my manual approach lol
Again not a coder
hmmm
didnt think of that
Aight let me write that into my notes
CURL
Requests
requests
pip install requests
yeah see I think ive just been doing it all wrong but thats the learning process
Yeah like I try todo alot of the stuff manually but like I see where thats going to be the issue
If I did all of that manually id be sitting for hours sorting through
openxyl
is what I was using
openxyl and then I can save it and drag it into google sheets
!d sqlite3
Source code: Lib/sqlite3/
SQLite is a C library that provides a lightweight disk-based database that doesnโt require a separate server process and allows accessing the database using a nonstandard variant of the SQL query language. Some applications can use SQLite for internal data storage. Itโs also possible to prototype an application using SQLite and then port the code to a larger database such as PostgreSQL or Oracle.
The sqlite3 module was written by Gerhard Hรคring. It provides an SQL interface compliant with the DB-API 2.0 specification described by PEP 249, and requires SQLite 3.7.15 or newer.
This document includes four main sections:
mad how youns know all this im a video editor so i know that like the back of my hand haha but coding is like a whole different world
ive heard of it
most amount of expressions i use day to day is inside of after effects
@livid oxide ๐
hi. Lol i am new to the server cant talk so.
where r u from lads
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
its written i have less than 50 messages its written that
i just moved to manchester there for uni lol
okey
ah cool do you watch Charles Veitch on YT ๐
Mathematical sentience complex trapped in over-clocked ape graphics card brain.
A living man can be enslaved and reduced to the historic condition of an object. But if he dies in refusing to be enslaved, he reaffirms the existence of another kind of human nature which refuses to be classified as an object. -Albert Camus
ahahaha
ive seen his videos
where he kicks the guy in town
supposedly hes massive
fk off
i wouldnt go no where near him
wait how tf do I use curl in pycharms?
yeah
You guys are expert in python?
Let's say experienced.
.....ok. Like i am well versed in java so it would be easy for me to learn python what you guys think?
nope
ohk
oh
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!voiceverify
๐ this voice verify thing is bit weird
The subject shifts.
Tell that to C
Sometimes we talk about Python. Sometimes we talk about other things.
makes sense ig
In this video, I will show you how you can update the JavaScript DOM with your Flask app.
Website: https://www.sohanpy.com/
Text Based Tutorial: https://www.sohanpy.com/blogs/how_to_access_the_javascript_dom_with_python_flask
GitHub Page: https://github.com/sohan-py/
GitHub Repo: https://github.com/sohan-py/ChangeDOM
Discord Server: https://dis...
Heylooooooooooooooooooo biutiphul hooomaaan @somber heath
@ruby cypress its not the right tut
i watched it
its close to what u need but the other way round
it interacts with the dom
but u need something to read + interact the dom
Sponsors:
- Brilliant: https://brilliant.org/TOE for 20% off
- Rocket Money: https://rocketmoney.com/everything
- Masterworks: https://masterworks.com promo code TOE
- Uncommon Goods: https://uncommongoods.com/everything
New TOE Website (early access to episodes): https://theoriesofeverything.org/
Patreon: https://patreon.com/curtjaimungal
C...
At MIT's Center for Bits and Atoms, Adam gets a glimpse into the future of making. He starts out his tour with some amazing nano-technologies, including a machine that can see the hairs on the hairs of a baby spider. Welcome to your new robot overlords!
This series and tour is made possible by The Fab Foundation
(http://www.fabfoundation.org/)...
In the second part of his tour of MIT's Center for Bits and Atoms, Adam learns about multiple micron tools and meets BILL-E (Bipedal Isotropic Lattice Locomoting Explorer), an incredible robotic assembler that you're going to have to see to believe.
This series and tour is made possible by The Fab Foundation
(http://www.fabfoundation.org/) and...
The next stage of machines making machines isn't rapid prototyping, it's rapid prototyping of rapid prototyping. In this third part of his tour of MIT's Center for Bits and Atoms, Adam delves into some mind-bending meso technologies.
This series and tour is made possible by The Fab Foundation
(http://www.fabfoundation.org/) and Chevron (https:...
x(nb)= nb^1/2 if nb = float ;nb = 0
@somber heath
x(25)=5
x(100)=10
x(36)=6
x(5)=0
!e py import math print(math.sqrt(25)) print(25 ** .5)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 5.0
002 | 5.0
!e py print(1.5 % 1) print(7 % 1)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 0.5
002 | 0
!e py print(not True) print(not False)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | False
002 | True
Integer testing.
Truthiness inversion.
!e py if -1: print("A") if 0: print("B") if 1: print("C")
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | A
002 | C
Zero is falsy. Nonzero is truthy.
!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 SquareRootFloor(beg, end, n):
ans_sqrt = n
while (beg <= end):
mid = int(beg + (end - beg) / 2)
print(f"beg : {beg} end : {end} mid : {mid}")
if (mid * mid == n):
return mid
elif (mid * mid > n):
end = mid - 1
else:
print(f"Store square root as mid ({mid}) ")
ans_sqrt = mid
beg = mid + 1
return ans_sqrt
def ft_sqrt(nb):
print(f"Finding square root of : {nb}")
sqrt_n = SquareRootFloor(1, nb, nb)
print("Output : " + str(sqrt_n) + "\n")
ft_sqrt(100)
ft_sqrt(36)
ft_sqrt(25)
ft_sqrt(5)
ft_sqrt(3)
!e py print(9 / 4) print(9 // 4)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 2.25
002 | 2
Floor division rounds down.
int rounds toward zero.
!e py name = "Peter" age = 25 print("Hello, " + name + ". You are " + str(age) + " years old.") print(f"Hello, {name}. You are {age} years old.")
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | Hello, Peter. You are 25 years old.
002 | Hello, Peter. You are 25 years old.
!f-string
Creating a Python string with your variables using the + operator can be difficult to write and read. F-strings (format-strings) make it easy to insert values into a string. If you put an f in front of the first quote, you can then put Python expressions between curly braces in the string.
>>> snake = "pythons"
>>> number = 21
>>> f"There are {number * 2} {snake} on the plane."
"There are 42 pythons on the plane."
Note that even when you include an expression that isn't a string, like number * 2, Python will convert it to a string for you.

