<commit_before>from twitter import *
import json
print "parody parrot"

twitter_stream = TwitterStream(auth=OAuth("<KEY>", "<KEY>", "<KEY>", "<KEY>"))

iterator = twitter_stream.statuses.sample()

for tweet in iterator:
	print type(tweet)<commit_msg>can parse dict<commit_after>from twitter import *
import json
print "parody parrot"

twitter_stream = TwitterStream(auth=OAuth("<KEY>", "<KEY>", "<KEY>", "<KEY>"))

iterator = twitter_stream.statuses.sample()

for tweet in iterator:
	print json.dumps(tweet, indent=2)
	if "favorite_count" in tweet:
		print tweet["favorite_count"]
{'fraction_non_alphanumeric': 0.15172413793103448, 'fraction_numerical': 0.0017241379310344827, 'mean_word_length': 7.069444444444445, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1801028', 'n_tokens_mistral': 195, 'n_tokens_neox': 184, 'n_words': 50}