<commit_before>$( document ).ready(function() {
    // Shift nav in mobile when clicking the menu.
    $(document).on('click', "[data-toggle='wy-nav-top']", function() {
      $("[data-toggle='wy-nav-shift']").toggleClass("shift");
      $("[data-toggle='rst-versions']").toggleClass("shift");
    });
    // Close menu when you click a link.
    $(document).on('click', ".wy-menu-vertical .current ul li a", function() {
      $("[data-toggle='wy-nav-shift']").removeClass("shift");
      $("[data-toggle='rst-versions']").toggleClass("shift");
    });
    $(document).on('click', "[data-toggle='rst-current-version']", function() {
      $("[data-toggle='rst-versions']").toggleClass("shift-up");
    });

    $(document).on('click', "a[href^='#']", SphinxRtdTheme.scrollToAnchor);
    SphinxRtdTheme.scrollToAnchor(window.location.hash, false);
});

window.SphinxRtdTheme = (function (jquery) {
    var stickyNav = (function () {
        var navBar,
            win,
            stickyNavCssClass = 'stickynav',
            applyStickNav = function () {
                if (navBar.height() <= win.height()) {
                    navBar.addClass(stickyNavCssClass);
                } else {
                    navBar.removeClass(stickyNavCssClass);
                }
            },
            enable = function () {
                applyStickNav();
                win.on('resize', applyStickNav);
            },
            init = function () {
                navBar = jquery('nav.wy-nav-side:first');
                win    = jquery(window);
            };
        jquery(init);
        return {
            enable : enable
        };
    }());

    var scrollToAnchor = function(href, addToHistory){
        href = typeof(href) == "string" ? href : jquery(this).attr("href");
        if(!href) return;
        var fromTop = 100;
        var target = jquery(href);

        if(target.length) {
            var topPos = target.offset().top; 
            setTimeout(function() {
                jquery('html, body').scrollTop(topPos - fromTop);
            }, 2); // Tiny timeout to fire after browser's anchor scroll
            if(addToHistory && history && "pushState" in history) {
                history.pushState({}, document.title, window.location.pathname + href);
                return false;
            }
        }
    }

    return {<commit_msg>Don't check where the anchor is until the page has actually finished loading<commit_after>$( document ).ready(function() {
    // Shift nav in mobile when clicking the menu.
    $(document).on('click', "[data-toggle='wy-nav-top']", function() {
      $("[data-toggle='wy-nav-shift']").toggleClass("shift");
      $("[data-toggle='rst-versions']").toggleClass("shift");
    });
    // Close menu when you click a link.
    $(document).on('click', ".wy-menu-vertical .current ul li a", function() {
      $("[data-toggle='wy-nav-shift']").removeClass("shift");
      $("[data-toggle='rst-versions']").toggleClass("shift");
    });
    $(document).on('click', "[data-toggle='rst-current-version']", function() {
      $("[data-toggle='rst-versions']").toggleClass("shift-up");
    });

    $(document).on('click', "a[href^='#']", SphinxRtdTheme.scrollToAnchor);
    SphinxRtdTheme.scrollToAnchor(window.location.hash, false);
});

window.SphinxRtdTheme = (function (jquery) {
    var stickyNav = (function () {
        var navBar,
            win,
            stickyNavCssClass = 'stickynav',
            applyStickNav = function () {
                if (navBar.height() <= win.height()) {
                    navBar.addClass(stickyNavCssClass);
                } else {
                    navBar.removeClass(stickyNavCssClass);
                }
            },
            enable = function () {
                applyStickNav();
                win.on('resize', applyStickNav);
            },
            init = function () {
                navBar = jquery('nav.wy-nav-side:first');
                win    = jquery(window);
            };
        jquery(init);
        return {
            enable : enable
        };
    }());

    var scrollToAnchor = function(href, addToHistory){
        href = typeof(href) == "string" ? href : jquery(this).attr("href");
        if(!href) return;
        var fromTop = 100;
        var target = jquery(href);

        if(target.length) {
            setTimeout(function() {
                var topPos = target.offset().top;
                jquery('html, body').scrollTop(topPos - fromTop);
            }, 2); // Tiny timeout to fire after browser's anchor scroll
            if(addToHistory && history && "pushState" in history) {
                history.pushState({}, document.title, window.location.pathname + href);
                return false;
            }
        }
    }

    return {
{'fraction_non_alphanumeric': 0.16458072590738423, 'fraction_numerical': 0.001668752607425949, 'mean_word_length': 2.0006257822277846, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5705763', 'n_tokens_mistral': 1385, 'n_tokens_neox': 1329, 'n_words': 254}