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
| LAYER = 'Cy3' | |
| OUT = 'my_exported_image_' + LAYER | |
| from matplotlib import pyplot as plt | |
| import numpy as np | |
| layer = viewer.layers[LAYER] | |
| img = layer.data | |
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
| #!/usr/bin/env python | |
| import os | |
| import shutil | |
| raw_ext = '.RAF' | |
| jpg_ext = '.JPG' | |
| destination = 'jpg_only' | |
| for filename in os.listdir('.'): |
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
| # Video encoding. Arguments to ffmpeg should be passed in quotes | |
| # Example | |
| # ls *.avi | ff_avi2webm "-filter:v 'crop=in_w-100:in_h/2'" | |
| ff_any2webm(){ | |
| parallel ffmpeg -i {} $1 -c:v vp9 {.}.webm | |
| } | |
| ff_whatsapp(){ | |
| # Convert specified videos to mp4 that are compatible with whatsapp |
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
| ls -1 *.avi | parallel ffmpeg -i {} -c:v vp9 {.}.webm |
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
| ffmpeg -i first.avi -i second.avi -filter_complex "[0:v][1:v]hstack=inputs=2[v]" -map "[v]" side-by-side.webm |
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
| ffmpeg -i <input>.avi -c:v vp9 <output>.webm |
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 | |
| # Adapted from https://stackoverflow.com/a/52543399/6029703 | |
| if [ "$#" -gt 2 -o "$#" -lt 1 ]; then | |
| echo "********************************************************************" | |
| echo "* Knitter version 1.1 *" | |
| echo "********************************************************************" | |
| echo -e "This script converts Rmd files into HTML (default) or PDFs. \n" | |
| echo -e "usage: knitter file.Rmd [output_format] \n" |
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
| This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account. | |
| Token for proof: | |
| [Verifying my OpenPGP key: openpgp4fpr:5eef68f406860ce415623fe9505a5266ffee464d] |
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
| This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account. | |
| Token for proof: | |
| [Verifying my OpenPGP key: openpgp4fpr:5eef68f406860ce415623fe9505a5266ffee464d] |
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
| #!/usr/bin/env python | |
| # Implementation of algorithm from http://stackoverflow.com/a/22640362/6029703 | |
| import numpy as np | |
| import pylab | |
| def thresholding_algo(y, lag, threshold, influence): | |
| signals = np.zeros(len(y)) | |
| filteredY = np.array(y) | |
| avgFilter = [0]*len(y) | |
| stdFilter = [0]*len(y) |