This file contains 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 | |
namespace Application\ORM\Tools\Cache; | |
use Doctrine\Common\Cache\RedisCache as BaseCache; | |
/** | |
* Redis Cache Class | |
* | |
* Restores the deleteByRegex, deleteByPrefix and deleteBySuffix methods |
This file contains 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
#!/usr/bin/env bash | |
die () { | |
echo >&2 "$@" | |
exit 1 | |
} | |
palette="./palette.png" | |
temp="./_temp.mp4" | |
path=false | |
file=false |
This file contains 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
#!/usr/bin/env python | |
""" | |
Finds the 2 most similar images in an image sequence or specific image. | |
Requires: | |
- imgcompare==2.0.1 | |
- python==3.7.10 | |
""" | |
from imgcompare import is_equal, image_diff_percent, image_diff, ImageCompareException |
This file contains 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
import os | |
import sys | |
import numpy as np | |
import skvideo.io | |
from pprint import pprint | |
def equalize_histogram(image, number_bins=256): | |
image_histogram, bins = np.histogram(image.flatten(), number_bins) | |
cdf = image_histogram.cumsum() | |
cdf = (number_bins - 1) * cdf / cdf[-1] # normalize |