<commit_before>moment.lang('en', {
      relativeTime : {
        future: "in %s",
        past:   "%s ago",
        s:  "secs",
        m:  "a min",
        mm: "%d mins",
        h:  "an hr",
        hh: "%d hrs",
        d:  "a day",
        dd: "%d days",
        M:  "a mth",
        MM: "%d mths",
        y:  "a yr",
        yy: "%d yrs"
      }
});


App = Ember.Application.create({
});

App.ajax =  function(url, settings) {
  settings = settings || {};
  settings.headers = settings.headers || {};
  settings.headers["X-SILENCE-LOGGER"] = true;
  return $.ajax(Logger.rootPath + url, settings);
};

App.preloadOrAjax = function(url, settings) {
  var preloaded = Logger.preload[url];
  if (preloaded) {
    // return a pseudo-XHR
    return {
      success: function(callback) {
        setTimeout(function() {
          callback(preloaded);
        }, 0);
        return this;
      },
      error: function() { return this; }
    };
  } else {
    return App.ajax(url, settings);
  }
};

App.Router.map(function() {
  this.route("index", { path: "/" });
  this.route("show", { path: "/show/:id" });
});

function buildArrayString(array) {
  var buffer = [];
  _.each(array, function(v) {
    if (v === null) {
      buffer.push('null');
    } else if (Object.prototype.toString.call(v) === '[object Array]') {
      buffer.push(buildArrayString(v));
    } else {
      buffer.push(escape(v.toString()));
    }
  });
  return '[' + buffer.join(', ') + ']';
}

function buildHashString(hash, recurse) {
  if (!hash) return '';

  var buffer = [],
      hashes = [];
  _.each(hash, function(v, k) {
    if (v === null) {
      buffer.push('null');
    } else if (Object.prototype.toString.call(v) === '[object Array]') {
      buffer.push("<tr><td>" + escape(k) + "</td><td>" + buildArrayString(v) + "</td></tr>");
    } else if (typeof v === "object") {
      hashes.push(k);
    } else {
      buffer.push("<tr><td>" + k + "</td><td>" + v + "</td></tr>");
    }
  });

  if (_.size(hashes) > 0) {
    _.each(hashes, function(k1) {
      var v = hash[k1];
      buffer.push("<tr><td></td><td><table>");<commit_msg>Fix escaping so its doing the right thing<commit_after>moment.lang('en', {
      relativeTime : {
        future: "in %s",
        past:   "%s ago",
        s:  "secs",
        m:  "a min",
        mm: "%d mins",
        h:  "an hr",
        hh: "%d hrs",
        d:  "a day",
        dd: "%d days",
        M:  "a mth",
        MM: "%d mths",
        y:  "a yr",
        yy: "%d yrs"
      }
});


App = Ember.Application.create({
});

App.ajax =  function(url, settings) {
  settings = settings || {};
  settings.headers = settings.headers || {};
  settings.headers["X-SILENCE-LOGGER"] = true;
  return $.ajax(Logger.rootPath + url, settings);
};

App.preloadOrAjax = function(url, settings) {
  var preloaded = Logger.preload[url];
  if (preloaded) {
    // return a pseudo-XHR
    return {
      success: function(callback) {
        setTimeout(function() {
          callback(preloaded);
        }, 0);
        return this;
      },
      error: function() { return this; }
    };
  } else {
    return App.ajax(url, settings);
  }
};

App.Router.map(function() {
  this.route("index", { path: "/" });
  this.route("show", { path: "/show/:id" });
});

var entityMap = {
    "&": "&amp;",
    "<": "&lt;",
    ">": "&gt;",
    '"': '&quot;',
    "'": '&#39;',
    "/": '&#x2F;'
  };

function escapeHtml(string) {
  return String(string).replace(/[&<>"'\/]/g, function (s) {
    return entityMap[s];
  });
}

function buildArrayString(array) {
  var buffer = [];
  _.each(array, function(v) {
    if (v === null) {
      buffer.push('null');
    } else if (Object.prototype.toString.call(v) === '[object Array]') {
      buffer.push(buildArrayString(v));
    } else {
      buffer.push(escapeHtml(v.toString()));
    }
  });
  return '[' + buffer.join(', ') + ']';
}

function buildHashString(hash, recurse) {
  if (!hash) return '';

  var buffer = [],
      hashes = [];
  _.each(hash, function(v, k) {

    if (v === null) {
      buffer.push('null');
    } else if (Object.prototype.toString.call(v) === '[object Array]') {
      buffer.push("<tr><td>" + escapeHtml(k) + "</td><td>" + buildArrayString(v) + "</td></tr>");
    } else if (typeof v === "object") {
      hashes.push(k);
    } else {
      buffer.push("<tr><td>" + k + "</td><td>" + v + "</td></tr>");
    }
  });

  if (_.size(hashes) > 0) {
    _.each(hashes, function(k1) {
      var v = hash[k1];
      buffer.push("<tr><td></td><td><table>");
{'fraction_non_alphanumeric': 0.2205591019150341, 'fraction_numerical': 0.002421307506053269, 'mean_word_length': 2.3559822747415065, 'pattern_counts': {'":': 5, '<': 39, '<?xml version=': 0, '>': 41, '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': '1745587', 'n_tokens_mistral': 1640, 'n_tokens_neox': 1624, 'n_words': 332}