<commit_before>#!/usr/bin/env python
# MIT License, (c) <NAME> <EMAIL>
# https://github.com/joswr1ght/md5deep
import os, sys, hashlib

# Reproduce this output with slashes consistent for Windows systems
#ba2812a436909554688154be461d976c  A\SEC575-Clown-Chat\nvram

# Optimized for low-memory systems, read whole file with blocksize=0
def md5sum(filename, blocksize=65536):
    hash = hashlib.md5()
    with open(filename, "r+b") as f:
        for block in iter(lambda: f.read(blocksize), ""):<commit_msg>remove append mode on hash file opening to allow running on read-only media.<commit_after>#!/usr/bin/env python
# MIT License, (c) <NAME> <EMAIL>
# https://github.com/joswr1ght/md5deep
import os, sys, hashlib

# Reproduce this output with slashes consistent for Windows systems
#ba2812a436909554688154be461d976c  A\SEC575-Clown-Chat\nvram

# Optimized for low-memory systems, read whole file with blocksize=0
def md5sum(filename, blocksize=65536):
    hash = hashlib.md5()
    with open(filename, "rb") as f:
        for block in iter(lambda: f.read(blocksize), ""):
{'fraction_non_alphanumeric': 0.11495327102803739, 'fraction_numerical': 0.07102803738317758, 'mean_word_length': 4.7272727272727275, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6734222', 'n_tokens_mistral': 407, 'n_tokens_neox': 368, 'n_words': 106}