<commit_before>#include <compress.hpp>
#include <range.hpp>

#include <vector>
#include <iostream>

using iter::compress;
using iter::range;

template <typename DataType, typename SelectorType>
void testcase(std::vector<DataType> data_vec,
        std::vector<SelectorType> sel_vec)
{

    for (auto e : compress(data_vec, sel_vec)) {
        std::cout << e << '\n';
    }
}

int main(void)
{
    std::vector<int> ivec{1, 2, 3, 4, 5, 6};
    std::vector<bool> bvec{true, false, true, false, true, false};
    std::cout << "Should print 1 3 5\n";
    testcase(ivec, bvec);

    std::vector<bool> bvec2{false, true, false, false, false, true};
    std::cout << "Should print 2 6\n";
    testcase(ivec, bvec2);

    std::vector<bool> bvec3{false, true};
    std::cout << "Should print 2\n";
    testcase(ivec, bvec3);

    std::cout << "Should print 0 2 4\n";
    for (auto i : compress(range(10), bvec)) {
        std::cout << i << '\n';
    }
    
    std::cout << "Should print 0 2 4\n";
    for (auto i : compress({0,1,2,3,4,5}, bvec)) {
        std::cout << i << '\n';
    }

    return 0;
}<commit_msg>Adds test for initlist with seletors<commit_after>#include <compress.hpp>
#include <range.hpp>

#include <vector>
#include <iostream>

using iter::compress;
using iter::range;

template <typename DataType, typename SelectorType>
void testcase(std::vector<DataType> data_vec,
        std::vector<SelectorType> sel_vec)
{

    for (auto e : compress(data_vec, sel_vec)) {
        std::cout << e << '\n';
    }
}

int main(void)
{
    std::vector<int> ivec{1, 2, 3, 4, 5, 6};
    std::vector<bool> bvec{true, false, true, false, true, false};
    std::cout << "Should print 1 3 5\n";
    testcase(ivec, bvec);

    std::vector<bool> bvec2{false, true, false, false, false, true};
    std::cout << "Should print 2 6\n";
    testcase(ivec, bvec2);

    std::vector<bool> bvec3{false, true};
    std::cout << "Should print 2\n";
    testcase(ivec, bvec3);

    std::cout << "Should print 0 2 4\n";
    for (auto i : compress(range(10), bvec)) {
        std::cout << i << '\n';
    }
    
    std::cout << "Should print 0 2 4\n";
    for (auto i : compress({0,1,2,3,4,5}, bvec)) {
        std::cout << i << '\n';
    }

    std::cout << "Should print 0 2 4\n";
    for (auto i : compress(range(10), {true, false, true, false, true})) {
        std::cout << i << '\n';
    }
        

    return 0;
}
{'fraction_non_alphanumeric': 0.1835627868168544, 'fraction_numerical': 0.027951606174384646, 'mean_word_length': 3.092150170648464, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 25, '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': '4083946', 'n_tokens_mistral': 939, 'n_tokens_neox': 884, 'n_words': 237}