<commit_before># -*- coding: utf-8 -*-
import logging
import socket
import sys
import time
import random
import six
from abc import ABCMeta, abstractmethod, abstractproperty
from ssl import SSLError

from requests.exceptions import ConnectionError
from django.conf import settings

from .exceptions import NoActiveTokens
from .utils import get_storages, override_api_context

try:
    # py3
    from http.client import BadStatusLine, ResponseNotReady, IncompleteRead
except ImportError:
    # py2.7
    from httplib import BadStatusLine, ResponseNotReady, IncompleteRead

__all__ = ['NoActiveTokens', 'ApiAbstractBase', 'Singleton', 'override_api_context']


class ApiAbstractBase(object):
    __metaclass__ = ABCMeta

    consistent_token = None<commit_msg>try: except -> six<commit_after># -*- coding: utf-8 -*-
import logging
import socket
import sys
import time
import random
import six
from six.moves.http_client import BadStatusLine, ResponseNotReady, IncompleteRead
from abc import ABCMeta, abstractmethod, abstractproperty
from ssl import SSLError

from requests.exceptions import ConnectionError
from django.conf import settings

from .exceptions import NoActiveTokens
from .utils import get_storages, override_api_context


__all__ = ['NoActiveTokens', 'ApiAbstractBase', 'Singleton', 'override_api_context']


class ApiAbstractBase(object):
    __metaclass__ = ABCMeta

    consistent_token = None
{'fraction_non_alphanumeric': 0.06605113636363637, 'fraction_numerical': 0.0035511363636363635, 'mean_word_length': 5.64622641509434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '609913', 'n_tokens_mistral': 391, 'n_tokens_neox': 391, 'n_words': 130}