Preview Mode - This shows what WOULD be imported (no changes will be made)
| File | Size | Records |
|---|---|---|
m1.xml |
29.7 KB | 23 records |
m2.xml |
34.1 KB | 243 records |
| import re | |
| from collections import Counter | |
| from tabulate import tabulate | |
| import multiprocessing | |
| import os | |
| from wordcloud import WordCloud | |
| import matplotlib.pyplot as plt | |
| from langdetect import detect | |
| import random |
| <?php | |
| namespace App\Livewire; | |
| use Livewire\Component; | |
| class FieldRepeater extends Component | |
| { | |
| public array $rows = []; | |
| public string $field; |
| switchphp () { | |
| phpversion="$(php -v | head -n 1 | cut -d " " -f 2 | cut -f1-2 -d".")" | |
| brew unlink php@$phpversion && brew link php@$1 && valet use php@$1 --force | |
| } |
| <?php | |
| public function getSummaryAttribute() | |
| { | |
| $summary = Str::words($this->description, 250, '...'); | |
| $summary = html_entity_decode($summary); | |
| $summary = html_entity_decode($summary); | |
| $summary = html_entity_decode($summary); | |
| $summary = html_entity_decode($summary); | |
| $summary = htmlspecialchars_decode($summary); |
| switchphp () { | |
| phpversion="$(php -v | head -n 1 | cut -d " " -f 2 | cut -f1-2 -d".")" | |
| brew unlink php@$phpversion && brew link php@$1 && valet use php@$1 --force | |
| } | |
| # then switchphp 8.1, switchphp 7.4, whatever versions installed |
| $('.repeater').on('click', '.repeater-btn', function(e) { | |
| e.preventDefault(); | |
| var $this = $(this), | |
| $repeater = $this.closest('.repeater').find('[data-repeatable]'), | |
| count = $repeater.length, | |
| $clone = $repeater.first().clone(); | |
| $clone.find('[id]').each(function() { | |
| this.id = this.id + '_' + count; |
| Response::macro('attachment', function ($content, $filename) { | |
| $headers = [ | |
| 'Content-type' => 'text/plain', | |
| 'Content-Disposition' => 'attachment; filename="'.$filename.'"', | |
| ]; | |
| return Response::make($content, 200, $headers); | |
| }); |
| <?php | |
| /** | |
| * Complete the order, send notifications and invoice, if applicable | |
| * @param Request $request | |
| * @return \Illuminate\Http\JsonResponse | |
| */ | |
| public function complete(Request $request) | |
| { | |
| $user = $request->user(); |
| /* | |
| .orc { | |
| transition: top 1s ease 0s; | |
| position: relative; | |
| top: -3000px; | |
| &.shown { | |
| top: 0; | |
| } | |
| } |