<commit_before>extern crate itertools;
extern crate clap;
use itertools::Itertools;

fn main() {
    
}
<commit_msg>parse command args<commit_after>extern crate itertools;
extern crate clap;
use itertools::Itertools;
use clap::{App, Arg};

const DEFAULT_CROSSOVER_POINTS: usize = 3;
const DEFAULT_MUTATION_RATE: f64 = 0.001;
const DEFAULT_UNIT: usize = 1;
const DEFAULT_STRIDE: usize = 1;

fn main() {
    let matches = App::new("matef")
        .version("0.0")
        .author("<NAME> <<EMAIL>>")
        .about("Mates two files")
        .arg(Arg::with_name("output")
            .help("The output location")
            .index(1))
        .arg(Arg::with_name("file1")
            .help("Input file 1")
            .index(2))
        .arg(Arg::with_name("file2")
            .help("Input file 2")
            .index(3))
        .arg(Arg::with_name("mutation-rate")
            .short("m")
            .multiple(false)
            .long("mutation-rate")
            .value_name("RATE")
            .help("Takes a RATE of mutation that randomizes UNIT bytes at a time")
            .takes_value(true))
        .arg(Arg::with_name("crossover-points")
            .short("c")
            .multiple(false)
            .long("crossover-points")
            .value_name("NUMBER")
            .help("Takes a NUMBER of crossover points of 1 or greater")
            .takes_value(true))
        .arg(Arg::with_name("unit")
            .short("u")
            .multiple(false)
            .long("unit")
            .value_name("BYTES")
            .help("Takes an amount of BYTES that are always mutated as a group")
            .takes_value(true))
        .arg(Arg::with_name("stride")
            .short("s")
            .multiple(false)
            .long("stride")
            .value_name("BYTES")
            .help("Takes an amount of BYTES that define the alignment of mutated units")
            .takes_value(true))
        .get_matches();

    let crossover_points = match matches.value_of("crossover-points") {
        Some(c) => {
            match c.parse::<usize>() {
                Ok(0) => {
                    panic!("Error: Cannot accept 0 crossover-points.");
                },
                Ok(n) => n,
                Err(e) => {
                    panic!("Error: Failed to parse crossover-points: {}", e);
                },
            }
        },
        None => DEFAULT_CROSSOVER_POINTS,
    };

    let mutation_rate = match matches.value_of("mutation-rate") {
        Some(c) => {
            match c.parse::<f64>() {
                Ok(n) => n,
                Err(e) => {
                    panic!("Error: Failed to parse mutation-rate: {}", e);
                },
            }
        },
        None => DEFAULT_MUTATION_RATE,
    };

    let mutation_size = match matches.value_of("unit") {
        Some(c) => {
            match c.parse::<usize>() {
                Ok(0) => {
                    panic!("Error: Cannot accept 0 bytes as the unit.");
                },
                Ok(n) => n,
                Err(e) => {
                    panic!("Error: Failed to parse unit: {}", e);
                },
            }
        },
        None => DEFAULT_UNIT,
    };

    let stride = match matches.value_of("stride") {
        Some(c) => {
            match c.parse::<usize>() {
                Ok(0) => {
                    panic!("Error: Cannot accept 0 bytes as the stride.");
                },
                Ok(n) => n,
                Err(e) => {
                    panic!("Error: Failed to parse stride: {}", e);
                },
            }
        },
        None => DEFAULT_STRIDE,
    };

    let output = matches.value_of("output").unwrap();
    let files = (matches.value_of("file1").unwrap(), matches.value_of("file2").unwrap());
}

{'fraction_non_alphanumeric': 0.14674056479282133, 'fraction_numerical': 0.007653734494589602, 'mean_word_length': 1.509933774834437, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 29, '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': '7002934', 'n_tokens_mistral': 1152, 'n_tokens_neox': 1098, 'n_words': 242}