<commit_before><?php
	// Import the "Grab Bag"
	require "../common.php";

	// Open an (OO) MySQL Connection
	$conn = new mysqli($GLOBALS["dbhost"], $GLOBALS["dbuser"], $GLOBALS["dbpass"], $GLOBALS["dbname"]);

	// Check connection
	if ($conn->connect_error) {
		die("Connection failed: " . $conn->connect_error);
	}

    $id = $_GET["id"];

    $query = "SELECT *
			  FROM  `Semester`";

    if ($id) {
        $id = implode_parameters($id);
        $query .= PHP_EOL . "WHERE `id` IN (" . $id . ")";
    }

	$result = $conn->query($query);
	$semesters = array();
	while ($row = $result->fetch_row()) {
        $semester_start = strtotime("+1 day", strtotime($row[SEMESTER_START]));
        $semester_end = strtotime("+1 day", strtotime($row[SEMESTER_END]));

		array_push($semesters, array(   "id" => $row[SEMESTER_ID],
                                        "name" => $row[SEMESTER_NAME],
                                        "start" => $semester_start,
                                        "end" => $semester_end ));
	}
    $result->close();

	// Echo all of the classes as JSON
	echo json_encode($semesters);

	// Finally, close the connection
	$conn->close();
?><commit_msg>add Type in semester push array<commit_after><?php
	// Import the "Grab Bag"
	require "../common.php";

	// Open an (OO) MySQL Connection
	$conn = new mysqli($GLOBALS["dbhost"], $GLOBALS["dbuser"], $GLOBALS["dbpass"], $GLOBALS["dbname"]);

	// Check connection
	if ($conn->connect_error) {
		die("Connection failed: " . $conn->connect_error);
	}

    $id = $_GET["id"];

    $query = "SELECT *
			  FROM  `Semester`";

    if ($id) {
        $id = implode_parameters($id);
        $query .= PHP_EOL . "WHERE `id` IN (" . $id . ")";
    }

	$result = $conn->query($query);
	$semesters = array();
	while ($row = $result->fetch_row()) {
        $semester_start = strtotime("+1 day", strtotime($row[SEMESTER_START]));
        $semester_end = strtotime("+1 day", strtotime($row[SEMESTER_END]));

		array_push($semesters, array(   "id" => $row[SEMESTER_ID],
                                        "name" => $row[SEMESTER_NAME],
					"type" => $row[TYPE],
                                        "start" => $semester_start,
                                        "end" => $semester_end ));
	}
    $result->close();

	// Echo all of the classes as JSON
	echo json_encode($semesters);

	// Finally, close the connection
	$conn->close();
?>
{'fraction_non_alphanumeric': 0.18520049607275735, 'fraction_numerical': 0.0016535758577924762, 'mean_word_length': 2.408450704225352, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4479597', 'n_tokens_mistral': 832, 'n_tokens_neox': 778, 'n_words': 169}