Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

A simple example of parsing a Twitter feed and spitting out a generated tweet via Markov chains.

Notifications You must be signed in to change notification settings

renderf0x/python_markov_playground

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python Markov Playground

A simple example of parsing a Twitter feed and spitting out a generated tweet via Markov chains.

Running

This requires having a Twitter API App setup on their dev platform.

# 1) Clone, install python requests library
pip install requests
# 2) Set a base-64 encoded auth string as TWITTER_API_KEY (See Twitter API App docs)
export TWITTER_API_KEY=[KEY]
# 3) Run against a Twitter account, optionally speficying the number of tweets to pull as a base
python markov.py derekryansound 200

Structure

While the markov.py is the runnable script, the actual processing is in lib/CheapMarkov.py and lib/TweetFeeder.py

About

A simple example of parsing a Twitter feed and spitting out a generated tweet via Markov chains.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.