Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
from __future__ import division | |
from numpy.fft import rfft | |
from numpy import argmax, mean, diff, log, nonzero | |
from scipy.signal import blackmanharris, correlate | |
from time import time | |
import sys | |
try: | |
import soundfile as sf | |
except ImportError: | |
from scikits.audiolab import flacread |
import math | |
import primes | |
def invmod(a, p): | |
''' | |
http://code.activestate.com/recipes/576737-inverse-modulo-p/ | |
The multiplicitive inverse of a in the integers modulo p. | |
Return b s.t. | |
a * b == 1 mod p | |
''' |
#!/usr/bin/env python | |
# -*- coding: ascii -*- | |
#----------------------------------------------------------------------------- | |
""" | |
Time Series Analysis | |
pytsa (read "pizza") depends on scipy and numpy. | |
Pytsa is a simple timeseries utility for python. | |
It is good for pedagogical purposes, such as to understand moving averages, | |
linear regression, interpolation, and single/double/triple exponential smoothing. |
########################################################################## | |
# Maximum Response filterbank from | |
# http://www.robots.ox.ac.uk/~vgg/research/texclass/filters.html | |
# based on several edge and bar filters. | |
# Adapted to Python by Andreas Mueller amueller@ais.uni-bonn.de | |
# Share and enjoy | |
# | |
import numpy as np | |
import matplotlib.pyplot as plt |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#converts all midi files in the current folder | |
import glob | |
import os | |
import music21 | |
#converting everything into the key of C major or A minor | |
# major conversions | |
majors = dict([("A-", 4),("A", 3),("B-", 2),("B", 1),("C", 0),("D-", -1),("D", -2),("E-", -3),("E", -4),("F", -5),("G-", 6),("G", 5)]) |
##VGG16 model for Keras
This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.
It has been obtained by directly converting the Caffe model provived by the authors.
Details about the network architecture can be found in the following arXiv paper:
Very Deep Convolutional Networks for Large-Scale Image Recognition
K. Simonyan, A. Zisserman
This is the Keras model of VGG-Face.
It has been obtained through the following method:
Details about the network architecture can be found in the following paper:
Initial positions | |
Player A: | |
[0-5] [1-3] [1-4] [2-2] [3-4] [4-4] [5-6] | |
Player B: | |
[0-0] [0-1] [0-6] [1-1] [1-6] [2-3] [2-6] | |
Player C: | |
[0-2] [2-4] [2-5] [3-3] [3-6] [4-5] [4-6] | |
Player D: | |
[0-3] [0-4] [1-2] [1-5] [3-5] [5-5] [6-6] |