#voice-chat-text-0
1 messages · Page 711 of 1
array = [None] * 10
for i in range(10):
array[i] = int(input("Please enter the height of the student: "))
print(i)
```u would use an array for dat purpose
None -> the array is empty
there isn't anything
!voiceverify
!e
array = [None]*10
print(array)
@sick cloud :white_check_mark: Your eval job has completed with return code 0.
[None, None, None, None, None, None, None, None, None, None]
10 values?
there is a separate channel for dat
yep, arrays have a size limit
its 10
!e
array = [None]*10
print(array)
# assingin stuff
array[0] = "Helo"
print(array)
thing to do
@sick cloud :white_check_mark: Your eval job has completed with return code 0.
001 | [None, None, None, None, None, None, None, None, None, None]
002 | ['Helo', None, None, None, None, None, None, None, None, None]
idk node js
same
im so confused
ah
wait
@digital jackal ```
array -> [None, None, None, None, None, None, None, None, None, None]
index -> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
u could do:
!e
array = [None]*10
print(array)
# 9 --> last value
array[9] = "Yessss"
print(array)
@sick cloud :white_check_mark: Your eval job has completed with return code 0.
001 | [None, None, None, None, None, None, None, None, None, None]
002 | [None, None, None, None, None, None, None, None, None, 'Yessss']
now u could use a for loop, to go through the list and give it a value
!e
array = [None] * 10
for i in range(10):
array[i] = i
print(array)
@sick cloud :white_check_mark: Your eval job has completed with return code 0.
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
both work
k
#bot-commands
!e
array = [None] * 10
count = 0
while count < 10:
array[count] = count
count += 1
print(array)
@sick cloud :white_check_mark: Your eval job has completed with return code 0.
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
i'm like the worst teacher,
u may need this: https://www.w3schools.com/python/python_arrays.asp
aight man
read though it
np
this is a bit more complex: https://www.geeksforgeeks.org/python-arrays/ but try to understand it
@digital jackal
message n out of 50
@severe elm x)
@severe elm 12 more days
nope
india
but i'm in africa rn
yep
some ppl
nah, my mic is tooo $hity
built-in mic
ikkkk
dat's why i don't speak
nooo, highshool boi
i was in grade 9
in india, we also use class
class 9
idk
tbh
i like the live in present thing
!puzzle
!puzzles
!project
Kindling Projects
The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.
how do u calculate the value of lets say, sin 840º reducing it to the first quadrant? is the value sen 840º = (90º - (- 750º) = cos 750º
I dont understand " reducing it to the first quadrant"
cosin is cos btw and sen is sin but in spanish
@solar scaffold you still stuck or do you have a solution already?
guess he has a solution already then, whatever
I need help
ah, OK
Well, draw a circle
then take a pencil, and start at 0°
then keep, counterclockwise turning until you have turned 840°
(you'll have turned several times around the circle, obviously)
and see where you end up
I think that'll give you a better feel for how it works than any explanation I could give you
just
can't talk
homie
=\
vscode
live are you using?
code with me?
never heard
this?
noice
i'm on time
@gentle flint thank u so much for explaining
I'll see @uncut meteor @eternal bough tmr gn
1125 x 654
str.zfill is Python's solution.
Provided to YouTube by La Cupula Music
Mr. Sandman (Remastered) · The Chordettes
Lollipop
℗ Caribe Sound
Released on: 2019-02-03
Auto-generated by YouTube.
hello oof
https://github.com/GDWR/GriffSite
https://griff-site.herokuapp.com
https://griff-site.herokuapp.com/countdown
hey i cant speak cuz i recently joined but do any of you know much about discord.py
sure shoot
Yes i am
:incoming_envelope: :ok_hand: applied mute to @whole bear until 2020-12-20 03:06 (9 minutes and 58 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).
so what everyone up
great
yeh im working on doing the verify thing
i been here for like a week
just now starting to interact
hey nix can you tell juan that im typing in voice chat
i think its more about building
the comunity and what hulf said
Be right back gonna mute myself
me back
im from the us
juan that is really cool
i agree a mjority of peope have heard the name but dont know where it is without google maps XD
yeh jamaica isnt a thrid world
but it does have poor places
AMAZON FOR REAL
yeh america is expensive
for a room to rent where i live is almost 1800
Death, try to verify your voice in the chat called voicecerify or something like that
k
yeh i still have some chatting to go
i have 33 messages sent
18 messages to go
so yeh
16 messages
my family is watching the croods 2 on amazon right now XD
im just saying stuff to get thru this chat restriction
grggle grggle grggle
i think im almost there now
hmm very interesting
yeh
ooo good question to juan
!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!*
@halcyon flare :x: Your eval job has completed with return code 1.
001 | Would you like to start Round
002 | y/n Traceback (most recent call last):
003 | File "<string>", line 9, in <module>
004 | EOFError: EOF when reading a line
import random
num = random.randint(1,50)
guess = 0
while True:
print("Would you like to start Round \n y/n" ,end=" ")
exit = input()
if exit == "n" :
break
while True:
print("guess my number between 1:50",end=" ")
guess = input()
if not guess.isdigit() :
print("Invalid! Enter only digits between 1:50")
break
elif int(guess) < num :
print("Too low try again",end=" ")
elif int(guess) > num :
print("Too high try again",end=" ")
else:
print("Correct... my number is " + guess)
break
!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!*
!eval
!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!*
´´´py
print("UwU")
´´´
!e ```py
*import random
num = random.randint(1,50)
guess = 0
while True:
print("Would you like to start Round \n y/n" ,end=" ")
exit = input()
if exit == "n" :
break
while True:
print("guess my number between 1:50",end=" ")
guess = input()
if not guess.isdigit() :
print("Invalid! Enter only digits between 1:50")
break
elif int(guess) < num :
print("Too low try again",end=" ")
elif int(guess) > num :
print("Too high try again",end=" ")
else:
print("Correct... my number is " + guess)
break
@coarse mortar :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | *import random
003 | ^
004 | SyntaxError: invalid syntax
!e ```py
import random
num = random.randint(1,50)
guess = 0
while True:
print("Would you like to start Round \n y/n" ,end=" ")
exit = input()
if exit == "n" :
break
while True:
print("guess my number between 1:50",end=" ")
guess = input()
if not guess.isdigit() :
print("Invalid! Enter only digits between 1:50")
break
elif int(guess) < num :
print("Too low try again",end=" ")
elif int(guess) > num :
print("Too high try again",end=" ")
else:
print("Correct... my number is " + guess)
break
@coarse mortar :x: Your eval job has completed with return code 1.
001 | Would you like to start Round
002 | y/n Traceback (most recent call last):
003 | File "<string>", line 7, in <module>
004 | EOFError: EOF when reading a line
!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!*
thanksss
class cubes():
def __init__(self, color, size):
self.color = color
self.size = size
cube1 = (cubes, self, "blue", "big")
print(cube1.color)
!e class cubes
@oak raven :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | class cubes
003 | ^
004 | SyntaxError: invalid syntax
!e class cubes():
@oak raven :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | class cubes():
003 | ^
004 | IndentationError: expected an indented block
class cubes:
def __init__(self, color, size):
self.color = color
self.size = size
cube1 = (cubes, self, "blue", "big")
print(cube1.color)
!e class cubes:
@oak raven :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | class cubes:
003 | ^
004 | IndentationError: expected an indented block
@halcyon flare :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 6, in <module>
003 | NameError: name 'cube1' is not defined
class cubes:
def init(self, color, size):
self.color = color
self.size = size
cube1 = (cubes, self, "blue", "big")
@halcyon flare :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 6, in <module>
003 | NameError: name 'self' is not defined
!e classs cubes
@oak raven :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | classs cubes
003 | ^
004 | SyntaxError: invalid syntax
!e class cubes:
@oak raven :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | class cubes:
003 | ^
004 | IndentationError: expected an indented block
good
not much
Hey everyone! I am a newbie...
Can anyone help me plz....
I just know basics of python, c, cpp i am in third year what should i do which course to prefer and what language should i learn ?
@ruby stump
From : Alice In the Wonderland
“Alice: Would you tell me, please, which way I ought to go from here?
The Cheshire Cat: That depends a good deal on where you want to get to.
Alice: I don't much care where.
The Cheshire Cat: Then it doesn't much matter which way you go.
Alice: ...So long as I get somewhere.
The Cheshire Cat: Oh, you're sure to do that, if only you walk long enough.”
Okay thanks
x = 1
y = 2
z = 3
locals()[z] = 5
print(locals())
ok
!e
locals()["apple"] = 5
print(apple)
@uncut meteor :white_check_mark: Your eval job has completed with return code 0.
5
np
look this project is a bot can play piano tiles game ok?
whre is the error?
!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.
yes
`
`py``
```py
code here
```
print("Hello Word")
import pyautogui
import keyboard
import time
import win32con,win32api
#477 659
#607 659
#731 659
#845 659
#red green blue(0,0,0)
def clicktiles(xpos,ypos):
win32api.SetCursorPos(xpos,ypos)
win32api.mouse_event(win32con.MOUSEEVENT_LEFTDOWN,0,0)
time.sleep(0.01)
win32api.mouse_event(win32con.MOUSEEVENT_LEFTUP, 0 ,0)
while keyboard.is_pressed("q")==False:
if pyautogui.pixel(477,659)[0]==0:
clicktile(477,659)
if pyautogui.pixel(607,659)[0]==0:
clicktile(607,659)
if pyautogui.pixel(731,659)[0]==0:
clicktile(731,659)
if pyautogui.pixel(845,659)[0]==0:
clicktile(845,659)
```
where is the error?
sty i dont understand
can you write
is there an error message ?
yes
what does the error say ?
wait
@uncut meteor np
this server be like
I'm sitting here in a boring room
It's just another rainy Sunday afternoon
I'm wasting my time I got nothing to do
I'm hanging around I'm waiting for you
But nothing ever happens
And I wonder
I wonder how, I wonder why
Yesterday you told me 'bout the
Blue, blue sky
And all that I can see
Is just a yellow lemon tree
I'm turning my head up and down
I'm turning, turning, turning, turning
Turning around
And all that I can see
Is just another lemon tree
yeah, he said no
Want me to transcribe? 😄
if you will explain write plz
i'm busy with da paper rn
Actually, I'm not a fast enough typer 😄
Your error isn't to do with your code so can you send me the full error message just to make sure
x)
k
alr
Is this a poem
it's lyrics from a song we were mentioning in vc
probably
oof wrote it for me
o
[Errno 2] No such file or directory
oof
nice
v~oof
is dat the whole error ?
yes
no, it's not
sounds romantic
it starts wih "Traceback"
That isn't a full Error traceback from python
and it's several lines
an example of a traceback is
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'yo_mom' is not defined
i need to go bye
i'm on edge rn
edgy
testlist = ['EHAM', 'EBBR', 'GPC9876', [[1, 'LEKKO', 51.924175, 4.767330556, 8000, False, 'lorem ipsum dolor'], [2, 'ANDIK', 52.739402778, 5.270488889, None, False, None]]]
list in a list
root = ET.Element("kml", xmlns="http://www.opengis.net/kml/2.2")
def add_waypoint(waypoint, lat, lon, alt, notes, root):
placemark = ET.Element("Placemark")
name = ET.SubElement(placemark, "name")
name.text = waypoint
description = ET.SubElement(placemark, "description")
description.text = notes
point = ET.SubElement(placemark, "Point")
coordinates = ET.SubElement(point, "coordinates")
if i[4] == None:
coordinates.text = f"{lon},{lat}"
else:
coordinates.text = f"{lon},{lat},{alt}"
root.append(placemark)
return root
for i in testlist[3]:
waypoint = i[1]
lat = i[2]
lon = i[3]
alt = i[4]
notes = i[6]
root = add_waypoint(waypoint, lat, lon, alt, notes, root)
tree = ET.ElementTree(root)
tree.write("test.kml", encoding='utf-8', xml_declaration=True)
!e
testlist = ['EHAM', 'EBBR', 'GPC9876', [[1, 'LEKKO', 51.924175, 4.767330556, 8000, False, 'lorem ipsum dolor'], [2, 'ANDIK', 52.739402778, 5.270488889, None, False, None]]]
print(testlist)
<?xml version='1.0' encoding='utf-8'?>
<kml xmlns="http://www.opengis.net/kml/2.2"><Placemark><name>LEKKO</name><description>lorem ipsum dolor</description><Point><coordinates>4.767330556,51.924175,8000</coordinates></Point></Placemark><Placemark><name>ANDIK</name><description /><Point><coordinates>5.270488889,52.739402778</coordinates></Point></Placemark></kml>
why is there no comments ?
{"stuff":"stuff"}
is it dumps or dump ?
{}
dump for file, dumps for string
@sick cloud :white_check_mark: Your eval job has completed with return code 0.
/snekbox
lol
ye, u can loop though folders and stuff
sometimes i get confused with dump and dumps
one letter s makes the difference
!e
import os
x = os.walk(".")
print(x)
@gentle flint :white_check_mark: Your eval job has completed with return code 0.
<generator object _walk at 0x7f45a4d229e0>
well wow
!e
import os
x = list(os.walk("."))
print(x)
@uncut meteor :white_check_mark: Your eval job has completed with return code 0.
[('.', ['config', 'snekbox', 'tests'], ['Pipfile.lock', 'Pipfile', 'LICENSE']), ('./config', ['__pycache__'], ['gunicorn.conf.py', 'snekbox.cfg']), ('./config/__pycache__', [], ['gunicorn.conf.cpython-39.pyc']), ('./snekbox', ['api', '__pycache__'], ['nsjail.py', '__init__.py']), ('./snekbox/api', ['resources', '__pycache__'], ['snekapi.py', 'app.py', '__init__.py']), ('./snekbox/api/resources', ['__pycache__'], ['eval.py', '__init__.py']), ('./snekbox/api/resources/__pycache__', [], ['__init__.cpython-39.pyc', 'eval.cpython-39.pyc']), ('./snekbox/api/__pycache__', [], ['app.cpython-39.pyc', 'snekapi.cpython-39.pyc', '__init__.cpython-39.pyc']), ('./snekbox/__pycache__', [], ['nsjail.cpython-39.pyc', '__init__.cpython-39.pyc']), ('./tests', ['api'], ['test_nsjail.py', '__init__.py']), ('./tests/api', [], ['test_eval.py', '__init__.py'])]
hacky stufff
!e
print("I hope you have a great day!")
@fiery juniper :white_check_mark: Your eval job has completed with return code 0.
I hope you have a great day!
I think it's sandboxed 😄
print "thx, u too"
yeah, it says it on the github
iirc
@sick cloud no
that's python 2
python 3 is print("thx, u too")
!e
with open("tests/api/test_eval.py") as f:
print(" ".join(line for line in f))
@uncut meteor :white_check_mark: Your eval job has completed with return code 0.
001 | from tests.api import SnekAPITestCase
002 |
003 |
004 | class TestEvalResource(SnekAPITestCase):
005 | PATH = "/eval"
006 |
007 | def test_post_valid_200(self):
008 | body = {"input": "foo"}
009 | result = self.simulate_post(self.PATH, json=body)
010 |
011 | self.assertEqual(result.status_code, 200)
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/rizezacidi.txt

message n out of 50

why we need loging
Join the challenge or watch the game here.
who is white ?
im white
you may resign
maybe not
idk
i may loose
but i'll loose with peace
Join the challenge or watch the game here.
$hit
nice move
hmmm
Good morning. Happy Sunday y'all
Hello
Hey doux
Wassup today
Nm chilling. Hbu?
Good. I need to study
What?
I'm always holidaying lol
lol
What subjects?
Maths and economy
Oh nice tell me how it went
Yeah bye
Command errored out with exit status 1: 'c:\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Marven\AppData\Local\Temp\pip-install-xpzlsdb7\dlib_4fb5c596561f49dfa30fdeea9fddf358\setup.py'"'"'; file='"'"'C:\Users\Marven\AppData\Local\Temp\pip-install-xpzlsdb7\dlib_4fb5c596561f49dfa30fdeea9fddf358\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Marven\AppData\Local\Temp\pip-record-z74lexyq\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\dlib' Check the logs for full command output.
ERROR: Command errored out with exit status 1:
command: 'c:\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Marven\AppData\Local\Temp\pip-install-xpzlsdb7\dlib_4fb5c596561f49dfa30fdeea9fddf358\setup.py'"'"'; file='"'"'C:\Users\Marven\AppData\Local\Temp\pip-install-xpzlsdb7\dlib_4fb5c596561f49dfa30fdeea9fddf358\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Marven\AppData\Local\Temp\pip-wheel-2q1ugjam'
cwd: C:\Users\Marven\AppData\Local\Temp\pip-install-xpzlsdb7\dlib_4fb5c596561f49dfa30fdeea9fddf358\
pip install
Heyoh
@true nest Hey
hey
@true nest Selam
Selam 😄
😂
Nasılsın ?
Do u know ?
Nope Google translate 😂
It equals What's up
Thanks
np
while((______:=input)and(______("Play?[y/n]")=="y")):___=__import__("random");alpha=__import__("string");down,up=alpha.ascii_lowercase,alpha.ascii_uppercase;_____=print;____='\u003D';_s="\u0020";_____(f"\u003C{____*((1+1)*2*2)}{up[13]}{down[4]}{down[22]}-{up[6]}{down[0]}{down[12]}{down[4]}{____*((1+1)*2*2)}\u003E");__=______(f"{up[12]}{down[0]}{down[10]}{down[4]}{_s}{down[0]}{_s}{down[2]}hoice:-\n\t-{_s}Rock(r)\n\t-{_s}Paper{_s}(p)\n\t-{_s}Scissors{_s}(s)\n").lower();_=___.choice(["r","p","s"]);_____(f"{__.upper()}vs{_.upper()}");_____(f"It{_s}was{_s}a{_s}Draw...")if(__)==(_)else(_____(f"You{_s}Lose..."))if(__)=="r"and(_)=="p"or(__)=="p"and(_)=="s"or(__)=="s"and(_)=="r"else(_____(f"You{_s}Win!"))if(__)=="s"and(_)=="p"or(__)=="p"and(_)=="r"or(__)=="r"and(_)=="s"else(_____(f"{__}{_s}is{_s}an{_s}unknown{_s}choice,{_s}you{_s}lose..."))
for e, i in zip(list(range(1, 6)), ["login()", "new_people()", "add_friend()", "show_friend()", "exit_()"]):
if repr(e) == choice:
return eval(i)
hello
waiting for voice verify
Qt is a cross-platform framework with multiple tools. Qt supports multiple platform using the same code base for all and can be deployed on multiple type of devices.
Invalid syntax
get rekt
!e
while((______:=input)and(______("Play?[y/n]")=="y")):___=__import__("random");alpha=__import__("string");down,up=alpha.ascii_lowercase,alpha.ascii_uppercase;_____=print;____='\u003D';_s="\u0020";_____(f"\u003C{____*((1+1)*2*2)}{up[13]}{down[4]}{down[22]}-{up[6]}{down[0]}{down[12]}{down[4]}{____*((1+1)*2*2)}\u003E");__=______(f"{up[12]}{down[0]}{down[10]}{down[4]}{_s}{down[0]}{_s}{down[2]}hoice:-\n\t-{_s}Rock(r)\n\t-{_s}Paper{_s}(p)\n\t-{_s}Scissors{_s}(s)\n").lower();_=___.choice(["r","p","s"]);_____(f"{__.upper()}vs{_.upper()}");_____(f"It{_s}was{_s}a{_s}Draw...")if(__)==(_)else(_____(f"You{_s}Lose..."))if(__)=="r"and(_)=="p"or(__)=="p"and(_)=="s"or(__)=="s"and(_)=="r"else(_____(f"You{_s}Win!"))if(__)=="s"and(_)=="p"or(__)=="p"and(_)=="r"or(__)=="r"and(_)=="s"else(_____(f"{__}{_s}is{_s}an{_s}unknown{_s}choice,{_s}you{_s}lose..."))
print("Would you like to play Y/N", end=" ")
input1 = input()
input1 = input("Would you like to play Y/N")
if Textran != True:
if not Textran:
@uncut meteor :white_check_mark: Your eval job has completed with return code 0.
001 | 1
002 | 2
003 | Fizz
004 | 4
005 | Buzz
006 | Fizz
007 | 7
008 | 8
009 | Fizz
010 | Buzz
011 | 11
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/uvaxuzicox.txt
!e ```py
for(i)in range(1,101):print("FizzBuzz"if(i%15==0)else"Fizz"if(i%3==0)else"Buzz"if(i%5==0)else i)
@coarse mortar :white_check_mark: Your eval job has completed with return code 0.
001 | 1
002 | 2
003 | Fizz
004 | 4
005 | Buzz
006 | Fizz
007 | 7
008 | 8
009 | Fizz
010 | Buzz
011 | 11
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/mavekaviza.txt
for(i)in range(1,101):print("FizzBuzz"if(i%15==0)else"Fizz"if(i%3==0)else"Buzz"if(i%5==0)else i)
hi
hi
Hi, I still cannot reach 50 messages(
any one wanna join a game for chess
Join the challenge or watch the game here.
hey guys anyone use powershell to run their scripts?
the code doesn't stop executing if I press Ctrl + Z/D/C, any of these. Why?
then, what would i do?
a simple stuff like ```py
while True:
print("Hello")
sleep(1)
closing terminal, using mouse again and again 😭
what's break?
its a button on keyboard
i found an applications in for gui
oh, yeah, srry break, I'm on laptop, no break key in this one
ohh
what do you prefer for a secondary monitor? IPS panel or VA panel, considering price too ( IPS > VA)?
just to code, no games
VA = vertical alignment (better viewing angles than TN, not than IPS, but higher refresh rates)
ips = in plane swtiching (better viewing angles, lower refresh rates)
😂 parents not gonna allow that much for now
hmm
i just have an OLD lg monitor rn
if you need to do frontend work
then choose better monitors
that show near real world colors
Hey @coarse mortar!
It looks like you tried to attach a Python file - please use a code-pasting service such as https://paste.pythondiscord.com
message n out of 50
@whole bear Do you need help
no help?
No, just talk
If u can
talk first then I talk
ok no talk
😂
What
doing gooooood
i'm young toooo
i need money
16
bruuuuh
bruh
ok
Hello anybody here?
i am
@whole bear Wanna play Lichess?
yep
i am the worst for chess
1 round only
Ok
see ya later
Good game mate you could've won
times more imp than chess i guess
Yeah a few mins more might have been
i just play for fun
Same I never play though
hmm
Should play more lol
so what are you doin rn
Songs
okhaay
☺️
see y'll later
@somber heath are you OpalMist or a fake OpalMist?
@icy axle One of us always lies. The other one only tells the truth.
That's you
Are you a good Opal? Or a bad Opal?
@high ingot That has limited bearing on authenticity.
my_list = ["a", "b", "c", "d", "e"]
from my_list get i for range(0, 6, 2):
print(i)
a
c
e
Disclaimer: this is not working python
def get_subclasses(cls):
for subclass in cls.__subclasses__():
yield from get_subclasses(subclass)
yield subclass
darn
Recursively get values from a dict/list structure by either key or value - traverse.py
!e ```py
def traverse(iterable, key, value=None):
if isinstance(iterable, list):
for local_value in iterable:
yield from traverse(local_value, key, value=value)
elif isinstance(iterable, dict):
for local_key, local_value in iterable.items():
if local_key == key and not value:
yield local_value
elif value and local_value == value:
yield iterable
yield from traverse(local_value, key, value=value)
a = {"children": [{"children": ["a", "b"], "type":"b", "thing_b":"thing b value"},{"children": ["a", "c"], "type":"c"}]}
print(list(traverse(a, "children", value="c")))
print(list(traverse(a, "thing_b")))
@faint ermine :white_check_mark: Your eval job has completed with return code 0.
001 | [{'children': ['a', 'c'], 'type': 'c'}]
002 | ['thing b value']
@glad igloo o/
!warn 629199673386598410 First of all, speak English here. Second, don't try to get people to say slurs.
:incoming_envelope: :ok_hand: applied warning to @glad igloo.
o/
my sleep schedule looks something like this
My body randomly decided to stay up 8 extra hours past when I normally get to sleep
also I just beat flexbox into submission
direction: rtl for the win
so, flexbox gives you a lot of controls
Basically, you get to align the main axis, teh secondary axies, and the content itself
and it lets you reverse the item order
but, it doesn't let you alter the left-right order pinning in a columned layout afaict
but if you RTL it then it defaults ot the opposite order and you can force things to flow from right ot left, as if pinned to the right
So
if you have a list-like column layout with column-wrap
if you apply RTL it will go top-down right-left instead of top-down left-right
if you dont use RTL you're stuck with top-down left-right pinned to the right
yeah
you're lucky
far from the most cursed thing I've done
Oh,. oh
another thing I just did
so \
font-weight: bold
increases text size
so, if you want the bold effect but not hte text to move
abuse letter-spacing
may I introduce you to some more cursed stuff
manually formatted XML
shrink down letter spacing as you apply font-weight: bold and it will shrink instead of grow
and in column layout you get hte bold events
let me scroll through my AOC
I did something suppper cursed int ehre
oooof
manual JSON
because I was learning Python at the time
regex and html
what?
will change the data
its a recent security vuln
because apparnelty it serialzies some garbage differently
<:stuff> becomes <stuff>
some extremely redundant code
print("r2")
t = [''.join(i[::-1]) for i in zip(*tile)]
t = [''.join(i[::-1]) for i in zip(*t)]
for a, b in zip(t, [*tile_obj.rots()][1].pp()):
print(a, b)
AOC day 20 stuffs
it was much worse
I had five of those [] lines
Can I ask a simple question real quick?
I have a simple question I wasn't sure where to post.
I just pip installed a library egybest-dl from PyPi and it uninstalled libraries like urllib3, requests and others.
This is a screenshot from the installation.
https://cdn.discordapp.com/attachments/534068560180281379/790350954913595432/unknown.png
Thanks a lot @faint ermine ❤️
def patch_embed():
discord.Embed.__init__ = new__init__
lmao
yeah
There's a reason I wrote a wrapper
current_shortest = self.timers[0] if self.timers else None
heapq.heappush(self.timers, timer)
if not self.timer_task:
self.logger.log(SPAM, "Starting timer task now that there are entries again")
self.timer_task = asyncio.create_task(self.manage_timers())
if (
(timer.time - datetime.datetime.now()).total_seconds() < MAXIMUM_TIMER_TICK
and current_shortest
and current_shortest.time > timer.time
):
self.logger.log(SPAM, "Timer registered with a shorter due time than next checkin, notifying timer task")
self.timer_task.cancel()
self.timer_task = asyncio.create_task(self.manage_timers())
def multiple_after_invoke(bot: commands.Bot):
bot._after_invokes = []
async def invoke_caller(ctx):
for hook in bot._after_invokes:
await hook(ctx)
bot._after_invoke = invoke_caller
def after_invoke(coro):
bot._after_invokes.append(coro)
bot.after_invoke = after_invoke
lol
Oh yeah
my ready() patch
has a 12 line long comment paragraph
# We create a function here to ensure that things happen asynchronously in the right order. # on_ready needs to _complete_ its async firing before we start with the delayed events.
# Discord.py only does this by waiting for streamed guild_available events with a timeout. # This is bad, because it means its impossible to determine when we've gotten every guild # and are thus ready to continue. If we were a complete discord library, we could trap # known-always-good guild accesses and wait whenever we hit them, but we do not have # access to those code paths with ease at our current stage.
So I write
a dynamically generated temporary "ready" async function
no
heavily indev
Basically
if an event is one of a whitelisted set
it's queued and waits for on_Ready to finish firing
before it is then fired
async def ready_up():
self.ready = True
await asyncio.gather(*self.handle_event(event, *args, **kwargs))
check = len(self.delayed_events)
handled_events = 0
for _event, _args, _kwargs in self.delayed_events:
handled_events += 0
print("Calling delayed event %s", _event)
await asyncio.gather(*self.handle_event(_event, *_args, **_kwargs))
if check != len(self.delayed_events) or check != handled_events or len(self.delayed_events) != handled_events:
raise DexpError("Delayed event list changed during execution and events were potentially missed. PING ME.")
self.delayed_events.clear()
return
ooo

I'm so salty
about the uncertain on_readyness
no, but not sure they can really fix it
discord doesn't give you a "youre done getting ready" stuff so

lol
perhaps I have
yep, been there
IKR
oh god did yous ee the error I got the other day
Traceback (most recent call last):
File "bot.py", line 258, in manage_timers
asyncio.create_task(asyncio.shield(func))
File "~/.pyenv/versions/3.7.7/lib/python3.7/asyncio/tasks.py", line 351, in create_task
return loop.create_task(coro)
File "~/.pyenv/versions/3.7.7/lib/python3.7/asyncio/base_events.py", line 404, in create_task
task = tasks.Task(coro, loop=self)
TypeError: a coroutine was expected, got <Future pending cb=[shield.<locals>._outer_done_callback() at ~/.pyenv/versions/3.7.7/lib/python3.7/asyncio/tasks.py:820]>
Yeah
It's a nasty one
that's suuuuuper obvioius in taht totally not obviuous way
.shield() CALLS create_task already
oh
it was worse
you see, this only shows when the exception was gc'd during interpreter shutdown
and my logging logs to file
but in 3.7, theres a bug
where the destructor and destruction fo builtins fires before the final gc of asyncio coroutines
so it was throwing an "open does not exist" deep in teh logging code as the primary exception
ah fk
NameError: name 'open' is not defined
Ok, seems a little strange. Isn't that a builtin?
File "/Users/bast/.pyenv/versions/3.7.7/lib/python3.7/logging/init.py", line 1116, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding)
Uh. Hold on. In the logging code? Of the standard library?
staff lounge
I didnt realize what channel it was in >.>
Other crap I've dealt with recently:
I had a deploy run out of memory
so my deploy script abruptly ended with "abort"
that was fun to debug
also I had one with a thread and django not functioning
did you know that django starts before uwsgi forks, and thus the queues all break, and you need to use multiprocessing queues for it to work?
lol
Sure, its used for out-of-thread logging firing
basically the app can want to push notifications to other services
does so via a REST api, and I didnt want to delay responses waiting on that
so I shuffled it off into a thread. There's no real reason to drop it through a hole broker thing
yeah
wrote this too, pretty fun :P
def on_error_resume_next(loud: bool = False) -> typing.Callable:
"""
I fully acknowledge this is a terrible idea.
"""
def outer_wrapper(func: typing.Callable) -> typing.Callable:
@wraps(func)
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except Exception: # Ensure we permit KeyboardInterrupt and SystemExit through
if loud:
traceback.print_exc()
return
return wrapper
return outer_wrapper
I could improve this into a context manager, but I think someone else kinda worked out how the hell to do that
It's a decorator that causes a function to return None instead of throwing
lol
C = typing.TypeVar("C")
def constant_singleton(*args, **kwargs) -> typing.Callable[[typing.Type[C]], C]:
"""
Converts a class into a singular instance of itself, making sure the name is converted
to allcaps and underscores as is suitable for a global constant.
"""
# Type hints are explicitly not set to avoid confusing type checkers even further
def wrap(cls: typing.Type[C]) -> C:
instance = cls(*args, **kwargs)
# set the uppercased version of the class name, with CaseChanges replaced with _'s
# in the outer namespace
inspect.currentframe().f_back.f_locals[classname_to_constant(cls.__name__)] = instance
return instance
return wrap
How to make your IDE and coworkers hate you
usage:
@constant_singleton()
class THISThreadManagerTYPE1999:
pass
print(THIS_THREAD_MANAGER_TYPE_1999)
Sure, but then the classname doesn't look right
:P
lmao
Oh no
this
is amazing
# This regex uses negative matching and .split() to utilize both non-matching chunks
# and matching chunks to determine where a classname linguistically separates
CLASSNAME_CONSTANT_REGEX = regex.compile(r"([A-Z][a-z]+)|([0-9]+)")
def classname_to_constant(classname: str) -> str:
"""
Convert a PascalCase classname to a SCREAMING_SNAKE_CASE constant name suitable
for a singleton.
This function does not support classnames with _'s inside them. Passing one will
result in broken output.
"""
return "_".join(i.upper() for i in regex.split(CLASSNAME_CONSTANT_REGEX, classname) if i)
Well, you see
lol
lmao
Here's a neat one
Convert a PascalCase classname to a SCREAMING_SNAKE_CASE constant name suitable for a singleton.
Simpleton might be a better word in this case.
def argable_to_awaitable(func: Callable):
"""
Converts a callable of any type (coroutine function, function, callable class)
into an asyncio awaitable.
Makes sure to pierce the veil of functools.partial().
Does not "precall" the function.
"""
if hasattr(func, "func"):
# Inspect through a functools.partial() object
check_func = func.func
else:
check_func = func
if inspect.iscoroutinefunction(check_func):
print("Coroutine function", func)
return func
elif inspect.iscoroutine(check_func):
print("Coroutine", func)
raise DexpError("argable was passed an already argument-passed coroutine")
else:
print("Wrapping into async", func)
# Wrap the function here to use a shield to avoid cancellation signals.
@functools.wraps(func)
async def run(*args, **kwargs):
func(*args, **kwargs)
return run
XD
Essentially
You need to specially handle the case of a partial()'d coroutine
as inspect doesn't find it right until 3.8 I think
from functools import partial
def multiply(x,y):
return x * y
# create a new function that multiplies by 2
dbl = partial(multiply,2)
print(dbl(4))
this returns 8 @faint ermine
!e ```py
from functools import partial
fs = []
for i in range(5):
fs.append(lambda: print(i))
for fn in fs:
fn()
fs = []
for i in range(5):
fs.append(partial(lambda i: print(i), i))
for i in fs:
i()
@proud tangle :white_check_mark: Your eval job has completed with return code 0.
001 | 4
002 | 4
003 | 4
004 | 4
005 | 4
006 | 0
007 | 1
008 | 2
009 | 3
010 | 4
lambda: and def do not capture
partial() freezes the arguments
or some arguments
Anyway, the code I posted
turns essentially any kind of function
into something you can await
I don't think so
!e ```py
from functools import partial
def a(i):
i / 0
b = partial(a, 1)
b()
@proud tangle :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 7, in <module>
003 | File "<string>", line 4, in a
004 | ZeroDivisionError: division by zero
!e
from functools import partial
def multiply(x,y):
return x * y
# create a new function that multiplies by 2
dbl = partial(multiply,2)
print(dbl())
@gentle flint :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 8, in <module>
003 | TypeError: multiply() missing 1 required positional argument: 'y'
hmmm
Ik
I'm gonna grab water
I know what causes the error
ah, kk
I'm just curious why the traceback makes no mention of the partial, but does specify line 8
shift-tab in a good ide
This is cool too
VERSION_ITEM_REGEX = r"([0-9]+)([a-zA-Z]+)?([0-9]+)?"
def version_sort_key(version: str):
"""
Turn a version string of 1b.2c.3a into something sortable, like ((1, "b"), (2, "c"), (3, "a"))
"""
version_fragments = version.split(".")
out = []
for fragment in version_fragments:
small_fragments = re.fullmatch(VERSION_ITEM_REGEX, fragment).groups()
out.append(tuple((int(i) if i.isdigit() else i) for i in small_fragments if i))
return tuple(out)
A slightly altered version does really good file sorting
@proud tangle THanks! 🙂
welcome back
The word for 'yes' in most of Sweden is 'ja', but in the north of the country a unique sound is used instead, as The Local's Oliver Gee discovered in the city of Umeå.
Camera: Maddy Savage https://twitter.com/maddysavage
Click here to subscribe to The Local on YouTube: http://bit.ly/1uakQrU
The Local Sweden: http://thelocal.se
Facebook: http:...
me, a little
What's the name?
oh god
if namespace is None: namespace = inspect.currentframe().f_back.f_globals
how to operate in parent scope.jpg
@zenith chasm if you've something to discuss about the call, this is the place
what coding applications do you recommend for a novice encoder
@gentle flint ok cheers
I'm trying to find a good example for my !oracle function
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
@whole bear Whatever best works for you. The software you write code on is less important than understanding why you're writing what you're writing and what your goal is and how you're thinking about problems.
ok thanks help!
!bl oracle bot.class.init.name
<dexp.bot.Bot object at 0x10393ccd0>.<class 'dexp.bot.Bot'>.<function Bot.init at 0x105a62710>.'init'
lol
anyway\
cya
happy holidays everyone, here's a fun song I composed on google blob opera, try it for 'yerself: https://g.co/arts/oDbysvLadiaNB3HH7
Background on how it is made: https://www.youtube.com/watch?v=ZfLYuXi6sDI&ab_channel=GoogleArts%26Culture
Create your own opera inspired song with Blob Opera - no music skills
required ! A machine learning experiment by David Li in collaboration with
Google Art...
Blob Opera is machine learning experiment by David Li in collaboration with Google Arts and Culture*
This experiment pays tribute to and explores the original musical instrument: the voice. Play four opera voices in real time. No singing skills required! http://g.co/blob-opera
We developed a machine learning model trained on the voices of four...
@fiery hearth Well this isn't a good sign. 😋
Voice server go "whargbl".
@somber heath https://www.youtube.com/watch?v=AfVH54edAHU&feature=share&fbclid=IwAR2u634FcwPHB5iWGf0M5GHSCzHWk5JJX8BPnscrn5V0gJ48uyWsW1-pqAQ
Install Kali Linux on Windows 10 in under 5 minutes (full tutorial) using WSL 2. (Windows Subsystem for Linux 2)
➡️Support NetworkChuck: https://bit.ly/join_networkchuck
☕or buy me a coffee: https://ko-fi.com/networkchuck ☕
Checkout @David Bombal 's WSL2 playlist: https://bit.ly/2NOFcem
(affiliate links below)
🔥🔥BOSON SUMMER SALE 25% OFF EVE...
is this steps different from a virtual machine?
@fiery hearth Yes
which way should i go this video one or using the virtual box
Having not had experience with WSL, I wouldn't be able to give you a measured assessment, but I'd say that VirtualBox would give you a purer experience.
Less opportunity for things to go wrong.
okay will go for Virtual Box
hi
virtual box sucks
why ?
@sick cloud just the way it works ... i would prefer a dual boot or a separate system
o alr
@sick cloud https://lichess.org/trUxXpoNO91V
watch live
i as white
i'm helping someone rn
k no prob
@versed island congrats on winning
haha thanks : )
@versed island play me ? https://lichess.org/1ZIWxqXH
Join the challenge or watch the game here.
my brain was active for the first and the last time i guess
haha
like i made try hard moves
(╯°□°)╯︵ ┻━┻
with some minor mistakes
hmm
like with the queeen
you got me in the beginning
but it was all in plan
hello
helo
wsup? all good?
a bit like 0.000000000000000000000000000001%
lol ok
but why ?
im more of a backend development guy
thats cool
thx
@cinder fiber Here is your birthday_buddy code in ada ! (i am learning ada just started)
procedure Main is
S : constant string := Get_Line;
begin
Put("Is today your birthday ?! ");
if S = "Yes" then
Put("Happy Birthday!");
elsif S = "No" then
Put("Liar");
else
Put("there are no excuses (╯°□°)╯︵ ┻━┻");
end if;
end Main;
Thought of showing this to you :D
( I messed up the input call but idk how to fix it so this works :P)
wow, i don't even know what ada is ): , but i'm happy you chose a thing i wrote as a project (: this made my day
i love how python community is so wholesome
and not toxic, like our father's, C /:

@cinder fiber sorry pinging again but i finally got everything working !!!
with Ada.Text_IO;
use Ada.Text_IO;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Strings.Unbounded.Text_IO; use Ada.Strings.Unbounded.Text_IO;
procedure Main is
S : Unbounded_String := Null_Unbounded_String;
begin
Put("Is today your birthday ?! ");
Get_Line(S);
if S = "Yes" then
Put("Happy Birthday!");
elsif S = "No" then
Put("Liar");
else
Put(" there are no excuses :|");
end if;
end Main;
same thing but the input is proper now
is this ruby ?
never heard about dat
Hi can someone can help me to make a GUI for a multiple choice quiz?
@wide terrace go away
just make a normal gui wdym lol
bc ur creepy
lol ok
I was just checking if I could have permission to speak but whatever lol
be gone creep
@pine iron wanna play chess
sure
@scenic geyser dude can u stop moaning
But why 😂
Join the challenge or watch the game here.
I was saying hello 😂
moaning weirdo
Haha I like doing it
my gf does too doesnt mean u should do it
@pine iron click on th link
why
y r u typing like a mentally abused 16 year old girl
u wnat to play right?
no
I'm 12 🥺
thats a free tos ban
@scenic geyser you can play with me
okay
Weird symbols in his name
https://lichess.org/dmmcB6fr @scenic geyser
Join the challenge or watch the game here.
hes a sped
Join the challenge or watch the game here.
look closeeee
dude stfu u r a moron
@pine iron i think its wise not to use such language....people get banned here!
idc if i get banned im telling the truth so if they wanna ban me for that then they can its their server
What is Python Discord?
We're a large Discord community focused around the Python programming language. We believe anyone can learn to code, and are very dedicated to helping novice developers take their first steps into the world of programming. We also attract a lot of expert developers who are seeking friendships, collaborators, and who wish...
@pine iron Food for thought. Take it or leave it as you please. 🙂
One message removed from a suspended account.
One message removed from a suspended account.
@somber heath helo
Fog of war machine
Window of opportunity
Abduct tape
Ticket to paradise
Soft rock
Bouquet of whoopsy-daisies
Five-second rulebook
Bottle of depressants
Bit of inspiration
Tears of a clown
Pecking order form
Guild graduation group photo
Resurrection party invitation
Tube of copy and paste
False alarm clock
World record player
Quart of milk
Golden LEGO brick
Finished connect-the-dots book
Cliff's hanger
Sick note
Carnivorous thimble
Branch of a family tree
Adam's apple
First-in-line ticket
Box of short fuses
Hidden folder
Yesterday's horoscope
Heart string
Collide-o-scope
refill the guild mini-bar (The rest of the guild doesn't seem to pleased with my selection of microscopic-micro-brews...)
hey
how r u ?
hello
The main goal of Notepad2 is to provide a notepad application that’s as streamlined and efficient as Notepad, the default text editor application of Windows. Notepad2 | Windows 32/64 Bits This more contemporary take on Notepad immediately impresses thanks to its syntactical colouring, making for a much easier time of things when it comes to …
did you know brb actually means "bad recursion brb"
Loud warning
https://www.youtube.com/watch?v=UKXW4iUGcUo
Just a very high quality edit of Pikachu gettin around
@proper jacinth Here's where you talk. Check out the #voice-verification channel
@uncut meteor I've a question guys for all in voice
How can I create a list inside a class
As a class attribute or what do you mean
class MyClass:
def __init__(self):
self.my_list = []
as instance
yes thank you
@uncut meteor Actually what i wanna do is like having a list inside the class than expanding this list with another class
Is it legal
yes
append
oh ok got it thank you very much
perfect
!e
class MyClass:
def __init__(self):
self.my_list = []
def add_class_instance(self, instance):
self.my_list.append(instance)
class MyClassTheSequel:
pass
a = MyClass()
b = MyClassTheSequel()
a.add_class_instance(b)
print(a.my_list)
@uncut meteor :white_check_mark: Your eval job has completed with return code 0.
[<__main__.MyClassTheSequal object at 0x7f1721675ee0>]
I cant speak
!globals
When adding functions or classes to a program, it can be tempting to reference inaccessible variables by declaring them as global. Doing this can result in code that is harder to read, debug and test. Instead of using globals, pass variables or objects as parameters and receive return values.
Instead of writing
def update_score():
global score, roll
score = score + roll
update_score()
do this instead
def update_score(score, roll):
return score + roll
score = update_score(score, roll)
For in-depth explanations on why global variables are bad news in a variety of situations, see this Stack Overflow answer.
Web site of the pyglet project
k8s
Wham!
😄
As soon as I heard Wham I just thought of the band
same
Potoooooooo
haha
😄
@jagged trail hello
@stoic ore helo
jag how u doing
are you in lockdown
how is phase2 going
@proper jacinth hello
@uncut meteor In the news they were talking about an iceberg impact in northern uk something like that
i'm gud and hbu ?
all fine 😄
@uncut meteor are you from uk
why arent u come to voice @sick cloud
i'm speaking to another boi rn, maybe later
Ok I see
😄
I am still muted
😦
It says I need 50 non deleted message
@somber heath I liked your pp
please say you mean pfp
what is PFP ??
ProFile Picture
profile pic
😄
I like bread
the head always goes the where it is unfinished.
Just to let you know, Ged, you'll still need a total of 3 days on the server. Not just the 50 messages
NIIIIICE
😄
google colab lets go
@severe pulsar helo
vocab
colab privides hardware for the Tensor Flow
JAG BOIIII
boi
Boi ?

