pip install --upgrade nbstripout
in target repository:
nbstripout --install
#!/bin/bash | |
for i in $(seq -f "%05g" 00 10 50); | |
do | |
echo $i | |
done |
find . -name "*.xml" -type f|xargs rm -f |
rsync -avz --exclude '*.txt' source/ destination/ |
import sys, numpy as np, fire, sty | |
from PIL import Image | |
def print_image(filename, scale=0.1, ratio=7/4, character='█'): | |
""" | |
Args: | |
filename (Str): input image | |
scale (float): output scale. Default [0.1], means 48 cells width | |
ratio (float): image2cells ratio. Default [7/4] | |
character (char): character used to fill cells |
# Definition | |
from collections import defaultdict | |
def tree(): return defaultdict(tree) | |
# Sample | |
t = tree() | |
t['one']['two']['three']=1.23 | |
# launch pytest on single file/class/function | |
pytest <FILE_NAME>::<CLASS_NAME>::<FUNCTION_NAME> |
# Create from folder | |
ffmpeg -framerate 1 -pattern_type glob -i '/tmp/ciao/*.png' -c:v libx264 -r 30 -pix_fmt yuv420p /tmp/out.mp4 | |
# Repeat video until CTRL+c (is very dense! ) | |
ffmpeg -stream_loop -1 -i /tmp/out.mp4 -c copy /tmp/out_repeat.mp4 | |
# Convert into MP4 yuv420p |