Skip to content

Instantly share code, notes, and snippets.

View lalinsky's full-sized avatar

Lukáš Lalinský lalinsky

View GitHub Profile
@lalinsky
lalinsky / fp-find.py
Created July 22, 2011 18:02
Locate audio snippets in a longer stream
View fp-find.py
def format_time(secs):
return "%d:%02d" % (secs / 60, secs % 60)
def invert(arr):
"""
Make a dictionary that with the array elements as keys and
their positions positions as values.
>>> invert([3, 1, 3, 6])