<commit_before><?php

function ini2bytes($s)
{
	$s = trim($s);
	$l = strtolower($s[strlen($s) - 1]);
	switch($l) {
		case 'g':
			$s *= 1024;
		case 'm':
			$s *= 1024;
		case 'k':
			$s *= 1024;
	}
	return $s;
}

function byteConvert($bytes)
{
        $s = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB');

        if ($bytes != 0) {
        	$e = floor(log($bytes)/log(1024));
        	return sprintf('%.2f '.$s[$e], ($bytes/pow(1024, floor($e))));
        } else {
        	$e = 0;
        	return sprintf('%.2f '.$s[$e], $bytes);
        }
}

function errorMsg($msg)
{
	die($msg);
}

function checkExists($f)
{
	$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
	if(file_exists($f)) {
		$f = explode('.', $f);
		$f[count($f) - 2] .= $chars[rand(0, strlen($chars) - 1)];
		$f = checkExists(implode('.', $f));
	}
	return $f;
}

function url() {
	$url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
	if ($url[count($url) - 1] != '/') {
		$url .= '/';
	}
	return $url;
}

function move_uploaded_file_save($f, $d)
{
	$dir = dirname($d);
	if (!file_exists($dir)) {<commit_msg>- Fixed: two / at and of url<commit_after><?php

function ini2bytes($s)
{
	$s = trim($s);
	$l = strtolower($s[strlen($s) - 1]);
	switch($l) {
		case 'g':
			$s *= 1024;
		case 'm':
			$s *= 1024;
		case 'k':
			$s *= 1024;
	}
	return $s;
}

function byteConvert($bytes)
{
        $s = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB');

        if ($bytes != 0) {
        	$e = floor(log($bytes)/log(1024));
        	return sprintf('%.2f '.$s[$e], ($bytes/pow(1024, floor($e))));
        } else {
        	$e = 0;
        	return sprintf('%.2f '.$s[$e], $bytes);
        }
}

function errorMsg($msg)
{
	die($msg);
}

function checkExists($f)
{
	$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
	if(file_exists($f)) {
		$f = explode('.', $f);
		$f[count($f) - 2] .= $chars[rand(0, strlen($chars) - 1)];
		$f = checkExists(implode('.', $f));
	}
	return $f;
}

function url() {
	$url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
	if ($url[strlen($url) - 1] != '/') {
		$url .= '/';
	}
	return $url;
}

function move_uploaded_file_save($f, $d)
{
	$dir = dirname($d);
	if (!file_exists($dir)) {
{'fraction_non_alphanumeric': 0.2524401064773736, 'fraction_numerical': 0.0354924578527063, 'mean_word_length': 3.1149635036496353, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2834135', 'n_tokens_mistral': 1076, 'n_tokens_neox': 974, 'n_words': 184}