<commit_before>'use strict';

var http = require('http');

var DEFAULT_HOST = 'localhost';
var DEFAULT_PORT = 38080;

var OlegDB = function (host, port, database) {
    this.host = host || DEFAULT_HOST;
    this.port = port || DEFAULT_PORT;
    this.database = database || '';

    this.create = function (key, value) {
        var options = {
            hostname: this.host,
            port: this.port,
            path: '/' + this.database + '/' + key,
            method: 'POST',
            headers: {}
        };

        var req = http.request(options, function (res) {
            res.setEncoding('utf8');

            res.on('data', function (chunk) {
                console.log('BODY: ' + chunk);
            });
        });

        req.write(value);

        req.end();
    };

    this.read = function (key) {
        var options = {
            hostname: this.host,
            port: this.port,
            path: '/' + this.database + '/' + key,
            method: 'GET',
            headers: {}
        };

        var req = http.request(options, function (res) {
            res.setEncoding('utf8');

            res.on('data', function (chunk) {
                console.log('BODY: ' + chunk);
            });
        });

        req.end();
    };

    this.update = function (key, value) {
        var options = {
            hostname: this.host,
            port: this.port,
            path: '/' + this.database + '/' + key,
            method: 'POST',
            headers: {}
        };

        var req = http.request(options, function (res) {
            res.setEncoding('utf8');

            res.on('data', function (chunk) {
                console.log('BODY: ' + chunk);
            });
        });

        req.write(value);

        req.end();
    };

    this.delete = function (key) {
        var options = {
            hostname: this.host,
            port: this.port,
            path: '/' + this.database + '/' + key,
            method: 'DELETE',
            headers: {}
        };

        var req = http.request(options, function (res) {
            res.setEncoding('utf8');

            res.on('data', function (chunk) {
                console.log('BODY: ' + chunk);
            });
        });

        req.end();
    };

    this.info = function (key) {
        var options = {
            hostname: this.host,
            port: this.port,
            path: '/' + this.database + '/' + key,
            method: 'HEAD',
            headers: {}
        };

        var req = http.request(options, function (res) {
            res.setEncoding('utf8');

            res.on('data', function (chunk) {
                console.log('BODY: ' + chunk);
            });
        });

        req.end();
    };
};

module.exports = OlegDB;<commit_msg>Remove useless output<commit_after>'use strict';

var http = require('http');

var DEFAULT_HOST = 'localhost';
var DEFAULT_PORT = 38080;

var OlegDB = function (host, port, database) {
    this.host = host || DEFAULT_HOST;
    this.port = port || DEFAULT_PORT;
    this.database = database || '';

    this.create = function (key, value) {
        var options = {
            hostname: this.host,
            port: this.port,
            path: '/' + this.database + '/' + key,
            method: 'POST',
            headers: {}
        };

        var req = http.request(options, function (res) {
            res.setEncoding('utf8');

            res.on('data', function (chunk) {
                console.log(chunk);
            });
        });

        req.write(value);

        req.end();
    };

    this.read = function (key) {
        var options = {
            hostname: this.host,
            port: this.port,
            path: '/' + this.database + '/' + key,
            method: 'GET',
            headers: {}
        };

        var req = http.request(options, function (res) {
            res.setEncoding('utf8');

            res.on('data', function (chunk) {
                console.log(chunk);
            });
        });

        req.end();
    };

    this.update = function (key, value) {
        var options = {
            hostname: this.host,
            port: this.port,
            path: '/' + this.database + '/' + key,
            method: 'POST',
            headers: {}
        };

        var req = http.request(options, function (res) {
            res.setEncoding('utf8');

            res.on('data', function (chunk) {
                console.log(chunk);
            });
        });

        req.write(value);

        req.end();
    };

    this.delete = function (key) {
        var options = {
            hostname: this.host,
            port: this.port,
            path: '/' + this.database + '/' + key,
            method: 'DELETE',
            headers: {}
        };

        var req = http.request(options, function (res) {
            res.setEncoding('utf8');

            res.on('data', function (chunk) {
                console.log(chunk);
            });
        });

        req.end();
    };

    this.info = function (key) {
        var options = {
            hostname: this.host,
            port: this.port,
            path: '/' + this.database + '/' + key,
            method: 'HEAD',
            headers: {}
        };

        var req = http.request(options, function (res) {
            res.setEncoding('utf8');

            res.on('data', function (chunk) {
                console.log(chunk);
            });
        });

        req.end();
    };
};

module.exports = OlegDB;
{'fraction_non_alphanumeric': 0.15261917708899764, 'fraction_numerical': 0.0036251586006887803, 'mean_word_length': 1.3322062552831784, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2040851', 'n_tokens_mistral': 1605, 'n_tokens_neox': 1536, 'n_words': 328}