<commit_before><?

require_once "../../../lib/db.php";
											
$db = db::$connection;
$stmt = $db->prepare("INSERT INTO Buildings (name,latitude,longitude,physical_address,type,subtype,code,parent,phone,website,hours,campus) values (?, ?, ?, ?, ?, ?,?,?,?,?,?,?,?)");

$filename = "buildings.txt";
$fd = fopen ($filename, "r");
$contents = fread ($fd,filesize ($filename));
fclose ($fd); 

$lines = explode("\r", $contents);
foreach ($lines as $line) {
	$fields = explode("\t", $line);
	if (db::$use_sqlite) {
		$stmt->execute(array($fields[1], $fields[2], $fields[3], $fields[4], $fields[5], $fields[6], $fields[7], $fields[8], $fields[9], $fields[10], $fields[11],$fields[12], $fields[13]));
	}
	else {
		$stmt->bind_param('ssssssssssss', $fields[1], $fields[2], $fields[3], $fields[4], $fields[5], $fields[6], $fields[7], $fields[8], $fields[9], $fields[10], $fields[11],$fields[12], $fields[13]);
		$stmt->execute();
	}
}

?><commit_msg>fixing the save buildings script<commit_after><?

require_once "../../../lib/db.php";
											
$db = db::$connection;
$stmt = $db->prepare("INSERT INTO Buildings (name,latitude,longitude,physical_address,type,subtype,code,parent,wifi,phone,website,hours,campus) values (?,?,?,?,?,?,?,?,?,?,?,?,?)");

$filename = "buildings.txt";
$fd = fopen ($filename, "r");
$contents = fread ($fd,filesize ($filename));
fclose ($fd); 

$lines = explode("\r", $contents);
foreach ($lines as $line) {
	$fields = explode("\t", $line);
	if (db::$use_sqlite) {
		$stmt->execute(array($fields[0], $fields[1], $fields[2], $fields[3], $fields[4], $fields[5], $fields[6], $fields[7], $fields[8], $fields[9], $fields[10],$fields[11], $fields[12]));
	}
	else {
		$stmt->bind_param('ssssssssssss', $fields[0], $fields[1], $fields[2], $fields[3], $fields[4], $fields[5], $fields[6], $fields[7], $fields[8], $fields[9], $fields[10], $fields[11],$fields[12]);
		$stmt->execute();
	}
}

?>
{'fraction_non_alphanumeric': 0.27949659150498163, 'fraction_numerical': 0.0346093340325118, 'mean_word_length': 6.511811023622047, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '3730462', 'n_tokens_mistral': 774, 'n_tokens_neox': 731, 'n_words': 128}