Skip to content

Instantly share code, notes, and snippets.


Sree Harsha Kalli ksharsha

View GitHub Profile
import json
from pprint import pprint
import glob
import os
import shutil
import sys
from import ffmpeg_extract_subclip
import subprocess
import cv2
from moviepy.editor import *
ksharsha / BashHelp
Created Apr 7, 2017
Some common commands which males our life simpler
View BashHelp
echo */ | wc --> Count the number of directories in a folder
for f in *\ *; do mv "$f" "${f// /_}"; done --> replace spaces in folder names, not recursive
for f in model/* ; do mv "$f" `echo "$f" | sed 's/_//g'` ; done --> Remove underscores from the file names
./ 2>&1 | tee test.txt --> To print the logs to the terminal as well as save them to a text file
View ffmpeg-compress
ffmpeg -i data/video.mp4 -vcodec h264 -b:v 1000k -acodec mp2 data/output.mp4