<commit_before>;(function($, window) {
  function getCellValue(cell) {
    return (+ $(cell).data("value"));
  }

  function getCellLabel(header, x, y) {
    return header + " " + x + " <strong>" + y + "</strong>";
  }

  function tabulate(table) {
    var $table = $(table);

    // Use the first row as column headers
    var headers = $table.find('thead th').map(function() {
      return $(this).text();
    });

    // Initialize a list of data for each column except the first
    var data = headers.slice(1).toArray().map(function() {
      return [];
    });

    $table.find('tbody > tr').each(function(_, row) {
      // Take the first cell as the x value
      var x = getCellValue($(row).children().eq(0));

      // Append the remaining cells to their column data
      $(row).children().slice(1).each(function(index, cell) {
        var y = getCellValue(cell);
        data[index].push({
          x: x,
          y: y,
          label: getCellLabel(headers[index], x, y)
        });
      });
    });

    return data;
  }

  /**
   * The jQuery.tabulate plugin.
   *
   * @param {object} options
   *    An object containing default option overrides.
   *
   * @return {object}
   *    A list of datasets retrieved from the tables.
   */
  $.fn.tabulate = function(options) {
    return this.map(function(i, table) {
      return tabulate(table);
    });
  };
})(jQuery, window);
<commit_msg>add series name as a property in tabbouleh<commit_after>;(function($, window) {
  function getCellValue(cell) {
    return (+ $(cell).data("value"));
  }

  function getCellLabel(header, x, y) {
    return header + " " + x + " <strong>" + y + "</strong>";
  }

  function tabulate(table) {
    var $table = $(table);

    // Use the first row as column headers
    var headers = $table.find('thead th').map(function() {
      return $(this).text();
    });

    // Initialize a list of data for each column except the first
    var data = headers.slice(1).toArray().map(function() {
      return [];
    });

    $table.find('tbody > tr').each(function(_, row) {
      // Take the first cell as the x value
      var x = getCellValue($(row).children().eq(0));

      // Append the remaining cells to their column data
      $(row).children().slice(1).each(function(index, cell) {
        var y = getCellValue(cell);
        data[index].push({
          x: x,
          y: y,
          series: headers[index + 1],
          label: getCellLabel(headers[index + 1], x, y)
        });
      });
    });

    return data;
  }

  /**
   * The jQuery.tabulate plugin.
   *
   * @param {object} options
   *    An object containing default option overrides.
   *
   * @return {object}
   *    A list of datasets retrieved from the tables.
   */
  $.fn.tabulate = function(options) {
    return this.map(function(i, table) {
      return tabulate(table);
    });
  };
})(jQuery, window);

{'fraction_non_alphanumeric': 0.1593349497748528, 'fraction_numerical': 0.0027710426047800486, 'mean_word_length': 2.3817330210772836, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '3305735', 'n_tokens_mistral': 904, 'n_tokens_neox': 881, 'n_words': 247}