Adding ruby script.

This commit is contained in:
Daniel Lemire 2019-12-30 15:07:42 -05:00
parent 0dc80ccf21
commit 7e331957c4
1 changed files with 17 additions and 0 deletions

17
scripts/ruby/kostya_large.rb Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env ruby
require 'json'
x = []
524288.times do
h = {
'x' => rand,
'y' => rand,
'z' => rand,
'name' => ('a'..'z').to_a.shuffle[0..5].join + ' ' + rand(10000).to_s,
'opts' => {'1' => [1, true]},
}
x << h
end
File.open("1.json", 'w') { |f| f.write JSON.pretty_generate('coordinates' => x, 'info' => "some info") }