Skip to content

Instantly share code, notes, and snippets.

View russelljjarvis's full-sized avatar
🔨
code carpentry

Russell Jarvis russelljjarvis

🔨
code carpentry
View GitHub Profile

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).

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.
@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
@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 / 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 / Dockerfile
Last active February 14, 2023 03:58
Example of reproducible building
https://github.com/scidash/sciunit/blob/master/docker/Dockerfile
```
FROM jupyter/datascience-notebook
RUN apt-get update && \
apt-get upgrade -y
# Install Python, pip and swig
RUN apt-get install -yq --no-install-recommends python3-dev python3-pip swig gosu nano
import numpy as np
import pandas as pd
import json
import pickle
from pathlib import Path
from sonata.circuit import File
from sonata.reports.spike_trains import SpikeTrains
import pygenn
import matplotlib.pyplot as plt
from GLIF_models import GLIF1
@russelljjarvis
russelljjarvis / Dockerfile
Last active October 12, 2022 03:56
Dockerfile_lava
FROM jupyter/base-notebook
USER root
RUN apt update
RUN apt install -y git
USER jovyan
WORKDIR $HOME
RUN conda install -c conda-forge micromamba
RUN conda install poetry matplotlib pandas jupyterlab
RUN git clone https://github.com/lava-nc/lava.git
WORKDIR lava
@russelljjarvis
russelljjarvis / python
Created August 31, 2022 07:25
Get Fly Connectome.
#!/usr/bin/env python
# coding: utf-8
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from tqdm.notebook import tqdm
import navis
import pickle
import os
import navis