#voice-chat-text-0
1 messages ยท Page 891 of 1
hewwo wabbit
not what???
Friend request
how i have to use the init function?
noise supresion ftw
We call that proper voice chat etiquette
haha
Sparingly
people usually don't add randoms to friend list
Can I veto voice verification
approved
!tvveto
so lemme tell about all the animals in this vc
a gun

import logging
from discord_interactions import verify_key
class Auth:
def __init__(self, public_key:str) -> None:
self.public_key = public_key
def verify(self, body:str, signature:str , timestamp:str) -> bool:
try:
if verify_key(body, signature, timestamp, self.public_key) is True:
return True
else:
return False
except Exception as e:
logging.error("Unable to validate due to error while encoding")
logging.info(f"{e}")
return False```
auth = Auth(os.getenv("app_public_key"))
body = await request.json()
body_str = await request.body()
if auth.verify(
body=body_str,
signature=X_Signature_Ed25519,
timestamp=X_Signature_Timestamp
) is False: #Meaning it's invalid
raise HTTPException(
status_code=401,
detail="Invalid Token"
)```
discord-interactions==0.3.0
Gonna go change the bins
back in a bit, maybe
hi opal
I may have dozed off. I didn't think I had to the point of making noise
๐
What happened was...
Can I throw a Sphinx question here?
So - I'm importing some information for Sphinx from the Poetry section in mypyproject.toml. But there are a few pieces of information that Sphinx wants that Poetry doesn't. For example,
pyproject.toml
[tool.poetry]
name = "bradworks"
version = "0.3.0"
Sphinx conf.py
project_config = toml.load('../../pyproject.toml')
project = project_config['tool']['poetry']['name']
release = project_config['tool']['poetry']['version']
copyright = '2021, Darbia'
Can I just add copyright as another attribute under tool.poetry?
Should I add a tool.sphinx?
Or should I add another tool._ that doesn't overlap Sphinx's name?
hello!

!e
def add(a, b):
return a + b
functions = {
"print": print,
"add": add
}
functions["print"]("hello")
functions["print"](functions["add"](1, 2))
@rugged root :white_check_mark: Your eval job has completed with return code 0.
001 | hello
002 | 3
A tutorial on how to use discord.py to create your own Discord bot in Python, written to fix the flaws of many other popular tutorials.
Imperfect. I'm perfect.
Looks like something that'd go with a Live Laugh Love style wall hanging.
Your people need you.
adieu
Hello
Trying to boot Alpine Linux on a VM but it won't budge
Also half-finished with the deserialization thingie
!tvban 859699211775639562 1w Looking back through your history, you seem to only be here to troll. Jumping into voice calls and interrupting people and talking loudly is not acceptable behavior.
:incoming_envelope: :ok_hand: applied voice ban to @whole bear until <t:1631291432:f> (6 days and 23 hours).
There we are
Dude who did you piss off
On Python 3 '{}'.format(b'abc') produces "b'abc'", not 'abc'; use '{!r}'.format(b'abc') if this is desired behavior
Sure but the first response to jumping into a channel shouldn't be loud talking. There could be an ongoing conversation, which could be (and was) interrupted
Why 50 text messages are needed for voice channel
we are in here btw#voice-chat-text-1
@vast lion So the reason is that for a long while, we had a bunch of what I call hit and run trolls. They join the server, join the voice chat, scream, and then leave. This has eliminated that issue almost entirely. Before we were having 4 or 5 a day. Now it's closer to 1 or 2 a month
If you plan on being in the server for a while, the 3 days and 50 messages over three 10 minute blocks is a drop in the bucket.
@pine minnow hi how are
i can hear you but i dont have permission to talk
@whole bear hey man
no sadly
i k
but i have to a lot of things
yea yea
any ways
i am software eng
this is my first year
do i need python?
actually if i dont need it i will try to read because i like the simply of python
i use pycharm
idk man but pycharm seems so good for learning
i do to
I am Afk for a moment just getting some smokes
do you work ?
or a student
very nice man
i need some advices here
am just a student in the first year
and idk what to do
Lol
how to get the exp to work
in my country its very hard to work
my college is not that good also
I'm applying for jobs that pay less than $50 a month in my country to get my foot in the door.
Jordan
in middle east
South Asia country are the worst place to work dev jobs IMO.
Couldn't have said better myself.
@whole bear where are you from
Supply goes up, demands stay stagnant, wages go down.
maybe i will come to work in US as a cash captain or something
We got startups operating from apartments driving up the housing price in here.
how to know when i joined this group
They buy cheap 1000 square foot flats to avoid commercial places that charge more rent than residential places.
@whole bear speaks... Windows takes notes
Like market research.
laguna do you know where i should learn python and java
i am back
welcome
Like in 50 years I mean at least.
do know somewhere to learn python @pine minnow
Low-code are hard as hell to customize.
yes
@safe dew Hit the docs bro.
what docs
True.
i learnt what i now from youtube and reading textbooks
Check out the CS50 Python classes online in YouTube.
My Prof said only C++ programmers are real programmers. Everyone else are script kidies.
I mean Python basics in those courses basics that translate well to any languages in my experience.
i think the next lang in college c#
I mean people want fast I just ask them right opcodes for the processor their gonna run it on. Or better yet, program your FPGA and stop blowing air up by rear end.
Field-programmable gate array
am too bad with eng i have to learn eng first
Java and C# makes me sweat balls. I too enterprisey.
True.
thanks balls
_00
This course will give you a full introduction into all of the core concepts in python. Follow along with the videos and you'll be a python programmer in no time!
Want more from Mike? He's starting a coding RPG/Bootcamp - https://simulator.dev/
โญ๏ธ Contents โญ
โจ๏ธ (0:00) Introduction
โจ๏ธ (1:45) Installing Python & PyCharm
โจ๏ธ (6:40) Setup & Hello Wor...
for what?
is this vid good
info
True. NPM is like "you have 69 outdated packages. 420 packages are looking for funding" after 6 months.
pip coming in cluth.
*clutch.
Pipenv and poetry support this as well.
can i make a suggestion? lets start a group where we all can talk?
Python's package managers are the best in my experience. Cargo is good as well.
You @safe dew ask for python recommendations in the other channels to rack up the requirements.
requirements of what
For permission to speak in the Voice Chat.
i did
Voice Gate failed
You are not currently eligible to use voice inside Python Discord for the following reasons:
โข You have been on the server for less than 3 days.
nah man
i think something like this
i forgot
idk i want to talk
am very bad typer
i forgor ๐
I don't wanna spam in the other channel.
Been fine. Thank you for asking.
I mean, it hasn't been worse than normal so I'm grateful for that.
so you want to go to other group to talk
I used it for my thesis. Currently trying to find some company who will let it use me for some job.
It's a sub in my opinion.
Software engineering.
B D S M.
Likewise.
It's like potato. Goes well alone or with anything else.
Math bro.
I had trouble explaining long division to someone else a few days back.
Lol.
Sorry man. Everyone in my class laughed when our prof said BigO.
No lol. We used to memorize math.
It's like finding the right thing to search. Stackoverflow has you covered for the most part after that.
Yeah.
At least that makes us good.
People don't google in other industries and makes silly mistakes and don't get with the times.
At least Google won't share the ad revenue. At least let me use the search result to make money.
Inception.
Duckduckgo all the way bro for me.
Of course.
The right tool for the right job.
I just !g on duck duck go when I need to go to Google.
I'm not even married to this career.
Yes.
Probably an obscene amount.
I'm trying to buy farm land so I can grow my own food and raise my own cows and chicken.
It's not about the money.
It's about sustenance.
I saw a company like that.
Right?
Singapore won't give me visa so I can't go work there.
I open to both.
*am
USA, UK sounds good as well.
No China.
I know people who work in China personally.
They won't speak to me about their work condition over the phone.
hi
I only know the real dets cause they came to visit me in our country.
You can live in peace and even like kings as long as you suckle the CCP.
Every company worth working in has tries to the govt.
You need those ties if you want to climb the proverbial career ladder.
Of course.
They give you marks.
Their private companies have ties with the government as well.
Lockheed martin be swimming in that F-35 dollar money.
US military has china screws holding them armor plates.
My voice verification channel has dissapeared.
I can't unmute though.
Okay. BRB.
Maybe my mic died. Let me check.
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@slim marsh
!e py def func(): pass print(func.__repr__())
@somber heath :white_check_mark: Your eval job has completed with return code 0.
<function func at 0x7fa29e3a2040>
!e from random import randint print(randint.__repr__())โ
@somber heath :white_check_mark: Your eval job has completed with return code 0.
<bound method Random.randint of <random.Random object at 0x56120ad08a60>>
@past pawn I'm afraid I must disappoint. I gave up on chains very early on into my internet presence. ๐
hang on ill get headphones
Nevertheless, I appreciate the whimsy.
I just owe it to the last person i DMed ||"Tomato"||
@cobalt fractal you are playing Path of Exile.
In Act 2, there's an easter egg aimed specifically at Australians.
Go to the Western Forest (Act 2) and run around some trees. Preferably after researching Australian legends ;)
Dropbears?
yes
except they're called "Plummeting Ursa" or something like that
the plummeting ursa look like marsupials, too
except with red eyes and sharp blood dripping teeth
XD
I walked past a massive snake, it was pretty chill until 20 different birds started bullying it
they were plovers, miner birds, magpies and rainbow lorikeets
the plovers were the first to bully the snake, which looked like it was about to eat one of them
@somber heath you got bin chickens?
lol q
yeah they stink too
i've seen a few ducks, theyre not common though
it's been a few years since i've seen black ibii, but white one's are common, and they bully my chickens :/
You get curlews?
they frikin scream at night time
I'll see if i have a photo of one
hang on...
The wonderful sound of Curlews circling overhead.
sounds like someone screaming
lmao
magpies seem intelligent compared to most other birds around here
they wont say no to food, but they're still cautious.
If bullied, they become a swooping magpie during mating season.
There's this one trying to get in my windows for a few months straight just pecking on the window while i have breakfast near it
it is the 4th for three hours and 45mins
ill do some redstone while in vc
@cobalt magnet sign language XD
sure
but my webcam is like 2 pixels
lmao
hahaha
my brain is like 2 brain cells
yoo you must be overpowered
im like 0.094504950868045 braincells
hello
my cat is being cute
which one isnt
she's also right here
next to me
also on her own office chair
I can move the chair around and she's completely chill
If that isn't a good enough reason for temporary video perms I dunno what is
lol
well she's got bored and walked off now
I guess I'll feed her then
she's back
can you hear the purring?
i can hear a keyboard
"""
My thing here.
"""
"""
My small thing here.
Long description I don't care about because I can't support it.
"""
hewwo bluenix
There I fed Lily, she should purr louder for you guys
just a sec though i gotta feed myself
!e py print("Apple".split("."))
@somber heath :white_check_mark: Your eval job has completed with return code 0.
['Apple']
yes
probably windows updating or settings being applied
i just alt tabbed out of minecraft
bluenix have you tried vim ?
and saw all icons refresh
probably lazy loaded
there's so much color in maxed out minecraft fireworks
they do damage when shot out of crossbows
they do a LOT of damage
yes splash damage
i didnt get you
you just hold the firework in offhand and crossbow in main hand and then hold right click to load
in offhand if you have other loadable projectiles
in your inventory
i have a beautiful 1600 x 900 monitor lol
oh god i kept firing fireworks from a redstone clock now the sound is in my head
yes
thats scary
i gotta put my ear to it
yeah that's what it sounds like
but very quiet
I pulled out the charger cable it stopped buzzing
im pretty sure you usually leave a few micro meters anyway
awesome
yeah
its kinda pleasant here
yea
but goin back
tomorrow
australia
^
lol
bluenix, i had a doubt-
when will wumpy be functional?
ah
docs now?
oh
like that-
yup
pog
i use a custom client written in 20 lines
๐
lemme finD iT OnE min
not 20, maybe 40
not dpy
its interacting with the api directly
ws*
aight i gona get food
there's a bit more
the cat is trying to murder my door :/
here's the message class :
decorators kill me
dont understand and dislike
heh
more like that
i didnt know you could use it directly in vscode tho :0
now i get it
tysm bluenix <3
yup
decorator?
I made a really cool command decorator for dpy
I got toast sandwich and beer :)
If Lily keeps running around like this imma put sticky tape on her paws
oh
at least it would be entertaining, and wont decrease the lifespan of my carpet
my two different command decorators
def command(_flags:int):
def wrapper(af):
async def inner(message, *options, flags:int=0):
if flags<_flags:
| return await message.channel.send('ACCESS DENIED')
else:
return await af(message, *options)
COMMANDS[af.__name__] = inner
return hack_wrapper(1)(af)
return wrapper
def _command(af):
COMMANDS[af.__name__] = af
return hack_wrapper(1)(af)
here's another decorator:
def hack_wrapper(n):
from sys import _getframe
frame=_getframe(n+1)
fl = frame.f_locals
fg = frame.f_globals
fb = frame.f_builtins
return lambda f:fl.get(f.__name__,fg.get(f.__name__,fb.get(f.__name__,None)))
oh now it makes sense
!e here's a rewrite of above
def decorator(n):
from sys import _getframe
frame=_getframe(n+1)
fl = frame.f_locals
fg = frame.f_globals
fb = frame.f_builtins
def wrapper(f):
return fl.get(
f.__name__,
fg.get(
f.__name__,
fb.get(f.__name__,None)
)
)
return wrapper
n = 5
@decorator(0)
def print(a):
try:print(a)
except:print(a)
@decorator(0)
def n():return 2 + 2
print(n)
@past pawn :white_check_mark: Your eval job has completed with return code 0.
5
Bluenix, you can change that number to select which frame you want to reference from
@compact yacht
which makes it extremely useful if you want multiple functions with the same name
but stored somewhere other than the namespace
Huh ๐ค
the "trick that allows parenthesis" is just another level of function nesting
it's a function that returns the actual wrapper
!e decorator-slinger```py
def hack_wrapper(n):
from sys import _getframe
frame=_getframe(n+1)
fl = frame.f_locals
fg = frame.f_globals
fb = frame.f_builtins
return lambda f:fl.get(f.name,fg.get(f.name,fb.get(f.name,None)))
d = {}
def decorator(value):
def wrapper(f):
d[value] = f
return hack_wrapper(1)(f)
return wrapper
@decorator('greet')
def print():return"Hello World!"
print(d'greet')
@past pawn :white_check_mark: Your eval job has completed with return code 0.
Hello World!
sorry that was my cat
she's trying to steal the cheese out my sandwich
@brave steppe you can talk while listening to this lyricy music? big brain!
I prefer Flume
it's sorta similar to this, less lyrics tho
So i was making a pong game using java script can anyone help me with that? i need to make a scoreboard?
this is python discord
not javascript discord
so it's likely not many people here know
how to code in javascript
sorry but when i saw bluenix profile they are also an javascript programmer
yea
i just need a scoreboard,lol
Hi! Let's talk today about liaison between Web Storage API and JavaScript. Weโll use them in order to keep score numbers in our game permanently, in other words to save the score. I'm Anatol and you are watching the Good Parts of the FrontEnd development.
In one of the previous episodes, we've already created a simple game, however the data in ...
im using p5.js editor btw
lol okay
oh thats a remix
that you so much @brave steppe
๐ค
i actually made the game i just needed to add a scoreboard
sorry blunix
im actually a kid,lol i will not disturb you now ,sorry again :<
I made a game of minesweeper, cautioning to do the exact opposite of everyone's advice about writing a game.
It runs from cmd, no gui, but it looks like a gui.
No curses, msvcrt, only two functions from that are used.
raw ANSI escape sequences all over the place.
The interesting thing is I am yet to find a python minesweeper as good as this one on the user side.
wasd keys to move a cursor that ignores already known squares, and usage of ascii and colours to look almost exactly like the classic Windows Minesweeper
i didnt understood a thing๐
omg ur the best man @brave steppe
the number on the right ominously counts up every second
regardless of key press ;)
no threading
It's essentially spamming an infinite loop that makes a decision whether to do anything based on whatever's going on
i.e. "event loop"
msvcrt has a function that checks if a character is queued
kbhit()
Really cool implementation!
this is cool dude
my cat is disappointed cos i ate all my sandwich
the event loop is compactified cos im lazy and want to debug without any mouse wheel movement
The board is very soft-coded
that's where i switch whatever characters the board uses, what colour they are, etc..
Can you add me blunix? Wait im wasting everyones time i suck,sorry
element 9 sorta doesn't follow the pattern though, and is for unknown squares
the "soft" code for the board.
You're really not, don't worry about it
my usage of tuple assigning is very liberal and dynamic
oki im ur fan btw ,hehe
(x,y,n),clicked = self.xyn, self[i,j]
and
x,y,n,a,b,c = *self.xyn,*self.chars['board']
#algos-and-data-structs will be better at helping
my bomb generation is center-aligned
im back :3
hi
cool
heyy
!e ```py
class function:
def init(self, f):self.f=f
def call(self, *args):
return self.f(*args)
function(lambda a:print(a))("Hello World!")
@past pawn :white_check_mark: Your eval job has completed with return code 0.
Hello World!
do you guys know hacking? hehe
I casually mention.... something related... and i get a warning ;)
my new nickname heh
im on the "good side of coding"
bruv, my nickname is bad
bots
gtg now bye ๐ฆ @brave steppe pls friend me or me cry, thanks,hehe
@brave steppe , bots are here
reacting to msgs instantly
look at thatttt
@wraith cargo
huh
self bot
I fed cat cheese now she's gone hyper
wut
userbots arent hard
self bot illegal
!mute 883415857760464907 investigating
:incoming_envelope: :ok_hand: applied mute to @wraith cargo until <t:1630761173:f> (59 minutes and 59 seconds).
maaate
someone screenshot his
Thanks ::D
It's not the first time we've seen this
first time im seeing this :P
yeee
the response time for the reactions is almost 0
what was that ?
Turing test reveal party??
It was in multiple channels as well
@brave steppe my only assert statement in the whole script:
(0 < n < x*y - 9 > x > 2 < y)or yo_mamma is fat
it semantically asserts
my main function catches this and makes it extremely cursed
def main():
Minesweeper.terminal.save()
try:Minesweeper(int(input('x> ')),int(input('y> ')),int(input('bombs> ')),not input("classic? ").lower().startswith('n'))
except NameError as e:
k = e.__str__()
from ctypes import py_object as p
hack = lambda:p.from_address(id(e)+8)
hack().value = type(hack().value.__name__,(hack().value,),{'__str__':lambda s:k.removeprefix('name ').removesuffix('not defined') + 'obese'}); raise ValueError('Invalid input')
except Exception as e:
Minesweeper.terminal.reset()
print(e.__class__.__qualname__+':',e,' ')
input('restart? ').lower().startswith('y')and(Minesweeper.terminal.get(),main());raise e.__class__ from e;
__name__ == '__main__' == main()
are you explaining what a selfbot is?
I don't see anything particularly wrong with that ๐คท
Lily has burnt off the cheese she's calm now
yes
le event loop
def start(self):
self.running = True
self.generate()
self.update_board()
import time
T = time.time()//1
while self.running:
self.t = t = int(time.time()-T)
char=msvcrt.getch().decode('ANSI')if msvcrt.kbhit()else'\1'
(lambda i,j:{
char in'\t/?':lambda:self.right_click(i, j),
char in'\b\xff':self.reset,
char in' \r':lambda:self.react_select(i, j),
char in'wasdqezx':lambda:self.move(w=char in'qwe',a=char in'qaz',s=char in'zsx',d=char in'edx'),
char in'[\x1b':lambda:self.DIE(True),
char=='ร ':lambda:(c:=msvcrt.getch().decode('ANSI'))not in'KHMP'and(self.reset()or 1)or self.move(**{{'K':'a','H':'w','M':'d','P':'s'}[c]:1}),
char in'h;:':self.hint,
char in'rl':self.random_move,
char.isdigit():lambda:self.digit_move(int(char))
}.get(1,lambda:0)()or self.update_board())(*self.here)
if self.check_done():
self.title("You Win!",0,'B-)',t)
print(end=COLOURS['default'])
@lambda E:(()for()in()).throw(E,MinesweeperBaseException('You Win!'))
class GameWon(MinesweeperBaseException):self.running=False
you don't actually need any indentation when nesting brackets on a new line
so i throws the indent out the window
extended wasd support to include diagonal keys
also switching to decide the keyword instead of the value of such ;)
it looks scary, so much implicit behaviour
!zen
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
it abstracts away the mechanics so that there's just a lines of "condition of char:what to do"
although everything unrelated to user input is handled in the board printing subroutine
like the red numbers
they're calculated on the spot when formatting the extremely soft coded board
def move(self,
w:int = 0, a:int = 0,
s:int = 0, d:int = 0
):
o = i, j = self.here
x,y,_= self.xyn
w *= not not j
a *= not not i
I, J = d-a, s-w
j += J
i += I
tolerance:int = x+y-1
while(not(j in range(y)and i in range(x))or self[i,j]==1)and tolerance:
tolerance -= 1
j += J
i += I
if i >= x: i:int = x-1
elif i<0 : i = int()
if j >= y: j:int = y-1
elif j<0 : j = int()
if self[i,j]==1:#dam corner
tolerance = 1
if self==1:tolerance=0
else:i,j = o
if not tolerance and not self.check_done():
for i,j in self:
if self[i,j] != 1: break
self.terminal.log('moved from '+str(self.here)+' to '+str((i,j)))if self.here!=(i,j)else self.terminal.log('unable to move that way')
self.here = i,j
that's advanced wasd
it jumps known squares only if there's an unknown square on the other side
it's a lot harder than it sounds
not to mention diagonal movement, when it hits the edge, will become movement in a cardinal direction along the edge
like if you pushed an object diagonally against a wall, how it would move
since there's two game modes, the sweep mode implements this additional algorithm
def right_click(self, *a):
if self[a]==1:return
x,y,n=self.xyn
self[a] = {0:2,2:3,3:0,1:1}[self[a]]
if self.sweep_mode:
i,j = a
if self.bombs[j][i]:
self[a]=1
self.bombs[j][i]=0
self.xyn = x,y,n-1
for k,l in product(range(-1,2),repeat=2):
for m,n in[(i+k,j+l)]:
if m in range(x)and n in range(y)and self.numbers[n][m]:
self.numbers[n][m]-=1
if not self.numbers[n][m]:self.select(m,n)
else:self.DIE()
which is really cool, as it properly deletes the mine, updating the surrounding numbers
but if you flag a safe square, you die
cya bluenix
the title bar of the board:
def title(self, message='', bombs=0, smiley=':-)', time=0):
x,*_ = self.xyn
bombs = f"{chr(27)}[91;40m{bombs:0>3d}{chr(27)}[30;47m"
smiley = f'{chr(27)}[97m|{rgb:255;255;0;1}\x1b[30m{smiley:s}\x1b[47;90m|{chr(27)}[37m'
t = f"{chr(27)}[40;91m{str(time).zfill(3):s}{chr(27)}[30;47m"
self.terminal.log(f'{message}\n{bombs: <{2*x+len(bombs)-5}}{smiley:s}{t: >{2*x+len(t)-5+3-max([len(str(time)),3])}s}')
๐
byee
cya
Can you help me learn python from starting
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
ok thank you
Yeah and Corey Schafer is his name btw
Hey ๐ What kinds of things do you want to do with Python? What is your level of education? Maybe we can recommend some specific resources.
!e py print("Start") #First line in output for each_element in "this object": print(each_element) print("Stop") #Last line in output
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | Start
002 | t
003 | h
004 | i
005 | s
006 |
007 | o
008 | b
009 | j
010 | e
011 | c
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/navebibuge.txt?noredirect
Everything in the indentation, which here belongs to the for loop, is run for the number of times that there are elements...letters...in the object, here a string.
For each run of this indentation, the each element in turn is assigned to the variable each_object
So the first time, each_object is "t"
Next iteration of the loop, each_object is "h"
and so on
Other loop topics for research: while, continue, break, else, range
don't forget enumerate
saves from the insanity of range(len(iterable))
zip
for i in range(len(a)):
print(a[i])
seeing code like this makes me cringe
as opposed to ```py
for e in a:print(e)
for i in a:
if c(i):
do_stuff(i)
break
else:
do_other_stuff(a)
i ned slepp
mebbe ie sheld slepp
nehhh
actuallly
yeah
@somber heath what you talking about?
What do you do in these sessions
i did try to stream Lily's purring but it was too quiet
and when i fed her to get her to purr louder that just made her hyperactive
occasionally politics
and animals
at least it's not like some servers where people fall asleep connected to vc and they're snoring
this one's quite civilised
there's one server i'm in they do it deliberately several times a week
some of them would also be streaming airplane simulations
essentially
Lily gon asleep
i think i should follow suite
byeeeeeeeeee
hi opal
how is it going?
i am also just bored
yes
its lockdown here
:\/
have you tried the minecraft morph mod?
oh
its a mod that lets you be a mob
what do you prefer opal functional based approach or OOP based?
@somber heath
i think everyone gets at first
have you worked with the ctypes module?
can you give an example?
what
lol
lol, everyone is on mute
well i guess thats true
me:starts coding
also me: destroys left hand and know its extremely hard to type :_
๐
Ergonomics is a thing.
As is correct technique.
But then some people just have shitty hands/health issues.
There was a time when my arthritis was really kicking my arse. It was thoroughly unpleasant to type.
do you follow Ergonomics?
!e py import random players = ["Peter", "Paul", "Anna", "Ferdinand", "Astrid", "Bort"] random.shuffle(players) half = len(players) // 2 team_a = players[half:] #right half of list team_b = players[:half] #left half of list print(team_a) print(team_b)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | ['Bort', 'Astrid', 'Paul']
002 | ['Peter', 'Ferdinand', 'Anna']
>>> a = list(range(10))
>>> half = len(a) // 2
>>> first , second = a[0:half] , a[half : len(a)]
>>> first
[0, 1, 2, 3, 4]
>>> second
[5, 6, 7, 8, 9]
wouldnt this work @somber heath
opals way is more cleaner than mine
i dont think you should rush ๐
i think concept of OOP is necessary for dpy
personally i have also never tried dpy
but i have used djs
hi'
About your slicing with explicit values
>>> SIZE = 10 # for dummy length
>>> class A:
... def __getitem__(self, x, /): return x
...
>>> A = A() # due to making it easier
>>> A[ : 5], A[0 : 5]
(slice(None, 5, None), slice(0, 5, None))
>>> A[5 : ], A[5 : SIZE]
(slice(5, None, None), slice(5, 10, None))
>>> A[ : : -1], A[SIZE-1 : : -1] # -1 is something else as start and stop, so cannot use ... and 0 as stop will crop off index 0
(slice(None, None, -1), slice(9, None, -1))
hlo @primal yacht
Your messages are not in English
I cannot understand non-English
Translations are not 100% accurate.
I'm okay
!rule 4 please
4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.
that's bing translate, yes. Currently set to spanish though.
https://www.bing.com/translator/ ? Works
4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.
These are the rules, unfortunately it is on you to translate to English, not us
thanks
^w^
btw about leading __ in property / method names for custom classes: https://docs.python.org/3/reference/expressions.html#private-name-mangling
@spring relic
.
which distro ?
oh oh
@gloomy vigilsearch in search menu there should be driver something
open that
in settings?
and
no no
goodnight guys โค๏ธ
oh no
how to install
hahha
@gloomy vigil
h
hi
see this
my bad .. i told you wrong name
search this additional software
yea i got
:(
ooh
wait
:(
GPU?

!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
ohh
i think
Graphics card wasn't connected properly
๐
ask for help with elder
๐
hahaah
exactly
@forest zodiac i cannot speak
fluently

english
no worries dude
i will watch a indian guy tutorial on youtube and he will prob have solution
my name is actually based on taht

the Beautiful soup module and requests

@indigo lion here
!e py class MyClass: pass my_class_instance = MyClass() print(my_class_instance)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
<__main__.MyClass object at 0x7f476c2cdfd0>
Hey @wind raptor!
It looks like you tried to attach a Python file - please use a code-pasting service such as https://paste.pythondiscord.com
!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
print(f"hello {*range(10)}")
@forest zodiac :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | (*range(10))
003 | ^
004 | SyntaxError: f-string: can't use starred expression here
@forest zodiac :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | print(f"hello {}").format(*range(10))
003 | ^
004 | SyntaxError: f-string: empty expression not allowed
!e
print("hello {}").format(*range(10))
@forest zodiac :x: Your eval job has completed with return code 1.
001 | hello {}
002 | Traceback (most recent call last):
003 | File "<string>", line 1, in <module>
004 | AttributeError: 'NoneType' object has no attribute 'format'
@forest zodiac :white_check_mark: Your eval job has completed with return code 0.
hello 0
!e```py
string = "hello {} {} {} {} {} {} {} {}".format(*range(10))
print(string)
!e
string = "hello {} {} {} {} {} {} {} {}".format(*range(10))
print(string)
@forest zodiac :white_check_mark: Your eval job has completed with return code 0.
hello 0 1 2 3 4 5 6 7
!e
string = "hello {}".format("{}" * 10).format(*range(10))
print(string)
@forest zodiac :white_check_mark: Your eval job has completed with return code 0.
hello 0123456789
This is an EXECUTABLE FILE for use with the Fantasy Grounds VTT.
FGStats2 is here!!
Tons of new and upgraded features i
Much is possible.
As you would have it.
@somber heath My mic is not working dude ๐ฆ
its physically wrong
are you a real coder?
lol
yesterday a guy got my all private info :<
im not kiddin
he said hes a software engineer
then i got a VPN
he was nice though
nono
i was in a server and then i was just writing something and he randomly said my real name there and then i was scared so i chat him privatley
just my real name
i dont have a phone no.
yea
hi
he was sayin he knows my IP but wont tell me cause i will be too scared then
then i got a vpn
you cant speak here
@somber heath so yea i am self taught dev tryna secure an internship. and i am finding quite difficult do you have any advice i have my website portfilio in my bio
hi
wdym sir?
unless you are voice verified
np
yea ik that my mic is not working sir.
yea i thought about this after that conversation
i was trying to be cool
btw yesterday i also made my first game using java script :>
ik dude i started 2 days ago
it took me hours to learn stuffs
hehe im just wasting your time
hehe
rickroll never dies
ok sorry sir
lol yea
yea?
yea
also hecker is a character in a youtube channel :>
which engine do you use for python?
like visual code studio,etc
oh
i have pycharm but i dont know python i just have pycharm,hehe
hi
visual studio code is complicated for me i also have it downloaded
Voice Gate failed
โข You have sent less than 50 messages.
โข You have been active for fewer than 3 ten-minute blocks.
๐ฆ
i will have to send msgs ๐
i just wrote like 50 messages
what notebook u guys use??
now do the voice verify
im not bored
i have to stay 1 more day
yeah i use jupyter
i also use saturn
i do classes and i started in nested for loops and stuff
oh
peace
there is a course on edx about machine learning from MIT that points in the first lesson to download anaconda
that's why
it seems to be pretty hard to study
many people left
hi happy sloth
opalmist no offence you sound like 40,hehe jk
how old are you all?
hllooo
good morning ,
wow happy sloth can talk!
thier voice is verified
can we listen to songs?
ok sowy
how did yall find discord?
my friends told me bout it
you are a minecraft dev?
your what>?
oh
lol
its 31 degree in india i suppose
so which language are you learning or masters in? @whole bear
do you know python?
ohhh
i started coding 2 days ago and im learning java script i made like 2 games till now
oh
i was stuck with the variables
java script is just for beginners i suppose
these photos have my name in it :<
lol
i did
its actually my email id
hello titan
im workin on making a scoreboard in my game
whats sublime?
im also from india @compact bay hehe
ohh
im afk
im bak
wot is linus
linux
afk again,lol
rwxrob
What's your goto response in meetings?
๐ Video courses from JomaClass:
๐ New to programming? Learn Python here: https://joma.tech/35gCJTd
๐ Learn SQL for data science and data analytics: https://joma.tech/3nteQih
๐ Data Structures and Algorithms: https://joma.tech/2W89H33
๐ต Start Investing and get 2 FREE Stocks valued up to $1850 (when you dep...
hello sir @somber heath
are you talking to me sir?
i though ur in a call
im actually having a problem
Can you help me with the problem sir?
hi guys
can somone help meh?
:<
if its python, maybe
its java script
idk javascript lol
idk lol
yes
bored?
no, coding
nah its fine
its fine
HI bros
ello
hello
opalmist i have a problem can you help?
so i added a code for a scoreboard in my game and i know im so dumb, hehe
so you were cropping the screenshot
!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.
my name is written there sorry thats why i cropped
no need just take a snip lolololol
it copies it to your clipboard
do win + shift + s
and select the region
youwant to show
and then go to discord and paste it there
like this
thats done in seconds compared to taking a screenshot
taking like 40 seconds to crop
when i removed that code the game is working fine
lol
What tf is that
fill ('#FF0004');
textSize(25);
text("Score :" + Score , 10, 25);
java script
Ah i dont use that
Amogus
whar
weeeeeeeeeeeeeeeeeeeeeeeeeeeeee
weeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee






