Created
September 22, 2018 09:18
-
-
Save paractmol/a3cc65018bb0a0c0683565e9e7254c84 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
def popularity(string) | |
tweets = @client.search(string, result_type: 'recent').take(1_000) | |
tweets.length / (tweets.first.created_at - tweets.last.created_at) * 60 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment