<commit_before>//
// Created by <NAME> on 02/11/2017.
//

#include "Database.h"

int main(){

    Database obj("localhost", 6379);

    auto userId1 = obj.addUser("gabolaev");
    auto userId2 = obj.addUser("durov");
    auto userId3 = obj.addUser("buryak");
    auto userId4 = obj.addUser("vitalya");
    auto groupId1 = obj.addGroup(Chapp::GroupType::Public, "raggamote", "asldkn");
    auto groupId11 = obj.addGroup(Chapp::GroupType::Public, "alksmda", "wjaknd");
    auto groupId2 = obj.addGroup(Chapp::GroupType::Private, "1l2km3", "alksmd");
    auto groupId22 = obj.addGroup(Chapp::GroupType::Private, "telegram", "1joi23");
    auto groupId3 = obj.addGroup(Chapp::GroupType::Protected, "buros_developement", "op123k");
    auto groupId33 = obj.addGroup(Chapp::GroupType::Protected, "l21lkm3123", "ap9skd");
    std::map<int, std::pair<std::string, Chapp::GroupType>> groups = obj.getListOfGroups();
    for_each(groups.begin(), groups.end(), [](auto _group){
        std::cout << _group.first << " = " << _group.second.first << " = "  << std::endl;
    });
    obj.deleteGroup(PRIVATE, groupId3);
    obj.addUserToGroup(userId1, groupId1);
    obj.addUserToGroup(userId2, groupId2);<commit_msg>.h -> .hpp<commit_after>//
// Created by <NAME> on 02/11/2017.
//

#include "Database.hpp"

int main(){

    Database obj("localhost", 6379);

    auto userId1 = obj.addUser("gabolaev");
    auto userId2 = obj.addUser("durov");
    auto userId3 = obj.addUser("buryak");
    auto userId4 = obj.addUser("vitalya");
    auto groupId1 = obj.addGroup(Chapp::GroupType::Public, "raggamote", "asldkn");
    auto groupId11 = obj.addGroup(Chapp::GroupType::Public, "alksmda", "wjaknd");
    auto groupId2 = obj.addGroup(Chapp::GroupType::Private, "1l2km3", "alksmd");
    auto groupId22 = obj.addGroup(Chapp::GroupType::Private, "telegram", "1joi23");
    auto groupId3 = obj.addGroup(Chapp::GroupType::Protected, "buros_developement", "op123k");
    auto groupId33 = obj.addGroup(Chapp::GroupType::Protected, "l21lkm3123", "ap9skd");
    std::map<int, std::pair<std::string, Chapp::GroupType>> groups = obj.getListOfGroups();
    for_each(groups.begin(), groups.end(), [](auto _group){
        std::cout << _group.first << " = " << _group.second.first << " = "  << std::endl;
    });
    obj.deleteGroup(PRIVATE, groupId3);
    obj.addUserToGroup(userId1, groupId1);
    obj.addUserToGroup(userId2, groupId2);
{'fraction_non_alphanumeric': 0.18476903870162298, 'fraction_numerical': 0.03828547648772368, 'mean_word_length': 4.696682464454977, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 10, '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': '4838587', 'n_tokens_mistral': 906, 'n_tokens_neox': 881, 'n_words': 148}