This file contains hidden or 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
""" | |
Creates an HDF5 file with a single dataset of shape (channels, n), | |
filled with random numbers. | |
Writing to the different channels (rows) is parallelized using MPI. | |
Usage: | |
mpirun -np 8 python demo.py | |
Small shell script to run timings with different numbers of MPI processes: |
This file contains hidden or 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 unicode_literals | |
import numpy | |
import sys | |
import time | |
from sumatra.projects import load_project | |
from sumatra.parameters import build_parameters | |
def main(parameters): | |
numpy.random.seed(parameters["seed"]) | |
distr = getattr(numpy.random, parameters["distr"]) |
This file contains hidden or 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
""" | |
Some ideas for syntax for multicompartmental modelling in PyNN | |
Andrew Davison, May 2012 | |
""" | |
# Example 1 | |
import pyNN.neuron as sim | |
from neuroml import load_morphology, load_lems, Section | |
from pyramidal.spatial_distributions import uniform, by_distance |