Skip to content
Merged
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
4 changes: 2 additions & 2 deletions examples/external_devices_examples/live_examples/spike_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ def receive_spikes(label, _time, neuron_ids):
# Synfire chain connections where each neuron is connected to its next neuron
# NOTE: there is no recurrent connection so that each chain stops once it
# reaches the end
loop_forward = list()
loop_backward = list()
loop_forward = []
loop_backward = []
for i in range(0, n_neurons - 1):
loop_forward.append((i, (i + 1) % n_neurons, weight_to_spike, 3))
loop_backward.append(((i + 1) % n_neurons, i, weight_to_spike, 3))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ def __init__(self):
# neuron
# NOTE: there is no recurrent connection so that each chain stops once
# it reaches the end
loop_forward = list()
loop_backward = list()
loop_forward = []
loop_backward = []
for i in range(0, self.n_neurons - 1):
loop_forward.append((i, (i + 1) %
self.n_neurons, weight_to_spike, 3))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
'v_thresh': -50.0
}

populations = list()
projections = list()
populations = []
projections = []

weight_to_spike = 2.0
delay = 17

loopConnections = list()
loopConnections = []
for i in range(0, nNeurons):
singleConnection = (i, ((i + 1) % nNeurons), weight_to_spike, delay)
loopConnections.append(singleConnection)
Expand Down
4 changes: 2 additions & 2 deletions examples/external_devices_examples/motor_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
connected_chip_coords = {'x': 0, 'y': 0}
link = 4

populations = list()
projections = list()
populations = []
projections = []


input_population = p.Population(6, p.SpikeSourcePoisson(rate=10))
Expand Down
10 changes: 5 additions & 5 deletions examples/extra_models_examples/stdp_associative_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
'v_rest': -70.0,
'v_thresh': -50.0}

populations = list()
projections = list()
populations = []
projections = []

stimulus = 0
inhib = 1
Expand Down Expand Up @@ -85,8 +85,8 @@
p_to_inhib_connect = 1.0
p_from_inhib_connect = 1.0

spikes0 = list()
teachingSpikes = list()
spikes0 = []
teachingSpikes = []
for i in range(runTime//40):
spikes0.append(i*40)
for i in range(runTime//80):
Expand All @@ -106,7 +106,7 @@
arrayEntries.append(newEntry)
spikeArray = {'spike_times': arrayEntries}

teachlist = list()
teachlist = []
for i in range(nSourceNeurons):
teachlist.append(teachingSpikes)
teachingSpikeArray = {'spike_times': teachlist}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
'v_rest': -70.0,
'v_thresh': -50.0}

populations = list()
projections = list()
populations = []
projections = []

stimulus = 0
inhib = 1
Expand All @@ -52,8 +52,8 @@
weight_to_force_firing = 15.0
baseline_excit_weight = 2.0

spikes0 = list()
teachingSpikes = list()
spikes0 = []
teachingSpikes = []
for i in range(runTime//40):
spikes0.append(i*40)
for i in range(runTime//80):
Expand All @@ -67,7 +67,7 @@
arrayEntries.append(newEntry)
spikeArray = {'spike_times': arrayEntries}

teachlist = list()
teachlist = []
for i in range(nSourceNeurons):
teachlist.append(teachingSpikes)
teachingSpikeArray = {'spike_times': teachlist}
Expand Down
6 changes: 3 additions & 3 deletions examples/extra_models_examples/synfire_if_curr_dual_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ def run_script(*, split: bool = False) -> None:
'v_thresh': -50.0
}

populations = list()
projections = list()
populations = []
projections = []

weight_to_spike = 2.0
delay = 17

loopConnections = list()
loopConnections = []
for i in range(0, nNeurons):
singleConnection = ((i, (i + 1) % nNeurons, weight_to_spike, delay))
loopConnections.append(singleConnection)
Expand Down
2 changes: 1 addition & 1 deletion examples/synfire_if_cond_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
weight_to_spike = 0.035
delay = 17

loopConnections = list()
loopConnections = []
for i in range(0, nNeurons):
singleConnection = ((i, (i + 1) % nNeurons, weight_to_spike, delay))
loopConnections.append(singleConnection)
Expand Down
6 changes: 3 additions & 3 deletions examples/synfire_if_curr_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
'v_thresh': -50.0
}

populations = list()
projections = list()
populations = []
projections = []

weight_to_spike = 2.0
delay = 17

loopConnections = list()
loopConnections = []
for i in range(0, nNeurons):
singleConnection = ((i, (i + 1) % nNeurons, weight_to_spike, delay))
loopConnections.append(singleConnection)
Expand Down
6 changes: 3 additions & 3 deletions examples/synfire_if_curr_exp_get_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
'v_thresh': -50.0
}

populations = list()
projections = list()
populations = []
projections = []

weight_to_spike = 2.0
delay = 17

loopConnections = list()
loopConnections = []
for i in range(0, nNeurons):
singleConnection = ((i, (i + 1) % nNeurons, weight_to_spike, delay))
loopConnections.append(singleConnection)
Expand Down
4 changes: 2 additions & 2 deletions examples/synfire_if_curr_exp_large_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
second_spike_start = delay * nNeurons
space_between_inputs = delay * nNeurons * 2

connections = list()
reverseConnections = list()
connections = []
reverseConnections = []
for i in range(0, nNeurons - 1):
connections.append((i, (i + 1) % nNeurons, weight_to_spike, delay))
reverseConnections.append(((i + 1) % nNeurons, i, weight_to_spike, delay))
Expand Down
2 changes: 1 addition & 1 deletion examples/synfire_if_curr_exp_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
weight_to_spike = 2.0
delay = RandomDistribution("uniform", low=1, high=max_delay)

loopConnections = list()
loopConnections = []
for i in range(0, nNeurons):
delay_value = delay.next()
singleConnection = (i, ((i + 1) % nNeurons), weight_to_spike, delay_value)
Expand Down
6 changes: 3 additions & 3 deletions examples/synfire_izk_curr_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
'i_offset': 0
}

populations = list()
projections = list()
populations = []
projections = []

weight_to_spike = 30
delay = 1

loopConnections = list()
loopConnections = []
for i in range(0, nNeurons):
singleConnection = ((i, (i + 1) % nNeurons, weight_to_spike, delay))
loopConnections.append(singleConnection)
Expand Down
18 changes: 9 additions & 9 deletions spiNNaker_start/spinnaker_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def write_data_to_file(write_file, data_list):


def read_data_from_file(read_file):
data_list = list()
data_list = []
n_items = struct.unpack("<I", read_file.read(4))[0]
for _ in range(n_items):
timestamp = struct.unpack("<f", read_file.read(4))[0]
Expand Down Expand Up @@ -162,8 +162,8 @@ def __init__(self, x, y, connection_selector, core_counter, save, load):
self._done = False
self._index = 0
self._thread = Thread(target=self._run)
self._p2p_active_data = list()
self._netinit_phase_data = list()
self._p2p_active_data = []
self._netinit_phase_data = []
self._start_time = time.time()
if load:
read_file = open_file(
Expand Down Expand Up @@ -348,7 +348,7 @@ def __init__(
self._save = save
self._load = load
self._thread = Thread(target=self._read_board)
self._data = list()
self._data = []
self._start_time = time.time()
if load:
read_file = open_file(
Expand Down Expand Up @@ -514,8 +514,8 @@ def __init__(self, core_counter, job, save, load):
self._thread = Thread(
target=self.run, args=[core_counter, job, save, load])
self._close_lock = RLock()
self._boot_threads = list()
self._processes = list()
self._boot_threads = []
self._processes = []

def start(self):
self._thread.start()
Expand All @@ -530,7 +530,7 @@ def close(self):
thread.close()

def run(self, core_counter, job, save, load):
job_connections = list()
job_connections = []
for (x, y), ip_address in iteritems(job.get_connections()):
job_connections.append((x, y, ip_address))
job_connections.sort(key=operator.itemgetter(0, 1))
Expand All @@ -541,7 +541,7 @@ def run(self, core_counter, job, save, load):

# Get a list of connections to the machine and start a thread for
# each listening for the boot to be done
connections = list()
connections = []
root_connection = None
boot_connection = None
with self._close_lock:
Expand Down Expand Up @@ -631,7 +631,7 @@ def run(self, core_counter, job, save, load):

class MockJob(object):
def __init__(self, width, height):
self._boards = list()
self._boards = []
self._height = height
self._width = width

Expand Down
2 changes: 1 addition & 1 deletion sudoku/set_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def set_values(self, automatic=False):
new_rates = get_rates(
new_values, self._n_total, self._n_cell, self._n_N,
int(self._default_rate.get()), int(self._max_rate.get()))
updated_rates = list()
updated_rates = []
for i, rate in enumerate(new_rates):
if rate != self._rates[i]:
updated_rates.append((i, rate))
Expand Down
2 changes: 1 addition & 1 deletion sudoku/sudoku_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def activate_visualiser(old_vis):
# set up the cell internal inhibitory connections
#
print("Setting up cell inhibition...")
connections = list()
connections = []
for x in range(9):
for y in range(9):
base = ((y * 9) + x) * n_cell
Expand Down
2 changes: 1 addition & 1 deletion sudoku/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

puzzles = list()
puzzles = []
puzzles.append(
# Diabolical problem:
[[0, 0, 1, 0, 0, 8, 0, 7, 3],
Expand Down
Loading