<commit_before>#include <string>
#include <fstream>
#include <vector>
#include <cstdlib>
#include <ctime>

class Database_Creator {
public:
	std::ofstream file;
	Database_Creator(size_t n_people) : file("F:\\1\\database.txt") {
		clearOutputFile();
		fillNames();
		fillSurnames();
		srand(time(0));
		for (size_t i = 0; i < n_people; i++) {
			file << surnames[rand() % surnames.size()] << " "
				<< names[rand() % names.size()] << " "
				<< 1934 + rand() % 80;
			if (i != n_people - 1) {
				file << std::endl;
			}
			else {
				//file << "!";
			}
		}
		file.close();
	}
private:
	void clearOutputFile() {
		std::ofstream file("F:\\1\\database.txt");
		file.close();
	}
	void fillNames() {
		std::ifstream names_file("F:\\1\\names.txt");
		std::string string;
		while (!names_file.eof()) {
			names_file >> string;
			names.push_back(string);
		}
		names_file.close();
	}
	void fillSurnames() {
		std::ifstream surnames_file("F:\\1\\surnames.txt");
		std::string string;
		while (!surnames_file.eof()) {
			surnames_file >> string;
			surnames.push_back(string);
		}
		surnames_file.close();
	}
	std::vector<std::string> names;
	std::vector<std::string> surnames;
};<commit_msg>Update Database_Creator.hpp<commit_after>#include <string>
#include <fstream>
#include <vector>
#include <cstdlib>
#include <ctime>

class Database_Creator {
public:
	std::ofstream file;
	Database_Creator(std::string file_name, std::string _names_file_name, std::string _surnames_file_name, size_t n_people)
		: file(file_name),
		names_file_name(_names_file_name),
		surnames_file_name(_surnames_file_name)
		{
		clearOutputFile();
		fillNames();
		fillSurnames();
		srand(time(0));
		for (size_t i = 0; i < n_people; i++) {
			file << surnames[rand() % surnames.size()] << " "
				<< names[rand() % names.size()] << " "
				<< 1934 + rand() % 80;
			if (i != n_people - 1) {
				file << std::endl;
			}
			else {
				//file << "!";
			}
		}
		file.close();
	}
private:
	void clearOutputFile() {
		std::ofstream file("F:\\1\\database.txt");
		file.close();
	}
	void fillNames() {
		std::ifstream names_file(names_file_name);
		std::string string;
		while (!names_file.eof()) {
			names_file >> string;
			names.push_back(string);
		}
		names_file.close();
	}
	void fillSurnames() {
		std::ifstream surnames_file(surnames_file_name);
		std::string string;
		while (!surnames_file.eof()) {
			surnames_file >> string;
			surnames.push_back(string);
		}
		surnames_file.close();
	}
	std::string names_file_name;
	std::string surnames_file_name;
	std::vector<std::string> names;
	std::vector<std::string> surnames;
};
{'fraction_non_alphanumeric': 0.1831473643709119, 'fraction_numerical': 0.008849557522123894, 'mean_word_length': 4.138339920948616, 'pattern_counts': {'":': 0, '<': 47, '<?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': '4983653', 'n_tokens_mistral': 1120, 'n_tokens_neox': 1010, 'n_words': 173}