#voice-chat-text-0

1 messages · Page 162 of 1

vocal basin
#

if you can't provide a surjective function P->Q but can provide a surjective function Q->P, then set P is smaller than set Q

primal escarp
#

i will put my armor on

#

okey dad

#

dy

karmic wadi
#

it wont let me talk lol

vocal basin
#

.latex $\sigma$

viscid lagoonBOT
vocal basin
#

@lunar haven no sound?

#

VC

#

today started only 2 hours ago, so the answer is nothing

#

for later -- idk

#

I don't remember

solemn igloo
#

bruh

cosmic bison
#

my genuine reaction to that information: ^

pulsar cobalt
#

DM IF U CAN MAKE A YOUTUBE VIDEO UPLOADER BOT IL PAY

scarlet halo
#

nah

somber heath
#

@pulsar cobalt Specifically, your request will at least be in conflict with rule nine, prohibition against soliciting paid work. 🙂

sour willow
#

worded it like a lawsuit but ok

#

meta gaming? what

vocal basin
#

"live coding" -> "die coding" when someone starts speaking German?

#

(I don't actually remember how that article/preposition/whatever is used properly)

#

confusing

sour willow
#

urine isnt toxic

#

just eh more that uncomfortable to be in urinated water

scarlet halo
#

firefox is customizable and i love it

sour willow
scarlet halo
#

idc

sour willow
#

lacks extensions

scarlet halo
#

nah

#

i dont like extensions

#

i only want an adblocker

#

and some other shit

sour willow
#

i mean i use firefox but the only reason is bc im too lazy to install chrome

scarlet halo
#

"too lazy to install chrome"

#

fair enough

#

i hate chrome

#

because google

sour willow
#

its more than installing it, getting my extensions setup, etc...

#

takes time

sour willow
#

you using firefox will prob make no difference

#

also who said anything about chrome? if your really into not using google install brave or chromium

scarlet halo
#

im just stopping them from knowing more

sour willow
#

😂 sure is effective

somber heath
#

@remote bridge 👋

remote bridge
remote bridge
#

no

#

its fine

sour willow
#

@lucid blade u sure this isnt just domestos bleach?

remote bridge
#

Can anyone tell me what I would need to include when making a portfolio ina github repository

#

content

scarlet halo
#

projects

remote bridge
#

ok

#

my first, I am just learning python

lucid blade
vocal basin
#

also Triton

#

but they somewhat reduced their open-source work since acquisition, afaik

desert wolf
#

sparc64 compat?

cosmic lark
scarlet halo
#

"Yeah it's mail with cocks" what is that even supposed to mean

cosmic lark
scarlet halo
#

why would i want mail with cocks

cosmic lark
somber heath
#

Sweeney Todd, The Demon Barber of Fleet St.

#
YouTube Music

Sweeney Todd: The Demon Barber of Fleet Street: The Motion Picture Soundtrack is a soundtrack to the film of the same name, released on December 18, 2007.
In a change from the original, Sondheim cut the show's famous opening number, "The Ballad of Sweeney Todd", explaining, "Why have a chorus singing about 'attending the tale of Sweeney Todd' wh...

whole bear
#

hello

amber maple
#

no privilege for ,e

#

very nice thanks

jolly terrace
#
import tkinter as tk

root = tk.Tk()
root.title("Inventory Editor")
root.geometry("400x300")
# Create a listbox to display the items
listbox = tk.Listbox(root)
listbox.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)

# Create a label to show the quantity of the selected item
quantity_label = tk.Label(root, text="Quantity: ")
quantity_label.pack(side=tk.TOP)

# Create an entry to enter a new quantity
quantity_entry = tk.Entry(root)
quantity_entry.pack(side=tk.TOP)

# Create some buttons to add, remove, or update items
add_button = tk.Button(root, text="Add")
add_button.pack(side=tk.BOTTOM)

remove_button = tk.Button(root, text="Remove")
remove_button.pack(side=tk.BOTTOM)

update_button = tk.Button(root, text="Update")
update_button.pack(side=tk.BOTTOM)
# Create a dictionary to store the items and their quantities
inventory = {}

# Define a function to update the label and entry values based on the listbox selection
def update_selection(event):
    # Get the selected item from the listbox
    item = listbox.get(listbox.curselection())
    # Get the quantity of the item from the dictionary
    quantity = inventory[item]
    # Update the label and entry values with the item and quantity
    quantity_label.config(text=f"Quantity: {item}")
    quantity_entry.delete(0, tk.END)
    quantity_entry.insert(0, quantity)

# Bind the listbox selection event to the update_selection function
listbox.bind("<<ListboxSelect>>", update_selection)
#
# Define a function to add a new item to the inventory
def add_item():
    # Get the item and quantity from the entry widgets
    item = quantity_label.cget("text").split(": ")[1]
    quantity = int(quantity_entry.get())
    # Check if the item is already in the inventory
    if item in inventory:
        # If yes, show an error message
        tk.messagebox.showerror("Error", "Item already exists")
    else:
        # If no, add the item and quantity to the dictionary and the listbox
        inventory[item] = quantity
        listbox.insert(tk.END, item)
        # Clear the entry widgets
        quantity_label.config(text="Quantity: ")
        quantity_entry.delete(0, tk.END)

# Bind the add button command to the add_item function
add_button.config(command=add_item)

# Define a function to remove an item from the inventory
def remove_item():
    # Get the selected item from the listbox
    item = listbox.get(listbox.curselection())
    # Check if the item is in the inventory
    if item in inventory:
        # If yes, remove the item and quantity from the dictionary and the listbox
        inventory.pop(item)
        listbox.delete(listbox.curselection())
        # Clear the entry widgets
        quantity_label.config(text="Quantity: ")
        quantity_entry.delete(0, tk.END)
    else:
        # If no, show an error message
        tk.messagebox.showerror("Error", "Item does not exist")

# Bind the remove button command to the remove_item function
remove_button.config(command=remove_item)

#
# Define a function to update an item in the inventory
def update_item():
    # Get the selected item from the listbox
    item = listbox.get(listbox.curselection())
    # Get the new quantity from the entry widget
    quantity = int(quantity_entry.get())
    # Check if the item is in the inventory
    if item in inventory:
        # If yes, update the item and quantity in the dictionary
        inventory[item] = quantity
        # Clear the entry widgets
        quantity_label.config(text="Quantity: ")
        quantity_entry.delete(0, tk.END)
    else:
        # If no, show an error message
        tk.messagebox.showerror("Error", "Item does not exist")

# Bind the update button command to the update_item function
update_button.config(command=update_item)

# Start the main loop
root.mainloop()
shut goblet
#

hey

#

guys i have a question regarding possiblities and probabilities

#

I'm trying to make a python script that will calculate all possible variations for a given Title. Here are some requirements: The title must be between 8-64 chars. And you can only add or remove "extra" spaces to make it unique. Another thing is that 2 titles that are generated one after the other cannot have the same character length.

Now here are some example:
Original Title: Used 2011 Honda Civic

Possible new titles (you can only add or remove "extra spaces")

  1. Used 2011 Honda Civic
  2. Used 2011 Honda Civic
  3. Used 2011 Honda Civic
  4. Used 2011 Honda Civic
  5. Used 2011 Honda Civic
  6. Used 2011 Honda Civic
  7. Used 2011 Honda Civic

Reminder
a) total title length must be between 8-64 characters
b) two consecutive titles should note have the same character length

my questions:
How many possibilities for a given title depending on
a) Original titles character count
b) Original titles word count

does the chances of duplicate ad increase or decrease as the number of words increase?
does the chances of duplicate ad increase or decrease as the number of characters increase?

#

it did not 😭

#

it gives me incorrect possibilities

#

you can ask in chat?

#

can you help me understand the math behind this ?

#

@jolly terrace

#

because if the original title has 64 character in it, then automatically the possibility for a duplicate ad is 100% no? @jolly terrace

#

you cant change the words do

#

we dont have to go to 64 characters. the max is 64 and the min is 8

#

our new title can have 35 chars too

#

or 63 or 26 etc...

#

whats your solution?

#

ok

#

thats not true do @jolly terrace

#

because more words = more possibilties no?

#

2011 Honda Civic

New 2011 Honda Civic

#

more options

#

for example:

Happy Dog (9 characters long)

jolly terrace
#

hello world
helloworld
hello world

shut goblet
#

yes, but if it has more words, then more possibilites

shut goblet
#

so 55 possibilities?

#

but

new example:
Cute Happy Dog (14 characters)

shut goblet
#

thats not ture

#

true*

#

because we can do different possible ways

#

like :

#

Cute Happy Dog
Cute Happy Dog
Cute Happy Dog
Cute Happy Dog
Cute Happy Dog

#

all the way till:

#

Cute (...) Happy Dog

#

64 chars

lethal mountain
#

hey i am beginer can any body guide me for my college

shut goblet
#

or you can do this:

#

Cute Happy Dog
Cute Happy Dog
Cute Happy Dog
Cute Happy Dog
Cute Happy Dog
Cute Happy Dog
Cute Happy Dog
Cute Happy Dog
....

#

you get it ?

#

so more possibilities with more words?

#

its a mix of word counts and character lenght in original title

#

ok

#

bye

#

can u help me @whole bear

nimble epoch
#

Oh my bad

stoic chasm
#

10 is infact 16 chars

shut goblet
#

hey can anyone help me here?

mortal burrow
#

hello hello

whole bear
#

@lunar haven ?

#

What

soft bear
#

i cant speak

#

yes

#

i have bad english

#

i not understand you

#

thanks? goodbye

near flint
#

@lunar haven Hello bro

upper arch
#

Hi

#

can you help me with a discord token post request

#

its not working for the bot dashboard

#

@lunar haven I cant talk for some reason

scarlet osprey
#

hello

upper arch
#

can you help?

#

Youd need to join my discord server cause I cant stream here

#

@scarlet osprey @lunar haven

vocal basin
upper arch
#

I would stream but it wont let me smh

#

The login thingy

vocal basin
upper arch
#

yes

vocal basin
#

what's the error traceback?

upper arch
#

lemme check

vocal basin
#

500 usually will be logged

#

(will full error traceback)

upper arch
#
  • Running on all addresses (0.0.0.0)
  • Running on http://127.0.0.1:8080
  • Running on http://172.31.196.116:8080
    Press CTRL+C to quit
    172.31.196.1 - - [08/Jul/2023 20:31:01] "GET / HTTP/1.1" 200 -
    172.31.196.1 - - [08/Jul/2023 20:31:01] "GET /style.css HTTP/1.1" 404 -
    2023-07-08 20:31:01 INFO discord.gateway Shard ID None has connected to Gateway (Session ID: 179f131874d39b4762f77b48a08c2009).
    172.31.196.1 - - [08/Jul/2023 20:31:01] "HEAD / HTTP/1.1" 200 -
    Successfully logged in as Echo AI#4570
    2IarSthcu9OA8H4tD3fgJlhPYZczRR
    [2023-07-08 20:31:12,853] ERROR in app: Exception on /login [GET]
    Traceback (most recent call last):
    File "/home/runner/Echo-AI/venv/lib/python3.10/site-packages/flask/app.py", line 2525, in wsgi_app
    response = self.full_dispatch_request()
    File "/home/runner/Echo-AI/venv/lib/python3.10/site-packages/flask/app.py", line 1822, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "/home/runner/Echo-AI/venv/lib/python3.10/site-packages/flask/app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
    File "/home/runner/Echo-AI/venv/lib/python3.10/site-packages/flask/app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
    File "/home/runner/Echo-AI/keep_alive.py", line 40, in login
    exchange = exchange_code(param1)
    File "/home/runner/Echo-AI/keep_alive.py", line 22, in exchange_code
    r.raise_for_status()
    File "/home/runner/Echo-AI/venv/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://discord.com/api/v10/oauth2/token
    172.31.196.1 - - [08/Jul/2023 20:31:12] "GET /login?code=REDACTED HTTP/1.1" 500 -
    [2023-07-08 20:31:12,854] INFO in _internal: 172.31.196.1 - - [08/Jul/2023 20:31:12]
vocal basin
#

are you using any pre-existing packages for oauth?

upper arch
#

IDTS = I dont think so

vocal basin
upper arch
#

how do I do it then?

vocal basin
#

you should probably reset it and enter it in some different way

upper arch
#

can you just join my server we vc

vocal basin
#

does replit support input?

upper arch
#

so I can livestream

upper arch
vocal basin
#

where did you get % API_ENDPOINT code from?

#

seems to be quite old

upper arch
upper arch
vocal basin
#

% string formatting is deprecated
if you took that from old codebase/old tutorial, it might not work anymore

upper arch
#

so what do I replace it with

vocal basin
#

f'{API_ENDPOINT}/oauth2/token' in modern python
(but that won't really change anything)

#

other thing that might be happening is that v10 API handles oauth differently from v6
but I wouldn't expect it to

toxic arch
upper arch
#

I dont reemember\

toxic arch
#

k

upper arch
#

IDR = I Dont Remember

vocal basin
#

I have this in my code and it seems basically same

data = {
    "client_id": str(client_id),
    "client_secret": self.secret(),
    "grant_type": "authorization_code",
    "code": code,
    "redirect_uri": self.redirect(),
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
async with aiohttp.ClientSession() as session:
    async with session.post("https://discord.com/api/oauth2/token", data=data, headers=headers) as response:
        return await response.json()
#

you can try removing /v10 just to check whether that's the reason

upper arch
#

hm...

vocal basin
#

but I doubt it'll change much

upper arch
#

it didnt

vocal basin
#

do you have REDIRECT_URI added as a redirect url on the bot's configuration in developer portal?

upper arch
#

yes

vocal basin
#

one is /login, another is /final_destination

upper arch
#

oh

#

so I have to set final destination to login

#

@vocal basin now what

#

cheese!

#

wait, how are you voice verified

wise cargoBOT
#
Voice verification

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

upper arch
#

thnx

vocal basin
brave sorrel
#

i can't talk

upper arch
#

ok and then?

upper arch
brave sorrel
brave sorrel
#

what I can do

upper arch
upper arch
vocal basin
upper arch
#

where would I put that in the code

brave sorrel
upper arch
upper arch
vocal basin
brave sorrel
upper arch
brave sorrel
vocal basin
#

translated to requests from aiohttp

upper arch
brave sorrel
upper arch
vocal basin
#
def auth_info(access_token):
    headers = {"Authorization": f"Bearer {access_token}"}
    r = requests.get(f'{API_ENDPOINT}/oauth2/@me', headers=headers)
    r.raise_for_status()
    return r.json()
vocal basin
upper arch
vocal basin
#

I forgot to change url

upper arch
#

skull

vocal basin
#

now you can put token you got from exchange_code into auth_info to get various information

brave sorrel
vocal basin
#

full 72 hours

vocal basin
upper arch
#

You can tell Im out of my territory here with dashboard code

brave sorrel
vocal basin
# upper arch how?

you need to somehow store the token either server-side or client-side
I don't know which way is safer/better in your case

upper arch
#

can I just store it in the code

vocal basin
#

not really

upper arch
#

well... would client side work if my computer was turned off

#

?

vocal basin
#

you can use cookies and/or localstorage on the browser side

upper arch
#

how would i do that

vocal basin
upper arch
#

how would I use that for Python

vocal basin
#

localStorage is browser-side (it's accessed by JavaScript)

upper arch
#

ok...

#

IDK Javascript, I just know HTML, CSS, and Python

whole bear
#

hi whatsup

#

what are you coding

#

@lunar haven

cerulean crater
#

hey everyone

#

yoo

#

what up

#

Im about to go to a coffee shop to code an app

#

Coding in public just makes you look more leet

#

I like this girl at the shop...

#

Shes a data analyst...

#

shes still on her way

#

she really likes math

#

Both

#

I know I wont get much coding done

#

but im coding something from a tutorial

#

So I dont wanna show up....

#

looking like I dont know what Im doing

#

Im going to be coding a NextJS app

#

she only knows python...

#

Bro..you dont even know

#

I even cleaned my pc

#

I cleaned the screen really nice

#

just in case she sholder surfs me

#

Idk...this girl is smart

#

can I drop a photo here

#

yea

#

she is in school for the data anaylst stuff

#

I wonder if she likes me tho

#

its so hard to tell

#

so I always try show my interest in coding to her

#

I can code better than her tho

#

yea

#

i help her w hers

#

right

#

wait

#

look at this

#

I gifted her a flipper zero

#

its a little micro controller

#

palm sized

#

yea

#

just like pi

#

multi-tool purpose

#

hmm

#

wanna see something

#

hacking tool really

#

watch this

#

im going to release this later

#

Im the hacker

#

not her

#

she is just sweet girl

#

because you have to know the mindset to be better than me

#

I wanna make this go viral

#

you have to a winning mindset to hack me

#

thats what i meant

#

yes yes

#

That video is going to scare people

#

Imagine talking shit

#

and hiding behind that door

#

no encryption

#

but imagine

#

talkin shit

#

i could maybe use different method

#

but look

#

ppl talk shit and try to run

#

and flip you off behind that door

#

and then boom

#

you brute force the door

#

hahaha

#

and they have no where to run

#

lmaooo

#

people who hide behind doors

#

after talkin shit

#

lmaooo

#

noo

#

verify!

#

!verify

#

yeaaa

#

im gonna smoke a joint

#

then change my clothes

#

i dont want her to smell the weed

#

on my clothes

#

and the shower will relax me

#

Yes

#

I need a gf

#

Noo

#

I know I need a girl in tech

#

she will help me find my role in cyber sec

snow oasis
#

@lunar haven

cerulean crater
#

Look I like her ok

#

tired of girls who play me all the time

#

Im really gonna try

#

I need to show me bm

#

show my bm

#

that I dont need her

#

lol

#

baby momma

#

american slang

#

ex gf that has your kid

#

no

#

i have a bm

#

life is complicated

#

No

#

Well

#

maybe

#

I need to show my bm that im better without her

#

she didnt want me to enter tech

#

yea normally i dont pick them

#

but i like this one

#

she is perfect

#

and fun

#

yea she wanted me to quit coding

#

so now im single dad coder guy

#

and living my best dev life

#

tryin to find a dev shorty

#

lol its a saying

#

yes

#

black guy slang

#

like my lil baby

#

bitch is harsh

#

shorty is friendly way of sayin my girl

#

but I call everything my shorty

#

yes

#

that too

#

short girl with fatt butt

#

yes

#

bm = parent relationship

#

child support no joke

#

i hate it

#

yes

#

i do

#

and she lies

#

and says i dont give it to her

#

but lookim going afk

raven mural
#

👋

cerulean crater
#

i need to smoke the joint

raven mural
#

Whats good homie

cerulean crater
#

but i can hear you

raven mural
#

I got pipe

cerulean crater
#

in my airpods

cerulean crater
raven mural
#

We doin

#

Indica or sativa?

#

What you like better

cerulean crater
#

indicaaa

raven mural
#

Hell yeah

#

We talking about whether or not plant makes you sleep or hyper

#

Sativa = hyper

cerulean crater
raven mural
#

Indica = sleep

snow oasis
raven mural
cerulean crater
#

i love it

snow oasis
#

me too

cerulean crater
#

guys let me get to the lobby of this hotel

#

im in sf

#

sf,ca

raven mural
#

damn nice

cerulean crater
#

I agree

#

I was living in Chicago

raven mural
#

not much better

cerulean crater
#

But I made a decision to leave

raven mural
#

you like sf more?

cerulean crater
#

Sf is better

#

I went to college here

raven mural
#

Hell yeah

cerulean crater
#

And there’s weed here

#

No but close to Berkeley

#

Art school

#

Haha

raven mural
#

Are the prices better at disp in sf compared to chicago

cerulean crater
#

Expression college for digital arts

#

I’m kinda connected to the black market

#

For weed

#

But judging from bill boards

raven mural
#

yeah they have better prices

#

Especially if you’re close to a grower

cerulean crater
#

It seems like weed is cheaper

#

This is me in real time

raven mural
#

gofek where are you from?

#

born on the internet and we gonna die on the internet

vocal basin
#

parrotverse

cerulean crater
#

Haha

raven mural
#

So what are you doing gofek

#

it was typo dead ass

#

wait what

#

lmfao

#

fuck elon musk

#

gofeka = elon muust?

#

fuck

#

Elon musk*

vocal basin
#

Elon Musk isn't smart

raven mural
#

It’s his money. Not here to say how he should spend it, but buying out Twitter, just to fire the staff and then not even understand running a huge application such as twitter

#

He doesn’t benefit

#

And that’s what I’m perplexed by

#

At least he doesn’t benefit in ways that make readily apparent

cerulean crater
#

hey

raven mural
#

It’s just kinda screams: “I have money and also impulsive”

cerulean crater
#

sorry i got totally high

raven mural
#

u good

cerulean crater
#

no

raven mural
#

yes u are

cerulean crater
#

now im too high to go code in public

raven mural
#

No one is gonna pay attention to you

#

get in your element, g

cerulean crater
#

youre right

#

but one person will

#

the girl

#

I dont want her to notice

raven mural
#

oh lord

#

I gotcha now

#

I so wish I can talk on VC

viscid lagoonBOT
#
Wikipedia Search Results

Stack (abstract data type)
checking for underflow, and returns the item that was previously the top one: procedure pop(stk : stack): if stk.top = 0: report underflow error else:

Integer overflow
term underflow is most commonly used for floating-point math and not for integer math. However, many references can be found to integer underflow. When

raven mural
#

naw just brush teeth and make sure you don’t smoke on your clothes

#

and you’ll be good 👍

#

You working on data structures?

#

gofek?

#

bruh i could explain

cerulean crater
#

i bought new gear from ross

#

i figured I should open my vs code and get my hands wet

raven mural
#

think like a stack of plates …

#

you put them on the same order you take but opposite

#

or rather

#

sure

#

lol

#

remove from empty stack

#

uh

#

I never it knew to have a name tbh

#

its arbitrary name?

#

A stack exception?

#

just say what it is

#

underflow?

#

i never heard anyone refer to it as underflow

#

not saying they don’t lol

#

nice

#

Its a queue

#

Naw i did an algo a while ago called shunting yard and queues were necessary to preserve paranthesis

#

that exact question was used

#

its a queue

#

Queues preserve the order

#

example

#

“ ( 2 * 6 ) “ would be pushed onto a queue and read the same way when removing from queue

#

some operations are left / right associative

quick orchid
#

hey

#

I still can't talk

#

I am supressed

raven mural
#

stack is LIFO so it will give you opposite order

quick orchid
#

push and pop operations and peek

#

on a stack DS

raven mural
#

he asking why its a queue to preserve parenthesis

quick orchid
#

Last In First Out

raven mural
#

and not staxk

quick orchid
#

ok queues are using FIFO DS

#

First In First Out

raven mural
#

Yes

#

and they preserve order

quick orchid
#

the name says itself

raven mural
#

With fifo

#

Lifo gives you different order

quick orchid
#

but we have different types of queues

#

stacks are easy

raven mural
#

Yeah I know you know

#

But I’m telling him

#

👍👍👍

quick orchid
#

priority queues, circular, dequeues ...etc

raven mural
#

those are easy too

quick orchid
#

not for me

#

wanna code it for me in Python?

#

and what about Linked Lists? Singly, Doubly, Circular ...

raven mural
#

no, you should do that so you can learn and gain intuition and ezperience

#

Those are easy too

#

i’ll tell you whats fun

raven mural
#

Hash tables

quick orchid
#

I mean I quit from learning a long time ago anyway

#

lol

#

but I still remember

raven mural
#

why should I help if you quit learning?

quick orchid
raven mural
#

rhetorical

quick orchid
#

code it for me

raven mural
#

no

quick orchid
#

I wanna see how easy it is

raven mural
#

i can give guidance

quick orchid
#

come on

raven mural
#

okay okay

quick orchid
#

so you can't code ?

#

😄

raven mural
#

I’m choosing the language

quick orchid
#

What lang?

raven mural
#

C++, but I write easy to read c++

#

I’ll show you linked list and hash table

#

what are you even stuck on

quick orchid
#
#include <iostream>

int main()
{
  std::cout << "Hello" << std::endl;

  return 0;
}
#

xD

#

That's all I know xD

#

std == sexually transmitted disease

quick orchid
#

I am stuck there

raven mural
#
struct Node {
    int data;
    Node* next;
};

struct LinkedList {
    Node* head = nullptr;

}

int main(int argc* char* argv[]) {
    
    LinkedList list;
    list.head = new Node;
    list.head->data = 1;
    list.head->next = new Node;
    list.head->next->data = 2;


    return 0;
}
#

less than 25 lines

quick orchid
#

now traverse through the list

raven mural
#

ok

#

one sec

quick orchid
#

insert at the end and at the beginning

#

and insert at specific position + a function to remove a specific element from a list

#

xD

raven mural
#

you can do that

#
void traverse(LinkedList &l) {
    Node* current = l.head;
    while (current != nullptr) {
        std::cout << current->data << std::endl;
        current = current->next;
    }
}
quick orchid
raven mural
#

just describe what you are stuck on

#

its easier to help than just dump all info

quick orchid
#

wait

#

can you share the screen to call me

#

and we can code and talk about it 😄

raven mural
#

nah, i'm smoking

#

dont wanna ruin my vibe

#

what are you stuck on

#

like what they do?

#

just how to write one?

#

cuz if you know how they work you can just write it

#

like i'm saying cuz i wanna know what you're stuck with g

#

you stuck on the logic of the function(s) you wanna add?

quick orchid
raven mural
#

life

quick orchid
#

I am stuck on everything man

#

come on

#

let's code together 😄

raven mural
#

what are you writing this in

quick orchid
raven mural
#

okay lets use haskell

#

We will do it first in haskell, forth, then in typescript

quick orchid
#

tf man

#

just use C++

#

if we are already using C++

#

why to complicate

raven mural
#

C++ is a terrible language

quick orchid
raven mural
#

cuz its easy to show stuff in 🤩

#

poor guy…

quick orchid
#

lol

#

use C++

#

😄

raven mural
#

I have not written a queue in years

#

same with circular queues

quick orchid
#

@lunar haven

#

watching some crap

#

wbu

#

what?

#

xD

raven mural
#

bet you're a fan of microsoft java

#

aka C#

#

microhard

quick orchid
#

I don't know C#

raven mural
#

what languages you know?

quick orchid
#

and little bit of golang

raven mural
#

nice

#

why

quick orchid
#

what xD

raven mural
#

a'

#

kino?

#

your honor, it was kino.

#

kino good map

quick orchid
#

asm

#

adopts

#

use

#

stacks

#

mmmmmmmmmm

#

what what

#

lol

#

ok @lunar haven

#

how I can talk here damn???

#

LOL

#

ahhaaaahaahha

#

nah how I can talk here

#

I am bored

#

can't type all the time

stoic chasm
#

chil

raven mural
quick orchid
#

ok where I can get a license to talk xD

#

I need to verify?

wise cargoBOT
#
Voice verification

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

quick orchid
#

oh I see now

#

I need to wait one more day

#

ok

#

@lunar haven do you code in C++?

#

C you know?

#

and Python?

azure latch
#

yea

#

orange

#

oh

#

🐦

quick orchid
#

niceee

#

what's that

#

nice

#

how? I am using linux

#

idk man

#

I am using a laptop without a mouse

#

LOL

#

I need a mouse

#

it'a hard like this xD

#

@lunar haven you are still here?

#

ahahah where are u from @lunar haven

#

where??

#

I am from Serbia

#

I didn't hear you

#

lol

#

xD

#

tf man

#

cat

#

🙂

#

so where are u from

#

nah, I don't have animals

#

www?

#

lol

#

esta bien

#

entiendo

#

ok

#

me? I don't use netflix

#

I don't watch movies

#

depends

#

movies are stupid

#

ok

#

it's like watching coding videos

#

easier to do that, than to read sometimes

#

hi

#

what

#

ahh

toxic arch
quick orchid
ocean warren
#

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

ocean warren
#

!voiceverify

round oriole
#

need help with a project!

near flint
#

hello Whats Up bro @lunar haven

#

what are you doing

#

ohk

umbral harness
#

@lunar haven

#

i got voice but it dont want to work

#

@lunar haven

#

can you hear me

#

are you looking at that or are you working on it

opaque halo
#

Hello

upper arch
vocal basin
#

this part?
{{current_user.username}}#{{current_user.discriminator}}

#

(speculative fix)

#
{{current_user.username}}#{{current_user.discriminator}}

{{current_user.username}#{current_user.discriminator}}

second one tries to parse this as Python-like code:

current_user.username}#{current_user.discriminator
whole bear
#

E

whole bear
#

Cheese.

worldly roost
#

.topic

viscid lagoonBOT
#
**What is better: Milk, Dark or White chocolate?**

Suggest more topics here!

worldly roost
#

dark

#

others gib diabetic

noble solstice
#

Hii @lunar haven

somber heath
#

@whole bear 👋

somber heath
#

@north agate 👋

north agate
#

yooooo

#

ye i cant speak

#

nope

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.

north agate
#

shit this will take 3 days

#

oh ye

#

and i have 50 msgs right

#

what now

somber heath
#

@autumn fog 👋

autumn fog
#

hi

#

open my mic

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.

somber heath
#
# imported.py
class MyClass:
    def greet(self):
        print('Hello, world.')```
```py
# main.py
import imported
instance = imported.MyClass()
instance.greet()```
#

!d str.isdigit

wise cargoBOT
#

str.isdigit()```
Return `True` if all characters in the string are digits and there is at least one character, `False` otherwise. Digits include decimal characters and digits that need special handling, such as the compatibility superscript digits. This covers digits which cannot be used to form numbers in base 10, like the Kharosthi numbers. Formally, a digit is a character that has the property value Numeric\_Type=Digit or Numeric\_Type=Decimal.
somber heath
#

!d str.isnumeric

wise cargoBOT
#

str.isnumeric()```
Return `True` if all characters in the string are numeric characters, and there is at least one character, `False` otherwise. Numeric characters include digit characters, and all characters that have the Unicode numeric value property, e.g. U+2155, VULGAR FRACTION ONE FIFTH. Formally, numeric characters are those with the property value Numeric\_Type=Digit, Numeric\_Type=Decimal or Numeric\_Type=Numeric.
glad knoll
#

The error line and program you shared look different

#

Ohh okay

dry jasper
#

3x ` would help

somber heath
#

@near flint 👋

visual socket
#

yeah

tepid dragon
#

hello

#

hiii

#

was just looking around

vocal basin
#

!voice

wise cargoBOT
#
Voice verification

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

tepid dragon
#

hey umm is this DS? i see stacks up there

#

yea a lil bit

#

just entered my 2nd yr in uni but we still dont have DSA untill 3rd yr

#

nono an offline indian uni

#

its pretty shit

#

we dont learn

#

exactly i took cs50 it was soo good

jolly terrace
tepid dragon
#

our local uni really shit

jolly terrace
#

you need previous knowledge right?

tepid dragon
jolly terrace
#

shit

tepid dragon
#

just basic logical thinking is enough

jolly terrace
#

i'm looking for a place to learn maths

tepid dragon
jolly terrace
#

but

#

general too

#

hi @somber heath

tepid dragon
#

then go for stats but dont go in too much

#

linear reg is enough

jolly terrace
#

mmmm i'm a little lazy, i'm looking for a course where they have a way

#

and with problems

tepid dragon
#

dabble a little in discreet maths and u are all set

tepid dragon
#

well ur welcome

tepid dragon
#

accent is shit but good shit

jolly terrace
#

ahahh okay i'm going to look it

tepid dragon
#

yea u will need maths for uni

#

cs is glorified maths

#

!voice

jolly terrace
sick eagle
#

yes

tepid dragon
#

ahhhh okhh

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.

tepid dragon
#

i just joined the server for like 30mins

sick eagle
#

lol what?

#

uhm, this is getting confusing...

somber heath
sick eagle
#

just the entire convo

#

I feel like you are trolling at this point bro...

#

that's way out of context from trolling...

grim ermine
#

what?

tepid dragon
grim ermine
#

how should I speak in voice chat??

vocal basin
#

!voice

wise cargoBOT
#
Voice verification

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

grim ermine
#

okh I got it

tepid dragon
#

sayonara ppl

vocal basin
grim ermine
#

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

yes?

vocal basin
#

had to look up lyrics for some other song today to understand why the hell it was picked for the video

#

turned out the reason was that it mentioned "Swan Lake"

cloud arch
#

Sup

#

no

jolly terrace
vocal basin
#

you can have a reversed stack
(push to front, pop from front)

somber heath
cloud arch
#

actually double a means the letter ع in arabic so my name is 'عقرب' which is scorpion in arabic

#

iv always been

#

wym now ? xD

vocal basin
cloud arch
#

what are you doing gofek ?

vocal basin
#

I rarely use deque

#

Counter is more frequent

#

frequent not efficient

cloud arch
#

happnes xD

#

10/10 comedy

restive pond
#

hi

#

lmao

#

yeah I have

vocal basin
#

double ended queue

sick eagle
vocal basin
#

what's the question?

sick eagle
restive pond
#

can I have help with this?

#

idk why im getting an error

vocal basin
restive pond
#

no it says no module named views

vocal basin
restive pond
vocal basin
#

./website/views.py, right?

restive pond
#

yeah i think

vocal basin
#

if there are multiple views.py files, there might be issues

restive pond
#

theres only one view file

vagrant tiger
#

hi

#

how are u

vocal basin
restive pond
vocal basin
#

three of open files aren't saved

restive pond
#

BRUH THATS THE PROBLEM

vocal basin
#

that's what that circle indicates

restive pond
#

IMA STUPID BOZO

#

aint no way thats my problem

vocal basin
#

there's auto-save in File

restive pond
#

it worked...

#

thank you

somber heath
#

!voice @whole bear

wise cargoBOT
#
Voice verification

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

vocal basin
#

VS Code has shortcut for formatting

#

Alt+Shift+F, iirc

whole bear
#

can't unmute

vocal basin
wise cargoBOT
#
Voice verification

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

nimble epoch
#

Where's hemlock

whole bear
#

hiii

vocal basin
#

@somber heath they didn't hear (not in VC)

nimble epoch
#

Hello @somber heath

somber heath
nimble epoch
#

Ah

#

I see

somber heath
#

Though if you're asking about physical location, then Missouri, probably.

covert garnet
#

pithink yes

tepid edge
#

@vocal basin what're you up to?

vocal basin
#

time to write the most dumb solution for this:
https://leetcode.com/problems/find-the-pivot-integer/

LeetCode

Can you solve this real interview question? Find the Pivot Integer - Given a positive integer n, find the pivot integer x such that:

  • The sum of all elements between 1 and x inclusively equals the sum of all elements between x and n inclusively.

Return the pivot integer x. If no such integer exists, return -1. It is guaranteed that there wil...

tepid edge
#

I'm still working on my take home >.<

#

how about just using random.choice(range(1, n)) then checking it it's right?

#

it's guaranteed to work eventually :)

#

ah wait

#

I didn't finish reading

vocal basin
#

@wind raptor
||```py
class Solution:
def pivotInteger(self, n: int) -> int:
return {1: 1, 8: 6, 49: 35, 288: 204}.get(n, -1)

#

yes

#

those are only possible ones

#

just very unlikely

#

idk if there's a proof that the count grows logarithmically

#

!e

print(.5**.5)
wise cargoBOT
#

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

0.7071067811865476
vocal basin
#

provably

#

pivot=sqrt((n*n+n)/2) always when it's valid

#

such a useless plot

#

this was kind of unexpected

#

Y: logarithm of N
X: index of pivot

#

I may try to guess the next pivot number based on the ratio, maybe

#

Python and C++

#

differences between points

#

ratio seems to approach 3+sqrt(8)

#

@lunar haven venv?

#

python -m venv venv

#

and PyCharm does that automatically

#

@lunar haven ctrl+shift+P select interpreter

#

@lunar haven

#

also this influences it

vocal basin
#

idk why

#

Pylance broken

#

I don't have it selected

#

it works most of the time

#

re-opening the terminal also works if Pylance takes long too load

#

or just Python extension

#

it's not guaranteed to activate venv if you open the terminal before the extension is done loading

#

generally, selecting interpreter shouldn't change anything if you use it more than once in a workspace

#

something went wrong

#

it crashed

#

pivot and the n it's a pivot of

#

this, hypothetically, is 4096th n-pivot pair

pallid ether
#

sup

#

doing tryhackme lol

vocal basin
#

4096th

#

currently generating 65536th

#

I can speed it up by skipping steps, I guess

pallid ether
vocal basin
cinder dawn
#

@lunar haven u finished your course yet?

wintry pier
vocal basin
#

now I need to guess what 1.457106781186563 means

wintry pier
#

are you makeing prediction

vocal basin
#

or I can delegate guessing to WA

#

I improved the generation algorithm a little

#

print is now almost the main performance bottleneck

#

it's actually 1'000'001st because of off-by-one error

#

!e

i = 9
print(int((3 + 8 ** .5) ** i / 4))
wise cargoBOT
#

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

1940449
vocal basin
#

with the nuance that it all must be integer arithmetic

#

Chrome can't even wrap it anymore properly

vocal basin
#

rendering bug likely

tepid edge
#
1: 76861
2: 76770
3: 76177
4: 76271
5: 76755
6: 76915
7: 76429
8: 76653
9: 76512
vocal basin
#

iirc, all irrational algebraic numbers have the same amount of each digit

#

both is not rational and is a root of some polynomial

vocal basin
vocal basin
# vocal basin

so doesn't necessarily translate to distribution of these digits

glad knoll
#

Hi @lunar haven

vocal basin
#

"algebraic numbers" is likely the most easily defined of all those sets

#

I don't remember any alternative definitions for it

#

@proud gull help with what?

#

@proud gull did you add routes that act as if they point to an image?

#

same way as if you'd have with file response

#

!paste

wise cargoBOT
#
Pasting large amounts of code

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

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

vocal basin
#

other two options are:
base64 url
JS blob url

proud gull
#

pfp = db.Column(db.LargeBinary, default=open('D:\IRead\static\profile_pic\default_pfp.png', 'rb').read())
profile_picture = base64.b64encode(current_user.pfp).decode('utf-8')
    return render_template('profile_sample.html', username=username, email=email, profile_picture=profile_picture)
<img src="data:image/png;base64,{{ profile_picture|safe }}" alt="Profile Picture" style="width:100%">

The error message:
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) Could not decode to UTF-8 column 'users_pfp' with text '�PNG

'
[SQL: SELECT users.id AS users_id, users.username AS users_username, users.email AS users_email, users.password AS users_password, users.pfp AS users_pfp
FROM users
WHERE users.id = ?]
[parameters: (1,)]

vocal basin
#

did you encode it using base64 module?

opaque willow
#

hi

vocal basin
#

seems like you didn't

#

!d base64

wise cargoBOT
#

Source code: Lib/base64.py

This module provides functions for encoding binary data to printable ASCII characters and decoding such encodings back to binary data. It provides encoding and decoding functions for the encodings specified in RFC 4648, which defines the Base16, Base32, and Base64 algorithms, and for the de-facto standard Ascii85 and Base85 encodings.

The RFC 4648 encodings are suitable for encoding binary data so that it can be safely sent by email, used as parts of URLs, or included as part of an HTTP POST request. The encoding algorithm is not the same as the uuencode program.

vocal basin
#

before putting it into the response it needs to be encoded

proud gull
#

profile_picture = base64.b64encode(current_user.pfp).decode('utf-8')

vocal basin
#

in pfp = line?

#

like, not in templating/decoding

#

last three lines are irrelevant

proud gull
#

pfp = db.Column(db.LargeBinary, default=open('D:\IRead\static\profile_pic\default_pfp.png', 'rb').read())

vocal basin
#

!paste <-- you can put it in this

wise cargoBOT
#
Pasting large amounts of code

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

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

proud gull
#

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) Could not decode to UTF-8 column 'users_pfp' with text '�PNG

'
[SQL: SELECT users.id AS users_id, users.username AS users_username, users.email AS users_email, users.password AS users_password, users.pfp AS users_pfp
FROM users
WHERE users.id = ?]
[parameters: (1,)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)

Traceback (most recent call last)
File "C:\Users\andre\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\engine\base.py", line 1964, in _exec_single_context
self.dialect.do_execute(
File "C:\Users\andre\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\engine\default.py", line 747, in do_execute
cursor.execute(statement, parameters)
The above exception was the direct cause of the following exception:
File "C:\Users\andre\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 2548, in call
return self.wsgi_app(environ, start_response)
File "C:\Users\andre\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 2528, in wsgi_app
response = self.handle_exception(e)
File "C:\Users\andre\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\andre\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\andre\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 1820, in full_dispatch_request

vocal basin
#

just random letters

#

@tepid edge that line is correct, mostly

#

b64encode returns bytes

#

template wants str

#

error happens in User.query.get, allegedly

#

what type do you have for users_pfp column?

#

UTF-8 column 'users_pfp'
why does it say it's UTF-8 column then?

proud gull
#

pfp = db.Column(db.LargeBinary, default=open('D:\IRead\static\profile_pic\default_pfp.png', 'rb').read())

vocal basin
#

is pfp column mentioned anywhere else?

proud gull
#

profile_picture = base64.b64encode(current_user.pfp).decode('utf-8')

vocal basin
#

@tepid edge I joined because of the event that was a week ago

vocal basin
#

error happens in load_user function

#

I can open DMs temporarily

#

(did)

vocal basin
proud gull
vocal basin
#

Flask is weird in terms of how it handles everything

#

Django is similar, so might be easy to switch to that

#

I doubt that

#

the thing about Flask is that it's less powerful and simpler
that's why it's a good fit for small projects

#

I'd say that PFP logic should almost certainly should be a separate service

#

obviously

#

Django has its own ORM

#

sqlalchemy analogue

#

it can use jinja2 itself

opaque willow
#

Hi

vocal basin
#

how many users is that project expected to serve?

#

then Flask definitely doesn't fit it

opaque willow
#

Is your project a social network ?