<commit_before>/*jslint indent: 2, plusplus: true*/
"use strict";

// chooses colors around the HSB circle
// doesn't work very well, might regres to random

var predefinedColors = [
  "mediumblue",
  "crimson",
  "green",
  "saddlebrown",
  "dodgerblue",
  "magenta",
  "darkorange",
  "limegreen",
  "orangered",
  "mediumpurple"
];

function ColorAssigner() {
  var
    assignedColors = {},
    assignedColorsCount = 0,
    RND_COMPONENT_MARGIN = 50;

  function randomComponent() {
    return RND_COMPONENT_MARGIN + Math.floor(Math.random() * (255 - 2 * RND_COMPONENT_MARGIN));
  }

  function newColor() {
    if (assignedColorsCount === predefinedColors.length) {
      return "rgb("
             + randomComponent() + ","
             + randomComponent() + ","
             + randomComponent() + ")";
    }

    return predefinedColors[assignedColorsCount++];
  }

  this.colorForId = function (id) {
    if (id.split('.')[0] === '1166224657908994156540') { // irma
      return "purple";
    }

    var color = assignedColors[id];
    if (color === undefined) {
      assignedColors[id] = (color = newColor());
    }
    return color;
  };
}<commit_msg>Irma chooses another color<commit_after>/*jslint indent: 2, plusplus: true*/
"use strict";

// chooses colors around the HSB circle
// doesn't work very well, might regres to random

var predefinedColors = [
  "mediumblue",
  "crimson",
  "green",
  "saddlebrown",
  "dodgerblue",
  "magenta",
  "darkorange",
  "limegreen",
  "orangered",
  "mediumpurple"
];

function ColorAssigner() {
  var
    assignedColors = {},
    assignedColorsCount = 0,
    RND_COMPONENT_MARGIN = 50;

  function randomComponent() {
    return RND_COMPONENT_MARGIN + Math.floor(Math.random() * (255 - 2 * RND_COMPONENT_MARGIN));
  }

  function newColor() {
    if (assignedColorsCount === predefinedColors.length) {
      return "rgb("
             + randomComponent() + ","
             + randomComponent() + ","
             + randomComponent() + ")";
    }

    return predefinedColors[assignedColorsCount++];
  }

  this.colorForId = function (id) {
    if (id.split('.')[0] === '1166224657908994156540') { // irma
      return "darkorchid";
    }

    var color = assignedColors[id];
    if (color === undefined) {
      assignedColors[id] = (color = newColor());
    }
    return color;
  };
}
{'fraction_non_alphanumeric': 0.14792646430098333, 'fraction_numerical': 0.026507054296707994, 'mean_word_length': 3.006849315068493, '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': '3273316', 'n_tokens_mistral': 834, 'n_tokens_neox': 784, 'n_words': 165}