<commit_before>"""
    useful links:
        - http://wiki.luajit.org/Bytecode/c728f657001eaeee7f64eb99f47dc413c8e29a56
        - http://wiki.luajit.org/Bytecode-2.0
        - https://github.com/creationix/brozula/blob/master/parser.js
        - http://lua-users.org/lists/lua-l/2012-12/msg00229.html
        - http://luajit.org/running.html#opt_b

"""
import sys
import os
import struct
import array

from rpython.annotator.model import SomeByteArray
from rpython.rlib.rstruct.runpack import runpack

# always returns a bytearray
# TODO is there a better way to slice in rpython?
"""
def slice(iterable, start, end):
    res = b'' 
    # TODO doesn't work with res as list, maybe a rpython bug?
    for i in xrange(start, min(end, len(iterable))):
        res += chr(iterable[i])
    return bytearray(res)
"""
OPCODES = [<commit_msg>Remove unused stuff<commit_after>"""
    useful links:
        - http://wiki.luajit.org/Bytecode/c728f657001eaeee7f64eb99f47dc413c8e29a56
        - http://wiki.luajit.org/Bytecode-2.0
        - https://github.com/creationix/brozula/blob/master/parser.js
        - http://lua-users.org/lists/lua-l/2012-12/msg00229.html
        - http://luajit.org/running.html#opt_b

"""
import os

from rpython.annotator.model import SomeByteArray
from rpython.rlib.rstruct.runpack import runpack

OPCODES = [
{'fraction_non_alphanumeric': 0.1281085154483798, 'fraction_numerical': 0.05576488319517709, 'mean_word_length': 3.0987654320987654, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '575426', 'n_tokens_mistral': 519, 'n_tokens_neox': 477, 'n_words': 87}