<commit_before>export namespace Random {
  /** @return number : lower <= value < upper */
  export function nextInt(upper: number = Number.MAX_SAFE_INTEGER, lower: number = 0): number {
    return Math.floor(Math.random() * (upper - lower) + lower);
  }

  /** @return real number : -1 .. 1 */
  export function nextNP1() {
    return Math.random() * 2 - 1;
  }

  export function element<A>(xs: A[]): A {
    return xs[nextInt(xs.length, 0)];
  }

  export function nextDate(after?: Date): Date {
    if (after) {
      return new Date(nextInt(Number.MAX_SAFE_INTEGER, after.getTime()));
    }
    return new Date(nextInt());
  }
}<commit_msg>added default param for Random.nextDate()<commit_after>export namespace Random {
  /** @return number : lower <= value < upper */
  export function nextInt(upper: number = Number.MAX_SAFE_INTEGER, lower: number = 0): number {
    return Math.floor(Math.random() * (upper - lower) + lower);
  }

  /** @return real number : -1 .. 1 */
  export function nextNP1() {
    return Math.random() * 2 - 1;
  }

  export function element<A>(xs: A[]): A {
    return xs[nextInt(xs.length, 0)];
  }

  export function nextDate(after = new Date('2016-12-12'), before = new Date('2018-12-12')): Date {
    let diff = before.getTime() - after.getTime();
    let time = Random.nextInt(after.getTime() + diff, after.getTime());
    return new Date(time);
  }
}
{'fraction_non_alphanumeric': 0.16138328530259366, 'fraction_numerical': 0.021613832853025938, 'mean_word_length': 3.3003095975232197, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '2702658', 'n_tokens_mistral': 476, 'n_tokens_neox': 444, 'n_words': 123}