#voice-chat-text-0
1 messages ยท Page 74 of 1
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.
jokes = [
"What did the ocean say to the other ocean? Nothing, it just waved!"
"Don't trust atoms, they make up everything!"
"Why did a tomato blush? It saw ranch dressing!"
]
print(random.choice(jokes))
print(random.choice(jokes))```
comma?
missing comma
yap
it just doesnt give me anything
if prompt.lower() == "can you tell me a funny joke?":
jokes = [
"...",
"...",
"...",
]
print(random.choice(jokes))
prompt.lower == "..." is always False because you're comparing a method to a string
im sorry for asking for help, im trying to do everything without a tutorial
ive been stuck in tutorial hell for awhile
there's also an option to do that
match prompt.lower():
case 'can you do something?':
...
case 'can you do something else?':
...
case 'can you do something completely different?':
...
!e
prompt = 'Can you do something else?'
match prompt.lower():
case 'can you do something?':
print('A')
case 'can you do something else?':
print('B')
case 'can you do something completely different?':
print('C')
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
B
I'd probably rather do that using decorators
!e
from typing import Callable
commands: dict[str, Callable[[], None]] = {}
def command(prompt: str) -> Callable[[Callable[[], None]], Callable[[], None]]:
def wrap(func: Callable[[], None]) -> Callable[[], None]:
commands[prompt.casefold()] = func
return func
return wrap
@command('can you do something?')
def do_something():
print('A')
@command('can you do something else?')
def do_something_else():
print('B')
def main():
prompt = 'Can you do something else?'
commands[prompt.casefold()]()
main()
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
B
(no formatting not to make too tall of a message)
!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!
wkwk
random.choices(population, weights=None, *, cum_weights=None, k=1)```
Return a *k* sized list of elements chosen from the *population* with replacement. If the *population* is empty, raises [`IndexError`](https://docs.python.org/3/library/exceptions.html#IndexError "IndexError").
If a *weights* sequence is specified, selections are made according to the relative weights. Alternatively, if a *cum\_weights* sequence is given, the selections are made according to the cumulative weights (perhaps computed using [`itertools.accumulate()`](https://docs.python.org/3/library/itertools.html#itertools.accumulate "itertools.accumulate")). For example, the relative weights `[10, 5, 30, 5]` are equivalent to the cumulative weights `[10, 15, 45, 50]`. Internally, the relative weights are converted to cumulative weights before making selections, so supplying the cumulative weights saves work.
!d str.join
str.join(iterable)```
Return a string which is the concatenation of the strings in *iterable*. A [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "TypeError") will be raised if there are any non-string values in *iterable*, including [`bytes`](https://docs.python.org/3/library/stdtypes.html#bytes "bytes") objects. The separator between elements is the string providing this method.
@uncut salmon ๐
heyy
I need an opinion on the framework and the host. I am working on a project to connect to APIs.
First API will be ecommerce platform. It will send webhook events for order creation.
Second API will be the inventory management system. It will send out product information and receive orders from the first API.
There will be automated tasks to update product info on the first API.
There will be a webhook listener that would create an order on the second API.
There will be a user interface that will preview errors, logs, and the ability to create a manual order.
I am thinking about using django with django-rest-framework.
I will host it on AWS lightsail
@whole bear ๐
I hate the new help system!!
It's terrible
Since they switched it to the new system I have not had anyone answer any of my questions
test
from pynput import keyboard
import pyperclip
def on_press(key):
if hasattr(key, 'char'):
if key.char == '\x16':
num = pyperclip.paste()
pyperclip.copy(int(num) + 2)
starting_num = -1
pyperclip.copy(starting_num)
listener = keyboard.Listener(on_press=on_press)
listener.start()
listener.join()
@scenic stratus #media-processing message
Define a function that takes an argument. Call the function. Identify what code is the argument and what code is the parameter.
!e```
def greet(name):
print("Hello, " + name)
greet("John")
#The argument is "John" and the parameter is name```
@buoyant cradle :white_check_mark: Your 3.11 eval job has completed with return code 0.
Hello, John
Call your function from Example 1 three times with different kinds of arguments: a value, a variable, and an expression. Identify which kind of argument is which.
!e```
def greet(name):
print("Hello, " + name)
greet("John")
name = "Jane"
greet(name)
greet("Bob" + " Smith")
#The first argument is a value ("John"), the second is a variable (name), and the third is an expression ("Bob" + " Smith").```
@buoyant cradle :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | Hello, John
002 | Hello, Jane
003 | Hello, Bob Smith
@round musk ๐
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Construct a function with a local variable. Show what happens when you try to use that variable outside the function. Explain the results
!voiceverif
!e```
def greet(name):
message = "Hello, " + name
print(message)
greet("John")
print(message)
#Trying to use the local variable message outside the
#function will result in a NameError,
#because the variable only exists within the scope of the function and cannot be accessed outside of it.```
@buoyant cradle :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 3
002 | print(message)
003 | ^
004 | IndentationError: unindent does not match any outer indentation level
!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, Youtuber, playlists.
Construct a function that takes an argument. Give the function parameter a unique name. Show what happens when you try to use that parameter name outside the function. Explain the results.
!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```
def greet(name):
message = "Hello, " + name
print(message)
greet("John")
print(message)
#Trying to use the parameter message outside the function will result in a NameError,
#because the variable only exists within the scope of the function and cannot be accessed outside of it```
@buoyant cradle :x: Your 3.11 eval job has completed with return code 1.
001 | Hello, John
002 | Traceback (most recent call last):
003 | File "<string>", line 6, in <module>
004 | NameError: name 'message' is not defined
!e ```py
def func(arg):
print(arg)
func(5)
func(arg=10)```
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 5
002 | 10
@somber heath hi
!e ```py
def func(a, b):
print(a, b)
func(1, 2)
func(b=2, a=1)```
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1 2
002 | 1 2
@somber heath can you help me i have one doubt?
Keyword arguments.
!e py data = list('abcdefg') i = data.index('f') print(i) print(data[i])
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 5
002 | f
ok
!e py data = 'abcdefg' i = data.index('f') print(i) print(data[i])
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 5
002 | f
from enumerate i will get index of all elements present?
!e py text = 'abcdefgf' for iv in enumerate(text): print(iv)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | (0, 'a')
002 | (1, 'b')
003 | (2, 'c')
004 | (3, 'd')
005 | (4, 'e')
006 | (5, 'f')
007 | (6, 'g')
008 | (7, 'f')
yes
!e py i, v = (1, 'b') print(i) print(v)Variable unpacking.
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1
002 | b
!e py text = 'abcdefgf' for i, v in enumerate(text): print(i, v)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 0 a
002 | 1 b
003 | 2 c
004 | 3 d
005 | 4 e
006 | 5 f
007 | 6 g
008 | 7 f
set is unordered then the index of element get change?
class Sum:
passclass Product(Sum):
pass
p = Product(1)
p.mro
we can only access from the class information about mro
!e ```py
class A:
pass
print(A.mro())
a = A()
print(type(a).mro())
print(a.class.mro())```
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | [<class '__main__.A'>, <class 'object'>]
002 | [<class '__main__.A'>, <class 'object'>]
003 | [<class '__main__.A'>, <class 'object'>]
yeah, same, they all referring to the class
no, i just wondered why we cannot from the instance )) just why
yes
)
Show what happens when a variable defined outside a function has the same name as a local variable inside a function. Explain what happens to the value of each variable as the program runs.
it is all about LEGB rule
def a():
def b():
...```
actually, the book of mark lutz has a section about LEGB rule very clearly
!e```
name = "Jane"
def greet(name):
print("Hello, " + name)
greet("John")
print(name)
#The value of the global variable name is not changed by the function,
#so after calling the function, name still has the value "Jane".
#The local variable name inside the function has a separate scope,
#so it only affects the output of the function and does not impact the global variable.```
@buoyant cradle :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | Hello, John
002 | Jane
Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.
Now add a function named clear_screen that uses a combination of the functions nine_lines, three_lines, and new_line (provided below) to print a total of twenty-five lines. The last line of your program should call first nine_lines and then the clear_screen function.
The function three_lines and new_line are defined below so that you can see nested function calls. Also, to make counting โblankโ lines visually easier, the print command inside new_line will print a dot at the beginning of the line:
def new_line():
print('.')
def three_lines():
new_line()
new_line()
new_line()
It is very helpful if you print a placeholder between the printing of 9 lines and the printing of 25 lines. It will make your output easier to read for your instructor to assess. A placeholder can be output such as โPrinting nine linesโ or โCalling clearScreen()โ.
i have two py file, but it should serve the same purpose, but the second code is rising the exception
!e
class DuplicateSuper:
def init(self, val):
self.val = val
def getattr(self, item):
return getattr(self.val, item)
obj = [1,2,3]
proxy = DuplicateSuper(obj)
proxy.append(2)
print(obj)
the second script
obj = [1,2,3]
getattr(obj, append(4))
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.
!e```
Define the function new_line
def new_line():
print('.')
Define the function three_lines. it will print 3 lines
def three_lines():
new_line()
new_line()
new_line()
Define the function nine_lines. it will print 9 lines
def nine_lines():
three_lines()
three_lines()
three_lines()
Define the function clear_screen. it will print 25 lines
def clear_screen():
nine_lines()
nine_lines()
three_lines()
three_lines()
new_line()
Call the functions nine_lines and clear_screen
nine_lines()
clear_screen()```
@buoyant cradle :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | .
002 | .
003 | .
004 | .
005 | .
006 | .
007 | .
008 | .
009 | .
010 | .
011 | .
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/imixihovih.txt?noredirect
!e py class DuplicateSuper: def __init__(self, val): self.val = val def __getattr__(self, item): return getattr(self.val, item) obj = [1,2,3] proxy = DuplicateSuper(obj) proxy.append(2) print(obj)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
[1, 2, 3, 2]
yes
so getattr i am referring to the list instance' append method, so theoretically it should work the same
!e py append
@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 | NameError: name 'append' is not defined
!e py append = 'abc' print(append)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
abc
this is referring correctly append forwarded to obj
!e py my_list = [1, 2, 3] m = my_list.append print(m)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
<built-in method append of list object at 0x7f763973acc0>
!e py my_list = [1, 2, 3] m = getattr(my_list, 'append') print(m)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
<built-in method append of list object at 0x7f9fa08c2cc0>
!code
getattr(obj, 'append')(4)
print(obj)
oh yoo, it was confusing
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.
!e py obj = [1,2,3] getattr(obj, 'append')(4) print(obj)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
[1, 2, 3, 4]
@hidden rock ๐
how you doin'?

@primal pier ๐
guys, do you have any project that a beginner can contribute ?
i dont today, but wednesday i will
!projects
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.
also you can look through this see if you find anything your level
hello
how to get accese to mic
ok
ok i will
did you know how to close the activated virtual environment ?
ok
i am also leaning python
medium
i am pursuing bsc computer science
nice
where are you from
i am in 4 sem
india
where are you leaning from
had you enroll for cs50?
its a online course by harvard university where you can learn python
its free
what?
i didn't hear properly
in program
nope its not part of course
its just online course every year they teach python
Python Tutorials For Absolute Beginners: In this Python programming tutorial, we will see complete Python from scratch. This Python course is beginner-friendly which means that any Python beginner can start learning from this Course. I will start this course from zero, and then we will look into the advanced python concepts.
This Python complete...
you just watch this video sure you will like it
@buoyant cradle
see this
you will like his notes
Download Notes by CodeWithHarry
what?
ok you continue
bye
hello
i think i should do voice verification
it will take 3 days?
yeah 2 mins
browser mic permision
i not much good in english speaking
Voice on browser-based Discord is shit.
means i never talk with anyone
I can barely hear you, but I heard you say hello.
Use the Discord application vs the webbrowser Discord.
If you can.
ok sure
If it's inconvenient, then don't bother.
If it is convenient, please bother.
You're quite faint.
Are you near or on a road?
nope
Hello. ๐
works fine on my machine
It so often is not.
It does something to people's mics. Listening to others may be fine on it, but when people use browser Discord to transmit their voice, it ends up with snow noise in it.

I hear that a lot but [AFAIK] Iโve never really had a problem with it
yes i have some mic issue
Plus, it's as if the world's microphone manufacturers got together and said, "Let's give India all of our shitty mics." then laughed maniacally like cartoon villains.
lol
@somber heath did you like any other language than python?
had you make any project on ai?
can we use append method for strings?
!e py text = "abc" text = text + "def" text += "ghi" print(text)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
abcdefghi
But you are creating new strings at each step.
yes
Unlike list appending, where you still have the same containing list object.
ok
Yo
Girl Genius
That was the one
Just found the comic
I have a feeling I'm going to be very up and down today (running around work I mean)
Sounds about right
Easy to steal
We all are
Legs
And food is the fuel source
You don't know my life
I'll eat whatever I want
Petroleum or not
@quaint peak Yeah that sounds right
If there aren't cars, you steal the next best thing
Easy to make off with a bunch of bikes
tires production still sometimes uses oil products
though bikes' ones wear off less than those of cars
iirc, for cars, the problem with tires isn't as much about cost as as about pollution
from what I've heard somewhere (source? idk), they contribute to pollution more than exhaust
People are just getting..... tired of it
Hey Smr
Called it!
That's good at least
We're making tire puns
Hasn't gained much traction yet, though
We're kind of treading old ground
Putting on airs
HA
We're really getting some mileage out of these jokes
Kilometerage?
Whatever
Oooooo
Subtle
Liked that one
I think the hate on them gets blown out of proportion
yoooo
God
whats up
oh im sorry u good bro
Really hate it
Yeah I'm fine
Just dealing with work software
I want to punch
Correct
Document Management Software
I stepped down from the position
I'm not able to dedicate the time and attention to admin duties and I'd rather we have people who can
BUT, I'm still Voice Lead, so I still have full control of my little domain here
Starcraft wasn't really my jam
Was more of a Red Alert 2 person
oh hey mr hemlock, I was previously on the server for like 3 months, can i get unmuted?
One sec
even more than 3 months ago
aight
Wait hemlock, no admin anymore?
Back in a sec.
What was the other half?
Hello
swift?
banks use it
idrk if common people can access it
probably not
third parties don't move money when you send it
that's why it takes less time
but
withdrawals may take time if too many people try to withdraw
because that would actually require moving money
@torn vessel ๐
hi
i cant verify yet
seems im a bit short of 50 messages to verify
is python really the best option for teaching programming?
"best for what/who?"
in my use case im using it to teach begineers ( high school)
however they seem to struggle alot with syntax
i feel like c will be too difficult
Yo
I'm here sorry, just juggling things at work
Unfortunately not as fun as it sounds
Well with this it'd be computer hardware
but seems like I need to send at least 50 messages
Bit hard to crumple
i ttok my students off training wheels yesterday. until now ive had them kinda copying code and modifying code . however yesterday i asked them to create a basic script from scratch but they seemed to have difficulty @somber heath
there are reasons to say why Rust is best for beginners
it forces to write less bad code
like, "suffer now to suffer less later"
if "suffer now" part actually turns out to be suffering, then, well, probably Rust isn't the good choice[ for that particular person at that particular level of knowledge]
HA
why would you want to juggle mice?
To bring any shred of joy possible into my life
ok fair enough
yeah ive done that but they seem to just be memorizing stuff and not applying it
poe injector?
Power over Ethernet. Some devices let you just use a powered ethernet cable to both power and send the data. In our case, our office phones allow it
But you need a switch or a passive PoE device to give that power
Yeah
I just didn't realize that was a thing
wouldn't that be a problem considering the average length of an ethernet cable?
do you use/plan-to-use an automatic test system for scripts?
(when I learned Python and C we had that)
during explanation part of the lessons the teacher also showed fun stuff
@somber heathgot some pretty picture scripts you can send me? theyve done strings artimetic variables data types and numbers and if else statements
my "minimalistic" database somehow got to a state where it consists of at least 30 classes
this is probably going to be at least 32 by the end of this day
ive been using w3schools as a reference for them
Surprisingly no
I thought the same thing before
Nor is it an issue if you use them on devices that don't support or require PoE
as for both C and Python, we also had a lot of questions asked by the teacher to the students
with those being actively discussed in class
like, "solve <this>", "why does <this> fail?"
tldr they have heavily restricted internet access and cant google due to content filtering so ive had 2-3 sites whitelisted @somber heath
W3Schools HAS gotten better, but yeah
I treat it more of a quick reference than anything else
that does include questions going out of the orthodox way of doing everything "the right way"
weird I thought they might fry the port or so
Nah
I mostly avoid w3schools
it comes up mostly for Python and JS/HTML/CSS
but for the latter, there is MDN
@somber heathgot a better recommendation ? note any site that gets whitelisted will need to be heavily reviewed for content
guys does anybody have experience with web scraping and selenium?
ive had freecodecamp blocked
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
!kindling
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.
@valid finch Might look into godot: https://godotengine.org/
@cerulean ridge Sup Bea
โค๏ธ
not The Reference for courses, but an example of how structured description of features can be presented
i'm doing well mister
Good good
docs.python.org is reasonable to have allowed
and cppreference for C
Hands down
those two are even whitelisted in some programming competitions
Love it
never got to the finals :sad:
God the photoshop job on some of these images...
Like... Come on
It won't hurt not PoE devices
@past oar you do cyber security?
@valid finch If you're going to cough, please mute
yes , part time
@amber raptor So would it be advised to just get a regular access point that has a couple lan outs and just grab an injector?
do you know if there is a way to spoof webgl hash without being detected?
im not sure what you mean by wegbl
Yep
id google that , check the cve database tryhackme.com hacktehbox hacktricks or redteam manual
Works for this guy
it is some hash generated by rendring some png I guess, websites use it to fingerprint people
ok I will check that
It's free on their site
Nah
Just lots of practical application cases
And good for small automation and other cools stuff
I think of it as Python is quicker to develop but slower in runtime
But in quite a few cases, that runtime speed isn't a big factor
HA
if you can just throw money at hardware and if programmer performance is more important, going for python may be an option
but, like, python allowing for programmer performance is also relative
Depends on the libraries, too
Plenty of them are in compiled C and Python is just the wrapper
not my opinion; reciting someone who said something like that ~5 years ago
!d str.casefold
str.casefold()```
Return a casefolded copy of the string. Casefolded strings may be used for caseless matching.
Casefolding is similar to lowercasing but more aggressive because it is intended to remove all case distinctions in a string. For example, the German lowercase letter `'ร'` is equivalent to `"ss"`. Since it is already lowercase, [`lower()`](https://docs.python.org/3/library/stdtypes.html#str.lower "str.lower") would do nothing to `'ร'`; [`casefold()`](https://docs.python.org/3/library/stdtypes.html#str.casefold "str.casefold") converts it to `"ss"`.
The casefolding algorithm is described in section 3.13 of the Unicode Standard.
New in version 3.3.
!d python indentation
Python Runtime Services
The modules described in this chapter provide a wide range of services related to the Python interpreter and its interaction with its environment. Hereโs an overview:
!d indentation
Leading whitespace (spaces and tabs) at the beginning of a logical line is used to compute the indentation level of the line, which in turn is used to determine the grouping of statements.
Tabs are replaced (from left to right) by one to eight spaces such that the total number of characters up to and including the replacement is a multiple of eight (this is intended to be the same rule as used by Unix). The total number of spaces preceding the first non-blank character then determines the lineโs indentation. Indentation cannot be split over multiple physical lines using backslashes; the whitespace up to the first backslash determines the indentation.
^^^
not particularly well written but shows some ideas that can be used
@amber raptor Last time to bother you with this, promise. So something like a combo of:
https://www.amazon.com/NETGEAR-Wireless-WAX206-Dual-Band-Ethernet/dp/B098BRF91P
and
https://www.amazon.com/WS-GPOE-1-WM-Gigabit-Passive-Ethernet-Injector/dp/B00ENNUWO4/
Would that be sufficient?
Only have the one device on there that has PoE needs
Wouldn't even really need a passthrough on the unit
-- storing commands in a dict
-- decorators for commands
Although at this point
It becomes moot since this isn't saving a plug
Mkay, nevermind
It's moot regardless
I know, bad hem
You want PoE pay up.
Either way I'd have to use power plugs
Which doesn't solve the issue
Is this an email forwarding joke?
Wait
So it makes the entire switch board PoE?
GOoooooooot it
Would battery advertisements be power plugs?
there are two different kinds of tuples, from the type system view
tuple[T0, T1, T2]
tuple[T, ...]
those represent somewhat different things usually
I'll likely just get the access point and just deal with having the additional power plugged in
Ok
first is a record, and the second is an immutable list
Because while it would pump it through, it's just not worth me trying to figure out which port is piping out to their office
Strings aren't mutable, integers, floats as well...
Immutability is still helpful
Not to mention, Python internally uses tuples quite a lot
Saves a lot of overhead
Tuples are also what should be used for constants
Yea, it was probably required for internal stuff
imo, there should be something like
typing.Record[T0, T1]
such that it's meaning [t0, t1] and (t0, t1)
so, like
r: typing.Record[T0, T1]
t0: T0
t1: T1
t0, t1 = r
@amber raptor what would you say if I said a new hire, in their first week, emailed the "all employees" address to notify a single department about a specific change to a specific order?
It's just my fault for not restricting who can send to the "all employees" address?
Yeah. Since computers are just 0's and 1's
It just makes it more clear and consistent
Yes
Fair
I really need to get around to that
Sometimes I want to just delete it... It almost never gets anything actually useful
That being said, hiring people with brains is good idea
Majority of security work is running existing tools and running reports
still someone needs to develop those tools
11111111 One 128, one 64, one 32, one 16, one 8, one 4, one 2, one 1. 00000000, zero of all the same.
@past oar No it really shouldn't be by hand
Generally is
They only care as reactionary
@dusk raven Sup brah
Yep
Recovery not prevention
It won't affect their bottom line much
@amber raptor Turn it down a notch
Honestly
Better than we usually get
Not really
The public memory is very short
well, they may be caring about securing some parts (to protect from competitors)
but having zero regard for customer data (because laws don't work well enough or don't exist in the first place)
GDPR is in Europe
@mild quartz Sup
for example, Twitter now openly doesn't care about it
Hardly
https://finance.yahoo.com/quote/TMUS Point to me on the graph where TMUS hack was announced
That's different
That's them trying to branch out
Meta is just a branding change that's separate from everything else
from that point of view, code security > data security
which is about educating employees and, like, pure hope more than any infosec
There has to be some actual stake in the game
Currently it's a slap on the wrist
That's not hurtin - exactly
"Customer data compromised? Apologize. Social security numbers and stuff? Sign them up for a year of credit protection and monitoring"
Wonder how much that costs them... I mean not enough to cripple them, but I'm still curious
in Russia, computer/information security university courses are more about getting people to do that for state agencies
(regardless of if it is about just writing reports or doing actual security)
if you go there, you'll be dealing with the military since the second year
so, like, just another way to hire people (not as much as education)
also, to stay learning one will eventually have to agree to take a grant from the government (locking in even further)
"grant" in quotes; it's actually a contract
I don't have permission to talk yet
Hi
Yo
De novo gene birth is the process by which new genes evolve from DNA sequences that were ancestrally non-genic. De novo genes represent a subset of novel genes, and may be protein-coding or instead act as RNA genes. The processes that govern de novo gene birth are not well understood, although several models exist that describe possible mechanis...
Wonder why linkin park was never considered metal
tone specifics or something maybe
(someone tried to explain that to me that but I don't remember well)
Hello people ๐
Yo Bella
Melodeath songs are awesome. Thereโs this band Disarmonia Mundi: severely underrated.
Hi!
Huh, that's the first time I've heard that term
melodic death metal, shortened
I don't remembered seeing it called this way either
Goodbye people as well ahahah
Bye
From their upcoming album Cold Inferno
This is not my music and I give all credit to Ettore Rigotti, Disarmonia Mundi and Coroner Records
@rugged root id recommend giving this a listen
I'll take a peek here shortly
they were explaining that on the example of Starset
(who have quite heavy songs but are rock not metal)
Man the sub-genres of metal are unending
Yeah it's a bit much
Someone argued with me extensively on something like that.
I say that metal is technically a sub-genre of rock
They say that's absurd
Woah
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f94e22fea20>: Failed to establish a new connection: [Errno -3] Try again',)': /simple/connexion/
Hmm
"real communism grindcore hasn't been tried before"
These are subjective categorisations, so everyone can have their cake as far as im concerned
A-ranked @proven fox
That's what I said
But apparently I was just blatantly wrong or something
Who what where when?
according to them (subjective)
I am married yes
@dusk raven lol
Okay bye guys
play minesweeper
Enter/Exit the Gungeon
Margin Call
I've played some Rain World recently (because DLC came out)
but it's very not short
though easy to get into
@formal ember I legit have no idea
Like
I found that but I have no idea if it's related
@uncut meteor Sup
I hear ya
Nice
oh, the pip problems, the classic
any help
what OS?
hi AF
Hey speedro
hmm. no idea. seems problem with proxy as well. just heard. XD
hi hem
CentOS
isnt CentOS deprecated?
issues inside container or outside?
docker compose
not docker-compose
docker-compose is deprecated-ish
when does this happen?
ah
Oh huh, thought CentOS was still active
and where (host or container)?
โ @formal ember can now stream until <t:1675790248:f>.
CentOS Steam replaced it
inside the container
@proven fox Might be better to mute when you're not speaking so that we don't have to keep hearing it
Apologies if that came off as rude
@formal ember
what's the Dockerfile?
ah the usual dockerFile, where i copy everything because i have no clue how it works
perfect
@cerulean ridge So what's new in your neck of the woods
I feel called out for some reason
fire
huge fire
gigga fire
i presume you cant extinguish it, to prevent more damage
so then what do you do....
theres gotta be decent pressure in that bad boi
yea, idk about the details
its 1.5kg of pressure (20 psi)
thats nothing ....
i thought you would become a bird trying to use it
@proven fox probably most of us don't have permission to talk
to get the verified one needs to send at least 50 messages
At least 3 days on the server and at least 50 messages over three 10 minute blocks
Anyone here able to hop on vc and give me a quick run down on ipv6 addressing
What specifically about it?
@somber heath hello
hi Mr.Hemlock
Halo
I can hear you
but I cannot use mic
You have a good voice
You sound like a Technical Support Engineer
Helping attractive females to code
hahahaha
@undone frost have you read the Computer Science Wizard book?
Hmmmmm, it's kind of a linguistics philosophical book about programming (with Lisp).
But can be applied to anything.
Just learnt, there is a startup that is able to bring mammoths back from life.
I wonder, when they start bringing humans back from life.
@undone frost It's a fat book, it has like 800 pages I think.
@undone frost You can eat mammoths. But what about they start bringing dictators, old kings and a bunch of other people back.
@undone frost Same here.
@undone frost Laguna or Blue Lagoon, you are either into brunettes, blondes or you love thick Carribean chicks.
๐
You've heard of wtpython
Now introducing: pythowon
https://github.com/vcokltfre/pythowon
Huh, that's like a whole thing
Cool usage of TUIs
it's the thing that won me code jam champion
Oh itโs your baby
Nice, nice
@limpid crypt ๐
hi i muted
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@whole bear ๐
@frigid void ๐
good evening
mtn dew hits the spot
zero sugar of course
apparently in the diet mtn dew cans they have citrus
so uh
what do you think of hogwarts legacy
been wondering if i should buy it
yeah
right
its why i enjoy games like spiderman
i think the game is single player only?
let me check..
so it is single-player
i dont think so
ive never tried a portkey game before
Hi, I will play some Counter Strike and then do some coding and try to log in to Chat GPT ahahahaha
so whaz youz wants to do @buoyant cradle
Murf Text to Speech API lets you integrate your products, applications & workflows with murf's ai voiceover capabilites
Yes, we are pleased to inform you that our API services have just been introduced. Please proceed to the following API pageย and provide your contact information and the use case. You will hear from a concerned team member as soon as possible. In the meantime, feel free to explore ourย API docsย for further reference.
import requests
import json
url = "https://api.murf.ai/v1/speech/generate"
payload = json.dumps({
"voiceId": "string",
"style": "string",
"text": "string",
"rate": 0,
"pitch": 0,
"sampleRate": 24000,
"format": "WAV",
"channelType": "MONO",
"pronunciationDictionary": {}
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
@warm mason ๐
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
xbox os:|
ohhh he uses arch btw
arch wiz dwm
i was using the same setup on ubuntu previously
Show what happens when a variable defined outside a function has the same name as a local variable inside a function. Explain what happens to the value of each variable as the program runs.
def some_func():
x = 1
some_func()
x = 2
!e def f(): s = 0 s = 0
@buoyant cradle :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 1
002 | f():
003 | ^
004 | SyntaxError: invalid syntax
def f():
s = 0
s = 0
f()
!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
def f():
s = 0
s = 1
print(s)
f()
@robust lichen :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e ```py
def func():
v = 5 #local v
print(v) #local v
v = 0 #global v
print(v) #global v
func()
print(v) #global v```
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 0
002 | 5
003 | 0
!e
def f():
s = 0
s = 1
print(s)
f()
@robust lichen :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 4
002 | print(s)
003 | IndentationError: unexpected indent
!e
def func():
x = 4
x = 5
func()
print(x)
@warm mason :white_check_mark: Your 3.11 eval job has completed with return code 0.
5
!e ```py
def func():
v = 5 #local
print(v, 'local')
v = 0 #global
print(v, 'global')
func()
print(v, 'global')```
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 0 global
002 | 5 local
003 | 0 global
2nd one
ewww who says "archaiiieve"
noise suppression @robust lichen
why dont you become one of them??
doesnt matter
that guy can buy your 10 gens
lmao
andrew tate!
noo
capp
wrong info
missed a bio class -opal
my broke frnd is bald
@buoyant cradle did you watch that video?
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.
!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!
@shrewd stump ๐
hi
Voice Gate failed
You are not currently eligible to use voice inside Python Discord for the following reasons:
โข You have been on the server for less than 3 days.
โข You have sent less than 50 messages.
โข You have been active for fewer than 3 ten-minute blocks.
Are you serious?
...
im keeping talking
lalalal
:incoming_envelope: :ok_hand: applied mute to @shrewd stump until <t:1675843681:f> (10 minutes) (reason: burst rule: sent 8 messages in 10s).
The <@&831776746206265384> have been alerted for review.
@whole bear ๐
neatt, do you have any knowledge on how to, go trought a json file and find lets say an EMAIL.. in it
Glad that you are aware of that.
Yeaa
2 sec
so what im doing im taking a website link, taking its html... then converting it to json... and now im trying to extrct info out of it
this is the structur
sorry, not in there
thats what im trying to find
it is web scraping
yes, but like im trying to make one thats relative... difrent everywhere
no? its small random websites
ok thanks, cya
@thin moat ๐
hi there
hola amigos
mucho gusto
r u british
i meant care to help me edit my code?
its a if statement
@quasi smelt ๐
if (OpalMist.getAge() > 16) {
print("Opal Mist is a pedo")
}
else
print("Opal Mist is not a pedo")
<@&831776746206265384>
!mute 1d 944124477510402149 Not appropriate. You've been warned about this before.
Could not convert "user" into UnambiguousMember or UnambiguousUser.
1d is not a User mention, a User ID or a Username in the format name#discriminator.
!mute 944124477510402149 1d Not appropriate. You've been warned about this before.
:x: The user doesn't appear to be on the server.
Will deal with the user internally, thank you for the report.
camelCased method names? Not on my watch! ๐
lol
@whole bear @fresh charm ๐
๐
Hi
!d collections.deque
class collections.deque([iterable[, maxlen]])```
Returns a new deque object initialized left-to-right (using [`append()`](https://docs.python.org/3/library/collections.html#collections.deque.append "collections.deque.append")) with data from *iterable*. If *iterable* is not specified, the new deque is empty.
Deques are a generalization of stacks and queues (the name is pronounced โdeckโ and is short for โdouble-ended queueโ). Deques support thread-safe, memory efficient appends and pops from either side of the deque with approximately the same O(1) performance in either direction.
Though [`list`](https://docs.python.org/3/library/stdtypes.html#list "list") objects support similar operations, they are optimized for fast fixed-length operations and incur O(n) memory movement costs for `pop(0)` and `insert(0, v)` operations which change both the size and position of the underlying data representation.
@rapid chasm
However...
My question would be whether you're wanting any data persistence for when the bot shuts down.
In which case you'd want to be addressing your bot's database storage functionalities.
For a non collections.deque approach, you have the option of list.append, list.pop and list.insert.
For just a Python builtin thing.
I'd be talking to #discord-bots.
@whole bear ๐
hi
!e py subscriptable = ["apple", "pear", "orange", "banana", "guava", "peach", "plum", "lychee"] result = subscriptable[-5:] print(result)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
['banana', 'guava', 'peach', 'plum', 'lychee']
@client.command(name = 'next')
@commands.guild_only()
async def next_in_queue(ctx):
next_player = queue.popleft() # Get the next player in the queue and remove them from the deque
await ctx.send(f'{next_player.mention} You are up next in the queue. Please join the #"Customs" voice channel to begin your game.')```
@client.command(name = 'queue')
@commands.guild_only()
async def queue_command(ctx):
queue.append(ctx.author)
embed = discord.Embed(title=f"1 player is currently in the queue" if len(queue) == 1 else f'{len(queue)} players are currently in the queue', description=f'{ctx.author.mention} has been added to the queue.', timestamp=datetime.datetime.now(), color = discord.Color.green())
await ctx.send(embed=embed)```
@ripe bane ๐
New game:
Get next 10 from queue
New person wants to join:
Add discord ID of user to back of queue
A spot opened up in team X:
Assign next from queue to role for team X
@rapid chasm
x, x10, or x10an14 - pick your poison =)
its pretty complex
i tried to do something like this (except the whole game part)
TLDR; i left the project
will you be making the VC's beerhunter? (i presume yes)
why dont you setup role permissions then? ( or even userid )
i think theres 50~100 ( or well used to be )
5m intervals, perhaps?
@bot.command()
async def make_channel(ctx):
guild = ctx.guild
member = ctx.author
overwrites = {
guild.default_role: discord.PermissionOverwrite(read_messages=False),
member: discord.PermissionOverwrite(read_messages=True),
}
channel = await guild.create_voice_channel(name=f'user {member.display_name}', overwrites=overwrites)
this should get you up and running
Hem
await ctx.channel.set_permissions(ctx.guild.default_role, send_messages=False)
this should work ?
wait what, its a random queue ?
who in their right mind would do such a thing
i presume it would be nice if you had the option to have a description
This
in the io?
In cryptography, a pepper is a secret added to an input such as a password during hashing with a cryptographic hash function. This value differs from a salt in that it is not stored alongside a password hash, but rather the pepper is kept separate in some other medium, such as a Hardware Security Module. Note that the National Institute of Stan...
hola
hewwo
Hewowo
sup hem
@hot saddle ๐
hello opal
Kinky
i have heared impressive sounds from you
Documentaries
About birds
Squawkumentary
"Oh there's a nice pair of big ones"
"Look at the blue feet on THOSE boobies!"
I would certainly change how I write
But in fairness it'd be just as rambly
@formal ember Yo
what you wrote reminded me of the sounds opal used to make
Oh thank god I don't have to worry about unhooking near as many cables as I thought
4k recreation
Super duper monkey
@shut rover ๐
monkey drip
Okay so far
It's addicting here
my bad i took it the wrong way
deez insta reels be messing me up
fr
:}
monster
:{}
monster?
you called opal a monster?
Or Master Monster
wtf?
Pokemon Master
@whole bear Or you could just give us the context
fight this
Well that was productive
fight him!:{
Okay thus far
@somber heath My favorite response is, "Eh, I'm conscious"
@whole bear Or you could just be nice to our users. That would be appreciated
No need for random hostility
Oh I learned something the other day
Jesus be patient
what game
You can use old coax cables that you may have fitted across your house for your home network
So if you had fittings for cable TV or what have you
I got the basic hardware, need to go back and buy faceplates
Didn't realize the old ones had gotten thrown out some how
akward vc
Which is REALLY annoying because it had useful information on them like what slot on the patch panel they're on
@whole bear I can ONLY imagine who might be making it awkward
Food for thought, really
A mystery for the ages
it was def me
Philosophers in the coming ages will look back at this point in time and muse who might have caused this issue
@whole bluff ๐
And they'll realize it was someone who had a comic book series
hi
what games do you guys play?
python
Java
@lucid blade Sup brah
c++
It's an accurate statement
no philosophical answers
Oh actually
Java
xd
i disagree with opal's prev ans
Thanks!
This is Master Brain Sketch By Russ Abbot
Actually 8080, you might be able to answer something for me

You know RJ45 cable testers, right?
How they are usually two pieces?
Is the remote one just a terminator?
This one doesn't on mine
That the best programming language is the one best suited to the task at hand? I suppose user proficiency comes into it as well. It would be a holistic decision-making process.
have you contributed to any crashes ?
Oh the green jobber?
SPLINKTECH
@whole bear Python, JavaScript, Java...
Largest
At this point... Probably JavaScript
php has a very large ecosys
Death to PHP!!
Trying to figure out proper procedure on this
yeah
Rollercoaster Tycoon is the template to live by
Build an entire game in Assembly
Like a mad man
well the best language when asked means the most used and favored language
in general
to which the answer shd be a single "lang"
is what i feel
i love OOP
exact same reason for PHP
8080
or probably they havent met the best tutors/teachers for teaching OOp

