Questions tagged [random-seed]

A random-seed is used to initialize a pseudo-random number generator in many programming languages.

937 questions
-2
votes
1 answer

Pythonic way of this nodejs function

I am trying to make a Python function of a given NodeJS function as my back-end is python based. The main issue is that I am unaware of the tools to use in this case. I want to create the generateTemporaryGuid function in python. NodeJS function: //…
-2
votes
2 answers

Why does this code always generate zero when I want to generate random numbers? How can I fix the problem?

#include #include #include #include using namespace std; class mRND { public: void seed() { srand(time(0)); _seed = rand(); } protected: …
raneem
  • 1
  • 3
-2
votes
1 answer

Seeding Random in a Single Def

In my program I'm trying to include a random place generator, and instead of saving each place that's generated (for people to explore) I'd rather just reuse the seed that I used to generate the place to begin with, though this could conflict with…
-2
votes
1 answer

In python: Can I rely on random.seed() in order to generate always the same permutation of a matrix?

I would like, in python, to permutate the lines of various 2x2 numpy.array() at any time. Can I rely on seed in order to make sure that the permutation will be always the same if a fix the random.seed() to some integer before every permutation? Can…
Waliston
  • 17
  • 1
  • 3
-2
votes
3 answers

Python: How to fix random seed inside process?

I want to make each process produce random numbers but I want them be reproducible across runs. Here is example code: import random from multiprocessing import Process random.seed(2019) def f2(): print('from f2:') v = random.randint(0,…
mrgloom
  • 20,061
  • 36
  • 171
  • 301
-2
votes
1 answer

What is an entropy of a random seed and how it works?

Inspired by a question asked in SO about randomness vs uniqueness, I did some research on general RNGs and methods employed in them. The entropy of a seed was mentioned in most of the articles I skimmed through. What is an entropy of a seed and…
Charlie
  • 22,886
  • 11
  • 59
  • 90
-2
votes
2 answers

Random Seed Chose Different Rows

I was applying .sample with random_state set to a constant and after using set_index it started selecting different rows. A member dropped that was previously included in the subset. I'm unsure how seeding selects rows. Does it make sense or did…
Jon
  • 1
  • 1
-2
votes
1 answer

time(NULL) returns allways same value

I wanted to fill an array with random numbers (I use cuRand), but what a surprise when I noticed that although being apparently random, every time that I run the code (I'm talking about different executions) there they are, always the same numbers…
Kaostias
  • 321
  • 4
  • 24
-2
votes
1 answer

tokenization engine | encryption-decryption using seed file

I need to build web server (window server) with a tokenization engine for encrypting sensitive data. As per client requirements: The server should be configured with a unique encryption/hash "seed" file that can be backed up The server should use…
user2745580
  • 123
  • 7
-3
votes
3 answers

How can I randomize a number with 32 hexadecimal digits?

I am trying to randomize a number with 32 hexadecimal digits in bash with seed which depends on the date. I thought about something like: RANDOM=$(date +%N | cut -b4-9) , but it's not give me 32 hexadecimal digits. ideas?
Software_t
  • 576
  • 1
  • 4
  • 13
-3
votes
1 answer

how to generate a non-pseudo random number in .net on windows

How can I generate a non-pseudo (ie. truly) random number in .Net Framework (latest) running on an Azure Windows 10 Pro virtual machine? Obviously, it must periodically self-seed by a function of some external variant, such as some counter within…
Doug Null
  • 7,989
  • 15
  • 69
  • 148
-3
votes
1 answer

E2140 expression must have integral or unscoped enum type

int *fillArray(int* array,const int arraySize, const int min, const int max) { srand(time(0)); for (size_t i = 0; i < arraySize; i++) { array[i] = rand % (max - min + 1) - min; } }
-3
votes
2 answers

C# - How do I call a random number generator class to main?

So I am trying to make this wizard battle game which will heavily use Random Number Generator for plethora of things such as choosing level, name, and spells for a enemy wizard. I have generated the basic number generator but I am wondering how do I…
KomoGit
  • 3
  • 3
-4
votes
1 answer

Random dont chose 8 character words

I used random module in my ptoject. Im not a programmer, but i need to do a script which will create a randomized database from another database. In my case, I need the script to select random words lined up in a column from the "wordlist.txt" file,…
Prism Ash
  • 1
  • 1
-4
votes
2 answers

How to generate the same random sequence from a given seed in Delphi

I am wanting to generate the same random sequence (of numbers or characters) based on a given "seed" value. Using the standard Randomize function does not seem to have such an option. For example in C# you can initialize the Random function with a…
RaelB
  • 3,301
  • 5
  • 35
  • 55
1 2 3
62
63