About 51 results
Open links in new tab
  1. What does `random.seed()` do in Python? - Stack Overflow

    random.seed(a, version) in python is used to initialize the pseudo-random number generator (PRNG). PRNG is algorithm that generates sequence of numbers approximating the properties of random …

  2. python - What is suggested seed value to use with random.seed ...

    Nov 9, 2009 · Simple enough question: I'm using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed () function?

  3. python - Best way to revert to a random seed after temporarily fixing ...

    Sep 27, 2018 · np.random.seed(int(time.time())) If you have some code that you want to be repeatable (e.g. a test) in a loop with other code that you want to be random each loop, how do you 'reset' the …

  4. Generating Random (Seed) Numbers in Python - Stack Overflow

    Nov 14, 2022 · How can I generate a random number using Uniform distributed random number range between (Length of the string and 2000000), integer only., by using all the time constant seed(2) in …

  5. python - What does numpy.random.seed (0) do? - Stack Overflow

    Feb 1, 2014 · As noted, numpy.random.seed (0) sets the random seed to 0, so the pseudo random numbers you get from random will start from the same point. This can be good for debuging in some …

  6. Como usar random.seed() em Python? - Stack Overflow em Português

    Mar 30, 2019 · Preciso gerar um número aleatório utilizando a linguagem Python, na documentação vi que existe uma função random.seed() para aumentar a aleatoriedade do número gerado, mas achei …

  7. Python random sequence with seed - Stack Overflow

    23 I'm doing this for a school project (so I can't use any advanced features) and I'm using Python 2.6.6. I have a list of numbers from 1 to 1000 and a seed (448 for example). How can I generate a random …

  8. set random seed programwide in python - Stack Overflow

    Jul 17, 2012 · The main python module that is run should import random and call random.seed(n) - this is shared between all other imports of random as long as somewhere else doesn't reset the seed.

  9. Generate Random Seed In Python - Stack Overflow

    Oct 19, 2019 · Is there a way to generate random seed? something like this: def random_seed(length) output example: 3273650411015667511766 or is there a way to do both nums and letters? output …

  10. python - How can I retrieve the current seed of NumPy's random …

    Aug 24, 2015 · import numpy as np np.random.seed(42) However, I'm not interested in setting the seed but more in reading it. random.get_state() does not seem to contain the seed. The documentation …