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 math | |
import numpy as np | |
import matplotlib.pyplot as plot | |
import matplotlib.cm as cm | |
import sys | |
import pylab | |
from matplotlib.widgets import Slider | |
range_inc = lambda start, end: range(start, end+1) #Because this is easier to write and read |
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 math | |
from mpl_toolkits.mplot3d import Axes3D | |
import matplotlib.pyplot as plt | |
import sys | |
import pylab | |
from matplotlib.widgets import Slider | |
#from IPython.core import ultratb | |
#sys.excepthook = ultratb.FormattedTB(mode='Verbose', | |
# color_scheme='Linux', call_pdb=1) |
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 matplotlib.pyplot as plot | |
import matplotlib.cm as cm | |
import sys | |
import pylab | |
import math | |
import scipy | |
# Mostly implemented by Matt Cumming |
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 cv2 | |
import math | |
import numpy as np | |
import matplotlib.pyplot as plot | |
import matplotlib.cm as cm | |
import sys | |
import pylab | |
from matplotlib.widgets import Slider | |
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 multiprocessing | |
class Dog(): | |
def __init__(self, name = "joe"): | |
self.name = name | |
def bark(self): | |
print("woof") | |
mg = multiprocessing.Manager() | |
dt = dict() |
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 urllib, urlparse | |
import re | |
from bs4 import BeautifulSoup | |
# Because I want pretty dict initialization | |
class Vividict(dict): | |
def __missing__(self, key): | |
value = self[key] = type(self)() | |
return value |
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 nengo | |
import nengo.spa as spa | |
D = 32 | |
model = spa.SPA() | |
with model: | |
model.vision = spa.Buffer(D) | |
model.speech = spa.Buffer(D) | |
model.memory = spa.Memory(D) |
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 nengo | |
from nengo import spa | |
D = 32 | |
vo = spa.Vocabulary(D) | |
vo.parse("A + B + C") | |
vo2 = spa.Vocabulary(D/2) | |
vo2.parse("D + E + F") | |
model = spa.SPA(vocabs=[vo, vo2]) |
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 nengo | |
from nengo import spa | |
D = 32 | |
vo = spa.Vocabulary(D) | |
vo.parse("A + B + C") | |
vo2 = spa.Vocabulary(D/2) | |
vo2.parse("D + E + F") | |
model = spa.SPA() |
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 nengo | |
from nengo import spa | |
import numpy | |
from collections import OrderedDict | |
print(numpy.version.version) | |
D = 64 | |
vocab = spa.Vocabulary(D, unitary=["ONE"]) |
OlderNewer