gen_random_subreddit_members 304 B

12345678910111213
  1. #!/usr/bin/env ruby
  2. subreddits = File.readlines('subreddits_list').map(&:chomp).uniq!
  3. redditors = File.readlines('random_reddit_ids').map(&:chomp)
  4. counter = 0
  5. subreddits.each do |sr|
  6. (3+Random.rand(18)).to_i.times do
  7. puts "s#{counter}\tu#{Random.rand(redditors.length)}"
  8. end
  9. counter += 1
  10. end