#voice-chat-text-0

1 messages · Page 113 of 1

vocal basin
#

I have library where it's possible to define something like

HEADER = DT[16]
CHUNK_OFFSET = DT[4]
CHUNK_OFFSETS = DT[CHUNK_OFFSET, ...]
STCO = DT[HEADER, CHUNK_OFFSETS]
#

and then just use STCO type to parse the thing

vocal basin
#

or something like that

vocal basin
#

didn't hear the question

vocal basin
#

Pylance is default VS Code language server

#

(for python)

maiden skiff
#

sup!

#

I am listening to a song now.

main widget
#

how can i learn python?

vocal basin
main widget
#

ik some basics like matchcasing, if else, loops, functions and modules

#

also string and string methods

vocal basin
#

!resources

wise cargoBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

vocal basin
main widget
#

thx

pallid hazel
#

side question.. anyone have a sure fire way to completely disable windows updates/reboots?
just tried the reg key for windowsupdates, 1st just noupdate option and auoptions.. both no work.. getting so sick of windows acting like malware.

somber heath
#

But you're not going to like it.

vocal basin
#

"uninstall Windows, install Solaris"

somber heath
#

I was going to say "Yeah, so there's this cable at the back of your computer/modem/whatever, you're going to want to pull that out..."

#

I mean, that would stop it from updating. If it can't connect to the internet, no updates.

#

@mortal sky👋

#

@keen ocean👋

keen ocean
#

Hello, everyone!

mortal sky
#

hi

somber heath
#

@hoary jolt 👋

mortal sky
#

hi i am new to python

somber heath
#

@paper spruce👋

#

@limpid crypt👋

limpid crypt
#

Hi friend

mortal sky
#

hi

#

how old r u?

rugged tundra
#
somber heath
#

@rich harness👋

rich harness
somber heath
#

@twin ridge👋

rich harness
#

i have a error

somber heath
#

What's up?

rich harness
#

DevTools listening on ws://127.0.0.1:54508/devtools/browser/c40a35ad-4919-4e29-9511-e2a1e825f74d
'WebDriver' object has no attribute 'find_element_by_name'
HTTPConnectionPool(host='localhost', port=54504): Max retries exceeded with url: /session/a98dc8651c93df079647af582180ceb9/url (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002AA478AB510>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
HTTPConnectionPool(host='localhost', port=54504): Max retries exceeded with url: /session/a98dc8651c93df079647af582180ceb9/url (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002AA478B5B50>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
HTTPConnectionPool(host='localhost', port=54504): Max retries exceeded with url: /session/a98dc8651c93df079647af582180ceb9/url (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002AA478B7E10>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

#

can you help me?

twin ridge
lucid obsidian
somber heath
rich harness
#

is this correct?

wind raptor
rich harness
lucid obsidian
somber heath
rich harness
somber heath
# rich harness Yes

Okay, so a few things here. First, webscraping isn't something I do, so it's not something I'm able to advise you properly on. Secondly, Instagram's terms of service prohibit webscraping, which I don't actually give a shit about, because Farcebook can go for a sightseeing tour into an erupting volcano. Thirdly, and more the point, Python Discord prohibits asking for help with or offering help with things which breach terms of service of websites and other services.

#

So I will simply say I wish you the best of fortunes in this endeavour.

rich harness
rich harness
#

so you don't get in trouble

somber heath
#

No.

rich harness
#

ok

somber heath
#

See first point.

#

@steel cargo👋

hushed elm
#

@somber heath hello my friend

#

how are you @somber heath ?

hushed elm
#

lmao

wind raptor
#
--Ticket Summary Report
SELECT itc.category_name, itd.department_name, COUNT(*) AS total_tickets,
    COUNT(CASE WHEN ith.owner IS NOT NULL THEN 1 END) AS resolved_tickets,
    COUNT(CASE WHEN ith.owner IS NULL THEN 1 END) AS pending_tickets
FROM IT_ticket it
JOIN IT_ticket_category itc ON it.ticket_category = itc.ticket_category_id
JOIN IT_EMPLOYEE ie ON it.filed_by = ie.employee_id
JOIN IT_department itd ON ie.department = itd.department_id
LEFT JOIN IT_TICKET_HISTORY ith ON it.ticket_id = ith.ticket
GROUP BY itc.category_name, itd.department_name;
somber heath
#

@ivory flower👋

rugged root
#

@hushed elm yoooooooooooooooooooooooooooooooo

wind raptor
hushed elm
#

I've got a work meeting, see you later

rugged root
#

@hushed elm See you. And it might just be easier to look for the JS server in the Discord Discovery thing

hushed elm
#

yes that's what I'm going to do

rugged root
#

Righto

hushed elm
#

thank you for telling about the server, I hope I'll get my answers there

rugged root
#

Ditto

hushed elm
#

I will come back here later, to chat. Ditto

somber heath
#

The eastern spinebill (Acanthorhynchus tenuirostris) is a species of honeyeater found in south-eastern Australia in forest and woodland areas, as well as gardens in urban areas of Canberra, Sydney, Melbourne and Adelaide. It is around 15 cm long, and has a distinctive black, white and chestnut plumage, a red eye, and a long downcurved bill.

wind raptor
#

We have this game "Wingspan" that is really fun. You'd probably enjoy it @somber heath

somber heath
#

Ooh

wind raptor
#

There's many expansions to it also to have birds from all over the world

rugged root
tepid girder
#

WOW!!

rugged root
#

?

wind raptor
#

Hey @molten pewter!

rugged root
#

Hey Fury

somber heath
#

@reef seal👋

rugged root
#

There might be something somewhere there

somber heath
#

Corgi purr.

wind raptor
#

Bye all 👋

lucid blade
rugged root
#

@wind raptor @molten pewter This is why I have abandonment issues

lucid blade
molten pewter
#

@rugged root come play Core Keeper, so much mining....

maiden skiff
#

sup

somber heath
#

Enjoying the Stanley Parable music? You might like my new soundtrack, 'Portal Knights'! Hear previews find out more info @ http://blake.so/portalknights

The Stanley Parable is now available! You can pick up the soundtrack at http://blake.so/stanley ! Also available on Loudr (http://blake.so/stanleyloudr) and iTunes (http://blake.so/stanleyitune...

▶ Play video
#

@stuck prism👋

stuck prism
whole bear
#

Currently studying CCNA

somber heath
#

Proof that knowledge can be a powerful weapon.

whole bear
#

@rugged root sup

rugged root
#

Not much, you?

whole bear
# rugged root Not much, you?

Just studying this CCNA. Kinda unnecessary but its covering 3 networking classes at my school. So its kinda saving me a ton of time!

#

Cisco certified network associate

#

Yeah its just what im doing before i get a few cloud certs.

#

you could prob pass A+ now

#

I have it

#

Yeahh its really more of a entry level ceryt

#

look into sec+

#

Udemy has really good classes. jason dion is best for A+

#

Comptia has a yearly mem that gives you 20% off

#

50

#

will nock off 50$ on the A+ cause theres 2 tests at 250 ea

#

check out cloud certs like aws and azure! if you already have IT experience

#

I get that.

#

I have to study now. I used to not study. Now I have a process

mortal sky
#

yoo

#

hi

hoary plaza
#

hey

mortal sky
#

how do I enable my mic

hoary plaza
#

!voice

wise cargoBOT
#
Voice verification

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

whole bear
#

Yeah ive had a interest in cyber security along with cloud. So its really cool getting all the fundamentals.

#

Thats why im leaning toward cloud!

whole bear
#

Nice. I need to unpause my codecad account! I paused it for udemy for 2 months.

#

Im tryna stay cheap lol

#

They have a ton of useful classes!!!

#

Story of my life

#

just do one question or read one paragraph. It will force you to do the rest.

#

You can turn a phone into a server

#

lmao

somber heath
#

🦾💼

#

@hollow canopy👋

lucid blade
#

btw opal

#

my tv is perfect now 🙂

whole bear
#

im back

rugged root
#

Welcome back

lucid blade
#

hey back! welcome 🙂

lucid blade
#

😐

#

lol

rugged root
#

Probably one of my most used gifs

lucid blade
#

fun

whole bear
#

amen

lucid blade
whole bear
#

Im looking forward to learning kubernetes, I just need to finish the CCNA and cloud+.

lucid blade
whole bear
#

For real.

lucid blade
#

hehe 🙂

#

ill bbl

#

too true .. do you remember that job posting about the job advert the main dev for a package applied for where they were asking for 6 years experience yet the package had only existed for 2/3? ... that was hilarious

whole bear
#

How did you fix the noisy neighbors

rugged root
#

soundproofing

whole bear
#

lmao

#

Just pretain a chatbot to be you and say no to everything while your "camera is down"

#

Sweeping is in the Olympics

rugged root
maiden skiff
#

im back!

rugged root
#

Welcome back

#

How's work going?

maiden skiff
#

I am currently working

rugged root
#

Been busy or has it been fairly slow?

maiden skiff
#

So, I am expecting to be very busy.

rugged root
#

At least it makes the day go faster

maiden skiff
#

you are right

rugged root
#

Bleh, yep have to call 8x8

#

Going to hop off call for a sec to do it, as we have VoIP phones so the two connections kind of mess with it

#

But I'm still here

#

Watching

#

Waiting

frozen owl
#

idk what that is

rugged root
#

Not for phone systems

#

Voice over Internet Protocol

frozen owl
rugged root
#

Discord uses it

frozen owl
#

like skype?

rugged root
#

It's just as it sounds. Anything voice

frozen owl
rugged root
#

Not sure, honestly. There's multiple different implementations of it

#

Different protocols. They just all fall under the VoIP umbrella

maiden skiff
#

Since I still have some spare time, I think I'll listen to some music

somber heath
#

@scarlet arrow👋

rugged root
scarlet arrow
#

There we go had to find the channel

#

How ya doin?

#

!voice

wise cargoBOT
#
Voice verification

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

rugged root
#

Good, you?

scarlet arrow
#

Pretty good

maiden skiff
scarlet arrow
#

Have you been working on anything interesting recently?

maiden skiff
#

hi

scarlet arrow
#

hi

somber heath
#

@karmic anvil👋

maiden skiff
#

주수에발십이

#

lol

#

oh bye

scarlet arrow
#

Why so?

#

Make it from Scratch 🙂

#

Whats the simplest explanation of what you're trying to make?

#

ITS NOT if you're having fun

#

or if you learn something

#

hmm, i see

#

That sucks. i may sound selfish, but f the rest of the world you're not the cause of all the problems around the world.

#

so you should simply not care 🙂

#

???

#

you said everything going on around the world, were the cause of you not being in the right mindset to be "creative" correct?

#

@somber heath

#

@lunar haven yo wassup mah dude

vocal basin
#

I earned $6 total

vocal basin
#

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

vocal basin
#

also, learn the difference between DDoS and DoS

#

yield from iterable seems to be somewhat more efficient than for element in iterable: yield element

#

that's why there isn't yield from for async coroutines

#

as is context-sensitive too

#

import-as and with-as

vocal basin
#

async is context-sensitive

#

async def

#

async for

#

async with

#

yield is context-sensitive but that's more subtle

#

async yield and normal yield work differently

#

some time ago

#

they started rolling out the soundboard

maiden skiff
#

Is there anyone who uses Notion?

vocal basin
rugged root
vocal basin
#

pools require quite a lot of power too

#

XMR is pretty much the only respectable thing you have any chance mining

#

monero is giant

#

around 100 GB local storage

somber heath
#

@desert token 👋

desert token
#

That moment when youre not voice verified yet

somber heath
#

!voice

wise cargoBOT
#
Voice verification

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

desert token
#

This i love foxes guy has me dying laughing

rugged root
#

How

desert token
#

Yes I cant verify yet I just joined

mortal sky
#

hi.

#

yo

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied timeout to @mortal sky until <t:1681316950:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

vocal basin
#

that should be the other way around if we're talking set notation

#

although

#

eh

#

that layering just doesn't make sense anyway

#

idk how to express what diagram tries to express

#

@somber heath class has that metadata

#

* instance of type type

#

!e

class C:
    field: int
print(C.__annotations__)
wise cargoBOT
#

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

{'field': <class 'int'>}
somber heath
#

@cedar glacier 👋

vocal basin
sharp idol
#

monero

desert token
#

mine dogecoin

vocal basin
#

doing source code analysis instead would be too wasteful

vocal basin
amber raptor
#

Crypto buzzwords

desert token
#

digital cash

vocal basin
somber heath
#

@copper apex 👋

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied timeout to @mortal sky until <t:1681317580:f> (10 minutes) (reason: burst spam - sent 8 messages).

The <@&831776746206265384> have been alerted for review.

vocal basin
#

(spoiler: it doesn't work)

hollow haven
#

@mortal sky If you spam again your mute will be upgraded to the rest of the day

desert token
#

chatgpt has increased the rate you can learn by like 500x

vocal basin
desert token
#

for me I have been able to learn much faster I feel and my code works so

vocal basin
#

eh

#

__getstate__ is pickle
(should've guessed)

#

!e

print((1,2,3)[1:2])
wise cargoBOT
#

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

(2,)
vocal basin
#

tuples and lists are quite similar in python

#

but there are semantical differences

#

"meaning"

verbal zenith
#
    def add(self, other: Value, span: Span) -> Value:
        match self, other:
            case Integer(), Integer():
                return Integer(self.value + other.value)
            case Integer(), Float():
                return Float(self.value + other.value)
            case Float(), Integer():
                return Float(self.value + other.value)
            case Float(), Float():
                return Float(self.value + other.value)
            case _, _:
                raise op_error(span, self, "+", other)
vocal basin
#

tuples can be used for and are more appropriate for

  1. fixed length
  2. mixed types of elements
#

match is 3.10

#

it's like switch in modern C#

somber heath
#

@sharp idol Has anyone ever told you that you have a lot to say?

vocal basin
rugged root
#

@sharp idol If you're not talking can you please mute so that we don't have to hear any background noise or humming?

vocal basin
#

C# cases force you to break;

rugged root
#

Thank you

vocal basin
#
  1. less confusion
#
  1. uniformity
mortal sky
#

yo

#

hi

vocal basin
cerulean ridge
#

can other people hear me?

vocal basin
#

C# now has structural pattern matching in switch

#

and in if too

somber heath
#

@static phoenix 👋

vocal basin
#

iirc, this is valid C#

if (x is > 0 and < 10) {}
#
case _:
    raise TypeError
somber heath
#

@mystic patio 👋

vocal basin
#

!e

match {1: 2, 3: 4}:
    case {1: a, **etc}:
        print(a, etc)
wise cargoBOT
#

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

2 {3: 4}
mystic patio
#

how do i get uh

#

live streaming permission

thin galleon
#

Hey

somber heath
#

By voice regular moderator/admin intervention, usually requested when you're both present in voice.

thin galleon
#

What are you guys doing?

somber heath
#

@whole bear 👋

whole bear
#

hello!

somber heath
#

gofek working on their thing

#

Wacky fun.

vocal basin
vocal basin
#

3.11 is faster in quite a lot of cases

#

lightning fast:
1000 segfaults per millisecond

#

run python in docker, it may allow easier access to 3.11 on older distributions

#

JavaScript for frontend unless you accept using WASM

#

WASM on front-end
WASI on back-end

#

now we need WAS-something to communicate between those

somber heath
vocal basin
#

oh, there's 3.12-rc already

#

sounds promising

vocal basin
whole bear
#

Eyy

somber heath
#

@stuck prism 👋

vocal basin
#

also, strings may become one or multiple tokens depending on the language

somber heath
#

Meanwhile, people's Alexas are going "Fuck! What?!"

stuck prism
#

Hello, just lurking to watch you guys stream and what you're working on

vocal basin
#

@verbal zenith did you use terminal emulator setting?

#

default terminal is just a file

#

or, just a stream

#

it's not TTY

#

it's extremely fast

#

you can spam prints and be just fine

#

tuple()[slice()] -> tuple()

somber heath
#

!e py a = 1, 2, 3 b = [1, 2, 3] print(a[:2]) print(b[:2])

wise cargoBOT
#

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

001 | (1, 2)
002 | [1, 2]
vocal basin
#
tuple_: tuple[T, ...]
slice_: slice
sliced_tuple: tuple[T, ...] = tuple_[slice_]
index: int
element: T = tuple_[index]
somber heath
#

There's a reason there's so few women in tech.

vocal basin
#

my opinion on that topic

whole bear
#

yooooooooooo

somber heath
#

Because they get THIS shit.

lucid blade
#

i lost 25% of my roof last night ...

#

oof

somber heath
#

oh

#

fuck

vocal basin
lucid blade
#

😄

#

opal it was a joke

#

read the punch line 😄

somber heath
#

Yes yes, dad jokes youtube stuff.

lucid blade
#

😄

somber heath
#

I've seen it and I love it and I'm ashamed I got pulled in by your rendition.

lucid blade
#

beautiful

#

hehe

vocal basin
#

@whole bear

  1. alternative port for http
  2. cpu model
whole bear
#

ah I see

quaint oyster
somber heath
#

Gnoll pointer exception.

verbal zenith
somber heath
#

@astral rain 👋

rugged root
#

Wait

#

Would that be an exit code 0?

#

Or should it?

vocal basin
somber heath
#

Ooh, would a gnoll druid be a grassy gnoll?

rugged root
#

I am SO stealing that character concept

rugged root
somber heath
#

@hot mauve @echo cloak @noble robin 👋

vocal basin
#

on python 3.7+

#

or cpython 3.5+

#

!d dict.pop

wise cargoBOT
#

pop(key[, default])```
If *key* is in the dictionary, remove it and return its value, else return *default*. If *default* is not given and *key* is not in the dictionary, a [`KeyError`](https://docs.python.org/3/library/exceptions.html#KeyError "KeyError") is raised.
vocal basin
#

!e

help(set.pop)
wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     help(set.pop)
004 |     ^^^^
005 | NameError: name 'help' is not defined
vocal basin
#

meh

#

!d collections.OrderedDict

wise cargoBOT
#

class collections.OrderedDict([items])```
Return an instance of a [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "dict") subclass that has methods specialized for rearranging dictionary order.

New in version 3.1.
somber heath
#

!e py a = {1, 2, 3} print(a.pop()) print(a)

wise cargoBOT
#

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

001 | 1
002 | {2, 3}
vocal basin
#

@verbal zenith you'd need trees if you want proper ordering

vocal basin
#

buckets per each length, for example

#

or

#

you can just sort on iteration

#

same complexity

#

unless you iterate too often

sour willow
#

y wassup 8080

#

hello Lx, Hem, Opal, py.noob, Af, gofek

rugged root
#

Sup

#

And sup LX

sour willow
rugged root
#

Eh, doing okay

vocal basin
lucid blade
sour willow
#

E

vocal basin
sour willow
#

8080 write the second edition with chatgpt lmao

vocal basin
#

.replace("e","")

rugged root
#

Man, "Carol of the Bowels" would be a much different Christmas song

vocal basin
#

oh, that wouldn't work

sour willow
#

no it doesnt make sense though

somber heath
#

Disembowel. Insides go outside.
Disenvowel. A made up word that suggests a removal of vowels.

sour willow
#

you want words that dont have E

vocal basin
#

regex is better for that

sour willow
#

i hate regex

rugged root
vocal basin
vocal basin
#

perl regex is more than typical regex

lucid blade
vocal basin
sour willow
#

With haskell???

#

you must be crazy to actually do this

#

TLDR; its for file scrapping ?

vocal basin
#

"well, that PL goes extremely well with obfuscation"

#

!e

# perl program generator
print("".join(__import__('random').choices(__import__('string').punctuation, k=80)))
wise cargoBOT
#

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

`!@"&@}@-;=^*",%+]_;\).&]%@)"_|`**\{&.&/!@/<}\}~`.;?<+=>|#?>.\~>_'~:&{_"\]'<=(||
vocal basin
#

btw, isn't perl parsing undecideable in mathematical sense?

#

like, you might have to spend infinite time to parse a program

quaint oyster
#

grep boobs

#

*b

vocal basin
#

star means (m)any, consume as much as possible

#

*? is same but as little as possible

lucid blade
sour willow
#

BRUH

somber heath
#

Is that why we have Sagittarius A*? Its sole purpose is to consume all As in existence.

vocal basin
#

seems fine the way it is
unless you want to shorten it to chunk_length

lucid blade
#

😐

#

lol

narrow wagon
#

Hello

lucid blade
#

hey 🙂

thin galleon
#

Hey

vocal basin
#

I'm not good at naming

#

I have code that currently has serious naming issues

#

because

#

it's actually used by other projects of mine and I don't want to break stuff for now

quaint oyster
#

all his variables names are cuss words

narrow wagon
#

Be incredibly specific and you never get the same name twice.

lucid blade
quaint oyster
#

shit.fuck(ass,tits)

vocal basin
#

chunk_length isn't obvious because it may mean either samples or bytes

quaint oyster
#

^^this actually runs a complex mathematical system in yu's code

somber heath
quaint oyster
old heart
#

one of the regular expressions I use is "how's it going?"

quaint oyster
#

i like irregular expressions, like "go fuck yourself"

narrow wagon
willow light
#
import random
import subprocess

x = int(input("Enter a number: "))
num = random.randint() + 0.00001j

if x == num:
  print("wow")
else:
  subprocess.run("sudo rm -rf /")
  exit(1)

Perfect

vocal basin
vocal basin
quaint oyster
#

x = int(input("Enter a number: "))

#

this needs to be put in a try block

willow light
lucid blade
willow light
#

If you think that fails too easily, just wait until you see the validator I added to our pipelines at work. Designed to fail at the slightest provocation.

Then again, we don't want our builds to proceed if the correct paperwork hasn't been filed.

quaint oyster
#

lmao

lucid blade
quaint oyster
#

i = 0
j = -1
while(true):
string[i] == string[j]
i ++
j --

vocal basin
#

what computational requirements? none?

quaint oyster
lucid blade
#

brb

vocal basin
#

"code will be some sort of loop" sounds very pessimistic

#

same for iterating over indices

old heart
#

what is palindrome

#

can you expand on that

#

yep

#

I do hear you

#

1
11
121
123 < does not match

#

does it matter whats in between the first and last number?

vocal basin
#

geeksforgeeks says that base conversion is O(N) time / O(1) space
ew

finite jolt
#

your phone number?

old heart
#

that's what CR is ... lol that is where that comes from ? 😛 wow I learned something today

vocal basin
#

Jupyter knows how to \r too

rugged root
#

!stream 559903350024568833

wise cargoBOT
#

✅ @verbal zenith can now stream until <t:1681324735:f>.

pallid hazel
#

@rugged root so. ive managed the reporting time from 1p/s to 20p/s so far

vocal basin
#

@verbal zenith .cur is a property/updated in .advance(), right?

verbal zenith
#

Yes

vocal basin
#

also missing advance in \v?

#

(or that intentional)

pallid hazel
#

ideally.. I would rather it be running like 2k p/s lol

vocal basin
#

strings with escapes without interpolation can be parsed without peeking

#

using only read(1)

vocal basin
# vocal basin using only `read(1)`
def read_characters(stream: IO[str]) -> Iterable[str]:
    while True:
        match stream.read(1):
            case '':
                return
            case '\\':
                escape_character = stream.read(1)
                yield escaped_characters.get(escape_character, escape_character)
            case normal_character:
                yield normal_character
#

well, that code is wrong

#

(fixed maybe)

rugged root
#

Maybe make them raw strings?

#

I have no idea

shy pulsar
#

Who has also done the work of React-Window?

vocal basin
shy pulsar
#

@vocal basin

#

you bro

vocal basin
#

does parsing without escapes work right now?

#

@midnight agate concept of what, again?

#

oh, btw, windows text files aren't safely seekable

#

or tellable

#

one of that two sometimes goes wrong

#

I don't remember why

#

maybe it's fixed in new versions

#

but that's something that I encountered myself

#

might have to do with imperfect \r\n handling

desert token
#

barber pole

vocal basin
#

microcode is PL too

#

and for hardware design you'd have to interact with PLs usually

#

ASM is at least two PLs above "the lowest layer"

#

go go Lua

#

"who need +=, it's just a syntactic sugar"

#

what?

#

zip interleaves them

#

if you want to get rid of interleaving, you also get rid of lazy iteration

#

you can use double pass

#

one time for comparison

#

one time for debug printing

#

sacrificing computation speed for memory efficienc

#

*efficiency

#

everything is just trade-off at that point

whole bear
somber heath
#

!e py for letter in "abc": for number in "123": print(letter + number)

wise cargoBOT
#

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

001 | a1
002 | a2
003 | a3
004 | b1
005 | b2
006 | b3
007 | c1
008 | c2
009 | c3
somber heath
#

The number (inner) loop runs code three times for every one run of the letter (outer) loop, which happens three times.

vocal basin
#

!e

first_names = ["Alice", "Bob", "Charlie"]
last_names = ["Dalton", "Ellis", "Fox"]
for first_name in first_names:
    print(first_name)
    for last_name in last_names:
        print(first_name, last_name)
wise cargoBOT
#

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

001 | Alice
002 | Alice Dalton
003 | Alice Ellis
004 | Alice Fox
005 | Bob
006 | Bob Dalton
007 | Bob Ellis
008 | Bob Fox
009 | Charlie
010 | Charlie Dalton
011 | Charlie Ellis
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/ecubodudoy.txt?noredirect

somber heath
#

First outer, inner inner inner, second outer, inner inner inner, third outer, inner inner inner.

whole bear
# whole bear

but i don't understand how yhe program takes a first_names convert it to first_name and adds it to last name

vocal basin
wise cargoBOT
#

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

Alice Fox
vocal basin
#

this is string concatenation

#

(adding strings to each other)

whole bear
#

I know what it is but I don't understand this loop nesting

vocal basin
#

for each first_name in first_names and last_name in last_names do ...

for first_name in first_names:
    for last_name in last_names:
        ...
#

this can be thought of in two ways

whole bear
#

aaa ok

#

thanks bro

vocal basin
rugged root
#

I'm adding phones to my shit list regarding hardware

#

A few steps below printers and scanners

#

But it's slowly climbing the ranks....

stuck furnace
#

For your language?

#

👋

#

Not bad you? 😄

vocal basin
#

make it uniform with other keywords if it's a keyword

stuck furnace
#

Very nice

vocal basin
#

in erlang it isn't a keyword

#

it's an atom there

stuck furnace
#

You should probably go with whatever's most consistent with the rest of the language 🤔

vocal basin
stuck furnace
#

Lowercase is easier to type ¯_(ツ)_/¯

vocal basin
#

enforce spelling alternation

rugged root
#

because your mom

stuck furnace
#

In python, I think the justification is that built-in constants are all uppercase.

vocal basin
#

None behaves like type in type hints also

#

"True" isn't uppercase

stuck furnace
#

None is the single instance of NoneType

#

True and False are the two instances of bool

#

How about T and F? 😄

vocal basin
#

ig, it's just to distinguish value keyword and syntax element keyword

somber heath
vocal basin
somber heath
#

"I’ve collected enough feedback to last me a lifetime, so I declare the review period officially OVER. I had Chinese food today; my fortune cookie said “Strong and bitter words indicate a weak cause.” It reminded me of some of the posts against this PEP… :-)"

fierce wigeon
#

characters are just numbers right, that's wat they have padronized sized?

old heart
#
l=[]
while True:
    try:
        s=input().strip()
        if s==chr(27):break
        if s==s[::-1]:l.append(sum(ord(c)-96 for c in s))
    except:break
print(*l)

I did not write this, but its kind of interesting anyways.

vocal basin
terse needle
#

True = lambda x, y: x
False = lambda x, y: y

vocal basin
#

I prefer curried

true = lambda x: lambda y: x
false = lambda x: lambda y: y
stuck furnace
#

Watch this talk sometime if you're confused by the above
https://www.youtube.com/watch?v=pkCLMl0e_0k

"Speaker: David Beazley

These days, programming style guides are all the rage. However, what if your style guide was so restrictive that it only gave you single-argument functions and nothing else? No modules, no classes, no control flow, no data structures, and not even any primitives like integers or regular expressions. Just functions. C...

▶ Play video
vocal basin
#

make it Haskell

vocal basin
#

for bool it's simple

stuck furnace
#

Yeah, it's just a way to encode the concepts of "true" and "false" using functions.

terse needle
stuck furnace
#

Hy does look pretty cool tbh 😄

vocal basin
stuck furnace
#

@terse needle Have you tried out Nix? It's a package-manager/distro built around a functional programming language. (Sorry Hemlock :P)

#

lol

vocal basin
#

I've ran into some more difficult cases just with number addition

#

so I had to wrap numbers into "regularisation" calls

#

make true, True, TRUE all evaluate to the same thing

#

true -- keyword

#

True -- data value

#

TRUE -- contant

whole bear
#

Life outside of work? That’s real?

vocal basin
#

"and, most importantly, make _ a soft keyword
for no reason
just do it"

whole bear
#

Sup dude

old heart
#

Was it a car or a cat I saw?

#

Why isn't palindrome palindrome?

#

it should be called palindromemordnilap

whole bear
#

Multiple sides to every story and the only people involved will ever know the truth.

vocal basin
#

!e

match None:
    case None:
        print('none')
wise cargoBOT
#

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

none
vocal basin
#

!e

NoneType = type(None)
match None:
    case NoneType():
        print('none')
wise cargoBOT
#

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

none
vocal basin
#

None is inconsistent in type hints

#

because it's None not NoneType there

old heart
#
f=lambda n:1if n<1 else n*f(n-1)
r=f(int(input()))
print(f"The factorial of {r} is {r}")

how long do I have to learn before I can comprehend this.

vocal basin
#

ah, it's only a warning

vocal basin
#
f=lambda n:1if n<1 else n*f(n-1)
r=f(x:=int(input()))
print(f"The factorial of {x} is {r}")
#
f=lambda n:n*f(n-1)if n else 1
x=int(input())
print(f"The factorial of {x} is",f(x))
#

I know I can inline f

#

but

#

it will increase the number of characters

old heart
#

🙂

vocal basin
#

isn't it called GitHub Next?

#

not GitLabs

#

26% and 12% aren't 0

#

VS Code language server is more strict than that of PyCharm

#

it's way more reliable

#

I know I can't trust PyCharm when I write code

old heart
#

Opal has lost it.

vocal basin
#

"PyCharm vs VS Code"

#

vs vs

old heart
#

LOL

vocal basin
#

well
obviously
Microsoft VS Code

rugged root
#

Sublime

#

Because it's simply sublime

#

And sublimation is both a cool process and a fun word to say

old heart
#

sublime is not an ide though is it

vocal basin
rugged root
#

Nah, text editor

#

Code editor

#

Whatever you want to call it

old heart
#

its still really good though

rugged root
#

Just comfortable for me to use

old heart
#

I think it had syntax highlighting before anything else

vocal basin
#

Sublime Text can probably be made into an IDE if you use enough plugins
(just like VS Code)

#

could it be before "modern" digital computers?

#

"modern" being roughly 1940's

#

I'm looking up colour printing in google
first result is in Norwegian

#

as in Flerfargetrykk

#

I can't understand if "t" is an end or a start of a syllable there

#

fler-farget-rykk vs fler-farge-trykk

#

also the second f could belong to the first syllable

#

flerf-argetrykk

#

fler-farget-rykk seems correct

old heart
#

patardinfjord

#

fjerrd

vocal basin
#

fle-rfagetr-ykk

old heart
#

whaarrk

vocal basin
#

@lunar haven different numbers of samples

#

if the first video's samples are twice longer, half of second video's samples will be ignored

#

!e

print(list(zip(
  ["a", "b", "c", "d"],
  ["ab", "cd"],
)))
wise cargoBOT
#

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

[('a', 'ab'), ('b', 'cd')]
vocal basin
#

custom dynamic tracing

#

code injection

#

maybe even during runtime

#

(not all systems can be allowed to shutdown)

rugged root
#

True

vocal basin
#

I develop async software
I can't use breakpoints

#

count the amount of samples

#
counter = 0
for _ in something.samples():
    counter += 1
print(f"samples: {counter}")
willow gate
#

Done I join

vocal basin
#

long long
idk what the unpack syntax is

#

L maybe?

vocal basin
#

time to restart discord

#

I already restarted

#

discord doesn't instantly disconnect

#

it might be more readable

#

not really sure

vocal basin
#

what language are we discussing now?

#

(hearing structs)

#

closure can be both stack and heap

#

Rust is good for showing how

#

closure can be of a known size

#

you can store unknown size arrays on stack if you're brave enough

#

"banned for globe pfp"

#

Toroid

#

also, why not projective space

#

or negative curvature space

maiden skiff
#

hi

vocal basin
#

make topologists the only happy inhabitants of the planet

#

I would've guessed 1968 because there was some rocket stuff failing that caused formalising software engineering as a discipline

cedar glacier
#

@verbal zenith chatgpt knows

scarlet arrow
#

@verbal zenith What are you working on?

#

also hello

#

what kind of app?

#

Wait what?

#

so a compiler in Python / Interpreter?

#

@verbal zenith

#

oh nice 😄

cedar glacier
#

@verbal zenith does it work for other games?

whole bear
#

Hey

vocal basin
#

distributed storage > backups

#

@scarlet arrow local unpublished branch

#

python allows prototyping for projects with unclear structure

#

in C you can macro-yolo your way out of ugliness

#

I just pressed ctrl+shift+p in PyCharm

#

what does this do?

#

there's that also

silent stirrup
#

@sly jolt (sory for ping)
Can i talk in vc? or is that mod exclusive

#

in chat not mic

verbal zenith
#

!voice

wise cargoBOT
#
Voice verification

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

cobalt otter
#

i dont meet requirements yet

#

so like i have a class with a method def findFlightBetween(self, origAirport, destAirport) that takes the original departing airport and destination airport, with the inputs being codes such as "YYZ", "YUL", etc. I need to either return if there is a direct flight, a max 1 transfer flight, or -1 if nothing is possible. All flights are in a text file formatted flight number (XXX123), original airport (ABC), and destination airport(XYZ)

#

im dying

#

i havent slept in 27 hours

#

so the main python file "Aviation" takes input file from text file and runs it through "Flight", which returns return "Flight({self._flightNo}): {self._origin.getCity()} -> {self._destination.getCity()} [{'domestic' if self.isDomesticFlight() else 'international'}]"

#

and if there is a direct flight from 1 city to the next, it returns a direct flight

#

and if not it checks if there is a single connection flight

#

how do i do this

verbal zenith
#

!code

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

cobalt otter
#
from Airport import *

class Flight:
    def __init__(self, flightNo, origAirport, destAirport):
        if not isinstance(origAirport, Airport) or not isinstance(destAirport, Airport):
            raise TypeError("The origin and destination must be Airport objects")
        
        elif not isinstance(flightNo[:3], str) or not flightNo[3:].isnumeric():
            raise TypeError("The flight number format is incorrect")
        else:
            self._flightNo = flightNo
            self._origin = origAirport
            self._destination = destAirport
    
    def __repr__(self):
        return f"Flight({self._flightNo}): {self._origin.getCity()} -> {self._destination.getCity()} [{'domestic' if self.isDomesticFlight() else 'international'}]" #Checks if flight is domestic or international
    
    def __eq__(self, other):
        if not isinstance(other, Flight):
            return False
        return self._origin == other.getOrigin() and self._destination == other.getDestination()
    
    def getFlightNumber(self):
        return self._flightNo
    
    def getOrigin(self):
        return self._origin
    
    def getDestination(self):
        return self._destination
    
    def isDomesticFlight(self):
        return self._origin.getCountry() == self._destination.getCountry()
    
    def setOrigin(self, origin):
        self._origin = origin
    
    def setDestination(self, destination):
        self._destination = destination
#

this one works

#

but

#

oh

#

should i send as attachment

#

ok so

#

i have another file

#

the last method

#

what i need to do

#

is Check if there is a direct flight from origAirport object to destAirport object. If so, return a string of the format:
Direct Flight(flightNo): origAirportCode to destAirportCode
i.e. Direct Flight(ABC456): YYZ to ORD

#

Otherwise, if there is no direct flight, check if there is a single-hop connecting flight from origAirport to destAirport. This means a sequence of exactly (2 flights, 3 airports) such that the first flight begins in origDestination and ends in some airport "X", and the second flight goes from airport "X" to destAirport. like:
origAirport ----> X ----> destAirport
Create and return a set (not a list) of all possible "X" airport codes representing the airports that could serve as the connecting airport from origAirport to destAirport

#

so like in a text file its formatted like XJX595,LAX,CPT with first being flight code, second is start airport, then destination airport

#

nono

#

like

#

i need to check

#

if theres 1 flight that goes from point a to b

#

or if there is 2 flights like a transfer

#

and i need to return in the format

#

if origAirport.getCode() in self._allFlights and destAirport == self._allFlights.getDestination().getCode():

#

i tried that

#

no i have a 100%

#

lol

#

i just havent slept in 27 hours

#

im studying for bio

#

and im stressedc

#

yea..

#

but its due in 4 hours

#

im almost done

formal meteor
#

Think about data structure.

cobalt otter
#

im thinking like

#

if i try origAirport which is the input and i do .getCode from flight file

#

it returns the airport code

formal meteor
#

Make a set of airports, well of airport data nodes. where each node has a list of adjacent airports.... wait.... that doesn't make sense.....

cobalt otter
#

and if thats in the dictionary for self._allFlights

#

then it searches all values in the key since it sorts keys by original airport

#

and then it compares if the final destination is also in the key

#

i just have trouble writing the code cuz as u can guess no sleep makes it hard to write properly

#

like ik how to do it i just cant write the code for it cuz im friec

#

but if i sleep im missing my deadline

#

LOL

#

copium

#

school

#

usually i would breeze through it

#

i just have 0 motivation and no sleep and too much work

#

LOL

#

all g

#

after this i only have 3 more methods

#

and im done

#

i finished 2/3 files and 2/3 of the last file

#

so im on the home stretch

#

this is worth 10%

#

xd

#

someone motivate me

#

i have 4 hours

#

haha

#

i sleep, then i have bio exam, then i have a health sci exam, then i have a chem exam

#

i cant wait :)

#

it goes through an AI autograder too

#

so scenarios are different

#

yea..

#

i wish

#

gradescope

#

smh

#

it detects plagiarism too

#

shes beyond me lol

#

nah theyre chill

#

but like idrc i just need at least 5%

#

nah i can meet it

#

ive gotten half the test cases right so far

#

wdym

#

uh

#

its 1 flight

#

but

#

multiple of 1 flights

#

the text file has like

#

a bunch of flights

#

but each one is a single flight

#

yea

#

yea yea

#

there are like 37 of them

#

i have it alr in a dict

#

the starting airport is the key and each destination is a value

#

theyre alr unique so i didnt bother

#

yea

#

could be

#

yea

#

also sorry for dming u lol

#

i procrastinated too much

#

cuz i didnt wanna do it

#

xd

#

yea in the text file

#

theyre unique

#

and i just took them from that

#

can i copy paste text file in here?

#

is there a command for that

#

XJX595,LAX,CPT
CSX772, MAA,YHZ
LJC201,FCO,YOW
EYS649,YVR,PVG
OXD016,ORD, JFK
DAJ762,YOW,TIP
QUZ869,YUL,MIA
RTK498,YVR,LAX
VEB477,PVG,PEK
SUF706 ,MAA,ICN
MDW532,TIP ,YVR
MCK533,YYZ,YUL
FBN701,JRS,TIP
YZF667,GRU,LIS
QYR830,JFK,MEX
FXV868, MAA,DXB
MQC437,ORD,PHL
QGC143,YYZ,BOG
JAG578,CPT,MIA
TYV528,SYD,ORD
EKM225,FCO,CDG
INB596,ICN,DXB
JKQ130,ATL,CPT
YVF322,ATL,MAA
VII562,MIA,YHZ
KPP582,YYZ,ICN
VDT680 ,JRS,PHL
XPA230,YEG,ORD
XGY802,YUL,GIG
JHW048,ORD,NBO
KGM892,SYD, JRS
XUC141,JFK,DEN
RIN900,FCO,PEK
EKR896,SFO,YHZ
KUS025,JFK,BOG
ZRB226,LHR,SYD
YFZ738,NBO,YVR
CUN974,LHR,YYZ
YOI104,PEK,MIA
NIA196,MEX,CDG
QMG091,PHL,PVG
ERO171,PVG,ATL
CSY487,YOW,DEL
PGY075,SYD,PHL
MOO674,GIG,YWG
VKG041,LIS,PHL
WMZ671,YVR,MEX
CFE916,YYZ,PHL
QBT933,CPT,DXB
ZQX997,YHZ,YUL
MTN376,PVG,YOW
AOK874,BOG,YYZ
VIP930, BOG, LIS
FFC468,MEX,GIG
YOF338,MEX,LIS
VDK258,MEX,DEN
LOD619,MEX,LAX
LOX618,LAX,MEX
USO770,MEX,CPT
USO771,CPT,MEX

#

and u remove formatting errors too

#

first is flight code, then departure airport, then arrival airport

#

each combo is unique tho

#

thats what i meant

#

like no overlapping flight numbers n stuff

#

all i need rn is to compare departure airport and if there is a flight from there straight to destination

#

and if not, if there is another possible flight to somewhere else that can transfer to destination]

#

yea

#

i think the hardest part is i need to create a set containing all possible transfer flights

#

i think so

#

and the transfer flight is max 1 transfer

#

huh

#

yea

#

i started off with
if origAirport.getCode() in self._allFlights

#

first one is code of starting airport

#

and allFlights has starting airports as keys

#

ok so i create start airports and arrival airports

#

okok i got this

#

i cant :(

#

it makes me feel better tho that everyone ive asked hasnt started

formal meteor
#

hasn't started what?

cobalt otter
#

this assignment

formal meteor
#

your classmates?

cobalt otter
#

yea

#

idk how theyre gonna do it but

#

transfer flight

#

visit another one along the way

#

o my gf is calling now

#

i gtg

#

ty for help tho guys

#

how

#

nah im going into med

#

this is my bird course

#

that i slacked on

#

alr ty guys!

cobalt otter
#

no airport codes lol

cobalt otter
#

yeyeye

cobalt otter
#

HI GUYS

#

UM

#

MY THING IS NOT WORKING

#

so

#

i pre much got like the whoel shell done

#

but

#

tell me why it wont like

#

when i try to append

#

to a list

#

it appends 3x

#

instead of once

#

idk why

#
def findAllCityFlights(self, city): #####FIX FIX FIX FIX FIX FIX#####
      cityList = []
      for ori in self._allFlights:
         for val in range(len(self._allFlights[ori])):
            if self._allFlights[ori][val].getOrigin().getCity() == city or self._allFlights[ori][val].getDestination().getCity() == city:
               cityList.append(self._allFlights[ori][val])
      return cityList
#

when i try to append it appends 18 times instead of 6

#

it returns 18 items in the list instead of 6

#

3x of each

verbal zenith
#

Probably something to do with that condition, put a print statement and test if it behaves as intended

cobalt otter
#

yea

#

exactly

#

do u think its the ori

#

how should i modify it

verbal zenith
#

I'd have no clue, but if you print relevant info there it could help you

print(f"{ori=} {val=} {city=} {self._allFlights[ori][val].getOrigin=} {self._allFlights[ori][val].getDestination().getCity()}")
#

do something like that

cobalt otter
#

i wrote this iteration of it and it was fine

cityList = []
for ori in allFlights:
    for val in range(len(allFlights[ori])):
        if allFlights[ori][val].getOrigin().getCity() == "Toronto" or allFlights[ori][val].getDestination().getCity() == "Toronto":
            cityList.append(allFlights[ori][1])
print(cityList)
#

that one printed 6x how its supposed to be

verbal zenith
#

put the one I sent inside of the for loop with the if statement

cobalt otter
#

in the class or the test

verbal zenith
#

after for val in range(...

cobalt otter
#

oh class i assume

#

Exception has occurred: UnboundLocalError

verbal zenith
#

Automatic Semicolon Insertion (ASI)
In languages of the C-family, the semicolon denotes the end of a statement. Unlike other C-like languages, JavaScript doesn't enforce that. Instead, the semicolon is optional, and the interpreter adds missing semicolons - mostly at the end of a line - to terminate statements. Doing so, he takes complex rules i...

whole bear
#

Moores law

robust lichen
cobalt otter
#

I FINISHED

#

@verbal zenith

#

9 mins before deadline

verbal zenith
#

lets go!!

#

good job!

cobalt otter
#

ty for help lol

marsh quest
#

@lunar haven do you know Javascript?

fiery carbon
#

Can someone help me with this program

#

@verbal zenith Can you help me

edgy skiff
#

hello

vocal basin
#

you're doing file reads and comparisons anyway

#

percentage impact is too small to matter

#

use and

#
valid = valid and A == B
#

it does last() not all() that's the problem

vocal basin
#

it's just all()

#

all() is reduce on operator.and

vocal basin
#

non-declarative

vocal basin
#

I would pipe values to all()

#

spawn a separate lightweight process
issue being python doesn't exactly allow that

#

elements could be treated as events
and all() would be able to subscribe to those events

#

just use Lua/Erlang instead of Python

vocal basin
#
def all(it: Iterable[object]) -> bool:
    result = True
    for element in it:
        result = result and element
    return result
maiden skiff
#

hi

vocal basin
#
A and B
A if A else B
vocal basin
#

(A==B in full rather)

somber heath
#

!e py print(True and False == False)

wise cargoBOT
#

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

True
vocal basin
#

A and B == C
A and (B == C)
same

#

it is a character pre-TTY

#

carriage return

#

carriage return
cartridge return
carrier return

#

three things mentioned on the wikipedia page

teal flower
#

Print_game

vocal basin
#

!e

print("hello\rworld")
wise cargoBOT
#

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

001 | hello
002 | world
vocal basin
#

eh

#

snekbox doesn't

#

add \r at the end

#

one more \r

#

end="\r"

#

with \r replaced to \n:

hello world
1234hello world
1234
#

you write to the end

#

and then return to start

#

you don't return to start before "hello world", that's the problem

vocal basin
#

not to the end

#

also

#

you need to clear the line

#

or else

#

if it's guaranteed to grow, then ok

somber heath
#

@gritty lily👋

vocal basin
#

\33[2K\r

#

to make sure you start writing at the start

#

if you mean to print from the start of the line, move \r to the start

somber heath
#

@latent thistle👋

thin galleon
#

Hey

verbal zenith
#

!voice

wise cargoBOT
#
Voice verification

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

somber heath
#

@thin galleon👋

vocal basin
#

Jupyter doesn't understand line clear but understands colours

thin galleon
#

what are you guys doing?

vocal basin
#

probably

#

source: stackoverflow so not 100% reliable

#

but it seems to work

thin galleon
#

For print colors I use this:

class colors:
    HEADER = '\033[95m'
    OKBLUE = '\033[94m'
    OKCYAN = '\033[96m'
    OKGREEN = '\033[92m'
    WARNING = '\033[93m'
    FAIL = '\033[91m'
    ENDC = '\033[0m'
    BOLD = '\033[1m'
    UNDERLINE = '\033[4m'
verbal zenith
#

it didn't?

vocal basin
#
>>> print("aaaaa", end=""); print("\33[2K\rb")
b
somber heath
#

@worthy dust👋

vocal basin
#

!e

import time
from contextlib import contextmanager
@contextmanager
def timed():
    start = time.perf_counter()
    yield
    print(time.perf_counter() - start)
with timed():
    time.sleep(1)
wise cargoBOT
#

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

1.0001116394996643
vocal basin
#

or

import time
from contextlib import contextmanager
@contextmanager
def timed(f=time.perf_counter):
    start = f()
    yield
    print(f() - start)
with timed():
    time.sleep(1)
somber heath
#

@lucid zinc👋

vocal basin
#

memory usage will increase

#

trade-offs everywhere