- Variables
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
import re | |
with open("_episodes/08-connected-components.md") as f: | |
content = f.read() | |
content = re.sub("(\>[ |\n])", "", content) # strip all "> " | |
content = re.sub("(\%matplotlib widget)", "", content) # strip notebook magics | |
matches = re.findall( | |
"(\~\~\~\n)(?!{)([\w\W]*?)(\~\~\~\n)(.*)", | |
content, |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Required libraries | |
from twython import Twython | |
import json | |
import pandas as pd | |
# Access Twitter API using twython | |
APP_KEY = '' # Use your API KEY | |
APP_SECRET = '' # Use your secret | |
twitter = Twython(APP_KEY, APP_SECRET, oauth_version=2) | |
ACCESS_TOKEN = twitter.obtain_access_token() |