Skip to content

Instantly share code, notes, and snippets.

View ronggong's full-sized avatar

Rong GONG ronggong

View GitHub Profile
@ronggong
ronggong / aif_to_wav.sh
Created June 29, 2017 11:58
Sox Mac audio format conversion
mkdir converted
for i in *.aif; do sox -t aif -b 24 $i converted/${i%.aif}.wav; done
#-t: to tell sox the input format
#-b: bit depth
#i%.aif: to remove the file name extension
@ronggong
ronggong / dtw1d_std.py
Created February 16, 2017 11:36
QBSH-code-snippets
# DTW distance
# Change dtwPath
# open terminal, go to your/path/to/sankalp/dtw, then compile: python setup.py build_ext --inplace
# use function dtw1d_std, inputs are two pitch contour lists, use udist as distance
import os,sys
fileDir = os.path.dirname(os.path.realpath('__file__'))
dtwPath = os.path.join(fileDir, 'your/path/to/sankalp/dtw')
dtwPath = os.path.abspath(os.path.realpath(dtwPath))
@ronggong
ronggong / rsync.sh
Created January 31, 2017 23:52
rsync, get data into cluster
#!/bin/bash
### ABOUT
### Runs rsync, retrying on errors up to a maximum number of tries.
### Simply edit the rsync line in the script to whatever parameters you need.
### This bash should be originaly written by Sergio Oramas, originaly posted on HPC page of MTG-services Wiki
@ronggong
ronggong / pdnnAcousticModelTraining.sh
Last active January 13, 2017 19:41
A simple recipe to run PDNN (Theano backend) DNNs training on HPC-DTIC GPU nodes
#!/bin/bash
# task name
#$ -N RongGongDNNAcousticModelTraining
# use default.q, let HPC automatically distribute the GPU resources
#$ -q default.q
# use specific GPU node, here we use node02
#$ -l h=node02
@ronggong
ronggong / boundaryPatternClassification.sh
Last active November 10, 2016 15:49
A multi-tasks cross validation scikit-learn SVM recipe on DTIC HPC
#!/bin/sh
# Name the process
# ----------------
#$ -N compIden_$JOB_ID
#
# Call from the current working directory; no need to cd; using default.q configuration, HPC will distribute the best choice of the nodes
# ------------------------------------------------------
#$ -cwd
# -q default.q
#