#voice-chat-text-0
1 messages · Page 289 of 1
don't blame me for lenovo's shitty hardware
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
wow no need to be a dick about it
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*
cool so unlike zoom i cannot view the screen on the laptop while connected to audio over my phone
No way in hell
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.
It could be that I'm using the wrong audio driver, but waddev
We're in tech. Laziness is a virtue.
nah im doing situps white texting rn
The best solution is the simplest solution. I'll just grab my old headset from 20 years ago.
Given how old this laptop is.
Nah, if it were drivers then zoom wouldn't've worked as well as it did earlier today
"audio device not recognized" XD
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.
Object animated with Finite Elements Method dancing to FEM by Davido
Original music video: https://www.youtube.com/watch?v=lta5go9P-go
would you accept something in bash, possibly involving xv?
I use windows because the only thing I know how to do is algorithms
myself and 1699 others got laid off because money matters more than people
BIGBALLA
👋
No all of my honey is reserved for my microwaved tea.
My honey comes in a bottle, not a pot
fake honey.
sometimes a jar
artificial sugars.
My honey is raw. It's a solid at room temperature.
danm, real.
bloated you mean featurefull
I have two jars, one from spring and one from summer. Very different tastes.
do people refrigerate their honey?
only if its fake.
wtf
I doubt you get your honey from central Maine.
Honey has a theoretical shelf life of ERROR CANNOT DIVIDE BY ZERO
if its real deal steel.
There were jars of honey discovered in the ancient egyptian tombs. It was still good to eat after 5000 years.
i would eat.
I would eat but not before taking one hell of a claritin
they probally had that bomb shit
the plant bck then
polin
opal
i know you'r wqatchig this chat
You working on a raytracer? 👀
tracer ray
I used to love the taste of the liquid claritin when I was a child 😄
That was a problem for me.
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.
!voice verify
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
anyone in here do python games? 2d, pygame ect..
me
hi @dull sluice
I kept hearning gun shots
that a toy gun
if you say so
if u join voice i can show what i think that was
@still herald I do to
Coding is hard
quit
polite cat!!!!!!
come!
no, this is alphazero
no thank you lol
send invite
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
physics simulator for fun 💀
any updates on xz?
make a cooking simulator
cooking code
code is cooking
its what i do for fun
it is fun
finally being able to use all that stuff you learnt in school
lol
maybe show us any of ur project
a physics sim project?
sure
repo?
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
here's one i could quickly find
can u stream how we play this?
although this one uses pymunk but i had one where i was just using verlet integration instead of using pymunk
Thanks buddy
HAHAHAHAHAHA
ey man that takes completely different skills compared to physics sims and game dev
i wanted to make my own physics engine for robot simulations
i know about isaac sim
but still
i am working on a game engine rn in cpp 😄 i did the amazing thing of deleting my main.cpp file tho so
man and i thought f = ma was cool :V
have you had any backups lol
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
team msg < 50 gang
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
Thanks buddy
is this for like an assignment?
hobby project
the process is pain but the result is massive satisfaction xD
i agree
even the prototype just getting to know how modern versions of vulkan and opengl works felt nice and painful :3
Ya
😮 robot?
although this would be the next logical step
sim-to-real transfer proejcts
i need to first understand RL first
@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
cya
You guys rock
have you finished your hw
Doing it now
"cover your ass" ?
What does that mean?
Sure
You're so annoying
hehehehehe
use the same ``` on all ends
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']
open challels in #1035199133436354600 and i can maybe help too but my mother sent me to learn so at most i can text
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
waht happens what do u expect and what error u get if u get any
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
thats for what degree?
celsius
i mean in the example what number of degree are u giving that gets printed like that
6 °C = '6\xa0°C'
/xa is a no breake space u should just replace it with a space or use utf-8 encoding
instead of asci
how do i do that
html_content = """
"""
just do str.replace("\xa"," ")
thx alot very muches
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
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
it can read html_banner and head/foot
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
what error do u get?
@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))
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
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(" ", "")))
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
'-11'
Hey, can you help me with my Python interpeter?
I changed a name of project them everything stomped working
Pycharm best haha
that whats the value if u stop it in debugger?
Just cannot wait until i hit 50 messages
its too complex for my brain so i use VS
XD it is not that hard
wait
there are to cases
- Cannot even add the interperte
- 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
maybe the its "- 11" not "-11"?
it only works with the base system interpeter
stop it in a debugger and look at the value there
python
nice XD
y.append(int(i.text.replace("\xa0","").replace("°C", "").replace(" ", "")))
can u give an example on i so i can test it?
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'
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
y[0]
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?
here python says "N/A" is the str thats invalid for an int
'5', '1', '2', '4', '2', '-10', '-11', '0', '0', '-26', '-11', '-6', '-1',
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)
i dont think your getting what i mean its not your problem im just bad at explaining
XD can you write what is input and what is the output?
!rule 5
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
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
there are 3 types of webscraping allowed, allowed with request, not allowed
What is webscraping
good quesiton
its getting info from a website
!stream 324850936759451649
✅ @earnest grotto can now stream until <t:1712238763:f>.
basicaly useing a website with code
Oh ok that makes sense
give voice permission 👉 👈
would it be a website that is no longer operating because you said using it with code just a assumption.
so how many messages do i need to unlock voice perms
!stream 324850936759451649 30M
❌ @earnest grotto can already stream.
Been around Linux, nudge nudge wink wink know what I mean, say no more!
#bot-commands do !user
!stream 324850936759451649 30M
✅ @earnest grotto can now stream until <t:1712240687:f>.
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
if i find a not public api and use it is that scraping or something else?
so like api but not allowed?
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
Back in a bit, sorry
It’s me the fedora guy
Why would it be different with the other account?
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
coz linux trolls me today
I'm not to that point yet.
I'm sure some of my co-workers are, though
Lmao
like with phone camera?
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
Really 🤔
When it comes to Discord?
Oh yeah
Ohhhhhh yeah
Every OS sucks in their own special way
Working now 👀
You're having an issue with python interpreters in PyCharm?
You're muted btw, if you're speaking 😄
XDDDD
Oh you're on two accounts right
I'm assuming I just unmuted the right account
If not then... uhhhh
my b
Is that a yes I did?
Yep
Righteous
@rugged root Well... Voice is prioritized in QOS. lol
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 
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
hey guys how's it going
Hey 👋
Good, 'bout you?
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
@earnest grotto https://www.jetbrains.com/lp/toolbox/
big fan of jetbrains IDEs
Wait it's a connection timeout?
I'm confused
It's like a hydra
Yep, but only for longer running pip installs somehow, may just be a VM connection problem from glcoud to artifactory
and pip very unhelpful tells you it has a conflict error rather than just a failed connection
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
🎉
It will be whichever python interpreter you selected when you created the venv?
It looked like you selected /usr/bin/python3
@earnest grotto https://github.com/pyenv/pyenv This is what I'm referring to
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).
You do not
(Which is why I wanted to make a PyPy installer)
You use the py launcher on windows
Yeah py discovers python interpreters based on information in the registry
Oh right
Right right right, ignore me
But like you said, it's handled by the installer, so it's barely an issue
Yeah
Honestly I've noticed I'm spending less time configuring things on Windows 😄
¯_(ツ)_/¯
I think we've summoned Rabbit 👀
I’m not sticking around
Unless someone wants to do VC that isn’t Tech Support 101
Yeah 😄
Debate about gun control...
Debate about <controversial topic>
(for the VC bingo card)
I enjoy triggering Bingo card
You're practically a free square and I love you for it
Podcast with Andres who found the xz backdoor:
https://risky.biz/RB743/
Risky Business #743 -- A chat about the xz backdoor with the guy who found it
Printers exhibit resistentialism
!stream 324850936759451649 30M
✅ @earnest grotto can now stream until <t:1712245118:f>.
is there a good way to handle pyenv on CI without requiring build every time?
These were the notes I had to make to keep track of my python environment back when I was using Ubuntu: https://paste.pythondiscord.com/VE5A
Mine? 👀
Thanks!
Have to replace a printer cart
Accept your fate and just embrace containers, you will need to anyways
we do use CI containers, I just didn't want to have to go down the route of either storing all required python pyenv versions in an image or splitting images between python pyenv versions. 😆
Er, bit drastic 😄
Install them during the build or don't use pyenv at all
.xkcd 1987
And this is before AMD ARM macs 😄
ARM you mean?
pyenv uses shims I think?
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
Essentially this
Python environment stuff
Yeah, I've seen guides where they just say not to use python because of the headaches of distribution
I'm back to being Typelock
I mean the reasons not to use it are "It's slow, it's distribution is nightmare and it's dynamically typed"
Phones are my new printers for now
Containers fix distribution problem for Python
@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?
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
Risky on a laptop
...and then snapped one in half
Yep
Yeah 😄
They reaaaaaally aren't made to come off
Yeah, so I have ordered a single key cap off ebay
Probably not arriving till next week 😑
I'm an idiot
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 ¯_(ツ)_/¯
Eh, 10 quid is 10 quid
And I'm selling it through CeX who give you like pennies on the dollar lol
And it's one less thing to mess with
Although if you got 10 squid...
@peak depot Sup
Understandable
How'd you find out about my aquarium project? 🥁
Btw, it is pronounced "sex" (you were asking way back)
I heard it in a Spotify advert
Wait what?
You can really tell I'm broke 😔
DJ sex?
CeX
Ohhhhhhhhhhhhhh
Computer exchange
Right right right
Chief Sexecutive Officer?
Yeah
HA
I've used that name on steam before
joins vc WHO HAST AWAKENED ME FROM MY SLUMBER
@rugged root & @stuck furnace thanks guys a lot for help I finally resolved it!
Niiiiiiiiiiiiiiiiiiiiiiiiiice
Nice!
Back in a bit
Oh really? Damn, I didn't realize you were in that good of shape
such good of shape
1 or 0?
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
Ah
I was joking that I compile a 0 into a one 😹
Nice
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...
@willow light Bass Pro?
Springfield has the first one
Yep
Ohio I liked living in
hello
Irritated by technology
irritated by technology would make a great band name
Or a phone at this point
technology good man why
Our phone system is fucking up and printers are always a pain in the ass
printers are only not a pain in the ass when they're someone else's problem
@willow light Really Awful Malware?
Real Artificial Manure
Genuine Imitation Camel hair brush. Real Fake Stuff
download more RAM.. the real Random Access Memory
are u guys programmers ?
Not professionally. I do IT
i'm just a cook
I am kinda a programmer. I steal only the best from StackOverflow.
i do IT aswell i used to work in a store for 7 months as an IT
we used to do rebolings and change hardware on laptops and pcs
@willow light Wait, Myst was on floppy?
also we used to fix many other stuff aswell
Huh
I work for an accounting firm, so mines just the various software and printer and phone stuff
i have a question do you guys like studing alot ?
@willow light I think I have like... 3 copies of Neverwinter Nights
studying
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
is it possible to get to used to study something like make your brain like it or you think thats dna ?
i 🫶 studying
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
listen forcing yourself to like it will it make you really like it ? will it become a habit you think ?
Hey Hemlock, missed you.
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
Well, you are learning for sth right?
There's sth that motivated/intrigued you to try it out.
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
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
OH OK I GET IT
All-caps?
My adhd means there are days like today where I'm like "what even is an attention span anyway?"
I've been very surprised how lightweight Alpine Linux is
Croods moment.
Currently I'm trying to learn Rust. Doing the Rustlings thing where it's more interactive. Currently learning about Macros
Kind of the point of it, isn't it?
yeah it only takes half a sip of bud light to get it absolutely trashed.
Well played
They have two versions, one with openrc and the other with systemd
I really didn't know it had alcohol, even just that smidge
what languages do you guys like ?
English, Latin, Spanish, Japanese, etc.
Python, C#, SQL, Rust, ReasonML
@upper basin I.... I mean I don't know what you would test
also Python, TypeScript, Rust, Go, and Coq
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
python
I'd have to look more into doctest
tests is for backdoors /s
To prevent or cause
https://docs.pytest.org/en/7.1.x/how-to/doctest.html Oh interesting. I should have figured that there was something in PyTest to do it
@upper basin Enterprise cares about getting things done, not whether it's done well
Deadlines, making stock holders happy, etc.
Right, but what if the code breaks after adding some commit?
How do you make sure it's stable without testers.
!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])
@upper basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 4
002 | 3
003 | 2
This is my pan lol
got burned p bad with soup
used a mix of neomycin and bacitracin
@peak depot are those good ^^ ?
HOKAY
So
Main phone issue is (tentatively) fixed
Now for my phone issue
Same
@upper basin #unit-testing would know more
Hello
Looks like a white blood cell
That's what he's going for.
Makes sense now
Moody's Diner, Motel, & Gifts, of Waldoboro, Maine, Has Been Serving Residents and Tourists of Mid-Coast Maine Since 1927.
that shit look swedish
failed attempt at making a terminal emulator 😭
@upper basin why did you mute me?
@upper basin
colorblind?
ye
oh ic
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
crackhead crawling in the sewer singing amazing grace in E Gallie FL PT 2
sorry, it was rather offtopic
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
Brb
Hello
@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?
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
@somber heath the headset jack is a triumph of Australian engineering
tbh if it travelled via Australia that certainly explains the price
🤷♂️
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
Victor Borge
Ernest Borg 9
Looks like Swedish pancakes to me 
My boy stacked... I take so much red meat i dont even need to take creatine
Is there anyone that can help me with an application I am trying to write in pygame? Please dm me.
@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!!
👍
@verbal monolith👋
Oh, that's right, I can type.
yeah spelis said so too
guess the swedes and the dutch make the same pancakes
allot of floating point data
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
hey how would i get a input in top level window
What are you making?
a sign in page
Are you using a UX framework?
So yes.
oh ok
Presumably, you'd use an appropriate widget.
yeah thats what i dont know
oh its fine
@somber heath CTkInputDialog
is one of them i just dont want a spare window opening
I would talk to #user-interfaces or open a #❓|how-to-get-help, because they'll be more plugged into what you need to be doing.
@vocal basin 👋
@round loom👋
!paste
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.
@vocal basin is this clean?
https://paste.pythondiscord.com/FP3A
!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)
@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}
The rest is clean?
(this suggestion doesn't work)
the comment doesn't explain the only thing that it shouldn've explained: why create a new dictionary
This one?
# Prepare a dictionary to log the method name and its arguments
method_log = {'gate': method.__name__}
# Update the parameters (if necessary)
updated_params = {k: v for k, v in method_log.items() if k != 'gate'}
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.
neither the comment nor the variable name reflect why there's a need for a new dicionary
I see, I'll update the doc then.
questionable that it doesn't call the method here
https://paste.pythondiscord.com/FP3A#1L94-L94
So when the angle is 0 or a multiple of 2pi, it's basically same as not doing anything, so I call return.
do all methods return None?
All gate methods, yes.
anyway the method does more than just logging
Ohh yeah, I need to update the docstring, thank you so much for catching that!
Completely forgot about it.
these should probably be frozensets defined outside the function
https://paste.pythondiscord.com/FP3A#1L41-L44
I see. I have to look that up hehe, I haven't used frozensets before.
Like outside the class definition?
outside wrapper, and preferably outside gatemethod
I see. I have the gatemethod as a static method inside my class definition at the moment.
(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)
@nimble kernel👋
hi
@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.
What about
params = {'gate': method.__name__} # renamed from method_log
# ...
instance.circuit_log.append(params)
return method(instance, **params)
no, keeping method name outside the parameter list is the point
Ohh right.
also that prevents collisions with arguments named gate
yep yep.
you joined 14 days ago
oh my bad
Done.
ATP
@rugged root ?
yo
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
!e
users = {"Alice": {"SomeField": 20}}
users["Bob"] = {"SomeField": -127}
print(users)
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
{'Alice': {'SomeField': 20}, 'Bob': {'SomeField': -127}}
what are you guys working on?
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
Can also do a simple database, but that's a bit extra given the circumstances
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},
}))
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
{"Alice": {"SomeField": 20}, "Bob": {"SomeField": -127}}
!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)
Yo
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | <class 'str'>
002 | True
I’m here just making an espresso
Hello
So can’t unmute lol
speaking of json, has anyone ehere played heavy rain (if you know you know)
Yep, that's why I said it the way I did
david cage be like press x to feel emotions
tmi
that goes hard
finally, a descriptive commit name
https://github.com/parrrate/ruchei/commit/a15a1b7b2d918079f94d0815a6707dfa8b535b53
Film colorization or colourization is the process of adding color to black and white, sepia, or monochrome videos. Using Pixbim Video Colorize AI you can colorize videos using artificial intelligence. Load a black and white video that you want to color and click the start button for colorizing the video.
CeraVe is developed with Dermatologists. Not Michael Cera. Learn more: CeraVe.com/Not-Developed-By-Michael-Cera.
Subscribe to CeraVe: http://bit.ly/SubscribeToCeraVe
Visit CeraVe: http://cerave.com
Follow CeraVe:
https://instagram.com/cerave
https://facebook.com/cerave
https://twitter.com/cerave
The official YouTube channel of CeraVe Skincare
The version I saw cut it down and kept it unironic.
look at #ot2-never-nester’s-nightmare if you can, thank you from the mountain
Like just the first bit.
what an incredible example of "didn't read the docs"
i am losing my balls at this.. dunno if i can use the cable 🤦
am i fucked if i run this like that?
dont worry, thats just 12 years of savings
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
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: ...
That tracks
but you shall remember that custom vendors may do almost whatever they want
so, yes, if there's fancy rgb it might fail
RuntimeError: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
Sup
at least this
maybe not deep enough but still
.realpython classes
Here are the top 5 results:
@dire pebble
@rugged root w3schools -- site to google, copy code and forget
(but that's reference not tutorial)
@rugged root language or what?
mkdocs
?
there is that, mdbook and github book thing
are the certificates from w3schools worth anything
Not really.
__new__ creates an instance, __init__ initialises it
Best ones are from Azure, IBM, Google, and some Microsoft ones.
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__)
in cases when that class can be instantiated
i.e. not an abstract base class
abc should throw in __new__ if cls isn't derived
opencv2
It should anyway I thought
Because not all methods in an ABC would be abc methods
Actually wait
__init__ is called after __new__ not inside
!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())
@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>
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
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.
Writing it here so I can check in a sec. Fortigate 61F
I've only seen this technique used for stateless types that represent some sort of special value (None-like) while inheriting something else
initialising singletons (especially stateful) is generally a non-trivial task
yaml devops
it's not packaged because it can't be
gtg
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)
@upper basin
https://docs.python.org/3/extending/extending.html
Thank you so much.
(about Rust)
I think there was also a list of external tools for extension
sql join on api responses
GitHub flavoured markdown, is there any good solution for embedding snippets from other .md files (in other repos)?
that sounds more like something that some sort of build/ci script does
yep, very sad. i was thinking 3rd party solutions as both github/gitlab don't support this.
I think mdbook supports markdown-to-markdown
with file inclusion
but only local files
i think it would have to be in its current state. it's just not a nice flow having to update every downstream. it would be nice for this to just be a feature of how these files are rendered.
although all renderers would have to support that howver
that's interesting, not seen that one before.
can always include a commons.md 😆