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 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. |
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
"""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. |
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
%% Declare the document type | |
%% `t` means "align content to the top of the slide" | |
\documentclass[t]{beamer} | |
%% Include the theme | |
\usetheme{UniversityOfManchester} | |
%% Set some document properties | |
\title{Saluto Mondo} | |
\subtitle{New Beamer Theme} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 random, struct, socket, time | |
def generate_packet( data ): | |
"""Generates a random SpiNNaker UDP Packet with a random | |
chip x, y and core (taken from some sensible range).""" | |
# Pick x, y, core | |
x = random.randint( 0, 4 ) | |
y = random.randint( 0, 4 ) | |
core = random.randint( 0, 17 ) | |
NewerOlder