- 119
- 32 600 671
b001
United States
Registrace 14. 09. 2022
Simplicity is the ultimate sophistication!
How Algorithms Find Shortest Paths (Dijkstra's & Bellman-Ford)
To further enhance your computer science knowledge, go to brilliant.org/b001 to start your 30-day free trial and get 20% off an annual premium subscription.
If you want to experiment with the algorithms yourself, I've included some Python scripts on my Patreon: www.patreon.com/b001io
💬 Discord: discord.gg/jA8SShU8zJ
🐦 Follow me on Twitter: b001io
🔗 More links: linktr.ee/b001io
If you want to experiment with the algorithms yourself, I've included some Python scripts on my Patreon: www.patreon.com/b001io
💬 Discord: discord.gg/jA8SShU8zJ
🐦 Follow me on Twitter: b001io
🔗 More links: linktr.ee/b001io
zhlédnutí: 22 738
Video
Dijkstra's Hidden Prime Finding Algorithm
zhlédnutí 159KPřed 4 měsíci
⭐ Join my Patreon: www.patreon.com/b001io 💬 Discord: discord.gg/jA8SShU8zJ 🐦 Follow me on Twitter: b001io 🔗 More links: linktr.ee/b001io Outro background music: Mystic Mountain by Purrple Cat | purrplecat.com Music promoted by www.free-stock-music.com Creative Commons / Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) creativecommons.org/licenses/by-sa/3.0/deed.en_US
The Algorithm Behind Spell Checkers
zhlédnutí 402KPřed 4 měsíci
🖥️ GitHub: github.com/b001io/wagner-fischer ⭐ Join my Patreon: www.patreon.com/b001io 💬 Discord: discord.gg/jA8SShU8zJ 🐦 Follow me on Twitter: b001io 🔗 More links: linktr.ee/b001io
Are THESE Better Than Lists?? - The Josephus Permutation
zhlédnutí 62KPřed 6 měsíci
⭐ Join my Patreon: www.patreon.com/b001io 💬 Discord: discord.gg/jA8SShU8zJ 🐦 Follow me on Twitter: b001io 🔗 More links: linktr.ee/b001io Background Music: Mood by Alex-Productions | onsound.eu/ Music promoted by www.free-stock-music.com Creative Commons / Attribution 3.0 Unported License (CC BY 3.0) creativecommons.org/licenses/by/3.0/deed.en_US Slowly by Tokyo Music Walker | soundc...
THIS is Why List Comprehension is SO Efficient!
zhlédnutí 169KPřed 6 měsíci
⭐ Join my Patreon: www.patreon.com/b001io 💬 Discord: discord.gg/jA8SShU8zJ 🐦 Follow me on Twitter: b001io 🔗 More links: linktr.ee/b001io Background Music: Slowly by Tokyo Music Walker | soundcloud.com/user-356546060 Music promoted by www.free-stock-music.com Creative Commons / Attribution 3.0 Unported License (CC BY 3.0) creativecommons.org/licenses/by/3.0/deed.en_US
Avoiding My Mistakes!! - Shifting Zeros Problem
zhlédnutí 44KPřed 7 měsíci
⭐ Join my Patreon: www.patreon.com/b001io 💬 Discord: discord.gg/jA8SShU8zJ 🐦 Follow me on Twitter: b001io 🔗 More links: linktr.ee/b001io
The Even Groups Problem in Python
zhlédnutí 13KPřed 7 měsíci
⭐ Join my Patreon: www.patreon.com/b001io 💬 Discord: discord.gg/jA8SShU8zJ 🐦 Follow me on Twitter: b001io 🔗 More links: linktr.ee/b001io Background Music: Mood by Alex-Productions | onsound.eu/ Music promoted by www.free-stock-music.com Creative Commons / Attribution 3.0 Unported License (CC BY 3.0) creativecommons.org/licenses/by/3.0/deed.en_US
A Clever Way To Use Sets In Python
zhlédnutí 22KPřed 7 měsíci
💻 GitHub: github.com/b001io/python-challenges ⭐ Join my Patreon: www.patreon.com/b001io 💬 Discord: discord.gg/jA8SShU8zJ 🐦 Follow me on Twitter: b001io 🔗 More links: linktr.ee/b001io
Python Classes in 1 Minute!
zhlédnutí 159KPřed 7 měsíci
⭐ Join my Patreon: www.patreon.com/b001io 💬 Discord: discord.gg/jA8SShU8zJ 🐦 Follow me on Twitter: b001io 🔗 More links: linktr.ee/b001io
How To Solve Google's Python Challenge!
zhlédnutí 46KPřed rokem
How To Solve Google's Python Challenge!
Why Is This Happening?! Floating Point Approximation
zhlédnutí 126KPřed rokem
Why Is This Happening?! Floating Point Approximation
How To Create Apps In Python Using Tkinter!
zhlédnutí 48KPřed rokem
How To Create Apps In Python Using Tkinter!
Add THIS To Your Python Scripts! if __name__ == "__main__"
zhlédnutí 163KPřed rokem
Add THIS To Your Python Scripts! if name " main "
Dijkstra's algo is pretty easy to code. One of the very first assignments we got in data structures and algorithms course was to code Dijkstra's prime number algorithm in C or Java.
Oh lordy lord
Nice but noob programming which is a reason that i dont combined multiple conditions like that on my if statements
ok but how slow is this really?
How do I move a mouse when I rotate a rotation sensor
If you are worrying about optimization, then you probably shouldn't be using Python.
print(link[4:]) ?????
Just use a sieve like the sieve of Eratosthenes.
If you're a coder, you won't make this mistake, if you're someone who copy and pastes code, you'll make this mistake.
Documentation lists thousands upon thousands of specific functions that do various string operations. Regex does all of these things with a simple to learn syntax.
Fun fact: a new scope is not created in a for loop
Without music, please.....
Cool but you could also solve this by first removing w then make one more line to remove dot but is not so elegant
Noob question, but where is the value/argument for "num" being provided?
Very clever use of Mod Operation
Javascript ==> array Python ==> list
I personally use replace("www.", "")
This was nice! Well done
Yes, I've made a similar mistake. The way the documentation for str.lstrip() was worded didn't help me one bit. Thank goodness for Google Search and StackOverflow. However, I must note that str.removeprefix() did not exist until Python 3.9.
Umm acutally str is a class 🤓
A* My beloved
This is why I give value pointers in my own programming languages, like # - normal value, $ - system value, @ - runner/reader values Exp. dv str 7 echo str(8) echo #str
New reason to hate python: printing in the definition of a function
Meanwhile, JavaScript be like, 6 + 9? Nice!
I'd use recursion
This is actually perfect for my game !!! Thanks lol
Is it ok for performance to import the whole module and just use some of the functions in there? Or always better to import all 1 by 1
What font does this man use?
We do: if user_input = '' . Is this also good?
Good spot, that's a cheeky little impl. detail indeed! Jeff atwoood's Coding horror has a fun blog entry about obscentiy filters (20th Oct 2008). It's a fun observation if you like this stuff too!
my version: def dup(removingdups): return sorted(set(removingdups)) old = ["a", "b", "a", "c", "b", "a"] new = dup(old) print(new) # dups stand for duplicates btw # sorted maintains order and set removes dups
cool. your solution on my old rig takes 31 seconds. your solution on my new rig takes 14 seconds. my solution on either runs in .. error.
but isnt the point of using a global that it is NOT local? As in i could be updates between two loop iterations and we want the updated value. if i wanted to specifically use the global value as is when calling the function i wouldve entered it as an argument.
Everyone is fighting about static or dynamic typing in C/Python, but a beginner can’t make a mistake like this when you can’t use a string where a Boolean goes.
but how would you use it in hundreds of function in different py files? would you import it from a separate file or define it in every one of those scripts with functions?
Python devs just discovered short circuiting
I think this guy did the videos for my Pearson textbook.
Even a old C64 had that called "Def". You showed a unnamed lambda, so it can not be reused. You can say "A=lambda..." the A is more like a function. Sometimes you need to use function, so you can put it in a lambda.
Thanks a lot!
me getting syked to study all day so i master decorators, me after 1 minute, im running out of weed
like neo in the matrix learning kung fu in 5 seconds, buzzzzeeeezzzzee (after 1 minute) I know Decorators
python, where there's a function for everything and you learn nothing
I wouldn't really consider this complete without an invalid selection resulting in a repro pt. Typos shouldn't cause a crash
slicing? for link in links: print(link[4:])
How the fuck do I have over 5 years in python and I've never used the unpacking operator? What the fuck?
I don't know much about how the algorithm works, but if you are looking for the smallest value, I understand that it cannot be less than zero since this way you would avoid the problem of entering a cycle in which the value is decreased. infinitely, to prevent the value from being less than zero you can look at what the weights are and look for the smallest one, in the first example -30, and add the absolute weight in the rest in this way this node (and the others with existing negative values) has a value equal to or greater than zero and the problem is avoided.
what could possibly go wrong? 🤔
OMG I literally stumbled across this problem today!!
this is what i was searching for many years ago. i am too stupid before to even know what question i should be asking. i cant find it anywhere so i just quit learning python. and now here is the answer out of nowhere. maybe this is a sign
Here it is everytime "www.", that are 4 chars, so use link[4:].