#voice-chat-text-0
1 messages ยท Page 331 of 1
Oh really?
the only time you ever use choice, it comes from choice = input()
instead of the argument
@torpid zephyr @woeful stag ๐
Ok guys I have my code wrokign except for just one issue
@rugged root in APL or in Prolog?
Basically for my class I have to take my list froma text file. It doesnt work when I use the text file but it eorks when i just write out the list
sending the code now
How is the text file formatted?
You'll probably want to look at methods of class str.
Incomplete. Wikipedia has a nice summary of the rules
"significantly advanced"
If you hate yourself, the re module.
Ngl idk what that really means
I thought I could just paste the list into a txt doc
and then take the list from said dox
doc
100 days of code python course ๐
"wait, you don't use re to check if the binary representation of a number is divisible by three?"
!e py print('M*A*S*H'.split('*'))
:white_check_mark: Your 3.12 eval job has completed with return code 0.
['M', 'A', 'S', 'H']
!d str.split
str.split(sep=None, maxsplit=-1)```
Return a list of the words in the string, using *sep* as the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are done (thus, the list will have at most `maxsplit+1` elements). If *maxsplit* is not specified or `-1`, then there is no limit on the number of splits (all possible splits are made).
If *sep* is given, consecutive delimiters are not grouped together and are deemed to delimit empty strings (for example, `'1,,2'.split(',')` returns `['1', '', '2']`). The *sep* argument may consist of multiple characters as a single delimiter (to split with multiple delimiters, use [`re.split()`](https://docs.python.org/3/library/re.html#re.split)). Splitting an empty string with a specified separator returns `['']`.
For example:
feature suggestion for the bot: integrate a thing like the fuck CLI utility to automatically fix !ed code
Like how do I format the list in the text file
funny thing i think 1 of the winners in a pydis code jam i participated in was a copy of the fuck utility but for python
I would expect you don't get to choose how the text is formatted in the file.
!e py print('abcdcba'.strip('a'))
No i mean like
:white_check_mark: Your 3.12 eval job has completed with return code 0.
bcdcb
I want to read the file
You want to figure out if it's a leap year or not by using math and nested if statements
And take from the file the listof names
Is there a specific way i need to format said text file
To turn it into a list
The easiest way would be to have one name per line.
Maybe.
Maybe not.
I would suggest you have a look at the str class and its methods.
I've demonstrated two of them.
Thank you bro
!d str.strip
str.strip([chars])```
Return a copy of the string with the leading and trailing characters removed. The *chars* argument is a string specifying the set of characters to be removed. If omitted or `None`, the *chars* argument defaults to removing whitespace. The *chars* argument is not a prefix or suffix; rather, all combinations of its values are stripped:
```py
>>> ' spacious '.strip()
'spacious'
>>> 'www.example.com'.strip('cmowz.')
'example'
``` The outermost leading and trailing *chars* argument values are stripped from the string. Characters are removed from the leading end until reaching a string character that is not contained in the set of characters in *chars*. A similar action takes place on the trailing end. For example:
@feral warren ๐
hi
@pure gust
a๐b
@fervent obsidian Yo
heyy
@prime coral Yo
sorry can't activate my mic
Yoo
yeah i'm in a public space so i don't i wanna to sorry
Readable though
o/ @midnight agate
๐คฃ for things like unity games depending on how you compile it it just takes 1 or 2 open source programs to get the complete code or assembly for the game
Rust is good for preventing reverse-engineering if you enable all the optimisations
because of how far removed the source code is from reality and how much everything is inlined
does pyarmor still work @rugged root
?
i know but it should be enough for most commercial applications unless your entire thing is client side
also as many generics and as few dyn and fn pointers as possible
fn pointers are dynamic
just as dyn
templates in C++ achieve that effect too
it's just that Rust inlines more aggressively
especially lambdas
not easy
that's why debugging tools for Rust are hard to write too
if you remove debug info, all hope is gone
you can't deobfuscate it
only reverse-engineer
most functions turn into no functions
and same source functions for different types look very differently
has any one used Quart before?
https://github.com/pallets/quart
I've debugged Quart before
haven't used it for my own project
an okay framework
better than Flask
which is a low bar, tbf
I see
Using django rn, looking to create async api endpoints, DRF has no direct support for async need to use ADRF. currently moving forward to django-ninja, have you used that one?
haven't used Django either
currently I have some APIs written using FastAPI or aiohttp.web
ohho okay
I haven't yet found myself a usecase for templating that both Flask/Quart and Django have integrated by default
no usecase for templates?
yes, because I do all the HTML manipulation in the browser
!e
_next_line = iter("""\
1
2
""".splitlines()).__next__
input = lambda *args: (print(*args, end=""), (line := _next_line()), print(line))[1].rstrip()
a = input("enter value: ")
b = input("enter another value: ")
print(a, b)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | enter value: 1
002 | enter another value: 2
003 | 1 2
@rapid chasm
bruh, through APIs naa?
front-end needs interactivity and post-render data fetching anyway
I only use this render template functions while sending emails and for some other tasks, because the front-end things mostly happens in react.js or in any other framework, the API endpoints only what they need!
I've used templates before when was creating personal/college projects.
Huh, I hadn't seen this one before: https://github.com/pallets/itsdangerous
same idea as jwt
Does seem to be something pallets is actively working on
Yesterday I tried to make a pulseaudio plugin with Python and Rust, now I've installed JACK and accepted it's imposssible
jwt is standard
that thing is not
so they have more freedom to innovate
Fair point
@whole bear @undone frost same for Discord
live-reload for yew apps is good enough, in my experience
not that much worse than Next.js
C has compilation caching capabilities, to some extent
and dynamic loading
can anyone tell me .. where i get resources for mulesoft
(so can be live-reloaded, theoretically)
mostly writing Rust lately
(including for the browser)
yes
A framework for creating reliable and efficient web applications.
with
why
Beerhunter was trying to use input() with !e
Heyyy
Thank you

Spotted during the independence day parade. Satire is not yet dead.
Build circuits using a variety of components from different manufacturers, like microcontrollers, memory, logic gates, and LCD screens. Write code in a compact and powerful assembly language where every instruction can be conditionally executed. Read the included manual, which includes over 30 pages of original datasheets, reference guides, and...
$14.99
3256
"What's your favorite algorithm?"
import java.util.ArrayList;
class SleepSort {
public static void main(String[] args) {
ArrayList<Integer> arr = new ArrayList<>();
arr.add(34); // Add elements to the ArrayList
arr.add(23);
arr.add(122);
arr.add(9);
sleepSort(arr); // Call the sleepSort function to sort the ArrayList
}
public static void sleepSort(ArrayList<Integer> arr) {
ArrayList<Thread> threads = new ArrayList<>(); // Create an ArrayList to hold threads
for (int num : arr) {
Thread thread = new Thread(() -> {
try {
Thread.sleep(num); // Sleep for 'num' milliseconds
System.out.print(num + " "); // Print the number after sleeping
} catch (InterruptedException e) {
e.printStackTrace();
}
});
threads.add(thread); // Add the thread to the ArrayList
thread.start(); // Start the thread
}
for (Thread thread : threads) {
try {
thread.join(); // Wait for each thread to finish
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
arr.add(Math.pow(2, Math.pow(2, Math.pow(2, 2))));
rando slid into my linkedin dms. i am starting to think this is a bot, because after explaining thrice that i was laid off it asks me why i am looking for a job
gonna go clean my bike
@ocean scroll Yo
hey, I can't talk yet as I don't have voice verification yet. I need to have 50 messages undeleted before I am able to talk
#Thanks to ConfusedReptile on python discord luvyaman
res = {}
for keys in prod_cart(*distribs):
# calculate the value and the probability attributed to it
val = fn(*keys)
prob = prod(d[k] for d,k in zip(distribs, keys))
res[val] = res.get(val, 0) + prob
return res```
All good! Happy to have folks around. And even if you can't talk, you can chat with us here. If we're in VC we're typically watching the text channel
what time do you guys usually gather in this channel?
whenever we can or want
there's no fixed time
For me usually around this time. I hang out on here while at work, so I'm really just here during the weekdays during work time
I take weekends off to hang out with my wife and to preserve my sanity
cool
are you working on something together? like a project or just hanging out or chillin?
Mostly hanging and chilling
Discussion is usually about Python or programming in general, but all kinds of topics get brought up
i see
Source code: Lib/threading.py
This module constructs higher-level threading interfaces on top of the lower level _thread module.
Changed in version 3.7: This module used to be optional, it is now always available.
I can try. Last time it was still bugged and rerouting to Singapore
Thank you sir.
https://arstechnica.com/information-technology/2023/09/telling-ai-model-to-take-a-deep-breath-causes-math-scores-to-soar-in-study/ Thought this was pretty neat
let's delve deeper into this
yo
@obsidian dragon Suuuuup
hi
idk how to update my bot
I have tried a few things but it seems I dont have enough skill
like this but with fewer steps
I filled one with beer once
https://www.goruck.com/pages/what-is-rucking this is how I use my camelbak
@peak depot 
Alpha-gal syndrome (AGS) is a serious and unusual food allergy to red (mammalian) meat.
Get the album 'higher' NOW at https://michaelbuble.lnk.to/higher
Listen to Feeling Good on the album "It's Time":
michaelbuble.lnk.to/itstime
Directed by Noble Jones
Connect with Michael:
Website: http://www.michaelbuble.com
Facebook: http://www.facebook.com/michaelbuble
Instagram: https://www.instagram.com/michaelbuble/
Twitter: http://ww...

hello
Yo ๐
What're you all up to?
Erm, not much. Just got back from the gym ๐ช
This Jim fellow sounds mighty popular.
I feel that Common Sense would be a much easier read if modern publishers used bold or italics instead of all caps
Back in a bit
What're you referring to sorry?
The book
The one from 1775?
0 or 1?
I'll let you know when I find it
@willow light thats a good way to put it.
Also, sorry i'm still 20~ messages away from being able to speak
I also describe it as "SRE: where being bored out of your skull is a sign you're doing your job well."
did you find it
Guys is there a feature that we can ask a try/exception statement's condition to an if statement?
my_dictionary = {'key': 'value'}
try:
my_dictionary['not a key']
print('A')
except KeyError:
print('B')```
my_dictionary = {'key': 'value'}
if 'not a key' in my_dictionary:
my_dictionary['not a key']
print('A')
else:
print('B')```
The first pattern is called asking forgiveness, and in Python, is generally considered preferable.
The second is asking permission and is often okay, too, but look for cases where you could use try/except.
"It is better to ask forgiveness than permission."
@dire pebble
Asking permission first checks if a given condition exists that would cause an exception going forward.
Then does the thing that could have caused the exception, except it doesn't raise one, because you asked, beforehand.
Asking forgiveness just tries to do the thing and with the except block, goes, "Oh, you tried to do this and this happened? Do this instead."
I can only use try except for the task as I know
What I need is
Having an if statement afterwards that has True if the try statement works
I actually found some way
But I just wanna ensure if there is an even more proper way
Doing only one thing and not doing the rest of after it
So there is a small try except
And there are rest of the code
Rest of the code mustn't work if try statement fails
Let's look at the whole list of things a try stanza can be made of. There are a few.
!d try
8.4. The try statement
The try statement specifies exception handlers and/or cleanup code for a group of statements...
try, except, else, finally
I'm not sure what you mean but okay I'll check it later on
try - exactly one, except, zero or at least one or more depending on what else is present, else - zero or one, finally - zero or one.
try:
'Attempt to do this'
except SomeException:
'If the above-named exception happens, do this.'
except AnotherException:
'Or if this exception happens, do this.'
except (SomeOtherException, ThisException):
'If either of these exceptions happen, do this.'
else:
'If none of the above exceptions happened and the try block completes, do this.'
finally:
'Almost no matter what, even, for example, a return in another block, if the try stanza would otherwise exit, do this beforehand.'```
Won't work.
I'm just testing
!e py '' ** 133
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | '' ** 133
004 | ~~~^^~~~~
005 | TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'
!e ```
print("crazy"*25)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
crazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazycrazy
This is epic
nice
You have to scream it too
!e
print(("crazy"*25).upper())
:white_check_mark: Your 3.12 eval job has completed with return code 0.
CRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZYCRAZY
Or just "CRAZY"
before sets
ppl for a long time used dictionaries as sets to make it look pretties
I suppose I could have used a simpler data structure.
That wouldn't be crazy enough
** is the power operator
I often got confused by using x instead of * to multiply
!e
'''py
print("hello"*12)'''
:warning: Your 3.12 eval job has completed with return code 0.
[No output]
!e
print("hello"*12)```
:white_check_mark: Your 3.12 eval job has completed with return code 0.
hellohellohellohellohellohellohellohellohellohellohellohello
hellohellohello
!e
print(("hello"*12).upper())
:white_check_mark: Your 3.12 eval job has completed with return code 0.
HELLOHELLOHELLOHELLOHELLOHELLOHELLOHELLOHELLOHELLOHELLOHELLO
:white_check_mark: Your 3.12 eval job has completed with return code 0.
12.222
!e
number = "11"
print(int(number) + int(number))
:white_check_mark: Your 3.12 eval job has completed with return code 0.
22
@dusty pine ๐
๐
You seemed to be having an okay stretch for a while.
Yeah, that fucks stuff up.
When I get overtired I get nauseous.
Donner kebab.
Who then?
Not that it matters.
Oh, no. A whole fifteen dollars. The scoundrel.
Odious woman.
I did it
Leave voice and rejoin.
Almost.
Leave voice. Rejoin voice.
Oh. You don't have the role.
Leaving and joining will do nothing.
Oh no...
Oh, not who I thought.
I was thinking Gene Simmons.
@forest river ๐
sorry was my mic loud?
@karmic obsidian Loud and distorted.
my bad sorry
I wanted to say "Hi" to opal
how is life going Opal?
"Take a penny, leave a penny" -life
"Life is unfair" -Life
yeah I could make out he is finnish looking at his tummy
Kalervo Jankolla vaikeat ajat.. Asia kunnossa.
have you ever used pyperclip?
Not that I remember
well do you know how I run sh commands from setup.py file when I am installing a python module
I tried that but it doesn't work when I install the module from pypi
I think it's having a problem when I bundle into wheel or smth
Oh thanks
Not something I do.
I didn't think of that
I'll try os module
but it needs permission when I am running commands to install modules on linux machine
Milien, I'l look.
Hey Milien are you finnish?
not being stereo typical but
a lot of good software have come from finland
@somber heath ๐
Rings can be resized.
Hi friend ๐
I am a software engineer and I make a meager 280k. I deserve more. TC or gtfo. my life sucks
camera work by Rob Racke
โโโโโโโโโโโโโโโ
Sign up here to see me live:
http://eepurl.com/hNiU8v
Follow me on Instagram:
https://www.instagram.com/austinnasso/
My other stuff:
https://direct.me/austinnasso/
#comedy #techbro #software
@sleek shale hi
yes
@sleek shale My mom turn on the light and my computer decided to turn off
sorry
yes
we can hear you
interesting
๐
yes ik
probably when you are making a project, you have to press ctrl + s every now and then because you can lose an hour of project progress
Yeah
thanks
@fallow musk you should type here ig
oh yes sorry
reminds me of high school days
@sacred orbit @zenith fox @livid sundial @river bobcat ๐
๐
yellow
Hello! @somber heath
I've said hello to you before, but never too much ๐๐๐๐
brb
ohhhhh
can i ask any of my python questions fam? if yes WHERE>
@whole bear ๐
@broken reef ๐
i see
this is pretty neat looking
what media player is this? @hasty orbit ?
mediamonkey
hey
the version before they made it sucky tbh lol
yo
never heard of it before
https://www.mediamonkey.com/
https://www.mediamonkey.com/support/knowledge-base/mediamonkey-general/download-mediamonkey/
MediaMonkey is the award-winning media organizer and player for serious collectors. It cleans the mess in your music and video libraries, and lets you share and enjoy them across all your devices.
i want use py for backend web dev so is it gonna be simmilar as php when using server apachee or do i have use other tools
i meant I want to use Python for backend web development. Will it be similar to using PHP with an Apache server, or do I need to use other tools?"
better than Django ?
I want to make a chat application where multiple ppl can chat in a room
which one is best?
given that I would learn that first and then implement it
can u give a small details about each one before i start , i mean only what i need to know for now
yes it s
Opal any opinion Sir?
i've made APIs with flask before. idk what's considered front or backend when it comes to that honestly
Maybe look at Twisted and how other chat apps work.
Maybe start by implementing an irc server.
thanks Opal
!guilds
The communities page on our website contains a number of communities we have partnered with as well as a curated list of other communities relating to programming and technology.
@faint raven https://www.w3schools.com/csS/css_align.asp
@faint raven
@hasty orbit
yes @vernal bridge
Hello, I can't speak I'm not verified
@upbeat bobcat you are active all the time, are you okey ๐
Yes I am ok
i mean its good
ok ๐
yeah
how is life going MTR?
good what about you?
Fine ๐
I would probably talk to you on mic, but I'm not verified to talk yet, and secondly, my English is terrible and I'm learning it
same bro
Where are you from?
Poland, and you?
hello
well I mean I was just looking for some old iOS app archives on archive.org
found some but would like more
okay
@upbeat bobcat I have been in contact with programming for several years, since primary school, but I actually started learning programming seriously about a 2-3 month ago, little by little.
and you if I may ask?
Ok I also start 2-3 months ago
why
i'm just kidding
yeah
hmm
you're right
Hello, by the way
exactly, by the way
now
๐
Good
๐
How are you?
yeah
ohhhhhhh
@stark river
my old game has been released for windows! https://github.com/Spelis/Avoid-That-Spike/releases/tag/win-v.1.0 download here :3
Hoya.
Hiiiii
Hii @somber heath
It's ok @somber heath
I didn't hear what you said.
Or rather I did not understand it for the network jitter.
Ok @somber heath
I have recently installed Ubuntu OS and I have don't install any apt
I have seen E: unable to locate a package
Not all distributions carry all packages by default. What are you after?
I can't understand
@covert sigil ๐
Which package?
ola
I have try to Install docker in my system
Ah. Ask in #tools-and-devops, maybe.
But the system shows the error
Unable to locate package docker
#ot2-never-nesterโs-nightmare
Please read our off-topic etiquette before participating in conversations.
Ok @somber heath thank you ๐
@whole bear ๐
Hiiii
Docker Desktop :skull:
less free
you have to pay at some point
but ig for CLI it doesn't apply
(and neither does it apply for most people)
it's, like,
$15 per employee if you go above $1M in profit or something
docker hub isn't free
I don't remember
docker hub costs I'd expect to be higher
I need to check
private repositories have never been free I think
but that's not as imortant
pull rate is what Enterpriseโข๏ธ will suffer from if they can't be bothered with deploying a mirror
a how many
the entirety of Windows 10 is way smaller than that
"did they decide to put AI models in there"
Microsoft continuing to push forward Linux's popularity
correction: revenue
@rugged root HI
I never did chem, but we sometimes got to watch the chem demos.
Exploding balloons, etc. There was a story about sodium.
Scorch marks on the ceiling pointed to.
Abby, nothing good.
This meal has no capsicum. I tell no lie.
I'll get around to it.
The Minecraft modpack?
In Victor Borge's inflationary language, it would be called threebing.
Victor Borge. Pianist, comedian.
Did standup.
Dead.
But for some time, so it's okay.
Morgue or less.
Is that "If Google was a guy?" playing?
Fucking love those vids
hii
welcome 
https://www.reddit.com/r/UsbCHardware/comments/cc625p/are_usbc_ports_more_expensive_to_implement_or/
15 votes, 29 comments. 28K subscribers in the UsbCHardware community. A subreddit dedicated to everything USB-C
when is the server most active?
from what ive seen, M-F (surely weekends too though) usually between 8AM-5PM EST
usually in a few hours it dies down a little
btw bro whats ur username means?
i can ask you the same question 
that is shortform of my name
Admin or subtractmin? You decide!
guys u all r in college or jobs?
think people's experience range
btw i will be joining college this year :)
there are people just starting, people in school, people who've been in tech for 10+ years
!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.
Are you getting an error while inserting records?
the code is working fine for me after adding comma
cursor.execute("""INSERT INTO users(username, password, name, age, email) VALUES
('user1', 'pass123', 'Mike smith', 35, 'mike@example.com'),
('user2', 'pass456', 'Bob woods', 50, 'bob@example.com'),
('user3', 'pass789', 'sara winter', 40, 'sara@example.com')
""")
i have already added coma
It's not in this code
the comma
i updated the one on my main file on my laptop not on the paste bin
pycharm IDE has databse tools as well where you can browse tables
@vale plank install the DB browser and then open the sqlite database
You will see the tab browse data when you open the database then select the table, you may able to see the records are there or not
guys watch out for this
you can just do this
on discord
make the dismiss message link lead to wherever
you might need nitro for the emoji
eye emoji
wtf is this about
scams
@vale plank bro, is the program working fine or are you still facing any error? (sorry if it was resolved I wasn't here for a while)
nah still not working
tbh i just downloaded db browser
what problem you're facing right now?
i took a nap and woke up recently
okay, so just share the issue or error you're facing, otherwise nobody can help without knowing the cause of issue.
share the updated code or the code as it in the local system
@vale plank update the insert query as shown in that message
Hello Pythoners
Is there a way to share screen? I swear i've seen in this discord, but i could be mistaken
you need a mod to grant you temporary access
yo
yo
i no longer want to be on this side
that would make the days almost twice as long
which wouldnt work with the sun rotation
u wanna modify our trajectory to the sun?
good lord
60 minute hours not 100
and 11:59 pm -> 12:00 pm
bro how you say your name
ask ya mother
is it like sarah-ti
no
sahrahti?
sah-rahti
where's that name from?
why
damn ok
are you not used to talking to people or something
bro i was talking to sarati
yo tmi
bullshit
bro it's just everyone v sarati ๐
none of u should be labeled as correct
let the truth be known unto u
i agree with the 24 hour time period
definetly
@rugged root Hi! So, I've been a part of this server for 4+ days now and I think that I've sent 50+ messages too... How long do I have to wait to speak in the VC?
I can speak now, lol. I didn't verify myself ig
@rugged root Great wbu?
@solemn saddle If you're wondering why you can't talk, check the #voice-verification channel. That'll tell you what you need to know about the voice gate
@rugged root Didn't I hear what you said?
Oh I was wondering if you were working on anything in particular
Sorry, still morning deep voice and I'm mumbling
I am working on this danzin https://github.com/PyCQA/isort/issues/2250 and now he is gone
Hello, In my repository: https://github.com/LLyaudet/python-repeatable-iterable/blob/main/src/python_repeatable_iterable/__init__.py I have the following imports: from typing import Iterable, Itera...
Yes, we are talking in dm because I am new so he is teaching me
oops wrong chat
from __future__ import absolute_import
import os
import sys
from third_party import (lib1, lib2, lib3, lib4, lib5, lib6, lib7, lib8,
lib9, lib10, lib11, lib12, lib13, lib14, lib15)
from my_lib import Object, Object2, Object3
print("Hey")
print("yo")
I fixed it but we were testing it
@upper basin Stupid isn't the word to describe what you do.
You're doing some very involved stuff.
You have some Python stuff to learn? So what? So do we all.
Most of what you do is so over my head, I'm just...
...whenever I look at it.
It intimidates me.
Same. I have to look it in small bits for me to be helpful
You're too kind.
hello
Hello
@hazy geode ๐
Hello
Too late. Saw it. No take backsies. ๐
I'm from Brazil lol
Australia.
@whole bear ๐
Google didn't put its pants on, thismorning.
I have basic level in English hahaha
Not a problem. ๐
Yes.
Hemlock is hiking.
Somehow, his workplace has mountains, so maybe he's hiking up and down the mountains of paperwork.
@rugged root Pills.
Whenever someone mentions pills I just think of Left 4 Dead 2
Watch it. Roses can thrive with pruning.
Epson POS and Discproducer Products Technical Information
@zinc halo ๐
@zinc halo If you're wondering why you can't talk, check the #voice-verification channel. That'll tell you what you need to know about the voice gate
nah i'll just lurk
why is your avatar moving
Too much caffeine
def collection():
pass```
I mean, I suppose it has members.
Attributes, etc
That's a collection, right?
Hallway?
@tawdry mica yo
Fallout, the game of estrangement.
@quartz beacon I Know some Dutch bro. Hallo Broer
I'm here.
I just have to unlock my phone to start typing.
Unless I pin Discord.
As to the question, not catastrophic.
All times are bad times, but not all bad times are catastrophes.
Sometimes, there is cake.
We have a few jokes about Tasmania and New Zealand, but it's more good-natured ribbing.
New from from Ready at Dawn, Lone Echo is a high-fidelity, pulse-pounding space saga for Touch!
For more about Ready at Dawn visit:
http://www.readyatdawn.com/
https://www.facebook.com/ReadyAtDawnStudios
https://twitter.com/RAD_Studios
https://www.instagram.com/ReadyAtDawnStudios/
https://www.youtube.com/user/ReadyAtDawnStudios
Official Oculu...
my internet suck here, see u later
Buy now!
Quest 2: https://metaque.st/3ro8eoX
Rift: https://metaque.st/3C2hMur
Suspected of sรฉancing with an unknown power, you are on trial. During your execution you are called to action. Escaping death you descend into an unknown underworld lab. A series of preparatory challenges await you, but for what? Will you transcend them and discover ...
Available now on Steam! https://store.steampowered.com/app/823500/BONEWORKS/
Boneworks is an experimental VR physics action adventure game. Witness the events that unravel after Monogonโs MythOS locks down after an unexpected Void breach. Then, play for endless hours with a physics sandbox mode, battle arena, and story replays for additional po...
Whoever said PHD Flopper, you're weird.
You're planning for a project to start 10 years from now?
Not even end in 10 years?
next time its 5 months
PATREON: https://www.patreon.com/jdah
TWITTER: https://twitter.com/jdah__
DOOM RENDERER CODE: https://github.com/jdah/doomenstein-3d
GITHUB: https://github.com/jdah
EDITOR: NeoVim
CONFIGS: https://github.com/jdah/dotfiles
THEME: gruvbox
RESOURCES:
- https://learnopengl.com
- DOOM Game Engine Black Book: https://fabien...
Soldat, the most popular unique 2D side-view multiplayer action game
@whole bear ๐
Hey guys I'm new to python and I'm trying to learn it
recently learnt how to calculate compound interest in maths and wanted to make a program for it
amount = (P (1 + R/N) ^ (N * T))
TypeError: 'int' object is not callable
I'm getting this
I'm trying to google solutions to this error but I don't get the explanations
can somebody help?
!e py print("Jikky")
:white_check_mark: Your 3.12 eval job has completed with return code 0.
Jikky
it means an integer object cannot be called (executed) int x x() โ
I'd hate to sound really stupid right now
but if I assigned a number to a variable
can't I use the variable?
you cannot call it
int x = 4
x()
โ
so the problem is me assigning the number to the variable?
no . the problem is in calling it
how else am I supposed to put it in the code?
sorry if my texting tone sounds aggressive lmao
I'm just like
super confused
f(X)
P*(...
You know I am doing this for like no reason anyways
like I have a presentation for maths tomorrow about compound interest to my maths professor
and I'm also learning python rn so I thought why not it would be cool to make
but you know
practice
practice is kewlll
amount = P * (1 + R/N) ^ (N * T)
TypeError: unsupported operand type(s) for ^: 'float' and 'int'
oh my God bro now what
im sorry what
no
oh
^ โ
** โ
HOLY
OH MY GOD
IT WORKED
IT WORKEDDDDDDDD
YESSSSSSS
I love you guys
๐จโโค๏ธโ๐โ๐จ
caret
โค๏ธ
wait btw
U could use it to do a table of like 10M calculations
Then ur actually using ur pc power lol
iirc python has something like round(....?
!doc round
round(number, ndigits=None)```
Return *number* rounded to *ndigits* precision after the decimal point. If *ndigits* is omitted or is `None`, it returns the nearest integer to its input.
For the built-in types supporting [`round()`](https://docs.python.org/3/library/functions.html#round), values are rounded to the closest multiple of 10 to the power minus *ndigits*; if two multiples are equally close, rounding is done toward the even choice (so, for example, both `round(0.5)` and `round(-0.5)` are `0`, and `round(1.5)` is `2`). Any integer value is valid for *ndigits* (positive, zero, or negative). The return value is an integer if *ndigits* is omitted or `None`. Otherwise, the return value has the same type as *number*.
For a general Python object `number`, `round` delegates to `number.__round__`.
idk what you guys are saying but fallout new vegas is peak
Yeah u just say how many decimals to round to
new vegas my beloved
nnice
I really appreciate the help guys
!e py x = round(5.4738284, 3) print(x)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
5.474
hi , i have a problem when i added created at in model django , i use api : class Product(models.Model):
name = models.CharField(max_length=255)
image_url = models.URLField(max_length=200, blank=True, null=True)
price = models.DecimalField(max_digits=10, decimal_places=2)
original_price = models.DecimalField(max_digits=10, decimal_places=2, blank=True, null=True)
description = models.TextField(blank=True, null=True)
stock_status = models.CharField(max_length=50, choices=(('in_stock', 'In Stock'), ('out_of_stock', 'Out of Stock')))
color = models.CharField(max_length=50)
category = models.CharField(max_length=50, choices=CATEGORY_CHOICES)
tags = models.CharField(max_length=255, help_text="Create up to three tags about your product")
rating = models.FloatField(default=3)
video_url = models.URLField()
created_at = models.DateTimeField(auto_now_add=True)
@property
def descount(self):
if self.original_price > self.price :
descount = ((self.original_price - self.price) / self.original_price) * 100
return descount
def str(self):
return str(f"{self.name} : {self.created_at}")
value = self.get_prep_value(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\projects\Ecommerce\env\Lib\site-packages\django\db\models\fields_init_.py", line 1649, in get_prep_value
value = super().get_prep_value(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\projects\Ecommerce\env\Lib\site-packages\django\db\models\fields_init_.py", line 1525, in get_prep_value
return self.to_python(value)
^^^^^^^^^^^^^^^^^^^^^
File "C:\projects\Ecommerce\env\Lib\site-packages\django\db\models\fields_init_.py", line 1610, in to_python
parsed = parse_datetime(value)
^^^^^^^^^^^^^^^^^^^^^
File "C:\projects\Ecommerce\env\Lib\site-packages\django\utils\dateparse.py", line 114, in parse_datetime
return datetime.datetime.fromisoformat(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: fromisoformat: argument must be str
Yo ๐
```
!code
@stuck furnace Greetings!
LX, sorry to bother, could I borrow you for a few moments please?
my guess is you are casting date time data type to str?
or not casting
either way it is complaining
Parsing?
idk .. i just glanced
ain?
class Product(models.Model):
name = models.CharField(max_length=255)
image_url = models.URLField(max_length=200, blank=True, null=True)
price = models.DecimalField(max_digits=10, decimal_places=2)
original_price = models.DecimalField(max_digits=10, decimal_places=2, blank=True, null=True)
description = models.TextField(blank=True, null=True)
stock_status = models.CharField(max_length=50, choices=(('in_stock', 'In Stock'), ('out_of_stock', 'Out of Stock')))
color = models.CharField(max_length=50)
category = models.CharField(max_length=50, choices=CATEGORY_CHOICES)
tags = models.CharField(max_length=255, help_text="Create up to three tags about your product")
rating = models.FloatField(default=3)
video_url = models.URLField()
created_at = models.DateTimeField(auto_now_add=True)
@property
def descount(self):
if self.original_price > self.price :
descount = ((self.original_price - self.price) / self.original_price) * 100
return descount
def __str__(self):
return str(f"{self.name} : {self.created_at}")
ain is also a letter in arabic
some langs parse date time as str .. others don't
Yeah sure!
๏ป
รฉรฉn
This letter specifically
Thank you so much. Can we move to vc1?
HEY CROW
OMG HI
WHAT'S UP
reading a random gc
gc?
group chat
Oh ok
They are spazzing in here and coding in other channel
And here I am stuck in the middle with you
Probably not these ones
We could go to private server
programming purgatory @rugged root
I probably won't be much help but ยฏ_(ใ)_/ยฏ
I learned about RL like 12 years ago lol
I do know about Q-values etc.
Brb while I dust off my old textbook
wait can yall listen to my device audio
No
I can't hear any sound right now so I guess not
We can not listen to you
I'm a big fan of this book: https://aima.cs.berkeley.edu/
Erm, so what did you need help with understanding?
Can you paste the link here?
I'm not sure what you mean about an initial random move?
๐
Oh, I think that's just badly worded.
They mean the action passed into the function. @frozen owl
They don't mean that the first action is random
Actually, reading it I am a bit confused.
Ohh right, they mean that the Q function will tell you the value of the state-action pair for any state and action, but the action doesn't have to come from the policy.
Sorry yeah, I get what they're saying now.
But the Q-value is calculated assuming that you take the actions prescribed by the policy from that point onwards @frozen owl
sorry man wifi died
Even if your policy is to take certain actions in certain states, it's still useful to be able to talk about "what would the expected future rewards be under this policy if I took a differnt action that the one given by the policy in a given state".
Working ๐
I am not sure of what "optimal policy" is defined as, because in theory the optimal policy would give the probabilities as:
pi(s,a) = [1.0, 0.0, 0.0, 0.0, ...]
As the optimal policy would be able to pinpoint definitively which action is the most superior.
Would this be the definition of "optimal policy" or does policy involve strategy, where epsilon would be involved to make exploratory moves, even though the policy itself is already optimal?
The optimal policy is the one that maximises expected discounted future rewards I think.
A policy is just a mapping from states to actions.
You're cutting in and out a bit sorry!
@frozen owl you voice is so lagge you should type
policy (stochastic) - pi
optimal stochastic policy - pi*
sorry, shit wifi as i had previously described (if you could hear that)
or am i wrong
im not sure what is meant by "optimal policy"
Yep I can hear you now
yes
sorry im not sure if you can hear but a dog is barking like shit
(im now in ground floor)
so wifi should be better
we cannot hear him
good
The optimal policy is more theoretical than that. It's a hypothetical function that maps each state to the best action you can take in that state. When you're doing Q-learning with neural nets or whatever, you're trying to estimate that function.
(shit my brother is disturbing me rn, not sure if you can hear him)
shouldve stayed in the attic
Nope
So, it's like, let's assume we've solved the problem of finding the optimal policy (i.e. the policy that gives us the best value starting from any state), then V*(s) is the expected value of discounted future rewards starting in state s and following that policy.
Yeah
Have you learned about MDPs? (Markov Decision Processes) They're mentioned at the bottom of the article.
waht does that have to do with anything
or at kleast my question rn
lololololol my stuppod
SHIT THE DOG IS BARKING AGAIN
Your Mic is so good
ty
airpods pro gen 2 with active noise cancelling and voice isolation
with noise suppression
We can hear you only
that's why
the dog is barking?
Discord's own background noise thing is pretty good
He turned off both
now on again
this
It just means the maximum over all policies I think
policy = random.init()
best_policy = None
best_value = None
best_value_result = 0
best_policy_result = 0
value = random.init()
loop {
result_p, result_v = step(policy, value)
if result_p > best_policy_result {
best_policy = policy
}
if result_v > best_policy_result {
best_value = value
}
}
The optimal policy I think is defined by the Bellman equations.
THIS
I think the value of a state under the optimal policy is the same as the one you get by solving the bellman equations.
Yeah not too bad
The Bellman equations are essentially a load of simultaneous equations, one for each possible state. There are various ways you could solve those equations, but what matters is that they have a solution. If you hypothetically had the solution to those equations, you could then get the optimal policy by going one step forward. At least I think that's how it works.
this????????????????????????
With an MDP, you have two things:
- a transition model that tells you how likely you are to end up in different states by taking different actions from a state: P(s' | s, a)
- a reward function that tells you how much reward you get for making a given transition: R(s, a, s')
U(state) = max(
sum(
probability(state, action, new_state) * (
reward(state, action, new_state) + gamma * U(new_state)
)
for new_state in states
)
for action in actions(state)
)
``` ^ Those are the Bellman equations (there's one for each state).
utility function?
Yeah, that's the utility of a state in an MDP.
Notice that it doesn't depend on a policy, because it defines the optimal policy.
Possibly, I'm not sure sorry
But my point is that you can get the optimal policy given U(s) (you need to also know the transition and reward functions): ```py
def pi_star(state):
def Q_value(action):
return sum(
probability(state, action, new_state) * (
reward(state, sction, new_state) + gamma * U(s)
)
for new_state in states
)
return max(actions(state), key=Q_value)
When talking about MDPs, U(s) is the expected discounted future rewards starting from state s under the optimal policy.
U(s,a) = Q*(s,a)??????????????????????????
Nah, U(s) = V*(s) (I believe)
I watched some really good lectures about a decade ago on this ๐
im impressed by your memory
If I remember, the innovation of Q-learning is that by learning Q*(s, a) directly, you don't need to also know what the transition and reward functions are to derive the policy.
If you know Q*(s, a) then yeah getting the optimum action in state s is just a matter of taking the argmax over all actions.
I actually gotta go ๐
seeya
cya
from hangman_data import hangman_ascii, words
from os import system, name
from random import choice
def clear_screen():
system("cls" if name == "nt" else "clear")
def one_char(user_input):
return len(user_input) == 1
def hangman(user_name):
hangman_status = 0
word = choice(words).lower()
answer = ["_"] * len(word)
validation = f"Welcome {user_name} to my little game!"
while hangman_status < 6:
clear_screen()
print(">> H A N G M A N - T E R M I N A L <<")
print(hangman_ascii[hangman_status] + f"lives left: {6 - hangman_status}!\n")
print(" ".join(answer))
if word == "".join(answer).lower():
print("\n\n>> You won!")
break
guess = input(f"\n\n{validation}\n>> Guess any character: ").lower()
while not one_char(guess):
guess = input(">> Please enter a single character to continue: ").lower()
if guess in word:
for i, char in enumerate(word):
if char == guess:
answer[i] = guess.upper()
validation = f">> You were right! Found '{guess}' in the word!"
else:
hangman_status += 1
validation = f">> You were wrong! Couldn't find any '{guess}' in the word!"
else:
clear_screen()
print(hangman_ascii[hangman_status] + f"lives left: {6 - hangman_status}!\n")
print(" ".join(answer))
print(f"\n\n>> You lost! The word was {word.upper()}!")
def main():
hangman("")
while True:
player = input(">> Do you want to play again? [Y/N] ").lower()
if player == "y":
hangman("back, ")
elif player == "n":
print(">> Bye!")
break
else:
print(">> Please only enter Y or N to continue:")
if __name__ == "__main__":
main()
how can I change it to a class
โGirls get flowers when they cry, guys gets flowers when they dieโ
hello
what about when they marry
Into half grave
am at work
@stark river Why it is not downloading package?
Oh Thanks but the problem is solved
Chatterbot
Neat
yes


Quoth the raven, don't use w3schools.
Rap tap tapping on heaven's door.
I've known a few Jacks.
Quite a few of them were royals.
"A few keystrokes here will save a few keystrokes here."
I'm making a project from a YouTube video, it's a data analysis project
Can someone tell me if it's good video
In this video kaggle grandmaster Rob Mulla takes you through an economic data analysis project with python pandas. We walk through the process of pulling down the data for different economic indicators, cleaning and joining the data. Using the Fred api you can pull up to date data and compare, analyze and explore.
Copy and edit the notebook fro...
This one
Also I wanted to know how does it works i mean
#data-science-and-ml Might know better
Ok
Unfortunately I don't know much about data analysis other than the loose concepts and how to do some of it in Excel
Ok np
@nimble kernel Yo
This is math servicing music.
@gleaming locust Yo
So, math.
@steep vortex The name sounds like it could attract unwanted attention.
hi
@meager mango Not you.