<commit_before>// http://stackoverflow.com/a/21072419/677173
Handlebars.registerHelper('ifeq', function (a, b, options) {
    if (a === b) {
        return options.fn(this);
    }
    else {
        return options.inverse(this);
    }
});

Handlebars.registerHelper('partialFor', function (a, options) {
    var partial = Handlebars.partials['gh-' + a];
    if (!partial) {
        return 'NO PARTIAL for ' + a;
    }
    else {
        return new Handlebars.SafeString(partial(this));
    }
});

Handlebars.registerHelper('pluralise', function (a, singular, plural, options) {
    if (a == 1) {
        return singular;
    }
    else {
        return plural;
    }
});

Handlebars.registerHelper('capitalise', function (a, options) {
    return a.charAt(0).toUpperCase() + a.slice(1);
});

Handlebars.registerHelper('repoUrl', function (a, options) {
    return 'https://github.com/' + a;
});

Handlebars.registerHelper('tagUrl', function (a, b, options) {
    return 'https://github.com/' + a + '/tree/' + b;
});

Handlebars.registerHelper('branchUrl', function (a, b, options) {
    return 'https://github.com/' + a + '/tree/' + b;
});

Handlebars.registerHelper('wikiUrl', function (a, options) {
    return 'https://github.com/' + a + '/wiki';
});

Handlebars.registerHelper('commitIdShort', function (a, options) {
    return a.substring(0, 7);
});

Handlebars.registerHelper('dateAndTime', function (a, options) {
    var date = new Date(a);
    return date.toLocaleDateString() + " @ " + date.toLocaleTimeString();
});

$(function () {
    // Default interval 5s
    var intervalMs = parseInt($('#gh-ticker').data('interval-ms'), 10) || 5000;
    var mouseOver = false;

    var itemCount;
    var currentItemIndex = 0;

    function BeginGetActivityForUser(username, onSuccess, onError) {
        var url = 'https://api.github.com/users/' + username + '/events';

        $.ajax(url,
        {
            async: true,
            cache: true,
            contentType: 'application/json',<commit_msg>Rearranging helpers to be alphabetically ordered to find 'em easier<commit_after>Handlebars.registerHelper('branchUrl', function (a, b, options) {
    return 'https://github.com/' + a + '/tree/' + b;
});

Handlebars.registerHelper('capitalise', function (a, options) {
    return a.charAt(0).toUpperCase() + a.slice(1);
});

Handlebars.registerHelper('commitIdShort', function (a, options) {
    return a.substring(0, 7);
});

Handlebars.registerHelper('dateAndTime', function (a, options) {
    var date = new Date(a);
    return date.toLocaleDateString() + " @ " + date.toLocaleTimeString();
});

// http://stackoverflow.com/a/21072419/677173
Handlebars.registerHelper('ifeq', function (a, b, options) {
    if (a === b) {
        return options.fn(this);
    }
    else {
        return options.inverse(this);
    }
});

Handlebars.registerHelper('partialFor', function (a, options) {
    var partial = Handlebars.partials['gh-' + a];
    if (!partial) {
        return 'NO PARTIAL for ' + a;
    }
    else {
        return new Handlebars.SafeString(partial(this));
    }
});

Handlebars.registerHelper('pluralise', function (a, singular, plural, options) {
    if (a == 1) {
        return singular;
    }
    else {
        return plural;
    }
});

Handlebars.registerHelper('repoUrl', function (a, options) {
    return 'https://github.com/' + a;
});

Handlebars.registerHelper('tagUrl', function (a, b, options) {
    return 'https://github.com/' + a + '/tree/' + b;
});

Handlebars.registerHelper('wikiUrl', function (a, options) {
    return 'https://github.com/' + a + '/wiki';
});

$(function () {
    // Default interval 5s
    var intervalMs = parseInt($('#gh-ticker').data('interval-ms'), 10) || 5000;
    var mouseOver = false;

    var itemCount;
    var currentItemIndex = 0;

    function BeginGetActivityForUser(username, onSuccess, onError) {
        var url = 'https://api.github.com/users/' + username + '/events';

        $.ajax(url,
        {
            async: true,
            cache: true,
            contentType: 'application/json',
{'fraction_non_alphanumeric': 0.16764850270004908, 'fraction_numerical': 0.013254786450662739, 'mean_word_length': 3.0426587301587302, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, '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': '6395499', 'n_tokens_mistral': 1319, 'n_tokens_neox': 1268, 'n_words': 289}