<commit_before><commit_msg>Fixed #22: added javascript sort capability<commit_after><script type="text/javascript">
function sort(table, col) {
    var prevCol = -1;
    if (table.hasOwnProperty("s3g_prevCol")) {
        prevCol = table.s3g_prevCol;
    }
    table.s3g_prevCol = col;
    var order = 1;
    if (col == prevCol) {
        if (table.hasOwnProperty("s3g_prevOrd")) {
            order = table.s3g_prevOrd * (-1);
        }
    }
    table.s3g_prevOrd = order;
    var items = [];
    var rows = table.rows;
    var len = rows.length;
    var dataLength = rows.length - 1;
    for(var i = 1; i < len; i++) {
        var row = rows[i];
        var item = {};
        item.oldkey = i; // to enforce stable sort
        //console.log(row.cells[col].textContent);
        item.newkey = row.cells[col].textContent;
        item.row = rows[i];
        items.push(item);
    }
    items.sort(function(a, b) {
        var lc = a.newkey.localeCompare(b.newkey);
        if (lc != 0) {
            return lc * order;
        }
        return (item.oldkey - item.newkey) * order;
    });
    for (var i = 0, len = items.length; i < len; i++) {
        table.appendChild(items[i].row);
    }
    items = null;
}
</script>
{'fraction_non_alphanumeric': 0.1497545008183306, 'fraction_numerical': 0.012274959083469721, 'mean_word_length': 2.0575, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '6733140', 'n_tokens_mistral': 429, 'n_tokens_neox': 420, 'n_words': 95}