<commit_before>$(function onReady() { readPort(); fetchTemperatureReadings(); });

function writePort(val) {
	$.get("/writePort", {value : val}, function(data) { $("#status").text(data); })
		.fail(function() { $("#status").text("Failed to write port!"); });
}

function readPort() {
	$.get("/readPort", {}, function(data) { $("#status").text(data); })
		.fail(function() { $("#status").text("Failed to read port!"); });
}

function fetchTemperatureReadings() {
	$.get("/readTemp", {}, function(data) {
		ul = $("#readings");
		ul.html("");
		ul.appendTo("body");
		$(data).each(function (index, item) {
			ul.append($(document.createElement("li"))
				.text(item["name"] + ": " + item["celsius"] + "C"));
		});
	});
}<commit_msg>Set status correctly in main.js<commit_after>$(function onReady() { readPort(); fetchTemperatureReadings(); });

function writePort(val) {
	$.get("/writePort", {value : val}, function(data) { $("#status").text(data["status"]); })
		.fail(function() { $("#status").text("Failed to write port!"); });
}

function readPort() {
	$.get("/readPort", {}, function(data) { $("#status").text(data["status"]); })
		.fail(function() { $("#status").text("Failed to read port!"); });
}

function fetchTemperatureReadings() {
	$.get("/readTemp", {}, function(data) {
		ul = $("#readings");
		ul.html("");
		ul.appendTo("body");
		$(data).each(function (index, item) {
			ul.append($(document.createElement("li"))
				.text(item["name"] + ": " + item["celsius"] + "C"));
		});
	});
}
{'fraction_non_alphanumeric': 0.27436582109479307, 'fraction_numerical': 0.0, 'mean_word_length': 5.351694915254237, 'pattern_counts': {'":': 2, '<': 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': '6616859', 'n_tokens_mistral': 507, 'n_tokens_neox': 481, 'n_words': 86}