<commit_before>// global vars
var cards, flipped, index;

// an int between min and max, exclusive of max.
function getRandomInt(min, max) {
    return Math.floor(Math.random() * (max - min)) + min;
}

function onNext() {
	console.log("next");
	index = Math.min(index+1, cards.length-1);
	updateCard();
}

function onBack() {
	console.log("back");
	index = Math.max(0, index-1);
	updateCard();
}

function onFlip() {
	console.log("flip");

	$(".cardwrapper .backwrapper").toggleClass(".cardwrapper .backwrapper");

	flipped[index] = !flipped[index];
	updateCard();
}

function onCard() {
	console.log("card");
	onFlip();
}<commit_msg>functionality<commit_after>// global vars
var cards, flipped, index;

// an int between min and max, exclusive of max.
function getRandomInt(min, max) {
    return Math.floor(Math.random() * (max - min)) + min;
}

function onNext() {
	console.log("next");
	index = Math.min(index+1, cards.length-1);
	updateCard();
}

function onBack() {
	console.log("back");
	index = Math.max(0, index-1);
	updateCard();
}

function onFlip() {
	console.log("flip");

	$(".cardwrapper .backwrapper").toggleClass("cardwrapper backwrapper");

	flipped[index] = !flipped[index];
	updateCard();
}

function onCard() {
	console.log("card");
	onFlip();
}
{'fraction_non_alphanumeric': 0.18641390205371247, 'fraction_numerical': 0.00631911532385466, 'mean_word_length': 4.681614349775785, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1280717', 'n_tokens_mistral': 451, 'n_tokens_neox': 445, 'n_words': 102}