<commit_before>#!/usr/bin/python

from oauth2client.file import Storage
from oauth2client.client import flow_from_clientsecrets

import os
import sys


# Path to client_secrets.json which should contain a JSON document such as:
#   {
#     "web": {
#       "client_id": "[[YOUR_CLIENT_ID]]",
#       "client_secret": "[[YOUR_CLIENT_SECRET]]",
#       "redirect_uris": [],
#       "auth_uri": "https://accounts.google.com/o/oauth2/auth",
#       "token_uri": "https://accounts.google.com/o/oauth2/token"
#     }
#   }
CLIENTSECRETS_LOCATION = 'client-secrets.json'
SCOPES = ['https://www.googleapis.com/auth/drive']
REDIRECT_URI = 'urn:ietf:wg:oauth:2.0:oob'

# Path to stored OAuth credentials
CRED_FILENAME = 'credentials'


def getCredentials():
	credPath = os.path.join(os.path.dirname(os.path.realpath(__file__)), CRED_FILENAME)
	storage = Storage(credPath)
	credentials = storage.get()
	if not credentials:
		print "Get credentials before trying to upload (authorize.py)"
		sys.exit(1)

	return credentials<commit_msg>fix suggested name of client-secrets.json file<commit_after>#!/usr/bin/python

from oauth2client.file import Storage
from oauth2client.client import flow_from_clientsecrets

import os
import sys


# Path to client-secrets.json which should contain a JSON document such as:
#   {
#     "web": {
#       "client_id": "[[YOUR_CLIENT_ID]]",
#       "client_secret": "[[YOUR_CLIENT_SECRET]]",
#       "redirect_uris": [],
#       "auth_uri": "https://accounts.google.com/o/oauth2/auth",
#       "token_uri": "https://accounts.google.com/o/oauth2/token"
#     }
#   }
CLIENTSECRETS_LOCATION = 'client-secrets.json'
SCOPES = ['https://www.googleapis.com/auth/drive']
REDIRECT_URI = 'urn:ietf:wg:oauth:2.0:oob'

# Path to stored OAuth credentials
CRED_FILENAME = 'credentials'


def getCredentials():
	credPath = os.path.join(os.path.dirname(os.path.realpath(__file__)), CRED_FILENAME)
	storage = Storage(credPath)
	credentials = storage.get()
	if not credentials:
		print "Get credentials before trying to upload (authorize.py)"
		sys.exit(1)

	return credentials
{'fraction_non_alphanumeric': 0.14093314093314094, 'fraction_numerical': 0.006734006734006734, 'mean_word_length': 4.374677002583979, 'pattern_counts': {'":': 12, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, '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': '595055', 'n_tokens_mistral': 760, 'n_tokens_neox': 736, 'n_words': 144}