<commit_before>export function hexColor() {
  return `#${(Math.floor(Math.random() * 0xffffff)).toString(16)}`;
}

export function rgbColor() {
  return [...Array(3).keys()].map(_ => {
    return Math.floor(Math.random() * 255);
  });
}<commit_msg>Added a leftPad function that is used by hexColor so we always return 6 characters.<commit_after>export function hexColor() {
  return `#${leftPad(Math.floor(Math.random() * 0xffffff).toString(16))}`;
}

export function rgbColor() {
  return [...Array(3).keys()].map(_ => {
    return Math.floor(Math.random() * 255);
  });
}

function leftPad(text, length, paddingCharacter) {
  let padding = [...Array(length)].map(_ => paddingCharacter).join('');
  return (padding + text).slice(-length);
}
{'fraction_non_alphanumeric': 0.1970310391363023, 'fraction_numerical': 0.020242914979757085, 'mean_word_length': 4.707692307692308, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '2926689', 'n_tokens_mistral': 248, 'n_tokens_neox': 236, 'n_words': 53}