<commit_before>// Various Helpers/Utilities

function _nop() {
}

function isValue(o) {
  return (o !== null) && (o !== undefined);
}

function extend(o, items) {
  for (var n in items) {
    o[n] = items[n];
  }
  return o;
}

function parseBoolean(s) {
  return (s.toLowerCase() == 'true');
}

function parseRegExp(s) {
  if (s[0] == '/') {
    var endSlashIndex = s.lastIndexOf('/');
    if (endSlashIndex > 1) {
      var expression = s.substring(1, endSlashIndex);
      var flags = s.substr(endSlashIndex + 1);
      return new RegExp(expression, flags);
    }
  }

  return null;
}

function parseNumber(s) {
  if (!s || !s.length) {
    return 0;
  }
  if ((s.indexOf('.') >= 0) || (s.indexOf('e') >= 0) ||
    s.endsWith('f') || s.endsWith('F')) {
    return parseFloat(s);
  }
  return parseInt(s, 10);
}

function truncate(n) {
  return (n >= 0) ? Math.floor(n) : Math.ceil(n);
}

function now() {
  return new Date();
}
<commit_msg>fixed parseDate and parseNumber<commit_after>// Various Helpers/Utilities

function _nop() {
}

function isValue(o) {
  return (o !== null) && (o !== undefined);
}

function extend(o, items) {
  for (var n in items) {
    o[n] = items[n];
  }
  return o;
}

function parseBoolean(s) {
  return (s.toLowerCase() == 'true');
}

function parseRegExp(s) {
  if (s[0] == '/') {
    var endSlashIndex = s.lastIndexOf('/');
    if (endSlashIndex > 1) {
      var expression = s.substring(1, endSlashIndex);
      var flags = s.substr(endSlashIndex + 1);
      return new RegExp(expression, flags);
    }
  }

  return null;
}

function parseNumber(s) {
  if (!s || !s.length) {
    return 0;
  }
  if ((s.indexOf('.') >= 0) || (s.indexOf('e') >= 0) ||
    endsWith(s, 'f') || endsWith(s, 'F')) {
    return parseFloat(s);
  }
  return parseInt(s, 10);
}

function parseDate(s) {
  return new Date(Date.parse(s));
}

function truncate(n) {
  return (n >= 0) ? Math.floor(n) : Math.ceil(n);
}

function now() {
  return new Date();
}

{'fraction_non_alphanumeric': 0.19400711020822753, 'fraction_numerical': 0.01015744032503809, 'mean_word_length': 3.0956340956340958, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2341847', 'n_tokens_mistral': 769, 'n_tokens_neox': 756, 'n_words': 178}