<commit_before><?php
	require_once('src/QrCode.php');

	use Endroid\QrCode\QrCode;

	$text = "";
	$hyperlink = "/";
	$size = 100;
	$foregroundColor = array('r' => 0, 'g' => 0, 'b' => 0, 'a' => 0);
	$backgroundColor = array('r' => 255, 'g' => 255, 'b' => 255, 'a' => 0);
	$padding = 5;

	if(isset($_GET['text'])){
		$text = $_GET['text'];
	}

	if(isset($_GET['link'])){
		$hyperlink = $_GET['link'];
	}

	if(isset($_GET['size'])){
		$size = $_GET['size'];
	}

	if(isset($_GET['padding'])){
		$padding = $_GET['padding'];
	}

	if(isset($_GET['color'])){
		$red = hexdec(substr("#" . $_GET['color'], 1, 2));
		$green = hexdec(substr("#" . $_GET['color'], 3, 2));
		$blue = hexdec(substr("#" . $_GET['color'], 5, 2));
		$foregroundColor = array('r' => $red, 'g' => $green, 'b' => $blue, 'a' => 0);
	}

	if(isset($_GET['bgcolor'])){
		$red = hexdec(substr("#" . $_GET['bgcolor'], 1, 2));
		$green = hexdec(substr("#" . $_GET['bgcolor'], 3, 2));
		$blue = hexdec(substr("#" . $_GET['bgcolor'], 5, 2));
		$backgroundColor = array('r' => $red, 'g' => $green, 'b' => $blue, 'a' => 0);
	}

	$qr = new QrCode;
	$qr
		-> setText($hyperlink)
		-> setSize($size)
		-> setForegroundColor($foregroundColor)
    		-> setBackgroundColor($backgroundColor)
		-> setPadding($padding)
    		-> setErrorCorrection('high')
    		-> setImageType(QrCode::IMAGE_TYPE_PNG)
		-> render();
?><commit_msg>qr code error correction isn't heigh anymore -> easier to scan<commit_after><?php
	require_once('src/QrCode.php');

	use Endroid\QrCode\QrCode;

	$text = "";
	$hyperlink = "/";
	$size = 100;
	$foregroundColor = array('r' => 0, 'g' => 0, 'b' => 0, 'a' => 0);
	$backgroundColor = array('r' => 255, 'g' => 255, 'b' => 255, 'a' => 0);
	$padding = 5;

	if(isset($_GET['text'])){
		$text = $_GET['text'];
	}

	if(isset($_GET['link'])){
		$hyperlink = $_GET['link'];
	}

	if(isset($_GET['size'])){
		$size = $_GET['size'];
	}

	if(isset($_GET['padding'])){
		$padding = $_GET['padding'];
	}

	if(isset($_GET['color'])){
		$red = hexdec(substr("#" . $_GET['color'], 1, 2));
		$green = hexdec(substr("#" . $_GET['color'], 3, 2));
		$blue = hexdec(substr("#" . $_GET['color'], 5, 2));
		$foregroundColor = array('r' => $red, 'g' => $green, 'b' => $blue, 'a' => 0);
	}

	if(isset($_GET['bgcolor'])){
		$red = hexdec(substr("#" . $_GET['bgcolor'], 1, 2));
		$green = hexdec(substr("#" . $_GET['bgcolor'], 3, 2));
		$blue = hexdec(substr("#" . $_GET['bgcolor'], 5, 2));
		$backgroundColor = array('r' => $red, 'g' => $green, 'b' => $blue, 'a' => 0);
	}

	$qr = new QrCode;
	$qr
		-> setText($hyperlink)
		-> setSize($size)
		-> setForegroundColor($foregroundColor)
    		-> setBackgroundColor($backgroundColor)
		-> setPadding($padding)
    		-> setImageType(QrCode::IMAGE_TYPE_PNG)
		-> render();
?>
{'fraction_non_alphanumeric': 0.2799710249909453, 'fraction_numerical': 0.023180007243752264, 'mean_word_length': 4.260952380952381, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 53, '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': '1978140', 'n_tokens_mistral': 1231, 'n_tokens_neox': 1110, 'n_words': 212}