#voice-chat-text-0

1 messages · Page 112 of 1

ivory stump
#

Right that's wack

#

meh I'd leave it as them writing inconsistent tests tbh

#

I saw smth to that effect in the discussion section

stuck furnace
#

Yeah kind of weird. Maybe in whatever programming language they use these things are converted implicitly?

ivory stump
stuck furnace
#

Maybe they wrote the tests with Javascript 🤔

#

Ah right yep that's it lol

#

== strikes again.

#

So what is this for gofek?

#

Oh right

stuck furnace
ivory stump
#

!d dict.fromkeys is kinda nice on line 111 btw

wise cargoBOT
#

classmethod fromkeys(iterable[, value])```
Create a new dictionary with keys from *iterable* and values set to *value*.

[`fromkeys()`](https://docs.python.org/3/library/stdtypes.html#dict.fromkeys "dict.fromkeys") is a class method that returns a new dictionary. *value* defaults to `None`. All of the values refer to just a single instance, so it generally doesn’t make sense for *value* to be a mutable object such as an empty list. To get distinct values, use a [dict comprehension](https://docs.python.org/3/reference/expressions.html#dict) instead.
stuck furnace
#

Could you change your stream settings to "better text readability". It's kind of blurry right now for some reason.

#

Errr

#

Not sure 😄

ivory stump
#

Lemme find it 1 sec

stuck furnace
#

🤔

ivory stump
#

Eh cant find it in the existing stream settings

#

but you can when starting a stream

stuck furnace
#

Looks the same lol

#

I think lowering the frame rate can help?

#

Don't worry if not

ivory stump
#

It's still legible so it's not the end of the world

stuck furnace
#

Yo Grey 👋

ivory stump
#

self.valid = valid | dict.fromkeys(self.keys(),False) would replace lines 110,111

stuck furnace
#

Yeah definitely more readable with large text. You could also stream a smaller window for the same effect I think.

ivory stump
#

Not that you have to (wrt to using my edit) tbf, I would use dict.fromkeys(self.keys(),False) instead of {key:False for key in list(self.keys())} tho since that's the entire raison d'etre of the dict.fromkeys method :)

#

well it still needs the update, it was meant to replace exactly the dict comp

#

self.valid |= ... is also equiv to self.valid.update(...)

ivory stump
#

dict.update doeant return the new dict

ivory stump
#

You still need the valid |

#

currently we lost any realtion to valid

#

| on dicts combines 2 dicts

#

same as update but returns a new combined dict

#

well rn you dont use the old valid, I assume it wasnt an empty dict to start with so we cant ignore it

#

Then the init shouldnt need the valid arg if it's irrelevant

#

tkhd == tkhd[:16] + tkhd[12:16] + tkhd[20:] is the same as tkhd[:16] + tkhd[16:20] + tkhd[20:] == tkhd[:16] + tkhd[12:16] + tkhd[20:] which equals tkhd[12:16] == tkhd[16:20] no?

stuck furnace
#

Heading off. Cya both 👋

ivory stump
ivory stump
#

The start and end are logically equivalent

#

There's no way tkhd changes in between the 2 adjacent lines

#

If so you likely have bigger problems on your hands

#

exactly

#

Yeah, happens to the best of us dw

#

Ima have to go now, almost 2am for me

#

👋

vocal basin
#

used a wrong data structure, ig

#

yes, there is a non-recursive solution

#

(I think)

vocal basin
tight oxide
#

Hey, what's the stream about?

vocal basin
#

virtual private server

#

?

shy pulsar
vocal basin
#

there's also RNA

#

"beyond zero and one" is quite meaningless

#

it makes no difference

#

you just have two bits instead of one

shy pulsar
#

DNA digital data storage is the process of encoding and decoding binary data to and from synthesized strands of DNA.While DNA as a storage medium has enormous potential because of its high storage density, its practical use is currently severely limited because of its high cost and very slow read and write times.In June 2019, scientists reported...

shy pulsar
vocal basin
shy pulsar
#

ooh DNA

vocal basin
#

in some organisms

#

(like humans)

#

and for permanent storage in more primitive ones

#

(like bacteria) no

#

(viruses)

#

DNA is more stable

#

@midnight agate
from random site: 1.47 terabit/mm2

#

from some other site:
4.2 × 1021 bits per gram

#

@elder knot those can just be interpreted as 00, 01, 10, 11

#

it's just two bits per an element

whole bear
#
shuffle(x, random=None) method of random.Random instance
    Shuffle list x in place, and return None.
    
    Optional argument random is a 0-argument function returning a
    random float in [0.0, 1.0); if it is the default None, the
    standard random.random will be used.
jade knot
sonic mulch
#

hey guys, is here someone who can help me with handling csv files?

compact lava
#

if u want me to

sonic mulch
#

i have a question about how to get the datatype from a column without using pandas

#

can u help me there?

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.

main junco
#

@hoary plaza do you know how to solve ImportError: DLL load failed while importing _ctypes : The specified module could not be found in venv?

maiden skiff
#

hi

#

i'm so tired

main junco
#

@hoary plaza can you ask chat gpt?

maiden skiff
#

I have to go to a part-time job in an hour, but I work at dawn because I am in Korea.

hoary plaza
# main junco <@915948290275688468> can you ask chat gpt?

The error message you're seeing indicates that Python's _ctypes module was not able to be loaded because it couldn't find a required DLL file.

Here are some things you can try to resolve the issue:

Make sure your virtual environment is activated. If you're not sure, try running the source <venv>/bin/activate command in your terminal (replace <venv> with the name of your virtual environment).

Try reinstalling the affected package by running pip install --force-reinstall <package> (replace <package> with the name of the package that's causing the error). This may help replace any missing or corrupted DLL files.

Check that all required system dependencies are installed. Depending on your operating system, you may need to install additional system packages to support the _ctypes module. For example, on Ubuntu, you can try running sudo apt-get install libffi-dev.

If you're running Windows, try installing the Microsoft Visual C++ Redistributable for Visual Studio 2019. You can download it from the official Microsoft website.

If none of the above steps work, try creating a new virtual environment and installing the packages you need from scratch. Sometimes virtual environments can become corrupted, and starting fresh can resolve the issue.

I hope one of these steps helps you resolve the issue!

#

(chatgpt response)

maiden skiff
#

I'm sorry I left without a word.

hoary plaza
#

npnp, see you later

main junco
#

Did you use gpt 4 for this?

maiden skiff
#

I'm using gpt4

#

im back

#

hi

#

Did you call me?

#

It is difficult for me to listen to English, so can you write it in a message?

#

yeah south korean

#

Chamchi means tuna

#

Damn it. I don't understand the conversation until now except for "chamchi"

#

im so sad 😦

somber heath
rugged root
somber heath
#

"Ooh, a coin. Oh, fuck. It's glued to the pavement."

#

Angry coffee.

void oak
#

hi

#

whats identity purpose

somber heath
#

In what context?

void oak
#

in def?

somber heath
#

More context required.

rugged root
#

Identity as in naming a function?

maiden skiff
rugged root
#

Cool cool

somber heath
#

Are you working with a particular framework?

void oak
#

Write the function identity which takes an input x and returns that input.

somber heath
#

Ah, so identity is the name of the function you're supposed to create. Okay.

#
def identity(...):
    ...```
void oak
#

this is my task thanks for helping

#

but i dont get it

somber heath
#

Functions are a collection of code that can be called upon to run as many times as required on demand.

#

Here's an example function.

#
def function():
    pass```I have created the function. It's not doing anything. If I were to call it (cause it to run), it wouldn't do a whole lot.
#

Let's make it a little more interesting.

void oak
#

what does the pass do?

somber heath
#

pass is a keyword that signifies a null instruction. It doesn't do anything except provide syntactical completeness. It's what you put when you have to put something but don't want to put anything.

#

I'll try that again.

#

!e ```py
def func():

print('Hello, world.')```

wise cargoBOT
#

@somber heath :x: Your 3.11 eval job has completed with return code 1.

001 |   File "/home/main.py", line 3
002 |     print('Hello, world.')
003 |     ^
004 | IndentationError: expected an indented block after function definition on line 1
somber heath
#

!e ```py
def func():
pass

print('Hello, world.')```

wise cargoBOT
#

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

Hello, world.
somber heath
#

Python complained because it was a def with an indented section, so it's expecting something to be there, but there isn't. It just de-indents and goes to the print. This is wrong.

#

In the example with pass included, it provides syntactic completeness. It's something the interpreter knows what to do with.

#

It doesn't have to be pass, it could be a string. It could be a variable reference. It could be pretty much any other code, but it has to be something.

#

So pass is what we put when we have to put something but we don't want to put anything.

#

Okay, moving on.

#

Make sense?

void oak
#

are you saying python ignored the def becuase theres nothing and just printed hello world?

somber heath
#

!e ```py
def func(): #Here, I am creating a function and pointing the variable, func at it.
print('Hello, world.') #Here I am writing the code that should happen when this function is called/caused to run.
print('Goodbye.')

func() #This is a call to func. It causes func to be run.
func() #I call it again.```

wise cargoBOT
#

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

001 | Hello, world.
002 | Goodbye.
003 | Hello, world.
004 | Goodbye.
somber heath
#

It didn't ignore the def. It created the function. I just didn't call it.

#

I'm calling the function I'm creating, now, twice.

#

So a function, a def, is like a reusable section of code that I can cause to run whenever I want.

#

Cottage cheese is lumpy.

void oak
#

i finally got it

somber heath
#

It's nice and fresh.

#

I don't have it very often, but I don't mind it.

#

Okay, so. With this example in mind.

void oak
#

may i ask who are you? i do wanna become a person like you

somber heath
#

Functions have an inbox and an outbox.

#

I will demonstrate.

void oak
somber heath
#

!e ```py
def function(value):
print(value)

function('abc')```

wise cargoBOT
#

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

abc
somber heath
#

Here, I have created a function and pointed the variable, function at it. This function takes one argument to its one parameter, value.

#

value becomes a variable in the "local scope" of function.

#

it points to the argument given

#

Here, the argument is the string, 'abc'

#
def function(parameter):
    ...
argument = 'some object that is the argument'
function(argument)```
maiden skiff
#

I washed up. I feel refreshed

somber heath
#

So the argument is given to parameter.

#

So we can treat parameter as if it was the 'some object that is the argument'

#

string

#

!e ```py
def func():
return 'abc'

result = func()
print(result)```

wise cargoBOT
#

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

abc
somber heath
#

Here is a function. I've named this function func. From this function, I return the object, 'abc'.

#

Remember this: The object given to the return keyword replaces the call to the function.

#

So this is like I was writingpy result = 'abc' print(result)

#

Because the call, func(), is being replaced/evaluated to the object given to return.

#
print(func())```I could also have done this
#

So this happens in addition to anything else the function might be doing.

#

and when you return from within a function, the function execution terminates.

#

!e ```py
def func():
print('a')
return
print('b')

func()```

wise cargoBOT
#

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

a
somber heath
#

All functions that complete, return.

#

!e ```py
def func():
print('ABC')

print(func())```

wise cargoBOT
#

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

001 | ABC
002 | None
somber heath
#

This function prints 'ABC' and returns None.

#

Because all functions that complete, return. If nothing is explicitly given to the return keyword by the time the function finishes, None is returned.

#

!e py result = print('Hello, world.') print(result)

wise cargoBOT
#

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

001 | Hello, world.
002 | None
somber heath
#

print is a function

#

All functions that complete, return something.

#

So here, the call to print is printing 'Hello, world.' and returns None

#

So.

#

Your task is to write a function that has one parameter (accepts one argument) and returns that same object.

#

If I'm understanding you correctly.

#

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

somber heath
#

Give it a go.

#

Remember: parameters are variables

#

variables are signposts to objects

#

You can have more than one signpost pointing to the one object. variables aren't the objects, themselves.

#

but they can be used as if they were

amber raptor
#

Lin-Manuel Miranda (; born January 16, 1980) is an American songwriter, actor, singer, filmmaker, rapper, and playwright. He is known for creating the Broadway musicals In the Heights (2005), and Hamilton (2015), and the soundtracks for the animated films Moana (2016), Encanto, and Vivo (both 2021). His awards include three Tony Awards, two Emmy...

somber heath
#

How many times can it fold before it starts showing wear?

#

The folding screen stuff, I meant.

#

Like, in person?

void oak
#
def func():
    print('x')
    return
    print('x')
func()
#

wait

somber heath
#

This is a function that, when called, and you call it once, prints x once and returns None.

#

It takes no arguments. It has no parameters.

#

Why doesn't it print the second x?

void oak
#
def function()
    return 'x'
result= func()
print(result)
#

wait

#

is ther minimum iq required to learn python

somber heath
#

This is a function that takes no arguments. It has no parameters. It returns the string, 'x'.
You call this function and assign the variable, result to the return of the function, 'x', because the call to the function evaluates to/is replaced by the object given to return. You then print the object referred to by result, 'x'.

void oak
somber heath
#

Yes.

#

This function has one parameter, value.

#

So it accepts one argument to it.

#

You've been feeding her beans, have you?

void oak
somber heath
#

I was responding to the voice conversation.

void oak
#

my apologies

#
def function(value):
    print(value)
    return(value)
function(x)
somber heath
#

This is a function that has one parameter, value. When called, it prints the argument given to it and returns it.

#

You can drop the parentheses on the return line.

void oak
#

what

somber heath
#

()

#

parentheses

#
return value```
void oak
#

ah

somber heath
#

return is a keyword, not a function

#

Your function does what the requirements state, however, it does more than what the requirements state.

#

What is the original text of the problem brief?

void oak
#

are you saying theres extra in ther

somber heath
#

I am.

#

I can think of three things that you have in there that are extra.

jolly garden
somber heath
#

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

jolly garden
#
print('Hello world!')
somber heath
#

But I wanted to have a look at the problem brief so I can know for sure.

#

It's good to not be adverse to correct word choice. (Voice conversation)

#

Effect is preceded by cause. Therefore, crows are to blame for everything.

#

!voice @jolly garden

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
signal lynx
#

Hello everyone

rugged root
signal lynx
#

I had to fix some audio issues

lol

#

I was listening to spotify and then opened discord and my laptop keeled over

#

Ok, so question

#

How does psuedocode work?

limpid raven
#

Hi!

#

(don't have mic)

#

is this valid? self.traveltimes: list[tuple(int)]

#

thanks :)

#

so the typehint "list[tuple(int)]" is valid for a variable?

rugged root
#

Double checking

#

The outer list part would be right

#

Ah okay

#
self.traveltimes: list[tuple[int]]
limpid raven
#

oh thanks

wind raptor
#

brb

somber heath
#

0

wind raptor
#

back

somber heath
#

🐴 🛖 🧠

patent depot
#

hello

limpid raven
#

should I use "if myvar > 10:" or "if 10 < myvar:"?

somber heath
#

I'd do the first.

limpid raven
#

okay

somber heath
#

Fire burn.

#

"Good luck"?

#

Oh

#

Macbeth.

#

"Let it be cursed. It'll be more metal."

#

The story I heard was that a dancer actually broke a leg immediately after having been told good luck, so people started saying break a leg, instead.

limpid raven
#

I got input as x minute y second for easyer usage should I convert it to x*60+y second?

#

okay

#

nah I just use my own variables

#

then how could I shorten this function's name? get_train_index_by_id

hoary plaza
#

tran_index_by_id

somber heath
#

🥚 👨 🥚 🧔‍♂️ 👨‍🦱 🦭 🚂

limpid raven
#

Should I use typehint when getting input?

somber heath
#

I'd only bother typehinting your defs.

#

Like, the parameters and the return on the def line.

#

You can typehint elsewhere, but...

#

If you're wanting a more practiced view on the matter, ask in #type-hinting.

limpid raven
#

But then it would be like java and we would carry on every older version's bad stuff to because some older mod possibly could use it

#

what is the best way to convert a time like 143 minute to hour and minute?

maiden skiff
#

I'm working now and it's 1:12 a.m. here

#

I'm so sleepy

limpid raven
#

I'll check in live coding bye!

somber heath
#

It's a series of pictographs intended to be interpreted as a reference or phrase or word.

#

It's Bitcoin.

#

Sad trombone noises.

sour willow
#

what

#

how is a Seal related to Bitcion

somber heath
unreal flax
#

need help

#

sir

#

i want to make a game like

#

like mystery and action

#

Sorry to let respond

#

Adventure

#

can u unmute me

frozen owl
#

UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d '

limpid umbra
#

something new , found out yesterday

#

i want to know the pros/cons of it

rugged root
limpid umbra
#

ok

rich harness
#

@rugged root how can i unmute

rugged root
frozen owl
#

libraries that i used:

import numpy as np
import torch
import matplotlib.pyplot as plt
import copy
import tqdm
import torch.nn as nn
import torch.optim as optim
from sklearn.model_selection import train_test_split
import chess
from chess import Move
import torch.nn.init as init
import sqlite3
#

UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d '

somber heath
#

Sir Chistory.

#

Soft ch.

unreal flax
#

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

frozen owl
unreal flax
#

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

kind wharf
#

Is it just me or have the helpers in python-help reduced drastically?

frozen owl
frozen owl
maiden skiff
#

hi

#

I don't feel good because I'm sleepy

#

Can you send me a message?

hoary plaza
#

sure thing, did you enjoy your part time job atleast a little?

maiden skiff
#

No, I'm just doing it for money.

hoary plaza
#

oh, sorry to hear that

#

I hope that it wasn't that bad

maiden skiff
#

I have to go empty the trash can later.

#

But it's convenient because there are no customers because it's dawn.

hoary plaza
#

well, depends if you like people or not

maiden skiff
#

oh bye

hoary plaza
proven raft
#

😎

somber heath
#

@supple fable 👋

supple fable
#

hello

somber heath
#

@thorn wharf

#

@rustic sigil 👋

#

!zen

wise cargoBOT
#
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

#
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

frozen owl
#

[1] 28597 killed python3
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '

#

not to mention that at some point i had like 23 GB of swap (i had 8GB of ram on my m1 macbook air)

vocal basin
vocal basin
#

(not for errors)

frozen owl
#

my imports

import numpy as np
import torch
import matplotlib.pyplot as plt
import copy
import tqdm
import torch.nn as nn
import torch.optim as optim
from sklearn.model_selection import train_test_split
import chess
from chess import Move
import torch.nn.init as init
import sqlite3
vocal basin
#

aieval6elm is written by you, right?

frozen owl
#

i was having fun experimenting with extreme learning machines

frozen owl
vocal basin
frozen owl
vocal basin
#

import shouldn't do any printing

frozen owl
vocal basin
#

whatever logic of this sort you do, it should either be inside a function or inside if __name__ == '__main__': block

vocal basin
# frozen owl

are you calling kill or is it called by some underlying library?

vocal basin
frozen owl
frozen owl
#

oh wait

#

hmm

#

might not be a pytorch kill though

somber heath
#

Shouldn't the ? parameterisation be used?

vocal basin
#

wasn't there something like

#

!injection

#

seems no

frozen owl
vocal basin
frozen owl
#

doesn;t seem to be an error from pytorch specifically

#

so no

#

so the error might not originate from pytorch

vocal basin
vocal basin
frozen owl
# frozen owl

since the progress bar here actually shows the progress for games in my DB and stores it, since the progress bar is alr 100% for quite a while before the code crashed i doubt it might be the direct cause but i think it did contribute to the memory overload

somber heath
#

Beware Little Bobby Tables.

vocal basin
somber heath
frozen owl
#

(is it injection though)

somber heath
#

That's what you say when you get a boot thrown at you.

#

"Ashu!"

rugged tundra
#

@neon dagger hi, this vc is better for us to see.
Ashu says hi to all in vc

somber heath
#

@torn bough👋

torn bough
#

ahy

#

hay

#

i cant speek

rugged root
torn bough
#

!talk

rugged tundra
#

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

torn bough
#

aaa

#

ok i understand

#

ye

#

happy to be heare

rugged root
#

Glad to have you

torn bough
#

had to go and help my mom out

#

see you guys around

stuck furnace
#

👋

#

A wild verboof appears 👀

pallid hazel
#

someone update python to use subthreads in threads 🙂

peak copper
#
from prettytable import PrettyTable
import psutil

# Get a list of all currently running processes
processes = list(psutil.process_iter())


# Create a table and add rows for each process
table = PrettyTable()
table.field_names = ["Process ID", "Process Name", "CPU Percent", "Memory RSS", "Memory Percent Used"]
for process in processes:
    try:
        pid = process.pid
        name = process.name()
        # Call cpu_percent() method twice with an interval to get non-zero value
        cpu_percent = "{:.2f}%".format(process.cpu_percent(interval=0.1))
        memory_info = process.memory_info()
        memory_percent = "{:.2f}%".format(process.memory_percent())
        table.add_row([pid, name, cpu_percent, memory_info.rss, memory_percent])
    except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess):
        # Skip any processes that we can't access or that are zombies
        continue

# Set the alignment to the left for all columns
table.align = "l"

# Sort the table by CPU percentage
table.sortby = "CPU Percent"
table.reversesort = True

# Print out the table
print(table)
maiden skiff
#

hi

#

i read a book

lucid blade
rugged root
stuck furnace
#

He makes like eccentric moving sculptures right?

maiden skiff
rugged root
#

That the one about tricks and coping mechanisms to help you focus?

maiden skiff
#

Yes, this book helps you concentrate and learn deeply when you learn something.

rugged root
#

I'd have a hard enough time just finishing the book

maiden skiff
#

You are right. You should not only read books, but also read, learn, feel, and make them your own.

rugged root
#

For sure

gray kraken
#

how's everyone doing

#

?

#

good so far

stuck furnace
#

Ah yikes

gray kraken
#

what's your take on that RUST foundation issue

#

?

stuck furnace
#

Oh it's not literally on fire?

#

Thought that's what you meant 😄

gray kraken
#

he is 18+

#

XD

#

yes

#

hasbulla

gray kraken
#

hahaha

#

no cap

#

XD

#

i once saw video a man playing with him mistaken him as a child

#

xD

#

🤣

stuck furnace
#

Dwarf I think

somber heath
#

@left lantern👋

#

@surreal folio👋

surreal folio
#

Hii

#

On which project , currently you are working? @somber heath

stuck furnace
#

Might have good traction ¯_(ツ)_/¯

surreal folio
#

_-

somber heath
#

@flint garden👋

#

@dreamy arrow👋

#

🫵 🛑 🌲 🔥

#

@latent granite👋

latent granite
#

yes

#

bhai

#

or bro

#

AOA

#

@somber heath yes

somber heath
#

AOA?

#

I'm not familiar with this term.

latent granite
#

where are u from

somber heath
#

Australia.

latent granite
#

ok sorry

somber heath
#

That I live in Australia?

latent granite
#

no on AOA

#

i am a muslim and i live in pakistan

#

@somber heath can u shere your python project file plz

somber heath
#

No.

latent granite
#

@somber heath what is your age btw

#

can u plz subscribe my youtube channel plz

somber heath
#

Older than worlds.

#

No.

latent granite
#

@somber heath no for what

somber heath
#

No, I won't subscribe to your YouTube channel. 🙂

latent granite
#

but why

willow light
#

wtf is that aspect ratio?

somber heath
#

Why would I want to subscribe?

#

I'm asking an actual question.

latent granite
#

plz i am a new in youtube

somber heath
#

That's not sufficient reason for me.

latent granite
#

so thats why plz

rugged root
#

Please don't beg for youtube subscriptions

willow light
#

even less reason to subscribe. My account is from 2006 and I don't ask.

rugged root
#

If people are interested in your content they will subscribe

#

If they aren't, then they won't

latent granite
#

@rugged root yes brother

rugged root
#

Was what I said unreasonable?

latent granite
latent granite
#

who love bts

#

jk or v

#

and who is the fan of elon musk

somber heath
#

@drifting crystal👋

drifting crystal
#

what this is all about?

#

oh nice

#

bye I am going to explore more about apis, will back in future for help.

gentle flint
#

/usr/bin/python /usr/bin/python2.7 /usr/bin/python3.10 /usr/bin/python3.6 /usr/bin/python3.6m /usr/bin/python3-config
/usr/bin/python2 /usr/bin/python3 /usr/bin/python3.10-config /usr/bin/python3.6-config /usr/bin/python3.6m-config /usr/bin/pythontex

#

eli@rucola:~> file /usr/bin/python3.6
/usr/bin/python3.6: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=396fdc779a004e16983fd32424ac57c040c5c4b6, for GNU/Linux 3.2.0, stripped

somber heath
#

@autumn bluff👋

rugged root
lavish rover
#
$ BUILD_WHEEL=1 ./build-command
noble solstice
#

HELLO GUYS!

somber heath
#

😁

#

Except I wasn't because I was muted.

noble solstice
#

I have a very dumb question

somber heath
#

So it's...unspeakable?

noble solstice
#

why quantum computer is fastest?

#

they also use 0 and 1

somber heath
#

@alpine pumice👋

rugged root
willow light
#
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "lib"))
import splunklib.client as client
import splunklib.results as results

oh lawdy

#

!d with

wise cargoBOT
#

8.5. The with statement

The with statement is used to wrap the execution of a block with methods defined by a context manager (see section With Statement Context Managers). This allows common tryexceptfinally usage patterns to be encapsulated for convenient reuse.


with_stmt          ::=  "with" ( "(" with_stmt_contents ","? ")" | with_stmt_contents ) ":" suite
with_stmt_contents ::=  with_item ("," with_item)*
with_item          ::=  expression ["as" target]
``` The execution of the [`with`](https://docs.python.org/3/reference/compound_stmts.html#with) statement with one “item” proceeds as follows:
somber heath
#

@frank hearth👋

willow light
somber heath
#

@whole bear👋

#

@willow light Only two? I thought you had more than that.

whole bear
rugged root
signal lynx
#
rooms = {
        'Great Hall': {'South': 'Bedroom'},
        'Bedroom': {'North': 'Great Hall', 'East': 'Cellar'},
        'Cellar': {'West': 'Bedroom'}
    }
rugged root
#
rooms["Great Hall"]["South"]
#

!e

rooms = {
        'Great Hall': {'South': 'Bedroom'},
        'Bedroom': {'North': 'Great Hall', 'East': 'Cellar'},
        'Cellar': {'West': 'Bedroom'}
    }

print(rooms["Great Hall"])
print(rooms["Great Hall"]["South"])
wise cargoBOT
#

@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | {'South': 'Bedroom'}
002 | Bedroom
rugged root
#

!e

rooms = {
        'Great Hall': {'South': 'Bedroom'},
        'Bedroom': {'North': 'Great Hall', 'East': 'Cellar'},
        'Cellar': {'West': 'Bedroom'}
    }
...
# game loop and logic and stuff
current_room = rooms["Great Hall"]
print("The following are you options of rooms to go to:")
for direction, room in current_room.items():
  print(f"If you go {direction}, you'll enter the {room}.")
#

!e

rooms = {
        'Great Hall': {'South': 'Bedroom'},
        'Bedroom': {'North': 'Great Hall', 'East': 'Cellar'},
        'Cellar': {'West': 'Bedroom'}
    }


# game loop and logic and stuff
current_room = rooms["Great Hall"]
print("The following are you options of rooms to go to:")
for direction, room in current_room.items():
  print(f"If you go {direction}, you'll enter the {room}.")
wise cargoBOT
#

@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | The following are you options of rooms to go to:
002 | If you go South, you'll enter the Bedroom.
rugged root
#
...
user_input = input("Enter the direction you want to go: ")
current_room = rooms[user_input]
#

!f-strings

wise cargoBOT
#
Format-strings

Creating a Python string with your variables using the + operator can be difficult to write and read. F-strings (format-strings) make it easy to insert values into a string. If you put an f in front of the first quote, you can then put Python expressions between curly braces in the string.

>>> snake = "pythons"
>>> number = 21
>>> f"There are {number * 2} {snake} on the plane."
"There are 42 pythons on the plane."

Note that even when you include an expression that isn't a string, like number * 2, Python will convert it to a string for you.

willow light
#

!e

x = "world"
print("Hello %s!" % x)
wise cargoBOT
#

@willow light :white_check_mark: Your 3.11 eval job has completed with return code 0.

Hello world!
willow light
#

!e

wise cargoBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.

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

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

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

willow light
#

!e

x = "world"
print("Hello %.3f!" % x)
wise cargoBOT
#

@willow light :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 2, in <module>
003 |     print("Hello %.3f!" % x)
004 |           ~~~~~~~~~~~~~~^~~
005 | TypeError: must be real number, not str
rugged root
#
while True:
  #  Blah blah story stuff based on current room and inventory
  user_input = input("What do you do?")
  if user_input in ("North", "South", "East", "West"):
    current_room = rooms[user_input]
    continue
  ...
willow light
#
sys.exit(1)
gentle flint
#

suggestions @lavish rover ?

if [ ! -d "venv" ]; then
    echo "No virtual environment found with name 'venv', checking system python version"
    if [ command -v python3.10 >/dev/null 2>&1 ]; then
        echo "Confirmed Python 3.10 installed in system"
        echo "Generating vitual environment"
        python3.10 -m venv venv
        echo "Activating environment"
        source venv/bin/activate
        echo "Installing requirements"
        pip install -m requirements.txt
        echo "Finished setup, deactivating and continuing normally"
    else
        echo "Python 3.10 not found in system, please install it to continue."
        exit 1
    fi
fi
echo "Activating virtual environment"
source venv/bin/activate
if { python3.10 -c 'import sys; print(".".join(map(str, sys.version_info[:3])))'; echo "3.10"; } | sort --version-sort --check &> /dev/null; then
  echo "Virtual environment python version is less than 3.10. Please delete the venv directory and run this script again to create a new one."
  exit 1
fi
cd src
echo "Starting bot"
python main.py
lucid blade
#

sys.exit(0)

gentle flint
#

this is bash

#

not python

willow light
gentle flint
#

I'll bash you

#

with a moose

frozen owl
#

having a translucent terminal is kinda cool

lucid blade
#

😄

frozen owl
#

i didn't use iterm2 because it had an issue with logitech mice

#

(and scrolling and window sizing, among others)

lucid blade
#

i have no idea

sour willow
#

yo wassup 8080

lucid blade
#

yo 🙂

pallid hazel
#

took the overall i/o process from 1hr to 23mins, but the report creation is killing me now... since it was generated in a per-process thread in the 1hr version, it's now processing everything in 1 thread 😦

sour willow
#

Hello Hem, Verboof, Clari, Cruiser, Gofek, Mustafa, NotACrow, Opal, Pynoob

sour willow
lucid blade
#

@crystal plover break it down in to smaller reports ?

#

merge at the end ?

frozen owl
#

like the brightness?

rugged root
#
current_room = "Great Hall"
move_options = rooms[current_room]
sour willow
#

Ah cant type today

frozen owl
sour willow
#

Intelijj has the ability for background and its pretty cool

frozen owl
#

how about vscode?

sour willow
#

It has transparency ( as an extension unlike intelijj )

rugged root
sour willow
limpid umbra
#

@rugged root what did you do ? the room is full wow

rugged root
#

Didn't do anything this time

lucid blade
limpid umbra
#

its in the realm but not exactly , how newspapers nose-diving subscriptions rates for real paper and online - is going the way of the dinosaurs

#

many like physical books , very few use online materials ( few open to be defined )

somber heath
willow light
#

Oh, fun

limpid umbra
#

hot potato with a grenade

sour willow
#

fun

willow light
#

that one is more fun

lavish rover
#

Doesn't work

willow light
#
print("I am inside your walls".uwuify())
limpid umbra
#

do hooman clones have copyrights ?

somber heath
#

We don't own our own genetics.

limpid umbra
#

hoomans are copys of copys of copys...

willow light
#

Remember when Microsoft tried to copyright and trademark 1s and 0s?

somber heath
#

Technically, counting is illegal.

willow light
#

Remember we live in a world where chord progressions have been copyrighted.

somber heath
#

Passion of the Christ...

lucid blade
#

(╯°□°)╯︵ ┻━┻

lucid obsidian
#

"99 Luftballons" (German: Neunundneunzig Luftballons, "99 balloons") is a song by the German band Nena from their 1983 self-titled album. An English-language version titled "99 Red Balloons", with lyrics by Kevin McAlea, was also released on the album 99 Luftballons in 1984 after widespread success of the original in Europe and Japan. The Englis...

lucid blade
#

`We know things are bad – worse than bad. They’re crazy. It’s like everything everywhere is going crazy, so we don’t go out anymore. We sit in the house, and slowly the world we are living in is getting smaller, and all we say is: ‘Please, at least leave us alone in our living rooms. Let me have my toaster and my TV and my steel-belted radials and I won’t say anything. Just leave us alone.’

Well, I’m not gonna leave you alone. I want you to get MAD! `

lucid blade
#

if you're interested that quote is from NETWORK (1976)

#

its a wicked film

willow light
#

I am very familiar with Network.

rugged root
willow light
#

I love old films. Especially foreign films

kind wharf
rugged root
kind wharf
willow light
#

!e

import string
import random
N = 32759
import pandas as pd
res1 = ''.join(random.choices(string.ascii_uppercase +
                             string.digits, k=N))
res2 = ''.join(random.choices(string.ascii_uppercase +
                             string.digits, k=N))
data = [[res1, res2]]
data += data

print(len(data[0][0]))
df = pd.DataFrame(data)
print(df.head())
wise cargoBOT
#

@willow light :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 32759
002 |                                                    0                                                  1
003 | 0  CW5XF4YRLIGFAN12I2GE0ADPUK2CE5XS36NPV0GOYJ2XLE...  RX96JK72RZ9B0M9SAW184QDCI77CVJ7M26MEYM3ISAS037...
004 | 1  CW5XF4YRLIGFAN12I2GE0ADPUK2CE5XS36NPV0GOYJ2XLE...  RX96JK72RZ9B0M9SAW184QDCI77CVJ7M26MEYM3ISAS037...
sharp urchin
#

no conda is better

#

:]

#

whats wrong with it taking over?

willow light
#

micromamba is better than conda, it takes all the bullshit out and only leaves the useful parts

limpid umbra
#

cant you make a virtual env then have a minimal install

rugged root
#

@kind wharf I'm still checking

sharp urchin
#

the name 'micromamba' just creates an image before hand in my mind lmao

kind wharf
#

Does python bot work here?

sharp urchin
#

which i cant disclose:]

kind wharf
#

!e

print("Hello")

wise cargoBOT
#

@kind wharf :white_check_mark: Your 3.11 eval job has completed with return code 0.

Hello
sharp urchin
#

:[ why yall hating so bad??

kind wharf
#

!e

import string
import random
import pandas as pd
N = 32759

res1 = ''.join(random.choices(string.ascii_uppercase +
                             string.digits, k=N))
res2 = ''.join(random.choices(string.ascii_uppercase +
                             string.digits, k=N))
data = [[res1, res2]]

df = pd.DataFrame(data)
# print(df.head())
df.to_csv("df.csv")

df_new = pd.read_csv("df.csv")
print(df_new.head())
wise cargoBOT
#

@kind wharf :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 |    Unnamed: 0  ...                                                  1
002 | 0           0  ...  WG6F3FCUGRTCUNSQ6LYIMD7QRTDF2JVDCBAX08CTAVT9SP...
003 | 
004 | [1 rows x 3 columns]

df.csv
too long to upload

kind wharf
#
1 rows x 3 columns

sharp urchin
#

hmm never encountered that problem before though

#

so i guess

limpid umbra
#

conda sounds like a virus

sharp urchin
#

i use it for mostly jupyter

#

hmm

#

just saw 'console_shortcut_miniconda' :}

kind wharf
#

What's the alternative to .csv?

willow light
#

It works well with more languages.

sharp urchin
#

xml?

willow light
sharp urchin
#

hmm

willow light
#

JSON exists, we don't need XML anymore

sharp urchin
#

SQL?

#

just stating the alts

willow light
#

Well if we're bringing in databases, may I interest you in Redis and/or Mongo?

sharp urchin
#

SQL still

#

for me

#

call me old age grandpa

willow light
#

Redis is wicked good

kind wharf
#

@rugged root It's not about Excel 🙂 If you write it as .csv in Pandas and load it back in, it'll have messed up columns

#

🙂

#

Perhaps I should try working with .json

#

That worked yert . Thank you so much everyone!

#

Have a great day everyone!!

limpid umbra
#

some kids know how to find anything on the net - so its ok...

#

silicon valley - Gilfoyle with a drill , making a ... service call

sour willow
#

This VC is so random lol

rugged root
#

Just like conversations with friends

sour willow
willow light
sour willow
#

Redis is like hibranate its on the system
Mongo is No-SQL

willow light
#

redis is key value pairs, mongo is documents

sour willow
limpid umbra
#

mmmm mushroom beer ?

rugged root
#

Would try mushroom vodka or gin

#

Probably not beer

limpid umbra
#

@lucid blade aero press ?

limpid umbra
#

ohhh looky

sour willow
#

@lucid blade didnt you do arduinos?

#

its pretty easy with an esp

#

shouldnt be hard to intergrate it with the actual thing

limpid umbra
#

coffee bean roasting is rather complex

sour willow
#

print water on your printer

#

that would be interesting

willow light
#

photocopy water

#

but pronounced like you're from Long Island.

water with three syllables

sour willow
#

i used Arduino With Discord and man was it nice

willow light
#

My mother's from Long Island. The New York Accent is seen as a speech impediment in the Greater Boston Area

limpid umbra
#

woooter

sour willow
#

the convinience of chatting on discord and turning on and off your light/statistics/power usage/turning on and off my pc is just soo good

willow light
#

I'm currently updating my daily driver so discord on windows today

#

My daily driver laptop runs, you guessed it, Arch BTW

limpid umbra
#

can a raspi 3B+ do openCV or is it a struggle to put on there?

willow light
#

If you want an accent that's ass, try the Maine Fisherman sometime

lucid blade
#

T410

sour willow
#

just need a decent fan for it though

willow light
#

It's like the Boston accent except filtered by copious amounts of fentanyl and alcohol

lucid blade
#

was only doing basic facial recognition

#

espcam32

#

are sick

#

😉

#

<£10 for an ip cam

whole bear
#

people try so hard to imitate it

willow light
sour willow
#

Man

whole bear
#

they just end up sounding like they got a dick in their mouth

sour willow
#

but do the docs suckkkkk

#

(sorry i cant type today)

willow light
#

Remember, the Boston vs NYC rivalry is so strong that the sports games are broadcast nationally.

And politicians have lost elections by supporting the new york team in massachusetts.

pallid hazel
#

@lunar haven ello govenor

sour willow
#

i used it to turn on and off my lights when i was on vacation

#

and sent photos to my discord account to check here and there

#

but you really need a fan for it

rugged root
#

It's a heckin' chunker

lucid blade
sour willow
lucid blade
#

^ YEH

#

you could also stream and process on another machine

sour willow
lucid blade
#

i was going to add a 2 factor bio lock to my workshop

#

but in the end decided it was a bad idea

limpid umbra
#

i wanted to do distributed computing with 2x raspi 3B+ via a switch , boot .... openCV is .... to much

lucid blade
#

probably

#

lol

#

it'd be slow af

limpid umbra
#

what about a , PineA64 , 2Gig ???

rugged root
#

2 gig would be too little

lucid blade
#

i wanted one of those

limpid umbra
#

it has 2 GPU cores on it

rugged root
#

@amber raptor I'm sorry

limpid umbra
#

what OS is flexible on a RP3B+ if i want to do signal processing , external ADC and logic interfacing , im not using GPIO , via USB

#

ubuntu is stable -- but is theres something better?

#

khali linux ?

limpid umbra
#

i tried lots of OS on pi , but ubuntu worked ... i have no idea if there is something WOW out there

rugged root
rugged root
sour willow
#

the Nvidia microprocessor or whatever it was called was very cool

#

Ok controversion opinion ARM just sucks

#

ERR_MSG

#

it should be constant

limpid umbra
#

i use ubuntu 32 bit , for RPi jukebox , but ... is raspian better for bit flipping via python

sour willow
#

Aight gonna go watch city vs byern game

#

Enjoy your time

lucid blade
#

peace dude

rugged root
#
process_functions = [functions_here1, functions_here2, ...]

for function in process_functions:
  _1, _2 = function(qos_package)
  sm_report_qos.update(_1)
  sm_qos_run_log.update(_2)
  if not _2:
    sm_qos_run_log['Retry'] = True
terse needle
maiden skiff
#

I have a question. Is there any other way to say hello other than hi?

rugged root
#

Yo

#

Sup

#

Hey

#

How's it going?

#

What's crackin'?

lucid blade
#

😉

maiden skiff
terse needle
#

Can I use the Rust logo as my Twitter Avatar?

We consider social media avatars on personal accounts to be fair use. On the other hand, using Rust trademarks in corporate social media bios/profile pictures is prohibited.

rugged root
#

A sequence diagram or system sequence diagram (SSD) shows process interactions arranged in time sequence in the field of software engineering. It depicts the processes involved and the sequence of messages exchanged between the processes needed to carry out the functionality. Sequence diagrams are typically associated with use case realizations ...

willow light
#

That looks awful in dark mode

rugged root
#

ur mom looks awful in dark mode

sour willow
maiden skiff
#

It's time to eat 🙂

rugged root
#

Trying to find the talk or paper, just not sure where or how to look

narrow salmon
#

Thats all good! I can look it up using this, Thank you!!

rugged root
#

@thorn wharf Your typing is coming through, brother

thorn wharf
#

sorry bout that

rugged root
#

All good, just give you a heads up

thorn wharf
#

*click click click click click click click *

rugged root
#

AGI?

#

General

maiden skiff
somber heath
#

Camelcase, xkcd? You disappoint.

rugged root
#

Mmm.... potential integer overflow....

thorn wharf
narrow salmon
thorn wharf
#

her name is Garlic 🧄

rugged root
thorn wharf
somber heath
narrow salmon
rugged root
#

I'll be back when I get in the van. Delivery/mail run

frozen owl
#

my eval havin an epileptic seizure istg

pallid hazel
#

@midnight agate I forgotten a prior apointment, my apologies..I tried to cheat while sitting here waiting to create this sequence thing you suggested.. but alas, I dont think it did a very good job.

frozen owl
forest yacht
#

welp im not qualified to speak yet 😦

frozen owl
#

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

forest yacht
#

i still need to use the server a bit

maiden skiff
#

I'm taking a break now.

thorn wharf
frozen owl
#

Sanbeiji (simplified Chinese: 三杯鸡; traditional Chinese: 三杯雞; pinyin: sānbēijī; Wade–Giles: San1-pei1 chi1; Pe̍h-ōe-jī: sam-poe-ke; lit. 'three-cup chicken') is a popular chicken dish in Chinese cuisine and one of the most iconic dishes of Jiangxi cuisine. The dish originates from the Jiangxi province of southern China, and is a specialty of Ning...

thorn wharf
maiden skiff
#

Are you having a conversation about food?

limpid umbra
#

ohhhhh

narrow salmon
#

vodka pasta to be exact

thorn wharf
#

isnt that what this discord is for?

#

how to cook snakes?

limpid umbra
#

what does the vodka do

maiden skiff
frozen owl
#

the word taco doesn't sound like a word at all https://www.youtube.com/watch?v=npjF032TDDQ

If you'd like to help the homeless, please consider donating to these organizations-
Feeding America: https://www.feedingamerica.org
The National Alliance to End Homelessness: https://endhomelessness.org

In West Palm Beach Florida-
The Lord's Place: https://thelordsplace.org

#parrygripp #rainingtacos #tacorock

Animation by the awesome BooneBu...

▶ Play video
thorn wharf
limpid umbra
#

it will evaporate out

#

i know someone , uses vodka when making bread

thorn wharf
limpid umbra
#

ohh its a solvent

maiden skiff
#

Speaking of food, I think that Korea is so obsessed with kimchi

maiden skiff
narrow salmon
limpid umbra
#

probiotic

maiden skiff
cosmic lark
#

is @rugged root driving rn?

narrow salmon
cosmic lark
#

understandable

mossy cedar
#

yo

narrow salmon
mossy cedar
narrow salmon
#

understandable

mossy cedar
maiden skiff
mossy cedar
#

and i wrote "5+5=11 "

#

idk why i did it but i did

maiden skiff
#

1 + 1 = 3 right?

mossy cedar
#

its 103f here

mossy cedar
mossy cedar
maiden skiff
#

man(1) + woman(1) =3 After that, think about it on yourselves

maiden skiff
#

I'm sorry. It was just a lame joke

mossy cedar
#

dont worry lmfao i get it

#

103 degree f

cosmic lark
#

80 here

mossy cedar
#

we have a river here too its still ofnaoefo hot

maiden skiff
#

11 here

mossy cedar
#

and humid

mossy cedar
maiden skiff
mossy cedar
#

waw

cosmic lark
mossy cedar
#

lemmmi in there-

maiden skiff
#

It's a little chilly

mossy cedar
#

" a little "

#

lmfao

cosmic lark
#

bro farenhite or celcius?

mossy cedar
#

kelvin

maiden skiff
#

51.8 in Fahrenheit

cosmic lark
#

oh

#

i remember someone used to be here who had a voice of stewie griffin

#

fr

maiden skiff
#

Who brought up chess?

#

I know how to win chess unconditionally.

cosmic lark
maiden skiff
cosmic lark
mossy cedar
cosmic lark
maiden skiff
mossy cedar
limpid umbra
#

tonight - fettuccini and scallops , not sure what sauce

#

but i sure do love bernaise sauce

sour willow
#
for i, size in enumerate(sz[s_i: s_i + current_sc],
                        s_i, + 1):
                        ...
#
for i, size in enumerate(sample_sizes[sample_indx: 
                                        sample_indx + current_sc],
                        sample_indx, + 1):
                        ...
vocal basin
#

you can replace inline if with an if block, if you want better looking multi-line

hot monolith
#

hi

vocal basin
#

why is there enumeratein the second loop?

#

seems like you're just discarding the index anyway

#

you ignore the start anyway

#

!e

print(list(x for _, x in enumerate([0, 1, 2])))
print(list(x for _, x in enumerate([0, 1, 2], 1)))
print(list(x for _, x in enumerate([0, 1, 2], 2)))
wise cargoBOT
#

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

001 | [0, 1, 2]
002 | [0, 1, 2]
003 | [0, 1, 2]
vocal basin
#

start only affects yielded indices

#

and you ignore them

#

these two do the same:

for _, element in enumerate(array, start): ...
for element in array: ...
#
for size in sz[s_i:s_i + current_sc]:
#

I have no idea what that code does

whole bear
#

@lunar havengood job men!

vocal basin
#

this should be a separate method

self.f.seek(offset)
self.f.read(size)
#
class ...:
    def read(self, offset: int, size: int) -> bytes:
        self.f.seek(offset)
        return self.f.read(size)
#

code currently has

self.f.seek(offset)
samples.append(self.f.read(size))
vocal basin
#
class ...:
    def samples_of_a_chunk(self, chunk_offset: int, sizes: Iterable[int]) -> Iterable[bytes]:
        sample_offset = chunk_offset
        for sample_size in sizes:
            yield self.read(sample_offset, sample_size)
            sample_offset += sample_size
#
for sample in self.samples_of_a_chunk(chunk_offset, sz[sample_i:sample_i + current_sc]):
    samples.append(sample)
#

yield will have to be in a separate method

#

you broke the type signature by putting it in the same method

#

the method is called parse_samples not samples
that's why the error

#

yes, inside

#

exiting with closes the file

vocal basin
#

you need to import it

#

(either typing or Iterable)

#
from typing import Iterable

def f() -> Iterable[int]:
    yield 1
#

from __future__ import annotations isn't necessary

#
from typing import Iterable
#

yield is more memory efficient on large sequences

vocal basin
#

you imported the wrong thing

#

Iterable has .__iter__
Iterator has both .__iter__ and .__next__

#
for index, (a, b) in enumerate(zip(a_s, b_s)):
    ...
#

if it doesn't argue about accessing the closed file, then it should be fine called after with

vocal basin
#

it's just read

#

or read_sample (singular; one sample)

#

this is all it does:

...
    def read_sample(self, offset: int, size: int) -> bytes:
        self.f.seek(offset)
        return self.f.read(size)
#

it reads size bytes starting at offset

#

now, in .samples()

yield self.read_sample(sample_offset, size)
#

yes

#

to make the code more clear

vocal basin
#

or, rather

#

the whole second inner loop

#
def samples_of_a_chunk(self, chunk_offset: int, sizes: Iterable[int]) -> Iterable[bytes]:
    sample_offset = chunk_offset
    for sample_size in sizes:
        yield self.read(sample_offset, sample_size)
        sample_offset += sample_size

and in .samples()

yield from self.samples_of_a_chunk(chunk_offset, sz[sample_i:sample_i + current_sc])
#

yield from

#

.f.read

#

.f missing

#

can be separated in two lines to reduce line length:

sample_sizes = sz[sample_i:sample_i + samples_per_chunk]
yield from self.samples_in_chunk(chunk_offset, sample_sizes)
#
yield from iterable

same as

for element in iterable:
    yield element
#

!d yield from

wise cargoBOT
#

7.7. The yield statement


yield_stmt ::=  yield_expression
``` A [`yield`](https://docs.python.org/3/reference/simple_stmts.html#yield) statement is semantically equivalent to a [yield expression](https://docs.python.org/3/reference/expressions.html#yieldexpr). The yield statement can be used to omit the parentheses that would otherwise be required in the equivalent yield expression statement. For example, the yield statements

```py
yield <expr>
yield from <expr>
```  are equivalent to the yield expression statements...
vocal basin
#

yield from got introduced in python 3.3

#

yield from is quite commonly used

#

chunk_samples()

#

VS Code has a shortcut for black

#

I have it as alt+shift+f

#

nononono

#

wrong formatter

#

there was a button to use black instead of autopep8

#

autopep8 is weaker

#

and has different defaults

#

there is Git GUI on the left
but for faster CLI experience, there's probably nothing

#

this in settings

#

sample_i+samples_per_chunk may be made into a separate variable
idk what to name it

vocal basin
#

with sample_i being chunk_start

#

so the slice is [chunk_start:chunk_end]
and the assignment would be chunk_start = chunk_end

#

sample_i:chunk_end not sample_i:sample_i + chunk_end

#
sample_i = chunk_end
#

instead of adding

#

in sample_i +=

#

with sample_i renamed to chunk_start it makes more sense

#

it's start/end in sample terms not in byte terms

#

how often is if condition false?

#

if you add counter to the else branch, what the number would be?

#

just to make sure it gets called at all

#

like

#
counter = 0
for ...:
    if ...:
        ...
    else:
        counter += 1
print(counter)
#

ok, it's 1

#

it shows

vocal basin
#

(I didn't understand at that point why that code meant anything)

#
def chunks(self) -> Iterable[tuple[int, int]]:  # chunk_offset, samples_per_chunk
    co = self.moov.chunk_offsets()
    sc, first = self.moov.samples_per_chunk()
    sc_i, next_run = 0, 0
    for i, chunk_offset in enumerate(co, 1):
        if i >= next_run:
            ...
        yield chunk_offset, samples_per_chunk
def samples(self) -> Iterable[bytes]:
    ...
    for chunk_offset, samples_per_chunk in self.chunks():
        ...
#

just moving samples_per_chunk logic into a separate method

#

(highlighted parts are separated into a different method)

#

there is a way to do it with the same amount of loops, but it involves callbacks and other not-so-readable techniques

#

yes, .chunks()
you can even define in moov class

#

comment isn't necessary
(it was just for me not to forget what I was writing)

vocal basin
#

it's quite smart actually suggesting that

#

because

#

chunks method can be moved to moov

#

the only thing from self it uses is self.moov

#

in chunks() self is used twice

#
self.moov.chunk_offsets()
self.moov.samples_per_chunk()
#

which implies that .chunks() method only requires moov

#

depending on what moov means, you might move the method to its class

#

but if it's more tightly coupled to .samples() logic, it can be kept where it is now

#

what's the code of chunk_offsets method, again?