Skip to content

Instantly share code, notes, and snippets.

View ksharsha's full-sized avatar
🎯
Focusing

Sree Harsha Kalli ksharsha

🎯
Focusing
View GitHub Profile
ffmpeg -i data/video.mp4 -vcodec h264 -b:v 1000k -acodec mp2 data/output.mp4
import json
from pprint import pprint
import glob
import os
import shutil
import sys
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
import subprocess
import cv2
from moviepy.editor import *
@ksharsha
ksharsha / BashHelp
Created April 7, 2017 07:27
Some common commands which males our life simpler
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
./sout.py 2>&1 | tee test.txt --> To print the logs to the terminal as well as save them to a text file