Skip to content

Instantly share code, notes, and snippets.

# 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.
['BP1549',
'SL33',
'10813',
'R0852',
'BP2000',
'15112',
'4417',
'15110',
'25866',
'15108',
@groakat
groakat / bus coords
Last active November 15, 2015 13:12
{'10813': [51.3760929581, -0.0984574616503],
'1164': [51.4013254207, -0.118444497979],
'1441': [51.3886330116, -0.111505659588],
'14622': [51.4624163884, -0.11532824762],
'15100': [51.4190123595, -0.127886565845],
'15101': [51.4147954483, -0.123989076582],
'15102': [51.4076438324, -0.121592866634],
'15104': [51.4038783631, -0.11950429888],
'15105': [51.4045826277, -0.119676700562],
'15106': [51.3952345961, -0.114913800215],
[[51.3724080241, -0.0991418093016],
[51.3735938459, -0.0979575459402],
[51.3760929581, -0.0984574616503],
[51.3792517406, -0.101373059522],
[51.3785814995, -0.103297530305],
[51.3804435319, -0.105002557406],
[51.3837723074, -0.108429081989],
[51.3852700354, -0.109847701645],
[51.3868990349, -0.111045335869],
[51.3902831629, -0.112343246015],
@groakat
groakat / gist:e7d8394d57fd4d3fe016
Last active March 25, 2024 11:28 — forked from anonymous/gist:5663418
Blender python script to export the motion tracking markers to .csv files.
from __future__ import print_function
import bpy
import os
D = bpy.data
printFrameNums = True # include frame numbers in the csv file
relativeCoords = False # marker coords will be relative to the dimensions of the clip
proj_folder = os.path.join(bpy.path.abspath('//'))
@groakat
groakat / gist:b43fe09346616d8cb0ed
Created February 23, 2016 18:16
Import Tracks into Blender
import bpy
import numpy as np
import os
img_no = 77
in_folder = '/Volumes/Seagate_Backup_Plus_Drive/datasets/mech-sys/3d/rgb/bus/seq4/feat/fast_points'
img_template = 'image-{:04d}.npy'
clip = bpy.data.movieclips[0]
width=clip.size[0]