<commit_before>var exp_id = exp_id || undefined;


var post_experiment = function (exp_id, game, time_stamp) {
	var steps = game.steps
	var last_state = game.gameStates.length;
	var win = game.gameStates[last_state-1].win;
	var score = game.gameStates[last_state-1].score;
	$.ajax({
		type: 'POST',
		url: "/experiment/"+exp_id,
		data: {timeStamp: JSON.stringify(time_stamp),
		 	   gameStates: JSON.stringify('[]') //JSON.stringify(game.gameStates),
		 	   score: score,
		 	   win: win,
		 	   steps: steps},
		success: function (status) {
			console.log(status)
		},
	})		
}

var next_experiment = function (exp_id, game, time_stamp, callback) {
	post_experiment(exp_id, game, time_stamp);
	$.ajax({
		type: 'POST',
		url: `/experiment/${exp_id}/next`,
		success: function (status) {
			if (status.success) {
				callback()
			} else {
				console.log('could not retry experiment')
			}
		}
	})
}
<commit_msg>fixed break<commit_after>var exp_id = exp_id || undefined;


var post_experiment = function (exp_id, game, time_stamp) {
	var steps = game.steps
	var last_state = game.gameStates.length;
	var win = game.gameStates[last_state-1].win;
	var score = game.gameStates[last_state-1].score;
	$.ajax({
		type: 'POST',
		url: "/experiment/"+exp_id,
		data: {timeStamp: JSON.stringify(time_stamp),
		 	   gameStates: JSON.stringify('[]'), //JSON.stringify(game.gameStates),
		 	   score: score,
		 	   win: win,
		 	   steps: steps},
		success: function (status) {
			console.log(status)
		},
	})		
}

var next_experiment = function (exp_id, game, time_stamp, callback) {
	post_experiment(exp_id, game, time_stamp);
	$.ajax({
		type: 'POST',
		url: `/experiment/${exp_id}/next`,
		success: function (status) {
			if (status.success) {
				callback()
			} else {
				console.log('could not retry experiment')
			}
		}
	})
}

{'fraction_non_alphanumeric': 0.15506849315068494, 'fraction_numerical': 0.002191780821917808, 'mean_word_length': 3.6345177664974617, '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': '2200365', 'n_tokens_mistral': 736, 'n_tokens_neox': 663, 'n_words': 139}