#voice-chat-text-0

1 messages · Page 194 of 1

elfin bone
#

see ya guys

#

let me delete these chatwalls

toxic arch
#

@elfin bone

elfin bone
#

ya what

ebon mist
#

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

elfin bone
#

i got

#

muted

#

by an admin

toxic arch
elfin bone
#

T

toxic arch
#

@ebon mist how do you get video role

cobalt cloak
toxic arch
cobalt cloak
#

oh

toxic arch
#

@ebon mist you shouldnt name a variable _

#

name it something else, _ indicates that you are not gonna use it

#

i good name

#

im going insane guysssss

#

it is?

ebon mist
#
def falling_piece(picked_piece, displayed_board, x, y):

    row_of_picked_piece = picked_piece[0]
    coll_of_picked_piece = row_of_picked_piece[0]
    n_row = len(picked_piece)
    n_coll = len(row_of_picked_piece)

    x_piece = 0
    y_piece = 0
    for a in range(n_row):
        for b in range(n_coll):
            displayed_board[x][y] = picked_piece[a][b]
            y += b
        x += a
ripe jewel
#

def falling_piece(picked_piece, displayed_board, x, y):
n_row = len(picked_piece)
n_col = len(picked_piece[0])

for a in range(n_row):
    for b in range(n_col):
        if x + a < len(displayed_board) and y + b < len(displayed_board[0]):
            displayed_board[x + a][y + b] = picked_piece[a][b]
#

Try this

#

Sorry

#

I am on ios

#

def falling_piece(picked_piece, displayed_board, x, y):
    n_row = len(picked_piece)
    n_col = len(picked_piece[0])

    for a in range(n_row):
        for b in range(n_col):
            if x + a < len(displayed_board) and y + b < len(displayed_board[0]):
                displayed_board[x + a][y + b] = picked_piece[a][b]

#

It’s a skill issue by me

#

I thought you were trying to print a group of 0 in a board form or something

peak nacelle
#

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

pure inlet
#

And what are you doing here?

toxic arch
#

i think ive done figured it out

#

i needed to sort via the hashes

#

is there a way to get the active bot develoepr role legitly

whole bear
#

hey

#

could someone help me with a problem I am having?

wise loom
whole bear
#

@wise loom

rigid nacelle
#

what are you working on guys?

wise loom
ebon mist
#
def falling_piece(picked_piece, displayed_board, x, y):
    s_y = y
    row_of_picked_piece = picked_piece[0]
    coll_of_picked_piece = row_of_picked_piece[0]
    n_row = len(picked_piece)
    n_coll = len(row_of_picked_piece)

    x_piece = 0
    y_piece = 0
    for a in range(n_row):
        for b in range(n_coll):
            if picked_piece[a][b] == 1:
                print(x,y)
                displayed_board[x][y] = 1
            else:
                displayed_board[x][y] = 0
            y += 1
        y = s_y
        x += 1
whole bear
#

could someone help?

ebon mist
#

!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 Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

ebon mist
wise loom
whole bear
#

seriously???

#

fine

#

I will use ai help

alpine crow
#

!e ```py
def falling_piece(picked_piece, displayed_board, x, y):
s_x = x
s_y = y
n_row = len(picked_piece)
n_coll = len(picked_piece[0])

x_piece = 0
y_piece = 0
for a in range(n_row):
    for b in range(n_coll):
        if picked_piece[a][b] == 1:
            print(s_x,s_y)
            displayed_board[s_x][s_y] = 1
        else:
            displayed_board[s_x][s_y] = 0
        s_y += 1
    s_y = y
    s_x += 1

board = [[0 for _ in range(10)] for _ in range(20)]
pick_piece = [[0, 1, 1],
[1, 1, 0]]
falling_piece(pick_piece, board, 1, 1)
for line in board:
print(line)```

wise cargoBOT
#

@alpine crow :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 1 2
002 | 1 3
003 | 2 1
004 | 2 2
005 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
006 | [0, 0, 1, 1, 0, 0, 0, 0, 0, 0]
007 | [0, 1, 1, 0, 0, 0, 0, 0, 0, 0]
008 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
009 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
010 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
011 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/EOQATLARPHURIDRDBAT4OXLBBQ

whole bear
#

the joseph stalin code is fixed type Joseph and a question for the leader

left leaf
#

( 0 0 0
1 1 1
222)

alpine crow
#

linear algebra

alpine crow
left leaf
left leaf
alpine crow
left leaf
#

awarge

sharp skiff
left leaf
alpine crow
left leaf
lethal rivet
alpine crow
#

Mao Zedong: "I’m not afraid of nuclear war. There are 2.7 billion people in the world; it doesn’t matter if some are killed. China has a population of 600 million; even if half of them are killed, there are still 300 million people left.”

lethal rivet
dry jasper
sharp skiff
#

Dmytro

sharp skiff
#

my real name

sharp skiff
alpine crow
#

!tos

wise cargoBOT
#
Did you mean ...

» tools
» off-topic-names
» microsoft-build-tools

alpine crow
#

SSH is the cryptographic network protocol that runs on port 22 and allows you to connect to the shell of a remote machine. On the other hand, SSH tunneling/port forwarding is a mechanism that creates a secure SSH connection between a local and remote computer. Because of its encrypted nature, you can use SHH tunneling to transmit messages that use unencrypted protocols such as IMAP, VNC, or IRC.```
#

Reverse SSH solves this issue by simulating an SSH to the remote server. In this case, the remote machine listens on the local computer’s network port. It relays SSH connection requests to that port back to itself, which establishes a new connection between the local and remote computers. In other words, you use a tunnel inside a tunnel to connect a server, remote machine and your machine (see Figure 1).```
lethal rivet
somber heath
#

@whole bear 👋

#

@whole bear 👋

whole bear
#

Hi

#

Wish I could talk

#

wanna play chess?

#

Yeah Ik

vocal basin
#

I'm relatively bad at chess, as far as rating goes

whole bear
#

Idc

vocal basin
#

(chess.com is banned here for different reasons)

whole bear
#

Omg

#

Why?

#

May I just know are you a woman?

somber heath
#

Some things in life are mysteries.

whole bear
#

Ok

vocal basin
whole bear
#

I can live with that

#

Yo I can't understand

#

my room

somber heath
#

Is your room talking to you?

whole bear
#

Sometime's it is an oven and sometimes it is antarctica

vocal basin
#

temperatures can be weird at times

#

around a month ago, here the most warm (as perceived) time of the day was midnight (for, like a week)

#

iirc, humidity influences that

whole bear
#

That's why I wear socks

#

they are so comfy

obsidian dragon
#

👋

#

on my way to work

#

will you be here in 10 hours

whole bear
#

Not going to school tomorrow so yeah

vocal basin
#

project, that I'm working on, just hit 10K lines of code

obsidian dragon
#

what is rust

whole bear
#

10k lines?!

#

omg

vocal basin
#

I don't remember if any of my Python projects got even close to being that large

obsidian dragon
#

I had a 40k line html

vocal basin
#

one might've been

whole bear
#

Some people are so dedicated

#

Alisa pls teach me python

vocal basin
#

what do you want to use Python for?

whole bear
#

For helping streamers

somber heath
#

In what way?

whole bear
#

If streamers are having an issue with some kind of code

#

I can help them

somber heath
#

How?

vocal basin
whole bear
#

If that doesn't work I can get a real job

somber heath
#

Oh, you mean offering yourself as a source of knowledge.

whole bear
#

sure

somber heath
#

Sorry, I was stuck on application development.

whole bear
#

Have you guys seen dougdoug

#

I want to be like him

vocal basin
#

requires extra research to figure out what is relevant nowadays

whole bear
#

Ik str, variable, int

vocal basin
#

!resources

wise cargoBOT
#
Resources

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

vocal basin
#

^ this has some links

whole bear
#

You see I want start writing my own codes

#

And looking at codes my brain gets tired easily

vocal basin
#

I used mostly this when I was starting to learn Python
https://docs.python.org/3/tutorial/index.html

#

but this tutorial isn't interactive enough

#

it's more of an overview of the language

whole bear
#

I mean you wanna create a project together?

#

That could teach me something

#

Sry I am being weird

vocal basin
#

I'm already busy with Rust work, and I generally don't collaborate on projects outside of some temporary occasions
if you start a GitHub repo, I can watch it for changes/issues, but I can't contribute to it regularly

whole bear
#

Ok I understand

vocal basin
#

making projects is quite good at accelerating learning process
but "theoretical" part is very important too, IMO

#

there might be some books on general principles of how to program stuff,
but I tend not to recommend any specific ones as many of them are either questionable or non-beginner-friendly

whole bear
#

There was a book in the resource command right?

vocal basin
whole bear
#

Yeah automate the boring stuff

vocal basin
#

it's outdated but still a good book, as far as I've heard

#

one possible way to approach this would be to try to replicate what's described in a book,
but in a way that's more idiomatic for newer versions of Python (if such change is appropriate)

#

there are some external packages mentioned in the book which have moved on with how their interfaces are implemented
and upgrading examples to newer versions may serve as a valuable experience

#

in part also because the reasons the things changed in the language/libraries are what you can learn

whole bear
#

Ok I understand

vocal basin
#

I don't remember if the selenium was one of the things from the book, but, as an example:
the package used to have each browser engine have its options passed in as keyword argument
but in newer versions those are all collected into a single Options type
"why was that change made? what became easier to do? what became harder to do?" -- these and other questions is what you can explore

whole bear
#

Ok wow you are giving me info

#

@calm burrow

#

Join here

vocal basin
whole bear
#

We can't talk

#

I use visual studio code

#

I am windows

#

Also why aren't you talking?

calm burrow
#

who me?

whole bear
#

In the vc?

#

No

#

Alisa

calm burrow
#

i tried talikng did anyone hear me

vocal basin
#

yes

whole bear
#

Yes

calm burrow
#

oh

vocal basin
#

I don't know if it's possible to enable that in VSC

#

(they might be "slightly" broken but when they work they're useful)

whole bear
#

thank you so much

calm burrow
#

where did everyone go

ocean galleon
#

@calm burrow hello

#

can't speak just yet new to the server

calm burrow
#

ok

ocean galleon
#

i'm trying to findout how many messages i sent so far

#

because its telling me to send atleast 50

calm burrow
#

shit just texting

#

just keep i meant

ocean galleon
#

alright

#

@calm burrow how long have you been coding for

calm burrow
#

a year i would say

candid juniper
#

your voice sounds very tired

#

@somber heath

#

im at school now i do have a micro but

#

i cant talk

ripe jewel
#

Hello

#

Nice to meet you again 👋

frozen echo
#

Hello....I am new to here ... can anyone tell me ...what are we talking about

calm burrow
#

yo

#

@frozen echo youve entered a python server if u know what python is we are here to help each other and be better together

frozen echo
#

@calm burrow thanks man.. really appreciate your help

calm burrow
#

no prob how lomg u been working on python @frozen echo

frozen echo
#

@calm burrow .. I can't say working..I say I learn it.. in my college it start teaching about python ... So I here to make friends and help each other.. around python geek people 😁

calm burrow
#

lol i get u hey i work on tkinter (which is opening window and haveing things pop up) but may i ask what u know abt python

#

@frozen echo

frozen echo
#

@calm burrow I know about basics of all... And little bit of pygame library

calm burrow
#

so like print("hello world!")

somber heath
#

@thin trellis 👋

thin trellis
#

hey i cant speak for some reason

#

@somber heath

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.

somber heath
thin trellis
#

it says voicegate failed

#

@somber heath

#

so i cant speak with you for help

#

i have an assignment for python that i need help with

#

i was wondering if you are able to help if possible

#

yes it doe4s

#

i will send

#

elementary_school_quiz: This function has two parameters, namely an integer flag that takes only values 0 or 1 and
an integer n that takes only values 1 or 2. If flag is 0, elementary_school_quiz helps practice subtraction. But if
flag is 1, elementary_school_quiz helps practice exponentiation. The function, elementary_school_quiz then
generates n math problems that a pupil must answer in turn. For each question, it generates two random positive,
single-digit numbers (check out python’s random module to see if there’s a useful function in there) and asks the
pupil for the answer to the math problem with those two numbers (either subtract the second number from the first,
or raise the first number to the power of the second number). elementary_school_quiz then prompts the pupil for
the answer, and checks if her answer is correct. At the end of n questions, elementary_school_quiz returns the
number of questions answered correctly.
high_school_quiz: This function has three parameters representing three real numbers for the coefficients of the quadratic
equation ax2 +bx+c = 0. The function displays/prints the equation frist and then prints its solutions. The function
must display correct and meaningful solutions given any three real numbers for coefficients a, b and c. See examples
in Section 3 to understand what that means. Please consider the examples to be a part of the function/program
specifications that must be followed.
Note that to solve this problem, you do not need to use Python’s complex numbers.

#

i already finished the elementary_school_quiz: i just need help on the high_school_quiz:

#

really streesed out about it its due tommorow at 8:00 AM

#

section 3 is the examples i can send

#

it is currently 1:37 am for me

#

you want me to send it?

#

''''def elementary_school_quiz(flag, n):
# Your code for elementary_school_quiz function goes here (instead of keyword pass)
# Your code should include dosctrings and the body of the function
#
# Preconditions: flag is 0 or 1, n is 1 or 2
if n==0:
return 0
right_answer=0
n1=random.randint(0,9)
n2=random.randint(0,9)
if flag==0:
answer=n2-n1
operator="-"
elif flag==1:
answer=n2**n1
operator="^"
print("Question 1: ")
pupil_answer=int(input("What is the result of"+" "+(str(n2)+ operator+(str(n1))+"?"+" ")))
if pupil_answer==answer:
right_answer +=1

if n==2:
    n1=random.randint(0,9)
    n2=random.randint(0,9)
    if flag==0:
        answer=n2-n1
        operator="-"
    elif flag==1:
        answer=n2**n1
        operator="^"
    print("Question 2: ")
pupil_answer=int(input("What is the result of"+" "+(str(n2)+ operator+(str(n1))+"?"+" ")))
if pupil_answer==answer:
    right_answer +=1

return right_answer'''
#

there

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.

somber heath
#

@white shale 👋

calm burrow
#

Hello @white shale

thin trellis
#

im not sure how to do so

#

i pressed on the python bot to pastebin

#

is that it

#

oh okay so i should use backtiks

#

okay

#
    # Your code for elementary_school_quiz function goes here (instead of keyword pass)
    # Your code should include  dosctrings and the body of the function
    #
    # Preconditions: flag is 0 or 1, n is 1 or 2
    if n==0:
        return 0
    right_answer=0
    n1=random.randint(0,9)
    n2=random.randint(0,9)
    if flag==0:
        answer=n2-n1
        operator="-"
    elif flag==1:
        answer=n2**n1
        operator="^"
    print("Question 1: ")
    pupil_answer=int(input("What is the result of"+" "+(str(n2)+ operator+(str(n1))+"?"+" ")))
    if pupil_answer==answer:
                           right_answer +=1
  
    if n==2:
        n1=random.randint(0,9)
        n2=random.randint(0,9)
        if flag==0:
            answer=n2-n1
            operator="-"
        elif flag==1:
            answer=n2**n1
            operator="^"
        print("Question 2: ")
    pupil_answer=int(input("What is the result of"+" "+(str(n2)+ operator+(str(n1))+"?"+" ")))
    if pupil_answer==answer:
        right_answer +=1

    return right_answer```
#

''''.py def elementary_school_quiz(flag, n):
# Your code for elementary_school_quiz function goes here (instead of keyword pass)
# Your code should include dosctrings and the body of the function
#
# Preconditions: flag is 0 or 1, n is 1 or 2
if n==0:
return 0
right_answer=0
n1=random.randint(0,9)
n2=random.randint(0,9)
if flag==0:
answer=n2-n1
operator="-"
elif flag==1:
answer=n2**n1
operator="^"
print("Question 1: ")
pupil_answer=int(input("What is the result of"+" "+(str(n2)+ operator+(str(n1))+"?"+" ")))
if pupil_answer==answer:
right_answer +=1

if n==2:
    n1=random.randint(0,9)
    n2=random.randint(0,9)
    if flag==0:
        answer=n2-n1
        operator="-"
    elif flag==1:
        answer=n2**n1
        operator="^"
    print("Question 2: ")
pupil_answer=int(input("What is the result of"+" "+(str(n2)+ operator+(str(n1))+"?"+" ")))
if pupil_answer==answer:
    right_answer +=1

return right_answer'''
#

''''.py def elementary_school_quiz(flag, n):
# Your code for elementary_school_quiz function goes here (instead of keyword pass)
# Your code should include dosctrings and the body of the function
#
# Preconditions: flag is 0 or 1, n is 1 or 2
if n==0:
return 0
right_answer=0
n1=random.randint(0,9)
n2=random.randint(0,9)
if flag==0:
answer=n2-n1
operator="-"
elif flag==1:
answer=n2**n1
operator="^"
print("Question 1: ")
pupil_answer=int(input("What is the result of"+" "+(str(n2)+ operator+(str(n1))+"?"+" ")))
if pupil_answer==answer:
right_answer +=1

if n==2:
    n1=random.randint(0,9)
    n2=random.randint(0,9)
    if flag==0:
        answer=n2-n1
        operator="-"
    elif flag==1:
        answer=n2**n1
        operator="^"
    print("Question 2: ")
pupil_answer=int(input("What is the result of"+" "+(str(n2)+ operator+(str(n1))+"?"+" ")))
if pupil_answer==answer:
    right_answer +=1

return right_answer'''
#

like thta?

#

that?

#

i cant

#

use f strings

#

im not allowed

#

@somber heath

#

im not allowed to use f strings or loops

whole bear
#

trizzy?

#

james?

calm burrow
#

i dont know he kinda bailed out

wise loom
#

@somber heath In descending order of importance (subjective):
Software Design by Example https://gvwilson.github.io/sdxpy/
Python Design Patterns https://python-patterns.guide/
The Architecture of Open Source Applications Vol I + Vol II + 500 Lines or Less https://aosabook.org/en/
Web Browser Engineering https://browser.engineering/
Obey the Testing Goat! https://www.obeythetestinggoat.com/pages/book.html
Software Design by Example https://third-bit.com/sdxjs/
The Fuzzing Book: Tools and Techniques for Generating Software Tests https://www.fuzzingbook.org/
https://www.cosmicpython.com/book/preface.html

calm burrow
#

Goodnight @somber heath catch u later!

somber heath
#

@rotund dragon 👋

gentle flint
#

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

somber heath
#

!e py variable

wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     variable
004 | NameError: name 'variable' is not defined. Did you mean: 'callable'?
somber heath
#

!e py variable = ... variable

wise cargoBOT
#

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

[No output]
umbral cape
#

@gentle flint sorry my discord has a seizure

ebon mist
vocal basin
#

not something I wanted to know existed

#

apparently, yes, people solder wires to them

somber heath
#

Oh, no.

peak nacelle
spare panther
#

hello theree

vocal basin
#

overly cursed

somber heath
#

Is that a card or a reader?

#

Please tell me it's a reader.

#

No...

#

It's a card.

vocal basin
#

might be adapter?

#

oh

#

no, can't be

spare panther
vocal basin
#

I forgot how they look

#

(adapters)

#

the smaller thing would be visible

vocal basin
rugged root
peak nacelle
vocal basin
peak nacelle
spare panther
#

have a good day ahead! must get going

vocal basin
peak nacelle
vocal basin
#

restart the plastic box, new ports might appear

rugged root
#

That'd be magical

lilac rock
#

Hi all, why am I muted?

gentle flint
#

tap it gently with a magical wand

somber heath
#

@lethal rivet 👋

rugged root
somber heath
wise cargoBOT
#
Voice verification

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

gentle flint
#

"open ports"
"sorry the sesame was finished"

rugged root
lilac rock
rugged root
#

Icky

lilac rock
#

Anyone going to pycon recently

somber heath
#

My crow ewes bee.

rugged root
#

Interested to do so, but sadly no

vocal basin
#

SDs should be electrically safe to hotswap

#

(just like most other connectables)

rugged root
vocal basin
rugged root
#

It's pretty quiet, actually

lilac rock
#

Gtg

vocal basin
#

I'm okay sleeping with the amount of noise my PC produces, so that's not really an issue for me

#

but I try to keep my home server quiet

#

with no moving parts

#

rpi is ARM, right?

gentle flint
vocal basin
#

mine is x86-64

#

right now it's 50 degrees celcius

#

with passive cooling

whole bear
#

Gm yall

vocal basin
#

at worst it was 95 degrees
but that was 1) summer 2) closed window 3) 100% CPU use

#

CPython works on ARM well enough

#

and many other languages do too

#

it throttles at around 105

#

rpi throttles at 80

#

this is Celeron

#

2017 CPU

gentle flint
whole bear
#

Hi

#

Bruh I don't know german

#

Hi Opal mist

vocal basin
#

also, slightly more doubled letters

echo garden
#

Fucking christ this day that's what I get for orocrastination

vocal basin
#

@ebon mist
nethack

echo garden
#

Procrastination

vocal basin
#

didn't know nethack supported all these

ebon mist
vocal basin
#

game

#

will likely run on rpi

#

(it works)

#

time to game (all parameters auto-picked)

#

this game truly is an interactive manual page

rugged root
vocal basin
#

bundled code likely, i.e. "unintentionally" obfuscated

#

though, if you had the code, would it really be readable enough to understand?

#

bun?

rugged root
vocal basin
#

there were some earlier alternatives, around when node.js appeared

#

so, we have C++ runtime of JS, Rust runtime of JS and Zig runtime of JS

#

Rust has proc-matro attributes instead of decorators

rugged root
#

Damn it, forgot they have limited Windows support

#

That's why I wasn't playing with it yet

vocal basin
#

bun?

rugged root
#

Yeah

vocal basin
#

but

#

does it have

#

Solaris support?

#

put bun into docker
put docker into LX-branded zone
put the zone into illumos

rugged root
#

I understood none of what you just said, AF, but it scares me still

vocal basin
#

LX-branded zones are techonology used by illumos (Solaris) to run Linux containers

#

this existed before Docker, iirc

#

basic Gitea setup is a monolith

#

it's literally one big executable

#

"you just chmod +x gitea and ./gitea and it works"
well, almost

rugged root
#

docker run --rm --init --ulimit memlock=-1:-1 oven/bun

#

Misread that as hemlock

vocal basin
#

proper Gitea setup would actually be around 3~5 services, I think?

#

database and cache at least

#

that's +2

rugged root
#

Right

vocal basin
#

then +1 for Gitea Actions

#

and +1 if you're insane enough to render Jupyter notebooks

#

don't stuff Jupyter into the same container, it will pain

#

official docs for integrating Jupyter are not production-ready

#

pay per empty lines

ebon mist
#

HELP

def game_loop():
    x = 0
    y = 4
    picked_piece = []
    is_falling_piece = False
    m_piece = False

    update_displayed_board()
    if m_piece != True:
        picked_piece = pick_piece(pieces_list)
        m_piece = True
        is_falling_piece = True

    if is_falling_piece:
        falling_piece(picked_piece, displayed_board, x, y)

    if x != 19:
        x += 1
        is_falling_piece = True
        m_piece = True

    else:
        is_falling_piece = False
        m_piece = False

    draw_grid()
    pygame.display.flip()
rugged root
#

Pay per line, and then they just minify it and it's all on one line

vocal basin
# vocal basin pay per empty lines

if people don't game the metric, it actually tracks progress quite well,
because it correlates to code improvement (due to both refactoring and feature addition)

#

unless code improvement is just cutting code

#

which it often is

rugged root
#

@whole bear Suuuuuuup

vocal basin
#
x = 0
y = 4
picked_piece = []
is_falling_piece = False
m_piece = False

def game_loop():
    global x, y, picked_piece, is_falling_piecce, m_piece

    update_displayed_board()
    if m_piece != True:
        picked_piece = pick_piece(pieces_list)
        m_piece = True
        is_falling_piece = True

    if is_falling_piece:
        falling_piece(picked_piece, displayed_board, x, y)

    if x != 19:
        x += 1
        is_falling_piece = True
        m_piece = True

    else:
        is_falling_piece = False
        m_piece = False

    draw_grid()
    pygame.display.flip()
#

but a class would be better

#

@ebon mist declare outside of the function

#

if you want to change it

#

suggesting to disable unused lint is so evil lmao

somber heath
#

!epy for\ i\ in\ range\ ( 5)\ : print(i)Pay me per line. I am great developer.

wise cargoBOT
#

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

001 | 0
002 | 1
003 | 2
004 | 3
005 | 4
vocal basin
#

inside a function, deleting is okay;
if a variable represents some state that might be useful later in development,
refactor the state into a class that holds that variable as a field

#

!e

# I wonder if this parses
for\
          i\
         in\
        range\
       (
      5
     )\
    :
   print\
  (
 i
)```
wise cargoBOT
#

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

001 | 0
002 | 1
003 | 2
004 | 3
005 | 4
somber heath
#

Oh, bugger, I forgot to draw out the print, didn't I?

vocal basin
#

also 5) is a line lost

somber heath
#

I am humbled and unworthy!

vocal basin
#

!e

for             \
          i    \
         in   \
        range\
       (    #
      5    #
     )    \
    :    #
   print\
  (    #
 i    #
)    #
wise cargoBOT
#

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

001 | 0
002 | 1
003 | 2
004 | 3
005 | 4
somber heath
#

Nice.

vocal basin
#

still can't inverse indentation because python

#

print needs to be to the right of for

#
  1. x is False is more idiomatic
  2. if you're checking for falsyness, use not x
rugged root
#
if blah == True:
# can be written as 
if blah:

# likewise
if blah == False:
# can be 
if not blah:
vocal basin
#

it is

#

!pep8

wise cargoBOT
#
PEP 8

PEP 8 is the official style guide for Python. It includes comprehensive guidelines for code formatting, variable naming, and making your code easy to read. Professional Python developers are usually required to follow the guidelines, and will often use code-linters like flake8 to verify that the code they're writing complies with the style guide.

More information:
PEP 8 document
Our PEP 8 song! :notes:

vocal basin
#

or not there

#

I don't remember

#

there was something about it but not in pep8

somber heath
#

!e py a = [] b = [] c = a print(a == b) print(a is b) print(a is c)

wise cargoBOT
#

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

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

True/False, just like None, have only one instance per value
https://docs.python.org/3/c-api/bool.html

#

is True and is False is to check whether the object is exactly True or exactly False

#

just stuff everything into a class

#

stop using functions when you're dealing with state

#

to avoid globals everywhere

#

I know TLA+ exists, but haven't looked into what it actually does

#

why is this opening a popup

somber heath
#

@scarlet torrent 👋

vocal basin
#

I sometimes forget popups exist in browsers

somber heath
#

@thorn cedar 👋

rigid nacelle
#

hisss

rugged root
#

Well wasn't expecting to find that gif

#

But I'll take it

vocal basin
#

if you don't want to structurize:

#

!e

class State:
    pass

state = State()
state.x = 0
def f():
    state.x += 1
    print(state.x)
f()
f()
wise cargoBOT
#

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

001 | 1
002 | 2
wise loom
vocal basin
#

the proper spelling is with + lifted
but fonts usually don't allow that so TLA+ is okay

#

both the site and wikipedia have it with special formatting

#

or, no

rugged root
#

TIL about TLA

vocal basin
#

wikipedia has TLA⁺ in title

#

Russian Wikipedia

#

not English

#

why

wise loom
# vocal basin I know TLA+ exists, but haven't looked into what it actually does

It's used to verify that programs work the way they should.
It's a model checker, meaning you define a model, a system of checks and balances (many invariants).
And then the model checker tries to find cracks in your assumptions, it searches through a lot of possible inputs and identifies states where your program's invariants are violated, aka bugs.
Software that has a model and TLA+ doesn't find such a state is called "verified software".
It increases the confidence that your code works correctly beyond what software testing can.
This is my current understanding of what it does.

vocal basin
rugged root
alpine crow
vocal basin
alpine crow
vocal basin
#

slightly "done" project

wise loom
#

and from what I've seen requires learning Temporal Logic and some other types of logics

vocal basin
#

Rust has its own approach to invariants/memory correctness/etc.

#

mostly assisted by types

alpine crow
#

I have been learning rust the past few weeks

#

its pretty insane

vocal basin
alpine crow
#

I am curious how do you idiomatically represent states in rust

#

do you use the enums?

vocal basin
#

yes

wise loom
alpine crow
#

I saw someone using unit structs

#

but that seems to get unwieldy

vocal basin
#

units structs are sometimes useful too

alpine crow
#

with like Password<Locked>, Password<Unlocked>

vocal basin
#

ah, as marker types

#

that is useful too sometimes

alpine crow
somber heath
#

@vague saddle 👋

alpine crow
#

bc idrk any use yet lol

vocal basin
#

I often use them to represent messages

#

like, Stop

wise loom
#

strongly typed languages won't eliminate bugs

alpine crow
#
// Instantiate a unit struct
    let _unit = Unit;

    // Instantiate a tuple struct
    let pair = Pair(1, 0.1);

    // Access the fields of a tuple struct
    println!("pair contains {:?} and {:?}", pair.0, pair.1);

    // Destructure a tuple struct
    let Pair(integer, decimal) = pair;

    println!("pair contains {:?} and {:?}", integer, decimal);
#

the example in the book doesnt even show the usage lol

vocal basin
#

another use is no-data Error type

#

because Result<T, ()> is unidiomatic

alpine crow
#

oh yeah

somber heath
#

@eager estuary @toxic niche 👋

alpine crow
#

thats almost null 👀

#

lol

toxic niche
#

hy

winter plover
#

how does this website design look so far ?

vocal basin
#
#[derive(Debug)]
struct Error;

type Result<T, E = Error> = std::result::Result<T, E>;
toxic niche
#

c++ >>

rugged root
rugged root
#

Oh also, guess what's out now

vocal basin
#

f-string syntax changes

#

[T] on class/function definitions

rugged root
#

Average performance increase of 5% as well

vocal basin
#

something something GIL in C APIs

toxic niche
#

altough i dont see it as a big advantage

eager estuary
#

@somber heath 👋

toxic niche
#

because of the fact that python is an interpreter language

#

so its purpose is not to be fast

somber heath
#
toxic niche
#

but easy to code and

alpine crow
somber heath
#

Python is fast. It's not as fast as some other things.

#

All things being equal.

winter plover
somber heath
#

Python has tricks up its sleeves for speed, including the power of friendship and cooperation.

vocal basin
#

I can't load the image in higher quality

somber heath
vocal basin
toxic niche
vocal basin
toxic niche
#

relative to compiler based languages no

#

relative to a 5 year old kid yes

somber heath
#

Moss. Argument.

vocal basin
#

not too machine code but still

#

idk if there's a proper term for that

dry jasper
#

AAß12

vocal basin
#

statically linked is a subset of what's commonly viewed as fast languages

dry jasper
#

AA-12

wise loom
#

@dry jasper so if your CLI program at work is accessing the remote MySQL database, you can set up SSL authentication such that only those users that have an SSL certificate on their machines can authenticate to the database. all the traffic between your program and the database will be encrypted.
https://dev.mysql.com/doc/refman/8.0/en/using-encrypted-connections.html

somber heath
#

Recoil or reek oil? You decide!

rugged root
#

@lavish rover Hey buuuuuuuuuuuudddddddddddy

lavish rover
#

hello fren

rugged root
#

How's it going

lavish rover
#

pain

somber heath
#

Why pain?

#

Where pain?

lavish rover
#

work debug

#

brain pain

whole bear
#

Yo

#

Can yall show me you're scripts?

#

Yo peeps

dry jasper
rugged root
lavish rover
#

I can't begin to explain the bullshit

alpine crow
vocal basin
#

well, at least it was React
I started with Angular

#

with those 8 minute compile times

alpine crow
#

lol

rugged root
vocal basin
#

I have only one website running that's written by me
and it's pure JS (because it's smaller and there's no real need for a framework)

vocal basin
#

or didn't

#

that was in 2020/2021

#

on Celeron

#

idk if Angular became faster in newer versions

rugged root
#

God you'd hope so

vocal basin
#

for dev builds it's quite okay

amber raptor
#

it didn't not

#

Google doesn't really care about build time

rugged root
#

Tracks

echo garden
#

oh give me a home, where the elite never roam, and i have peace and quite all day

rugged root
#

That means I wouldn't have it aliased to bun right?

#

I'd have to do that some other way?

vocal basin
#

log into the container

#

docker exec -it <name> bash

#
docker run -it --rm oven/bun bash
#

it actually just runs bun itself, so you can bind a volume into it

whole bear
#

<form action="#">
<table>
<tr>
<td class="tdLabel"><label for="register_name" class="label">Enter name:</label></td>
<td><input type="text" name="name" value="" id="register_name" style="width:160px"/></td>
</tr>
<tr>
<td class="tdLabel"><label for="register_password" class="label">Enter password:</label></td>
<td><input type="password" name="password" id="register_password" style="width:160px"/></td>
</tr>
<tr>
<td class="tdLabel"><label for="register_email" class="label">Enter Email:</label></td>
<td

<input type="email" name="email" value="" id="register_email" style="width:160px"/></td>
</tr>
<tr>
<td class="tdLabel"><label for="register_gender" class="label">Enter Gender:</label></td>
<td>
<input type="radio" name="gender" id="register_gendermale" value="male"/>
<label for="register_gendermale">male</label>
<input type="radio" name="gender" id="register_genderfemale" value="female"/>
<label for="register_genderfemale">female</label>
</td>
</tr>
<tr>
<td class="tdLabel"><label for="register_country" class="label">Select Country:</label></td>
<td><select name="country" id="register_country" style="width:160px">
<option value="india">india</option>
<option value="pakistan">pakistan</option>
<option value="africa">africa</option>
<option value="china">china</option>
<option value="other">other</option>
</select>
</td>
</tr>
<tr>
<td colspan="2"><div align="right"><input type="submit" id="register_0" value="register"/>
</div></td>
</tr>
</table>
</form>

How to css this?

vocal basin
#

it runs bun

#

without anything

wise loom
vocal basin
# oblique ridge

yeah, that; site I found it on is blocked here for some reason

#

linear extrapolation

#

I don't what it is

oblique ridge
amber raptor
rugged root
#

Same

vocal basin
#

it's a just joke, I hope

rugged root
#

According to the 3.12 "what's new", the average performance increase was 5%

#

So not too shabby

#

But not approaching C++

vocal basin
#

in that article

amber raptor
#

also generally when you start optimizing, you get decent gains because you trash crud

oblique ridge
vocal basin
amber raptor
#

but it's low hanging fruit

vocal basin
#

source of the image might even be from somewhere else

rugged root
#
Set-Alias -Name "bun" -Value "docker run --rm --init --ulimit memlock=-1:-1 oven/bun"
vocal basin
#

"use dev containers"

amber raptor
#
vocal basin
#

because arguments to bun won't be provided properly

mighty robin
#

oh mah gah

vocal basin
#

yeah, alias will work but it won't do correct things

#
docker run --rm --init --ulimit memlock=-1:-1 oven/bun argument

will run argument in the container instead of bun argument

amber raptor
#

docker run --rm --init --ulimit memlock=-1:-1 oven/bun

vocal basin
#
docker run --rm --init --ulimit memlock=-1:-1 oven/bun <file>
#

^ this is wrong

amber raptor
#

docker run --rm --init --ulimit memlock=-1:-1 oven/bun

vocal basin
#

this will run the correct command but will fail to find the file

docker run --rm --init --ulimit memlock=-1:-1 oven/bun bun <file>
#

something like this to make it see the current directory

docker run -v $PWD:/home/bun/app:ro --rm --init oven/bun bun <file>
rugged root
#
def ham(*args):
amber raptor
vocal basin
#

there's also Lua with its ... which is more cursed

vocal basin
rugged root
#

It's the same I think

vocal basin
#

*args and **kwargs are okay-ish for decorators
but analysers still struggle

#

or generally stuffing all the input into something else

#

if it's not automated via something like decorator, better use a class with parameters, I guess?

#

like how selenium introduced Options

amber raptor
vocal basin
#

yeah, but might as well just pass in the Movie instead (in the example)
so, like, it's more for typing what's already in variadic format, I'd expect

#

wait, why are examples with double-space indentation

#

oh, they did asyncio improvements again

rugged root
#

Oo I missed that

#

What were the improvements?

vocal basin
#

has had a number of performance improvements, with some benchmarks showing a 75% speed up.

#

and 3.11 added timeouts/taskgroups

#

Remove the distutils package
rip

#

wait, what was imp module

#

importlib precursor, ig

vocal basin
rugged root
oblique ridge
scarlet torrent
#

Please solution my problem

vocal basin
vocal basin
scarlet torrent
#

I am trying to install Ubuntu in my Dell laptop

vocal basin
#

what are you installing it from? USB? CD? DVD? SD?

scarlet torrent
#

Micro SD card

wise loom
vocal basin
#

how long has the hard drive been used for?

#

new? old?

scarlet torrent
#

I had use to make my usb bootable

wise loom
scarlet torrent
#

1.6 year old ssd

#

@wise loom
It is not a problem to make bootable USB
Problem is pop up when installing it in system

wise loom
scarlet torrent
#

It boot up with windows 11 easily

#

Without any problem

wise loom
scarlet torrent
#

I was used ubantu before it

#

But I accidentally deleted Ubuntu from it

wise loom
narrow sail
#

Hi guys, im a italina boy and i want lear python from zero , its possible here? ( my english is bad sorry)

#

italian*

vocal basin
#

!resources

wise cargoBOT
#
Resources

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

scarlet torrent
#

@wise loom
I Have bootup this laptop with debian 12 before it
But when I am trying to install mint Linux or Ubuntu Linux then it show me this error but in case of windows and Garuda Linux it works perfectly

vocal basin
#

losing sanity trying to reformat old python code

from __annotations__ import future
#

I've made this mistake at least thrice in the last 10 minutes

wise loom
scarlet torrent
#

I backuped my data and formatted entire disk
But after all these stuffs it show same error

#

Now my entire disk cleanup and I have not any os in my system

wise loom
#

The next natural step is to find out which of the two has physical defects and replace it.

scarlet torrent
#

If I try to install windows with same config then it doesn't give any kind of error

#

If some physical error os there the it doesn't allow to install windows

#

And I had tried to install Ubuntu in my friends system them it give me same error

#

I have tried this on 3 to 4 laptops

#

With different usb pendrives

#

If it is physical drive problem then all that pc are dameged ?
But they are working fine

wise loom
#

Have you checked how dusty/dirty your USB port actually is?
You may use some qtips or some type of alcohol-based stick to clean it.

scarlet torrent
#

All other things like writing read data mirroring phone display in pc mouse supported keyboard supported are working good but when I install Ubuntu then it becomes dirty 😀

wise loom
#

Also, if that USB port is fried, have you tried a different port instead?

scarlet torrent
#

Pls Don't say it's not work

wise loom
#

the actual place where you insert it

scarlet torrent
#

Ohh

woeful basalt
#

I Did it Finally i Voice Verified

scarlet torrent
wise loom
# scarlet torrent

very strong signs of usage, almost looks like someone rammed and jammed things into it, it's also a bit dirty

scarlet torrent
wise loom
#

you better get some qtips/toothpicks and alcohol and start cleaning it

#

make sure it's powered off when you do that

scarlet torrent
#

Outer surface is covered by lamination layout which is contained by scratch that why it looking dirty on out side
But you are saying then I will clean this and after that I will try

#

Thanks

marble grail
#

hello

calm burrow
#

hello

wise loom
#

@scarlet torrent any news?

scarlet torrent
#

I will do this tomorrow because it's night and I don't have alcohol yet

alpine crow
scarlet halo
fervent grail
#

WHO CAN WORK WITH OPENCV ?

scarlet halo
#

tf is that

#

im stupid

#

also sorry if i sounded rude

wise loom
fervent grail
#

can someone help me about this ?

wise loom
wise loom
#

@fervent grail let's move back here since the original issue was handled

fervent grail
#

I think

#

We can fix second problem too

wise loom
#

what's your experience with Python

fervent grail
#

A lot

wise loom
#

have you studied computer vision?

toxic meadow
#

do you like compitative programming?

fervent grail
wise loom
wise loom
#

@fervent grail have you ever used cv2.matchTemplate ?

fervent grail
#

Nah

wise loom
fervent grail
#

Wait a minute to see

#

I think yeah, I need it

toxic meadow
#

u have a hard time understanding my accent right??xD @wise loom

wise loom
fervent grail
#

Thank you very much @wise loom

wise loom
fervent grail
#

But, What you can do with python like, Can you work with pytorch ?

wise loom
bright grove
#

May I have a recommendation on what to download to start learning python?

fervent grail
#

How about tensorflow?

wise loom
bright grove
#

Thank you

wise loom
fervent grail
#

I mean, Can you work with it ?

wise loom
fervent grail
#

K

toxic meadow
#

codechef

fervent grail
#

What are you doing with python like, Web scraping or something else ? @wise loom

#

I mean why you working with python and what you love at python ?

wise loom
toxic meadow
#

have u tried any ml modules in pyth?

wise loom
wise loom
bright grove
#

What is the most unique usage of python you have seen?

toxic meadow
fervent grail
toxic meadow
#

u know i dont really like the front end development although i like dsa and compprog so any suggestions for me i couldnt find anything to learn all projects i could find are based on development and UI stuff

#

u can tell me on vc

wise loom
wise loom
fervent grail
#

Do you use python to make it ?

wise loom
fervent grail
#

K
Also can you send your website's repo link

bright grove
#

What type of skillsets should I develop to help with how I learn python?

#

Allow me to rephrase that

#

Which skillsets do you find to be the most useful for it?

fervent grail
#

Do you have job as a programmer ? @wise loom

wise loom
fervent grail
#

Then i can ask a question about getting job

#

Are you recommend to learn AI engineering ?

#

Or what you recommend to learn ?

bright grove
#

If you've learned an entire programming language doesn't that already give you lots of job opportunities?

wise loom
wise loom
bright grove
#

Thank you for your time

#

Have a nice day

fervent grail
#

Thank you for your time

vocal basin
#

!kindling @toxic meadow

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.

vocal basin
#

if you need to pick a project to do

wise loom
vocal basin
#

list of lists

#

(I've attempted almost nothing from that list)

#

you can apply regular software engineering standards to competitive programming tasks
but the field itself doesn't force you to

wise loom
#

knowing how to test and how to isolate defects is very important

vocal basin
#

competitive programming is also very algorithms-centred

#

even within that competitive niche, moving towards datastructure-centred approach may increase how much you learn

toxic meadow
#

any suggestions how i can improve my communication skills its not like i dont know english but i get really nervous speaking (in text i have no problem) i have confidence issues i think

toxic meadow
vocal basin
#

unless speaking causes actual harm to you, "just practice" would be the main advice

robust swift
#

!e
import tkinter as tk
from tkinter import messagebox

def win():
while True:
root = tk.Tk()
root.withdraw()
root.attributes('-topmost', True)

    massage.showerror("{,שתוק")
    root.destroy() 

win()

wise cargoBOT
#

@robust swift :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     import tkinter as tk
004 |   File "/lang/python/default/lib/python3.11/tkinter/__init__.py", line 38, in <module>
005 |     import _tkinter # If this fails your Python may not be configured for Tk
006 |     ^^^^^^^^^^^^^^^
007 | ImportError: libtk8.6.so: cannot open shared object file: No such file or directory
robust swift
cobalt cloak
#

חשבתי סתם העתקת ממישהו

#

חחחח

robust swift
#

כבר כמה שנים

cobalt cloak
#

אני לומד תכנות כמעט שנה

robust swift
#

אני מכין גם ציטים למישחקים רוצה?

#

יש בשרת שלי

#

לשלוח לך בפרטי?

wind raptor
#

!rule 4

wise cargoBOT
#

4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.

cobalt cloak
#

sorry

wind raptor
#

Please only English on the server. It's hard to moderate other languages

whole bear
#

הוא שקרן אני איתו בשיחה

robust swift
whole bear
#

אני מתכנת הוא הרגע לקח לי את הקוד

cobalt cloak
robust swift
#

איזה קוד

whole bear
alpine crow
#

I mentioned in an earlier video that programming a Tetris clone is a good way to get going with programming as it makes you think about algorithms. Putting my money where my mouth is, I went ahead and did just that.

GitHub: https://github.com/OneLoneCoder/Javidx9/blob/master/SimplyCode/OneLoneCoder_Tetris.cpp

https://discord.gg/WhwHUMV

Blog: ...

▶ Play video
#

this prolly will help u out

#

its not in python but this guy has hella good explanations

elfin bone
#

ya

cosmic bison
#

criminal

calm burrow
#

hi

somber heath
#

@valid sonnet 👋

valid sonnet
#

Yo

#

i cant speak?

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.

valid sonnet
#

says you dont have perm to speak in that channel

#

oh

#

!voice

#

nbm

#

nvm

#

how are you opa

#

cant hear you😂

#

wot did you said

somber heath
#

Disconnect, reconnect.

valid sonnet
#

owkie

somber heath
#

It takes joining the voice channel with the role to unmute.

nova dove
#

GUYS I NEED HELP
so i will race in soming that the winer will get 40k$ so i want to win the age is from 13 to 18 and im 13 so i wat to make a cool web so i win sooooo how do i make a web by using javescript html and python and I NEED HELP I HAVE ONLY 3 MOUTH

halcyon blaze
#

hi

serene tapir
#

can only one help me whit this?

somber heath
#

#web-development is not my wheelhouse. That said, there are a few things you may wish to investigate, in addition to anything else you come across: Django, Flask and FastAPI.

somber heath
#

Same with the else.

rugged root
#

@whole sparrow Yo

dark ermine
#

Bro, I have to send 50 messages here to talk in voice chat? And be active x amount of time. That's cool, but to send 50 messages? I was just trying to talk to someone. Anyone able to help me out or just get through it?

What does it mean to be active within a 10 minutes block? Like be active 8:01, 8:11, and 8:21?

somber heath
#

Don't stress over it. Just engage naturally and you'll be groovy.

#

It's a regrettable system, but, alas, one that became necessary.

rugged root
#

Three 10 minute blocks simply means at the very least a half hour conversation

#

But that can be spread over a larger period of time

somber heath
dark ermine
#

No problem. I was looking to hop in a call and see if anyone would be willing to give some advice on a challenge I have gotten myself put into with one of my projects.

Is there another place here I could ask that in chat? I'm not great at using discord so I'm not comfortable making like a "Forum" post if that is how it's set up here.

#

I understand there is code-help-voice-text, but I am not a part of the cool kids just yet.

vocal basin
#

there are topical channels, if your project/question fits into any of those

dark ermine
#

I'm essentially trying to figure out how to parse data from a 280k entry json/CSV. Eh I don't want to talk about it too much and clog it up here.

vocal basin
#

simple way to parse something is csv module
more advanced option is pandas

#

!d csv

wise cargoBOT
#
csv

Source code: Lib/csv.py

The so-called CSV (Comma Separated Values) format is the most common import and export format for spreadsheets and databases. CSV format was used for many years prior to attempts to describe the format in a standardized way in RFC 4180. The lack of a well-defined standard means that subtle differences often exist in the data produced and consumed by different applications. These differences can make it annoying to process CSV files from multiple sources. Still, while the delimiters and quoting characters vary, the overall format is similar enough that it is possible to write a single module which can efficiently manipulate such data, hiding the details of reading and writing the data from the programmer.

vocal basin
#

!d pandas

wise cargoBOT
dark ermine
#

Okay, is there any other place? To further explain the scope, the purpose will be for JavaScript to determine if the browser version is within range of a CVE. I am doing a server side vulnerability detection project.

vocal basin
#

this would like require parsing the file and then putting it into a database

#

for easier querying

#

do you have enough RAM to load the entire file?

dark ermine
#

Okay, pandas is interesting.

I believe I may try to cut down the list of CVEs into only ones that mention browsers, that way it will be easier for HS to sort through it in the browser. I am not planning to transmit the data of the browser version that's why I'd like JS to determine if the environment is contained in the description of a CVE using RE.

The purpose could be to kick vulnerable clients off of my wifi network by putting this code on a captive portal. (Splash page)

#

I can load the whole file, yes.

#

^I figured rather than a database (requiring a packet to be sent containing user information) JS in the browser can compare it's variable to the contents in a file. That's where it gets tough though, if I were planning on just using python and a database then it would be more simple for me.

vocal basin
#

(* every version known so far)

wise loom
dark ermine
#

I figured, I could take the two variables of the browser, such as "browser flavor such as Firefox or Chrome", and "version number"

Then using regular expressions compare those results and see if the version of the browser falls within the range they list in the descriptions. An example is like Firefox 99.0 <, safari 109.7 <

#

The csv I grabbed was off the mitre CVE website. I just don't need the 280k results either. I would first need to parse down the results to only results that have browser flavors in the description.

vocal basin
#

given browser type and version, what output do you expect?

#

list of CVEs?

dark ermine
#

This challenge has came last minute, as this challenge is the finishing piece to share some interesting information about the privacy of wireless networks. I am trying to do it this complicated way with the database to rather than showing straight exploitation to show how the server can detect vulns in a safe manner to the clients. This means not transmitting the data. Keeps it CFAA friendly if I am to share a presentation about it and that is the goal to keep ethics the focus.

#

Maybe I can show you. I've played around with it a bit already. Give me a moment.

#

At the moment I have something set up that will give me output similar to this:

Given the clients version (browser/version) they may be suspectable to # CVEs:
CVE-6942023 - Description: browser/version susceptible to buffer overflow.......

CVE.......
#

Which then can be used as a trigger to kick them off of the network.

This information is collected and there are many events that trigger when a client first joins the network. A lot is going on and this is just the last little part that needs added to complete the whole. I was just looking to hopefully talk to someone and seek advice on my challenge. I usually don't seek advice but I would like to for this ':)

vocal basin
#

how many different browser versions do you expect to receive from clients?

#

if you have enough memory, you can pre-generate results

dark ermine
#

I plan on at least a few basic common ones, to show the PoC in the proper light.

Chrome, Firefox, Safari
Maybe Opera, Maybe Edge?

vocal basin
#

I mean number of versions per browser

dark ermine
#

I plan on using the "Ranges" described in the descriptions. There they will mention the last known version to be affected usually followed by a < sign to show and versions earlier.

vocal basin
#

only <, right? (i.e. introduction date is ignored)

dark ermine
#

So if I can find the keyword for the browser which is in the description too, like Firefox, then I can check each entry that is returned by seeing if my current version number is that version or before.

vocal basin
#

if the main filter is <version, then you can sort all CVEs by what version they were resolved in

dark ermine
#

Here is a representation of the dataset I have.

rugged tundra
#

Elysian

vocal basin
#

allegedly

rugged root
#

I don't speak that frenchy french moon language

dark ermine
#

I'm hopping on my Linux box to try to pull some extra info.

desert vector
#

moon runes :D

oblique ridge
vocal basin
#

express is built on top of node