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:
class DotDict(dict):
a dictionary that supports dot notation
as well as dictionary access notation
useful when using it with TensorFlow or PyTorch
d = DotDict() or d = DotDict({'val1':'first'})
set attributes: d.val2 = 'second' or d['val2'] = 'second'
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:
* @author qiao /
* @author mrdoob /
* @author alteredq /
* @author WestLangley /
* @author erich666 /
* @author mrflix /
* released under MIT License (MIT)
jaekookang /
Last active June 10, 2022 14:30
ffmpeg custom shell functions
# ffmpeg custom utilities
# To use:
# source
# URL:
# 2021-11-25 first created jaekoo kang
function ffmpeg_mkv_mp4() {
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 / projector.config
Last active April 9, 2021 20:14
"embeddings": [
"tensorName": "category_64_2021-04-09",
"tensorShape": [
"tensorPath": "",
"metadataPath": ""