<commit_before><?php

namespace App\Console\Commands;
use Illuminate\Support\Facades\Hash;
use App\Models\User;
use App\Models\Application;
use Illuminate\Console\Command;
use Zipper;
class SponsorDump extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'users:sponsordump';

    /**
     * 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()
    {
        $resumeDir = public_path().'/r/';
        $resumeSecret = substr(md5(env('APP_KEY')),0,8);
        if (! is_dir($resumeDir)) {
            mkdir($resumeDir);
        }
        $resumeDir.= $resumeSecret.'/';
        if (! is_dir($resumeDir)) {
            mkdir($resumeDir);
        }

        $this->info('saving to: '.$resumeDir);
        $apps = Application::with('user')->get();
        foreach ($apps as $app) {
            if ($app->rsvp && $app->resume_uploaded) {
                $resumeURL = $app->user->resumeURL();
                $resumeFilename = $app->user->first_name.'_'.$app->user->last_name.'_'.$app->user->getHashIDAttribute().$app->user->id;
                $tmpPDF = $resumeDir.$resumeFilename.'.pdf';
                $publicResumeURL = env('APP_URL').'/r/'.$resumeSecret.'/'.$resumeFilename.'.pdf';
                try {
                    copy($resumeURL, $tmpPDF);
                    $this->info('S3 -> local '.$tmpPDF);
                    $this->info($app->user->first_name
                        ."\t".$app->user->last_name
                        ."\t".$app->user->email
                        ."\t".$app->github
                        ."\t".$app->linkedin
                        ."\t".$app->gender
                        ."\t".$app->major
                        ."\t".$app->grad_year<commit_msg>oops2<commit_after><?php

namespace App\Console\Commands;
use Illuminate\Support\Facades\Hash;
use App\Models\User;
use App\Models\Application;
use Illuminate\Console\Command;
use Zipper;
class SponsorDump extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'users:sponsordump';

    /**
     * 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()
    {
        $resumeDir = public_path().'/r/';
        $resumeSecret = substr(md5(env('APP_KEY')),0,8);
        if (! is_dir($resumeDir)) {
            mkdir($resumeDir);
        }
        $resumeDir.= $resumeSecret.'/';
        if (! is_dir($resumeDir)) {
            mkdir($resumeDir);
        }

        $this->info('saving to: '.$resumeDir);
        $apps = Application::with('user')->get();
        foreach ($apps as $app) {
            if ($app->rsvp && $app->resume_uploaded) {
                $resumeURL = $app->user->resumeURL();
                $resumeFilename = $app->user->id.'_'.$app->user->first_name.'_'.$app->user->last_name;
                $tmpPDF = $resumeDir.$resumeFilename.'.pdf';
                $publicResumeURL = env('APP_URL').'/r/'.$resumeSecret.'/'.$resumeFilename.'.pdf';
                try {
                    copy($resumeURL, $tmpPDF);
                    $this->info('S3 -> local '.$tmpPDF);
                    $this->info($app->user->first_name
                        ."\t".$app->user->last_name
                        ."\t".$app->user->email
                        ."\t".$app->github
                        ."\t".$app->linkedin
                        ."\t".$app->gender
                        ."\t".$app->major
                        ."\t".$app->grad_year
{'fraction_non_alphanumeric': 0.16431812753761643, 'fraction_numerical': 0.0021495103893002148, 'mean_word_length': 1.598014888337469, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 57, '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': '803858', 'n_tokens_mistral': 1231, 'n_tokens_neox': 1232, 'n_words': 211}