Created
December 6, 2016 10:28
-
-
Save pyllyukko/d29623c07172894fa3410d7ed299d53b to your computer and use it in GitHub Desktop.
Print random tweet from Tweet archive
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/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