<commit_before><?php

    /**
     * Constants
     *
     */

    // Start time
    define('START', microtime(true));

    // CLI
    $cli = false;
    if (isset($_SERVER['argv']) === true && count($_SERVER['argv']) > 2) {
        $argv = $_SERVER['argv'];
        array_shift($argv);
        array_shift($argv);
        $param = $argv[0];
        $pieces = explode('=', $param);
        $cli = $pieces[1] === '1';
    }
    define('CLI', $cli);

    // Paths
    $root = $_SERVER['DOCUMENT_ROOT'];
    if ($root === '') {
        $root = str_replace('/application/includes', '', getcwd());
    }
    $uri = $_SERVER['SCRIPT_NAME'];
    if (isset($_SERVER['REQUEST_URI']) === true) {
        $uri = $_SERVER['REQUEST_URI'];
    }
    define('APP', ($root) . '/application');
    define('WEBROOT', (APP) . '/webroot');
    define('CORE', ($root) . '/core');

    // ip
    $ip = false;
    if (isset($_SERVER['REMOTE_ADDR']) === true) {
        $ip = $_SERVER['REMOTE_ADDR'];
        if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
            $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
        }
    }
    define('IP', $ip);

    // https check
    $https = false;
    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') {
        $https = true;
    }
    if (
        isset($_SERVER['HTTP_X_FORWARDED_PROTO'])
        && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https'<commit_msg>Update index.php<commit_after><?php

    /**
     * Constants
     *
     */

    // Start time
    define('START', microtime(true));

    /**
     * getArv
     * 
     * @access public
     * @param  string $key
     * @return mixed|false
     */
    function getArgv($key) {
        $hash = array();
        foreach ($_SERVER['argv'] as $value) {
            if (strstr($value, '=') !== false) {
                $pieces = explode('=', $value);
                $hash[$pieces[0]] = $pieces[1];
            }
        }
        if (isset($hash[$key]) === true) {
            return $hash[$key];
        }
        return false;
    }

    // CLI
    $cli = false;
    if (getArgv('CLI') !== false) {
        $cli = true;
    }
    define('CLI', $cli);

    // Document root
    $root = $_SERVER['DOCUMENT_ROOT'];
    if ($root === '') {
        $root = str_replace('/application/includes', '', getcwd());
    }

    // URI
    if (isset($_SERVER['REQUEST_URI']) === true) {
        $uri = $_SERVER['REQUEST_URI'];
    } else {
        $uri = getArgv('uri');
    }

    define('APP', ($root) . '/application');
    define('WEBROOT', (APP) . '/webroot');
    define('CORE', ($root) . '/core');

    // ip
    $ip = false;
    if (isset($_SERVER['REMOTE_ADDR']) === true) {
        $ip = $_SERVER['REMOTE_ADDR'];
        if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
            $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
        }
    }
    define('IP', $ip);

    // https check
    $https = false;
    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') {
        $https = true;
    }
    if (
        isset($_SERVER['HTTP_X_FORWARDED_PROTO'])
        && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https'
{'fraction_non_alphanumeric': 0.21229773462783172, 'fraction_numerical': 0.001941747572815534, 'mean_word_length': 2.097194388777555, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '2303242', 'n_tokens_mistral': 1054, 'n_tokens_neox': 1020, 'n_words': 182}