<commit_before><?php


    // Define path to application directory
    defined('APPLICATION_PATH')
        || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

    // Define application environment
    defined('APPLICATION_ENV')
        || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

    // Ensure library/ is on include_path
    set_include_path(implode(PATH_SEPARATOR, array(
        realpath(APPLICATION_PATH . '/../library'),
        realpath('.'),
    )));

    /** Zend_Application */
    require_once 'Zend/Application.php';

    // Create application, bootstrap, and run
    $application = new Zend_Application(
        APPLICATION_ENV,
        APPLICATION_PATH . '/configs/application.ini'
    );
    $application->bootstrap();       
    Bootstrap::setBootstrap($application->getBootstrap());
    
    $db = $application->getBootstrap()->getResource('db');
    
    $serverModel = new Application_Model_Server();

    $server = new Zend_Json_Server();
    $server->setClass($serverModel);

    if ('GET' == filter_input(INPUT_SERVER, "REQUEST_METHOD", FILTER_SANITIZE_STRING)){
        // Indicate the URL endpoint, and the JSON-RPC version used:
        $server->setTarget('/rpc.php')
               ->setEnvelope(Zend_Json_Server_Smd::ENV_JSONRPC_2);

        // Grab the SMD
        $smd = $server->getServiceMap();

        // Return the SMD to the client
        header('Content-Type: application/json');
        if(APPLICATION_ENV=='development'){
            echo  Zend_Json::prettyPrint($smd);
        } else {
            echo $smd;
        }
        
        return;
    }
    
    $server->setAutoEmitResponse(false);

    $rawJSON = $server->handle();

    if(APPLICATION_ENV=='development'){
        echo  Zend_Json::prettyPrint($rawJSON);
    } else {
        echo $rawJSON;
    }<commit_msg>Turned off debug pretty printing<commit_after><?php


    // Define path to application directory
    defined('APPLICATION_PATH')
        || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

    // Define application environment
    defined('APPLICATION_ENV')
        || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

    // Ensure library/ is on include_path
    set_include_path(implode(PATH_SEPARATOR, array(
        realpath(APPLICATION_PATH . '/../library'),
        realpath('.'),
    )));

    /** Zend_Application */
    require_once 'Zend/Application.php';

    // Create application, bootstrap, and run
    $application = new Zend_Application(
        APPLICATION_ENV,
        APPLICATION_PATH . '/configs/application.ini'
    );
    $application->bootstrap();       
    Bootstrap::setBootstrap($application->getBootstrap());
    
    $db = $application->getBootstrap()->getResource('db');
    
    $serverModel = new Application_Model_Server();

    $server = new Zend_Json_Server();
    $server->setClass($serverModel);

    if ('GET' == filter_input(INPUT_SERVER, "REQUEST_METHOD", FILTER_SANITIZE_STRING)){
        // Indicate the URL endpoint, and the JSON-RPC version used:
        $server->setTarget('/rpc.php')
               ->setEnvelope(Zend_Json_Server_Smd::ENV_JSONRPC_2);

        // Grab the SMD
        $smd = $server->getServiceMap();

        // Return the SMD to the client
        header('Content-Type: application/json');
        if(APPLICATION_ENV=='development'){
            echo  Zend_Json::prettyPrint($smd);
        } else {
            echo $smd;
        }
        
        return;
    }
    
    $server->setAutoEmitResponse(true);

    $rawJSON = $server->handle();
/*
    if(APPLICATION_ENV=='development'){
        echo  Zend_Json::prettyPrint($rawJSON);
    } else {
        echo $rawJSON;
    }
 * */
{'fraction_non_alphanumeric': 0.1393099843178254, 'fraction_numerical': 0.0005227391531625719, 'mean_word_length': 2.744618395303327, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '6763775', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1089, 'n_words': 200}