<commit_before>---
---
{% include vendor/jquery-1.7.1.min.js %}
{% include vendor/underscore-min.js %}
{% include vendor/backbone-min.js %}
{% include vendor/js-yaml.min.js %}
{% include vendor/chrono.js %}
{% include vendor/showdown.js %}
{% include vendor/textile.js %}
{% include vendor/base64.js %}
{% include vendor/github.js %}
{% include vendor/codemirror/codemirror.js %}
{% include vendor/codemirror/xml.js %}
{% include vendor/codemirror/markdown.js %}
{% include vendor/jquery.cookie.js %}

window.app = {
    config: {},
    models: {},
    views: {},
    routers: {},
    utils: {},
    templates: _($('script[name]')).reduce(function(memo, el) {
        memo[el.getAttribute('name')] = _(el.innerHTML).template();
        return memo;
    }, {})
};

window.args = _(window.app).toArray();


{% include util.js %}
{% include model.js %}
{% include routers/application.js %}
{% include views/application.js %}
{% include views/header.js %}
{% include views/posts.js %}
{% include views/post.js %}
{% include views/new_post.js %}


// Keep session here?
window.session = {};

(function(config, models, views, routers, utils, templates) {
  $(function() {

  loadApplication("{{site.github.username}}", "{{site.github.password}}", function(err, data) {
    // Start the engines
    window.app = new views.Application({ el: '#container', model: data }).render();

    // Initialize router
    window.router = new routers.Application({});
    
    // Start responding to routes
    Backbone.history.start();
  });
  });
}).apply(this, window.args);<commit_msg>Share application state in window.app.state.<commit_after>---
---
{% include vendor/jquery-1.7.1.min.js %}
{% include vendor/underscore-min.js %}
{% include vendor/backbone-min.js %}
{% include vendor/js-yaml.min.js %}
{% include vendor/chrono.js %}
{% include vendor/showdown.js %}
{% include vendor/textile.js %}
{% include vendor/base64.js %}
{% include vendor/github.js %}
{% include vendor/codemirror/codemirror.js %}
{% include vendor/codemirror/xml.js %}
{% include vendor/codemirror/markdown.js %}
{% include vendor/jquery.cookie.js %}

window.app = {
    
    config: {},
    models: {},
    views: {},
    routers: {},
    utils: {},
    templates: _($('script[name]')).reduce(function(memo, el) {
        memo[el.getAttribute('name')] = _(el.innerHTML).template();
        return memo;
    }, {}),
    state: {"repo": ""},
    instance: {},
};

window.args = _(window.app).toArray();


{% include util.js %}
{% include model.js %}
{% include routers/application.js %}
{% include views/application.js %}
{% include views/start.js %}
{% include views/header.js %}
{% include views/posts.js %}
{% include views/post.js %}
{% include views/new_post.js %}


// Keep session here?
window.session = {};

(function(config, models, views, routers, utils, templates) {
  $(function() {

  loadApplication("{{site.github.username}}", "{{site.github.password}}", function(err, data) {
    // Start the engines
    window.app.instance = new views.Application({ el: '#container', model: data }).render();

    // Initialize router
    window.router = new routers.Application({});
    
    // Start responding to routes
    Backbone.history.start();
  });
  });
}).apply(this, window.args);
{'fraction_non_alphanumeric': 0.19852489244007376, 'fraction_numerical': 0.003073140749846343, 'mean_word_length': 3.5397489539748954, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4051621', 'n_tokens_mistral': 1113, 'n_tokens_neox': 1021, 'n_words': 200}