<commit_before>#ifndef CZOUT_h
#define CZOUT_h


#include <mutex>
#include <string>
#include <iostream> //cout, cerr, cin


#define RESET   "\033[0m"
#define BOLD    "\033[1m"
#define BLACK   "\033[30m"
#define RED     "\033[31m"
#define GREEN   "\033[32m"
#define YELLOW  "\033[33m"
#define BLUE    "\033[34m"
#define MAGENTA "\033[35m"
#define CYAN    "\033[36m"
#define WHITE   "\033[37m"

#define BGBLACK   "\033[40m"
#define BGRED     "\033[41m"
#define BGGREEN   "\033[42m"
#define BGBROWN   "\033[43m"
#define BGBLUE    "\033[44m"
#define BGMAGENTA "\033[45m"
#define BGCYAN    "\033[46m"
#define BGWHITE   "\033[47m"

#define COLRESET "\033[0m"
#define endlr "\033[0m\r\n"
#define WARNING "\033[1m\033[31mWARNING:\033[0m "

/**
* Interface structure that can be used for printing with mutex locks so that one can make sure entire strings are 
* printed without streams intertwining instead of just the characters as in 'cout'.
*/

struct czout_printer {
    std::mutex mutex;

    /**
    * Prints a complete uninterruptable string without line ending
    */
    void print(std::string str){
        std::lock_guard<std::mutex> guard(mutex);
        std::cout << str;
    }

	/**
	* Prints a complete uninterruptable string with line ending
	*/
    void println(std::string str, int verbosity){
        std::lock_guard<std::mutex> guard(mutex);
        if (verbosity<=verbose){
	        std::cout << str << std::endl;
	    }
    }

    int verbose=1;
};


/*! 
 * \brief czout
 *
 * Interface for clean verbose printing, need a printer to make this work, see czout_printer
 * \author <NAME>
 *<commit_msg>minor update<commit_after>#ifndef CZOUT_h
#define CZOUT_h


#include <mutex>
#include <string>
#include <iostream> //cout, cerr, cin


#define RESET   "\033[0m"
#define BOLD    "\033[1m"
#define BLACK   "\033[30m"
#define RED     "\033[31m"
#define GREEN   "\033[32m"
#define YELLOW  "\033[33m"
#define BLUE    "\033[34m"
#define MAGENTA "\033[35m"
#define CYAN    "\033[36m"
#define WHITE   "\033[37m"

#define BGBLACK   "\033[40m"
#define BGRED     "\033[41m"
#define BGGREEN   "\033[42m"
#define BGBROWN   "\033[43m"
#define BGBLUE    "\033[44m"
#define BGMAGENTA "\033[45m"
#define BGCYAN    "\033[46m"
#define BGWHITE   "\033[47m"

#define COLRESET "\033[0m"
#define endlr "\033[0m\r\n"
#define WARNING "\033[1m\033[31mWARNING:\033[0m "

/**
* Interface structure that can be used for printing with mutex locks so that one can make sure entire strings are 
* printed without streams intertwining instead of just the characters as in 'cout'.
*/

struct czout_printer {
    std::mutex mutex;

    /**
    * Prints a complete uninterruptable string without line ending
    */
    void print(std::string str){
        std::lock_guard<std::mutex> guard(mutex);
        std::cout << str;
    }

	/**
	* Prints a complete uninterruptable string with line ending
	*/
    void println(std::string str, int verbosity){
        std::lock_guard<std::mutex> guard(mutex);
        if (verbosity<=verbose){
	        std::cout << str << std::endl;
	    }
    }

    int verbose=0;
};


/*! 
 * \brief czout
 *
 * Interface for clean verbose printing, need a printer to make this work, see czout_printer
 * \author <NAME>
 *
{'fraction_non_alphanumeric': 0.13953488372093023, 'fraction_numerical': 0.06821705426356589, 'mean_word_length': 3.3128342245989306, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 15, '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': '6654501', 'n_tokens_mistral': 1323, 'n_tokens_neox': 1153, 'n_words': 335}