Another example for real random numbers: Cloudflare (a company which handles a very large part of internet traffic) has a room full of lava lamps with cameras pointed at them, and they use the current state of the lava lamps for their random numbers
Tim is genually the embodiment of a nice guy. Also his videos are so amazingly well done and easy to follow. Learnt flask from him and today I'm almost finishing my raspberry pi home server
@@JLSXMK8 Actually in just a normal person who prefers django because I'm already comfortable using it and the django's documentation is well done. And about my operational system I use ubuntu since I don't like windows but I don't want to lost the comfort of a easy to use operational system
Tim your a great youtuber man, you literally just calmly explain everyone how something works. Your videos ALWAYS teach something new. Man lots of respect to you. ♥
Next video suggestion: 1. Why python variables aren't containers but pointers? Or 2. How does for in loop works behind the scenes in python? Edit: what does range function produce (iterator or iterable) might also be a nice video idea.
@@aim2986 ok , teach a man to fish , I want him to try doing this himself and not just tell him how it actually works , i could just tell him but that will not help him in long run you see
@@aryankathawale9269 your code simply converts a range object to a list then prints it. It doesnt directly show whether the range object is an iterable or an iterator. In order to tell this, he should have known the interface of the builtin list type constructor. Yeah, it is an easy guess even if you dont know, but this is not the only thing to guess. He asks "what does range function produce" so it's obvious that he isn't aware of the fact that range isn't a function. And when the number of guesses increase, it becomes a complicated problem which can't be solved by looking at a code printing a list. If you want to help him in the long run, you could at least put a few links from the official docs explaining these things.
They're called pseudo random generators. In Data science as long as you get the correct distribution it doesn't matter. Plus, setting seeds is helpful as it allows others to reproduce results.
6:39 idhuku paruthi moota godown layae irukalaamae, You can simple ignore random.seed() know why you have to use it, pass time.time() and then performing the actual functionality again, Thalaiya suthi mooka thodringa broo Edit: yeah actually you said the same just after illustrating this..
I am glad my mentor has already told me while learning python. Hat's off to you tim also 😄 and that time was chosen(if I remember properly) cauz unix system was introduced for the first time then. But some platforms use different timeline for doing this.
Randomness in FPGA and other embedded devices which use cryptography is generated from various source, e.g noise, heat and other parameters as I remember in hardware security course I had.
Wow man! I always thought the same that if the computer program is generating the same random numbers for a given seed, then if we can figure out the underlying dynamics of the code, the random number is no longer random. Glad you clarified my intuition in this video. On that note, I feel that there is nothing in the world which is truly random in nature..we as a human being are governed by some chemistry in each cell in our body...I mean, if I sneeze here and the pressure generated from it may have 1e-100 % of influence in affecting the air flow in some other part of the world. If we can connect them through some mathematical model and have the capability of solving that model with some clestially powerful supercomputers, we can still predict the influence of my sneeze in influencing the air flow at some other place in the world.... :)
I saw a video awhile back about a company that used Lava Lamps to achieve 'random' by watching a wall of lava lamps and using a camera to pinpoint where the lava was across them all at any given point. Tom Scott probably made it, I am not sure about that, but seems like the kind of video he would make.
Problem with randomness is that it doesn't really exist. The entire universe with all of its complex systems might seem to have a whole lot of randomness, but when you pop the hood you find patterns and algorithms. So the best we can do to create seemingly "random" values for secure algorithms is rely on other chaotic factors like interference and radioactive decay of certain atoms or use techniques such as continuous seeding. Keyword "entropy".
The term "truly random" is a bad term. It doesn't have a proper definition. The properties you want to claim or not claim are uniformity, deterministic, nondeterministic, cryptographically secure and entropic at some level. Python has the RdRand module that works the same way as the random library but provides nondeterministic cryptographically secure random numbers on X86 platforms that support the RdRand and RdSeed instructions.
Random number generators produce strings of numbers that are void of sequences or patterns. 1,4,9,16,25,36,49. 2,3,5,7,11,13,17,19 2,4,6,8,10,12,14,16 Sequences like these will NEVER occur in Random number generator. The RNGs have been programmed to avoid these Sequences. Strings of numbers that statistically should occur are omitted.
I have a question: You use a for loop to create a random number 10 times. But if you use the same seed, shouldn't you get the same number as a result for every loop iteration? or is the seed altered after one use?
Basically, every time you use random.randint(), it stores what postion on the sequence you are on. For example, if you call randint() 3 times, it knows that the next time you call it, you want the FOURTH number in the sequence. The seed doesn't just create one number. It creates a infinite sequence.
@@abdullahmohammed6115 I think you would get the same number every time if you called random.seed(1) inside the loop resetting the current position on the sequence.
Another example for real random numbers: Cloudflare (a company which handles a very large part of internet traffic) has a room full of lava lamps with cameras pointed at them, and they use the current state of the lava lamps for their random numbers
That's really cool LOL
Tim is genually the embodiment of a nice guy. Also his videos are so amazingly well done and easy to follow. Learnt flask from him and today I'm almost finishing my raspberry pi home server
Learnt Flask from his channel? Was it easy to use? What is it?
@@JLSXMK8 I prefer django.
@@electricimpulsetoprogramming Open-source Web framework; NICE!!! You a Linux geek?
@@JLSXMK8 Actually in just a normal person who prefers django because I'm already comfortable using it and the django's documentation is well done. And about my operational system I use ubuntu since I don't like windows but I don't want to lost the comfort of a easy to use operational system
@@electricimpulsetoprogramming You use Ubuntu? Well, perfect! Yeah, those Linux terminals and servers are a freaking godsend for programmers!
I died when he said
"I need to talk to you about something that's not random......Our sponsor algoexpert'
Smooth
Oh, I see you're dead now. Meet you in heaven.
In one of cloudflare's offices, they use a camera pointed at a wall of lava lamps for randomness
And you can go there and view them in person if you want to.
I just posted that too - was it a Tom Scott video? I feel like it probably was..
@@TheDuerden Yeah, it was, that's where I got it from
Damn
@Phoenix 𝙾𝚙𝚎𝚗 𝙼𝚢 PROFILE uuid is usally just an incremented number hashed
Random module in Python was a total mystery for me
Thanks tim
Tim your a great youtuber man, you literally just calmly explain everyone how something works. Your videos ALWAYS teach something new. Man lots of respect to you. ♥
I appreciate that!
Next video suggestion:
1. Why python variables aren't containers but pointers?
Or
2. How does for in loop works behind the scenes in python?
Edit: what does range function produce (iterator or iterable) might also be a nice video idea.
Maybe iterable
try this code and you will get ur ans :
a = list(range(0,100)
print(a)
@@aryankathawale9269 that doesnt answer anything
@@aim2986 ok , teach a man to fish , I want him to try doing this himself and not just tell him how it actually works , i could just tell him but that will not help him in long run you see
@@aryankathawale9269 your code simply converts a range object to a list then prints it. It doesnt directly show whether the range object is an iterable or an iterator.
In order to tell this, he should have known the interface of the builtin list type constructor. Yeah, it is an easy guess even if you dont know, but this is not the only thing to guess. He asks "what does range function produce" so it's obvious that he isn't aware of the fact that range isn't a function. And when the number of guesses increase, it becomes a complicated problem which can't be solved by looking at a code printing a list.
If you want to help him in the long run, you could at least put a few links from the official docs explaining these things.
This video is 100% what i was looking for!
Some channels read our minds and post the exact video we were looking for
Same
@@calitts4708 exactly, but when it comes from Tim its definitely good info.
twt and codecamp always read my mind
Randomness is a philosophy. Nothing is truly random. 💯
Wow, that's actually really cool. Great video as always! 👍
"Why Random Numbers Aren't Random"
RNGs based on quantium physics: ok
They're called pseudo random generators. In Data science as long as you get the correct distribution it doesn't matter. Plus, setting seeds is helpful as it allows others to reproduce results.
My go to programming TH-camr
Really amazing video, this is gonna help me alot for an oral test I'm working on. Thank you for all that knowledge, there is alot I will talk about
6:39 idhuku paruthi moota godown layae irukalaamae,
You can simple ignore random.seed() know why you have to use it, pass time.time() and then performing the actual functionality again,
Thalaiya suthi mooka thodringa broo
Edit: yeah actually you said the same just after illustrating this..
thank you bro! I allways wonder why we use time to get random numbers and this video help me a lot!
I feel like unless you can predict random numbers you haven’t seen yet from the program, it’s doing it’s job perfectly.
very informative ,it cleared my doubt that randomness can't be programmed.
Thank you! Always heard that random numbers aren't random but never bothered finding out until this popped up, very interesting video 👍
Your insights are GOLD.
I am glad my mentor has already told me while learning python. Hat's off to you tim also 😄 and that time was chosen(if I remember properly) cauz unix system was introduced for the first time then. But some platforms use different timeline for doing this.
Question are uuid's generated by the "UUID" module in python also not really random or unique or they are?
Randomness in FPGA and other embedded devices which use cryptography is generated from various source, e.g noise, heat and other parameters as I remember in hardware security course I had.
Wow man! I always thought the same that if the computer program is generating the same random numbers for a given seed, then if we can figure out the underlying dynamics of the code, the random number is no longer random. Glad you clarified my intuition in this video. On that note, I feel that there is nothing in the world which is truly random in nature..we as a human being are governed by some chemistry in each cell in our body...I mean, if I sneeze here and the pressure generated from it may have 1e-100 % of influence in affecting the air flow in some other part of the world. If we can connect them through some mathematical model and have the capability of solving that model with some clestially powerful supercomputers, we can still predict the influence of my sneeze in influencing the air flow at some other place in the world.... :)
The last example was grt..❤️❤️❤️
that date he is talking about at around 6:20 is called the unix timestamp
UNIX EPOCH
Great video, Tim. Any chance you could discuss the sys module next time?
Traditionally, in most programming languages, it is measured from midnight 1 Jan 1970 GMT.
I thought, it reads the CPU fan temperature, voltage and date time to generate random numbers
Thank you very much for the Radioactive Decay portion!!!
When you get a algoexpert ad before a algoexpert sponsored video
Thanks for the knowledge Tim
What keyboard are you using? it sounds quiet nice.
1:09 you wanna be a software engineer at google
truly facinating, thanks for the content
very informative thanks buddy
I saw a video awhile back about a company that used Lava Lamps to achieve 'random' by watching a wall of lava lamps and using a camera to pinpoint where the lava was across them all at any given point. Tom Scott probably made it, I am not sure about that, but seems like the kind of video he would make.
that company is called cloudflare
Thank you that was a really good explanation
that is amazing topic bro thankz for share with us in very simple method to understand ❤️❤️❤️
Great explanation.
We have been tricked, we have been backstabbed and most probably...
Bamboozled
When tech youtubers are out of ideas:
"Let's talk about randomness! That should do it!"
Thanks, i always had this question that how true random numbers are generated.
What You Learned WIll In This Video:
- seed function of the random module
- time function of the time module
- how random module works
Ty.. very nice explanation.
6:10 It's the Unix timestamp by the way.
Is it possible to come up with a new set of numbers that are based on several numbers?
This video is useful and interesting!
Nice Video, Tim. 👌
So, does this imply why some accounts in any gacha or gambling games are lucky/unlucky?
Problem with randomness is that it doesn't really exist. The entire universe with all of its complex systems might seem to have a whole lot of randomness, but when you pop the hood you find patterns and algorithms. So the best we can do to create seemingly "random" values for secure algorithms is rely on other chaotic factors like interference and radioactive decay of certain atoms or use techniques such as continuous seeding. Keyword "entropy".
The term "truly random" is a bad term. It doesn't have a proper definition. The properties you want to claim or not claim are uniformity, deterministic, nondeterministic, cryptographically secure and entropic at some level. Python has the RdRand module that works the same way as the random library but provides nondeterministic cryptographically secure random numbers on X86 platforms that support the RdRand and RdSeed instructions.
Shouldn't you use the Secrets module if you want as close to random numbers as possible?
Great knowledge 👍
Actually random is something that is predictable, but it is super ultra hard to predict
video idea: tutorial on how to generate TRULY random numbers in python
*Python has been lying to me 😞*
it's this way for everything ... there's no true randomness in nature
very interesting but im more curious what ide this is where itll let you launch it on demand from the ide
I am very Happy today
It was awesome bro 😎
very cool vid like always.
What if theres an engine that also does run the random seed as random aswell? Will it be truly random?
I don't why someone is disliking this video...
you can use a quanten module to make random seeds too. the one and only true random thing in the universe
Very interesting 👍
Random number generators produce strings of numbers that are void of sequences or patterns. 1,4,9,16,25,36,49.
2,3,5,7,11,13,17,19
2,4,6,8,10,12,14,16
Sequences like these will NEVER occur in Random number generator.
The RNGs have been programmed to avoid these Sequences. Strings of numbers that statistically should occur are omitted.
I have a question: You use a for loop to create a random number 10 times. But if you use the same seed, shouldn't you get the same number as a result for every loop iteration? or is the seed altered after one use?
Basically, every time you use random.randint(), it stores what postion on the sequence you are on. For example, if you call randint() 3 times, it knows that the next time you call it, you want the FOURTH number in the sequence. The seed doesn't just create one number. It creates a infinite sequence.
@@abdullahmohammed6115 the seed is not creating the sequence. The sequence is the same for all seeds only their starting points differ.
@@abdullahmohammed6115 I think you would get the same number every time if you called random.seed(1) inside the loop resetting the current position on the sequence.
@@nocodenoblunder6672 Nice, thank you very much
@@nocodenoblunder6672 Yes you are right. I just tested it
I love your shirt!
6:13 i believe unix was made in the end of 1969 so it starts with that date
Haven't watched the video but I assume the answer to the question boild down to explaining causality.
when i making print(randint(1, 6)) and if computer is loud the 1 is very common
What a perfect time today only I learned about random ()
Perfect 👌
Now I just have to know the starting point of the numbers of the Powerball
Thanks can u post fresca again pls
I LOVE YOUR VIDEOS
How to predict the result of card games in online games
According to Schrodinger, all the numbers exist simultaneously until you measure it.
Very interesting
Why does the captions say seat when it is seed?
Fake information. There are plenty of random number generators. Few examples are in comments below.
What is your opinion of a man that has a Mathematical equation or formula to predict winning Mega Millions numbers and Powerball numbers?
Please pygame tutorials
how does it generate the numbers it chooses for each seed? there must be some way
maybe time
WOW 😳😲 amazing 😍.
Love 💕 from Pakistan.
Random numbers are random
But pseudo-random numbers that you can get in all of the programming languages are in fact pseudo-random
humm...good explanation...
Cool video
'radioactive decay' - this only seems 'random' because nobody is aware of the 'seed'.
Insane
and i was wondering what seed in minecraft exactly does
when Tim said seed I instantly thought of the seed used in ML to get always the same result as te tutorial... totally forgot about minecraft lol
That was an LTT level segway ngl
mystery of the random number is now revealed.
dont use random for security, use secrets!
also modern cpus actually have an instruction to generate truly random numbers.
that's simply not possible
My brother said everything 3 sec before you how insane he has never coded in python WHAT ??
I thought he gonna show the random number formula, so I can calculate the rarity of hatching pets in games
bcos pseudo random
How to make fried rice:
You will need ingredients to make rice
Then you need to learn how to cook fried rice
Done
A wild random message appeared!
@M i Α vℓσg gσ тσ му ¢haηηєℓ! wait ur a python coder?
@Kian Moore yeah i just noticed that a day after i posted my reply