Skip to content

Instantly share code, notes, and snippets.

@badeball
Last active December 14, 2015 06:09
Show Gist options
  • Save badeball/5040222 to your computer and use it in GitHub Desktop.
Save badeball/5040222 to your computer and use it in GitHub Desktop.
The Basic Izhikevich Spiking-Neuron Model.
for i in range(args.n_timesteps):
spike_train.append(v)
if v > 0.035:
v = c
u = u + d
spikes.append(i)
d_v = (1 / 10.0) * (k * v**2 + 5 * v + 140 - u + 1)
d_u = (a / 10.0) * (b * v - u)
v += d_v
u += d_u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment