<commit_before>var apiKey = '<KEY>';
var userID = 'risherry';
(function() {
  var perPage = 10;
  var behanceProjectAPI = 'http://www.behance.net/v2/users/' + userID + '/projects?callback=?&api_key=' + apiKey + '&per_page=' + perPage;

  function setPortfolioTemplate() {
    var projectData = JSON.parse(sessionStorage.getItem('behanceProject')),
      getTemplate = $('#portfolio-template').html(),
      template    = Handlebars.compile(getTemplate),
      result      = template(projectData);
    $('.portfolio').html(result);
  };

  if(sessionStorage.getItem('behanceProject')) {
    setPortfolioTemplate();
  } else {
    $.getJSON(behanceProjectAPI, function(project) {
      var data = JSON.stringify(project);
      sessionStorage.setItem('behanceProject', data);
      setPortfolioTemplate();
    });
  };
})();

(function() {
  var risherryData = "src/data/risherry.json";

  $.getJSON(risherryData, function(license) {
    var getTemplate = $('#license-template').html(),
        template    = Handlebars.compile(getTemplate),
        result      = template(license);
    $('.license-container').html(result);
  });

  $.getJSON(risherryData, function(talks) {
    var getTemplate = $('#talks-template').html(),
        template    = Handlebars.compile(getTemplate),
        result      = template(talks);
    $('.talks-container').html(result);
  });

  $.getJSON(risherryData, function(external) {
    var getTemplate = $('#external-template').html(),
        template    = Handlebars.compile(getTemplate),
        result      = template(external);
    $('.external').html(result);
  });

  $.getJSON(risherryData, function(about) {
    var getTemplate = $('#about-template').html(),
        template    = Handlebars.compile(getTemplate),
        result      = template(about);
    $('.about-container').html(result);
  });

  $.getJSON(risherryData, function(work) {
    var getTemplate = $('#work-template').html(),
        template    = Handlebars.compile(getTemplate),
        result      = template(work);
    $('.work-container').html(result);
  });
})();

Handlebars.registerHelper('idFallback', function(object, property) {
  var value = object[property];
  if (value == undefined) {
    /* Fallback on name */
    value = object.name;
    value = value.toLowerCase();
  }
  return value;
});

(function() {
  var risherryData = "src/data/themes.json";

  $.getJSON(risherryData, function(stylesheets) {
    var getTemplate = $('#stylesheet-template').html(),
        template    = Handlebars.compile(getTemplate),
        result      = template(stylesheets);
    $('#stylesheet-template').remove();
    $('head title').before(result);
  });
<commit_msg>Issue #13: Break Content into separate Categories<commit_after>var apiKey = '<KEY>';
var userID = 'risherry';
(function() {
  var perPage = 10;
  var behanceProjectAPI = 'http://www.behance.net/v2/users/' + userID + '/projects?callback=?&api_key=' + apiKey + '&per_page=' + perPage;

  function setPortfolioTemplate() {
    var projectData = JSON.parse(sessionStorage.getItem('behanceProject')),
      getTemplate = $('#portfolio-template').html(),
      template    = Handlebars.compile(getTemplate),
      result      = template(projectData);
    $('.portfolio').html(result);
  };

  if(sessionStorage.getItem('behanceProject')) {
    setPortfolioTemplate();
  } else {
    $.getJSON(behanceProjectAPI, function(project) {
      var data = JSON.stringify(project);
      sessionStorage.setItem('behanceProject', data);
      setPortfolioTemplate();
    });
  };
})();

(function() {
  var risherryData = "src/data/risherry.json";

  $.getJSON(risherryData, function(external) {
    var getTemplate = $('#external-template').html(),
        template    = Handlebars.compile(getTemplate),
        result      = template(external);
    $('.external').html(result);
  });

  $.getJSON(risherryData, function(about) {
    var getTemplate = $('#about-template').html(),
        template    = Handlebars.compile(getTemplate),
        result      = template(about);
    $('.about-container').html(result);
  });

  $.getJSON(risherryData, function(work) {
    var getTemplate = $('#work-template').html(),
        template    = Handlebars.compile(getTemplate),
        result      = template(work);
    $('.work-container').html(result);
  });

  $.getJSON(risherryData, function(talks) {
    var getTemplate = $('#talks-template').html(),
        template    = Handlebars.compile(getTemplate),
        result      = template(talks);
    $('.talks-container').html(result);
  });

  $.getJSON(risherryData, function(license) {
    var getTemplate = $('#license-template').html(),
        template    = Handlebars.compile(getTemplate),
        result      = template(license);
    $('.license-container').html(result);
  });
})();

Handlebars.registerHelper('idFallback', function(object, property) {
  var value = object[property];
  if (value == undefined) {
    /* Fallback on name */
    value = object.name;
    value = value.toLowerCase();
  }
  return value;
});

(function() {
  var risherryData = "src/data/themes.json";

  $.getJSON(risherryData, function(stylesheets) {
    var getTemplate = $('#stylesheet-template').html(),
        template    = Handlebars.compile(getTemplate),
        result      = template(stylesheets);
    $('#stylesheet-template').remove();
    $('head title').before(result);
  });

{'fraction_non_alphanumeric': 0.17142857142857143, 'fraction_numerical': 0.001484230055658627, 'mean_word_length': 3.4516928158546656, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4397975', 'n_tokens_mistral': 1614, 'n_tokens_neox': 1569, 'n_words': 264}