Skip to content

Instantly share code, notes, and snippets.

View russelljjarvis's full-sized avatar
:octocat:
Focusing

Russell Jarvis russelljjarvis

:octocat:
Focusing
View GitHub Profile
@russelljjarvis
russelljjarvis / GenPotjansWeightMatrix.jl
Last active February 15, 2023 08:02
GenPotjansWeightMatrix.jl
using SparseArrays
#using ProgressMeter
using UnicodePlots
function potjans_params(scale_N_cells=1.0)
"""
This code draws heavily on the PyNN OSB Potjans implementation code found here:
https://github.com/OpenSourceBrain/PotjansDiesmann2014/blob/master/PyNN/network_params.py#L139-L146
"""
conn_probs = [[0.1009, 0.1689, 0.0437, 0.0818, 0.0323, 0., 0.0076, 0. ],
[0.1346, 0.1371, 0.0316, 0.0515, 0.0755, 0., 0.0042, 0. ],
@russelljjarvis
russelljjarvis / Potjans_init.jl
Created February 15, 2023 07:29
Potjans_init.jl
sing LinearAlgebra, Random, Statistics, StatsBase, ArgParse, SymmetricFormats
using Plots
using StatsBase
using Random
using ProgressMeter
using StatsPlots
using Plots
#using UnicodePlots
unicodeplots()
@russelljjarvis
russelljjarvis / potjans_param.jl
Created February 15, 2023 07:31
potjans_param.jl
include("src/genWeightsPotjans.jl")
ccu = Dict("23E"=>20683,
"4E"=>21915,
"5E"=>4850,
"6E"=>14395, "6I"=>2948, "23I"=>5834,"5I"=>1065,"4I"=>5479)
ccu = Dict((k,ceil(Int64,v)) for (k,v) in pairs(ccu))
Ncells = sum([i for i in values(ccu)])+1
Hi @ali-mehrabi,
To automatic docker building in github. Click on the tab "actions" in your repository.
Then you can create an action similar to this:
https://github.com/pabloabur/brian2-sims/blob/main/.github/workflows/docker-image.yml#L18-L20
lines 18-20 build and run the dockerfile.

Hi Raf

For a while I have been trying to massage this Python model into Julia, in part unsuccessfully.

https://portal.brain-map.org/explore/models/mv1-all-layers

The model is interesting for your grid simulator, as the neurons are arranged in pixel like grids (cells have both cartesian pixel indexs, and spatial coordinates).

@russelljjarvis
russelljjarvis / cell_model.jl
Last active March 10, 2023 23:26
cell_model.jl @rafaqz
"""
I destroyed the generalness of the previous typing system which only worked for mutable kwarg structs
This approach works but with unsophisticated typing.
"""
abstract type AbstractIFParameter end
struct IFParameter# <: AbstractIFParameter
τm::Float32# = 20ms
@russelljjarvis
russelljjarvis / Potjans_model_wiring_for_SNN.jl
Last active May 17, 2023 05:02
Potjans model wiring for SNN.jl
using SparseArrays
using StaticArrays
using ProgressMeter
using LinearAlgebra
"""
This file contains a function stack that creates a network with Potjans and Diesmann wiring likeness in Julia using SpikingNeuralNetworks.jl to simulate
electrical neural network dynamics.
This code draws heavily on the PyNN OSB Potjans implementation code found here:
https://github.com/OpenSourceBrain/PotjansDiesmann2014/blob/master/PyNN/network_params.py#L139-L146
@russelljjarvis
russelljjarvis / Pre-print_draft_Example_SNN.md
Last active May 17, 2023 02:15
Pre-print draft Example SNN.

Spike Time

Subtitle: Exploiting Modern Language Features for High Throughput Spiking Network Simulations at a Lower Tech Debt

Tags: Simulation of Spiking Neural Networks, Computational Neuroscience, Large Scale Modelling and Simulation

authors:

* Undecided order, or all equal order, I am flexible about this.
For example, in order that other other authors agree with,
name: Russell Jarvis affiliation: International Centre for Neuromorphic Systems, MARCS Institute, Western Sydney University 

name: Yeshwanth Bethi affiliation: "International Centre for Neuromorphic Systems, MARCS Institute, Western Sydney University

@russelljjarvis
russelljjarvis / GPUComplianceModifications.jl
Last active May 17, 2023 04:55
GPUComplianceModifications.jl
using Revise
using CUDA
"""
# * Changes to the cells struct as follows:
# * Make the typing used dynamic and parametric, ie types can be either CuArray or regular Array, depending the input
# arguments that are passed to the constructor.
# TODO, I have good things about KernelAbstractions.jl it possible that kernel abstractions will remove my reliance on different method dispatch to choose CPU/GPU backend.