<commit_before>//=====================================================================
//  iSpectraSampler
//=====================================================================
//
//    Copyright @ 2012 <NAME> & <NAME>
//    <EMAIL>
//    <EMAIL>
//
//        Date: 03/2012
// Version info written in the main function.
//=====================================================================

#include <stdlib.h>
#include <iostream>
#include <string>

#include "data_struct.h"
#include "iSS.h"
#include "arsenal.h"

using namespace std;

int main(int argc, char** argv) {
    cout << endl
         << "                  iSpectraSampler                " << endl
         << endl
         << "  Ver 2.0.0.0  ---- <NAME> & <NAME>, 04/2012 " << endl;
    cout << endl << "**********************************************************"
         << endl;
    display_logo(3);  // Hail to the king~
    cout << endl << "**********************************************************"
         << endl << endl;

    const string table_path = "iSS_tables";
    const string particle_table_path = "iSS_tables";

    string path = "results";
    string input_file = "iSS_parameters.dat";
    if (argc > 1)
        input_file = argv[1];
    cout << "input file : " << input_file << endl;
    if (argc > 2)
        path = argv[2];
    cout << "work folder path : " << path << endl;

    iSS iSsampler(path, table_path, particle_table_path, input_file);
    // read in parameters
    iSsampler.paraRdr_ptr->readFromArguments(argc, argv);
    iSsampler.paraRdr_ptr->echo();

    int status = iSsampler.shell();
    if (status == 0) {
        cout << "Program executed normally." << endl;
    }
    return(0);
}<commit_msg>better implementation of the fixed arguments from command line<commit_after>//=====================================================================
//  iSpectraSampler
//=====================================================================
//
//    Copyright @ 2012 <NAME> & <NAME>
//    <EMAIL>
//    <EMAIL>
//
//        Date: 03/2012
// Version info written in the main function.
//=====================================================================

#include <stdlib.h>
#include <iostream>
#include <string>

#include "data_struct.h"
#include "iSS.h"
#include "arsenal.h"

using namespace std;

int main(int argc, char** argv) {
    cout << endl
         << "                  iSpectraSampler                " << endl
         << endl
         << "  Ver 2.0.0.0  ---- <NAME> & <NAME>, 04/2012 " << endl;
    cout << endl << "**********************************************************"
         << endl;
    display_logo(3);  // Hail to the king~
    cout << endl << "**********************************************************"
         << endl << endl;

    const string table_path = "iSS_tables";
    const string particle_table_path = "iSS_tables";

    string path = "results";
    string input_file = "iSS_parameters.dat";
    string surface_filename = "surface.dat";
    if (argc > 1) {
        std::string s1 = argv[1];
        if (s1.find("=") == std::string::npos)
            input_file = s1;
    }
    cout << "input file : " << input_file << endl;
    if (argc > 2) {
        std::string s1 = argv[2];
        if (s1.find("=") == std::string::npos)
            path = s1;
    }
    cout << "work folder path : " << path << endl;
    if (argc > 3) {
        std::string s1 = argv[3];
        if (s1.find("=") == std::string::npos)
            surface_filename = s1;
    }
    cout << "surface filename : " << surface_filename << endl;

    iSS iSsampler(path, table_path, particle_table_path, input_file);
    // read in parameters
    iSsampler.paraRdr_ptr->readFromArguments(argc, argv);
    iSsampler.paraRdr_ptr->echo();

    int status = iSsampler.shell();
    if (status == 0) {
        cout << "Program executed normally." << endl;
    }
    return(0);
}
{'fraction_non_alphanumeric': 0.3005929363237948, 'fraction_numerical': 0.016756896107244134, 'mean_word_length': 2.7890625, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '5122494', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1118, 'n_words': 275}