<commit_before>def range(a, b=None):
    if b:
        index = a
        end = b
    else:
        index = 0
        end = a
    out = list()
    while index < end:
        out.append(index)
        index += 1
    return out


def repr(obj):
    return obj.__repr__()


def print(*args):
    out = JSArray()
    for arg in args:
        out.push(jstype(repr(arg)))
    jscode('console.log.apply(console, out)')


def map(func, objects):
    out = list()
    for obj in objects:
        out.append(func(obj))
    return out


def jstype(obj):
    return obj.__jstype__()


def hash(obj):
    return obj.__hash__()

<commit_msg>compliant: builtins: rework map and range<commit_after>class range:

    def __init__(self, a, b=None):
        if b:
            self.index = a
            self.end = b
        else:
            self.index = 0
            self.end = a

    def __iter__(self):
        return self

    def __next__(self):
        if self.index < self.end:
            index = self.index
            self.index += 1
            return index
        raise StopIteartion


def range(a, b=None):
    out = list()
    while index < end:
        out.append(index)
        index += 1
    return out


def repr(obj):
    return obj.__repr__()


def print(*args):
    out = JSArray()
    for arg in args:
        out.push(jstype(repr(arg)))
    jscode('console.log.apply(console, out)')



class map:

    def __init__(self, func, iterable):
        self.func = func
        self.iterable = iterable

    def __iter__(self):
        return self

    def __next__(self):
        return self.func(next(self.iterable))


def jstype(obj):
    return obj.__jstype__()


def hash(obj):
    return obj.__hash__()


{'fraction_non_alphanumeric': 0.11416861826697892, 'fraction_numerical': 0.002927400468384075, 'mean_word_length': 1.881956155143339, 'pattern_counts': {'":': 0, '<': 6, '<?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': '1541617', 'n_tokens_mistral': 587, 'n_tokens_neox': 559, 'n_words': 152}