sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
7f09f8e1436f4b93bca120cc76007c5ad92df1693a1e8f83c1e37190a80376f1
JavaScript
79,613
1
Search.setIndex({"docnames": ["0.0_previous_MLSchool", "0.1_2023_MLSchool", "0.1_2023_MLSchool_AsiaPacific", "0.1_2024_MLSchool", "1.0_introduction", "2.0_prerequisites", "3.0.00_macos_users", "3.0.01_python_matlab", "3.0_gettingstarted", "4.0_mainmenu", "4.10_mainmenu_save_struct", "4.11_mainmenu_change_wd", "4.12_mai...
ee05c73bdc3ed860118ed7926089b5e8ec2d75f0b8c1d476908a5350745912f2
JavaScript
80,813
3
/*! For license information please see bootstrap.js.LICENSE.txt */ (()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t...
00df89d1103a914d2811841621b05d966ae22841eea9befeacb6adfcdf29603b
JavaScript
85,625
1,860
//////////////////////////////////////////////// // MultiQC Report Toolbox Code //////////////////////////////////////////////// let mqc_colours_idx = 0; const mqc_colours = ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#a9a904", "#a65628", "#f781bf", "#999999"]; const zip_threshold = 8; // Add these const...
85556761a8800d14ced8fcd41a6b8b26bf012d44a318866c0d81a62092efd9bf
JavaScript
86,709
4
/*! jQuery v3.1.1 | (c) jQuery Foundation | jquery.org/license */ !function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?wi...
cd9db3b7d812139a4679a2566ea8f01b2a80159490a60b9e9e813e81b5e00a05
JavaScript
96,397
3
/*! @algolia/autocomplete-js 1.19.1 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||s...
acc7e41455a80765b5fd9c7ee1b8078a6d160bbbca455aeae854de65c947d59e
JavaScript
97,630
13
/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files <http://stuartk.com/jszip> (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com> Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. JSZip uses the library pako released under the MIT...
51e25d438f875f90c313e2f5a6ca1a458b4eca94e8f3dddd11f6ac3971f4da2f
JavaScript
108,036
16
"use strict";(()=>{var Wi=Object.create;var gr=Object.defineProperty;var Vi=Object.getOwnPropertyDescriptor;var Di=Object.getOwnPropertyNames,Vt=Object.getOwnPropertySymbols,zi=Object.getPrototypeOf,yr=Object.prototype.hasOwnProperty,ao=Object.prototype.propertyIsEnumerable;var io=(e,t,r)=>t in e?gr(e,t,{enumerable:!0,...
10597790ff3cdc45601b58bd14ed25cf961a458e7821cadc97145f4baadc73e8
JavaScript
200,000
2
/*! For license information please see molstar.js.LICENSE.txt */ !function(e,A){"object"==typeof exports&&"object"==typeof module?module.exports=A():"function"==typeof define&&define.amd?define([],A):"object"==typeof exports?exports.molstar=A():e.molstar=A()}(self,(()=>(()=>{var e={1944:()=>{"use strict";var e,A,t,r,n,...
2bfe2138694543575950e6d761e8b317cea030f669c65c3ed3eb69560bd4024b
JavaScript
200,000
6,083
/** * plotly.js v2.27.0 * Copyright 2012-2023, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define....
64f67ef4d2ebe567a89a4497af92973801d1ee54beb99fbe313d041e2cc1dca2
JavaScript
200,000
2
/*! For license information please see main.187c56e6.js.LICENSE.txt */ (()=>{var __webpack_modules__={54371:(e,t,r)=>{"use strict";var n,a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=r(65043),i=(n=o)&...
fed9bb86c760320506f3cacdc9f051fdf617e390a08c780a75eb1952689f04f0
JavaScript
200,000
18
/** * plotly.js (custom - minified) v3.1.2 * Copyright 2012-2025, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ ( function(root, factory) { if (typeof module === "object" && module.exports) { module.exports = factory(); } else { root.moduleName = factory(); } } (typeof self !== "u...
69889a12fa0f3440052245df98054193b09c8ef39d4cc9acc4b07728d857c9c6
JavaScript
200,002
8
/** * plotly.js v2.27.0 * Copyright 2012-2023, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ /*! For license information please see plotly.min.js.LICENSE.txt */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e...
b8872c5a781614d23cb545015ec68c9803d55da6ccdde198c2d8ffbd4346cbc2
JavaScript
200,012
1
var e=Object.defineProperty,t=(t,o)=>{let n={};for(var i in t)e(n,i,{get:t[i],enumerable:!0});return o||e(n,Symbol.toStringTag,{value:"Module"}),n},o="bottom",n="right",a="left",s="auto",r=["top",o,n,a],l="start",c="clippingParents",d="viewport",h="popper",u="reference",p=r.reduce(function(e,t){return e.concat([t+"-"+l...
f025937817acbb227e7f6bdf17a1352d358f7574e04cff205a37ac2ca407ca0f
Julia
368
16
# This file aims at installing all used packages in this work using Pkg Pkg.add("IJulia") Pkg.add("DifferentialEquations") Pkg.add("Plots") Pkg.add("Polynomials") Pkg.add("LaTeXStrings") Pkg.add("ColorSchemes") Pkg.add("DelimitedFiles") Pkg.add("Statistics") Pkg.add("StatsPlots") Pkg.add("Random") Pkg.add("ProgressMet...
e5972e18ef1730c930c4106ceda31fa39f56191111962f3515fab6f31b4c64c1
Julia
737
48
""" A package for fitting data from auditory evidence accumulation task (Poisson clicks task) to evidence accumulation model. """ __precompile__() module PBupsModel # 3rd party import Base.convert using MAT using ForwardDiff using Optim using GeneralUtils import ForwardDiff.DiffBase # using DiffBase export ...
a7a864b071818f28cad159282167a292a4102bada72ad1b6c7ac8c9581749a0d
Julia
1,177
45
# Rawdata Import function LoadData(mpath, filename) # data import if contains(filename,".mat") ratdata = matread(joinpath(mpath,filename)) else ratdata = matread(joinpath(mpath,*(filename,".mat"))) end println("rawdata from ", filename, " imported" ) # number of trials n...
5a3426c1c12fba28ef80f14f8a77219300940a1a8092893e984df59bdd1bf0eb
Julia
1,405
42
### Kinetics and parameters for the DA model # DA gating Functions DA_boltz(V, A, B) = 1 / (1 + exp(-(V-A) / B)) tauX(V, A, B, D, E) = A - B / (1 + exp((V+D) / E)) # Initializing Nernst reversalPotential DA_VNa = 60. # Sodium reversal potential DA_VK = -85. # Potassium reversal potential DA_VCa = 60. # Calcium reversa...
42a96ae2bec8f7d8aa5cf7c65421ecbe46f0376246bc252f26c580665357e9e6
Julia
1,541
43
#= This file contains all STG model gating functions =# # Gating functions boltz(V, A, B) = 1 / (1 + exp((V+A)/B)) tauX(V, A, B, D, E) = A - B / (1+exp((V+D)/E)) # Na-current (m = activation variable, h = inactivation variable) mNa_inf(V) = boltz(V, 25.5, -5.29) tau_mNa(V) = tauX(V, 1.32, 1.26, 120., -25.) hNa_inf(V)...
30b86ebaa1045005d8b0fae6e56506a476fd142611934f1ffb97cc45dd3dee1c
Julia
1,715
54
#= This file contains all STG model gating functions =# # Gating functions boltz(V, A, B) = 1 / (1 + exp((V+A)/B)) tauX(V, A, B, D, E) = A - B / (1+exp((V+D)/E)) # Na-current (m = activation variable, h = inactivation variable) mNa_inf(V) = boltz(V, 25.5, -5.29) tau_mNa(V) = tauX(V, 1.32, 1.26, 120., -25.) hNa_inf(V)...
dd333ac9aa8223543acce1533d093339eb4038d8f563331dfec431e44735508b
Julia
1,864
40
#= This file contains all derivatives of STG model gating functions =# # Derivative of the gating function dboltz(V, A, B) = -exp((A + V)/B) / (B * (exp((A + V)/B) + 1)^2) #boltz(V, A, B) = 1 / (1 + exp((V+A)/B)) # Na-current (m = activation variable, h = inactivation variable) dmNa(V) = dboltz(V, 25.5, -5.29) dhNa(V...
ea731ca46d65a12b03e77a48fdc8c55d34cf4dfd2cc1531011507e954c548587
Julia
2,563
96
using KissSmoothing using Test import Random @testset "Goodness of Smoothing" begin rn0 = Random.MersenneTwister(1337) for N in [100, 200, 400, 800] for α in [0.01, 0.05, 0.1] x = LinRange(0, 1, N) y = identity.(x) n = randn(rn0, length(x)) .* α yr = y .+...
e7f3f773cf0a5801f6dabcbde4d587d73883a9f0b61c8ac7b65bb83983bf0574
Julia
2,973
73
#= This file generates an initial set of STG neurons using the STG model as well as neuromodulating this set to tune its firing pattern =# # Include DICs computation include("STG_DIC.jl") # Include the computation of DICs and compensation algorithms ## Functions to generate the initial set of STG neurons # This funct...
b23d08c2d77bc7c927927f2a1c085bdb963ae7c06573402cda5ac976e7f6b075
Julia
3,035
73
#= This file generates an initial set of STG neurons using the STG model as well as neuromodulating this set to tune its firing pattern =# # Include DICs computation include("network_STG_DIC.jl") # Include the computation of DICs and compensation algorithms ## Functions to generate the initial set of STG neurons # Th...
ae6871e5918cc08f498343b314d5a5076675583f3eb15f39a8178ae6bcda4060
Julia
3,240
87
#= This file contains large simulations scripts =# using DifferentialEquations, ProgressMeter include("DA_kinetics.jl") # Include STG kinetics of gating variables include("DA_ODE.jl") # Include STG model include("STG_utils.jl") # Include some utils functions # Moving average function moving_average(vs, n, padding) =...
2d6695581ebaab4d11d8155f9d32cc8453a9f16b4102e06bab54b5a8cbeb79e0
Julia
3,633
128
#= This file contains functions to extract characteristics of the firing pattern as well as some functions to plot complicated graphs =# using Statistics, Plots, StatsPlots, LaTeXStrings, Printf ## Functions extracting characteristics of the firing pattern # This function extracts the spiking frequency of a spiking ...
abd7647ddfd06f0a588805b6b6c6c657b6f2db4b221bf5ca4b90a517bb017b1d
Julia
3,758
95
#= This file contains large simulations scripts =# using DifferentialEquations, ProgressMeter include("STG_kinetics.jl") # Include STG kinetics of gating variables include("STG_models.jl") # Include STG model include("STG_utils.jl") # Include some utils functions include("STG_gs_derivatives.jl") # Include X_inf deriv...
18745f42dbe2a5d4a740e6527b40a68d533030b2ffd01d5d941541d1a9694eaa
Julia
4,081
124
# for using keyword_vgh() # change the order of parameters. # function ComputeLL(LLs::SharedArray{Float64,1}, ratdata, ntrials::Int#, args, x::Vector{T}) function ComputeLL(LLs, ratdata, ntrials::Int#, args, x::Vector{T}) ;kwargs...) LL = 0. @sync @parallel for i in 1:ntrials RightClickTimes, Left...
2858639e1ec3c874de5809a0be9d017d5325bb84a50028d17016810b9e2cff2a
Julia
4,184
95
#= This file contains differential equations describing the STG model =# include("STG_kinetics.jl") # Include STG model gating functions ## STG model from Liu 1998 - current-clamp mode function STG_homeo_leak_ODE(dx, x, p, t) # Parameters Iapp = p[1] # Amplitude of constant applied current tau_Na ...
b857e92864c6b6e126c81740df02c8223ad8ddcf2d440e23fdd49c2ba13ec22f
Julia
4,242
105
#= This file generates an initial set of STG neurons using the STG model as well as neuromodulating this set to tune its firing pattern =# # Include DICs computation include("STG_DIC.jl") # Include the computation of DICs and compensation algorithms ## Functions to generate the initial set of STG neurons # This funct...
307ea53555b087933fe3840574cece192000c735d65b663bd5d443a5215e43b0
Julia
4,615
150
# compute models in parallel: multiprocess addprocs(Sys.CPU_CORES) # add a worker process per core print_with_color(:white, "Setup:\n") println(" > Using $(nprocs()-1) worker processes") n_core = nprocs()-1#2 if nworkers() < n_core addprocs(n_core-nworkers(); exeflags="--check-bounds=yes") end @assert nprocs() >...
efb0f12a60f0ae96452edeb25486d7b6f7a7d4cc6c71dc4f5093c0e1adf742b3
Julia
4,651
94
""" This script runs the sequences used in the AxCaliber paper (https://doi.org/10.1002/mrm.21577) on a single cylinder substrate we created before, it should be called with two arguments --radius and --MT (effective T2 in ms) provided. An optional argument is --n_spins which set the number of isochromats/spins for th...
613f6085030cf17561bb3351e3d10fb401ad3631c31f8b7d9ac8462e8b9a5021
Julia
4,652
95
""" This script runs the sequences used in the AxCaliber paper (https://doi.org/10.1002/mrm.21577) on a single cylinder substrate we created before, it should be called with two arguments --radius and --MT (effective T2 in ms) provided. An optional argument is --n_spins which set the number of isochromats/spins for th...
5f6114bcf89d79ec8c70cfde9b167c9f90c0c8d81fbddb1b42b2fd2b25d3d1bd
Julia
4,655
93
""" This script runs the sequences used in the AxCaliber paper (https://doi.org/10.1002/mrm.21577) on a single cylinder substrate we created before, it should be called with two arguments --radius and --perm (permeability) provided. An optional argument is --n_spins which set the number of isochromats/spins for the si...
ed31c5e1e34756f481023fe4a6529a619aae410286f28e3ae78274dde7cafa7f
Julia
4,668
92
""" This script runs the sequences used in the AxCaliber paper (https://doi.org/10.1002/mrm.21577) on a single cylinder substrate we created before, it should be called with two arguments --radius and --perm (permeability) provided. An optional argument is --n_spins which set the number of isochromats/spins for the si...
9d701c471656fa47aee761781ed4549044972b72fe853a977f04779c9081a487
Julia
5,102
133
""" repel_fixed_radius(radius, pos_in, repeatsize; maxiter=1000, repulsion_strength=0.01) This function adds repulsion between randomly distributed cylinders generated by the base MCMRSimulator and obtains a more equally distributed configuration. It takes the fixed radius value, cylinder position output of random_posi...
b295a62667f269689c1a50d5e39fda12b593d56128b8f7c0f2caac24e23aab7b
Julia
5,408
199
using Graphs, Distributions, Plots, GraphRecipes, LaTeXStrings, Random function GaussianFluc(Mean,Std,NN,T) d = Normal(0,Std) return Mean .+ rand(d,T,NN) end rg1 = Random.seed!(123) function Steady_randAmpl(a,b,NN) return (a .+ rand(rg1,NN).*(b-a)) # nA end function PoissonStim(f,T,NN) ...
851c06c56e3a1eeaa9ca357857fa8bc427bb51dc4f5245cf73c38a9d16a7e24c
Julia
5,467
131
#= This file contains differential equations describing the STG model =# include("STG_kinetics.jl") # Include STG model gating functions ## STG model from Liu 1998 - current-clamp mode function simple_PI_homeo_leak_STG_ODE(dx, x, p, t) # Parameters Iapp = p[1] # Amplitude of constant applied current ...
485032e28283b11a88ee329f735a69d22f1d60cbe6ff94ce0d78e8ce37e91824
Julia
6,045
144
#= This file contains large simulations scripts =# using DifferentialEquations, ProgressMeter include("STG_kinetics.jl") # Include STG kinetics of gating variables include("STG_models.jl") # Include STG model include("STG_utils.jl") # Include some utils functions include("STG_gs_derivatives.jl") # Include X_inf deriv...
5e25304242f7f5a8af887cb85e147d4faf0d08e874308a9ad45dfa138b3075cb
Julia
6,511
163
#= This file contains differential equations describing the controlled CB model of interest =# # Function that outputs values of variables derivatives function DA_ODE_PI_homeo(dx, x, p, t) # Parameters Iapp = p[1](t) # Time dependent applied current tau_Na = p[2] # Sodium current time constant t...
21737f3100925d34b63480e5784d4e0a132e63be63cd4530613048a0e6f55a2f
Julia
6,928
175
#= This file contains large simulations scripts =# using DifferentialEquations, ProgressMeter include("STG_kinetics.jl") # Include STG kinetics of gating variables include("STG_models.jl") # Include STG model include("STG_utils.jl") # Include some utils functions include("STG_gs_derivatives.jl") # Include X_inf deriv...
2123ea5ccf328ec611396990bd0c505a3fc19e256ba0e71754b96b879860402b
Julia
7,178
298
""" KissSmoothing: Easily smooth your data! exports a single function `denoise`, for further help look at it's docstring. """ module KissSmoothing using FFTW: dct, idct using Statistics: mean using LinearAlgebra: factorize, I using SparseArrays: sparse """ denoise(V::Array; factor=1.0, rtol=1e-12, dims=ndims(...
5f71789ede44f605d59f338cfb7f788aeadb4b41ad1a1bb101d6c7d50725fcf7
Julia
8,260
228
# updating for generalizing the model. # user will give args to init parameters # use 'dictionary' -> each parameter has different range # utilize make_dict and defaults. function InitParams(args, seed_mode=1) # Parameters (match the parameter order with original code) # --> order doesn't matter now, it wi...
618199bbabac26122a7bf262a3f7d4fbf3dc2f15071efcee2e63049e8c7de6cc
Julia
9,930
229
""" function x, cost, iters_used, last_Delta_x = one_d_minimizer(seed, func; tol=1e-5, maxiter=100, start_eta=0.1) Minimizes a 1-d function using constrained Hessian minimization. We don't trust the long-range info from the Hessian too much, meaning that there's a given (adaptive) step size. If Newton's method sugges...
2a445c147a07b784ff439b746530bd747a9420314c83b0975909d7f41f2ddbd5
Julia
12,965
302
#= This file contains differential equations describing the STG model =# include("STG_kinetics.jl") # Include STG model gating functions ## STG model from Liu 1998 - current-clamp mode function STG_ODE(du, u, p, t) # Parameters Iapp = p[1] # Amplitude of constant applied current gNa = p[2] # Sodium c...
a34da0ae0874667815187b6d23f0c1501a1b45f6d7a91490a7fd8eddf7da1e55
Julia
13,597
347
#= This file animates the simple PI on 1 neuron =# using Plots, LaTeXStrings, Random, GLMakie using DataStructures: CircularBuffer include("network_STG_kinetics.jl") # Loading of STG kinetics of gating variables include("network_STG_models.jl") # Loading of STG model include("network_STG_utils.jl") # Loading of some u...
bd53512ec1170f2f59c74974d310a3507f3c65d22970c493065a9d4500e954ef
Julia
13,622
368
#= This file contains differential equations describing the STG model =# include("network_STG_kinetics.jl") # Include STG model gating functions using ProgressMeter # STG ODEs function dV(V, mNa, hNa, mCaT, hCaT, mCaS, hCaS, mA, hA, mKCa, mKd, mH, Ca, Iapp, gNa, gCaT, gCaS, gA, gKCa, gKd, gH, gleak) (dt...
5a9b583d0a6044154120ea72e1991ee885478c4c8781b30b9fcf86824af970fd
Julia
13,951
409
# Global variables const epsilon = 10.0^(-10); const dx = 0.25; const dt = 0.02; const total_rate = 40; # === Upgrading from ForwardDiff v0.1 to v0.2 # instead of ForwardDiff.GradientNumber and ForwardDiff.HessianNumber, # we will use ForwardDiff.Dual convert(::Type{Float64}, x::ForwardDiff.Dual) = Float64(x.value) f...
42ea78ade365f50a5e07cdaa6e586491ac73f0c2e114a1b84d626535a125d5eb
Julia
15,715
429
using GeneralUtils using MAT using JLD include("constrained_parabolic_minimization.jl") """ pdict = wallwrap(bdict, pdict) Given bdict, a dictionary of symbols to [minval, maxval] vectors, and pdict, a dictionary of symbols to values (or, alternatively, an Array of (Symbol, value) tuples], goes through each of the sy...
092b110ae6bbd458eabeaac5bcb74225b42b8c4f90db8a0c5c359c5cd4e41cbc
Julia
16,126
247
#= This file computes the dynamic input conductances of the STG model as well as applying the compensation algorithm for a set of maximal conductances (inputs of the algorithm) =# include("STG_kinetics.jl") # Include model gating functions include("STG_gs_derivatives.jl") # Include derivatives of model gating function...
d27294cc95fc6a8e544a99b112bc51524f93c6b4b22edca82b72671f803747a0
Julia
17,362
420
#= This file contains large simulations scripts =# using DifferentialEquations, ProgressMeter include("STG_kinetics.jl") # Include STG kinetics of gating variables include("STG_models.jl") # Include STG model include("STG_utils.jl") # Include some utils functions include("STG_gs_derivatives.jl") # Include X_inf deriv...
e7dbe25779f1f8f33a820ab6a2d2226985034588005a6d4840e88a8e71eb4295
Julia
20,218
302
#= This file computes the dynamic input conductances of the STG model as well as applying the compensation algorithm for a set of maximal conductances (inputs of the algorithm) =# include("STG_kinetics.jl") # Include model gating functions include("STG_gs_derivatives.jl") # Include derivatives of model gating function...
a86bc3ee1e33dd85855c6ed21197d52a5b9f74881c782164675196125fcc6603
Julia
22,228
469
#= This file contains large simulations scripts =# using DifferentialEquations, ProgressMeter include("STG_kinetics.jl") # Include STG kinetics of gating variables include("STG_models.jl") # Include STG model include("STG_utils.jl") # Include some utils functions include("STG_gs_derivatives.jl") # Include X_inf deriv...
8d0c3d3ca41478f2b81778fe5f54a9a1fa16d9050e8891ca56bad5bbe6d0c0f9
Julia
25,262
386
#= This file computes the dynamic input conductances of the STG model as well as applying the compensation algorithm for a set of maximal conductances (inputs of the algorithm) =# include("network_STG_kinetics.jl") # Include model gating functions include("network_STG_gs_derivatives.jl") # Include derivatives of model...
4c9d1fd5e9b27dcf64b12edb22034c33c5ed424e35af6c0181f28963faa1d289
Julia
25,772
607
#= This file contains differential equations describing the STG model =# include("STG_kinetics.jl") # Include STG model gating functions ## STG model from Liu 1998 - current-clamp mode function simple_PI_homeo_leak_STG_ODE(dx, x, p, t) # Parameters Iapp = p[1] # Amplitude of constant applied current ...
8e1595dab16fad066db13aeff3664c8b3d70a6cfe52317da6f3a0a31032b35a6
Julia
28,440
647
#= This file contains differential equations describing the STG model =# include("STG_kinetics.jl") # Include STG model gating functions ## STG model from Liu 1998 - current-clamp mode function STG_ODE(du, u, p, t) # Parameters Iapp = p[1] # Amplitude of constant applied current gNa = p[2] # Sodium c...
b084936d22316a321e45bd0fbf11561d3ef69e31c2dc897dcf52a5bd74191b0f
Jupyter
44
5
# %% import numpy as np # %% best_sigma =
0e5ecd2a1b53d2388827212f00ff298edcd505aac019b49f8dd1f4e1ec0fec36
Jupyter
70
3
# %% [markdown] # # Estimating connectivity models # To be provided
2f879c22bcdc3530bceecb3de17650b543c70c28cee85904338d222a3d2fc968
Jupyter
128
9
# %% import numpy as np # %% y_fed = np.load('/data/LLMs/data_processed/fedorenko/dataset/y_fedorenko.npy') y_fed.shape # %%
e2eeb101687e8ed0c667722549c3722d95410b02aa3f8c889d49e97985a586f6
Jupyter
226
10
# %% import pandas as pd # %% df = pd.read_csv("/g/korbel2/weber/MosaiCatcher_output/HGSVC_HJ/counts/HWWKWAFXY_HG03065x02_19s004569-1-1/TEST_PLOIDY.txt", sep="\t") df # %% df.groupby("#chrom")["ploidy_estimate"].describe()
0ead70ab1e789562ba0d3626824714bd4d7891c2a8f5ff5fa3283c79e002f4f7
Jupyter
243
18
# %% from test_plots import * import pandas import plotly.express as px # %% X = np.random.normal(0,1,(30,5)) plotscatter(X,0,1,2) # %% fig = px.scatter_3d(x=X[:,0],y=X[:,1],z=X[:,2],opacity=0.3,template='plotly_white') fig.show() # %%
2c75e2511e9bfb5396f9feff573b1cfda2be048d252e3a08627b675856f6bd84
Jupyter
310
13
# %% import numpy as np # %% best_sigma = np.load('/home3/ebrahim2/beyond-brainscore/analyze_results/figures_code/best_layer_sigma_info/best_sigma.npz') OASM_best_sigma_384 = best_sigma['pereira_384_pearson_r_contig_noL2'] OASM_best_sigma_384 # %% np.load('pereira_OASM-all-sigma_3.4_1_noL2_384.npz') # %%
be42932a4e6b73f43849984dad22137e0052c26cce2424a9eeb813cbd87bd49c
Jupyter
481
17
# %% import numpy as np # %% # should be of shape 627 pereira_acts_gpt2_xl = np.load('/data/LLMs/data_processed/pereira/acts/X_gpt2-xl.npz') pereira_acts_gpt2_xl['layer_1'].shape # %% # should be of shape 416 fed_acts_gpt2_xl = np.load('/data/LLMs/data_processed/fedorenko/acts/X_gpt2-xl.npz') fed_acts_gpt2_xl['layer_...
d9e6bd875889c1363c8afdac55623efdefa33dc05eee100b0950aca5bd14fead
Jupyter
544
21
# %% import numpy as np import pandas as pd import seaborn as sns import cortico_cereb_connectivity.globals as gl import cortico_cereb_connectivity.run_model as rm import Functional_Fusion.dataset as fdata import glob import matplotlib.pyplot as plt # %% [markdown] # ## Scaling vs. no-scaling comparison # %% df=rm....
30f485256d33b40e5b7f694b62a10c7afa1cf37c9917b04b0af63576018da129
Jupyter
576
13
# %% [markdown] # # Datasheets for Datasets (D4D) Agent Demo # # This notebook uses Datasheets for Datasets (D4D) agent in Aurelian to extract structured metadata from dataset documentation. The agent can analyze one or more web pages / PDF documents describing datasets. # %% [markdown] # ## Run D4D Agent # %% ! OPE...
58e7806eca610c849b32189118e54b167e5d537e0687e3320454c565b4253a27
Jupyter
592
33
# %% import pandas as pd # %% df = pd.read_csv("/scratch/tweber/TMP/ALICE/G4.csv", sep=",") df = df.drop(df.columns[0], axis=1) df # %% counts_file = pd.read_csv("/scratch/tweber/TMP/ALICE/c_G4.csv") counts_file # %% counts_file.groupby("chrom")["end"].max() # %% bin_df = counts_file[["chrom", "start", "end"]] bin_...
1ae1a24bf05e2535a8906df4616a46b85612f8307173732738f78158d26615e7
Jupyter
654
21
# %% import numpy as np from matplotlib import pyplot as plt # %% SP_SL_minus_GPT2XLU_sp_243 = np.load('/data/LLMs/brainscore/results_pereira/glass_brain_plots/SP+SL-GPT2-XLU-sp_out_of_sample_r2_243.npz')['426'] SP_SL_minus_GPT2XLU_sp_384 = np.load('/data/LLMs/brainscore/results_pereira/glass_brain_plots/SP+SL-GPT2-XL...
c646d2eb961772abccd82e064dff2b5f0583013e0874d913eed7305a3e334d09
Jupyter
667
28
# %% import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec def annotate_axes(fig): for i, ax in enumerate(fig.axes): ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center") ax.tick_params(labelbottom=False, labelleft=False) plt.style.use("default") fig = plt.figure() fig....
c693d60cf1d73e4c20c0063bba3543609c758cde4107887278bfd47bba36ce08
Jupyter
698
21
# %% import os, sys import pandas as pd import random import numpy as np # %% range(df.shape[0]) # %% selected_folder = "/scratch/tweber/DATA/MC_DATA/EVA_scNOVA_comparison_090523/GM19705iTRU3C/selected" np.random.seed = 0 df = pd.DataFrame(sorted([e.replace(".sort.mdup.bam", "") for e in os.listdir(selected_folder)...
25d633b4e6299f2b72fe34f512587ce0443890404df698feb87b7cee0bf9613a
Jupyter
739
41
# %% import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import numpy as np # Define our letters letter_O = [ [1, 1, 1], [1, 0, 1], [1, 0, 1], [1, 0, 1], [1, 1, 1] ] letter_P = [ [1, 1, 1], [1, 0, 1], [1, 1, 1], [1, 0, 0], [1, 0, 0] ] # Create an empty 16...
a6bfeedffc3cdc4379fbbdac45af6c84eb840ec707c6d8b8565a7147ec222deb
Jupyter
746
35
# %% [markdown] # ## Welcome to gene2map! # This is an interactive notebook for plotting cortical expression maps for genes of interest from the MAGICC dataset # %% #import one or two necessary packages #press shift enter or run to run each cell !pip install matplotlib-surface-plotting %matplotlib inline !git clone...
6cc1a9b2e81e62c1b1506318bfe9dfe316bcdc750c7772be0b1133133facf1d2
Jupyter
773
22
# %% import pandas as pd import numpy as np # %% # %% ploidy_detailed = pd.read_csv("/g/korbel2/weber/workspace/mosaicatcher-update/.tests/output_CHR21_selected/ploidy/RPE-BM510/ploidy_detailled.txt", sep="\t") ploidy_detailed = ploidy_detailed.loc[ploidy_detailed["#chrom"] != 'genome'] ploidy_detailed m_f = "M" # ...
36ada7b444069dac75c2048df4690242e6c80fc78f41aea307d9ec684ac360c2
Jupyter
788
34
# %% import numpy as np # %% yhat = np.load('/data/LLMs/brainscore/results_pereira/shuffled/pereira_gpt2-xl-mp_layer_20_1_384.npz')['y_hat'] ytest_ordered = np.load('/data/LLMs/results_pereira/y_test_ordered_384.npy') mse_intercept = np.load('/data/LLMs/results_pereira/mse_intercept_384.npy') # %% def compute_r2(y_tr...
00d725eab0cc33dcf94c057a80d44b63932d394a5f47d7f690b6b884873b5a4e
Jupyter
882
49
# %% from subprocess import CalledProcessError from pydantic_ai import RunContext from aurelian.agents.github.github_config import get_config, GitHubDependencies cfg = get_config() # %% cfg.workdir = "/tmp/aurelian/gh-test" # %% !mkdir -p /tmp/aurelian/gh-test # %% ctx = RunContext[GitHubDependencies](deps=cfg, ...
e1e278cb0278f83d8b014f78d5f8014bc375b847c78b408693cb4d3ef9c62638
Jupyter
896
33
# %% import tensorflow as tf # %% tf.__version__ # %% import tensorflow as tf # Load the saved model saved_model_path = "/g/korbel2/weber/workspace/StrandSeq_workspace/STABLE/mosaicatcher-pipeline-old/workflow/data/scNOVA/models_CNN/DNN_train20_chr1.h5" model = tf.keras.models.load_model(saved_model_path) print(mode...
c49a1ed9f17efa3140ae23b1046a9b75453e3997e8ba5650b60e32775438e591
Jupyter
910
47
# %% from scipy._lib._array_api import ( _asarray, array_namespace, ) import numpy as np # %% import numpy as np X = np.random.randn(150,600) # %% from sklearn.preprocessing import StandardScaler scaler = StandardScaler() X_normalized = scaler.fit_transform(X) # %% X_train = X_normalized[:100] X_test = X_...
2b1f360b728e1eb62b346148a9e74caf81fdfd245c5c82b7d3c0f6d260a88206
Jupyter
914
43
# %% !pip install graphviz -U --quiet # %% from graphviz import Source # %% s = Source(""" digraph G { graph [rankdir=LR]; node [shape=plaintext]; a[label="input features"]; b[label="neural network", shape=rect]; d[label="decision forest", shape=rect]; e[label="predictions"]; a -> b; d -> e; b -> d ...
83148e0c05d74dd7a787414b4631fb8364da3e39035355c72e247fbf3888445c
Jupyter
944
40
# %% import numpy as np import pandas as pd import seaborn as sns import cortico_cereb_connectivity.globals as gl import cortico_cereb_connectivity.run_model as rm import matplotlib.pyplot as plt import scipy.stats as stats # %% [markdown] # ## Evaluate different model fusion # %% dff = rm.comb_eval(models=['Fu']) ...
f77a66b33e0778d24240d45dfdcf056cfb16b1bfecb62e6b700096c7d1afc2fb
Jupyter
986
41
# %% import numpy as np import pandas as pd import seaborn as sns import cortico_cereb_connectivity.globals as gl import cortico_cereb_connectivity.run_model as rm import cortico_cereb_connectivity.model as cm import cortico_cereb_connectivity.evaluation as ev import matplotlib.pyplot as plt # %% [markdown] # ## Sim...
adf182267579e93552131de89a245c9be1eb00dfbabac36cd2b232e721a03995
Jupyter
1,039
43
# %% import os # to handle path information import nibabel as nb import numpy as np import h5py import pandas as pd import surfAnalysisPy as surf import matplotlib.pyplot as plt # %% hem = ['L','R'] hem_name = ['CortexLeft','CortexRight'] # %% baseDir = '/Users/jdiedrichsen/Data/fs_LR_32' flatsurf = [] inflsurf = [] ...
4bebdce86ec98c4e2133b61c1a8e3dad2cc6b118006af01494f5d8832064cef1
Jupyter
1,075
42
# %% import numpy as np import pandas as pd import seaborn as sns import cortico_cereb_connectivity.globals as gl import glob # %% [markdown] # ## Look at crossvalidation to pick the best model for each of the training datasets # %% def check_Rcv(train_data=['MDTB','Somatotopic','Demand','IBC','WMFS','HCP'], ...
a2a417a1ea11eb7bd14a3b5da3acd174d45aaa4365dcd3707a96c7c3b3344d03
Jupyter
1,091
42
# %% import numpy as np %matplotlib inline import matplotlib.pylab as plt from cinnabar import plotting, stats # %% class Result(object): def __init__(self,ligandA,ligandB,exp_DDG,exp_dDDG,calc_DDG,mbar_error,other_error): self.ligandA = str(ligandA) self.ligandB = str(ligandB) self.exp_D...
3f85b34d6d3ace343ef3adefd4a80a3b92dfb139bfc6a9dd230b1e36d0b92258
Jupyter
1,127
38
# %% import numpy as np # %% simple_model = np.random.uniform(0,1,1000) banded_model = simple_model + np.random.uniform(0,0.1,1000) # %% gpt2_bl_perf, GPT2XL_se_full, GPT2XL_se = load_perf(f"/data/LLMs/brainscore/results_{d}/{d}_trained-var-par{exp}{fe}_gpt2xl_1{exp}.npz", perf, return_SE=True, ...
788432a6802870509fcfffeefbac1036c59118f694979f9f6f1173d896082b67
Jupyter
1,175
35
# %% import numpy as np %matplotlib inline import matplotlib.pylab as plt import pandas as pd from cinnabar import plotting, stats, FEMap, plotlying # %% network = FEMap.from_csv('../cinnabar/data/example.csv') # %% plotting.plot_DDGs(network.to_legacy_graph(), method_name='softwarename',target_name='made up protei...
c464099dadb6a3c27d7ded542baa469b21881974f58e21a6c328d005ba1f8dcf
Jupyter
1,256
43
# %% [markdown] # # Xarray # [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google/yggdrasil-decision-forests/blob/main/documentation/public/docs/tutorial/xarray.ipynb) # %% [markdown] # ## Setup # %% pip install ydf xarray -U # %% import ydf imp...
4bb88f3c718ab1f6491ac9b173f4ce204d69586fe4460f872be3bb36452be454
Jupyter
1,272
34
# %% import os import numpy as np import matplotlib.pyplot as plt # %% res_path_fbirn = "/data/users4/xli/interpolation/results/dfnc_sz/vae/hypopt/layer7/seed1" loss_fbirn = np.load(os.path.join(res_path_fbirn, "loss_l2_list.npy")) vae_loss_fbirn = np.load(os.path.join(res_path_fbirn, "vae_loss_l2_list.npy")) res_pat...
c3de58998f20d06ecd6f64995fc2df7fd1bc81df965022fd383f6aedf8c8902f
Jupyter
1,283
46
# %% import pandas as pd # import plotly.express as px data = pd.read_csv("/g/korbel/STOCKS_WF/mosaicatcher_pipeline_summary.tsv", sep="\t").reset_index() data.columns = ["flowcell", "sample", "folder", "size", "_", "size%"] data = data.drop(columns="_") data = data.dropna() data # %% import numpy as np def convert_...
6fa9bfde1e161d753547bde88e85f8111e4d630cae1a87627d2509b7fdf0adee
Jupyter
1,299
44
# %% [markdown] # # Usage example # [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google/yggdrasil-decision-forests/blob/main/documentation/public/docs/tutorial/usage_example.ipynb) # # This page shows the minimal usage on the YDF frontpage. See t...
15660cb8a56ff56f6873c85f6bcebd176adeb4d4c77ab470324c4383789649ba
Jupyter
1,341
51
# %% [markdown] # # <font color=black> Spinal cord networks: iCAPs </font> # <hr style="border:1px solid black"> # %% [markdown] # ### Imports # %% import sys,json import glob import pandas as pd import numpy as np import nibabel as nib import seaborn as sns import os from matplotlib import pyplot as plt sys.path.a...
b242e2db760bab50ad13168570e373d0aae192cc2390a2a7a744a8fbb2a3e4bb
Jupyter
1,392
53
# %% import numpy as np from matplotlib import pyplot as plt import seaborn as sns import brainio # %% fed_data = brainio.assemblies.DataAssembly.from_files("no_share/fedorenko.nc") # %% np.save('FED_SUBJ', fed_data.subject_UID) # %% figurePath = '/home3/ebrahim/what-is-brainscore/figures/' # %% res_full = dict(np....
5421722b258abcce194ff39a8ba90914a820ddc90905a3b3f64d6231da917c20
Jupyter
1,435
36
# %% [markdown] # # Cross-Validation # [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google/yggdrasil-decision-forests/blob/main/documentation/public/docs/tutorial/cross_validation.ipynb) # %% [markdown] # ## Setup # %% pip install ydf -U # %% [...
c93f09f05094b38cdface907f2cf7fadd091ca8b6830d4a19e1eca95b01fecc5
Jupyter
1,479
50
# %% """For each subject in a subject list, export the subject's average value of a modulator over both of their runs.""" import sys import numpy as np import pandas as pd from pathlib import Path sys.path.append(str([p for p in [Path.cwd()]+list(Path.cwd().parents) if p.name=='scripts'][0])) from paths import DATA...
ac624e14fb3a3aa13fc2c8005b2d12f8e7920bab09dda795b22cc5f7a5d2d3ba
Jupyter
1,520
51
# %% import os import papermill as pm # Root folder where all sub-XX files are located ROOT_DIR = r"C:/Users/jorge/OneDrive/Documents/Doctorado en Tec. Monterrey/Data Motor Task without tES/BIDS/Data Motor Task without tES/sourcedata/" OUTPUT_DIR = r"C:/Testing_Notebooks_Output/" # Paths to your processing notebooks ...
1de30a1037e3144b4adab9da28d59be5870840f05e7c66c823f20475563a18e5
Jupyter
1,540
51
# %% [markdown] # ## Evaluate different model fusion # # This notebook compares different fusion connectivity models, considered for Nettekoven et al. (2023). # The different models are: # # Fusion4: ['Demand','HCP','MDTB'], # # Fusion5: ['Demand','HCP','IBC','MDTB','Somatotopic','WMFS','Nishimoto'], # # Fusion6:...
cf8c0ed0cea7e217a2139994385ffa4baf136fb04d1828b768b64ed7a8f5de1e
Jupyter
1,591
52
# %% %reset -f %matplotlib inline import matplotlib.pyplot as plt import scipy.signal as signal import lib.io.stan import numpy as np from matplotlib.lines import Line2D import os # %% results_dir = 'results/exp10/exp10.20' data_dir = 'datasets/id002_cj' os.makedirs(f'{results_dir}/Rfiles', exist_ok=True) os.makedirs(...
9f5b308926a0be057bb54637185450cd031e696b113666df66d103e88a519ecc
Jupyter
1,610
85
# %% ! hostname # %% ! nvidia-smi # %% # enable autoreload %load_ext autoreload %autoreload 2 # %% import os import sys import scanpy as sc import numpy as np import pandas as pd import torch from anndata import AnnData import anndata import seaborn as sns import matplotlib.pyplot as plt import warnings warnings.f...
62954f303b92f1ce59d0b00c75af1cbd9c813b104182cda4eb6eb0a5e4edadd4
Jupyter
1,634
44
# %% import numpy as np import sys sys.path.append('analyze_results/figures_code/') # %% feature_extraction = ['', '-mp', '-sp'] # %% best_sigma_dict = np.load('/home3/ebrahim2/beyond-brainscore/analyze_results/figures_code/best_layer_sigma_info/best_sigma.npz') best_gpt2xl_layer_dict = np.load('/home3/ebrahim2/beyon...
a6f3ae308fa153877617f610b1a3815344a7ddaacd71617db80e613a048d953c
Jupyter
1,653
54
# %% import os os.chdir('/Users/justintorok/Documents/MATLAB/Nexis') import numpy as np from scipy.io import savemat import Python.Nexis as Nx # %% loadinst = Nx.loading_matfiles() endmstuff = loadinst.load_file('eNDM_mousedata.mat') C = endmstuff['Networks'][0,0]['ret'] C = C / np.max(C[:]) endmstuff_kauf = loadinst....
a1341169b561442a41f3aa5602f676eda7404843429ff74be8588e5bea3ff7f0
Jupyter
1,655
79
# %% [markdown] # Unstable fixed point # %% %matplotlib inline import numpy as np import matplotlib.pyplot as plt I = 3.1 x0 = -1.8 tau0 = 10.0 x = np.r_[-3:1:0.01] z = np.r_[2:5:0.01] xx, zz = np.meshgrid(x,z) dx = np.zeros([len(z),len(x)]) dz = np.zeros([len(z),len(x)]) for i in range(len(z)): for j in range...
cf13dadcba5a365806b95d3195888c48b8a97bf5a1b75c2042bb6c06f92bd9f2
Jupyter
1,705
51
# %% import numpy as np import pandas as pd import seaborn as sns import cortico_cereb_connectivity.globals as gl import glob # %% [markdown] # ## MDTB as training dataset # MDTB dataset is used for training the models. X and Y are crossed across ses-s1 and ses-s2. In other words, cortical data from ses-s2 was used t...
e4913f4d863b7897f676691c036155b78962ba5cbdd151c6380058dc71c0d49d
Jupyter
1,734
59
# %% """ 13 MARCH 2024 Theo Gauvrit Testing if the tuning of the neurons for amplitude is different between genotype """ import numpy as np import pandas as pd import percephone.core.recording as pc import os import percephone.plts.behavior as pbh import matplotlib import matplotlib.pyplot as plt import percephone.p...