<commit_before>import httplib2
import json
import itertools
from collections import defaultdict

from apiclient.discovery import build
from oauth2client.file import Storage
from oauth2client.client import flow_from_clientsecrets
from oauth2client.tools import run

class Locations(object):
    CLIENT_SECRETS_FILE = 'client_secrets.json'

    FLOW = flow_from_clientsecrets(CLIENT_SECRETS_FILE,
        scope = "https://www.googleapis.com/auth/analytics.readonly",
        message = "Something seems to have gone wrong, check the client secrets file")
    
    def __init__(self):    
        storage = Storage("tokens.dat")
        credentials = storage.get()

        if credentials is None or credentials.invalid:
            credentials = run(FLOW, storage)

        http = httplib2.Http()
        http = credentials.authorize(http)
<commit_msg>Fix referencing of oauth flow.<commit_after>import httplib2
import json
import itertools
from collections import defaultdict

from apiclient.discovery import build
from oauth2client.file import Storage
from oauth2client.client import flow_from_clientsecrets
from oauth2client.tools import run

class Locations(object):
    CLIENT_SECRETS_FILE = 'client_secrets.json'

    FLOW = flow_from_clientsecrets(CLIENT_SECRETS_FILE,
        scope = "https://www.googleapis.com/auth/analytics.readonly",
        message = "Something seems to have gone wrong, check the client secrets file")
    
    def __init__(self):    
        storage = Storage("tokens.dat")
        credentials = storage.get()

        if credentials is None or credentials.invalid:
            credentials = run(self.FLOW, storage)

        http = httplib2.Http()
        http = credentials.authorize(http)

{'fraction_non_alphanumeric': 0.07209302325581396, 'fraction_numerical': 0.005813953488372093, 'mean_word_length': 3.5649867374005306, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5418581', 'n_tokens_mistral': 493, 'n_tokens_neox': 481, 'n_words': 134}