#voice-chat-text-0
1 messages ยท Page 255 of 1
Cheeki can you tell me what a dictionary in python is?
It's a structure that allows you to represent links between objects
So if you have a bunch of colour names and their RGB values
You can use a dictionary to "link" each name to the corresponding cRGB
!e
names = ["red","green","blue"]
rgbs = [(255,0,0),(0,255,0),(0,0,255)]
def get_rgb(target):
for i,name in enumerate(names):
if name == target:
return rgbs[i]
print(get_rgb("green"))
print(get_rgb("blue"))
@ivory stump :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | (0, 255, 0)
002 | (0, 0, 255)
So this is a way you could conceptually try and make these links without a dictionary
But this is very clunky, and also very slow
If we imagine our two lists are a million elements long, we could go through up to a million elements of the list to find the one we actually want
With a dictionary, things look like this:
!e
col_dict = {
"red" : (255,0,0),
"green" : (0,255,0),
"blue" : (0,0,255)
}
print(col_dict["green"])
print(col_dict["blue"])
@ivory stump :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | (0, 255, 0)
002 | (0, 0, 255)
Dictionaries are defined by curly braces
and a bunch of comma separated pairs
Which look like key : value
This is clearly much nicer syntax to work with, and is also ridiculously fast
In fact it has approximately constant time complexity (if the dict has a million elements, it will still take about as long as for the toy example with 3 elements)
"time complexity" here just means "how much more time-consuming does the task get when we scale the numbers up"
So with "linear time complexity", (usually written as O(n)), as the size of the task (n) gets bigger the amount of time it will take also goes up by the same amount
Double the size = double the time
That's what the list example has
With the dictionary, we have "constant time complexity" aka O(1). You'll notice here that the term inside the brackets doesn't depend on n, and that's because no matter how big the task is the amount time taken will be the same
๐
maybe they just turned their computer off without disconnecting
anyway hopefully the explanation makes sense, anything else you wanna know about?
You can add a bookmark with .bm
.bm
Click that button and you'll get a bookmark too
Not really :/
in your dms with sir lancebot
Well that would be the problem it's telling you about
You don't have your dms open
yup
just reply to my first explanation message with.bm
Glad to see some bot appreciation, keep it up!
Well you wouldn't be able to follow the link
Since it's a server message link
The preview would be ok
So you could see the specific linked message and that alone

What does luck have to do with it?


Thank you Python
No idea 
Well I'd feel a little hurt
If you were really pushy with it or were doing it to several people you might get a mute for a bit 
@whole bear ๐
im havin runny nose
1204572113608900688
Created at 2024-02-06 23:39:31.752000+00:00 (<t:1707262771:R>).
1204572115316113459
Created at 2024-02-06 23:39:32.159000+00:00 (<t:1707262772:R>).
(Anyway discord says charizard won by about .41s)
LET'S GOOOOOOOOOOOOOOOo
where r u guys from ?
yeah RTT notwithstanding
๐ง
wholesome
I really need to ask mina for her boba emoji servers
I'm restrained by the inability to express more than one kind
๐ง
๐๐ผ
@somber heath I've got someone who needs help with reverse engineering a site
You ok with helping them?
Which site? Web stuff isn't my usual fare.
well my major is history ....but i wanna learn python so is it possible
im a blank canvas
Ask them to go to #web-development
A knowledge of history does not preclude one from learning how to program.
It's an AI video generator. He needs help with trying to get some specific variables from the site onto his own
Look at some beginner python vid
Are they on Firefox?
No
is there any dedicated channel for that ?
Using a type of ad blocker
YouTube is great
Oh SO many
๐ญ i wanna block my discord too
do you guys know any extension
Yeah, sorry, N9, I'm not really sure what to say other than to talk to more webby people.
Why do you wanna block discord?
@somber heathtrue
@steady sigil ๐
@steady sigil ๐
@steady sigilhi
yo
ye, need to be here longer lol
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Fair enough
Cheeki can you give me voice mute for 5 mins?
well it's good
tokkens and bots wont have acceess
Mute yourself.
no can do
It'd also show up on your record
time to take a quick look O_o
oh hell no
When you become a mod you get spammed with joke infractions
Because they no longer mean anything and the infractions dont actually apply
So I have like 30 infractions
It's great fun, you get to leave messages in their !i s
yeah you still show up as 1 timeout :(

I have one auto timeout too from way back
because of all the post editing of the voice like supression and shit I guess
like default discord shit I mean
Usually yes
I had same problem when I had set a noise gate too high on eq
yeap
sounds like it
discord noise suppresion could be cause or not really?
also discord has auto gain control, trying to turn that off might help?
I'd say it's 95% airpods but playing with discord settings might help, that's the best I can help here lol
you know I looked in the settings menu before I texted it but I was like "ok maybe OpalMist knows it and knows that discord named it one thing but it works not as it's named" lol
still doing lol
clever ^ 2 = stupid lol
๐
gl
I think you fixed it
what?
yeah it sounded like gain
but hey now it's fixed ๐
@somber heath i fixed it
working on learning how to write a discord bot lol
that would assign a random role from a list and every role has a different chance to be assigned
And also make it so it could be run on a VPS
interesting
Guess me from all my typing lmao
nono joking Lithuania lol
oh like that guy on geo guesser that can literally tell you the location from 10x10 px photo of a tree lol
Blinded is from US probl
If it's not US it's Canada
Cause you sound like American ngl ๐
You don't have an accent lol
all Eu has accent lol
you literally sound like that youtuber SwaggerSouls ngl ๐
nah, SwaggerSouls 100%
lol
2nd try. I'm the master of voice to country guesser lol
two different continents
even if they're connected
mainly yes
Canada is like America but better and colder
I'm new to programing lmao
I know the basics lol
I'm better at describing what the code needs to do and basic structure of how it should be done, but nothing complex lmao
Open a ticket, wait an hour
and somebody will help
I'm not a paid programmer, don't ask me how language works lol
Exception has occurred: NotImplementedError
Adafruit-PlatformDetect version 3.60.0 was unable to identify the board and/or
microcontroller running the Windows platform. Please be sure you
have the latest packages by running:
'pip3 install --upgrade adafruit-blinka adafruit-platformdetect'
If you are running the latest package, your board may not yet be supported. Please
open a New Issue on GitHub at https://github.com/adafruit/Adafruit_Blinka/issues and
select New Board Request.
File "C:\VS_code_Mecha\examples\CircuitPython 8.x\termal camera code.py", line 5, in <module>
import board
NotImplementedError:
Adafruit-PlatformDetect version 3.60.0 was unable to identify the board and/or
microcontroller running the Windows platform. Please be sure you
have the latest packages by running:
'pip3 install --upgrade adafruit-blinka adafruit-platformdetect'
If you are running the latest package, your board may not yet be supported. Please
open a New Issue on GitHub at https://github.com/adafruit/Adafruit_Blinka/issues and
select New Board Request.
SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
SPDX-License-Identifier: MIT
import time
import board
import busio
import adafruit_mlx90640
PRINT_TEMPERATURES = False
PRINT_ASCIIART = True
i2c = busio.I2C(board.SCL, board.SDA, frequency=800000)
mlx = adafruit_mlx90640.MLX90640(i2c)
print("MLX addr detected on I2C")
print([hex(i) for i in mlx.serial_number])
mlx.refresh_rate = adafruit_mlx90640.RefreshRate.REFRESH_2_HZ
frame = [0] * 768
while True:
stamp = time.monotonic()
try:
mlx.getFrame(frame)
except ValueError:
# these happen, no biggie - retry
continue
print("Read 2 frames in %0.2f s" % (time.monotonic() - stamp))
for h in range(24):
for w in range(32):
t = frame[h * 32 + w]
if PRINT_TEMPERATURES:
print("%0.1f, " % t, end="")
if PRINT_ASCIIART:
c = "&"
# pylint: disable=multiple-statements
if t < 20:
c = " "
elif t < 23:
c = "."
elif t < 25:
c = "-"
elif t < 27:
c = "*"
elif t < 29:
c = "+"
elif t < 31:
c = "x"
elif t < 33:
c = "%"
elif t < 35:
c = "#"
elif t < 37:
c = "X"
# pylint: enable=multiple-statements
print(c, end="")
print()
print()
I took the code from here https://learn.adafruit.com/adafruit-mlx90640-ir-thermal-camera/python-circuitpython
@steady sigil can try to help you out
what I'm getting is that it can't import board "import board" ether it can't reach the library or you named it wrong?
nice talking to you
idk he sounds like the cleanest english speaking person to me lol
It is clean but sometimes I feel like it's a bit quiet or not loud enough
I know I can hear frequencies up to 17k btw ๐
ssh
well it's definitely the latest version
and fon't be afraid to embaress yourself. I literally yesterday asked what was wrong with my code and all it was missing was a stupid space so the code aligns lol
you could always try to run the command so that it'll get the latest packages
pip3 install --upgrade adafruit-blinka adafruit-platformdetect
sometimes shit just don't work from the 1st time lol
in codding it's always
- write a code
- shit don't work
- try every fix
- be confused why it works now
- optional: Write a note next to code like : "Idk why it works now but if you delete this line it won't work lol"
Hey!
But it's easy fix
Hello!
Just figure out why the code doesn't import a library lol
I'll be able to speak in 3 hours only :S
Lol
from adafruit_blinka import board
^ The stupidiest fix I could think of and it 99% won't work lol
that + extra stuff if you get into more detail when working with numbers
?
- Don't ask for relation ship tips
- Be chill
- Don't force one
- I STILL NEED TO WAIT 3 HOURS for bot to allow me to talk lol
ye
ye
different nation - that was a ye for that lol
You know a person sound like FBI when they say "I'm just collecting data on you"
!e py text = 'AbCd' print(text.upper()) print(text.lower()) print(text.title())
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | ABCD
002 | abcd
003 | Abcd
@exotic moss :white_check_mark: Your 3.12 eval job has completed with return code 0.
A Cool Thing
neat
!e py print('When the Wind Blows'.title())
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
When The Wind Blows
it'd be cool if it checked certain words but that wouldn't work because of a lot of senarios
!e py print(dir(str))
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'removeprefix', 'removesuffix', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
!e ```py
print("they're opal's friends".title())
@exotic moss :white_check_mark: Your 3.12 eval job has completed with return code 0.
They'Re Opal'S Friends
lmao
!e py my_list = [] my_list.append(1) print(my_list) my_list.append(2) print(my_list)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | [1]
002 | [1, 2]
@lilac remnant ๐
!e ```py
import re
e = "they're opal's friends"
def title(text):
return re.sub(r"[A-Za-z]+('[A-Za-z]+)?", lambda x: x.group(0).capitalize(), text)
title(e)
because it captializes after apostrophies
oh u can't edit the original msg
!e ```py
import re
e = "they're opal's friends"
def title(text):
return re.sub(r"[A-Za-z]+('[A-Za-z]+)?", lambda x: x.group(0).capitalize(), text)
title(e)
class MyClass:
pass```
!e ```py
class MyClass:
pass
instance = MyClass()
print(instance)
print(MyClass)```
mobile programming moment?
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | <__main__.MyClass object at 0x7f5745edf680>
002 | <class '__main__.MyClass'>
!e py if True:
@somber heath :x: Your 3.12 eval job has completed with return code 1.
001 | File "/home/main.py", line 1
002 | if True:
003 | IndentationError: expected an indented block after 'if' statement on line 1
!e ```py
class MyClass:
...```
@somber heath :x: Your 3.12 eval job has completed with return code 1.
001 | File "/home/main.py", line 3
002 | ...
003 | ^
004 | IndentationError: expected an indented block after class definition on line 1
!e
test = pass
@clear portal :x: Your 3.12 eval job has completed with return code 1.
001 | File "/home/main.py", line 1
002 | test = pass
003 | ^^^^
004 | SyntaxError: invalid syntax
!e
import os
os.system("/sbin/reboot")
!e ```py
class MyClass:
def hello(self):
print('Hello, world.')
instance = MyClass()
instance.hello()```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
Hello, world.
!e ```py
def func():
print('Hello, world.')
func()
func()
func()```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | Hello, world.
002 | Hello, world.
003 | Hello, world.
@sweet sorrel ๐
Hello
!e ```py
def func(a):
print(a)
func('Hello, world.')```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
Hello, world.
But like why not add an ID Verification or something so you show you are a real person have to put some kind of effort and boom.
Easy filter
@sweet sorrel But won't real people still come to troll?
If they do they get one shot.
That'd be more work for admins
ID Verification. wut is that
Bless. I couldn't last 1 hour to get my voice enabled haha.. Been on this for 3 years but had voice surpression
!e ```py
def func(a):
print(a)
func('Hello, world.')
func('Goodbye.')```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | Hello, world.
002 | Goodbye.
code
!eval [python_version] <code, ...>
Can also use: e
Run Python code and get the results.
This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.
If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.
Currently only 3.12 version is supported.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!
i dont wanna show my photo to strangers ://
async def testwarn(ctx, member: discord.Member, *, reason: str): Is my function here a testwarn and the arguments is whats entered.
ctx, member: discord.Member, *, reason: str would this be the arg
!e ```py
def add(a, b):
print(a + b)
add(1, 2)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
3
!e ```py
def func():
return 'Hello, world.'
print(func())```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
Hello, world.
print('Hello, world.')```
9pm :). here is 5am ๐
๐ฎ๐ท
wut
im not running ๐
i live in the Persian Empire
:))))))))
good
!e ```py
def func():
pass
print(func())```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
None
!e py r = print('Hello, world.') print(r)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | Hello, world.
002 | None
!e ```py
def add(a, b):
return a + b
print(add(1, 2))```
i think the kid is gone. btw ๐
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
3
@verbal zenith hey bro
print(3)```
yep
what is lazy evaluated filed
ah
i just write my own wrappers always
no. i dont use it like that ๐
i use the sqlalchamy and pydantic sepretly and just write wrappers
!e ```py
class MyClass:
def say(self, obj):
print(obj)
instance = MyClass()
instance.say('Hello, world.')```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
Hello, world.
Ok bye
told u
๐
i think he has ADHD ๐
do you guys make backups from your github repos?
@quiet sapphire ๐
Is there a way to force evaluate all lazy fields on a model?
I tried googling, and it's a little tough to find, will keep looking if you don't know tho HAHA
i dont know. i just write wrappers ๐
i dont like going full OSM becouse of this exact reason. you get limited very fast
sometimes i just write raw sql queries
this is how i do my thing
Goodness
you have a table from OSM
How does that work with migrations
for example a blog
class BlogTable(BaseTable):
__tablename__ = 'blog'
blog_id = Column(Integer, primary_key=True, autoincrement=True)
slug = Column(String, nullable=False, index=True)
project = Column(
Integer,
ForeignKey(ProjectTable.project_id, ondelete='CASCADE'),
nullable=False
)
author = Column(
Integer,
ForeignKey(UserTable.user_id, ondelete='SET NULL'),
index=True,
)
category = Column(
Integer,
ForeignKey(BlogCategoryTable.category_id, ondelete='SET NULL'),
index=True,
)
created_at = Column(Integer, nullable=False, server_default='0')
edited_at = Column(Integer, nullable=False, server_default='0')
thumbnail = Column(
Integer,
ForeignKey(RecordTable.record_id, ondelete='SET NULL'),
)
thumbnail_url = Column(String)
read_time = Column(Integer, nullable=False, server_default='0')
__table_args__ = (
UniqueConstraint('project', 'slug'),
)
and then
you make a blog model
class BlogModel(BaseModel):
blog_id: int
slug: str
project: int
created_at: int
author: int | None = None
category: int | None = None
edited_at: int = 0
thumbnail: int | None = None
thumbnail_url: str | None = None
read_time: int = 0
from pydantic
then
you do this
result = await sqlx.fetch_one(select(BlogTable).where(
BlogTable.blog_id == blog_id,
BlogTable.project == project.project_id
))
if result is None:
raise err_bad_id(item='blog', id=blog_id)
blog = BlogModel(**result)
indent is worng
but you get the point
I see
you can put this behind a wrapper function like
blog_get
Maybe my crud should be returning pydantic schemas
No.
Nvm I don't think it should
Gn people
Relationship lazy loading is usually quite nice
Just this specific time it's a pain in the ass
i never do joins. like never
idk man. i have writen a lot if code. specialy website with sql. and never had to do a join.
there is relationships but no join
as you can see. the category is a FK
I mean I'm not saying I NEED this, it just seems like it would be a pain to not have .children for instance
i just get them manualy ๐
Yeah just sounds like a major annoyance when my model has a parent, and children since it relates to itself, has users attached in multiple different manners, has phone numbers, social medias, bla bla bla. Could grab it all, but relationships makes it very easy
its only when I want my pydantic model to say display a related model in the schema that this is annoying
async with engine.begin() as conn:
await conn.run_sync(Base.metadata.create_all)
db = SessionLocal()
try:
yield db
finally:
await db.close()``` Does this create the tables every time the server makes a connection to the database?
you write tables for that ๐คฃ
I could put them in a long string field I guess
the performance gotta suck
Where would you store them?
Json encoded string?
yep
im a database expert btw ๐ ๐
Well guess that makes me the import
๐
@opaque hornet ๐
Honestly the json encoded strings could make things a lot nicer
Tho not all can use that
How would you do role relationships
Like owner, editor, etc.
I did a many to one table for that
Technically I guess a many to many
roles are permissions right? like discord?
class ProjectRoles(Base):
__tablename__ = "project_roles"
id = Column(Integer, primary_key=True)
role = Column(String)
project_id = Column(Integer, ForeignKey('project.id'), nullable=False)
project = Relationship("Project", back_populates="roles", remote_side="Project.id")
user_id = Column(Integer, ForeignKey('user.id'), nullable=False)
user = Relationship("User", back_populates="project_roles", remote_side="User.id")
Similar but the roles are static, so maybe there is a better way of doing it?
yes. bit fields
There are specific permissions granted to each role, not customizable
thats how discord does it
Oh instead of string for role
Or for permissions
I assume for permission validation?
like bit 1 is a toggle for x permission, bit 2 for y permission, etc.
yes permission validation and just in general
ye
Well that doesn't exactly apply to my roles
There are defined roles, they don't change ever
unless I change them in the program
Those roles have defined access by a function that will check read and write access
you can define role as
PERM_A = 1 << 0
PERM_B = 1 << 1
ROLE_A = PERM_A | PERM_B
that means the ROLE_A have the both perms
no different. you define all of your perms
and then apply as needed
class AdminPerms(int, Enum):
'''Admin Permissions'''
def _generate_next_value_(name, start, count, last_values):
return 1 << count
MASTER = auto() # only controls admins
V_USER = auto() # VISION ~ VIEW
A_USER = auto() # APPEND ~ ADD
C_USER = auto() # CHANGE ~ CHANGE
D_USER = auto() # DELETE ~ DELETE
V_RECORD = auto()
A_RECORD = auto()
C_RECORD = auto()
D_RECORD = auto()
MAX = auto()
this is how my perms look like
class ProjectRoles(Base):
__tablename__ = "project_roles"
id = Column(Integer, primary_key=True)
permissions = Column(Integer, nullable=False)
project_id = Column(Integer, ForeignKey('project.id'), nullable=False)
project = Relationship("Project", back_populates="roles", remote_side="Project.id")
user_id = Column(Integer, ForeignKey('user.id'), nullable=False)
user = Relationship("User", back_populates="project_roles", remote_side="User.id")
Permissions would store the specific access to this project?
def admin_check(self, required_perms: int, log=False) -> bool:
if self.agent is None:
if log:
logger.warn(
f'<User {self.user.gene}> tried {required_perms}'
)
return False
admin_perms = self.agent.admin_perms
is_master = admin_perms & AdminPerms.MASTER
if not is_master and (admin_perms & required_perms) != required_perms:
if log:
logger.warn(
f'<Admin {self.user.gene}> tried {required_perms}'
)
return False
return True
store the perms per project
this user has this perms on this project
dont store the roles on a seprate table
How does that make sense though?
its does.
and if your users per project are small. like 2 user per project
just store the perms on the project table it self as json
It will be many
like how manny
There is another resource with permissions which could have ~100
Project could have ~15-20
20 users in json is still way faster then just searching the hole database
fair
cus when you load your json object into python its becomes a hasmap
so its even faster
Alright, so.
Store phone numbers and social medias and things alike in json encoded fields
Store permission validation info in a bit packed int
Store roles and their associated perms in a json encoded field
That all looks like the take away?
ye. just in general minimize your use of relationships in your database and IRL ๐
and IRL HAHAHAHA
yeah honestly makes good sense
Surprised I didn't think of json encoding
Guess I thought that'd be stupid which in hindsight is dumb to think HAHAHA
remember searching for thing is expensive.
but having it right there is way faster
Not when my pc is Sherlocke
Speak for your own undercapable pc
I'm just kiddin yeah understandable
are you writing backend?
Yes
And front end
Real pain to do the front end enjoying the fuckery of learning backend stuff
so the thing that you gotta remember is that. 1ms more spend on each request can cost you $1000 more each month :))
that how i think about optimization
yep. same
Depends on the payment model you're using I'd assume but yeah ms matters
i didn't calculated ๐ just put some numbers there.
make the number more fun in that case
"...could cost you $1234 more each month"
Then die on the hill that it's calculated and accurate
$69420 ๐
ye. im working on a custom database for a project cus sql wouldn't cut it. and that was when i learned a lot about these stuff
Interesting I don't think I've ever heard of sql not being enough and no other already made database fitting the needs
we are talking about micro seconds of delay not mili
Ms
micro is 0.000001 of a second
ye
Good ol greek
flask that dead bro
Flask?
ye
its old and uwsgi
ah ๐
same
Started with django but I didn't like the mess that my code became
!e py import random random.seed(16362319) result = ''.join(random.choices('abcdr', k=11)) print(result)Abracadabra.
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
abracadabra
but python is also not cutting it. unfortunately i have to rewrite my backend at some point :Sadge:
write it in c and run it in parallel
no
the random
thing
i have to write my backend in rust
rust sucks
A33
the lang
i have to use it
i put a lot of reseach in to it
should contact support
this guy is the co-founder of github. checkout the tweet got 2.4mil views
im writing a python script to download all of my repos and zip them ๐ just in case an AI decide to randomly ban me.
so quiet
it smells like a house burning down
Israel
hot damn
hi
great
@hybrid fjord ๐
@hybrid fjordhi
@torn dust ๐
๐ @somber heath @mint canyon
@torn dust hi
hello !
helo
hru bro
where can i learn python
calm
hur
hi
.
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
Here. This Discord server.
in vc
why not
not bad .. wbu?
same here aswell
YouTube, Corey Schafer, playlists, Python for Beginners.
just fine
then kindly can u come on my vc like in prvt i dont have this server vc
wow
thats gud
Assistance via DMs is discouraged.
@stray blade hi
@stray blade ๐
Hi
Hi
oh ok i was just asking cause i dont have vc perm
Hi
!stream 425552190283972608
โ @peak depot can now stream until <t:1707316261:f>.
SELECT DENSE_RANK() OVER (ORDER BY MAX(tulos) DESC) AS sijaluku, nimi,
MAX(tulos) AS paras_tulos
FROM Pelaajat p
JOIN Tulokset t ON p.id = pelaaja_id
GROUP BY nimi
ORDER BY paras_tulos DESC, p.nimi;
my ears ๐ญ
i didn't realise today was so active
I'm gonna have to go to bed now
@latent sonnet ๐
๐
my first time setting up project structure with Django
A suit full of honeybees.
but luckily i have gpt to hold my hand
Bee'n'Bee.
@vital vapor ๐

No problem
Waterproof reading.
Oo. Fireproof reading.
Bulletproof reading.
Fauxne. Not a real phone. Occasionally rings randomly to fuck with you.
@rugged root Terahertz ratchet in graphene 2D metamaterial formed by a patterned gate with an antidot arrayd
We report the observation of the terahertz-induced ratchet effect in graphene-based two-dimensional (2D) metamaterials. The metamaterial consists of a graphite gate patterned with an array of triangular antidots placed under a graphene monolayer. We show that the ratchet current appears due to the noncentrosymmetry of the periodic structure unit...
thats interesting
a ratchet that runs on terahertz speeds
When you hit 30 it should be prohibited for you to drink sugar based drinks.
By the law I mean haha
law of which country?
I'm joking
Ah, you mean this law should exist.
Yeah, kinda. ๐
I just noticed that I'm reading first edition of the Python Crash Course book. Should I swtich to the latest one?
Most of it will be the same
Might just add some other bells and whistles. But anything talking about 3.5 and higher should be fine
async stuff will be different
Ah yeah, I'm around ~$43k yearly
I've noticed for example there's no mentioning about "f string" feature in the first edition.
Yep, that was added in 3.6
Have that committed to memory because it's one of my all time favorite features
Yeah, it looks great.
string text ${expression} string text
But with wrapping back ticks
!stream 664667836605661217
โ @upper basin can now stream until <t:1707320674:f>.
it gets bit depressing when i get stuck on same error for a long time, but new error every now and then is fun
cool flex .. i'm < $9k yearly
@upper basin Co-worker is here, so I'll mostly be typing now
And anyone else, please feel free to interject if I'm getting any of this stuff wrong regarding how this project should be done
If you import it, you can read it
You need that layer of separation
Yeah, you'd need that API layer to keep things separate
That's your intermediary and what keeps users from reading what's on the server side
no error is even more fun
If you can import it into your Python code, you can do all kinds of things to read the files. FastAPI is fairly simple to get up and running
The API layer is the easy part, it's the wrapper that'll take you more time
Thank you so much for the stream permission and guidance Hemlock!
You're an angel sir.
Yep yep
QHACK
Quack
Actually there is one, iQuHACK. It's actually a joke on ducks hehe.
Classic
I think it's just load and eval
as a beginer, do you guys think i should use pycharm or vscode or don't matter? thank you
vscode
Personally saying that.
I recommend this tutorial if you already know programming in another language
https://docs.python.org/3.10/tutorial/
@pale sigil
6.0002 is the continuation of 6.0001 Introduction to Computer Science and Programming in Python and is intended for students with little or no programming experience. It aims to provide students with an understanding of the role computation can play in sol...
That's the best advice you'll ever get on classes. UML diagrams are OP.
JSON is (in most cases) just a dictionary
And Python even has a built-in lib for converting one to the other and vice versa
!d json
Source code: Lib/json/__init__.py
JSON (JavaScript Object Notation), specified by RFC 7159 (which obsoletes RFC 4627) and by ECMA-404, is a lightweight data interchange format inspired by JavaScript object literal syntax (although it is not a strict subset of JavaScript [1] ).
Warning
Be cautious when parsing JSON data from untrusted sources. A malicious JSON string may cause the decoder to consume considerable CPU and memory resources. Limiting the size of data to be parsed is recommended.
json exposes an API familiar to users of the standard library marshal and pickle modules.
Encoding basic Python object hierarchies:
Pydantic and FastAPI should also do those conversions
[
{
"id": "Parent1",
"childList": [
{
"id": "child1",
"type": "Parent2",
"parent": null
},
{
"id": "child2",
"type": "Parent3",
"parent": null
}
]
},
{
"id": "Parent2",
"childList": [
{
"id": "child3",
"type": "Parent1",
"parent": null
},
{
"id": "child4",
"type": "Parent3",
"parent": null
}
]
},
{
"id": "Parent3",
"childList": [
{
"id": "child5",
"type": "Parent1",
"parent": null
},
{
"id": "child6",
"type": "Parent2",
"parent": null
}
]
}
]
the json file i want to mutate
class Program
{
// Main Method
static public void Main(String[] args)
{
Stack<string> set = new();
List<ParentModel> resLst = LoadJson().ToList();
List<ParentModel> resLst2 = LoadJson().ToList();
foreach(ParentModel res in resLst)
{
set.Push(res.Id);
testRecFxn(res, resLst2, set);
set.Pop();
}
}
public static IList<ParentModel> LoadJson()
{
using (StreamReader r = new StreamReader("C:/Users/HP/Desktop/resJSON.json"))
{
string json = r.ReadToEnd();
List<ParentModel> items = JsonConvert.DeserializeObject<List<ParentModel>>(json);
return items;
}
}
public static void testRecFxn(ParentModel parentComponent, List<ParentModel> lst, Stack<string> set)
{
var chkRecursion = "";
foreach(var chldComponet in parentComponent.childList)
{
var tst = lst.Where(e => chldComponet.type == e.Id).FirstOrDefault();
if (set.Count > 0)
{
chkRecursion = set.Where(e=> e==tst.Id).FirstOrDefault();
}
if(tst != null && (chkRecursion ==null|| chkRecursion == ""))
{
set.Push(tst.Id);
testRecFxn(tst, lst, set);
set.Pop();
chldComponet.comp = tst;
}
else
{
continue;
}
}
}
}
Use the hastebin if it's that large
It gets kind of spammy otherwise
Honestly kind of surprised that the bot didn't flag it since it's so many new lines
hi hemlock
WE MAY SOON SWITCH TO A NEW CHANNEL SOON B/C OF A DISABLED ADSENSE ACCOUNT!!!!!
PLEASE FOLLOW ON TWITTER:
https://twitter.com/code_pointers
OR
GET FREE PYTHON QUESTIONS BY EMAIL:
https://code-pointers.beehiiv.com/subscribe
SO WE CAN ALERT YOU WHEN WE START THE NEW CHANNEL.
THANK YOU!!
Code Pointers Bootcamp is...
Back in a sec
!stream 1115110120444133376
โ @echo garden can now stream until <t:1707326020:f>.
Miscommunication + Accounting Software = God damn it
@peak depot Yo
Yep, co-worker back here and all that
Jesus the echo
Yes'm
Kind of like that
"A resting bitch face" is a term used colloquially to describe a facial expression that may unintentionally convey anger, annoyance, or contempt while the person's face is at rest or in a neutral expression. It typically involves a slight frown, narrowed eyes, or other features that might give off a negative impression, even though the person may not actually be feeling those emotions. It's important to note that this term is subjective and can be considered offensive by some, as it perpetuates stereotypes about women's facial expressions.
Just looking annoyed when you're not really expressing
Word
Mildly surprised
"Oh good, this shit again"
lol
All good
"That's right, I'm cool"
That's the vibe I get
Miscalculated a fart
Looks contemplative
Why not both
bkue steel
bruh
How's it hanging
low low
God damn it, to the sites that have a dark theme main website but a light theme docs page
I'm displeased by you
Looking at you emmet.io
just use the emmet lsp never mind there is no help file with that
https://emmet.io/download/ Whoo! Sublime is the first download for some reason
Which I think means it's one they directly support
maybe i should give you my docs i made for emmet.. just a cheatsheet
pastebin wants a sign up?
No no
Their cheatsheet is also in dark theme
Just the docs proper
It's weird
I have what I need it was more just a confusion thing
darkreader or wear sunglasses ๐
AAAAAA MY EYES
So. Much. Boilerplate.
Catalan ( KAT-ษ-lษn, -โ lan or KAT-ษ-LAN; autonym: catalร , Eastern Catalan: [kษtษหla]), known in the Valencian Community and Carche as Valencian (autonym: valenciร ), is a Western Romance language. It is the official language of Andorra, and an official language of two autonomous communities in eastern Spain: Catalonia and the Balearic Islands. I...
gotta love the local markets
!pip uwuipy
I want to find an excuse to use this in prod
LDoc is a LuaDoc-compatible documentation generator which can also process C extension source. Markdown may be optionally used to render comments, as well as integrated readme documentation and pre...
<p style="text-align: center;">Text here</p>
markdown lets you down
Markdown lets you down, but at least you don't have XML/HTML/JSX/TSX pinkie
?.. html is the best option there is.. powerful flexible easy
Howโs it going
I'll take markdown because you aren't being flashbanged by something that looks horrifyingly similar to XML.
spoken like someone who's weak in html
HTML is terrible, why we're still relying something that hacky is beyond my understanding.
It looks like XML. It's 2024, not 2004, come on. Get with the times.
I wrote my first bot this week
1800 lines
I still donโt know what a function is
"looks like X".. "use newer things because times are new" .. both don't seem like mature enough reasons
The most dangerous phrase in our language is "This is the way we do things"
It is the obstacle to progress.
sql is 40 years old.. still better than "new" solutions
Using something because it's what people use is the reason corporations are still stuck on Java 8.
It's the reason we still use an internal combustion engine to get around.
corporations are stuck on java 8 because management doesn't want to spend the money to upgrade
some solutions like sql and "everything is a file" are still the best ones around.. not everything needs a wheel reinvention
SQL is slow, use Redis instead.
This isn't a reinvention of the wheel, this is changing the tires because the current ones are bald
all caches are fast compared to disk io .. why not compare apples and oranges
I'm not comparing apples to oranges, you're deliberately misinterpreting what I say.
One would thing after 30 years of that from everyone I meet I'd be used to it, but nooooooo
HTML resembles XML. It is a pain to write. The fact that we don't have anything better after literal decades is a collective failure as a species to innovate.
Then again, that's also a problem with the so-called "new" programming langauges. There hasn't been a new language for decades because we just keep rehashing everything we have.
i don't think html resembles xml sufficiently enough to call it that .. it is a vast improvement over it
Okay I will give you that, but we stagnated since then.
Similar to natural selection, come to think of it.
Which is why our eyes don't work when they're dry.
"It's good enough" is another dangerous phrase.
natural selection works by elimination.. and by that arg so would all new solutions
so we're going to see hit n miss attempts all the time
Natural selection improves on something until it reaches minimum viability, and then it never gets touched again.
Never underestimate a temporary solution's tendency to become the permanent solution.
See also the entire Massachusetts Department of Transportation.
Or the very existence of the inconvenience store DMV
"Hey, it barely works, so let's just set it as the status quo and shut down anyone who dares question it."
Code quality? That gets in the way of the "velocity". Test coverage? "We can always do that later." Documentation? "We don't have time for that." Fixing security holes? "Not until we are forced to by the regulators."
You can see how that attitude can become the norm?
You say reinventing the wheel. I say trying to improve on what we have so that in the future we'll have better.
that's the american vs german dev env .. one prioritizes getting to market fast. other prioritizes well developed software
Hang on, let me check which flags are on the moon...
It's a tragedy that there's really only a couple different ones.
Mind you, there shouldn't be any flags because no one country should ever have a claim to it, but....
what good is a flag on the moon if you have homeless dying in the streets?
Good question. Let me know when you guys fix that so we can have yet another thing to be used by the Murdochs to polarize us.
I have a solution, and the city I live in is implementing that solution, but it won't work unless everyone implements it.
Continuous economic growth at any costs, of course, prevents that from happening.
that just means it is not scalable
Every single town meeting. "What can we do about the unhoused?" "How about building more houses?" "But then the value on my house will drop."
The problem with any economic issue always has been and always will be the fact that humans are selfish and fearful.
And nothing terrifies a person more than the unknown.
Be it sharks, thunder, people with a different skin color, the disabled, neurodiversity, a differing opinion, etc.
value of house will drop seems like a worthy enough tradeoff
Oh I am hoping for a housing market crash, since according to CNBC the biggest mistake I made was being born too late to take advantage of the low housing prices in 2008.
When I was still under age of majority.
$1.2 million for a single room living space underground just because in that particular location you don't have to be a slave to the automotive industry to get eggs, bread, and milk.
But now I'm getting distracted from my work, so I'll be signing off.
hei
building a chatbot
at this hour i cant really speak much since everyone is sleeping.
does a Arduino have a precision oscillator output , software controlled ?
i like new errors
i like no errors
what can i say, i take what i get
its late so i cannot speak, im in chat
!d random.choices
random.choices(population, weights=None, *, cum_weights=None, k=1)```
Return a *k* sized list of elements chosen from the *population* with replacement. If the *population* is empty, raises [`IndexError`](https://docs.python.org/3/library/exceptions.html#IndexError).
If a *weights* sequence is specified, selections are made according to the relative weights. Alternatively, if a *cum\_weights* sequence is given, the selections are made according to the cumulative weights (perhaps computed using [`itertools.accumulate()`](https://docs.python.org/3/library/itertools.html#itertools.accumulate)). For example, the relative weights `[10, 5, 30, 5]` are equivalent to the cumulative weights `[10, 15, 45, 50]`. Internally, the relative weights are converted to cumulative weights before making selections, so supplying the cumulative weights saves work.
@jolly terrace
@gentle fern ๐
can't talk ๐ฆ
yup need to send more messages ๐
I was coding a calculator and struggling with some error handling ๐
The problem is I only want user input as integer, the program crashes if they enter a letter or multiple ones
def intro():
print("PCC - Python CLI Calculator")
print("GPL v3.0\n")
print("Operators: + - * / %\n")
intro()
def user_input():
input_1 = str(input())
operator = str(input())
input_2 = str(input())
if operator == "+":
result = int(input_1) + int(input_2)
print(result)
elif operator == "-":
result = int(input_1) - int(input_2)
print(result)
elif operator == "*":
result = int(input_1) * int(input_2)
print(result)
elif operator == "/":
result = int(input_1) / int(input_2)
print(result)
elif operator == "%":
result = int(input_1) % int(input_2)
print(result)
# exception and error handling
elif operator != "+" or "-" or "*" or "/" or "%":
print("\nInvalid operator.")
else:
print("Invalid inputs.\n")
user_input()
# an input function that prevents the program from instantly exiting
input("\nPress enter to exit")
in case something else happens xD
I'm guessing the same @steady sigil
!or-gotcha
When checking if something is equal to one thing or another, you might think that this is possible:
# Incorrect...
if favorite_fruit == 'grapefruit' or 'lemon':
print("That's a weird favorite fruit to have.")
While this makes sense in English, it may not behave the way you would expect. In Python, you should have complete instructions on both sides of the logical operator.
So, if you want to check if something is equal to one thing or another, there are two common ways:
# Like this...
if favorite_fruit == 'grapefruit' or favorite_fruit == 'lemon':
print("That's a weird favorite fruit to have.")
# ...or like this.
if favorite_fruit in ('grapefruit', 'lemon'):
print("That's a weird favorite fruit to have.")
!d while
8.2. The while statement
The while statement is used for repeated execution as long as an expression is true:
while_stmt ::= "while" assignment_expression ":" suite
["else" ":" suite]
``` This repeatedly tests the expression and, if it is true, executes the first suite; if the expression is false (which may be the first time it is tested) the suite of the `else` clause, if present, is executed and the loop terminates.
A [`break`](https://docs.python.org/3/reference/simple_stmts.html#break) statement executed in the first suite terminates the loop without executing the `else` clauseโs suite. A [`continue`](https://docs.python.org/3/reference/simple_stmts.html#continue) statement executed in the first suite skips the rest of the suite and goes back to testing the expression.
!d try
8.4. The try statement
The try statement specifies exception handlers and/or cleanup code for a group of statements...
@hybrid fjord ๐
๐ @somber heath
@viral granite ๐
hello
While there are negative implications for the advancement of ai such as job displacement, there are also great applications in the sciences
I went to a panel on AI ethics recently and they were talking about exactly this
the same example
There was a spear phishing scam recently that implemented ai voices for phone calls recently
a bad actor called a coworker of mine's sister telling her that my coworker was injured and dying.
then urged the sister for money
while using voice ai
Especially since companies are collecting so much data
flow is chatting
phishing attacks are so much easier if people can get access to user data
a grown man gets scammed. who's fault is that?
skill issue?
im not defening anybody
but come on guys
its like you chose 1234 as your password
No it isn't like that
yeah its more stupid then that ๐
agree to disagree?
its interesting to talk about these problems
how did you get neovim to be recognized by discord?
cus you can learn what not to do
sure
can you write custom sdk for anything
i don't know how to do that yet
you dont need discord to recognize the app
im using neocord plugin. but if you want to write a SDK for your own applications you can do that as well
https://github.com/IogaMaster/neocord/
nope just install this
thank you
haha just went to discord.com/developers/
to figure out how to create an sdk and found out my email hasn't been verified on this account for a few years now
lol
whats happning ?
@azure pagoda ๐
*Args and **Kwargs in Python
!e ```py
def func(a, b, c):
print(a)
print(b)
print(c)
func(1, 2, 3)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 1
002 | 2
003 | 3
!e ```py
def func(*arg):
print(arg)
func()
func(1)
func(1, 2)
func(1, 2, 3)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | ()
002 | (1,)
003 | (1, 2)
004 | (1, 2, 3)
!e ```py
def func(a, b, c, *args):
print(a)
print(b)
print(c)
print(args)
func(1, 2, 3, 4, 5, 6)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 1
002 | 2
003 | 3
004 | (4, 5, 6)
!e ```py
def func(a, b, c):
print(a)
print(b)
print(c)
func(a = 1, c = 3, b = 2)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 1
002 | 2
003 | 3
!e ```py
def func(a, b, c, **kwargs):
print(a, b, c)
print(kwargs)
func(1, 2, 3, apple = 4, pear = 5, banana = 6)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 1 2 3
002 | {'apple': 4, 'pear': 5, 'banana': 6}
!e ```py
def func(value=10):
print(value)
func()
func(20)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 10
002 | 20
!e ```py
def func(*, value):
print(value)
func(123)```
@somber heath :x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 4, in <module>
003 | func(123)
004 | TypeError: func() takes 0 positional arguments but 1 was given
!e ```py
def func(*, value):
print(value)
func(value = 123)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
123
def f(pos1, pos2, /, pos_or_kwd, *, kwd1, kwd2):
----------- ---------- ----------
| | |
| Positional or keyword |
| - Keyword only
-- Positional only```
@frigid bolt๐
!e ```py
def func(a, b, c):
print(a, b, c)
func(*'abc')```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
a b c
!e py a, b, = [1, 2] print(a) print(b)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 1
002 | 2
func('a', 'b', 'c')
func(*'abc')
func(*['a', 'b', 'c'])```
!e ```py
def func(a, b, c):
print(a, b, c)
dictionary = {'a': 1, 'b': 2, 'c': 3}
func(**dictionary)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
1 2 3
!e py print(tuple(i for i in range(3)))
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
(0, 1, 2)
!e ```py
def gen():
for i in range(5):
yield i
g = gen()
print(g)
for each in g:
print(each)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | <generator object gen at 0x7f4285264ac0>
002 | 0
003 | 1
004 | 2
005 | 3
006 | 4
!e ```py
def gen():
for i in range(5):
print(f'Yielding {i}')
yield i
g = gen()
next(g)
print('Hello!')
next(g)
print('Hello again!')
for each in g:
print(each)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | Yielding 0
002 | Hello!
003 | Yielding 1
004 | Hello again!
005 | Yielding 2
006 | 2
007 | Yielding 3
008 | 3
009 | Yielding 4
010 | 4
!e py def gen(): while True: yield value g = gen() value = 'apple' print(next(g)) value = 'pear' print(next(g))
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | apple
002 | pear
!e ```py
def func():
print(v)
v = 0
func()
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
0
!e ```py
def func():
v = 1
print(v)
v = 0
func()
print(v)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 1
002 | 0
!e ```py
def func():
global v
v = 1
v = 0
func()
print(v)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
1
!e ```py
def outer():
def inner():
print(v)
v = 1
inner()
v = 0
outer()```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
1
!e ```py
def outer():
def inner():
nonlocal v
v = 1
v = 0
inner()
print(v)
outer()```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
1
LEGB rule.
!e ```py
def outer():
def inner():
max = 'local'
print(max)
max = 'enclosing / nonlocal'
inner()
max = 'global'
outer()```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
local
!e ```py
def outer():
def inner():
# max = 'local'
print(max)
max = 'enclosing / nonlocal'
inner()
max = 'global'
outer()```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
enclosing / nonlocal
!e ```py
def outer():
def inner():
# max = 'local'
print(max)
# max = 'enclosing / nonlocal'
inner()
max = 'global'
outer()```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
global
!e ```py
def outer():
def inner():
# max = 'local'
print(max)
# max = 'enclosing / nonlocal'
inner()
max = 'global'
outer()```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
<built-in function max>
I use IDLE.
It's Python's native IDE.
It's kind of shit, but it's okay.
I'd like it better if it had a terminal that was compatible with ANSI control codes.
Learned *args, **kwargs, yeild, next, scope, LEGB rule. Thanks @somber heath
bye for now
morning people
I'll be back after preparing for bed
!pip connexion
@ripe cipher ๐
hi MysticalOpal!
!e
code
!eval [python_version] <code, ...>
Can also use: e
Run Python code and get the results.
This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.
If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.
Currently only 3.12 version is supported.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!
@dire thicket ๐
Somewhat.
!stream 1115110120444133376
โ @echo garden can now stream until <t:1707402875:f>.
@misty spire ๐
Hey mist
Trundle 72.22% 18 games Malphite 0.00% 1 game Garen 100.00% 1 game Data acquired in 4.06 seconds.
pog
Trundle fan
Yes
Shout out to the Microsoft Teams dev team for removing the single most useful feature: saved messages.
web3
-me to chat GPT: "can you rattle off as much computer jargon is a way that is as unintelligible as possible?"
Response: "Initiating a blockchain-powered, decentralized, distributed ledger technology (DLT) framework leveraging quantum-resistant cryptographic hash functions to secure a peer-to-peer hyperledger ecosystem, underpinned by a consensus algorithm oscillating between Proof of Work (PoW) and Proof of Stake (PoS), ensuring a Byzantine fault tolerance. Concurrently, deploying containerized microservices orchestrated via Kubernetes on a virtualized cloud infrastructure with auto-scaling capabilities, adhering to an infrastructure as code (IaC) paradigm through Terraform scripts to ensure immutable deployments across a multi-cloud environment, including AWS, Azure, and GCP, optimizing for edge computing nodes to reduce latency in IoT ecosystems.
Embarking on an agile DevOps journey, incorporating continuous integration and continuous deployment (CI/CD) pipelines using Jenkins and GitLab CI, facilitating blue-green deployments and canary releases to maintain zero downtime and A/B testing scenarios. Implementing RESTful APIs and GraphQL for seamless data interchange, encapsulating business logic in serverless functions executed within ephemeral FaaS environments, leveraging cold start optimization techniques.
Advancing towards AI-driven predictive analytics, employing convolutional neural networks (CNNs) and recurrent neural networks (RNNs) for deep learning tasks within a TensorFlow and PyTorch framework, applying transfer learning and GANs for augmented data generation, ensuring GDPR compliance through differential privacy measures and federated learning models for data sovereignty."
more techno-bable: "Optimizing database throughput via sharding and replication strategies across NoSQL databases like MongoDB and Cassandra, while ensuring ACID compliance and eventual consistency in distributed SQL databases like CockroachDB. Harnessing big data processing power through Apache Hadoop ecosystems, utilizing Spark for in-memory data processing and Kafka for real-time data streaming, implementing ELK Stack (Elasticsearch, Logstash, Kibana) for log analytics and observability.
Incorporating cybersecurity best practices, deploying WAFs, and leveraging OAuth 2.0 and OpenID Connect for secure authentication, employing advanced threat intelligence platforms to preempt zero-day exploits, and ensuring data-at-rest and data-in-transit encryption through AES-256 and TLS 1.3 protocols, complemented by quantum key distribution (QKD) readiness for post-quantum cryptography era."
and in conclusion, buy my SAS services.
that database part is pretty good
@stark river as ChatGPT writes its story the interests grows stronger
and it forgot gRPC and sockets along with RESTful APIs for data exchange
@stark river yeah but we all already know that, this was just jargon
Surely combining gRPR with RESTful decentralized auto scaling in a Kubernetes paradigm will increase agility amoung DevOps and Rouge saving throws.
if i want to git squash all the commits, git rebase -i will do right? no need for HEAD~xx ?
@obsidian dragon https://www.hulu.com/series/720ef5c1-fc77-4924-98c5-491455a06895
@rugged root the vudoo doll response can be worked into a script
Co-worker here, limited speaking
And it's good so far, 'bout you?
I kind of like how we do the jams here where we assign teams
Oh right right. You and yer fancy edumication
Oh right right
@fallen heron Hello, you're really quiet
I wasn't
His mic was genuinely quiet
Nah, that's how I talk
I typically try to type the way I talk
So that people have to hear my stupid voice in their head
Daww
!rule 4
4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.
Makes it hard to moderate what I can't understand
ACE is echoing
Might have put his headset down
Oh bless your heart
HA
I can't afford a headset
Just two cups and a string
Yep
@molten pewter What's new in your neck of the woods?
nothing much
organizing my office and getting ready for taxes.
working on learning d3
trying to recover a hard drive...
general maintenance.
techno magicalgirl
Javascript
3 deep
D3.js? you're making a viz software?
correct
Yeah, stacking them?
wizbang viz
@eggs.setter
@pydantic.whatever
Yep
Yep yep
It just wraps the function then wraps that function into another one
In fact if you want the decorator to accept arguments, then THAT decorator function has 3 layers of function inside of it
i was thinking of making a dashboard viz software last year โค๏ธ
D3.js is a bit rough to handle
Decorators are cool, just a bit funky
Well yeah
Same with anything
In the operator library?
there was this one more lib that had cleaner apis.. let me recall
@near smelt
So when you have to do super().__init__(), that's calling the parent class. So if we had...
argh.. if only i had starred the repo
def __init__(self, a, b, c):
super().__init__(a, b)
c = c
class Person:
def __init__(self, name):
self.name = name
class Student(Person):
def __init__(self, name, favorite_class):
super().__init__(name)
self.favorite_class = favorite_class

