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 cv2 | |
def create_video_from_pngs(png_folder, output_filepath, frame_rate): | |
real_png_folder = os.path.join(png_folder, 'imgs') | |
images = sorted([img for img in os.listdir(real_png_folder) if img.endswith(".png")]) | |
frame = cv2.imread(os.path.join(real_png_folder, images[0])) | |
height, width, layers = frame.shape | |
output_filename = os.path.join(output_filepath, f"{os.path.basename(png_folder)}.mp4") |
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
module load ffmpeg/4.2.4 | |
for file in S/*.mp4; do | |
ffmpeg -i "$file" -vf "crop=in_w:in_h-90,rotate=PI" -codec:v libx264 -codec:a copy -f segment -segment_time 60 -reset_timestamps 1 -map 0 "minute/${file%.mp4}_segment%d.mp4" | |
done |
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
for i in 1 3 4 9 11 cat 89 dog 102; do | |
# commands to be executed go here | |
echo $i | |
done | |
# this will print all the items in the for loop, numbers as well as strings |
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
\documentclass[12pt,a4paper]{article} | |
\usepackage{natbib} | |
\usepackage{graphicx} | |
\usepackage{amsmath} | |
\usepackage{amsfonts} | |
\usepackage{amssymb} | |
\usepackage{makeidx} | |
\usepackage{setspace} | |
\usepackage{geometry} | |
\usepackage{color} |
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
for X in {1..50} ; do mv s2/o$X/* o$X/ ; mv s3/o$X/* o$X/ ; mv s4/o$X/* o$X/ ; mv s5/o$X/* o$X/ ; mv s6/o$X/* o$X/ ; done & |
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
tar -tf archive.tar | wc -l |
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
\usepackage{hyperref} | |
\usepackage{xcolor} | |
\hypersetup{ | |
colorlinks, | |
linkcolor={red!50!black}, | |
citecolor={blue!50!black}, | |
urlcolor={blue!80!black} | |
} |
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
nohup python -u script.py &> nohup2.out & |
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
git init | |
git add . && git commit -m "first commit" | |
git remote add origin REMOTE_GITHUB_REPO_URL | |
git remote -v | |
git push origin master |
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
ls -1 | wc -l |
NewerOlder