Skip to content

Instantly share code, notes, and snippets.

Andrew Mundy mundya

Block or report user

Report or block mundya

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View make_diagram.py
import cairocffi as cairo
import collections
from itertools import chain
from nengo_spinnaker.partition import divide_slice
from nengo_spinnaker.utils.itertools import flatten
import numpy as np
import pygraphviz as pgv
import random
from rig.machine import Cores, Machine
from rig.netlist import Net
View mtrie.py
"""Implementation of m-Tries for routing table minimisation.
Ahmand, S.; Mahapatra, R., "M-trie: an efficient approach to on-chip logic
minimization," in Computer Aided Design, 2004. ICCAD-2004. IEEE/ACM
International Conference on , vol., no., pp.428-435, 7-11 Nov. 2004
"""
from collections import defaultdict
from rig.routing_table import RoutingTableEntry
from six import iteritems
import sys
View 3D Representation.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View display.js
// Generated by CoffeeScript 1.9.3
var _chip_xy, draw_machine;
_chip_xy = function(chip_spacing, machine_height, x, y) {
y = machine_height - y - 1;
x *= 1.0 + chip_spacing;
y *= 1.0 + chip_spacing;
x += y * Math.sin(Math.PI / 6.0);
y *= Math.cos(Math.PI / 6.0);
return [x, y];
View count_dropped.py
import argparse
from rig.machine_control import MachineController
import sys
def count_dropped_mc(hostname):
"""Retrieve a count of the dropped packets on a given SpiNNaker machine."""
# Construct a controller for the machine
mc = MachineController(hostname)
View frequency_masking.py
"""Frequency masking experiment for COMP28512.
(C) University of Manchester 2015
Author: Andrew Mundy
"""
from __future__ import print_function
import comp28512_utils
from IPython import display
from matplotlib import pyplot as plt
import numpy as np
View comp28512_utils.py
"""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:
View fwm_behaviour_1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View fwm2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View table_crusher.py
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.
You can’t perform that action at this time.