#voice-chat-text-0

1 messages · Page 289 of 1

deep cloak
#

that sound was criminal

willow light
#

don't blame me for lenovo's shitty hardware

deep cloak
#

idc blame lenovo for no mercy

#

if your tierod breaks midway o the highay and you smash my car, im not going after the tierod manufacturer we goin thru your insurance

#

XD

willow light
#

wow no need to be a dick about it

deep cloak
#

there is every need

#

44 more reasons left

#

he def wanted someone to just do it

#

mindful dev almost helped

#

i could here it

#

hear*

willow light
#

cool so unlike zoom i cannot view the screen on the laptop while connected to audio over my phone

deep cloak
#

did you open the services manager?

#

clari you need 2 accounts

#

1 for ohone

willow light
#

No way in hell

deep cloak
#

1 for pc

#

yup

#

sorry buddy'

willow light
#

Pretty sure that's a TOS violation. Not happening.

#

I'll just accept the limitation for now and get an actual headset rather than relying on a thinkpad yoga's shitty mic.

deep cloak
#

welp you wont be viewing your scree and having phone audio i here ...

#

in*

willow light
#

It could be that I'm using the wrong audio driver, but waddev

deep cloak
#

easy fix

#

just loook into it

#

dont be lazy

willow light
#

No I'm not reinstalling Arch for a third time this month.

#

Fuck that.

deep cloak
#

how long would that really take for the benefits it holds

#

or TOS vio

willow light
#

We're in tech. Laziness is a virtue.

deep cloak
#

nah im doing situps white texting rn

willow light
#

The best solution is the simplest solution. I'll just grab my old headset from 20 years ago.

#

Given how old this laptop is.

deep cloak
#

drivers../

#

?

willow light
#

Nah, if it were drivers then zoom wouldn't've worked as well as it did earlier today

deep cloak
#

"audio device not recognized" XD

willow light
#

Only thing recognized here is my lack of energy for dealing with anything even resembling regexes for the rest of today, and anything that even has a hint of involving grep will include those horrible crimes against intelligence.

lavish rover
deep cloak
#

anyone make me a python/ honeypot?

#

python/C

willow light
#

would you accept something in bash, possibly involving xv?

deep cloak
#

only if its an .bat

#

yes

#

dualboot windows baby

whole bear
#

I use windows because the only thing I know how to do is algorithms

deep cloak
#

algoathrithmatizm

#

bangbang (╯°□°)╯︵ ┻━┻

willow light
#

myself and 1699 others got laid off because money matters more than people

deep cloak
#

BIGBALLA

stuck furnace
#

👋

deep cloak
#

you need to spoof the mac

#

clari did you finish the honeypot?>

#

Nix

willow light
#

No all of my honey is reserved for my microwaved tea.

deep cloak
#

dan mine too

#

the lemon

wind raptor
#

My honey comes in a bottle, not a pot

deep cloak
#

fake honey.

wind raptor
#

sometimes a jar

deep cloak
#

artificial sugars.

wind raptor
#

no, it's real

#

local

deep cloak
#

nope

#

covid honey

willow light
#

My honey is raw. It's a solid at room temperature.

deep cloak
#

danm, real.

forest zodiac
#

bloated you mean featurefull

willow light
#

I have two jars, one from spring and one from summer. Very different tastes.

deep cloak
#

vouch mines room temp too

#

we might have the same plug

wind raptor
#

do people refrigerate their honey?

deep cloak
#

only if its fake.

wind raptor
#

wtf

willow light
#

I doubt you get your honey from central Maine.

#

Honey has a theoretical shelf life of ERROR CANNOT DIVIDE BY ZERO

deep cloak
#

if its real deal steel.

willow light
#

There were jars of honey discovered in the ancient egyptian tombs. It was still good to eat after 5000 years.

deep cloak
#

i would eat.

willow light
#

I would eat but not before taking one hell of a claritin

deep cloak
#

they probally had that bomb shit

#

the plant bck then

#

polin

#

opal

#

i know you'r wqatchig this chat

stuck furnace
#

You working on a raytracer? 👀

deep cloak
#

tracer ray

stuck furnace
willow light
#

During the winter in high school I used to get serious nose bleeds but it turned out it was because I was using benedryl as a sleep aid.

#

working on a small project: D3 in React:

const Circle = () => {
  return (
    <svg>
      <circle
        cx="150"
        cy="77"
        r="40"
      />
    </svg>
  )
}
#

Compare to how D3 is usually written:

const Circle = () => {
  const ref = useRef()

  useEffect(() => {
    const svgElement = d3.select(ref.current)
    svgElement.append("circle")
      .attr("cx", 150)
      .attr("cy", 70)
      .attr("r",  50)
  }, [])

  return (
    <svg
      ref={ref}
    />
  )
}
#

Simple is better than complex.

mystic river
#

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

frosty star
#

haaaayyyyy ~ I'm at work can't talk

#

is this ray tracing

#

so pretty

deep cloak
#

anyone in here do python games? 2d, pygame ect..

obsidian dragon
#

hi @dull sluice

fierce stratus
#

Hello

#

@dull sluice are you ok?

dull sluice
#

sorry i joind the call and gone afk

#

if u heard crying that was my brother

obsidian dragon
#

I kept hearning gun shots

dull sluice
#

that a toy gun

obsidian dragon
#

if you say so

dull sluice
#

if u join voice i can show what i think that was

peak nacelle
#

@still herald I do to

deep cloak
#

tell her try different courses

#

free courses

peak nacelle
#

Coding is hard

deep cloak
#

quit

frozen owl
#

polite cat!!!!!!

rich bison
#

yo

#

chess???

frozen owl
#

YOOOOOOOOO

#

CHESS>!>1.1.!>>!>!>!!

rich bison
#

come!

frozen owl
#

no, this is alphazero

frozen owl
rich bison
#

send invite

native scarab
#

why do i have to send 50 messages :V

#

i think it was pd.dataframe

frozen owl
#
df = pd.read_csv('file.csv')```
#

where df is a dataframe i think

#

df.head()

#

@still herald say thank you lmao

#

i have helped you

#

:(

#

big sad

native scarab
#

physics simulator for fun 💀

karmic obsidian
#

any updates on xz?

rich bison
#

make a cooking simulator

karmic obsidian
#

cooking code

rich bison
#

code is cooking

woeful salmon
#

it is fun

#

finally being able to use all that stuff you learnt in school

#

lol

rich bison
woeful salmon
#

a physics sim project?

rich bison
#

sure

frozen owl
woeful salmon
#

i don't have much on github since physics sims i just do for fun

#

so i just make single scripts for each thing i make and they're all over my drive xD

rich bison
woeful salmon
#

although this one uses pymunk but i had one where i was just using verlet integration instead of using pymunk

woeful salmon
#

this is just a plinko game xD

rich bison
#

oh ic

#

cool

native scarab
#

🍩

#

bro should work with nasa

woeful salmon
still herald
obsidian dragon
frozen owl
#

HAHAHAHAHAHA

woeful salmon
frozen owl
#

i wanted to make my own physics engine for robot simulations

#

i know about isaac sim

#

but still

woeful salmon
native scarab
#

man and i thought f = ma was cool :V

woeful salmon
#

now i have a bunch of classes that work with direct3d and opengl and no main file to put them together

#

i have backup but i don't honestly care cuz it was a prototype

#

i'm currently in process of copying over the things i can use from it in the main big game engine

native scarab
#

team msg < 50 gang

woeful salmon
#

the hard part tho is i need to now make a high level shading language 😦 cuz writing individual shaders for opengl, vulkan, etc is pain

^ this needed to be done like a week ago i procrastinated and got side tracked into other things

still herald
woeful salmon
frozen owl
#

ah nice

#

wouldnt expect otherwise tbh

woeful salmon
#

the process is pain but the result is massive satisfaction xD

frozen owl
#

i agree

woeful salmon
#

even the prototype just getting to know how modern versions of vulkan and opengl works felt nice and painful :3

still herald
#

Ya

frozen owl
#

im working on a massive RL project as well

#

to my scale

woeful salmon
#

😮 robot?

frozen owl
#

no

#

alphazero implementation

frozen owl
#

sim-to-real transfer proejcts

#

i need to first understand RL first

still herald
#

@frozen owl this guy was against jupyter notebook

#

No one listens to me

#

See ya guys
Thanks for helping @peak nacelle @frozen owl @woeful salmon

frozen owl
#

cya

still herald
#

You guys rock

frozen owl
#

have you finished your hw

still herald
still herald
frozen owl
#

yeah

#

yours

#

/j

still herald
#

What does that mean?

frozen owl
#

i wonder

#

try to find out then

#

do show me how it went

still herald
still herald
frozen owl
#

hehehehehe

still herald
dull sluice
#

use the same ``` on all ends

gray kraken
#
from customtkinter import *
from bs4 import BeautifulSoup
import requests

pageToScrape = requests.get("https://www.timeanddate.com/weather/canada")
soup = BeautifulSoup(pageToScrape.text, "html.parser")
webscraping = soup.findAll("td", attrs={"class": "rbi"})





def reload():
    y = []
    for i in soup.find_all("td", attrs={"class": "rbi"}):
        y.append(i.text)
    print(y)


Root = CTk()
Root.title("Canada")
Root.iconbitmap("canada.ico")
Root.geometry("300x350")

label = CTkLabel(master=Root, text="N/A", font=("Arail", 50), text_color="red")
label.place(relx=0.5, rely=0.3, anchor="center")

button = CTkButton(master=Root, text="reload", font=("Arail", 50), fg_color="#e63c3c", hover_color="#91242d", command=reload)
button.place(relx=0.5, rely=0.7, anchor="center")

Root.mainloop()
#

['6\xa0°C', '-1\xa0°C', '0\xa0°C', '4\xa0°C', '-11\xa0°C', '-5\xa0°C']

dull sluice
#

open challels in #1035199133436354600 and i can maybe help too but my mother sent me to learn so at most i can text

gray kraken
#
def reload():
    y = []
    for i in soup.find_all("td", attrs={"class": "rbi"}):
        y.append(i.text)
        print(i.text)
#

-4 °C
0 °C
-2 °C
-4 °C
0 °C
5 °C
2 °C
-6 °C
4 °C
-1 °C
0 °C
-4 °C
-1 °C
0 °C
2 °C
0 °C
0 °C
-7 °C
-20 °C
1 °C
1 °C
0 °C
1 °C
-12 °C

dull sluice
#

waht happens what do u expect and what error u get if u get any

gray kraken
#

o i dont get errors

#

im expecting a list of degrees but i get '6\xa0°C'

dull sluice
#

i dont know tinker nor custom tinker but i can help with the butifle soup and requests also u can say i hear u just my mother can hear me if i talk

dull sluice
gray kraken
#

celsius

dull sluice
#

i mean in the example what number of degree are u giving that gets printed like that

gray kraken
#

6 °C = '6\xa0°C'

dull sluice
#

/xa is a no breake space u should just replace it with a space or use utf-8 encoding

#

instead of asci

gray kraken
#

how do i do that

obsidian dragon
#
html_content = """
"""
dull sluice
#

just do str.replace("\xa"," ")

gray kraken
#

thx alot very muches

obsidian dragon
#
import os

# Specify the path as the parent directory (../)
directory_path = "../"

html_head = """
<!--build 1-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="icon" href="favicon.png" type="image/png" />
    <link rel="stylesheet" type="text/css" href="styles.css" />
    <title>Media Mimic</title>
  </head>
  <body>
"""

html_foot = """
<script src="script.js"></script>
  </body>
</html>
"""

html_banner = """
    <img id="icon" src="favicon.png" />
    <h1>Media Mimic</h1>
    <p>Powered by a 16TB Hard Drive!</p>
"""

html_content = ""


def build_media_mimic():
    # Check if the parent directory exists
    if os.path.exists(directory_path) and os.path.isdir(directory_path):
        # Get a list of directories in the parent directory excluding certain directories
        directories = [d for d in os.listdir(directory_path) if os.path.isdir(os.path.join(directory_path, d)) and not d.startswith("_") and d not in ["$RECYCLE.BIN", "System Volume Information", "#media_mimic"]]

        # Print the list of directories
        for d in directories:
            html_content += f"{d}<br>"
            
    else:
        print("The parent directory is not valid.")

    return html_head + html_banner + html_content + html_foot


media_mimic_text = build_media_mimic()

#save media_mimic
media_mimic_file = open("index.html", "w")
media_mimic_file.write(media_mimic_text)
media_mimic_file.close()
#
Z:\#media_mimic>C:/Users/Developer/AppData/Local/Programs/Python/Python312/python.exe z:/#media_mimic/main.py
Traceback (most recent call last):
  File "z:\#media_mimic\main.py", line 51, in <module>
    media_mimic_text = build_media_mimic()
                       ^^^^^^^^^^^^^^^^^^^
  File "z:\#media_mimic\main.py", line 43, in build_media_mimic
    html_content += f"{d}<br>"
    ^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'html_content' where it is not associated with a value
dull sluice
#

do global html_content at the start of build_media_mimic or pass it as an arg and make it accept it as an arg

obsidian dragon
#

it can read html_banner and head/foot

dull sluice
#

dosent make much sense to me either but that should solve it

#

difference seems to be that u define html_banner and the others by """text""" but use only "text" for html_content

#

there are some differences between the meaning and result of those just its rarely noticed

dull sluice
#

what error do u get?

obsidian dragon
#

@gray kraken

# Open the file in read mode
with open("build.txt", "r") as build_file:
    # Read the content and convert it to an integer
    build_text = int(build_file.read().strip())
    # Increment the value by 1
    build_text += 1

# Open the file again in write mode
with open("build.txt", "w") as build_file:
    # Write the updated value (converted to string) to the file
    build_file.write(str(build_text))
dull sluice
#

u can try something like

d=""
for i in string:
  if i.digit():
    d+=i
return int(d)
#

it removes all non num chars and ints the str

gray kraken
#
 from customtkinter import *
from bs4 import BeautifulSoup
import requests

pageToScrape = requests.get("https://www.timeanddate.com/weather/canada")
soup = BeautifulSoup(pageToScrape.text, "html.parser")
webscraping = soup.findAll("td", attrs={"class": "rbi"})





def reload():
    y = []
    for i in soup.find_all("td", attrs={"class": "rbi"}):
        y.append(i.text.replace("\xa0","").replace("°C", "").replace(" ", ""))
    print(y)



Root = CTk()
Root.title("Canada")
Root.iconbitmap("canada.ico")
Root.geometry("300x350")

label = CTkLabel(master=Root, text="N/A", font=("Arail", 50), text_color="red")
label.place(relx=0.5, rely=0.3, anchor="center")

button = CTkButton(master=Root, text="reload", font=("Arail", 50), fg_color="#e63c3c", hover_color="#91242d", command=reload)
button.place(relx=0.5, rely=0.7, anchor="center")

Root.mainloop()
#

y.append(i.text.replace("\xa0","").replace("°C", "").replace(" ", "")) to y.append(int(i.text.replace("\xa0","").replace("°C", "").replace(" ", "")))

dull sluice
#

it may have invisible chars like tab space that non break space \ax from earlyer or something like that

#

that wont show up on print

gray kraken
#

'-11'

earnest grotto
#

Hey, can you help me with my Python interpeter?

#

I changed a name of project them everything stomped working

#

Pycharm best haha

dull sluice
earnest grotto
#

Just cannot wait until i hit 50 messages

dull sluice
earnest grotto
#

wait

#

there are to cases

#
  1. Cannot even add the interperte
  2. When I can add in right down corner I choose interpeter it just does not work
#

give me a sec i will check

#

yea

#

yeah but

#

the point is it does not work with venv

dull sluice
earnest grotto
#

it only works with the base system interpeter

dull sluice
earnest grotto
#

yup that sucks have to talk until i have 50 messages lol

#

what is your fav snake?

gray kraken
#

python

earnest grotto
#

nice XD

gray kraken
#
y.append(int(i.text.replace("\xa0","").replace("°C", "").replace(" ", "")))
dull sluice
#

can u give an example on i so i can test it?

gray kraken
#
Traceback (most recent call last):
  File "C:\Users\bjrnc\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 1967, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\bjrnc\AppData\Local\Programs\Python\Python312\Lib\site-packages\customtkinter\windows\widgets\ctk_button.py", line 554, in _clicked
    self._command()
  File "F:\Documents\tempeture_canada\main.py", line 16, in reload
    y.append(int(i.text.replace("\xa0","").replace("°C", "").replace(" ", "")))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'N/A'

dull sluice
#

oh u should check if u get that and return None or something

#

it prob appiers on the site too its that there is no data for that thing in the site

#

there is no return

#

i used it as thats what u want to add to the list y instead

#

u can map int on the list

gray kraken
#

y[0]

dull sluice
#

like u have a list l

def strip_and_int(n):
  n2=""
  for i in n:
    if i.is_digit():
      n2+=i
  return int(n2)
list(map(l,strip_and_int))
#

this would still say "" is not valid base 10 int

#

bc that number that u had the problem with is just a placeholder when the site dosent have data for that entry

#

its basically the same as None

#

N/A means None just to some humans not python

#

or probably any programing language

#

than what was the str u got the error for?

dull sluice
gray kraken
#

'5', '1', '2', '4', '2', '-10', '-11', '0', '0', '-26', '-11', '-6', '-1',

dull sluice
#

if u need the avrage just use a try so u try to do it and if its N/A u get an error and skip it

#

do

l=[(int(i.text.replace("\xa0","").replace("°C", "").replace(" ", ""))) for i in data if i!="N/A"]
avrage=sum(l)/len(l)
gray kraken
#

i dont think your getting what i mean its not your problem im just bad at explaining

earnest grotto
dull sluice
#

!rule 5

wise cargoBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

dull sluice
#

aka no help for scraping

#

but thats the same as scraping

#

if u get and api and request.get the json that not scraping thats usenig the api as long as the api is public

gray kraken
#

there are 3 types of webscraping allowed, allowed with request, not allowed

whole bear
#

What is webscraping

earnest grotto
gray kraken
#

its getting info from a website

rugged root
#

!stream 324850936759451649

wise cargoBOT
#

✅ @earnest grotto can now stream until <t:1712238763:f>.

dull sluice
whole bear
native scarab
#

give voice permission 👉 👈

whole bear
#

would it be a website that is no longer operating because you said using it with code just a assumption.

gray kraken
native scarab
#

so how many messages do i need to unlock voice perms

rugged root
#

!stream 324850936759451649 30M

wise cargoBOT
#

❌ @earnest grotto can already stream.

somber heath
#

Been around Linux, nudge nudge wink wink know what I mean, say no more!

native scarab
#

i dont think i will but i will try

#

im not normally a talkative person

rugged root
#

#bot-commands do !user

native scarab
#

o ok

#

ya i understand the security measures

rugged root
#

!stream 324850936759451649 30M

wise cargoBOT
#

✅ @earnest grotto can now stream until <t:1712240687:f>.

native scarab
#

so not all web scrapping is unethical right?

#

ya i read terms before scrapping

#

the thing is i wanted to start free lancing in web scrapping and i dont want my work to be unethical

#

ya i hear you

dull sluice
#

if i find a not public api and use it is that scraping or something else?

#

so like api but not allowed?

native scarab
#

i dont know

#

but I guess you could call that breaching

#

if they dont want to give anyone acess to it

#

but I'm not sure

rugged root
#

Back in a bit, sorry

stuck furnace
#

Hey

#

Yep

#

Your stream isn't loading for me 🤔

dire grail
#

It’s me the fedora guy

stuck furnace
#

Why would it be different with the other account?

rugged root
#

Because Linux is bullshit

#

(in some cases)

#

I'm still not in call, just had to throw that in there

#

Doing more phone troubleshooting with our MSP

earnest grotto
stuck furnace
#

Could you share your screen through your webcam somehow? 🤔

#

Like with OBS

rugged root
#

I'm sure some of my co-workers are, though

whole bear
earnest grotto
rugged root
#

It doesn't help that I use the desktop/web app to answer my calls so I don't have the same issues

#

(I do have a weird different one, though)

#

But their phones and fixing that are my top priority

rapid chasm
rugged root
#

When it comes to Discord?

#

Oh yeah

#

Ohhhhhh yeah

#

Every OS sucks in their own special way

stuck furnace
#

Working now 👀

#

You're having an issue with python interpreters in PyCharm?

#

You're muted btw, if you're speaking 😄

earnest grotto
#

XD

#

i do not have permision to talk

#

how

stuck furnace
#

Can you not click the microphone?

earnest grotto
#

XDDDD

dire grail
#

Yeah

#

And it says that I have not permission to talk

stuck furnace
#

Oh you're on two accounts right

earnest grotto
#

yeah because of linux

#

I need 0 to show sceenn XD

rugged root
#

I'm assuming I just unmuted the right account

#

If not then... uhhhh

#

my b

#

Is that a yes I did?

stuck furnace
rugged root
#

Righteous

whole bear
#

@rugged root Well... Voice is prioritized in QOS. lol

stuck furnace
#

Right

#

The venv is called pulporo?

#

Can you re-create the virtual environment?

#

¯_(ツ)_/¯

#

Yeah

#

There might be another step you need to do

#

Delete it again.

#

So all your venvs are in a central location?

#

Don't re-add it yet.

#

So I'm just trying to understand your set up.

#

Normally the venv exists within the project directory.

#

Ok

#

Can I see the file tree in PyCharm?

#

I wouldn't edit the files in the .idea folder personally 😄

#

Oh ok I see sorry.

#

Can you go into the place where you select the interpreter?

#

Settings

#

Can you click "show all"?

#

You deleted the venv right?

#

Oh ok. Remove it from pycharm.

#

Oh pithink

#

Erm, is it in a repository?

#

All else fails you could create a new pycharm project.

#

I generally wouldn't (add the .idea stuff to the repo)

#

🤔

#

Erm, restart pycharm for good luck first 😄

#

Go for it

#

Ah

#

Your other projects don't have this issue?

#

Alright then I would just create a new pycharm project.

#

Maybe the metadata got messed up or something 🤷‍♂️

#

Do you have uncomitted work?

#

I'm not sure what you mean sorry.

#

Erm, whichever

#

Can you invalidate your pycharm caches?

#

I'm not sorry 😄

#

I think if you exit settings

#

and click in the hamburger menu top left

#

It's there yeah

#

down a bit

#

warmer

#

warmer

#

warmer

#

Got it

#

Yeah why not

#

Wait sorry

#

brb sorry

#

Alright. Delete the venv, invalidate caches, create new venv 😄

#

Yeah, but you're selecting an existing venv?

#

Oh, when you created the pycharm project.

#

Probably something in your .bashrc

#

is what's causing that cargo message

urban abyss
#

hey guys how's it going

stuck furnace
rugged root
#

Good, 'bout you?

urban abyss
#

Going okayyyyyy ish

#

trying to debug ubuntu jammy python issues

#

that and dealing with a situation where if a pip install process goes on for long enough, it fails out in our VM with a NewConnectionError 🤷‍♀️

#

but if I shard them up enough, it works fine

rugged root
urban abyss
#

big fan of jetbrains IDEs

rugged root
#

I'm confused

stuck furnace
#

It's like a hydra

rugged root
urban abyss
#

and pip very unhelpful tells you it has a conflict error rather than just a failed connection

rugged root
#

That tracks

#

You know I said to stay away from uv and rye until they get more stable but....

#

Maybe it's worth checking for testing

urban abyss
#

i might just move to rust completely

#

fuck piptools

#

all my homies hate piptools

stuck furnace
#

🎉

#

It will be whichever python interpreter you selected when you created the venv?

#

It looked like you selected /usr/bin/python3

rugged root
stuck furnace
#

Although on windows you do have to make changes to the registry to make python interpreters discoverable (which is handled by the installer, if there is one).

rugged root
#

You do not

stuck furnace
#

(Which is why I wanted to make a PyPy installer)

rugged root
#

You use the py launcher on windows

stuck furnace
rugged root
#

Oh right

#

Right right right, ignore me

#

But like you said, it's handled by the installer, so it's barely an issue

stuck furnace
#

Yeah

#

Honestly I've noticed I'm spending less time configuring things on Windows 😄

#

¯_(ツ)_/¯

#

I think we've summoned Rabbit 👀

amber raptor
#

I’m not sticking around

stuck furnace
#

Fair enough

#

I did not hear this

amber raptor
#

Unless someone wants to do VC that isn’t Tech Support 101

stuck furnace
#

Yeah 😄

#

Debate about gun control...

#

Debate about <controversial topic>

#

(for the VC bingo card)

amber raptor
#

I enjoy triggering Bingo card

rugged root
#

You're practically a free square and I love you for it

wise loom
stuck furnace
#

Printers exhibit resistentialism

rugged root
#

!stream 324850936759451649 30M

wise cargoBOT
#

✅ @earnest grotto can now stream until <t:1712245118:f>.

rugged root
urban abyss
#

is there a good way to handle pyenv on CI without requiring build every time?

stuck furnace
#

Mine? 👀

#

Thanks!

rugged root
#

Have to replace a printer cart

amber raptor
urban abyss
stuck furnace
#

Er, bit drastic 😄

amber raptor
#

.xkcd 1987

viscid lagoonBOT
#

The Python environmental protection agency wants to seal it in a cement chamber, with pictorial messages to future civilizations warning them about the danger of using sudo to install random Python packages.

stuck furnace
amber raptor
#

ARM you mean?

stuck furnace
#

pyenv uses shims I think?

amber raptor
#

How does pyenv track packages?

#

requirements.txt?

stuck furnace
#

Erm, I think it's just for managing python interpreters (and associated command line executables)

#

Yeah

#

Oh and it's all written in Bash lol

noble solstice
#

Hello Guys!!

#

What r u guys discussing?

stuck furnace
#

Python environment stuff

#

Yeah, I've seen guides where they just say not to use python because of the headaches of distribution

rugged root
#

I'm back to being Typelock

amber raptor
rugged root
#

Phones are my new printers for now

amber raptor
#

Containers fix distribution problem for Python

rugged root
#

@urban abyss You good?

#

I hear ya

#

When I crouch then stand back up it sounds like I'm walking on gravel

#

I misclicked

#

What're you up to, LX?

stuck furnace
#

Erm, nothing really

#

I had a bit of a nightmare earlier 😄

#

I decided to sell my old laptop because I need the money

#

Thought I'd give the keyboard a thorough clean before selling it

#

So I started removing key caps

rugged root
#

Risky on a laptop

stuck furnace
#

...and then snapped one in half

rugged root
#

Yep

stuck furnace
#

Yeah 😄

rugged root
#

They reaaaaaally aren't made to come off

stuck furnace
#

Yeah, so I have ordered a single key cap off ebay

#

Probably not arriving till next week 😑

#

I'm an idiot

rugged root
#

Nah, shit happens

#

Which key?

stuck furnace
#

Erm, the down arrow

#

The arrow keys are like really tiny and delicate on this particular keyboard

#

Tbh, I'm not even sure it will sell for much as the battery needs replacing.

#

But it still works other than that ¯_(ツ)_/¯

rugged root
#

Eh, 10 quid is 10 quid

stuck furnace
#

And I'm selling it through CeX who give you like pennies on the dollar lol

rugged root
#

And it's one less thing to mess with

#

Although if you got 10 squid...

#

@peak depot Sup

#

Understandable

stuck furnace
rugged root
#

HA

#

@peak depot I heard the pur

#

@willow light Sup brah

#

That's me ⬇️

stuck furnace
#

I heard it in a Spotify advert

rugged root
#

Wait what?

stuck furnace
#

You can really tell I'm broke 😔

rugged root
#

DJ sex?

stuck furnace
rugged root
#

Ohhhhhhhhhhhhhh

stuck furnace
#

Computer exchange

rugged root
#

Right right right

willow light
#

Chief Sexecutive Officer?

stuck furnace
#

Yeah

rugged root
#

HA

willow light
#

I've used that name on steam before

rugged root
#

That shouldn't surprise me

#

Yeah we can hear you

#

@exotic moss Sup dude

exotic moss
#

Hey man

#

joins vc
"i have come"

willow light
#

joins vc WHO HAST AWAKENED ME FROM MY SLUMBER

earnest grotto
#

@rugged root & @stuck furnace thanks guys a lot for help I finally resolved it!

rugged root
#

Niiiiiiiiiiiiiiiiiiiiiiiiiice

rugged root
#

@stark river Sup

#

@exotic moss You sick?

#

Like hella?

stark river
#

🏃‍♂️

rugged root
#

Oh really? Damn, I didn't realize you were in that good of shape

exotic moss
#

such good of shape

stark river
exotic moss
#

i took the muscle relaxer the next day and it gave me dull muscle pain (im assuming it caused it)

#

so im not taking that anymore

rugged root
#

@faint raven What'd you do?

#

Sort of

#

Yea

faint raven
#

Ah

rugged root
faint raven
#

I was joking that I compile a 0 into a one 😹

rugged root
#

Nice

willow light
#

https://en.wikipedia.org/wiki/Shoofly_pie move over raspberry pi, we have shoofly pi

Shoo-fly pie is a type of American pie made with molasses associated with Pennsylvania Dutch cuisine. While shoo-fly pie has been a staple of Moravian, Mennonite, and Amish foodways, there is scant evidence concerning its origins, and most of the folktales concerning the pie are apocryphal, including the persistent legend that the name comes fro...

rugged root
#

@willow light Bass Pro?

#

Springfield has the first one

#

Yep

#

Ohio I liked living in

whole bear
#

hello

rugged root
#

Yo

#

How goes it

whole bear
#

good my friend

#

how about u

rugged root
#

Irritated by technology

willow light
#

irritated by technology would make a great band name

rugged root
#

Or a phone at this point

whole bear
#

technology good man why

rugged root
#

Our phone system is fucking up and printers are always a pain in the ass

willow light
#

printers are only not a pain in the ass when they're someone else's problem

rugged root
#

@willow light Really Awful Malware?

willow light
#

Genuine Imitation Camel hair brush. Real Fake Stuff

stark river
#

download more RAM.. the real Random Access Memory

whole bear
#

are u guys programmers ?

rugged root
#

Not professionally. I do IT

stark river
#

i'm just a cook

willow light
#

I am kinda a programmer. I steal only the best from StackOverflow.

whole bear
#

i do IT aswell i used to work in a store for 7 months as an IT

rugged root
#

Very nice. I've been doing it for.... I think 7 years?

#

A little while

whole bear
#

we used to do rebolings and change hardware on laptops and pcs

rugged root
#

@willow light Wait, Myst was on floppy?

whole bear
#

also we used to fix many other stuff aswell

rugged root
#

Huh

#

I work for an accounting firm, so mines just the various software and printer and phone stuff

whole bear
#

i have a question do you guys like studing alot ?

rugged root
#

@willow light I think I have like... 3 copies of Neverwinter Nights

whole bear
#

studying

rugged root
#

I'm always reading and learning but I don't know if I'd call it studying per se

#

And I know I have at least 2 versions of Red Alert 2

#

Nice nice

whole bear
#

is it possible to get to used to study something like make your brain like it or you think thats dna ?

stark river
#

i 🫶 studying

rugged root
#

Good times

#

Same

#

I need to be hands on

#

And if I can't... I don't know

#

@upper basin He lives!

#

@blissful sand Sup

whole bear
#

listen forcing yourself to like it will it make you really like it ? will it become a habit you think ?

upper basin
rugged root
#

Forcing myself to do it

#

Liking doesn't necessarily come into it

#

But I like learning. Like I enjoy reading documentation and learning about various frameworks and programming languages.

#

But I don't consider it studying

#

To me, studying is learning for a specific task or goal or test

#

But that's just a personal definition

upper basin
#

There's sth that motivated/intrigued you to try it out.

whole bear
#

i get its part of DNA sometimes but im not sure if you can make it to like it withought having to be in your DNA

rugged root
#

Yeah but it's more because I'm curious and interested

#

Sometimes you have to trick yourself or find ways to make it interesting

#

What studying are you trying to do? Or what are you trying to studying

stuck furnace
# whole bear is it possible to get to used to study something like make your brain like it or...
Khan Academy

Learn about how to train your brains to be more resilient and flexible! In this unit, you'll find articles and videos packed with ideas and suggestions about how to encourage and cultivate a growth mindset throughout your life.

whole bear
#

OH OK I GET IT

rugged root
#

All-caps?

willow light
#

My adhd means there are days like today where I'm like "what even is an attention span anyway?"

wise loom
#

I've been very surprised how lightweight Alpine Linux is

upper basin
rugged root
#

Currently I'm trying to learn Rust. Doing the Rustlings thing where it's more interactive. Currently learning about Macros

rugged root
willow light
rugged root
#

Well played

wise loom
#

They have two versions, one with openrc and the other with systemd

wise loom
#

lol

rugged root
#

I really didn't know it had alcohol, even just that smidge

whole bear
#

what languages do you guys like ?

willow light
#

English, Latin, Spanish, Japanese, etc.

rugged root
#

Python, C#, SQL, Rust, ReasonML

#

@upper basin I.... I mean I don't know what you would test

willow light
#

also Python, TypeScript, Rust, Go, and Coq

rugged root
#

Oh yeah of course

#

I mean only if you're doing it as a doc test

#

But you can still do a doc string and explain it all

stark river
#

python

upper basin
rugged root
#

I'd have to look more into doctest

stark river
#

tests is for backdoors /s

rugged root
#

To prevent or cause

#

@upper basin Enterprise cares about getting things done, not whether it's done well

#

Deadlines, making stock holders happy, etc.

upper basin
#

How do you make sure it's stable without testers.

rugged root
#

Then you troubleshoot and fix it

#

Back soon

upper basin
#

!e

lister = [0, 1, 2, 3, 4]

indices = [0, 1, -1, -2, -3]

for index in indices:
    if index < 0:
        print(lister[len(lister) + index])
wise cargoBOT
#

@upper basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 4
002 | 3
003 | 2
willow light
#

This is my pan lol

wise loom
#

got burned p bad with soup

#

used a mix of neomycin and bacitracin

#

@peak depot are those good ^^ ?

rugged root
#

HOKAY

#

So

#

Main phone issue is (tentatively) fixed

#

Now for my phone issue

#

Same

#

Hello

gentle flint
#

cake of pan

#

pan of fry

rugged root
#

Looks like a white blood cell

upper basin
rugged root
#

Makes sense now

upper basin
#

It'll destroy his hunger.

#

Yes.

gentle flint
#

dutch pancakes

#

french pancakes

willow light
rugged root
#

I really really hope this all fixes the various phone issues

#

Damn it, back later

scarlet halo
#

failed attempt at making a terminal emulator 😭

haughty sonnet
#

@upper basin why did you mute me?

haughty sonnet
gentle flint
rich bison
#

colorblind?

gentle flint
#

ye

rich bison
#

oh ic

rugged root
#

@upper basin Blame the intern

#

Every time

gentle flint
#

really love this new headphone jack

#

it's got a good mechanism to take up the wire strain

#

and it keeps the plastic well out of the way so it doesn't melt when soldering

#

there's also a little plastic sleeve which goes around the soldered pins before screwing down the housing so prevent it from short-circuiting

#

really nice design

#

this was our sponsor for today

rugged root
#

@upper basin What are we watching?

#

Oh the thing Plome linked

#

Gotcha

gentle flint
rugged root
#

The former

#

No no

#

Nice try

#

I mean in the functional sense ye

#

My brain is tired

#

This tracks

#

pytest has doctest integration

#

You can do both

whole bear
#

Brb

fast saffron
#

Hello

rugged root
#

@somber field I was seeing between $10 mil and $50 mil. https://quantumzeitgeist.com/the-price-of-a-quantum-computer/

Like in the early days of classical computing devices came with a price tag in the millions of dollars. But now we can have computers millions of times more powerful in the form factor of a smartphone and available for just a few hundred dollars. But how much do Quantum Computers cost and can you buy one?

cinder dawn
#

long time no see3

#

ngl im a bad driver so i rev my car in the most random places

#

@gentle flint uk brother here. It took me 2 years of learning to drive and £3000 to learn to drive

#

£1500 of that i got scammed

#

yeah i got fucked by the backlog too

gentle flint
#

@somber heath the headset jack is a triumph of Australian engineering

#

tbh if it travelled via Australia that certainly explains the price

somber heath
#

🤷‍♂️

gentle flint
#

it's a KS3PC-AU

#

and it is the nicest audio jack I have ever soldered

#

first one which just worked after soldering without any crosstalk

bronze quiver
#

Hey guys I have to leave

#

Lovely talking to u guys

#

See ya

somber heath
#

Victor Borge

rugged root
#

Ernest Borg 9

rapid chasm
rapid chasm
slender latch
slender latch
# rapid chasm

My boy stacked... I take so much red meat i dont even need to take creatine

harsh vortex
#

Is there anyone that can help me with an application I am trying to write in pygame? Please dm me.

somber heath
#

@magic crow👋

magic crow
#

hello~~

#

cannot use mic for this moment

#

sorry about it haha

#

^__^

magic crow
#

@somber heath i see that i cannot verify voice hahahaha

#

yes!

#

yeah

#

oh okay

#

Dev, how do you review python?

#

yes

#

yes

#

is it easy to master python?

#

okay

#

thank you!!

#

good to learn only one language to become a professional or learn various language with background knowledge??

#

@somber heath oh

#

wow

#

not decide yet

#

learnt some database basic

#

I gtg, thanks for the good informations!!

#

👍

somber heath
#

@verbal monolith👋

wind raptor
somber heath
#

Oh, that's right, I can type.

gentle flint
#

guess the swedes and the dutch make the same pancakes

deep cloak
#

allot of floating point data

forest zodiac
#

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

deep cloak
#

what is that

#

laugh

quick kayak
#

hey how would i get a input in top level window

somber heath
#

What are you making?

quick kayak
#

a sign in page

somber heath
#

Are you using a UX framework?

quick kayak
#

nah

#

Custom Tkinter

somber heath
#

So yes.

quick kayak
#

oh ok

somber heath
#

Presumably, you'd use an appropriate widget.

quick kayak
#

yeah thats what i dont know

somber heath
#

I'm looking up what custom tkinter offers.

#

tkinter isn't one of my things

quick kayak
#

oh its fine

#

@somber heath CTkInputDialog

#

is one of them i just dont want a spare window opening

somber heath
quick kayak
#

ok

#

thabks man

somber heath
#

@vocal basin 👋

somber heath
#

@round loom👋

upper basin
#

!paste

wise cargoBOT
#
Pasting large amounts of code

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

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

upper basin
vocal basin
#

!e

method_log = {"gate": 1, "etc": 7}
print(method_log)
method_log.pop("gate", None)
print(method_log)
method_log.pop("gate", None)
print(method_log)
wise cargoBOT
#

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

001 | {'gate': 1, 'etc': 7}
002 | {'etc': 7}
003 | {'etc': 7}
vocal basin
#

though

#

ig it's used separately

upper basin
#

The rest is clean?

vocal basin
#

the comment doesn't explain the only thing that it shouldn've explained: why create a new dictionary

upper basin
#

This one?

            # Prepare a dictionary to log the method name and its arguments
            method_log = {'gate': method.__name__}
vocal basin
#
# Update the parameters (if necessary)
updated_params = {k: v for k, v in method_log.items() if k != 'gate'}
upper basin
#

Ohh ok, so if you have a look at the stuff above it, there are places where I am mutating the value.

#

So, we would then send the mutated values to the method being decorated.

gentle flint
vocal basin
upper basin
vocal basin
upper basin
#

So when the angle is 0 or a multiple of 2pi, it's basically same as not doing anything, so I call return.

vocal basin
#

do all methods return None?

upper basin
#

All gate methods, yes.

vocal basin
#

anyway the method does more than just logging

upper basin
#

Ohh yeah, I need to update the docstring, thank you so much for catching that!

#

Completely forgot about it.

vocal basin
upper basin
#

I see. I have to look that up hehe, I haven't used frozensets before.

#

Like outside the class definition?

vocal basin
#

outside wrapper, and preferably outside gatemethod

upper basin
#

I see. I have the gatemethod as a static method inside my class definition at the moment.

vocal basin
#

(I would normally do this, to keep consistent with how logging frameworks generally treat method names separately from method arguments)

params = {}  # renamed from method_log
# ...
instance.circuit_log.append((method.__name__, params))
return method(instance, **params)
somber heath
#

@nimble kernel👋

nimble kernel
somber heath
#

@peak depot

I think sometimes cats don’t actually know what specifically they want – they’re just generally dissatisfied, so they stand there yelling “I YEARN” on the off chance that you’ll be able to do something about it.

#

Yoinked from the internet.

upper basin
vocal basin
#

no, keeping method name outside the parameter list is the point

upper basin
#

Ohh right.

vocal basin
#

also that prevents collisions with arguments named gate

upper basin
#

yep yep.

somber heath
#

@vestal flint 👋

#

@muted ember👋

#

@whole bear👋

whole bear
#

haloooooo

#

Day 145 : i still havent been verified in this discord channel

gentle flint
#

you joined 14 days ago

whole bear
#

oh my bad

somber heath
#

Yahoy.

vocal basin
#

ATP

vocal basin
urban abyss
#

yo

vocal basin
#

@dire pebble

#

here

dire pebble
#

Let's say there are names and individual items for each name (person). I wanna be able to see the information of items by entering the name of whose the item is
Also wanna be able to update informations as a user @rugged root

vocal basin
#

!e

users = {"Alice": {"SomeField": 20}}
users["Bob"] = {"SomeField": -127}
print(users)
wise cargoBOT
#

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

{'Alice': {'SomeField': 20}, 'Bob': {'SomeField': -127}}
vocal basin
#

it might still be a dictionary

#

persistence is a separate issue

whole bear
#

what are you guys working on?

vocal basin
#

if you want it saved => then yes, you'll need file system access

#

but if you're just interested in updating it while the program is running, dictionaries are enough

rugged root
#

Can also do a simple database, but that's a bit extra given the circumstances

vocal basin
#

when storing everything as a dictionary users, it may be represented as:

users = load_users()
update(users)
save_users(users)
#

there is a built-in library for converting dictionaries to strings and back

#

!e

import json
print(json.dumps({
    'Alice': {'SomeField': 20},
    'Bob': {'SomeField': -127},
}))
wise cargoBOT
#

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

{"Alice": {"SomeField": 20}, "Bob": {"SomeField": -127}}
vocal basin
#

!e

import json

users = {
    'Alice': {'SomeField': 20},
    'Bob': {'SomeField': -127},
}
as_str = json.dumps(users)
print(type(as_str))
print(json.loads(as_str) == users)
urban abyss
#

Yo

wise cargoBOT
#

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

001 | <class 'str'>
002 | True
urban abyss
#

I’m here just making an espresso

fierce stratus
#

Hello

urban abyss
#

So can’t unmute lol

rugged root
#

HA

#

Good reason for not being able to

whole bear
#

speaking of json, has anyone ehere played heavy rain (if you know you know)

rugged root
#

Yep, that's why I said it the way I did

whole bear
#

david cage be like press x to feel emotions

stark river
#

tmi

rugged root
whole bear
#

that goes hard

vocal basin
urban abyss
somber heath
#

The version I saw cut it down and kept it unironic.

lilac notch
somber heath
#

Like just the first bit.

vocal basin
#

what an incredible example of "didn't read the docs"

lilac notch
#

am i fucked if i run this like that?

#

dont worry, thats just 12 years of savings

rugged root
whole bear
#

i thought i did something cool with this prime sieve im screwing around with but it just adds 49 and 91 when the limit is 100

vocal basin
#

nvidia: let's put extra 2 pins so power supply makers put power on them for potential extension
power supply makers: leave them out because GPUs don't use them
nvidia: ...

rugged root
#

That tracks

vocal basin
#

but you shall remember that custom vendors may do almost whatever they want

#

so, yes, if there's fancy rgb it might fail

dire grail
#
RuntimeError: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
stuck furnace
#

Sup

vocal basin
#

at least this

#

maybe not deep enough but still

stuck furnace
#

.realpython classes

viscid lagoonBOT
#

Here are the top 5 results:

Python Classes: The Power of Object-Oriented Programming
Python's Magic Methods: Leverage Their Power in Your Classes
Providing Multiple Constructors in Your Python Classes
Data Classes in Python 3.7+ (Guide)
Inheritance and Composition: A Python OOP Guide
rugged root
#

@dire pebble

vocal basin
#

@rugged root w3schools -- site to google, copy code and forget

vocal basin
#

(but that's reference not tutorial)

#

@rugged root language or what?

#

mkdocs

#

?

#

there is that, mdbook and github book thing

obsidian dragon
#

are the certificates from w3schools worth anything

upper basin
vocal basin
#

__new__ creates an instance, __init__ initialises it

upper basin
#

Best ones are from Azure, IBM, Google, and some Microsoft ones.

vocal basin
#

first responsible for making an object of proper type, second responsible for setting up proper invariants

#

there is __field is for avoiding collisions

#

also _ influences * imports I think

#

__new__ can be used to return subtypes or to implement singletons

#

almost always __new__ means no __init__ defined in the same place, otherwise somewhat hard to get right

#

(hard to get right being hard to prevent double-__init__)

vocal basin
#

i.e. not an abstract base class

#

abc should throw in __new__ if cls isn't derived

upper basin
#

opencv2

rugged root
#

It should anyway I thought

#

Because not all methods in an ABC would be abc methods

#

Actually wait

vocal basin
#

__init__ is called after __new__ not inside

rugged root
#

Right

#

I knew that

vocal basin
#

!e

# bad; don't
class Singleton:
    __instance = None

    def __new__(cls):
        if Singleton.__instance is None:
            Singleton.__instance = super().__new__(cls)
        return Singleton.__instance

print(Singleton())
print(Singleton())
wise cargoBOT
#

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

001 | <__main__.Singleton object at 0x7fa7efcffb60>
002 | <__main__.Singleton object at 0x7fa7efcffb60>
vocal basin
#

I think generally libraries try to avoid this

#

so instead they have functions for getting the global/context variable (and initialising if there's none)

#

!d contextvars

wise cargoBOT
#

This module provides APIs to manage, store, and access context-local state. The ContextVar class is used to declare and work with Context Variables. The copy_context() function and the Context class should be used to manage the current context in asynchronous frameworks.

Context managers that have state should use Context Variables instead of threading.local() to prevent their state from bleeding to other code unexpectedly, when used in concurrent code.

See also PEP 567 for additional details.

New in version 3.7.

rugged root
#

Writing it here so I can check in a sec. Fortigate 61F

vocal basin
#

initialising singletons (especially stateful) is generally a non-trivial task

#

yaml devops

#

it's not packaged because it can't be

uncut meteor
#

gtg

vocal basin
#

Cython not CPython

#

CPython is just the default implementation

#

and Cython is a compatibility layer with C

#

or rather a compiler/transpiler/whatever to make that compatibility layer less painful

#

concurrency

#

-related stuff

#

@amber raptor there are macro facilities and dumb functional stuff that comes from the language, which helps beyond systems programming;
but the compilation time is so long that for web APIs it's total pain

#

how did you end up with Flask

#

(rhetorical question)

#

> AI stuff is a C library
... or Fortran, at times

#

Python natively interacts with C

#

(CPython)

vocal basin
#

I think there was also a list of external tools for extension

#

sql join on api responses

urban abyss
#

GitHub flavoured markdown, is there any good solution for embedding snippets from other .md files (in other repos)?

vocal basin
urban abyss
vocal basin
#

I think mdbook supports markdown-to-markdown

#

with file inclusion

#

but only local files

urban abyss
#

although all renderers would have to support that howver

urban abyss
#

can always include a commons.md 😆