<commit_before>'use-strict';
var http = require('http');
var MongoClient = require('mongodb').MongoClient;
var assert = require('assert');
// var argv = require('minimist')(process.argv.slice(2));
var port = 8888;

MongoClient.connect('mongodb://127.0.0.1:27017/github-downloads', function(err, db) {
    assert.equal(null, err);

    db.collection('downloads').find({}).toArray(function(err, result) {
        assert.equal(null, err);
        assert.equal(true, result);

        console.log(result);

        db.close();
    });
});

// function serverResponse(request, response) {
//     response.writeHead(200, {"Content-Type": "text/plain"});
//     response.write('Hello, World!');
//     response.end();
// }

// http.createServer(serverResponse).listen(port, function() {
//     console.log('Server listening on: http://localhost:', port);
// });

<commit_msg>updated find to array assertion<commit_after>'use-strict';
var http = require('http');
var MongoClient = require('mongodb').MongoClient;
var assert = require('assert');
// var argv = require('minimist')(process.argv.slice(2));
var port = 8888;

MongoClient.connect('mongodb://127.0.0.1:27017/github-downloads', function(err, db) {
    assert.equal(null, err);

    db.collection('downloads').find({}).toArray(function(err, result) {
        assert.equal(null, err);
        assert.ok(result.length);

        console.log(result);

        db.close();
    });
});

// function serverResponse(request, response) {
//     response.writeHead(200, {"Content-Type": "text/plain"});
//     response.write('Hello, World!');
//     response.end();
// }

// http.createServer(serverResponse).listen(port, function() {
//     console.log('Server listening on: http://localhost:', port);
// });


{'fraction_non_alphanumeric': 0.2009132420091324, 'fraction_numerical': 0.021689497716894976, 'mean_word_length': 3.7506775067750677, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4531465', 'n_tokens_mistral': 578, 'n_tokens_neox': 541, 'n_words': 93}