sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
7a25220400f102cb03f906b904772c8ece7f88825ae8d7d7d587b0c85e728859
Jupyter
11,994
315
# %% [markdown] # # **Libraries and Paths** # %% import re import wordninja import numpy as np import pandas as pd import seaborn as sns from shap.plots import colors import matplotlib.pyplot as plt from gensim.models import KeyedVectors from sklearn.model_selection import train_test_split from sklearn.feature_extract...
50db99077ee04e579d9ae4ba8ab8b8308275e8e9ceec0c46b62b886f547e8331
Jupyter
12,003
333
# %% [markdown] # ### *This file allows to reproduce Fig2D-F* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx, DelimitedFiles using Interpolations include("STG_kinetics.jl") # Loading of STG kinetics of gating variables i...
7a8a648bee5db08784081888a155e8ea771b258a4e757ea724eebadb1187ce30
Jupyter
12,231
465
# %% [markdown] # # Extended Data Figure 1 # # ![title](../assets/EDFig1.png) # %% %load_ext autoreload %autoreload 2 import os import sys import logging from pathlib import Path logging.getLogger("matplotlib.font_manager").disabled = True import scipy import numpy as np import pandas as pd import seaborn as sns ...
17efa7493652e1b4e30332ced7c7c12d50c44f8fe7c1de54d02f5309d003906d
Jupyter
12,353
146
# %% [markdown] # # Photometry FLMM Guide Part III: Association with continuous variables – akin to FLMM version of a correlation # ## Authors: Gabriel Loewinger, Erjia Cui # ### 2024-09-07 # ### rpy2 implementation: Josh Lawrimore # # ## Part III: Associations with continuous variables – Akin to FLMM version of a cor...
356adf8d1c5bbd921b6b1ff896e26c484c8dda8719e56b3dcf3c2302fed1c27c
Jupyter
12,400
376
# %% [markdown] # # Installation # %% [markdown] # In order to run Scenic, we had to specify several package versions. This combination made it work for us: # # conda create -n pyscenic python==3.10 # conda activate pyscenic # pip install pyscenic==0.12.1 numpy==1.23.4 distributed==2024.2.1 dask-expr==0.5.3 ipykernel...
07939de50ec021b572c21e6f8ed6fed6622e55c82340431009b3f922c3e9824d
Jupyter
12,406
248
# %% import os import torch import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from scipy.stats import wilcoxon os.chdir('/data/users4/xli/interpolation') from models.vae import VAE from data.utils import load_sz_score, load_sfnc os.chdir('/data/users4/xli/interpolation/visuali...
c14c0ba501057ffd61da9ab39ba5309791df11b1597649614f5de22445c9e5c8
Jupyter
12,464
225
# %% [markdown] # # Results comparison framework for benchmarking using ``Cinnabar`` # # Comparing two sets of free energy predictions by eye is deceptively difficult. Two methods can show different RMSE or MUE values on a plot yet be statistically indistinguishable given the size of the dataset. ``Cinnabar`` addresse...
b3b634244d1dd5f3c776f00d1abda70170251ea01603e8e31b359a04fa03cbe6
Jupyter
12,471
314
# %% #!/usr/bin/env python3 """ 05_detailed_counts.py — Detailed breakdown of conversion, GDS, age, and follow-up Run: python notebooks2/05_detailed_counts.py """ import pandas as pd import numpy as np import os BASE = '/media/faizaan/4TB/1_DATA_PROJECTS/Projects/Multimodel_study' REPORTS = os.path.join(BASE, 'rep...
df5f66d4eedf4b05faf5785f0ff6174fa335034a847d5e37e9f036dee7fcdab7
Jupyter
12,554
138
# %% import os import numpy as np import matplotlib.pyplot as plt from utils import plot_dwell_time, plot_transition_matrix # %% n_window_sz = 137 n_window_asd = 168 suptitle_fontsize = 20 fig = plt.figure(constrained_layout=True, figsize=(21, 14)) subfigs = fig.subfigures(4, 2) (ax11, ax12, ax13) = subfigs[0,0].sub...
3ad7cb278c0025ff4cd33ec12f86f8df6059b7db4088d053c592c0ff856e27aa
Jupyter
12,611
311
# %% [markdown] # # Extended Data Figure 2 # %% [markdown] # This notebook includes the analysis code to compare measurements taken from 3D scans to measurement from the Rig2 Cheese3D keypoint estimations. # # Before running the notebook, first make sure the anipose project is downloaded (the `ignore_videos=true` fla...
042aeaf35c71aa63cafdf593ccc886847b4b6c0c40cf2281f00b8669b022c8c9
Jupyter
12,676
407
# %% [markdown] # # Fully Convolutional Interior/Edge Segmentation for 2D Data # # --- # # Classifies each pixel as either Cell Edge, Cell Interior, or Background. # # There are 2 different Cell Edge classes (Cell-Cell Boundary and Cell-Background Boundary) # %% import os import errno import numpy as np import de...
aa20221d23ecb555201e82967784d1f59f25b1953e7d2a549d27cccb5d00a1c5
Jupyter
12,723
258
# %% [markdown] # # Visualizing Error Distributions with ECDF Plots # # Aggregate error statistics such as RMSE or MUE provide a useful summary of prediction quality, but they can hide important information about the **distribution** of errors. An **Empirical Cumulative Distribution Function (ECDF)** plot addresses th...
281e518d37e31d8b97d43ad3d109b0f63b631e5ab32953433bb4b973c1fb1be9
Jupyter
12,743
325
# %% [markdown] # # Session Analysis Example # This notebook demonstrates detailed analysis functions for single session behavioral data # %% import matplotlib.pyplot as plt from ethopy_analysis.data.utils import get_setup, find_consecutive_runs, add_column_by_key from ethopy_analysis.data.loaders import ( get_ses...
5aa66d36fc6c5b462fdc7ed8a092f1ab89730fb4f29d0addc751fcdb959ae7e6
Jupyter
12,775
344
# %% [markdown] # ### *This file allows to reproduce Fig3A-C* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx, DelimitedFiles using Interpolations include("STG_kinetics.jl") # Loading of STG kinetics of gating variables i...
0a02ae0188b4154f379f7a4d1f61d19da7acb12e6a2910870b65762698b086d9
Jupyter
12,786
374
# %% [markdown] # ### Reverse correlation tutorial # %% [markdown] # #### Helper functions # The way MATLAB works through jupyter is by running the eval function, so you can't define functions here locally, they need to be called from somewhere else. For demonstration purposes that is not optimal, therefore I am using...
6a5f229dc47e5c42bfa42ec61aee0ad19ef3b0dc33a9796f9d63833cec016920
Jupyter
12,794
415
# %% [markdown] # This file combines z-score data from several animals # %% import pandas as pd import numpy as np import os import matplotlib import tdt import scipy.stats as stats import matplotlib.pyplot as plt from scipy.signal import butter import matplotlib.pyplot as plt from scipy.signal import medfilt from sci...
88357911bb9e5800e6aecc6ebd2553a00cbaca25157b134f48bf7768a4c2f6f9
Jupyter
12,812
334
# %% [markdown] # ### *This file allows to reproduce FigS1* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx, DelimitedFiles using Interpolations include("STG_kinetics.jl") # Loading of STG kinetics of gating variables inc...
ced7077c92dbd8b91eab905d5d944f86692e9a5c81132d32e29aa96103be1d90
Jupyter
12,890
392
# %% import os import numpy as np import pickle from sklearn.manifold import TSNE from sklearn.preprocessing import StandardScaler from utils import STIM_INFO_PATH, COCO_IMAGES_DIR from data import get_fmri_data_paths, get_latent_features, LatentFeatsConfig from eval import get_distance_matrix, dist_mat_to_pairwise_...
f84b1eafc11cb6968364ca9df8f288917829e2dd48d220d349ff302d4e0274ae
Jupyter
12,953
385
# %% [markdown] # # Response characterization # **9th april 2024 (edited the 6th May 2024)** # # *Célien Vandromme* # # --- # %% import numpy as np import pandas as pd import percephone.core.recording as pc import os import matplotlib import percephone.plts.stats as ppt import matplotlib.pyplot as plt from multiproc...
2f5759458638cb95fc59202f7dc101034678eeb21f1e1c00e920da5737d0a63c
Jupyter
13,014
285
# %% [markdown] # # <i> Retraining models to predict age in new datasets with missing genes</i> # <b> This notebook uses the same training data as other models, but retrains a new model based on the genes present in your new dataset where you want age predictions. We will use 3 additional fetal brain datasets to test t...
d117f8f68c41c76c8ea47683f5a3289a3e155e0367526c52acca20ccda7c14f0
Jupyter
13,043
389
# %% [markdown] # ### Imports # %% import os import sys sys.path.append('..') import helper as hp import numpy as np import pandas as pd import matplotlib.pyplot as plt #import umap from scipy import interpolate #from sklearn.decomposition import PCA #from sklearn.metrics import mean_squared_error as rmse #from skle...
b458b515977e10edfb171e2aa96b8ef4effd6a7549b18a3428ff555a3d975d23
Jupyter
13,061
324
# %% """Makes plots used in high-level overview schematics (found in figures 1 and 2). """ import sys import subprocess from pathlib import Path import numpy as np import pandas as pd from scipy.stats import norm,multivariate_normal,linregress import matplotlib as mpl from matplotlib import pyplot as plt import seab...
bccb052ae0f393f73e7fd524a209562d6853a66c5da0a5d249cf53f77cbdec6f
Jupyter
13,083
362
# %% # This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python # For example, here's several helpful packages to load import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/...
92c65e0f2d58335e323e5316a319caf7059841f9aa38e491ae9c925a495d8e2e
Jupyter
13,167
418
# %% [markdown] # # Sample Based Interior/Edge Segmentation for 2D Data # # --- # # Classifies each pixel as either Cell Edge, Cell Interior, or Background. # # There are 2 different Cell Edge classes (Cell-Cell Boundary and Cell-Background Boundary) # %% import os import errno import numpy as np import deepcell ...
82844da731b85900ed2e33add79e481edce33914340c67a33cb0bacc309b827a
Jupyter
13,194
131
# %% import pandas as pd import os l = [ "/g/korbel/Costea/Computational/StrandSeq/P6_Rel/TAllPDX6340p6REL/scNOVA_result/count_reads_CREs/PDX6340rel2PE20303_CREs_2kb.tab", "/g/korbel/Costea/Computational/StrandSeq/P6_Rel/TAllPDX6340p6REL/scNOVA_result/count_reads_CREs/PDX6340rel2PE20305_CREs_2kb.tab", "/g/...
3bb70f54b61806b88f1254fb7ceaf11f04eb65e65bda137be38b429149648647
Jupyter
13,213
362
# %% [markdown] # # With JAX # # [![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/compose_with_jax.ipynb) # # ## About this tutorial # # JAX is a machine learning librar...
bce61325522dfed66ff8c1d7ee2dea415808eef856fe68b2d422a37db6c52f7f
Jupyter
13,283
384
# %% import gc import pandas as pd import numpy as np import scanpy as sc import anndata as ad import scvi import torch import anndata import copy import seaborn as sns from rich import print from scib_metrics.benchmark import Benchmarker from scvi.model.utils import mde from scvi_colab import install import matplotl...
dedf504b8e12613f859b2096106c8fad5f10901660c1ca2f6fc32a3f7b5f4312
Jupyter
13,330
420
# %% %matplotlib inline import numpy as np import matplotlib.pyplot as plt import scipy.signal as signal import lib.io.stan from lib.preprocess.envelope import * import os # %% [markdown] # # Patient AC # %% # Load the simulated data sim_data = np.load('datasets/id001_ac/AC_syn_tvb_ez=59_pz=82-74.npz') # Plot the da...
1fa506552e1a4947ff74eeee55c164ff971b0c5def70b6bc1d5bb1f9914dbfe4
Jupyter
13,356
227
# %% [markdown] # # <font color=black> Figure 3 Spinal cord func / morphometry coupling </font> # <hr style="border:1px solid black"> # %% [markdown] # ### Imports # %% import sys,json import glob, os import pandas as pd import numpy as np main_dir="/cerebro/cerebro1/dataset/bmpd/derivatives/Aging_project/2025_brsc_...
50f6a24bce3b4bb9b5a7de4e554feb96407cb8540033ad60860b637a131e2733
Jupyter
13,394
336
# %% GROUPSTATS_DATE = '2025_07_26' # %% """Makes polar plots comparing between-subjects correlations and within-subjects modulations.""" import sys import subprocess from pathlib import Path import numpy as np import pandas as pd import matplotlib as mpl from matplotlib import pyplot as plt from matplotlib.gridsp...
8fa8031bc2a798846155f1335bcc0ed1638702d5ab028ee8b51eb6e8450d4de7
Jupyter
13,479
330
# %% [markdown] # # With TensorFlow # # [![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/compose_with_tf.ipynb) # # ## About this tutorial # # This tutorial shows how to...
636c6e8889fa78d99448352257f525faf10b69c2b35bfbe8a5997c34a7a72213
Jupyter
13,584
425
# %% [markdown] # # Sample Based Interior/Edge Segmentation for 3D Data # # --- # # Classifies each pixel as either Cell Edge, Cell Interior, or Background. # # There are 2 different Cell Edge classes (Cell-Cell Boundary and Cell-Background Boundary) # %% import os import errno import numpy as np import deepcell ...
2ad777f7df62402dfc76e56bc594fbe3a05441da4877e92270488f836ca95a3c
Jupyter
13,585
434
# %% [markdown] # # Fully Convolutional Watershed Distance Transform for 2D Data # --- # Implementation of papers: # # [Deep Watershed Transform for Instance Segmentation](http://openaccess.thecvf.com/content_cvpr_2017/papers/Bai_Deep_Watershed_Transform_CVPR_2017_paper.pdf) # # [Learn to segment single cells with de...
1ea0d167b8b18924eaf838ee3ca73dedc4245294b2ebb276597093207ed3e5b2
Jupyter
13,600
437
# %% [markdown] # # Fully Convolutional Interior/Edge Segmentation for 2D Data # # --- # # Classifies each pixel as either Cell Edge, Cell Interior, or Background. # # There are 2 different Cell Edge classes (Cell-Cell Boundary and Cell-Background Boundary) # %% import os import errno import numpy as np import de...
061e500af252f77b6dad140332ab325e87ad47853e4ed709058a51b1a44d5b66
Jupyter
13,606
410
# %% [markdown] # ### *This file allows to generate voltage traces at different times in different conditions* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx include("STG_kinetics.jl") # Loading of STG kinetics of gating...
04c7eddbef06e553827c3ea64fae654111ffab947ed6b6b384a017b798685bf5
Jupyter
13,665
357
# %% [markdown] # # Session Analysis Example # This notebook demonstrates detailed analysis functions for single session behavioral data # %% import matplotlib.pyplot as plt from ethopy_analysis.data.utils import get_setup, find_consecutive_runs, add_column_by_key from ethopy_analysis.data.loaders import ( get_ses...
ef5a46825455441ebd44a47774c9a4ce91dd3c503bdd5dd2163fabd95ef34b6a
Jupyter
13,720
352
# %% [markdown] # ### *This file allows to reproduce FigS2* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx, DelimitedFiles using Interpolations include("STG_kinetics.jl") # Loading of STG kinetics of gating variables inc...
be1f529c0c939aa6e9e76c617c9954b291ada6d43f359195babe3eca01306d7c
Jupyter
13,753
433
# %% [markdown] # # Watershed Distance Transform for 2D Data # --- # Implementation of papers: # # [Deep Watershed Transform for Instance Segmentation](http://openaccess.thecvf.com/content_cvpr_2017/papers/Bai_Deep_Watershed_Transform_CVPR_2017_paper.pdf) # # [Learn to segment single cells with deep distance estimato...
c0202e0f089329c0e8747fa07590a1bf9d0ef7e6d2d79c959ac968f3edab5348
Jupyter
13,772
467
# %% [markdown] # ## Extended Data Figure 4 # # ![title](../assets/EDFig4.png) # %% %load_ext autoreload %autoreload 2 import sys import logging from pathlib import Path from itertools import combinations logging.getLogger("matplotlib.font_manager").disabled = True import scipy import numpy as np import pandas as ...
6c589c0ce98b61ebfa823aa80ce2d6fef82aabdbbb0bb4c5a5cbef07039fd402
Jupyter
13,895
333
# %% [markdown] # # <font color=#B2D732> <span style="background-color: #4424D6"> Brain & Spinal Cord fMRI Quality check </font> # <hr style="border:1px solid black"> # # *Project: 2024_brsc_aging_project* # *Paper: * # **@ author:** # > Caroline Landelle, caroline.landelle@mcgill.ca // landelle.caroline@gmail....
03389b10ccfa1f957d4db83bb052046b590e48241dba02ab415f4a6d3007fcd0
Jupyter
13,907
467
# %% [markdown] # ## Extended Data Figure 7 # # ![title](../assets/EDFig7.png) # %% %load_ext autoreload %autoreload 2 import sys import logging from pathlib import Path import yaml import numpy as np import pandas as pd import seaborn as sns import networkx as nx import matplotlib_venn import matplotlib.pyplot as p...
4eef90d06110f18bfff927cdb5e43887544225a46add7a6aeb9f892a66b8e308
Jupyter
13,936
402
# %% %reset -f %matplotlib inline import numpy as np import lib.io.stan import lib.plots.stan import matplotlib.pyplot as plt import os from matplotlib.lines import Line2D # %% data_dir = 'datasets/id002_cj' results_dir = 'results/exp10/exp10.18' fit_data_dir = f'{results_dir}/Rfiles' os.makedirs(results_dir,exist_ok...
2c29700b26a52b2e0f5341910b1d064e89e950f50e4ea95055bcde649adf16c3
Jupyter
13,973
374
# %% [markdown] # # Distributed training with VertexAI # # [![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/distributed_training_vertex_ai.ipynb) # # ## Setup # %% pip i...
40bbea1faa569c0c2632302ebdbf985b8df71e0db6f4790beb6cb888274e2afd
Jupyter
14,006
471
# %% [markdown] # # **Experiments - Dataset FASHION_MNIST** # %% [markdown] # ## **Libraries** # %% import torch import torch.nn as nn from torch import optim import torch.nn.functional as F from torchvision import datasets import numpy as np import pandas as pd import matplotlib.pyplot as plt from torchmetrics.clas...
1beb7b5de7384518f495cf61b34ef1362b1a99393f534e9284c0c566bd91a505
Jupyter
14,033
415
# %% [markdown] # # Decoding Responsivity (old version) # **Can we predict whether a stimulus will be detected or not based on neuron's responsivity ?** # # Célien Vandromme # 18/04/2024 # # --- # %% [markdown] # ## Modules & data import # # --- # %% from unittest import result import numpy as np import pandas as...
154135da0da330d388521b4dfd8caa11b4dabe1a355bf9b5b0b801d4aaced771
Jupyter
14,043
252
# %% [markdown] # # Protocol 2: Assessing cell type replicability against a pre-trained reference taxonomy # # Protocol 2 demonstrates how to assess cell types of a newly annotated dataset against a reference cell type taxonomy. Here we consider the cell type taxonomy established by the Brain Initiative Cell Census Ne...
5cc2f5af8e3cea41b33d1a761c4aebc56fcac4c01213d5270b65fe64745af1ae
Jupyter
14,152
381
# %% [markdown] # # Data Loading Functions Example # # This notebook demonstrates all the data loading functions available in the ethopy_analysis package. Each function is explained with its purpose, parameters, and example usage. # %% # Import all necessary modules from ethopy_analysis.data.loaders import ( get_...
0905cfde3c937ae42c804748e2f1f3ae7dfb3b464f36b32257cd0be71cd6a4bc
Jupyter
14,164
443
# %% [markdown] # # Watershed Distance Transform for 3D Data # --- # Implementation of papers: # # [Deep Watershed Transform for Instance Segmentation](http://openaccess.thecvf.com/content_cvpr_2017/papers/Bai_Deep_Watershed_Transform_CVPR_2017_paper.pdf) # # [Learn to segment single cells with deep distance estimato...
e31d1f57cc175da5cbcc95676443395ecea45bf6c06d85911f0dcc3a868e3cbf
Jupyter
14,253
460
# %% [markdown] # # Watershed Distance Transform for 3D Data # --- # Implementation of papers: # # [Deep Watershed Transform for Instance Segmentation](http://openaccess.thecvf.com/content_cvpr_2017/papers/Bai_Deep_Watershed_Transform_CVPR_2017_paper.pdf) # # [Learn to segment single cells with deep distance estimato...
bad63341cf5001b2bfabd5acbbfd370db4bcf7402f6c31f52284caeb9c93ae85
Jupyter
14,269
408
# %% [markdown] # ## This notebook will walk you through cleaning up noisy V4 Miniscope data # # Post questions or issues to the Miniscope Google Group: https://groups.google.com/g/miniscope # # You will need the following packages installed (you likely should create a virtual python environment using conda or simila...
d13c842f4eb7475dcc367a2a5b2dcd762c56de5ebb3ff838656f7f33d1476372
Jupyter
14,478
465
# %% #figures 1i and 1j. multimodal macroscale validations of expression maps # %% import scripts.neurosynth_tools as nt from scripts.mapping_helpers import get_indices import pandas as pd import numpy as np import os import nibabel as nb import matplotlib.pyplot as plt import matplotlib_surface_plotting as msp import...
d276bf164ce74c235913df46f10105b8bd4b46cb25a604c96f41592e4ffe91e0
Jupyter
14,537
300
# %% %load_ext autoreload %autoreload 2 base = '/home3/ebrahim2/beyond-brainscore/' # %% import numpy as np from matplotlib import pyplot as plt import os from sklearn.metrics import mean_squared_error import sys sys.path.append(base) from plotting_functions import plot_across_subjects, plot_test_perf_across_layers...
b5c4f76f3e7dbe08652577b2085a37a839a661c3cf8e67e270f95a2509873d9f
Jupyter
14,548
411
# %% import warnings warnings.filterwarnings('ignore') import os # Ensure CWD is the repo root (notebook kernels start in the notebook's directory) if os.path.basename(os.getcwd()) == 'tutorial': os.chdir('..') # %% [markdown] # # ProtoCloud Tutorial # # ProtoCloud is a prototype-based Variational Autoencoder (...
bc39d03fedeb500bea338511056d0a7f4a8188b9d6534bebf16edba97451f060
Jupyter
14,621
421
# %% %reset -f %matplotlib inline import numpy as np import lib.io.stan import lib.plots.stan import matplotlib.pyplot as plt import os from matplotlib.lines import Line2D import lib.preprocess.envelope import matplotlib.colors # %% data_dir = 'datasets/RetrospectivePatients/id001_bt' results_dir = 'results/exp10/exp1...
4b016e490843162ec9631d6dbaceebddb9281b02a5678af6d58ac800b71772e5
Jupyter
14,624
345
# %% import numpy as np import argparse import imageio import os import sys import time import torch from datasets import load_dataset from halluc_vae import HallucVAE import matplotlib.pyplot as plt from torch.utils.data import DataLoader, SequentialSampler, RandomSampler from torch.utils.data.distributed import Distr...
3afa88dd9f5153ebc064dcb70e34ba23c78c9c880dd1695069a17e5a527a9b85
Jupyter
14,637
498
# %% [markdown] # # Diversity Metrics for Synthetic EEG # # This notebook illustrates three complementary **diversity domains** for evaluating synthetic EEG: # # 1. **Coverage diversity (manifold coverage)** # - Do synthetic samples cover the same regions as real data and avoid unrealistic outliers? # # 2. **G...
a21e37d9e9e5a8325ea7a5fb91289757c46728840c683c19c6e72dbb3db8aa99
Jupyter
14,665
392
# %% [markdown] # # Data Loading Functions Example # # This notebook demonstrates all the data loading functions available in the ethopy_analysis package. Each function is explained with its purpose, parameters, and example usage. # %% # Import all necessary modules from ethopy_analysis.data.loaders import ( get_...
a8bca5c3788a1ec7312bad203726ecec70f806ca2833973ced0b556901a8c2d2
Jupyter
14,837
349
# %% [markdown] # # <font color=black> Time-series features: BrainDyn and SpiDyn </font> # <hr style="border:1px solid black"> # %% [markdown] # ## <font color=#B14263> Imports # %% import sys,json,glob, re, os #os, import pandas as pd import numpy as np main_dir='/cerebro/cerebro1/dataset/bmpd/derivatives/Aging_p...
31374c4ffddf248a1954e2b558af468a2085928701ab1642c59f6e0fdb6df17f
Jupyter
14,872
459
# %% [markdown] # # 3D Instance Segmentation with Discriminative Instance Loss # --- # Implemntation of paper: # # [Semantic Instance Segmentation with a Discriminative Loss Function](https://arxiv.org/abs/1708.02551) # %% import os import errno import datetime import numpy as np import deepcell # %% [markdown] # ...
2421ccbf058f3d93d5daaff6ad572c98046a9b9b34db2615dfafb72747b80d1c
Jupyter
15,001
344
# %% import TaskRest.paths as indiv_paths import matplotlib.pyplot as plt import pandas as pd import seaborn as sb import numpy as np import TaskRest.plotting as plotting from scipy.stats import ttest_rel, ttest_1samp # Set paths base_dir = indiv_paths.set_base_dir() atlas_dir = indiv_paths.set_atlas_dir(base_dir) fig...
74a82c93690bb0be96c4795d99332568c84198fa910f19fba9a12784ae9c984a
Jupyter
15,033
312
# %% [markdown] # # <font color=black> Time-series features </font> # <hr style="border:1px solid black"> # %% [markdown] # ## <font color=#B14263> Imports # %% import sys,json, os, glob import pandas as pd import numpy as np import nibabel as nib from scipy.stats import spearmanr main_dir='/cerebro/cerebro1/dataset...
cf4bf3c6f4c96ce69df358bd5873e1f7ba1b941c45a6e8cdd9d78dd0e94dc519
Jupyter
15,052
451
# %% [markdown] # # Outline code test for IGRF candidate evaluation # # # Example for the DGRF2015 candidates submitted in October 2019 # # Load available candidates # Use the alphebetical ordering and labels from each candidate. # # There is a set naming convention: # - first three lines start with # # - third li...
f59e1bdf9054b8e848f92c2cc3a4196cbf8cab2afff45710958a695117c88495
Jupyter
15,052
451
# %% [markdown] # # Outline code test for IGRF candidate evaluation # # # Example for the IGRF2020 candidates submitted in October 2019 # # Load available candidates # Use the alphebetical ordering and labels from each candidate. # # There is a set naming convention: # - first three lines start with # # - third li...
8d3faa295aaee63be4c553b8fe79f61dcde1ed0fde8b52212111ac805b07d85d
Jupyter
15,060
464
# %% [markdown] # # Installation # %% [markdown] # In order to run Scenic, we had to specify several package versions. This combination made it work for us: # # conda create -n pyscenic python==3.10 # conda activate pyscenic # pip install pyscenic==0.12.1 numpy==1.23.4 distributed==2024.2.1 dask-expr==0.5.3 ipykernel...
c462849c14a4859332767ae79141a137d4586579bd3b5658a2acd53fc0ecd009
Jupyter
15,071
450
# %% [markdown] # # Outline code test for IGRF candidate evaluation # # # Example for the IGRF2020-SV candidates submitted in October 2019 # # Load available candidates # Use the alphebetical ordering and labels from each candidate. # # There is a set naming convention: # - first three lines start with # # - third...
3c49b753ee58fdc2b13e620ca7b5a30d143dbe1eca4fe93bb1fd4d2af453efea
Jupyter
15,273
436
# %% [markdown] # ### *This file allows to reproduce FigS4D-F* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx, DelimitedFiles using Interpolations include("STG_kinetics.jl") # Loading of STG kinetics of gating variables ...
1ba2c1037de064f3f742aae65d1d9ef8f5f344670c22b581d1edd53988faea69
Jupyter
15,453
312
# %% [markdown] # ### *This file allows to reproduce results from the original paper of the CPG* # %% [markdown] # # **Useful packages and functions** # %% using Plots, LaTeXStrings, Random, Dierckx, DelimitedFiles, ProgressMeter include("network_STG_kinetics.jl") # Loading of STG kinetics of gating variables include...
58a03aaacb7d3078d7c6c63a4f9dbff37c5a35fcf12323c4f00d7a9b435ba5fb
Jupyter
15,463
491
# %% library(enrichplot) library(DOSE) library(tidyr) library(clusterProfiler) library(ggplot2) library(patchwork) source('/home/hsarkar/Workplace/slide-seq-de/R/spatial_util.R') source('/home/hsarkar/Workplace/slide-seq-de/R/function.GO.R') source('/home/hsarkar/Workplace/slide-seq-de/R/linear_model.R') source('/home/...
b482f7047d2c05284ef27b7ab92cfb4e79bd44272ab11c5eb5c850b63fb192f8
Jupyter
15,469
550
# %% [markdown] # # **Libraries** # %% import sys sys.path.append('../../Utils') # %% import numpy as np import pandas as pd from trainer import Trainer import torch import torch.nn as nn from torch import optim import torch.nn.functional as F from sklearn.model_selection import train_test_split from torchmetrics.cl...
f42d65c7f67f02261e440f7aff0c78d3d1b20f95ed9f4c691ab7b60dde5335d9
Jupyter
15,549
671
# %% [markdown] # ### DrugMechDB: A Comprehensive Curated Database of Drug Mechanisms # %% [markdown] # Notebook to recreate figures of DrugMechDB manuscript # %% #import libraries import pandas as pd import networkx as nx import re import yaml from itertools import chain from pathlib import Path from operator impo...
b20d2dafbce7760fb5ec70d82be731a75229bda1818ef0031b8a3ec67e19c910
Jupyter
15,702
391
# %% import numpy as np import sys sys.path.append('/home3/ebrahim2/beyond-brainscore/run_reg_scripts/') from helper_funcs import combine_MSE_across_folds from matplotlib import pyplot as plt # %% import numpy as np def _mean_across_participants(values_per_unit, participant_info): """ values_per_unit: 1D arra...
c1881ac5eeb0e683a985fd10427b00ab89ee845b581c97e35cb36b9d61bdd0d9
Jupyter
15,763
645
# %% [markdown] # # Regression example using PT-MELT # This is a basic regression example using the models in PT-MELT. # # Requires the following additional packages: # * ipykernel # * scikit-learn # * matplotlib # * torchinfo # %% import sklearn.datasets as sdt import matplotlib.pyplot as plt # Create surogate data...
d3000839f893efa6356e09ccca4e1dd7141e6972e739e2ff21931e532ba0ecc8
Jupyter
16,217
466
# %% [markdown] # ## Script to run inference on our RDM models # # Notes for reproducibility: # - File paths in cell 2 are absolute, so they should be changed to wherever RDMs are kept # - Partial correlation functions are messy, but unfortunately necessary due to no similar function in rsatoolbox. A better way would...
1592b14bca92786000cbe0c249d4e6e1dea604d89cc95d3c009e517159f61a57
Jupyter
16,234
318
# %% [markdown] # # With TF Serving # # [![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/tf_serving.ipynb) # # This tutorial demonstrates how to train a YDF model, export...
3bdcc75ee657403c48f59a9556e37b14a53eb88359fb921d8223c6c9676a511a
Jupyter
16,329
365
# %% import sys from pathlib import Path import time from scipy.optimize import minimize import pprint from matplotlib import font_manager import matplotlib.pyplot as plt # Add the path to the downloaded fonts font_dirs = ['/home/simoneponcioni/Documents/99_OTHERS/my_fonts/'] # Replace with the actual path to your f...
4677917946ac0f886f4d07682fb6e8fbedcc4389b9659ca7356c2a6c12d0c143
Jupyter
16,364
272
# %% [markdown] # # # Protocol 1: assessment of cell type replicability with unsupervised MetaNeighbor # # Protocol 1 demonstrates how to compute and visualize cluster replicability across 4 human pancreas datasets. We will show steps detailing how to install MetaNeighbor, how to compute and interpret MetaNeighbor AU...
c922a71626a64ae830a110d34ccc3a083326bb8a6a8454edd283f5d3962af3a0
Jupyter
16,370
468
# %% [markdown] # ## Figure 7 # # ![title](../assets/Fig7.png) # %% %load_ext autoreload %autoreload 2 import sys import logging from itertools import combinations from pathlib import Path import numpy as np import scipy import matplotlib.pyplot as plt from mycolorpy import colorlist as mcp from scipy.stats import ...
68b3a23aa88c1cb1dd872e95223cfab912a4048d743c1a5d32f91c8255ae9f9f
Jupyter
16,450
145
# %% [markdown] # # Photometry FLMM Guide Part V: Interactions -- Probing Learning and Changes over Time # ## Authors: Gabriel Loewinger, Erjia Cui # ### 2024-09-07 # ### rpy2 implementation: Josh Lawrimore # %% [markdown] # # Part V: Probing Learning and Changes over Time # # Neuroscience studies often use rich long...
6300cbd02627d9301194800ad78c3de4080eda2cb4cb759c2037a97a2c60b263
Jupyter
16,537
194
# %% [markdown] # # Demo for generating substrates and running a single simulation # This notebook is intended as a demo that reproduces a single simulation with generic parameters for the substrate geometry and the sequence applied. Readers are free to alter the parameters and use this as a base example for their own ...
bce81cdbecfe7bbe1aed552e208be68c74cbab5597f0184d10d926c65ef86c43
Jupyter
16,564
481
# %% [markdown] # # Training a Graph Neural Network with NAGL with multiple objectives # %% [markdown] # This notebook will go through the process of training a new Graph Neural Network (GNN) on a small dataset of alkanes with multiple objectives. Please see the `train-gnn-notebook` tutorial for more on what's happeni...
fa82991977abc8f0e3dd1bac00d68dfa68e56a06db5a6b6a0276699b41f92ab3
Jupyter
16,577
585
# %% # %% source('/home/meisl/bin/bin/bin/source.R') # %% scon = readRDS('../F1.conos.rds') # %% load('/home/meisl/Workplace/Prostate/healty.data/conos/Figures.v2/F7.slide.seq/RL.RData') # %% # %% annot.palf2 <- function(n) return(scon$misc$annot.pal2[1:n]) annot.pal2 = readRDS('../annot.pal2.rds') annot.palf2...
91c0a9cd3ca94ff56c421587c386d360e4741d207c2358c3822b085c11258ea8
Jupyter
16,672
303
# %% [markdown] # # <font color=#B2D732> <span style="background-color: #4424D6"> Spinal cord microstructural preprocessings </font> # <hr style="border:1px solid black"> # # *Project: 2024_brsc_aging_project* # *Paper: in prep* # **@ author:** # > Caroline Landelle, caroline.landelle@mcgill.ca // landelle.caro...
9d621e84896603ecb9f8978f252e8aadb144a83679868f2c473b33982dc765b8
Jupyter
16,872
462
# %% import numpy as np import pandas as pd import glob, os, sys, subprocess import matplotlib.pyplot as plt import seaborn as sns import scipy import scipy.stats as st import statsmodels.stats.api as sm import Bio.PDB from Bio import Seq, SeqIO from Bio.PDB.MMCIFParser import MMCIFParser from Bio.PDB.DSSP import make...
135bc7cc4f6887b09df0d8dd1ba9a2b73fc05e7a193edc9b616bad9f73c4682c
Jupyter
17,026
494
# %% from msi_visual.normalization import total_ion_count, spatial_total_ion_count from msi_atlas.annotations import get_dataset import numpy as np from argparse import Namespace from pathlib import Path import joblib array = np.array import os path = r"/home/jacob/Desktop/atlas_verification" extraction_args = eval(...
a4641a2658ce4c35e24f8d6b1b77ad75716d1be207fa68613ac43a364f74ab0b
Jupyter
17,158
404
# %% import os import numpy as np import seaborn as sns import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap from scipy import stats from scipy.stats import wilcoxon from sklearn.cluster import KMeans from scipy.stats import mannwhitneyu from utils import plot_fnc, convert_pvalue_to_asterisks os...
8d22332d1be4ea522c83c8ca50f51bad1de592583b5210da68778f89c0c1d7a5
Jupyter
17,172
337
# %% [markdown] # # Training a Graph Neural Network with NAGL # %% [markdown] # This notebook will go through the process of training a new Graph Neural Network (GNN) on a small dataset of alkanes, and demonstrate inference with the resulting model. On the way, we'll put together a tiny test dataset, and talk a bit ab...
78341ba55fd295d4c24c4fc342dcb6ac3675d8bade8050d4344b415b6bbf34b7
Jupyter
17,272
430
# %% [markdown] # # Descriptive Statistics & Table 1 # **Study:** APOE ε4 × Hippocampal Volume × Cognitive Decline # # Requires: `reports/ADNI_Baseline_Analysis.csv` and `reports/ADNI_Complete_Cases.csv` from `01_data_pipeline.ipynb`. # # **Produces:** # - Table 1 by APOE ε4 dose # - APOE4 frequency bar chart # - Cog...
43891a5ef7a96b429384aaad8c1f55009ca7404be0679553fc93d4b4415d524d
Jupyter
17,286
466
# %% [markdown] # Script to identify any skew in horizontal and vertical eye movements as a function of different conditions # %% import numpy as np import pandas as pd import copy df_1d = pd.read_csv('/Users/alex/Documents/action_hippo/action_hippo/eyes/20250516_timecourse_df_allsubs_lowerexclusion.csv') # change n...
b144e51741d0c18833ba39961d055d77eeb1cf32d3b897346521b5a6a7edd3e2
Jupyter
17,297
321
# %% import numpy as np import sys sys.path.append("/home3/ebrahim2/beyond-brainscore/analyze_results/figures_code") from trained_untrained_results_funcs import find_best_layer, elementwise_max, custom_add_2d, load_perf, loop_through_datasets from untrained_results_funcs import load_untrained_data from plotting_functio...
7168f38fb13de1f63d0b6cf4e4273dc7363c994718b23f41ea6211fef4e504aa
Jupyter
17,680
516
# %% [markdown] # ### *This file allows to reproduce FigS4A-C* # %% [markdown] # # **Useful packages and functions** # %% using DifferentialEquations, Plots, Plots.PlotMeasures, LaTeXStrings, Random, Dierckx, DelimitedFiles using Interpolations include("STG_kinetics.jl") # Loading of STG kinetics of gating variables ...
dd9f5a193d32de85a977c2c255514394aaa2f3a83572a0d001ad4c9c5042863a
Jupyter
17,730
511
# %% import numpy as np import TaskRest.paths as trest_paths import numpy as np import covariance as cov import pandas as pd import matplotlib.pyplot as plt import seaborn as sb import TaskRest.plotting as plotting import PcmPy as pcm from mpl_toolkits.mplot3d.art3d import Poly3DCollection from scipy.spatial.transform ...
b3fd3ff24c4e8c0d934997cdd708ff427608cf529d1016700aec10fe9be16c45
Jupyter
17,859
343
# %% import pandas as pd import numpy as np import os import h5py from sklearn import linear_model import matplotlib.pyplot as plt import deepdish as dd import string try: os.chdir('/data/MoL_clean/scripts') except: pass import util # import GLM_helper as gh import scipy.stats as stats from joblib import Para...
8236d30382bd83e58dd287d1a2a31dd6722cf14bdda0c97f37fc9bee6fdb3b7c
Jupyter
17,905
555
# %% [markdown] # ## Environment Setup # %% ! pip install kagglehub # %% from google.colab import drive import os drive.mount('/content/drive') model_save_dir = '/content/drive/My Drive/Brain_Tumor_Models' os.makedirs(model_save_dir, exist_ok=True) print(f"Model weights will be saved in: {model_save_dir}") # %% im...
cc19ce4a13936c331a41a2c801e47f75db453cd943ff2733710b0515facb0f15
Jupyter
17,928
573
# %% [markdown] # ## Environment Setup # %% ! pip install kagglehub # %% from google.colab import drive import os drive.mount('/content/drive') model_save_dir = '/content/drive/My Drive/BRISC2025_Models' os.makedirs(model_save_dir, exist_ok=True) print(f"Model weights will be saved in: {model_save_dir}") # %% impo...
2a56dcfb3167886075c1a27ceadb0820f7a2b1f0e71397c06e78694f8de452c8
Jupyter
17,957
544
# %% import os import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap,Normalize from scipy.stats import mode, entropy from scipy import interpolate from scipy.spatial.distance import jensenshannon import helper as hp import warnings wa...
fa3669417daba0f5abadf230f69d43519109da857079bfe8be5bdd41b51f59ca
Jupyter
17,989
760
# %% [markdown] # # Generate QTL Plot Info From Data # - **Author(s)** - Frank Grenn # - **Date Started** - May 2020 # - **Quick Description:** Identify which genes we can create different qtl Locus Compare plots for. See if there is enough data to create a plot and if the plot has the risk variant in its data. Output ...
4b78dab51a7e912a7343399b28590ca8a10313920fc3abc86cabb3faf23e9924
Jupyter
18,016
511
# %% import numpy as np import pandas as pd import glob, os, warnings warnings.filterwarnings('ignore') # cc_df = pd.read_csv("/n/data1/hms/dbmi/farhat/Sanjana/MIC_data/criticalConcentrations_updated.csv") cc_df = pd.read_csv("drug_CC.csv") cc_df_who = pd.read_csv("/home/sak0914/who-analysis/data/drug_CC.csv") isolat...
bdf14280b55c35a4aab50a4681a9b57a1b8be39002008c01fd56c25f02ee7fab
Jupyter
18,044
474
# %% ## Imports import json import os, sys import time import yaml import h5py import pickle import numpy as np import collections import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import matplotlib.colors as mcolors #from cGANtools.GAN import CGAN #from keras.models import load_model from iter...
15c5e75135797b5d04f09e66420ceb785240ba845879ceee9f3b8938808a65d2
Jupyter
18,059
571
# %% [markdown] # ### Extensive vs. Intensive variables - a direct comparison # # Author: Simone Poncioni # # Date: 19.09.2024 # %% import sys from pathlib import Path from matplotlib import font_manager import matplotlib.pyplot as plt # Add the path to the downloaded fonts font_dirs = ["/home/simoneponcioni/Docum...
b29cc2af5e2faa23d0df4a1421a7988cffaf743513639eacafff659359770c66
Jupyter
18,059
549
# %% [markdown] # ## Environment Setup # %% ! pip install kagglehub # %% from google.colab import drive import os drive.mount('/content/drive') model_save_dir = '/content/drive/My Drive/Brain_Tumor_Orvile_Models' os.makedirs(model_save_dir, exist_ok=True) print(f"Model weights will be saved in: {model_save_dir}") ...