<commit_before>import logging

import hexdump

from cim import CIM
from cim import Key


def main(type_, path, key):
    if type_ not in ("xp", "win7"):
        raise RuntimeError("Invalid mapping type: {:s}".format(type_))

    c = CIM(type_, path)
    k = Key("a." + key)
    hexdump.hexdump(c.getLogicalDataStore().getObjectBuffer(k))


if __name__ == "__main__":
    logging.basicConfig(level=logging.INFO)
    import sys
    main(*sys.argv[1:])
<commit_msg>dump_object: write raw binary, not hexdump<commit_after>import sys
import logging

from cim import CIM
from cim import Key


def main(type_, path, key):
    if type_ not in ("xp", "win7"):
        raise RuntimeError("Invalid mapping type: {:s}".format(type_))

    c = CIM(type_, path)
    k = Key("a." + key)
    sys.stdout.write(c.getLogicalDataStore().getObjectBuffer(k))
    sys.stdout.flush()


if __name__ == "__main__":
    logging.basicConfig(level=logging.INFO)
    import sys
    main(*sys.argv[1:])

{'fraction_non_alphanumeric': 0.1388888888888889, 'fraction_numerical': 0.00411522633744856, 'mean_word_length': 3.7463414634146344, 'pattern_counts': {'":': 2, '<': 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': '5345099', 'n_tokens_mistral': 343, 'n_tokens_neox': 334, 'n_words': 88}