<commit_before>document.addEventListener("DOMContentLoaded", function(){
    var shiftOut = function(value) {
        if (value.length > 9) {
            return (value.substr(value.length-9,9));
	}
	else {
	    return (value);
	}
    };
    var number = "";
    var newnumber = "";
    var operator = "";
    var totaldiv = document.getElementById('total');
    var shiftKey = false;
    var myTimer;
    var myKeyPressed = null;
    totaldiv.textContent = '0';
    var keysList = document.getElementsByClassName('ckey');
    keyPress = function(thisKey, thisEvent) {
	myKeyPressed = thisKey;
	myTimer = setTimeout(function(){
	    shiftKey = !shiftKey;
	    window.navigator.vibrate(20);
	}, 500);
	window.navigator.vibrate(30);
	thisEvent.preventDefault();
    }
    keyLeave = function(thisKey, thisEvent) {
	clearTimeout(myTimer);
	thisEvent.preventDefault();
    }
    keyRelease = function(thisKey, thisEvent) {
	clearTimeout(myTimer);
	if (thisKey === myKeyPressed) {
	    var value = totaldiv.textContent;
	    value += thisKey.textContent;
	    if (shiftKey) { value += "x"; }
	    shiftKey = false;
	    totaldiv.textContent = shiftOut(value);
	}
	thisEvent.preventDefault();
    }
    for (var i = 0; i < keysList.length; i++) {
	var key = keysList[i];
	key.addEventListener("pointerdown", function(thisEvent){
	    keyPress(this, thisEvent);
	});
	key.addEventListener("pointerleave", function(thisEvent){
	    keyLeave(this, thisEvent);
	});
	key.addEventListener("pointerup", function(thisEvent){
	    keyRelease(this, thisEvent);
	});
	key.addEventListener("touchstart", function(thisEvent){<commit_msg>make the times a little longer, clear key on leave<commit_after>document.addEventListener("DOMContentLoaded", function(){
    var shiftOut = function(value) {
        if (value.length > 9) {
            return (value.substr(value.length-9,9));
	}
	else {
	    return (value);
	}
    };
    var number = "";
    var newnumber = "";
    var operator = "";
    var totaldiv = document.getElementById('total');
    var shiftKey = false;
    var myTimer;
    var myKeyPressed = null;
    totaldiv.textContent = '0';
    var keysList = document.getElementsByClassName('ckey');
    keyPress = function(thisKey, thisEvent) {
	myKeyPressed = thisKey;
	myTimer = setTimeout(function(){
	    shiftKey = !shiftKey;
	    window.navigator.vibrate(30);
	}, 750);
	window.navigator.vibrate(40);
	thisEvent.preventDefault();
    }
    keyLeave = function(thisKey, thisEvent) {
	myKeyPressed = null;
	clearTimeout(myTimer);
	thisEvent.preventDefault();
    }
    keyRelease = function(thisKey, thisEvent) {
	clearTimeout(myTimer);
	if (thisKey === myKeyPressed) {
	    var value = totaldiv.textContent;
	    value += thisKey.textContent;
	    if (shiftKey) { value += "x"; }
	    shiftKey = false;
	    totaldiv.textContent = shiftOut(value);
	}
	thisEvent.preventDefault();
    }
    for (var i = 0; i < keysList.length; i++) {
	var key = keysList[i];
	key.addEventListener("pointerdown", function(thisEvent){
	    keyPress(this, thisEvent);
	});
	key.addEventListener("pointerleave", function(thisEvent){
	    keyLeave(this, thisEvent);
	});
	key.addEventListener("pointerup", function(thisEvent){
	    keyRelease(this, thisEvent);
	});
	key.addEventListener("touchstart", function(thisEvent){
{'fraction_non_alphanumeric': 0.14051593323216996, 'fraction_numerical': 0.007283763277693475, 'mean_word_length': 3.7768115942028984, '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': '2513200', 'n_tokens_mistral': 1054, 'n_tokens_neox': 1025, 'n_words': 206}