#voice-chat-text-0
1 messages · Page 896 of 1
@molten pewter I started learning python. In your opinion, do you think it is an easy coding language to learn?
@muted belfry
class Solution(object):
def intToRoman(self, num):
i = ''
if num // 1000 != 0:
i += 'M' * (num // 1000)
num %= 1000
if num // 100 == 9:
i += 'CM'
num %= 100
elif num // 500 != 0:
i += 'D' * (num // 500)
num %= 500
if num // 100 != 0:
if num // 100 == 4:
i += 'CD'
else:
i += 'C' * (num // 100)
num %= 100
if num // 10 == 9:
i += 'XC'
num %= 10
elif num // 50 != 0:
i += 'L' * (num // 50)
num %= 50
if num // 10 != 0:
if num // 10 == 4:
i += 'XL'
else:
i += 'X' * (num // 10)
num %= 10
if num == 9:
i += 'IX'
num %= 1
elif num // 5 != 0:
i += 'V' * (num // 5)
num %= 5
if num // 1 != 0:
if num // 1 == 4:
i += 'IV'
else:
i += 'I' * num
return i
python 3.10 could help your code
@muted belfry check dms
class Solution:
def intToRoman(self, num: int) -> str:
return mapping(num)
def mapping(n):
p = partition(n)
return assemble(p)
def partition(n):
places = []
while n:
places.append(n % 10)
n //= 10
return places
def assemble(p):
s = ''
for place, (i, v, ix) in zip(p, IVIXs):
if not place:
continue
elif 0 < place < 4:
s = place*i + s
elif place == 4:
s = i+v + s
elif place == 5:
s = v + s
elif 5 < place < 9:
s = v + i * (place%5) + s
elif place == 9:
s = ix + s
return s
IVIXs = [
"I V IX".split(),
"X L XC".split(),
"C D CM".split(),
"M _ _".split()
]
@frigid shard what do you think? ^^^
thanks
why? lol
replied to the wrong message lol sorry
thanks
python is easy as good as any other language.
seems like brute force
I can't wait for the new match syntax...
cool
Hello everyone, guys, please tell me normal colleges for programmers, otherwise I'm already 15 and I think just go to college after the 9th grade.
is it a good idea to mess around with selenium to make an auto clicker with logic
or is it illegal?
i don't think so
Depends?
Like if it's for Cookie Clicker probably fine
But if you're doing it to automate purchasing on a store site or generating a bunch of user accounts yeah
That's going to be against the Terms of Service of those sites
?
:incoming_envelope: :ok_hand: applied mute to @frank verge until <t:1631217220:f> (9 minutes and 59 seconds) (reason: burst rule: sent 8 messages in 10s).
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
!unmute 383609115722907650
:incoming_envelope: :ok_hand: pardoned infraction mute for @frank verge.
Please don't type broken messages, it spams the chat.
I meant it would be great if the clicker could be used everywhere
my message?
no.
Ok
Sure. And in theory you could, but you have to abide by the ToS or risk your account being revoked or whatever other things they mention in it
And we will not assist with things that break the ToS of other services
!rule 5
5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.
Okay, I understood everything
And I'm sorry, it was just interesting
I'm not upset, just letting you know
ok
🥳
Recently I have been getting a lot of requests from viewers of the channel to take a look at a Linux distribution that I had never heard about--Garuda Linux. This is yet another Arch-based distro but it does some different things. Most notable is that it uses the Zen kernel and seems to be optimized for gamers.
REFERENCED:
► https://garudal...
👀 👍
hello snow
```py
print("hello world!")
```
Source code: Lib/tkinter/__init__.py
The tkinter package (“Tk interface”) is the standard Python interface to the Tcl/Tk GUI toolkit. Both Tk and tkinter are available on most Unix platforms, including macOS, as well as on Windows systems.
Running python -m tkinter from the command line should open a window demonstrating a simple Tk interface, letting you know that tkinter is properly installed on your system, and also showing what version of Tcl/Tk is installed, so you can read the Tcl/Tk documentation specific to that version.
hello every one
hi
does any one know how to fix brain.exe has stopped responding?
!zen
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
@loud raptor if you need to comment every single line thats probably why you're struggling to debug it.
Its not that
im here.
🤔 ```py
def PlayTime(songdir):
if Stopped:return
CurrentTime = pygame.mixer.music.get_pos() / 1000
ConvertedTime = time.strftime("%H:%M:%S", time.gmtime(CurrentTime))
CurrentSong = songBox.curselection()
songBox.get(CurrentSong)
SongMutagen = MP3(songdir)
global SongLength
SongLength = SongMutagen.info.length
ConvertedSongLength = time.strftime("%H:%M:%S", time.gmtime(SongLength))
CurrentTime += 1
TimeCounter = 1
SliderPos = int(SongLength)
if int(MySlider.get()) == int(SongLength):
StatusBar.config(text = f"Time Elapsed: {ConvertedSongLength} / {ConvertedSongLength} ")
NextOne = songBox.curselection()
NextOne = NextOne[0] + 1 # <--
if NextOne < len(mp3list):
songBox.selection_clear(0, END)
songBox.selection_set(NextOne, last = None)
songBox.activate(NextOne)
StatusBar.after_cancel(StatusID.get())
play()
else: Stop()
elif paused: pass
elif int(MySlider.get()) == int(CurrentTime):
MySlider.config(to = SliderPos, value = int(SliderPos))
else:
MySlider.config(to = SliderPos, value = int(MySlider.get()))
ConvertedTime = time.strftime("%H:%M:%S", time.gmtime(int(MySlider.get())))
StatusBar.config(text = f"Time Elapsed: {ConvertedTime} / {ConvertedSongLength} ")
NextTime = int(MySlider.get()) + TimeCounter
MySlider.config(value = NextTime)
StatusID.set(StatusBar.after(1000, PlayTime, songdir))
╰(艹皿艹 ) (╯°□°)╯︵ ┻━┻
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!voice
@chilly pond
ha ha I'm dumb
def PlayTime(songdir):
#Check to see if slider goes faster
if Stopped == True:
return
CurrentTime = pygame.mixer.music.get_pos() / 1000
#Convert current time
ConvertedTime = time.strftime("%H:%M:%S", time.gmtime(CurrentTime))
#Get currently playing song
CurrentSong = songBox.curselection()
#Grab song title from list
songBox.get(CurrentSong)
#load song with mutagen
SongMutagen = MP3(songdir)
#Get song length
global SongLength
SongLength = SongMutagen.info.length
#Convert to time format
ConvertedSongLength = time.strftime("%H:%M:%S", time.gmtime(SongLength))
#Increases current time by 1 second
CurrentTime += 1
TimeCounter = 1
if int(MySlider.get()) == int(SongLength):
#Reset Slider and Status Bar
StatusBar.config(text = f"Time Elapsed: {ConvertedSongLength} / {ConvertedSongLength} ")
StatusBar.config(text = "")
NextOne = songBox.curselection()
NextOne = NextOne[0] + 1
#If statement to check if NextOne can be added
if NextOne < len(mp3list):
#Reset Slider and Status Bar
MySlider.config(value = 0)
StatusBar.config(text = f"Time Elapsed: {ConvertedSongLength} / {ConvertedSongLength} " )
#Move active bar in list
songBox.selection_clear(0, END)
#Set active bar to next song
songBox.selection_set(NextOne, last = None)
#Activates next song in the list
songBox.activate(NextOne)
#Cancels the id of the previous song and gets the next song's ID
StatusBar.after_cancel(StatusID.get())
play()
else:
Stop()
@past pawn
Hello gys
I need help in flow chart
I have code of Python project but I am struggling to make a better flowchart
Yeah, I made the code and now I am having problem mapping it to the flowchart
hi
is it like algorithm in structured way ?
Hey @wispy light!
It looks like you tried to attach file type(s) that we do not allow (.zip). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a.
Feel free to ask in #community-meta if you think this is a mistake.
np
lol
@delicate drum https://join.javadiscord.net/
Join a WebRTC video conference powered by the Jitsi Videobridge
@wind raptor Lol see the guy named with thier or someone number 🤣
I see that. Maybe not a phone number
dice_pattern = r'\[((?:\d*?[dgprb]\d+)[^]]*?(?:\d*?[dgprb]\d+)?)?([+-]\d*)?\s=\s(\-?\d*)]'
Implicit neural representations are created when a neural network is used to represent a signal as a function. SIRENs are a particular type of INR that can be applied to a variety of signals, such as images, sound, or 3D shapes. This is an interesting departure from regular machine learning and required me to think differently.
OUTLINE:
0:00 - ...
hey
can someone help me real quick
def addem(x,y,z):
print(x+y+z)
def prod(x,y,z):
return xyz
a = addem(6,16,26)
b = prod(2,3,6)
print(a,b)
in this my teacher says the output is
None 36
I say it is
48
None 36
he argues that a = addem.... wont work like print
who tf is right?
Neither of you.
Then what's correct?
The code will, if I'm reading it correctly, cause a NameError to be raised.
Ah.
But it will print.
One moment.
Here's how to format Python code on Discord:
```py
print('Hello world!')
```
These are backticks, not quotes. Check this out if you can't find the backtick key.
Ya now i remember this
Does anyone knows html here?
@plush willow Okay. Accounting for that, you are correct.
I mean...you're printing in the function and you're calling the function. That you're also assigning is irrelevant.
hi
Opalmist sighs
opalmist ignores me
sad
@somber heath hewwo:P
@somber heath left :<
I wasn't looking at the screen.
oki
Hello
hewwo:p
yes, it was made to confuse
but still my teacher says he is correct
cuz two asterisks surrounding a letter will create an italic font for the surrounded letter
hewwo:p @frosty star
hi der
The proof is in the pudding. Run it in private to make sure, then run it in front of him.
!e ```py
def addem(x,y,z):
print(x+y+z)
def prod(x,y,z):
return xyz
a = addem(6,16,26)
b = prod(2,3,6)
print(a,b) ```
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | 48
002 | None 36
is mic working?
i dont see green circle
i see it now
but then im too loud
it's that time of night again
i can tell the server got a raid
aight i deleted the evidence:
"mark as read"
!e ```py
def func():
try:
func()
except RecursionError:
func()
func()```
@somber heath :x: Your eval job has completed with return code 139 (SIGSEGV).
001 | Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow.
002 | Python runtime state: initialized
003 |
004 | Current thread 0x00007fef32f2a740 (most recent call first):
005 | File "<string>", line 3 in func
006 | File "<string>", line 3 in func
007 | File "<string>", line 3 in func
008 | File "<string>", line 3 in func
009 | File "<string>", line 3 in func
010 | File "<string>", line 3 in func
011 | File "<string>", line 3 in func
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/fowogikexo.txt?noredirect
!e
import numpy as np
from random import randint
def matrix_generator(rows, columns, max_number, min_number):
area = rows * columns
value_list = []
for _ in range(area):
value_list.append(randint(min_number, max_number))
return np.array(value_list).reshape(rows, columns)
print(matrix_generator(4,4,1,0))
!e
print(type(_))
!e
import numpy as np
from random import randint
def matrix_generator(rows, columns, max_number, min_number):
area = rows * columns
value_list = []
for _ in range(area):
value_list.append(randint(min_number, max_number))
print(_)
return np.array(value_list).reshape(rows, columns)
print(matrix_generator(4,4,1,0))
!e py for each_letter in "Apple": print(each_letter)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | A
002 | p
003 | p
004 | l
005 | e
def main():
pass
if __name__ == "__main__":
main()```
file = open("file.txt", "w")
file.write("Hello, world.")
file.close()```
```py
with open("file.txt", "w") as file:
file.write("Hello, world.")```
are you teaching someone file writing?
!e py my_list = [(0,9), (8,5), (3,7)] my_list.sort(key=lambda a: a[0]) print(my_list) my_list.sort(key=lambda a: a[1]) print(my_list)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | [(0, 9), (3, 7), (8, 5)]
002 | [(8, 5), (3, 7), (0, 9)]
!e ```py
def func():
return 5
func = lambda: 5```
None
def func(a):
return 5
func = lambda a: 5```
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
Corey Schafer
hey Op
hello
semms ur name has been influenced by opalmist
how?
Op
?
@somber heath I'm gonna learn "IF" statements rn :)>
yea ik
Can you explain the bool function?
okay
Oki thanks
idk what is subclass sorry me dumb
class MyList(list):
pass```
>>> x = ['zero', 'one']
>>> (x[False], x[True])
('zero', 'one')
object.__dir__() @somber heath
And cls.mro() (__mro__() ?)
I guess method resolution order
!e print(list.mro())
@primal yacht :white_check_mark: Your eval job has completed with return code 0.
[<class 'list'>, <class 'object'>]
!e [i**2 for i in range(10)]
@fleet island :warning: Your eval job has completed with return code 0.
[No output]
@fleet island please use #bot-commands if you are not going to be in the VC
okay
!e ```py
class MyList(list):
pass
print(MyList.mro())
@primal yacht :white_check_mark: Your eval job has completed with return code 0.
[<class '__main__.MyList'>, <class 'list'>, <class 'object'>]
!e ```py
print(object.dir(list))
@primal yacht :white_check_mark: Your eval job has completed with return code 0.
['__repr__', '__call__', '__getattribute__', '__setattr__', '__delattr__', '__init__', '__new__', 'mro', '__subclasses__', '__prepare__', '__instancecheck__', '__subclasscheck__', '__dir__', '__sizeof__', '__basicsize__', '__itemsize__', '__flags__', '__weakrefoffset__', '__base__', '__dictoffset__', '__mro__', '__name__', '__qualname__', '__bases__', '__module__', '__abstractmethods__', '__dict__', '__doc__', '__text_signature__', '__hash__', '__str__', '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__reduce_ex__', '__reduce__', '__subclasshook__', '__init_subclass__', '__format__', '__class__']
!e ```py
print(dir(list))
@primal yacht :white_check_mark: Your eval job has completed with return code 0.
['__add__', '__class__', '__class_getitem__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'append', 'clear', 'copy', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']
list.__dir__
Can i leave now to learn "if" statements or you guys still teaching me (i appritiate the teaching a lot).
lol
Which of the programming languages bring more money
@whole bear you're not in the VC so why are you asking here?
Python and java it depends.
Sorry if it sounds blunt
what
come in the vc these pros are gonna tell you everything
Python and java [....... to be honest] it [actually] depends.
if True:
... #Do this
if False:
... #Will never run
1 + 1 == 2 #True```
ohhh thankss
ima try this code
!e ```py
if 'False':
print('This is truthy')
@primal yacht :white_check_mark: Your eval job has completed with return code 0.
This is truthy
!e py result = 3 * 3 == 9 print(result)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
True
here i didnt understand that what is false ?
Empty strings are falsy. Strings with things in them are truthy.
False # bool
"False" # str
!e print(divmod(100, 6))
@primal yacht :white_check_mark: Your eval job has completed with return code 0.
(16, 4)
I havent learned divmod can you tell what does it do?
division, modulus (remainder)
okay thanks :).
// % Floor division and modulus, respectively.
when opal says bool i always hear booo
im gunna note dis
# comment
Nonzero numerical values are truthy. Zero is falsy. Negatives are truthy.
bool( something_truthy ) # True
if 12345: # if bool(12345):
print('12345 is a bad password')
yess this code can be useful in websites
oki
booo
hehe
result = A and B
if A:
result = B
else:
result = A
result = A or B
if A:
result = A
else:
result = B
(currentObj or defaultObj).doSomething()
!eval [code]
Can also use: e
*Run Python code and get the results.
This command supports multiple lines of code, including code wrapped inside a formatted code
block. Code can be re-evaluated by editing the original message within 10 seconds and
clicking the reaction that subsequently appears.
We've done our best to make this sandboxed, but do let us know if you manage to find an
issue with it!*
!e ```py
result = 'a' and 'b'
print(result)
bool('a') # True
!e ```py
code here
```
!e ```py
print(2 and 3)
how can i verify myself
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Imma need to wait for the other 2 days
and chat
import verification as vf
vf.user['Cincuenta']
just kidding
u guys python masters?
im new yess
my only specialty in python is dataframes
data science things
yess
with numpy and pandas
sin kuenta
^
yes
katie what specialty are u in
ah developers?
just wondering where r u bois from
sorry
Sorry, I often mistakenly give people pronouns
Indonesia bro
i take data science for gettin jobs in the us
lmao
Hi Kendal
and Gaming Buddhist
Guys id like to ask
what is help-things?
help avocado/ pancakes/ candy?
ah thanks man, u seem like the admin
Please don't randomly ping people
Katie, how do you make this python bar
!code
Here's how to format Python code on Discord:
```py
print('Hello world!')
```
These are backticks, not quotes. Check this out if you can't find the backtick key.
An if stanza.
if condition: #Exactly one if
...
elif some_other_condition: #Zero or more elifs. Else, if. If the above conditions in the stanza (if/elif) are falsy this this one's is truthy, do this.
...
else: #Zero or one else. If none of the above are triggered, run this block.
...```
One or zero of the blocks in the stanza will be run. A new if at the same indentation will start a new stanza.
What happened opal?
i was just doing elif statement:).
import numpy as np
import pandas as pd
pd.DataFrame(array([a, b, c]))
I exist outside this server. Occasionally, I engage in that existence.
Now i know how to use these statements:).
but thanks anyways:).
hehe
!e is_hot = False
is_cold = False
if is_hot:
print("it's a hot day")
print("drink plenty of water")
elif is_cold:
print("it's an cold day")
print("wear warm clothes")
else:
print("it's a lovely day")
print("enjoy your day")
@stoic grail :white_check_mark: Your eval job has completed with return code 0.
001 | it's a lovely day
002 | enjoy your day
!e ```py
put code here
```
I realised my previous explanations were lacking.
@stoic grail you're not in VC
hewwOwO
.uwu Salutations, everybody.
Sawutations, evewybody.
i didnt understand dis
im using pycharm
oh lol okay
sorry me dumb dumb
!e '''py
@stoic grail :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | '''py
003 | ^
004 | SyntaxError: EOF while scanning triple-quoted string literal
weeeeeeeeeeeeee
Here's how to format Python code on Discord:
```py
print('Hello world!')
```
These are backticks, not quotes. Check this out if you can't find the backtick key.
@solemn hornet amber is an game character :).
okay
huh?
There's a game called brawl stars and amber is the rarest character to get in that game.
cat file.txt | tr -d 'aeiouAEIOU' | tee file2.txt
!e py print("".join(c for c in "Sample Text" if c not in "aeiouAEIOU"))
@somber heath :white_check_mark: Your eval job has completed with return code 0.
Smpl Txt
!e py print("*".join("MASH"))
@somber heath :white_check_mark: Your eval job has completed with return code 0.
M*A*S*H
JOINER_STR.join(ITERABLE_OF_STR)
!e ```py
print(' '.join('red sus'))
@muted belfry :white_check_mark: Your eval job has completed with return code 0.
r e d s u s
i will join in some mins
!e ```py
no_vowels = str.maketrans({k: "" for k in "aeiouAEIOU"})
print("Sample text".translate(no_vowels))```
@somber heath :white_check_mark: Your eval job has completed with return code 0.
Smpl txt
!e ```py
import re
text = "red sus\n is such a fuss"
pattern = re.compile(r"\S+")
for i in pattern.finditer(text):
print(i.group(0))
@primal yacht :white_check_mark: Your eval job has completed with return code 0.
001 | red
002 | sus
003 | is
004 | such
005 | a
006 | fuss
!e ```py
import this
!zen
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
!pep 20
!d str.maketrans
static str.maketrans(x[, y[, z]])```
This static method returns a translation table usable for [`str.translate()`](https://docs.python.org/3.10/library/stdtypes.html#str.translate "str.translate").
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters (strings of length 1) to Unicode ordinals, strings (of arbitrary lengths) or `None`. Character keys will then be converted to ordinals.
If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to `None` in the result.
!d str.translate
str.translate(table)```
Return a copy of the string in which each character has been mapped through the given translation table. The table must be an object that implements indexing via `__getitem__()`, typically a [mapping](https://docs.python.org/3.10/glossary.html#term-mapping) or [sequence](https://docs.python.org/3.10/glossary.html#term-sequence). When indexed by a Unicode ordinal (an integer), the table object can do any of the following: return a Unicode ordinal or a string, to map the character to one or more other characters; return `None`, to delete the character from the return string; or raise a [`LookupError`](https://docs.python.org/3.10/library/exceptions.html#LookupError "LookupError") exception, to map the character to itself.
You can use [`str.maketrans()`](https://docs.python.org/3.10/library/stdtypes.html#str.maketrans "str.maketrans") to create a translation map from character-to-character mappings in different formats.
See also the [`codecs`](https://docs.python.org/3.10/library/codecs.html#module-codecs "codecs: Encode and decode data and streams.") module for a more flexible approach to custom character mappings.
@flint kettle I'm afraid your audio clarity was poor and there seemed to be interfering noise. We didn't catch what you said.
@proper juniper
I'm trying to display a QErrorMessage but my GUI keeps crashing, this is my code ```py
def errorDialog(self, error: BaseException):
self.dialog = qtw.QErrorMessage()
self.dialog.showMessage(str(error))
!stream 368671236370464769
✅ @proper juniper can now stream until <t:1631280150:f>.
heyyyy I exist!
hi whoever that was i blinked
I sprinkled some instant coffee in my toastie sandwich it tastes great!
Traceback (most recent call last):
File "c:\Users\User\Documents\Programming\Python\five\GUI App - yoohoo\src\__main__.py", line 76, in run
Context.selectedProfile.run()
File "c:\Users\User\Documents\Programming\Python\five\GUI App - yoohoo\src\core\profiling.py", line 342, in run
acts.register()
File "c:\Users\User\Documents\Programming\Python\five\GUI App - yoohoo\src\core\profiling.py", line 286, in register
state = self.trigger_detail.register()
File "c:\Users\User\Documents\Programming\Python\five\GUI App - yoohoo\src\core\profiling.py", line 219, in register
locator = locateOnScreen(self.image, confidence=confidence, minSearchTime=self.timeout, grayscale=True)
File "C:\Users\User\Documents\Programming\Python\five\GUI App - yoohoo\dependencies\lib\site-packages\pyscreeze\__init__.py", line 372, in locateOnScreen
retVal = locate(image, screenshotIm, **kwargs)
File "C:\Users\User\Documents\Programming\Python\five\GUI App - yoohoo\dependencies\lib\site-packages\pyscreeze\__init__.py", line 352, in locate
points = tuple(locateAll(needleImage, haystackImage, **kwargs))
File "C:\Users\User\Documents\Programming\Python\five\GUI App - yoohoo\dependencies\lib\site-packages\pyscreeze\__init__.py", line 206, in _locateAll_opencv
needleImage = _load_cv2(needleImage, grayscale)
File "C:\Users\User\Documents\Programming\Python\five\GUI App - yoohoo\dependencies\lib\site-packages\pyscreeze\__init__.py", line 169, in _load_cv2
raise IOError("Failed to read %s because file is missing, "
OSError: Failed to read CACHE::png.png because file is missing, has improper permissions, or is an unsupported or invalid format```
pog
msg = QtWidgets.QMessageBox()
msg.warning(self, "Error", f'This is the message')
from PyQt5.QtWidgets import QMessageBox
msg = QMessageBox()
msg.setIcon(QMessageBox.Critical)
msg.setText("Error")
msg.setInformativeText('More information')
msg.setWindowTitle("Error")
msg.exec_()
Help in what way
I will send a code just tell me which programming language is that
... kinda sleepy
my first is asking
Hold on
damn lemon is here too
and is this homework?
Is this for a test/exam
idk my friend asked
Also why is he using you as a go between
Cause he dunno about this group
like he said he is gonna have an exam at 13th
umm i did not told him about this group
he said that pls help me or i will fail,lol
pls help me or i will fail
totally sounds like related to school work
should i invite him here?
Probably easier, yeah
yeah he said that he will have an exam on 13th setp
int main ()
{
Int d =12;
float c1 = 17.50,tc;
tc=c1*d;
Cout << "Total Cost="<<tc;
return 0;
}
@rugged root how much do you earn from coding ?
okay im inviting him
wow, You seem like a good good programmer
I get it
I just completed my python course, but I am struggling on what to do next.
college
Bachelors in computing
@obtuse drum come here
class Main(Ui_MainWindow, QMainWindow):
def __init__(self):
super(Main, self).__init__()
self.emit = EmitSignals()
self.emit.signals.text_sig.connect(self.print_data)
self.emit.signals.sig.connect(self.sig)
self.emit.signals.int_sig.connect(self.print_data)
def print_data(self, data):
print(data)
def sig(self):
print("signal recieved")
# signals class
class MySignals(QtCore.QObject):
sig = QtCore.Signal()
text_sig = QtCore.Signal(str)
int_sig = QtCore.Signal(int)
class EmitSignals(QtCore.QThread):
QtCore.QThread.__init__(self, parent):
self.signals = MySignals()
self.emit_signals()
def emit_signals(self):
self.signals.text_sig.emit("Emitting text")
self.signals.sig.emit()
self.signals.int_sig.emit(5)
@obtuse drum Okay so quick question, is this for an exam/test or is this for a study guide
wait let him come in this channel
Shoot
sheesh ask them here
um hey sir i wanna know about c++ in addiction subtraction multiplication and division
@rugged root
um i asked
yes wait.
ok
hemlock is a admin,lol
I mean we're not really a C++ server. I do have some links to servers that should be able to help you
ik but need help bruh
I don't know C++
oh
Which is why I'm trying to get you to a place that CAN help
so sir would u like me to send the links
"You vex me. *rolls up keyboard* *THWAK*"
Keyboard to the face.
"This thing has bugs."
"Meh. Pile some features on top of everything. The bugs will get buried underneath and nobody will notice."
noooooo
666 o_O
who made this game?
@brave steppe the nice voice guy is here:).
I got a cold so not so-nice of a voice anymore 
noooooooooooooooooooooooooooooooooooooooooooooooooooooo
👀
sed
you guys playin games?
i have a worse addiction... though i only play like twice an year now
dear God
"Movie Theory"?
it's inappropriate so...
such a good movie
I'm sure you can find an appropriate way to formulate it, or link it or use some spoilers or something.
noice same
haku is the coolest <3
haku and howl
they're really similar xD
lol only in looks right? not in personality
i was going to say you would probably reinstall your operating system with that if you change passwords on a normal netlify app
lol
lol, i just typed whateer i want and put .onion so u guys wud suspect for sure that its a dark web link , lol
no dont click this
lol
jk
my bad @rich cloud
sort of xD. their role in the story is quite similar
i always get lost in the third/final act of howl's moving castle
and don't understand what's going on
click on this link
$ node -p '(0.1 + 0.2).toFixed(100)'
0.3000000000000000444089209850062616169452667236328125000000000000000000000000000000000000000000000000
now doesnt it look sus?
doubles
thanks
this dude is powerful
Dont underestimate him
can i send a rickroll link or somthing?
!mute 884399825360125962 Sassing an admin after they just told you to stop dropping random links is pretty dang rude. Please re-read the #rules and listen to staff
:incoming_envelope: :ok_hand: applied mute to @ebon fractal until <t:1631288469:f> (59 minutes and 58 seconds).
are Ip grabber links allowed?
@vivid palm Unsatisfied with just one patrons tag...you made them give you two?
Boss move.
hahahaha
ya'll wanna know my VPN IP?
it was supposed to be a joke
Hilarious
Sorry, we have enough people trying to do it, so it's irksome
Wasn't planning on it
yay so this means you will make me an admin
hemlock is my mic activating and emitting noise?
it keeps flickering green even tho i'm not saying anything lol
is it feeding back?
~~~~~~~~~~~~~~~~~
/home
sweet
/home
~~~~~~~~~~~~~~~~~
im hearing wierd sounds @rugged root pls ban the sound
answer my question plss
What question
yes
@rugged root
sorry I was typing to someone else
dude this question @rugged root
hi kj
no you have more roles than my purposes in my life
People who laud their power over others just because they have it shouldn't have that power
No fresh sourdough for Hemlock.
That one went over my head
Maybe if you're doing pizza.
same
is this even english?
sourdough is a type of bread IIRC
HA
ok
making bread?

she said that it is a type of bread
It is.
>>> dis('bool(10)')
1 0 LOAD_NAME 0 (bool)
2 LOAD_CONST 0 (10)
4 CALL_FUNCTION 1
6 RETURN_VALUE
>>> dis('not not 10')
1 0 LOAD_CONST 0 (True)
2 RETURN_VALUE
booooooooooooooo @somber heath
print(). The best debugging
^^^^^^^^^^^^^
OMG YOU KNOW THE WORD" LOL"
loguru is great

Sorry what?
jake was showing me loguru, teaching me the ways
I know it
Hi Reddit! /u/xerohour
Fair use claim:
-this serves an educational purpose in demonstrating computer illiteracy as it pertains to American Television
-the clip is far too short to compete in any way with the original product and its intended use
-there is no way that this could be confused with an official broadcast or redistribution by the con...
@vivid palm
import sys
eval('sys.stdout.write(f"{var = }")')
Yeah, I picked the Better Text Readability option
I don't know why I thought the variable and the = had to flush with each other
5 FPS but the best quality
Yep
i don't actually know what this does - show me?
!e
spam = "bacon"
print(f"{spam=}")
@rugged root :white_check_mark: Your eval job has completed with return code 0.
spam='bacon'
!string-formatting
String Formatting Mini-Language
The String Formatting Language in Python is a powerful way to tailor the display of strings and other data structures. This string formatting mini language works for f-strings and .format().
Take a look at some of these examples!
>>> my_num = 2134234523
>>> print(f"{my_num:,}")
2,134,234,523
>>> my_smaller_num = -30.0532234
>>> print(f"{my_smaller_num:=09.2f}")
-00030.05
>>> my_str = "Center me!"
>>> print(f"{my_str:-^20}")
-----Center me!-----
>>> repr_str = "Spam \t Ham"
>>> print(f"{repr_str!r}")
'Spam \t Ham'
Full Specification & Resources
String Formatting Mini Language Specification
pyformat.info
!e
var = 10
import sys
eval('sys.stdout.write(f"{var = }")')
@terse needle :white_check_mark: Your eval job has completed with return code 0.
var = 10
Help on built-in function compile in module builtins:
compile(source, filename, mode, flags=0, dont_inherit=False, optimize=-1, *, _feature_version=-1)
Compile source into a code object that can be executed by exec() or eval().
The source code may represent a Python module, statement or expression.
The filename will be used for run-time error messages.
The mode must be 'exec' to compile a module, 'single' to compile a
single (interactive) statement, or 'eval' to compile an expression.
The flags argument, if present, controls which future statements influence
the compilation of the code.
The dont_inherit argument, if true, stops the compilation inheriting
the effects of any future statements in effect in the code calling
compile; if absent or false these statements do influence the compilation,
in addition to any features explicitly specified.
Help on built-in function eval in module builtins:
eval(source, globals=None, locals=None, /)
Evaluate the given source in the context of globals and locals.
The source may be a string representing a Python expression
or a code object as returned by compile().
The globals must be a dictionary and locals can be any mapping,
defaulting to the current globals and locals.
If only globals is given, locals defaults to it.
Help on built-in function exec in module builtins:
exec(source, globals=None, locals=None, /)
Execute the given source in the context of globals and locals.
The source may be a string representing one or more Python statements
or a code object as returned by compile().
The globals must be a dictionary and locals can be any mapping,
defaulting to the current globals and locals.
If only globals is given, locals defaults to it.
you should try ctrl + home and ctrl + end useful shortcuts 🙂
Sorry about the disturbance in VC
For what?
👀 whatever works for you i was just making a suggestion
prepares to commit a figure 8 loop into the project
for(;;);
i like google style but use sphinx style mostly...
For doc-strings?
:param foo:
yes
@param
.
💯 windows defender just deleted my lua executabble
if you are quick you can tell it to keep it
Oh shit, that might be what was happening with my PowerShell installations
damn
I didn't think to look at that
/**
* blah ...
*/
JsDoc is nice
but the documentation ui isnt amazing
and if you want type hinting
I would just use typescript
Like the amount of effort for payoff isnt the best
but its a good tool
/**
* @param somebody
*/
function sayHello(somebody) {
alert('Hello ' + somebody);
}
somewhat like that
What would the TypeScript type annotation for "anything easily convertable to a normal JavaScript string"?
as in like [].join( SOME_VALUE )
try just adding //@ts-check in a javascript file in vs code
it will give you linting for types without using typescript
no errors just linting
I meant "what is the type for this?"
hi
Just curious
ah i wasn't replying to you just generally saying
School of Rock
ooh thats a cool feature
hi @brave steppe
why "bird"
I don't think theres a type annotation for that
But you can create your own
type coolType = string | string[]
something like that
what is all this random code bluenix
it can take any type where "" + value works
You know in Discord there are like interactions? So the new slash-commands and buttons
ye
I am making a wrapper around that, so that you can design bots around that
beeaaast
i saw that but i really really don't like discord.py so probably gonna use js to make a bot to use those if i ever do
I started studying front/backend. Loved working with discord.py tho but trying out react now
react is fun
Ooooh, how's that going?
i haven't looked at react actually lol. I am about to learn it though. Been working with js/express/node.js first. will probably hit mongodb next and then react
what is mongoose
It's an ORM right?
It allows you to write Python code that becomes SQL queries
So you can use SQL databases without knowing SQL
ohh fancy
A database wrapper as an API ?
No?
as in not using raw SQL queries yourself
Ah, yes
Honestly just aiming to land a React Dev role next year. Just working with js, express, node, mongo, mongoose, and ejs. Not sure what else I might need to know
I think that's good, just keep trying to learn more advanced topics
There was someone in the Devs' Guild that applied for a similar role but was rejected, they received a helpful list.
You could use it as topics to learn
To improve
* Missing knowledge in several JavaScript intermediate topics.
* Lack of experience in the industry
* No debugging skills
* No handle of asynchronism (async/await, Promises)
- Little to none knowledge about a11y.
- Little to none knowledge of what is Mobile First.
- Little knowledge of what SEO.
- Not aware of what is cross browsing.
- No experience with any type of animation, and shows no knowledge of how they can be implemented.
- No knowledge about web components.
- Doesn't understand well how promises work. Little knowledge on whaat they are.
- No knowledge about design patterns.
- Little to none knowledge on what is OOP.
- Hasn't work with task runners.
- No knowledge of web performance.
- No anchors, images to see its SEO/a11y implementation.
- No usage of BEM.
- Did not use SASS
a11y?
- Little to none knowledge about a11y.
a11y= accessibility
I remember that ... and i18n which is "internationalization"
i18n is just named that because it is i, 18 characters, n
Similar to a11y
Chemistry = Exception 😅
SCSS > SASS
this module looks good
BOINC is an open-source software platform for computing using volunteered resources
Okay Pure, I have the functional itch again
What would you say is a good baby's first functional language
Haskell 😏
If you want to do pure frontend do Elm
// JavaScript
const add = (a) => (b) => a + b
But like, for general-ish things, any ML-derivative like OcaML or even F#
I guess for getting a decent handle on all the core concepts
Something like BASIC or Python regarding being a good learning language
Erlang is frustratingly functional
joe mama
...
joe llama
also Hemlock
I suppose a LISP variant wouldn't hurt
hylang 
Scheme/Clojure/Hylang
(defclass FooBar []
(defn __init__ [self x]
(setv self.x x))
(defn get-x [self] self.x))
Scary
import getpass
x = getpass.getpass(prompt='Enter a Password')
The Common Lisp Object System (CLOS) is the facility for object-oriented programming which is part of ANSI Common Lisp. CLOS is a powerful dynamic object system which differs radically from the OOP facilities found in more static languages such as C++ or Java. CLOS was inspired by earlier Lisp object systems such as MIT Flavors and CommonLoops, ...
Isn't that just Emacs already 😄
Basically think of how classes were defined in JS way back
we've gone full circle https://twitter.com/stackblitz/status/1435606484843388932
💡 Node.js tip (6)
You can use React to render things to... terminal – using Ink!
Great tool for building beautiful CLIs! https://t.co/mrzY6ejYUS
120
649
Mom said so
Emacs was made for the terminal 👀
VSCode terminal?
it took me 2 days to get decent speed in vim o-o its not that hard if you just follow vimtutor -> look up some more shortcuts -> just use it
Hello Mina 👀
lololol you heard me
My limited screen space constrained my workflow from split windows to buffer switching
Which is nicer on the eyes
To be fair, all IDEs (/text editors) have their share of elitist bullshit
I'm using .... *checks*
Instead of having to do C-w hjkl to navigate, I have one big window and I just use C-x C-b to switch files
yeah vim vs emacs vs any other editor that is just preference anyway... though i really don't get the point of having a video player and a browser in your editor... emacs
I rarely do window splits unless it's a terminal
Is there always so many people in the vcs?
Usually
Not consistently
at this time yeah
We've capped out to 30 before
1280x720 on my (unknown size) HDTV ... which is over a chair length away from my bed ... since my laptop's screen is like ... unreliable
It can go higher normally
And what are they talking about rn?
Oh Pure, so what would you say are the 3 decent options to learn.
My laptop used to be able to do Virtual Super Resolution from the AMD card it has
i tried ll of them except for Textual i think
because i didn't think anyone was gonna be using it after being told its in beta or sommething
1920x1080 - looked blurry though
Are they discussing like features and stuff?
Features, alternatives, etc.
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
1920x1080 is max (using the HDMI port)
Oh man, there's so many interesting conversations to be had. I'm still short from my 50 msgs to verify voice
Elm/F#/PureScript in order of difficulty
You pretty much have to build an abstraction layer on top of curses anyway.
So you might as well use one written by someone else.
I did like Elm
Although I suggest thinking of Elm as more of an opinionated FP framework than a real FP language
Yeah I think I'll toy with that again
Hmm true....
In fairness I have also been curious about F#
G♭
How long did it take you to find the flat?
do_a() |> do_b(123) |> IO.puts
Would anyone enjoy giving my 16 lines of code a review?: https://paste.pythondiscord.com/bihuwepuye.py
Two years of Haskell taught me not to suggest Haskell as an FP language
Are you learning a functional language Hem? 👀
A space or two at the end of the prompts would make it prettier user side
c += 1
no parenthesis around while 😔
??= and ||= are weird too in js
python doesnt need them
let value = 1.5;
value++;
console.log(value); // output: 2.5
salt did an ansi and an ascii terminal rick roll
I "fixed" it
ASCII ... [0..127]
stream red
Latin-1 ... [0..255]
(idk just trying to rack up the 50 msgs)
I appreciate how much more expressive declarative languages are in terms of horizontal space
If I unfolded this vertically, it'll be less readable
I appreciate you getting those messages by actual conversation
So many folks just try to spam their way to it or put like one word per line
It's so irritating
considering writing a pam module to test blood alcohol levels
??????
lol even i remember that
Sprint's Superbowl commercial that shows a phone that not only has live TV, but a crime deterrent feature. One of the best from 2006's game.
# Use from import so you can use getpass instead off getpass.getpass below
from getpass import getpass
# It's better to use descriptive variable names
real_password = getpass(prompt='Enter a Password')
guessed_password = getpass(prompt='Enter a Guess')
if real_password == guessed_password:
print('You got a match on the first try!')
print(guessed_password)
attempts = 0
# while doesn't need parentheses
while guessed_password != real_password:
attempts = attempts + 1
print('Not a match, try again')
guessed_password = getpass(prompt='Enter a Guess')
if guessed_password == real_password:
# Use f-string to simplify print
print(f'Match. you guessed {attempts} time(s)')
modumb
Overall, it's fine. There's nothing wrong, just things that would improve readability
aboot:blank
what would you call a couch then
Sounds like an interesting expression, could come from gaelic
Why the {} brackets around attempts?
Its an f-string, for string interpolation. Basically puts the str representation of the variable instead of the {variable} template
Really useful
Notice the string is f"The {string}" instead of "The " + string
!fstring
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.
why is this method preffered?
Didnt know there was that, really usefull as well
» docstring
» dotenv
» dunder-methods
» empty-json
» enumerate
» environments
» except
» exit()
» f-strings
» floats
» foo
» for-else
» functions-are-objects
» global
» guilds
!or-gotcha
When checking if something is equal to one thing or another, you might think that this is possible:
if favorite_fruit == 'grapefruit' or 'lemon':
print("That's a weird favorite fruit to have.")
While this makes sense in English, it may not behave the way you would expect. In Python, you should have complete instructions on both sides of the logical operator.
So, if you want to check if something is equal to one thing or another, there are two common ways:
# Like this...
if favorite_fruit == 'grapefruit' or favorite_fruit == 'lemon':
print("That's a weird favorite fruit to have.")
# ...or like this.
if favorite_fruit in ('grapefruit', 'lemon'):
print("That's a weird favorite fruit to have.")
!e
xs = [1, 2, 3]
ys = "{[1]}".format(xs)
print(ys)
pathlib is indeed dope but also slow
was going to say, it's prettier and easier to read as most of the IDEs have syntax highlight for that
@swift valley :white_check_mark: Your eval job has completed with return code 0.
2
Yep, can pull the individual element
!e
v = "v"
print("{.strip}".format(v))
@swift valley :white_check_mark: Your eval job has completed with return code 0.
<built-in method strip of str object at 0x7fd1d847a6b0>
yikes, I never learned that
That would've been useful
!e
v = " v "
print("{.strip()}".format(v))
@swift valley :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | AttributeError: 'str' object has no attribute 'strip()'
!e
!e
foo = {"a" : 1, "b" : 2, "c": 3, "d": 4, "e": 5}
print(foo)
del foo["b"]
print(foo)
del foo["d"]
print(foo)
what's the problem with using a normal dictionary
@woeful salmon :white_check_mark: Your eval job has completed with return code 0.
001 | {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5}
002 | {'a': 1, 'c': 3, 'd': 4, 'e': 5}
003 | {'a': 1, 'c': 3, 'e': 5}
Actually... yeah, that would theoretically work.
where is os.getcwd() defined?
i didn't find it in os.py
what
Bite-Sized Minecraft (1-3):
https://www.youtube.com/watch?v=qloBPxqV7sM
https://www.youtube.com/watch?v=00XJ9qrtyHM
https://www.youtube.com/watch?v=kMoS3z6L2rQ
Very old Minecraft: Java Edition tutorial for the piston thing:
https://www.youtube.com/watch?v=d8Etp3liY1w
Same-ish as last but I made it in Minecraft aka Bedrock Edition much more recently than it:
https://www.youtube.com/watch?v=7yb3U9lSa2Y
Full music video for that "Filler Clip" referenced in one of the 3 at the top:
https://www.youtube.com/watch?v=CiZBw9Memrc
Possibly hard-coded?
Wait no, it evals "v".strip and that's a function pointer
But with "v".strip() fails...
This treats strip() as the attribute itself
How odd
It is a EDSL after all
like in the interperter
It's written in C
oh, thanks.
^
but written where?
I have a list, and check it twice
What attributes does a str have?
Thanks for the review 😄
Modules/posixmodule.c line 3757
static PyObject *```
It should exist for NT as well
Doesn't str have any attributes?
DuckDuckGo
'os.getcwd defined where'
Have site:github.com/python/cpython as a prefix then search the desired function
ah, right
I keep forgetting that's a thing
!e
class Person:
def __init__(self, name):
self.name = name
print("{.name}".format(Person("John")))
@quaint wharf :white_check_mark: Your eval job has completed with return code 0.
John
it apparently includes posix or nt depending on the platform
yeah
drink water folk
It makes more sense if you use templates with multiple keyword placeholders, say:
template = "{option.name} info: There are {option.choices} choices available if your are a {option.role}"
Or like... can you?
I think you can with a template string, yeah
Okay yeah, that actually does make a lot more sense
I think it's the bare {.name} that's giving me the willies
from collections import OrderedDict
DATA = json.loads(JSON_STR, object_hook=OrderedDict)
!e
class Option:
def __init__(self, name, choices, role):
self.name = name
self.choices = choices
self.role = role
op = Option("Option1",31,"admin")
template = "{option.name} info: There are {option.choices} choices available if your are a {option.role}"
print(op.format(option=op))
@quaint wharf :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 10, in <module>
003 | AttributeError: 'Option' object has no attribute 'format'
crap
!e
class Option:
def __init__(self, name, choices, role):
self.name = name
self.choices = choices
self.role = role
op = Option("Option1",31,"admin")
template = "{option.name} info: There are {option.choices} choices available if your are a {option.role}"
print(template.format(option=op))
@quaint wharf :white_check_mark: Your eval job has completed with return code 0.
Option1 info: There are 31 choices available if your are a admin
I feel like I learned something 
look at dataclasses
if you just storing data in class
!e
class Option:
def __init__(self, name, choices, role):
self.name = name
self.choices = choices
self.role = role
op = Option("Option1",31,"admin")
template_fn = "{option.name} info: There are {option.choices} choices available if your are a {option.role}".format
print(template_fn(option=op))
@swift valley :white_check_mark: Your eval job has completed with return code 0.
Option1 info: There are 31 choices available if your are a admin
heh
I would rather
template_fn = lambda option: f"{option.name} info: There are {option.choices} choices available if your are a {option.role}"
images -which become containers-> Containers <--- Kubernetes manages those
Like this doesnt throw error if the parameter is not key named in function call
@quaint wharf I'm going to show you something with the bot
!e ```py
import sys
UNICODE_TEMPLATE = 'U+{{:0{:d}X}}'.format(
len('{:x}'.format(sys.maxunicode))
)
print(UNICODE_TEMPLATE.format(ord('`')))
@primal yacht :white_check_mark: Your eval job has completed with return code 0.
U+000060
how many of you know that / in arguments makes anything before it positional only
I do
just curious cuz i didn't know for a long time
It sucks
You can use numeric prefixed in the format spec
Why?
Examples? Didnt know
What do you mean, it's great
#bot-commands message
Why not give someone the option of using kwargs if they want to?
!e
def foo(a, b, /):
return a, b
print(foo(2, b=20))
@woeful salmon :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 4, in <module>
003 | TypeError: foo() got some positional-only arguments passed as keyword arguments: 'b'
But then you can't key name the parameters in function calls 
Like lambda allows both I think
Alright, gonna eat
Responsible API design goes a long way
I'll be back to have mental breakdowns over lists and dicts
First thing that comes to mind would be fore coordinates
!e ```py
class JSONishDict(dict):
def init(self, /, **pairs):
super().init(pairs)
x = JSONishDict(spam = 'eggs', self = 'this')
print(x)
@primal yacht :white_check_mark: Your eval job has completed with return code 0.
{'spam': 'eggs', 'self': 'this'}
You'd want that to be in a specific order
That's a fair argument for kwarg-only
And you'd rarely be doing it via kwargs
Perfect, use kwargs to be explicit x=..., y=...
coordinates should be labeled
not if you want it like I put it in my example I just placed
N<blah> E<blah>