<commit_before>#include "header.h"
#include <opencv2/opencv.hpp>
#include <fstream>
#include <assert.h>
#include "iotools.h"
// For mkdir
#include <sys/types.h>
#include <sys/stat.h>

using namespace std;
using namespace cv;

int main(int argc, char** argv){
    double t[2]; // timing
    t[0] = get_wall_time(); // Start Time
    if (argc < 1){
        cout << "Usage: compress_feat [base_updatepath feature_dim normalize_features master_file]" << std::endl;
        return -1;
    }

    // hardcoded default value. Maybe read that from JSON conf
    int feature_dim = 4096;
    int norm = true;
    if (argc>2)
        base_updatepath = argv[2];
    if (argc>3)
        feature_dim = atoi(argv[3]);
    if (argc>4)
        norm = atoi(argv[4]);
    if (argc>5)
        update_files_listname = argv[5];
    set_paths();

    string str_norm = "";
    if (norm)<commit_msg>compress<commit_after>#include "header.h"
#include <opencv2/opencv.hpp>
#include <fstream>
#include <assert.h>
#include "iotools.h"
// For mkdir
#include <sys/types.h>
#include <sys/stat.h>

using namespace std;
using namespace cv;

int main(int argc, char** argv){
    double t[2]; // timing
    t[0] = get_wall_time(); // Start Time
    if (argc < 1){
        cout << "Usage: compress_feat [base_updatepath feature_dim normalize_features master_file]" << std::endl;
        return -1;
    }

    // hardcoded default value. Maybe read that from JSON conf
    int feature_dim = 4096;
    int norm = true;
    if (argc>2)
        base_updatepath = argv[2];
    if (argc>3)
        feature_dim = atoi(argv[3]);
    if (argc>4)
        norm = atoi(argv[4]);
    if (argc>5)
        update_files_listname = std::string(argv[5]);
    set_paths();

    string str_norm = "";
    if (norm)
{'fraction_non_alphanumeric': 0.1422070534698521, 'fraction_numerical': 0.019340159271899887, 'mean_word_length': 2.883002207505519, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 21, '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': '3094807', 'n_tokens_mistral': 633, 'n_tokens_neox': 623, 'n_words': 165}