#voice-chat-text-0
1 messages ยท Page 835 of 1
wikipedia be like
....wot
!voice @leaden kraken We've got a voice gate system. This should tell you what you need to know
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
ye idk either
Best of luck to him/you
Try not to haze him too much
I'm heading home, tapping out on the folding of letters.
lol nah please i'm in the position that i need him to stay so will have to make sure he likes it here
I don't know, you could have been working towards a Stockholm Syndrome angle
@terse needle good job:)
mina adroitly changes subject
lol
!e ```py
DISCRETE MATHEMATICS
class logic(int):
invert=lambda s:logic(not s)
add = lambda s,o:s and o and logic(1)
sub = lambda s,o:s or o and logic(0)
ge = lambda s,o:[[logic(1)]*2,(logic(0),logic(1))][s][o]
le = lambda s,o:[[logic(1)]*2,(logic(0),logic(1))][o][s]
or = lambda s,o:s or logic(bool(o))
and= lambda s,o:s and logic(bool(o))
eq = bool.eq
ne = bool.ne
from ctypes import py_object as p
p.from_address(id(True)+8).value = logic
p.from_address(id(False)+8).value = logic
proposal = lambda p,q:print((p>=q) >= (~p >= ~q))
proposal(True, False)
proposal(False, True)
proposal(True, True)
proposal(False, False)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
001 | 1
002 | 0
003 | 1
004 | 1
Gunslinger Girl (stylized in all caps) is a Japanese manga series by Yu Aida. It began serialization on May 21, 2002 in Dengeki Daioh and ended on September 27, 2012. The chapters were also published in 15 tankลbon volumes by ASCII Media Works. Set in modern Italy, the series focuses on young cybernetic girls and their adult male handlers who us...
see you guys later, having this error, gotta focus for this one
def should_radius_search(self):
return bool(self.coords) and bool(self.radius)
@decorator
def mah_function():
if self.should_radius_search():
self.spatial_query(self.coords, self.radius)
elif self.location:
builder = self.get_builder()
state_codes = states_slug_dict()
state_slugs = states_slug_dict(inverse=True)
country_codes = country_slug_dict()
country_slugs = country_slug_dict(inverse=True)
for search_value in wrap_list(self.location):
# allow zipcode search
if search_value.isnumeric():
builder.where_starts_with("zipcode", search_value)
continue
slug_search_value = to_slug(search_value)
!resources @coral cedar "A Byte of Python"
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
!e
user_input = "bacon"
try:
number = int(user_input)
print(number)
except ValueError:
print("Whelp, you can't convert non number string to an integer")
@rugged root :white_check_mark: Your eval job has completed with return code 0.
Whelp, you can't convert non number string to an integer
!e
int("bacon")
@rugged root :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | ValueError: invalid literal for int() with base 10: 'bacon'
don't use bare excepts!
!e
try:
print(using_a_name_i_didnt_define)
except:
pass
@honest pier :warning: Your eval job has completed with return code 0.
[No output]
Hi guys what should I do to open my microphone too
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Yeah
yeah
yaa
YEAH!
@rugged roothlo
So what should I do?
presumably, read the embed
^
just listen
oo which topic
ok
Some JIT is just gonna be another thing I'm cpython eventually, it's not going to affect any user facings APIs afaik
pkg : The term 'pkg' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:1 char:1
+ pkg install py36-pillow
+ ~~~
+ CategoryInfo : ObjectNotFound: (pkg:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
what does this mean
i dont know
I wanna see this optimised while loop ๐
use python pycharm
I hope it's in Yeethon
wait, isn't there a download option which sets it up automatically? i thought isntall python
py -m pip install --upgrade Pillow
python3 is on linux, py is on windows
@olive hedge
py -3.7
For anyone Linux this makes your life easier:
alias python="python3.9"
alias pip="python3.9 -m pip"
!e ```py
def forever(function):
while True:
function()
@forever
def greet():
print(f"Hello there!")
@icy axle :x: Your eval job has completed with return code 143 (SIGTERM).
001 | Hello there!
002 | Hello there!
003 | Hello there!
004 | Hello there!
005 | Hello there!
006 | Hello there!
007 | Hello there!
008 | Hello there!
009 | Hello there!
010 | Hello there!
011 | Hello there!
... (truncated - too many lines)
Full output: too long to upload
Using decos in ways they were never meant to be used... You should talk to laundmo about that mmlol
lazy iterable
Hemlock when I get home I'm gonna show you a beautifully horrific deco
hello ๐
yeah
yeah in 3.9 we can use lambdas in decos
!e ```py
@print
@eval('lambda s: s.name')
class Cool:
pass
@shadow cedar :white_check_mark: Your eval job has completed with return code 0.
Cool
!e
@print
def yoink():
return 5
@honest pier :white_check_mark: Your eval job has completed with return code 0.
<function yoink at 0x7f00dae44040>
lol
!voice @next gull
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@eval('lambda s: s.__name__')
class Hello:
pass
typing has a overload deco
i found that eval deco here: https://www.python.org/dev/peps/pep-0614/
@eval
class Hello:
pass
they show why eval is bad
class Hello:
pass
Hello = eval(Hello)
@eval("something")
class Hello:
pass
class Hello:
pass
Hello = eval("something")(Hello)
Is Capitaine ReLU similar to Leaky ReLU?
!e
@print
@eval("lambda s: s.__name__")
def hello():
return " function"
@cerulean moth :white_check_mark: Your eval job has completed with return code 0.
hello
no, i just ripped it off from Capitaine Fisher
leaky relus are cool tho
That's a fun one, yeah
A decorators fundamental 'thing' is replacing the thing it decorates with itself, what you do in the deco determines what the function does, not the function itself
umm yeah got that
sometimes you can use decos for adding extra attrs, instead of directly replacing the function
You still kinda replace the function, even if with the function itself
I'd use better words but I'm on mobile and typing feels like dying
!e ```py
def deco(f):
f.uwu = 'UWU'
return f
@deco
def owo():
return 'owo'
print(owo.uwu)
!e
@print
@eval("lambda s: f'{s.__name__} {s()}'")
def hello():
return "function"
@cerulean moth :white_check_mark: Your eval job has completed with return code 0.
hello function
anyone know how inspect.get_source works? its black magic
!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!*
!e ```py
import inspect
print(inspect.get_source(print))
@icy axle :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | AttributeError: module 'inspect' has no attribute 'get_source'
that spacing on that embed looks terrible
Does it exist?
Seems like it was written in something with auto-wrapping for text
!e ```py
from inspect import get_source
print(get_source(get_source))
@shadow cedar :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | ImportError: cannot import name 'get_source' from 'inspect' (/usr/local/lib/python3.9/inspect.py)
wut
That's not the issue I'm getting though
its part of the stdlib
The method doesn't exist
why is not there
!d inspect
Source code: Lib/inspect.py
The inspect module provides several useful functions to help get information about live objects such as modules, classes, methods, functions, tracebacks, frame objects, and code objects. For example, it can help you examine the contents of a class, retrieve the source code of a method, extract and format the argument list for a function, or get all the information you need to display a detailed traceback.
There are four main kinds of services provided by this module: type checking, getting source code, inspecting classes and functions, and examining the interpreter stack.
counter = 1
while counter < 10 :
print(counter)
counter += 1
im dumb
!d inspect.getsource
inspect.getsource(object)```
Return the text of the source code for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a single string. An [`OSError`](https://docs.python.org/3/library/exceptions.html#OSError "OSError") is raised if the source code cannot be retrieved.
Changed in version 3.3: [`OSError`](https://docs.python.org/3/library/exceptions.html#OSError "OSError") is raised instead of [`IOError`](https://docs.python.org/3/library/exceptions.html#IOError "IOError"), now an alias of the former.
there
Hahah
!e ```py
import inspect
print(inspect.getsource(print))
got so used to snek case
@icy axle :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | File "/usr/local/lib/python3.9/inspect.py", line 1024, in getsource
004 | lines, lnum = getsourcelines(object)
005 | File "/usr/local/lib/python3.9/inspect.py", line 1006, in getsourcelines
006 | lines, lnum = findsource(object)
007 | File "/usr/local/lib/python3.9/inspect.py", line 817, in findsource
008 | file = getsourcefile(object)
009 | File "/usr/local/lib/python3.9/inspect.py", line 697, in getsourcefile
010 | filename = getfile(object)
011 | File "/usr/local/lib/python3.9/inspect.py", line 677, in getfile
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/neporubufe.txt?noredirect
!e
from inspect import getsource
print(getsource(getsource))
@cerulean moth :white_check_mark: Your eval job has completed with return code 0.
001 | def getsource(object):
002 | """Return the text of the source code for an object.
003 |
004 | The argument may be a module, class, method, function, traceback, frame,
005 | or code object. The source code is returned as a single string. An
006 | OSError is raised if the source code cannot be retrieved."""
007 | lines, lnum = getsourcelines(object)
008 | return ''.join(lines)
It worked with C code ;)
cool right
it didn't, error
as you see, its python lol
it wont work on builtin_function_or_method
Yeahh
!e ```py
from random import choice
from inspect import getsource
print(getsource(choice))
@icy axle :white_check_mark: Your eval job has completed with return code 0.
001 | def choice(self, seq):
002 | """Choose a random element from a non-empty sequence."""
003 | # raises IndexError if seq is empty
004 | return seq[self._randbelow(len(seq))]
Nice method
i still dont know how it works tho
Oh, nice
import dis
from inspect import getsource
dis.dis(getsource)
!e
from math import sin
from inspect import getsource
print(getsource(sin))
@cerulean moth :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 3, in <module>
003 | File "/usr/local/lib/python3.9/inspect.py", line 1024, in getsource
004 | lines, lnum = getsourcelines(object)
005 | File "/usr/local/lib/python3.9/inspect.py", line 1006, in getsourcelines
006 | lines, lnum = findsource(object)
007 | File "/usr/local/lib/python3.9/inspect.py", line 817, in findsource
008 | file = getsourcefile(object)
009 | File "/usr/local/lib/python3.9/inspect.py", line 697, in getsourcefile
010 | filename = getfile(object)
011 | File "/usr/local/lib/python3.9/inspect.py", line 677, in getfile
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/wonozerulo.txt?noredirect
aha, math is writing in c ig
!e ```py
import dis
from inspect import getsource
dis.dis(getsource)
@shadow cedar :white_check_mark: Your eval job has completed with return code 0.
001 | 1024 0 LOAD_GLOBAL 0 (getsourcelines)
002 | 2 LOAD_FAST 0 (object)
003 | 4 CALL_FUNCTION 1
004 | 6 UNPACK_SEQUENCE 2
005 | 8 STORE_FAST 1 (lines)
006 | 10 STORE_FAST 2 (lnum)
007 |
008 | 1025 12 LOAD_CONST 1 ('')
009 | 14 LOAD_METHOD 1 (join)
010 | 16 LOAD_FAST 1 (lines)
011 | 18 CALL_METHOD 1
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/uvutucenep.txt?noredirect
!e
counter = 1
while counter < 10 :
print(counter)
counter += 1
@honest pier :white_check_mark: Your eval job has completed with return code 0.
001 | 1
002 | 2
003 | 3
004 | 4
005 | 5
006 | 6
007 | 7
008 | 8
009 | 9
not garabage mean!
!e ```py
from inspect import getsource
print(getsource(list._randbelow))
@icy axle :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | AttributeError: type object 'list' has no attribute '_randbelow'
What's the randbelow function?
But that's not on a "self object". It's on what is being passed to the function
!e ```py
from random import choice
print(type(choice))
@shadow cedar :white_check_mark: Your eval job has completed with return code 0.
<class 'method'>
see
its part of some class
!e ```py
from random import choice
c = choice.class
print(dir(c))
!e
from secrets import randbelow
from inspect import getsource
print(getsource(randbelow))
is that it?
@shadow cedar :white_check_mark: Your eval job has completed with return code 0.
['__call__', '__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__func__', '__ge__', '__get__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__self__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__']
@cerulean moth :white_check_mark: Your eval job has completed with return code 0.
001 | def randbelow(exclusive_upper_bound):
002 | """Return a random int in the range [0, n)."""
003 | if exclusive_upper_bound <= 0:
004 | raise ValueError("Upper bound must be positive.")
005 | return _sysrand._randbelow(exclusive_upper_bound)
what is secrets
It's a more cryptography focused random
oh ok
secrets?
!e ```py
from cytpes import string_at as segfault
segfault(0)
Okay cool
@shadow cedar :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | ModuleNotFoundError: No module named 'cytpes'
bruh wut
!d secrets
New in version 3.6.
Source code: Lib/secrets.py
The secrets module is used for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets.
In particular, secrets should be used in preference to the default pseudo-random number generator in the random module, which is designed for modelling and simulation, not security or cryptography.
it actually won't segfault on windows lol
what happened to stdlib modules
you spelled it wrong
cause cytpes is not std lib
!e ```py
from ctypes import string_at as segfault
segfault(0)
@shadow cedar :warning: Your eval job has completed with return code 139 (SIGSEGV).
[No output]
it segfaulted lol
@shadow cedar :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | File "<string>", line 1, in <module>
004 | File "<string>", line 1, in <module>
005 | File "<string>", line 1, in <module>
006 | [Previous line repeated 496 more times]
007 | RecursionError: maximum recursion depth exceeded during compilation
recursion boiz
it's the "choosing" that confuses me, because OS doesn't give a shit what you want
!d sys.setrecursionlimit
sys.setrecursionlimit(limit)```
Set the maximum depth of the Python interpreter stack to *limit*. This limit prevents infinite recursion from causing an overflow of the C stack and crashing Python.
The highest possible limit is platform-dependent. A user may need to set the limit higher when they have a program that requires deep recursion and a platform that supports a higher limit. This should be done with care, because a too-high limit can lead to a crash.
If the new limit is too low at the current recursion depth, a [`RecursionError`](https://docs.python.org/3/library/exceptions.html#RecursionError "RecursionError") exception is raised.
Changed in version 3.5.1: A [`RecursionError`](https://docs.python.org/3/library/exceptions.html#RecursionError "RecursionError") exception is now raised if the new limit is too low at the current recursion depth.
OS will memory map it period
Language doesn't matter, you must pass all IO operations through OS
and it will handle all file operations in whatever manner it picks
No, it's ultra important to understand this
nyoom
and that's my SREness getting driven crazy by Devs wondering why behavior isn't what they expect because OS is like "No dummy"
"PUNY PROGRAMMER! YOU DARE ANGER THE WINDOWS!?!?!"
it's not Windows
!d io
I know
Linux does similar, this is OS 101 classes
True enough
Just worked the best for the joke
My brain took it in the same direction as "do not anger the happy fun ball"
Classic SNL sketch
also, Memory is handled by OS as well, unsafe memory means memory that shouldn't be marked as executable
i can reverse faster than i can go forwards ๐ค
hello
Yo
how are you guys?
Like... when running or walking?
in my tank
Pretty good, you?
great
yo boiz
!e
import io
file = io.StringIO("test")
file.write("a quick brown fox jumps over the lazy dog!\n")
print(file.read())
Hello.
@clear shadow :warning: Your eval job has completed with return code 0.
[No output]
!e ```py
import('os').system('ls')
@shadow cedar :warning: Your eval job has completed with return code 0.
[No output]
!e
__import__('os').system('ls')
print(dir(ls))
print("skcus tfosibU"[::-1])
Guess the output.
Ubisoft sucks
also, due to lack of mandatory locks, this is why it's common for apps to want to run as their own user and then set all the files it doesn't want anyone else in to 774
That's right
or 744
!d io.StringIO.getvalue
getvalue()```
Return a `str` containing the entire contents of the buffer. Newlines are decoded as if by [`read()`](https://docs.python.org/3/library/io.html#io.TextIOBase.read "io.TextIOBase.read"), although the stream position is not changed.
skucs tfosibU[::-1]
I read ("read" in past simple form) about Ubisoft on Crappy Games Wiki.
It seems that they're considered bad, but I do not know the main reason why they're considered bad.
Hemlock is love, Hemlock is life?
Yes.
!e ```py
print(''.join(chr(x) for x in [78, 101, 118, 101, 114, 32, 103, 111, 110, 110, 97, 32, 103, 105, 118, 101, 32, 121, 111, 117, 32, 117, 112, 44, 32, 110, 101, 118, 101, 114, 32, 103, 111, 110, 110, 97, 32, 108, 101, 116, 32, 121, 111, 117, 32, 100, 111, 119, 110]))
@shadow cedar :white_check_mark: Your eval job has completed with return code 0.
Never gonna give you up, never gonna let you down
Close enough
haha gottem
You know this movie?
https://www.youtube.com/watch?v=bOdGxxDxZmk
I watched this one for a few times.
!e ```py
from future import braces
@shadow cedar :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | SyntaxError: not a chance
@frigid panther why does the super pershing require 17k silver lions to repair
what topic are you guy talking ?
I'm going to be honest, I phased out midway through
kekw
Just stuffing envelopes and watching a Zelda randomizer
wat is a generator ??
game on python
So a generator is a function that will return a value, except instead of using return you use yield. The difference is that the generator object remembers where it left off
huh, not sure, lol
gtg guys
i love that tank but it's so expensive :/
which is better, using return or yeild ??
They're for different use cases
you can't compare them, they're just different
So an example is range()
when is a generator used ?
When you do range(), it returns an object that you can use to get numbers out sequentially until it gets used up
it doesn't get used up
?
it's not a generator
Right but it's the closest and easiest thing I can compare it to
Unless you've got a better one off hand
itertools.count
Fair point
or just your own
def gen(nums):
i = 0
while i < nums:
yield i
i += 1

Yeah that
nums for an int 
Hey @terse needle ๐
i was gonna do something else then i didnt and i wasnt bothered to rename 
hey
!e
def gen(nums):
i = 0
while i < nums:
yield i
i += 1
gen(69)
@slate viper :warning: Your eval job has completed with return code 0.
[No output]
!e
def gen(nums):
i = 0
while i < nums:
yield i
i += 1
generator = gen(5)
print(next(generator))
print(next(generator))
@rugged root :white_check_mark: Your eval job has completed with return code 0.
001 | 0
002 | 1
!e
def gen(num):
i = 0
while i < num:
yield i
i += 1
my_generator = gen(10)
print(type(my_generator))
print(f"first value {next(my_generator)}")
for x in my_generator:
print(x)
@honest pier :white_check_mark: Your eval job has completed with return code 0.
001 | <class 'generator'>
002 | first value 0
003 | 1
004 | 2
005 | 3
006 | 4
007 | 5
008 | 6
009 | 7
010 | 8
011 | 9
I'll let you guys field it, I still have a lot of envelopes
so whats the difference between
This
def plusone(num):
i = 0
while i < int(num):
i += 1
print(i)
my_generator = plusone(20)
print(my_generator())
and
def gen(num):
i = 0
while i < num:
yield i
i += 1
my_generator = gen(10)
print(type(my_generator))
print(f"first value {next(my_generator)}")
for x in my_generator:
print(x)
!e
def plusone(num):
i = 0
while i < int(num):
i += 1
print(i)
my_generator = plusone(20)
print(my_generator())
@slate viper :x: Your eval job has completed with return code 1.
001 | 1
002 | 2
003 | 3
004 | 4
005 | 5
006 | 6
007 | 7
008 | 8
009 | 9
010 | 10
011 | 11
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/ceyekojuxe.txt?noredirect
@midnight agate :white_check_mark: Your eval job has completed with return code 0.
I am now a programmer. Take that!
the first is eager, meaning it calculates all the values as soon as you call it. the second is lazy, meaning it only produces the values when you ask itt
def gen(num):
i = 0
while i < num:
yield i
i += 1
my_generator = gen(10)
first_element = next(my_generator)
print(first_element)
```see how you only get one element
this will actually error
"Don't have self control? MAKE yourself have it."
hmmm
Here is a Python Made TAS Run in Trackmania: https://www.youtube.com/watch?v=AyXpKVnbdvY
-Rules Followed:
NOT used Offline (Even if you could use it online, wouldn't be very efficient.)
Trackmania TAS run made with Python.
TAS Time: 24.59
I decided since I now know how to optimize the TAS tool to be more like Donadigo's, I was going to make a new improved and more optimized run.
If this video gets 4 likes, I'll release the code and explain how the mouse emulation helps with making TAS runs smoother, and more accurate every t...
mouse.position = (1500, 400)
sleep(0.2)
mouse.click(Button.left, 1)
sleep(0.2)
"Hello, I am learning Python and I am wondering if anyone has any TAS tool creating experience, or knows a server who can help me with it, I am wanting to experiment with what is possible."
tf is tas
"Which veins are best for injecting cocaine? Just curious, not planning to do it."
sorry mods
It's.... kind of in context?
it is
17k isn't expensive :/
anyone with significant flask knowledge and bs4?
@rugged root it can actually be injected btw
The more you know
i mean, compared to like 6k for all the other tanks at its br
"from public settings"
import sys
main()
import pygame
import random
class Snake(object):
def __init__(self):
pass
def get_head_postion(self):
pass
def turn(self, point):
pass
def move(self):
pass
def reset(self):
pass
def draw(self, surface):
def handle_keys(self):
pass
class food(object):
def __init__(self):
pass
def reandomize_position(self):
pass
def draw(self, surface):
pass
def drawGrid(surface):
for y in range(0, int(GRID_HEIGHT)):
for x in range(0, int(GRID_WIDTH)):
if (x+y) % 2 == 0:
r = pygame.Rect((x*GRIDSIZE, y*GRIDSIZE), (GRIDSIZE, GRIDSIZE))
pygame.draw.rect(surface, (93, 216, 228), r)
else:
rr = pygame.Rect((x*GRIDSIZE, y*GRIDSIZE), (GRIDSIZE, GRIDSIZE))
pygame.draw.rect(surface, (84, 194, 205), rr)
SCREEN_WIDTH = 512
SCREEN_HEIGHT = 512
GRIDSIZE = 20
GRID_WIDTH = SCREEN_WIDTH / GRIDSIZE
GRID_HEIGHT = SCREEN_HEIGHT / GRIDSIZE
UP = (0, -1)
DOWN = (0, 1)
LEFT = (-1, 0)
RIGHT = (1, 0)
def main():
pygame.init()
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT) 0,32)
clock = pygame.time.Clock()
surface = pygame.Surface(screen.get_size())
surface = surface.convert()
main()
Hello.
like, the jumbo takes 6k, the t34 takes 10k, t25 takes 6k
@frigid panther why does the superpershing take 17 bruhhh
!e
๐
that doesn't look isometric to me
well it technically is
its on a 2:1 grid
@trail badge http://tasvideos.org/DiscordServer.html
hemlock, do you posses knowledge of oauth2 and how it works
oauth2 works through literal magic.
yoof
occasionally it doesn't
@tiny socket can you explain it to me ๐
wanna switch vcs?
i cant really explain it because i only half understand it
but i can show the code and hope you understand it :P
ah, not fastapi either way
how do I get all my branches even without adding a fuckton of merge commits
oh actually nvm
cry
very helpful
What do you mean even
same commit?
I mean this
To sum up my feelings on 'dumb school rules' I don't think they're actually that dumb. Sometimes there are rules that genuinely dont make sense, but often times they do make sense it's just that you don't necessarily see the reason. It's the same as some things people consider 'dumb' about discord. Generally there's a reasonable and rational explanation behind them, its just that most people dont see or understand it.
I agree 100% ^^
corey schafer is often recommended
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
cArEy sChAfEr
thx
!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.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.
!e
from functools import wraps
class SpecialDeco:
def __init__(self, *args, **kwargs):
self.args = args
self.kwargs = kwargs
def __call__(self, func):
@wraps(func)
def call(*args, **kwargs):
return func(*[*args, *self.args], **{**kwargs, **self.kwargs})
return call
@SpecialDeco(1,2, a=3)
def test(c, d, a):
print(c, d, a)
test()
@tiny socket :white_check_mark: Your eval job has completed with return code 0.
1 2 3
:)
weird functions and decosโข๏ธ
pygame 2.0.1 (SDL 2.0.14, Python 3.9.4)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "C:\Users\99pro\PycharmProjects\pillow_random_shit\main.py", line 131, in <module>
main()
File "C:\Users\99pro\PycharmProjects\pillow_random_shit\main.py", line 109, in main
food = food()
UnboundLocalError: local variable 'food' referenced before assignment
Process finished with exit code 1
im gonna go just uh... blast spotify into myself while pretending to be productive :)
:)
!vban 704212342011068437 You seem to only have used the voice chat to make loud noises. The last few times you've been in VC when I've been around, any noise from your mic has been loud static. If it is an issue with your microphone, I suggest that you fix it and then appeal by sending a DM to the @rapid crown bot.
:ok_hand: applied voice ban to @rich heart permanently.
Traceback (most recent call last):
File "C:\Users\99pro\PycharmProjects\pillow_random_shit\main.py", line 130, in <module>
main()
File "C:\Users\99pro\PycharmProjects\pillow_random_shit\main.py", line 109, in main
food = Food()
File "C:\Users\99pro\PycharmProjects\pillow_random_shit\main.py", line 66, in init
self.randomize_position()
AttributeError: 'Food' object has no attribute 'randomize_position'
def reandomize_position(self):
self.postion = (random.randint(0, GRID_WIDTH-1)* GRIDSIZE, random.randint(0, GRID_HEIGHT-1)* GRIDSIZE)
reandomize rather than randomize
brb gonna make some lunch 
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "C:\Users\99pro\PycharmProjects\pillow_random_shit\main.py", line 127, in <module>
main()
File "C:\Users\99pro\PycharmProjects\pillow_random_shit\main.py", line 106, in main
food = Food()
File "C:\Users\99pro\PycharmProjects\pillow_random_shit\main.py", line 63, in init
self.randomize_position()
File "C:\Users\99pro\PycharmProjects\pillow_random_shit\main.py", line 66, in randomize_position
self.postion = (random.randint(0, GRID_WIDTH-1)* GRIDSIZE, random.randint(0, GRID_HEIGHT-1)* GRIDSIZE)
File "C:\Users\99pro\AppData\Local\Programs\Python\Python39\lib\random.py", line 339, in randint
return self.randrange(a, b+1)
File "C:\Users\99pro\AppData\Local\Programs\Python\Python39\lib\random.py", line 312, in randrange
raise ValueError("non-integer stop for randrange()")
ValueError: non-integer stop for randrange()
GRID_WIDTH = SCREEN_WIDTH // GRIDSIZE
GRID_HEIGHT = SCREEN_HEIGHT // GRIDSIZE
!e
num = 4 / 2
other = 4 // 2
print(num, other)
@rugged root :white_check_mark: Your eval job has completed with return code 0.
2.0 2
Traceback (most recent call last):
File "C:\Users\99pro\PycharmProjects\pillow_random_shit\main.py", line 127, in <module>
main()
File "C:\Users\99pro\PycharmProjects\pillow_random_shit\main.py", line 115, in main
snake.move()
File "C:\Users\99pro\PycharmProjects\pillow_random_shit\main.py", line 26, in move
if len(self.positions) > 2 and new in self.positions[2:]:
AttributeError: 'Snake' object has no attribute 'positions'
!stream 482417717362556928
@slate viper
โ @slate viper can now stream.
@slate viper
add a
self.score = 0
in line 11
and in line 119,
snake.score +=1
also soon after reset , do a self.score = 0
!e
spam = [[0] * 3]
print(spam)
spam[0][1] = 2
print(spam)
@rugged root :white_check_mark: Your eval job has completed with return code 0.
001 | [[0, 0, 0]]
002 | [[0, 2, 0]]
well he's generally either tired or bouncy
so that kinda makes sense or he wouldn't be in his chair
๐คฃ
My hair is way more worse.
Emergency delivery run, back later
That's how Jake is gonna look.
cya hemlock
But that's how I look right now.
Bye Hemlock.
High price == High quality (most of the time)
What do you mean by apps not working anymore? Like they crash when you open them?
they do not work
Like they just don't open?
the app prints a message saying you cannot run it on this version of ios
2 + 2
2+2
.wa 2+2
what's 9 + 10
@dense ibex using an RC high-pass filter, with a cut-off frequency of 10 kHz, create a phasor diagram to represent the circuit, and hence derive a formula for the gain. Calculate the gain for that filter when it is operating at a frequency of 5770 Hz, using your formula.
Jake has left the chat
.wa what is the meaning of live?
I mean, he asked...
of live
Lmao
.wa what is the meaning of life?
although to be fair this is more electrical engineering
in other words, witchcraft
does that make me a wizard
Yes.
only if you're a 30 yr old virgin
Oh...
I'm Dutch
Thought so.
from the Netherlands
next to Germany
G E K O L O N I S E E R D
yeah I had a feeling you were either from Germany or Netherlands.
je moeder
heyyyy
'cuz accent, or what?
Yeah, from your accent. But I'm very bad at telling where people are from by their accents.
Don't think German people and Dutch people's accents in english sound similar.
Gisteren kwam er voor Louis van Gaal een einde aan twee bewogen jaren bij Manchester United. Sportief gezien kon Van Gaal weinig potten breken, maar met zijn uitspraken heeft hij in ieder geval een onuitwisbare indruk achtergelaten.
Are you all skilled at coding?
the real imposter
LOL
here's one of my props
what is that, gedit?
Atom
Looks so weird to me

Any tips to get started?
I've stopped caring what editor other programmers use @honest pier
they all have their own thing
@dense ibex You wanted a math question so I wrote you one.
it is what it is
Atom works for me so I use it, regardless of whether it's cool or not
I used Sublime Text until it no longer worked
tried vim, but it was a pain

4cm ez
enough
cough
plough
dough
bought
thorough
hiccough
turlough
all have different pronunciations of ough

English is hopeless
PfizerโBioNTech COVID-19 vaccine (INN: tozinameran), sold under the brand name Comirnaty

no...
you cant assume its a regular triangle
Yes i can, I just did
@whole bear Have you started with any resources?
๐
Or what kinds of tips are you looking for
your assumption was wrong
Alright mr math boy what's the answer then
gimme sec
Definitely not 4, 4+4 is not bigger than 8, simple triangle rule rules it out
U got your old pfp back, nice
I am completely new to it and I was wondering if you could tell me how to get started
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
5.57 cm
So we have a bunch of awesome resources on our site. We typically recommend either "Automate the Boring Stuff" and/or "A Byte of Python"
yeah
Thanks
And you can always ask us questions for anything that you need clarification on, suggestions, etc.
ok

3.1415926
Excuse me for that I didn't mean to cough into my mic. I choked on water.
.wa pi
I've memorized the first line of the digits of pi, And I'm going to type them all out
amazing
3.141592653589793238462643383279502884197169399375105820974944592307816406286
That took a bit of time
alex, what is "copy and paste"?
but a bit surprisingly fast
alex
is it possible to make a virus with python
GQ (Good Question)
!rule 5
5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.
i only like to kill my old pc
I dont think it makes sense to make a virus
We have no way of verifying what your intent is, nor can we prevent others from using the code that we'd help you with. So as a blanket rule, we do not, will not, and never will help with that kind of thing
if you like to break your old pc maybe
ok
yeah but it's just a bad idea to get into that kinda stuff
is there a possibility to shutdown you pc with python
Based on what you just asked before I don't feel comfortable answering that.
Ahah same
thanks
Can we change topic?
I'd rather we stop this conversation, yeah
ok
We aren't helping, anywhere in the server I must add
i got a script
No stop
i donยดt really to get it
cause i donยดt want to get banned a second time
Really depends. Most of the time it's by asking opinions
practice
Eventually it just becomes easier to spot. But using your fellow coders as a sounding board can really make a difference
I do it logically
How do you mean?
we progress
Like
this = {1:{2:{3:'a'}}}
#I will think of a way if assigning to a variable is good or accessing directly
this[1][2]```
And some other similar stuff
So that depends on how often you'll be using that lower level dictionary
I think of it in low level 
If it's something you're going to be working with for a bit, it's easier to just do:
this = {1:{2:{3:'a'}}}
shortcut = this[1][2]
So that you don't have to do the full pathing each time
info_dict = result['statistics']
# -Anime
ani_dict = info_dict['anime']
anime_count = ani_dict['count']
anime_watch = ani_dict['episodesWatched']
days_watched = f"{(ani_dict['minutesWatched'] / (60*24)):.2f}"
# -Manga
manga_dict = info_dict['manga']
manga_count = manga_dict['count']
manga_reads = manga_dict['chaptersRead']
What I have done
:D
vigenere cipher
vigenรจre cipher
message is
episode
codeword is
hej
repeat codeword to fill message
episode
hejhejh
shift each letter in message by offset of corresponding key letter from start of alphabet
I see
yo Griff
for the first letter
letter is e
key letter is h
8th letter
shift e by 8
go from 5th to 13th letter
that's m
your first letter becomes m
for the second letter key letter is e
etc
Makes sense
nice thing is that the longer the code word, the harder it is to do frequency analysis, since you don't have a one-to-one letter mapping
Go to private messages
I didn't say anything?
WTF
'twas me
NO NOT U
Can you calm down please
hi!
i just felt bad for him
๐ฏ
I'm in a snappy mood
I should really stop
I can calm down
sorry
not you, I was talking to FatyCaty
Is there someone Russian
No, this is an English only server
ััะพ ะธ ัะพะปัะบะพ ะฐะฝะณะปะธะนัะบะธะน ัะตัะฒะตั
Please try your best to speak English
@whole bear ะัะธะฒะตั, ะตัะปะธ ัั ะฝะต ะณะพะฒะพัะธัั ะฟะพ-ะฐะฝะณะปะธะนัะบะธ, ะพะฝะธ ัะตะฑั ะทะฐะฑะฐะฝัั.
(im using google translate)
ั ะพัะพัะพ
dont bun me
ะญัะพั ัะตัะฒะตั ัะพะปัะบะพ ะฐะฝะณะปะธะนัะบะธะน, ะฒั ะผะพะถะตัะต ะณะพะฒะพัะธัั ะฟะพ-ะฐะฝะณะปะธะนัะบะธ ะฒ ัะตะบััะพะฒะพะผ ัะฐัะต. ะ ััะพ ัััะดะฝะพ ะฟะพะฝััั, ะตัะปะธ ะฒั ะณะพะฒะพัะธัะต ะฟะพ-ััััะบะธ
im not russan
i use translate
ะฏ ะฝะต ะณะฐะฒะฐัะธะผ ะฟะพ ัััะบะธ, ะฟะพะถะฐะปััะธ.
!rule 4
4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.
@whole bear Keep the voice chat English, or I will have to remove your voice permissions
Yes
I literaly told him that i dont speak english. Sorry.
And plus u wanted my help
bru
Well.
hello guys
Ok, i stopped my russian course ok.
it wasn't addressed specifically at u @jaunty pendant
helo
Yes ik. It was for both me and kemal
Filip and me Be like:
slave person GO GO GO
@they speak javascript
LMAO
yes
Please keep it to English
sorry im translating
im so sorry
ok sorry
i will stop
sorry

๐ค
Bru
โจ
@jaunty pendant join vc
...
HAHAHAHAHH @flat sentinel
a circle
Accedentaly tapped on VC 1
rip
isn't that called an alphabet
ball
@uncut meteor right now
....
Oh no
Kemal
Dont make me tell them what happened today when u tried to read macedonian again.
U god damn
Suck
@gentle flint ััะธัะตะปั this is teacher
At reading
beruhhh
Y e s
show that to oof
I explained
no
Well
its a treat
Hey @glad sandal!
It looks like you tried to attach a Python file - please use a code-pasting service such as https://paste.pythondiscord.com
Today, i ate some chicken meat with rice
Baklava (, or ; Ottoman Turkish: ุจุงูููุงโ) is a layered pastry dessert made of filo pastry, filled with chopped nuts, and sweetened with syrup or honey. It was one of the most popular sweet pastries of Ottoman cuisine.The pre-Ottoman origin of the dish is unknown, but, in modern times, it is a common dessert of Iranian, Turkish and Arab cuisines,...
..
oki
print("Meow")
sarma
Sarma is the best
Have u guys heard of dolma
its a food
LMFAO @flat sentinel
idk kurdish
sarma is a type of dolma
Sarma, commonly marketed as stuffed grape leaves, is a type of dolmaโa stuffed dish of the cuisines of the former Ottoman Empire from the Middle East to Southeastern Europeโcomprising vine, cabbage, monk's rhubarb, kale or chard leaves rolled around a filling of grains (like bulgur or rice), minced meat, or both.
ah
Mayonez?
@flat sentinel what.
you have all the best ideas
@icy axle If you happen to know Swedish it sounds like kรฅldolmar.
ัะพะผะปะตะทะต
minecraft!!!!!!!!!!!!
No idea
Lol im swedish and det รคr vad som hรคnder lol
I'm not Swedish but I know a little bit
cool
ัะฐั
Please can you only post images/gifs that are relevant to the discussion/topic within the VC. it is disruptive
and don't spam post
@uncut meteor yes
gjes
what
Kajmak is the stuff that builds up on the top of milk when u boil it
Like, raw milk
Ok, same thing lol
milk skin that's called
Milk skin or lactoderm refers to a sticky film of protein that forms on top of dairy milk and foods containing dairy milk (such as hot chocolate and some soups). Milk film can be produced both through conventional boiling and by microwaving the liquid, and as such can often be observed when heating milk for use in drinks such as drinking chocola...
Yes
pasteurised milk does it too
Yes
English, guys
Without the attitude would be appreciated.
It's one of the server rules you agreed to when joining the server
@gentle flint how is there still light from the sun
Sorry.
we're an hour and 40 minutes off our local time zone
I didnt mean it as to give attitude, i meant it as a joke btw.
our local time would be UTC+20 minutes
I see
me?
No, Fil
currently we're on UTC+2
so it should actually be 19:40 for us
Ik, but for you it's closer to your actual time
oi see
Naaw
@glad sandal What were you wanting to stream?
Coding python and modeling in cinema 4d
cause i want to ๐
i like when people comment my code/modeling so i can be more creative
and i really like to show and see other peoples work
@faint ermine how to turn on the camera?
you need to have permissions
Oh that does sound great. We'll do that next time you're around
how to get it
tysm
thanks ๐
Who are you referring to?
only english sorry
turn on my camera please
The only reason that these people have their cam is that they're either staff or they're people I absolutely trust
!warn @whole bear This is your official warning, You have been told multiple times to keep the chat English. Please stop with the Russian messages.
:incoming_envelope: :ok_hand: applied warning to @whole bear.
nice stick of ram

Sublime is nice
what do you do all day @olive hedge
can anyone tell me how to use sublime cause i messed up a lot, like i need a tutorial
uh, its just a editor
just like any other
this randomly appeared on manjaro, wonder what disconnected cuz there are not wired connections :/
send me your snap @olive hedge
actually, I can
lemme look you up
dewit
found ya @olive hedge
how do i make it python integrated?
time to do some cinema 4d for my edit ๐
!stream 689087720018280478
@glad sandal
โ @glad sandal can now stream.
Remember, it's temporary
what is the "Lovefest" role?
def draw.status()
global draw
if winner is None:
,
@faint ermine Are u a full time dev?
It was our valentines day role
ah, i see
So one of the commands was like writing a random love letter to someone with the role
So it was opting into that
ye i guess
Haa. ok
ah, i see
intresting event
It was pretty neat
a potato of a laptop with a dead GPU inside it, a laptop cooler, a mouse, a joysticc, and a headset
fantatic
gn
how do you check where it is
what happend to my steaming perms
ye
p o n g
its fine
ur fav food? everyone here?
@rugged root Can i get my perms back
@glad sandal
โ @glad sandal can now stream.




