<commit_before># -*- coding: utf-8 -*-

import argparse
import sys


def main(argv=sys.argv):
    command = EvTranspose(argv)
    return command.run()

class EvTranspose(object):

    description = ""
    parser = argparse.ArgumentParser(description=description)
    parser.add_argument('dst', help='the destination for the output files')
    parser.add_argument('zip_file', nargs='+', help='the zipped files to parse')
    
    def __init__(self, argv):
        self.args = self.parser.parse_args(argv[1:])

    def run(self):
        return 0<commit_msg>describing the algorithm<commit_after># -*- coding: utf-8 -*-

import argparse
import os.path
import sys

from ev_transpose import TP_TSTAMP_FORMAT

def main(argv=sys.argv):
    command = EvTranspose(argv)
    return command.run()

class EvTranspose(object):

    description = ""
    parser = argparse.ArgumentParser(description=description)
    parser.add_argument('dst', help='the destination for the output files')
    parser.add_argument('zip_file', nargs='+', help='the zipped files to parse')
    
    def __init__(self, argv):
        self.args = self.parser.parse_args(argv[1:])
        self.dst = self.args.dst

    def run(self):
        for zfile in self.args.zip_file:
            with InputFile(zfile) as in_f:
                for entry in in_f:
                    self.write_out(entry)
        return 0

    def write_out(self, entry):
        with GzipFile(self.expand(entry.name), 'w') as fp:
            fp.write(self.format_out(entry))

    def expand(self, fname):
        return os.path.join(self.dst, '.'.join((fname, 'gz')))

    def format_out(self, entry):
        date = entry.date.strftime(TP_TSTAMP_FORMAT)
        return '{0}, {1}'.format(date, entry.rank)
{'fraction_non_alphanumeric': 0.12801377726750862, 'fraction_numerical': 0.004592422502870264, 'mean_word_length': 3.0347222222222223, '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': '110160', 'n_tokens_mistral': 560, 'n_tokens_neox': 544, 'n_words': 129}