This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Install from: | |
# https://geomdata.gitlab.io/hiveplotlib/basic_usage.html | |
## | |
from hiveplotlib import hive_plot_n_axes | |
from hiveplotlib.converters import networkx_to_nodes_edges | |
from hiveplotlib.viz import hive_plot_viz_mpl | |
from matplotlib.lines import Line2D | |
import networkx as nx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using SpikingNN | |
using Distributions | |
using Distributions: sample | |
""" | |
This model/code works with the standard Pkg.add("SpikingNN.jl") it does not work with the other git branches such as refactor/kd which | |
may have more recent code added) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENV["PYTHON"] = "/opt/conda/bin/python" | |
using Conda | |
using ModernGL | |
using PyCall; | |
pushfirst!(PyVector(pyimport("sys")["path"]),"") | |
pushfirst!(PyVector(pyimport("sys")["path"]),"/opt/conda/bin/python") | |
pushfirst!(PyVector(pyimport("sys")["path"]),"/home/jovyan/neuronunit") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from deap import tools | |
def _get_offspring_time_diminishing_eta(parents, toolbox, cxpb, mutpb,gen, ngen): | |
'''return the offspring, use toolbox.variate if possible''' | |
BOUND_LOW = [] | |
BOUND_UP = [] | |
NDIM = len(parents[0]) | |
fit_dim = len(parents[0].fitness.values) | |
for x in range(0,len(parents[0])): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Any, Dict, List, Optional, Tuple, Type, Union, Text | |
import pickle | |
import seaborn as sns | |
import os | |
import copy | |
import numpy as np | |
from collections.abc import Iterable | |
import pandas as pd | |
import quantities as pq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (localStorage.getItem("localnet") === null) { | |
network = drawGraph(); | |
localStorage.setItem('localnet', JSON.stringify(network)); | |
}else{ | |
network = localStorage.getItem('localnet') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Author information. This is an extension to the Utils class from Allen Brain API. | |
The parallel wiring related functions are written by Russell Jarvis [email protected] | |
''' | |
from allensdk.model.biophys_sim.neuron.hoc_utils import HocUtils | |
import logging | |
import glob | |
from mpi4py import MPI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
import scipy.stats as scs | |
def z_val(sig_level=0.05, two_tailed=True): | |
"""Returns the z value for a given significance level""" | |
z_dist = scs.norm() | |
if two_tailed: | |
sig_level = sig_level/2 | |
area = 1 - sig_level |