#voice-chat-text-0
1 messages · Page 802 of 1
4 is probably the point where more for me isnt very helpful, but i can easily justify having 4, i like to have discord, spotify, vscode, and some sort of docs
I like one monitor, helps me focus and get less cat-stracted
going back to single
only got 2 here, one of which is an ultrawide
resolution?
Makes sense
u basically have 3 then lol
ultrawide gives me a headache.
hemlock over here trying to be wholesome and grateful to @ Chrisjl :) but everyone else be like "damn you have 4 monitors? I have 1 ultrawide" lmao. Too good, I love voice-chat :D
3440 x 1440
Do you really need a monitor for spotify lol
1400 x 700 section for spotify :D
I have one just for Rick Astely
lmao i bet u do
i'm ok with my 23 inches ^^
if i have to spend time switching to spotify to skip songs i dont like (of which there are many) then that's time wasted
sometimes i do also just have 3 screens of docs
i just use my phone as a remote for spotify
its happened before
I use google nest cuz I'm lazy
oh hemlock did you ever try those tools lol
i'm guessing not
one of these days
adds to list
!stream @rugged root
@rugged root
✅ @rugged root can now stream.
well excuuuuuuse me
coolio 5m default now
How do you people live with the constant leave-join sounds
streaming mode 👀
disable..
you turn off the sounds lol
you can turn em off
i sometimes keep joins on but leaves off
because its kind of awkward if you dont realize somebody joined
👀
i could probably utilise more screens tbh, because i always have: discord, insomnia, firefox*2, vscode*4 and datagrip
you build apis a lot?
Have you heard of this great thing called tabs
vco is api master
the quantity of vscodes increases as my pc is left on because i forget to close them and dont want to reopen stuff to get back to it 😅
!revokestream 98195144192331776
✅ Revoked the permission to stream from @rugged root.
noice
Can't leave this guy around streaming
👌
!rstream @balmy nymph
❌ This member doesn't have video permissions to remove!

Probably will stream tax stuff or something
lul
who knows what he'll do 😒
lol y tax stuff
To make me feel at home?
also yes, many 
yay!
duckify api so good
but owo api
hmmm, looking into the api, the only way to stop someone streaming is to kick the or move them to another channel
This is owoified text which is a definyitewy vewy intewesting api
yea
"I get home and I feel nothing at all. Do nothing all night but stare at the wall."
So if we wanted, when we revoke stream perms we could move them to another channel and move them back
Teamspeak didn't have text chats like discord right?
something like ```py
if discord.ActivityType.streaming:
await do_the_thing()
else:
dont()
hey guys 👋
Hey
iirc you can move to None even if they aren't in a channel
so it's just
# on timeout
member.move_to(None)```
yea, that'll d/c them completely
do you need to use it somewhere?
i think we just want to stop them from streaming, so move and move back
I have to/ must learn about it
using what technology?
DAMN
thats a hard deadline
do you just need to know what it is?
or do you have to be able to implement it somewhere
any language
but if it could be C#, that would be awesome
no, not gotta implement it anywhere
just a simple test on it
ok, maybe not simple
not even a test
like an interview
or interrogation, to be precise
I found this for now https://blog.ploeh.dk/2017/01/27/dependency-injection-is-passing-an-argument/
dependency injection isn't really something you can learn about, you just have to do it
i could give you an example using a javascript framework
just read this definition once before that though
ok, thanks
Strangely, not about drugs.
personally enjoy the singleton pattern
🤔
its always Wikipedia, which is the best source in end
:))))))
yeah, I better go start already
@honest pier I don't think you ever know know cpp
😔
I'll be back gotta do some school work.
pure is going to enlighten us in the ways of pure functional programming once again today!
yay!
and how strongly statically typed compilers are amazing!
vercel is pog
damn i see mr. hemlock feels extremely strongly about this
Kaggle is the world’s largest data science community with powerful tools and resources to help you achieve your data science goals.
Argh, pipewire just crashed
damn wheres griff today
chessss
me nub too
lemme make link
Join the challenge or watch the game here.
Here in my garage... The more you learn, the more you earn. It's all about KNOWLEDGE! Bill Gates & Warren Buffet both agreed that if they could have one super power they would be the world's fastest readers. Books and Mentors have made all the difference in my life. They taught me 67 Steps to go from broke and sleeping on a couch to doing bigger...
ok so um
No inputs, no outputs
Functional has left the channel
def multiply(x, y):
return x * y
simppi
yes
"What's the highest level of mathematics?" Something something astrophysics?
hm? that's not a well defined question
Maybe agrarian economics?
Differential geometry
@flat sentinel Please don't use the r-word in a deprecating manner here
ok
Evening
🤔 🤔 🤔
Some interesting stuff is going on
celsius? can i get that in freedom units please?
.wa 21 Celsius to american
wow
.wa 21 celsius to rankine
@hollow haven Hungry
burrito
i have a better idea: pupusas salvadoreñas
ı have one more better : menemen
no
A big no
mean :((
adorable puppers!!!!
We have same ideo but with our Flora , Aşure
I'm really looking forward to this summer. Lobstah
@honest pier is streaming games in the vc allowed?
no
ok
I'll be back on in a bit.
HA! Glad someone enjoys it at least
yo!
Hemlock sure does know a lot of people. Must be nice having friends...
yea its dope
pretty fun
Awesome
what do you use python for usually @ BeingManav?
im glad the community is not toxic
so im a teen n live in india and my dad has a reruitin agency n he asked me to make a data base
lol
typin for so long
great! you using sqlite?
cuz i hve vacations
nah i thought i cen use
python n mysql
nneeded help lol
yeah mysql is good
so joined the server
k
and everyone is really helpful
thanks bruh
yeah code help vc also works if you want verbal help
not really to be recommended
he uses c
help channels or python general is better thaan code help voice channels
really down to preference i think :)
yea sure
but yes, vcs take longer(usually)
in scope of the amount of people available to help I mean
you're right
when do ya think @ lemon is going to switch out his duck pfp
i hve iuuuu
how the heck did this get through
#python-discussion message
didnt understand lol
k
i dont use dis a lot
yea dont wanna disturb
pls carry onnn
Greenwich
gren-itch
just like worcester is wuss-ter
and hampshire is hampsher
and deptford is de'ferd
lol
Provided to YouTube by Symphonic Distribution
Dubstab · MyMind
At Night
℗ 2013 Muopia Records
Released on: 2013-04-08
Artist: MyMind
Auto-generated by YouTube.
sounds dark
₧
!charinfo ₧
\u20a7 : PESETA SIGN - ₧
Code page 437 (CCSID 437) is the character set of the original IBM PC (personal computer). It is also known as CP437, OEM-US, OEM 437, PC-8, or DOS Latin US. The set includes all printable ASCII characters, extended codes for accented letters (diacritics), some Greek letters, icons, and line-drawing symbols. It is sometimes referred to as the "O...
×
!charinfo ×
\u00d7 : MULTIPLICATION SIGN - ×
In your hymnal, please turn to page 437 number 158, PESETA
that's an ASCII extension for the IBM PC
k
but it's not the original ASCII
!charifo 255
oh yay jakes back
You are not allowed to use that command here. Please use the #bot-commands channel instead.
i missed you jake
k
but if I were you I'd stick to unicode
that is hilariously outdated behaviour
it's your own program?
that has nothing to do with it
you don't have an intimate understanding of what every section does and whether or not it can be removed
huh?
huh.
@rugged root
right, supper's ready
gotta go
bye
DAMN
im happy you had my stream pulled up!
:)
can we petition for pictures of hemlocks cat
WOAH
wdym whoooa
omfg
install instabot
bye @ Mr. Hemlock!
@wintry kernel i have it
pip install instabot
bye @ jake
upgrade pip
try importing instabot from the command prompt
@strong arch how can i do it
what command did u use to do the pip install
brooo
then just type python in the command prompt
@strong arch Thanks i will try it
6 undecillion 156 decillion 119 nonillion 580 octillion
damn that big
26^26
@sage swift dm'd me for no reason
you need to voice verify first
i know
js
html
css
python
Hey @wintry kernel!
It looks like you tried to attach file type(s) that we do not allow (.js). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a.
Feel free to ask in #community-meta if you think this is a mistake.
brr
gays how to create a interface for a program in python
!e if (WiFi.status() == WL_CONNECTED) { //Check WiFi connection status
HTTPClient http; //Declare object of class HTTPClient
http.begin("http://192.168.1.88:8085/hello"); //Specify request destination
http.addHeader("Content-Type", "text/plain"); //Specify content-type header
int httpCode = http.POST("Message from ESP8266"); //Send the request
String payload = http.getString(); //Get the response payload
Serial.println(httpCode); //Print HTTP return code
Serial.println(payload); //Print request response payload
http.end(); //Close connection
} else {
Serial.println("Error in WiFi connection");
}
delay(30000); //Send a request every 30 seconds
}
@queen saffron :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | if (WiFi.status() == WL_CONNECTED) { //Check WiFi connection status
003 | ^
004 | SyntaxError: invalid syntax
here on the POST function the message is not posting
can anyone suggest why is it so?
🤨
im gonna brb in 10 hours gotta bed
@whole bear :white_check_mark: Your eval job has completed with return code 0.
hi
!e
!eval [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.
We've done our best to make this sandboxed, but do let us know if you manage to find an
issue with it!*
@whole bear :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | \
003 | ^
004 | SyntaxError: unexpected EOF while parsing
ForbiddenKJ
{'slushs': ('84acb39724084c4dbd4b106b93de11d0', 1617746523), 'forbiden': ('05d9d21db2154e35b7651ccb7b5073a1', 1617746638)}
my_dict = {'slushs': ('84acb39724084c4dbd4b106b93de11d0', 1617746523), 'forbiden': ('05d9d21db2154e35b7651ccb7b5073a1', 1617746638)}
for k, v in my_dict.items():
print(v[1])
!e
my_dict = {'slushs': ('84acb39724084c4dbd4b106b93de11d0', 1617746523), 'forbiden': ('05d9d21db2154e35b7651ccb7b5073a1', 1617746638)}
print(my_dict.items())
@gentle flint :white_check_mark: Your eval job has completed with return code 0.
dict_items([('slushs', ('84acb39724084c4dbd4b106b93de11d0', 1617746523)), ('forbiden', ('05d9d21db2154e35b7651ccb7b5073a1', 1617746638))])
!voice @uneven jay
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Name every Python Type 
if you like patreon, you'll love patreon live
dict?
You confuse me @uncut meteor
!e
print(type(int))
@uncut meteor :white_check_mark: Your eval job has completed with return code 0.
<class 'type'>
@uncut meteor :white_check_mark: Your eval job has completed with return code 0.
<class 'type'>
object
set fish_function_path $fish_function_path "/usr/share/powerline/bindings/fish"
powerline-setup
Hey LX
dict
no.
@stuck furnace what the fuck does the last sentence mean
What's the context?
so if the phone was manufactured oct 2016, and in (ny or ak), it is faulty
uh, determine if a phone is faulty based on its id
id is a string with stuff in it
that's not important though, i just can't understand the criteria
which part does the but not by 27 apply to
so basically if you divide by 9 you get whole number
if you divide by 27 you do not
i know what divisible means. i just don't know how they apply with each other
both of those criteria must be met
and the "unless"?
if the unique id meets those criteria, then the phone is not faulty even if it was manufactured in oct. 2016 in NY or AK
it's not and
any of the criteria it says
so or
i'm parsing it as
if divisible by 9 and not divisible by 27:
not faulty
elif in october and in 2016 and (in ny or ak)
```?
doesn't say that the unique id disqualifies other invalidities
Why when I open a file in py it opens then this instant closes
only the AK and NY october 2016 invalidity gets disqualified by the if divisible by 9 and not divisible by 27
at least, that's all it definitely states
run it using the terminal, not by double clicking
who ?
the person i quoted
How do thaht ?
if (
(manufactured in westchester)
or (
(manufactured in newjersey)
and
(november_2015 <= manufacture_date <= february_2016)
)
or (
(
(manufactured in new_york)
or
(manufactured in alaska)
)
and
(manufactured_date == october_2016)
and not
(
(unique_id % 9 == 0)
and not
(unique_id % 27 == 0)
)
):
return "faulty"
Alright Jake, so I would start by finding the indices of the dog, cat, and mouse.
Ok.
!docs str.find
str.find(sub[, start[, end]])```
Return the lowest index in the string where substring *sub* is found within the slice `s[start:end]`. Optional arguments *start* and *end* are interpreted as in slice notation. Return `-1` if *sub* is not found.
Note
The [`find()`](#str.find "str.find") method should be used only if you need to know the position of *sub*. To check if *sub* is a substring or not, use the [`in`](../reference/expressions.html#in) operator:
```py
>>> 'Py' in 'Python'
True
test.assert_equals(cat_mouse('..D.....C.m', 2), "Caught!")
test.assert_equals(cat_mouse('............C.............D..m...', 8), "Escaped!")
test.assert_equals(cat_mouse('m.C...', 5), "boring without all three")
test.assert_equals(cat_mouse('.CD......m.', 10), "Protected!")
test.assert_equals(cat_mouse('.CD......m.', 1), "Escaped!")
Ah Jake, I think you're getting confused by the notation in the documentation.
This notation: str.find(sub[, start[, end]])
just means that start and end are optional arguments.
It's a Unix thing, I think.
Alright, so the index of the cat is given by x.index('C')
Nah, you have to do them one at a time unfortunately 😄
what would it be cool to do 👀
Erm, I deleted it because I mentioned regex, and that might throw Jake off course 😄
@honest pier, this is by best interpretation of that problem: ```py
a # West Chester
b # between November 2015 and February 2016
c # New Jersey
d # October 2016
e # New York
f # Alaska
g # ID divisible by 9
h # ID divisible by 27
faulty = (
a
or (b and c)
or (d and (e or f) and not (g and not h))
)
huh
But, it could also be interpreted as ```py
faulty = (
a
or (b and c)
or (d and (e or (f and not (g and not h))
)
Jake, there are two things you need to find out:
- Is the mouse within reach of the cat?
- Is the dog between the cat and the mouse?
You could put those into variables.
in_reach = ...
dog_between = ...
Oh, I didn't realise that some animals might not be present.
Cya Oof 👋
bye
!docs abs
abs(x)```
Return the absolute value of a number. The argument may be an integer, a floating point number, or an object implementing [`__abs__()`](../reference/datamodel.html#object.__abs__ "object.__abs__"). If the argument is a complex number, its magnitude is returned.
tkinter.pack(abs)
Erm, the cat can move in either direction I think.
That's why you might want to use the abs function.
ok
!pastebin
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.pydis.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.
¯_(ツ)_/¯
o
I'm kind of bad at it too tbh.
!e
x = abs(7-9)
print(x)
@true zodiac :white_check_mark: Your eval job has completed with return code 0.
2
!e
absolute = lambda n: -(-(n))
assert absolute(-10) == abs(-10)
assert absolute(10) == abs(10)
@terse needle :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | AssertionError
!eval ```py
print(abs(10 - 15))
print(abs(15 - 10))
@stuck furnace :white_check_mark: Your eval job has completed with return code 0.
001 | 5
002 | 5
huh
Er, what?
@honest pier have you learned about streaming algorithms?
Erm, it's a kind of algorithm.
@honest pier :white_check_mark: Your eval job has completed with return code 0.
13
Where you have a stream of data, and you have to process it, but you're only allowed to pass through the stream once, and you are only allowed to use a minimal amount of additional memory.
I just learned about them recently.
oh like that problem where it's like "pick an element of a list so long that you can't fit it in memory with equal probability"
The XOR algorithm is actually an example (I didn't know that until yesterday).
right, because you don't have to count all the elements
Yeap
the xor would work no matter what since you just have 1 int
which you would need anyway to output a solution
wild
@carmine imp check out #❓|how-to-get-help
I hadn't realised until now that GitHub is actually kind-of a social-media platform 😄
follow me on github
Am I not already?
idk lol
follow for follow 😍
yeah you did
you can't really post anything though
you can see people star things lol
I just edited my profile. Did that come up in your feed? 😄
Just the description.
nah
i only see people starring things, people making repos, and people following people
Hmm, maybe making a repo is like a tweet 🤔
👀
Erm, it just asserts that the code is not to be used by others 😄
"asserts"
Which I think is the equivalent to just not having a license, right?
Hmm, they seem a bit redundant 😄
lul
Hey Mina 👋
👋
wb LX
Er, wb?
welcome back
I do the same lol
What's everyone up to?
Oh right nice. Do you feel like you're getting the hang of it?
Yeah I am but some of the problems are worded in a confusing way they are just very wordy
Yeah, I feel like learning to interpret the questions is half the battle 😄
After a while you realise there are like 10 basic problems, and they're all variants of these.
wanna do binary search lol
And once you know the different kinds of problem it becomes easier to pick out the key words from the question to figure out what they're asking.
there aren't any easy dp problems :c
Oh, you just want to practice dynamic programming?
Learn algorithms together on binarysearch. Create a room, invite your friends, and race to finish the problem.
wow, the name is dynamic programming
Erm, it's just dp problems 😄
lul
pseudo code:
if not all 3:
return not fun
elif abs(c-m) > j:
return cannot.
else:
return caught.
🙂
@dire oriole want to join us practicing DP problems? 😄
o
o
Yo @fast umbra
Not much. Doing programming problems 😄
Er, probably the latter 😄
Learn algorithms together on binarysearch. Create a room, invite your friends, and race to finish the problem.
This question is hard 
harder :P
I guess as it's a sum, the ordering doesn't matter...
So like take [2, 6, 4, 1]
The possible subsequences are...
[2, 6, 4, 1]
[2, 6, 4]
[2, 6, 1]
[2, 4, 1]
[6, 4, 1]
[2, 6]
...
There are 2^4 = 16 possible subsequences.
Imagine taking the sum of each of these.
Of these sums, you need to find the largest which is divisible by k.
But you can't just enumerate all of the subsequences, as there are 2^n of them, where n is the length of the list of numbers.
Erm, so a subsequence is just the original sequence with any number of elements removed.
Hey @iron plume
Erm, so I generate the subsequence sums in descending order.
Then return the first one that is divisible by k.
Kind of. You can look at my code at the end of the round.
Yeah, that's kind of what I did.
Oh yeah, they're all dynamic programming problems.
Sorry, forgot to tell you that 😄
Dynamic programming is a silly name for what it is tbh...
Apparently the guy named it that because he thought it was more likely to get research funding.
Erm, not sure 😄
Ah right
Programming job descriptions are often pretty inaccurate
I remember once seeing a job description asking for more years experience with a tool than the number of years that tool had existed...
Yeah 😄
Erm, so do you want to take a look at my solution?
I use yield from which is pretty uncommon.
Oh, to exit from the generator early.
yield from is nice for tree-traversal: ```py
def inorder(root):
if root:
yield from inorder(root.left)
yield root.val
yield from inorder(root.right)
Actually, async used to be based on the yield from keyword I believe.
Next question starting in 20 seconds...
Ah right
Hmm 🤔
I might use groupby 😄
Ohhh, subsequence
That keeps catching me out 
@past pawn, might want to turn on PTT
oh hi
hi
@past pawn you are breathing quite loudly
I'll leave then
huh? you could just mute
There I sound better? Xd
🤔
...
Hey @whole bear
oops
So... DP problems are hard 😄
My brain is not working, so I think I'm going to take a break, maybe have something to eat...
Cya 👋
oh
o
What’s a segment tree
it's a fancy tree
vc damn quiet lel
Yeah idk why we’re so quiet
a bit less quiet now that we have random noises from daspecito's background 🧐
DAMN
It’s my dad rummaging around in the unorganized closet
so whats going on? anyone building anything cool/interesting that they wanna share?
woah
it went as well as law exams typically go 🥴
FFFFF
Got a 76
out of 100?
don't compare yourself to the worst people lol
compare yourself to the people who did better
then disregard that score lol
you're in the class
Like they were dropping answer keys in the group chat I made
I didn’t cheat
what’s the point you copy someone else’s answer key and then get a 60 🥴
i thought you were a business student?
i c i c
If this is what actual law is like during the pandemic
rip law students ig
lawyers in general amaze me
How do you memorize such gigantic books
same w med students too
@past pawn you've got lots of background noise,
Whatcha doing 🥴
Clickety clackety
my code so far py text = 'hello: world' output = [] for word in text.split(): added = '' if not word[-1].isalpha(): added = word[-1] word = word[:-1] word = word[::-1] + added output.append(word) print(' '.join(output))
!e ```py
def fancy_algorithm(n):
a, b = n.divmod(10)
a = 10
b -= 2
return ab
r = fancy_algorithm(69)
print(r)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
420
!e ```py
def fibonacci(m, a, b):
return [a] + (fibonacci(m, b, a+b) if a <= m else [])
print(*fibonacci(100,0,1), sep='\n')
@past pawn :white_check_mark: Your eval job has completed with return code 0.
001 | 0
002 | 1
003 | 1
004 | 2
005 | 3
006 | 5
007 | 8
008 | 13
009 | 21
010 | 34
011 | 55
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/lilasinozi.txt?noredirect
whats up jake
!e ```py
for i, e in enumerate(['h','e','l','l','o']):
print(i, ':', e)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
001 | 0 : h
002 | 1 : e
003 | 2 : l
004 | 3 : l
005 | 4 : o
@carmine imp
hi
you see how enumerate works now?
!e ```py
packed = (0, 'h')
i, e = packed
print (i, ':', e)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
0 : h
ok
works pretty much the same in a for loop
!e ```py
for packed in enumerate('hello'):
print(packed)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
001 | (0, 'h')
002 | (1, 'e')
003 | (2, 'l')
004 | (3, 'l')
005 | (4, 'o')
thank you so much fr not giving up to explain it to me even though I'm dumb ass
that's what enumerate does if you pack its output
nah your not dumb. many would still be "huh"ing
lol
oh wait
what happend
partition behaves differently when there's no spaces left
!e ```py
text = "HEllo::: Wo;Rl4D!"
def reverse_word(word):
punc, lett, out = [''] * len(word), [''] * len(word), ''
for i, c in enumerate(word):
if c.isalpha(): lett[i] = c
else: punc[i] = c
lett = [c for c in lett[::-1] if c]
for i, c in enumerate(punc):
out += c if c else lett.pop(0)
return out
def reverse_alpha(s):
a, _, b = text.partition(' ') if ' ' in s else (s, ' ', '')
return reverse_word(a) + _ + (b and reverse_alpha(b))
r = reverse_alpha(text)
print (r)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
ollEH::: Dl;Ro4W!
there
you
are
a
genius
Code wizard
?
except I don't get half of the code
like this for example py punc, lett, out = [''] * len(word), [''] * len(word), ''
you don't need a middle-man variable for packing
punc, lett, out = [''] * len(word), [''] * len(word), ''
is the same as
packed = ([''] * len(word), [''] * len(word), '')
punc, lett, out = packed
[''] * len(word) is a nice, concise shortcut for
temp = []
for char in word:
temp.append(str())
?????????????????????????????????
wait
so your making empty lists and then putting empty strings in the lists?
the lists aren't empty tho. They're initialised with an element, then that element is copied and appended to the list
so it's probably more accurate to say it does this:
a = ['']
if word:
for i in range(len(word)-1):
a.append(a[0])
else: a = []
so my dumb brain can understand
what would a be at the end
no keep as is
that only makes it harder for my little smooth brain
so a * n where a is a list and n is an integer calls a function similar to this:
def __mul__(a, n):
new = []
for i in range(n):
new += a
return new
there, simplified
what is range(n)
so __mul__ is a method of list that allows you to do [''] * len("Hello:::") to get ['','','','','','','','']
i have the IQ of a flintball
!e ```py
print(*range(5), sep='\n')
@past pawn :white_check_mark: Your eval job has completed with return code 0.
001 | 0
002 | 1
003 | 2
004 | 3
005 | 4
that is range(5)
!e ```py
def range(n):
if n < 0: raise ValueError
counter = 0
while counter != n:
yield counter
counter += 1
print(*range(5), sep='\n')
@past pawn :white_check_mark: Your eval job has completed with return code 0.
001 | 0
002 | 1
003 | 2
004 | 3
005 | 4
!e ```py
a = [4,2,0]
print(a)
print(*a)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
001 | [4, 2, 0]
002 | 4 2 0
is it the same is .join()
!e ```py
a = [6, 9]
def fancy(x, y):
return 10 * x * (y +- 2)
r = fancy(*a)
print(r)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
420
it unpacks an iterable to fill arguments passed to a function
wouldn't it multiply 10 by x by (y+-2)
I HAVE SMOOTH BRAIN
THIS SHOULDN'T BE THAT HARD
UHG
!e yes, so that's the same as
packed = 6, 9
def fancy(x, y):
return 10 * x * (y +- 2)
x, y = packed
r = fancy(x, y)
print (r)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
420
except you don't have to know how long the iterable is if you're gonna use a starred expression
!e so we've gotten this far in understanding ```py
word = "wassup?"
punc, lett = [''] * len(word), [''] * len(word)
for i, c in enumerate(word):
if c.isalpha(): lett[i] = c
else: punc[i] = c
print(punc)
print(lett)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
001 | ['', '', '', '', '', '', '?']
002 | ['w', 'a', 's', 's', 'u', 'p', '']
you see how it separates the categories of symbol?
aww
maybe tomorrow
:/
so what that does is intialises two lists punc and lett the same length as the word, and every element is an empty string.
then, for every index, character in the word:
if it's a letter, set that index of lett to the character
else, it's not a letter so set that index of punc to the character
hence the first six characters go to lett and the last character goes to punc
now, the next line XD
lett = [c for c in lett[::-1] if c]
I still don't get the star though
!e ```py
def fluffy(*a):
print(a)
fluffy(1,6,2,7,4,9,5)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
(1, 6, 2, 7, 4, 9, 5)
it makes space?
it unpacks arguments if passed to a function
it packs arguments to a function in the case of def fluffy(*a) so a is a tuple of whatever is passed to fluffy
for example in fluffy(1,6,2,7,4,9,5), a is (1, 6, 2, 7, 4, 9, 5)
!e ```py
print (1, 6, 2, 7, 4, 9, 5)
def fluffy(*a):
print(*a)
fluffy (1, 6, 2, 7, 4, 9, 5)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
001 | 1 6 2 7 4 9 5
002 | 1 6 2 7 4 9 5
in the print function, it does in fact "make spaces"
if you are tiered of teaching me you can go if you want because I know i must be very frustrating
neh, i'm not leaving XD
!e just to mess with ya ```py
print(end='(')
print (1, 6, 2, 7, 4, 9, 5, sep=', ',end=')\n')
@past pawn :white_check_mark: Your eval job has completed with return code 0.
(1, 6, 2, 7, 4, 9, 5)
confusion - ∞
!e ```py
a = (1, 6, 2, 7, 4, 9, 5)
print(end='(')
print (*a, sep=', ', end=')\n')
@past pawn :white_check_mark: Your eval job has completed with return code 0.
(1, 6, 2, 7, 4, 9, 5)
there, that should clear it up
see what has changed in the third line
all of those arguments passed to print have been summarised as *a where a is defined as an array of... those arguments
!e ```py
def funcy(a, b, c):
return a + b * c
a = [3, 5, 2]
r = funcy(*a)
print(r)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
13
you see how funcy(a, b, c) takes three arguments?
then a = [3, 5, 2] is three objects
so how would you pass each element from a to funcy?
without *a you would have to do this:
def funcy(a, b, c):
return a + b * c
a = [3, 5, 2]
r = funcy(a[0], a[1], a[2])
print(r)
a + b * c === a + (b * c)
!e ```py
def fluffy(*a):
print(a)
fluffy(1,6,2,7,4,9,5)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
(1, 6, 2, 7, 4, 9, 5)
!e print(tuple((1,6,2,7,4,9,5)))
@past pawn :white_check_mark: Your eval job has completed with return code 0.
(1, 6, 2, 7, 4, 9, 5)
!e *[1, 2, 3, 5]
@past pawn :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | SyntaxError: can't use starred expression here
!e ```py
def fluffy(a):
print(a)
fluffy([1,2,3], *[5,6,7])
@past pawn :white_check_mark: Your eval job has completed with return code 0.
(1, 2, 3, 5, 6, 7)
!e ```py
def fluffy(*a):
print(a)
fluffy([1,2,3], [5,6,7])
@past pawn :white_check_mark: Your eval job has completed with return code 0.
([1, 2, 3], [5, 6, 7])
!e ```py
def fluffy(a):
print(a)
fluffy([1,2,3], [5,6,7])
@past pawn :white_check_mark: Your eval job has completed with return code 0.
(1, 2, 3, [5, 6, 7])
[1,2,3,4]
list( (1,2,3,4) )
!e therefore
t = (1, 2, 3, 4)
print( [*t] == list( (1, 2, 3, 4) ) )
@past pawn :white_check_mark: Your eval job has completed with return code 0.
True
[] is a "shortcut" for list()
lett = [c for c in lett[::-1] if c]
is equivalent to...
lett = []
for c in lett[::-1]: # i've seen you do this
if c!='':
lett.append(c)
!e
import os
os.system("uname")
@trail tusk :warning: Your eval job has completed with return code 0.
[No output]
!e
import os
print(os.system("uname -a"))
@trail tusk :white_check_mark: Your eval job has completed with return code 0.
-1
!e
import os
print(os.system("echo 'hi'"))
@trail tusk :white_check_mark: Your eval job has completed with return code 0.
-1
!e
import os
os.system("echo 'hi'")
@trail tusk :warning: Your eval job has completed with return code 0.
[No output]
Hello everyone
hellloo
I dont have mic so I cant talk anyways but ye
would talking about emulation be against tos
i was thinking about embedding python in an emulator for scripting
I might get stuff and make it do stuff
now that last sentence is definitely against tos
It's not
it does but I kinda wanted to make it on my own.....
game hacking? @zenith radish
Is hacking pokemon red against tos?
Is finding exploits in 90 year old single player games against tos?
actually... making code and then inserting it into another game/program sounds against tos
sometimes if the tos for that game say so @zenith radish
doesn't mean I think it's a bad thing, but it's definitely against tos
yeah
see sections 5iii and 5vi of https://www.pokemon.com/us/terms-of-use/
Terms of Use
ye i wont ask here yeah Ill go to those place
another project could be high level language scripting and then compiling it to run on gameboy ... perhaps
maybe gameboy color ...... Theres a new C library for gameboy advance
I d love to write a game like links awakening
yeah
i'm guessin it could also do nice pixel art games?
ill have a looko
try: cast to int; except Exception: return cant be converted.
check the new funny game
🙂
!e ```py
def convert(s):
try:
return int(s)
except TypeError as e:
return None
print(convert("15"))
@paper tendon :white_check_mark: Your eval job has completed with return code 0.
15
I do online school so I am a bit in and out all day.
!e
def validate_input(cmd: str):
words = cmd.split()
return words[0], words[1:]
print(validate_input("mul 2 2"))
@terse needle :white_check_mark: Your eval job has completed with return code 0.
('mul', ['2', '2'])
hey guys can u help me with this code
!e
def validate_input(cmd: str):
words = cmd.split()
return words[0], [float(i) for i in words[1:]]
print(validate_input("mul 2 2"))
@terse needle :white_check_mark: Your eval job has completed with return code 0.
('mul', [2.0, 2.0])
i can't write functions
!e
x = ['1', '2.4']
print(list(map(float, x)))
@terse needle :white_check_mark: Your eval job has completed with return code 0.
[1.0, 2.4]
words = cmd.split()
try:
return words[0], [float(i) for i in words[1:]]
if words in (add, sub, mul, div):
raise InvalidCommand(Exception)
print(validate_input("add 2 2"))
```
def subNumbers(Num1,Num2):
return Num1 - Num2
a = subNumbers (56.7,45.6)
a = round (a,3)
print(a)
Join the challenge or watch the game here.
streamy streamy streamy
Yeah, I was wondering 😄
Why you were online the whole night...
That's kind of funny 😄
wait
so if its weekend, could i ask to stream a game of Wii Party or something?
or do I have to be more known to do that
I love Stuff Made Here
I feel like they're running out of interesting topics...
his videos are sooo good
this took me 30m and doesn't even work properly i'm going to kms
true true
I feel like their channels are just becoming clickbait
Oh right, I'll check that one out.
Yeah his videos are pretty good they are interesting
Oh god, I'm subscribed to 529 youtube channels 😑
lol I used a chrome extension to unsubscribe me from like 1k people lol
@zenith radish Just a heads up, I'm trying to keep weekdays for code and weekends for games with regards to streaming
I'm not upset, I don't have it written anywhere yet
Finishing a write up for it here soon
Yeah, Jake mentioned that might happen, when we started it was only a couple people in the VC so I thought it'd be fine
Just disappointed 
jk
Uh that is a serious talk @rugged root
I might be a bit scarce today, going to try to focus on work. So much catching up to do
Haha 😆
Yeah, his videos have been recommended to me a lot, but I never clicked on them for some reason 😄
no stream?
!doc
Yeah lol, do you have anyone to recommend?
If you're desperate for a hit of Hemlock, I do have my awful YouTube videos from like a decade ago
You might find my suggestions kind of boring 😄
Do they have awful jokes in them as well?
This is probably my most watched channel right now: https://www.youtube.com/channel/UCg-_lYeV8hBnDSay7nmphUA
I’m on a mission to rebuild a 109-year old English sailing yacht called Tally Ho. Designed by Albert Strange in 1909, she is a well-known and important historic vessel – but after many adventures she was left in a remote port in Oregon to rot for decades, despite some valiant attempts to rescue her. I bought her and moved her to the Olympic Peni...
In some of them, yeah
Na I like interesting stuff like that
Well if I I'm desperate need of a dad joke I will watch them lol.
can I see the game please?
∀lso ɔɐu I ʇʎdǝ ᴉu ndsᴉpǝ poʍu ʇǝxʇ¿ no longer a condition
I like the Sampson boat guy's parrot
ok
That'll get REALLY irritating REALLY fast
No streaming games in the VC on weekdays so he can't stream it.
ah ok
Yeah
does someone know stuff about discord.py?
It would be cool if I could stream Wii Party but thats not like to happen
Yeah, whats up?
Just grab a help channel I guess
No its fine, I can help
i am trying to make afk system want to chnage the nickname of the user i even gave it permission to do that but it still says missing permission
