<commit_before>#!/usr/bin/env python
from zlib import adler32

def checksum_of_file(path, chunk_size=1024):
    file = open(path, 'rb')
    current = 0

    while True:
        buffer = file.read(chunk_size)

        if not buffer:
            break

        current = adler32(buffer, current)

    file.close()

    return current

if __name__ == '__main__':
    try:
        print checksum_of_file(sys.argv[1])
    except IndexError:
        # Wrong number of arguments
        pass
    except:
        # Other error
        pass<commit_msg>Requires the sys lib when running "standalone" on target machine.<commit_after>#!/usr/bin/env python
from zlib import adler32
import sys
def checksum_of_file(path, chunk_size=1024):
    file = open(path, 'rb')
    current = 0

    while True:
        buffer = file.read(chunk_size)

        if not buffer:
            break

        current = adler32(buffer, current)

    file.close()

    return current

if __name__ == '__main__':
    try:
        print checksum_of_file(sys.argv[1])
    except IndexError:
        # Wrong number of arguments
        pass
    except:
        # Other error
        pass
{'fraction_non_alphanumeric': 0.08623693379790941, 'fraction_numerical': 0.017421602787456445, 'mean_word_length': 2.2275280898876404, 'pattern_counts': {'":': 0, '<': 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': '1586727', 'n_tokens_mistral': 374, 'n_tokens_neox': 347, 'n_words': 100}