<commit_before><?php

use CodeDay\Models;

\Request::setTrustedProxies([
    '172.16.31.10/21',
    '172.16.58.3/20',
    '192.168.3.11/22',
    '192.168.3.11/22',
    '172.16.58.3/22',
    '192.168.127.12/18',
    '192.168.127.12/18',
    '192.168.127.12/20',
    '192.168.127.12/20',
    '192.168.3.11/22',
    '172.16.58.3/17',
    '172.16.17.32/15',
    '172.16.17.32/12'
]);

\View::share('api_base', \Config::get('clear.api_base'));
\View::share('api_base_public', \Config::get('clear.api_base_public'));
\View::share('api_access_token', \Config::get('clear.access_token'));

$routes = function() {
    // Domain Routes
    \Route::group(['domain' => isset($_SERVER["HTTP_HOST"]) && $_SERVER['HTTP_HOST'] == 'vip.codeday.dev' ? 'vip.codeday.dev' : 'codeday.vip'], function(){
        \Route::Controller('/{ticket}/ticket', '\CodeDay\Http\Controllers\Vip\TicketController');
        \Route::Controller('/{ticket}', '\CodeDay\Http\Controllers\Vip\IndexController');
        \Route::get('/', '\CodeDay\Http\Controllers\Vip\IndexController@getFind');
        \Route::post('/', '\CodeDay\Http\Controllers\Vip\IndexController@postFind');
    });

    // Static Routes
    \Route::get('/', '\CodeDay\Http\Controllers\StaticController@getGlobal');
    \Route::get('/video', '\CodeDay\Http\Controllers\StaticController@getVideo');
    \Route::post('/swag', '\CodeDay\Http\Controllers\StaticController@postSwag');

    \Route::get('/promo', '\CodeDay\Http\Controllers\StaticController@getPromo');
    \Route::get('/press', '\CodeDay\Http\Controllers\StaticController@getPress');
    \Route::get('/sponsor', '\CodeDay\Http\Controllers\StaticController@getSponsor');
    \Route::get('/rules', '\CodeDay\Http\Controllers\StaticController@getRules');
    \Route::get('/evangelist', '\CodeDay\Http\Controllers\StaticController@getEvangelist');

    \Route::get('/new', '\CodeDay\Http\Controllers\StaticController@getNew');
    \Route::get('/volunteer', '\CodeDay\Http\Controllers\VolunteerController@getIndex');
    \Route::get('/volunteer/apply/mentor', '\CodeDay\Http\Controllers\VolunteerController@getApplyMentor');
    \Route::get('/volunteer/apply/judge', '\CodeDay\Http\Controllers\VolunteerController@getApplyJudge');
    \Route::get('/volunteer/apply/staff', '\CodeDay\Http\Controllers\VolunteerController@getApplyStaff');

    \Route::get('/splunk', '\CodeDay\Http\Controllers\SplunkController@getIndex');
    \Route::post('/splunk', '\CodeDay\Http\Controllers\SplunkController@postIndex');

    \Route::controller('/phone', '\CodeDay\Http\Controllers\PhoneController');


    // Event-based Routes
    \Route::bind('event', function($webname) {
        $event = Models\Region::find(strtolower($webname))->current_event;
        if ($event->batch['id'] != Models\Batch::current()->id) {
            return null;
        }
        if ($event->webname != $webname) {
            \App::abort(302, '', ['Location' => '/'.$event->webname]);
        } else {
            return $event;
        }
    });

    \Route::get('/schools', '\CodeDay\Http\Controllers\StaticController@getSchools');
    \Route::get('/disambiguation/{event}', '\CodeDay\Http\Controllers\EventController@getDisambiguation');
    \Route::get('/{event}/register', '\CodeDay\Http\Controllers\EventController@getRegister');
    \Route::post('/{event}/register', '\CodeDay\Http\Controllers\EventController@postRegister');
    \Route::get('/{event}/register/schools', '\CodeDay\Http\Controllers\StaticController@getSchools');
    \Route::get('/{event}', '\CodeDay\Http\Controllers\EventController@getIndex');
};

\View::share('nonLangUri', '/'.request()->path());
\Route::bind('locale', function($locale) {
    \App::setLocale($locale);<commit_msg>Hack for CodeDay NJ<commit_after><?php

use CodeDay\Models;

\Request::setTrustedProxies([
    '172.16.31.10/21',
    '172.16.58.3/20',
    '192.168.3.11/22',
    '192.168.3.11/22',
    '172.16.58.3/22',
    '192.168.127.12/18',
    '192.168.127.12/18',
    '192.168.127.12/20',
    '192.168.127.12/20',
    '192.168.3.11/22',
    '172.16.58.3/17',
    '172.16.17.32/15',
    '172.16.17.32/12'
]);

\View::share('api_base', \Config::get('clear.api_base'));
\View::share('api_base_public', \Config::get('clear.api_base_public'));
\View::share('api_access_token', \Config::get('clear.access_token'));

$routes = function() {
    // Domain Routes
    \Route::group(['domain' => isset($_SERVER["HTTP_HOST"]) && $_SERVER['HTTP_HOST'] == 'vip.codeday.dev' ? 'vip.codeday.dev' : 'codeday.vip'], function(){
        \Route::Controller('/{ticket}/ticket', '\CodeDay\Http\Controllers\Vip\TicketController');
        \Route::Controller('/{ticket}', '\CodeDay\Http\Controllers\Vip\IndexController');
        \Route::get('/', '\CodeDay\Http\Controllers\Vip\IndexController@getFind');
        \Route::post('/', '\CodeDay\Http\Controllers\Vip\IndexController@postFind');
    });

    // Static Routes
    \Route::get('/', '\CodeDay\Http\Controllers\StaticController@getGlobal');
    \Route::get('/video', '\CodeDay\Http\Controllers\StaticController@getVideo');
    \Route::post('/swag', '\CodeDay\Http\Controllers\StaticController@postSwag');

    \Route::get('/promo', '\CodeDay\Http\Controllers\StaticController@getPromo');
    \Route::get('/press', '\CodeDay\Http\Controllers\StaticController@getPress');
    \Route::get('/sponsor', '\CodeDay\Http\Controllers\StaticController@getSponsor');
    \Route::get('/rules', '\CodeDay\Http\Controllers\StaticController@getRules');
    \Route::get('/evangelist', '\CodeDay\Http\Controllers\StaticController@getEvangelist');

    \Route::get('/new', '\CodeDay\Http\Controllers\StaticController@getNew');
    \Route::get('/volunteer', '\CodeDay\Http\Controllers\VolunteerController@getIndex');
    \Route::get('/volunteer/apply/mentor', '\CodeDay\Http\Controllers\VolunteerController@getApplyMentor');
    \Route::get('/volunteer/apply/judge', '\CodeDay\Http\Controllers\VolunteerController@getApplyJudge');
    \Route::get('/volunteer/apply/staff', '\CodeDay\Http\Controllers\VolunteerController@getApplyStaff');

    \Route::get('/splunk', '\CodeDay\Http\Controllers\SplunkController@getIndex');
    \Route::post('/splunk', '\CodeDay\Http\Controllers\SplunkController@postIndex');

    \Route::controller('/phone', '\CodeDay\Http\Controllers\PhoneController');


    // Event-based Routes
    \Route::bind('event', function($webname) {
        if ($webname == 'jersey') { return Models\Event::find('rxdF6ixgWwea'); } // Hack
        $event = Models\Region::find(strtolower($webname))->current_event;
        if ($event->batch['id'] != Models\Batch::current()->id) {
            return null;
        }
        if ($event->webname != $webname) {
            \App::abort(302, '', ['Location' => '/'.$event->webname]);
        } else {
            return $event;
        }
    });

    \Route::get('/schools', '\CodeDay\Http\Controllers\StaticController@getSchools');
    \Route::get('/disambiguation/{event}', '\CodeDay\Http\Controllers\EventController@getDisambiguation');
    \Route::get('/{event}/register', '\CodeDay\Http\Controllers\EventController@getRegister');
    \Route::post('/{event}/register', '\CodeDay\Http\Controllers\EventController@postRegister');
    \Route::get('/{event}/register/schools', '\CodeDay\Http\Controllers\StaticController@getSchools');
    \Route::get('/{event}', '\CodeDay\Http\Controllers\EventController@getIndex');
};

\View::share('nonLangUri', '/'.request()->path());
\Route::bind('locale', function($locale) {
    \App::setLocale($locale);
{'fraction_non_alphanumeric': 0.2172987358616101, 'fraction_numerical': 0.04031936127744511, 'mean_word_length': 4.237630662020906, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 26, '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': '6394295', 'n_tokens_mistral': 2693, 'n_tokens_neox': 2533, 'n_words': 234}