Skip to content

Instantly share code, notes, and snippets.

View mundya's full-sized avatar

Andrew Mundy mundya

View GitHub Profile
"""Support utilities for COMP28512.
(C) University of Manchester 2015
Author: Andrew Mundy
Revisions
---------
31/01/2015:
Included `get_pesq_scores` and generally neatened.
05/02/2015:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import collections
Route = collections.namedtuple('Route', 'key mask sources targets')
RoutingEntry = collections.namedtuple('RoutingEntry',
'key mask targets defaultable')
KeyMask = collections.namedtuple('KeyMask', 'key mask')
def crush_table(routes, masks):
"""Reduce the size of a routing table.
"""Attempt #1 at organizing neuron models
- We specify types of neurons using subclasses of Neuron
- This includes things like LIF vs HH and also Float vs Fixed, Rate vs Spiking
- We build a NeuronPool object which actually has code for running neurons
- We keep a list of known Neuron types around so if we're asked for just
a Rate neuron, we can pick the first on on the list that matches
Modified from @tcstewar's original to remove a fixed point divide.