#voice-chat-text-0
1 messages ยท Page 79 of 1
I've not used Windows for a long time, so I don't know the field of play is like.
But Wookie does seem to be attending you.
ok
if member in current_players:
return
if len(current_players) >= 10:
await member.disconnect()
return
current_players.append(member)```
If member is not in current_players and current_players is <= 10
if member in current_players:
return
elif len(current_players) >= 10:
await member.disconnect()
return
else:
current_players.append(member)```As an experiment in readability.
you can return only once as well
in the end
we can!:{
in a function
how do i make it colorful:{}
!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.
py
if member in current_players:
return
if len(current_players) >= 10:
await member.disconnect()
if member not in queue:
queue.append(member)
return
current_players.append(member)```
after spending hours finally
What y'all doin
a code
for matchmaking
i see no prblm with it though
this is the code he thinks a take on
Can you give me a summary of the requirements?
Oh, what is this for?
Ah right ok
The logic looks ok to me.
There might be a race-condition if two people join at the same time.
I.e. you may end up with 11 people in the game.

If two people leave, then two new people join at the same time, you could end up adding both people.
Actually, wait
It it's asyncio there won't be a race condition. Sorry.
I was thinking about threaded code for some reason.
So is there an issue with it currently?
๐
!paste
Pasting large amounts of code
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.
If it's a single file.
Do you have a wide monitor? ๐
@simple siren ๐
Hello gang...
I usually use black (code formatter).
I see people in the room but I am not hearing anyone.
๐ Just taking a look at it. I'm a bit of a slow reader so this may take a while lol
No worries ๐
is anyone speaking in voice chat? I see the green light but I am not hearing anyone.
Probably Hettinger
Yeah, maybe try refreshing your client.
Yes
nope still can't hear. I can hear when I enter the chatroom just not you guys. So I know my volume is up.
Im making a login/register system
Signature: list.remove(self, value, /)
Docstring:
Remove first occurrence of value.
Raises ValueError if the value is not present.
Type: method_descriptor
current_players.append(member)
try:
queue.remove(member)
except ValueError:
pass```
discard?
sounds like delete
is it the same? opal?
i use delete by using indexes
Are you assigning any kind of role to players?
set.remove set.discard @sharp urchin
hmmm
sounds sumthing new
an example perhaps?
would be helpful
also can it be done by using the delete function?
Right ok
Yeah I know what you mean I think
If someone's been in the queue for a long time, they get removed?
Hmm, that would be an "invariant" you might want to check.
Erm, it essentially means something which should always be true.
In this case, there should never be anyone in both current_player and queue.
hello @sly yarrow
if member in current_players:
try:
queue.remove(member)
except ValueError:
pass
return```

!paste
Pasting large amounts of code
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.
lmao
Sorry dude I gtg
I recommend asking for help in #discord-bots if you haven't already
No worries, you too!
๐

I can hear you Maro
I could use some help or point me to the direction. I have WT32-ETH01 I am trying to find a code to use this board as a portable wireless dymanic wap. I will be wiring up a 18650 battery. I want to hook it to our company's network switch to broadcast a wifi signal so I can use my cell or laptop. Github has hundreds of libraries but the readme and terminology is hard to underground.
I am having to youtube with example of each library to better understand it.
Hootoo used to have one that worked great but is no longer made. ๐ฆ
@barren pebble ๐
async def check_missing_players():
while True:
for member in current_players:
if (member.voice is None or (
member.voice.channel and member.voice.channel.id not in [712072729406472374, 712073013947924600,
712073052854157342])):
last_seen = datetime.now()
if (datetime.now() - last_seen).total_seconds() >= 60:
current_players.remove(member)```
@pseudo talon ๐
hey @midnight agate
@whole bear๐
Hi
brb
hello bossman
this = {"userid":"last_seen"}
def check_missing_players():
global this
pass
hmm i agree
they all just need the access tot he real last seen time
in order to disconnect
instantly
user_dict = {}
async def check_missing_players():
global user_dict
while True:
for member in current_players:
if (member.voice is None or (
member.voice.channel and member.voice.channel.id not in [712072729406472374, 712073013947924600,
712073052854157342])):
if user_dict.get(member.id, None):
user_dict[member.id] = datetime.now()
continue
if (datetime.now() - last_seen).total_seconds() >= 60:
current_players.remove(member)
gtg now. i will keep searching. getting burned out.
async def remove_member_from_current_players(member):
if member.voice is None or (
member.voice.channel and member.voice.channel.id not in [712072729406472374, 712073013947924600,
712073052854157342]):
if member in current_players:
current_players.remove(member)
async def on_voice_state_update(member, before, after):
if (before.channel and before.channel.id in [712072729406472374, 712073013947924600, 712073052854157342]) and (
after.channel is None or after.channel.id not in [712072729406472374, 712073013947924600,
712073052854157342]):
asyncio.get_event_loop().call_later(60, remove_member_from_current_players, member)```

Yo
Ah right
Are you working to a deadline?
Ah right ๐
The code above?
What's the desired behaviour? Just remove someone if they've been out of the voice channel for 60 seconds?
I'd probably just periodically check for idle players.
I think the code above may fail in some cases where someone joins and leaves a few times.
E.g. if they happen to be out of the channel 60s after they previously left the channel (even if they've been in the channel in the intermediate period).
Check out the discord.py tasks extension.
Ah yeah
What I find helps is to start with a clear design spec.
Sure ๐
Oh right
lx
Working on his bot
thnku
alix
@sharp urchinbtr than me
I think so yes. I don't have much experience with it myself, but it's a good place to practice data-science stuff.
from my limited knowledge.. basically presenting and analysing data
Erm, so they have competitions where you are given some real data and have to develop models.
Yeah just get started I think ๐
They do have some short courses too.
There's tonnes of ML learning material online.
Any course from a reputable university is going to be ok.
@sharp urchinakhi your dopamine levels for starting this is just op
Yeah. You just need to pick one and go with it.
What level is your mathematical education at?
mhmm.. yep
Sorry, I didn't understand.
a levels
Oh right
It depends how advanced you want to go ๐
Right
Solid knowledge of statistics is essential.
noted
regression correlation and all that jazz lol
If you're doing research in the field, you may need more advanced mathematics.
# Check for idle players
@tasks.loop(seconds=60)
async def check_for_idle_players():
for member in current_players:
if member.voice is None or (member.voice.channel and member.voice.channel.id not in [712072729406472374, 712073013947924600, 712073052854157342]):
current_players.remove(member)```
Hmm, you need to keep track of when each member was last in the channel I think ๐ค

later @maiden beacon
When a player leaves the channel, make a note of the time they left.
Yeah sorry ๐
if (member.voice and member.voice.channel and
member.voice.channel.id not in [712072729406472374, 712073013947924600, 712073052854157342]):```
Erm, I'm not sure I understood sorry.
1. if member.voice is None or (member.voice.channel and member.voice.channel.id not in [712072729406472374, 712073013947924600, 712073052854157342]):
2. if (member.voice and member.voice.channel and
member.voice.channel.id not in [712072729406472374, 712073013947924600, 712073052854157342]):```
Erm, so here's sort of psuedocode for how you could remove players:
absent_players = {}
KICK_AFTER = 60
def on_leave(member):
absent_players[member.id] = now()
def on_join(member):
absent_players.pop(member.id)
def every_60_seconds():
idle_players = {
player
for player, last_seen in absent_players.items()
if now() - last_seen > KICK_AFTER
}
for player in idle_players:
remove(player)
Oh
No it's just a sketch.
Right ok
go ahead
Yeah so this isn't code that will actually run, but is just to illustrate an approach you could take to removing idle players.
im trying to import a module file but i m not sure im doing it correectly
now() is just a function that returns some kind of time-stamp for the current time (in this example)
Right, you want subtotal.subtotal().
You have a function called subtotal in a module called subtotal.
@true palm 
Btw, you probably don't want to call subtotal in the subtotal module.
As this will mean it is called every time the module is imported.
And generally, it's a good idea to put imports at the top of the file, outside of any function bodies.
No probs 
alright i have done it
but how do i make the variable recognize with the imported file
i have to make it subtotal for my assignment sadly
this is my prompt for my assimgnet
im able to create the code in one module
i just dont know how to seperate them into different moduel
yeah I was just saying it's a shame I'm not part of the two letter name club anymore
ABBA
Having an Echo is really annoying when your name is Alex, as I learned
Ah sorry @true palm I didn't see you'd asked another question. You might get better help asking in #1035199133436354600
nah you good
Have you written a design document for this?
It definitely helps me organise my thoughts when I'm programming.
BWHAHAH
ohhh okok
your doing some voice recognition stuff?
Yeah, you need some way of keeping track of when they left
Right. Erm it's not completely clear to me what behaviour you want sorry.

It's essentially just a short document where you describe how you want the software to behave.
And plan out different scenarios/use-cases.
@terse needle have you used lark (parsing library)?
Oh
Erm, it's just a regular old parser ๐
But it's pretty good. Was trying it out yesterday/today.
next_player = queue.popleft()
current_players[next_player] = datetime.datetime.now()```
have you see mustafas parser combinator
it's very cool
Yeah that's one way you could do it ๐
What's the context of this code sorry?
have you seen his weird math library
no
!eval ```py
from lark import Lark
english_grammar = '''
start: sentence
sentence: noun_phrase verb_phrase
noun_phrase: DETERMINER? ADJECTIVE? NOUN prepositional_phrase?
verb_phrase: VERB noun_phrase? prepositional_phrase?
prepositional_phrase: PREPOSITION noun_phrase
NOUN: "I" | "elephant" | "pyjamas" | "time" | "arrow" | "flies" | "fruit" | "banana"
VERB: "shot" | "flies" | "like"
ADJECTIVE: "red" | "yellow" | "fruit"
DETERMINER: "the" | "a" | "an" | "this" | "that" | "my"
PREPOSITION: "in" | "on" | "like"
%import common.WS
%ignore WS
'''
parser = Lark(english_grammar, ambiguity='explicit')
sentence = 'fruit flies like a banana'
tree = parser.parse(sentence)
print(tree.pretty())
@stuck furnace :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | start
002 | _ambig
003 | sentence
004 | noun_phrase fruit
005 | verb_phrase
006 | flies
007 | prepositional_phrase
008 | like
009 | noun_phrase
010 | a
011 | banana
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/qumifowuwa.txt?noredirect
@terse needle 
Ah it was already in the bot surprisingly
it overrides the math operators
Anyway, that's a demo of syntactic ambiguity in the English language 
Same with parsync, albeit in a much cooler way
See also: "I shot an elephant in my pyjamas"
very cool
also very cool
ustafa is one smart ๐ช
@verbal zenith Check out this if you're interested in writing a CAS: https://colab.research.google.com/github/norvig/pytudes/blob/main/ipynb/Differentiation.ipynb
Yep ๐
Nope
Erm, Peter Norvig
Oh right yeah.
I think every programmer should write a parser at least once ๐
Mhm
peter norvig = neat stuff
!e ```def test(strings):
result = []
for i ,num1 in enumerate(strings):
for j ,num2 in enumerate(strings):
if num1 + num2 == 0:
result.append((i , j ))
return result
string = [1232, -20352, 12547, 12440, 741, 341, 525, 20352, 91, 20]
print(test(string)) ```
@sharp urchin :white_check_mark: Your 3.11 eval job has completed with return code 0.
[(1, 7), (7, 1)]
Ah right yep, because you're considering both cases.
You should check that i < j.
Or, only iterate over j from i+1 to n.
Yeah a more efficient way to do this is to use a hash-table.
But to make your current solution work, you need to exclude the cases where i >= j.
sets and dicts are hash tables.
def test(strings):
result = []
for i ,num1 in enumerate(strings):
for j ,num2 in enumerate(strings):
if i < j and num1 + num2 == 0:
result.append((i , j ))
return result
!e
def test(strings):
result = []
for i ,num1 in enumerate(strings):
for j ,num2 in enumerate(strings):
if num1 + num2 == 0 and i>j:
result.append((i , j ))
return result
string = [0, 0, 1232, -20352, 12547, 12440, 741, 341, 525, 20352, 91, 20]
print(test(string))
@verbal zenith :white_check_mark: Your 3.10 eval job has completed with return code 0.
[(1, 0), (9, 3)]
Yeah. The problem with this approach though is that the running time grows with the square of the length of the list.
So if you have a long input, it will take a really long time.
Yep
Oh right?
๐

!e ```py
def test(strings):
result = []
for i ,num1 in enumerate(strings):
for j ,num2 in enumerate(strings):
if num1 + num2 == 0 and i != j:
result.append((i , j ))
return result
strings = [1232, -20352, 12547, 12440, 741, 341, 525, 20352, 91, 20]
print(test(strings))
```py
```py
code
```
Which code sorry @rapid chasm ?
The stack idea? 
Sorry I think I missed something
!e ```py
def test(strings):
result = []
for i ,num1 in enumerate(strings):
for j ,num2 in enumerate(strings):
if num1 + num2 == 0 and (j,i) not in result:
result.append((i , j ))
return result
strings = [1232, -20352, 12547, 12440, 741, 341, 525, 20352, 91, 20]
print(test(strings))```
@sharp urchin :white_check_mark: Your 3.11 eval job has completed with return code 0.
[(1, 7)]
absent_players = {}
KICK_AFTER = 60
def on_leave(member):
absent_players[member.id] = now()
def on_join(member):
absent_players.pop(member.id)
def every_60_seconds():
idle_players = {
player
for player, last_seen in absent_players.items()
if now() - last_seen > KICK_AFTER
}
for player in idle_players:
remove(player)```
Nah. I never really parse long explanations sorry. After like 10 words my brain shuts off ๐
lmao same with me
i couldnt comprehend
the code
after a while
also i think its a raw code isnt it?
Yeah, I wasn't too sure about the delayed call thing.
Yep ๐
You don't have to call it "every_60_seconds"
Yeah, in the example it's a dictionary mapping user-ids to the timestamp they were last seen at.
[(memberid, last_seen), ...] vs {memberid: last_seen, ...}
Errrr
I guess you could.
I never have though.
Actually wait, I did implement a toy hash table on a course I took.
.
Erm, I'm not sure sorry.
@stuck furnace Could I use member instead of member.id for absent_players.pop(member.id)
I'm not sure whether discord.py member objects are hashable.
Which is a requirement for using a value as a key in a dictionary
Yep
absent_players = []
Using the ID, which is just a number, may be simpler.
Both the member object, and the ID are representations of a member.
In this case all you need is a representation that uniquely identifies members.
next_player = queue.popleft() # Get the next player in the queue and remove them from the deque
current_players.append(next_player)
await ctx.send(f'{next_player.mention} You are up next! Please join the [#712072729406472374](/guild/267624335836053506/channel/712072729406472374/) voice channel to begin your game.')
absent_players[next_player.id] = datetime.datetime.now()```
Hey Rabbit ๐
!e python import datetime print(datetime.datetime.now())
@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.
2023-02-12 19:01:56.188273
!e python import time print(time.time())
@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.
1676228578.7616389
You can subtract one datetime object from another and get a timedelta.
But dealing with unix timestamps is probably simpler.
!e
import datetime
from time import sleep
now = datetime.datetime.now()
sleep(2)
then = datetime.datetime.now()
print(now<then)
!e python import time import datetime a = int(time.time()) print(a) print(datetime.datetime.fromtimestamp(a))
@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1676228676
002 | 2023-02-12 19:04:36
@verbal zenith :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
int(time.time())
what are you guys doing ?
@verbal zenith My quick attempt at making a hash table: ```py
class MyHashTable:
def init(self):
self.buckets = [[] for _ in range(20)]
def __setitem__(self, key, value):
if key in self:
del self[key]
self.get_bucket(key).append((key, value))
def __getitem__(self, key):
try:
return next(
v
for k, v in self.get_bucket(key)
if k == key
)
except StopIteration:
raise KeyError
def __delitem__(self, key):
bucket = self.get_bucket(key)
try:
idx = next(
i
for i, (k, v) in enumerate(bucket)
if k == key
)
except StopIteration:
raise KeyError
del bucket[idx]
def __contains__(self, key):
return any(
key == k
for k, v in self.get_bucket(key)
)
def get_bucket(self, key):
return self.buckets[hash(key) % len(self.buckets)]
Yep 
It's not dynamically sizing, so performance will degrade pretty quickly.
Sorry, I'm being called way ๐
!e
class MyHashTable:
def __init__(self):
self.buckets = [[] for _ in range(20)]
def __setitem__(self, key, value):
if key in self:
del self[key]
self.get_bucket(key).append((key, value))
def __getitem__(self, key):
try:
return next(
v
for k, v in self.get_bucket(key)
if k == key
)
except StopIteration:
raise KeyError
def __delitem__(self, key):
bucket = self.get_bucket(key)
try:
idx = next(
i
for i, (k, v) in enumerate(bucket)
if k == key
)
except StopIteration:
raise KeyError
del bucket[idx]
def __contains__(self, key):
return any(
key == k
for k, v in self.get_bucket(key)
)
def get_bucket(self, key):
return self.buckets[hash(key) % len(self.buckets)]
x = MyHashTable()
x["test"] = 6
print(x)
print(x["test"])
Back in a bit ๐
@verbal zenith :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | <__main__.MyHashTable object at 0x7fe40905c0d0>
002 | 6
How do you know when to call def every_60_seconds():? Should this been done with a task loop that runs every 10 seconds or so?
what are they talking about @uncut meteor
Could do. That would ensure that the longest anyone can be idle before being removed is 70s.
Is there any other way to do it? Lets say to only call it when a user has been added?
!e ```python
import random
a = 0
while a < 30:
print(random.randint(0,1))
a += 1
@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1
002 | 0
003 | 1
004 | 0
005 | 0
006 | 0
007 | 0
008 | 0
009 | 0
010 | 1
011 | 1
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/ovalosuzix.txt?noredirect
!kindling @vocal abyss
Kindling Projects
The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.
@whole bear I'm off to dinner, now, so hi bye. ๐
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
i have a question regarding decorators:
@register.func()
def test():
pass
if we assume that the register is a function, and the register access some element inside this function or what is this?
i have seen decorators, but it was like this
@register
def test():
pass
without dot and etc
i got this idea from the django framework Templatetags
from django import template
register = template.Library()
@register.simple_tag()
def total_posts():
pass
and I want to understand the logic behind register decorator
@dim raven ๐
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
i got it
@jagged olive ๐
hey
hello
hello bossman
any suggestions?
this own who knows?
this
!e
def test():
variable = 2
test.__dict__
@sly yarrow :warning: Your 3.11 eval job has completed with return code 0.
[No output]
absent_players = {}
absent_players = []
absent_players = ()
I'll have to chew on this.
I've done it before, it's just my brain isn't having a bar of it right now.
glad:}
Or have I done it before?
100$ isnt that much
job = consistent pay
tip = bad
thats debt then
thats even worse
freelancing you mean
respect ๐
not a lot of ppl would do that
!e ```py
class A:
def b():
def c(func):
def d(v):
return func(v) * 2
return d
return c
@A.b()
def func(v):
return v
print(func(5))``` @sly yarrow Maybe? I can't help but feel as though the number of circumstances in which you'd use this would be limited.
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
10
๐
recursion then?
i like it
woops mixup
@somber heath
!e ```py
def func():
pass
func.v = 5
print(func.v)```
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
5
!e ```py
def func():
func.v = 5
func()
print(func.v)
print(dir(func))```
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 5
002 | ['__annotations__', '__builtins__', '__call__', '__class__', '__closure__', '__code__', '__defaults__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__get__', '__getattribute__', '__getstate__', '__globals__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__kwdefaults__', '__le__', '__lt__', '__module__', '__name__', '__ne__', '__new__', '__qualname__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'v']
!e ```py
def func():
pass
func.a, func.b, func.c = 1, 2, 3
print(func.dict)```
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
{'a': 1, 'b': 2, 'c': 3}
!e
def test():
s = 32
try:
print(variable)
except NameError as e:
pass
test.__dict__["variable"] = "hello"
test()
!e ```py
def func():
pass
func.dict['a'] = 5
print(func.a)```
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
5
s = s.replace("IV", "IIII").replace("IX", "VIIII").replace("XL", "XXXX").replace("XC", "LXXXX").replace("CD", "CCCC").replace("CM", "DCCCC")```
class Solution:
def romanToInt(self, s: str) -> int:
roman_to_integer = {
'I': 1,
'V': 5,
'X': 10,
'L': 50,
'C': 100,
'D': 500,
'M': 1000,
}
s = s.replace("IV", "IIII").replace("IX", "VIIII").replace("XL", "XXXX").replace("XC", "LXXXX").replace("CD", "CCCC").replace("CM", "DCCCC")
return sum(map(lambda x: roman_to_integer[x], s))
class Solution(object):
def romanToInt(self, s):
dict_of_num = {
'I':1,
'V':5,
'X':10,
'L':50,
'C':100,
'D':500,
'M':1000,
}
n = 0
tmp = dict_of_num[s[0]]
for i in s:
if dict_of_num[i] > tmp:
n += dict_of_num[i] - (2*tmp)
else:
n += dict_of_num[i]
tmp = dict_of_num[i]
return n
!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!
i will take the win then
thank you
:}
ly opal < 3
yes yes
i win
:{}
thanks opal
your a lovely guy
:}
yes yes:{}
yes it does
ty:}
def estimate_mmr_from_tier_and_rank(tier_and_rank):
mapping = {
"Unranked": 1300,
"Iron 4": 1100,
"Iron 3": 1125,
"Iron 2": 1150,
"Iron 1": 1175,
"Bronze 4": 1200,
"Bronze 3": 1225,
"Bronze 2": 1250,
"Bronze 1": 1275,
"Silver 4": 1400,
"Silver 3": 1425,
"Silver 2": 1450,
"Silver 1": 1475,
"Gold 4": 1600,
"Gold 3": 1625,
"Gold 2": 1650,
"Gold 1": 1675,
"Platinum 4": 1800,
"Platinum 3": 1825,
"Platinum 2": 1850,
"Platinum 1": 1875,
"Diamond 4": 2000,
"Diamond 3": 2025,
"Diamond 2": 2050,
"Diamond 1": 2075,
"Master 4": 2200,
"Master 3": 2225,
"Master 2": 2250,
"Master 1": 2275,
"Grandmaster 4": 2400,
"Grandmaster 3": 2425,
"Grandmaster 2": 2450,
"Grandmaster 1": 2475,
"Challenger 4": 2600,
"Challenger 3": 2625,
"Challenger 2": 2650,
"Challenger 1": 2675
}
return mapping.get(tier_and_rank)```
@chrome pewter
def estimate_mmr_from_tier_and_rank(tier_and_rank):
with open("mapping.json", "r") as f:
mapping = json.load(f)
return mapping.get(tier_and_rank)```
{
"Unranked": 1300,
"Iron 4": 1100,
"Iron 3": 1125,
"Iron 2": 1150,
"Iron 1": 1175,
"Bronze 4": 1200,
"Bronze 3": 1225,
...........
}```
with open("mapping.json") as f:
mapping = json.load(f)
#Then every time you'd call estimate_mmr_from_tier_and_rank, instead...
mapping.get(tier_and_rank)```
Plus, loading it up from a file within the def means it reads it every time.
@royal reef ๐
๐
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@whole bear ๐
๐ถโ๐ซ๏ธ
import discord
from discord.ext import commands
class Select(discord.ui.Select):
def __init__(self):
options=[
discord.SelectOption(label="Blue", emoji="๐ฆ", description="Blue role"),
discord.SelectOption(label="Red", emoji="๐ฅ", description="Red role"),
discord.SelectOption(label="Green", emoji="๐ฉ", description="Green role"),
]
super().__init__(placeholder="Choose your team", max_values=1, min_values=1, options=options)
async def callback(self, interaction: discord.Interaction):
print(1)
user = interaction.user
print(user)
print(2)
guild = interaction.guild
print(3)
if self.values[0] == "Blue":
print(4)
role = await guild.create_role(name="Blue", color=discord.Color.blue())
print(5)
print(role)
await user.edit(roles=[role])
print(6)
await interaction.response.send_message("Team Blue", ephemeral = True)
print(7)
elif self.values[0] == "Red":
role = await guild.create_role(name="Red", color=discord.Color.red())
await user.edit(roles=[role])
await interaction.response.send_message("Team Red", ephemeral = True)
elif self.values[0] == "Green":
role = await guild.create_role(name="Green", color=discord.Color.green())
await user.edit(roles=[role])
await interaction.response.send_message("Team Green", ephemeral = True)
class SelectView(discord.ui.View):
def __init__(self, *, timeout=30):
super().__init__(timeout=timeout)
self.add_item(Select())
class Role(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
async def role(self, ctx):
await ctx.send("Pick a role", view=SelectView(), delete_after=15)
async def setup(bot):
await bot.add_cog(Role(bot))
"good"
!paste
Pasting large amounts of code
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.
1
Osyra#5781
2
3
4
5
Blue
5Blue1Brown
:{}
later
for i in range(len(strs[0])):
if strs[0][i] == strs[-1][i]:
prefix += strs[0][i]```
or```py
a = [[1,2],3]
!e py strs = 'abc', 'defg', 'hijkl' print(strs[0])
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
abc
len('abc')```
!e
strs = ['abc','efg']
print(strs[0][1])
@chrome pewter :white_check_mark: Your 3.11 eval job has completed with return code 0.
b
!e py text = "apple" for i in range(len(text)): print(text[i])However...
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | a
002 | p
003 | p
004 | l
005 | e
!e py text = "apple" for letter in text: print(letter)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | a
002 | p
003 | p
004 | l
005 | e
!e py text = "apple" for i, letter in enumerate(text): print(i, letter)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 0 a
002 | 1 p
003 | 2 p
004 | 3 l
005 | 4 e
!e
text = "Opal"
for i in range(len(text)):
print(text[i])
@chrome pewter :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | O
002 | p
003 | a
004 | l
!e py text = "apple" for i, _ in enumerate(text): print(text[i], text[-i])
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | a a
002 | p e
003 | p l
004 | l p
005 | e p
!e py text = "apple" for a, b in zip(text, text[::-1]): print(a, b)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | a e
002 | p l
003 | p p
004 | l p
005 | e a
!e
exit()
@chrome pewter :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'exit' is not defined
!e py import sys sys.exit()
@somber heath :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e py import sys sys.exit(9001)
@somber heath :warning: Your 3.11 eval job has completed with return code 41.
[No output]
41? Boo hiss.
The thing with the Python bot's Python environment, Snekbox, it's all sandboxed and built and torn down each time.
So importing sys is not a security issue.
!e
dir()
@hoary olive :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e
print(dir())
@hoary olive :white_check_mark: Your 3.11 eval job has completed with return code 0.
['__annotations__', '__builtins__', '__doc__', '__loader__', '__name__', '__package__', '__spec__']
!e
print(__builtins__)
@hoary olive :white_check_mark: Your 3.11 eval job has completed with return code 0.
<module 'builtins' (built-in)>
!e
__builtins__.__dict__['dir'] = None
print(dir)
@hoary olive :white_check_mark: Your 3.11 eval job has completed with return code 0.
None
!e
import os
os.system('/shutdown')
@chrome pewter :warning: Your 3.11 eval job has completed with return code 0.
[No output]
code
!e
_builtins__.__dict__['abs'] = None
print(abs(-100))
@hoary olive :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name '_builtins__' is not defined. Did you mean: '__builtins__'?
fuck you stupid bot
!e
code
!eval [python_version] <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.
If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside of them.
By default your code is run on Python's 3.11 beta release, to assist with testing. If you run into issues related to this Python version, you can request the bot to use Python 3.10 by specifying the python_version arg and setting it to 3.10.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!
@obsidian dragon :white_check_mark: Your 3.11 eval job has completed with return code 0.
hello world
!e
print(1/0)
@obsidian dragon :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | ZeroDivisionError: division by zero
!e
print(dir("../"))
@obsidian dragon :white_check_mark: Your 3.11 eval job has completed with return code 0.
['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'removeprefix', 'removesuffix', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
!e
print(dir("../../../../../../"))
@obsidian dragon :white_check_mark: Your 3.11 eval job has completed with return code 0.
['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'removeprefix', 'removesuffix', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
@stark osprey ๐
!e
import socket
hostname = socket.gethostname()
IPAddr = socket.gethostbyname(hostname)
print("Your Computer Name is:" + hostname)
print("Your Computer IP Address is:" + IPAddr)
@obsidian dragon :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 3, in <module>
003 | socket.gaierror: [Errno -3] Temporary failure in name resolution
@obsidian dragon :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e py import os print(os.listdir('/'))
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
['usr', 'snekbox', 'lib64', 'lib', 'etc']
!e
import os
print(os.listdir('/../'))
@obsidian dragon :white_check_mark: Your 3.11 eval job has completed with return code 0.
['usr', 'snekbox', 'lib64', 'lib', 'etc']
!e
import os
print(os.listdir('/../../'))
@obsidian dragon :white_check_mark: Your 3.11 eval job has completed with return code 0.
['local', 'lib']
!e
import os
print(os.listdir('/../../'))
@obsidian dragon :white_check_mark: Your 3.11 eval job has completed with return code 0.
['usr', 'snekbox', 'lib64', 'lib', 'etc']
!e
code
!eval [python_version] <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.
If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside of them.
By default your code is run on Python's 3.11 beta release, to assist with testing. If you run into issues related to this Python version, you can request the bot to use Python 3.10 by specifying the python_version arg and setting it to 3.10.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!
!e
import sys
if sys.platform == 'win32':
import win32_sysinfo as sysinfo
elif sys.platform == 'darwin':
import mac_sysinfo as sysinfo
elif 'linux' in sys.platform:
import linux_sysinfo as sysinfo
#etc
print 'Memory available:', sysinfo.memory_available()
@obsidian dragon :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 10
002 | print 'Memory available:', sysinfo.memory_available()
003 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
004 | SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
!e
import sys
if sys.platform == 'win32':
import win32_sysinfo as sysinfo
elif sys.platform == 'darwin':
import mac_sysinfo as sysinfo
elif 'linux' in sys.platform:
import linux_sysinfo as sysinfo
#etc
print('Memory available:', sysinfo.memory_available())
@obsidian dragon :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 7, in <module>
003 | ModuleNotFoundError: No module named 'linux_sysinfo'
arggg... my current iteration of a script makes calls to an api to get historical data.. ive compounded the requests as much as possible i think, how ever is like 10requests per device.. running almost 1k devices atm the api has slowed my script down from 5 to 10mins.. such a pain.
!e
import sys
print(sys.platform)
@obsidian dragon :white_check_mark: Your 3.11 eval job has completed with return code 0.
linux
did you have a question?
not really, just venting
round robin updates with only update pust when data changes
still trying to do something with the same algorithm
rainbow
those two were after I added multiprocessing (and did it incorrectly)
!e
import os
os.system('sudo apk add nodejs npm')
@obsidian dragon :warning: Your 3.11 eval job has completed with return code 0.
[No output]
then I added primitive post-processing (median to reduce noise)
!d subprocess
Source code: Lib/subprocess.py
The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. This module intends to replace several older modules and functions:
os.system
os.spawn*
``` Information about how the [`subprocess`](https://docs.python.org/3/library/subprocess.html#module-subprocess "subprocess: Subprocess management.") module can be used to replace these modules and functions can be found in the following sections.
"connect to their input/output/error pipes"
also, I changed the algorithm in such way that it has .1% chance to overwrite the node it's already visited but it's not very noticeable
i have that, but need first to get the 10 historical data points.. then if changed i walk back 6hrs increments until the change is found.. which the current dataset is equal to 1st history points.. so im guess its going to be a lot slower if the values do change.. but aye, accuracy over speed.
@jade surge ๐
use partial data when full data is not needed/is the same
I just realised why using normal distribution in colour mutation was kind of a correct choice
self.colour += k * np.random.normal(0, 1.0, size=C)
it's uniform in terms of rotation
this uses normal
discord.py has colour as default, iirc
with color aliased to it
timeout_task = timeout_dict.get(member)
if timeout_task:
timeout_task.cancel()```
@devout agate ๐
{}/dict() is good for in-memory storage depending on what you store
!e py None.cancel()
@somber heath :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | AttributeError: 'NoneType' object has no attribute 'cancel'
time data may be better stored in a database
it's against the rules to sell anything
write your own database, spend two years making it work
!paste
Pasting large amounts of code
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.
async def remove_player_after_timeout(member):
await asyncio.sleep(10)
current_players.remove(member)
del timeout_dict[member]
@client.event
async def on_voice_state_update(member, before, after):
# Check the customs voice channels
if (before.channel is None or before.channel.id not in [1067853227237851177, 1067853355688402995, 1067853377435869335]) and (after.channel and after.channel.id in [1067853227237851177, 1067853355688402995, 1067853377435869335]):
if member in current_players:
# Member is already in current_players, so cancel their previous timeout task
timeout_task = timeout_dict.get(member)
if timeout_task:
timeout_task.cancel()
return
if len(current_players) >= 2:
# There are already 2 players in current_players, so disconnect the new member
await member.move_to(None)
return
# Member is not in current_players and there's room, so add them to current_players
current_players.append(member)
if (before.channel and before.channel.id in [1067853227237851177, 1067853355688402995, 1067853377435869335]) and (after.channel is None or (after.channel and after.channel.id not in [1067853227237851177, 1067853355688402995, 1067853377435869335])):
if member in current_players:
# Member has left one of the voice channels, so start a timeout task
timeout_task = asyncio.create_task(remove_player_after_timeout(member))
timeout_dict[member] = timeout_task```
replace (before.channel and before.channel.id in [1067853227237851177, 1067853355688402995, 1067853377435869335]) and (after.channel is None or (after.channel and after.channel.id not in [1067853227237851177, 1067853355688402995, 1067853377435869335])) with a function/method call
if joined(before) and not joined(after):
if member in current_players:
timeout_dict[member] = asyncio.create_task(remove_player_after_timeout(member))
def joined(state):
return state.channel and state.channel.id in [1067853227237851177, 1067853355688402995, 1067853377435869335]
almost each place the code has comments, they're either useless or the code can be improved to make them useless
explanatory comments are rarely useful for telling what the code does
("imperative comments"?)
idk how to name that species of comments
the code should have documentation not comments
comments of this style indicate you can extract a method/function
# do <name of a block>
...
...
...
...
...
...
like
# check if user left the call
...
...
...
...
result = ...
...
encoding?
in most places that would be
if left_the_call(...):
...
else
...
Been rushing around like a madman. Still not fully here yet
Also, if it hasn't already been mentioned, I'd make the list of channel IDs as a tuple constant at the top of the file
Since it seems to be the same ones each time
multi-line comments
"no
there aren't
it's a lie"
ah, also given constant timeout it can just be a queue
and a single task
line 0 of how to write a comment:
don't
"""...""" are docstrings
!e
\`\`\`
testing
out
lines
\`\`\`
@obsidian dragon :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 1
002 | \`\`\`
003 | ^
004 | SyntaxError: unexpected character after line continuation character
!e
"""
doc
string
"""
@vocal basin :warning: Your 3.11 eval job has completed with return code 0.
[No output]
Doc strings are the closest we have
But in fairness, they're just string literals that aren't assigned to anything and so they get tossed
` is not valid in python as a syntactical element in any context, iirc
both for multi-line strings and string interpolation
it's easier to embed JS in C#
"go embed some XML in VB"
`
${1+1}
2
`
โ`โ``
zws or zwj?
The former.
hello
UWUbuntu

uwubuntu
sounds Lithuanian
@zenith radish Everything makes so much sense now
"hey, do you want to install kubernetes that will do nothing and eat 5% of all your CPU power?"
yes
"do you want to install nextcloud incorrectly?"
yes
"do you want to install portainer incorrectly?"
yes
I wouldn't be surprised if they started to suggest installing a full gitlab instance just for fun
I don't use leetcode myself
I did play around with codewars for some time
I think both allow to put the problem away for later
@sharp urchin
try to find that button if it exists
this
bookmark the problem to save for later
i dont get it
and then skip it
@somber heath :warning: Your 3.11 eval job timed out or ran out of memory.
[No output]
@vocal basin well ig i understood what to do...ty :}
bookmark and solve it in other ways
if possible
right?
leetcode should probably have such an option
I'm not sure if the alpha channel is working
seems like it does
I've raised the number of colour channels to 100
that didn't increase the time complexity in any noticeable way
now I need a way to generate a continuous mapping from 100 channels to 3
I've only been here for an hour and a half and I have achieved much
Hey folks
Not yet
โค๏ธ
๐ถ I don't miss Hemlock, he smells like pooooooo ๐ถ
so, I roughly know how to reduce from N+1 to N
but, I think, it doesn't actually allow N+2 to N
Boss walked in
Sorry
Had to talk to her
In theory another step closer
The insurance adjuster still hasn't been by to assess the value of the things damaged
So we're kind of stuck until they do their thing
Well
That I'm not sure of
Everyone has been slammed due to tax season
So I don't know what has or hasn't been scheduled
I'm easy to please/easy to adapt
So I don't mind this, just bummed I can't talk to you guys as much
@lavish rover Nerd
Neeerrrrrddddd
I'm okay, Beer
I also just realised that I would probably need a different source-to-colour mapping
to get the isotropic properties
Cube lube, keyboard lube... WHERE DOES IT END?!
Not Master Card?
No u
Noooooooooooooooooooooooo
Padame!!!
Oh god no
NO
On the fly
Not pre-written
So you have no guarantee that you'll get the same article with the same prompt twice

make it come up with article names too
Yeah, I just like the idea it's different for different people
No no no
Still whatever the term you're looking for is
Just that some people may get that Columbus sailed the ocean blue in 1492 and another saying that he conquered Mars in the great lizard wars of 1885
@cunning hull ๐
@lavish roverI don't speak y'alls frenchy french moon language
Such a good episode
And honestly the only one that comes to mind
Oh wait
There is one other episode that I remember
I think THAT one is my fave
Amazing
One sec
The difference is the ergonomics for me
The keys themselves.. eh
That's fair
If you bottom out your keystrokes anyway, that means that you really don't feel any difference
Keyboard subscription packages.
One key a month
Like your keyboard just stops working if you stop paying for it.
Ohhhh
Thought you mean like a keyboard of the month club
But if you're on a budget
You get one key at a time
There's probably a thing that sends you different switches a month lmao
"if Tesla gets into keyboard business" or something
Possible yeah
I don't think I've ever passed an online course in college
I just always forget that it exists
I straight up can't
I changed the source-to-colour mapping
@somber heath
these are with an increased overwrite chance (1%, 2%, 1%)
Getting my steps in today, that's for sure
I don't know how to scale the chance with the size of the image
How
I'm almost sure the outputs of the value mutation (generated from adding normal) are scaled proportional to the square root of the number of pixels
Oh also, the 10k steps they recommend isn't actually based on anything
It just sounded good as a number
@pure shale You'll want an accountant
You'll have to Czech what the rules are where you're at
@whole bear๐
Relocation bonus I think
And how old the people are
Could just be that old people don't want to break the old ways
Or something
France ca - yep
Bingo
I heard jerks not Turks
No no I know
Just cracked me up
"Bunch of d-bags coming in here..."
@tidal shard Sup
There's always going to be people who exploit a system
But the folks who benefit from it and need it make it important to have
Don't fall for how the US does things
I forgot what your degree was in Delta
I'm too risk adverse to get into it
Did you run a half-marathon? 
Just that much twerking
I don't think I could run that much if I tried
Misread as steps
Kinda just kept walking around with someone and lost track
Potential love interest someone?
No comment
I have to make sure they have good intentions for my baby boy
wassup
I joined vc to at least calm me a little while I'm playing Faith
and it worked
Then I am pleased.

I have no idea what I'm doing
the current issue is that the angle range changes with scale
(those two were generated with different scaling)
nice
with linear, it gets too round-ish
with square, it gets the opposite
if it manages not to lose all $100 or more, that's already a success
hello everyone, i am new and i just learned that i have to text in here in order to get veryfied. ๐คญ
I can fit the code in a single message still
High frequency traders, like they were just vibrating...which I suppose we all are, really.
Knight Capital lost more than they had, iirc
been forever since ive been to an ihop... heres to the end of breakfast in bed.
@silk tartan ๐
net income by 2011: $115.2M
pre-tax loss in 45 minutes: $440M
(doesn't actually reflect the "lost more than they had" but at least demonstrates the scale in some form)
Does Ilean still work there?
I just realized that joke won't hit
Oh well
gtg
what do you use it for?
(or what is the question/problem)
I am using to do some preprocessing on an image. Specifically a microscopic image taken of a piece of metal. I am trying to auto mate the process of counting how many times a random line passes through a granular structure on the image. Basically I can this n times by looking at the intensity plot of the pixels.
My question: Is anyone here familiar or have used open cv
prolly should add this message into another chat channel specific for cv2.
Busy busy busy
Hey Cruiser
How goes it
Nice
Now to see if I can - nope, of course
Back later
Sorry
would it be acceptable practice with a large list, to recheck the value and break the loop to stop excessive looping?
large_list = [1,2,3,4,...]
getnum = 3
for i, v in enumerate(large_list):
if v = getnum:
... do stuff
if v = getnum:
break
Hi
Why I can't talk in voice chat?
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Check out the #voice-verification channel
That'll tell you what you need to know about the voice gate
Happens
same question ??? ๐
Ok
I from Russia I don't know how say (thank) short
Oy ty
It me?
hi
How's it going
good u
cool
Cool cool. What're you learning right now?
@rugged root wait why arent you admin ??
Very cool. What resources you using? Site, book, youtube...
Hell yeah
Oh yeah yeah
Yeah I've heard of his stuff
I stepped down. I didn't have the time to dedicate fully to admin duties so I wanted to - one sec I'll explain - make room for folks who could
Have you ever studied Russian is very difficult even for us
I'm not in my regular office so I can't talk.
Hey Moonie, hey Akon
@unique swallow How're - and she's gone
@silk tartan How's it going
that sounds like retiring
Eh, I suppose
How're you?
I'm alright, yourself?
No, not personally
Just been staff on it for a long time
Since we had like.... 2k or so members?
So what're you folks working on?
Fair
Sort of
Mainly actual work stuff, which sadly isn't programming
I work in IT
Oh very cool
Ehhh... kind of just inhouse stuff. I work at an accounting firm. So it's mostly "Why isn't this working?" "Can you come fix this?" "The printer isn't working" etc
why I can't talk
Yeah, just general basic IT stuff
@silk tartan Check out the #voice-verification channel. That'll tell you what you need to know about the voice gate system
There are days I wish I had more programming related duties at work
you have to be on the server for at least 3 days i think
But when I look at how the tech sector is fluctuating... kind of got me spooked
Well I guess mainly in big tech companies. But like the massive layoffs, restructuring of business, etc.
@dim raven Yo
yo
How goes it
Kind of. I have an associates of liberal arts degree, but it basically just means I completed my general education credits. I moved around a lot, went to 6 different colleges across 3 different states
So many of my courses got turned into elective credits.
Just broke down at one point
You?
Neat
me too
You've got some weird background rumble in your mic, Moonie
No worries. Catch you later
bye
I had dental work done and Iโm half numb
I also wrote code this weekend.
You're nu (I'll see myself out)
i heard about it, to be half numb, luckly i never got it
is my mic working
HA
how can I verified my voice
@terse needle Yo
The #voice-verification channel gives you details on that. You can also use the !user command in #bot-commands channel
Wait, is that STILL processing?
what kind of messinng bus dou you use?
Oh that's not bad.
Your idea of fun is much different than mine
Devops and fun do not make - ah fair enough
Beanstalkd
Wait wait wait
So part of it is left to random?
Sure
You're a madman
And I love it
If it works ยฏ_(ใ)_/ยฏ
please someone tell me how to verified my voice
You need to have been on the server for at least 3 days, and you need to have sent 50 legitimate messages (not spam) over the course of three 10 minute blocks
did you say 3 day ๐ค
I did say that, yes
that sound great the messaging system
@whole bear a lambda calculus interpreter
hi
How goes it
aight
Itโs extremely simple messaging system design for high speed
@silk tartan There's a good reason for it. We had a series of what I call hit and run trolls. They would join the server, join voice chat, scream, and then leave. This was happening around 6 or so times a day.
The voice gate has made it not an issue anymore
But unlike ZeroMQ, doesnโt have some of its limitations.
@mild quartz What new ground breaking and life changing things are you working on today
Self training still feels weird to me
Ship it off to boarding school
@stuck furnace What're you up to?
Errrm, not much
What are you up to? 
So what is everyone doing? Just so that I'm not pestering everyone individually
Trying to decide if I want to go do my delivery run right now or get up and put together a monitor stand for someone or tweak the database picker thing
Are you all married if you don't mind me asking
Hello
I think most folks aren't
Does delivery run mean you'll be in VC? ๐
It does
But I typically do a 10 and 2
And it's noonish right now
@mild quartz Tee hee.... sharted...
Oh ok
@willow lynx Why do you ask?
It's my marriage in next two days
I am yeah.
Is this for work (Anokhi)?
hello guys
So idk I am just asking
5 year anniversary was not too long ago
yeah
Hey penny
why I have to need 3 day for Voice talking

