Skip to content

Instantly share code, notes, and snippets.

@edyesed
Created August 10, 2016 05:14
Show Gist options
  • Save edyesed/b5f0e7fb3adfd94bca184236cd93868f to your computer and use it in GitHub Desktop.
Save edyesed/b5f0e7fb3adfd94bca184236cd93868f to your computer and use it in GitHub Desktop.
devops comedy podcast topic generator
from twitter import *
from pymarkovchain import MarkovChain
t = Twitter(auth=OAuth('x', 'y', 'zz', 'y'))
# count=1000, but they only come back 100 at a time.
# search on devops with a sad sentiment
res = t.search.tweets(q="devops%20%3F",count=1000)
for stat in res['statuses']:
mc.generateDatabase(stat['text'], sentenceSep='\n', n=2)
mc.generateString()
mc.generateString()
mc.generateString()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment