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
# Maintainer: speps <speps at aur dot archlinux dot org> | |
pkgname=rtmidi | |
pkgver=2.1.0 | |
pkgrel=1 | |
pkgdesc="A set of C++ classes that provides a common API for realtime MIDI input/output." | |
arch=(i686 x86_64) | |
url="http://www.music.mcgill.ca/~gary/rtmidi/" | |
license=('MIT') | |
depends=('alsa-lib') |
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
from __future__ import division | |
import numpy | |
n = 1000000 | |
# 2D data spread uniformly across a square of A=1 | |
data = numpy.random.uniform(-0.5, 0.5, size=(n, 2)) | |
# Count points that are within distance 0.5 from center | |
inside = len( | |
numpy.argwhere( |
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
#!/usr/bin/python | |
import time | |
import BaseHTTPServer | |
from pprint import pprint | |
HOST_NAME = '0.0.0.0' | |
PORT_NUMBER = 8000 | |
class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler): |
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
{'connection': 'close', | |
'content-length': '1598', | |
'content-type': 'application/json', | |
'host': 'mymac.employer.server.de:8000'} | |
{ | |
"before": "781f005120f77fbc69d1077d57b3b10ee792f232", | |
"after": "0bba8ee1bc7d3f5849b530ef6a4bdef1e97f8ecb", | |
"ref": "refs/heads/master", |
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
#!/usr/bin/env bash | |
set -e | |
PYV=`python -c "import sys;t='{v[0]}.{v[1]}'.format(v=list(sys.version_info[:2]));sys.stdout.write(t)";` | |
# Make sure we are on a recent version of PIP and have wheels | |
pip install --upgrade pip | |
pip install --upgrade setuptools | |
pip install --upgrade six |
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
@pytest.fixture(params=(True, False)) | |
def odd(request): | |
return request.param | |
@pytest.fixture(params=(1, 2)) | |
def channels(request): | |
return request.param | |
@pytest.fixture(params=(16000, 44100)) | |
def samplerate(request): |
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
from __future__ import division | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
from pysoundcard import Stream, continue_flag, complete_flag | |
number_of_blocks = 100 | |
number_of_channels = 6 |
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
'''Use this if you have a pre trained net and dont want to wait for a few hours''' | |
from __future__ import print_function | |
from keras.models import Sequential | |
from keras.layers.core import Dense, Activation, Dropout | |
from keras.layers.recurrent import LSTM | |
from keras.utils.data_utils import get_file | |
import numpy as np | |
import random | |
import sys |
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
def sliding_window(data, size, stepsize=1, padded=False, axis=-1, copy=True): | |
""" | |
Calculate a sliding window over a signal | |
Parameters | |
---------- | |
data : numpy array | |
The array to be slided over. | |
size : int | |
The sliding window size |
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
import numpy | |
import matplotlib.pyplot as plt | |
def tupper(x,y): | |
return 0.5 < ((y // 17) // (2**(17 * x + y % 17))) % 2 | |
N = 4858450636189713423582095962494202044581400587983244549483093085061934704708809928450644769865524364849997247024915119110411605739177407856919754326571855442057210445735883681829823754139634338225199452191651284348332905131193199953502413758765239264874613394906870130562295813219481113685339535565290850023875092856892694555974281546386510730049106723058933586052544096664351265349363643957125565695936815184334857605266940161251266951421550539554519153785457525756590740540157929001765967965480064427829131488548259914721248506352686630476300 | |
x, y = numpy.meshgrid(numpy.arange(107), numpy.arange(N, N + 17)[::-1]) |