Skip to content
Open
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
7 changes: 4 additions & 3 deletions examples/extra_models_examples/stdp_triplet.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,18 @@ def generate_fixed_frequency_test_data(
size="xx-large")

line_styles = ["--", "-"]
for m_w, d_w, d_e, l, t in zip(weights, data_w, data_e, line_styles, delta_t):
for m_w, d_w, d_e, line_style, t in zip(
weights, data_w, data_e, line_styles, delta_t):
# Calculate deltas from end weights
delta_w = [(w - start_w) / start_w for w in m_w]

# Plot experimental data and error bars
axis.errorbar(
frequencies, d_w, yerr=d_e, color="black", linestyle=l,
frequencies, d_w, yerr=d_e, color="black", linestyle=line_style,
label=r"Experimental data, delta $(\Delta{t}=%dms)$" % t)

# Plot model data
axis.plot(frequencies, delta_w, color="blue", linestyle=l,
axis.plot(frequencies, delta_w, color="blue", linestyle=line_style,
label=r"Triplet rule, delta $(\Delta{t}=%dms)$" % t)

axis.legend(loc="upper right", bbox_to_anchor=(1.0, 1.0))
Expand Down
8 changes: 4 additions & 4 deletions pendulum/spike_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def send_spikes(width, height, min_x, min_y, run_time, label, connection):
start_time = None
max_x = min_x + width
max_y = min_y + height
y_shift = get_n_bits(width)
y_shift = get_n_bits(width) #noqa 841
with open("spikes.csv") as f:
first_time = -1
line = read_csv_line(f)
Expand All @@ -85,9 +85,9 @@ def send_spikes(width, height, min_x, min_y, run_time, label, connection):
line = next_line

filtered_lines = [
l for l in same_time_lines
if (l.x >= min_x and l.x < max_x and l.y >= min_y and
l.y < max_y)]
line for line in same_time_lines
if (line.x >= min_x and line.x < max_x and line.y >= min_y and
line.y < max_y)]

if not filtered_lines:
continue
Expand Down
2 changes: 1 addition & 1 deletion spiNNaker_start/spinnaker_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
from spinn_utilities.overrides import overrides

from spinnman.config_setup import unittest_setup
from spinnman.spalloc import SpallocClient, SpallocState
from spinnman.spalloc import SpallocClient
from spinn_utilities.config_holder import set_config

from spinn_machine.machine import Machine
Expand Down
Loading