<commit_before><?php

/* To help the built-in PHP dev server, check if the request was actually for
 * something which should probably be served as a static file
 */
if (PHP_SAPI == 'cli-server') {
    $file = reset(explode("?",__DIR__ . $_SERVER['REQUEST_URI']));
    if (is_file($file)) {
        return false;
    }
}

/* Only used in development, clearing compiled templates on every call*/
foreach (glob(__DIR__ . '/../cache/*') as $file) {
  unlink($file);
}


require __DIR__ . '/../vendor/autoload.php';

session_start();

// Instantiate the app
$settings = require __DIR__ . '/../config/settings.php';

date_default_timezone_set($settings['settings']['timezone']);

$app = new \Slim\App($settings);

// Set up acl
require __DIR__ . '/../src/acl.php';
<commit_msg>moved cache clear call to dev part<commit_after><?php

/* To help the built-in PHP dev server, check if the request was actually for
 * something which should probably be served as a static file
 */
if (PHP_SAPI == 'cli-server') {
    $file = reset(explode("?",__DIR__ . $_SERVER['REQUEST_URI']));
    if (is_file($file)) {
        return false;
    }
    /* 
     * Clear the template cache on every call
     * to keep the output up to date on template changes.
     */
    foreach (glob(__DIR__ . '/../cache/*') as $file) {
      unlink($file);
    }
}

require __DIR__ . '/../vendor/autoload.php';

session_start();

// Instantiate the app
$settings = require __DIR__ . '/../config/settings.php';

date_default_timezone_set($settings['settings']['timezone']);

$app = new \Slim\App($settings);

// Set up acl
require __DIR__ . '/../src/acl.php';

{'fraction_non_alphanumeric': 0.16152897657213316, 'fraction_numerical': 0.0, 'mean_word_length': 3.2710526315789474, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '2080145', 'n_tokens_mistral': 519, 'n_tokens_neox': 514, 'n_words': 157}