<commit_before>"use strict";

var fs = require('fs');
var path = require('path');
var url = require('url');
var EE = require('events').EventEmitter;
var util = require('util');

var logger = require('./logger');

function setprops(dest, src) {
    for (var k in src) {
        dest[k] = src[k];
    }
}

function make_parent_directories(filename, _) {
    var dir = path.dirname(filename);
    try {
        fs.mkdir(dir, _);
    } catch (e) {
        if (e.code === 'ENOENT') {
            make_parent_directories(dir, _);
            try {
                fs.mkdir(dir, _);
            } catch (e) {
                if (e.code == 'EEXIST') {
                    return; // We might get an async race here so this is needed
                } else {
                    throw e;
                }
            }
        } else if (e.code == 'EEXIST') {
            return;<commit_msg>Remember to return the object from setprops, fixes server.<commit_after>"use strict";

var fs = require('fs');
var path = require('path');
var url = require('url');
var EE = require('events').EventEmitter;
var util = require('util');

var logger = require('./logger');

function setprops(dest, src) {
    for (var k in src) {
        dest[k] = src[k];
    }
    return dest;
}

function make_parent_directories(filename, _) {
    var dir = path.dirname(filename);
    try {
        fs.mkdir(dir, _);
    } catch (e) {
        if (e.code === 'ENOENT') {
            make_parent_directories(dir, _);
            try {
                fs.mkdir(dir, _);
            } catch (e) {
                if (e.code == 'EEXIST') {
                    return; // We might get an async race here so this is needed
                } else {
                    throw e;
                }
            }
        } else if (e.code == 'EEXIST') {
            return;
{'fraction_non_alphanumeric': 0.14168490153172866, 'fraction_numerical': 0.0, 'mean_word_length': 1.6661807580174928, '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': '2303756', 'n_tokens_mistral': 562, 'n_tokens_neox': 542, 'n_words': 149}