-
-
Save mando/4758843 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env ruby | |
num_times = (ARGV[0] || "1_000_000").gsub(/_/,'').to_i | |
seed = (ARGV[0] || Time.now).to_i | |
$stderr.puts "seed is #{seed}" | |
srand(seed) | |
time = Time.now.to_f | |
users = %w[Ace Beer Charlie Don Edward Freddie George Harry Ink Johnnie King London Monkey Nuts Orange Pip Queen Robert Sugar Toc Uncle Vic William Xray Yorker Zebra] | |
num_times.times do |user| | |
time += 1 if rand > 0.7 | |
puts [ | |
(time * 1000 + rand(1000)).to_i, | |
time.to_i, | |
users[rand(users.length-1)], | |
].join(",") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment