<commit_before>#include "include/parser.hh"
#include <iostream>
#include <fstream>


template <class T, class U>
std::ostream& operator << ( std::ostream& o, const std::map<T, U> &m)
{
    for (auto &e : m)
    {
        o << e.first << ":\n" << e.second << std::endl;
    }
    return o;
}

template <class T>
std::ostream& operator << (std::ostream& o, const std::vector<T> &v)
{
    for (auto &entry : v)
    {
        o << entry << "   ";
    }
    return o;
}

int main(int argc, char const *argv[])
{

    optionparser::parser p("A test to make sure that this option parser works");


    p.add_option("--now", "-n") .help("NOWWWW");


    p.add_option("-file")   .help("pass a list of files to load.")
                            .mode(optionparser::store_mult_values)
                            .required(true)
                            .default_value("default_file.txt");

    p.add_option("-save", "-s") .help("pass a file to save.")
                                .mode(optionparser::store_value)
                                // .required(true)
                                .default_value("default.txt");
    
    p.eat_arguments(argc, argv);

    // std::cout << "retrieved value for 2 * save is " << 2*lrn << std::endl;

    if (p.get_value("file"))
    {
        auto names = p.get_value<std::vector<std::string>>("file");

        std::cout << "Filenames" << std::endl;

        for (int i = 0; i < names.size(); ++i)
        {
            std::cout << "element " << i << ": " << names[i] << std::endl;
        }

        // std::cout << names << std::endl;
    }

    if (p.get_value("save"))
    {
        auto names = p.get_value<std::vector<std::string>>("save");

        std::cout << "Savenames" << std::endl;

        for (int i = 0; i < names.size(); ++i)
        {
            std::cout << "element " << i << ": " << names[i] << std::endl;
        }
    }
    


    return 0;
}<commit_msg>cleanup<commit_after>#include "include/parser.hh"
#include <iostream>
#include <fstream>

template <class T, class U>
std::ostream& operator << ( std::ostream& o, const std::map<T, U> &m)
{
    for (auto &e : m)
    {
        o << e.first << ":\n" << e.second << std::endl;
    }
    return o;
}

template <class T>
std::ostream& operator << (std::ostream& o, const std::vector<T> &v)
{
    for (auto &entry : v)
    {
        o << entry << "   ";
    }
    return o;
}

int main(int argc, char const *argv[])
{

    optionparser::parser p("A test to make sure that this option parser works");


    p.add_option("--now", "-n") .help("NOWWWW");


    p.add_option("-file")   .help("pass a list of files to load.")
                            .mode(optionparser::store_mult_values)
                            .required(true)
                            .default_value("default_file.txt");

    p.add_option("-save", "-s") .help("pass a file to save.")
                                .mode(optionparser::store_value)
                                // .required(true)
                                .default_value("default.txt");
    
    p.eat_arguments(argc, argv);

    if (p.get_value("file"))
    {
        auto names = p.get_value<std::vector<std::string>>("file");

        std::cout << "Filenames" << std::endl;

        for (int i = 0; i < names.size(); ++i)
        {
            std::cout << "element " << i << ": " << names[i] << std::endl;
        }

    }

    if (p.get_value("save"))
    {
        auto names = p.get_value<std::vector<std::string>>("save");

        std::cout << "Savenames" << std::endl;

        for (int i = 0; i < names.size(); ++i)
        {
            std::cout << "element " << i << ": " << names[i] << std::endl;
        }
    }
    return 0;
}
{'fraction_non_alphanumeric': 0.18647264888170303, 'fraction_numerical': 0.002155753166262463, 'mean_word_length': 1.8357524828113063, 'pattern_counts': {'":': 6, '<': 125, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2428364', 'n_tokens_mistral': 1244, 'n_tokens_neox': 1201, 'n_words': 278}