Created
November 11, 2019 15:25
-
-
Save rbnpercy/fe8b21a3809541ec1de71e1b807d4b76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
x = [] | |
1000000.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") } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment