<commit_before><?php
// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
/**
 * Framework to include on every page
 *
 * This does the following:
 * - define a few constants to make referencing easier
 * 
 * @package tgiframework
 * @subpackage global
 * @copyright 2009 <NAME>
 * @license GNU Lesser General Public License <http://www.gnu.org/licenses/lgpl.html>
 * @author <NAME> <<EMAIL>>
 */
// start timer {{{
if (!isset($GLOBALS['_start_time'])) {
    /**
     * As near as we can get to the start time of the script.
     *
     * If we don't start it manually, it will start when {@link preinclude.php}
     * loads.
     *
     * @global string $GLOBALS['_start_time']
     * @name $_start_time
     */
    $GLOBALS['_start_time'] = microtime();
}
// }}}
// define constants {{{
// {{{ TGIF_DIR
if (!defined('TGIF_DIR')) {
    /**
     * The directory where the framework code is stored
     */
    define('TGIF_DIR',dirname(dirname(realpath(__FILE__))));
}
// }}}
// TGIF_FUNC_DIRD {{{
/**
 * The directory where functions used by the framework are stored
 */
define('TGIF_FUNC_DIRD', TGIF_DIR.DIRECTORY_SEPARATOR.'func'.DIRECTORY_SEPARATOR);
// }}}
// TGIF_CLASS_DIR {{{
/**
 * The directory where the "tgif_" namespace classes are stored
 */
define('TGIF_CLASS_DIR', TGIF_DIR.DIRECTORY_SEPARATOR.'class');
// }}}
// TGIF_BIN_DIR {{{
/**
 * The directory where framework binaries are stored.
 */
define('TGIF_BIN_DIR', TGIF_DIR.DIRECTORY_SEPARATOR.'bin');
// }}}
// }}}
// bind autoload {{{
/**
 * Lookup function for objects
 */
if (!function_exists('__autoload')) {
    // Load the default callback so that the framework works
    require_once TGIF_FUNC_DIRD.'__autoload.php';
} // else you must have written and defined your own autoloader
if (strcmp(ini_get('unserialize_callback_func'),'__autoload')!==0) {
    // Didn't set the serialze to autoload in php.ini
    ini_set('unserialize_callback_func','__autoload');
}
// }}}
// global config and variables {{{
if (empty($symbol)) {
    if (!defined('SYMBOL_FILE')) { die('Define a SYMBOL_FILE to point to a php file that returns a three letter code!'); }
    $symbol = @include(SYMBOL_FILE);
    if (empty($symbol)) { die(sprintf('Set up %s!',$SYMBOL_FILE)); }
}
// This should be superglobaled already by runkit (let's hope so!)
//$GLOBALS['_TAG'] = tgif_global::get_instance($symbol);
//$_TAG = $GLOBALS['_TAG'];<commit_msg>TGIF_CONF_DIR not set for proper bootstrapping<commit_after><?php
// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
/**
 * Framework to include on every page
 *
 * This does the following:
 * - define a few constants to make referencing easier
 * 
 * @package tgiframework
 * @subpackage global
 * @copyright 2009 <NAME>
 * @license GNU Lesser General Public License <http://www.gnu.org/licenses/lgpl.html>
 * @author <NAME> <<EMAIL>>
 */
// start timer {{{
if (!isset($GLOBALS['_start_time'])) {
    /**
     * As near as we can get to the start time of the script.
     *
     * If we don't start it manually, it will start when {@link preinclude.php}
     * loads.
     *
     * @global string $GLOBALS['_start_time']
     * @name $_start_time
     */
    $GLOBALS['_start_time'] = microtime();
}
// }}}
// define constants {{{
// {{{ TGIF_DIR
if (!defined('TGIF_DIR')) {
    /**
     * The directory where the framework code is stored
     */
    define('TGIF_DIR',dirname(dirname(realpath(__FILE__))));
}
// }}}
// TGIF_FUNC_DIRD {{{
/**
 * The directory where functions used by the framework are stored
 */
define('TGIF_FUNC_DIRD', TGIF_DIR.DIRECTORY_SEPARATOR.'func'.DIRECTORY_SEPARATOR);
// }}}
// TGIF_CLASS_DIR {{{
/**
 * The directory where the "tgif_" namespace classes are stored
 */
define('TGIF_CLASS_DIR', TGIF_DIR.DIRECTORY_SEPARATOR.'class');
// }}}
// TGIF_BIN_DIR {{{
/**
 * The directory where framework binaries are stored.
 */
define('TGIF_BIN_DIR', TGIF_DIR.DIRECTORY_SEPARATOR.'bin');
// }}}
// {{{ TGIF_DIR
if (!defined('TGIF_CONF_PATH')) {
    /**
     * where ot get configururation overrides
     */
    define('TGIF_CONF_PATH','');
}
// }}}
// }}}
// bind autoload {{{
/**
 * Lookup function for objects
 */
if (!function_exists('__autoload')) {
    // Load the default callback so that the framework works
    require_once TGIF_FUNC_DIRD.'__autoload.php';
} // else you must have written and defined your own autoloader
if (strcmp(ini_get('unserialize_callback_func'),'__autoload')!==0) {
    // Didn't set the serialze to autoload in php.ini
    ini_set('unserialize_callback_func','__autoload');
}
// }}}
// global config and variables {{{
if (empty($symbol)) {
    if (!defined('SYMBOL_FILE')) { die('Define a SYMBOL_FILE to point to a php file that returns a three letter code!'); }
    $symbol = @include(SYMBOL_FILE);
    if (empty($symbol)) { die(sprintf('Set up %s!',$SYMBOL_FILE)); }
}
// This should be superglobaled already by runkit (let's hope so!)
//$GLOBALS['_TAG'] = tgif_global::get_instance($symbol);
//$_TAG = $GLOBALS['_TAG'];
{'fraction_non_alphanumeric': 0.15923061669641086, 'fraction_numerical': 0.003172714653975808, 'mean_word_length': 3.85, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, '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': '6173300', 'n_tokens_mistral': 1697, 'n_tokens_neox': 1638, 'n_words': 439}