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
movtogif () { | |
tempfile=.mov-to-gif-$(date +"%s").png | |
ffmpeg -v quiet -stats -y -i $1 -vf fps=5,palettegen $tempfile | |
ffmpeg -v quiet -stats -i $1 -i $tempfile -filter_complex "fps=12.5,scale=720:-1,paletteuse" "${1%.mov}.gif" | |
rm $tempfile | |
} |
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
# Args: in_file out_file (screen, ebook, printer) | |
compresspdf() { | |
gs -sDEVICE=pdfwrite \ | |
-dDetectDuplicateImages=true \ | |
-dConvertCMYKImagesToRGB=true \ | |
-dCompressFonts=true \ | |
-dNOPAUSE \ | |
-dQUIET \ | |
-dBATCH \ | |
-dPDFSETTINGS=/${3:-"prepress"} \ |
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
def blums(x, y=None, sig_lev=0.01): | |
""" | |
Performs Blum's test for independence. | |
Blum, J. R., et al. “Distribution Free Tests of Independence Based on the | |
Sample Distribution Function.” The Annals of Mathematical Statistics, vol. | |
32, no. 2, 1961, pp. 485–498. JSTOR, www.jstor.org/stable/2237758. | |
Parameters | |
---------- |