Skip to content

Instantly share code, notes, and snippets.

@groakat
groakat / batchInstallGst
Last active August 29, 2015 14:02
auto compilation of all gstreamer packages
#!/usr/bin/expect
mkdir ~/bin
cd ~/bin
wget https://gist.githubusercontent.com/groakat/ae74323933678c6ad04a/raw/1b871efcec60dc739a8c61f2a504d52ce4033dd3/gst-head
chmod +x gst-head
mkdir -p ~/src/gstreamer1/head
dummy file
@groakat
groakat / dsst_trial1.py
Created June 29, 2015 16:56
Running DSST tracker on video with ground truth
import os
import glob
import dlib
import numpy as np
import pyTools.system.videoExplorer as VE
import pyTools.videoProc.annotation as A
import scipy.io.wavfile
import pandas as pd
sound = scipy.io.wavfile.read('../data/day.wav')
pd.DataFrame(sound[1]).to_csv('../data/wav.csv', index=False, header=False)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# The script MUST contain a function named azureml_main
# which is the entry point for this module.
#
# The entry point function can contain up to two input arguments:
# Param<dataframe1>: a pandas.DataFrame
# Param<dataframe2>: a pandas.DataFrame
def azureml_main(dataframe1 = None, dataframe2 = None):
from scipy.fftpack import fft
def SpecGen(self, filepath):
"""
Code to generate spectrogram adapted from code posted on https://mail.python.org/pipermail/chicago/2010-December/007314.html by Ken Schutte (kenshutte@gmail.com)
"""
sr, x = scipy.io.wavfile.read(filepath)
## Parameters
nstep = int(sr * self.specNStepMod)
nwin = int(sr * self.specNWinMod)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@groakat
groakat / Annotation Example.ipynb
Last active September 18, 2015 12:36
How to use Annotation objects
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.