Skip to content

Instantly share code, notes, and snippets.

View edudutra's full-sized avatar

Eduardo Dutra edudutra

  • Overbug
  • São Paulo, Brazil
View GitHub Profile
@edudutra
edudutra / tweet_utils.py
Last active July 20, 2018 02:19 — forked from timothyrenner/tweet_utils.py
Python Utilities for Tweets
from datetime import datetime
import string
from nltk.stem.lancaster import LancasterStemmer
from nltk.corpus import stopwords
#Gets the tweet time.
def get_time(tweet):
return datetime.strptime(tweet['created_at'], "%a %b %d %H:%M:%S +0000 %Y")