<commit_before>window.onload = function() {
    var s = document.getElementsByTagName('div'), cur = 0, ti, tweets, children, reverse;
    if (!s) return;
    function go(n) {
		if (s[n].parentNode != document.getElementsByTagName('body')[0]){
			if (reverse)
				go(n-1)
			else
				go(n+1)
			return
		}
        cur = n;
        var i = 1e3, e = s[n], t;
        for (var k = 0; k < s.length; k++) {
			s[k].style.display = 'none';
		}
        e.style.display = 'inline';
        e.style.fontSize = i + 'px';
        if (e.firstChild.nodeName === 'IMG') {
            document.body.style.backgroundImage = 'url(' + e.firstChild.src + ')';
            e.firstChild.style.display = 'none';
            if ('classList' in e) e.classList.add('imageText');
        } else {
            document.body.style.backgroundImage = '';
            document.body.style.backgroundColor = e.style.backgroundColor;
        }
		children = e.getElementsByTagName('div')
		if (children) {
			for(var rr = 0; rr < children.length; rr++) {
				children[rr].style.display = ''
			}
			children = false
		}
        if (ti !== undefined) window.clearInterval(ti);
        t = parseInt(e.getAttribute('time-to-next') || 0, 10);
        if (t > 0) ti = window.setTimeout(fwd, (t * 1000));
        while (
            e.offsetWidth > window.innerWidth ||
            e.offsetHeight > window.innerHeight) {
            e.style.fontSize = (i -= i * 0.05) + 'px';
            if (i < 0) break;
        }
        e.style.marginTop = ((window.innerHeight - e.offsetHeight) / 2) + 'px';
        if (window.location.hash !== n) window.location.hash = n;
        document.title = e.textContent || e.innerText;
		e.focus();
    }
    document.onclick = function() { go(++cur % (s.length)); };
    function fwd() { 
		reverse=false;
		go(Math.min(s.length - 1, ++cur)); 
	}
    function rev() { 
		reverse=true;
		go(Math.max(0, --cur)); 
	}
    document.onkeydown = function(e) {

        if (e.which === 33) fwd(); // pgUp
        if (e.which === 37) fwd(); // left;
        if (e.which === 38) fwd(); // up;


        if (e.which === 34) rev(); // pgDown
        if (e.which === 39) rev(); // right 
        if (e.which === 40) rev(); // down
    };
    document.ontouchstart = function(e) {
        var x0 = e.changedTouches[0].pageX;
        document.ontouchend = function(e) {<commit_msg>reverse forward and back so they actually make sense<commit_after>window.onload = function() {
    var s = document.getElementsByTagName('div'), cur = 0, ti, tweets, children, reverse;
    if (!s) return;
    function go(n) {
		if (s[n].parentNode != document.getElementsByTagName('body')[0]){
			if (reverse)
				go(n-1)
			else
				go(n+1)
			return
		}
        cur = n;
        var i = 1e3, e = s[n], t;
        for (var k = 0; k < s.length; k++) {
			s[k].style.display = 'none';
		}
        e.style.display = 'inline';
        e.style.fontSize = i + 'px';
        if (e.firstChild.nodeName === 'IMG') {
            document.body.style.backgroundImage = 'url(' + e.firstChild.src + ')';
            e.firstChild.style.display = 'none';
            if ('classList' in e) e.classList.add('imageText');
        } else {
            document.body.style.backgroundImage = '';
            document.body.style.backgroundColor = e.style.backgroundColor;
        }
		children = e.getElementsByTagName('div')
		if (children) {
			for(var rr = 0; rr < children.length; rr++) {
				children[rr].style.display = ''
			}
			children = false
		}
        if (ti !== undefined) window.clearInterval(ti);
        t = parseInt(e.getAttribute('time-to-next') || 0, 10);
        if (t > 0) ti = window.setTimeout(fwd, (t * 1000));
        while (
            e.offsetWidth > window.innerWidth ||
            e.offsetHeight > window.innerHeight) {
            e.style.fontSize = (i -= i * 0.05) + 'px';
            if (i < 0) break;
        }
        e.style.marginTop = ((window.innerHeight - e.offsetHeight) / 2) + 'px';
        if (window.location.hash !== n) window.location.hash = n;
        document.title = e.textContent || e.innerText;
		e.focus();
    }
    document.onclick = function() { go(++cur % (s.length)); };
    function fwd() { 
		reverse=false;
		go(Math.min(s.length - 1, ++cur)); 
	}
    function rev() { 
		reverse=true;
		go(Math.max(0, --cur)); 
	}
    document.onkeydown = function(e) {

        if (e.which === 33) rev(); // pgUp
        if (e.which === 37) rev(); // left;
        if (e.which === 38) rev(); // up;


        if (e.which === 34) fwd(); // pgDown
        if (e.which === 39) fwd(); // right 
        if (e.which === 40) fwd(); // down
    };
    document.ontouchstart = function(e) {
        var x0 = e.changedTouches[0].pageX;
        document.ontouchend = function(e) {
{'fraction_non_alphanumeric': 0.17799284662318535, 'fraction_numerical': 0.015569114243635598, 'mean_word_length': 2.077022653721683, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4345992', 'n_tokens_mistral': 1753, 'n_tokens_neox': 1618, 'n_words': 356}