<commit_before>define(function () {
  return function (length, type) {
    var output = {};

    switch (type) {
      case "grid":
        output.rows = Math.ceil(Math.sqrt(length));
        output.columns = output.rows;
        break;

      case "columns":
        output.rows = 1;
        output.columns = length;
        break;

      default:
        output.rows = length;
        output.columns = 1;
        break;
    }

    return output;
  };
});<commit_msg>fixing format options to deal better with grid layout<commit_after>define(function () {
  return function (length, type) {
    var output = {};

    switch (type) {
      case "grid":
        output.rows = Math.round(Math.sqrt(length));
        output.columns = Math.ceil(Math.sqrt(length));
        break;

      case "columns":
        output.rows = 1;
        output.columns = length;
        break;

      default:
        output.rows = length;
        output.columns = 1;
        break;
    }

    return output;
  };
});
{'fraction_non_alphanumeric': 0.12575452716297786, 'fraction_numerical': 0.004024144869215292, 'mean_word_length': 1.8757225433526012, 'pattern_counts': {'":': 4, '<': 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': '3296353', 'n_tokens_mistral': 298, 'n_tokens_neox': 285, 'n_words': 70}