<commit_before><?php
/**
 * YouTube Subtitle Explorer
 * 
 * @author  <NAME> <<EMAIL>>
 * @copyright 2012 <NAME>
 * @license http://opensource.org/licenses/mit-license.php MIT License
 */

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

define('YTSE_ROOT', __DIR__);
define('YTSE_CONFIG_FILE', YTSE_ROOT.'/config/config.yaml');

$app = new Silex\Application();

$app->register(new Igorw\Silex\ConfigServiceProvider(YTSE_CONFIG_FILE, array(
    'ytse.root' => YTSE_ROOT,
)));

$app['ytse.root'] = YTSE_ROOT;

if (!$app['debug']){
    error_reporting(0);
}

$app->register(new Silex\Provider\MonologServiceProvider(), array(
    'monolog.logfile' => YTSE_ROOT.'/logs/ytse.log',
));

// email service provider
$app->register(new Silex\Provider\SwiftmailerServiceProvider());

// doctrine for db functions
$app->register(new Silex\Provider\DoctrineServiceProvider(), array(
    'db.options' => array(
        'driver'   => 'pdo_sqlite',
        'path'     => $app['ytse.config']['db.path'],
    ),
));

// url service provider
$app->register(new Silex\Provider\UrlGeneratorServiceProvider());
// register the session extension
$app->register(new Silex\Provider\SessionServiceProvider(), array(
    'session.storage.options' => array(
        'secure' => true
    )
));
// register twig templating
$app->register(new Silex\Provider\TwigServiceProvider(), array(
    'twig.path' => array(
        YTSE_ROOT.'/user/views',
        YTSE_ROOT.'/app/views',
        YTSE_ROOT.'/app', // for user override inheritence<commit_msg>defaulting log level to warn<commit_after><?php
/**
 * YouTube Subtitle Explorer
 * 
 * @author  <NAME> <<EMAIL>inated.net>
 * @copyright 2012 <NAME>
 * @license http://opensource.org/licenses/mit-license.php MIT License
 */

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

define('YTSE_ROOT', __DIR__);
define('YTSE_CONFIG_FILE', YTSE_ROOT.'/config/config.yaml');

$app = new Silex\Application();

$app->register(new Igorw\Silex\ConfigServiceProvider(YTSE_CONFIG_FILE, array(
    'ytse.root' => YTSE_ROOT,
)));

$app['ytse.root'] = YTSE_ROOT;

if (!$app['debug']){
    error_reporting(0);
}

$app->register(new Silex\Provider\MonologServiceProvider(), array(
    'monolog.logfile' => YTSE_ROOT.'/logs/ytse.log',
    'monolog.level' => Monolog\Logger::WARNING,
));

// email service provider
$app->register(new Silex\Provider\SwiftmailerServiceProvider());

// doctrine for db functions
$app->register(new Silex\Provider\DoctrineServiceProvider(), array(
    'db.options' => array(
        'driver'   => 'pdo_sqlite',
        'path'     => $app['ytse.config']['db.path'],
    ),
));

// url service provider
$app->register(new Silex\Provider\UrlGeneratorServiceProvider());
// register the session extension
$app->register(new Silex\Provider\SessionServiceProvider(), array(
    'session.storage.options' => array(
        'secure' => true
    )
));
// register twig templating
$app->register(new Silex\Provider\TwigServiceProvider(), array(
    'twig.path' => array(
        YTSE_ROOT.'/user/views',
        YTSE_ROOT.'/app/views',
        YTSE_ROOT.'/app', // for user override inheritence
{'fraction_non_alphanumeric': 0.17326892109500805, 'fraction_numerical': 0.00322061191626409, 'mean_word_length': 4.185308848080133, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 42, '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': '6378406', 'n_tokens_mistral': 1066, 'n_tokens_neox': 1057, 'n_words': 179}