<commit_before>/*
    Deference 1.0.0
    Copyright (c) 2013 <NAME>
    Released under the MIT license
    https://github.com/nbryan/deference
*/
(function() {
  var jQuery;
  if (typeof require !== 'undefined' && require !== null) {
    jQuery = require('jquery');
  } else {
    jQuery = this.jQuery;
  }

  jQuery.extend({
    parallel: function(items, fn) {
      return jQuery.Deferred(function(d) {
        var completed = 0;

        if (items.length > 0) {
          for (var i = 0; i < items.length; i++) {
            fn(items[i]).done(function() {
              completed++;
              d.notify(completed / items.length);
              if (completed == items.length) {
                d.resolve();
              }
            }).fail(function() {
              d.reject();
            });
          }
        } else {
          d.resolve();
        }

        return d.promise();
      });
    },

    serial: function(items, fn, i, d) {
      if (i == null) {
        i = 0;
      }
      if (d == null) {
        d = jQuery.Deferred();
      }

      if (items.length > 0) {
        if (items[i]) {
          fn(items[i]).done(function() {
            i++;
            d.notify(i / items.length);
            jQuery.serial(items, fn, i, d);
          }).fail(function() {
            d.reject();
          });
        }
      } else {<commit_msg>Actually resolve serial promises<commit_after>/*
    Deference 1.0.0
    Copyright (c) 2013 <NAME>
    Released under the MIT license
    https://github.com/nbryan/deference
*/
(function() {
  var jQuery;
  if (typeof require !== 'undefined' && require !== null) {
    jQuery = require('jquery');
  } else {
    jQuery = this.jQuery;
  }

  jQuery.extend({
    parallel: function(items, fn) {
      return jQuery.Deferred(function(d) {
        var completed = 0;

        if (items.length > 0) {
          for (var i = 0; i < items.length; i++) {
            fn(items[i]).done(function() {
              completed++;
              d.notify(completed / items.length);
              if (completed == items.length) {
                d.resolve();
              }
            }).fail(function() {
              d.reject();
            });
          }
        } else {
          d.resolve();
        }

        return d.promise();
      });
    },

    serial: function(items, fn, i, d) {
      if (i == null) {
        i = 0;
      }
      if (d == null) {
        d = jQuery.Deferred();
      }

      if (items.length > 0) {
        if (items[i]) {
          fn(items[i]).done(function() {
            i++;
            d.notify(i / items.length);
            if (i == items.length) {
              d.resolve()
            } else {
              jQuery.serial(items, fn, i, d);
            }
          }).fail(function() {
            d.reject();
          });
        }
      } else {
{'fraction_non_alphanumeric': 0.1568765388673936, 'fraction_numerical': 0.008441786844882167, 'mean_word_length': 1.3349753694581281, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '3456206', 'n_tokens_mistral': 880, 'n_tokens_neox': 840, 'n_words': 190}