#voice-chat-text-0
1 messages Β· Page 197 of 1
(or upwards here)
too lazy to turn it
basically, each edge says "a node comes before another node"
and sorting linearizes nodes such that each of those constraints holds true
!d graphlib.CycleError
exception graphlib.CycleError```
Subclass of [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) raised by [`TopologicalSorter.prepare()`](https://docs.python.org/3/library/graphlib.html#graphlib.TopologicalSorter.prepare) if cycles exist in the working graph. If multiple cycles exist, only one undefined choice among them will be reported and included in the exception.
The detected cycle can be accessed via the second element in the [`args`](https://docs.python.org/3/library/exceptions.html#BaseException.args) attribute of the exception instance and consists in a list of nodes, such that each node is, in the graph, an immediate predecessor of the next node in the list. In the reported list, the first and the last node will be the same, to make it clear that it is cyclic.
it will go as far as it can without an error (static_order method returns a lazy generator)
ad hoc polymorphism?
the C++/Java/C#-style of type-based dispatch during compilation
choosing a function/method among those with the same name based on the type of the argument
(what Rust doesn't allow to do)
No it was just a random name... I didn't have anything in my mind...
It was just a personal project
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Hello
hellloo
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@gusty pendant π
hello people
helloo all
@outer ibex π
π
@gloomy kernelπ
Nope.
ye
hard
from ur perspective what should be the solution to all this mess?
two state or one state?
I m just asking out of curiosity tho
get gaza under israel rule and delte the islamic jihad hamas from the face of the earth
one state
but it is only because we presented 6 times two state solutions for them but they reject each one
oh I see....
what about west bank?
have that also under israeli control?
most of the west bank under israeli contorl thank god but still generates a lot of terror attacks on israeli civillians
I see
but tbh honest looking at the demographics
i don't think israel would ever get all that region under control
I mean it can easily but It would never want to
but the idf is getting ready with tanks and soldiers all over its borders it called the reserves wich mean my uncles are getting drafted
Oh I get it... I thought that's kind of military term that is used in israel
I thought you like 22
we try but they attack
lmao
lmfao
Nobody is too young for war. Even the unborn shoulder their share.
yeah agreed
great that you here @somber heath
i have been through contless wars
I'm categorically not here.
btw I read some where that there are lot of bunkers in israel... I wonder how good they are
when something like this happens
how do you text then?
It's extremely complicated.
its the hardest one yet they invaded isral there are vids of the terorrists going through israli citys killing people and gettin hold of a police station they ran away and hide in the city so there are footages of the idf tanks rolling down the streets
atleast 600 dead
and 2000 injured the death toll will surlly go up sadly
btw @somber heath I wanna ask you smth
are you working ?
or studying?
and more than a hundred people are kidnapped (children, families and the elderly):/
ye but not confirmed numbers
I saw some videos ....
they para glided with some motor engines ig
That's not a subject up for discussion.
I just wanna know that do you have real world experience working with python?
I want a suggestion from you
i saw pics of the bodies on the streets and vids of the terorrists nocking on doors impersonating idf soldiers and holding ak 47 and rpg
I am trying to build a time tracking tool for managers in large organisations to track basic activity of employees like login and logouts ...
I am thinking of using python and sql ...
you think I can do that?
I describe myself as a hobbyist.
you think it's feasable to choose python and sql only?? or what should be using to build this thing?
then what is ur expertise in?
Employee performance is quantum.
Kind of.
If you try to overengineer performance metrics, you'll impact morale and thus performance.
In trying to measure something, you can alter it.
I don't have permission to speak in Voice Chat 0
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!voice
How would you measure the performance of a programmer?
I am in college brother ... I am studying computer science...I am thinking of doing this as a personal project
by looking at the time complexity and space complextiy of the code he/she writes in everyday to day job
Interesting answer.
that's what I would do
soldiers getting sent to the front
but I don't think managers would care about that
π’
idk if this is an easy to define metric tho
I mean u would need like an actuary to be looking over all the submitted code to determine the complexity
and idk I feel a lot of the actual good developer comes from communication with the team and clearly documenting too
bc if nobody can understand ur code I mean good job security ig
but also useless if u leave
I can't talk right now, but I know a very good udemy course
https://www.udemy.com/course/python3-fundamentals/
he is a really good teacher
daddy admin please give me streaming power! power-up noise haaaaargh!!
i agree with opalmist, but i'd like to try and answer, coz its for learning purpose and i believe managers know not to do this with programmers . From my little knowledge in python.
way 1 : I wud deploy a django application on Nginx with uWSGI. Using django u can build and host any service as a website. Will use postgress as a database connected to django, coz its free. U can deploy this in a docker container and host it in heroku or any cloud service.
way2 : u can build an application monitoring library using python. Make the client install it , set it to start and run in the background whenever the machine reboots. Beam back the collected metrics to your backend server django or a cloud service like aws where u can analyse the metrics to derive insights.
requires learning about networking stuffs like sockets , ip , subnets , vpc etc , some django, fastapi , autowrapt bootstrap lib to monkey patch monitoring code , setup tools lib to package ur application monitoring library , lil nginx , docker and any cloud service .
@torn plinth π
@somber heath i gotta type 50 messages to talk?
um
fair enough
how
should
i
speed this
up
verification speedrun?
totally wont...
well
Oh thast good then
Alright
wait
when I verify can I share screen?
womp
I wanted to ask but how I get my decimals to round to like idk the hundredths rather than idk like tenth*
that is not good
we can't have nice things womp womp
!d 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__`.
!f-string
Creating a Python string with your variables using the + operator can be difficult to write and read. F-strings (format-strings) make it easy to insert values into a string. If you put an f in front of the first quote, you can then put Python expressions between curly braces in the string.
>>> snake = "pythons"
>>> number = 21
>>> f"There are {number * 2} {snake} on the plane."
"There are 42 pythons on the plane."
Note that even when you include an expression that isn't a string, like number * 2, Python will convert it to a string for you.
!d str.format
str.format(*args, **kwargs)```
Perform a string formatting operation. The string on which this method is called can contain literal text or replacement fields delimited by braces `{}`. Each replacement field contains either the numeric index of a positional argument, or the name of a keyword argument. Returns a copy of the string where each replacement field is replaced with the string value of the corresponding argument.
```py
>>> "The sum of 1 + 2 is {0}".format(1+2)
'The sum of 1 + 2 is 3'
``` See [Format String Syntax](https://docs.python.org/3/library/string.html#formatstrings) for a description of the various formatting options that can be specified in format strings.
!code
!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.
so basically (code in here)
ok so I dont know if my professor wants me to keep the decimals from rounding or not but in the example he has decimals not round and I wanna play it safe as python auto rounds or at least in the website im using
like a what
ninja?
OHHHH
I hate them bc they seem to like me a lot and they get my blood a lot
Im one requirement off
the 10 block sum sum
how long you been coding
how many languages you learning
!e py v = 0.123456789 print(v) print(f'The number is {v:.3f}. Bye.') print(f'The number is {v:.2f}. Bye.') print(f'The number is {v:.1f}. Bye.')
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 0.123456789
002 | The number is 0.123. Bye.
003 | The number is 0.12. Bye.
004 | The number is 0.1. Bye.
or have learnee
learned*
alright but what is python is good at. I heard finance
Yeah I want to know a little bit of coding even though my major might not completely need it
I heard Python was pretty easy to learn and I thought if it was it was probably gonna help when I might translate to other languages
womp
Dw dw
whats with excel and python
it looks like it being hyped
Organisms = int(input("Starting number of organisms:"))
Rate = float(input("Average daily increase (as a percent. Ex: 20 = 20%):"))
print("Day Approximate".ljust(15), "Population".ljust(20))
print("===================================")
DayApproximate = 1
while DayApproximate <= Days:
Population = Organisms * (1 + (Rate*.01)) ** DayApproximate
print(str(DayApproximate).ljust(15), str(round(Population, 2)).ljust(20))
DayApproximate += 1```
guys why this not work :(
def say(s):
print('fish')
person.say('hello!', 123)
if True:
for _ in range(a bajillion):
pass
!e ```py
def say(s):
print(s)
say(123)
say(456, 789)```
@somber heath :x: Your 3.12 eval job has completed with return code 1.
001 | 123
002 | Traceback (most recent call last):
003 | File "/home/main.py", line 5, in <module>
004 | say(456, 789)
005 | TypeError: say() takes 1 positional argument but 2 were given
The say function here has only one parameter, unlike print, which takes an arbitrary number of positional parameters.
!e ```py
def func(*args):
print(args)
func(1)
func(1, 2)
func(1, 2, 3)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | (1,)
002 | (1, 2)
003 | (1, 2, 3)
In this fashion.
!e ```py
class MyClass:
def my_method(self, arg):
print(arg)
instance = MyClass()
instance.my_method(123)```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
123
!e py print('A') for _ in range(5): print('B') print('C')
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | A
002 | B
003 | B
004 | B
005 | B
006 | B
007 | C
π
@outer badger π
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
yeah i see
I was trying to make something with Python+JS ~5 hours ago
it was so difficult I decided to sleep instead
thanks
I'll probably just not attempt it again for some time
I need to write some code that does YAML -> XLSX/ODT
and it's so boring that I can't get myself to do it
I can also justify why I have to write it.. LibreOffice as mature as it may be, after 3000 rows starts getting super-slow.
I mean it already is slow for a few hundred rows. I also don't understand why it's slower on Slackware than it was on Debian.
All these questions I'm asking myself. Of course I could just put it on Google Docs instead but..
To be honest I've even looked at https://www.visidata.org/ but Visidata is also slightly slow, and I have to learn how to use it
which I haven't because I haven't yet allocated time for that.
@haughty fog π
I've also noticed I cling to offline software. Like there's something in the back of my mind saying "Don't trust the cloud too much".
Maybe I'm getting super-old idk..
is it getting slow only for full-table actions? or for localised changes too?
even localized changes, like I sometimes have to insert a row, and I do insert an empty row, and then I have to edit cells and already things start to go haywire, many time it froze on me had to restart it
But I mean, if Visidata can handle this table (yes with less features but still a fully capable text spreadsheet editor).. and Visidata is Python which is slow compared to Java, like.. how is t possible that Libreoffice is so slow when it's a mix of Java and C++ under the hood.
And they had sooo much time to weed out bugs.
I wonder how well this handles editing
https://github.com/CollaboraOnline/online
so far didn't crash
but that one doesn't include functions and stuff
(the table)
I might've broken it
A-ha !
it's loading gradually
but their UI was snappy?
(because it just updated 60K cells)
it's still rendering
calculation was basically instant, but graphics are struggling
right, same feeling here, something to do with the UI
!e
from math import comb
print(float(comb(5011,4999)))
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
5.164536903979932e+35
seems correct
it crashed and lost all data
(likely doesn't auto-save)
Excel's response to trying to open the file
Christ, we have no viable spreadsheet solution in 2023, we're F-ed
@vocal basin but it is somewhat worrying that in order to insert a row in the middle of a large table, all other cells need to be pushed down?
there must be a data structure or some physical layout to hold the rows that doesn't require pushing all rows down like that..
it reminds me of the Rope data structure compared to the regular String data structure.
a Rope can have fast inserts no matter how long the string is.
general "it just works" data structure for that would be a tree
but moving everything is often faster than the clever approach
(especially if the table is represented as a list of pointers to rows)
something like this would still require recomputing the whole table if first cell changed
I guess spreadsheet software on the inside does some graph-based logic to determine what and when to update
rope/cord is a tree too
this being because of fewer separate memory operations
same reason why b-trees are chosen over avl
Indeed it does.
!voice
!d graphlib
Source code: Lib/graphlib.py
not sure if this can be made to work for evaluation graphs
@whole bear you have 19 views on that piano video, are you an influencer?
more intended for semi-static context
no
it's not me
I like this music
THat person is not me
wow
so many people

How can I check How many messgs do i need to cmplete the criteria for voice verification?
#voice-verification has criteria described
!user command in #bot-commands shows how many messages the bot thinks you've sent
thanks bro
I wonder if this can be combined with B-Tree-related ideas
https://en.wikipedia.org/wiki/Rope_(data_structure)
(for storing a singular mutable text, not functional-style immutable strings with reference-counted nodes)
hey @loud anvil thanks bruv...
I guess the second way is more suitable to me coz I have some experience in building python libraries from scrath....
so thanks man
appreciate it
hey @somber heath I can talk now...
big moment for me lol
Provided to YouTube by CDBaby
Cows With Guns Β· Dana Lyons
Cows With Guns
β 1996 Dana Lyons
β 1996 Lyons Brothers Music BMI
Released on: 1996-01-01
Auto-generated by YouTube.
@trim night π
Provided to YouTube by CDBaby
EnchantΓ© Β· Dirt Poor Robins
Queen of the Night
β 2022 Neil Degraide
Released on: 2022-11-15
Auto-generated by YouTube.
opal I like your music taste, do you have any ymusic playlist?
Yesno.
Another band you can look up is Fish in a Birdcage.
yea that one was lit, I listened to it last time, when you shared it
Provided to YouTube by TuneCore
Passing Through (Can't the Future Just Wait) Β· Kaden MacKay
Passing Through (Can't the Future Just Wait)
β 2021 Kaden MacKay
Released on: 2021-12-11
Auto-generated by YouTube.
this one was recomended right after listening to one of the songs you had shared...
the lyrics are perfectly relatable to me right now
Hey @desert wolf π
ah alright
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
this one?
bye~
It wasn't obnoxious aside from being next to entirely unintelligible.
Hey @warped raft π
Good thanks, how about you?
doing good just submitted the anchoring script
man it was a fking long job
and tedious too
Did you make it funny?
i would rather say no
after all it is a formal event
formal events can have humour
hmmm
my didn't let's se if it make its to the podium or it is modififed from head to tale
though it had a very nice quote
What was it for again?
@idle monolith π
WE DACNE FOR HAPPINESS
WE DANCE FOR TEARS
WE DANCE FOR MADNESS
WE DANCE FOR FEARS
WE DANCE FOR HOPES
WE DANCE FOR SCREAMS
WE ARE DANCERS
WE CREATE DREAMS
annual day
it is an annual event in a school' calendar
where there are various dances,acts,songs,speeches etc.
Awesome. Sounds fun
Looks great for dancing
π
hey hi @empty leaf
hello @karmic obsidian
@tiny mortar π
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!voice
hiii
yesss
go put that in the bot
hey hi @uncut galleon
@uncut galleon π
Hello
@hybrid flax π
finding ways
ah ok, just read the rules, i have to write at least 50 messages before talking in VS, right ?
makes sense
@whole bear π
hello do you know what does dance means in " can urban engineers learn from dance"?
this is the full context
hey @somber heath you know what this pycache file mean?
I run some scripts and that is created in a dir but sometimes when I am running simple script it's not created?
you know why is there a inconsistency there?
please help me. i asked google and dictionaries but
I've never heard of that phrase
π
This reads like ChatGPT outputβ¦
Someone was writing to a word count requirement.
what?
oh, it is ielts cambridge test
cam 15 pags 37
I think that, if the author is a person, that person needs to look up the meaning of the word brevity.
.wa s define brevity
the use of brief expressions
@somber heath i think may be it really meant

the act of moving rhythmically to music
just the normal definition
as you'll also see if you read paragraph B of the paper
typosquatting
Zonk
Night night
@lilac kiln Hello. If you're wondering why you can't talk, check out the #voice-verification channel. That'll tell you what you need to know about the voice gate
i like discord very much. im proud of myself advoiding using facebook as much as possible and then meet discord when i was 13
@upper crow Yo
discord is the best social media i know
i heard that there is twitter and twitter require money to use it. in my opinion that is very good. if ur not rich then just use other social media such as thread.
twitter will be clean and we wont meet troll on twitter. thats may be perfect? if you see no troll or bot or spam on twitter anymore thats entirely worth your money
look at how much effort people took to keep this community toxic free
Can you please write down the command here
Hello π
!u

Created: <t:1443481946:R>
Profile: @rugged root
ID: 98195144192331776
Joined: <t:1525291749:R>
Roles: <@&267628507062992896>, <@&807415650778742785>, <@&267629731250176001>, <@&831776746206265384>, <@&587606783669829632>, <@&797891034906099752>, <@&267630620367257601>, <@&295488872404484098>, <@&764245844798079016>, <@&764802720779337729>, <@&463658397560995840>, <@&542431903886606399>
Messages: 98,066
Activity blocks: 19,547
Total: 32
Active: 0
Or !user
You are not allowed to use that command here. Please use the #bot-commands channel instead.
hey hi @stuck furnace
Weird. I just noticed, I used to be double jointed in my left thumb
I am not anymore
Probably for the best
@vocal basin Sup
trying to decide whether or not to resume doing the recent side-project
What's the project in question?
tool to edit a text document from multiple clients
but, like, simple
it should work on mobile too
@idle monolith Yo
I'm making it so I can edit something both from PC and Android
would probably be web-only
I have a server, so that's not the problem
@whole bear Yo
Hi
Good hru?
Oh I know about that
There is a certain song stuck in my mind
I just wanna tell you how I'm feeling
Gotta make you understand
rabbitmq is also good if some of the processes die halfway through dealing with a message
because messages are supposed to be dropped eventually
Alisa can you talk on VC?
closer to database journaling not journaling databases, yes
avoiding having to deal with cybersecurity
that's the basic
I'm using ZeroMQ for communicating between web server and a worker process (singular)
main Windows CLI (more user-friendly compared to cmd.exe), but also works on other systems
it's more likely to have bash pre-installed on a Linux system
What is the best OS system?
ZeroMQ is brokerless, so I don't have to manage another service
Windows, Mac, Linux
SunOS 4.1
I've been Windows baby since I was a baby
Although I want to learn about other OS system
Like Mac and linux
@rugged root
Mac is closer to this than Linux, I think
Well they both do simular things, but Ps is made for windows scripting. And bash is default for linux although you can run it on windows to
powershell works on linux too
Yeah I know
Depends on what you want to use the OS for, for programming generally:
linux > mac > windows unless game dev then windows > mac > linux
I think you are talking about Powershell +or whatever it is
well true but post linux users dont write ps scrips to use on linux vs shell
Automation seems fun
does alpine have bash preinstalled?
I just wanna automate stuff
there is sh, which is less advanced
hi
goig greaaaaaaaaaaat
how bout u?
I feel everyone here is married
like*
I'm 18
I meant this type of alpine
alisa@parrrate:~$ docker run -it --rm alpine
/ # bash
/bin/sh: bash: not found
/ #
Besides you
ubuntu image has bash installed
Mr. Hemlock is married right?
alpine has ash
@rugged root
At least 128 MB of RAM
too much
Lucky
At least 0-700 MB space on a writable storage device.
too much
I think, yes, for ext4 there is a way
fun fact: my IP, when opened in a browser, redirects to rick roll proper
it can't get corrupted
Did anyone get rickrolled?
just don't install anything, stuff everything into docker, even desktop
something goes wrong -> burn down everything
God Dammit π
<site_link_here>
Wait what do I do?
markdown moment
<site_link_here> https://www.youtube.com/watch?v=xvFZjo5PgG0
Rick Roll (Different link + no ads) for all you monsters
Original Video
https://m.youtube.com/watch?v=dQw4w9WgXcQ
Rick Astley
https://m.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw
right click -> copy text
to see the syntax
I am still learming
is pico the smallest raspberry pi?
that's 264KB RAM
Ok bye yall
still ARM, but already crossing into microcontroller category rather than just small pc
Hey
wait wha
why is my used space is suddenly 74% instead of 84%
and that's not even Windows
I have 21GB free on Windows' system drive
"good enough"
Is Cryptography Important for Cybersecurity?
awareness of algorithms and what systems use which -- that definitely is important
What do I need to learn if I want to start cybersecurity?
as in understanding why SSL 1.0 or something similar shouldn't be used
@rugged root
steganography is, like, <0.0001% of cybersec
Animmo pls talk in VC
i did not said it was a big part, just that there is more to crypto that the obvious
I mean I can live without coffee
But it just helps in the morning
When I want to stay awake
I can't live without Ice cream though
@rugged root
π
Anyone wanna play chess?
@molten pewter Wanna play chess?
writing (mostly regular text, not code);
algorithm taxonomy (so that's just a lot of reading);
how to analyse a system (not necessarily just for vulnerabilities);
there's also other stuff that doesn't scream "security" but is important
do you know atomic chess?
another funny mode
why do i need py if i know js/ts?
What is this?
π
it's -16 or -18 evaluation at the start, I think
Wanna play this?
Join the challenge or watch the game here.
trunkrs
hey can anyone suggest me some github repo which is beginner friendly ?
I am talking of something related to python
Alisa gg
I was never winning the entire game
nvm, it's only -13.6
@amber raptor Wanna chess?
@lavish rover https://github.com/collections/choosing-projects SerenityOS is 5th on that list
That really surprises me for some reason
Oooo
That's really cool, actually. Didn't know that there's a list like this
Oooh cool
Found it when looking through like "Contribute to your first project"
If you ever worked with an AJAX call, you are probably familiar with the following error displayed in browser console:
thanks dude
thank you Hemlock
Happy to help
if that's ur real name tho
Close enough
cool
@pulsar light What were you wanting to ask?
ok
#test
#guessing game:
import random
correct_guess = False
list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
s_n = random.choice(list1)
guess = 1
guess_limit= 5
v = input(" \n Hello, Tell me you name. ")
print(s_n)
try:
w= int(input(' \nHi '+ v + '. Lets play a game!. Im thinking of a number between 1 to 15. You think you are able to guess it?, just so you know you have 5 tries. \n \n Take a guess: '))
while guess <= guess_limit:
if w == s_n:
correct_guess = True
break
elif s_n + 1<= w <=s_n +4:
print(' \nYour guess was a little bit too high, try again: ')
elif s_n - 5 <= w <= s_n - 1:
print(" \nYour guess was a little bit too low, try again: ")
elif w <= s_n - 6:
print(" \nYour guess was way too low, try again: ")
elif s_n + 4 <= w <= s_n + 9:
print(' \nYour guess was way too high, try guessing lower: ')
elif w > 15:
print(" \nYou can only type numbers between 1 and 15!.")
w = int(input(' \n Take another guess: '))
continue
guess += 1
w = int(input(' \n Take another guess: '))
if correct_guess:
print(" \nExcellent job " + v + ", You guessed right!. ")
if guess == 1:
print(" \n You guessed my number in " + str(guess) + " try!.")
else:
print(" \n You guessed my number in " + str(guess) + " tries!.")
elif guess > guess_limit:
print("\nSorry, " + v + ", you've run out of guesses. My number was " + str(s_n) + ".")
except ValueError:
print(' \nYou can only type a number!')
if i lost 4 guesses
and got the last one right
i get printed loss
@rugged root
Thinking
alright)
So the issue is that you're asking for another input after incrementing the guess count.
guess += 1
w = int(input(' \n Take another guess: '))
So your guess count may go over the limit, meaning it'll hop out of the while loop before it can reach the:
if w == s_n:
correct_guess = True
So correct guess is never updated
I would scoot the guess input to the top of the loop rather than the bottom
wait so where should i put w
while guess <= guess_limit:
w = int(input('Make a guess'))
That way, it won't ask you after you've already ran out of guesses
x = 5
x = x + 3
# is the same as
x += 3
Explaining that to Scorpion, just to give you context Rayane
hahaha i wondered
@rose shadow If you're wondering why you can't talk, check out the #voice-verification channel. That'll tell you what you need to know about the voice gate
@sinful parrot Yo
hello
could someone help me install a package its not really python related but maybe u can help
What're you trying to do?
so i want to get the data dumps from this music database discogs into a postgres database
theres this tool to accomplish this
Loads the discogs.com monthly XML data dump into postgres - GitHub - DylanBartels/discogs-load: Loads the discogs.com monthly XML data dump into postgres
and i cant get it to work lol
Is it on crates.io?
nice
@rugged root ```py
#test
#guessing game:
import random
correct_guess = False
list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
s_n = random.choice(list1)
guess = 1
guess_limit= 5
v = input(" \n Hello, Tell me you name. ")
print(s_n)
z = int(input(' \n Take a guess: '))
try:
w= print(' \nHi '+ v + '. Lets play a game!. Im thinking of a number between 1 to 15. You think you are able to guess it?, just so you know you have 5 tries.')
while guess <= guess_limit:
w = int(input(' \n Take another guess: '))
if w == s_n and z == s_n:
correct_guess = True
break
elif s_n + 1<= w and z <=s_n +4:
print(' \nYour guess was a little bit too high, try again: ')
elif s_n - 5 <= w and z<= s_n - 1:
print(" \nYour guess was a little bit too low, try again: ")
elif w <= s_n - 6:
print(" \nYour guess was way too low, try again: ")
elif s_n + 4 <= w and z<= s_n + 9:
print(' \nYour guess was way too high, try guessing lower: ')
elif w > 15 and z >15:
print(" \nYou can only type numbers between 1 and 15!.")
w = int(input(' \n Take another guess: '))
continue
guess += 1
if correct_guess:
print(" \nExcellent job " + v + ", You guessed right!. ")
if guess == 1:
print(" \n You guessed my number in " + str(guess) + " try!.")
else:
print(" \n You guessed my number in " + str(guess) + " tries!.")
elif guess > guess_limit:
print("\nSorry, " + v + ", you've run out of guesses. My number was " + str(s_n) + ".")
except ValueError:
print(' \nYou can only type a number!')
what do u think about this
there is a problem tho
In the:
elif w > 15 and z > 15:
print(" \nYou can only type numbers between 1 and 15!.")
w = int(input(' \n Take another guess: '))
That input is redundant
what u mean)?
Since you're asking for input at the top of the loop now, you don't need to ask it before you go back to the top
Shoot
Oh I see
So infinite loop issue
I'd just do a smaller while loop at the top specifically to check if that value is within the range you want
nice story
can u provide me with the code)
Wait why do you need z?
i need it so
when i get first msg i get take a guess
but if i get it wrong ill get take "another" guess
So I'd get rid of z, and do this instead:
while guess <= guess_limit:
if guess =< 1:
w = int(input(' \n Take a guess: '))
else:
w = int(input(' \n Take another guess: '))
...
Wait, that logic might be off
But you get what I'm trying to do right?
Just comes with experience
bro
Oh also
20 years?
!f-strings
Creating a Python string with your variables using the + operator can be difficult to write and read. F-strings (format-strings) make it easy to insert values into a string. If you put an f in front of the first quote, you can then put Python expressions between curly braces in the string.
>>> snake = "pythons"
>>> number = 21
>>> f"There are {number * 2} {snake} on the plane."
"There are 42 pythons on the plane."
Note that even when you include an expression that isn't a string, like number * 2, Python will convert it to a string for you.
Use f-strings instead of string concatenation
lmao I once got an F on an assignment because I used f-string
yes
because "they didn't teach f-string yet"
and they never touched f-string ever again
so
I call bullshit
yeah but the prof took off the entire credit for missing a space or something
so I would say she was the crazy one
tbh
I worked as a TA for the same prof
and my job was easier
coz I just hash the stdout and the student's answer don't match
I just give 0
30 lines of python and it's done
@silent sequoia :white_check_mark: Your 3.12 eval job has completed with return code 0.
Useless use of lambdas: <function <lambda> at 0x7efc0064ea20>
lol
!e
java = f"Useless use of lambdas: { (lambda x: x*2)(4) }"
print(java)
@rugged root :white_check_mark: Your 3.12 eval job has completed with return code 0.
Useless use of lambdas: 8
2332
huh
I never knew it is possible to implement a whole browser engine from scratch these days
oh this one
daily runner of test262 for many engines
yoooo
this repo is a gem
well not a literal gem
it's a python server not a ruby one
but
@rugged root
#test
#guessing game:
import random
correct_guess = False
list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
s_n = random.choice(list1)
guess = 1
guess_limit= 4
v = input(" \n Hello, Tell me you name. ")
print(s_n)
try:
w= print(' \nHi '+ v + '. Lets play a game!. Im thinking of a number between 1 to 15. You think you are able to guess it?, just so you know you have 5 tries.')
while guess <= guess_limit:
if guess <= 1:
w = int(input(' \n Take a guess: '))
else:
z = int(input(' \n Take another guess: '))
if w == s_n or z == s_n:
correct_guess = True
break
elif s_n + 1<= (w or z) <=s_n +4:
print(' \nYour guess was a little bit too high, try again: ')
elif s_n - 5 <= (w or z)<= s_n - 1:
print(" \nYour guess was a little bit too low, try again: ")
elif w <= s_n - 6 or z <= s_n - 6:
print(" \nYour guess was way too low, try again: ")
elif s_n + 4 <= w or z<= s_n + 9:
print(' \nYour guess was way too high, try guessing lower: ')
elif w > 15 or z >15:
print(" \nYou can only type numbers between 1 and 15!.")
continue
guess += 1
if correct_guess:
print(" \nExcellent job " + v + ", You guessed right!. ")
if guess == 1:
print(" \n You guessed my number in " + str(guess) + " try!.")
else:
print(" \n You guessed my number in " + str(guess) + " tries!.")
if guess > guess_limit:
print("\nSorry, " + v + ", you've run out of guesses. My number was " + str(s_n) + ".")
except ValueError:
print(' \nYou can only type a number!')
No no
it didnt work(
You don't need z
i need w?
Yeah
#test
#guessing game:
import random
correct_guess = False
list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
s_n = random.choice(list1)
guess = 1
guess_limit= 4
v = input(" \n Hello, Tell me you name. ")
print(s_n)
try:
w= print(' \nHi '+ v + '. Lets play a game!. Im thinking of a number between 1 to 15. You think you are able to guess it?, just so you know you have 5 tries.')
while guess <= guess_limit:
if guess <= 1:
w = int(input(' \n Take a guess: '))
else:
w = int(input(' \n Take another guess: '))
if w == s_n:
correct_guess = True
break
elif s_n + 1<= w <=s_n +4:
print(' \nYour guess was a little bit too high, try again: ')
elif s_n - 5 <= w <= s_n - 1:
print(" \nYour guess was a little bit too low, try again: ")
elif w <= s_n - 6:
print(" \nYour guess was way too low, try again: ")
elif s_n + 4 <= w:
print(' \nYour guess was way too high, try guessing lower: ')
elif w > 15:
print(" \nYou can only type numbers between 1 and 15!.")
continue
guess += 1
if correct_guess:
print(" \nExcellent job " + v + ", You guessed right!. ")
if guess == 1:
print(" \n You guessed my number in " + str(guess) + " try!.")
else:
print(" \n You guessed my number in " + str(guess) + " tries!.")
if guess > guess_limit:
print("\nSorry, " + v + ", you've run out of guesses. My number was " + str(s_n) + ".")
except ValueError:
print(' \nYou can only type a number!')
wait
lines starting from if w == s_n: must be dedented?
#test
#guessing game:
import random
correct_guess = False
list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
s_n = random.choice(list1)
guess = 1
guess_limit= 4
v = input(" \n Hello, Tell me you name. ")
print(s_n)
try:
w= print(' \nHi '+ v + '. Lets play a game!. Im thinking of a number between 1 to 15. You think you are able to guess it?, just so you know you have 5 tries.')
while guess <= guess_limit:
if guess <= 1:
w = int(input(' \n Take a guess: '))
else:
w = int(input(' \n Take another guess: '))
if w == s_n:
correct_guess = True
break
elif s_n + 1<= w <=s_n +4:
print(' \nYour guess was a little bit too high, try again: ')
elif s_n - 5 <= w <= s_n - 1:
print(" \nYour guess was a little bit too low, try again: ")
elif w <= s_n - 6:
print(" \nYour guess was way too low, try again: ")
elif s_n + 4 <= w:
print(' \nYour guess was way too high, try guessing lower: ')
elif w > 15:
print(" \nYou can only type numbers between 1 and 15!.")
continue
guess += 1
if correct_guess:
print(" \nExcellent job " + v + ", You guessed right!. ")
if guess == 1:
print(" \n You guessed my number in " + str(guess) + " try!.")
else:
print(" \n You guessed my number in " + str(guess) + " tries!.")
if guess > guess_limit:
print("\nSorry, " + v + ", you've run out of guesses. My number was " + str(s_n) + ".")
except ValueError:
print(' \nYou can only type a number!')
The time has come.
SerenityOS is open source on GitHub: https://github.com/SerenityOS/serenity
Follow me on Twitter: https://twitter.com/awesomekling
Support me on Patreon: https://patreon.com/serenityos
Sponsor me on GitHub: https://github.com/sponsors/awesomekling
Donate via Paypal: http://paypal.me/awesomekling
SerenityOS is a Unix-like ope...
the more horrible thing is that there are civillian hostages in gaza some of them are kids
there is a vid of a hostage kid crying for his mother while palestinians kids and adults laugh at him and beat him up
there are footages of entire familys lying dead in the street
there was a party with over 3000 people want to celebrate and then hamas terrorists did there a mass shooting killed over 260 people and injured over 100
Why the hate on the scope
I can never get a good view on those
Home page: https://www.3blue1brown.com/
This introduces the "Essence of linear algebra" series, aimed at animating the geometric intuitions underlying many of the topics taught in a standard linear algebra course.
Error corrections:
- At one point I mistakenly allude to calculators using the Taylor expansion of sine for its computations, when i...
absolutely unreal.
credits: https://youtu.be/rHLEWRxRGiM
Song: https://youtu.be/k4FF7x8vnZg
true

Very nice π
nice sound effects @lavish rover
Yeah that species of snakes are trash
bye gn
Hi
hello
hello fellow monke
You can, but whether I have a useful answer or not is another matter.
That's fine, what is the point of the asynchio module in python?
The clue is in the name.
It's often used to deal with communication situations, where you might be waiting around for the other party to communicate, but you want to do other things as well while you're waiting.
I don't know enough about it to explain it well.
You can ask around in the #async-and-concurrency channel or look at #βο½how-to-get-help or ask in #python-discussion.
I've watched a couple of videos on it, and it kind of seems like it just controls which part of the program has Priority First, and it does so Through Time delays, so do you mean that a user can put their input in and don't they don't have to wait for a back and forth between them and someone else, so if they wanted to send two messages before the other person sent one, they could do so without any issues?
My own understanding of it is very shaky.
Gotcha, that makes sense.
It's an event loop system...it might do threading behind the scenes...that's all I kind of understand maybe.
I don't know what event loops, or threading is, so I guess that's what I have to look up next lmao.πππππ
concurrency without the overhead of threading (generally), achieved via cooperative multitasking
@tidal anchor @mystic haven @dark meteor π
hello good sir
@cursive arch π
Python's default async implementation keeps all the tasks and other stuff that directly interacts with the event loop in a single thread
I doubt that's going to change any time soon even if GIL is gone
I think I understand now, it makes it to where you can process more than one part of a program at the same time, and not have to worry about them outputting at the same time.
almost same for JS, but there event loop internals are implemented in the engine, so parts (mostly IO) might be (and often are) offloaded to other threads
there are also languages like Go/Lua where this all is more implicit
Rust is kind of weird because it doesn't have the notion of an event loop embedded into the definiton of async
In that case, do you only use time delays in a program when you know that one of the threads is going to take longer to process than another, so it gives it a time delay so that way you can do another thing while you're waiting for it to process then come back to that when it's done?
it's not delay-based most of the time, in case of async
there are mechanisms built into the OS that help waiting on multiple things simultaneously
Gotcha so it's just so that way the interpreter doesn't stay idle on something that's taking longer to process than you would like it to, making it to where you can do another thing in the program while you're waiting for it?
instead of a delay, it's usually just "not done yet, come back later" while scheduling something to wake up the task
How's it going?
how are you virtual?
i need help with code project
How are you aesha
here is the code
import turtle # allows us to use the turtles module
import random # allows us to use the random module
wn = turtle.Screen()
t = turtle.Turtle()
wn.bgcolor('light sky blue')
turtle.setup(800, 400)
t.fillcolor('green')
t.begin_fill()
t.forward(400)
t.right(90)
t.forward(200)
t.right(90)
t.forward(800)
t.right(90)
t.forward(200)
t.end_fill()
def drawleaf(t,size,color):
t.circle(radius, extent=None, steps=None)
tp = t.pos()
th = t.heading()
t.fillcolor(color)
t.begin_fill()
t.circle(size, 120)
t.penup()
t.setpos(tp)
t.right(180)
t.circle(size, -120)
t.end_fill()
t.setpos(tp)
t.seth(th)
def drawFlowerBud(t,size=100,leafColor='light green',stigmaColor='yellow',n=12):
t.speed(0)
tp = t,pos()
th = L.heading()
for leaf in range(n):
drawLeaf(t,size,leafColor)
t.right(360/n)
t.up()
L.seLpos(Lp)
t.backsize(size//4)
t.right(90)
t.pendown()
t.fillcolor(stigmacolor)
t.begin_fill()
t.circle(size//4)
t.end_fill()
drawFlowerBud(t)
but flower wont draw
!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.
why not
How are you doing faded
I'm doing all right, how about you manjuice?
exam?
I am doing great however my grandpa just passed due to testicular cancer but I keep pushing through for papa
projecct
im sorry to hear that
hi
i have benign tumor on my left testicular
what are you using random for?
can anyone help me or no
i need help im so bad at explaning
i am so screwed
doctor said i have 4 days to live until my testicular explodes
That sucks, I'm sorry to hear about that, I'm glad that you're managing well with it.
i want to draw flowers of random sizes
I am sorry, I hope you make it through unlike my grandpa, although he was an alcoholic he had so much heart β€οΈ
im an alcoholic too
using it to draw random sizes because its supposed to be persective art
missing turtle. in multiple places
and generally, NameError
what are you using to write the code?
python idle
my dad said if i dont code like my uncles in india he will banish me to hell
why is the import turtle and import random from chat gpt π
i use chat gpt for my final project and lost 20% of my final grade
I am currently 59 years of age, I failed high school and my wife left me. I want to probe all of them wrong and learn to code and make a career out of is it possible?
no its over for you usless
βΉοΈ
@vocal basin
help
7 name errors
what is a name error
check variable and function names
are you a discord kitten
It's not over for you man juice, it's still possible to learn to code and make a career out of it, as for you arsha, that was really rude to say.
an example:
do i need to store values as variableS?
possible -- yes
feasible -- I don't know; I don't have a career myself
Thank you, my wife left me for my Bulgarian friend and it has been a very challenging time in my life and with my grandpa passing of testicular cancer I appreciate your words of motivation π
function is named drawleaf not drawLeaf
always the bulgs
oh shi ok lemm cahnge that'
ok i changed it
how do i make it draw the leaf
I actuallt used to be a professional UFC fighter however my career went downhill when they closed the featherweight division, i suffered head trauma
my 8 kids left me
It was difficult to make a living as a fighter back in the day so I struggled and worked part time at a restaurant
I don't know; never used turtle to draw leaves before
My head is oval shaped
then adjust the angle and put it into a loop
do u know anyonme who can
Because of the repeated poundings to the head
Demetrius Johnson actuallt humiliated me in the ONE mma championship
after that is fixed, there is something that almost works, I guess
beyond just fixing variable names -- I don't know
ok can u show me the fixed code>
Wow that is impressive with code! If I didnβt have a damaged brain maybe I could see it however I am blind partially in one eye due to repeated head trauma
can u center the pettel?
I am sorry for being such a gloomy gus
I have no idea which parts of code do what
Guys search me up on UFC my name is Jon Jones I was pretty good
But not as good as Derrick Lewis
I had to retire early due to head trauma
I have a fight coming up against stipe miocic
Maybe I will bend him over and put him in guilltoine?
since you don't have the help of an IDE, here is the list of the name errors it would've shown:
radius
pos
L
drawLeaf
Lp
stigmacolor
other errors are attribute errors, mostly on Turtle
those can be fixed if you have access to stderr (error output) and documentation
can u send the workuing code?
so i can fix it so its centered
cus i am trying to recrerate this
'
but with differnt types of flowers
We're not going to do your homework for you.
an attempt to represent one of such models visually
I used to play mostly 1 minute chess because I'm lazy to think
@serene cargo π
back to provisional rating
@whole bear have you ever played knightmare? (odds variant of chess)
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/NNNNKNNN w kq - 0 1
^this
slightly imbalanced
this is just a generic event loop
(part of it)
very simplified
which website?
I can't easily use chess.com, it's banned here
the site is banned; I'm not banned
I had bullet rating of around 1000 on chess.com
1420 on lichess
that's around median
or used to be
@somber heath
whats the name of tthat minecraft launcher you have?
I lost it when I switched back to windows 10
I remember it was like JD launcher or smth
greetings
curseforge have their own tool for managing installations (currently owned by overwolf, I think)
but it uses the default mojang launcher
it used to be Curse, then Twitch, now Overwolf
if wi-fi fails, it might be due to misconfiguration
it may be fixable
"including the universal way to fix wi-fi which is to use cable instead"
Yea I am not used to using mods so I dont know a lot a bout then
always works actually, so.. a very battle-tested way to do things
my ethernet cable is slower than wi-fi because either the connector is attached incorrectly or something else is malfunctioning in the cable itself
(I wasn't attaching the connectors, an employee from the ISP was)
yea no my supplier is just being an ass today so nothing i can do
2 boosts, last time I had it
so the connection is not getting recognised as capable of gbps
and it's at 100mpbs
it may also be faulty router, but that's too depressive of a situation
I'm too lazy to do the rewiring myself
a router is how much.. $85 ?
blow $85 on a new router
$0.2 for two connectors hopefully will be enough
updated the list of books, wanted to link it here #pedagogy message
@nova stream π
@haughty fog π
π
@gritty wyvern π
Sure. What's up?
PHI is believed to be the result of isolated remaining nerve fibers firing when they shouldn't, giving false sensations that fool the central nervous system. Patients often report the sensation of insects on their skin when there aren't any.
https://www.drugtopics.com/view/understanding-and-treating-postherpetic-itch
@somber heath
its really hard to describe ngl
you think we can call in a personal vc if thats chill?
Oh, PHI. I thought you said it felt like insects were in your eye.
I avoid dm vc.
i understand
ill type it out
basically I want to make a calorie, fat, protein tracker and I was wondering if I can write code from the user input into a seperate file and have that file load in when i run the code
Yes.
You can use a database, or you can use json, or you can dump the text in a file and parse it yourself.
!d json
Source code: Lib/json/__init__.py
JSON (JavaScript Object Notation), specified by RFC 7159 (which obsoletes RFC 4627) and by ECMA-404, is a lightweight data interchange format inspired by JavaScript object literal syntax (although it is not a strict subset of JavaScript 1 ).
Warning
Be cautious when parsing JSON data from untrusted sources. A malicious JSON string may cause the decoder to consume considerable CPU and memory resources. Limiting the size of data to be parsed is recommended.
json exposes an API familiar to users of the standard library marshal and pickle modules.
Encoding basic Python object hierarchies:
!d open
open(file, mode='r', buffering=- 1, encoding=None, errors=None, newline=None, closefd=True, opener=None)```
Open *file* and return a corresponding [file object](https://docs.python.org/3/glossary.html#term-file-object). If the file cannot be opened, an [`OSError`](https://docs.python.org/3/library/exceptions.html#OSError) is raised. See [Reading and Writing Files](https://docs.python.org/3/tutorial/inputoutput.html#tut-files) for more examples of how to use this function.
*file* is a [path-like object](https://docs.python.org/3/glossary.html#term-path-like-object) giving the pathname (absolute or relative to the current working directory) of the file to be opened or an integer file descriptor of the file to be wrapped. (If a file descriptor is given, it is closed when the returned I/O object is closed unless *closefd* is set to `False`.)
!d with
8.5. The with statement
The with statement is used to wrap the execution of a block with methods defined by a context manager (see section With Statement Context Managers). This allows common tryβ¦exceptβ¦finally usage patterns to be encapsulated for convenient reuse.
with_stmt ::= "with" ( "(" with_stmt_contents ","? ")" | with_stmt_contents ) ":" suite
with_stmt_contents ::= with_item ("," with_item)*
with_item ::= expression ["as" target]
``` The execution of the [`with`](https://docs.python.org/3/reference/compound_stmts.html#with) statement with one βitemβ proceeds as follows:
so 'open' opens files into code?
i dont understand json and with ill look on youtube
open gives you a representation of a file which you can then read from or write from.
It's not the same as the data itself.
i see
It's often used
pathlib is also used in a similar way
fs
!d pathlib
New in version 3.4.
Source code: Lib/pathlib.py
This module offers classes representing filesystem paths with semantics appropriate for different operating systems. Path classes are divided between pure paths, which provide purely computational operations without I/O, and concrete paths, which inherit from pure paths but also provide I/O operations.
If youβve never used this module before or just arenβt sure which class is right for your task, Path is most likely what you need. It instantiates a concrete path for the platform the code is running on.
Pure paths are useful in some special cases; for example:
