#voice-chat-text-0

1 messages Β· Page 78 of 1

glad sandal
#

@stuck furnace Is it possible to get screen share permissions?

#

I am installing linux in a vm rn

stuck furnace
#

Sure, although I need to go in like 10 minutes.

#

!stream 689087720018280478

wise cargoBOT
#

βœ… @glad sandal can now stream until <t:1676132228:f>.

glad sandal
#

:D

stuck furnace
#

Btw, once you start streaming you can keep going after the permissions have ended, as long as you don't close the stream.

hoary olive
#

show me some aliens πŸ‘½

#

lmao

vocal basin
glad sandal
hoary olive
vocal basin
stuck furnace
#

My ears are burning πŸ‘€

hoary olive
#

"insults"

#

@midnight agate here is the full list of the convo

sharp urchin
#

well for that we need to have a look

#

and then judge accordingly

#

isnt it?

#

i agree

#

i see no "insult"

#

i guess

hoary olive
#

your argument was

#

mine wasnt

sharp urchin
#

i mean i agree tht we are uncertain if aliens exist or not

hoary olive
#

if you find an insult then ban me.

#

but if you don't gets the opposite effect

#

bc your are accusing me of insulting you for some reason....

sharp urchin
#

where are the "insults" in text?

#

:{

vocal basin
#

@glad sandal
what time control?

hoary olive
#

idk

#

3+2 blitz is fun

uncut meteor
#

i keep uttering your name

stuck furnace
#

Maro is just wide

hoary olive
#

rap and phonk are nice

#

thats statically typed languages

#

not even rust specific

#

"Patterns"?

#

thats very vague

glad sandal
whole bear
#

Rate my ai art

hoary olive
#

i'd think that about AF tbf

glad sandal
#

very good cut

hoary olive
#

drippy capy bara

vocal basin
glad sandal
uncut meteor
#

more capybara please clappyclap

hoary olive
#

i'd say something but i fear you getting offended

whole bear
glad sandal
hoary olive
vocal basin
uncut meteor
#

coconut doggie

whole bear
glad sandal
glad sandal
stuck furnace
#

.capybarafact

maiden finch
#

"brb", "u", disgusting. Dima posted* that.

whole bear
maiden finch
#

You better know if you are posting it.

whole bear
#

What am i post?

hoary olive
#

ggs bro

#

man i messed up

#

on that pon

whole bear
#

confuse

vocal basin
hoary olive
#

i completely forgot you could get it

hoary olive
#

man that was a stupid endgame lol

#

3+0 sucks

whole bear
#

I can confirm memes lose brain.

hoary olive
#

3+2 βœ…

sharp urchin
#

i agree

glad sandal
hoary olive
#

CapyBara was a very smol meme

sharp urchin
#

hows a capybara funny

hoary olive
#

it didnt get popular

sharp urchin
#

its so lame

hoary olive
whole bear
#

embed fail

hoary olive
#

OK i pull up to the after party song

sharp urchin
#

and a braindead thing to find funny

sharp urchin
#

but still

hoary olive
#

its like ohio

#

Swag like ohio

sharp urchin
#

have you seen the humor lately

whole bear
sharp urchin
#

its so broken

glad sandal
sharp urchin
#

ppl's humor is so broken

#

yeh

hoary olive
#

na you guys just dont have good memes

sharp urchin
#

random person screaming

glad sandal
#

capybara

hoary olive
#

i have non-english memes that are great

sharp urchin
#

and ppl laughing

glad sandal
sharp urchin
#

memes are funny?

hoary olive
#

capybara is soo old

hoary olive
sharp urchin
#

capybara meme so called is old

#

indeed

sharp urchin
#

dark humor

#

so called

hoary olive
#

yo you know these bars that are supposed to stop people from sleeping on the rounds and stuff. i saw a meme , there was someone sitting on it..... very dark

sharp urchin
#

ppl would argue on it too

sharp urchin
#

"dark humor" maybe is what its called for a reason

#

memes are and can be offensive

sharp urchin
#

and in tdys time

hoary olive
#

i have dark humor some times

sharp urchin
#

memes are offensive

hoary olive
#

i know you have sometimes heard some dark things from me lol

sharp urchin
hoary olive
#

there was this angry bird 911 meme

sharp urchin
#

πŸ’€ .

hoary olive
#

such a stupid thing

sharp urchin
#

well dark humor

#

itis

#

i like it

hoary olive
#

BLACK?

#

it sometimes is not bad

sharp urchin
#

i like dark humor

#

ones

hoary olive
#

its a conversation starter at times

sharp urchin
#

they make sense at least

#

than random animal pics

#

lmao

#

saw it 2312489423 years back

#

:{}

whole bear
#

ai art

maiden finch
hoary olive
#

i would have lost that anyways

#

but you wouldnt have a good position

vocal basin
#

bullet forever

uncut meteor
#

!stream @glad sandal

wise cargoBOT
#

βœ… @glad sandal can now stream until <t:1676134552:f>.

hoary olive
#

i couldve won like this

whole bear
hoary olive
#

20 bullets πŸ’€

terse needle
#

@glad sandal try # usermod -a -G wheel rootcaty

hoary olive
whole bear
#

i put in "rise of gru"

#

and it gave that

hoary olive
#

this is a wierdo minion

#

i would've liked to see some bananas , blue bananas like on the mountain or smth

vocal basin
#

tor experience

whole bear
hoary olive
vocal basin
hoary olive
vocal basin
whole bear
#

Just made this ai art

hoary olive
#

alireza is good player

#

on a previous account::

  • 634 rapid 51% win 6% draw rate
  • 855 bullet 56% win 9% draw
#

i used to play a lot more bullet it seems

whole bear
#

Elon Musk

hoary olive
#

2b2t by far best minecraft server

#

the insane builds people had there

#

this dude had built the milky way on 2b2t

sharp urchin
#

waking at 10?

#

would get belted in here for waking up at 10

#

@vocal basin umm i am ready to shift to another vc for a smoll talk if you are

#

ohh nvmm

wise oxide
#

hum

#

hum

#

i se

formal ember
#

noone's up??

#

hey

#

nginx

crisp raven
formal ember
#

@vocal basin

#

πŸ‘‹

vocal basin
#

wait, what again do you use for persistence?

#

@verbal zenith
what durability requirements do you have?

#

i.e. how much do you avoid data loss?

#

are you okay with losing data?

#

so, SQLite is a simple-ish version

#

won't lose data

#

!d sqlite3

wise cargoBOT
#

Source code: Lib/sqlite3/

SQLite is a C library that provides a lightweight disk-based database that doesn’t require a separate server process and allows accessing the database using a nonstandard variant of the SQL query language. Some applications can use SQLite for internal data storage. It’s also possible to prototype an application using SQLite and then port the code to a larger database such as PostgreSQL or Oracle.

The sqlite3 module was written by Gerhard HΓ€ring. It provides an SQL interface compliant with the DB-API 2.0 specification described by PEP 249, and requires SQLite 3.7.15 or newer.

This document includes four main sections:

vocal basin
#

built-in

#

the library itself is included

#

to make pickle work correctly, you'd effective have to write serialisation anyway

#

just connect to it

#

it will make the file

formal ember
#

db = SQLAlchemy(app)

class blogpost(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    title = db.Column(db.String(50))
    subtitle = db.Column(db.String(50))
    author = db.Column(db.String(20))
    date_posted = db.Column(db.DateTime)
    content = db.Column(db.Text)```
vocal basin
#

there isn't much query complexity

#

if you just need to store config, you don't need sqlalchemy

#

in its inner structure it's a dictionary

#

it's not faster than dict for retrieving a single item
but it is more efficient for retrieving narrow ranges of values

#

all values between 0 and 1000, for example

#

dict isn't sorted

#

sqlite probably doesn't use a hash table

formal ember
#

@vocal basin any idea about nginx

vocal basin
vocal basin
# formal ember <@264054779888533515> any idea about nginx

I'm currently using httpd instead of it, but will be switching over eventually
from what I've seen, nginx has better performance and simpler configureability at the cost module integrations that httpd has had developed for it over the years

formal ember
#

ok , im getting 502 error

#

config file ```upstream backend {
server 192.168.120.13:5000;
server 192.168.120.6:5000;
}

This server accepts all traffic to port 80 and passes it to the upstream.

server {
listen 80;
listen [::]:80;

  location / {
      proxy_pass http://backend;
 }

}```

#

i can curl and ping to backend server but cant make nginx work.

vocal basin
formal ember
#

is httpd good for just proxy and loadbalancing?

vocal basin
formal ember
vocal basin
formal ember
#

no, i guess

#

backend works good.

#
{
  "message": "Hello world! Example setting is: foobar"
}```
vocal basin
#

is it reachable via "backend" hostname?

#

(from the nginx)

formal ember
#

yes

#
{
  "message": "Hello world! Example setting is: foobar"
}```
#

this from the server where nginx is.

vocal basin
#

and 192.168.120.13?

vocal basin
formal ember
#

yes

vocal basin
formal ember
#

yeap

vocal basin
formal ember
#

no

vocal basin
#

did you restart it or reload it after changing the config?

formal ember
#

yes, i'm on this for past 2 days.πŸ˜‚

vocal basin
#

what's the behaviour when there's no proxy_pass http://backend; line?

#

just a 404?

formal ember
#

didnt try

#

wait

formal ember
crisp raven
verbal zenith
#
from sqlalchemy import create_engine
from sqlalchemy import Column, String, Integer, Boolean
from sqlalchemy.orm import declarative_base
from sqlalchemy.orm import sessionmaker

engine = create_engine('sqlite:///test.db', echo=True)
base = declarative_base()


class Replacement(base):
    __tablename__ = 'replacements'
    id = Column(Integer, primary_key=True)
    replaced = Column(String)
    replacement = Column(String)

    def __init__(self, replaced: str, replacement: str):
        self.replaced = replaced
        self.replacement = replacement

    def __repr__(self):
        return f"Replacement: '{self.replaced}' -> '{self.replacement}'"


class Namespace(base):
    __tablename__ = 'namespaces'
    id = Column(Integer, primary_key=True)
    name = Column(String)
    primary = Column(Boolean)

    def __init__(self, name: str, primary: bool):
        self.name = name
        self.primary = primary

    def __repr__(self):
        return f"Namespace: '{self.name}' (primary: {self.primary})"


base.metadata.create_all(engine)
session = sessionmaker(bind=engine)()
verbal zenith
vocal basin
#

ohhh... they renamed themselves

#

now I understand

verbal zenith
vocal basin
#

they're that racist person that Opal responded to one other day

teal flower
#

anyone know how to use pygames ?

vocal basin
teal flower
#

We are both Australians, and I did not say anything

vocal basin
#

it doesn't excuse anything
you don't understand it? grow up

teal flower
#

Why would I say something like that?

#

I’ve already reported him to the moderators

#

@somber heath you are a creepy old man who is rude races, and makes people feel uncomfortable

somber heath
#

I've asked you to stop contacting me.

amber raptor
somber heath
#

@formal ember Python indices begin at zero. 😁

sharp urchin
#

:{}

sharp urchin
vocal basin
#

@sharp urchin
I think Opal can help with the whole "where to start learning python" too

sharp urchin
#

aight i may sound dumb..then while talking

#

pardon tht in advance

somber heath
formal ember
somber heath
#

As in 'come on up to vc0'

formal ember
#

oh

#

XD

whole bear
#

@somber heath Maybe download docs locally? i do that myself.

#

yeah, agree on that. though I use HTML

vocal basin
#

there are things described in the tutorial
those can be considered basics, I guess

#

so, quite unstructured, sounds like?

vocal basin
sharp urchin
#

lol

whole bear
#

I wonder, are there any prepared problems online for @sharp urchin to do @somber heath ? Things like read-to-use data sets, given problems to solve and find out using the data set, etc.

vocal basin
#

break/continue/loop-else is, arguably, also questionable

vocal basin
#

well, file management is one of the easiest from that tutorial to fail

sharp urchin
#

file handling = file management

vocal basin
formal ember
#

bye everyone.πŸ‘‹ πŸ‘‹

vocal basin
sharp urchin
vocal basin
#

!d typing.ContextManager

wise cargoBOT
#

class typing.ContextManager(Generic[T_co])```
A generic version of [`contextlib.AbstractContextManager`](https://docs.python.org/3/library/contextlib.html#contextlib.AbstractContextManager "contextlib.AbstractContextManager").

New in version 3.5.4.

New in version 3.6.0.

Deprecated since version 3.9: [`contextlib.AbstractContextManager`](https://docs.python.org/3/library/contextlib.html#contextlib.AbstractContextManager "contextlib.AbstractContextManager") now supports subscripting (`[]`). See [**PEP 585**](https://peps.python.org/pep-0585/) and [Generic Alias Type](https://docs.python.org/3/library/stdtypes.html#types-genericalias).
whole bear
sharp urchin
#

YU i couldnt find any topic related to file handling in there

#

but i am pretty sure, that i have learned it as well

#

well but i am still confused tbh on what to do next?

#

should i stick to leetcode and learn other things? related to data sci?

vocal basin
sharp urchin
#

@vocal basin to further simplify my question , i wanna say that i have 2 major concerns at the moment

#

1)What should i do now? should i stick to solving leetcode by learning new libraries or languages?

#

2)how do i make my logic building better and stronger(at least in case of python)?

#

if you can address them this

whole bear
#

1)solve dataset issues? go see if you can get your hands on some CSV files and problem descriptions. Stuff like "find out what pattern the people listed here follow"
2)leetcode, and just doing project of your own.

vocal basin
#
  1. solve problems leetcode and other sites --> this helps with algorithms problem solving in general
  2. take free university courses on data science if you have access to such --> this helps with theory and knowing how to use libraries
  3. just write software --> this helps with architecture and being interested in software development
    3.0) write software you want to write
    3.1) maybe to optimise routine tasks
    3.2) maybe write chat bots
    3.3) maybe make websites
sharp urchin
#

:{

#

but i dont even know how to start

#

and how to write

#

software!!!?

vocal basin
whole bear
vocal basin
#

"Euclid wrote software and he didn't even have a computer"

whole bear
#

populations, maybe what the actual demographic for a game is by parsing some list of registered players, SOMETHING

whole bear
#

go get your hands dirty with data

whole bear
#

parse it, sort it, analyze it, learn to visualize it with modules like tkinter and matplotlib

vocal basin
sharp urchin
vocal basin
#

when we were learning csv in school, we had to deal with garbage like extra newlines mid-row

somber heath
sharp urchin
whole bear
#

go find a dataset, and analyze it

sharp urchin
whole bear
#

HOW you do it isn't too important, but do it

vocal basin
#

I have a playlist which has quite a lot of good lectures on software engineering, but it's mixed in with other stuff
(I can make a cleaner version of the playlist)

sharp urchin
#

:}

#

but as for the time being i am pretty clear of what to do

whole bear
#

look, learning X module won't magically make you a super programmer, and focusing on learning X then Y then Z modules will just make you forget what you learned over time.

You want to do data science. Go get some CSV files or XLSX files to parse through. The hardest part will be finding ready-to-use data sets that are intentionally dirty and have problem descriptions you can solve. Alternatively, you need to find one yourself to analyze.

vocal basin
#

"without C"

#

one more LP reference

sharp urchin
#

i still have to learn it

#

data sets and stuff is not something i have faced yet...

#

but i am clear now....will return to yall once i am done with the tasks given

vocal basin
sharp urchin
#

i thank you all for the time and advice yall gave :} @somber heath @verbal zenith @vocal basin @whole bear

verbal zenith
#

πŸ˜„

vocal basin
#

"if you ban people in one place, when will they commit it next?"

whole bear
#

np, wish I could have given you some data sets myself, but i ain't got any

sharp urchin
whole bear
#

ask your University to give you some if they have any

vocal basin
#

"I'm in an infinite loop"

whole bear
#

they ought to have something lying around, I would be surprised if they didn't

sharp urchin
#

still high school

whole bear
#

way ahead of me then, I'm a full grown adult

sharp urchin
#

hmm

#

i just started my programming journey 2-3months back

#

i was earlier an ex med student

#

but then i never had interest in med so i finally thought to change it

somber heath
#

@rancid slateπŸ‘‹

rancid slate
#

I cant hear anything u all talk now becuz im on a trip for studying

#

So loyd

#

Loud

whole bear
#

I hope Microsoft NEVER buys discord, I hate their ecosystem (excluding VS Code).

whole bear
#

not using it atm, fortunately

somber heath
#

@whole bear πŸ‘‹

whole bear
#

gtg to bed, it's like 5am, take care

vocal basin
#

the actual thing in settings that's important is two/three auto-adjustments

#

those all should probably be off

#

I've filtered the playlist; but it's unsorted and on the wrong account

verbal zenith
#
{key: self[key] for key in self}
vocal basin
#

dict(self)?

#

it may

#

(does it call the __items__?) something else

#

!d dict

wise cargoBOT
#

class dict(**kwargs)``````py

class dict(mapping, **kwargs)``````py

class dict(iterable, **kwargs)```
Return a new dictionary initialized from an optional positional argument and a possibly empty set of keyword arguments.

Dictionaries can be created by several means:

β€’ Use a comma-separated list of `key: value` pairs within braces: `{'jack': 4098, 'sjoerd': 4127}` or `{4098: 'jack', 4127: 'sjoerd'}`

β€’ Use a dict comprehension: `{}`, `{x: x ** 2 for x in range(10)}`

β€’ Use the type constructor: `dict()`, `dict([('foo', 100), ('bar', 200)])`, `dict(foo=100, bar=200)`
verbal zenith
#
class Configs(dict):
    def __init__(self, default_path: str):
        self.use_custom_directory = False
        self._custom_directory_path = ""
        self._directory_path = None
        self._default_path = default_path
        self._namespace = None
        self.copy_ores = {
            "copper": (5, 2),
            "lapis": (9, 4),
            "redstone": (5, 4),
            "nether_gold": (6, 2)
        }
        super().__init__()

    @property
    def custom_directory_path(self):
        if self.use_custom_directory and self.custom_directory_path:
            return self._custom_directory_path
        else:
            return self._directory_path

    def set_custom_directory_path(self, path: str):
        self._custom_directory_path = path

    @property
    def namespace(self):
        if self._namespace:
            return self._namespace
        else:
            return "minecraft"

    def save(self, _engine):
        _session = sessionmaker(bind=_engine)()
        for key in self:
            _session.add(Config(key, self.__getattribute__(key)))
        _session.commit()

    def load(self, _engine):
        _session = sessionmaker(bind=_engine)()
        for config in _session.query(Config).all():
            self.__setattr__(config.key, config.value)
#

Config.this = that

vocal basin
#

I would pass all as values to __init__ in a classmethod-factory deserialise and have a serialise method
it's more strict
but I understand why it may not always be appropriate

sharp urchin
#

hows the education we got till senior secondary school of any use to what we learn now and apply?

#

isnt it?

#

dont you guys feel the same?

vocal basin
verbal zenith
#
    def __repr__(self):
        return self.__dict__.__repr__()
vocal basin
#
@decorator
... something:
    ...
... something:
    ...
something = decorator(something)
sharp urchin
#

!e ```def greet(fx):
def mfx(*args, **kwargs):
print("Good Morning")
fx(*args, **kwargs)
print("Thanks for using this function")
return mfx

@greet
def hello():
print("Hello world")

@greet
def add(a, b):
print(a+b)

greet(hello)()

hello()

greet(add)(1, 2)

add(1, 2)```

wise cargoBOT
#

@sharp urchin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Good Morning
002 | Hello world
003 | Thanks for using this function
004 | Good Morning
005 | 3
006 | Thanks for using this function
vocal basin
civic zephyr
#
def parent(num):
    def first_child():
        return "Hi, I am Emma"

    def second_child():
        return "Call me Liam"

    if num == 1:
        return first_child
    else:
        return second_child ```
vocal basin
#

__repr__ is almost always only for debug, yes

civic zephyr
somber heath
#

!e ```py
class MyClass:
def init(self):
self.a = 1
self.b = 2
self.c = 3

mc = MyClass()
print(mc.dict)```

vocal basin
#

although you'd expect it to output Config({}) or something

civic zephyr
#

but it seems similar to oop's attributes

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

{'a': 1, 'b': 2, 'c': 3}
vocal basin
#

it is a dict and without __slots__ you access it each time you do .

vocal basin
sharp urchin
#

:{}

vocal basin
#

!e

class MyClass:
    __slots__ = ('a', 'b', 'c')

    def __init__(self):
        self.a = 1
        self.b = 2
        self.c = 3

mc = MyClass()
print(mc.__dict__)
wise cargoBOT
#

@vocal basin :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 10, in <module>
003 | AttributeError: 'MyClass' object has no attribute '__dict__'. Did you mean: '__dir__'?
civic zephyr
#
class Random:

  hello = 'hi'


import Random

greet = hello + bye```
sharp urchin
#

whats the problem?

#

be more specific please

#

@civic zephyr

vocal basin
#

also, your class isn't static

#

so wouldn't make sense

sharp urchin
#

yes you can

vocal basin
vocal basin
#

however

#

python's meaning of import is different to that of C#'s using

sharp urchin
#
    #Static/class variable
    __counter = 1

    #Instance variables
    def __init__(self): #This is a constructor
        self.__pin = ""
#

this is an example of a famous static var in python

#

though

vocal basin
sharp urchin
#

you use it under class

#

m sorry lemme modify it

vocal basin
sharp urchin
#

chk now

#

brb

somber heath
#

!e ```py
class Text:
a = 1
b = 2

print(Text.a)
print(Text.b)```

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 1
002 | 2
vocal basin
#

iirc, instances of type always have __dict__

#

I wonder if there's a way to break it

#

🐝

somber heath
#

!e ```py
class A:
bee = 123

class B:
bee = 456

print(A.bee)
print(B.bee)```

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 123
002 | 456
civic zephyr
#

import A

#

bee

somber heath
#
#mymodule.py
class B:
    pizza = 456```
```py
#main.py
import mymodule

class A:
    pizza = 123

print(A.pizza)
print(mymodule.B.pizza)```
#
123
456```
#
#mymodule.py
class B:
    pizza = 456```
```py
#main
from mymodule import B

class A:
    pizza = 123

print(A.pizza)
print(B.pizza)```
#
123
456```
civic zephyr
#
from mymodule import *```
vocal basin
#

there is from ... import * to import everything but, in most cases, you shouldn't use it

somber heath
#

!if-name-main

wise cargoBOT
#

if __name__ == '__main__'

This is a statement that is only true if the module (your source code) it appears in is being run directly, as opposed to being imported into another module. When you run your module, the __name__ special variable is automatically set to the string '__main__'. Conversely, when you import that same module into a different one, and run that, __name__ is instead set to the filename of your module minus the .py extension.

Example

# foo.py

print('spam')

if __name__ == '__main__':
    print('eggs')

If you run the above module foo.py directly, both 'spam'and 'eggs' will be printed. Now consider this next example:

# bar.py

import foo

If you run this module named bar.py, it will execute the code in foo.py. First it will print 'spam', and then the if statement will fail, because __name__ will now be the string 'foo'.

Why would I do this?

β€’ Your module is a library, but also has a special case where it can be run directly
β€’ Your module is a library and you want to safeguard it against people running it directly (like what pip does)
β€’ Your module is the main program, but has unit tests and the testing framework works by importing your module, and you want to avoid having your main code run during the test

vocal basin
#
  1. write code in such a way that it doesn't break if someone used import *
  2. don't use import *
#

there's __all__ to designate what's exported by the module

#

MyClass.__dict__['method'].__get__(...)

sharp urchin
#

same as far as ik

vocal basin
#

there are objects defined in C

#

they are called built-in or something

#

they are different

#

it's not user defined vs python provided

sharp urchin
#

yes

vocal basin
#

it's defined in python vs defined in C

sharp urchin
#

yes

vocal basin
#

syntax is an object too to some extent

verbal zenith
#
        match type(value):
            case z if z==str:
                return Config(key, value)
            case int:
                return IntConfig(key, value)
            case float:
                return FloatConfig(key, value)
            case bool:
                return BoolConfig(key, value)
vocal basin
wise cargoBOT
#
ast

Source code: Lib/ast.py

The ast module helps Python applications to process trees of the Python abstract syntax grammar. The abstract syntax itself might change with each Python release; this module helps to find out programmatically what the current grammar looks like.

An abstract syntax tree can be generated by passing ast.PyCF_ONLY_AST as a flag to the compile() built-in function, or using the parse() helper provided in this module. The result will be a tree of objects whose classes all inherit from ast.AST. An abstract syntax tree can be compiled into a Python code object using the built-in compile() function.

vocal basin
#

not call

#

it's like

#

match it as if it's a some result of calling int()

#

oh wait

somber heath
#

!e ```py
class MyClass:
def foo(self):
pass

my_instance = MyClass()
print(type(MyClass.foo))
print(type(my_instance.foo))```

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | <class 'function'>
002 | <class 'method'>
vocal basin
#

int isn't a keyword

verbal zenith
#

int

vocal basin
#

!d keyword

wise cargoBOT
verbal zenith
#

!e

x = 1
print(type(x)==int)
vocal basin
#

!e

import keyword
print(keyword.iskeyword('int'))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

False
verbal zenith
#

!e

x = 1
print(type(x) is int)
wise cargoBOT
#

@verbal zenith :white_check_mark: Your 3.11 eval job has completed with return code 0.

True
vocal basin
#
match 1:
    case int():
        ...
    case 1:
        ...
    case _:
        ...
vocal basin
verbal zenith
#

!e

x = 1
print(type(x) is int)
wise cargoBOT
#

@verbal zenith :white_check_mark: Your 3.11 eval job has completed with return code 0.

True
verbal zenith
#

That's cool, I still need it's true type though

vocal basin
verbal zenith
#

so calling type with it will do just that afaik

vocal basin
#

!e

import keyword
print(keyword.iskeyword('int'))
print(keyword.iskeyword('type'))
print(keyword.iskeyword('print'))  # True in python 2
print(keyword.iskeyword('is'))
print(keyword.iskeyword('class'))  # this is why libraries have to use class_
print(keyword.iskeyword('match'), keyword.issoftkeyword('match'))  # not enforced; see: re module
print(keyword.iskeyword('case'), keyword.issoftkeyword('case'))  # not enforced; common, like match
print(keyword.iskeyword('async'), keyword.iskeyword('await'))  # enforced since around 3.5~3.6, I guess?
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | False
002 | False
003 | False
004 | True
005 | True
006 | False True
007 | False True
008 | True True
vocal basin
#

I found the "dunder" in the docs

somber heath
#

!e py import keyword kw = 'True', 'False', 'None' for k in kw: print(k, keyword.iskeyword(k))

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | True True
002 | False True
003 | None True
vocal basin
#

!e

import keyword
print(keyword.softkwlist)
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

['_', 'case', 'match']
vocal basin
#

_

somber heath
#

Wut?

vocal basin
#

in match

vocal basin
#

keyword.softkwlist was ['async', 'await']

#

!e

match 5:
  case _:
    print(_)
wise cargoBOT
#

@vocal basin :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 3, in <module>
003 | NameError: name '_' is not defined
vocal basin
#

!e

match 5:
  case __:
    print(__)
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

5
vocal basin
#

C# since around 7~8 has _ as a keyword

#

3.10

#

3.11 added speed

#

this is one of the things I've waited for quite a long time

#

this one allows variadic now

#

SomeType[*SomeTypeTuple]

somber heath
#

@whole bear πŸ‘‹

whole bear
#

hey

#

havent been active enough to talk yet sadly

#

yup

#

yeah got to talk more

#

have a question bit idk how to ask it without showing u

#

cause i cant steam

somber heath
#

!code

wise cargoBOT
#

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.

somber heath
#

!paste

wise cargoBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

whole bear
#

its pretty simple

#

one sec

vocal basin
#

I've recently realised a thing I might be missing in Rust to convince me to write it more
a type system way of denoting that the instance of a type can't be implicitly dropped

vocal basin
whole bear
#

new to this btw
these are the instructions:
Download ZIP here and extract the ZIP
Install requirements.txt by typing pip install -r requirements.txt in Command Prompt
Run the run.bat file and enter the amount of threads

when i type "pip install -r requirements.txt" into the command prompt it just gives me an error

#

idk if thats enough info

vocal basin
#

what error?

whole bear
#

SyntaxError: invalid syntax

pip install -r requirements.txt
File "<stdin>", line 1
pip install -r requirements.txt
^^^^^^^

vocal basin
whole bear
#

where would i find that, i appologize im very new

vocal basin
#

open the directory that you have requirements.txt in
select the address bar; clear it; type "cmd"; press enter

whole bear
#

im checking if that was the problem

#

makes sense, where outside of python

#

im on windows

vocal basin
whole bear
#

k

vocal basin
whole bear
#

im not sure should i reinstall

#

ok

#

yes

#

web

#

where is the option for repair install again

#

uninstalling

#

about to reinstall, just checking "Latest Python 3 Release - Python 3.11.2" is correct?

#

aha

#

that box i assume

#

just making sure, this is fine

#

worked, will keep updated

somber heath
whole bear
#

thanks man

sharp urchin
#

is tht the same case with me as well? @somber heath

#

i believe tht i do not have a good mic as well

#

yeh

#

ohk...my fnrds say so

#

tht i have a lil bit of interference

vocal basin
#

I have the mic/discord configured for scream/growl recording lol

sharp urchin
#

i wanna scream too!

#

but sir hemlock says no:[

somber heath
#

@whole bear πŸ‘‹

sharp urchin
#

i do not like to hear anyone on 100%

#

i usually set ppl at 50% or so

#

i hate parties in general

vocal basin
sharp urchin
#

i havent heard your voice YU

#

you speak ?

whole bear
#

back smh

vocal basin
#

why does it need proxies?

whole bear
#

follower bot

#

ip get rate limited

vocal basin
#

so...

#

!rule 5

wise cargoBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.

whole bear
#

sorry man

vocal basin
#

type anything, and it's a valid html

somber heath
vocal basin
#

Django, FastAPI

somber heath
#

@flint torrent πŸ‘‹

vocal basin
#

"and it is still a joke"

#

Flask's simplicity doesn't work for it always

#

and the same for WSGI in general

#

FastAPI is in some sense superior due to it being built with async in mind

#

and with its dependency injection capabilities

#

if I wasn't writing tiny apps for which the only viable choice is aiohttp, I'd probably use FastAPI

#

its docs are great

somber heath
#

@twilit ridge πŸ‘‹

twilit ridge
#

hi

#

i guess Im not verified to speak πŸ—Ώ

#

i did

#

I need to send 50 messages

vocal basin
#

if you compare benchmarks, it;s
Flask <<< Django <<< FastAPI

twilit ridge
#

links are more dangerous than voice chat

vocal basin
twilit ridge
#

lol

#

what are you guys working on

vocal basin
#

(quart being the async flask)

twilit ridge
#

thats fine lol

#

nice

#

I recently have been learning image processing with numpy

vocal basin
#

I'm not saying flask is faster than django

#

the quart is, not flask

twilit ridge
#

So Im trying to make a script that can detect walls, windows, and floors from a 2d image

#

Like from a floor plan

#

Ou I see what you mean

#

Thats actually really interesting

#

The wonders of AI

somber heath
#

❀️ Check out Weights & Biases and sign up for a free demo here: https://www.wandb.com/papers
❀️ Their mentioned post is available here: https://app.wandb.ai/sweep/nerf/reports/NeRF-–-Representing-Scenes-as-Neural-Radiance-Fields-for-View-Synthesis--Vmlldzo3ODIzMA

πŸ“ The paper "NeRF in the Wild - Neural Radiance Fields for Unconstrained ...

β–Ά Play video
twilit ridge
#

This is a cool channel

#

Those models are really going to change the world and jobs forever

#

My friend Jeremy cried until he blacked out when he saw chatgpt producing code when he was just starting his computer science degree

#

β€œControversial thought detected”

covert hedge
#

I am in class 11th and want to learn computer science but don't know how to start . Any suggestions?

cedar solar
#

@covert hedge make something you already like but by urself

twilit ridge
#

ve must estavlish a collavoration in zis fragmented vorld

vocal basin
covert hedge
vocal basin
covert hedge
twilit ridge
#

I accept you

#

Well lets think

#

What industry can AI not get into as fast

#

or will be the last industry that AI will automate

#

maybe getting into AI is the answer

worldly roost
#

hiiii

twilit ridge
#

but not under the state

#

But in the private sector

cedar solar
#

geneology

#

and writiing legal documents

twilit ridge
#

thats it im gonna stop programming and start a steampower mill for job security

#

Imagine having a system of capitalism and removing the basic right to boycott which makes capitalism ethical

vocal basin
# covert hedge Only courses and problem solving I don't know what software to build

so, I'd say, if you don't know what software to build, that may hold you back from progressing in software engineering
look around for what software you might create and might want to create
look at what others people do, try to find where you can or want to improve on their work
watch talks about programming, they may inspire you/educate you on what software can be made

doing this in addition to courses and problem solving, I think, may be helpful

sharp urchin
#

great person once said:- you wanna know who is ruling you

#

see the person whom you are not able to criticize

twilit ridge
#

^

covert hedge
sharp urchin
#

i feel people have become too soft nowadays!!

twilit ridge
#

I hate shrimp on the bobby 😑

sharp urchin
#

dont you all feel the same?

vocal basin
#

goes to Australia
screams "kill emus"
gets silent nods in return

twilit ridge
#

Make a software out of that

covert hedge
#

I can just use print function for that

vocal basin
covert hedge
#

That is a software?

twilit ridge
#

how do I when do I and if I before that time and then now

#

jeffrey is an emu name

vocal basin
vocal basin
twilit ridge
#

gary😑

vocal basin
covert hedge
#

Just one question that should I pursue software developer journey as my only interest is coding?

twilit ridge
#

sometimes I

vocal basin
civic zephyr
#
def my_decorator(func):
    def wrapper():
        print("Something is happening before the function is called.")
        func()
        print("Something is happening after the function is called.")
    return wrapper

def say_whee():
    print("Whee!")

say_whee = my_decorator(say_whee)```
#

Can you guess what happens when you call say_whee()?

#

I thought outcome would be print('Whee!')

somber heath
#

!e ```py
def dec(func):
def f():
print('a')
func()
print('c')
return f

@dec
def func():
print('b')

func()```

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | a
002 | b
003 | c
vocal basin
#

ports on a computer are opened by default, if there's no firewall

civic zephyr
#

!e

wise cargoBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <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.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside of them.

By default your code is run on Python's 3.11 beta release, to assist with testing. If you run into issues related to this Python version, you can request the bot to use Python 3.10 by specifying the python_version arg and setting it to 3.10.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

somber heath
#
def func():
    print(b)

func = dec(func)
func()```
vocal basin
#

@twilit ridge use edwards curve instead

#

Ed25519

#

Edwards curves are equivalent to elliptic curves but have simpler maths

#

equivalent as in isomorphic

civic zephyr
#

!e```py
def my_decorator(func):
def wrapper():
print("Something is happening before the function is called.")
func()
print("Something is happening after the function is called.")
return wrapper

def say_whee():
print("Whee!")

say_whee = my_decorator(say_whee)```

vocal basin
civic zephyr
#

!e```py
def my_decorator(func):
def wrapper():
print("Something is happening before the function is called.")
func()
print("Something is happening after the function is called.")
return wrapper

def say_whee():

print("Whee!")

say_whee = my_decorator(say_whee)```

wise cargoBOT
#

@civic zephyr :warning: Your 3.11 eval job has completed with return code 0.

[No output]
civic zephyr
#

!e```py
def my_decorator(func):
def wrapper():
print("Something is happening before the function is called.")
func()
print("Something is happening after the function is called.")
return wrapper

def say_whee():
print("Whee!")

say_whee = my_decorator(say_whee)
say_whee()```

wise cargoBOT
#

@civic zephyr :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Something is happening before the function is called.
002 | Whee!
003 | Something is happening after the function is called.
vocal basin
somber heath
#

!e```py
def my_decorator(func):
def wrapper():
print("Something is happening before the function is called.")
func()
print("Something is happening after the function is called.")
return wrapper

@my_decorator
def say_whee():
print("Whee!")

say_whee()```

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Something is happening before the function is called.
002 | Whee!
003 | Something is happening after the function is called.
vocal basin
#
def my_decorator(func):
    @functools.wraps(func)
    def wrapper():
        print("Something is happening before the function is called.")
        func()
        print("Something is happening after the function is called.")
    return wrapper
#

a decorator to make decorators

#

!d functools.wraps

wise cargoBOT
#

@functools.wraps(wrapped, assigned=WRAPPER_ASSIGNMENTS, updated=WRAPPER_UPDATES)```
This is a convenience function for invoking [`update_wrapper()`](https://docs.python.org/3/library/functools.html#functools.update_wrapper "functools.update_wrapper") as a function decorator when defining a wrapper function. It is equivalent to `partial(update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated)`. For example...
vocal basin
#

anagram of incursion

#

why are there just random double letters

civic zephyr
#

say_whee = my_decorator(say_whee)
say_whee()

vocal basin
#
def my_decorator(func):
    def wrapper():
        print("Something is happening before the function is called.")
        func()
        print("Something is happening after the function is called.")
    return wrapper
@my_decorator
def say_whee():
    print("Whee!")
say_whee = my_decorator(
    def say_whee():
        print("Whee!")
)
say_whee = (
    def wrapper():
        print("Something is happening before the function is called.")
        (
            def say_whee():
                print("Whee!")
)()
        print("Something is happening after the function is called.")
)
say_whee = (
    def wrapper():
        print("Something is happening before the function is called.")
        print("Whee!")
        print("Something is happening after the function is called.")
)
#

this is an actual important question for class decorators

#

because, for example, sqlalchemy's decorator typing is broken

#

with the decorator syntax,
the global namespace ever has only one say_whee

vocal basin
lavish rover
#

!e

@__import__("contextlib").contextmanager
def foo(s):
    yield print("hi", s)
    print("bye", s)
with foo("slick"): print("sup")
wise cargoBOT
#

@lavish rover :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | hi slick
002 | sup
003 | bye slick
vocal basin
#

oh, wait, can it do (yield, None)?

verbal zenith
#

!e

from __future__ import braces
wise cargoBOT
#

@verbal zenith :x: Your 3.11 eval job has completed with return code 1.

001 |   File "<string>", line 1
002 | SyntaxError: not a chance
lavish rover
#

don't know, not exactly trying to ultra golf

#

but yield is a statement so don't think so

#

tuples only consist of expressions

vocal basin
#

!e

def foo(s):
    (yield print("hi", s), print("bye", s))
def foo(s):
    yield print("hi", s); print("bye", s)
wise cargoBOT
#

@vocal basin :warning: Your 3.11 eval job has completed with return code 0.

[No output]
vocal basin
lavish rover
#

oh wait really?

#

cool

vocal basin
#

a = yield

#

like with coroutines in Lua

#

!d next

wise cargoBOT
#

next(iterator)``````py

next(iterator, default)```
Retrieve the next item from the [iterator](https://docs.python.org/3/glossary.html#term-iterator) by calling its [`__next__()`](https://docs.python.org/3/library/stdtypes.html#iterator.__next__ "iterator.__next__") method. If *default* is given, it is returned if the iterator is exhausted, otherwise [`StopIteration`](https://docs.python.org/3/library/exceptions.html#StopIteration "StopIteration") is raised.
vocal basin
#

next doesn't have it

lavish rover
#

unionized

verbal zenith
lavish rover
#

what am i looking at

verbal zenith
#

my stupid sqlite stuff

lavish rover
#

ive sqlite once in my life 6 years ago idk what any of this means

verbal zenith
#

I'm saving config data in a weird way that lets me be lazy

#

Configs.save and configs.load

lavish rover
#

i am simple man i just use json/yml files

civic zephyr
#

def my_decorator(func):
2 def wrapper():
3 print("Something is happening before the function is called.")
4 func()
5 print("Something is happening after the function is called.")
6 return wrapper
7
8 def say_whee() print("Whee!")
say_whee = my_decorator(say_whee)
say_whee()

#
def my_decorator(func):
    def wrapper():
        print("Something is happening before the function is called.")
        func()
        print("Something is happening after the function is called.")
    return wrapper

def say_whee():
    print("Whee!")

say_whee = my_decorator(say_whee)
say_whee()```
lavish rover
#
x = 5
x = ...
print(x)
vocal basin
#

my_decorator refers to an old function by func (local)
say_whee() refers to a new function by say_whee (global)

sharp urchin
#

i guess Yu has a bttr explaination

vocal basin
#

func gets stored in the my_decorator context (closure)

sharp urchin
#

its more abt global and local vars

lavish rover
#

!e

def foo(func): return 5

@foo
def bar(): pass

print(bar)
wise cargoBOT
#

@lavish rover :white_check_mark: Your 3.11 eval job has completed with return code 0.

5
sharp urchin
#

thats not a decorator

somber heath
#

@prime spindle πŸ‘‹

vocal basin
civic zephyr
#

!e ```py
def my_decorator(func):
def wrapper():
print("Something is happening before the function is called.")
print("Something is happening after the function is called.")
return wrapper

def say_whee():
print("Whee!")

say_whee = my_decorator(say_whee)
say_whee()```

wise cargoBOT
#

@civic zephyr :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Something is happening before the function is called.
002 | Something is happening after the function is called.
lavish rover
#

!e

def foo(func): return lambda: 5

@foo
def bar(): pass

print(bar())
wise cargoBOT
#

@lavish rover :white_check_mark: Your 3.11 eval job has completed with return code 0.

5
sharp urchin
#

OOP is used when the code needs to interact with different(multiple users) at a time @civic zephyr

#

and to store different values

vocal basin
#

wha

somber heath
#

!e ```py
def decorator(_):
return 5

@decorator
def func():
print("Hello, world.")

print(func)```

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

5
lavish rover
#
@foo
def bar(...): pass


def bar(...): pass
bar = foo(bar)
sharp urchin
#

!e ```def greet(fx):
def mfx(*args, **kwargs):
print("Good Morning")
fx(*args, **kwargs)
print("Thanks for using this function")
return mfx

@greet
def hello():
print("Hello world")

@greet
def add(a, b):
print(a+b)

greet(hello)()

hello()

greet(add)(1, 2)

add(1, 2)```

wise cargoBOT
#

@sharp urchin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Good Morning
002 | Hello world
003 | Thanks for using this function
004 | Good Morning
005 | 3
006 | Thanks for using this function
civic zephyr
#

!e ```def foo(func): return 5

@foo
def bar(): pass

print(bar)

wise cargoBOT
#

@civic zephyr :warning: Your 3.11 eval job has completed with return code 0.

[No output]
vocal basin
#

!e

class C(int):
    def __call__(self): self.five()
def five(func):
    c = C(5); c.five = func; return c
@five
def hello(): print('hi')
print(hello)
hello()
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 5
002 | hi
vocal basin
civic zephyr
#
def foo(func): return 5
@foo
def bar(): pass

print(bar)```
vocal basin
verbal zenith
#

!e

def decorator(funct):
  def inner(text):
    print(text)
    funct()
  return inner

@decorator("Hello world!")
def say_whee()
  print("whee!")

say_whee()
#

!e

def decorator(funct):
  def inner(text):
    def printer()
      print(text)
    funct()
  return inner

@decorator("Hello world!")
def say_whee():
  print("whee!")

say_whee()
wise cargoBOT
#

@verbal zenith :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 7, in <module>
003 | TypeError: decorator() missing 1 required positional argument: 'text'
lavish rover
#

!e

def decorator(text):
  def dec(funct):
    def inner():
      print(text)
      funct()
    return dec
  return inner

@decorator("Hello world!")
def say_whee():
  print("whee!")

say_whee()
vocal basin
#

decorator, wrapper, wrap

wise cargoBOT
#

@lavish rover :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 9, in <module>
003 |   File "<string>", line 7, in decorator
004 | NameError: name 'inner' is not defined. Did you mean: 'iter'?
verbal zenith
#

!e

def decorator(funct):
  def inner(text):
    def printer():
      print(text)
    funct()
  return inner

@decorator("Hello world!")
def say_whee():
  print("whee!")

say_whee()
wise cargoBOT
#

@verbal zenith :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 8, in <module>
003 |   File "<string>", line 5, in inner
004 | TypeError: 'str' object is not callable
lavish rover
#

!e

def decorator(text):
  def dec(funct):
    def inner():
      print(text)
      funct()
    return inner
  return dec

@decorator("Hello world!")
def say_whee():
  print("whee!")

say_whee()
wise cargoBOT
#

@lavish rover :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Hello world!
002 | whee!
verbal zenith
#

!e

def decorator(text):
  def inner(funct):
    def printer():
      print(text)
      funct()
    return printer
  return inner

@decorator("Hello world!")
def say_whee():
  print("whee!")

say_whee()
lavish rover
#
@decorator("Hello world!")
def say_whee(): ...


def say_whee(): ...
say_whee = decorator("Hello world!")(say_whee)
wise cargoBOT
#

@verbal zenith :white_check_mark: Your 3.10 eval job has completed with return code 0.

001 | Hello world!
002 | whee!
civic zephyr
#

!e ```py
def decorator(text):
def dec(funct):
def inner():
print(text)
funct()
return inner
return dec

@decorator("Hello world!")
def say_whee():
print("whee!")

say_whee()```

wise cargoBOT
#

@civic zephyr :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Hello world!
002 | whee!
vocal basin
#

I just realised I'm not sure which part is a decorator exactly

def decorator_factory(...):  # can be called a decorator
  def wrapper(func):  # can be called a decorator
    @functools.wraps(func)
    def wrap(...):  # not a decorator
      ...
    return wrap
  return wrapper
@decorator_factory(...)  # this line has a decorator
def global_func(...):
  ...
civic zephyr
#

def decorator(text):
def dec(funct):
def inner():
print(text)
funct()
return inner
return dec

@decorator("Hello world!")
def say_whee():
print("whee!")

say_whee()

verbal zenith
#
def plus_one(x):
  return x+1

x = 1
x = plus_one(x)
print(x)
lavish rover
#

for me decorate is just the syntax sugar

#

everything else is emergent behaviour

vocal basin
#

but I've seen the something part called decorator too

@something()
civic zephyr
#

!e ```py
def decorator(text):
def dec(funct):
def inner():
print(text)
funct()
return inner
return dec

@decorator("Hello world!")
def say_whee():
print("whee!")

say_whee()```

wise cargoBOT
#

@civic zephyr :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Hello world!
002 | whee!
civic zephyr
lavish rover
somber heath
#

!e ```py
def greetify(cls):
class C(cls):
def init(self, *args, **kwargs):
super().init(*args, **kwargs)
print("Hello, world.")
return C

@greetify
class MyClass:
pass

foo = MyClass()```

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

Hello, world.
lavish rover
#

it can be a call, whatever

#

otherwise it's just higher order function fuckery

vocal basin
#

@ syntax is decorator syntax
if @ is used for wrapping functions/classes, then there's at least one decorator involved

lavish rover
#

you can use the "decorating function" without the actual @... syntax, so would that then not be a decorator? why should what I function is change based on something external to the function?

vocal basin
#

I also remember there being some weird limitations on the syntax

lavish rover
vocal basin
#

yes

lavish rover
#

you couldn't do @a.b before

vocal basin
lavish rover
#

yeah you lost me with those terms

#

anyway, I'm out

#

see ya

civic zephyr
somber heath
vocal basin
#

I've been making simulations of waves in JS
but I've lost the code

#

although I didn't introduce any mechanisms to reduce waves that are too small so it was bad somewhat

somber heath
vocal basin
#

I remembered this thingy I was making when tried to understand opencl

#

(frame from a dynamic changing pattern)

#

2GB gif

verbal zenith
vocal basin
#

oh, wow, this actually works

#

there's also, like, different types of random to use with it

#

normal with .8 scale

vocal basin
#

with shuffle at some iterations

#

.01% shuffle at larger scale

#

it starts to look weirdish

soft needle
#

i have to go now, it was fun listening in

vocal basin
#

@somber heath this might be an interesting variation of the algorithm

somber heath
#

I'm watching.

vocal basin
#

also, different mappings from source space to colours

#

now there's a challenge to remove the artefacts

somber heath
verbal zenith
somber heath
#

!d map

wise cargoBOT
#
map

map(function, iterable, *iterables)```
Return an iterator that applies *function* to every item of *iterable*, yielding the results. If additional *iterables* arguments are passed, *function* must take that many arguments and is applied to the items from all iterables in parallel. With multiple iterables, the iterator stops when the shortest iterable is exhausted. For cases where the function inputs are already arranged into argument tuples, see [`itertools.starmap()`](https://docs.python.org/3/library/itertools.html#itertools.starmap "itertools.starmap").
somber heath
#

!d itertools.zip_longest

wise cargoBOT
#

itertools.zip_longest(*iterables, fillvalue=None)```
Make an iterator that aggregates elements from each of the iterables. If the iterables are of uneven length, missing values are filled-in with *fillvalue*. Iteration continues until the longest iterable is exhausted. Roughly equivalent to:
somber heath
#

!e py letters = 'abc' numbers = '123' characters = '!@#' for a, b, c in zip(letters, numbers, characters): print(a, b, c)

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | a 1 !
002 | b 2 @
003 | c 3 #
somber heath
#

!e py import itertools letters = 'abc' numbers = '12345' for a, b in itertools.zip_longest(letters, numbers, fillvalue="!"): print(a, b)

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | a 1
002 | b 2
003 | c 3
004 | ! 4
005 | ! 5
vocal basin
#

I guess, the errors can filtered out by stopping the process after a certain iteration

#

(didn't try yet)

vocal basin
#

same bias but less severe

vocal basin
#

square-ish

somber heath
#

@sinful spear πŸ‘‹

sinful spear
#

@somber heathhey

vocal basin
vocal basin
#

trying to make it smoother

vocal basin
vocal basin
somber heath
#

@buoyant cradle Hi hi, I'd come back, but I'm giving my ears a rest from my headphones.

buoyant cradle
#

oh okay.

somber heath
#

Actually, I could do speakers.

vocal basin
somber heath
#

Rainbow croissant.

vocal basin
somber heath
#

@wind solar πŸ‘‹

vocal basin
somber heath
#

It's reminding me of cell culture slides or something. Or like view into cells.

#

Amoebas.

vocal basin
#

offset to one direction

#

those arcs in the top right are more or less what I'm trying to achieve

somber heath
#

Those are some harsh knittings.

chrome pewter
#

I recently updated python and there is some error with numpy

def visualizer(self):
        try:
            wf_data = self.stream.read(self.CHUNK)
            wf_data = struct.unpack(str(2 * self.CHUNK) + 'B', wf_data)
            wf_data = np.array(wf_data, dtype='b')[::2] + 128
            self.set_plotdata(name = "waveform", data_x=self.x, data_y=wf_data,)
        except:
            pass
DeprecationWarning: NumPy will stop allowing 
conversion of out-of-bound Python integers to integer arrays.  The conversion of 211 to int8 will fail in the future.
For the old behavior, usually:
    np.array(value).astype(dtype)`
will give the desired result (the cast overflows).
  wf_data = np.array(wf_data, dtype='b')[::2] + 128
#

@somber heath do you know how to fix it??

#

basically the thing is working

#

but printing this error

vocal basin
#

wf_data seems to be out of bounds of dtype='b'

#

does it error/warn with dtype=np.uint8?

wise cargoBOT
#

Hey @chrome pewter!

You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.

vocal basin
chrome pewter
#

here's the code

chrome pewter
#

B is working

#

thanks

#

but printing this
result2:
[]
automatically

vocal basin
somber heath
vocal basin
#
colour = np.zeros(3)
angle = np.random.uniform(-np.pi, np.pi)
delta = 0
def mutate():
    global colour, angle, delta
    colour += np.random.normal(0, .0002, size=3)
    colour = colour.clip(0, 1)
    delta += np.random.normal(0, .0001)
    delta = np.clip(delta, -.02, .02)
    angle += delta * .01
#

angle represents the direction it attempts to move towards

#

delta represents the derivative of the angle

#

haven't

somber heath
#

Fordite, also known as Detroit agate or Motor City agate, is old automotive paint which has hardened sufficiently to be cut and polished. It was formed from the buildup of layers of enamel paint slag on tracks and skids on which cars were hand spray-painted (a now automated process), which have been baked numerous times. In recent times the mate...

vocal basin
somber heath
#

@surreal grotto πŸ‘‹

surreal grotto
#

πŸ‘

#

Some mic issues

#

HelloπŸ‘‹

vocal basin
wise cargoBOT
#

Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

vocal basin
#

it's not so hard to understand why noise appears, but I really don't know how to deal with it properly
it is correlated with how smooth the result is

#

I lowered the amount by which it changes the angle, and now it separates into segments like this

#

this reminds of the game If Found

#

it walks over individual pixels

#

the noise happens when two fragments happen to go around a small segment

vocal basin
#

that code had a bug

#

I missed /4

#

no

#

well...

#

the noise is expected to be there

#

like, I understand why it happens, I just can't explain it

vocal basin
somber heath
#

@ashen wasp πŸ‘‹

ashen wasp
#

Hi

vocal basin
surreal wyvern
#

Namaste @somber heath !

ashen wasp
#

I am start study python

#

and I from Russia

formal ember
vocal basin
#

2048x2048

#

the edges are quite rough, yes

ashen wasp
#

?

vocal basin
surreal wyvern
vocal basin
surreal wyvern
vocal basin
vocal basin
#

emerald cave?

#

2 and 16 stacks competing for territory

#

16 stacks with x2 and x4 colour variation

flat sentinel
vocal basin
#

I broke something

flat nexus
vocal basin
flat nexus
#

I edit

somber heath
#

How you can solve your next problem: The global keyword.

#

How you should solve your next problem: The class keyword.

#

@knotty flint πŸ‘‹

#

!voice @knotty flint

wise cargoBOT
#

Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

vocal basin
somber heath
#

@whole bear πŸ‘‹

vocal basin
#

four stacks

whole bear
#

sorry i need help

#

what chat do i go to?

vocal basin
somber heath
#

@open lantern πŸ‘‹

vocal basin
somber heath
#

@high acorn πŸ‘‹

open lantern
wise cargoBOT
#

Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

open lantern
#

!voice

high acorn
#

Hello opal

somber heath
#

@smoky rose @untold star πŸ‘‹

untold star
#

Yo

#

Wassup

smoky rose
#

hi

vocal basin
#

when the noise is pixel-small, it looks like stars

somber heath
#

Pillow

#
from PIL import Image```
#

@visual elk πŸ‘‹

visual elk
#

hi

sharp urchin
#

skill based matchmaking please @rapid chasm

#

i suffer a lot

#

:[

#

😘 .

#

thts sum beautiful voice ryt there

#

:}

rapid chasm
#
        if len(current_players) >= 10 and member not in current_players:

            if member not in queue:
                queue.append(member)

            await member.move_to(None)

        elif member not in current_players:
            current_players.append(member)```
sharp urchin
#

yuss

#

:}now add skill based matchmaking

#

we know tht

#

but a third person wont know tht

sharp urchin