python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How much can I change code to keep rand() giving same output for given seed?
I'm implementing an algorithm. Because calculations takes time, and I need to repeat them multiple times, I'm saving to output file seed values as well. The idea was that I could repeat same instance ...
mrozo
Votes: 0
Answers: 1
How does numpy initialize its random seed?
When I use multiprocessing to create some processes, it seems that processes have the same state. How does it work?
I want each process has different state, so that the data created by numpy.random is...
吴慈霆
Votes: 0
Answers: 1
Output showing 0 for random() function
So, I have this battle scenario here:
def band_attack():
global new_ship
print('Bandits attack!')
s.sleep(1)
c = r.random()
if c < 0.5:
print('B...
rhozagi
Votes: 0
Answers: 2
Specifying Seed Number in RAND() function
I'm using SQL in Python.
I'm running a sample set of 100 from a population of data (1mn+ rows). I am using the following function:
RAND() <= 0.0025
LIMIT 100
I am unable to get a good sample as the...
danalyst
Votes: 0
Answers: 0