<commit_before>import requests
from requests_oauthlib import OAuth1

import json

from credentials import *

url = 'https://api.twitter.com/1.1/search/tweets.json?f=tweets&q=to%3Abbt_chart%20from%3Alorenaelise'

consumer_key = CONSUMER_KEY
consumer_secret = CONSUMER_SECRET
access_token = ACCESS_TOKEN
access_token_secret = ACCESS_TOKEN_SECRET

auth = OAuth1(consumer_key, consumer_secret, access_token, access_token_secret)

r = requests.get(url, auth=auth)
data = r.json()

print data["statuses"][0]["text"]
# with open('data.json', 'w') as f:
#     json.dump(data, f)<commit_msg>printing tweets based on object lenght<commit_after>import requests
from requests_oauthlib import OAuth1

import json

from credentials import *

url = 'https://api.twitter.com/1.1/search/tweets.json?f=tweets&q=to%3Abbt_chart%20from%3Alorenaelise'

consumer_key = CONSUMER_KEY
consumer_secret = CONSUMER_SECRET
access_token = ACCESS_TOKEN
access_token_secret = ACCESS_TOKEN_SECRET

auth = OAuth1(consumer_key, consumer_secret, access_token, access_token_secret)

r = requests.get(url, auth=auth)
data = r.json()

tweet_data = data['statuses']
tweets = len(tweet_data)

for i in range(tweets):
    print tweet_data[i]['text']


# with open('data.json', 'w') as f:
#     json.dump(data, f)
{'fraction_non_alphanumeric': 0.11426319936958235, 'fraction_numerical': 0.013396375098502758, 'mean_word_length': 6.426900584795321, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1096979', 'n_tokens_mistral': 491, 'n_tokens_neox': 475, 'n_words': 92}