Skip to content
Merged

I001 #150

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion balanced_random/balanced_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

import matplotlib.pyplot as pylab
import numpy
import pyNN.spiNNaker as p
from pyNN.random import RandomDistribution
from pyNN.utility.plotting import Figure, Panel
import pyNN.spiNNaker as p

p.setup(timestep=0.1)
p.set_number_of_neurons_per_core(p.IF_curr_exp, 64)
Expand Down
4 changes: 2 additions & 2 deletions balanced_random/split/balanced_random_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pylab
import numpy
import pylab
import pyNN.spiNNaker as p
from pyNN.random import RandomDistribution
from pyNN.utility.plotting import Figure, Panel
import pyNN.spiNNaker as p

p.setup(timestep=0.1)
p.set_number_of_neurons_per_core(p.IF_curr_exp, 64)
Expand Down
2 changes: 1 addition & 1 deletion examples/current_injection_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@

"""

import matplotlib.pyplot as plt
import pyNN.spiNNaker as sim
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt
from quantities import mV

sim.setup(timestep=1.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import time

import numpy
import pylab
import pyNN.spiNNaker as p
Expand Down
3 changes: 2 additions & 1 deletion examples/external_devices_examples/live_examples/spike_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
import random
import time
from threading import Condition

import matplotlib.pyplot as plt
import pyNN.spiNNaker as Frontend
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt

###################################
# Setup for Live Input and Output #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@

import multiprocessing
import tkinter as tk

import matplotlib.pyplot as plt
import pyNN.spiNNaker as Frontend
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt


class PyNNScript(object):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# limitations under the License.

# Standard PyNN imports
import matplotlib.pyplot as plt
import pyNN.spiNNaker as p

# pynn plotting stuff
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt

# Define a synfire chain as usual
p.setup(timestep=1.0, min_delay=1.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import numpy
import pyNN.spiNNaker as p


###########################################
# Connection and simulation specifications
###########################################
Expand Down
2 changes: 1 addition & 1 deletion examples/extra_models_examples/IF_cond_exp_stoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
$Id$
"""

import matplotlib.pyplot as plt
import pylab
import pyNN.spiNNaker as sim
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt


def run_script(*, split: bool = False) -> None:
Expand Down
2 changes: 1 addition & 1 deletion examples/extra_models_examples/IF_curr_delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
and two delta, current-based synapses, fed by two spike sources.
"""

import matplotlib.pyplot as plt
import pyNN.spiNNaker as sim
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt

sim.setup(timestep=0.1, min_delay=0.1)

Expand Down
3 changes: 2 additions & 1 deletion examples/extra_models_examples/IF_curr_exp_ca2_adaptive.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
# doi:10.1023/A:1008916026143
# -----------------------------------------------------------------------------
import math
import numpy

import matplotlib.pyplot as pylab
import numpy
import pyNN.spiNNaker as sim


Expand Down
2 changes: 1 addition & 1 deletion examples/extra_models_examples/IF_curr_exp_sEMD.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"""

# imports
import pyNN.spiNNaker as p
import matplotlib.pyplot as plt
import pyNN.spiNNaker as p
from pyNN.utility.plotting import Figure, Panel


Expand Down
7 changes: 4 additions & 3 deletions examples/extra_models_examples/LGN_Izhikevich.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@
"""

import math
import pyNN.spiNNaker as p

import matplotlib.pyplot as plt
import numpy as np
from pyNN.random import RandomDistribution, NumpyRNG
import pyNN.spiNNaker as p
from pyNN.random import NumpyRNG, RandomDistribution

# for plotting
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt

# pylint: disable=pointless-string-statement,disable=wrong-spelling-in-comment

Expand Down
3 changes: 2 additions & 1 deletion examples/extra_models_examples/stdp_associative_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
Simple Associative Memory
"""
import matplotlib.pyplot as plt
from pyNN.random import NumpyRNG, RandomDistribution
import pyNN.spiNNaker as p
from pyNN.random import NumpyRNG, RandomDistribution
from pyNN.utility.plotting import Figure, Panel

# pylint: disable=wrong-spelling-in-comment

p.setup(timestep=1.0, min_delay=1.0)
Expand Down
2 changes: 1 addition & 1 deletion examples/extra_models_examples/stdp_example_izk_cond.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
April 2013
"""

import matplotlib.pyplot as plt
import pyNN.spiNNaker as sim
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt

# SpiNNaker setup
sim.setup(timestep=0.1, min_delay=1.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import matplotlib.pyplot as plt
import pyNN.spiNNaker as p
from pyNN.utility.plotting import Figure, Panel

# pylint: disable=wrong-spelling-in-comment

p.setup(timestep=1.0, min_delay=1.0)
Expand Down
1 change: 0 additions & 1 deletion examples/extra_models_examples/stdp_triplet.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

import matplotlib.pyplot as pylab

import pyNN.spiNNaker as sim

# pylint: disable=wrong-spelling-in-comment
Expand Down
2 changes: 1 addition & 1 deletion examples/extra_models_examples/synfire_if_curr_dual_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"""
Synfirechain-like example
"""
import matplotlib.pyplot as plt
import pyNN.spiNNaker as p
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt


def run_script(*, split: bool = False) -> None:
Expand Down
6 changes: 4 additions & 2 deletions examples/extra_models_examples/vogels_2011.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
# limitations under the License.
import os
from typing import Optional
import pyNN.spiNNaker as sim
import numpy

import matplotlib.pyplot as pylab
import numpy
import pyNN.spiNNaker as sim

from spynnaker.pyNN.utilities import neo_convertor

# how much slowdown to put into the network to allow it to run without any
Expand Down
2 changes: 1 addition & 1 deletion examples/hbp_neuroguidebook_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
(example used in the HBP Neuromorphic Computing Guidebook)
"""

import numpy as np
import matplotlib.pyplot as plt
import numpy as np
import pyNN.spiNNaker as sim

sim.setup(timestep=1.0, min_delay=1.0)
Expand Down
2 changes: 1 addition & 1 deletion examples/if_curr_alpha.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import matplotlib.pyplot as plt
import pyNN.spiNNaker as p
import pyNN.utility.plotting as plot
import matplotlib.pyplot as plt


def run_script(*, split: bool = True) -> None:
Expand Down
2 changes: 1 addition & 1 deletion examples/if_curr_delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
and two delta, current-based synapses, fed by two spike sources.
"""

import matplotlib.pyplot as plt
import pyNN.spiNNaker as sim
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt

sim.setup(timestep=1.0, min_delay=1.0)

Expand Down
10 changes: 7 additions & 3 deletions examples/partitioner_examples/splitter_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import matplotlib.pyplot as plt
import pyNN.spiNNaker as p
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt

from pacman.model.partitioner_splitters import SplitterFixedLegacy
from pacman.model.partitioner_splitters import (
SplitterOneToOneLegacy as OneToOneSplitter,
SplitterFixedLegacy)
)

from spynnaker.pyNN.extra_algorithms.splitter_components import (
SplitterPopulationVertexFixed)
SplitterPopulationVertexFixed,
)

runtime = 1000
n_neurons = 100 # number of neurons in each population
Expand Down
3 changes: 1 addition & 2 deletions examples/pynnBrunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pyNN.spiNNaker as pynn

import matplotlib.pyplot as plt
import pyNN.spiNNaker as pynn
from pyNN.random import RandomDistribution
from pyNN.utility.plotting import Figure, Panel

Expand Down
5 changes: 3 additions & 2 deletions examples/simple_STDP.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
so some alteration of parameters is necessary to get a similar effect.
"""

import matplotlib.pyplot as plt
import numpy
import pyNN.spiNNaker as sim

# from quantities import ms
from pyNN.utility.plotting import Figure, Panel, DataTable
import matplotlib.pyplot as plt
from pyNN.utility.plotting import DataTable, Figure, Panel

# === Parameters ============================================================

Expand Down
2 changes: 1 addition & 1 deletion examples/spike_time_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
# A simple script that compares the spikes from two inputs to determine if
# one spiked just before or after the other.

import matplotlib.pyplot as plt
import pyNN.spiNNaker as sim
import pyNN.utility.plotting as plot
import matplotlib.pyplot as plt

sim.setup(timestep=1.0)

Expand Down
3 changes: 1 addition & 2 deletions examples/split_examples/pynnBrunnelSplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pyNN.spiNNaker as pynn

import matplotlib.pyplot as plt
import pyNN.spiNNaker as pynn
from pyNN.random import RandomDistribution
from pyNN.utility.plotting import Figure, Panel

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
post-synaptic neurons to the same stimuli.
"""

import pyNN.spiNNaker as sim
import pylab
import pyNN.spiNNaker as sim

timestep = 1.0
stim_rate = 50
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
STDP, structural plasticity and neuron instructions would not fit on one core
"""

import pyNN.spiNNaker as sim
import pylab
import numpy as np
import pylab
import pyNN.spiNNaker as sim

timestep = 1.0
stim_rate = 50
Expand Down
4 changes: 2 additions & 2 deletions examples/split_examples/va_benchmark_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
August 2006
"""
import socket

import matplotlib.pyplot as plt
import pyNN.spiNNaker as p
from pyNN.random import RandomDistribution
from pyNN.utility import Timer
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt


simulator_name = 'spiNNaker'
benchmark = 'CUBA'
Expand Down
2 changes: 1 addition & 1 deletion examples/stdp_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@

April 2013
"""
import matplotlib.pyplot as plt
import pyNN.spiNNaker as sim
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt

# SpiNNaker setup
sim.setup(timestep=1.0, min_delay=1.0)
Expand Down
2 changes: 1 addition & 1 deletion examples/stdp_example_cond.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@

April 2013
"""
import matplotlib.pyplot as plt
import pyNN.spiNNaker as sim
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt

# SpiNNaker setup
sim.setup(timestep=1.0, min_delay=1.0)
Expand Down
2 changes: 1 addition & 1 deletion examples/stdp_example_izk.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
April 2013
"""

import matplotlib.pyplot as plt
import pyNN.spiNNaker as sim
from pyNN.utility.plotting import Figure, Panel
import matplotlib.pyplot as plt

# SpiNNaker setup
sim.setup(timestep=0.1, min_delay=1.0)
Expand Down
2 changes: 1 addition & 1 deletion examples/stdp_neuromodulated_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
post-synaptic neurons to the same stimuli.
"""

import pyNN.spiNNaker as sim
import pylab
import pyNN.spiNNaker as sim

timestep = 1.0
stim_rate = 50
Expand Down
Loading
Loading