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 pyqtgraph as pg | |
import pyaudio | |
from PyQt4 import QtCore, QtGui | |
FS = 44100 #Hz | |
CHUNKSZ = 1024 #samples | |
class MicrophoneRecorder(): | |
def __init__(self, signal): |
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
#!/usr/bin/python | |
class List(list): | |
def dup(self): | |
def _dup(lst,ancestors): | |
for orig,copy in ancestors: | |
if lst == orig: | |
return copy | |
copy = lst[:] | |
_ancestors = ancestors+[(lst,copy)] | |
for i,x in enumerate(copy): |
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 __future__ import division | |
from numpy import * | |
class AdaBoost: | |
def __init__(self, training_set): | |
self.training_set = training_set | |
self.N = len(self.training_set) | |
self.weights = ones(self.N)/self.N | |
self.RULES = [] |