<commit_before>function fillWithOneLeadingZero(i) {
    return (i < 10 ? '0' : '') + i
}

$().ready(function() {
    $.ajax({
        type: "GET",
        url: "https://api.github.com/repos/appleseedhq/appleseed/commits",
        dataType: "json",

        success: function(result) {
            for (var i = 0; i < 5; i++ ) {
                var tempDate        = new Date(result[i].commit.author.date);
                var commitDate      = tempDate.getFullYear() + "/"
                                      + fillWithOneLeadingZero(tempDate.getMonth()) + "/"
                                      + fillWithOneLeadingZero(tempDate.getDate());
                var commitAuthor    = result[i].commit.author.name;
                var commitMessage   = result[i].commit.message;
                var commitUrl       = result[i].html_url;

                $("#latest-commits").append(
                    "<li style='list-style-type: none;'>" +
                        "<a href='" + commitUrl + "'><span class='commit'>" + commitDate + "</span> " +
                        "<span class='commit commit-author'>" + commitAuthor + "</span> " +
                        commitMessage +
                        "</a></li>"
                );
            }
        }
    })
    .fail(function() {
        $('#commits').remove();
    });
});
<commit_msg>don't show development activity if commits cannot be retrieved.<commit_after>function leftPadWithZero(i) {
    return (i < 10 ? '0' : '') + i
}

$().ready(function() {
    $.ajax({
        type: "GET",
        url: "https://api.github.com/repos/appleseedhq/appleseed/commits",
        dataType: "json",
        success: function(result) {
            for (var i = 0; i < 5; ++i) {
                var tempDate        = new Date(result[i].commit.author.date);
                var commitDate      = tempDate.getFullYear()
                                          + "/" + leftPadWithZero(tempDate.getMonth())
                                          + "/" + leftPadWithZero(tempDate.getDate());
                var commitAuthor    = result[i].commit.author.name;
                var commitMessage   = result[i].commit.message;
                var commitUrl       = result[i].html_url;

                $("#latest-commits").append(
                    "<li style='list-style-type: none;'>" +
                        "<a href='" + commitUrl + "'><span class='commit'>" + commitDate + "</span> " +
                        "<span class='commit commit-author'>" + commitAuthor + "</span> " +
                        commitMessage +
                        "</a></li>"
                );
                
                $("#commits").show();
            }
        }
    })
});

{'fraction_non_alphanumeric': 0.15395948434622467, 'fraction_numerical': 0.003683241252302026, 'mean_word_length': 1.3555941023417173, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 19, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '486564', 'n_tokens_mistral': 758, 'n_tokens_neox': 724, 'n_words': 132}