<commit_before>import os
import re
import json
from urlparse import urlparse, parse_qs
from urllib import urlencode, unquote

import requests

from .exceptions import AuthenticationException


class Client(object):
    '''
    Base API client object handling authentication
    and making requests.

    A global instance of this is instantiated on import,
    all you have to do is call the :meth:`~xbox.Client.authenticate`
    method.

    :var bool authenticated: whether client is authed

    '''

    def __init__(self):
        self.session = requests.session()
        self.authenticated = False

    def _get(self, url, **kw):
        '''<commit_msg>Fix python3 import error<commit_after>import os
import re
import json

try:
    from urlparse import urlparse, parse_qs
except ImportError:  # py 3.x
    from urllib.parse import urlparse, parse_qs

from urllib import urlencode, unquote

import requests

from .exceptions import AuthenticationException


class Client(object):
    '''
    Base API client object handling authentication
    and making requests.

    A global instance of this is instantiated on import,
    all you have to do is call the :meth:`~xbox.Client.authenticate`
    method.

    :var bool authenticated: whether client is authed

    '''

    def __init__(self):
        self.session = requests.session()
        self.authenticated = False

    def _get(self, url, **kw):
        '''
{'fraction_non_alphanumeric': 0.07052186177715092, 'fraction_numerical': 0.0014104372355430183, 'mean_word_length': 3.2232142857142856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5646877', 'n_tokens_mistral': 406, 'n_tokens_neox': 382, 'n_words': 151}