Skip to content

Instantly share code, notes, and snippets.

View luptilu's full-sized avatar

Luisa Bider luptilu

  • London, United Kingdom
View GitHub Profile
import nltk, sys, csv
from nltk.tokenize import TweetTokenizer
from nltk.corpus import stopwords
from datetime import datetime
import pandas as pd
import numpy as np
import string
from collections import Counter
import twitter, json, sys, csv
# == OAuth Authentication ==
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
OAUTH_TOKEN = ''
OAUTH_TOKEN_SECRET = ''
auth = twitter.oauth.OAuth(OAUTH_TOKEN,
OAUTH_TOKEN_SECRET,
@revox
revox / tweet_and user_streaming_keyword.py
Last active November 28, 2017 11:45
Extension to last weeks streaming API consumer, now we add some helper functions and broaden our tweet collection to include geographic information if present
'''Tweet Streaming API consumer'''
import twitter
import csv
# == OAuth Authentication ==
consumer_key=""
consumer_secret=""
access_token=""
access_token_secret=""