import scipy.spatial.distance as dist
import numpy as np
import timeit
X = np.random.random((1000, 1000))
def run():
c = dist.cdist(X, X, 'euclidean')
This file contains 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
import matplotlib.animation as animation | |
import matplotlib.pyplot as plt | |
from collections import deque | |
import numpy as np | |
from matplotlib import pyplot as plt | |
from matplotlib.animation import FuncAnimation | |
import scipy.stats | |
plt.style.use('seaborn-pastel') |
This file contains 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
FROM continuumio/miniconda3 | |
RUN apt-get update | |
RUN apt-get install -y gcc build-essential g++ | |
RUN conda install -c conda-forge sox | |
RUN conda install -c pytorch pytorch | |
RUN git clone https://github.com/pytorch/audio.git | |
RUN cd audio && python setup.py install |
This file contains 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
import numpy as np | |
import data | |
import pescador | |
import random | |
def excerpt_generator( | |
dataset, idx, | |
ex_length=100, ex_hop=100, | |
shuffle=True, rnd_ex=False, seed=42 |
This file contains 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
import numpy as np | |
import pescador | |
import torch.utils.data | |
np.random.seed(42) | |
nb_tracks = 100 | |
track_length = 30 | |
excerpt_length = 10 |
This file contains 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
import soundfile as sf | |
import argparse | |
import numpy as np | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser(description='Count duration of input files') | |
parser.add_argument('inputs', nargs='+', help='input file names') | |
args = parser.parse_args() |
This file contains 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
From 40b2c9fb9e3104f437d9f9d420f48e456c788c92 Mon Sep 17 00:00:00 2001 | |
From: Fabian-Robert Stoeter <mail@faroit.com> | |
Date: Fri, 17 Mar 2017 12:17:46 +0100 | |
Subject: [PATCH] add support for more than 8channels | |
--- | |
media/base/channel_layout.cc | 10 ++++++++-- | |
media/base/channel_layout.h | 2 +- | |
2 files changed, 9 insertions(+), 3 deletions(-) |
This file contains 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
import numpy as np | |
import threading | |
def threadsafe_generator(lock=None): | |
def wrap(f): | |
"""A decorator that takes a generator function and makes it thread-safe. | |
Taken from | |
http://anandology.com/blog/using-iterators-and-generators/ |
This file contains 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
# Usage: | |
# - Prefix is set to Ctrl-a (make sure you remapped Caps Lock to Ctrl) | |
# - All prefixed with Ctrl-a | |
# - Last used window: / | |
# - Last used pane: ; | |
# - Vertical split: v | |
# - Horizontal split: s | |
# - Previous window: [ | |
# - Next window: ] | |
# - Choose session: Ctrl-s |
I hereby claim:
- I am faroit on github.
- I am faroit (https://keybase.io/faroit) on keybase.
- I have a public key whose fingerprint is 1A86 8B44 A8FF C682 94D9 F729 DB01 E2B2 0DB1 9CC3
To claim this, I am signing this object:
NewerOlder