<commit_before><?php
/**
 * bootstrap installer.
 *
 * The boostrap installer is used to configure the app/Config/bootstrap file
 * to preserve the hooks between kora and cakephp.
 *
 * @package    ARCS
 * @link       http://svn.matrix.msu.edu/svn/arcs/
 * @copyright  Copyright 2012, Michigan State University Board of Trustees
 * @license    BSD License (http://www.opensource.org/licenses/bsd-license.php)
 * @author <NAME>
 */

  if(sizeof($argv) == 1)
    command_prompt();

  else if(sizeof($argv) == 2){

    $json = file_get_contents($argv[1]);

    if($json != false && isJson($json)){
      echo "Extracting Config from Json \n";
      $bootstrap = copy_bootstrap();
      loop_replace($bootstrap, $json);
      echo "Creating bootstrap \n";
      write_to_file($bootstrap);
    }
    else{
      echo "ERROR: could not parse JSON from file!"
    }

  }
  function isJson($string) {
   json_decode($string);
   return (json_last_error() == JSON_ERROR_NONE);
  }

  function command_prompt(){
      echo "Run Boostrap Configure (Y/N)? ";
      $stdin = fopen('php://stdin', 'r');
      $response = strtoupper(fgetc($stdin));
      if($response == "Y"){
          run_boot_config();
      }
  }
  function copy_json($json){
    $response = NULL;
    echo "Would you like to make a copy of the configuration (Y/N)? ";
    $stdin = fopen('php://stdin', 'r');
    $response = strtoupper(fgetc($stdin));

    while($response != "Y" && $response != "N" ){
      echo "Please enter 'Y' or 'N' \n";
      echo "Would you like to make a copy of the configuration (Y/N)? ";
      $stdin = fopen('php://stdin', 'r');
      $response = strtoupper(fgetc($stdin));
    }<commit_msg>fixed small error in bootstrap config<commit_after><?php
/**
 * bootstrap installer.
 *
 * The boostrap installer is used to configure the app/Config/bootstrap file
 * to preserve the hooks between kora and cakephp.
 *
 * @package    ARCS
 * @link       http://svn.matrix.msu.edu/svn/arcs/
 * @copyright  Copyright 2012, Michigan State University Board of Trustees
 * @license    BSD License (http://www.opensource.org/licenses/bsd-license.php)
 * @author <NAME>
 */

  if(sizeof($argv) == 1)
    command_prompt();

  else if(sizeof($argv) == 2){

    $json = file_get_contents($argv[1]);

    if($json != false && isJson($json)){
      echo "Extracting Config from Json \n";
      $bootstrap = copy_bootstrap();
      loop_replace($bootstrap, $json);
      echo "Creating bootstrap \n";
      write_to_file($bootstrap);
    }
    else{
      echo "ERROR: could not parse JSON from file!";
    }

  }
  function isJson($string) {
   json_decode($string);
   return (json_last_error() == JSON_ERROR_NONE);
  }

  function command_prompt(){
      echo "Run Boostrap Configure (Y/N)? ";
      $stdin = fopen('php://stdin', 'r');
      $response = strtoupper(fgetc($stdin));
      if($response == "Y"){
          run_boot_config();
      }
  }
  function copy_json($json){
    $response = NULL;
    echo "Would you like to make a copy of the configuration (Y/N)? ";
    $stdin = fopen('php://stdin', 'r');
    $response = strtoupper(fgetc($stdin));

    while($response != "Y" && $response != "N" ){
      echo "Please enter 'Y' or 'N' \n";
      echo "Would you like to make a copy of the configuration (Y/N)? ";
      $stdin = fopen('php://stdin', 'r');
      $response = strtoupper(fgetc($stdin));
    }
{'fraction_non_alphanumeric': 0.15833086712044983, 'fraction_numerical': 0.004143237644273453, 'mean_word_length': 2.9858490566037736, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7209571', 'n_tokens_mistral': 1132, 'n_tokens_neox': 1083, 'n_words': 295}