#voice-chat-text-1

1 messages · Page 13 of 1

mild flume
#

And my brain added in dawg at the end

delicate wren
#

I'd expect sqrt to be faster
but insignificantly

#

python doesn't like to introduce specific cases when there might be such for optimisation sake

#

as in
can we handle this case faster?
we won't

mild flume
primal quarry
mild flume
delicate wren
#

somewhat works

#

the problem is that characters have non-1:1 ratio

#

" #"[...]

#

trying to render an elliptic curve

#

works poorly because I'm using a wrong way to calculate distances

#

box

#

A hexahedron (plural: hexahedra or hexahedrons) or sexahedron (plural: sexahedra or sexahedrons) is any polyhedron with six faces. A cube, for example, is a regular hexahedron with all its faces square, and three squares around each vertex.
There are seven topologically distinct convex hexahedra, one of which exists in two mirror image forms. Th...

In geometry, a parallelepiped is a three-dimensional figure formed by six parallelograms (the term rhomboid is also sometimes used with this meaning). By analogy, it relates to a parallelogram just as a cube relates to a square. In Euclidean geometry, the four concepts—parallelepiped and cube in three dimensions, parallelogram and square in two ...

#

there's also code bases which are so cursed you can't automate the refactoring of it

#

why the hell is it pronounced like "pipe"

#

paralelo-pipe-it

primal quarry
#

par·​al·​lel·​e·​pi·​ped

delicate wren
#

idk how to find a proper short word to substitute

#

because eed is long

#

id is ID

delicate wren
#

something went wrong

stuck bluff
hearty heath
#

Geometry on the surface of a sphere is non-euclidean.

#

For long distance navigation, you use non-euclidean geometry.

mild flume
#

Oh huh

#

Neat

delicate wren
#

as like

#

breaks more stuff than the main contested axiom

mild flume
#

HA

sharp sundial
#

Is it like using a different co-ordinate system

mild flume
delicate wren
#

time doesn't differ that much

#

usually

#

faster/slower to external observers

#

space is moving

delicate wren
#

limit on speed is local

#

in some sense, parts of space can move relatively to each other faster than the speed of light

#

"working with congress to make sure to spend as much budget as possible"

#

@primal quarry addition of velocities is not linear

#

quite important to understand how special relativity works

mild flume
#

This all hurts my brain

delicate wren
#

this is wrong when adding velocities

[x0,y0,z0]+[x1,y1,z1]=[x0+x1,y0+y1,z0+z1]
primal quarry
#

Yea cause you have to like take the average if the 2 positions or whatever

delicate wren
delicate wren
#

lights and photons are properties of the field

#

@mild flume they do have mass in some sense, like exerting gravity

mild flume
#

Sure

delicate wren
#

whereas being affected by gravity doesn't even require mass

mild flume
#

Super stupid question: when light hits something, does it get heavier?

#

Like.... it can't right?

delicate wren
#

heating up increases mass but too little

#

chemical reactions are doing that better

mild flume
#

But it does in some form, just in an infinitesimal way

delicate wren
mild flume
#

Hmm

delicate wren
primal quarry
delicate wren
#

it usually doesn't get reflected in full

#

depends on the speed of the thing too

#

and frame of reference

mild flume
#

As far as I know there isn't anything that 100% reflects light

delicate wren
#

single photon may get reflected intact sometimes

#

because quantum

mild flume
#

Sure, but at scale

delicate wren
#

it can drain energy if the thing moves fast enough towards light

#

and is reflective enough

delicate wren
#

particle is just a property

#

particularly stable one

primal quarry
olive echo
#

it was written for physicists lol

delicate wren
primal quarry
#

I guess it's akin to learning how to read a programming language?

olive echo
#

yeah

delicate wren
olive echo
#

its just syntax for representing concepts

mild flume
#

Yeah back shortly

delicate wren
#

not that

#

that thing is small

#

there are way more disabled elements inside

#

disabled/useless/etc.

crimson rain
#

Good afternoon lads,
Guys I need help with a HTTP Requests

#

yeah I saw a yt video about it but its more complex than that

#

I need something supper specific

#

Super*

#

bru l(

#

😭

#

ughgh

#

2 secs boys

#

let me type

#

Ight wait let me type it rq

#

XD

#

Yes

#

I made a GIF on Tenor and for it to be be viewed in GIF search on Discord the GIF needs at least x amount of views

#

and every time I past the link it counts as one view

#

yes

#

how do I automate it

#

nah but if open it on 2 different tabs it counts as 2 views

#

how do I do that?

#

yeah let me show you what I got

#

import requests

r = requests.get("the link")

print((r))

#

thats what I got from the indian man on yt

#

But that dosent count towards the views, idk why

primal quarry
#

requests.get("https://catfact.ninja/fact").text

crimson rain
#

wait can i say shit

#

ight wait let me get a link

#

bro whats this dark web shit XD

#

facts

#

but then how come if I open the same link multiple times it counts as views

#

ahh

#

acctly?

mild flume
#

!rule 5

coarse hearthBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

crimson rain
#

bru I just need the thing to open the link multiple times 😭

#

😉

#

wear gloves*

#

go where ?

#

XD

crimson rain
#

is it cus of the tomfoolery

#

ahh so its a ethical thing

#

yeah I understand, its like view farming on yt

#

so is it unethical to open the same link multiple times 🤷‍♂️

#

😂

#

Sorry lads just before I go why dosen't this work again and can you just give me a nudge of how to make it work
import requests

r = requests.get("the link")

#

bro send the link

#

plssss

#

JUST LOOK NO TOUCH

#

thats a hint !!!!

#

Ight thanks lads ❤️

mild flume
#

?

#

Not entirely sure what you thought was a hint

primal quarry
#

||| code courtesy of the tf source leak |||
Music: Hall of the Mountain King

channel discord --- https://discord.gg/8TYgJhwA7S
channel patreon --- https://www.patreon.com/shounic
channel tracker --- https://trello.com/b/L3B65jUX
[ todo list / current progress on upcoming videos / channel roadmap ]
feedback --- https://forms.gle/bkuGF6attQrRPc6o...

▶ Play video
pseudo raven
primal quarry
mild flume
#

!d dis

coarse hearthBOT
#
dis

Source code: Lib/dis.py

The dis module supports the analysis of CPython bytecode by disassembling it. The CPython bytecode which this module takes as an input is defined in the file Include/opcode.h and used by the compiler and the interpreter.

primal quarry
#

!e

from timeit import timeit
 
def one():
    a = 1
    for _ in [0]*100_000:
        a *=0.5
        a /=0.5
    return a
 
def two():
    a = 1
    for _ in [0]*100_000:
        a /=2
        a *=2
    return a
 
def three():
    a = 1
    for _ in [0]*100_000:
        a /=0.5
        a /=2
    return a
 
def four():
    a = 1
    for _ in [0]*100_000:
        a *=0.5
        a *=2
    return a
 
print(timeit(one, number=1)) 
print(timeit(two, number=1)) 
print(timeit(three, number=1))
print(timeit(four, number=1)) 
coarse hearthBOT
#

@primal quarry :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 0.011712657287716866
002 | 0.014990424737334251
003 | 0.012963864952325821
004 | 0.011407922953367233
mild flume
#

Oh and fun fact

#

We have !timeit

#

If you like video game music

delicate wren
#

!e

from timeit import timeit
 
def one():
    a = 1
    for _ in range(100_000):
        a *=0.5
        a /=0.5
    return a
 
def two():
    a = 1
    for _ in range(100_000):
        a /=2
        a *=2
    return a
 
def three():
    a = 1
    for _ in range(100_000):
        a /=0.5
        a /=2
    return a
 
def four():
    a = 1
    for _ in range(100_000):
        a *=0.5
        a *=2
    return a
 
print(timeit(one, number=1)) 
print(timeit(two, number=1)) 
print(timeit(three, number=1))
print(timeit(four, number=1)) 
coarse hearthBOT
#

@delicate wren :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 0.010808145627379417
002 | 0.012251565232872963
003 | 0.01144053228199482
004 | 0.011360730975866318
primal quarry
delicate wren
#

2->2.0

#

it takes time

#

extremely unreliable, for some reason

mild flume
#

!timeit

coarse hearthBOT
#
Missing required argument

code

#
Command Help

!timeit [python_version] [setup_code] <code, ...>
Can also use: ti

Profile Python Code to find execution time.

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 formatted codeblocks are provided, the first one will be the setup code, which will not be timed. The remaining codeblocks will be joined together and timed.

By default, your code is run on Python 3.11. A python_version arg of 3.10 can also be specified.

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

delicate wren
#

you can almost never say it's definitely faster

delicate wren
#

the rest seems to correlate with the number of divisions/multiplications
with divisions being faster

mild flume
#

Wait

#

I thought multiplication was faster in most cases

#

I'm so confused now

delicate wren
#

floats

mild flume
#

@terse osprey You here bud?

delicate wren
#

maybe optimisations similar to |0 in JS but a little different

primal quarry
delicate wren
#

inconsistently

#

will be quite a sad situation if it's just memory layout related speed difference

#

you can look at it and think "it's clearly 10 times larger, so numbers are fine"
but it's not always 49:53

frosty scarab
#

what are the different between random.chiose and random.choises?

primal quarry
delicate wren
primal quarry
#

Oh, I ran the a function twice

delicate wren
#

also, afaik, only choices allows weights

primal quarry
#

b is 2.665035800077021

frosty scarab
coarse hearthBOT
#
I don't think so.

No documentation found for the requested symbol.

delicate wren
#

I can't brain

#

!d random.choices

coarse hearthBOT
#

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 "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 "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.
delicate wren
#

k=

frosty scarab
delicate wren
#

!e

from random import choices
print(choices([1,2,5], k=4))
coarse hearthBOT
#

@delicate wren :white_check_mark: Your 3.11 eval job has completed with return code 0.

[5, 5, 1, 1]
delicate wren
primal quarry
primal quarry
#

:(

#

But it's a pretty measurable difference

#

I think you just have a faulty processor

delicate wren
#

?

primal quarry
#

Maybe it was wired wrong

delicate wren
#

as in

#

redefine the function

#

it may give different results

primal quarry
#

Trying it

delicate wren
#

each time you redefine the function, its performance changes

primal quarry
#

It seems like it but I'm getting the multiplication consistently faster

#

@mild flume you try it

delicate wren
mild flume
#

Hmm

delicate wren
#

@random minnow it's random

coarse hearthBOT
#

@delicate wren :x: Your 3.11 eval job timed out or ran out of memory.

001 | -0.054138174280524254
002 | -0.054851265624165535
003 | -0.05147458799183369
delicate wren
#

it's per-function definition

#

and some other stuff

coarse hearthBOT
#

@delicate wren :x: Your 3.11 eval job timed out or ran out of memory.

001 | 0.024440566077828407
002 | 0.015820952132344246
003 | 0.015387816354632378
delicate wren
#

look

#

!e

from timeit import timeit

def div_float():
    for _ in range(100_000):
        a = 3.0
        a /= 2.0

def mul_float():
    for _ in range(100_000):
        a = 3.0
        a *= 0.5

for i in range(5):
    print(timeit(div_float, number=100) - timeit(mul_float, number=100))
coarse hearthBOT
#

@delicate wren :x: Your 3.11 eval job timed out or ran out of memory.

001 | 0.021370904520154
002 | 0.02712751366198063
003 | 0.018711324781179428
delicate wren
#

I'm pasting the same code lol

coarse hearthBOT
#

@delicate wren :x: Your 3.11 eval job timed out or ran out of memory.

001 | 0.031604014337062836
002 | 0.02675784006714821
003 | 0.010857302695512772
delicate wren
#

!e

from timeit import timeit  # comment to avoid getting rate-limited by bot #1

def div_float():
    for _ in range(100_000):
        a = 3.0
        a /= 2.0

def mul_float():
    for _ in range(100_000):
        a = 3.0
        a *= 0.5

for i in range(5):
    print(timeit(div_float, number=100) - timeit(mul_float, number=100))
coarse hearthBOT
#

@delicate wren :x: Your 3.11 eval job timed out or ran out of memory.

001 | 0.0203707292675972
002 | 0.024002408608794212
003 | 0.03762888163328171
primal quarry
#

!e

from timeit import timeit

def div_float():
    for _ in range(100_000):
        a = 3.0
        a /= 2.0

def mul_float():
    for _ in range(100_000):
        a = 3.0
        a *= 0.5

for i in range(5):
    print(timeit(div_float, number=100) - timeit(mul_float, number=100))```
delicate wren
#

it should be positive mostly

coarse hearthBOT
#

@primal quarry :x: Your 3.11 eval job timed out or ran out of memory.

001 | 0.027432087808847427
002 | 0.03222465328872204
003 | 0.02642926201224327
primal quarry
#

!e

from timeit import timeit

def div_float():
    for _ in [0]*100_000:
        a = 3.0
        a /= 2.0

def mul_float():
    for _ in [0]*100_000:
        a = 3.0
        a *= 0.5

for i in range(5):
    print(timeit(div_float, number=100) - timeit(mul_float, number=100))```
coarse hearthBOT
#

@primal quarry :x: Your 3.11 eval job timed out or ran out of memory.

001 | 0.013793524354696274
002 | 0.012729119509458542
003 | 0.026121320202946663
004 | -0.006698824465274811
delicate wren
#

I'll go restart the ipython kernel

delicate wren
#

still getting negative numbers mostly

frosty scarab
#

can you do a random in a random let me explain i have 3 list and i what to randoms the thinks in 3 list in one variable

delicate wren
#

choice, then choice again

#

depends on how you want the distribution to look like

#

!e

from random import choice
lists = [[1,2,3],[4,5,6],[7,8,9]]
print(choice(choice(lists)))
coarse hearthBOT
#

@delicate wren :white_check_mark: Your 3.11 eval job has completed with return code 0.

3
delicate wren
#

!d itertools.chain

coarse hearthBOT
#

itertools.chain(*iterables)```
Make an iterator that returns elements from the first iterable until it is exhausted, then proceeds to the next iterable, until all of the iterables are exhausted. Used for treating consecutive sequences as a single sequence. Roughly equivalent to:

```py
def chain(*iterables):
    # chain('ABC', 'DEF') --> A B C D E F
    for it in iterables:
        for element in it:
            yield element
delicate wren
#

!d itertools.chain.from_iterable

coarse hearthBOT
#

classmethod chain.from_iterable(iterable)```
Alternate constructor for [`chain()`](https://docs.python.org/3/library/itertools.html#itertools.chain "itertools.chain"). Gets chained inputs from a single iterable argument that is evaluated lazily. Roughly equivalent to:

```py
def from_iterable(iterables):
    # chain.from_iterable(['ABC', 'DEF']) --> A B C D E F
    for it in iterables:
        for element in it:
            yield element
delicate wren
#

not work

#

"write code for a machine" as in code that humans can't read

mild flume
#

The key is to write code that neither the human nor the machine can read

delicate wren
#

person who was asking about logarithms earlier

mild flume
#

A unique multiplayer game built on a free Web API. The best sandbox platform to learn a new skill or apply your knowledge in a fun and meaningful way. Use any programming language with our RESTful API to control the most powerful fleet in universe.

frosty scarab
terse osprey
mild flume
terse osprey
mild flume
#

Where are these from?

terse osprey
mild flume
#

Ooo, neat

pseudo raven
foggy cove
#

@fallen cape

foggy cove
#

from india.

#

i just rejoined the server

#

i lost speak permission

#

what about u?

#

where r u from?

#

what r u working on these days ?

delicate wren
foggy cove
#

@fallen cape dont know mabe?

delicate wren
#

!voice

coarse hearthBOT
#
Voice verification

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

delicate wren
#

the channel is hidden if you re-verify I think

#

I don't see the channel

#

but I can access it

foggy cove
rotund lodge
#

!voice

coarse hearthBOT
#
Voice verification

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

forest ore
misty sinew
#

!Voiceverify

floral jetty
#

yo

#

!voiceverify

zinc ivy
#

hi

true valley
#

":According to the results of this study, probiotic mouthwashes are considered an effective solution for maintaining oral health. However, probiotics are more effective in reducing plaque accumulation after a month of use."

shy osprey
shy osprey
forest ore
#

@shy osprey hello

shy osprey
#

@forest ore I want to contribute in your repo

forest ore
#

ok create a pull request wih impruvements

#

@shy osprey

digital cradle
#

@tranquil quest

misty sinew
#

can someone help me with mayavi module of python?

mild flume
#

Haven't heard of it before

quiet yoke
#

What's up?

quiet yoke
#

It damages the Cerebellum

#

As per the reports

mild flume
#

Yarp

quiet yoke
#

It just affects the overall stability of the body.

mild flume
quiet yoke
#

That's effin crazy lmao!

frank eagle
#

hola

#

👋

mild flume
#

How goes it

frank eagle
#

great

mild flume
#

@zenith wedge From the NPR report:

Del Pozo said many reported fentanyl overdoses among police involve symptoms that look more like panic attacks than opioid overdoses.

"So when an officer just at the thought of being exposed to fentanyl falls over, goes unconscious or panics, that's a health problem. That's something the officer needs help for."

frank eagle
#

i remember some guy tried to kidnap me with a lolipop, i was 5 and he was forcing me eat it.. plus he was lookin weird af

#

to eat*

mild flume
#

Jesus

#

I'm glad that didn't happen

frank eagle
#

i ran away and said NO!

mild flume
#

@fair heart Probably "What's Love Got to Do With It"

quiet yoke
#

Aspiring Fascist? 👀

mild flume
#
#

This always baffles me

mild flume
stuck bluff
#

An Englishman visits Scotland in the 1700s.

"You what, mate?"
"Aye, that be me, lad."

mild flume
#

I'm sticking with the goat sacrifice suggestion

#

@onyx kernel How're you? Haven't been able to ask you over voice yet

stuck bluff
#

Why should you never visit a mechanic run by a rhinoceros?

mild flume
#

Why

stuck bluff
#

Because they charge too much.

merry mica
#

lol

stuck bluff
#

Also, they're a rhinoceros. They're not exactly the most dextrous.

mild flume
#

@raven orbit I don't get how you tolerate SQLAlchemy

#

I'm running into issues while even trying to do the tutorial

stuck bluff
#

@unborn hawk 👋

mild flume
harsh blaze
mild flume
#

What in gods name is that from

stuck bluff
#

Project settings of some sort.

#

I expect.

harsh blaze
#

So I am trying something like this -

import sys
if __name__ == '__main__':
    argc = len(sys.argv)
    if argc < 2:
        print("error")
        sys.argv[1] = "quote"
    if sys.argv=="quote":
        print("Those who wander aren't always lost")
mild flume
stuck bluff
#

@junior rampart 👋

#

ARM day. When you practice ARM assembly.

merry mica
mild flume
raw wren
mild flume
mild flume
#
SQL

Structured Query Language (SQL) ( (listen) S-Q-L, sometimes "sequel" for historical reasons), is a domain-specific language used in programming and designed for managing data held in a relational database management system (RDBMS), or for stream processing in a relational data stream management system (RDSMS). It is particularly useful in handl...

stuck bluff
#

"Is this the weasel place?
"We sell weasels."
"Weasel weasels?"
"No, we sell weasels."
"What do you mean weasel weasels?"
"We sell...weasels."
"...Weasel weasels?"
"Out!"

#
IMDb

Devil's Dust: With Anthony Hayes, Don Hany, Ewen Leslie, Alexandra Schepisi. Follow the corporate scandal surrounding multi-national asbestos company, James Hardie, the life or death fight against their strategy of ignoring the dangers of asbestos for decades, and the desperate fight to expose their crimes.

delicate wren
#

/rg'ɨb/

mild flume
#

That tracks

mild flume
#

@crystal aurora Nooooo, thou hast abandoned me

#

Oh sick

warm bolt
#

gtg

mild flume
#

@merry mica

#

That's the one I use

pseudo raven
#
WIRED

The Voice of God weapon — a device that projects voices into your head to make you think God is speaking to you — is the military’s equivalent of an urban myth. Meaning, it’s mentioned periodically at defense workshops (ironically, I first heard about it at the same defense conference where I first met Noah), […]

stuck bluff
ocean forge
stuck bluff
#

wtf...increasingly.

small plaza
#

i don't have permission to talk why????

#

on voice chat 1 channel

stuck bluff
coarse hearthBOT
#
Voice verification

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

mild flume
#

ffs... I keep typing entity as entitiy

#

I don't know why

#

And it's irritating me

merry mica
#
Keychron | Wireless Mechanical Keyboards for Mac, Windows and Android

Keychron Q6 is a fully customized full-size layout mechanical keyboard packed with all premium features and endless possibilities. Q6 is an all-metal keyboard that allows customizable capabilities for every key switch, keycap, knob, and stabilizer. It’s made for your personalized experience and a more comfortable typing experience.

mild flume
#

@scenic bane

scenic bane
mild flume
scenic bane
delicate wren
#

lim(1+1/n)^n, n->\inf

#

+inf specifically

#

!e

print((1-1/1000)**(-1000))
coarse hearthBOT
#

@delicate wren :white_check_mark: Your 3.11 eval job has completed with return code 0.

2.719642216442853
delicate wren
#

ah, nvm

#

either

#

factorials are weird in terms of asymptotics

#

!e

from math import e
print(e)
coarse hearthBOT
#

@delicate wren :white_check_mark: Your 3.11 eval job has completed with return code 0.

2.718281828459045
delicate wren
#

it always grows but it's bound

#

there is a second sequence which always shrinks

#

@mild flume yes

delicate wren
#

so they approach each other an meet in the infinity

scenic bane
delicate wren
#

still didn't succeed in approximating this thing

#

it's, like log(x+stuff)

scenic bane
delicate wren
#

I think my formal education stopped somewhere right before that

mild flume
scenic bane
mild flume
scenic bane
scenic bane
delicate wren
#

e^(-x^2) is quite useful actually

#

because it's base for normal distribution

#

(or, rather, normal distribution PDF, probability distribution function)

delicate wren
scenic bane
delicate wren
#

so it's just graph+(0,.05), graph-(0,.05) and everything in-between

#

trying to find distances would be difficult

mild flume
#

Dude. Just

scenic bane
delicate wren
mild flume
#

This is incredibly childish, Maro. If someone doesn't want to talk to you at the moment, let it go

#

It's like the constant texts you get from an ex

scenic bane
fading garden
fading garden
mild flume
#

Yes, which I sent once. Not the 8ish messages and passive aggressive comments that you deleted only after being called out on

scenic bane
mild flume
#

Did I take moderative action? No. I saw something that was highly uncomfortable in my eyes and mentioned it

#

When you're in a public space, more than other people can see and comment on things

#

You're free to call it out.

merry mica
#

@mild flume we need you.

mild flume
#

I'm in a meeting, what's going on

merry mica
#

it can wait

untold plank
#

@eager tinsel How are you?

eager tinsel
eager tinsel
untold plank
#

I come on server after many days

fading garden
#

why would you send it?

#

send it here, not to dm

#

so now you are aware

#

there are bunch of other channels

#

to send msg

random minnow
#

ceolacanth

mild flume
#

coelacanth

#

Coelacanths ( (listen) SEE-lə-kanth) (order Coelacanthiformes) are an ancient group of lobe-finned fish (Sarcopterygii) in the class Actinistia. As sarcopterygians, they are more closely related to lungfish and tetrapods (which includes amphibians, reptiles, birds and mammals) than to ray-finned fish.
Well-represented in both freshwater and mari...

fading garden
#

can you stop dming me?

#

you literately send me message

#

I am saying that you sent me message to my dm

#

I am not saying that you asked something, I am saying that you sent me message privately

#

and I am asking to stop sending them

#

yeah, never mind, I will just block you

#

are you kidding ?

delicate wren
fading garden
#

why would I?

delicate wren
#

<@&831776746206265384>

tender haven
#

!pban 474600906923573250 nsfw troll

coarse hearthBOT
#

:incoming_envelope: :ok_hand: applied ban to @north bough permanently.

frosty scarab
#

thanks

#

this guy spam some of us

#

in uor dms

#

1h ago

fading garden
#

@tender haven can you block this person too?
he was spamming people earlier to dm's and now he joking around

#

<@&831776746206265384>

tender haven
#

!pban 555740152832589827 nsfw troll

coarse hearthBOT
#

:incoming_envelope: :ok_hand: applied ban to @ruby mantle permanently.

fading garden
#

thanks

tender haven
#

you've already been warned for bothering people. here's your second, and final, warning about trolling.

glacial parcel
#

I believe!

delicate wren
#

<@&831776746206265384>

merry mica
#

<@&831776746206265384>

glacial parcel
#

And I believe in reincarnation too.

sonic depot
#

!pban 479357820186132480 nsfw troll

coarse hearthBOT
#

:incoming_envelope: :ok_hand: applied ban to @blissful horizon permanently.

frosty scarab
#

thanks

fading garden
#

finally

merry mica
#

^

frosty scarab
fading garden
frosty scarab
glacial parcel
frosty scarab
glacial parcel
frosty scarab
#

neofetch

fading garden
frosty scarab
terse osprey
pseudo raven
pseudo raven
raven orbit
delicate wren
#

@tepid geode what IDE are you using?
if it's VS Code, you can develop on the remote server directly

#

VS Code remote is way easier, in my view

#

it just works

#

almost same for development inside docker containers

#

I think VS Code remote is pretty much the reason I switched from PyCharm

pale pivot
delicate wren
#

however much you hate microsoft, remember: oracle exists

#

like, you can just run docker compose up -d --build
without pain of connecting to remote docker host

supple turret
#

H

void holly
#

@stuck bluff did you have

#

A YouTube channel

#

Think i found you

stuck bluff
#

Okay.

void holly
#

Is it no boilerplate

stuck bluff
#

Wut?

void holly
#

I men is this your YouTube channel

stuck bluff
#

Well, I'll say this much. You've been doing some sleuthing.

mild flume
#

Wait why are we stalking Opal?

#

And I'd prefer if we didn't stalk other users

void holly
#

Actually i am not. I found this voice similar to opal so i asked

warped hornet
#

stalking ......
nah nah nah

#

I think opal has his own fanclub

delicate wren
#

chess

stuck bluff
#

The joining coincided with me having two creepers sneak up on me.

#

I got a hekkin startle.

#

I've relented and gone back to Forge.

#

Too many good mods.

#

Fabric has a lot going for it. Migration of all of what I want to play it does not.

#

If your iPython is broken, maybe it needs a patch.

#

Yarr.

#

Eyeballs?

delicate wren
#

what did I just do

#

bullying bots

stuck bluff
#

"I forced a bot to watch x..."

delicate wren
#

yes, of course, it's XML

stuck bluff
#

If you're having a really shitty day sorting out a serious problem with your domain name, do you tell people "ICANN complain"?

mild flume
stuck bluff
#

Calls demolition services.
"Okay. Office removed. What's next?"

#

@astral carbon 👋

#

@gaunt sundial 👋

delicate wren
#

even fonts now take bribes?

stuck bluff
#

You print something for work and it's all just Zalgo.

delicate wren
#

eh
I didn't take the screenshot soon enough
it was showing something like
7 blunders
100% accuracy

#

what a disaster

stuck bluff
#

"I return."

Hemlock()```
#

Are refrigerators chilled friendly?

#

@stone musk 👋

#

@small trench 👋

#

Joins and leaves and what you see.

stone musk
radiant mural
#

@fast cape hello

#

I can't do voice chatting currently, uh

#

yeah m, somewhere in GMT + 8hr , Taiwan

#

yah good guess, I just learn how to use nvim (a text eeditor) with a plugin called vimspector , do you use that ?

#

lot of ppl are using VScode (or Eclipse) for dev , I understand how convenient it is

#

I want to keep my IDE simple , and I don't mind learning vim commands (I learn that in my last job)

#

what food on daily basis ?

#

nvm,

#

meat eater ! lol

#

common in some South East Asian countries

#

it was primary source of protein there several decades ago . now ppl there eat meat like chicken beef pork , so eating insect is like part of the culture there.

#

yah , ok , bye

misty sinew
#

@misty sinew do you live in india thouhg?

#

nope

#

i figured

#

you dont sound indian

misty sinew
#

i doubth it

#

🤣

#

😳

#

@white vine ....."14"... so you are 9

#

🤣

supple turret
#

Howcan i be voice verified

rotund juniper
hallow swallow
#

Can anyone help me upgrade my openGL to 2.0

white vine
umbral rose
#
import getpass


def os_get_name():
    os_name = getpass.getuser()
    os_name_ask = ''
    while os_name_ask not in ['Y', 'N']:
        os_name_ask = input(f'Do you want {os_name} as your name? (y/n): ').upper()
        if os_name_ask == 'Y':
            return os_name
        elif os_name_ask == 'N':
            name = ''
            while name == '':
                name = input('What is your name? ')
            return name
        else:
            print('Invalid input')


def main():
    player_name = os_get_name()
    print(f'Hello, {player_name}!')


if __name__ == '__main__':
    main()

umbral rose
#
class Car:
    brand = "Unknown"
    color = "White"

    def honk(self):
        print("Beep beep!")
#

my_car = Car()

#

!e

class Car:
    brand = "Unknown"
    color = "White"

    def honk(self):
        print("Beep beep!")

my_car = Car()
print(my_car.brand)
print(my_car.color)
my_car.honk()
coarse hearthBOT
#

@umbral rose :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Unknown
002 | White
003 | Beep beep!
umbral rose
#

__init__

#

!e

class Car:
    def __init__(self, brand, color):
        self.brand = brand
        self.color = color

    @staticmethod
    def honk():
        print(f"Beep beep!")

    @staticmethod
    def create_car():
        brand = input("What is the brand? ")
        color = input("What is the color? ")
        return Car(brand, color)

my_car = Car.create_car()
print(my_car.brand)
print(my_car.color)
my_car.honk()
coarse hearthBOT
#

@umbral rose :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Honda
002 | Red
003 | Beep beep! I am a Honda!
atomic hinge
#
def data_gen(player_name, age1,player_gender,tutorial):
    data = {
        'player_info': {
            'player_name': player_name,
            'player_age': age1,
            'player_gender': player_gender,
            'Player_location':None
        },'player_stats':{

        },'player_invtory':{

        },'player_spals':{
            'spals_unlock':{},'spals_equped':{}
        },'check_ponts':{
            'tutorial': tutorial
        }
    }
    data_dump(data)


def data_dump(data):
    print ('saving')
    file_path = '0.00.05/data/' + 'player_' + data['player_info']['player_name'] + '_save.json'
    with open(file_path, 'w') as file:
        json.dump(data, file)
    print ('saving conpleat')
    import chapter_1 as chapter_1
    selected_Save = '0.00.05/data/' + 'player_' + data['player_info']['player_name'] + '_save.json'
    chapter_1.load_json(selected_Save)```
umbral rose
#

!code

coarse hearthBOT
#
Formatting code on discord

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.

For long code samples, you can use our pastebin.

misty sinew
#

sup fam

delicate wren
#

!e

print(bool.from_bytes(b'\x00', 'little'))
print(bool.from_bytes(b'\x01', 'little'))
coarse hearthBOT
#

@delicate wren :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | False
002 | True
misty sinew
#

!e
pyprint("GOFEK TALK NOW")

coarse hearthBOT
#

@misty sinew :white_check_mark: Your 3.11 eval job has completed with return code 0.

GOFEK TALK NOW
#

@candid garnet :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | False
002 | True
delicate wren
gusty sandal
#
            if emoji in emoji_command_dict:
              ctx = await client.get_context(reaction.message)
              print(ctx)
              command = client.get_command(str(emoji_command_dict[emoji]))
              await ctx.invoke(command)
          ```
#

@commands.cooldown(1,3600, commands.BucketType.user)
@client.command()
async def ___cook(ctx):
  user = ctx.author
  print("1")```
#

Any idea why the cooldown doesn't trigger?

gusty sandal
#

import discord
from discord.ext import commands

#
@client.event
async def on_command_error(ctx, error):
  if isinstance(error, commands.CommandOnCooldown):
    msg = f'You have already been to the kitchen for this rush hour, please try again in {error.retry_after//3600} hours, {(error.retry_after%3600)//60} minutes, {error.retry_after%60:.0f} seconds'
     
    await ctx.reply(msg)```

maybe it's the handler
delicate wren
# gusty sandal

wait, is it the same command as the one you put cooldown on?
(asking because ___cook and foodrush -- different names)

gusty sandal
#

foodrush has no cooldown

#

___cook does

#

I'm trying to invoke cook within the foodrush command

blazing garnet
#

why is everyone muted?

gusty sandal
#

And trigger the cooldown

delicate wren
gusty sandal
#

Correct--

delicate wren
#

just calling await ___cook(ctx)?

gusty sandal
#

smh... um

#

Let me see

#

Will that trigger the cooldown though

#

Would be awesome if it was that easy haven't bothered trying one sec

delicate wren
gusty sandal
#
emoji_command_dict = {
    "🍳": ___cook,
    "🍕": ___bake,
    "🥪": ___prep,
    "🌭": ___grill,
    "🍔": ___flip,
    "🦃": ___broil,
    "🔒": ___LP,
    }

    while True:
        reaction, user = await client.wait_for("reaction_add", check=check)
        emoji = str(reaction.emoji)

        if emoji in selected_options:
            await chart_message.remove_reaction(emoji, user)
        else:
            selected_options.append(emoji)
            if emoji in emoji_command_dict:
              await ___cook(ctx)```
#

So I don't think there's a way to await it this way

#

emoji_command_dict[emoji]) is how I define the function I'm going to run

delicate wren
#

___cook seems to be (after decorators being applied) an instance of Command
so await ___cook(ctx) should work mostly fine
but I don't know whether it checks for timeout

gusty sandal
gusty sandal
#

Well it called the function

delicate wren
#

await ___cook.can_run(ctx)

gusty sandal
#

But it didn't trigger cooldown

gusty sandal
#
``` can_run not defined
#

Oh this bypasses-- I actually want the cooldown to trigger

delicate wren
#
if await ___cook.can_run(ctx):
    await ___cook(ctx)
delicate wren
#

without emoji_command_dict yet

gusty sandal
#

cooldown still not invoking

delicate wren
#

does ___cook get triggered twice?

#

or does it just not report the timeout?

gusty sandal
#

Just once

#

No cooldown triggered either

#

.can_run is not defined though

delicate wren
gusty sandal
#

___cook.can_run(ctx): =>> "can_run" is marked as "any"

delicate wren
#

what type does ___cook have?

gusty sandal
#

<class 'discord.ext.commands.core.Command'>

delicate wren
gusty sandal
#

FYI if I use !___cook twice in the chat it calls the error for cooldown successfully

delicate wren
gusty sandal
#

I... may have not updated recently

#

I have 1.7.3

#

Ok I have it now

gusty sandal
#

@delicate wren So I updated but still didn't invoke cooldown

#

Was having issues with a lot of code that was deprecated 😦

cold parcel
#

whats going on in here?

#

Many Martins

rigid oyster
#

yo

#

can i get some quick help if u arent busy

#

im new to python and i wrote some code for

#

its a macro for a game

#

no

#

its a roblox game

#

mind if i post what ive got so far

#

he doesn't advise against it?

#

it isnt a competitve game

coarse hearthBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

#
Formatting code on discord

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.

For long code samples, you can use our pastebin.

#
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.

rigid oyster
#
import time
import pyautogui
import keyboard

# Set coordinate of when to click and when to check
point1 = (961,895)

# Set the target color
target_color1 = (115, 199, 255)
target_color2 = (255, 255, 255)

# Create a loop to check the pixel colors
while True:
    pixel1 = pyautogui.pixel(point1[0], point1[1])


    # Check if any of the colors match target colors
    if pixel1 == target_color1:
        pyautogui.rightClick
    if pixel1 == target_color2:
        pyautogui.leftClick

    # Check if the "q" key is pressed
    if keyboard.is_pressed("k"):
        break```
#

no,

#

no errors

#

its a horizontal slider where i a certain color is moving on the point

#

what does time.sleep do?

#

do you think the color is possibly moving to fast?

#

i added the method calls

#

its a relatively slow moving color

#

ill test it out

#

yeah i know

#

i just want it to right or left click when the respective colors meet a certain point on my scren

rough rain
#

@delicate wren

#

He's talking about that

#

The dots move to the middle, but we're having issues trying to make it so the dots hit the middle.

rigid oyster
rough rain
#

@delicate wren ^

rigid oyster
#

should i potentially change

#

the pixel point

#

i could have 2 points one towards the left and one towards the right of the center circle

#

from screenshoting my screen

#

i put the screenshot in paint

#

and took the RGB value from it

#

how

coarse hearthBOT
#

print(*objects, sep=' ', end='\n', file=None, flush=False)```
Print *objects* to the text stream *file*, separated by *sep* and followed by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as keyword arguments.

All non-keyword arguments are converted to strings like [`str()`](https://docs.python.org/3/library/stdtypes.html#str "str") does and written to the stream, separated by *sep* and followed by *end*. Both *sep* and *end* must be strings; they can also be `None`, which means to use the default values. If no *objects* are given, [`print()`](https://docs.python.org/3/library/functions.html#print "print") will just write *end*.

The *file* argument must be an object with a `write(string)` method; if it is not present or `None`, [`sys.stdout`](https://docs.python.org/3/library/sys.html#sys.stdout "sys.stdout") will be used. Since printed arguments are converted to text strings, [`print()`](https://docs.python.org/3/library/functions.html#print "print") cannot be used with binary mode file objects. For these, use `file.write(...)` instead.
rigid oyster
#

is there a way i can just generalize "blue" to the code to look for

#

or is that impossible

#

and would use too much computing

frozen phoenix
#

i can talk

neon saffron
#

hi hezy

#

im dying actually

#

it's a joke

#

i need to finish my assignments at the uni

#

and i'm strugling a bit

#

how bout you?

#

what position? software dev?

#

do you need to know smth from program. langs.? i mean for this role

#

have you passed a certification for this or smth? for data analitics on python

#

i need to write 50 mess to speak with you

#

so

#

i am on my way

#

i m actually learning java

#

cs

#

yeap

#

but i was inveted

#

invited to a company as an aintern

#

and consequatly could not spend much time preparing for the assignments

#

oh

#

it's tough

#

but i suppose working exp is much more worth

#

i don't know where you are living but in Europe without edu it doesnt work at all

#

like you sad

#

said*

#

have you graduated?

#

oh it's a hard major

#

)))

#

but you can try to implement this knowledge

#

btw

#

two of my classmates

#

from highschool

#

are studying now in Cambridge for free

#

freom my class

#

it's tough i think

#

but they are doing math

#

oh

#

i wanted btw to ask you about your master

#

so you're up to doing it

#

but afterwards?

#

and do you have gradation like in sofftware in your profession

#

i mean jun middle and so on

#

like in programming

#

there are different levels

#

junior jev

#

middle dev senior dev

#

yep

#

wow it's really engaging

#

what direction would you choose in software: web android ios or smth else

#

ai

#

ml

#

omg i thought it would be easier

#

i was permitted to speak wait a sec i'll reconect

misty sinew
#

!d print

coarse hearthBOT
#

print(*objects, sep=' ', end='\n', file=None, flush=False)```
Print *objects* to the text stream *file*, separated by *sep* and followed by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as keyword arguments.

All non-keyword arguments are converted to strings like [`str()`](https://docs.python.org/3/library/stdtypes.html#str "str") does and written to the stream, separated by *sep* and followed by *end*. Both *sep* and *end* must be strings; they can also be `None`, which means to use the default values. If no *objects* are given, [`print()`](https://docs.python.org/3/library/functions.html#print "print") will just write *end*.

The *file* argument must be an object with a `write(string)` method; if it is not present or `None`, [`sys.stdout`](https://docs.python.org/3/library/sys.html#sys.stdout "sys.stdout") will be used. Since printed arguments are converted to text strings, [`print()`](https://docs.python.org/3/library/functions.html#print "print") cannot be used with binary mode file objects. For these, use `file.write(...)` instead.
misty sinew
#

!d sum

coarse hearthBOT
#
sum

sum(iterable, /, start=0)```
Sums *start* and the items of an *iterable* from left to right and returns the total. The *iterable*’s items are normally numbers, and the start value is not allowed to be a string.

For some use cases, there are good alternatives to [`sum()`](https://docs.python.org/3/library/functions.html#sum "sum"). The preferred, fast way to concatenate a sequence of strings is by calling `''.join(sequence)`. To add floating point values with extended precision, see [`math.fsum()`](https://docs.python.org/3/library/math.html#math.fsum "math.fsum"). To concatenate a series of iterables, consider using [`itertools.chain()`](https://docs.python.org/3/library/itertools.html#itertools.chain "itertools.chain").

Changed in version 3.8: The *start* parameter can be specified as a keyword argument.
misty sinew
#

hi, @neon saffron

neon saffron
#

hi @misty sinew ducky_ducker

misty sinew
#

question, did that work?

#

i mean the verification

#

the voice verification

#

'cause i need that

#

if it DID work,

#

I would try it as well

#

so plz tell me

#

huh?

#

@neon saffron r u around?

neon saffron
#

@misty sinew yep you have to write 50 messages

forest ore
#

!code

coarse hearthBOT
#
Formatting code on discord

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.

For long code samples, you can use our pastebin.

stuck bluff
#

@white karma 👋

#

@mystic mist 👋

mystic mist
#

Hi I'm suppressed

coarse hearthBOT
#
Voice verification

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

mystic mist
#

o

#

k

#

less

#

than

#

50

#

messages

stuck bluff
#

@left spire 👋

neon saffron
#

@pseudo raven are you here?

stuck bluff
#

@frozen gale 👋

frozen gale
#

...

torpid fiber
#

How are you

frozen gale
#

...

torpid fiber
#

1498

frozen gale
#

uhhh

#

idk

#

i'm a kid

#

fr

torpid fiber
#

christopher columbus

frozen gale
#

hehe

torpid fiber
#

Christopher Columbus (/kəˈlʌmbəs/; between 25 August and 31 October 1451 – 20 May 1506)

frozen gale
#

12

#

what r u doing , sir?

#

i not good at math

#

but i'm good at py

#

but i'm noob in thisserver

torpid fiber
#

Christopher Columbus (; between 25 August and 31 October 1451 – 20 May 1506) was an Italian explorer and navigator from the Republic of Genoa who completed four voyages across the Atlantic Ocean sponsored by the Catholic Monarchs of Spain, opening the way for the widespread European exploration and European colonization of the Americas. His exp...

frozen gale
#

ty

#

how to run a code

#

sir

#

how to run a python code here?

stuck bluff
#

!e

coarse hearthBOT
#
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 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.

By default, your code is run on Python 3.11. A python_version arg of 3.10 can also be specified.

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

frozen gale
#

oh ty

#

sir

stuck bluff
#

!e ```py
print('Hello, world.')
print('Goodbye.')

coarse hearthBOT
#

@stuck bluff :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Hello, world.
002 | Goodbye.
frozen gale
#

!eval [python_version] <code, print("hello")>

coarse hearthBOT
#

@frozen gale :x: Your 3.11 eval job has completed with return code 1.

001 |   File "/home/main.py", line 1
002 |     [python_version] <code, print("hello")>
003 |                                            ^
004 | SyntaxError: invalid syntax
stuck bluff
#

!e ```py
print('Hello, world.')
print('Goodbye.')
```

frozen gale
#

oh

#

!e ```py
import time

time.sleep(2)
print("ty for that sir")

coarse hearthBOT
#

@frozen gale :white_check_mark: Your 3.11 eval job has completed with return code 0.

ty for that sir
stuck bluff
#

!paste

coarse hearthBOT
#
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.

frozen gale
#

!e ```py

import time

time.sleep(1)
print("hello")
time.sleep(1)
print("hello")
time.sleep(1)
print("hello")
time.sleep(1)
print("ty")
time.sleep(1)
print("Bruh")

coarse hearthBOT
#

@frozen gale :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | hello
002 | hello
003 | hello
004 | ty
005 | Bruh
stuck bluff
#

@grim agate 👋

torpid fiber
frozen gale
#

!e ```py

rabdom code

hi = input(">>> ")
if hi == "dont care":
print("Bye :)")

elif hi == "uhhh":
print("OMG TY :)")

#

uhh

#

OMG TY SIRR

#

can i go sir?

#

OMG TY

torpid fiber
#

Hi

delicate wren
#

"thank Fireship for its hype"

#

marketing appears good only at a first glance

#

people who do ML:

  • highly rely on open-source
  • know that Python relies on external libraries; benchmarking iteration in Python on simple numeric data is just moronic
#

Mojo is not open-source now

misty sinew
#

kkkkkkkkkkkkkkkk

delicate wren
#

and their simpler benchmark written in Python is at least 100 times slower than it should be

mild flume
#

Yeah that tracks

#

When you say it's not open source now, do you mean it was prior?

delicate wren
#

"not yet"

#

or never will

misty sinew
#

YOu can kill me but you have the time to do it

delicate wren
#

maybe it doesn't exist at all

misty sinew
#

?

delicate wren
mild flume
#

Spooky

misty sinew
#

KKKKKKKKKKKKKKKKK

#

LOL

delicate wren
#

how many segfaults?

#

@ornate cobalt "just use #[bench]" (spoiler: requires nightly)

ornate cobalt
#

I don't want to change my channel

delicate wren
#

Dockerfile.Benchmark

FROM rustlang/rust:nightly
...

if there's any need

mild flume
#

wmic path softwareLicensingService get OA3xOriginalProductKey

delicate wren
#

windows media tool might partially exist because of how windows delivers things

#

or used to, at least

#

I forgot why I have cygwin installed

#

why do I have a .5 GB MongoDB data directory if I've never written anything to it

#

heard the word

#

read the name of the company some time ago

#

forgot where

#

"look at the icon"

#

drive A:

#

good for privilege escalation exploits

#

you want to avoid ads => pay

#

if you want to argue ethics of banning APIs because you want to avoid ads, there is a contradiction in reasoning

#

understandable

quiet yoke
#

Howdy!

atomic hinge
#
import random

def roll(die=None, sided=None, dice_effect=None, advantage=None):
    if dice_effect:
        dice_effect = dice_effect.strip().upper()

        if dice_effect[0] == 'D':
            advantage = False
            dice_parts = dice_effect[1:].split('D')
        elif dice_effect[0] == 'A':
            advantage = True
            dice_parts = dice_effect[1:].split('D')
        else:
            advantage = None
            dice_parts = dice_effect.split('D')

        if len(dice_parts) != 2:
            raise ValueError("Invalid dice format. Expected '1d6' format.")

        die = dice_parts[0].strip()
        sided = dice_parts[1].strip()

        if not die.isdigit() or not sided.isdigit():
            raise ValueError("Invalid dice format. Expected numeric values for die and sides.")

    if not die or not sided:
        raise ValueError("Missing die or sided value.")

    rolls = []
    for _ in range(int(die)):
        rolls.append(random.randint(1, int(sided)))

    if advantage is True:
        result = max(rolls)
    elif advantage is False:
        result = min(rolls)
    else:
        result = sum(rolls)

    return result
ornate cobalt
#

!e

import random

def roll(die=None, sided=None, dice_effect=None, advantage=None):
    if dice_effect:
        dice_effect = dice_effect.strip().upper()

        if dice_effect[0] == 'D':
            advantage = False
            dice_parts = dice_effect[1:].split('D')
        elif dice_effect[0] == 'A':
            advantage = True
            dice_parts = dice_effect[1:].split('D')
        else:
            advantage = None
            dice_parts = dice_effect.split('D')

        if len(dice_parts) != 2:
            raise ValueError("Invalid dice format. Expected '1d6' format.")

        die = dice_parts[0].strip()
        sided = dice_parts[1].strip()

        if not die.isdigit() or not sided.isdigit():
            raise ValueError("Invalid dice format. Expected numeric values for die and sides.")

    if not die or not sided:
        raise ValueError("Missing die or sided value.")

    rolls = []
    for _ in range(int(die)):
        rolls.append(random.randint(1, int(sided)))

    if advantage is True:
        result = max(rolls)
    elif advantage is False:
        result = min(rolls)
    else:
        result = sum(rolls)

    return result

print(roll(3, 4))
coarse hearthBOT
#

@ornate cobalt :white_check_mark: Your 3.11 eval job has completed with return code 0.

7
delicate wren
mild flume
#

Back in a sec

delicate wren
#

I think, of BFS or DFS, one can be chosen only knowing the data to optimise for

#

@misty urchin there is a common trope that closing access to APIs is "unethical", "restricting freedom", which in most cases is not true
whoever was in VC thankfully wasn't making that point

misty urchin
#

the programmer version of "I thought this was 'Murica"

#

I think you could argue that the way they went about it is duplicitous and unethical

delicate wren
#

a thing that BFS protects against is binary trees which are effectively just linked lists

#

what we're trying to do is to find something as fast in possible in the graph
which is what DFS is good for, generally
but this specific case may place certain restrictions on its applicability

#

the solution itself, on the idea level, is order-independent

#

it's just a recursively defined AND expression

#

which can short circuit in either of its two subbranches or its extra check

atomic hinge
#

!e

coarse hearthBOT
#
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 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.

By default, your code is run on Python 3.11. A python_version arg of 3.10 can also be specified.

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

atomic hinge
#
import random

def parse_dice_effect(dice_effect):
    dice_effect = dice_effect.strip().upper()

    if dice_effect[0] == 'D':
        advantage = False
        dice_parts = dice_effect[1:].split('D')
    elif dice_effect[0] == 'A':
        advantage = True
        dice_parts = dice_effect[1:].split('D')
    else:
        advantage = None
        dice_parts = dice_effect.split('D')

    if len(dice_parts) != 2:
        raise ValueError("Invalid dice format. Expected '1d6' format.")

    die = dice_parts[0].strip()
    sided = dice_parts[1].strip()

    if not die.isdigit() or not sided.isdigit():
        raise ValueError("Invalid dice format. Expected numeric values for die and sides.")

    return die, sided, advantage

def apply_advantage(rolls, advantage):
    if advantage is True:
        return max(rolls)
    elif advantage is False:
        return min(rolls)
    else:
        return sum(rolls)

def roll(die=None, sided=None, dice_effect=None, display_result=True):
    if not die and not sided and not dice_effect:
        raise ValueError("No input provided. Please specify die and sided values or dice_effect.")

    if dice_effect:
        die, sided, advantage = parse_dice_effect(dice_effect)
    else:
        advantage = None

    if not die or not sided:
        raise ValueError("Missing die or sided value.")

    rolls = []
    for _ in range(int(die)):
        rolls.append(random.randint(1, int(sided)))

    result = apply_advantage(rolls, advantage)

    if display_result:
        print(result)

    return result
delicate wren
#

@ornate cobalt they're checked with and

#

not with or

#

idk why

#

@ornate cobalt
what?

#

Yuu

atomic hinge
#

yes

#

5e

delicate wren
#

@ornate cobalt what about without .iter()?

#

does it happen if you iter an array that's assigned to a variable?

#

@ornate cobalt sounds like you're re-evaluating the array for some reason

#

@atomic hinge what specific kind of web version of VS Code?

#

there's many

mild flume
#

I miss kits

#

Allowed for such varied characters

delicate wren
#

I can't read

mild flume
#

Although I don't miss how absurd some of the attribute requirements were for some classes

#

I think it was either paladin or bard that were just crazy high

#

Also THAC0 was like eh

#

Not as tough as people made it out to be

delicate wren
#

I completed the daily tasks that I missed
I need to complete 7 more on time so I can "fix the timeline"

#

todays daily I already completed

#

correction: 5 more

#

no, easy

delicate wren
#

"6 days of extreme activity"

#

(1 commit each day)

#

but it shows as peak activity

#

in 2021, I almost exclusively used a private code hosting server

#

there it had 200~600 commits

#

but it got lost to time

#

current one

#

Gitea

delicate wren
#

my Rust commits mostly are only a couple of lines

#

or, like

#

2000

delicate wren
#

back when I was doing this in Python, I once rewrote 300~600 methods from sync to async
it had to be one commit because I had a policy against checking in broken code

#

time to load the commit page

#

scrollbar (bottom left green thing)

#

okay, that's less than I though it was

#

I've finally learned that this commit message is a trap

#

like, I don't know whether or not I just openly lied in that commit name

#

because sometimes it looks like this

delicate wren
#

the code base actually has informal conventions on what such cryptic commit names mean

delicate wren
#

does it pass tests?

atomic hinge
delicate wren
#

sacrifices short-circuiting for readability

#

-1 means two different things in two different places, right?

atomic hinge
#
class caracter:
    __init__(self)
    self.info.name = {}
    self.info.age = {}
    self.info.gender = {}
ornate cobalt
#

!e

class Character:
  def __init__(self, name, age, gender):
    self.name = name
    self.age = age
    self.gender = gender


class Player(Character):
  def __init__(self, name, age, gender, money):
    super().__init__(name, age, gender)
    self.money = money


player = Player("Bob", 21, "Male", 12)
print(player.name, player.age, player.gender, player.money)
coarse hearthBOT
#

@ornate cobalt :white_check_mark: Your 3.11 eval job has completed with return code 0.

Bob 21 Male 12
delicate wren
#

@crystal aurora
recursive in Rust
I'm still not sure how I prefer to check for balanced-ness, so I just pick a random method each time
||```rust
fn node_height(node: &TreeNode) -> Result<usize, ()> {
let (hl, hr) = (tree_height(&node.left)?, tree_height(&node.right)?);
let (hmin, hmax) = (min(hl, hr), max(hl, hr));
if hmax - hmin > 1 {
Err(())
} else {
Ok(hmax + 1)
}
}

fn tree_height(tree: &Option<Rc<RefCell<TreeNode>>>) -> Result<usize, ()> {
match tree {
None => Ok(0),
Some(node) => node_height(&node.borrow()),
}
}

impl Solution {
pub fn is_balanced(root: Option<Rc<RefCell<TreeNode>>>) -> bool {
tree_height(&root).is_ok()
}
}

#

visits each node always

#

get height for left
check
get height for right
check

#

your solution can be re-arranged to get this result

delicate wren
#

* asymptotics, plural

#

there are tradeoffs

#

@pale pivot precedence seems to make clone and to_owned clone the Rc instead of the underlying object

atomic hinge
#

!paste

coarse hearthBOT
#
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.

pale pivot
#

those words dont make sense to me

#

sorry, still groggy brain

#

reading it 3 times clicked

delicate wren
#

rc.clone() resolves to Rc::clone(rc) instead of String::clone(rc.deref())

pale pivot
#

ye ye

#

got it now, TIL

atomic hinge
delicate wren
atomic hinge
#

$ /home/codespace/.python/current/bin/python3 /workspaces/project-peacock-rpg/0.00.05/utilities/roll.py
10
4
Traceback (most recent call last):
File "/workspaces/project-peacock-rpg/0.00.05/utilities/roll.py", line 63, in <module>
roll(dice_effect='A1d6', proficiency_bonus=3)
File "/workspaces/project-peacock-rpg/0.00.05/utilities/roll.py", line 45, in roll
for _ in range(int(die)):
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'

delicate wren
#

if it's a number, it's a number
pass it as a number
not as a string, not as None

#

dice_effect logic should be a separate function

#

which does parsing

#
def roll(die: int, sided: int, advantage: str | None = None, display_result=True, proficiency_bonus=0):
    rolls = []
    for _ in range(die):
        rolls.append(random.randint(1, sided))

    result = apply_advantage(rolls, advantage)
    result_with_proficiency = apply_proficiency(result, proficiency_bonus)

    if display_result:
        print(result_with_proficiency)

    return result_with_proficiency
#
  1. I type hinted what I changed
#
  1. defaults don't need to be type hinted
#

if they're what they should be of type

#

that's how Pylance interprets them most of the time, at least

#

but, like, Pylance might interpret it as display_result: Literal[True] = True

#
def parse_with_advantage(dice_effect: str, advantage: str) -> tuple[str, str]:
    parts = dice_effect.split(advantage)
    if len(parts) == 1:
        die, sided = parts[0].strip().split('d')
    else:
        die, sided = parts[0].strip().split('d'), parts[1].strip()
    return die_sided

def parse_dice_effect(dice_effect: str) -> tuple[int, int, str | None]:
    dice_effect = dice_effect.strip()

    if 'A' in dice_effect:
        advantage = 'A'
        die, sided = parse_with_advantage(dice_effect, advantage)
    elif 'D' in dice_effect:
        advantage = 'D'
        die, sided = parse_with_advantage(dice_effect, advantage)
    else:
        advantage = None
        die, sided = dice_effect.strip().split('d')

    return int(die), int(sided), advantage
#

!e

class thing:
    def __init__(self):
        self.s = 'thing()'
    def __neg__(self):
        self.s = '-' + self.s
        return self
    def __str__(self):
        return self.s
print(--------thing())
coarse hearthBOT
#

@delicate wren :white_check_mark: Your 3.11 eval job has completed with return code 0.

--------thing()
atomic hinge
#
    if dice_effect:
        dice_effect = dice_effect.strip()  # Remove leading/trailing whitespace

        if 'A' in dice_effect:
            parts = dice_effect.split('A')
            if len(parts) == 1:
                die, sided = parts[1].strip().split('d')
            else:
                die, sided = parts[1].strip().split('d'), parts[1].strip()
            advantage = 'A'
        elif 'D' in dice_effect:
            parts = dice_effect.split('D')
            if len(parts) == 1:
                die, sided = parts[1].strip().split('d')
            else:
                die, sided = parts[1].strip().split('d'), parts[1].strip()
            advantage = 'D'
        else:
            die, sided = dice_effect.strip().split('d')  # Strip whitespace from dice_effect
            advantage = None
    else:
        advantage = advantage

    if die is None or sided is None:
        raise ValueError("Missing die or sided value.")

delicate wren
#

how to fix rustfmt

#

I very much prefer against having -1 as height
but that's preference rather than something more objective

#

@ornate cobalt time to invent sleep-deprivation-oriented object model?

#

s doom

atomic hinge
#
def split_dice_effect(dice_effect):
    dice_effect = dice_effect.strip()  # Remove leading/trailing whitespace

    if 'A' in dice_effect:
        parts = dice_effect.split('A')
        if len(parts) == 1:
            die, sided = parts[1].strip().split('d')
        else:
            die, sided = parts[1].strip().split('d')[0], parts[1].strip()
        advantage = 'A'
    elif 'D' in dice_effect:
        parts = dice_effect.split('D')
        if len(parts) == 1:
            die, sided = parts[1].strip().split('d')
        else:
            die, sided = parts[1].strip().split('d')[0], parts[1].strip()
        advantage = 'D'
    else:
        die, sided = dice_effect.strip().split('d')  # Strip whitespace from dice_effect
        advantage = None

    return die, sided, advantage
pale pivot
#

sleep less object oriented programming

#

SLOOP

pale pivot
#
    if 'A' in dice_effect:
        parts = dice_effect.split('A')
        if len(parts) == 1:
            die, sided = parts[1].strip().split('d')
        else:
            die, sided = parts[1].strip().split('d')[0], parts[1].strip()

needs to be

    if 'A' in dice_effect:
        parts = dice_effect.split('A')
        die, sided = parts[1].strip().split('d')
atomic hinge
#

A1d2

delicate wren
#

!d re

coarse hearthBOT
#
re

Source code: Lib/re/

This module provides regular expression matching operations similar to those found in Perl.

Both patterns and strings to be searched can be Unicode strings (str) as well as 8-bit strings (bytes). However, Unicode strings and 8-bit strings cannot be mixed: that is, you cannot match a Unicode string with a byte pattern or vice-versa; similarly, when asking for a substitution, the replacement string must be of the same type as both the pattern and the search string.

delicate wren
#
pub struct Height {
    absolute: usize,
}

impl Height {
    pub fn from_conventional(conventional: isize) -> Self {
        Self::from_absolute((conventional + 1).try_into().unwrap())
    }

    pub fn from_absolute(absolute: usize) -> Self {
        Self { absolute }
    }

    pub fn conventional(&self) -> isize {
        (self.absolute() - 1).try_into().unwrap()
    }

    pub fn absolute(&self) -> usize {
        self.absolute
    }

    pub fn increment(&self) -> Self {
        Self {
            absolute: self.absolute.checked_add(1).unwrap(),
        }
    }
}

// PartialEq, Eq, PartialOrd, Ord
#

should probably also implement increment

#

it's not traits

#

(mostly)

delicate wren
#

though

#

can probably just use .absolute()

atomic hinge
#
            die, sided = parts[1].strip().split('d')[0], parts[1].strip()

why brake😭

delicate wren
atomic hinge
#

side becam list not int