<commit_before><?php

namespace App\Console\Commands;

use App\Models\User;
use App\Models\Application;
use Illuminate\Console\Command;

class BusRoster extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'exec:busroster';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $this->info('MODES:');
        $this->info('1: bus apps with priority');
        $this->info('2: all apps with priority');
        $mode = $this->ask('mode?');
        $this->info('mode: '.$mode);

        $users = User::with('application', 'application.school')->get();

        if ($mode == 1) {
            foreach ($users as $user) {
                if ($user->application && $user->application->school && $user->application->school->transit_method == 'bus') {
                    $this->info(($user->application->school ? $user->application->school->getDisplayNameIfPossible() : 'n/a')."\t"
                        .$user['email']."\t"
                        .$user['phone']."\t"
                        .$user['first_name']."\t"
                        .$user['last_name']."\t"
                        .$user->application->getPriorityLevelForAdmittance());
                }
            }
        }
        if ($mode == 2) {
            foreach ($users as $user) {
                if ($user->application) {
                    $this->info(($user->application->school ? $user->application->school->getDisplayNameIfPossible() : 'n/a')."\t"
                        .$user['email']."\t"
                        .$user['phone']."\t"
                        .$user['first_name']."\t"
                        .$user['last_name']."\t"
                        .$user->application->getPriorityLevelForAdmittance());
                }
            }
        }
    }
}<commit_msg>hashid export<commit_after><?php

namespace App\Console\Commands;

use App\Models\User;
use App\Models\Application;
use Illuminate\Console\Command;

class BusRoster extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'exec:busroster';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $this->info('MODES:');
        $this->info('1: bus apps with priority');
        $this->info('2: all apps with priority');
        $mode = $this->ask('mode?');
        $this->info('mode: '.$mode);

        $users = User::with('application', 'application.school')->get();

        if ($mode == 1) {
            foreach ($users as $user) {
                if ($user->application && $user->application->school && $user->application->school->transit_method == 'bus') {
                    $this->info(($user->application->school ? $user->application->school->getDisplayNameIfPossible() : 'n/a')."\t"
                        .$user['email']."\t"
                        .$user['phone']."\t"
                        .$user['first_name']."\t"
                        .$user['last_name']."\t"
                        .$user->getHashIDAttribute()."\t"
                        .$user->application->getPriorityLevelForAdmittance());
                }
            }
        }
        if ($mode == 2) {
            foreach ($users as $user) {
                if ($user->application) {
                    $this->info(($user->application->school ? $user->application->school->getDisplayNameIfPossible() : 'n/a')."\t"
                        .$user['email']."\t"
                        .$user['phone']."\t"
                        .$user['first_name']."\t"
                        .$user['last_name']."\t"
                        .$user->getHashIDAttribute()."\t"
                        .$user->application->getPriorityLevelForAdmittance());
                }
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.16666666666666666, 'fraction_numerical': 0.0017683465959328027, 'mean_word_length': 1.5421348314606742, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 63, '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': '4534099', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1215, 'n_words': 225}