<commit_before>#include <algorithm>
#include <fstream>
#include <iostream>
#include <vector>

namespace {
void print_result(std::string path, const std::vector<std::string>& names) {
    std::ofstream ofs(path);
    ofs << "Total of " << names.size() << " names" << std::endl;
    ofs << "-----------------" << std::endl;
    for (auto it = names.begin(); it != names.end(); it++) {
        ofs << *it << std::endl;
    }
}
}  // namespace

int main() {
    std::vector<std::string> names;

    std::string line;
    while (std::getline(std::cin, line)) {
        names.push_back(line);
    }
    std::sort(names.begin(), names.end());
    print_result("result", names);

    return 0;
}<commit_msg>close忘れ<commit_after>#include <algorithm>
#include <fstream>
#include <iostream>
#include <vector>

namespace {
void print_result(std::string path, const std::vector<std::string>& names) {
    std::ofstream ofs(path);
    ofs << "Total of " << names.size() << " names" << std::endl;
    ofs << "-----------------" << std::endl;
    for (auto it = names.begin(); it != names.end(); it++) {
        ofs << *it << std::endl;
    }
    ofs.close();
}
}  // namespace

int main() {
    std::vector<std::string> names;

    std::string line;
    while (std::getline(std::cin, line)) {
        names.push_back(line);
    }
    std::sort(names.begin(), names.end());
    print_result("result", names);

    return 0;
}
{'fraction_non_alphanumeric': 0.22285308729595457, 'fraction_numerical': 0.0014194464158978, 'mean_word_length': 3.0869565217391304, 'pattern_counts': {'":': 0, '<': 47, '<?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': '7340015', 'n_tokens_mistral': 482, 'n_tokens_neox': 468, 'n_words': 105}