#voice-chat-text-0
1 messages · Page 132 of 1
Perhaps a small device...
Yeah you're right, I see it
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
well go to bed then
I'm working
@rugged root Their game doesn't make any sense
How so
the game mechanics are messy
"You aren't gonna need it" (YAGNI) is a principle which arose from extreme programming (XP) that states a programmer should not add functionality until deemed necessary. Other forms of the phrase include "You aren't going to need it" (YAGTNI) and "You ain't gonna need it" (YAGNI).Ron Jeffries, a co-founder of XP, explained the philosophy: "Alwa...
Not a bad philosophy
I think it should at least be saved somewhere
to join later
> global lpfn
any concrete reason why?
what do you mean by "it does not work"?
if lpfn is not used anywhere else, and start is never run in parallel, global doesn't affect the behaviour
So keybinds
does removing it right now break the program?
20
what is the purpose of hookId?
stopping the threads?
where is _listener.start()/_listener.stop() used?
driver should probably be passed to __init__
instead of setting it this way
it seems to make sense to turn QuickCo.loadConfig into a factory method
QuickCo.from_config
that would return an instance of QuickCo
to avoid this
with all these being arguments to __init__
!d int.from_bytes
classmethod int.from_bytes(bytes, byteorder='big', *, signed=False)```
Return the integer represented by the given array of bytes...
example of a factory method
Is a factory, as you're using the term, the same thing as an alternative constructor?
it is implied, that it's a classmethod
there are differences
factories often are dependent on some other constructor/factory
I think some languages like C# can allow two totally separate constructors, but not sure
they often seem to just end up delegating the work to another constructor anyway
(not staticmethod)
class SomeClass:
@classmethod
def from_something(cls, something) -> Self:
return cls(something.field, something.method())
cls is a class not an instance
it is
!e
from typing import Self
class SomeClass:
@classmethod
def from_something(cls, something) -> Self:
print(cls, something)
raise NotImplementedError
SomeClass.from_something("example")
@vocal basin :x: Your 3.11 eval job has completed with return code 1.
001 | <class '__main__.SomeClass'> example
002 | Traceback (most recent call last):
003 | File "/home/main.py", line 9, in <module>
004 | SomeClass.from_something("example")
005 | File "/home/main.py", line 7, in from_something
006 | raise NotImplementedError
007 | NotImplementedError
Class methods just bind the class as the first argument when you get them.
error is intentional there
!e
from typing import Self
class SomeClass:
@classmethod
def from_something(cls, something) -> Self:
return cls()
class DerivedClass(SomeClass):
pass
print(SomeClass.from_something("example"))
print(DerivedClass.from_something("example"))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | <__main__.SomeClass object at 0x7f7789468810>
002 | <__main__.DerivedClass object at 0x7f7789468810>
usage like this creates a dependency on how the constructor works, which might be unwanted
class SomeClass(ABC):
@classmethod
def from_something(cls, something) -> Self:
return cls.from_two_values(something.field, something.method())
@classmethod
@abstractmethod
def from_two_values(cls, value0, value1) -> Self:
raise NotImplementedError
that demonstrates one of the purposes of factories: abstraction
from_two_values removes the dependency on what arguments __init__ takes
Provided to YouTube by Blackfly Records
Stroma · Gnoss · Connor Sinclair
Stretching Skyward
℗ Blackfly Records
Released on: 2023-05-12
Auto-generated by YouTube.
But from_two_values will still have to call __init__ to return itself, no? Or alternatively call some other factory that eventually would call the __init__ function
!e
from abc import ABC, abstractmethod
from typing import Self
class SomeClass(ABC):
@classmethod
def from_something(cls, something) -> Self:
return cls.from_two_values(something, something)
@classmethod
@abstractmethod
def from_two_values(cls, value0, value1) -> Self:
raise NotImplementedError
class TwoFields(SomeClass):
def __init__(self, field0, field1):
self.field0 = field0
self.field1 = field1
@classmethod
def from_two_values(cls, value0, value1) -> Self:
return cls(value0, value1)
def __repr__(self):
return f"{self.__class__.__name__}({self.field0!r}, {self.field1!r})"
class OneTuple(SomeClass):
def __init__(self, tuple_):
self.tuple_ = tuple_
@classmethod
def from_two_values(cls, value0, value1) -> Self:
return cls((value0, value1))
def __repr__(self):
return f"{self.__class__.__name__}({self.tuple_!r})"
print(TwoFields.from_something("example"))
print(OneTuple.from_something("example"))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | TwoFields('example', 'example')
002 | OneTuple(('example', 'example'))
TwoFields.__init__ and OneTuple.__init__ have different signatures
it sometimes makes sense with concrete examples,
or with codebase which had been changing for a long time
abstract class
if there is code depending on from_something already and if a need to have different __init__s ever arises, this would be the solution
should it be a script? (replying to VC)
or should it be a service instead?
.
@lunar haven If we're just watching a video wouldn't it be better to just link the video rather than streaming it?
@junior ermine how often is the script started?
and if it's paid/restricted, don't stream it
When why not just link said course
Let me rephrase it then. If all you're doing is streaming a video, then please hop off stream
If you keep fighting me on this I'm just going to revoke the perms entirely
How would that work? With multiple keys being pressed down at the same time etc? And overhead for the event stream?
I guess what would a solution like that look like?
> overhead for the event stream
way less than the overhead of starting new threads
Streaming is a privilege, not a right. If someone is going to be streaming, it should be coding, giving or receiving help, something suitably beneficial or interesting to the server. Watching a video that you can simply link to is not beneficial
Especially when you're watching it at 2x speed
is this call blocking?
Yes, well, presumably so
It should be assumed that the eventHandler does stuff synchronously
There are 3 different ones in the repo that all do things pretty similarly
Correct
listener should be an instance of a class not a module, to avoid confusion
Fine, go ahead gof
and hookId should be a field of that class
@lunar haven
I feel like all the "OOP sucks" people would scream at me if I did so
what part is blocking?
Which eventHandler is thatr?
globals used the way there are, are way worse
Performance wise?
Go ahead and stream
you're doing OOP anyway, just a masked and wrong version of it
ughhhhhhhhhhhhhhhhhhhhhhhh
Would it really be faster to have a "real class"?
it would be less incorrect, which is more important
and "faster" on these scales is totally irrelevant
Fair enough
actionKeys["RETURN"] (self.on_enter) could be since it calls an arbitrary Module
k
Booooo
this part of code is not entirely correct
try:
action = self.actionKeys[key["vkName"]]
except KeyError:
pass
else:
action()
to avoid accidentally catching KeyError from inside action()
Yes, true
why not create a thread per-action then?
I know it's petty but you'd be storing a variable in that case (doing an assignment thingy)
The hookFunc need to return ASAP so other programs can get their turn to handle the keypress, the more time it spends on hookFunc the higher the perceived keyboard latency
yes, it will return instantly, and action will be executed later
if you want it faster, then two separate points of threading:
one thread processes events and does eventHandler logic
other thread(s) process actions scheduled by the first one
self.actionKey.get(key["vkName"], do_nothing)()
preact
petite-vue
(small react)
!d dict.get
get(key[, default])```
Return the value for *key* if *key* is in the dictionary, else *default*. If *default* is not given, it defaults to `None`, so that this method never raises a [`KeyError`](https://docs.python.org/3/library/exceptions.html#KeyError "KeyError").
(small vue)
That's quite smart, self.actionKey.get(key["vkName"], lambda: None)() good or no?
do_nothing is more expressive
Should that be a global do_nothing = lambda: None then?
def do_nothing():
pass
Other than syntax, is there really any difference?
On 100 million runs they seem to perform pretty similarly
!e
def do_nothing():
pass
print(do_nothing)
print(lambda: None)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | <function do_nothing at 0x7fd23cad8680>
002 | <function <lambda> at 0x7fd23cad84a0>
!e
def do_nothing():
pass
print(do_nothing() is (lambda: None)())
@woeful wyvern :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
(first is easier to debug)
!e
ham = lambda: None
print(ham)
@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.
<function <lambda> at 0x7f2c22038680>
!e
one = lambda: int("a")
def two(): int("a")
one()```
@woeful wyvern :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 3, in <module>
003 | one()
004 | File "/home/main.py", line 1, in <lambda>
005 | one = lambda: int("a")
006 | ^^^^^^^^
007 | ValueError: invalid literal for int() with base 10: 'a'
!d gc
This module provides an interface to the optional garbage collector. It provides the ability to disable the collector, tune the collection frequency, and set debugging options. It also provides access to unreachable objects that the collector found but cannot free. Since the collector supplements the reference counting already used in Python, you can disable the collector if you are sure your program does not create reference cycles. Automatic collection can be disabled by calling gc.disable(). To debug a leaking program call gc.set_debug(gc.DEBUG_LEAK). Notice that this includes gc.DEBUG_SAVEALL, causing garbage-collected objects to be saved in gc.garbage for inspection.
The gc module provides the following functions:
U+225F is the unicode hex value of the character Questioned Equal To. Char U+225F, Encodings, HTML Entitys:≟,≟,≟, UTF-8 (hex), UTF-16 (hex), UTF-32 (hex)
¯_(ツ)_/¯
schrödinger's cat ≟ dead
So if it's just one thread handling the keyboard events, how do you manage the queuing if multiple are pressed at once? Or even just checking if a new key has been pressed assuming the thread is always running
KILLANETH 2nd Single 『Apocrypha』
2016.9.7 Release
DEZERT OFFICIAL SITE
http://www.dezert.jp/
完売音源集-暫定的オカルト週刊誌②-
発売日: 2016年11月23日(水)
【変態盤】
--完全限定生産-特殊パッケージ2枚組仕様--
パッケージ :ALBUM(CD+DVD)
価格:¥ 8.000(税抜) / ¥8.640 (税込)
品番:SFG-004
CD収録内容
1.「変態」
2.「切断」
3. 遮光事実
4. MONSTER
5.「不透明人間」
6.「絶蘭」
7. 脳みそくん。
8. さくらの詩
9. ストロベリー・シンドローム
10.「死刑宣告」
11. リリィさんの美容整形術
12.「告白」
13. 肋骨少女
14.「遺書。」
15. Ghost
DVD収録内容
2016年6月...
that cat be chillin
/a/ [a] "Mann" (man)
/e/ [e] "Haus" (house)
/i/ [i] "Kind" (child)
/o/ [o] "Hose" (pants)
/u/ [u] "Hut" (hat)
/p/ [p] "Papa" (dad)
/t/ [t] "Tisch" (table)
/k/ [k] "Kuh" (cow)
/m/ [m] "Mutter" (mother)
/n/ [n] "Nase" (nose)
/f/ [f] "Fuß" (foot)
/s/ [s] "Schule" (school)
/ʃ/ [ʃ] "Schnee" (snow)
/χ/ [χ] "Bach" (stream)
/pf/ [pf] "Pfanne" (pan)
/ts/ [ts] "Zitrone" (lemon)
/tʃ/ [tʃ] "Buch" (book)
/r/ [r] "rot" (red)
/l/ [l] "Licht" (light)
/j/ [j] "ja" (yes)
/ʁ/ [ʁ] "Hund" (dog)
/a/ [a] "asa" (morning)
/i/ [i] "ichi" (one)
/u/ [u] "utsukushii" (beautiful)
/e/ [e] "eki" (train station)
/o/ [o] "omoshiroi" (interesting)
/p/ [p] "pan" (bread)
/t/ [t] "takai" (high)
/k/ [k] "kawaii" (cute)
/m/ [m] "mizu" (water)
/n/ [n] "natsu" (summer)
/s/ [s] "sakura" (cherry blossom)
/ɕ/ [ɕ] "shinbun" (newspaper)
/h/ [h] "hito" (person)
/j/ [j] "yama" (mountain)
/w/ [w] "watashi" (I, me)
brusque
https://cdn.discordapp.com/attachments/346805820702326805/1107779218231808061/20230515_161800.jpg Lucky has decided that Joi doesn't get to get up
Dagarna går och det börjar kånnas jobbigt att stanna hemma om dagarna. När solen tittar fram känns det ändå som rätt tillfälle för ett stort glas med mjölk. Men tänk om mjölken är slut? Vad gör man då? SOS Mjölksupport har öppet dygnet runt.
let me guess
Nyhetsmorgon i TV4 från 2017-06-22: Språkakuten om att ha svenska som andraspråk och vad man ska tänka på för att undvika de vanligaste inlärningstabbarna. Och hur vet man när det ska vara "EN" eller "ETT"? Språkakutens Sara Lövestam ger sina bästa tips. Bland annat: "personer och djur är nästan alltid en". Patrik Hadenius visar vad en stressnur...
i cant talk in here because i have not sent enough messages in the server
ok bye then not like i was hoping i could meet new friends or anything
You still can
When we're in VC we're watching the text chat as well
Streaming Now on Disney+ – Sign Up at https://disneyplus.com/
Your favorite chef - The Swedish Chef - shares his recipe for popcorn, or as he refers to it "Pöpcørn."
Subscribe for all new videos from The Muppets! ► http://www.youtube.com/subscription_center?add_user=MuppetsStudios
Watch more from The Swedish Chef ►https://www.youtube.com/watch...
Found a good example
how similar is https://nl.wikipedia.org/wiki/Yokai re: https://nl.wikipedia.org/wiki/Ork#Aardmannetjes_in_volksverhalen_en_sprookjes
Yōkai (妖怪, "fantoom", "geest", of "monster") zijn bovennatuurlijke wezens uit Japanse mythologie en folklore. Ze vormen een klasse van de obake.
Yōkai is een verzamelnaam voor een groot aantal wezens die onderling sterk verschillen in uiterlijk, gedrag en kenmerken. Bekende subgroepen zijn de kwaadaardige oni en de kitsune.
Een ork (Engels: orc) of aardman (Engels: goblins) is een mythologisch wezen. Het zijn vaak kwaadaardige, domme en trolachtige wezens, die het kwade belichamen. Ze komen voor in verhalen, sprookjes, boeken, films, computerspellen en muziek.
Aardmannen en hun verwanten komen veelvuldig voor in de mondelinge overlevering van Noordwest-Europa. Zo i...
swedish popcorn - what can i say...........
is Maro the head of twitter now ?
did you file 300 resumes today
500 ????
thats hard to do
loop
hope you get a cool job
i get jobs by accident - not by qualifications
nope im not
im just a random idea generator
zero - its a good time
more time to build a garden
tech jobs ? im not worthy to be called programmer
need C code minimum these days
maroloccio rapidly deleting messages
fresh garden herbs this year ... maybe
fresh home made pasta - on my todo list
i don't know why I said fetucci
I meant fettuce
guess it was some sort of cross between fettucce and fettucine
!e
ඞ = True
print(ඞ)
@woeful wyvern :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
anyway I meant this
i did same with scallops
i have some big cement blocks outside to use
garden exercise program
cilantro doesnt last long
Hey opal how are you?
why its so?
something happened?
doing fine, was sick last few days, but now its better
yeah
do you know a guy uploaded files to youtube in video format to store it on the servers
yea i am trying to code it buts facing many errors
I see
so you worked in hotel?
okay, well I think in this field its easier to find another job
compared to IT field
are you too young?
oh boy
dont give shit about this hotel
maybe its even better that you are not working there
you may find it as motivation to get better job
well we can also do it in music format right like different set of binaries for different sounds
we can find libs on pip
i was going to ask the same question
ahh valorant, genshin and I was playing Metro series
wbu?
Trying to center text for last 10 mins
new to frontend..
i have to update it but i am going on a trip so i cannot play
I tried asm there are soo many versions of it
3 ig
It was really hard
WHAT DOCS?
how did you learn python with docs
oh yea he is a legend
Hello
eivl helped me a lot when i got here
he was gonna do a fastapi workshop
Oh ok
I've fixed the thing, now paths are more correct
still not sure if it's space-filling
this one is fully in 2D
"space-filling" as in:
if this random walk goes on forever, each point on the plane will eventually be as close as possible to the path
formally:
closure of the set of points on the path is the plane itself
so, like:
it's impossible to find a circle that's never crossed by the path
(circle with a positive radius)
still stuck figuring out how distribution of the variance depends on the mean and difference between first and last points
at least, thankfully, this problem does not in any way depend on the number of dimensions
anything can be calculated independently per dimension, and then added/multiplied to get the total result
Distribution of the mean would be the same as the size of a standard deviation, right?
what do you mean by "the size of a standard deviation"?
mean of all points on the path is normally distributed
differences f(a)-f(b) between any two points f(a),f(b) on the path f are normally distributed (if a and b are fixed)
whereas variance is not normally distributed
discord crashed
current hypothesis that I assume is:
given fixed f(1)-f(0) and fixed ∫f(x)dx,x∈[0;1] (=mean),
variance (on [0;1]) is log-normally distributed
maybe I should check whether it makes any sense mathematically before continuing to assume that
@potent frost 👋
Helloooo
@peak nebula interactive SQL environment?
that'd be database-specific
are you using Docker?
how is the database deployed?
DBA is BS job
I no longer accept friend requests from people on large discord servers
i sense a poor prior experience
its discord
so, for DB update there are two parts:
DB migration <-- this is what developers are mostly responsible for
DB software update <-- what operators are mostly responsible for
key word "mostly"
first is mostly done by developers because:
it's done in software
it's described with code
usually SQL
thanks Alisa
"invented by Oracle"
person who knows database well and can guide and help other devs -- good
person who has to review every single schema change, especially in a large company -- bad
wait, Florida is now more dystopian on that matter than Russia?
"control freak"
funnily, assembly language is more correct, afaik
it's called "assembler" in some other countries
though
rather
as in "[language of ]assembler"
well, at least it's not open plan office
complex searches are quite hard to handle
filtering is somewhat ineffective
though if you know you get, like, at least 1% of all data, then fine
(if you don't need to do a lot of few-results searches)
brb
Anybody with God of war three activation key or registration key?
No !? Not an ideal task!? 👍 Okay
i dont really play this game
Oh okay.......it's very well fabricated though
analysing some distributions
# mean, std, c (I don't remember why it's `c` but it's the last point)
def msc(arr):
return np.array([arr.mean(axis=0), arr.std(axis=0), arr[-1]])
A = 256
R = 100
L = 100
P = 1
pmean, pstd, pc = np.concatenate([msc((P*np.random.standard_normal((A**2, R)) / A).cumsum(axis=0)) for _ in range(L)], axis=1)
fig = plt.figure()
ax = fig.add_subplot(projection='3d')
ax.scatter(pmean, pc, np.log(pstd), s=.5)
when will I start properly naming and formatting code in jupyter?
probably never
this produces a 2D path which I'm analysing (or an equivalent to it)
plt.plot(
(np.random.standard_normal(A**2) / A).cumsum(axis=0),
(np.random.standard_normal(A**2) / A).cumsum(axis=0),
)
"equivalent to it" rather because it generates points in a different order
that goes in order:
0,1,2,3,4,5,6,7,8
the thing I'm actually using does this instead:
0,4,3,5,2,7,6,8,1
so it's generating mid-points and splitting the path each time
const some_function = () => {};
is there a difference here
are you sure this works only with function?
the difference I know is:
functions are reordered as if they were defined before everything else
(afair)
x = {
val: 15,
y: function() { this.val = 13 },
x: () => { this.val = 12 },
}
x = {
val: 15,
y: function() { this.val = 13 },
x: (state) => { state.val = 12 },
}
there's a name for that
funny how in Russian docs that part comes before everything else
!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
making a discord as a beginner is kind of:
you fill fail a lot, because async and other stuff
but if you figure that out, you will have a lot of experience and knowledge usable in different projects
require 'discordrb'
bot = Discordrb::Bot.new token: '<token here>'
bot.message(with_text: 'Ping!') do |event|
event.respond 'Pong!'
end
bot.run```
they're both worse versions of each other
agreed
attempt different ways, find what's better and easier for you
people are different
there is no universal "easiest way to start"
being anti-OOP depends on what you define as OOP
message passing is OOP too
@whole bear "enterprise style"?
kernels have their own notions of objects
(often)
and then there is Haskell-ish/maths objects/classes
and Rust's traits/objects
Rust is just oop in practice
Interfaces and structs
I have no clue what I'm doing but the line seems to fit
there's also German inventor
forgot his name
The Z3 was a German electromechanical computer designed by Konrad Zuse in 1938, and completed in 1941. It was the world's first working programmable, fully automatic digital computer. The Z3 was built with 2,600 relays, implementing a 22-bit word length that operated at a clock frequency of about 5–10 Hz. Program code was stored on punched film....
> The Z3 was demonstrated in 1998 to be, in principle, Turing-complete.
60 years after being designed
Just want to say I appreciate everyone here. You folks make running the voice chat worth while
@eager kraken Yo
hey
How's it going
its fine
@vocal basin Welcome back
tbh im new here an trying to learn python so yeah
trying to understand where -0.8956 comes from
Hell yeah. You new to programming general or just to Python?
I'm faced with a constant that I can't guess
Ruby?
Same
im not new to programming like i have some bg about it but im trying to learn python
Welcome! We have a lot of resources here that can help you through your journey 🙂
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
I personally recommend "A Byte of Python" that's on there.
That timing was impeccable
!e
# seems a little off
from math import e
print(1-(1/(e+1)**2+.25)**2)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
0.8961037010828107
ohh
thank you😄
No problem
What language/s did you learn prior?
Beat me to the gif
!e
from math import log
print(log(1/6)/2)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
-0.8958797346140275
well i tried to go in front end developing so i learn html and css but its a joke
How so?
Did you get into JS?
Just gonna... https://javascript.info
It's a sickness, any time I hear JS I have to drop that link. It's so good
Well that's close
so i shifted to learn python
Fair
no i didnt get into js
JS is the programming language behind that. HTML and CSS are just markup langs but do feel like programming langs the way they are set up
JS is the heavy lifter in most frontend things anymore
!e
from math import erf, log
print(log(1/(5.5++erf(2)/2))/2)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
-0.8956847909917398
for now I'll believe this is the correct value
(++ is accidental)
!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
ill think about it
Hi
ill prolly get the 50 messages here
there's only one place I remember seeing .997
and exp(x)**-2 is 5.997
You could use the decimal library for more precision.
ahh, gotcha
I can, like, do the maths and calculate the exact value
but guessing is more fun
!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 floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
We're happy to have you here regardless. If we're in VC we'll typically watching the text chat so no one is left out. But yeah, it's mostly a hangout, with programming as the general overall topic, but we talk about all kinds of stuff
cool thanks
@gleaming lotus
im trying to learn by osmosis, i think ill stick to general for now
File "/home/swastik/Downloads/Project/backend/builder-insert.py", line 18, in enter_details
name_input = name.get()
^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
programming to construction noises
https://www.youtube.com/watch?v=AB4Ov9t4aq4
There was road works happening down the street. They were so loud and annoying I had to record it and post it to my fans. #construction #sounds
Subscribe to the channel: https://www.youtube.com/channel/UCiGj5D4x0s6PJnflNwIAk0A
See more of my portfolio on my website: https://sunvillesounds.com
Twitter: https://twitter.com/SunvilleSounds
-Relaxa...
name isn't anywhere where that function can see it
It's inside of another function, and you'd have to let the enter_details() function know about it via global, like how you have khasra
enter_details doesn't set it, so should see it anyway
take_input is always called before enter_details
But it still needs global inside enter_details in order to see that it's defined elsewhere
ah, yes
if it's not pre-set
though
idk
!e
def f():
global x
x = 426
def g():
print(x)
f()
g()
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
426
The fuck?
name.lower() probably returns None
which is the problem
@rugged root :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 7, in <module>
003 | f()
004 | File "/home/main.py", line 2, in f
005 | print(x)
006 | ^
007 | NameError: name 'x' is not defined
That's what's going on
!e
def f():
global x
print(x)
def g():
global x
x = 426
f()
g()
@rugged root :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 8, in <module>
003 | f()
004 | File "/home/main.py", line 3, in f
005 | print(x)
006 | ^
007 | NameError: name 'x' is not defined
This is why I hate globals
wrong call order
It's not
!e
def f():
print(x)
def g():
global x
x = 426
g()
f()
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
426
that is the issue
name.lower() is None because it's Label
lol
alright got it
C++ is a committee-made mess
but, like, not really wrong mess
just large
docker run python:2
> Interface support is normally restricted to Microsoft Windows.
alleged by wikipedia
> There is also an experimental ASIO driver for Wine, WineASIO
this rather in the context
https://en.wikipedia.org/wiki/Asio_C%2B%2B_library
Asio is a freely available, open-source, cross-platform C++ library for network programming. It provides developers with a consistent asynchronous I/O model using a modern C++ approach.
Boost.Asio was accepted into the Boost library on 30 December 2005 after a 20-day review. The library has been developed by Christopher M. Kohlhoff since 2003....
so, Asio not ASIO
@gleaming lotus What's up?
thank u so much man
i couldnt figure out why my code fked from days
for safe and fast concurrency
"just use Rust"
Hi @rugged root
How's it going?
You talking this thing?
looks better with mine @rugged root
That is quite pretty looking
Also holy crap that's a lot of languages
I'm not seeing scheme in here
F
care to explain
Patreon ► https://patreon.com/thecherno
Twitter ► https://twitter.com/thecherno
Instagram ► https://instagram.com/thecherno
Discord ► https://thecherno.com/discord
In this video we're talking about copying in C++. Copying objects (and data) is commonly necessary in C++, and to properly facilitate that for our custom types, we need to add someth...
Fair, MDN is gold
@rugged root https://clojuredocs.org/ https://docs.racket-lang.org/
@rugged root
The Rust Standard Library
it's very easy to write too
io.StringIO is often used
racket docs are written in racket
Unfortunately doesn't cover everything
biggest thing I have contributed code to
it's so nice seeing your pr in the version changelog
That dog looks like he farted and is just waiting for their friend to smell it
Just that self satisfied smile
"tetris-style minigame"
10**(10**100) ig
For work, VSCode
For personal projects, Emacs
Gotcha gotcha
This AI gen'd?
yep
It's really sick looking
Index finger looks a bit funky
for sure
And apparently the US has acquired all the countries, judging by the stars
yee is difficult to change the flag
Yeah I remember trying to futz with fine details when messing with the fine tuned models
I unfortunately don't have the patience to get really really good at it
What do you guys think of Foxhole?
@wind raptor The player strikes are hilarious
Huh
Day of defeat - source 👌
We're looking to adopt a password management system for our firm. Anyone have any experience - Hey @stuck furnace - with password managers at that scale? Ideally looking for one that can set roles or permissions so that business services doesn't have access to the audit team's passwords and vice versa
Was just saying hi, not expecting you to answer that question
`import asyncio
async def counter(name: str):
for i in range(0, 100):
print(f"{name}: {i!s}")
await asyncio.sleep(0)
async def main():
tasks = []
for n in range(0, 4):
tasks.append(asyncio.create_task(counter(f"task{n}")))
while True:
tasks = [t for t in tasks if not t.done()]
if len(tasks) == 0:
return
await tasks[0]
asyncio.run(main())`
KeePassXC
The above snippet is awaiting task 0 as always. The execution flow is one by one right it is not taking the benefit of concurrency.
found it in a tutorial
I've been playing that a lot lately just to zone out 😄
Python Enhancement Proposals (PEPs)
So you just add an if X to the end of the case.
But as Hemlock said, it still needs that pattern part.
The example the PEP gives:
match command.split():
case ["go", direction] if direction in current_room.exits:
current_room = current_room.neighbor(direction)
case ["go", _]:
print("Sorry, you can't go that way")
@mortal burrow
@zenith radish
what is this called?, if i may ask?
I guess i missed some part of convo
woahh, okayyy
thats creative 🙂
I think he was in Silicon Valley? 
this voice chat looks super chill :)
i'm afraid i dont have the permission to talk yet :/
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Boys, I've just bought "Automate The Boring Stuff With Python" as an absolute beginner and its arriving tomorrow 
Why does the voice command not include the criteria? Unsure how many characters are required to explain voice verification.
Possibly it can be explained in the voice command description??
@rugged root
Been wondering about that for a year...
I thought there was a reason....
Can we have a ticket made to address this?
!source
guys, I have quite the noobie question but ive been dying to ask this: What program do you use to program Python? Pycharm or....?
Thonny is good for beginners
Started with Pycharm, switched to Visual Studio Code
Visual Studio Code handles every language I have thrown at it thus far.
REPL
Prefer to stay in one environment.
Read evaluate print loop.
I'm learning alot in this voice channel
I use pycharm enterprise. It's pretty featureful. But takes some time to get used to.
A lot of people use VSCode, it's free and has a lot of user created plugins
Do you have an environment setup yet?
Although we do end up just chatting and chilling a lot as well
good to know! thanks so much man
If not, may provide resources to setup environment.
well yeah, i've already installed pycharm
is there like a good tutorial teaching Github? I see all professional programmers use it but its quite difficult to grasp as a beginner
Something I use the REPL for is interactively writing regression tests. Essentially load the file with python -i whatever.py, and test it interactively, then copy and paste the transcript into a text file and run it with doctest 😄
I'm light theme in the daytime, and dark theme at night.
I think dark text on a light background is easier to read in daylight.
@rugged tundra Have you read Thinking Fast and Slow?
I have this book in my backpack
There is, give me a sec
Snagging the link
@rugged root Erm, it's about the psychology of biases essentially.
The whole book revolves around a model that divides thought into two modes: system 1 (fast and intuitive thought), and system 2 (slow, careful thought).
I think the section on priming is not accurate.
thanks!!
System 1 thinking involves the application of heuristics (simple questions that you substitute in place of hard questions), which leads to making mistakes (biases).
Well there is an economic remedy for that. It's called "internalising the exernality".
I.e. tax things that affect third parties negatively.
And subsidise things that affect third parties positively.
Greenhouse gas emissions should be taxed so that their price reflects their true cost.
Sure, but you still have the environmental impact
Businesses are short sighted, odds are good that they'll see that it's cheaper to pay the tax for a 5 year projection than it would be to set up a cleaner fuel
Right, but the objective isn't to have zero environmental impact; it's to have the socially optimum outcome, taking into account the costs and benefits.
I suppose
Hell, no.
""In the U.S., the return of top wealth inequality has been particularly dramatic, with the top 1% share nearing 35% in 2020, approaching its Gilded Age level" compared with less than 25% in 1970, the report noted. "
what is this voice chat about ?
I kind of like the idea of a "universal minimum inheritance" 😄
wealth can never be distributed equally
"From each according to [their] ability, to each according to [their] needs"
survival of the fittest ? @terse needle ?
People should do what they can and people should take what they need
UNTILL YOU HAVE BANKS YOU CAN NEVER DO JUSTICE IN A COUNTRY TO EVERYONE IN A COUNTRY )
I don't agree @rugged tundra
banks are the mother of all evil in our society ))
class Ass:
pass
a = {Ass()}
b = {Ass()}```
😂
That was good I'll give you that
not capitalism but banking system
I definitely try to go most places with a full cock
Without context.......
did i pronounce it too funny :<>
No no no
:,>
i didnt talk eng for 3 months my accent sux rn lmao
i need help
login_button = tk.Button(login_frame, text="Next", command=lambda: changes() if username_entry.get() == pit1.read() and password_entry.get() == pit2.read() else print("Invalid username or password"))
login_button.pack(padx=5, pady=5)
it not work
HA, all good dude
I find most of my electricians under the sofa, but most of my plumbers under the car seat.
i actually feel better anyways bcz recently talked with a pakistani girl, her accent was so funny i couldn't take her seriously lmao
lol
Simplify your per-line complexity.
.
ok so...
login_button = tk.Button(login_frame, text="Next", command=lambda: changes() if username_entry.get() == pit1.read() and password_entry.get() == pit2.read() else print("Invalid username or password")).pack(padx=5, pady=5)
Spread it out across several lines if you need to.
how
Also, remember how we talked about how a .pack call returns None, not the widget?
You want to assign the variable to the widget, then call the pack off the variable
Your lambda is too complicated. Use a def instead.
When you use lambdas, if you can't write them very, very simply, don't use them.
Those Governments organizations should go see the doctors about all those cuts, and especially that hemorrhage.
Inverse Freddy Krueger
For context
I have no specific plan or idea as to how things should be, other than helping people
That's always been my concern
Making sure people are taken care of, no matter their lot in life
What's your opinion on UBI
I think it's wise but I always worry that those kinds of things will just be built into the prices of things where it becomes almost worthless
Thats a good point
"We know that people are going to have X amount of money, so we might as well up the prices"
But I'm also just very cynical
"no you cant hear the texts"
the text:
U S A! U S A! U S A!
slow
switching to rust in a year
So many rumors, so little reliability.
The base looks slightly thicker as well, potentially larger battery
But yeah, who knows
On the plus side, oh my god Tears of the Kingdom is great
so long switch pro, we have entered the switch 2 rumor mill.
@zenith radish imagine if we replaced github workflows with an scheme-like lisp DSL 😩
Yaml is fiiine
But a CI framework based on lisp
Thas cool
fr
Yaml does suffice but it's not cool enough
Fully written in clj
oh yeah I did it's very cool
I'm going to shower then listen to LP terrible ideas
Don't nest defs unless you know why you want to.
You aren't calling your inner def.
Well done on the pack call stuff.
Separating that out.
full mashup of last christmas - wham! and break stuff - limp bizkit
watch my elf bowling ytp collab: https://www.youtube.com/watch?v=toLHJ6LUS2s&t=60s
Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for -fair use- for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. F...
YESS I have been voice chat verified
brb
H131L5Uz3N3Agt
@rugged root can I stream :D
i changed the readme file in my repo
butit did not update the description
what do i do
???
!stream 418374628889853952
✅ @neon vigil can now stream until <t:1684267918:f>.
Democracy sucks
Hello
Did you mean to drop that?
Cashier lol
Oh really 
Erm, mercantilism, actually.
I think you're now classified as a "flawed democracy".
Fair
@neon vigil What are you working on?
the voice connections for discord bots
Discord wrapper API, right?
yeye
Are you coming up with the design yourself?
nope
i mean
i do follow docs
but a lot of design decisions are different from other wrappers
do i have permission to send funni memes in chat
If they're relevant and not too many
:((
We're not a meme dump
me?
No the voice chat
Standard British response
The worst form of scorn possible
British disapproval is so strong
The deep level tube trains are already loud enough to give you hearing damage
Fair
What?
Apparently 😄
Elizabeth line is still pretty cool
Charlie is a poor waif
I maintain that Facebook's success was largely due to the way the rolled the platform out.
I.e. starting with a few universities.
Yeah true
Then expanding to all universities, all schools, then everyone else.
Progressive rollouts make a huge difference
At least in that case, it meant they could achieve a critical mass of users at each stage.
Milenial 👀
Balenciaga?
they look like my sister's figure skates but with a different sole
Brothel creepers?
That has to be a band name
That only works when you don’t have competitors. When you do, makes it much harder.
Fair
I think it is actually 😄
I think when someone says their life has meaning, it means they have decided what their goals in life are.
Wdym? 😄
I don't know anymore











who is this
There's definitely something about him
Not necessarily. You assign handlers to loggers.
They could write to the console, but they could also send a message over the internet, write to a file, or anything you want.
@frail jetty 👋
hey there, is there a time where programmers hop on voice chat to discuss python?? or did you click on accident
@frail jetty Are you hearing me talking?
i cannot talk
i am doing my verification
yes
i think i have 3 days left until i am verified
thank you so much for the help bro!!!
so how long have you been in python or software engineering
@frigid dove 👋
so your a full time software engineer?
okay what advice would you give someone who wants to be a software engineer
Can I ask you a question.?
@frigid dove yes you can bro Opal is cool
I want to build my career in Artificial Intelligence.
So thats why I want to learn Python and I don't like the theoretical learning , I want to learn Python practically.. So, how to learn Python practically ..
"practically" and "theoretically" isn't that much different for programming
Ohk.. I understand.. Thank you
i am currently new to programming (began 2 months ago) still doing a bootcamp. I spend 18 hours studying a day and at least 288 hours a month... how long will it take to get a job exactly?
if you want to specifically avoid maths in AI, you'd have to mostly be looking into documentations of libraries/packages
@somber heath
lol
18 hours is too much
I don't wanna skip mathematics because I love mathematics
(stuff like tensorflow have tutorials/courses associated with them)
!e
print(31*24)
print(288)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 744
002 | 288
18 hours 😵💫
how long dose it take to become a developer? like to get a job.. I have a burning fire to get this
i do sleep 6 hours a day
there is no specific "learn this long => get a job" time
!e
print(30*24 * (5/7) * (8/24))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
171.42857142857144
rounding down to 168 hours
(a month, as an adequate upper limit)
Nice 👏
@somber heath
it takes weeks for some people and years for others
- depends on what job
mhhhh, i see...
front end developer
@somber heath what do you mean by quality? can you please explain
i see what you mean, and i agree with that statement
yes thats true! compound effect
please enable activities
i agree!
maybe better to try to find an internship then
(paid internship, as in the company pays you)
look up what requirements companies have for interns
apply for internships, attend interviews
until you get there, make projects on your own (to demonstrate skills you have), attend free courses, explore stuff outside those courses
@somber heath
Are you a Native English speaker @somber heath
how do you network with other people??
dc
lol haha
whats funny?
thanks for that Alisa
was speaking with opal over voice chat, i am using the text to reply since i am not verified yet
!e
from __future__ import braces
@vocal basin :x: Your 3.11 eval job has completed with return code 1.
001 | File "/home/main.py", line 1
002 | from __future__ import braces
003 | ^
004 | SyntaxError: not a chance
@somber heath Thanks so much for the advice and your time brother! may God bless you! i think i am happy with the questions you answered and if i need any help. I will come back to you again
@somber heath yes i am getting back to coding and practicing! i am LOCKED IN!!! lets goo
I've recently been put in charge of helping someone learn front-end
not sure if I actually know enough about it but I'll try
Oh nice.. You become frontend teacher 😅
anyone knows why the output is always empty string here
def longestcommonprefix(strs):
prefix = ""
for i in strs:
if len(i) < len(prefix) or len(prefix) == "":
prefix = i
total_word = len(strs)
count = 0
while count != total_word and len(prefix) > 0:
count = 0
for i in strs:
if prefix == i[:len(prefix)]:
count += 1
if count != total_word:
prefix = prefix[:-1]
return prefix
name = ["flower","flow","flight"]
print(longestcommonprefix(name))
!e
def longestcommonprefix(strs):
prefix = ""
for i in strs:
if len(i) < len(prefix) or len(prefix) == "":
prefix = i
print(f"{prefix = !r}")
total_word = len(strs)
count = 0
while count != total_word and len(prefix) > 0:
count = 0
for i in strs:
if prefix == i[:len(prefix)]:
count += 1
if count != total_word:
prefix = prefix[:-1]
print(f"{prefix = !r}")
return prefix
names = ["flower","flow","flight"]
print(longestcommonprefix(names))
@vocal basin :warning: Your 3.11 eval job has completed with return code 0.
[No output]
oh how to fix please help
!e
print(len("")) == ""
@red peak :white_check_mark: Your 3.11 eval job has completed with return code 0.
0
why =="" at the end?
oh
you put it outside
it should be inside
!e
def longestcommonprefix(strs):
prefix = ""
for i in strs:
if len(i) < len(prefix) or len(prefix) == 0:
prefix = i
print(f"{prefix = !r}")
total_word = len(strs)
count = 0
while count != total_word and len(prefix) > 0:
count = 0
for i in strs:
if prefix == i[:len(prefix)]:
count += 1
if count != total_word:
prefix = prefix[:-1]
print(f"{prefix = !r}")
return prefix
names = ["flower","flow","flight"]
print(longestcommonprefix(names))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | prefix = 'flower'
002 | prefix = 'flow'
003 | prefix = 'flo'
004 | prefix = 'fl'
005 | fl
!e
print(len("") == "")
@red peak :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
len(prefix) == "" is always False, because int is never equal to str (unless you overload equality in a derived class)
to check it the prefix is empty, there are multiple ways:
prefix == ""
len(prefix) == 0
not prefix
!e
prefix = "example"
print(f"{prefix = !r}")
print(f"{prefix = }")
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | prefix = 'example'
002 | prefix = 'example'
lmao i am gettinf confused
the error you have is len(prefix) == ""
!e
example = "example"
print(f"{example!r}")
print(f"{example}")
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 'example'
002 | example
!r means repr
oh got it
thank youuuu
i changed into len(prefix) == ""
thats why
it should be 0 thankss
or alternate prefix == "" only
this is not print-specific
logs can include f-strings too
though probably not with !r
!r is almost exclusively for debugging
just as repr
oh thanks for info well thanks a lot even chatgpt suks XD
does anyone if im better off coding on windows
own all apple devices
comforttable in?
okay
i saw a thinkpad second hand x1 carbon for sale for $300usd
was thinking i should just get it
linux on windows or mac? 😂
haha
okay i'll just buy it its $300 💀
ive heard that if u install linux on macbook
u cant install osx back
lol then it voids my warranty i think
ix a 3rd gen 2015 x1 carbon really bad
should i just get a brand new
2022
sorry lots of questions LOL
!e
import functools
import itertools
import operator
def all_equal(chars):
return all(itertools.starmap(operator.eq, zip(chars[1:], chars[:-1])))
def longestcommonprefix(strs):
return "".join(map(operator.itemgetter(0), itertools.takewhile(all_equal, zip(*strs))))
names = ["flower","flow","flight"]
print(longestcommonprefix(names))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
fl
i dont like mac tho windows 12 performance would be same as mac except that u can run games on it too. microsoft said the performance of windows 12 would be same as mac with more customization since they are building specific dedicated hardware specially for windows 12
windows 11?
okayyyyy
