<commit_before>// Copyright 2015, EMC, Inc.

"use strict";

var http = require('http'),
    fs = require('fs'),
    path = require('path'),
    childProcess = require('child_process'),
    exec = childProcess.exec,
    server = '<%=server%>',
    port = '<%=port%>',
    tasksPath = '/api/current/tasks/<%=identifier%>',
    MAX_BUFFER = 1000 * 1024,
    MAX_RETRY_TIMEOUT = 60 * 1000;
/**
 * Synchronous each loop from caolan/async.
 * @private
 * @param arr
 * @param iterator
 * @param callback
 * @returns {*|Function}
 */
function eachSeries(arr, iterator, callback) {
    callback = callback || function () {};

    if (!arr.length) {
        return callback();
    }

    var completed = 0,
        iterate = function () {
            iterator(arr[completed], function (err) {
                if (err) {
                    callback(err);
                    callback = function () {};
                } else {
                    completed += 1;
                    if (completed >= arr.length) {<commit_msg>Increase the buffer size of child process in bootstrap.js<commit_after>// Copyright 2015, EMC, Inc.

"use strict";

var http = require('http'),
    fs = require('fs'),
    path = require('path'),
    childProcess = require('child_process'),
    exec = childProcess.exec,
    server = '<%=server%>',
    port = '<%=port%>',
    tasksPath = '/api/current/tasks/<%=identifier%>',
    // Set the buffer size to ~5MB to accept all output in flashing bios
    // Otherwise the process will be killed if exceeds the buffer size
    MAX_BUFFER = 5000 * 1024,
    MAX_RETRY_TIMEOUT = 60 * 1000;
/**
 * Synchronous each loop from caolan/async.
 * @private
 * @param arr
 * @param iterator
 * @param callback
 * @returns {*|Function}
 */
function eachSeries(arr, iterator, callback) {
    callback = callback || function () {};

    if (!arr.length) {
        return callback();
    }

    var completed = 0,
        iterate = function () {
            iterator(arr[completed], function (err) {
                if (err) {
                    callback(err);
                    callback = function () {};
                } else {
                    completed += 1;
                    if (completed >= arr.length) {
{'fraction_non_alphanumeric': 0.14234234234234233, 'fraction_numerical': 0.018468468468468467, 'mean_word_length': 2.128169014084507, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '3597580', 'n_tokens_mistral': 673, 'n_tokens_neox': 607, 'n_words': 180}