#voice-chat-text-0
1 messages Β· Page 1014 of 1
i would look into twilio
whats that
twilio can host your code
But how do i get the code
yeah for corporate stuff I'd use twilio
it's the industry standard for stuff like this
The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.
To learn how to createβ¦
Okay ty
Hey guys i have a question. I am using pyodbc to connect to my db. I want to use multiple connections and i was wondering if i should use processing or threading for this purpose?
yes
@wind raptor I'll be on in a sec. Currently have a huge mouthful of breakfast sandwich, figured it'd be rude to talk with my mouth full
No worries
heya
π€¨
dedicated nerds
The best kind of nerds
a non dedicated nerd -
they don't put nearly as much dedication as the first
i suck at java but i don't suck at java compared to this
Quick question im using pycharm to do some linked in learning classes and his code runs and mine errors. just a quick help if you dont mind taking a quick look
text = """a b c a a b"""print(text.split())word_count = {}for word in text.split(): if word in word_count: word_count[word] += 1 else: word_count[word] = 1print(word_count)
sorry the copy and paste looks like shit
!codeblock
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.
Just 1?
ok
text = """a b c a a b"""print(text.split())word_count = {}for word in text.split(): if word in word_count: word_count[word] += 1 else: word_count[word] = 1print(word_count)
lol
that it?
3rd day learning to code
so i dont get how to paste this lol
Np
hes using replit.com to do his code
text = """a b c a a b"""
print(text.split())
word_count = {}
for word in text.split():
if word in word_count:
word_count[word] += 1
else:
word_count[word] = 1
print(word_count)
so i wasnt sure what im missung
hmm
thats how i had it first then i backed it 1 time ill try again
word_count[word] = 1
^
IndentationError: expected an indented block after 'else' statement on line 12
Ok so i see now
yes the word_count under the else needs to be indented aswell
yea that worled
it doesnt show it that way very well in the video on the replit website hes using
i was using replit to practice it yesterday and some people was kinda saying its not the best way to practice
some people was saying it acts different or somethng like that'
probably no need to confuse me more that i already am i guess. Just trying to destroy my mental more and more
Can i just borrow your brain??
and implement it into mine
Not great is better than -1 - 100
I just need it Monday thru Friday
So i can get a job to support my family
Same<<
Im just a dumb gamer
Not a smart gamer like everyone else i know lol
sorry i was completing some geo, what's going on
Is there a way to check how long you've been in a discord i thought last night was going to be my 3rd day in this Discord
there are articles about a grown man using twitter to post jokes and memes?
hi
new record
that power is heart stopping, very electrifying!
@opal lantern #voice-verification
yea thats kinda what i was thinking the moment i started the 3 days
A CCA PSA that tells us not everything on TV is real...
π€£
no one
can edge be installed on linux?
i will come back later guys π
Yes
ig ues
And they just enabled syncing on Linux like last month
<function hello at 0x101d60b80> Why i this at the end of my function?
Sorry to bombard you guys
You think thatβs memory location where itβs stored
So that wouldnt display if in something?
print(hello)
# vs
print(hello())
!eval
def hello():
return 2
print(hello)
print(hello())
@sweet lodge :white_check_mark: Your eval job has completed with return code 0.
001 | <function hello at 0x7f0ac8eb3d90>
002 | 2
Good bot
!e
code
!eval <code>
Can also use: e
*Run Python code and get the results.
This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!*
ok how do i use this?
You'll do !e and then put whatever code you want to run after it
!eval + code
Usually its best if you use a code block
!e def bark(): print("Woof Woof!") print("Im a Dog")for x in range(1): bark()def hello(): print("Hello Nick") print("Hello Wilson") print("Hows your Day going?") print("Wonderful so far today") print("You going to workout this afternoon?") print("No, Got to pick up my daughter from the baby sitters this afternoon and do some Mowing")for x in range(1): hello()print(hello)
@opal lantern :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | def bark(): print("Woof Woof!") print("Im a Dog")for x in range(1): bark()def hello(): print("Hello Nick") print("Hello Wilson") print("Hows your Day going?") print("Wonderful so far today") print("You going to workout this afternoon?") print("No, Got to pick up my daughter from the baby sitters this afternoon and do some Mowing")for x in range(1): hello()print(hello)
003 | ^^^^^
004 | SyntaxError: invalid syntax
You're a dog too?
So how do you do that then?
Ok so i need to hit !e with the 3 ticks?
ok
let me try again lol
I dont know how to do anything Mustafa
but what ive been told to do
!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.
!epy def bark(): print("Woof Woof!") print("Im a Dog")for x in range(1): bark()def hello(): print("Hello Nick") print("Hello Wilson") print("Hows your Day going?") print("Wonderful so far today") print("You going to workout this afternoon?") print("No, Got to pick up my daughter from the baby sitters this afternoon and do some Mowing")for x in range(1): hello()print(hello)
its highlighted now lol
Yea im not sure how to make it look like code though lol
Oh in my editor
itself
Ok i thought it would be like !e then my code copy paste it in then
hmm
!edef bark(): print("Woof Woof!") print("Im a Dog")for x in range(1): bark()def hello(): print("Hello Nick") print("Hello Wilson") print("Hows your Day going?") print("Wonderful so far today") print("You going to workout this afternoon?") print("No, Got to pick up my daughter from the baby sitters this afternoon and do some Mowing")for x in range(1): hello()print(hello)
Yea
Im missing something
py charm
i think
im on a mac
curently
im also pasting this into a web version of discord does that matter?
Exclamation mark, e, space, backtick, backtick, backtick, p, y, enter, code, backtick, backtick, backtick
def bark():
print("Woof Woof!")
print("Im a Dog")
for x in range(1):
bark()
def hello():
print("Hello Nick")
print("Hello Wilson")
print("Hows your Day going?")
print("Wonderful so far today")
print("You going to workout this afternoon?")
print("No, Got to pick up my daughter from the baby sitters this afternoon and do some Mowing")
for x in range(1):
hello()
print(hello)
def bark():
print("Woof Woof!")
print("Im a Dog")
for x in range(1):
bark()
def hello():
print("Hello Nick")
print("Hello Wilson")
print("Hows your Day going?")
print("Wonderful so far today")
print("You going to workout this afternoon?")
print("No, Got to pick up my daughter from the baby sitters this afternoon and do some Mowing")
for x in range(1):
hello()
print(hello)
That works
Or start from the backticks if you're not doing eval
So we cant paste it from the pycharm?
or did i break it lol
Wish i could stremam it
So bottom right hand corner of PyCharm, can you tell me what letters it shows?
Like mine has LF
LF on Windows?
I think so, can't remember
1 sec
Should be one of the three options: CR, LF, or CRLF
yea it says LF UTF-8 4 spaces Python 3.10(Hello World)
ill try to get a better screent shot for u
YES
I AGREEE
Im that example
exactly
All about Hilbert's Decision Problem, Turing's solution, and a machine that vanishes in a puff of logic. MORE BASICS: https://www.youtube.com/playlist?list=PL96C35uN7xGLLeET0dOWaKHkAlPsrkcha
Written with Sean Elliott https://twitter.com/SeanMElliott/
Graphics by William Marler https://wmad.co.uk
Audio mix by Graham Haerther https://haerther.ne...
mac me lol
And because it's the internet
Here we give a live reaction to Tom Scott's video about the Halting problem, and assess how accurate it is. His video is here: https://www.youtube.com/watch?v=eqvBaj8UYz4&ab_channel=TomScott
Easy Theory Website: https://www.easytheory.org
Become a member: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg/join
Donation (appears on streams...
it has fn , control, option, command
Hmm, one sec
lol k
do i need to highlight my code?
You can change the layout in the header
It always helps to highlight
It's not required, but it helps a lot, and it's a good habit to get into
!edef bark(): print("Woof Woof!") print("Im a Dog")for x in range(1): bark()def hello(): print("Hello Nick") print("Hello Wilson") print("Hows your Day going?") print("Wonderful so far today") print("You going to workout this afternoon?") print("No, Got to pick up my daughter from the baby sitters this afternoon and do some Mowing")for x in range(1): hello()print(hello)
Nope
dafuq
LOL
Okay, new plan
cry
Open up a new file in PyCharm
ok
Copy and paste the code that I reformatted here into the file. Save, close, and reopen Pycharm, then try to copy paste the code from said file to here
I wonder if that one file is just cursed
Try formatting with this option:
"If you ever feel like yelling cross words at someone, do a Sudoku, instead."
!e def bark(): print("Woof Woof!") print("Im a Dog")for x in range(1): bark()def hello(): print("Hello Nick") print("Hello Wilson") print("Hows your Day going?") print("Wonderful so far today") print("You going to workout this afternoon?") print("No, Got to pick up my daughter from the baby sitters this afternoon and do some Mowing")for x in range(1): hello()print(hello)
LOL
Bay cough. Sea biscuits?
$ sudo ku
command ku not found
$
It's saved as a .py file, right?
I find ligatures make stuff easier for me to read.
That feels less helpful to me
Ligaments. Bone ropes.
Wilson, I'm going to scoot us down in a sec
k
Comes down to personal preference, i guess.
Looks Sumerian or something.
same i have tried using ligatures for like a month and they just confuse me
Especially if you're having to look at someone else's code. You may not have ligatures enabled wherever you are. I just like getting used to what you commonly encounter
lol k
@molten pewter
Is there a grumpy theorem?
!e
code
!eval <code>
Can also use: e
*Run Python code and get the results.
This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!*
Stream GLaDOS: Well, what does a neck-bearded old engineer know about fashion? He probably - Oh, wait. It's a she. Still, what does she know? Oh wait, it says she has a medical degree. In fashion! From France! by gamequotes on desktop and mobile. Play over 265 million tracks for free on SoundCloud.
You have two wolves in you
A left wolf
and a right wolf
We had Tazos.
Like Pogs, but we had those, too.
I never saw the appeal.
We did yo-yos.
Got a few of those.
That's the Ill-uminati.
Why radiation?
Radar?
Hidenbuggy.
Cone text.
Mole tea player.
At The Mountains Of Madness wrote by H.P. Lovecraft and read by Richard Coyle for BBC radio 7 Episode 1 part A
Hey @whole bear!
It looks like you tried to attach file type(s) that we do not allow (.exe). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a, .csv, .json.
Feel free to ask in #community-meta if you think this is a mistake.
@whole bear What were you trying to post?
Well sure but I'm wondering what the program was
Fair enough
Sorry, was purely curiosity
Neat
G2g for a bit. Cheers
Labyrinthe Live Role Playing Club: Labyrinthe is a high fantasy, deeply immersive Live Role-play (LRP) system staged with in our atmospheric chalk cave site in Chislehurst, Kent
is it !e.py or just !epy i forgot already lol
or none of the above lol
Brain opn overload
!eval
code
!eval <code>
Can also use: e
*Run Python code and get the results.
This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!*
!eval
user_text = input("Please provide your name: ")
user_number = int(input("Please Enter 1 for Uppercase or 2 For lowercase?: "))
int = (1,2)
if user_number == 1:
print(user_text.upper())
else:
print(user_text.lower())
@opal lantern :x: Your eval job has completed with return code 1.
001 | Please provide your name: Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | EOFError: EOF when reading a line
!e
user_text = input("Please provide your name: ")
user_number = int(input("Please Enter 1 for Uppercase or 2 For lowercase?: "))
int = (1,2)
if user_number == 1:
print(user_text.upper())
else:
print(user_text.lower())
@opal lantern :x: Your eval job has completed with return code 1.
001 | Please provide your name: Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | EOFError: EOF when reading a line
It actually freking works! damn
user_text = input("Please provide your name: ")
user_number = int(input("Please Enter 1 for Uppercase or 2 For lowercase?: "))
if user_number == 1:
print(user_text.upper())
elif user_number == 2:
print(user_text.lower())
else:
print("Error, please enter 1 or 2")
might want to reload your client bluenix
I'll consider it
I know Hemlock is not in voice chat, they were when I started making them though
I want them hand delivered by bluenix in the flesh to the UK
yeah mustafa explained
flesh
Ah right, in the flesh π
I have made mint chocolate ganache filling for them :3
What you been up to KJ?
No worries
Oh interesting
I wrote a BF transpiler into C once.
It's surprisingly easy to do
π
@lavish rover was this for the one lone coder game jam?
uhh no i don't know what that is
i know one lone coder, not about the code jam
Charlie's gone ; - ;
i see
Scared away
i just saw about olcpge a while back, and it's pretty convenient to jut draw graphics
Erm, anyway, I was just popping in to say hello, gotta cook dinner π
i haven't actually seen his videos in a while
what are you making
Fajitas 
I have pinballs and fudge milkshake for dinner
Sounds er... nutritious
Ah yes, all of the food groups
I am a gram of sugar away from a coma at this point
@molten pewter are you from Santa Monica?
Do you guys think that getting a remote job and moving to Bali a good idea?
It's shown on the web page you've sent
Remote job first
I'm getting out of quant finance and interviewing for remote developer jobs to move
Has anyone ever tried doing something similar? If so, how did it work out?
May I have voice permissions?
This is the kind of thing that was big in the 00s. I always liked the premise but it never stuck. Do you use it?
I know...
I love love love rss feeds, and my favorite one, bloodlines, died.
rss, didn't die, it has just been depreciated.
class Solution:
def maximumProduct(self, nums: List[int], k: int) -> int:
q = nums.copy()
heapq.heapify(q)
for _ in range(k):
v = heapq.heappop(q)
heapq.heappush(q, v+1)
t = 1
mod = 10**9 + 7
for v in q:
t = (t * v) % mod
return t
I feel like it was a victim of the privatization of NEWS.
It's dead in the sense that few places actively support it any more
yeah
Gigolo
Git
gibberish
Guilty wait no
Delicious and addictive baked Korean chicken wings recipe! Baked Korean chicken wings are a delicious and easy way to spice up your dinner. These baked spicy chicken wings are coated in a sweet, spicy and sticky sauce that will have everyone coming back for seconds. There are many ways to enjoy chicken in a Korean
{'categories': {'available-help-channels': [{'how-to-get-help': 'text'},
{'help-candy': 'text'},
{'help-bagel': 'text'}],
'logs': [{'all-logs': 'text'},
{'big-brother-logs': 'text'},
{'duck-pond': 'text'}],
'miscellaneous': [{'bot-commands': 'text'},
{'general-meta-voice': 'text'},
{'dev-core-contrib': 'text'}],
'occupied-help-channel': [{'help-apple': 'text'},
{'help-banana': 'text'}],
'python-help-dormant': [{'help-bread': 'text'},
{'help-burrito': 'text'}],
'staff': [{'admins-mods': 'text'},
{'lounge-helpers-org': 'text'},
{'defcon': 'text'},
{'incidents': 'text'},
{'incidents-archive': 'text'},
{'staff-announcements': 'text'},
{'dev-logs': 'text'}],
'voice': [{'voice-verification': 'text'},
{'vc': 'voice'},
{'staff-voice': 'voice'},
{'afk': 'voice'}],
'welcome': [{'welcome': 'text'}]},
'name': 'devserver',
'roles': ['admins', 'devops', 'helpers', 'voice-verified']}
How the hell would I type hint this?
config: Any
JSON = Union[Dict[str, Any], List[Any], int, str, float, bool, Type[None]]
``~/.config/nvim`
Can you make a type hint alias like... across vertical rather than all on one line? Like:
config = (
dict[
dict[
str,
``` okay nevermind, that's somehow works
do you not have a ~/.vim directory?
@lavish rover Did you know your cam is on?
@half silo
stupid touch bar on macos
there should be a plugged/coc.nvim folder
It would be nice to have that
have you run :PlugInstall in vim?
I'm out of ideas then, sorry. I haven't really used vim in years now
you should try to find out where coc.nvim is checked out to
perhaps run a search on your home directory
yarn install
yarn build
#career-advice @formal lintel will probably have more info
don't be too aggressive, he might go bali-stic
!user

Created: <t:1443481946:R>
Profile: @rugged root
ID: 98195144192331776
Joined: <t:1525291749:R>
Roles: <@&267628507062992896>, <@&807415650778742785>, <@&267629731250176001>, <@&831776746206265384>, <@&587606783669829632>, <@&797891034906099752>, <@&267630620367257601>, <@&295488872404484098>, <@&764245844798079016>, <@&764802720779337729>, <@&463658397560995840>, <@&542431903886606399>
Messages: 58,921
Activity blocks: 12,057
Total: 30
Active: 0
!user
Created: <t:1510259196:R>
Profile: @lavish rover
ID: 378279228002664454
Joined: <t:1604700419:R>
Roles: <@&267630620367257601>, <@&430492892331769857>, <@&764802720779337729>
Messages: 21,702
Activity blocks: 2,905
Total: 0
Active: 0
I do about 3-4 hours per week but it'll probably drop when my vacations end lmfao
These series of videos were developed for remote proctoring of trainees on the DaVinci Surgical Skills Simulator (DVSSS).
We're opening up the code and making it free. Read more about how this effects you.
import random
while True:
_ = input("Enter rock, paper or scissors: ")
print(random.choice(["You won", "You lost", "Draw"]))
!e ```py
input = lambda _ : "Rock"
import random
while True:
_ = input("Enter rock, paper or scissors: ")
print(random.choice(["You won", "You lost", "Draw"]))
break
@quasi condor :white_check_mark: Your eval job has completed with return code 0.
You lost
!e
input = lambda _ : "Rock"
import random
while True:
_ = input("Enter rock, paper or scissors: ")
print(random.choice(["You won", "You lost", "Draw"]))
break```
@tidal shard :white_check_mark: Your eval job has completed with return code 0.
You won
@lavish rover Look at the bottom pin in this channel
soup tier list?
Yeeeeeeeep
I'm still sad that it exists
hellooooo
hello
How Its Made Classic
How Its Made Boiled Sweets
Credit : Discovery Channel
The triple point occurs where the solid, liquid, and gas transition curves meet. The triple point is the only condition in which all three phases can coexist, and is unique for every material. Water reaches its triple point at just above freezing (0.01Β° C) and at a pressure of 0.006 atm.
Biscuits
PR, P.R., Pr, pr, or Pr. may refer to:
!user
You are not allowed to use that command here. Please use the #bot-commands channel instead.
i just now came into now just now
?
pygit implements just enough of a Git client (in 500 lines of Python) to create a repo, commit, and push itself to GitHub.
Sorry, computer is overheating π
@lavish rover The sound is of course good - it will be cool if you share your screen - we have already gathered enough in the voice channel π
but for some reason i dont see it
What's program you're using?
@lavish rover what you doing?
I don't know much rust, I feel like you can do it in unsafe rust
@lavish rover use bracket pair colorization
Hello friends
:q!
y = 0
for x in s:```
File "/workspace/default/solution.py", line 3, in accum
for x in len(s):
TypeError: 'int' object is not iterable
print(y*(x+1).title())
equivalent to
string = y *(i + 1)
print(string.title())
def accum(s):
tmp = []
for i, y in enumerate(s):
repeated = y * (i+1)
tmp.append(repeated.title())
return "-".join(tmp)
problem with that is strings are immutable.. you are creating whole new string everytime you do
result += repeated
complexity will be quadratic...
because you are creating it n times!
meanwhile at microsoft, recreating @lavish rover as AI, with all this data!
yep
I can't parse all the words @cosmic dove is saying
I have serious problems with sleep. it is destroying my life!
Thank you to BetterHelp for sponsoring this video. To receive 10% off your first month, visit: https://betterhelp.com/adhdhowto
CRISIS LINES: https://www.betterhelp.com/gethelpnow/
RESOURCES: https://www.verywellmind.com/adhd-and-imposter-syndrome-3888166
https://marlacummins.com/what-is-impostor-syndrome-and-what-can-adhd-adults-do-about-it/
...
Hello! I have a question. Is reading programming books better than watchin videos
both
oh
depending on how u work better
thats definitely videos
but
people say that videos dont cover mcuh
much*
but books do
I was confused
but now im clear
Song used in video:
- Elena Siegman - 115
https://youtu.be/-B19u9tHnIs
Instagram: https://www.instagram.com/lasakurhosyn/
Facebook: https://www.facebook.com/profile.php?id=100076069196843
-------------------...
File "tests.py", line 1, in <module>
from solution import ascii_encrypt, ascii_decrypt
File "/workspace/default/solution.py", line 5
def ascii_decrypt(plaintext):
^
IndentationError: expected an indented block```
https://www.youtube.com/watch?v=BXpu6tbFCsI @molten pewter
Support My Channel! Download Free βοΈ Vikings War Of Clans here:
β€ IOS: https://bit.ly/2K4BiuT
β€ Android: https://bit.ly/2Fov0Yy
And Get 200 π°Gold, And a π₯Protective Shield for FREE
Get your BLOODY DELICIOUS Emu tshirt - https://oversimplified.tv/merch
Support us on Patreon: https://www.patreon.com/OverSimple
Want to know how I make these vide...
@lyric moss that 0 might be string
and you are comparing with "0" == 0
x would be
l[x] wouldn't be
!e
l = 'a0bcd'
x=0
print(f"{l[x] == 0}")
print(f"{x == 0}")
@quasi condor :white_check_mark: Your eval job has completed with return code 0.
001 | False
002 | True
!e
l = "0 1 2 3 4".split()
for x, y in enumerate(l):
print(type(l[x]), type(x))
@signal sand :white_check_mark: Your eval job has completed with return code 0.
001 | <class 'str'> <class 'int'>
002 | <class 'str'> <class 'int'>
003 | <class 'str'> <class 'int'>
004 | <class 'str'> <class 'int'>
005 | <class 'str'> <class 'int'>
<enumerate object at 0x7ff1adf4cb80>
!e
print(*enumerate("Hello"))
@lavish rover :white_check_mark: Your eval job has completed with return code 0.
(0, 'H') (1, 'e') (2, 'l') (3, 'l') (4, 'o')
(0, 'PASSWORD')
it only splits string
onfdsoihds oijngonfdgokdsg fdsokgfskm
use
list(plaintext)
to get chars
'onfdsoihds', 'oijngonfdgokdsg', 'fdsokgfskm'
@quasi condor what studies?
gives you tuples as you ask.. it doesn't create the whole list of tuples
it's called a generator
(0, 'P') (1, 'A') (2, 'S') (3, 'S') (4, 'W') (5, 'O') (6, 'R') (7, 'D')
for x, y in enumerate(l):
x is the index, and y is the character?
yep
@quasi condor ?????????
CFA - chartered financial analyst - level 1. It's not really complex stuff, just a fair chunk of very boring stuff
git client in rust
get a fox, and tell everyone it's a dog... @molten pewter π
most of the land is cold, ig @molten pewter and communism!
This is a list of countries by oil production, as compiled from the U.S. Energy Information Administration database for calendar year 2021, tabulating all countries on a comparable best-estimate basis. Compared with shorter-term data, the full-year figures are less prone to distortion from periodic maintenance shutdowns and other seasonal cycles...
Hello
sure
can show python tricks? or tips
web scraping
ahh alright
how about blender addons?
how do you make one π
how is your day btw
oh
Hi
lets go with something simple how about python decorators
okay
you would kind of wrap it?
new func.. and it calls old func
write a wraper, that wraps around the wraper!
ahh
Hello everyone, I need some suggestions. I want to go blockchain developer side. I don't have any experience in programming. I joined one course called CS50, right now I am on Lecture 7 of that course total 10 are there.. so what should I do ? should i drop that course ? move to blockchain side or i should complete it first
You need to be strong on the fundamentals irrespective of the path you wanna take in programming.
Finish that course.
for example can you please tell me like what in fundamentals
ok
yes
VC1, if you wanna talk
i am not sure how much i know
Let's not mangle this chat.
**kwargs? *args
now would that work the same way in class
yes
defin it inside a class and we can use as a method?
it works for methods.... a class is just a bunch of methods!
she is asking may be like
@logclass.log
alright
yep
Does cpp have them?
I read some Kotlin, it is wired... they use @ syntax to label stuff
it's going great!
are you a student?
yes
cool... cs?
no just a normal high schooler
okay
hbu?
undergrad, 4th year
I never used it... I know it is used for generators
with the asyncio
!e
def my_enumerator(A):
for i in range(len(A)):
yield (i, A[i])
A = "hello"
print(*my_enumerator(A))
@signal sand :white_check_mark: Your eval job has completed with return code 0.
(0, 'h') (1, 'e') (2, 'l') (3, 'l') (4, 'o')
it is to evalute stuff lazyly
where would generators be useful?
like haskell
I think python uses garbage collection...
Decorator?
decoatoers
#voice-chat-text-0 i have voice chat
we are raising an expection in the bottom
okay
threading
π
from threading import Thread
@cedar briar is a helper
anything that is bottlenecked by i/o... threading makes it faster...
but if you want to just raw computation, it might be slower!
then how about Thread Lock
it's called a race condition!
what are ctypes?
oh
that is the last thing, I want to deal with π
how about the gc library
I heard, python is garbage collected
how about the is operator and **in **
what is the difference... I know don't much... about memory management!
I don't know much, java stuff looks ugly... doing something with time is quite ugly in my imo...
I like stuff to be time independent!
def volume(w, l, h):
if name == 'main':
w = int(input())
l = int(input())
h = int(input())
print(volume(w,l,h))
def check_reverse(s):
reverse = []
length = len(s)
while length > 0:
reverse += s[length - 1]
length = length - 1
reverse = ''.join(reverse)
if s == reverse:
return True
else:
return False
print("The revresed string of 'abba' is same or not?: ",check_reverse("abba"))
print("The revresed string of 'abc' is same or not?: ",check_reverse("abc"))
Finish the function check_reverse that checks whether a string is reversely equal, return True if yes.
For example, checkreverse('abba') should return True, while checkreverse('abc') should return False.
def reverse(Original)
return reverse[::-1] == Original
reverse("abba")
reverse("abc")
def check_reverse(Original)
return Original[::-1] == Original
check_reverse("abba")
check_reverse("abc")
#method for checking the reverse of input string is same or not...
def check_reverse(s):
reverse = [] #declare the list for storing the reverse string...
length = len(s)
while length > 0: #fetch the one by one character from the inputted string and store its reverse in reverse list...
reverse += s[length - 1]
length = length - 1
#make the list of characters to string...
reverse = ''.join(reverse)
#check condition for revresed string and inputted string are same or not...
if s == reverse:
return True
else:
return False
print("The revresed string of 'abba' is same or not?: ",check_reverse("abba"))
print("The revresed string of 'abc' is same or not?: ",check_reverse("abc"))
@pallid marten You can communicate with people in the voice channel here for the time-being.
It shouldn't take long to meet the message requirement, although don't spam messages.
def check_reverse(s):
return s[::-1] == s
sounds good thank you!
i have a strange problem if this is the right place to put it
i wrote code that functions as a giant block. I want to separate the running block of code into sections (so I can unit test and change these parts more efficiently). whenever I do those, I can't seem to get it working
would anyone like to watch along? if not totally understand
also happy to paste stuff here, but don't expect anyone to do the work for me. just light tips on what i'm screwing up while trying to convert a huge block of code into individual functions
If it's helpful, I've got a large block of code that pulls ESPN score information for user specified leagues and outputs them as scores (made a nifty print array for terminal). I'd like to transition this giant block into individual functions:
- Parameters Function (get info on leagues, game status you'd like to output- eg. hide games that've finished and only show live)
- Request Function- get info from ESPN
- Append Games List function- take info from ESPN and create lists to output that information
- Output function
All of this is currently in place but i'd like to compartmentalize to pretty it up, make unit testing efficient
def arrange(x,y,z):
lst = [x,y,z]
arr = #use a sort function to arrange three numbers from small to large
return arr
!e
print(sorted([1, 345, 34, -234, 2345.435]))
@terse needle :white_check_mark: Your eval job has completed with return code 0.
[-234, 1, 34, 345, 2345.435]
!e
my_nums = [2, 345, 456, -123, 2134]
my_nums.sort()
print(my_nums)
@terse needle :white_check_mark: Your eval job has completed with return code 0.
[-123, 2, 345, 456, 2134]
Are you streaming your code session somewhere? Or is everyone just answering your questions based on audio (which would be wildly impressive)
def arrange(x,y,z):
lst = [x,y,z]
arr = lst.sort()
return arr
def arrange(x,y,z):
lst = [x,y,z]
lst.sort()
return lst
def arrange(x, y, z):
return sorted([x, y, z])
if you don't mind me asking-- why doesn't
[4,1,8].sort() work?
why does the list need to be stored as a variable to sort?
sort method returns None
so won't work...
yeah- did it in test-- wondering why [] is only list when it's stored as a variable
its a void function
it's still a list
it's just you do the sort for it
but you don't have the result
It did sort the list... but you didn't bind it to a variable
so you can't use that list
what I'm having difficulty understanding is:
list = [4, 1, 9]
sorted_list = list.sort()
is different from:
sorted_list = [4,1,9].sort()
AHHHH that makes sense
yep
.sort() is method... which returns None
I wish, it returns a reference to the list... but it is what it is
i've gotcha- thanks helium-- was seeing this problem and wondering if there was a way to consolidate it to 1-2 lines rather than 3
tried to get sneaky haha
sorted_list = sorted([4, 1, 9])
will work
but it creates a new list with those elements
@lavish rover vertex vs tkinter?
ooooo i should jump into documenation for sorted function
sorted is native? or needs to be imported
native
thanks helium very cool
so this hw problem could be simplified to:
def arrange(x,y,z):
arr = sorted([x,y,z])
return arr
testing now
yup it works!
no need to assign arr
see
waste of instruction
not here... but in general, much more readable.... if you assign it to a meaningful name..
so a pythonic debate?
it is
oh
your point is that it isn't a waste
I get it sorry
arrange is just a helper function
could the readable name issue be solved with a quick in-line comment?
theres not point in assigning arr
def arrange(x,y,z):
return sorted([x,y,z]) #returns sorted argument
that commentline is super pointless my bad
overhead of using python is so high... assignments don't matter that much... and I'm not taking about here
def fib(num):
lst = [0,1]
for i in range(num):
fibarr = lst[-2:]
#consider a line of code here so that the lst become a fib sequence
return lst
i have a big block of code that i want to seperate into functions so I can unit test, would anyone like to watch?
!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.
!e
a = [1, 2, 3]
print(a[-2:])
@signal sand :white_check_mark: Your eval job has completed with return code 0.
[2, 3]
!e
x = [1,2,3,4,5,6,7,8,9]
print(x[-2:])
@lavish rover :white_check_mark: Your eval job has completed with return code 0.
[8, 9]
because fib requires sum of last two elements in list right
def fib(num):
lst = [0,1]
for i in range(num):
fibarr = lst[-2:]
#consider a line of code here so that the lst become a fib sequence
return lst
would you use 'i' to determine what last two values in list are, then sum those two, then append the list with that value?
it will
fibarr[0] + fibarr[1]
lst.append(fibarr[0] + fibarr[1])
newfibnumber = fibarr[0] + fibarr[1]
lst.append(newfibnumber)
wait the -2 already does that right?
fibarr = lst[-2:] gives us last two values in list which we just need to sum
def fib(num):
lst = [0,1]
for i in range(num):
x, y = lst[-2:]
lst.append(x + y)
return lst
@quaint oyster sum will take constant time, if you add up constant number of items
here we are adding only 2 items
so it is constant time
def fib(num):
lst = [0,1]
for i in range(num):
fib = sum(lst[-2:])
lst.append(fib)
return lst
in our use case it is constant time
how do you guys format code in chat?
you will get use to it in couple of days
coming up with logic is MUCH MUCH MUCH harder than writing it down in a language
@umbral terrace
!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.
thank you buddy
!code
def fib(num):
lst = [0,1]
for i in range(num):
fib = sum(lst[-2:])
lst.append(fib)
return lst
bro
read what the bot said
list = fib(10)
'''py
def fib(num):
lst = [0,1]
for i in range(num):
fib = sum(lst[-2:])
lst.append(fib)
return lst
'''
one above tab key
def fib(num):
lst = [0,1]
for i in range(num):
fib = sum(lst[-2:])
lst.append(fib)
return lst
thank you lmao
i'm so sorry yall
ye athat works
function name is fib, you reused name in fib in line 4... if it is a recursive function, it will not work!
ok fair....
def fib(num):
lst = [0,1]
for i in range(num):
fib_sum = sum(lst[-2:])
lst.append(fib_sum)
return lst
fixed
fib is in local scope of fib function
fib function is in global scope
I'm also a 4th year college student, cs
https://paste.pythondiscord.com
@pallid marten you can paste code here
if it is big
you need to save it and share the link
what's the problem
http://www.espn.com/apis/devcenter/docs/scores.html#using-the-api turns out it's legal- we're perfect π
π @lavish rover
okay...
I heard about it.. I just remembered...
I remember I watched couple of videos about it before
yeah
@quaint oyster spell it!
PERT
Not showing up in google
network flow stuff!
@lavish rover @quaint oyster it's not efficient but, damn it's beautiful!
just raise keep raising A to power... you will get shortest path
and any k length path
Alot of proofs in clrs they use triangle inequality, If i remember correctly
def hometeam(list):
home_abv = teams_list[0]['abbreviation'] # SEA
home_mascot = teams_list[0]['name'] # Mariners
home_city = teams_list[0]['location'] # Seattle
home_score = teams_list[0]['score']
home_record = teams_list[0]['record'] # 13-2
home_abv_cen = home_abv + ' : ' if len(home_abv)< 3 else home_abv + ' : '
home_abv_spc = home_abv + ' ' if len(home_abv)< 3 else home_abv + ' '
home_abv_win = '*' + home_abv + ' : ' if len(home_abv)< 3 else '*' + home_abv + ': '
return all
def hello(x, y):
return x, y
def hometeam(list):
d = {}
d['home_abv'] = teams_list[0]['abbreviation'] # SEA
d['home_mascot'] = teams_list[0]['name'] # Mariners
d['home_city'] = teams_list[0]['location'] # Seattle
d['home_score'] = teams_list[0]['score']
d['home_record'] = teams_list[0]['record'] # 13-2
d['home_abv_cen'] = d['home_abv'] + ' : ' if len(d['home_abv'])< 3 else d['home_abv'] + ' : '
d['home_abv_spc'] = d['home_abv'] + ' ' if len(d['home_abv'])< 3 else d['home_abv'] + ' '
d['home_abv_win'] = '*' + d['home_abv'] + ' : ' if len(d['home_abv'])< 3 else '*' + d['home_abv'] + ': '
return d
class are just structs with some extra features like inheritance...
for just data... we have dataclasses
!e
def pad3(s):
return f'{s:>3}'
print(repr(pad3("AB")))
print(repr(pad3("ABC")))
print(repr(pad3("I")))
@lavish rover :white_check_mark: Your eval job has completed with return code 0.
001 | ' AB'
002 | 'ABC'
003 | ' I'
not sure if you heard me earlier, but no I don't have a masters
yeah.. I heard..
and also x++
x += 1 won't work either
x + 1
and where is func?
!e
def f(x):
print(x)
f(x+1)
f(0)
it is only printing 1004 lines, I wonder why!
everyone think they have unbreakable security, until something breaks @lavish rover and something always breaks!
it's only breakable if you're smart enough to break it π€
The Talos Principle
def hometeam(teams_list):
home_abv = teams_list[0]['abbreviation'] # SEA
return home_abv
hometeam(teams_list)
print(home_abv)
'''
NameError: name 'home_abv' is not defined
I'm returning home_abv with the function, is this not the way to do it```
!e
print("!e\`\`\`print('hello')")
!e
s='s={};print(s.format(repr(s)))';print(s.format(repr(s)))
@lavish rover :white_check_mark: Your eval job has completed with return code 0.
s='s={};print(s.format(repr(s)))';print(s.format(repr(s)))
that won't work
yeah, most likely won't work
yeah, the message would need to start wth !e, but the bot's message always starts by tagging you
yeah.. where is the repo for this bot
def hometeam(teams_list):
home_abv = teams_list[0]['abbreviation'] # SEA
home_score = teams_list[0]['score] # 4
return home_abv, home_score
x = hometeam(teams_list)
print(x.home_abv)
Would this work?
def hometeam(teams_list):
home_abv = teams_list[0]['abbreviation'] # SEA
home_score = teams_list[0]['score'] # 4
return home_abv, home_score
home_abv, home_score = hometeam(...)
print(home_abv)
result = hometeam(...)
print(result[0])
But I like learning about stuff that "demystify" things I already know...
for sure it feels very good to do that
that is pair, if you are coming from cpp or something!
!e
def foo():
return 1, 2, 3, 4, 5, 6, 7
print(*foo())
@lavish rover :white_check_mark: Your eval job has completed with return code 0.
1 2 3 4 5 6 7
I agree...
that one concept you showed will help me simplify all of my code, thank you very much
hide the implementation details.... and if they are truely interested, they will come across implementation details
you will do it for first few years... you will, atleast, I will be bored af without purpose!
π€£
what
what course?
the one at the link above
but if you want put your time and effort into then it would be paid
:\
if you want to just find documentations/examples and stuff similar to it so you can learn little by little
wait what
say that again
create a new pateron subscriber only discord server
pateron doesn't take that much cut
it only takes 5%
not worth building new platform for that!
π€£
better yet,why not start your company on small places
since some of the resources are limited
alright I'll steal that
<-
In economics, a network effect (also called network externality or demand-side economies of scale) is the phenomenon by which the value or utility a user derives from a good or service depends on the number of users of compatible products. Network effects are typically positive, resulting in a given user deriving more value from a product as mor...
twitter messed it up
I don't think so!
the idea of one person owning twitter is bad.... no matter how good he is
and it shouldn't be allowed...
Jack said, it is pretty hard to make it own source
feelsbadman
huh?
Jack dorsey
oh
Mustafa have you make a plugin arc with python before?
architecture -> arc
any
maybe on the subject on scriptable games
Can someone stream a movie in here?
movie I don't think so...
copy righted content
:/
I heard Rumble is good
sure
dec 2021
turning red?
that 2
and Turning blue
I don't find anything
It was a joke ig
I'll watch it
yeah
also Spider-Man: No Way Home?
Never heard of it
it was bad
Dr. Normal and the universe of sane will be good, i hope
no
Sonic the headache?
haha, no
369 Days: This Day
no
!e
while True:
print("no")
@signal sand :x: Your eval job has completed with return code 143 (SIGTERM).
001 | no
002 | no
003 | no
004 | no
005 | no
006 | no
007 | no
008 | no
009 | no
010 | no
011 | no
... (truncated - too many lines)
Full output: too long to upload
π
have you watched morty and rick?

gravity falls?
!e
for i in range(9):
print('Yes (οΌ οΌΎοΌοΌΎ)')
@hybrid linden :white_check_mark: Your eval job has completed with return code 0.
001 | Yes (οΌ οΌΎοΌοΌΎ)
002 | Yes (οΌ οΌΎοΌοΌΎ)
003 | Yes (οΌ οΌΎοΌοΌΎ)
004 | Yes (οΌ οΌΎοΌοΌΎ)
005 | Yes (οΌ οΌΎοΌοΌΎ)
006 | Yes (οΌ οΌΎοΌοΌΎ)
007 | Yes (οΌ οΌΎοΌοΌΎ)
008 | Yes (οΌ οΌΎοΌοΌΎ)
009 | Yes (οΌ οΌΎοΌοΌΎ)
no I watch gravity rise
haha,
That time I got reincarnated as a Tuna
Miper, and Dable are funny af
βββΏβ±ββΏβ
aiogram
@whole bear in case you're trying to figure out why you're muted
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
yes i was lol
well there you are
meet those requirements
then try again
and then you will be voice verified and able to speak
50 msg π
you've sent 7 so far
have some conversations and you'll get there
yea mistyping lol
hi
.
@clever ivy in here please
hello
i need help
please server unmute me so i can talk
so how do i do that
switch the channel to the code/help channel i'd guess?
All channels are behind the voice gate
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
so you should type 50 messages now
chris please can i call you
maybe run a program that writes the numbers 1 - 45
Don't spam or you're waiting time gets upped to 2 weeks
No
β
This
i wondered if there is a chatblock π
I don't even know if I can help you with it
i rlly need som help
Just tell me what it's about
print an image
You're converting an image to characters to print in terminal?
just answer to me in a call english isnt my main language
to talk would be much easier
i hope your language is in it
thought so
please @wind raptor
For me it only happens with python discord @wind raptor '
#[regex(r#"".""#, |string| Token::Group(string.slice()[1..string.slice().len()-1].chars().map(|x| Token::Char(x)).collect::<Vec<_>>()))]
hi
