Seed is a JavaScript interpreter and a library of the GNOME project.
Questions tagged [seed]
632 questions
4
votes
3 answers
How do I use a string as input to the rand.Seed() function in Golang?
What I want to do:
Based on the contents of a string (like a1b2c3d4e5, for example), I want to generate a bunch of "repeatable" random events. Generating repeatable random numbers in Golang is easy - you just seed the random number generator with a…

James
- 1,394
- 2
- 21
- 31
4
votes
5 answers
Rails Seed confusion
I'm having trouble seeding my database using seed.rb, specifically where table relationships are concerned.
Here's a sample of the code:
# seed.rb
user = User.find_or_create_by_login(
:login => "myname",
:email => "myname@gmail.com",
…

sscirrus
- 55,407
- 41
- 135
- 228
4
votes
2 answers
How to set up a Rake task for seeding
(This is really a newbie question about Rake & Rails & dependencies in general. Trying to wrap my head around how all this fits together)
Basically, I want a Rake task that acts like seed.rb but is called separately. It adds test data for the…

Mike Blyth
- 4,158
- 4
- 30
- 41
4
votes
2 answers
Generate Random Numbers Within A Seed
Relatively new to python so apologies for any terrible coding.
I'm using blender to create random stimuli sets using the sapling add on to create something like
I also want to define a random camera position and angle in a hemisphere above the plane…

Robert Hickman
- 869
- 1
- 6
- 22
4
votes
2 answers
Reproducible Random Values in Vector of Arbitrary Length
I need to generate a random number corresponding to each value in an index, where it needs to be reproducible for each index value, regardless of how many indexes are given:
As an example, I might provide the indexes 1 to 10, and then in a different…

Nicholas Hamilton
- 10,044
- 6
- 57
- 88
4
votes
1 answer
how to get reproducible result in Tensorflow
I built 5-layer neural network by using tensorflow.
I have a problem to get reproducible results (or stable results).
I found similar questions regarding reproducibility of tensorflow and the corresponding answers, such as How to get stable…

HyukSu RYU
- 41
- 3
4
votes
3 answers
How to Insert Identity by AddOrUpdate methode in Seed Entityframework version 6.x.x
I have an entity that has an identity column. As part of the data-seed I want to use specific identifier values for the "standard data" in my system.
I dont want disable identity.
only i want to set IDENTITY_INSERT ON in migration seed.
My code…

Morteza
- 2,378
- 5
- 26
- 37
4
votes
3 answers
What does this CRC implementation mean by having a seed value?
I am trying to implement a CRC algorithm in Verilog for the SENT sensor protocol.
In a document put out by the SAE, they say their CRC uses the generator polynomial
x^4 + x^3 + x^2 + 1 and a seed value of 0101. I understand the basic concept of…

fat balls
- 131
- 1
- 3
- 6
4
votes
2 answers
shell $RANDOM seed not honored in pipelines
This is a strange behavior I can't explain. I want to use shell to generate a predictable random number sequence. I use $RANDOM with a seed. Here is a test program.
RANDOM=15
echo $RANDOM
This works fine by giving the same number every time I run…

lqu
- 606
- 9
- 14
4
votes
1 answer
How to tell if rake db:migrate and rake db:seed were successful
Ruby rake db:seed aborting due to ** Execute db:abort_if_pending_migrations, but I think all the migrations were successful.
Here's the last portion of the output when I run rake db:migrate --trace
** Invoke db:load_config (first_time)
**…

rsmets
- 789
- 1
- 13
- 23
4
votes
2 answers
Rails / Mina Gem Creating Custom task to do seeding
I'm using the mina gem since 2 weeks and I've searched online to find a nice way to do my seeding in my rails staging.
The seed must be a task so it is not called every time a deploy is done.
What I already have is the following:
desc "Seed data to…

FastSolutions
- 1,809
- 1
- 25
- 49
4
votes
2 answers
array_rand with seed
I have multiple image file names in an array and would like to generate random image that are fixed for a whole day, so I would like to use a fixed seed for the same day using date("Ymd") and this seed will change daily, thus generating new unique…

fawzib
- 774
- 2
- 9
- 23
4
votes
1 answer
Seed images in heroku with paperclip
When I run heroku run rake db:seed I get
Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/image20130219-2-1gk1yip.png[0]'
Command :: composite -gravity Center /app/public/media/watermark.png "/tmp/image20130219-2-1gk1yip.png[0]"…

DantaliaN
- 155
- 10
4
votes
3 answers
mysql set seed for rand
Is it possible to set the seed for the RAND() function in MySQL?
I need this for unit testing, to make sure I know what the expected outcome will be.
In PHP one would simply do:
In my model I currently have a…

meijuh
- 1,067
- 1
- 9
- 23
4
votes
2 answers
Is there a way to read back the random seed in python?
I know how to set the random seed in python
random.seed([x])
Once the seed is set is there any way to read it back and figure out what value was passed to the seed() function?

Plazgoth
- 1,242
- 1
- 12
- 22