sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
6eb4443d6fd0b7bb5cc76d2a6380bc1de5a0a4dfe386193d0e5e8be026c08b6c
Jupyter
15,104
421
# %% gene_familly = "AP2" # %% # Parameters gene_familly = "Dof" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rel...
7288a18091eaf2b865ed2c5aaec1d092b4c743990c10bdcee8eacf2ccd991944
Jupyter
15,104
421
# %% gene_familly = "AP2" # %% # Parameters gene_familly = "EIL" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rel...
83591366d14f10afbbd8698a81b76993e49bf8d168d2b2bb917a8ca835b7e063
Jupyter
15,104
421
# %% gene_familly = "AP2" # %% # Parameters gene_familly = "CPP" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rel...
a89e7f8d92fdb209c5953ec7adafbe114073861818bce8ff9b23b2865970560c
Jupyter
15,104
421
# %% gene_familly = "AP2" # %% # Parameters gene_familly = "DBB" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rel...
e8e5bdee7199c5b4ec36dc1be4dfbdec10633651d21a084d9127e389df659c88
Jupyter
15,104
421
# %% gene_familly = "AP2" # %% # Parameters gene_familly = "ARF" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: rel...
7c2c639ac76d8459f4fafdea4c60ada4c21b60eaf16e51ddbeb6cb233c2426a3
Jupyter
15,105
421
# %% gene_familly = "AP2" # %% # Parameters gene_familly = "GATA" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: re...
36bca5b6792d80f0d3f32414efdfa5860561d63f538c0447ca8c0becbc3ac802
Jupyter
15,106
421
# %% gene_familly = "AP2" # %% # Parameters gene_familly = "ARR-B" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: r...
9193da76d18b4febf5ed3fd639d8e23463004c770c9a0ef2bc774adb68f1ec5a
Jupyter
15,106
421
# %% gene_familly = "AP2" # %% # Parameters gene_familly = "CAMTA" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: r...
8b14b602455f1ca92835808eab47ef869c4c9755718eec0dab9e0bce81c01a32
Jupyter
15,107
421
# %% gene_familly = "AP2" # %% # Parameters gene_familly = "E2F/DP" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position: ...
6ed1cd2094747f67f72114b8a3e518d330fe0b90f71166132c8e6c7d80bfc6f5
Jupyter
15,108
421
# %% gene_familly = "AP2" # %% # Parameters gene_familly = "BBR-BPC" # %% [markdown] # <div style="hwidth: 100%; background-color: #ddd; overflow:hidden; "> # <div style="display: flex; justify-content: center; align-items: center; border-bottom: 10px solid #80c4e7; padding: 3px;"> # <h2 style="position:...
411335aa5ddbe5663cf5831e12eb77260fb30d9d5928112ad593ce2af4c3f0f0
Jupyter
15,115
280
# %% [markdown] # # An overview of `causallib` evaluation plots # # To make it easier to assess the quality of the causal models, `causallib` supplies a number of evaluation plots. # The plots are accessed by first running `causallib.evaluation.evaluate` on a model and data. More useful results are obtained when the c...
64052ae218f12c492602f97b54eb1d96b7091941fee469c3785447de1f8b39db
Jupyter
15,130
473
# %% import brainpy as bp import brainpy.math as bm import numpy as np import matplotlib.pyplot as plt import scipy from scipy.linalg import eig #gridspec import matplotlib.gridspec as gridspec from mpl_toolkits.axes_grid1.inset_locator import inset_axes import sys sys.path.append('..') from cann import CANN1D # %% [...
30d69f03018921472614ff99f21ea398fed26d577cdb73a79c4ea6c08fcc90ae
Jupyter
15,171
361
# %% [markdown] # # DICOM-extraction # This notebook outlines the procedure for extracting the desired MR-sequences from Philips' enhanced DICOM format to Niftii. The DICOM-files are not included, but we still provide this notebook for transparency. The MRI-data were located within it's own folder in the `mri_dataset`-...
da6c3ea4e24791b8d3c1b2d402197215c298fd2f18a63061153830316704f761
Jupyter
15,205
316
# %% [markdown] # [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/sagar87/scPCA/blob/main/docs/notebooks/kang.ipynb) # %% [markdown] # <div class="admonition note"> # <p class="admonition-title">Note</p> # <p>In order to run this notebook i...
5e0bbeae00282f5ce19c5f3e43130978be42ac8187cc2ecc33fd83e6c77c5aa9
Jupyter
15,282
431
# %% [markdown] # # Figures 2 and 3: Human WM is associated with bursting in LMFG and RMTG # %% # Adjust the path to the root data folder containing dataset_description.json, sourcedata/, etc. DATA_PATH = "/Volumes/External/dataset/" SUBJECTS = [f"sub-P{k}" for k in range(1, 8)] # %% import utils import numpy as np ...
3181b90e398fcb43d9c95e81c73038c270e0c921857f03fb61788f95aa89dacf
Jupyter
15,290
405
# %% PHONE_DEF_SIL = [ 'BLANK','SIL','AA', 'AE', 'AH', 'AO', 'AW', 'AY', 'B', 'CH', 'D', 'DH', 'EH', 'ER', 'EY', 'F', 'G', 'HH', 'IH', 'IY', 'JH', 'K', 'L', 'M', 'N', 'NG', 'OW', 'OY', 'P', 'R', 'S', 'SH', 'T', 'TH', 'UH', 'UW', 'V', 'W', 'Y', 'Z', 'ZH', ] import scipy.io import numpy a...
24af742c5c03818809ad7a5bfceffa6c9abd7de5a79b5e43bf9a9fe1f688528b
Jupyter
15,320
423
# %% [markdown] # # GLM Between Analyis # %% [markdown] # This script performs within analysis including: # - SM win 3,2,1 0 minus SC win 3,2,1, 0 # - OM win 3,2,1 0 minus OC win 3,2,1, 0 # %% #!jupyter nbconvert --to script GLM-within-3-7-24.ipynb # %% [markdown] # ## Imports # %% import nibabel as nib from nile...
b499769aae94ec7f7c9ff38ba550a05c1de4d8c6d32db8dfed1371051d0b3ce5
Jupyter
15,350
413
# %% [markdown] # Before running the code, please download the required package first like torch, numpy ... # %% import torch import torchvision import torchvision.transforms as transforms import matplotlib.pyplot as plt import numpy as np from torch.nn.parameter import Parameter, UninitializedParameter from torch.nn ...
15b5ab9a5caf232186ce1a023fef02931d93edb42edfbc7db7b8b6e1f497c51d
Jupyter
15,352
330
# %% from infopath.model_loader import load_model_and_optimizer from infopath.config import load_training_opt import matplotlib.pyplot as plt import torch import numpy as np from infopath.utils.functions import load_data, opto, run_with_perturbation, pear_corr, feature_pop_avg, mse_2d from infopath.losses import noise...
87504088ed2cfbed84de2303e01766c84e828e3239a0fe4db8afa198bf657253
Jupyter
15,368
504
# %% import warnings import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from scipy.stats import pearsonr, spearmanr from sklearn.metrics import r2_score warnings.filterwarnings("ignore") # %% # Loading NYT time series data ts_df = pd.read_csv("./data/SWOW_prediction/eval/tim...
b5cf21ed5a96e6280045791cf78f72ac4d485b62401227bbff2517bbbd965aa0
Jupyter
15,377
439
# %% [markdown] # # User Selection - Based Querying # %% [markdown] # ## Set up # %% [markdown] # ### Load Required Libraries # %% from QC_functions import * # %% #denote wich brain we're using, like S1 (this is the atlas image for the overlay) # brain_img_orig=imread('/project/roysam/rwmills/repos/cluster-cont...
3bc0dc7b3ee55932761be513db80bc3dfddbff629eb2b2f1d2727b7d71ef496c
Jupyter
15,413
293
# %% [markdown] # <a href="https://colab.research.google.com/github/seisbench/seisbench/blob/main/examples/04a_das_models.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # **Hint:** To help with the high compute demand of DAS models,...
8988a65e25b376021efc283a470e74dd1487365522b7afa6210927f38f2b73f1
Jupyter
15,441
418
# %% [markdown] # # Surface-Based NSD Data Exploration # # Explore fsaverage surface betas (MGH format), ROI labels, and noise ceiling # for the surface-based Allen2022 fMRI benchmark. # # **Data location:** `/Volumes/Hagibis/nsd` # # **Key differences from volumetric pipeline:** # - Surface betas are MGH files per ...
e869906c01adbb528608fbe5eb622aca93bea99f4f2874a0c2ed45ae653b1155
Jupyter
15,443
417
# %% [markdown] # # fcHNN-based analyses of the ABIDE dataset # # ### Imports # %% import sys sys.path.append('..') import os from os.path import join import numpy as np from nilearn.datasets.utils import _uncompress_file, _fetch_file from nilearn.connectome import ConnectivityMeasure import pandas as pd import con...
cfad85c9ac9a32501e757f46ca83896470439405dcc075fac171cf47199594ad
Jupyter
15,507
410
# %% [markdown] # ## Distribution similarity metrics (122-D) # This section adds metrics to compare empirical (all_ts) and simulated (state_sample) distributions in 122-D. # - kNN KL/Jeffreys via Kozachenko–Leonenko estimator # - Gaussian symmetric KL (Ledoit–Wolf covariance) # - RBF kernel MMD (median heuristic) # - S...
faf4e82d98c51e9fbc83ec955f2af8925bcae0d1cde3db2430402a5b38d69281
Jupyter
15,524
365
# %% [markdown] # ## Figure S10A # %% import pandas as pd import numpy as np from difflib import SequenceMatcher """ Calculate GSI scores from csv of google form responses by participants. Code adapted from Giorgia Cantisani """ # %% # HELPER FUNCTIONS def similar(a, b): # Function that recognized similar senten...
f6e724e65e471d6b3147bebbe72ceaa4268db803b9a0624e1a8337d608c23446
Jupyter
15,614
343
# %% [markdown] # # Chapter 13: DSC/DCE MRI ANALYSIS # %% [markdown] # ### This is "worked example" walking through an example pipeline (as illustrated in Fig. 2) for DSC/DCE MRI analysis of a dual echo EPI acquisition. # %% [markdown] # ## 1. Import all the necessary packages # %% sys.path.append('..') import os i...
bc11150e2ea789fc8c37d18fe5cf856f10448b889b138b2c6a265486586e61fa
Jupyter
15,654
500
# %% import os import re from scipy import stats import tempfile from pathlib import Path import pandas as pd import numpy as np from matplotlib import pyplot as plt import matplotlib from matplotlib.colors import rgb2hex import pickle as pkl from sklearn.model_selection import train_test_split from sklearn.discriminan...
c75cf0cbe748dca2df47ec88cc6792120eeb1f8a7a807ce61c0ae65bce28fb93
Jupyter
15,671
488
# %% import matplotlib import matplotlib.pyplot as plt import pandas as pd import numpy as np import liana as li import scanpy as sc from liana.method import singlecellsignalr, connectome, cellphonedb, natmi, logfc, cellchat, geometric_mean matplotlib.rcParams['pdf.fonttype'] = 42 # %% # prepare the scanpy object corr...
510ce9a17fbe29a9343a1ad8d9885ee1731552ca74d79fc3e7da8553951a8a40
Jupyter
15,697
504
# %% ! scp -r yroussel@bbpv1.epfl.ch:/gpfs/bbp.cscs.ch/data/project/proj84/csaba/aibs_10x_mouse_wholebrain/results/density_calculations_3/scaled_densities_t_types_as_keys.pickle ./ # %% import pickle # Open the pickle file in binary read mode with open('./scaled_densities_t_types_as_keys.pickle', 'rb') as file: #...
370540ebdb3edbb8f1f3dd104fa5ed5654e2eb2ae37679b009c455d6418d780a
Jupyter
15,723
317
# %% import pandas as pd import seaborn as sns import numpy as np import matplotlib.pyplot as plt from pylab import rcParams import matplotlib rcParams['figure.figsize'] = 3,5 sns.set(font_scale=1.3, style = "white") # %% df = pd.read_csv('/home/MRMelissaGrantPeters/MinaRyten/Melissa/teamWood/Abundance_final_data/proc...
5beafda17a8440987bfd5f9df41d3bb3d4438e1bee3d8950e0f5a24606276ebf
Jupyter
15,750
305
# %% [markdown] # <a href="https://colab.research.google.com/github/seisbench/seisbench/blob/main/examples/04b_training_deepsubdas.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # **Hint:** To help with the high compute demand of DA...
089ee322ea339b6e3c0088f496ca5af994650e57d3d183b28c7ecfc56483d6bd
Jupyter
15,755
469
# %% import sys sys.path.append('..') import os from os.path import join import numpy as np import pandas as pd import connattractor.network as network import connattractor.analysis as analysis from joblib import Parallel, delayed import pickle import matplotlib.pyplot as plt from myst_nb import glue import seaborn as...
5206fbffc79d99b08e8af06a34137486223164bf3769bee80e7614d84d458fa4
Jupyter
15,762
431
# %% [markdown] # # Surface Data Preparation # # Extract session-z-scored, rep-averaged surface betas for ALL 1000 shared images, # all 4 ROIs (V1, V2, V4, IT), all 8 subjects. # # **Output:** Per-region xarray DataArrays saved as netCDF. # - `Allen2022_surface.V1.nc`, `Allen2022_surface.V2.nc`, etc. # - Contains 100...
9302f810573219aceb651fe443363cabb23d676629b0670816da22270b965130
Jupyter
15,822
279
# %% [markdown] # # LaLonde Dataset # # Economists have long-hypothesized that training programs could improve the labor market prospects of participants. # In an attempt to test (or demonstrate) this, the National Supported Work (NSW) Demonstration was initiated using combined private and federal funding. This progra...
4c39ada13a41123c054b2768260a5664483ebbbad209c97fc426348421968588
Jupyter
15,924
267
# %% [markdown] # # Instructions # The following code was designed in order to track the location of a single animal across the course of a single video session. After initally loading in the video, the user is able to crop the video frame using a rectangle selection tool. A background reference frame is then specifi...
97deeb4b8c95ec5b502d3493e1cdbc1098abaa9a229c0060da9e7f236e22c8d9
Jupyter
15,943
371
# %% [markdown] # We create a pickle file fom csv files # - dict of dataframes # %% import pandas as pd import os import numpy as np import copy from voxcell import RegionMap import pickle # %% import sys sys.path.append('/gpfs/bbp.cscs.ch/data/project/proj84/csaba/aibs_10x_mouse_wholebrain/notebooks/scripts/') fro...
8b8b53a3c7f0eaf969594fbf6575d3cd85b3b3345503a46f25914919683f9a47
Jupyter
15,989
463
# %% [markdown] # # Introduction to TF2.4_IVIM-MRI_CodeCollection github and IVIM Analysis using Python # %% [markdown] # # Installation # # First, download the TF2.4_IVIM-MRI_CodeCollection github as zip-folder by clicking on Code > Download ZIP: # # ![image-2.png](attachment:image-2.png) # # If you haven't done s...
ce5f591e8447d2773aa7064011ffef0c9f0be0d20ffc73a6645e9f9177dd6d98
Jupyter
16,003
293
# %% [markdown] # ## X-learner # X-learner is a Meta-algorithm by [künzel et al. (2018)](https://www.pnas.org/content/116/10/4156) # that estimates heterogeneous treatment effect using five base-learners. Two are used for estimating the outcome (one for the treated and one for the non treated) Additional two are used ...
ebb4742b1fb15aaf61430afe3c7e3b1f0d007d62bfa0c8d931ecf11b172e7db8
Jupyter
16,012
617
# %% [markdown] # Parse lentiMPRA data into format for modeling. # # Add the replicate-level standard deviation (aleatoric uncertainty) to this file, thereby removing samples with no standard deviation measurement. # # [Data source](https://www.biorxiv.org/content/10.1101/2023.03.05.531189v1.supplementary-material) #...
70f67224fa10a58098464a81741909ea097f4e0cf1328a933b87e242820ce75a
Jupyter
16,037
376
# %% [markdown] # ### Imports # %% %load_ext autoreload %autoreload 2 import numpy as np import matplotlib.pyplot as plt import seaborn as sns from Utilities_and_Loading import * from Global_parameters import * from Plotting import * from Preprocessing import * from General import * from Manifolds_analysis import * fr...
f43bf468e37197a77242b79f4b612190709f4f7e10880ef7b21a65c918779ff3
Jupyter
16,040
480
# %% import numpy as np import torch from torch import nn from torch.nn import functional as F from torch import optim import torchvision from matplotlib import pyplot as plt import angular_spectrum_tensor_v1 as AST import cv2 import os import pandas as pd from torchvision.io import read_image from torch.utils.data imp...
27cf1b22f4e4092886d1ac5a6f811126eedf854755629b317c967d4da9008948
Jupyter
16,062
480
# %% import numpy as np import torch from torch import nn from torch.nn import functional as F from torch import optim import torchvision from matplotlib import pyplot as plt import angular_spectrum_tensor_v1 as AST import cv2 import os import pandas as pd from torchvision.io import read_image from torch.utils.data imp...
3a041cbcc1fdb0f55f764207140fea6e9ae9fbd4044ef7e44084bb55b0bc60f6
Jupyter
16,063
532
# %% [markdown] # ## Importing packages and data # %% #!/usr/bin/env python3 # -*- coding: utf-8 import copy import os import sys import matplotlib.pyplot as plt import numpy as np import pandas as pd import scanpy as sc import scvi import torch from scvi.model import SCVI, CondSCVI from sklearn.cluster import KMean...
4436f4b84d2b61be5422f7e98ce4688db7332873b2c545dea972abd45f403525
Jupyter
16,079
372
# %% library(tidyverse) library(ggplot2) library(ggthemes) library(patchwork) library(ggsci) library(ggvenn) library(ComplexHeatmap) library(RColorBrewer) library(ggbeeswarm) library(tidyr) library(circlize) library(fastcluster) library(ggrepel) # %% setwd("/data/wuqinhua/scPhase/CRC") # %% [markdown] # ## 1. Attribu...
e9d2f7f7081b25105ef2a9d33ee197e6c5536e7b629721acbef65f61106dcd45
Jupyter
16,093
485
# %% import numpy as np import torch from torch import nn from torch.nn import functional as F from torch import optim import torchvision from matplotlib import pyplot as plt import angular_spectrum_tensor_v1 as AST import cv2 import os import pandas as pd from torchvision.io import read_image from torch.utils.data imp...
8e8231a9ba934ef7d40eaf0007c294a8a499025174043e70c9ed915d2791d449
Jupyter
16,181
489
# %% [markdown] # # Colab Notebook for SAM2 segmentation # # Author: Dr.Yusuke Kimata (ORCID: https://orcid.org/0000-0002-1366-0636)<br> # ref: Notebook by Meta Research (https://github.com/facebookresearch/sam2/blob/main/notebooks/)<br> # # ### **Revision for flexible reference frame selection (2025/09/22)** # For i...
a7d025676576ecd13605532e395a9c1000bbd1bf3f49ec803534626a28e8023c
Jupyter
16,241
414
# %% [markdown] # # Positivity filtering # # This Notebooks presents several models that perform overlap exclusion # %% [markdown] # # Trimming Positivity Checker # %% from causallib.positivity import Trimming from sklearn.linear_model import LogisticRegression from sklearn.datasets import make_classification import...
5cb0a477c64fd6ecce2fedce42b484221aaa372c89ae7bec577aac2bee2b7191
Jupyter
16,269
408
# %% [markdown] # # Slow-waves detection # # This notebook demonstrates how to use YASA to automatically detect slow waves on single-channel EEG. # # Please make sure to install the latest version of YASA first by typing the following line in your terminal or command prompt: # # `pip install --upgrade yasa` # %% im...
47ced40e936def41702457fe31836488868f4c8ddd03a7f71e9b024be00c3262
Jupyter
16,288
370
# %% library(tidyverse) library(ggplot2) library(ggthemes) library(patchwork) library(ggsci) library(ggvenn) library(ComplexHeatmap) library(RColorBrewer) library(ggbeeswarm) library(tidyr) library(circlize) library(fastcluster) library(ggrepel) # %% setwd("/data/wuqinhua/scPhase/Lung") # %% [markdown] # ## 1. Attrib...
2524e6eff1d64b64f85801d30d58566576b2a696eeac64899a4a6c53c0e1636b
Jupyter
16,335
377
# %% [markdown] # # Notebook 2: Position Interneurons # # ### General Overview # # Two position integrators (INs) are added to each joint, with the function of integrating all spikes originating from a given hair field into a position-dependent spike train. These spike trains are able to encode the varying joint angl...
3393c2f76d11e1bad393a034fe9d393f25e990ea9abc3fdea67605d906726b40
Jupyter
16,378
389
# %% [markdown] # # Speckle Analysis Script # %% [markdown] # ## Script Parameters # %% output_path = 'C:/Users/u0119446/Desktop/Temp/Ongoing_projects/Laura/Analysis' qupath_measurements = 'C:/Users/u0119446/Desktop/Temp/Ongoing_projects/Laura/measurements_detections.csv' description_file = 'C:/Users/u0119446/Desktop...
2de46944d31bceb1a568d02c9eb4678e648d3efb98c38f626a56f034a8e9af3b
Jupyter
16,404
524
# %% import math from collections import OrderedDict import torch from torch import nn from torchvision import transforms from torchmetrics.functional import pearson_corrcoef, spearman_corrcoef import torch.utils.model_zoo import os from PIL import Image from torch.utils.data import Dataset, DataLoader import pandas as...
c4f74c7453f231bf83a199878c87ae0438f00fcb4b1afd8ba58993f64767c323
Jupyter
16,520
463
# %% import numpy as np import torch from torch import nn from torch.nn import functional as F from torch import optim import torchvision from matplotlib import pyplot as plt import angular_spectrum_tensor_v1 as AST import cv2 import os import pandas as pd from torchvision.io import read_image from torch.utils.data imp...
b02db05d543d43a62adacf24673daa94c57ccb0e68d74e929d44c0b1e3923bc5
Jupyter
16,612
464
# %% import numpy as np import matplotlib.pyplot as plt from pyDOE import lhs import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # %% # ----------------------------- # Geometry Parameters (scaled) # ----------------------------- L = 2.8 / 0.24 d = 0.2 / 0.24 l = 0.3 / 0.24 h = 0.2 / 0.24 L1 = 0.8...
ee795ccda9a3efc09319246957cfc74de78a287d20060889241040559e61a23b
Jupyter
16,624
467
# %% import os import numpy as np import pandas as pd import json # import seaborn as sns from matplotlib import pyplot as plt import pickle # import tqdm.notebook as tq from pcntoolkit.normative import predict, evaluate from utils.training.nm_utils import load_2d from pcntoolkit.util.utils import create_design_matrix...
936a2b148c50225a327636fd58c5fcbf9a769549e4700af548d2c52c2d991a7d
Jupyter
16,655
368
# %% [markdown] # # Chapter 13: DSC/DCE MRI ANALYSIS # %% [markdown] # ### This is "worked example" walking through an example pipeline (as illustrated in Fig. 2) for DSC/DCE MRI analysis of a dual echo EPI acquisition. # %% [markdown] # ## 1. Import all the necessary packages # %% import os import numpy as np impo...
e6e07958b04ec256ba23cd61494d2b5c8182ec88cd841b4cfe8d776f73726341
Jupyter
16,705
517
# %% [markdown] # # Score SNPs # # Use trained models to score SNPs. # %% import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import pandas as pd import pyfaidx from collections import Counter, defaultdict, OrderedDict from modisco.visualization import viz_sequence import logomaker from copy im...
e1d3c1daf36e19ca37e577a58d80e2010dc26507b0bdb45e6d8697d7bd24054f
Jupyter
16,762
534
# %% import matplotlib import matplotlib.pyplot as plt import pandas as pd import numpy as np import liana as li import scanpy as sc from liana.method import singlecellsignalr, connectome, cellphonedb, natmi, logfc, cellchat, geometric_mean matplotlib.rcParams['pdf.fonttype'] = 42 # %% # prepare the scanpy object corr...
07c4399e7c0901ff6111219a8c243899bd3fe9f32781b6f32e6305f572abf423
Jupyter
16,774
768
# %% [markdown] # ## Import Packages # %% import os import yaml import math import pandas as pd import numpy as np import scanpy as sc import scipy.io import humanfriendly import matplotlib import matplotlib.pyplot as plt import matplotlib.ticker import seaborn as sns %matplotlib inline %config InlineBackend.figure_f...
e05b67c2c2920e1d8d0b2e9d518f08467dadafc65ac23fce71c82a9eca6a9bdf
Jupyter
16,890
432
# %% library(ArchR) library(BSgenome.Hsapiens.UCSC.hg38) library(dplyr) library(igraph) library(glue) source('../utils/utils.r') addArchRThreads(threads = 16) addArchRGenome("hg38") set.seed(1) # %% projAUD <- loadArchRProject(path = "/gpfs/gibbs/pi/girgenti/JZhang/CL/multiome/data_AUD/fig1-UMAP/CNA-ATAC/", # /CNA-AT...
c6745cacff24796bdc25796d53172a5bf957db79c6ad0204e75286ad05d4239d
Jupyter
16,897
596
# %% import warnings import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import statsmodels.formula.api as smf warnings.filterwarnings("ignore") # %% # loading and preprocess time series data for COHA def load_ts_df(path: str) -> pd.DataFrame: df = pd.read_csv(path) d...
8dc48accc99dad3ca66e21959e983a3d708a4bfe42977eb85a7ddc7da9143867
Jupyter
16,899
774
# %% [markdown] # ## Import Packages # %% import os import yaml import math import pandas as pd import numpy as np import scanpy as sc import scipy.io import humanfriendly import matplotlib import matplotlib.pyplot as plt import matplotlib.ticker import seaborn as sns %matplotlib inline %config InlineBackend.figure_f...
fb8b570fb039599bffb4b8dff7ae5ec41bc2d77e74cc303591a99e92904d6189
Jupyter
16,913
459
# %% from pegasusio import UnimodalData, MultimodalData import matplotlib.pyplot as plt import pegasus as pg import pandas as pd import glob import os import itertools import re import sys sys.path.append('../utils/') from utils import * from scipy.stats import mannwhitneyu # %% data = pg.read_input('/gpfs/gibbs/pi/g...
b0d624f98146049c5a9994e0f42d0f14667e2345d3d9276ecd9e0b72b28ec877
Jupyter
16,934
500
# %% import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from matplotlib.colors import LinearSegmentedColormap from scipy.stats import pearsonr, spearmanr from sklearn.metrics import precision_score, recall_score from sklearn.metrics import mean_absolute_error, mean_squared_erro...
3fe901f47916f1cd022531ac8083a7c6ff8f9d8df5d967999de8ebe28530e114
Jupyter
16,966
576
# %% %matplotlib notebook import sys import os import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import cartopy.crs as ccrs import numpy as np import obspy as obs from obspy.signal.invsim import corn_freq_2_paz import h5py import pandas as pd from math import sqrt from scipy.spatial import Del...
a57424a29178e9c231b1c5a11f4c90f11e0143b7a887bc363c554e86bf423381
Jupyter
17,027
478
# %% [markdown] # ## Figure 6F # %% import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns import matplotlib as mpl plt.style.use("article.mplstyle") import mne from statannotations.Annotator import Annotator import itertools import glob import os import sys from scipy.io impo...
5e0a51c8acb09a7d82c2b231e297c145d415ff706c7aa6edccd2cd1fe20566e0
Jupyter
17,039
431
# %% import torch import torchvision import torchvision.transforms as transforms # %% transform = transforms.Compose( [torchvision.transforms.ToTensor(), torchvision.transforms.Normalize( (0.1307,), (0.3081,))]) batch_size = 6000 trainset ...
fd22f0f682b8417790bfddd8c942aa603305143285e3640f2e71a8ba9e9a317e
Jupyter
17,055
529
# %% [markdown] # # Plotting the predictions of the single- and multi-center RPN signatures # - This jupyter notebook is available on-line at: # - https://github.com/spisakt/RPN-signature/blob/master/notebooks/3_compare_predictions.ipynb # - Input data for the notebook and non-standard code (PAINTeR library) is avail...
3acc3bc232d85fa9280aa2c5ecc05b8d2bd594384c26296e103ef306bfb78cf7
Jupyter
17,071
696
# %% #python resample.py $IMAGE_TO_RESAMPLE $REFERENCE_IMAGE # %% import nibabel as nib from nilearn.input_data import NiftiMasker , MultiNiftiMasker # %% import numpy as np import os import scipy.io import nibabel as nib from nilearn.input_data import NiftiMasker from nilearn.masking import compute_epi_mask from s...
db767b723991f2b7ac977ee3cfaec5fee81d12d706ab359fd431eb95cd5e3615
Jupyter
17,161
422
# %% [markdown] # ### Imports # %% %load_ext autoreload %autoreload 2 import numpy as np import matplotlib.pyplot as plt import seaborn as sns from Utilities_and_Loading import * from Global_parameters import * from Plotting import * from Preprocessing import * from General import * from Manifolds_analysis import * fr...
012ebb1ee9ff0fc510000a9195e4487c1f1e46e0b040cb2f86b040b13f0a7901
Jupyter
17,194
467
# %% [markdown] # <h1><center>SpaGCN Tutorial</center></h1> # # # <center>Author: Jian Hu,*, Xiangjie Li, Kyle Coleman, Amelia Schroeder, Nan Ma, David J. Irwin, Edward B. Lee, Russell T. Shinohara, Mingyao Li* # %% [markdown] # ### Outline # 1. Installation # 2. Import modules # 3. Read in data # 4. Integrate gene ...
ab7d60efa96503afb5d8060f7a7f56c4004e077a04525f501807439650b365e6
Jupyter
17,210
450
# %% [markdown] # ### Imports # %% %load_ext autoreload %autoreload 2 import numpy as np import matplotlib.pyplot as plt import seaborn as sns from Utilities_and_Loading import * from Global_parameters import * from Plotting import * from Preprocessing import * from General import * from Manifolds_analysis import * fr...
ef065c643cb699a439d0ee6cd095451f441823908b89357ef35ddcc8f788954b
Jupyter
17,212
593
# %% [markdown] # # Compare Timings of MCML and Surrogate Model # %% import os import pickle import time import warnings import lightning as pl import matplotlib.pyplot as plt import numpy as np import pandas as pd import plotly import plotly.graph_objects as go import torch from omegaconf import DictConfig from plot...
ccaa20171738cb05169064be088e75e6b135ee5acb0c58e7fa1e3fdc3447cc4e
Jupyter
17,217
392
# %% library(tidyverse) library(ggplot2) library(ggthemes) library(patchwork) library(ggsci) library(ggvenn) library(ComplexHeatmap) library(RColorBrewer) library(ggbeeswarm) library(tidyr) library(circlize) library(fastcluster) library(ggrepel) # %% setwd("/data/wuqinhua/scPhase/COVID") # %% [markdown] # ## 1. Attri...
1decd7f2e0cfe65275ae2b98bc7a372da37d5ca7cbe4727f79f8c07b2d084a21
Jupyter
17,245
480
# %% import seaborn as sns import pandas as pd import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.colors import ListedColormap, LinearSegmentedColormap # from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_axes # from mpl_toolkits.axes_grid...
76c6b722a0c3ead844857f872257ce77d608bd7283ed833ea5e826e445ac7728
Jupyter
17,276
408
# %% import datajoint as dj import numpy as np import matplotlib.pyplot as plt import seaborn as sns import pandas as pd from tqdm import tqdm import scipy from neuro_data.static_images import data_schemas from staticnet_analyses import base from staticnet_invariance import deis_reconfigured as deis_schema, dei_stimulu...
4344f5a97c2e7494bc7b46aa0b5c3bbc76f9118b4f4a299b383fc6d5480b51fe
Jupyter
17,283
504
# %% [markdown] # # HarveST Complete Analysis: Clustering + Spatial Gene Discovery # # This notebook demonstrates a complete spatial transcriptomics analysis workflow using HarveST: # 1. **Clustering Analysis**: Identify spatial domains using graph neural networks # 2. **Spatial Gene Discovery**: Find domain-specific ...
9cf75ab39655bb4ee3499d64e006026817acfd4e84af42e94da800b00618fbcf
Jupyter
17,321
421
# %% [markdown] # ## Code for parameters grid: # Here is reported the code for obtaining the grid of digital biomarkers (in this case we use resting-state PSD and FC quantitites) for various combinations of model biomarkers: # # References: # # [1] L. G. Amato, A. A. Vergani, M. Lassi, C. Fabbiani, S. Mazzeo, R. Bur...
8f747d2de3a5b089639ff355fb927aef2e97547055e8b4fc160c5143547dadca
Jupyter
17,341
527
# %% [markdown] # # Tabula Data Loader # # This file contains instructions for creating scanpy anndata versions of: # # # |Dataset|Paper| # |-------|-----| # |Tabula Sapiens|https://www.science.org/stoken/author-tokens/ST-495/full| # |Tabula Microcebus|https://www.biorxiv.org/content/10.1101/2021.12.12.46946...
4a04d25190096d56897a288f35b7e300909c252bf74cd9964e344a4544946fb9
Jupyter
17,367
443
# %% [markdown] # ### Imports # %% %load_ext autoreload %autoreload 2 import numpy as np import matplotlib.pyplot as plt import seaborn as sns from Utilities_and_Loading import * from Global_parameters import * from Plotting import * from Preprocessing import * from General import * from Manifolds_analysis import * fr...
e35667979660368cf16d1a805669acd68caff76a79e484c8c17bb4259ab5484b
Jupyter
17,367
505
# %% import os import json import pandas as pd import numpy as np from statsmodels.formula.api import mixedlm from sklearn.preprocessing import StandardScaler import seaborn as sns import matplotlib.pyplot as plt import statsmodels.api as sm import statsmodels.formula.api as smf import scipy.stats as stats from statsm...
b2381f7b7d39d0723cdc6bc2c45dcbe5a810e70d61d1828dee04282a920049db
Jupyter
17,407
613
# %% import pickle import warnings import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns warnings.filterwarnings("ignore") from scipy.interpolate import UnivariateSpline # %% from nltk import WordNetLemmatizer lemmatizer = WordNetLemmatizer() from ast import literal_eval # %%...
2a05009a77408150b9ee394f956b560c022b6f94a1fb6aaf3abe184c17825dad
Jupyter
17,490
571
# %% [markdown] # # 02-demographics-and-clinical-characteristics.ipynb # # Using `ibs-brain` conda environment # # Arvid Lundervold # # Updated: 2025-02-01; 2025-02-10 # # # Reporting demographics and clinical characteristics of the IBS-Brain cohort `demographics_fs7_rbans_78x48.csv` # # Saving to `latex/tables/d...
f525df4c66e8766125c7dd89b611563ca1cdc51a25325cbf8f10542115ab8591
Jupyter
17,558
505
# %% [markdown] # # Initial Screening: Objectives, Inputs, Outputs, Method, and Rationale # # **Objective** # - Perform comprehensive model screening across multiple machine learning algorithms to identify top-performing candidates for each brain region (ROI). # - Generate reproducible, publication-ready accuracy comp...
cadfec6ca16dd9ffc47ff6ad1c09c7cba5cfc1f95dbc7dcdc0bf23b8b1bfbe5a
Jupyter
17,560
564
# %% import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from itertools import product # %% df = pd.read_csv("/Users/chris/projects/Nature2023MooneyScripts/results/learning_comparison.csv") # %% df.head() # %% [markdown] # ## Rank human performance # %% human_df = df[df["So...
ce85adafe17a75b64434bf9f6cf8fb2dcdd984d9c70850a482e2e7976620b6e2
Jupyter
17,632
464
# %% [markdown] # ## READme: # # Jupyter Notebook & train data for recreating the normative charts from [Dimitrova et al., (2020)](https://www.biorxiv.org/content/10.1101/2020.08.05.228700v1.abstract). This notebook will allow the user to: # # - run Gaussian Process Regression (GPR) on the normative volumetric data p...
3617a4f3685fae0dc5b9c091e8d274080afe236a49fcd83ccf3a7398b976fb02
Jupyter
17,689
367
# %% from infopath.model_loader import load_model_and_optimizer from infopath.config import load_training_opt import matplotlib.pyplot as plt import torch import numpy as np from infopath.utils.functions import load_data, opto, run_with_perturbation, pear_corr, feature_pop_avg, mse_2d from infopath.losses import noise...
bd5c01908f192d53eb6d094d5f3c3ba4f5d98f43d62b8f48fe8507593bf14ab7
Jupyter
17,738
263
# %% [markdown] # <div align="center"> # <a href="https://www.ultralytics.com/yolo/yolo27?utm_source=github&utm_medium=social&utm_campaign=yolo27-launch-2026&utm_content=banner" target="_blank"> # <img width="1024" src="https://raw.githubusercontent.com/ultralytics/assets/main/yolov8/banner-yolov8.png"> # </a> ...
74742d8642d484958009500cc25897d0175d509dccac06d8efe0f7556414b651
Jupyter
17,769
626
# %% import warnings import matplotlib.pyplot as plt import pandas as pd import seaborn as sns warnings.filterwarnings("ignore") # %% ts_df = pd.read_csv("./data/SWOW_prediction/eval/time_series/nyt_ts_df.csv") ts_df = ( ts_df.groupby(["words", "year", "property"])[["outputs_z", "count"]] .mean() .reset...
3bfacc8f5601e40fba1447348c7134b0624bd86044323625c260712af4945998
Jupyter
17,913
423
# %% import os import numpy as np import pandas as pd from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA from skimage.morphology import remove_small_objects from scipy.spatial.distance import directed_hausdorff from sklearn.metrics import roc_curve, auc import matplotlib import matplotlib.pyplo...
c65111307e6d1abd33176d2750dc6e20fee19e9de641609e7fccbc556d886568
Jupyter
18,042
538
# %% [markdown] # Parse CAGI5 data to get WT and mutant sequences for zero-shot prediction with ResidualBind models. # # Includes code to identify and add in missing alternate alleles. # %% import numpy as np import os, h5py import pandas as pd from collections import defaultdict import glob import subprocess # %% [...
9681a18039a6dc7f5117fcea3c1e558babe3159f7e7473780e72ba5d3e05a92a
Jupyter
18,160
524
# %% import brainpy as bp import brainpy.math as bm import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import scipy from scipy.signal import hilbert import sys sys.path.append('..') from cann import CANN1D import warnings warnings.filterwarnings("ignore") #set backend to cpu b...
14664e342d20254687c42cd96924fa56735221270420ba04638997c53ca601bb
Jupyter
18,261
537
# %% # Depricated from Google Colab as of 2024-12-01 # !sudo apt install python3.9-full python3-pip # !sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 # !pip uninstall -y scikit-learn scipy pyparsing -y # !pip install Cython==0.29.36 scipy==1.9 pyparsing==2.4 # !pip install https://fi...
7f4cdfeffbf3c13ec311ad4ba2335d5cc2f8d9638a24ebce274799ab7efecb52
Jupyter
18,369
533
# %% [markdown] # # Likelihood Stats # Kai Sandbrink # # 2024-09-30 # # This script aggregates the likelihood tests for both task 1 and task 2. Note that it requires re-running the networks on the human data to determine the likelihood of the trajectories. # %% [markdown] # ## Task 1 # ### Likelihood estimation: NOT...
cad53077c4865e0f871785acb1e1fab890c02ba9cf8a33561b1c04c4630ab8db
Jupyter
18,382
496
# %% [markdown] # <a href="https://colab.research.google.com/github/MRS-NIH/DeepJPRESS/blob/main/deepJPRESS_demo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # Click **Run all** to reproduce in vivo test results. # This notebook w...
1b22274c61f4ad952fca837fe0e8a5c91770317ac6667190dc0671e580205578
Jupyter
18,408
479
# %% [markdown] # # Model comparison # # So how do we know if a model is good? The PCNtoolkit provides us with some useful statistics for fitted models, but those aren't always as unequivocal as we would like. Luckily, for HBR models, there is a sound way to rank models, based on the ELPD. This technique allows us to ...
06ec8dca19a6e1d9c96ad2a2604cce1f765ceb2d876c68df0c41863547d41724
Jupyter
18,415
497
# %% import scanpy as sc, anndata as ad, numpy as np, pandas as pd from scipy import sparse import matplotlib.pyplot as plt import plotly.express as px from anndata import AnnData from sklearn.neighbors import KernelDensity import random from matplotlib import pylab from matplotlib.colors import TwoSlopeNorm import wa...
ce760f23a923c2a0dc2ef0aa0160c8f97f139b0518992cb9b4bfd67c61c8a55c
Jupyter
18,437
669
# %% [markdown] # # Figure 4 # %% #Import relevant packages import numpy as np import pandas as pd from matplotlib import rcParams import os import scanpy as sc import matplotlib as mpl import matplotlib.pyplot as plt import cmocean import seaborn as sns from scipy.stats import median_abs_deviation import anndata...
5913a721d0bf78c573a04008fb35b7e46a537289b538b1b44c71a840d3c822e8
Jupyter
18,483
358
# %% [markdown] # # Spindles detection # # This notebook demonstrates how to use YASA to perform **single-channel sleep spindles detection**. It also shows a step-by-step description of the detection algorithm. # # Please make sure to install the latest version of YASA first by typing the following line in your termi...