Skip to content

Instantly share code, notes, and snippets.

@pyllyukko
Created December 6, 2016 10:28
Show Gist options
  • Save pyllyukko/d29623c07172894fa3410d7ed299d53b to your computer and use it in GitHub Desktop.
Save pyllyukko/d29623c07172894fa3410d7ed299d53b to your computer and use it in GitHub Desktop.
Print random tweet from Tweet archive
#!/usr/bin/ruby
# Print random tweet from Tweet archive
require "csv"
tweets = CSV.read('/home/pyllyukko/Documents/twitter-20161205/tweets.csv')
i = rand(1..tweets.count-1)
puts tweets[i][5]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment