Generating ACTUALLY Random Numbers in Python

preview_player
Показать описание
Today we how to generate truly random numbers in Python.

◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚

🌐 Social Media & Contact 🌐
Рекомендации по теме
Комментарии
Автор

Col=5 is the number of columns to show the numbers in that website. It is unfortunately a mandatory parameter. I think in python we can use col=1 only, as it does not matter, especially for a single random number.

hjedpej
Автор

I mean its all good and all but why the fuck would I want to send a HTTP request to just generate a random number. This is going to be extremely slow in the long run :P

oguzhantopaloglu
Автор

The <secrets> module is good and built-in, so why take unnecessary effort to get a random number from the Internet? 🙃

krzysiekkrzysiek
Автор

This is a method I never heard of. I thought you would use a method similar to one I used on a computer I had many years ago. It had a pseudo random number generator and a way to get it to produce more truly random numbers was to seed it with the computer's timer. If I remember correctly the timer started at 0 and incremented once every 1/60 of a second until it reached 65535 and then started over at 0 (it was not PC compatible). So every time I ran a program needing random numbers the timer would almost certainly have a different value so the random number generator would produce a different series of random numbers. I thought you would use a similar method (seed the random number generator with the time of day for instance).

brucea
Автор

What about /dev/random ? Can it be used to generate true random numbers? Or are they pseudo-random?

Antekl
Автор

Good Idea using an out rng to get a true random Number
but I love my solution
I made my own rng hardware, and embedded it in my computer mother board
I don't say it's easy but it's efficient, and runs on 5volts, also it uses an ADC
also it's copper wires that detects the change in magnetic field around it and sums all the differences
if you google how to make one you'll find many solutions that works perfectly
I made it for less than 50 EGP that's almost 1 usd

SolathPrime
Автор

what the deffrences between random and that the both give us random number ? and thank you, you are the best

kamelboudaoud-qhod
Автор

what about secrets or os.urandom? Http requests are too slow.

mertemr
Автор

Hi! Do you know how to do the same with VBA excel? A video about that would be great :)

ricardoricric
Автор

no such thing as true entropy, only the illusion of such due to scale of observation

IntegralTriangle