Seed is a JavaScript interpreter and a library of the GNOME project.
Questions tagged [seed]
632 questions
5
votes
3 answers
Seeding a restful_authentication user in seeds.rb
I'm pretty sure I understand how seeding work with respect to seeds.rb, but I can't seem to use it to stick a restful_authentication User object into the database.
User.create(:login => 'admin',
:role =>…

soundly_typed
- 39,257
- 5
- 28
- 36
5
votes
6 answers
What is random seed about?
For example the code below. It has a random class. However it always produce the same output everywhere . In this case which item is the seed?
source: link
import java.util.Random;
public class RandomTest {
public static void main(String[] s) {
…

newbieprogrammer
- 848
- 7
- 23
- 46
5
votes
14 answers
Better random algorithm?
I'm making a game in C++ and it involves filling tiles with random booleans (either yes or no) whether it is yes or no is decided by rand() % 1. It doesn't feel very random.
I'm using srand with ctime at startup, but it seems like the same patterns…

jmasterx
- 52,639
- 96
- 311
- 557
5
votes
1 answer
how to seed in Yii?
I'm wondering how one can seed in Yii a table once it is created with migration?
I've got a migration with an up-method:
public function up()
{
$this->createTable('users',array('id'=>"pk",
'login'=>'string NOT NULL'));
echo…

Andrew
- 2,148
- 5
- 23
- 34
5
votes
1 answer
Seeded 3D white noise random generator with random access
I have almost zero experience with random generators. I have used the standard rand functions in C and I have used perlin noise.
But now, I need a cube of resolution NxNxN (with N maybe 1e6 or bigger) filled with white noise (no perlin smoothness or…

scippie
- 2,011
- 1
- 26
- 42
5
votes
1 answer
Generate test data in Raven DB
I am looking for a preferred and maintainable way of test data generation in Raven DB. Currently, our team does have a way to do it through .NET code. Example is provided.
However, i am looking for different options. Please share.
public void…

Yusubov
- 5,815
- 9
- 32
- 69
4
votes
2 answers
Reproducibility issue with PyTorch
I'm running a script with the same seed and I see results are reproduced on consecutive runs but somehow running the same script with the same seed changes the output after a few days. I'm only getting a short-term reproducibility which is weird.…

Barah Fazili
- 59
- 4
4
votes
4 answers
How to ensure uniqe seeds for the RNG on subsequent process launches?
Summary: I need a simple self-contained way to seed my RNG so that the seed is different every time the program is launched.
Details:
I often need to run the same program (which does calculations with random numbers, e.g. Monte Carlo simulation…

Szabolcs
- 24,728
- 9
- 85
- 174
4
votes
2 answers
Set.seed issue with sample when changing order of values
set.seed(59)
mean(sample(c(12,7,5),7,prob = c(.3,.3,.4),replace = T))
[1] 9.571429}
set.seed(59)
mean(sample(c(5,7,12),7,prob = c(.4,.3,.3),replace = T))
[1] 8.142857
Shouldn't both codes return the same sample mean, why is it different?

Olivia
- 115
- 6
4
votes
3 answers
When I use the same seed phrase for both Ethereum and RSK, why is my address capitalised differently?
If I import the same private key in ETH and RSK networks, the account is the same but the capitalization is different. Why is this? Is this OK?

Alejandro Cavallero
- 203
- 1
- 5
4
votes
2 answers
Which procedure is more secure for encryption using Password and Seed
I am designing a procedure and file format for the encryption application. I came to a point when I need to make a decision regarding the method/workflow of the encryption. I can't make up my mind on pros vs cons of using one approach over…

dezlov
- 840
- 8
- 20
4
votes
1 answer
Best practice when using seed.rb
I'm having some difficulties understanding how to use the seed.rb script in rails.
So far, I've used it to populate my database every time i deploy my application.
Like this.
seed.rb
["Video", "Tv"].each do |thing|
Category.create(name:…

Linus Oleander
- 17,746
- 15
- 69
- 102
4
votes
1 answer
Rails 3: Multiple has_one associations & seeding
I'm working with a data concept that Rails doesn't seem to do great with - a Route has two (and only two) Airports. I finally figured out how to hard-code my foreign keys so that they would be sensible.
My models/route.rb is pretty simple:
class…

tkrajcar
- 1,702
- 1
- 17
- 34
4
votes
1 answer
How to set seed value of kernel initializer (glorot_uniform) in Keras
I'd like to set seed value of glorot_uniform kernel initializer in Keras.
model.add(Dense(50, input_dim=self.state_size, activation='relu', kernel_initializer='glorot_uniform(seed=0)'))
When I use above code, error message is below.
ValueError:…

WKK
- 159
- 2
- 13
4
votes
2 answers
Laravel seed's with uuid
I have problem with my seeds. Here is my structure of my tables:
1.Complaints:
Schema::create('complaints', function (Blueprint $table) {
$table->uuid('id');
$table->unsignedInteger('origin_id');
…

wenus
- 1,345
- 6
- 24
- 51