<commit_before>var cradle = require('cradle');

module.exports = {
    dbname: 'test2',
    dburl: 'http://localhost',
    dbport: 5984,
    dbsettings: {cache: true, raw: false},
    get_database: function() {
        var connection = new(cradle.Connection)(this.dburl, this.dbport);
        var database = connection.database(this.dbname);
        database.exists(function(err, value){
            if(!value && !err) { database.create(); }
        });
        return database;
    },
}<commit_msg>Add database autentication.<commit_after>var cradle = require('cradle');

module.exports = {
    dbname: 'test2',
    dburl: 'http://localhost',
    dbport: 5984,
    dbsettings: {cache: true, raw: false,
        auth: { username: 'admin', password: '<PASSWORD>' }},
    get_database: function() {
        var connection = new(cradle.Connection)(this.dburl, this.dbport, this.dbsettings);
        var database = connection.database(this.dbname);
        database.exists(function(err, value){
            if(!value && !err) { database.create(); }
        });
        return database;
    },
}
{'fraction_non_alphanumeric': 0.1559633027522936, 'fraction_numerical': 0.009174311926605505, 'mean_word_length': 2.910394265232975, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '3541651', 'n_tokens_mistral': 340, 'n_tokens_neox': 330, 'n_words': 70}