#voice-chat-text-0

1 messages · Page 139 of 1

whole bear
#

so

#

it took like 2 days maybe 3

#

i only did the tests

#

i have over 11 certifications now

#

most of it ive already known

#

as i said check out my linked in

#

just covered burner plate content

#

like the python module

#

is the easiest

#

if you need help w that lmk

#

not saying you should skip them

#

but i didnt find them useful

#

i really only cared about the certification

#

thats what the course work is for

#

i found the videos to be a waste of time only because i knew the subject, it wasnt my first cyber security cert

#

i jsut wanted a google branded cert

surreal cape
surreal cape
ebon mist
#
    name = os.getlogin
    confrom_s = input ('do you want ' + name + ' as your name [y/n]' ).upper
    if confrom_s == 'Y' or 'YES':
        os_name = True
        input_name(os_name)
    else:
        os_name = False
        input_name(os_name)```
surreal cape
#

name = os.getlogin()

#

.upper()

ebon mist
#
        os_name = False
        return os_name
    {input_name()}```
ebon mist
#
import sys


def name_fech(os_name):
    name = os.getlogin()
    confrom_s = input ('do you want ' + name + ' as your name [y/n]' ).upper()
    if confrom_s == 'Y' or 'YES':
        os_name = True
        input_name()    
    else:
        os_name = False
        input_name()

def input_name(os_name):
    if os_name == True:
        name = input('what is youer name?')
    while confrom:
        if input ('is your name ' + name + '?') == "Y" or "yes":
            confrom = False
        else:
            confrom = True
    
name_fech()```
cedar solar
#

@lofty crater mic broker

lofty crater
#

I see

#

np

cedar solar
#

im talking 😦

lofty crater
#

dicord is not picking up your mic at all

lofty crater
surreal cape
#
try:
    age = int(input('How old are you? '))
except ValueError:
    print('Invalid value for age')

@ebon mist

dense breach
#

@lofty crater alt + click

#

oh

#

@ebon mist

spark kettle
#

from selenium import webdriver

Create a new instance of the Chrome driver

driver = webdriver.Chrome()

Open a URL in the browser

driver.get('https://example.com')

Get the current window handle

current_window_handle = driver.current_window_handle

Perform your actions in the current tab

For example, click a link that opens in a new tab

link = driver.find_element_by_link_text('Open in New Tab')
link.click()

Switch back to the original tab

driver.switch_to.window(current_window_handle)

Continue with your actions in the original tab

For example, interact with elements or navigate to other pages

Close the browser

driver.quit()

#

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

Create Chrome options

chrome_options = Options()
chrome_options.add_argument("--disable-popup-blocking")

Create a new instance of the Chrome driver with the modified options

driver = webdriver.Chrome(options=chrome_options)

Open a URL in the browser

driver.get('https://example.com')

Perform your actions in the current tab

Close the browser

driver.quit()

ebon mist
spark kettle
#

git commit -m "commit message"

#

git push

turbid sandal
#

᲼᲼

hallow warren
#

Whomever told me to look at Scrapy, it doesn't interpret JavaScript like Selenium/chromedriver does

#

There is something called Splash which works with Scrapy to interpret JavaScript, but it is "a bit outdated" so I am focusing on Selenium...

#

GPT-4 suggested this:

lofty crater
#

I see

#

suggested?

hallow warren
#
from bs4 import BeautifulSoup

# Create a new instance of the Chrome driver
driver = webdriver.Chrome('/path/to/chromedriver')

# Go to your page
driver.get('https://yourpage.com')

# Get the page source and parse it with BeautifulSoup
soup = BeautifulSoup(driver.page_source, 'html.parser')

# Find all forms
forms = soup.find_all('form')
for form in forms:
    # For each form, find all input fields
    inputs = form.find_all('input')
    for input in inputs:
        # Get the name or id of the input field
        input_name = input.get('name') or input.get('id')
        input_label = None
        # Check if there is a corresponding label
        if input_name:
            label = soup.find('label', attrs={'for': input_name})
            if label:
                input_label = label.text
        # Populate the field with Selenium
        field = None
        if input_name is not None:
            try:
                field = driver.find_element_by_name(input_name)
            except:
                try:
                    field = driver.find_element_by_id(input_name)
                except:
                    continue
        if field:
            field.send_keys('Your draft response')
            print(f'Populated field with name/id {input_name} and label {input_label}')

# Let the user make further edits before submission
# If you want to submit the form automatically, you could use: driver.find_element_by_name('submit').click()

# Always remember to close the driver when you're done with it
driver.quit()```
hallow warren
ebon mist
#
import sys
import json


def name_fech():
    
    name = os.getlogin()
    confrom_ss = input ('do you want ' + name + ' as your name [y/n]' ).upper()
    if confrom_ss == 'Y' or confrom_s == 'YES':
        os_name = True
        input_name(os_name)    
    elif confrom_ss == 'N' or confrom_s == 'NO':
        os_name = False
        input_name(os_name)
    else:
        print ('errer')
        name_fech()

def input_name(os_name):
    confrom = True
    if os_name == False:
        name = input('what is youer name?')
    while confrom:
        temp = input ('is your name ' + name + '?[y/n]').upper()
        if temp == "Y" or temp == "YES" :
            confrom = False

#json dump gos hear for the playre name

            age()
        elif temp == "N" or temp == "NO" :
            confrom = True
            name = input('what is youer name?')
        else:
            print ('errer')
            confrom = True

def age():
    confrom = True
    while confrom:
        age = input ('how old are you')
        if age.isdigit:
            confrom = False
        else:
            print ('errer')
    confrom = True        
    while confrom:
        confrom_s = input ('are you ' + age  + ' years old?[y/n]')
        if confrom_s == "Y" or confrom_s == "YES" :
            confrom = False
        elif confrom_s == "N" or confrom_s == "NO" :
            confrom = True
        else:
            print ('errer')
            confrom = True    
            
    #age json dump gose hear
    gender()
def gender():
    print

name_fech()```
#

{data = {player = {name = the players name {}}}

surreal cape
#
# example of a python dict
new_dict = {
    'player': {
         'name': name,
         'age': age,
    }
}

# if you want to add another key and value to the dict along the code
new_dict['new_key'] = new_value

# to access the player name
print(new_dict['player']['name'])
turbid sandal
#

from plyer import notification
import tkinter as tk
from tkinter import messagebox
import time
from datetime import datetime
from tkinter import filedialog
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QMessageBox
from tkinter import ttk
import os
import keyboard
import shutil
import psutil
import pyperclip
import smtplib
import playsound

ebon mist
#

???

#

why?

#

nm

turbid sandal
#

!code

#
# python script showing battery details
import psutil
class Battery:
    def __init__(self) -> None:
        self.batter = psutil.sensors_battery()
        
    def convertTime(seconds):
        minutes, seconds = divmod(seconds, 60)
        hours, minutes = divmod(minutes, 60)
        return "%d:%02d:%02d" % (hours, minutes, seconds)
    
    def get_level(self):
        return self.batter.percent
battery = Battery.get_level()
print(battery)
#

python script showing battery details

import psutil

function returning time in hh:mm:ss

def convertTime(seconds):
minutes, seconds = divmod(seconds, 60)
hours, minutes = divmod(minutes, 60)
return "%d:%02d:%02d" % (hours, minutes, seconds)

returns a tuple

battery = psutil.sensors_battery()

print("Battery percentage : ", battery.percent)
print("Power plugged in : ", battery.power_plugged)

converting seconds to hh:mm:ss

print("Battery left : ", convertTime(battery.secsleft))

gentle flint
#

oh god

#

markdown has just given another reason to use codeblocks

surreal cape
#

markdown is so ❤️

surreal cape
#

oh my, just found my book on sale at amazon 😮

lofty crater
#

what is the book about

surreal cape
#

introduction to algorithms and programming with python

lofty crater
#

I read that in college

surreal cape
#

yes, but I guess you dont read mine haha

#

mine is in portuguese language

lofty crater
#

yes I read the one in english

surreal cape
#

theres a lot of books in this theme

#

I will translate my book one day

#

actually, it is available on github and maybe the browser translator may cover a good part of the book

#

well Im going to bed

#

see you guys later o/

calm hearth
#

@somber heath Hello

#

what are ya doin'?

sturdy panther
#

Oh wow... I didn't know Discord now parses Markdown headings.

gentle flint
#

hell yeah baby

rocky dome
#

👋

#

how are yall doin

#

u are not interested in web dev?

#

ah, im interested in web dev coz it helps u to build ur ideas more good or somethin

#

like i have many ideas in my mind which are possible by web dev

#

only

#

bro i kinda hate cs50, today i took the game dev one

#

it was super fast

#

lua was easy since i know python

#

but it was reallly FAST

#

oh

#

lol

#

yes

#

theres a channel called certbros, they have good videos on network @whole bear less boring

#
#
#

oh

#

haha details are always beginner when starting out

#

certbros videos are short and they are informative

#

plus good visuals

rocky dome
#

idk why i said beginner

#

theres one problem when im learning something realted to network, i think like "i will forget this"

#

like in programming, i know i will implement this

#

but in network, i cant implement it anywhere or somethin

#

wow, certbros vids are like 5 minutes long, jeremy it labs are 30+ minutes long, imight watch his ccna course too

#

ayo 60 days??

whole bear
#

@rocky dome Hes probably the best ccna instructor out there!!

rocky dome
#

oh

#

i think i will watch his vids

#

coz my knowledge of networking is like..

#

not that much

#

just know a little stuff, like how packets transfer

#

and stuff

#

my knowledge about that is very little, i think i will like his course

#

how do you eel less insecure?

#

you feel*

#

forgetting stuff

#

thanks @whole bear
tryhackme * jeremy it lab = cool innit 🔥

#

should i install kali linux for tryhackme or is ubuntu fine?

whole bear
rocky dome
#

lol @velvet tartan

#

i think it will take many years

#

like many...

#

yes

#

but

#

yes that

whole bear
# rocky dome oh okay

Really to just learn linux in general. So ubuntu would be cool. You can also install each tool you need.

rocky dome
#

but i think kali has more tools

#

theres some problem with my partitions so icant install kali, thinking of virtual machine _triple boot _

rocky dome
#

i wont say "i know in dept" but.. i do know lets say 20+ commands still low

#

wait so you are self learning data science and going for cloud degree @whole bear ?

#

i was decided to start drop shipping but then i realized it is kinda shit

#

once decided*

hexed skiff
#

Hello

rocky dome
#

👋

#

how are you doin

hexed skiff
#

great

#

wby?

rocky dome
#

good

#

or

#

graet

hexed skiff
#

i just joined to check if i'm correct about an exercise

#

can someone check this?

vocal basin
hexed skiff
vocal basin
#

list is a built-in, you shouldn't use it as argument name

hexed skiff
#

yeah, i've already got some problems for using it

vocal basin
#

where are you closing the file?

hexed skiff
#

i don't rlly use it, i was just lazy to think about a name

rocky dome
hexed skiff
vocal basin
#

to make sure it's closed

with open(...) as file:
    ...
hexed skiff
#

thx

rocky dome
#

@whole bear some guy said that he earned less than a mcdonalds employee

hexed skiff
#
with open as file:
    file = open("solved_exercises/words.txt")

like that?

rocky dome
#

u sell stuff without buying @velvet tartan

vocal basin
rocky dome
#

like i have a bicycle on my webpage, when u order it, i will buy it from some chinese website (coz its cheap) then enter ur location

#

lolll

vocal basin
rocky dome
#

gtg

hexed skiff
#

ok

vocal basin
#

btw, these two lines behave differently, if it's related to the question:

list_ = list_ + [line]
list_ += [line]
hexed skiff
vocal basin
#

+= modifies the list itself
whereas + creates a new list

#

+= is short-hand for .extend method

vocal basin
hexed skiff
#

so basically when you use + you're going through a function that get's your list, makes a new list with the argument you passed and returns the new list?

vocal basin
#

!e

a = [1, 2, 3]
b = a
b = b + [4]
print(a, b)
a = [1, 2, 3]
b = a
b += [4]
print(a, b)
wise cargoBOT
#

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

001 | [1, 2, 3] [1, 2, 3, 4]
002 | [1, 2, 3, 4] [1, 2, 3, 4]
hexed skiff
#

wtf

vocal basin
#
a = [1, 2, 3]
b = a
# ^^^ no new list created here
b = b + [4]
# ^^^^^^^^^ creates new list and assigns it to `b`

a = [1, 2, 3]
b = a
# ^^^ no new list created here
b += [4]
# ^^^^^^ changes both `a` and `b`
hexed skiff
#

that's odd

#

ty for the class

vocal basin
#

!e

a = (1, 2)
b = a
b += (3, 4)
print(a, b)
a = [1, 2]
b = a
b += [3, 4]
print(a, b)
wise cargoBOT
#

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

001 | (1, 2) (1, 2, 3, 4)
002 | [1, 2, 3, 4] [1, 2, 3, 4]
vocal basin
#

also, another aspect how tuples and lists differ

hexed skiff
#

i've never used tuples

vocal basin
hexed skiff
#

yeah for me it's really strange to see

vocal basin
#

for most immutable-ish objects, x += y is equivalent to x = x + y, whereas for most mutable objects it's not
but there are exceptions

hexed skiff
#

i'll try to remember that

pale sigil
kindred granite
#

Also list accepts any iterable to +=, but only lists to +

vocal basin
#

!e

[] + ()
wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     [] + ()
004 |     ~~~^~~~
005 | TypeError: can only concatenate list (not "tuple") to list
red peak
warm atlas
#

is logging in any case useful

#

in scraping

turbid sandal
#

pystorecontrolmodule

#

fir_run

somber heath
peak nacelle
somber heath
#

@reef crest 👋

reef crest
#

👋🏻

turbid sandal
#

@somber heath

vocal basin
#

what do the arrows mean?

wicked spear
#

i cant talk

#

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

wicked spear
#

!voice verify

#

!voiceverify

#

Thoughts this syntax?

# Single Line comment

##
    Multiline Comment
##

use bring_package::into::scope as party

# This is a struct with no named types
struct color (i32,i32,i32)

struct person:
    name: string
    age: i32
    hair: color

# Type inferencing for functions & variables
fn main() = 

    var x = 12
    var status: bool = check(x)

    var mut y = 22
    y = 42
    
# An indented newline suggest it is the same line, unless context of : or =  
# Or if we are inside of data such as string '' etc...
    y = 22
      + 5
      * 3
    a = 22 + 5 * 3
    assert!(a == y)

    var purple = color {191, 64, 191}
    var jimmy = person {
        name: 'jimmy',
        age: 22,
        hair: purple
    }

    var my_array = [0,1,2]
    for x in my_array:
        party::do_something()


fn check( x: i32 ): bool = 

    if x > 0:
        print!(x)
        return true
    else:
        return false
vocal basin
#

having ## for multiline might be ambiguous to figure out where comment starts and where it ends

#

(that's why languages opt for /* */)

#

yeah, ! in assert! is important because assert as a function is weaker than assert! as a macro

#

because often you'd want to know line number, optionally have a message, etc.

vocal basin
wicked spear
vocal basin
#

actually, surprising that Rust doesn't treat the type itself as a function

#

(tuple type)

#

unlike enum variants

#

oh wait

#

I'm dumb

#

it totally does

#
struct Colour(u8, u8, u8);

fn test_type() {
    let function: &dyn Fn(u8, u8, u8) -> Colour = &Colour;
}
#

so, yes, it's basically equivalent to a function call

#

it may not be fn but it's Fn with all the extra traits necessary to make it equivalent to such

#
struct Colour(u8, u8, u8);

fn test_type(colour: impl Fn(u8, u8, u8) -> Colour + Send + Sync + Copy + Clone) {
    colour(255, 255, 255);
}

fn test_type_2() {
    test_type(Colour)
}
#

syntax highlighting doesn't understand + for traits, seems like

#

so, yeah, just like in more functional-centric languages, tuple types are just functions themselves mostly

quiet star
#

Hi there

#

all good, u?

#

fight fight fight (?

#

hahaha

#

O_O 24 hours on discord?

turbid sandal
#

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

turbid sandal
#
f"icon{position}" = "test"
quiet star
#

ChatGPT helps sometimes.

turbid sandal
#

!e

# Step 1: Define the variable `position` and assign it a value
position = 42

# Step 2: Construct the f-string using the variable `position` inside curly braces {}
f_icon_position = f"icon{position}"

# Step 3: Assign the string value "test" to the constructed f-string
f_icon_position = "test"

# Print the updated value of f_icon_position
print(f_icon_position)

wise cargoBOT
#

@turbid sandal :white_check_mark: Your 3.11 eval job has completed with return code 0.

test
gentle flint
quiet star
#

It's alway that green?

gentle flint
#

no lol

vocal basin
#

"oh no
not tree comparison problems
not again"

vocal basin
#

why cast to bool instead of matching on None?

#

ah, wait, I saw

#

it's trees not tree

#

then, yes, makes sense

#

A, (B | C), D is probably the default ordering

vocal basin
#

case True, False | False, True: actually never gets hit I think

#

that's why there it doesn't matter

vocal basin
#

I wouldn't use two separate queues there

#

one queue with pairs left-right

#
class Solution:
    def isSameTree(self, p: Optional[TreeNode], q: Optional[TreeNode]) -> bool:
        pairs = [(p, q)]
        while pairs:
            p_, q_ = pairs.pop()
            match p_, q_:
                case None, None:
                    pass
                case TreeNode(), TreeNode():
                    if p_.val != q_.val:
                        return False
                    pairs.append((p_.left, q_.left))
                    pairs.append((p_.right, q_.right))
                case _:
                    return False
        return True
#

a little bit refactored:

class Solution:
    def isSameTree(self, p: Optional[TreeNode], q: Optional[TreeNode]) -> bool:
        pairs = [(p, q)]
        while pairs:
            p_, q_ = pairs.pop()
            match p_, q_:
                case None, None:
                    pass
                case TreeNode(val=pval), TreeNode(val=qval) if pval == qval:
                    pairs.append((p_.left, q_.left))
                    pairs.append((p_.right, q_.right))
                case _:
                    return False
        return True
turbid sandal
#

whoooo hooo

vocal basin
#

having left and right as methods () -> Awaitable[TreeNode] may make this a more complicated task

vocal basin
#

would have to be a queue though not a stack

#
def unavailable():
    show_popup("This feature is not available, It is installed but has no function!")

icon5.configure(text=self.title, command=unavailable)
turbid sandal
#

@vocal basin

                class app:
                    class create_new_app:
                        def __init__(self, title: str = "Untitled", discription: str = "Nothing to see here...", author: str = "Unknown", version: float = 1.0, command: str = "default"):
                            self.title = title
                            self.discription = discription
                            self.author = author
                            self.version = version
                            self.command = command
                            
                        @classmethod    
                        def update_app(self) -> bool:
                            def UNAVAILABLE():
                                show_popup("This feature is not available, It is installed but has no function!")
                            if icon5.text == "Not Used":
                                icon5.configure(text=self.title)
                                match self.command:
                                    case "default":
                                        icon5.configure(text=self.title, command=UNAVAILABLE)
                                        return True 
                                    case _:
                                        return True                                
                            else:
                                return False

I implemented your pull request

vocal basin
#

worker pool (with an upper limit somewhere in the thousands)
each worker task pulls from and (sometimes) pushes into the queue
workers are spawned on-demand (not preemptively)
when either all pairs are processed, or one of the workers determines that trees are different, all workers are stopped

there might be better models

#

I chose this specifically to be able to introduce the limit

#

because spawning million tasks may be unwanted

dusk raven
#

maybe something like this

wise cargoBOT
#

@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.

[0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
vocal basin
#

O(exp(n)) time complexity

turbid sandal
#

!e

                icon5 = "test"
                class app:
                    class create_new_app:
                        def __init__(self, title: str = "Untitled", discription: str = "Nothing to see here...", author: str = "Unknown", version: float = 1.0, command: str = "default"):
                            self.title = title
                            self.discription = discription
                            self.author = author
                            self.version = version
                            self.command = command
                            
                        @classmethod    
                        def update(self) -> bool:
                            def UNAVAILABLE():
                                show_popup("This feature is not available, It is installed but has no function!")
                            if icon5.text == "Not Used":
                                icon5.configure(text=self.title)
                                match self.command:
                                    case "default":
                                        icon5.configure(text=self.title, command=UNAVAILABLE)
                                        return True 
                                    case _:
                                        return True                                
                            else:
                                return False
                app = app.create_new_app(title = "test", author = "Super </dev>")
                app.update()
                print(app)
wise cargoBOT
#

@turbid sandal :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 26, in <module>
003 |     app.update()
004 |   File "/home/main.py", line 15, in update
005 |     if icon5.text == "Not Used":
006 |        ^^^^^^^^^^
007 | AttributeError: 'str' object has no attribute 'text'
vocal basin
#

!e

fib = lambda n: round((((1+5**.5)/2)**n-((1-5**.5)/2)**n)/5**.5)
print([fib(i) for i in range(10)])
wise cargoBOT
#

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

[0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
vocal basin
vocal basin
#
fn the_answer(): i32 = 42
#

what does x++ actually do in this context?

let thing |x| = return x++
#

it's equivalent to return x here

#

unless you take a mutable reference

#

(as an argument)

#

= syntax for functions makes more sense in strictly functional languages

#
add x y = x + y
#

(Haskell)

#

one of the reasons to use -> for functions is to make it uniform with how function types are defined

fn example(x: u64) -> bool { x != 0 }

let example2: fn(u64) -> bool = example

with : it would be

fn example(x: u64): bool = x != 0

let example2: fn(u64): bool
//          ^        ^
steel grail
#

Hey I’ll be home in 30 min for VC. Is anyone here familiar with Tensorflow? I can do scikitlearn but I’m really struggling with TF. I’m trying to blitz through it but my brain has kind of broke on a few things. If someone could help me with what should be a simple ML problem, I would deeply appreciate it. I have a CoLab doc that works for 13 sklearn classification models and would like to pivot a few lines to test NNs

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied timeout to @midnight agate until <t:1685319328:f> (10 minutes) (reason: emoji spam - sent 40 emojis).

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

steel grail
#

let him back in?

#

sorry Senior

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied timeout to @midnight agate until <t:1685319963:f> (10 minutes) (reason: emoji spam - sent 39 emojis).

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

steel grail
#

omg. Can an <@&267628507062992896> help explain the line? The guy is from Italy and idk if the rule is posted on how many emojis can be in a message.

#

Sure I get not getting kicked from spam. Just kind of curious on where the line is.

quaint oyster
#

whenever i see TreeNode and stack.pop it reminds me of my algorithms class and i wanna throw up

calm hearth
#

Anybody here online?

#

You mean C Sharp(C#)

turbid sandal
#

!video

turbid sandal
#

!e Fear me

wise cargoBOT
#

@turbid sandal :x: Your 3.11 eval job has completed with return code 1.

001 |   File "/home/main.py", line 1
002 |     Fear me
003 |          ^^
004 | SyntaxError: invalid syntax
warped raft
#

hello @turbid sandal

fierce stratus
lean pumice
#

i had a question if you are here to help @turbid sandal

turbid sandal
#

@lean pumice yes what?

knotty moss
#

i can't talk @turbid sandal : /

turbid sandal
#

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

knotty moss
#

!voice

#

seriously ?

vocal basin
#

C++++

vocal basin
#

@lean pumice what's the question?

lean pumice
#

I need help regarding redis and websockets and data streaming?
I found a package that is using it. But dont understand why is it being used. I just want to fetch live data. I do plan to store data but i usually just use text files for that. Can anyone help. I can show more on screenshare, but this is the package.
https://github.com/ranjanrak/OptionChainStream

here is sample data it returns. https://controlc.com/2dc4513d

GitHub

Live streaming option chain for equity derivatives using Kite connect Websocket based on redis. - GitHub - ranjanrak/OptionChainStream: Live streaming option chain for equity derivatives using Kite...

vocal basin
#

what functionality do you need from this package?

turbid sandal
#

!video

vocal basin
#

if you want to deploy redis, the easiest way would be to use docker

#

Redis is for data storage

#

not necessarily persistent

vocal basin
lean pumice
# vocal basin Redis is for data storage

should i use this? i want to fetch 50 different price data every second and append it to 50 different files. do i really need redis for this? or i can just open file and append to it then?

#

i was planning to use csv files for this

vocal basin
#

@midnight agate yes

#

I'm still thinking how to communicate exit condition in the worker pool model

#

I don't know what select does in Go

#

like receive in Erlang?

lean pumice
# vocal basin if you can get the streaming part working, you can save it to whatever format yo...

thanks i will try to then. i have one other question. (you can answer me later af @me thanks)

import logging
import _initpaths
from trade.auth.zerodha_auth import ZerodhaAuth

logging.basicConfig(level=logging.DEBUG)

# Initialise
kite = ZerodhaAuth.get_broker()
kws = kite.ticker()

def on_ticks(ws, ticks):
    # Callback to receive ticks.
    logging.debug("Ticks: {}".format(ticks))

def on_connect(ws, response):
    # Callback on successful connect.
    # Subscribe to a list of instrument_tokens (RELIANCE and ACC here).
    ws.subscribe([738561, 5633])

    # Set RELIANCE to tick in `full` mode.
    ws.set_mode(ws.MODE_FULL, [738561])

def on_close(ws, code, reason):
    # On connection close stop the event loop.
    # Reconnection will not happen after executing `ws.stop()`
    ws.stop()

# Assign the callbacks.
kws.on_ticks = on_ticks
kws.on_connect = on_connect
kws.on_close = on_close

# Infinite loop on the main thread. Nothing after this will run.
# You have to use the pre-defined callbacks to manage subscriptions.
kws.connect()

this sends data c continuously, i only want it at interval of 1 sec. how can i pause this.

vocal basin
#
async def redirect_into(queue_in: asyncio.Queue, queue_out: asyncio.Queue):
    while True:
        await queue_out.put(await queue_in.get())
vocal basin
#
async def redirect_jobs(queue_in: asyncio.Queue, queue_out: asyncio.Queue):
    while True:
        job = Job(await queue_in.get())
        await queue_out.put(job)
        await job.wait_until_done()
#

I meant wait_until_done there

#

whatever consumes queue_out, is responsible for processing the job

vocal basin
#

?

#

you don't want to schedule multiple jobs simultaneously, that's the point of the original code

red peak
#

Oh okay

vocal basin
#

I'll try to do it without a worker pool and async queues now, just with tasks

#

somewhat less reliable but may work

vocal basin
rocky dome
#

👋

turbid sandal
#

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

turbid sandal
#

@vocal basin

#

have you been voice verefied

#

@vocal basin

oblique bough
rocky dome
#

hey hey 👋

#

how u doin

#

nothing much

#

i have a penguin in my github pfp, is it fine to have anything sfw in ur pfp?

#

@whole bear wait are u having too much on ur plate?? like a few days ago, i heard about data science from u, then cloud engineering and also cybersecurity

#

just curious

#

matrices

#

u need to know sooo much mafs mate

turbid sandal
lean pumice
#

oh nvm this was something different :D

lavish rover
#

comiler: works
me: makes a small change

vagrant wing
rocky dome
#

silenece

vocal basin
#

I'm trying to implement AVL trees in Rust
but there's, like, some factors making it more difficult

#

if it was just "make AVL trees work" it would probably take me less than an hour;
but I need to do it with all the proper checks and in a more abstract (potentially asynchronous) context

fierce stratus
#

))

vocal basin
#

ChatGPT is more useless anyway

#

it's unreliable garbage

#

it's already causing enough code quality problems

#

people rely on it due to lack of experience

#

it can't be a teacher/tutor/etc. but it can pretend to be one very well and successfully harm you

#

it's unethical to recommend it to beginners without disclosing all those nuances.

#

who is liable for when it recommends something incorrect?

vocal basin
#

good luck finding devs to work on it under such premise

#

I don't hate AI.

vocal basin
#

@jolly terrace because there was someone else who incorrectly recommended ChatGPT to them

#

ChatGPT at least needs to make users to sit through an explanation of why code it gives is unreliable

vocal basin
lavish rover
#

tbf I'm pretty sure chatgpt was also specifically trained on some coding examples

#

i generally find chatgpt to give me more sane suggestions than copilot

#

why is his sexuality relevant?

vocal basin
#

@whole bear
if you're trying to use it as an insult, then shut the fuck up.

velvet tartan
#

We build a Generatively Pretrained Transformer (GPT), following the paper "Attention is All You Need" and OpenAI's GPT-2 / GPT-3. We talk about connections to ChatGPT, which has taken the world by storm. We watch GitHub Copilot, itself a GPT, help us write a GPT (meta :D!) . I recommend people watch the earlier makemore videos to get comfortable...

▶ Play video
warped raft
#

hello @rocky dome

rocky dome
#

how are u doin

warped raft
#

doing

#

food

#

good

rocky dome
#

😋

#

oh

warped raft
#

i am so hungry that

rocky dome
#

wait i thought u said eating

rocky dome
warped raft
#

i wrote food istead of good

rocky dome
#

what u planning to eat

warped raft
#

and now the spelling of instead is wrong

rocky dome
#

happens a lot

#

i only check my spellings

#

if im

#

talking formally

warped raft
#

there is an Indian delicay called

rocky dome
#

or somethin

warped raft
#

Dal Pittta

#

that's on the menu today

rocky dome
#

ah

#

its like naan

#

innit

#

gtg

warped raft
#

np

whole bear
#

!e

i=1
while i<5:
    if i==3:
            continue
    print(i,end=" ")
    i = i + 1
wise cargoBOT
#

@whole bear :x: Your 3.11 eval job timed out or ran out of memory.

1 2 
whole bear
#

!e

i=1
while i<3:
    j=0
    while j<5:
        j = j +1
        if j==3:
            continue
        print(j, end = “ ”)
    i = i +1
wise cargoBOT
#

@whole bear :x: Your 3.11 eval job has completed with return code 1.

001 |   File "/home/main.py", line 8
002 |     print(j, end = “ ”)
003 |                    ^
004 | SyntaxError: invalid character '“' (U+201C)
whole bear
#

!e

i=1
while i<3:
    j=0
    while j<5:
        j = j +1
        if j==3:
            continue
        print(j, end = "")
    i = i +1
wise cargoBOT
#

@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.

12451245
rocky dome
turbid sandal
#

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

turbid sandal
#
from plyer import notification
import tkinter as tk
from tkinter import messagebox
import time
from datetime import datetime
from tkinter import filedialog
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QMessageBox
from tkinter import ttk
from tkinter import colorchooser
import os
import keyboard
import shutil
import psutil
import pyperclip
import smtplib
import playsound
tawdry salmon
#
import (
    "encoding/json"
    "net/http"

    "pipebomb/anime"
    "pipebomb/film"
    "pipebomb/novel"
    "pipebomb/profiles"
    "pipebomb/show"
    "pipebomb/util"

    "github.com/fatih/color"
    "github.com/gorilla/mux"
)
red peak
#

@turbid sandal

whole bear
#

can anyone help me to print this pattern?

#

using for loop

#

need to print spaces to

wise cargoBOT
#

@red peak :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | -10123456
002 |  0123456
003 |   123456
004 |    23456
005 |     3456
006 |      456
red peak
#

!e

n = 6
for i in range(n + 1, 1, -1):
  print(' ' * (n - i + 1), end='')
  for j in range(n - i + 2, n + 1):
    print(str(j), end='')
  print()
wise cargoBOT
#

@red peak :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 123456
002 |  23456
003 |   3456
004 |    456
005 |     56
006 |      6
whole bear
#

@timid flower hey dude help me writing this pattern please

timid flower
#

here's how I'd do it

#

I'd build a list representing every lines, in order

#

then I'd compute which line to display when

#

@whole bear

whole bear
vocal basin
#

!e

n = 5
for y in range(n): print(*(((4*y-2*n+1)*(2*y<n)+2*n-2*y-1)*n+x+1 for x in range(n)))
wise cargoBOT
#

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

001 | 1 2 3 4 5
002 | 11 12 13 14 15
003 | 21 22 23 24 25
004 | 16 17 18 19 20
005 | 6 7 8 9 10
vocal basin
#

pattern isn't complex enough for that

#

it's just f(x)+g(y), so, even if you want to pre-calculate values, you only need to store 2N values

vocal basin
candid chasm
#

@vocal basin can you help me with something 🥺

vocal basin
#

Java? Python?

candid chasm
#

Pythonn

#

im trying to setup my pyspark

#

but im getting errors like this

#

so im trying my best to follow the things here

vocal basin
#

are you sure this is an error?

candid chasm
#

i just want to be guided how do i exactly do thiss :<

vocal basin
#

isn't spark-shell Scala/Java not Python?

candid chasm
vocal basin
vocal basin
candid chasm
candid chasm
#

I think i got it ! THANK YOU VERY MUCH

vocal basin
#

I think I broke auto-formatter for Rust
the code got so indented it refused to work anymore
p.s. this code was rewritten

#

line 38 is when rustfmt gave up

#

the "easy" way to fix this without extra work is by

  1. introducing variables
  2. introducing methods
#

but what I did was to rewrite it in a more abstract way
(so I move it to a separate module)

#

it's still big but at least not as much

vocal basin
#

yes, and in Rust it's a keyword

vocal basin
#

rustfmt is more strict than black by default, I think

#

it preserves original formatting less often

#

so far, I prefer black over both autopep8 and PyCharm's formatter

rugged root
#

@uncut lodge Hello

#

@smoky veldt Hello

vocal basin
#

🇱🇹🇪🇪

smoky veldt
#

hey i need you right now please

rugged root
#

What's up?

smoky veldt
#

do u do html and css

rugged root
#

What's your question

#

Better to start there

smoky veldt
#

like from 9th grade there are two kids they would beat me because i need to do nav bar and registration and i am from ethiopia and our server banned tiktok youtube and other social media

#

can you help me do nav bar and registration page

vocal basin
#

raw HTML/CSS or some framework?

smoky veldt
#

raw

#

wait

#

whats ram and framework

vocal basin
#

frameworks like React, Angular, Vue

smoky veldt
#

oh no just raw

#

even my google doesnt work

#

because its banned

somber heath
#

Howdy, howdy.

smoky veldt
#

it said 404 error

#

because it is banned please get me screen shot

vocal basin
#

what do you need the navbar to look like?

smoky veldt
#

i dont know please just send it

#

@rugged root why cant we talk tho

#

okkkkkk

somber heath
#

Or worse, scream and stay.

smoky veldt
#

ok

somber heath
#

I....don't even

#

Maybe they can be like those Roman sandal straps where they go up the leg.

#

Hhhh....beep boop.

#

Oh, ooh. "Hhh. Resistance is futile, yadda yadda."

vocal basin
rugged root
#

@whole bear Yo

whole bear
#

hey

vocal basin
#

do you know how to make a single link?

whole bear
#

could i have some help with open cv

smoky veldt
#

you mean like <a herf="#"><a>

vocal basin
#

yes, anchor tag

<a href="/about/">About</a>
smoky veldt
#

ya

#

i know a lot just i dont know nav and some

whole bear
#

Mr hemlock could i have some help please

#

its to do with images

rugged root
whole bear
#

i am trying to convert this code that works with video to work with a single image

rugged root
#

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

whole bear
#

done

#

ignore all the AI object stuff

#

with weights and everything

#

it works by extracting the frames from the video

#

and i just want to give it a frame

#

as an image

#

i think the from future thing is irrelevant

#

sorry

#

ignore

#

thats there from other trials

vocal basin
# vocal basin yes, anchor tag ```html <a href="/about/">About</a> ```

this would be a simple example of a navbar with no styling
basically, just a couple of links

<header id="navbar">
  <a href="/">Home</a>
  <a href="/contact/">Contact Us</a>
  <a href="/about/">About</a>
</header>

if you want it to have a coloured background / be evenly spaced, you can add CSS to #navbar

smoky veldt
#

wait let me try it

whole bear
#

also never knew yolo stood for you only look once

#

cause im special

#

its working

#

i just want to give it an image and that count as a frame

#

sounds like an interesting guy

vocal basin
rugged root
#

@whole bear Yo

somber heath
#

It's not like we know anyone like that.

whole bear
#

any ideas?

#

noice thank you

#

well this would work with a photo

whole bear
#

i just need to give the photo as a frame

vocal basin
#

this is so stupid

whole bear
#

i don't need to save the frame

#

ill use the classes part to see what objects appeared and save that

vocal basin
#

dim is the one that's actually darker than the base one

whole bear
#

by the way do i have to re verify to speak after the requirements are fulfilled

vocal basin
#

DarkGray is almost exactly between Gray and LightGray

smoky veldt
#

thank you alisa you are the nicest person ever to me

vocal basin
#

people mostly complain because of dynamic typing

#

trying to argue that "dynamically typed language is not 'real' OOP" is kind of dumb given where the roots of OOP as a paradigm are

#

there's also weak vs strong typing which is independent of static vs dynamic

rugged root
smoky veldt
#

what is dyanmic and static

somber heath
#

You can hint on assignment, but it's just that, hint.

vocal basin
somber heath
#

!e py a: int = 5 print(a)

wise cargoBOT
#

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

5
rugged root
#

!e

a: str = 5
print(a)
wise cargoBOT
#

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

5
vocal basin
#

actually, are there any weak dynamic type systems?

somber heath
#

Callable hinting does have runtime stuff.

vocal basin
#

coercion ?

somber heath
#

"It would be such a shame if anything happened to your beautiful subclasses, wouldn't it?"

vocal basin
rugged root
#
import numpy as np
import cv2 as cv
cap = cv.VideoCapture(0)
if not cap.isOpened():
    print("Cannot open camera")
    exit()
while True:
    # Capture frame-by-frame
    ret, frame = cap.read()
    # if frame is read correctly ret is True
    if not ret:
        print("Can't receive frame (stream end?). Exiting ...")
        break
    # Our operations on the frame come here
    gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY)
    # Display the resulting frame
    cv.imshow('frame', gray)
    if cv.waitKey(1) == ord('q'):
        break
# When everything done, release the capture
cap.release()
cv.destroyAllWindows()
vocal basin
#

very C-like

#

Warsaw pact

rugged root
vocal basin
#

Yugoslavia was getting ready for Poland 1939 moment but with the whole of NATO instead of Germany
which in the end kind of happened but by that time USSR wasn't really existent

#

they were buying weapons from both sides, like Finland

#

but unlike Finland, they didn't really have money for it

rugged root
somber heath
#

!d pathlib.Path.rglob

wise cargoBOT
#

Path.rglob(pattern)```
This is like calling [`Path.glob()`](https://docs.python.org/3/library/pathlib.html#pathlib.Path.glob "pathlib.Path.glob") with “`**/`” added in front of the given relative *pattern*:

```py
>>> sorted(Path().rglob("*.py"))
[PosixPath('build/lib/pathlib.py'),
 PosixPath('docs/conf.py'),
 PosixPath('pathlib.py'),
 PosixPath('setup.py'),
 PosixPath('test_pathlib.py')]
```  Raises an [auditing event](https://docs.python.org/3/library/sys.html#auditing) `pathlib.Path.rglob` with arguments `self`, `pattern`...
somber heath
#

@rugged tundra

#

But also, you don't necessarily want to scan all the files.

#

You just want to know where you are and what's in the immediate vicinity.

#

tkinter has a file exploring widget

#

!d tkinter

wise cargoBOT
#

Source code: Lib/tkinter/__init__.py

The tkinter package (“Tk interface”) is the standard Python interface to the Tcl/Tk GUI toolkit. Both Tk and tkinter are available on most Unix platforms, including macOS, as well as on Windows systems.

Running python -m tkinter from the command line should open a window demonstrating a simple Tk interface, letting you know that tkinter is properly installed on your system, and also showing what version of Tcl/Tk is installed, so you can read the Tcl/Tk documentation specific to that version.

somber heath
#

It's standard library.

smoky veldt
#

@vocal basin what code editor are you using??

vocal basin
#

mostly VS Code

smoky veldt
#

"VS Code'' ?

vocal basin
#

Visual Studio Code

smoky veldt
#

oh i am using it

#

but

#

the time u sent it was another code editor

vocal basin
vocal basin
#

it's just built-in discord Markdown render
```html
<a href="/about/">About</a>
```

smoky veldt
#

ok

#

the color was kinde cooler than vs code

#

@vocal basin can i ask you with this , do you mind??

vocal basin
#

what question?

smoky veldt
#

it is about registration

whole bear
#

@vocal basin what is 2**2

vocal basin
whole bear
#

o_o huh

vocal basin
smoky veldt
#

ya but like school edition

vocal basin
#

what back-end language are you using? Python? PHP?

smoky veldt
#

no just css and html

vocal basin
#

HTML/CSS can't store data and/or have data processing logic

smoky veldt
#

i know

#

but

#

i am gonna do like fake one

vocal basin
#

so, only the user sees that they're registered?

smoky veldt
#

yeah i think

#

yea

vocal basin
#

for front-end logic, there is JavaScript

#

using <script> tag

rugged root
#

Is this for a class or

#

Just wanting a way to show off

#

Mainly just curious

smoky veldt
#

yo alisa

peak copper
smoky veldt
#

i just wanna say help me on just screen output not like real ones ( no data storing

vocal basin
rugged root
vocal basin
#

example from MDN

<form action="" method="get" class="form-example">
  <div class="form-example">
    <label for="name">Enter your name: </label>
    <input type="text" name="name" id="name" required>
  </div>
  <div class="form-example">
    <label for="email">Enter your email: </label>
    <input type="email" name="email" id="email" required>
  </div>
  <div class="form-example">
    <input type="submit" value="Subscribe!">
  </div>
</form>
smoky veldt
#

ya

#

thanks

vocal basin
#

so might be better to just have inputs

#

so, like, depending on what you do, you can remove form wrapping

smoky veldt
#

i am just gonna use input , anchor and br

#

but thank you for the sample

somber heath
#

Places bloody-well ought to take cash.

#

Are we going to have cash not be legal tender?

rugged root
#

Legal chicken tender

somber heath
#

Oh no...

#

Bad thought.

#

Beagle tender.

#

I have a sad, now.

#

True.

#

Or tender natured.

rugged root
#

@sleek sonnet Yo

somber heath
#

Yarm.

#

Minecraft.

#

Listening.

#

Dying inside.

vocal basin
#

I'm thinking whether I should wait until antivirus software license expires or just uninstall it right now because it's useless anyway

#

Avast
since ~2017

#

idk why

onyx crest
#

Could not talk in voice channel till I have sent over 50 messages

vocal basin
#

at least it's not comodo/kasperky which just hijack the system for themselves

rugged root
vocal basin
#

I think I'll uninstall it anyway because it impacts the performance more than windows defender

somber heath
#

Any bar? Dude pours you your drink and just freezes right at the end of the pour.

vocal basin
#

what the hell is that version

cunning lake
#

what do you think about full stack?

onyx crest
#

So glad Microsoft added these to pc game pass

vocal basin
onyx crest
#

Valhiem is great as well

vocal basin
#

ah, yes, speaking about progress bars

#

0%
1%
100%

vocal basin
#

python packages?

#

system packages?

#

python packages: venv or docker
system packages: docker

#

I go restart again

vocal basin
#

wow, windows defender so much easier to use than Avast

#

it doesn't go screaming deleting files as soon it's concerned with something

#

it kind of just
notifies there's an executable to take care of
and waits until actions are taken

#

and adding exceptions just works too

ionic lake
rugged tundra
vocal basin
#

do I really need mongodb always running on my desktop?

#

probably not

#

time to uninstall

#

like, I literally never used it
it just exists

rugged root
vocal basin
#

haven't had such low RAM usage in years

rugged root
vocal basin
#

why the hell is overleaf constantly using CPU
like, what, does it use it to actively sacrifice computational resources to the church of TeX so the packaging system doesn't explode?

#

it's been only 11 days and it wasted >10 hours worth of compute

rugged root
#

What's overleaf?

vocal basin
#

TeX editor

#

(web)

#

it's partially open-source

#

free version not having git integration is pain

somber heath
#

!e print(7 ** 3)

wise cargoBOT
#

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

343
somber heath
#

343 hours a day.

vocal basin
#

integration tests are about external behaviour of the system (library, service, etc.)

somber heath
#

Ha! Stupid data. i aM weLL bEhAved AnD cOnsIsTent.

#

Mocking data.

vocal basin
#

testing the same function[ality] may be a unit test or an integration test based on the data you pass to it

rugged root
#

Unit testing means testing individual modules of an application in isolation (without any interaction with dependencies) to confirm that the code is doing things right.

Integration testing means checking if different modules are working fine when combined together as a group.

Functional testing means testing a slice of functionality in the system (may interact with dependencies) to confirm that the code is doing the right things.

#

That's what I'm seeing

vocal basin
#

there's a thing which, I think, "default" testing framework for C# doesn't allow:
unit-testing internal functionality

unlike Rust where you can write tests in the same module, even it that module is invisible to the outside

rugged root
#

!e

def append(number, number_list=[]):
  number_list.append(number)
  print(number_list)

for i in range(5):
  append(i)
wise cargoBOT
#

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

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

=====

#

Erlang has type coercion for equality too

#

/=
why

#

like, I understand it's supposed to be ≠

#

and maybe it was before a /= b as a = a / b

#

but, eh, unfortunate circumstance, I guess

thorn wharf
#

erlang what the hell

rugged root
#
def append(number: int, number_list: list[int] = None):
  if number_list is None:
    number_list = []
  number_list.append(number)
  print(number_list)

for i in range(5):
  append(i)
thorn wharf
#

i like =/= better

vocal basin
#

!e

class C:
    def m():
        print("here")

print(C.m)
C.m()
wise cargoBOT
#

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

001 | <function C.m at 0x7f7f52d58680>
002 | here
rugged root
#

Wait what?

vocal basin
#

!e

class C:
    @staticmethod
    def m():
        print("here")

print(C.m)
C.m()
wise cargoBOT
#

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

001 | <function C.m at 0x7f0809c60680>
002 | here
vocal basin
rugged root
#

Was going to say, why would that have worked

vocal basin
#

no reason to crash, that's why it works

#

C.m by default doesn't bind

#

same for staticmethod

#

classmethod binds

rugged root
#

Static makes sense, you don't expect anything to be passed

amber raptor
#

!e ```python
class A:
def append(number, number_list=[]):
number_list.append(number)
print(number_list)

for i in range(5):
A.append(i)```

wise cargoBOT
#

@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | [0]
002 | [0, 1]
003 | [0, 1, 2]
004 | [0, 1, 2, 3]
005 | [0, 1, 2, 3, 4]
rugged root
#

Guess I would have thought it'd be bitching about it not being static or class

amber raptor
#

welp

#

good job Python

rugged root
#

Again, it makes sense when you think about it

#

It's just an issue at first

vocal basin
#
                self.f()         cls.f()
staticmethod    f()              f()
 classmethod    f(type(self))    f(cls)
      method    f(self)          f()
rugged root
#

Hmm

vocal basin
#

there's a song from a Soviet movie exactly about that joke

lucid blade
vocal basin
#

"superstate" reminded of "Union State"

rugged root
vocal basin
#

gyrometer for angular velocity (and/or acceleration)
gyroscope for orientation and angular velocity

#

probably the same thing anyway

rugged root
vocal basin
#

looks somewhat approximated

#

@rugged root entanglement has been shown to work over large distances

#

whether or not it allows data transfer:
it doesn't

#

entanglement isn't about data transfer

#

theoretically, it behaves like communication but it's useless as such

#

I'm trying to find the word

#

the issue which physicist took with entanglement was that breaking entanglement takes effect instantly, so in some interpretation information travels faster than light

#

even if that information is uncontrollable and effectively zero bits of actual value

vocal basin
#

(just looks funny)

#

the voices

gentle flint
#

@rugged root

smoky veldt
#

anyone whats the meaning of illimunation

rugged root
#

Brightness

#

Something to do with lights or lighting

#

Typically shining a light on something

smoky veldt
#

like illuminate

rugged root
#

What's the context?

smoky veldt
#

oh nothing

#

but thanks

lucid blade
gentle flint
#

@thorn wharf did you try running dir() on your response

gentle flint
#

to see what attributes it has

rugged root
#

@thorn wharf

vocal basin
lavish rover
gentle flint
rugged root
#

@lavish rover How's it goin

#

@stuck furnace To you as well. How goes it

gentle flint
#

@turbid sandal no third rail on angermund s-bahn

turbid sandal
#

i have them

gentle flint
#

no third rail on nurnberg s-bahn

rugged root
vocal basin
#

progress bars like analogue clock
but with infinite clock hands (dynamically added or removed)

rugged root
stuck furnace
#

I think remaining time intervals are much better than point estimates.

rugged root
#

Same

#

But at the same time...

stuck furnace
#

Like "between 1 and 10 minutes" rather than "5 minutes"

rugged root
#

"Fuckin'.... i dunno. whenever"

stuck furnace
#

¯_(ツ)_/¯

rugged root
#

That's the one I want to see

#

Truth in advertising

lucid blade
#

file is copying 10/1000mb etc

thorn wharf
rugged root
#

Just something I saw, figured I'd pass it your way

thorn wharf
#

yeah appreciate it for sure, this is just one of those weird discrepancies between the Response object across different modules

rugged root
#

Yarp

vocal basin
#

.xkcd 970

viscid lagoonBOT
#

I hear in some places, you need one form of ID to buy a gun, but two to pay for it by check. It's interesting who has what incentives to care about what mistakes.

lucid blade
#

sudo !!

abstract ravine
#

Helloo (:

lavish rover
#
!^      first argument
!$      last argument
!*      all arguments
!:2     second argument

!:2-3   second to third arguments
!:2-$   second to last arguments
!:2*    second to last arguments
!:2-    second to next to last arguments

!:0     the command
!!      repeat the previous line
lucid blade
#

sudo touch /home/user/file.txt

#

rm !$

velvet tartan
lavish rover
#

Go to coworkers unlocked computer, add this somewhere in stdlib.h

#define TRUE (rand() % 100 < 99)
thorn wharf
#

@granite trail ugh i got it, so stupid though. looks like i was unfortunately right, cant assign the status_code to the Response from requests on initialization. solution was just manually setting the status_code after initialization, was just tricky to work around at first because the Response is a mocked value, but creating an empty Response for initialization and assigning the status_code after seemed to work

vocal basin
#

not that Hemlock

vocal basin
rugged root
#

@midnight cosmos I love that the cat in your picture looks like it's wearing a headset

thorn wharf
#

catset

vocal basin
#

@thorn wharf line coverage?

thorn wharf
vocal basin
#

100% line coverage doesn't guarantee functionality coverage

thorn wharf
#

i understand but in our use case it essentially does

vocal basin
#

if you have this, for example:

if condition_a:
    ...
if condition_b:
    ...
#

or, like, one if is already enough, to be fair

#

unless you add else: pass everywhere

vocal basin
thorn wharf
#

i get what youre saying but my point remains

#

i hit each possible condition, exception, and make the necessary assertions - unit tests and interation

vocal basin
#

I wonder if there's a proper tool to measure path/branch coverage in python

thorn wharf
#

pytest can show code thats being tested and code that is not hit if thats what you mean

thorn wharf
#

or do you mean for different coverage

#

oh im unfamiliar with branch coverage

vocal basin
#

branch coverage is mostly equivalent to statement coverage, if all elses are put in place

vocal basin
smoky veldt
#

@lavish rover where do u live????( i am not being offensive)

lavish rover
#

Canada

abstract ravine
#

kkkkkk

smoky veldt
#

where were u born

#

danm i love indians accents

#

strawberry icecream

lucid blade
#

lemon

#

mmmmmm

smoky veldt
#

mmmmmmmmmmmmmm

lucid blade
#

or raspberry ripple mmmmm nomnomnom

#

also ben and jerrys cookie dough

smoky veldt
#

wait can i cuss in the chat????

lucid blade
#

no

rugged root
#

So long as it's not every other word

lucid blade
#

keep it family friendly

#

😉

rugged root
#

Best in moderation and all that

lucid blade
#

and not abusive family friendly 😄 lol

smoky veldt
#

okokokok

#

bro who just said alo (halo)

#

did i just got banned??

#

dont stop talking

fierce stratus
#

what are we reading?

#

or you

smoky veldt
#

chat @fierce stratus

fierce stratus
#

oh )))

smoky veldt
#

we are reading chat

fierce stratus
#

ok ok

smoky veldt
#

right???

#

have a good day and night for everyone

rugged root
#

Hi @whole bear, bye @whole bear

whole bear
#

i have a problem with headphones 😕

rugged root
#

Ah that sucks

whole bear
#

@turbid sandal I turned off VC join notification just to have you notify everytime?

turbid sandal
#

yep\

rugged root
#

No

#

Please don't do that

turbid sandal
#

jk

whole bear
#

annnoying kiddo

rugged root
#

Hush

#

!kindling @whole bear

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.

lucid blade
#

picoctf

whole bear
#

What's up

#

Here on my new account, gotta get voiceverify again 😦

turbid sandal
#

Someone left...

whole bear
#

what?

turbid sandal
#

Someone joined...

#

Someone joined...

whole bear
#

What tf is happening?

turbid sandal
#

Someone joined...

whole bear
#

ahh it's a bot

#

but on an account

#

fun

#

I'm sorry but dose any one here know django because I have problem so if you can help I'll be thankful

vocal basin
#

what problem?

whole bear
# vocal basin what problem?

** I have a django signal for post_save for a specific modal and when I trying to get a image url it gives me a queryset **
**Can any one help ? **

post_mainimage = instance.mainimage.url
print(post_mainimage)

THE OUTPUT

<QuerySet []>
/media/resourepacks/thumbnails/62e81ca0
304e5174b6fa0d78 coding for business_hm
INmFG.jpg
vocal basin
#

omg full VC

willow light
#

For now

cobalt flint
#

could they stream the audio as well?

vocal basin
vocal basin
#

because print(post_mainimage) seems to work fine

whole bear
#

I don't know I'll send the full code

vocal basin
#

it prints some url, at least

/media/resourepacks/thumbnails/62e81ca0
304e5174b6fa0d78 coding for business_hm
INmFG.jpg
vocal basin
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.

stuck furnace
#

Full voice chat 👀

#

lol

whole bear
#
@receiver(post_save, sender=Post)
def new_post_saved(sender, instance, created, **kwargs):
    if created:
      user = instance.author 
      user_id = instance.author.id
      post_id = instance.id
      post_title = instance.title
      post_content = instance.content
      post_mainimage = instance.mainimage.url
      post_rpfile = instance.rpfile
      post_version = instance.version
      post_xnumber = instance.xnumber
      post_category = instance.category
      post_date = instance.date_added
      post_likes = instance.likes.count()
      webhook_url = ""
      session = requests.Session()
      webhook = SyncWebhook.from_url(webhook_url, session=session)
      # To send a message
      e = discord.Embed(title=f"{post_title}", description=f"{post_content}")
      e.add_field(name="likes", value=f"0")
      e.add_field(name="version", value=f"{post_version}")
      print(post_mainimage)
      e.set_image(url=f"{instance.mainimage.url}")
      webhook.send(embed=e)
#

This is the code

vocal basin
#

there are no other prints in the whole codebase?

#

the "see also" section though
https://en.wikipedia.org/wiki/Tampermonkey

Tampermonkey is a donationware userscript manager that is available as a browser extension. This software enables the user to add and use userscripts, which are JavaScript programs that can be used to modify web pages.

whole bear
vocal basin
#

so, if you remove that print, it no longer outputs <QuerySet []>, right?

whole bear
#

Yp

rugged root
#

I'm honestly not sure, sorry. I'm only just now relearning django myself

vocal basin
rugged root
#

I was not fully scrolled down

#

My b

whole bear
# vocal basin did you test that?

Yes, and I get this error
When I create a post

HTTPException at /admin/post/post/add/
400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.image.url: Not a well formed URL.
vocal basin
#

also

#

missing schema

#

might be more important

#
/media/resourepacks/thumbnails/62e81ca0304e5174b6fa0d78 coding for business_hmINmFG.jpg
#

this is instance.mainimage.url

#

apparently

#

it's missing both schema and domain

whole bear
#

What url the mainimage ?

whole bear
vocal basin
#

<QuerySet []> seems to be totally unrelated to code you sent

whole bear
vocal basin
rugged root
#

!pep 582

wise cargoBOT
#
**PEP 582 - Python local packages directory**
Status

Rejected

Python-Version

3.12

Created

16-May-2018

Type

Standards Track

vocal basin
#
e.set_image(url=f"https://example.com{instance.mainimage.url}")
whole bear
#

Okay I'll try

vocal basin
whole bear
#

Thanks

#

You're awesome

lucid blade
gentle flint
lucid blade
lucid blade
somber heath
#

If you put an accelerometer in the censer, it'd be a sensor in a censer, and if the guy pushing it oversaw the church newsletter, he might be the sensor censer pushing censor.

lavish rover
lucid blade
#
Ulefone Global Website

Ulefone Power Armor 19T is powered by Helio G99 chipset,features the FLIR Lepton 3.5 Thermal Imaging, 108MP rear camera, 60x magnification camera, 6.58-inch 120Hz display, 12GB RAM, 258GB ROM, 9600mAh battery, 66W superfast charge, 15W wireless charging, IP68 & IP69K & MIL-STD-810H certified, Corning Gorilla Glass 5, and runs Android 12.

fierce stratus
#

@neon vigil is this open source project?

neon vigil
#

will be !

#

almost ready to upload to github tbh

fierce stratus
#

not pushed yet?

#

oh ok

neon vigil
#

not push yet yet

somber heath
#

Which turned out to maybe be very slightly meh.

fierce stratus
neon vigil
#

fair!

somber heath
#

Not the one you posted

lavish rover
#

All taken from my phone

lucid blade
rugged root
somber heath
#

Would you like fries with your pixels?

#

I'd like to say it wasn't that it wasn't long ago that phones commonly had extendable antennas....

rugged root
lavish rover
#

Exorcising really is a serious business

somber heath
#

Gesticulations take it out of you.

#

General vocal energetics.

rugged root
vocal basin
#

polarisation is subject to quantum weirdness

somber heath
vocal basin
#

because even if they're filters, they do more than just allow/disallow stuff through, they change (or rather, specify? decide?) properties of what they let through

lucid blade
whole bear
#

@vocal basin can I ask you question

vocal basin
#

what question?

whole bear