<commit_before>// Read a page's GET URL variables and return them as an associative array.
// Source: http://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html
var params = function () {
  var vars = [], hash;
  var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
  for(var i = 0; i < hashes.length; i++) {
    hash = hashes[i].split('=');
    vars.push(hash[0]);
    vars[hash[0]] = hash[1];
  }
  return vars;
}()
var user = params.user,
    repo = params.repo,
    head = document.getElementsByTagName('head')[0],
    gravatar = document.getElementById('gravatar');
    username = document.getElementById('gh-username');
    reponums = document.getElementById('gh-repo-nums');


// Add commas to numbers
function addCommas(n) {
  return String(n).replace(/(\d)(?=(\d{3})+$)/g, '$1,')
}

function jsonp(path, callback_var) {
  var el = document.createElement('script');
  el.src = path + '?callback=' + callback_var;
  head.insertBefore(el, head.firstChild);
}

function callback_user(obj) {
    gravatar.innerHTML = '<img src="' + obj.data.avatar_url + '"/>';
    username.innerHTML = obj.data.name;
    reponums.innerHTML = addCommas(obj.data.public_repos) + ' public repositories';
}

function callback_events(obj) {
	var activities = obj.data;
		$.each(activities, function() {
			console.log(this);
			switch(this.type)
			{
				case 'WatchEvent':
					verb = 'starred';
					break;
				case 'PushEvent':
					verb = 'pushed a commit to';
					break;
				default:
					verb = 'did something';
					break;
			}
			var individualstory = '<div class="row" id="individual-story-'+ this.id + '">';
			individualstory += '<div class="span5">';<commit_msg>Revert "remove console log"<commit_after>// Read a page's GET URL variables and return them as an associative array.
// Source: http://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html
var params = function () {
  var vars = [], hash;
  var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
  for(var i = 0; i < hashes.length; i++) {
    hash = hashes[i].split('=');
    vars.push(hash[0]);
    vars[hash[0]] = hash[1];
  }
  return vars;
}()
var user = params.user,
    repo = params.repo,
    head = document.getElementsByTagName('head')[0],
    gravatar = document.getElementById('gravatar');
    username = document.getElementById('gh-username');
    reponums = document.getElementById('gh-repo-nums');


// Add commas to numbers
function addCommas(n) {
  return String(n).replace(/(\d)(?=(\d{3})+$)/g, '$1,')
}

function jsonp(path, callback_var) {
  var el = document.createElement('script');
  el.src = path + '?callback=' + callback_var;
  head.insertBefore(el, head.firstChild);
}

function callback_user(obj) {
    gravatar.innerHTML = '<img src="' + obj.data.avatar_url + '"/>';
    username.innerHTML = obj.data.name;
    reponums.innerHTML = addCommas(obj.data.public_repos) + ' public repositories';
}

function callback_events(obj) {
	var activities = obj.data;
		$.each(activities, function() {
		
			switch(this.type)
			{
				case 'WatchEvent':
					verb = 'starred';
					break;
				case 'PushEvent':
					verb = 'pushed a commit to';
					break;
				default:
					verb = 'did something';
					break;
			}
			console.log(this);
			var individualstory = '<div class="row" id="individual-story-'+ this.id + '">';
			individualstory += '<div class="span5">';
{'fraction_non_alphanumeric': 0.17519514310494363, 'fraction_numerical': 0.008673026886383347, 'mean_word_length': 3.6567967698519515, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '1003440', 'n_tokens_mistral': 1273, 'n_tokens_neox': 1138, 'n_words': 244}