<commit_before><html>
<head>
<title>dcs-get package listing</title>
</head>
<body>
<h1>Package Listing</h1>
<p>This is an up to date list of all packages available for dcs-get, along with their dependencies.</p>

<h2>Packages</h2>
<?php

error_reporting(0);
//error_reporting(E_ALL);

define('BASE_URL', 'http://backus.uwcs.co.uk/dcs-get/');

$packages = json_decode(file_get_contents(BASE_URL.'packages.json'));

$sorted_packages = array();
foreach ($packages as $package => $data) {
	$sorted_packages[$package] = $data;
}
ksort($sorted_packages);

foreach($sorted_packages as $package => $data) {
	echo '<ul>';
	echo '<li>';
	echo "$package - ";
	if (isset($data->description)) {
		echo "$data->description - ";
	}
	echo 'Version: '.implode(', ', $data->version).'<br>';
	if (isset($data->dependencies)) {
		echo '<ul>';
		foreach ($data->dependencies as $dep => $stuff) {
			echo "<li>$stuff[0] - $stuff[1]</li>";
		}
		echo '</ul>';
	}
	echo '</li>';
	echo '</ul>';
}
?>
</body>
</html>
<?php<commit_msg>Improve how variables are output. Remove useless php tag. Switch to associative arrays for decoded json.<commit_after><html>
<head>
<title>dcs-get package listing</title>
</head>
<body>
<h1>Package Listing</h1>
<p>This is an up to date list of all packages available for dcs-get, along with their dependencies.</p>

<h2>Packages</h2>
<?php

//error_reporting(0);
error_reporting(E_ALL);

define('BASE_URL', 'http://backus.uwcs.co.uk/dcs-get/');

$packages = json_decode(file_get_contents(BASE_URL.'packages.json'), true);
ksort($packages);

foreach($packages as $package => $data) {
	echo '<ul>';
	echo '<li>';
	echo htmlspecialchars($package).' - ';
	if (isset($data['description'])) {
		echo htmlspecialchars($data['description']).' - ';
	}
	echo 'Version: '.htmlspecialchars(implode(', ', $data['version'])).'<br>';
	if (isset($data['dependencies'])) {
		echo '<ul>';
		foreach ($data['dependencies'] as $dep => $details) {
			echo '<li>'.htmlspecialchars($details[0]).' - '.htmlspecialchars($details[1]).'</li>';
		}
		echo '</ul>';
	}
	echo '</li>';
	echo '</ul>';
}
?>
</body>
</html>
{'fraction_non_alphanumeric': 0.22068636796949476, 'fraction_numerical': 0.00667302192564347, 'mean_word_length': 5.066473988439307, 'pattern_counts': {'":': 0, '<': 52, '<?xml version=': 0, '>': 61, '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': '1241862', 'n_tokens_mistral': 782, 'n_tokens_neox': 751, 'n_words': 171}