#voice-chat-text-0

1 messages ยท Page 65 of 1

whole bear
#

There is no point in letting the library call asyncio.get_eventl_loop() when the loop is already known

#

But you are right, its not required

#

python library's will never move away from it, since asyncio isn't really a first prio and thus you need to pass it everywhere, which well is kinda...

#

and asyncio.get_running_loop() won't work if you have many event loops i think

#

Unless i'm wrong

#

But still its a function call

#

Return the running event loop in the current OS thread.

#

Right

#

This works if i have multiple loops?

#

Alright, that's useful to know.

molten bronze
#

so in conclusion u.u i cant run the node.js?

whole bear
#

But for now i prefer explicitly passing the loop via __init__ or other methods, eg a classmethod.

#

I work on a lot of legacy code too

#
import asyncio

async def my_coroutine():
    current_task = asyncio.current_task()
    print(current_task)

await my_coroutine()
#

Oh dam

#

That's sick

#

I remember having to write some stupid magic to make it work.

wise cargoBOT
#

coroutine asyncio.timeout(delay)```
An [asynchronous context manager](https://docs.python.org/3/reference/datamodel.html#async-context-managers) that can be used to limit the amount of time spent waiting on something.

*delay* can either be `None`, or a float/int number of seconds to wait. If *delay* is `None`, no time limit will be applied; this can be useful if the delay is unknown when the context manager is created.

In either case, the context manager can be rescheduled after creation using [`Timeout.reschedule()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.Timeout.reschedule "asyncio.Timeout.reschedule").

Example:

```py
async def main():
    async with asyncio.timeout(10):
        await long_running_task()
```...
whole bear
#

I pretty much explicitly use asyncio.wait_for

#

but the context manager is pretty nice

wise cargoBOT
#

coroutine asyncio.wait_for(aw, timeout)```
Wait for the *aw* [awaitable](https://docs.python.org/3/library/asyncio-task.html#asyncio-awaitables) to complete with a timeout.

If *aw* is a coroutine it is automatically scheduled as a Task.

*timeout* can either be `None` or a float or int number of seconds to wait for. If *timeout* is `None`, block until the future completes.

If a timeout occurs, it cancels the task and raises [`TimeoutError`](https://docs.python.org/3/library/exceptions.html#TimeoutError "TimeoutError").

To avoid the task [`cancellation`](https://docs.python.org/3/library/asyncio-task.html#asyncio.Task.cancel "asyncio.Task.cancel"), wrap it in [`shield()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.shield "asyncio.shield").

The function will wait until the future is actually cancelled, so the total wait time may exceed the *timeout*. If an exception happens during cancellation, it is propagated...
whole bear
#

i recently got into using raise condictons to move control flow back to the beginning

#

skipping a bunch of checking code

#

A lot of people argue that Python asyncio is hard i disagree

molten bronze
#

so i dont understand point 6

whole bear
#

i think it's very verbose

#

And very controlled

#

unlike golang

#

I hope more languages follow suit

molten bronze
#

so this path C:\Users\danie\OneDrive\Documents\Scripts\Finca\venv1\Scripts

whole bear
#

i almost never see a use for threading where asyncio cannot replace it

#

of course asyncio isn't entirely non blocking

#

Python is GiL Lockrd and thus i fail to believe it matters, multiprocessing would be correct in my understanding

#

if you lock up the thread then the event loop is also blocked

#

Since when do they release GIL, and where can i read about it?

This has been the biggest reason for believing threading is useless in Python because when locking up the thread you also lock up the main thread

#

multiprocessing doesn't have this issue

#

i dee

#

i see

#

but so

#

threading is preferred for io that blocks but not cpu bound?

#

How would you then go about processing a bs4 html page?

Since that involves both io and cpu bound

Io fetching the webpages and cpu processing the pages

#

I tackled this using asyncio + multiprocessing pool to scrape million's of pages from my local super market to compare product prices

#

I see, interesting

#

Maybe i should give threading another chance

wise cargoBOT
#

coroutine asyncio.to_thread(func, /, *args, **kwargs)```
Asynchronously run function *func* in a separate thread.

Any *args and **kwargs supplied for this function are directly passed to *func*. Also, the current [`contextvars.Context`](https://docs.python.org/3/library/contextvars.html#contextvars.Context "contextvars.Context") is propagated, allowing context variables from the event loop thread to be accessed in the separate thread.

Return a coroutine that can be awaited to get the eventual result of *func*.

This coroutine function is primarily intended to be used for executing IO-bound functions/methods that would otherwise block the event loop if they were run in the main thread. For example:
whole bear
#

The problem i just described, the supermarket idea

#

i could send you the code, if you like here

#

๐Ÿ™‚

wise cargoBOT
whole bear
#

!paste

wise cargoBOT
#

Pasting large amounts of code

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

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

gentle flint
whole bear
#

@vocal basin

#

Here is the code i wrote a while back, let me know if i could improve it!

sweet lodge
#

@rugged root

#

You're early

whole bear
#

a

#

a

wise cargoBOT
whole bear
#

Bruhj

#

I did, this does exactly that

#

At the time i wrote this my boss didn't know, after asking for legal advice the project was scrapped thus no, and no

wise cargoBOT
#

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

somber heath
#

@final agate ๐Ÿ‘‹

whole bear
#

I'm not scraping anything

#

the project is dead..

final agate
#

hi guys

wise cargoBOT
#

uncancel()```
Decrement the count of cancellation requests to this Task.

Returns the remaining number of cancellation requests.

Note that once execution of a cancelled task completed, further calls to [`uncancel()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.Task.uncancel "asyncio.Task.uncancel") are ineffective.

New in version 3.11.

This method is used by asyncioโ€™s internals and isnโ€™t expected to be used by end-user code. In particular, if a Task gets successfully uncancelled, this allows for elements of structured concurrency like [Task Groups](https://docs.python.org/3/library/asyncio-task.html#taskgroups) and [`asyncio.timeout()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.timeout "asyncio.timeout") to continue running, isolating cancellation to the respective structured block. For example:
warm vapor
#

Hey whats going on

somber heath
#

@rich robin ๐Ÿ‘‹

warm vapor
#

what are you guys doing

#

sounds interesting

plain lichen
#

I did it i got it to work

#

my tmobile app is working. Still more testing and everything needs to be done and optimization but it works. Im so happy

somber heath
plain lichen
#

what ? i can show you my code theres no virus

somber heath
#

Python to exe packagers often produce files which trigger false positive matches for viruses.

plain lichen
#

but im literally not making any virus i dont understand why im being accused of this ?

#

like i made the graphics and everything

#

im being honest about this

somber heath
#

I am not accusing you.

#

I'm posing a scenario where you may be.

plain lichen
#

Oh god dude you scared the fuck out of me lmao

#

I was like i didnt do anything wrong i promise lmao

#

but my response would be. "I have worked honestly on this project as you can look through the source code provided." However with it having the proper code signature on it as well as AES encryption it should not be flagged as a virus

#

oh wait sorry

#

i just read the rest of that

#

i havent really coded much in c++ or # so how would i compile it ? I mean i can figure out how to convert the code to c++ im just not sure how to compile everything after that

severe vigil
#

yoyo

somber heath
#

@severe vigil ๐Ÿ‘‹

#

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

severe vigil
#

sorry, i cant speak but i have a problem

#

im having a No module named error

#

here lemme show you

#

its a file i made which im trying to import

#

its all in the same folder strucutre

#

ill take a screenshot to show

somber heath
#

!code

wise cargoBOT
#

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

somber heath
#

!paste

wise cargoBOT
#

Pasting large amounts of code

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

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

plain lichen
#

or yeah sorry.. Idk ill take a look into it and see what i can figure out. Ill talk to the dev team at tmobile as well to see what we can figure out

thin drift
#

Hi @somber heath

severe vigil
#

when i try this i get an error

somber heath
severe vigil
#

im in the MenuMain folder

#

it just contains variables, but it says i cant import it

#

the stragnest thing is, the checkers one works fine, but chess dosent

#

by "one" i mean file

plain lichen
severe vigil
#

hang on, let me show you all the imports

#

all of them work properly, until chess

buoyant pike
#

helloooooooooooo

severe vigil
#

uhh, i dont follow; if you mean making the folder structure cleaner, then mine is already very clean.

somber heath
severe vigil
#

i have multiple main files which are connected to a menu main. these run the games which i have created

#

module

frosty star
#

haaay

#

aaayy ayyy

severe vigil
#

na its more like this

#

and they are launched from another main function called main.

#

i dont understand how these might affect my problem of not being able to import from chess

#

when i import form checkers, its fine but chess dosent work

#

ive put __init__.py files in all folder spaces

#

okay, ill try that

#

@somber heath yep, this is like the 3rd time ive revised my folder strucure. what can i do next time?

#

yea, nothing

#

ill come back later if i cant figure anything out, thanks for now

whole bear
#

Re implementing wait_for would require the use of generators

#

and asyncio.Timeout would require the use of context managers

#

wait_for is a corotine and this a generator

#

What do you think of my cute little http rate limiter?

#

Actually, i just figured out why my code doesn't work

#

Authorization should be bot + token

#

My god...

#

If you didn't know already, i'm writing my own discord library

frosty star
#

ayyayy

#

i just got moved to AFK o///o

final agate
#

hey guys

whole bear
#

both.

final agate
#

i don't have the permission to speak on voice chat0

whole bear
#

and the library will support multiple instances of bots via multiple tokens.

#

The goal is to write it as efficiently as possible

#

Last time i checked it didn't inherently

#

without the use of shitty magic

final agate
#

guys

whole bear
#

bot.start() was also limited.

#

i did not like it

#
clients = []
for token in yield_token('etc/tokens.txt'):
    client = Client(token=token)
    clients.append(client)

print('subscribed {} clients'.format(len(clients)))
run_clients(*clients, reconnect=True)
#

This is the high level implementation

#

1 client or many

#

This is how this is implemented in the lib

#
def get_new_loop():
    asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    return loop

def set_loop_on_client(client, loop):
    client.loop = loop

def run_clients(*clients, loop = None, reconnect=True):
    if loop is None:
        loop = get_new_loop()

    tasks = []
    for client in clients:

        set_loop_on_client(client, loop)
        tasks.append(loop.create_task(client.run(reconnect)))

    try:
        loop.run_until_complete(asyncio.wait(tasks))
    except KeyboardInterrupt:
        # Gracefull shutdown
        all_tasks = asyncio.gather(*asyncio.all_tasks(loop), return_exceptions=False)
        all_tasks.cancel()
    finally:
        loop.close()
#

It's not what i wanted it to be, but its okay for now.

#

Obviously would prefer getters and setters or classmethods down the road..

#

passing state around like that does not work

#

I spend 8 hours last night trying to debug why discord was disconnecting my connection after 1 hour

frosty star
#

shoe width is so tricky sometimes

#

The smallest men's size is usually the perfect width for me but too long. The women's perfect length is usually too narrow.

somber heath
rugged root
#

The solution? Hacksaw and duct tape

frosty star
#

So I only wear birks these days cuz their width/length combination is just right

frosty star
rugged root
#

Because it's dumb

#

And thinking of dumb things is my job

#

I don't need people trying to edge into my territory

#

So leave the derp to this guy

#

I'll try to be on shortly, but I've got a fuck ton of things going on this morning

frosty star
gentle flint
warm jackal
frosty star
#

I met some old high school friends at a wedding. I'm not so close with them. But just to be polite I said hi. But I'm a pretty awkward person so the exchange was awkward. 3 days later I'm still haunted by the exchange. But do I regret it. Not really.

warm jackal
gentle flint
#

oh, good

#

the shiny type

#

you can soften those with mink oil

#

or something similar

median lintel
#

closer?

gentle flint
#

put the boot in the sun for 10 minutes if possible to warm up a bit (in winter that doesn't work)

#

then warm up the mink oil until it's not quite liquid
put some mink oil on a cloth and rub it over the boot on the outside, really properly rub it in

#

and let it sit for the rest of the day so it can be absorbed into the leather
preferably in a warm place

median lintel
#

I never hear that

#

yes

#

sim

#

nรฃo consigo falar

#

to block

#

ainda

somber heath
#

I don't.

gentle flint
thin drift
#

Pycode how is going ?

median lintel
#

hi man

#

fine

frosty star
#

learning opencv

median lintel
#

Now I try to understand api code

#

write in C#

#

and AspNet

thin drift
#

WoW

median lintel
#

the unique thing I understand is

#

Flask is the best

#

more simple and easy kkkkkk

frosty star
#

bye guys

thin drift
median lintel
thin drift
#

I cant learn api code becase i dont understand whole working system of the code

median lintel
#

Flask

hoary olive
#

hello x10

#

greetings to all

median lintel
thin drift
median lintel
thin drift
#

Still is hard english to speak and understand pycode ?

warped raft
#

hello @gentle flint

thin drift
warped raft
#

hello @thin drift

thin drift
#

hi

hoary olive
# median lintel https://github.com/caiosilvestre/pycertificado

function resposta(){
    let resposta = document.getElementsByClassName("active");
    let btn = document.getElementById("resposta");
    let btn_next = document.getElementById("next_question");
    let array_btn_next = btn_next.action.split("/")
    let num_question = array_btn_next[array_btn_next.length-1]
    btn.action = "resposta/"+(parseInt(num_question)-1)+'/'+resposta[0].name
}
#

very bad code

thin drift
hoary olive
gentle flint
#

just busy

thin drift
hoary olive
#

why are you mics open if you dont talk...

thin drift
#

shashank are you AFK ?

warped raft
#

no

#

what happened

#

hello @rugged root

rugged root
#

Yo

warped raft
#

how are you doing

rugged root
#

Hanging in there

warped raft
#

how is your day going

rugged root
#

Busy so far. Beginning of tax season here and a lot of weird computer issues to fix

#

So I'm in my element, at least

#

But I fucking hate printers

#

And especially Canon's installers

warped raft
rugged root
#

Like, dude, I am the fucking Admin

#

But it has to be a LOCAL account, not network

#

So it's a pain in the ass

warped raft
#

are you using window

rugged root
#

I am. I cannot imagine trying to do this on Linux or Mac

warped raft
#

The worst part is that you don't wanna be on amin accout

rugged root
#

Fairly certain they don't have Linux drivers, not to mention having it support their "connect to the printer wirelessly" bs

#

I mean I do

warped raft
#

it would block a certain features

rugged root
#

My account has local admin

#

Eh?

warped raft
#

in my Pc

rugged root
#

Blocks what

warped raft
#

the amin account just has

#

one file othe than the C driver

warped raft
rugged root
#

It's the opposite

warped raft
#

and the file management in the amin account is terribel

rugged root
#

If you don't have local admin you can't install drivers

#

In most cases

warped raft
#

i am talking about being in the amin account itself

rugged root
#

Ohhhhhh oh oh oh

#

Not a user with admin perms

#

Right got it

#

No in this case I would just need it to be a local to the machine user

hoary olive
#

sup

rugged root
#

Not my network user

#

Hey, speedro

#

I swear to god I'm going to type speedo every time

#

Sorry

hoary olive
#

np

#

ro is for rover

rugged root
#

Oh huh, cool

warped raft
#

hey do you know about DRY priciple hemlock

rugged root
#

Don't repeat yourself, right?

#

Or is there more to it

warped raft
hoary olive
#

theres also kiss and yagni

rugged root
#

I know KISS, but what's yagni

hoary olive
#

keep it simple - you aren't going to need it

#

or you aren't gonna need it

warped raft
#

what what your first language

hoary olive
#

php

warped raft
rugged root
#

First first would have been TI-Basic on my old TI-84 Plus calculator

#

@midnight agate Yo

rugged root
#

@midnight agate How's your day going

#

Busy busy busy, mainly

#

Just lots of things around work. I'm a busy IT boy

#

So I'm in my happy place regarding work at least

hoary olive
#

sup maroloccio, sadly cant join vc, have to study some sience

rugged root
#

I'm more of an IT person than I am a programmer

#

Eh

#

You can always learn

#

@woeful salmon Sup dude

#

@warm jackal Yo

#

So you say

#

HA

#

"Oh god I'm hearing voices" -Reaper probably

#

Fuuuuu forgot I have to add a bunch of reports

#

One by one

#

One by fucking one

#

Scrubstantial

#

Eh

#

Joke is putting the bar a bit high

#

No both are words

#

Not sure if there's a technical difference

#

Yeah

#

Is a non-critical mass when you could and maybe should go to church but you don't?

#

Catholic guilt

#

Back sorry

#

Decent, you?

#

@vocal abyss Depends on the favor

#

@lucid blade Sup

rugged root
#

No worries

woeful salmon
#

how about you

rugged root
#

Same

#

Beginning of tax season plus still shifting people and tech around from the pipe burst

#

@vocal abyss Well... I am a normal person

#

I just happen to also be an admin

#

Immoral maybe

#

I grant it on a temporary basis for coding and stuff. I don't really grant it just for chat stuff

#

Still need to mess with Kotlin more

#

Been on my list for a while

#

Oh cool. I think you're the first person from Argentina I've met

#

"Happy path"?

#

So like

#

The walrus operator?

#

Or just null coalescing

#

Yeah, I'll get it with an example

#

See ya

#

Yeah a lot of energy

woeful salmon
#

i shall go now and focus for a bit to finish this work cya guys later ๐Ÿ™‚

#

was fun listening

rugged root
#

Later Noodle

warm jackal
#
val x = y.z?.let{
  it.w?.let{
    it.thingThatIwanted
  }
}
rugged root
#

That's funky

#

Yeah seems like null coalescing

#

Double checking

#

Nullable

#

"This value is potentially null"

warm jackal
#

y.z?.let => allows accessing members of z if non-null

rugged root
#

You can kind of think of it as....

#

@vernal bridge Correct

#

Soonish, though

#

Possibly next week?

#

More likely 2 weeks, though

#

Eh, it's fine

#

I'm adaptable and easy to please

#

I don't mind

warm jackal
#

The null coalescing operator (called the Logical Defined-Or operator in Perl) is a binary operator that is part of the syntax for a basic conditional expression in several programming languages, including C#, PowerShell as of version 7.0.0, Perl as of version 5.10, Swift, and PHP 7.0.0. While its behavior differs between implementations, the nul...

rugged root
#
if inner_dict := my_dict.get("ham"):
  if value_from_inner := inner_dict.get("pork"):
    print(value_from_inner)
#

Essentially the same as this

#

Ish

#

Yep

#

Syntactic sugar to a false case to null ternary

#

In a good way or bad way

#

Sounds exciting at least

#

Interesting that it suppressed you dreaming.

#

Wonder if it was keeping you from hitting REM sleep

#

Eh, different people require different amounts

#

The whole 8 hours things is just a ballpark average

#

HA

#

Yeah

#

Eh

#

More just actually implementing code

#

There's a lot of theory in comp sci

#

Glass blowing looks so friggin cool

#

Just don't inhale

#

You'll be fine

#

Oh yeah yeah

#

Until you build up the scar tissue

#

@uncut meteor Yo

#

@uncut meteor I will end you

uncut meteor
#

gg

rugged root
#

But with love

#

@timid crypt Yo

#

Sorry, should have said hi sooner

#

Yeah it's funny as hell

rugged root
#

Oh huh

#

This isn't the version I've seen

#

Shoot

lucid blade
#

its hilarious

rugged root
#

He looks so classy

#

@uncut meteor Was his English teacher? @vernal bridge Is that right?

#

Eh

#

Uni's supposed to prep you for the workplace, right?

#

Bigger businesses can pitch a fit

#

I know I know

#

I'm just giving an example

#

@amber raptor Yo

warm jackal
rugged root
#

Probably

#

Plenty of morality laws and policies

#

More likely America

#

Shit

warm jackal
#

Skitt

rugged root
#

@warm jackal Getting a lot of plate scrapey noises

#

Derp step

#

Pendulum

#

Love it

#

In Silico is my favorite album from them

lucid blade
#

SPORE

#

COUNTER STRIKE

rugged root
#

Haven't heard a lot of their new stuff

lucid blade
#

woah caps

rugged root
#

Cole slaw?

#

I don't actually know where the term comes from

#

@vernal bridge You're pretty quiet

#

Etymology

#

Entomology is the study of insects

#

@amber raptor Welcome back

amber raptor
rugged root
#

Nah, it's to Rabbit being a butt

#

I slaw what you did there

#

Eh, that was weak sorry

#

Yeah it was rough

#

That's what she said

#

"For you I'll lower my standards and tell you it was great"

#

Oh I know

#

Just wanted to make sure there was context

#

Since it made me crack up

lucid blade
rugged root
#

If you're wondering how to get another addiction, would you need some addvice?

#

Yeah I'm not at my best

rugged root
#

Adding vices. Also useful if you do woodwork

#

Need to hold these planks in place while the glue sets? Take some heroine

#

Kills the time while you wait

warm jackal
#

#MyLatestMemeToPassAround

rugged root
#

Well now I feel like a bastard

#

True that

#

It just smells so horrible

#

Pisses me off

#

I hate driving and suddenly my car smells like weed only because I passed by someone

#

Even worse when our apartment neighbors smoke and it leaks into our apartment

#

I don't want my clothes smelling of that shit

#

Good luck achieving that in an apartment

#

Later bud

#

Yeah and that's fair

#

Our apartment just has a clause in the lease about offensive odors, so it's just aggravating.

#

Yeah, saran wrap

#

Cut the TENDONS?

#

Jesus

#

If you tense your arm

#

The thin string like things that come from your wrist a bit

#

Very edgy

#

A lot I'm sure

#

We including vapes?

#

Older than me

#

He just wants to mooch off your supply

#

Don't fall for it

#

Wonder if it'd had an affect like "Oh, this is something dad does? That's.... kind of making it not cool"

#

Might on some kids

#

Yep

#

I just can't take the risk. I'm finally on a good cocktail of medication and I don't like the idea of throwing a potential firecracker in there

#

Yeah and that can fuck with depression

#

Just don't want to even think about it

#

@lavish rover Sup dude

lavish rover
#

work, kill me

rugged root
#

Too much or just irritating stuff?

lavish rover
rugged root
#

Fair

#

Regretting going into the field?

#

Or just this place

lavish rover
#

Neither, task is just annoying

rugged root
#

Fair

#

@surreal marlin Yo

surreal marlin
rugged root
surreal marlin
#

trying to understand how to get it

rugged root
#

That'll tell you what you need to know how to get the gate

surreal marlin
#

oh

#

thank you

rugged root
#

Is Polish Notation the one where the operator is on the left of the numbers?

#

Accounting does that

#

So kind of used to it after using one of the adding machines

#

That's.... dumb

lavish rover
#

+-*3443

rugged root
#

It's not exactly the code you'd be running into on the regular

lavish rover
#

Not confusing at all

rugged root
#

Oh no not that kind

#

Yeah

#

And shit like this is why I wasn't a comp sci major

lavish rover
surreal marlin
#

Sorry
@rugged root can I be voice verified without all these criteria?

rugged root
#

I try not to bend the rules on that

lavish rover
rugged root
#

Why, what's up

surreal marlin
rugged root
#

NO no

#

No need to apologize, just letting you know

#

@vernal bridge She was 85?

#

Well

#

I got the 5 right

#

Legal but very ill advised

#

It's what is known as "creepy"

#

Eh

#

Now you know

#

I mean you'd expect people to not do shit like that

#

And nothing to say she wouldn't have lied if you asked initially

#

I forgot what I was doing

#

I'm just sitting here like a derp

#

Fair

#

Well at least you caught it before there was a much larger mistake to be had

#

The blood of your enemies

#

Ideally drank from a skull

#

... with blood?

#

Aww

#

Have fun with that

#

Only you can make that call

#

@crude vale Yo

crude vale
#

sup

rugged root
#

@surreal marlin Could always do regex

surreal marlin
rugged root
#

For the time thingy

#

Later Linux

#

You shouldn't use a slice for that either. In fact you shouldn't, as it'll return a list

#

Since a slice, even of one item, returns a list

#

So that's probably what's causing your issue

surreal marlin
#

yes, I know

#

I want date to be a string

rugged root
#

Right

#

That's returning a list

#

Just do words[5]

#

That'll give you the string

surreal marlin
#

Oh

#

yes

#

Thank you xD

#

Really stupid mistake

rugged root
#

Nah

#

It's easy to miss something like that

#

But it's why I always recommend futzing with stuff on the repl so that you can get a feel for what is going on

#

@surreal marlin So what're you working on, if I may ask?

#

@median lintel Yo

#

I'll be back in a sec, talking to a co-worker

surreal marlin
rugged root
#

Ooo neat

surreal marlin
#

Right now trying to solve them

rugged root
#

If you get stuck we're happy to help.

surreal marlin
#

Started to learn python a few days ago

surreal marlin
#

: )

rugged root
#

@median lintel what're you up to

median lintel
#

study c#

rugged root
#

Ooo neat

median lintel
#

but I'm interested in the project @surreal marlin

rugged root
#

God damn it

#

Whelp, this is going to be a fun wait

median lintel
#

lol

#

patience

rugged root
#

Oh I know I know

#

It's just hit and miss whether the connection to their chat dies midway through waiting

#

With no indication that it happened

surreal marlin
rugged root
#

What site or resource are you using?

rugged root
#

@lavish rover Whatcha dooooooin?

#

Oh nifty, hadn't seen this one

median lintel
#

me too

rugged root
#

If you need additional resources at some point, we've got a lot of them listed on our site

#

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

unreal hazel
#

Hello

#

What is crackin

rugged root
#

Hey Rob, not a lot

#

Just work work work

unreal hazel
#

More waiting? ๐Ÿ˜›

rugged root
#

A yep

#

As is the way of dealing with Thomson Reuters

#

'bout you?

unreal hazel
surreal marlin
rugged root
#

Hmm, not sure on that

#

Just not sure on a site like it

surreal marlin
rugged root
#

Happy to do it

median lintel
rugged root
#

Yeah, a sloth seems like the perfect animal for that meme

#

I hate this program so much

#

Just let me import a bunch of files at once

#

But no, I have to do them one at a time

#

Back in a sec

median lintel
#

I'm going to watch some videos about databricks, I'll back later

unreal hazel
#

And then there was one

narrow salmon
#

And then there were none

unreal hazel
#

Then the kingdom was abandoned and undisturbed for millennia

narrow salmon
#

until one day...a vigilante from nowhere arose to disrupt the presumed everlasting peace of the kingdom

#

@rugged root I am in a voice channel..doing things that go against server rules :3

narrow salmon
lavish rover
rigid nest
#

yeah 3 days.

#

what a boondoggle

lavish rover
#

ah yeah it's a thing

#

oh well

rigid nest
#

can I borrow some of your time for a question on vc?

#

5 mins or so

lavish rover
#

looks like you've been on the server before though right?

rigid nest
#

oh yeah, years ago. back when the help channels were generated automatically

#

and you'd have to !close them

lavish rover
#

@rugged root this fine person has been here a while but just joined back, any chance they can get voice perms?

rigid nest
#

(y)

lavish rover
#

@rigid nest turns out pandas dataframe has a to_json method lol

rigid nest
#

hahahaha wicked, thanks man

cerulean ridge
#

@somber heath gtg

#

cya

somber heath
#

@ashen wave ๐Ÿ‘‹

lucid blade
somber heath
#

@torpid pumice ๐Ÿ‘‹

torpid pumice
lucid blade
#

๐Ÿ™‚

#

/ME waves

#

waves

#

betterer ๐Ÿ˜‰

somber heath
#

@distant grotto ๐Ÿ‘‹

ashen wave
#

its real

#

some accounts work and some dont

#

permanent

#

because these are working account generated

#

because i wanted to show the results of a generation of working acccounts

#

there generated so there owned by nobody

#

or by python

#

why?

#

i can show u the code XD

#

better?

#

ok

somber heath
#

@feral shard ๐Ÿ‘‹

feral shard
#

yessir

#

oy

#

you good at python?

#

@somber heath

somber heath
#

Do you have a problem you're seeking help with?

feral shard
#

yes

#

i donjt have vc for some reason

somber heath
#

Then state your problem.

#

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

Until I know what the problem is, I don't know if it's something I can help with or not.

#

You save time by leading with that.

#

@lilac whale ๐Ÿ‘‹

#

@feral shard So...?

feral shard
#

mb i couldnt find this chanel

#

how do you make projects that run in the terminal

somber heath
#

print, input, maybe a bit of ansi code fanciness...

feral shard
#

can i screen share a pic of what im talking abt'

somber heath
#

It's a very broad question.

#

Not at present.

#

Screenshots are an option.

feral shard
#

can i show you a pic of what im tryan figure out in the vc?

#

i cant send you a messgae

#

it no let me

#

ohh

#

lol

#

you see

#

this is js a example

#

how do you make projects run in a terminal looking thing like that

#

i wanna make a cool game with a opening like that

#

so when im done and i wanna make a a executable will it open like that?

#

wait whats it called to get that font and colors?

#

is it ascii

#

i want that font

#

dam

#

should i be using vscode or microsoft visual studio

#

can you do all this art in vscode?

#

i was gonna do it thats a open source program

#

should i so i can see the code?

#

do you know what the | lolcat command is?

#

theres so much i have to show you but i cant screenshare

somber heath
#

@sinful citrus ๐Ÿ‘‹

sinful citrus
feral shard
#

@somber heath

somber heath
#

Hmm?

feral shard
#

can we vc i need help

somber heath
#

You don't require my permission to join.

feral shard
#

in a personal call so i can speak, or is that not allowed

somber heath
#

It is discouraged, but beyond that, I avoid it.

feral shard
#

oh

#

dang

somber heath
feral shard
#

all im tryan figure out is how to make a project that will run in a terminal

#

like when i convert my .py to a exe how can i make it stay open and run my commands inside a console

somber heath
#

!resources Is a good place to look for places to start.

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.

somber heath
#

Ah, okay, so you're at that stage.

#

I don't use exe packagers.

feral shard
#

how can i find help on that

somber heath
#

๐Ÿ‘‹ @flint plinth

flint plinth
#

๐Ÿ‘‹

narrow salmon
somber heath
somber heath
#

@tawny trellis ๐Ÿ‘‹

#

@latent forum ๐Ÿ‘‹

latent forum
#

Hi

somber heath
#

@sterile fable ๐Ÿ‘‹

sterile fable
#

why i cant use my mic ?

vocal basin
#

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

sterile fable
#

thank man

latent forum
#

F

vocal basin
#

speaking of Nokia, they still own Bell Labs
I was kind of surprised to know they acquired it in the first place

#

though a phone company acquiring something that was a part of another phone company
well, sounds logical

#

don't cards use DSAs and stuff? so, like, not very copyable?

#

docs are faster for getting some answers

#

yes, that's why "some"

somber heath
#

@golden sonnet ๐Ÿ‘‹

stray niche
golden sonnet
#

๐Ÿ‘‹

vocal basin
#

it doesn't use, afaik

#

it just "pretends" to respond comprehensibly or something

narrow salmon
stray niche
vocal basin
#

what ChatGPT, I guess, may be able to do is rephrase search queries
so, like, if you tried to google and you failed, you may try to search what it suggests
(less harmful than relaying on its answers)

#

"disambiguate"

#

12+am/pm may look kind of illogical
but it actually makes sense given how clocks are structured and what am/pm means

frosty star
#

disambiguate

#

bye guys gtg sleep

vocal basin
#

bees can

somber heath
#

@queen frost ๐Ÿ‘‹

#

@whole bear ๐Ÿ‘‹

warm jackal
warm jackal
somber heath
#

Science.

#

It is how I am.

#

For without it, I would not be.

#

It is a very cool story.

#

Hmm?

vocal basin
#

in what sense?

#

filesystem path[s]?

somber heath
#

They're a little overgrown.

#

But still passable.

vocal basin
#

did you check "add to PATH" when installing python?

somber heath
#

Can you not edit PATH to have that directory fall within it?

vocal basin
#

do you have this enabled in VS Code?

#

(if you're running this from VS Code)

#

that really sounds like you have two different py3.11s installed, tbh

#

one for system and one for user

#

or you "broke" your path variable

#

or something else broke it

#

those two should have similar prefixes

vocal basin
#

not really, if I correctly remember how python installation works
reloading VS Code should usually be enough

#

I don't recall python having anything that much reboot-dependent

#

okay then

golden sonnet
#

i just don't have a mic on

#

yeah it's new ๐Ÿ™‚

#

๐Ÿ˜

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.

golden sonnet
#

what new thing you learned?

#

hmm

vocal basin
#

I have at least two people here muted for screaming/soundboard

golden sonnet
#

gotta admit your accent is a little heavy for me ๐Ÿ™‚
but am trying

#

๐Ÿ˜

#

so what's up?

vocal basin
#

unambiguous non-deterministic polynomial-time
https://en.wikipedia.org/wiki/UP_(complexity)

In complexity theory, UP (unambiguous non-deterministic polynomial-time) is the complexity class of decision problems solvable in polynomial time on an unambiguous Turing machine with at most one accepting path for each input. UP contains P and is contained in NP.
A common reformulation of NP states that a language is in NP if and only if a give...

golden sonnet
#

it's 6:50 pm here

#

u a university guy?
or self study?

vocal basin
golden sonnet
#

u just script?
or something more specific?

vocal basin
#

I wouldn't be surprised if "JustScript" is another transpiled-into-JS language

vocal basin
#

there is a scriptwriter-hiring site with that name

golden sonnet
#

have seen so many chatgpt fights ๐Ÿ˜‚

#

๐Ÿ˜‚

vocal basin
#

or ๐Ÿ—ž๏ธ instead of a stick

golden sonnet
#

yeah i feel like people having weird ideas about it makes experts to forget that it's a high technology

#

am not a fan of ai advancing but it's a step in that diraction whatsoever

vocal basin
#

what century was wheelchair invented in?

#

looks like 6~5th centuries BCE in Asia
and then 16th century CE in Europe

golden sonnet
#

i'm guessing england?

#

yeah

golden sonnet
#

are you from england?

#

u don't sound american for sure

#

who isn't ๐Ÿ™‚

#

colony of uk
that's pretty much everywhere

#

i forgot the spelling ๐Ÿ˜‚

somber heath
#

@north rock ๐Ÿ‘‹

north rock
#

hi

golden sonnet
#

i've seen scary stuff

#

i'm good here at the dessert ๐Ÿ˜‚

#

yeah but we have mostly ants here

#

well it's a city
but there are stuff if u go out of it

#

a massive amount of cats tho

vocal basin
north rock
#

I am from India

golden sonnet
#

hi almost neighbor

vocal basin
#

((the newspaper beating being a response to using floating point in the OS kernel))

golden sonnet
#

ok bye bye

north rock
#

bye

formal ember
#
    @wraps(f)
    def decorated(*args, **kwargs):
        token = request.args.get('token')
        if not token:
            return jsonify ({'message':'Token is required!'}), 401
        
        try:
            data = jwt.decode(token, app.config["SECRET_KEY"],algorithm='HS256')
        except:
            return jsonify({'message':'Invalid token'}), 401
        
        return f(*args, **kwargs)
    return decorated
#

UnboundLocalError: local variable 'data' referenced before assignment

#

jwt.exceptions.DecodeError: It is required that you pass in a value for the "algorithms" argument when calling decode().

velvet tartan
pallid hazel
#

what does return decorated return?

formal ember
stoic vapor
#

can anyone help me with an issue i have with web scraping

feral shard
#

can someone help me

somber heath
#

Alternatively, #tools-and-devops might cover your specific issue. It was the exe maker, yes?

#

Absent that, the documentation on the specific tool you're using would be a good place to look.

#

Whenever asking for help, it's generally best to detail in brief the problem you're having, rather than asking if anyone can help.

stray niche
stray niche
unreal hazel
north rock
#

that's grate

frosty star
sharp urchin
#

hello

somber heath
#

@coral wing ๐Ÿ‘‹

#

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

@jolly kelp ๐Ÿ‘‹

coral wing
#

ok

deft bane
#

hi

slender siren
somber heath
#

@young orchid ๐Ÿ‘‹

#

@agile grail ๐Ÿ‘‹

#

Are you asking generally, or about something more specific?

#

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

agile grail
somber heath
#

@manic salmon ๐Ÿ‘‹

#

Nothing in particular comes to mind.

hoary olive
#

greetings

median lintel
#

hello

tranquil wing
#

I use wordpress just to write story ๐Ÿ˜„ @young orchid

sharp urchin
#

lol

#

i can not assure you that i am an indian

steady flame
#

Sup, whatcha up to?

#

Anybody working in curses?

#

@stable dew

#

Are you familiar with curses in python?

#

and is he online or not, I cannot say ๐Ÿ˜„

#

I dont wanna spam the chat or anything

stable dew
#

@noble flame

steady flame
#

just some tips for using curses in general

#

but want to get verified

#

im currently working on game in curses for my finals

#

yep, as it may sound weird I still chose to do it

#

cus I dont wanna learn C++

#

yea. but its really not optimized

#

making game in terminal was the worst idea that I had goten

#

I tried to recreate "angband"

#

with some shake and fidget style

#

Its really just RPG game LOTR themed

#

yeah

#

it even has some type of raycasting

#

but dont thing, I have enough time to redone raycasting

#

yeah, trying to redone my previous atempts to be flexible on changing resolution of terminal

#

its really hard to do game in terminal cus of that

#

wym

#

Are you familiar with args* in functions?

#

is it like list or tuple?

#

so every space is another argument

#

so I can just splice them by space

whole bear
#

It allows you to pass an arbitrary number of arguments to a function as a tuple.

steady flame
#

oh, thats handy ๐Ÿ˜„

whole bear
#

Yes

steady flame
#

how is it with the verification on the voice channel?

whole bear
#

U need to say 50 Mesage i think before u can talk

steady flame
#

damn

#

how to make it seem, like not spamming

whole bear
#

I guess just talk lol

steady flame
#

cus at this points im just using a loophole ๐Ÿ˜„

#

and 50 messages in 30 mins

#

god xd

steady flame
#

me neither

whole bear
#

Link for?

steady flame
#

what do you mean?

whole bear
#

He asked if i had link

steady flame
#

yeah

#

read it

whole bear
#

Yes

icy axle
#

yeah

steady flame
#

yeah, lets finally have some meaningful conversation

#

cus really want to get finally verify

#

@icy axle wanna help me w/ verification 9059happycat

steady flame
#

yea, need to start communication finally to get verify

#

so wanna start some nice conversation

icy axle
#

ah lol

steady flame
#

do you thing its good idea ๐Ÿ˜„

icy axle
#

!args

wise cargoBOT
#
Did you mean ...

ยป mutable-default-args
ยป args-kwargs

icy axle
#

!args-kwargs

wise cargoBOT
#

*args and **kwargs

These special parameters allow functions to take arbitrary amounts of positional and keyword arguments. The names args and kwargs are purely convention, and could be named any other valid variable name. The special functionality comes from the single and double asterisks (*). If both are used in a function signature, *args must appear before **kwargs.

Single asterisk
*args will ingest an arbitrary amount of positional arguments, and store it in a tuple. If there are parameters after *args in the parameter list with no default value, they will become required keyword arguments by default.

Double asterisk
**kwargs will ingest an arbitrary amount of keyword arguments, and store it in a dictionary. There can be no additional parameters after **kwargs in the parameter list.

Use cases
โ€ข Decorators (see !tags decorators)
โ€ข Inheritance (overriding methods)
โ€ข Future proofing (in the case of the first two bullet points, if the parameters change, your code won't break)
โ€ข Flexibility (writing functions that behave like dict() or print())

See !tags positional-keyword for information about positional and keyword arguments

somber heath
#

@random talon You don't like what, sorry?

#

You sort of cut out as you were saying it then you left.

somber heath
#

@whole bear ๐Ÿ‘‹

rigid nest
#

Or at least have your voice verification process take into account returning users, if possible.

somber heath
#

@rigid nest I can pretty much just straight up say that you're going to have to go through the usual process.

#

In all probability.

#

Mr Hemlock would be the one to talk to about any exceptions, there.

#

He's not likely to be around for at least three or so hours, more likely four and a half if at all.

#

@shut ravine ๐Ÿ‘‹

shut ravine
#

hi

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.

rigid nest
#

It's not like I didn't spend tens of hours helping people in the help chat and getting involved in the community.

somber heath
#

Talk to Hemlock. See what he says.

#

I've seen him say no to a few people in this situation, before, though, so, you know...

#

Patience is a virtue and all that bullshit.

golden sonnet
#

hi there

#

๐Ÿ™Œ

somber heath
#

@pale nebula ๐Ÿ‘‹

golden sonnet
#

๐Ÿ™‚

#

both have the same root

#

both names

pale nebula
somber heath
#

@hollow phoenix ๐Ÿ‘‹

golden sonnet
#

so whats new?

somber heath
#

@balmy copper ๐Ÿ‘‹

balmy copper
#

@somber heath ๐Ÿ‘‹

#

Hah

#

I need your help

#

I am from Ukraine and I do not understand you

#

I would like to find a code for a discord bot

#

I have something similar but it doesn't work.

golden sonnet
balmy copper
golden sonnet
#

what's up?

balmy copper
golden sonnet
#

ha?

balmy copper
#

I do not understand pithink

#

If I have, then everything is almost wonderful

golden sonnet
#

i don't know how to explain what's up

gentle flint
#

it means "hi, what's going on, how are you"

#

@balmy copper

somber heath
#

@hoary olive I did say hi before, but I might have been non-Discord muted and not realised it.

vivid palm
hoary olive
#

G programming language?

deft bane
#

how I can create chose game in python but I want simple game

somber heath
#

!kindling

wise cargoBOT
#

Kindling Projects

The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.

somber heath
#

Tic tac toe, hangman. Chess isn't too hard if all you're doing is moving pieces around.

rugged root
#

I hate quickbooks

#

So much

#

So very very very much

#

@zenith radish @vernal bridge Hello

#

See previous QuickBooks rage

#

It's a bookkeeping program

#

A program that can die in a fire

#

Fuck and/or you

#

That poor cat

#

You look good with your head buzzed vs shaved

#

It's like.... the extremes of mullet

#

What?

#

@oblique cloud Sup.

oblique cloud
#

sup

rugged root
#

All day

#

Oh mother fucker

#

I think I found the file I was looking for that potentially could have fixed something

#

Hostile probably isn't the right word. More like.... when you try to take a dog's food while they're eating

#

Erh mah gurd, Durbiurn

#

One sec, it's a reference to a meme

#
Know Your Meme

Ermahgerd, a rhotacized pronunciation of โ€œoh my god,โ€ is an image macro series featuring a photo of a young woman holding several books from the childrenโ€™s horror fiction series Goosebumps. The phonetically written captions are meant to sound like a speech impediment caused by the use of an orthodontic retainer, often using the snowclone templat...

#

I don't know

#

But it is to me

#

Yeah there's lots of things that I find funny that I can't explain why

#

I've given up trying to understand my brain

#

I feel called out

#

Linux is laying down sick burns about my Windows usage

#

@zenith radish It feels like a waste to do that, though

#

Since it won't be properly optimized

#

That's just my thought

#

Is Arm64x the same as the M2?

#

HA

#

Dude fucking

#

Every time it's the wifi card

#

So good

#

It used to be the case, but yeah

#

The prices have certainly met now

#

Okay but like

#

scissor switches