Skip to content

Instantly share code, notes, and snippets.

View jaekookang's full-sized avatar

jkang jaekookang

View GitHub Profile
jaekookang /
Created August 19, 2022 06:16 — forked from 0xjac/
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare

jaekookang /
Created April 20, 2022 01:06 — forked from kevinxhan/
python catch kill signal
#We can check for Ctrl-C with KeyboardInterrupt exception as follows:
while True:
print "Echo ", raw_input(">")
except KeyboardInterrupt:
print "Good bye"
#When python process was killed, we will not get KeyboardInterrupt. But we can instead catch SIGTERM sent by kill command.
#In order to catch SIGTERM, we can do:
jaekookang / OrbitControls.js
Created November 29, 2021 02:44 — forked from mrflix/OrbitControls.js
Three.OrbitControls for multiple instances on a page.Usage: controls = new THREE.OrbitControls(camera, document, renderer.domElement); Based on:
View OrbitControls.js
* @author qiao /
* @author mrdoob /
* @author alteredq /
* @author WestLangley /
* @author erich666 /
* @author mrflix /
* released under MIT License (MIT)
jaekookang /
Created November 24, 2021 06:04 — forked from hosackm/
Flask streaming an audio file
from flask import Flask, Response
app = Flask(__name__)
def streamwav():
def generate():
with open("signals/song.wav", "rb") as fwav:
data =
jaekookang /
Created September 15, 2021 05:50 — forked from ramnathv/
Creating a clean gh-pages branch

Creating a clean gh-pages branch

This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]

cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
jaekookang /
Created September 14, 2021 10:25 — forked from hadware/
Convert wav in bytes for to numpy ndarray, then back to bytes
from import read, write
import io
## This may look a bit intricate/useless, considering the fact that scipy's read() and write() function already return a
## numpy ndarray, but the BytesIO "hack" may be useful in case you get the wav not through a file, but trough some websocket or
## HTTP Post request. This should obviously work with any other sound format, as long as you have the proper decoding function
with open("input_wav.wav", "rb") as wavfile:
input_wav =
jaekookang / Sync gh-pages + master branches
Created December 7, 2020 17:24 — forked from mandiwise/Sync gh-pages + master branches
Keep gh-pages up to date with a master branch
View Sync gh-pages + master branches
// Reference:
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin master
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push origin gh-pages // commit the changes
jaekookang /
Created April 17, 2020 18:30 — forked from r9y9/
CMU ARCTIC download script
# This is a yet another download script for the cmu arctic speech corpus.
# The corpus will be downloaded in $HOME/data/cmu_arctic/
if [ ! -e $location ]
echo "Create " $location
jaekookang /
Created May 16, 2019 22:12 — forked from protrolium/
using ffmpeg to extract audio from video files


Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz: