<commit_before>(function (document, window) {
    // Private
    var cache = {},
		contentEl = document.getElementById('content');

    var currentApiClient;

    function get(url, cb) {
        if (cache[url]) return cb(cache[url]);

        var request = new XMLHttpRequest();
        request.open('GET', url, true);
        request.onload = function () {
            if (request.status >= 200 && request.status < 400) {
                var data = request.responseText;
                cache[url] = data;
                cb(data);
            } else {
                // Server returned error
            }
        };
        request.onerror = function () {
            // Connection error
        };
        request.send();
    }

    function ctx(ctx, next) {
        ctx.data = {};
        ctx.partials = {};
        if (ctx.init) {
            next();
        } else {
            contentEl.classList.add('transition');
            setTimeout(function () {
                content.classList.remove('transition');
                next();
            }, 300);
        }
    }

    function authenticate(ctx, next) {
        if (currentApiClient && currentApiClient.getCurrentUserId()) {
            next();
            return;
        }

        if (ctx.pathname !== '/login')
            page.redirect('/login');
        else
            next();
    }

    var importedCss = [];
    function loadCss(url) {

        if (importedCss.indexOf(url) != -1) {
            return;
        }

        importedCss.push(url);

        if (document.createStyleSheet) {
            document.createStyleSheet(url);
        }
        else {
            var link = document.createElement('link');
            link.setAttribute('rel', 'stylesheet');
            link.setAttribute('type', 'text/css');
            link.setAttribute('href', url);<commit_msg>update login route<commit_after>(function (document, window) {
    // Private
    var cache = {},
		contentEl = document.getElementById('content');

    var currentApiClient;

    function get(url, cb) {
        if (cache[url]) return cb(cache[url]);

        var request = new XMLHttpRequest();
        request.open('GET', url, true);
        request.onload = function () {
            if (request.status >= 200 && request.status < 400) {
                var data = request.responseText;
                cache[url] = data;
                cb(data);
            } else {
                // Server returned error
            }
        };
        request.onerror = function () {
            // Connection error
        };
        request.send();
    }

    function ctx(ctx, next) {
        ctx.data = {};
        ctx.partials = {};
        if (ctx.init) {
            next();
        } else {
            contentEl.classList.add('transition');
            setTimeout(function () {
                content.classList.remove('transition');
                next();
            }, 300);
        }
    }

    function authenticate(ctx, next) {
        if (currentApiClient && currentApiClient.getCurrentUserId()) {
            next();
            return;
        }

        if (ctx.pathname !== 'login')
            page.redirect('login');
        else
            next();
    }

    var importedCss = [];
    function loadCss(url) {

        if (importedCss.indexOf(url) != -1) {
            return;
        }

        importedCss.push(url);

        if (document.createStyleSheet) {
            document.createStyleSheet(url);
        }
        else {
            var link = document.createElement('link');
            link.setAttribute('rel', 'stylesheet');
            link.setAttribute('type', 'text/css');
            link.setAttribute('href', url);
{'fraction_non_alphanumeric': 0.13214189006228, 'fraction_numerical': 0.005415651232060655, 'mean_word_length': 1.49763353617309, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2087291', 'n_tokens_mistral': 989, 'n_tokens_neox': 952, 'n_words': 193}