Skip to content

Instantly share code, notes, and snippets.

Avatar

Rong GONG ronggong

View GitHub Profile
@ronggong
ronggong / aif_to_wav.sh
Created Jun 29, 2017
Sox Mac audio format conversion
View aif_to_wav.sh
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 Feb 16, 2017
QBSH-code-snippets
View dtw1d_std.py
# 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 Jan 31, 2017
rsync, get data into cluster
View rsync.sh
#!/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 Jan 13, 2017
A simple recipe to run PDNN (Theano backend) DNNs training on HPC-DTIC GPU nodes
View pdnnAcousticModelTraining.sh
#!/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 Nov 10, 2016
A multi-tasks cross validation scikit-learn SVM recipe on DTIC HPC
View boundaryPatternClassification.sh
#!/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
#