<commit_before>import codecs
import sys
import unicodedata

from .charset import BASIC_CHARACTER_SET, BASIC_CHARACTER_SET_EXTENSION


# Codec APIs
class Codec(codecs.Codec):
    """
    Stateless encoder and decoder for GSM 03.38
    """

    NAME = 'gsm03.38'
    __ESCAPE = 0x1b

    def __init__(self, locking_shift_decode_map=BASIC_CHARACTER_SET, single_shift_decode_map=BASIC_CHARACTER_SET_EXTENSION):
        if sys.version_info[0] < 3:
            self.__int2byte = chr
            self.__byte2int = ord
            self.__unicode_lookup = Codec.__unicode_lookup27
        else:
            self.__int2byte = lambda i: bytes((i,))
            self.__byte2int = lambda i: i
            self.__unicode_lookup = unicodedata.lookup
<commit_msg>format file according PEP8<commit_after>import codecs
import sys
import unicodedata

from .charset import BASIC_CHARACTER_SET, BASIC_CHARACTER_SET_EXTENSION


# Codec APIs
class Codec(codecs.Codec):
    """
    Stateless encoder and decoder for GSM 03.38
    """

    NAME = 'gsm03.38'
    __ESCAPE = 0x1b

    def __init__(self, locking_shift_decode_map=BASIC_CHARACTER_SET,
                 single_shift_decode_map=BASIC_CHARACTER_SET_EXTENSION):
        if sys.version_info[0] < 3:
            self.__int2byte = chr
            self.__byte2int = ord
            self.__unicode_lookup = Codec.__unicode_lookup27
        else:
            self.__int2byte = lambda i: bytes((i,))
            self.__byte2int = lambda i: i
            self.__unicode_lookup = unicodedata.lookup

{'fraction_non_alphanumeric': 0.07349081364829396, 'fraction_numerical': 0.024278215223097113, 'mean_word_length': 2.765432098765432, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3168704', 'n_tokens_mistral': 540, 'n_tokens_neox': 497, 'n_words': 103}