Skip to content

DSSatPitt/python-twitter-bots

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
September 17, 2015 15:50
September 17, 2015 15:50
September 17, 2015 15:50
September 17, 2015 15:50
September 17, 2015 15:50

Tutorial on Python Twitter Bots

Description in Plain English

This is a Twitter Bot tutorial @mcburton put together for Annette Vee's course on computational media. The workshop was a blast and if anyone wants to use this tutorial please let me know.

This README is sparse, please see the Jupyter Notebook index.ipynb for all the juicy details.

Live Demo

You can now run this tutorial LIVE using Binder by clicking this button:

Binder

NOTE: There is a unicode bug opening the text file when running this tutorial on Binders that I haven't fixed yet.

# open Robin's Edgar Allen Poe data file and read every line into memory
with open('data/thats-so-raven.txt','r') as filename:
    lines = filename.readlines()

This code cell should be tweaked to explicitly declare the encoding:

# open Robin's Edgar Allen Poe data file and read every line into memory
with open('data/thats-so-raven.txt','r', encoding='utf-8') as filename:
    lines = filename.readlines()

How to Install

These instructions assume experience with the unix/linux command line and installing/running Python.

If you want to run this tutorial on your own machine you need to have Jupyter installed. I recommend reading their documentation about installing Jupyter and Jupyter Notebooks.

Once you have Jupyter installed you should clone this repository to your local machine. You will install the tweepy python library (from requirements.txt) and then launch a Jupyter Notebook from within the repository directory.

git clone https://github.com/DSSatPitt/python-twitter-bots.git
cd python-twitter-bots
pip install -r requirements.txt
jupyter notebook

These are very quick and dirty instructions, please contact me if you have further questions.

License

License

About

A tutorial in Jupyter Notebooks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published