<commit_before><commit_msg>Display GitHub rate limit status<commit_after>import os
import sys
from StringIO import StringIO
import requests
sys.path.append('../')
import MyMoment

#Get rate limit for application

client_id = os.environ['github_client_id']
client_secret = os.environ['github_client_secret']
url ="https://api.github.com/rate_limit?client_id=" + client_id + "&client_secret=" + client_secret

response = requests.get(url)
print "Limit: " +  response.headers["X-RateLimit-Limit"] + " Remaining: " + response.headers["X-RateLimit-Remaining"] + " Reset: " + MyMoment.HTM(int(response.headers["X-RateLimit-Reset"]),"from now")
{'fraction_non_alphanumeric': 0.14599686028257458, 'fraction_numerical': 0.0, 'mean_word_length': 6.595238095238095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '4407368', 'n_tokens_mistral': 203, 'n_tokens_neox': 203, 'n_words': 41}