<commit_before><?php
// Pull in the configuration file.. (Yes this actually works)
$config = include "config.php";

// Set debugging if enabled
define('DEBUG',!empty($config->debug));

// Load up the class auto loader
require_once "classes/Init.php";

Template::addTemplatePath(dirname(__FILE__).'/templates');
Database::setDSN($config->db->dsn, $config->db->user, $config->db->password);

if (empty($_SERVER['PATH_INFO'])) {
    try {
        $tpl = new Template("index.xhtml");
        $tpl->js = array(
            'ajaxRoot'=>json_encode(Util::AjaxBaseURI())
        );
        $tpl->levels = new RangeIterator(1, 50);
        $tpl->realms = array('Syrtis','Ignis','Alsius');
        $tpl->powers = new RangeIterator(1, 5);
        $tpl->echoExecute();
    } catch (Exception $ex) {
        die ((string)$ex);
    }
} else {
    try {
        $path_info = explode("/",trim($_SERVER['PATH_INFO'],'/'));
        if ($path_info[0]=='ajax' && !empty($path_info[1])
                && preg_match("/^[a-zA-Z]+$/",$path_info[1])) {
            // Process Ajax request
            require_once(dirname(__FILE__).'/ajax/'.$path_info[1].'.php');
            $class = 'ajax_'.$path_info[1];
            $data = call_user_func(array($class,'request'), array_slice($path_info,2));
<commit_msg>remove old unused template data<commit_after><?php
// Pull in the configuration file.. (Yes this actually works)
$config = include "config.php";

// Set debugging if enabled
define('DEBUG',!empty($config->debug));

// Load up the class auto loader
require_once "classes/Init.php";

Template::addTemplatePath(dirname(__FILE__).'/templates');
Database::setDSN($config->db->dsn, $config->db->user, $config->db->password);

if (empty($_SERVER['PATH_INFO'])) {
    try {
        $tpl = new Template("index.xhtml");
        $tpl->js = array(
            'ajaxRoot'=>json_encode(Util::AjaxBaseURI())
        );
        $tpl->echoExecute();
    } catch (Exception $ex) {
        die ((string)$ex);
    }
} else {
    try {
        $path_info = explode("/",trim($_SERVER['PATH_INFO'],'/'));
        if ($path_info[0]=='ajax' && !empty($path_info[1])
                && preg_match("/^[a-zA-Z]+$/",$path_info[1])) {
            // Process Ajax request
            require_once(dirname(__FILE__).'/ajax/'.$path_info[1].'.php');
            $class = 'ajax_'.$path_info[1];
            $data = call_user_func(array($class,'request'), array_slice($path_info,2));

{'fraction_non_alphanumeric': 0.20189144736842105, 'fraction_numerical': 0.0069901315789473685, 'mean_word_length': 3.1028667790893762, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 26, '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': '5138681', 'n_tokens_mistral': 785, 'n_tokens_neox': 772, 'n_words': 138}