This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| LazyCollection::macro("fromCsv", function (string $path, int $chunk = 0, string $separator = ";"): LazyCollection { | |
| /** @var LazyCollection $collection */ | |
| $collection = static::make(function () use (&$separator, &$path, &$chunk) { | |
| $handle = fopen($path, 'r'); | |
| while ($line = fgetcsv(stream: $handle, separator: $separator)) { | |
| yield array_map(fn ($item) => trim($item), $line); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ################################# | |
| # Instructions | |
| # | |
| # First, install ffmpeg and youtube-dl | |
| # | |
| # https://ffmpeg.org/download.html | |
| # https://ytdl-org.github.io/youtube-dl/download.html | |
| # |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Basic ffmpeg scene detection:
ffmpeg -i input.flv -filter:v "select='gt(scene,0.4)',showinfo" -f null -scene (video only) value between 0 and 1 to indicate a new scene; a low value reflects a low probability for the current frame to introduce a new scene, while a higher value means the current frame is more likely to be one (see the example below) https://ffmpeg.org/ffmpeg-filters.html#select_002c-aselect
Set the scene change detection threshold as a percentage of maximum change on the luma plane. Good values are in the [8.0, 14.0] range. Scene change detection is only relevant in case combmatch=sc. The range for scthresh is [0.0, 100.0].
A curated list of arrrrrrrrr!
- What is the Matrix
- Resisting the Matrix
- Subverting the Matrix
- Freedom Seekers are Not Terrorists
- Spreading the Word
- Target Audience
In my opinion, The Matrix films provide the best metaphor our society has for understanding why organized evil and
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function tinker(...$args) { | |
| // Because there is no way of knowing what variable names | |
| // the caller of this function used with the php run-time, | |
| // we have to get clever. My solution is to peek at the | |
| // stack trace, open up the file that called "tinker()" | |
| // and parse out any variable names, so I can load | |
| // them in the tinker shell and preserve their names. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function chain($object) | |
| { | |
| return new class ($object) { | |
| protected $lastReturn = null; | |
| public function __construct($object) | |
| { | |
| $this->wrapped = $object; |