Skip to content

Commit

Permalink
virtual simple
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Jan 9, 2024
1 parent 866fceb commit 4e658fb
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,13 @@ jobs:
- name: Setup
uses: ./support/actions/run-install

#- name: Setup PyNN
# uses: ./support/actions/pynn-setup
- name: Setup PyNN
uses: ./support/actions/pynn-setup

- name: Create a spynnaker.cfg
uses: ./support/actions/configure-spynnaker
with:
virtual: true

- name: Test with nbmake
run: pytest --nbmake **/*ipynb
61 changes: 61 additions & 0 deletions Play/simple.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import pyNN.spiNNaker as sim\n",
"\n",
"sim.setup(timestep=1.0)\n",
"sim.set_number_of_neurons_per_core(sim.IF_curr_exp, 100)\n",
"\n",
"pop_1 = sim.Population(1, sim.IF_curr_exp(), label=\"pop_1\")\n",
"input_pop = sim.Population(\n",
" 1, sim.SpikeSourceArray(spike_times=[0]), label=\"input\")\n",
"input_proj = sim.Projection(input_pop, pop_1, sim.OneToOneConnector(),\n",
" synapse_type=sim.StaticSynapse(weight=5, delay=1))\n",
"pop_1.record([\"spikes\", \"v\"])\n",
"simtime = 10\n",
"sim.run(simtime)\n",
"sim.end()"
]
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}

0 comments on commit 4e658fb

Please sign in to comment.