<commit_before><?php
    ini_set('display_errors', 'On');

    require_once('Database/protein.php');

    require 'lib/Slim/Slim.php';
    \Slim\Slim::registerAutoloader();

    require 'lib/Twig/Autoloader.php';
    Twig_Autoloader::register();

    $app = new \Slim\Slim(array(
        'debug' => true,
        'view' => new \Slim\Views\Twig(),
        'templates.path' => 'templates'
    ));

    $view = $app->view();
    
    $view->parserOptions = array(
        'debug' => true,
        'cache' => dirname(__FILE__) . '/cache'
    );

    // ROUTES

    $app->get('/', function () use ($app) {
        $app->render('index.html');
    });

    $app->get('/proteins', function () use ($app) {

        $app->render('proteins/list.html');
    });

    $app->run();
?><commit_msg>Added a temporary route to be used in my LGP project<commit_after><?php
    ini_set('display_errors', 'On');

    require_once('Database/protein.php');

    require 'lib/Slim/Slim.php';
    \Slim\Slim::registerAutoloader();

    require 'lib/Twig/Autoloader.php';
    Twig_Autoloader::register();

    $app = new \Slim\Slim(array(
        'debug' => true,
        'view' => new \Slim\Views\Twig(),
        'templates.path' => 'templates'
    ));

    $view = $app->view();
    
    $view->parserOptions = array(
        'debug' => true,
        'cache' => dirname(__FILE__) . '/cache'
    );

    // ROUTES

    $app->get('/', function () use ($app) {
        $app->render('index.html');
    });

    $app->get('/proteins', function () use ($app) {

        $app->render('proteins/list.html');
    });


    /* Temporary stuff for my LGP project */
    $app->get('/lgp/products/:productId', function ($productId) use ($app) {
        $result = array(
            "id" => $productId,
            "name" => "Product #".$productId,
            "description" => "The longer description for the product",
            "smallDescription" => "The smaller description for the product"
        );
        header("Content-Type: application/json");
        echo json_encode($result);
    });

    $app->run();
?>
{'fraction_non_alphanumeric': 0.19539126260201634, 'fraction_numerical': 0.0, 'mean_word_length': 2.361290322580645, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 34, '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': '5485478', 'n_tokens_mistral': 702, 'n_tokens_neox': 684, 'n_words': 128}