<commit_before><?php

$stl = $_POST['stl'];

print $stl;




?><commit_msg>Securing STL data on server<commit_after><?php

$id = uniqid();
$stl = $_POST['stl'];



$link = mysql_connect("localhost","root", "7m76zz23pu");
if (!$link) {
    die('failed' . mysql_error());
}else{
$dbname = "3dtweet";
$tblname="3dt";


mysql_select_db($dbname,$link);
mysql_query('SET NAMES utf8', $link );


//$res_up = mysql_query( "DELETE FROM 3dt WHERE id = '$id'", $link);
	





	$file_name = 'data/'.$id.'.stl';
	touch($file_name);

	chmod( $file_name, 0777 );

	$fp = fopen($file_name, "w");
	fwrite($fp, $stl);
	fclose($fp);

$res_m = mysql_query( "INSERT INTO 3dt(id,stl) VALUES ('$id','$file_name')", $link);


	mysql_close($link);

}

print $id;



?>
{'fraction_non_alphanumeric': 0.23014804845222073, 'fraction_numerical': 0.018842530282637954, 'mean_word_length': 4.858267716535433, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7267038', 'n_tokens_mistral': 337, 'n_tokens_neox': 313, 'n_words': 62}