#voice-chat-text-0
1 messages ยท Page 77 of 1
mental ability
ikr!!
agree
language framework is kinda bad
but i appreciate the problems they have
list[-1].find(list[-2]) == True?
if strings[i-1] not in strings[i][1:]:
return False
return True```
this is what i tried
need an iterable "i"
well i guess your method should work too
it is always better to use built in function cuz they are faster, but for the practice we should not
you dont need loop
if we are checking only the last one, why would we nned a loop?
i mean i am used to it
as a beginner
i see
i hope tht as the time passes by i shall be able to improve my code
found a bit shorter way than this as well
used "in" operator
i understood my mistake...i was dumb for using iteration ty:}
Had to replace a scanner, sorry
And for that, I had to dig into the garage
.... I forgot to put the key back
One sec
Okay, NOW I'm back
How's it going, Rab
@amber raptor Think you'll be snagging the new Zelda when it comes out?
No comment
Yeah true
True
Yeah that's fair
I just really really really hope they make cooking not a slog
Fair
True, but it's a first party Nintendo game
They really don't make their prices - right you already said you'd be getting a physical copy
Probably yeah
So interesting thing
The new Zelda is their first $70 title
But they also have a game voucher thing, where you pay $100 for two vouchers that are good for two games on a list
And yeah, agreed
After playing PS5 so much and then trying to play Switch stuff...
It's very jarring
And that's processor and gpu combined right?
APU or whatever they're called?
Ah right right
It really is weird that they haven't done a beefy Switch. So far the Switch is lasting two console gens
That would be pretty damning for them at this point
In their past consoles they have been
GC > Wii > Wii U
Yes you could
That's how I played most of my GC games
I know you could do Wii
Double checking GC
Ah no
Wii U cut the backwards compat
Just GC
Yep
And just have folks keep remastering the game so you can just upgrade
Last of Us was a full remake
Yeah
Oh for sure
That's what I do with the Witcher
Oh interesting fact for that. So I got the upgrade for Witcher (think it was free? can't remember), but I had a disc copy
So in order to play the PS5 version, and even though it doesn't read from the disc
I still have to have it in the system
Sure sure
Yeah agreed
I'm guessing they probably will stick with the hybrid style console
Since that's been gold for them
Would be curious to see what the manufacture cost difference would be
So it's looking like a Switch costs them (including the doc and the 2 joycons) $257
Give or take
And now I'm thinking about X-Men
Possible
But the last few consoles they've been getting lower powered stuff compared to the time for reduced cost
Hell yes
Fo sho
True, but sometimes that's for the best
A la Breath of the Wild
I know you hated the weapon durability
But you started enjoying it I thought
True true
Oh yeah yeah
Guardians yeah
Absolutely
And you can also go and craft gear with the Guardian parts
Still, the Zelda formula had just gotten stale
Oh they took a huge fucking risk
Never any of the old ones?
Link to the Past on SNES?
Ah okay
Yeah
Makes sense
Same
I never look at E3
Or PAX or any of those
Hard not to see them there
True
Oh is Yahtzee still doing Zero Punctuation?
I haven't looked in a long time
HA
That's the kind of shit that would drive me bonkers
@odd lynx yo
Well
Shit.
I don't remember what type I made this registry value
hi @rugged root
How's it going
Never really could do vodka straight
Gin straight I can
Love it
Oh I'm a dumbass
I could have just checked regedit
Doy
Later bud
I'm going to assume yes
@lavish rover Sup brah
Shots fired
Wow
That... huh
I mean it would have had to build the skeleton and what not right?
Or did they strip that for Fleet
Unless it was still trying to
I've had PyCharm pitch a fit or not recommend stuff while it's still doing the skeleton.
Yeah
Not important
Stick with what you like
HA
God and I have ones I want to say
But I CAN'T
And they wouldn't work with text
Yeah hilarious
@whole bear Yo
See previous can't do the joke JUSTICE without speaking out loud
???
hey
Not much, you?
Oh huh
Totally forgot pre-commit was a Python package
Hear you there, bud
I respect the hussle
Hard for me to respond quickly
Super position
Not all jokes hit
It happens
HA
I get why you're saying it
Pun city
my cat drinks water only inside a box
@whole bear Water you talking about. He made a pun that was in relation to your joke
That's the pun
Shit, I have a punchline but no lead up
And it's not even good enough to find one for it
Does anyone know of any resources to help me understand why you would call a function without it's parentheses? From print() I can see it returns a reference to that function, but I'm struggling to understand where how this would be useful in some kind of example
I've got a couple examples I can scratch out
The property decorator would have skin in the game. As would special methods.
But I'm not sure that's what the question is after.
def map(func, lst):
return [func(x) for x in lst]
map(print, [1,2,4])
You might want to pass a generic function somewhere
In this case you have a map function that takes I a function reference and a list
map doesn't really care what the function is, it's only job is to call the function with the items in the list
!e
def hello():
print("hello")
def yo():
print("yo")
def bacon():
print("It's what's for food")
menu = {1: hello, 2: yo, 3: bacon}
print("Pick a number and I'll say a thing!")
print("Pick 1, 2, or 3")
choice = 2
menu[choice]()
This is less common, but can be handy if you want to make little terminal programs
@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | Pick a number and I'll say a thing!
002 | Pick 1, 2, or 3
003 | yo
I understand it in this use-case
# Return the price, which is the second item within the tuple
return item[1]
if __name__ == "__main__":
products = [("banana", 5.95), ("apple", 3.95), ("orange", 4.50), ("watermelon", 4.95)]
# Use the function order_by_price for sorting
products.sort(key=order_by_price)
for product in products:
print(product)```
That's another good one
This make sense to me, however I'm looking at some mqtt stuff
What's mqtt?
That's a thing?
You mean this? https://mqtt.org/
A lightweight messaging protocol for small sensors and mobile devices, optimized for high-latency or unreliable networks, enabling a Connected World and the Internet of Things
if rc == 0:
print(f"Connection succesful - RC: {rc}")
else:
print(f"Connection error - RC: {rc}")
client = mqtt.Client("python1")
client.on_connect = on_connect```
I'm struggling to understand this
Yeah that's what I mean MQTT
Ah, that's basically their way of adding "callbacks"
Oh in this case you're just l - yep
So you want to do some custom stuff when there's a connection
This way you just assign a function, and whenever you have a connection it will call that function
You want to pass the function itself, not the return value
Ahhh I see, it still a bit confusing because it's hard to determine what parameters are getting passed to the function
The internal implementation of MQTT is responsible for the parameters
Usually there will be some documentation specifying the parameters the callback function should accept
Cool thanks for your help! I will check the documentation
๐
I don't think he actually is though
ChadGPT ๐
@lavish rover What're you debugging? ๐
ChadGreatPairTits
Bad
@limpid umbra So what're you up to? Working on anything neat?
@molten pewter Phrasing
I always get freaked out when I wake up with a numb arm, and I think if I move it the wrong way I'm going to damage it ๐ค
@rugged root the math behind shortened vertical antennas
That sounds like something I'd be interested in but would have no hope of fully grasping the actual math behind it
missed steak
I was trying to find a good gif
Why isn't misgiving the opposite of mistaking 
Was trying to find a cow waving goodbye
That....
That's a good question LX
HA
Ground round
I gotchu fam
I tee hee'd
Jesus christ I can't type
HA
lol so funny.
Oh man I haven't seen his stuff in yeeeaaaarrrrsss
@i have some old rc car tx , 27.145Mhz , i want ed to make a proper receiver for it , looking at ANTs
well i may just make a regenerative receiver , most cheapo recevers use it
Those were not good movies
So dumb
Ehhh
They weren't like... super terrible
That's why they're not bad
Just not good
Hello
last Rambo ( is there such a thing ) movie was gritty
back on the farm , and trouble still finds him..
the one where he saves the misiionarys is good
First Blood
Rambo: First Blood Part II
Rambo III
Rambo
Rambo: Last Blood
It's the dumbest naming schema
I've never heard anyone say that
swimming pools full of money - promoted the serie to continue
You're the very first person I've heard make that claim
Or you watch too many pedantic film critics
Which I now realize is all of them
Trying to remember, there's another movie series that's just as egregious with its naming schema
Pedantic is the non pejorative
Picky or nitpicky is
Wait
Are you describing yourself or the word
โค๏ธ
I say it with love, buddy
Nah
Silvester has very high IQ
I counter with he fell for a trap that Arnold left for him
Specifically, Stop or my Mom Will Shoot
he paints, he wrote complete Rocky script. He is so successful. He acts and directs movies wow
It's SO bad
Oh sure I don't doubt it about him
@peak copper Sup bud
Eh
Hanging in there
Yeah
I get joint pain in my hands
The stress hormone... what is it, cortisol? It's pretty rough on the system
People seem to think of the mind and body being separate
As most things in the human body are
The mitochondria is the powerhouse of the cell
I mean
We can just say you're very stressed
Pedant: someone who annoys others by correcting small errors, caring too much about minor details, or emphasizing their own expertise especially in some narrow or boring subject matter.
When it absolutely derails a conversation then I take issue
Ends up being rude to the original person
Not saying that EVER happens here.... No sir, nuh uh
Or douchey
Is this an HCI class?
That's not as much of an issue if you use a password manager
That can just random gen one for you
Back in a moment, have to put a wall panel back on
Why do you want to know? 
Passwordless.dev
FIDO2 WebAuthn
Twitter is a real-time microblogging platform, publicly launched in July 2006. At launch, its defining features were the tight limits placed on each post, known at a tweet. Originally, users could only use 140 characters, although that was doubled to 280 in 2017. Formed by former Odeo employees Jack Dorsey, Noah Glass, Evan Williams and Biz Ston...
It can never be easy. Had to replace that keystone too
Is that the one about dentists? Section tooth hurty?
May 7th, 1992 @molten pewter
@void pilot If you're wondering why you can't talk, check out the #voice-verification channel. That'll tell you what you need to know about the voice gate system
Fury the pedantic poopoo meanie head.
poodantic
Oh right, pydantic is a thing
We deserve a lot of hate
Missouri
That's one of the issues
That's a fair view
I'm with Rabbit
But I get where you're coming from, Matt
"Why do they think they can get away with this?" "Because it's American, not American't"
om nom nom
I si what you did there
Yeeaahhh
there fixed it
There it is
@rugged root what projects are a work in progress for you ....
It's The United States, not The United Statescan't.... nope doesn't work at all.
there is no can in The United States
It's actually only like ~61 lines
@rugged root what language
@rugged root is it MCU related
Marvel Cinematic Universe?
@rugged root we not good enough for you?
The politics was giving me a headache today
@rugged root no the other one , uC
I don't know what you mean by that then
@rugged root micro controller = MCU = uC
https://www.imdb.com/name/nm11105476/?ref_=nm_mv_close Tony McCarthy needs 0 prosthetics or makeup to play an Alien.
Mean
Meanie poopoo head
Are they still politicing?
Talking films
@rugged root looking at code
That's what it ends up making
Its sole purpose is to help our accountants save a couple steps when printing from our tax software to our document management system
@zenith radish Yo
I do
Let Skype go
@rugged root i know like 5 accountants , they are kinda boring
I work at an accounting firm
Most of them are
I'm not a programmer by trade, though
I just happened to know how to make this thing easier for them
@molten pewter Jesus
Yeah don't
@rugged root they seem decent then i get back storys .. i try to be tolerant
@rugged root not a programmer by trade , a techy of a sort im guessing
@rugged root mmm you made a registry tool ?
My actual title is Administrative Support, but I do a bit of everything
IT has been my main role for the past couple years
Which is good, because that's what I love
You mean a bugout bag?
@molten pewter When you said you were on their list I thought you meant you weren't allowed back there or something
Yeah pretty much
@peak copper I legit thought you said Abe Lincoln
Was like... how
You'll make the Hemlock cry
Dude come on, I already have a headache
Like an actual headache
@rugged root hmm i have not tampered directly with registry
You have to be careful, but so long as you sanitize what the user can put there (like how I just gave them buttons) it's not a huge deal
@rugged root here be dragons
I don't but carry on
lol
Your mom
@rugged root i focus on tools in python to talk to uC
later ๐
@rugged root RF is what im reviewing lately
It was a lost cause when you got him the job and started doing his work for him in the first place, @zenith radish
Like
@rugged root but the , i-cybie robot dog is something i need to work on , IR remote control codes
In what way was that a good or sustainable idea
No no
The second part more so
Doing his work for him
You set him up to fail
By doing his job for him, and knowing that he probably wasn't qualified
You set him up to fail
I stand by my statement
Fair enough
Surgeon
After how high of a body count
"Man, this isn't color coded like the book was..."
Sandwich as a Supper
Janitorial, also important
I fix shit
janitorial sandwhich maker
i fix your internet connection
what kinda shit do you build
i build systems to improve stuff..
if i could code missles.. they would taunt you before blowing you up
You'd just hear a fart noise the whole way down
In fairness
Kind of reminds me of what they had to do for Donkey Kong 64
@pallid hazel i was considering improving , myo-electric arms
God damn it
Here I was hoping I could have my headache go away
I was apparently wrong
i dunno what that is
advil for headache ,
smash your toe
@pallid hazel artificial arms
I just want the defense talk to stop. Giving me more of a headache
It's irritating me in the same way the politics was
But that's just a me problem
We can talk about other things
how bout defense weapons that target only politicians?
@rugged root that Dr . Ho , electric massager works great for neck headaches
Back later
Going to actually take something for the headache, try to get some more calories in me
See if that's part of it
@rugged root a quick noodle soup to the rescue
@zenith radishtraps are not gay, fite me
Depends how someone identifies and what they orientation is
Doesn't really matter
People are people
By the way, I assume you can't say too much about your job at Microsoft, but could you tell me about the general "direction" of Microsoft, as in, is it worth getting in to their ecosystem if we're looking at a timeframe of at least 10 years?
I ask the above question because you mentioned your team just doesn't use microsoft services internally. How can they not do that? shouldn't they be encouraged to actively use their own tools, and in the process find a bunch of stuff that can be fixed and improved?
I interpret that as Microsoft lacking confidence in their own products.
why reinvent the wheel to say its microsoft... especially if your microsoft... keeps your hands in everything, and buy the company out if it seem like it can be made propreitary
@zenith radish is python useful to know for most jobs
Funnily though, Windows is used practically everywhere that isn't a giant megacorporation. The heathcare system of Sweden and major parts of the government use Windows tools, my local supermarket uses windows for printing out labels for some groceries. The company I work for uses Windows internally for EVERYTHING.
the old school server problem.. companies where buying servers for each api/app whatever and only using 5% of the servers capabilities
not much tbh
I think most jobs could be automated away with Python if companies were willing to actually take the time to have their various different systems to interface with the language.
@zenith radish its cool when you talk about the differences in langauges and why use them
lol, thats what im currently doing.. integrating different systems and apis

I mean, I'm surprised they tolerated it for so long.
Yeah, I agree with you there ๐

I don't think middle management is the biggest issue, at least not in "mid-sized" companies. I work at a factory, specifically the warehouse section where I scan labels of products to get registered into our ERP program. I swear to god, there's like 20 middlesteps that could be skipped and improve efficiency by like 50%. I have repeatedly expressed my concerns for the inefficiencies, and actively made points regarding how they could fix the problems.
They're doing JACK SHIT to fix the stuff. Because it costs time and money, and they look better on paper if they can just avoid that cost.
I'm not sure when it was that I realised most of the people on Reddit are talking out of their backside.
actually yeah ur right, I just ended up proving your point @zenith radish
do most people here even have a facebook account?
indeed
aint got one myself, deleted it along with everything else. It's now only SMS, email, phone, and Discord
phone
Unpopular (gen z) opinion: I wish everyone still used Facebook
Where else can you find a single platform for all your friends, photos, events, groups, life updates, messages, birthday reminders, free & for sale, memes, etc. Social media peaked in 2011-2016 /-:
8435
375
There have been attempts to make a federated facebook equivalent, but they never really caught on.
I think... diaspora?
not sure it's really worth it, most open source tools are frankly inferior to closed-source ones. Discord is just GOOD, it's far more user-friendly than Matrix and IRC
.xkcd 2347
lemmi take a look
Email is federated social media ๐
I've tried matrix and IRC, IRC felt underdeveloped and utter shit, Matrix was confusing and I didn't know where things were or what to do, or why I couldn't join X server.
Ah okay
gtg 
But I still believe closed source is most often better than open source, at least the step in the "chain" where users like us see the effect.
hmm
Minecraft vs Minetest, VS code vs VS codium (codium lagged a lot more on my linux mint machine)
aight then how is it STILL worse?
Did it not lag more for you?
what are some open-source projects I should look into to really see the difference between that and closed-source stuff?
Just so I can try both options and really get the "aha I see" moment
I shitpost online
And I torrent and watch a ton of anime
wait wut?...
holy shit that would be amazing for some long-running stuff I don't want on my drive
I'll check it out asap, thanks man
ah no, I use Transmission since it came with my linux distro
I'm gonna have to leave, thanks a lot for this convo, felt like I learned a bit.
cya
hi
hi
i cANNOT ACTIVATE VOICE
I don't have permission to talk
@silver basin @ruby iron ๐
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!e print(10 // 3)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
3
!e print(10 % 3)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
1
!d divmod
divmod(a, b)```
Take two (non-complex) numbers as arguments and return a pair of numbers consisting of their quotient and remainder when using integer division. With mixed operand types, the rules for binary arithmetic operators apply. For integers, the result is the same as `(a // b, a % b)`. For floating point numbers the result is `(q, a % b)`, where *q* is usually `math.floor(a / b)` but may be 1 less than that. In any case `q * b + a % b` is very close to *a*, if `a % b` is non-zero it has the same sign as *b*, and `0 <= abs(a % b) < abs(b)`.
!e py a, b = divmod(10, 3) print(a) print(b)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 3
002 | 1
!e py print(*range(0, 99, 10))
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
0 10 20 30 40 50 60 70 80 90
!e ```def test(nums):
for i in range(0, len(nums)):
if i not in range(0, 999, 10):
return False
return True
print(test([0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160,
170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310,
320 , 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450,
460, 470, 480, 490, 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600,
610, 620, 630, 640, 650, 660, 670, 680, 690, 700, 710, 720, 730, 740, 750,
760, 770, 780, 790, 800, 810, 820, 830, 840, 850, 860, 870, 880, 890, 900,
910, 920, 930, 940, 950, 960, 970, 980, 990]))
@sharp urchin :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
@grim atlas ๐
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@wise cargo
Sure
50 messages?
I'm quite new here as you can tell
Trying to install matplotlib on Android
But not working out
how convenient is it to run python on mobile?
or tablet
ikr
lmao
why use it then?
Yes similar to Termux using UserLAnd
Which is Ubuntu Linux sub system
But I successful installed numpy today
nvmm my code's still not working
yeh
it shd print "False"
but its not
the prev code
itself
m talking abt this one
itself
nvmm
:{
it prints true in my IDE
my bad
lol
m sorry ...my communication skills are low
!e ```def test(nums):
for i in nums:
if i not in range(0, 990, 10):
return False
return True
print(test([0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500, 520, 540, 560, 580, 600, 620, 640, 660, 680, 700, 720, 740, 760, 780, 800, 820, 840, 860, 880, 900, 920, 940, 960, 980]))```
@sharp urchin :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
i guess you shoukd go on with the topic with samy first
i have just interrupted
ohh ok
then welp!! T__T
def func(nums):
return all(v in range(0, 990, 10) for v in nums)```
but the problem with my code?
:[
!e ```def func(nums):
return all(v in range(0, 990, 10) for v in nums)
print(func([0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500, 520, 540, 560, 580, 600, 620, 640, 660, 680, 700, 720, 740, 760, 780, 800, 820, 840, 860, 880, 900, 920, 940, 960, 980]))```
@sharp urchin :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
:{} should have printed FALSE
the gap is of 20
and not of 10
0,20,40,..........
but your code says to print true if its "0,10,20,...
!e ```def test(nums):
return all(i in range(1000) and abs(i - j) >= 10 for i in nums for j in nums if i != j) and len(set(nums)) == 100
print(test([0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160,
170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310,
320 , 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450,
460, 470, 480, 490, 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600,
610, 620, 630, 640, 650, 660, 670, 680, 690, 700, 710, 720, 730, 740, 750,
760, 770, 780, 790, 800, 810, 820, 830, 840, 850, 860, 870, 880, 890, 900,
910, 920, 930, 940, 950, 960, 970, 980, 990]))
@sharp urchin :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
Write a Python program to split a string of words separated by commas and spaces into two lists, words and separators.
can you make an input and output
W3resource Python,Exercises.
Output:
[['W3resource', 'Python', 'Exercises.'], [' ', ', ']]```
text = "W3resource Python, Exercises."
ls = list(text.split("."))
print(ls)?
i need more examples
Split the said string into 2 lists: words and separators:
[['The', 'dance', 'held', 'in', 'the', 'school', 'gym', 'ended', 'at', 'midnight.'], [' ', ', ', ' ', ' ', ' ', ' ', ', ', ' ', ' ']]```
[['W3resource', 'Python', 'Exercises.'], [' ', ', ']] what is this?[' ', ', ']
kind clear)
i guess i get it
nah, i almost done, just correcting some mistakes
ohh ok
@surreal wyvern
.
!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!
@surreal wyvern
!e
text = "W3resource Python, Exercises."
ls = list(text.split(" "))
print(ls)
@surreal wyvern :white_check_mark: Your 3.11 eval job has completed with return code 0.
['W3resource', 'Python,', 'Exercises.']
!e
text = "W3resource Python,Exercises."
def deleteSpliter(text):
result = ""
ls = []
seperator = []
for i in text:
print(result)
if i == " ":
seperator.append(" ")
ls.append(result)
result = ""
elif i == ",":
seperator.append(",")
else:
result += i
ls.append(result)
return ls, seperator
print(deleteSpliter(text))
@sly yarrow :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 |
002 | W
003 | W3
004 | W3r
005 | W3re
006 | W3res
007 | W3reso
008 | W3resou
009 | W3resour
010 | W3resourc
011 | W3resource
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/xafafacupo.txt?noredirect
!e
text = "W3resource Python,Exercises."
def deleteSpliter(text):
result = ""
ls = []
seperator = []
for i in text:
if i == " ":
seperator.append(" ")
ls.append(result)
result = ""
elif i == ",":
seperator.append(",")
else:
result += i
ls.append(result)
return ls, seperator
print(deleteSpliter(text))
@sly yarrow :white_check_mark: Your 3.11 eval job has completed with return code 0.
(['W3resource', 'PythonExercises.'], [' ', ','])
like this?
@sharp urchin
i spent like 30 minutes, lol
i made another code
text = "The dance, held in the school gym, ended at midnight."
ls = [[], []]
def deleteSpliter(text):
result = ""
ls = []
for i in text:
if i == " ":
ls.append(result)
result = ""
elif i != ",":
result += i
return ls
ls[0] = deleteSpliter(text)
for i in text[:-1]:
if i.isspace():
ls[1].extend(" ")
elif i == ",":
ls[1].extend(",")
print(ls)
which one
result = ""
!e
text = "W3resource Python, Exercises."
ls = list(text.split(" "))
spc_lst=[]
for i in text:
if i == " " or i==",":
spc_lst.append(i)
f_lst=[ls,spc_lst]
@surreal wyvern :warning: Your 3.11 eval job has completed with return code 0.
[No output]
it will not work, cuz split takes only one argument
!e
text = "W3resource Python, Exercises."
ls = list(text.split(" "))
spc_lst=[]
for i in text:
if i == " " or i==",":
spc_lst.append(i)
f_lst=[ls,spc_lst]
print(f_lst)
@surreal wyvern :white_check_mark: Your 3.11 eval job has completed with return code 0.
[['W3resource', 'Python,', 'Exercises.'], [' ', ',', ' ']]
but regex can take more argument
!e text = "The dance, held in the school gym, ended at midnight." ls = list(text.split(" ")) spc_lst=[] for i in text: if i == " " or i==",": spc_lst.append(i) f_lst=[ls,spc_lst] print(f_lst)
try to debug result, basically the variable should be name
word = " "
it adds to the word variable character and if we encounter space, it add to the list all accomulated charcters, for example, "hello man" it will variable will be like this "world = "hello" "nd it becomes empty to make the same thing again with other words
result = ""
this one
you cannot)
Write and run Python code using our online compiler (interpreter). You can use Python Shell like IDLE, and take inputs from the user in our Python compiler.
@teal flower
your selected @sly yarrow
@somber heath I still cannot talk
seems like it will take al ong time until. Iget some kind of role
!voice
Voice verification
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
from Question import Question
question_prompts = [
"What color are apples?\n(a) Red/Green\n(b) Purple\n(c) Orange\n\n",
"What color are Bananas?\n(a) Teal\n(b) Magenta\n(c) Yellow\n\n",
"What color are strawberries?\n(a) Yellow\n(b) Red\n(c) Blue\n\n"
]questions = [
Question(question_prompts[0], "a"),
Question(question_prompts[1], "c"),
Question(question_prompts[2], "b")
]def run_test(questions):
score = 0
for question in questions:
answer = input(question.prompt)
if answer == question.answer:
score += 1
print("You got" + str(score) + "/" + str(len(questions)) + " correct")run_test(questions)
!e py d = {'key a': 'value a', 'key b': 'value b', 'key c': 'value c'} print(d.keys()) print(d.values()) print(d.items())
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | dict_keys(['key a', 'key b', 'key c'])
002 | dict_values(['value a', 'value b', 'value c'])
003 | dict_items([('key a', 'value a'), ('key b', 'value b'), ('key c', 'value c')])
!e py d = {'key a': 'value a', 'key b': 'value b', 'key c': 'value c'} print(d['key b'])
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
value b
!e py d = {'key a': 'value a', 'key b': 'value b', 'key c': 'value c'} d['key d'] = 123 print(d)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
{'key a': 'value a', 'key b': 'value b', 'key c': 'value c', 'key d': 123}
!e py alpha = 'abc' beta = '123' for ab in zip(alpha, beta): print(ab)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | ('a', '1')
002 | ('b', '2')
003 | ('c', '3')
!e py a, b = (1, 2) print(a) print(b)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1
002 | 2
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1 2
002 | 3 4
!e py alpha = 'abc' beta = '123' for a, b in zip(alpha, beta): print(a, b)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | a 1
002 | b 2
003 | c 3
This course will give you a full introduction into all of the core concepts in python. Follow along with the videos and you'll be a python programmer in no time!
Want more from Mike? He's starting a coding RPG/Bootcamp - https://simulator.dev/
โญ๏ธ Contents โญ
โจ๏ธ (0:00) Introduction
โจ๏ธ (1:45) Installing Python & PyCharm
โจ๏ธ (6:40) Setup & Hello Wor...
!e Game_commands = {
"walk" "run" "stop" "attack"
}
@cunning lake :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e py print({'a' 'b' 'c'})
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
{'abc'}
!pep8
PEP 8 is the official style guide for Python. It includes comprehensive guidelines for code formatting, variable naming, and making your code easy to read. Professional Python developers are usually required to follow the guidelines, and will often use code-linters like flake8 to verify that the code they're writing complies with the style guide.
More information:
โข PEP 8 document
โข Our PEP 8 song! :notes:
See: Naming conventions
โก๏ธ Learn Chess: https://www.youtube.com/gothamchess
โก๏ธ Free Chess Courses: https://www.chessly.com
โก๏ธ Probably Edited By: https://twitter.com/dosechess
@dire pecan ๐
@flat sentinel @somber heath
This exists. So we're taking a look at it.
Download: https://uwuntuos.site/
โ Gear I use to make these videos: https://www.kit.co/mjd
Camera: https://amzn.to/3ipyKc5
Tripod: https://amzn.to/3pqxycn
Microphone: https://amzn.to/35UbkXb
Editing Software (Premiere): https://amzn.to/39kawfS
Thumbnail Editor (Photoshop): https://amzn.to/3lVqVN6
โ Af...
This exists. So we're taking a look at it.
Download: https://uwuntuos.site/
โ Gear I use to make these videos: https://www.kit.co/mjd
Camera: https://amzn.to/3ipyKc5
Tripod: https://amzn.to/3pqxycn
Microphone: https://amzn.to/35UbkXb
Editing Software (Premiere): https://amzn.to/39kawfS
Thumbnail Editor (Photoshop): https://amzn.to/3lVqVN6
โ Af...
hello
Ah advertising the distro you love and use?
@covert geode ๐

there was this russian dude singin
ye it was this dude
i was in this voice chat
and this dude was like albert einstein's talk
so i raise the volume
and then some good sounds came out
opal also used to make some good sounds, high quality ones ๐
those depressed people made some interesting sounds LMAO
you said it .... not me
ye you were like depressed people or some people sound like this, and BOOM i hear beethoven's symphony
hello @sly yarrow
I'm actually a little confused, here.
What have you made?
You can create a website
๐ง
thts not wrong
How are you?
Yes.
wait it is "HTML" or "Hach TML"
no i meant the pronounciation
import app from "testing.js"
sum say "H" as "hech"
if ur using module type
@wanton elk ๐
function DOG() {
alert(MOEW!`);
}
function sayBRUH(user) {
alert(`BRUH, ${user}!`);
}
export {DOG, sayBruh};
eh, JS is becoming more of a glue to join your webassembly to the front end. Despite it having some cool ideas behind it JS is a nightmare of a language
```import {DOG, sayBruh} from "./idk.js"````
โ๏ธ
bro have you ever worked with javascript?
yes
yes, for starters it's lack of static typing is that absolute worst
javascript has statics
theres no static keyword though
but the most subtle sin that javascript commits is all of it's implicit behaviour
wdym?
guys please stop saying random stuff you have no idea about
"nightmare language"
"bad importing"
Have you?
Sorry it just doesnโt seem like you know what youโre talking about
yes i have worked with it alot
what do you mean by static?
class RandomClass {
static staticField;
```
javascript has statics
static != having types
static by default means this
clearly you are mixing up things
I think you are..
static != static typing
SvelteKit is awesome
The Tau'ri, known simply as just Humans, are a humanoid race from the planet Earth, characterized by bipedalism and large, complex brains and are highly social and tend to live in complex social structures composed of many cooperating and competing groups, from families to political states. Their genetic makeup is devoid of many elements that wo...
@somber heath
by far better than any other thing i have used
@final agate #โ๏ฝhow-to-get-help
Have you installed the Microsoft C++ build tools?
@fleet depot ๐
@gentle chasm ๐
@unreal hornet ๐
!e py import string print(*enumerate(string.ascii_lowercase))
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
(0, 'a') (1, 'b') (2, 'c') (3, 'd') (4, 'e') (5, 'f') (6, 'g') (7, 'h') (8, 'i') (9, 'j') (10, 'k') (11, 'l') (12, 'm') (13, 'n') (14, 'o') (15, 'p') (16, 'q') (17, 'r') (18, 's') (19, 't') (20, 'u') (21, 'v') (22, 'w') (23, 'x') (24, 'y') (25, 'z')
def hello(self):
self.no = 1
!e
print(issubclass(type, object))
print(isinstance(type, object))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | True
002 | True
A duck, class duck, class animal.
no, float and int aren't related that way
!e
print(issubclass(int, float))
print(issubclass(float, int))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | False
002 | False
๐
๐
Hi Opal 
I think, with enough effort, it's possible to make C align structs such that
struct weird
{
int a;
int b;
}
bool weird_is_weird() // may be true
{
return sizeof(struct weird) == 3 * sizeof(int);
}
VS Code?
like, the size of char in bits is platform-dependent; maybe alignment is too
Yeah
@twilit stone in short just the opposite of what you have
and we have
geography class 3 or so
some places don't have a class called "geography" before around grade 6 :shrug:
ohh
nvmm my bad
@vocal basin may i ask you a question?[random]
in Russia, for example, grades 1~5 have physics, biology and geography merged into a single class
what's the question?
how many languages in programming can you say tht
your good at
m not sure if i have asked this earlier
but was just curious
"good at" depends on "good for what"
good at a medium lvl to help others
in solving/debugging
or as one may say "intermediate" level
china is love!!!
nah it wasnt china
I never seriously wrote C++, but was able to help debugging it
(same goes for Java/BASIC; debugging has some general principles that cross programming language barriers)
i wouldnt say so
so c++,java and python?
this list is neither full nor perfectly correct
I have code written in (roughly ordered by count):
Python
C#
JavaScript, TypeScript, HTML, CSS
C
Lua
bash (haven't used any complex logic)
SQL (nothing too deep either; mostly pgsql/sqlite dialects)
Go (a single script)
PLs I help with (all of the above plus):
Rust, Java, C++, Pascal, BASIC/VB
know some theoretical basis (maths, compiler nuances, other random pieces of information) of, but don't write regularly:
Rust, Haskell, Lisp
thanks
did occasionally write Ruby, F#, PHP
there's also TeX/Markdown and other markup languages but idk whether to include them
it fine i got it:{
for the time being can you help me
in a python prblm
for i in range(len(nums) - 1):
if nums[i] == nums[i + 1]:
return False
return True
finding duplicates or consecutive duplicates?
i want the program to print True only if no values are repeated to every 4 places
example
@flat nexus ๐
[1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]
Output:
True
Input:
[1, 2, 3, 3, 1, 2, 3, 3, 1, 2, 3, 3, 1, 2, 3, 3]
Output:
False
Input:
[1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]
Output:
False```
like this
later @somber heath
hey
i can"t speak sorry ( verification voice)
now what else should i add to my code? @vocal basin
my code would print True if no values are repeated back to back
but it wont print False in this case [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]
and i want it to
i hope i was clear in explaining my prblm
is anyone available for a question about my code?
what's the question?
!e
def pad(nums, offset):
for _ in range(offset):
yield object()
yield from nums
def test(nums, n=4):
return all(len(set(t)) == n for t in zip(*(pad(nums, i) for i in range(n))))
print(test([1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]))
print(test([1, 2, 3, 3, 1, 2, 3, 3, 1, 2, 3, 3, 1, 2, 3, 3]))
print(test([1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | True
002 | False
003 | False
understanding what this solution does can be helpful
not understandable for me :{}
@vocal basin my dd and pngegg images are not displayed once my code is launched.
why is it too complicated:{
how do you call the library to display the images?
!e ```def test(nums):
for i in range(len(nums) - 1):
if nums[i] == nums[i + 1]:
return False
if len(set(nums)) != 4:
return False
return True
print(test([1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]))
print(test([1, 2, 3, 3, 1, 2, 3, 3, 1, 2, 3, 3, 1, 2, 3, 3]))
print(test([1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]))
@sharp urchin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | True
002 | False
003 | False
pygame
!e
def test(nums):
for i in range(len(nums) - 1):
if nums[i] == nums[i + 1]:
return False
if len(set(nums)) != 4:
return False
return True
print(test([1, 2, 3, 4, 5]))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
:{}
how do you call to pygame to draw the image?
I think if I show you my code you will understand better
object():
!
(pad(nums, i) for i in range(n)):
123123
!123123
!!123123
!!!123123
zip(*(pad(nums, i) for i in range(n))):
1!!!
21!!
321!
1321
2132
3213
!paste
Pasting large amounts of code
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
idk about zip
i dnt wish to learn as well
leave nvmm
I ran the code and it does draw both images;
although it does it only once and gets overlayed by the bouncing thing
the problem is that they don't get re-drawn, right?
can you voice 2 sec so that I show you in screen sharing?
maybe
you can send the screenshots
you have this in the loop:
fenetre.blit(fond, (0, 0))
you're missing
fenetre.blit(personnage, (x, y))
fenetre.blit(personnage1, (x1, y1))
NICE
kiss u
now I'm going to try to make them move I'll be back.
@vocal basin you're still here ?
what's the question?
Hola
https://paste.pythondiscord.com/esidasobuq you know why my images don't move?
do you change x/y/x1/y1 anywhere?
I didn't understand
I have another same code without the ball where the images move, I copied the code for the images to move but it doesn't work
do you call Jeu() anywhere?
no
therefore you never change the values responsible for moving the images
also, you're missing global keyword in the function
you're going to get errors if you just call it
I don't think the current behaviour of the function is the intended one
seems like it shouldn't include the while loop
and should be changing running global variable instead of local run
wow
brb in few mins
this makes sure you can write to that values and not only read them
@somber heath
hi
there's some python learning discussion going to happen in 10~30 minutes
@sly yarrow
what position, again?
software engineer or software developer?
engineering implies more discipline and more diverse skill set than just writing code, I'd say
Elaborate?
cruiser_pet asked for advice
(and is going to explain something about why chose to learn python, I guess? or something)
engineering vs writing code is somewhat more obvious difference
software development should be up to the standards of software engineering
sometimes those mean the same
sometimes they don't
depends on the context
the difference is exaggerated by people who think a degree is required to get a job
and I don't agree with those of people
@midnight agate
I originally started the engineer vs developer discussion
and I do agree the distinction should be irrelevant/unimportant
on using leetcode to improve in Python or other high-level language:
use libraries
don't just translate C into Python
the high-level parts of the language like functools, itertools can be useful outside of that distilled algorithmic environment
@eager wraith ๐
def c_like_solution(s: str) -> bool:
length = len(s)
for i in range(length // 2):
if s[i] != s[length - 1 - i]:
return False
return True
def pythonic_solution(s: str) -> bool:
return s == s[::-1]
@whole bear ๐
@somber heath whattup
Who can say?
dunno
there is an important other thing the philosophy of sites like leetcode:
don't "just solve"
revisit the problems
learn to refactor the solutions
actively use that as an opportunity to get more language knowledge
not only language knowledge, but programming methodologies also
for example, applying TDD to the process of solving
leetcode is good tbf
i honestly was like: Hey these seem like very unpractical questions
but i find leetcode "Putting what you know in use" more than "Hey show me questions i will actually use"
Ex. Hashmaps in Java may not be practical for every use, but leetcode helps you
- See when to use hashmaps and the variety questions you can solve with it
- Find other useful alternitives
for that I will quote Kevlin Henney quoting someone else who was repeatedly solving different katas or a same kata ("kata", word for that particular kind of problems, borrowed from martial arts, iirc) and getting better time-to-solve-a-problem thanks to TDD
Erm, guys, what are you talking about?
hi LX - how was your coffee?
improving in writing software
leetcode
software engineering
๐ Erm, average
Oh right
instant ?
It's charting the slow decline of my life in coffee form
im honestly a hot chocolate type of guy, but i have some coffee here and there
dont like to mess up with my nerve system
I'm pretty sure by this point if I stopped drinking coffee I would die.

