This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
url_opener.py | |
author: Dealga McArdle, 2013 | |
functionality: point webbrowser at selected url | |
sublime API docs: sublimetext.com/docs/2/api_reference.html | |
''' | |
import sublime, sublime_plugin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
april 13 - 2013 - TODO | |
: MIT.OCW | |
http://ocw.mit.edu/resources/res-6-009-how-to-process-analyze-and-visualize-data-january-iap-2012/datasets-and-code/ | |
: Use Pandas with those data sets. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"cmd": ["C:\\Python27\\python", "-u", "$file"], | |
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
"selector": "source.python" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wave_test.py | |
import wave | |
filename = "snipped.wav" | |
# py3 | |
#with wave.open(filename, 'r') as f: | |
# frate = f.getframerate() | |
# nframes = f.getnframes() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wave_test.py | |
# python 2.7 doesn't support 'with' on the wave module | |
import wave | |
import struct | |
def clean(i): | |
strs = i.split('\t')[:2] | |
return [float(i) for i in strs] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wave_test.py | |
# python 2.7 doesn't support 'with' on the wave module | |
''' | |
original wave: | |
https://dl.dropboxusercontent.com/u/3397495/wav/we_must_build_upwards.wav | |
original label file, generated by audacity | |
https://dl.dropboxusercontent.com/u/3397495/wav/wmbu_labels | |
''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wave_test.py | |
# python 2.7 doesn't support 'with' on the wave module | |
''' | |
original wave: | |
https://dl.dropboxusercontent.com/u/3397495/wav/we_must_build_upwards.wav | |
original label file, generated by audacity | |
https://dl.dropboxusercontent.com/u/3397495/wav/wmbu_labels | |
''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stakx.py | |
import collections | |
strs = ['one', 'two', 'three', 'four'] | |
values = 1, 2, 3, 4 | |
originals = dict(zip(strs, values)) | |
file_params = collections.namedtuple('file_params', 'one two three four') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
wave_test.py v 0.0.6 | |
python 2.7 doesn't support 'with' on the wave module | |
original wave: | |
https://dl.dropboxusercontent.com/u/3397495/wav/we_must_build_upwards.wav | |
original label file, generated by audacity: | |
https://dl.dropboxusercontent.com/u/3397495/wav/wmbu_labels |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# enumerator_tester.py | |
a = [['one', 'two'], ['three', 'four'], ['five', 'size'], ['wen', 'aeto']] | |
for idx, (i,j) in enumerate(a): | |
print(i, j, idx) |