sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
a5d5ed2cc0ede53bf169c7448a4adab06a45cc89813dc0a30e8709f83c568bfa
Jupyter
1,941
77
# %% import nibabel as nib import cv2 import src.contextract as ce import numpy as np import matplotlib.pyplot as plt from scipy import optimize import os import pickle import src.datagenerator as dg # %% def histo(filename,bin=30): #plots histogram of intensities of pixels of video/image found in filename loa...
1f4c4ea6a5ad4d09c450b3e88898f5478be7cb09e0988a5a6b7400958386d9a5
Jupyter
1,944
67
# %% import pandas as pd import seaborn as sns import numpy as np import matplotlib.pyplot as plt #load rf = pd.read_csv('../outputs/RF_reg_TEST_pred.csv') lasso = pd.read_csv('../outputs/lasso_reg_TEST_pred.csv') # check if all rows are the same if sum(rf['Measured_pH_TEST'] == lasso['Measured_pH_TEST']) == rf.shap...
05bbf868f2e437992f8509230e911799594e8f84326c13e751d29a332261af92
Jupyter
1,948
70
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Embedding/TensorFlow/Advanced/ProtAlbert.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Extracting protein sequences' featu...
5ac2855390bbd65453a8689ea36f9ec7e5a9d7a1d3d1bd36e00ee5b0b7d5c793
Jupyter
1,950
72
# %% import scanpy as sc import pandas as pd import anndata as ad import numpy as np # %% adata = sc.read_h5ad("/data/wuqinhua/phase/AD/AD_NatureNeuro_raw.h5ad") adata # %% adata.var_names_make_unique() # %% adata.var.index = adata.var["feature_name"] adata.var.index.name = None # %% sample_counts = adata.obs.grou...
6ce477e0d8173b4242cef59ff6d1dc82900f584bf2787c72265011f2f716732d
Jupyter
1,950
70
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Embedding/TensorFlow/Advanced/ProtBert-BFD.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Extracting protein sequences' fea...
049f6628f821ce92c25b3802a415cda4d9d2ed2b68375d37099bf1097c7e0511
Jupyter
1,952
45
# %% [markdown] # ## Demo: Connecting to a Locally Served vLLM Model (Minimal) # %% # Import the llm_graph from chemgraph.agent.llm_agent import ChemGraph print("Notebook created successfully!") # %% [markdown] # ### Initialize the Agent # # When initializing `llm_graph`: # 1. Set `model_name` to the Hugging Face i...
1ab0a484bd85c3ff5ecf8dc8d6810a81a69d51d25afa5ff76af5ecc542f19e32
Jupyter
1,959
72
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Embedding/PyTorch/Basic/ProtXLNet.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Extracting protein sequences' features usi...
6ec383978c5cf50210ba4f6aecf0210a6d9dc2f16ff70496142398afa42f19ca
Jupyter
1,963
73
# %% library(CellChat) count_net = read.csv("../../result/cci/MB/cci/MB_bin200_interaction_count_network.csv", row.names="X") head(count_net) # %% quantile(count_net$counts, 0.9) # %% # subset count_net domain # [5, 12, 10, 16, 7, 8, 14], #Cortex # [4, 11, 17], # HPC # [0, 15], # Thalamus library(dplyr) count_ne...
c7d85b52b8dcb91ab863e8c7f1b1c55acbe2103822088320cb6b1ec746ab528f
Jupyter
1,974
65
# %% ''' This is the data processing script for POP909:A Pop song Dataset for Music Arrangement Generation ============ It will allow you to quickly process the POP909 Files (Midi) into the Google Magenta's music representation as like [Music Transformer](https://magenta.tensorflow.org/music-transformer) ...
8031b1aa005fb76c9ca8b29b009394afcea01f3f05ca6c133fc89dc95f05dd8a
Jupyter
1,976
53
# %% [markdown] # Input: # - Accession CSV - A CSV file with a column called `Accession` with a list of study accessions to be brain extracted # - Input directory - Path to a directory with the file structure `<input_images_folder>/<accession>/<file>.nii.gz` where `<file>` is `t1ce_img` and/or `flair_img` # - Output d...
09d02a3b69145f55a31f14b1e5dbe92df3b0d4cb38578d030e10d0f751762524
Jupyter
1,982
58
# %% [markdown] # # Doublet Detection on 8k PBMCs from 10x Genomics # %% import numpy as np import doubletdetection import tarfile import matplotlib.pyplot as plt # %% [markdown] # ## Download Data from 10x # %% !curl -O http://cf.10xgenomics.com/samples/cell-exp/2.1.0/pbmc8k/pbmc8k_filtered_gene_bc_matrices.tar.gz ...
07ee1484f8df30df3769b48a82504ee2556132c52f55a7214195780882531782
Jupyter
1,986
40
# %% [markdown] # # Run SATURN to integrate the AH atlas # %% [markdown] # ## Make the run csv file # %% # Make the csv import pandas as pd df = pd.DataFrame(columns=["path", "species", "embedding_path"]) df["species"] = ["human", "mouse", "pig", "macaF", "macaM"] df["path"] = ["Vignettes/ah_atlas/data/human.h5ad", ...
c8896bbbc451fddbe017f3ed9e8183c8a6b3780bfb5bd5a961936f6003c3c188
Jupyter
1,989
78
# %% [markdown] # # Interactive Example # # ## 1. Run PhaseNet in terminal or use QuakeFlow API # %% import os, sys import numpy as np import matplotlib.pyplot as plt import obspy import requests sys.path.insert(0, os.path.abspath("../")) # %% # PHASENET_API_URL = "http://127.0.0.1:8000" # PHASENET_API_URL = "http:/...
556d607005e86155b9a6b69c7a3d2d2825e0791fbabf8bed2f0100deaa2789c8
Jupyter
1,994
69
# %% from google.cloud import storage import os os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "/Users/weiqiang/.dotbot/cloud/quakeflow_wayne.json" def download_blob(bucket_name, source_blob_name, destination_file_name): storage_client = storage.Client() bucket = storage_client.bucket(bucket_name) blob ...
411643932e9405ed0349b4086b8186793ce004acb9d060a3ff5c38d54ec15ed0
Jupyter
2,004
69
# %% [markdown] # # Graph measures # # This script showcases how to use some graph measures included in the comet toolbox. # %% import numpy as np from nilearn import datasets from matplotlib import pyplot as plt from comet import graph # Get preprocessed time series data from the ABIDE dataset subjects = [50008, 50...
274ec4f49b54666840fcbbe84c8e7f02ab954c0ec73ff1507c45e1026c7b4e70
Jupyter
2,008
49
# %% [markdown] # # Preparing CIFTI data for connectivity analysis # # CIFTI data refers to surface-level data as e.g. used in the Human Connectome Project (HCP). # # For this tutorial, you will need to create a [BALSA account](https://balsa.wustl.edu/) and then download the data for a single subject first, e.g. by ...
83c6b765075f023ff24412c18d57baff5e4c22a5246957f3c46acb4adc109d2c
Jupyter
2,010
77
# %% import Makie import CairoMakie using ZebrafishHMM2023: normalize_all!, load_behaviour_free_swimming_trajs, ZebrafishHMM_G4, markov_equilibrium, stubborness_factor using HiddenMarkovModels: baum_welch, viterbi using Statistics: mean, std using Distributions: Normal, Gamma, fit_mle using LinearAlgebra: eigen # ...
ab2390818ea5ff75e345a8cb37b3fa9992afa28f7b3bce86223167448d059102
Jupyter
2,021
63
# %% import json import pandas as pd from scipy.stats import mannwhitneyu # %% blast_path = "../test/results/BLAST/blast_family_metrics_id80.json" model_path = "../test/results/2ndvoting/k3/roc_data_k3.json" with open(blast_path, "r") as f: blast_data = json.load(f) with open(model_path, "r") as f: model_data...
23839a91cac1bf8ec4c336ee58d9a940014ac0ab042882588a8000ab8d272fe9
Jupyter
2,023
86
# %% import numpy as np working_dir: str = './working_dir' super_ivim_dc_filename: str = 'super_ivim_dc' # do not include .pt ivimnet_filename: str = 'ivimnet' # do not include .pt bvalues = np.array([0,15,30,45,60,75,90,105,120,135,150,175,200,400,600,800]) snr = 10 sample_size = 100 # %% [markdown] # ## Simulate ...
92709de372615db7c65e10c594db3e53fe1508c6212c56882218e25bbaf14636
Jupyter
2,033
60
# %% [markdown] # # Development of cell match across scans # %% import pandas as pd import datajoint as dj import matplotlib.pyplot as plt %matplotlib inline #from pipeline.utils import registration import numpy as np from neuro_data.static_images.data_schemas import stimulus, fuse, meso, experiment stack = dj.create...
2c542cb6f23dd3a2c856587ef957d5121eeafc41bca3f114a914dd68315318c5
Jupyter
2,036
60
# %% ###--------------------------------------------LOAD LIBRARIES import scanpy as sc import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import numpy as np import copy # %% adata = sc.read("../../../spatialDLPFC/nonIF_c2l_anndata_combined_30samples.h5ad") # %% # Prepare data subset = adata[a...
e0bd29957f1fd999e8c00e3efc7c3d11d80d5f2b4c4abd9d6863b862b261abed
Jupyter
2,036
69
# %% import pandas as pd import seaborn as sns # %% [markdown] # ## Plot # 1. Plot the horizontal cutoff for training length # 2. Test for post > repetition # %% path = "/Users/xujinliu/projects/cluster_results/long_native_trials/" dfs = [] for synth_seed in range(1000): for model_seed in range(4): file...
12e504b8a720c6787b53b58fc51dbcf9e43ed92516c6ba8ba5ac271faf1a16a2
Jupyter
2,041
90
# %% import scipy as sp import pandas as pd import numpy as np from numpy import mean from scipy import stats from scipy.stats import ttest_ind import warnings warnings.filterwarnings('ignore') # %% #nhp donors nhp= pd.read_csv('../data/Supplementary_Data5.csv') nhp_feature= pd.read_csv('../data/Supplementary_Data2.cs...
bd7d3a63760cf46b720219a3e7c9abd472325f9172e773bacbf9a39789e2fb53
Jupyter
2,068
63
# %% import warnings, json, joblib import pandas as pd from sklearn.model_selection import train_test_split from sklearn.metrics import r2_score, mean_absolute_error, mean_squared_error from sklearn.ensemble import RandomForestRegressor warnings.filterwarnings("ignore") # --- Configuration --- CSV_PATH = "9_makale_da...
6e8a50c54ff359323d6e3a0fee68e9d9fb97a09786579a06643f85685a06c8e2
Jupyter
2,082
73
# %% library(estimate) # %% [markdown] # # load the estimate dataset # %% OvarianCancerExpr <- system.file("extdata", "sample_input.txt", package="estimate") read.table(OvarianCancerExpr) # %% [markdown] # # Convert the expression matrix to a gct format file # %% ESTIMATE_gct_path = "../../result/cci/IDC/Estimate_a...
d93b4ac5696c9d53beef793e2101886ae6f18e878fb650aa67a56c3a7e18dab4
Jupyter
2,086
88
# %% [markdown] # # Import # %% import pandas as pd import numpy as np import pickle import sys sys.path.append("..") from src.preprocessing import ( load_dataset, extract_gene_pathway, cells_to_numpy, save_numpy_arrays ) # %% [markdown] # # Load data # %% dataset_path = "../data/dataset.csv" X, y = load_...
60e0c6c9cd6aec7012efb6d2fb18d4f5617e50c06619c3d9499b05388f85a18e
Jupyter
2,102
59
# %% [markdown] # # Continuously varying dFC # # Dynamic functional connectivity can be estimated though the `connectivity` module. We start by getting some data from the ABIDE data set: # %% from matplotlib import pyplot as plt from nilearn import datasets # Preprocessed time series data from the ABIDE dataset subj...
f53965c42c4b040850f627b9a6d21d1451a0d6308b48f024fd87c03ae225bfcb
Jupyter
2,108
67
# %% [markdown] # # Hemodynamic correction # # The hemodynamic correction is done by: # # - High pass filtering the signal above 0.1 Hz and subtracting the mean # - Computing the regression coefficients between the 2 channels. # - Subtracting a scaled version of the temporal components of one channel to the other to ...
b4da6b52671f1971998b1918761e2b4da3c23aa71c983837718b61f166660f17
Jupyter
2,126
81
# %% import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.colors import LinearSegmentedColormap import skopt from sklearn.model_selection import RepeatedKFold, RepeatedStratifiedKFold from sklearn.svm import SVR from sklearn.model_selection import GridSearchCV...
c95135b9f900b6bdd6d8c80f4f22110aa7574ba59aab925c202eaaa135504baa
Jupyter
2,129
57
# %% [markdown] # # Spectrogram # # This notebook demonstrates how to use YASA to plot a multi-taper spectrogram of a full-night single-channel EEG recording. # # 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 y...
6437dbf4b27081cc63657ee8a513a8b83b8e454dd6671ad80a1142d113886b22
Jupyter
2,145
78
# %% import pandas as pd import numpy as np import scipy as sp import statsmodels.stats.multitest as multi # %% phys_df = pd.read_csv('../data/Supplementary_Data2.csv') # %% blockers_list = ['DNQX, APV, Gabazine', 'DNQX, APV, gabazine', 'DNQX, APV, Picrotoxin'] phys_df['synapses'] = np.where(phys_df['Blocker...
850c8814d91e0fa5783e892c09ff96c8c51e192032e0f699ae5a6239abd6a494
Jupyter
2,149
76
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Embedding/TensorFlow/Advanced/ProtXLNet.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Extracting protein sequences' featur...
2e01867f392eea8b97ca4492d67d2cd6148822dbe7a5c5ec9230bfe77c49d488
Jupyter
2,161
69
# %% import Makie import CairoMakie using ZebrafishHMM2023: ZebrafishHMM_G3_Sym_Full, ZebrafishHMM_G3_Sym, load_full_obs, load_behaviour_free_swimming_trajs, ATol, normalize_all! using HiddenMarkovModels: baum_welch, logdensityof using Distributions: Gamma using Statistics: mean, std # %% full_trajs = load_full_o...
e8ca4b4dbca794ee3d9b294af2ae8ecadba1bdd281d8f4c4d6a06e772265f933
Jupyter
2,165
86
# %% import pandas as pd import numpy as np import torch import timm from dataset_SOFIA import DatasetSOFIA # %% folder_path = '' #path to top folder containing patient directories. label_meta_data_path = '' #csv file with patient IDs and corresponding diagnostic labels. model_path = '' # path to file containing tr...
1c0891cf86dd87cdfe27e6f7aba7796efb49311d5291c4604ac4aebd4e69511c
Jupyter
2,168
55
# %% [markdown] # ```{eval-rst} # .. role:: nge-mint-green # ``` # {nge-mint-green}`Train` # =================================== # %% [markdown] # ### Data Preparation # SKOOTS requires specific file naming conventions to locate training data. An annotated image `train_data.tif` should have associated ground truth ins...
b14f5ed289ef18840006ac2df848b7133fb5bc08d1ac2ead97aa29238e01a8b8
Jupyter
2,168
87
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Generate/ProtXLNet.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Generate protein sequences using ProtXLNet pretrained-mod...
d4189c983f8ef2c404eda34904b7ae0d85c2767682bed2b8c46ad2d66416e546
Jupyter
2,181
74
# %% [markdown] # # Quickstart # # ***for Connectivity-based Hopfield Neural Networks (CHNNs)*** # # - **Part 1**: The quickest way to plot and analyze your data on the CHNN projection # - **Part 2**: Build your own CHNN projection # %% [markdown] # **Imports** # %% import sys sys.path.append('..') import pandas as...
c31420c3febd5697fee8b9bbccd7d7a84fa71e3ac6710a4b12293510d37be3f3
Jupyter
2,189
79
# %% import numpy as np import matplotlib.pyplot as plt import os os.environ["OPENCV_IO_ENABLE_OPENEXR"]="1" import cv2 from os.path import join import imageio.v2 as imageio # %% imgpath = '/home/alban/Dropbox/mlab/users/alban/works/InvRend/projects/pipeline_intrinsic_3datasets/test_outs/results_TwoCubesBlender128_Al...
3ccefcef488f065e1a6abec428a0680f6ee306210e5776174cfbc989785b4826
Jupyter
2,190
68
# %% [markdown] # ### Assigning Clone IDs # Assign clone IDs to each cell and identify multi-cell and single-cell clones. # %% import numpy as np, pandas as pd from matplotlib import pyplot as plt from matplotlib import colors from matplotlib import figure # %% [markdown] # ### Read in files # CLONE_MAT: Path to .cs...
13900193fe9290134df6047ce9d3048ebc899371f6196aef998c050ad99fa398
Jupyter
2,196
86
# %% import pandas as pd import numpy as np import torch import timm from dataset_EfficientNetV2 import Dataset_EfficientNetV2 # %% folder_path = '' #path to top folder containing patient directories. label_meta_data_path = '' #csv file with patient IDs and corresponding diagnostic labels. model_path = '' # path to...
7d988f0d6ed431806d66a6aa1c4c308b7f396307bdebca29b233e583bb197154
Jupyter
2,197
80
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Embedding/PyTorch/Advanced/ProtBert.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Extracting protein sequences' features u...
5f8cd4ada34bd8ac533ffaba8620a95e4ba7e9d1eb76dc3341dd45bde2de4d3d
Jupyter
2,203
67
# %% [markdown] # # Behavior Analysis: Get CSVs with Behavior Classification Across Files # %% [markdown] # Press SHIFT + ENTER to run code # %% [markdown] # ### USER INPUT! # %% ## Define project project_name = 'project_acc_MiniscopeCap' # %% [markdown] # ### Main Code: Create CSVs for Behavior Classification (per...
56080bb6907f3966f7b0f6731e8f97be08172fe4e4dd80b87e9eb5507e3ad58d
Jupyter
2,211
68
# %% [markdown] # # Behavior Analysis: Get CSVs with Behavior Classification Across Files # %% [markdown] # Press SHIFT + ENTER to run code # %% [markdown] # ### USER INPUT! # %% ## Define project project_name = 'project_ACC_MORPDreadd_Combined' # %% [markdown] # ### Main Code: Create CSVs for Behavior Classificat...
9a653f0b1042a58170e17ee245365a7135a5c5f7262d168a071b1bc2c0796106
Jupyter
2,211
68
# %% [markdown] # # Behavior Analysis: Get CSVs with Behavior Classification Across Files # %% [markdown] # Press SHIFT + ENTER to run code # %% [markdown] # ### USER INPUT! # %% ## Define project project_name = 'project_ACC_MiniscopeSNI_Female' # %% [markdown] # ### Main Code: Create CSVs for Behavior Classificat...
3e3870c0286dab322eff0c3bdf3a479627eb675345719846d84526311be31574
Jupyter
2,216
80
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Embedding/PyTorch/Advanced/ProtAlbert.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Extracting protein sequences' features...
06d017cba64ed11fd89b007eb6c9ac95414ec667ddd643b20f9275103c73bdc3
Jupyter
2,219
68
# %% [markdown] # # Behavior Analysis: Get CSVs with Behavior Classification Across Files # %% [markdown] # Press SHIFT + ENTER to run code # %% [markdown] # ### USER INPUT! # %% ## Define project project_name = 'project_ACC_Study4_NociFormalinResponse' # %% [markdown] # ### Main Code: Create CSVs for Behavior Cla...
d4947b6fcb30ed2bede1d8db83e1e64447391b5f59cd907a80c3d7c42f5b61b4
Jupyter
2,219
69
# %% [markdown] # # Behavior Analysis: Get CSVs with Behavior Classification Across Files # %% [markdown] # Press SHIFT + ENTER to run code # %% [markdown] # ### USER INPUT! # %% ## Define project project_name = 'project_ACC_MiniscopeSNI_3WeekMorphine' # %% [markdown] # ### Main Code: Create CSVs for Behavior Cla...
20527d4e230be940b5d97744e9a364656cd2e9d50e68df48e13f3527a3d0b914
Jupyter
2,223
79
# %% import matplotlib.pyplot as plt from data_loading import load_dataset_graph from deepcardio.utils import plot_tri import torch from deepcardio.losses import LpLoss, H1Loss dltrain, dltest, data_processor = load_dataset_graph( folder_path='../data', train_batch_sizes=[10], test_batch_sizes=[10]) device = 'cud...
03696266450cd8a2b72d4e85ea42dcbfb98a463a72b31fe32a88c4eba2272f19
Jupyter
2,226
80
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Embedding/PyTorch/Advanced/ProtBert-BFD.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Extracting protein sequences' featur...
3a5c9e78ccdcf0c6df25b11268d5a18e3574bb472c6902204bfb5fd98da95190
Jupyter
2,232
103
# %% [markdown] # # CAMEX aligns various development stages of seven organs across seven different species # # # This tutorial demonstrates that CAMEX aligns various development stages of seven organs across seven different species. # # Here, we use a RNA-seq data from seven organs across seven species at various d...
ffd255ea735da6016879242ab12d8d29bb4064be3730678992a23d0cb1af56e3
Jupyter
2,234
70
# %% [markdown] # # Convert data to CLAHE # This notebook shows how to prepare the data for inference # * The data download from ESRF are originally jp2 # * Before inference, we will need to convert to .tif volume followed by a 3D CLAHE # %% import sys sys.path.append('..') import os import glob import natsort import ...
9469696f589db1ed73c9224971d43940d69288cdb8c8091a9fa0e297642798d0
Jupyter
2,243
63
# %% [markdown] # # Run many seeds of SATURN # %% [markdown] # To replicate SATURN results for frog and zebrafish embryogenesis you need to run SATURN 30 times with different seeds. # # To more easily do this analysis, we have provided a python script that will run SATURN a certain number of times. # # # **NOTE: ru...
30001a602a4b61b8ea54afe139573b43b134faa8138cb96809bc273ca33807b6
Jupyter
2,248
114
# %% [markdown] # ## Pipeline for model explainability # %% import os # Check if we are in the correct directory print("Current working directory:", os.getcwd()) path = os.path.abspath(os.path.join(os.getcwd(), '..', 'path.py')) %run $path import os os.environ['KMP_DUPLICATE_LIB_OK'] = 'TRUE' # %% #Configure dataloa...
f686ba3c274773172d2a9c3f38ecd374de930b8a19e4ce8d6b9e28d0376de2bd
Jupyter
2,252
96
# %% [markdown] # # CAMEX facilitates the discovery of new populations and markers in Primate dlPFC # # # This tutorial demonstrates that CAMEX could facilitates the discovery of new populations and markers in Primate dlPFC. # # Here, we use collected dlPFC scRNA-seq data from four species human, rhesus, marmoset, a...
a317e66c24c39f873b6b8182749b68aaabdca9eb101c6e575fd789f4136eb02f
Jupyter
2,273
97
# %% import warnings import matplotlib.pyplot as plt import pandas as pd from scipy.stats import pearsonr warnings.filterwarnings("ignore") # %% # Loading COHA time series data ts_df = pd.read_csv("./data/SWOW_prediction/eval/time_series/ts_df.csv") ts_df = ( ts_df.groupby(["words", "year", "property"])[["count"...
82e777d4c05cd13ae5023c869b8bfcfe6b56dd2739205b1315781c5edaa280f5
Jupyter
2,279
67
# %% import numpy as np import torch import matplotlib.pyplot as plt import EIANN.utils as ut import EIANN.plot as pt import EIANN.network as nt from tqdm.autonotebook import tqdm pt.update_plot_defaults() # %% epochs = 1 data_seed = 257 network_seed = 66049 analyze_receptive_fields = None # ['H2E'] train_dataloader...
95087e118321e2b065be757d7ebdf2b98df44b750fe4058fc56be46fd38bd5cf
Jupyter
2,281
66
# %% [markdown] # In this notebook, I briefly demonstrate the use of `ProximityCellMatch` and `BestProximityCellMatch` tables in `meso` # %% from pipeline import meso # %% [markdown] # Following demonstrates how to find matches between source scan: 25133-3-11 and target scan 25133-4-13. # We also have a list of unit_...
037e812e4d6f0df6c56d7662475fe2d65d4fecd862513ec3919c9f9cb64102c1
Jupyter
2,282
86
# %% ## #Load Packages import numpy as np import matplotlib.pyplot as plt from numba import jit import sys # %% ## #Define Path to Code Database DirPath = '/Your/Path/To/Code/' ## #Define Output Path OutputPath = '/Your/Path/To/Output/' # %% ## #Load Functions sys.path.append(''.join([DirPath,'bin'])) from EPGMotion...
ab2fa78779e5510ba7645835f9c7137474c9893954c4806411de2ad512bb4e69
Jupyter
2,283
63
# %% [markdown] # # Advanced multiverse structures # # Sometimes a multiverse is more complex than a fully connected grid of options. To express dependencies and constraints, you can add rules in the `config` dictionary. # # Three rule types exist: # # - `"exclude"` — keep the universe but set specific keys to `NaN`...
9d9c9c1535d6ac17a7b1d4ce5cf2a88466f839d8c1065fe99a09af9e75b032f7
Jupyter
2,285
80
# %% import numpy as np import matplotlib.pyplot as plt import tifffile from import_augmentation_function import normalization_fun base_dir = r'C:\Users\roumba\Documents\Software\deep-events' data_path = base_dir+ r'\testing_data' folder_name = r'\Modelsref_f8_c9_b16' model_type= r'\MODELS_both_iSIM_fl' MODELS, cel...
3d7f7c03ef1d34570224bea10fc43212332921dbbfb17a86d1a08826f67c749d
Jupyter
2,288
68
# %% from connattractor import analysis import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt # %% connfile = '../data_in/ex_connectome_partial_correlation.csv' mtx = pd.read_csv(connfile).iloc[:,1:] # %% [markdown] # ## Sweep beta with adjusted noise # %% simresults = dict() h...
cdc52d8c6fae29553eefcbd7db902e289f9d8b1cb813abf7d55f8a56df48a2b4
Jupyter
2,292
62
# %% [markdown] # # State-based dFC # # Currently, Comet includes five explicit state-based dFC methods as published in: # # > Mohammad Torabi, Georgios D Mitsis, Jean-Baptiste Poline, On the variability of dynamic functional connectivity<br>assessment methods, GigaScience, Volume 13, 2024, giae009, https://doi.org/1...
91d190ffc12ff5c1366cb63f7ca004e4da4fef2cb45282ebfcc44907be7edc94
Jupyter
2,314
74
# %% import pickle import pandas as pd from sklearn.metrics import roc_curve, roc_auc_score, accuracy_score, precision_score, recall_score, f1_score import matplotlib.pyplot as plt import joblib # Load the saved model file model = joblib.load(r'H:\model\second_epilepsy\RF_model.pkl') # Read the test dataset data = pd...
bfa4815df2b7947948935a4b193f058ce7c806d52655317a5b9c9f3646c15bd5
Jupyter
2,322
85
# %% import pandas as pd # %% # Load data from xlsx df_1 = pd.read_excel("../../data/protein_inter/GSE102901_TableS1.xlsx", sheet_name=None) # df_2 = pd.read_excel("./data/protein_inter/GSE102901_TableS4.xlsx", sheet_name=None) # Select data from sheet 2 tmp = df_1["Sheet2"][["id1", "id2", "pos1", "mut1", "pos2", "...
0502a8c2455dfe143c46ead6984213d94f7193373de9ccdf47f5e26456ac2087
Jupyter
2,334
43
# %% [markdown] # # Gonzo processing pipeline # # The Gonzo processing pipeline was built and tested on a Linux x86-64 platform. # Although there might be workarounds for MacOS and Windows with virtualization, containers or other compatibility layers such as Rosetta, the instructions assumes you are on a Linux x86-64...
e08c8169b60b2a7a0a20374d506fdd4628881a6df8109e4d76c63dcb6fe7f933
Jupyter
2,347
81
# %% import numpy as np import cv2 from matplotlib import pyplot as plt from skimage.morphology import extrema from skimage.morphology import watershed as skwater # %% def ShowImage(title,img,ctype): plt.figure(figsize=(10, 10)) if ctype=='bgr': b,g,r = cv2.split(img) # get b,g,r rgb_img ...
45b5585c481a35a42b7d7022a674dfa1db96f3c17d7ae376b22b5e1c0e15d09d
Jupyter
2,358
83
# %% [markdown] # ## Compute the azimuth and elevation phase maps # # This is an example for how to compute and plot phase maps and from repetetive stimulation # In this examples there were 10 repeats. # # 1. Compute the fft of each stimulation # 2. To correct for phase delays subtract the phase of stimuli moving in...
24f339ff28db2123c2fa2294114a2a3c838eac97c5a3555e9ec35d4eb7215695
Jupyter
2,367
89
# %% import nibabel as nib import cv2 import numpy as np import src.contextract as ce import matplotlib.pyplot as plt from scipy import optimize import os import pickle import src.contour as con # %% def printcont(cont,load,rgb): #returns 2d np.array in the shape of load with all values equal to zero unless the va...
60c17522d9498ebd242b9d3d6fe9a719a8d2c14968c8c66693de0fbd890847e7
Jupyter
2,367
72
# %% import json import numpy as np import matplotlib.pyplot as plt from neuron_morphology.swc_io import morphology_from_swc # %% [markdown] # ### This notebook will walk through the expected format for surface_and_layers file. This is a required input for generating layer aligned swc files outside of the Allen Instit...
c6b2bf6dae26e7a8465d45988e7b4e4e4812017a94f12ca64951136a5d95030d
Jupyter
2,368
78
# %% import os import json import pandas as pd import numpy as np from utils.setup_paths_and_configs import setup_paths_and_config # %% # Config / paths dataset = 'AIBL' TL = True save = False sampling = "representative" suffix = "_TL" if TL else "" config_path = f"configs/config_{dataset}{suffix}_{sampling}.json" if...
6af4f2cb6adcb30a54796231f3f3bc30aed47300d10253c2ccf66fb6c3f7dc18
Jupyter
2,369
57
# %% [markdown] # # Title of paper # # Author 1<sup>1,2,\*</sup>, Author 2<sup>2,3</sup>, Author 3<sup>1,2</sup> (<sup>1</sup>Heidelberg University, Centre for Organismal Studies (COS), 69120 Heidelberg, Germany <br> <sup>2</sup>Living Systems Institute, University of Exeter, Exeter, EX4 4QD, United Kingdom <br> <sup>...
486927359cc2e8adc0258b53231cfa843c1cbe1df8108e4855be60f39e0788ba
Jupyter
2,389
81
# %% import pickle import warnings import numpy as np import pandas as pd from scipy.stats import pearsonr from sklearn.metrics import r2_score warnings.filterwarnings("ignore") from functools import reduce # %% [markdown] # ### This notebook evalutes the moral relevance and moral polarity scores generated by the fr...
50706c7afcc3f487f331f75cf029f7bf90b3c9f41c03b23871bab5b24079b48d
Jupyter
2,396
63
# %% [markdown] # # STEP 2: 2_preprocess_get_features # %% [markdown] # Press SHIFT + ENTER to run code # %% [markdown] # ### USER INPUT! # %% ## Define project project_name = 'project_ACC_MORPDreadd_Combined' # %% [markdown] # ### Main Code: get features from pose # USER INPUT NEEDED BELOW!!! # WAIT UNTIL CODE FI...
51c856096ffe5f5ff61e781f2be215f246ebd89fa6afeab6455f470ef0c35248
Jupyter
2,396
63
# %% [markdown] # # STEP 2: 2_preprocess_get_features # %% [markdown] # Press SHIFT + ENTER to run code # %% [markdown] # ### USER INPUT! # %% ## Define project project_name = 'project_ACC_MiniscopeSNI_Female' # %% [markdown] # ### Main Code: get features from pose # USER INPUT NEEDED BELOW!!! # WAIT UNTIL CODE FI...
6c8feb7c6daf0bfa9e818c56aecff4e38cd4ba9d62f52fb0dc394fc922b4f29a
Jupyter
2,408
97
# %% import numpy as np import matplotlib.pyplot as plt import os os.environ["OPENCV_IO_ENABLE_OPENEXR"]="1" import cv2 from os.path import join # %% def draw_shape(img_base, type = 'sq'): sizex = int(np.random.random(1)*200) sizey = int(np.random.random(1) * 200) xstart = np.random.choice(range(1000-si...
8c37c91b57c4edc6674cdc5722a65b5ce8085747f755522562b2bc8b057fb177
Jupyter
2,425
86
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Embedding/PyTorch/Advanced/ProtXLNet.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Extracting protein sequences' features ...
511e849925aadd16041cb87bc1a52b3854cc6f9bff1ab40d93fd6beeb6642eb6
Jupyter
2,431
63
# %% [markdown] # # STEP 2: 2_preprocess_get_features # %% [markdown] # Press SHIFT + ENTER to run code # %% [markdown] # ### USER INPUT! # %% ## Define project project_name = 'project_ACC_MiniscopeSNI_3WeekMorphine' # %% [markdown] # ### Main Code: get features from pose # USER INPUT NEEDED BELOW!!! # WAIT UNTIL ...
b1040cd3ed9a92230516a533781b5aea24edb0f8f6b0f6980d4ac6040df082af
Jupyter
2,434
89
# %% [markdown] # <a href="https://colab.research.google.com/github/google-deepmind/hybrid_rnns_reward_learning/blob/main/hybrid_rnns_reward_learning/train_models.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Installs, imports,...
ca366f54a063b51b4d592905fd2c1e7de55da68e4c4f2dce2aa5c5f1d4e8bdb5
Jupyter
2,435
116
# %% from pathlib import Path # %% # brainio_contrib functionality now in brainscore_core.supported_data_standards.brainio # %% from mkgu_packaging.movshon import aperture_correct # %% from brainscore_core.supported_data_standards.brainio import get_stimulus_set, get_assembly # %% from brainscore_core.supported_dat...
2fffd08be417c4c523e1a097f4479987adffb0ff95e15cd6595e39546f32196c
Jupyter
2,436
65
# %% [markdown] # # State-based dFC for voxelwise analysis # # Voxelwise state-based dFC analysis is supported naturally by reshaping data to 2D `(unit, time)` and feeding it into # the same algorithms used for ROI-level analyses. # # - *Units* are voxels (or surface vertices). # - *Time* is the number of volumes / T...
a289c5521e984483e2936d0fad29c54ba6cc3b22b98ad3891e112bcd791e62ec
Jupyter
2,444
82
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Visualization/ProtBert_attention_head_view.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Attention head view for protein s...
aeff8ee9babbce0fd1260e67b5fcd41a0ec48e4e918e8265af2abd4ea6634999
Jupyter
2,446
49
# %% import pandas as pd # %% # Export ST1 df = pd.read_csv('../../stats/02-4layers_qMRIvsST_withendo/Stats_expanded_pathway_analysis_pval_no_SWM.csv') min5 = pd.read_csv('../../processed_data/01-4layers_withendo/paths_to_keep_all.csv', index_col = 0) df = df[df['Unnamed: 0'].isin(min5['pathways_with_min_5_genes'])] ...
c2a6ba3efd84b3c0ddf06fc0bf30e4347ac314ea2c9b111bde0b5c3c814ab85b
Jupyter
2,449
90
# %% [markdown] # # Loading package # [https://docs.scvi-tools.org/en/stable/tutorials/notebooks/multimodal/totalVI.html] # %% import anndata as ad import matplotlib.pyplot as plt import mudata as md import muon import scanpy as sc import scvi import time t = time.time() scvi.settings.seed = 1234 sc.set_figure_param...
cbf3ce89f64a94a0aa0021b71665684de4a925e3de2939d494600dcb90795378
Jupyter
2,453
82
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Visualization/ProtXLNet_attention_head_view.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Attention head view for protein ...
1c61c36688d5ed6e37452d012e88402fd4c0596ccd98ab0994aa6a9d0c8f39ce
Jupyter
2,454
84
# %% [markdown] # # Correction of tissue dielectric properties # # This notebook shows how to perform the correction described in our paper: https://doi.org/10.1016/j.bioelechem.2021.107773 # Here, only grey matter as an exemplary type of tissue is considered. # %% [markdown] # # Load packages # * Load ImpedanceFitte...
a379b8ca2ef9548b653deefaa3f82a266c7197d78912c95f7dbdfb53d7dcaf39
Jupyter
2,462
82
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Visualization/ProtAlbert_attention_head_view.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h3> Attention head view for protein...
88228b9c69711fcb0e2e17e5c67125bb2670cecfcc8da80e40d3a1c3eb890268
Jupyter
2,467
91
# %% options(stringsAsFactors=FALSE) # %% library(data.table) library(cowplot) library(Matrix) library(BuenColors) # %% metrics_pctcells = read.csv('./peaks_frequency_results/metrics/clustering_scores.csv', row.names=1) metrics_pctcells[['cutoff']] = as.numeric(substring(rownames(metrics_pctc...
320da44cc7191c665a1791c004e9182ac4db89bc8861025d1d44eeeb06fa3203
Jupyter
2,473
91
# %% options(stringsAsFactors=FALSE) # %% library(data.table) library(cowplot) library(Matrix) library(BuenColors) # %% metrics_pctcells = read.csv('./peaks_frequency_results/metrics/clustering_scores.csv', row.names=1) metrics_pctcells[['cutoff']] = as.numeric(substring(rownames(metrics_pctc...
a683c660f3ca542621e0b7ec01ecc9391440b540e76d6ab6a2191b0a1716c9a3
Jupyter
2,476
91
# %% options(stringsAsFactors=FALSE) # %% library(data.table) library(cowplot) library(Matrix) library(BuenColors) # %% metrics_pctcells = read.csv('./peaks_frequency_results/metrics/clustering_scores.csv', row.names=1) metrics_pctcells[['cutoff']] = as.numeric(substring(rownames(metrics_pctc...
5840a6e894091f4c43aad978eb28952cee89146aa6f1516b04230d2b67d54318
Jupyter
2,479
80
# %% import pandas as pd import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import copy import pickle import tensorflow as tf import keras from sklearn.utils import Bunch from scikeras.wrappers import KerasRegressor from sklearn.model_selection import cross_validate, KFold from utils.ml import...
fb740f1ad74785c9b8dc09a85a5e2869d389eb98d8e7d7e3b3f569d16a5d6e06
Jupyter
2,482
91
# %% options(stringsAsFactors=FALSE) # %% library(data.table) library(cowplot) library(Matrix) library(BuenColors) # %% metrics_pctcells = read.csv('./peaks_frequency_results/metrics/clustering_scores.csv', row.names=1) metrics_pctcells[['cutoff']] = as.numeric(substring(rownames(metrics_pctc...
0f912ff4cf432cc46bd80ca05418b2031c9ea7def61fde514fbbd6a47a47a3ad
Jupyter
2,483
76
# %% # -*- coding: utf-8 -*- import warnings, joblib, pandas as pd from sklearn.metrics import r2_score, mean_absolute_error, mean_squared_error import lightgbm as lgb warnings.filterwarnings("ignore") # --- Data Loading and Feature Selection --- df = pd.read_csv(CSV_PATH) # Remove non-feature columns df = df.drop(co...
f5f988e6361b826742d7274fdbf603084eb2baee1ad7c0af7cd7c1cda4540352
Jupyter
2,503
66
# %% [markdown] # <a href="https://colab.research.google.com/github/beatLaboratory/TIMBRE/blob/main/extract_data.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # #Importing and downsampling data # # Here we show how the behavioral,...
a1440539b25e0ba3cf2569749693e5eeeea49209be448416ecd249f6e4460273
Jupyter
2,514
118
# %% import os, importlib, sys, time, h5py, itertools # %% import numpy as np from scipy import io, linalg, stats, ndimage, signal from scipy.sparse import diags # %% import matplotlib.pyplot as plt import matplotlib.colorbar as cb # %% import matplotlib.pyplot as plt from matplotlib import rc rc('font',**{'family':...
83d4ce6f2f3b47545b0854b98d9450ec6bd71fa137f92da127e623d8bbb16592
Jupyter
2,517
81
# %% [markdown] # <a href="https://colab.research.google.com/github/agemagician/ProtTrans/blob/master/Embedding/TensorFlow/Advanced/ProtT5-XL-UniRef50.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # ##Important Notes: # 1. ProtT5-X...
dd1ef869e207e8e397bdc1c92588048b74cddcc22f2dd7768b48965b3e439e4e
Jupyter
2,549
78
# %% import os os.chdir('/app/NBT-Classifier/') import glob import random import pandas as pd import numpy as np import openslide from PIL import Image import matplotlib.pyplot as plt import cv2 import json # %% def generate_tissueClsmask(wsi_path=None, anno_pt=None): slide=openslide.OpenSlide(wsi_path) with o...
c602902e5c77375192ed018016eb59f3e0da675b8fb03c06cac1cb91d6d541db
Jupyter
2,557
119
# %% cd '~/hydra/_external/NeuralTraj/' # %% run("startup.m") # %% [markdown] # ## Load data # %% data_dir = '~/hydra/_research/ADA/simulation_SSM'; load(sprintf('%s/data_simulation_11.mat',data_dir)) # %% data_0 = permute(data_0, [3 2 1]); data_1 = permute(data_1, [3 2 1]); # %% size(data_0), size(data_1) # %% n...
7a38639918cfedf1e8aa6e1a401556cf0e8109b2f992e602c629a2eef8bd50ce
Jupyter
2,558
81
# %% [markdown] # # Topoplot # # The [yasa.topoplot](https://yasa-sleep.org/generated/yasa.topoplot.html) function is a wrapper around [mne.viz.plot_topomap](https://mne.tools/stable/generated/mne.viz.plot_topomap.html) function. # %% import yasa import pandas as pd # %% [markdown] # ## Simple example # # Let's cre...
59889769fc7a8c7a1d05c353d10184a1e54b2f5dc8c2944e7828884e3f082316
Jupyter
2,559
92
# %% %%capture --no-stderr %pip install -U langgraph langchain-openai # %% from inference_auth_token import get_access_token from langchain_openai import ChatOpenAI access_token = get_access_token() base_url="https://inference-api.alcf.anl.gov/resource_server/sophia/vllm/v1" model="Qwen/Qwen3-32B" try: llm = Chat...
8ac2711a2c0331d05b0a7031505d892d3bd8d3d9eb24502c2b11887825fafaed
Jupyter
2,567
97
# %% import matplotlib.pyplot as plt from data_loading import load_dataset_gino from deepcardio.utils import plot_tri import torch from deepcardio.losses import LpLoss, H1Loss dltrain, dltest, data_processor = load_dataset_gino( folder_path='../data', train_batch_sizes=[10], test_batch_sizes=[10]) device = 'cuda'...