<commit_before><?php 


function annotateImage($imagePath, $strokeColor, $fillColor) {
	$imagick = new \Imagick(realpath($imagePath));

	
	$draw = new \ImagickDraw();
	$draw->setStrokeColor($strokeColor);
	$draw->setFillColor($fillColor);

	$draw->setStrokeWidth(1);
	$draw->setFontSize(36);
	 
	$text = $_POST["selfxpress"];

	$draw->setFont("/usr/share/fonts/msttcorefonts/impact.ttf");
	$draw->setgravity(imagick::GRAVITY_SOUTH);
	$imagick->annotateimage($draw, 0, 0, 0, $text);
	header("Content-Type: image/jpg");
	echo $imagick->getImageBlob();
	//setting saved file type here. Use date(); to save file with timestamp.jpg
	$imagick->setimageformat("jpeg");
	$timestamp = date('D:H:i');
	$fileToWrite = "tmp/".$timestamp.".jpg";
	$imagick->writeImage ($fileToWrite);
	return $fileToWrite;
	//$imagick->writeImage ("tmp/".$timestamp.".jpg");
	
}

    //if ($_POST["selfxpress"]) {
	//annotateImage("webcam.jpg", black, white);
	//echo "tmp/" . $timestamp . ".jpg";
//}

if ($_POST["selfxpress"]) {
	$imageLocation = annotateImage("webcam.jpg", black, white);
	echo '<img src="' . $imageLocation . '" />';
	echo "test!!!";
}

?><commit_msg>testing<commit_after><?php 
echo "test";

function annotateImage($imagePath, $strokeColor, $fillColor) {
	$imagick = new \Imagick(realpath($imagePath));

	
	$draw = new \ImagickDraw();
	$draw->setStrokeColor($strokeColor);
	$draw->setFillColor($fillColor);

	$draw->setStrokeWidth(1);
	$draw->setFontSize(36);
	 
	$text = $_POST["selfxpress"];

	$draw->setFont("/usr/share/fonts/msttcorefonts/impact.ttf");
	$draw->setgravity(imagick::GRAVITY_SOUTH);
	$imagick->annotateimage($draw, 0, 0, 0, $text);
	header("Content-Type: image/jpg");
	echo $imagick->getImageBlob();
	//setting saved file type here. Use date(); to save file with timestamp.jpg
	$imagick->setimageformat("jpeg");
	$timestamp = date('D:H:i');
	$fileToWrite = "tmp/".$timestamp.".jpg";
	$imagick->writeImage ($fileToWrite);
	return $fileToWrite;
	//$imagick->writeImage ("tmp/".$timestamp.".jpg");
	
}

    //if ($_POST["selfxpress"]) {
	//annotateImage("webcam.jpg", black, white);
	//echo "tmp/" . $timestamp . ".jpg";
//}

if ($_POST["selfxpress"]) {
	$imageLocation = annotateImage("webcam.jpg", black, white);
	echo '<img src="' . $imageLocation . '" />';
}
echo "test!!!";

?>
{'fraction_non_alphanumeric': 0.21887287024901703, 'fraction_numerical': 0.005242463958060288, 'mean_word_length': 5.13941018766756, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 29, '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': '2192126', 'n_tokens_mistral': 882, 'n_tokens_neox': 843, 'n_words': 146}