<commit_before><?php
        require_once("info.php");
        $isset_user=isset($_POST["app_user"]);
        $isset_password=isset($_POST["app_password"]);
        $isset_pin=isset($_POST["pin"]);
        $response=array();
        if($isset_user&&$isset_password&&$isset_pin){
                $valid_user=$_POST["app_user"]==$user;
                $valid_password=$_POST["app_password"]==$password;
                if($valid_user&&$valid_password){
                        $pin=$_POST["pin"];
                        $response=exec("sudo python /var/www/html/RPiGpioController/pyton/write.py ".$pin);
                }else{
                        $response["state"]="2";
                        $response["message"]="Invalid credentials.";
                        print(json_encode($response));
                }
        }else{
                $response["state"]="0";
                $response["message"]="No credetials send.";
                print(json_encode($response));
        }
?><commit_msg>read pin state<commit_after><?php
        require_once("info.php");
        $isset_user=isset($_POST[$appUser]);
	$isset_password=isset($_POST[$appPassword]);
        $isset_pin=isset($_POST[$pin]);
        $response=array();
        if($isset_user&&$isset_password&&$isset_pin){
                $valid_user=$_POST[$appUser]==$user;
                $valid_password=$_POST[$appPassword]==$password;
                if($valid_user&&$valid_password){
                        $pinNumber=$_POST[$pin];
                        $response=exec($readUrl." ".$pinNumber);
                }else{
                        $response[$state]=$invalidCredentials;
			$response[$message]=$invalidCredentialsMessage;
                        print(json_encode($response));
                }
        }else{
                $response[$state]=$noCredetialsSend;
                $response[$message]=$noCredetialsSendMessage;
                print(json_encode($response));
        }
?>
{'fraction_non_alphanumeric': 0.15944982170147734, 'fraction_numerical': 0.0010188487009679063, 'mean_word_length': 1.9578313253012047, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '1942931', 'n_tokens_mistral': 543, 'n_tokens_neox': 519, 'n_words': 49}