sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
bd1f3c2e013796d15121faae7545b897996060eb9c962a89df46f3c086660d6c
Jupyter
11,821
254
# %% [markdown] # # Tutorial: Yeast TYE7 bulk calling cards data # %% [markdown] # In this tutorial, we analyze a calling card experiment that mapped the binding of the yeast transcription factor TYE7. The dataset is from [Shively CA, PNAS. (2020)](https://www.pnas.org/doi/10.1073/pnas.1818015116?url_ver=Z39.88-2003&r...
fbd7c401af8d0b8aa1252aa1002a06facb72b6a68afe943aab57073c26018843
Jupyter
11,857
229
# %% [markdown] # # Example # # The following example demonstrates how to the use the `pymatch` package to match [Lending Club Loan Data](https://www.kaggle.com/wendykan/lending-club-loan-data). Follow the link to download the dataset from Kaggle (you'll have to create an account, it's fast and free!). # # Here we ma...
8279ea5b052ef3f8b4279938cbfdf8b7540871e07ce9b28339ecbf732f3d6da9
Jupyter
11,911
246
# %% [markdown] # # XGBOOST parameter exploration # This notebook is a template for finding the XGBOOST model best suited for your needs # %% import os import matplotlib.pyplot as plt import numpy as np from xgboost import XGBClassifier import sys parent_dir=os.path.dirname(os.getcwd()) sys.path.insert(0,parent_dir ) ...
3372c1d58c0fed5a73de0b71314a80e36ec7db16208ce4d50714bed576f25751
Jupyter
11,984
492
# %% [markdown] # Don't forget to run IRkernel::installspec() in R in order to let the jupyter recongize the R kernel before running the notebook. # %% [markdown] # ## Visualisation of HTODemux result # %% library(data.table) library(plyr) library(Seurat) library(ggplot2) library(repr) library(stringr) # %% # Use M...
f2554eb0f2eafc7034c0eacb9aa8b85a2fb1339104a253f2f662ffff7a090b16
Jupyter
12,007
299
# %% [markdown] # # PCGrimAge # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#Load-weights-...
cb640ef189efbf6e2bf95bbc9aeb88ae16145e3c2f8e9dca3059ea797c1c6cff
Jupyter
12,022
342
# %% [markdown] # # LP Sweep Results — Pixel Error vs Ensemble Std Dev # %% from pathlib import Path import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns # %% [markdown] # ## Utility functions # %% def standardize_scorer_level(df, new_scorer="standard_scorer"): """Normali...
08dca95aa969cc790ef8afa8b1268409839081585946cf0c741a4bf4be6dc51c
Jupyter
12,037
320
# %% from matplotlib import pyplot as plt from matplotlib import rc rc('font',**{'family':'sans-serif','sans-serif':['Arial']}) rc('text', usetex=False) import scipy.stats as stats from sklearn.preprocessing import minmax_scale from pymer4.models import Lmer, Lm from statsmodels.tsa.ar_model import AutoReg import seabo...
005ae182196f2bbd11f53536b43fa5a3a2c7b84cc80fe378e9214c0348a1ad19
Jupyter
12,043
261
# %% [markdown] # ## Part1. Compare GNNs # %% import os import pandas as pd import numpy as np from hgnn.load_data import load_data from hgnn.features import Graph_smiles from hgnn.trainers import train_gnn from hgnn.model import HGNNPredictor from contrast_gnns.GraphVAE import * from contrast_gnns.GraphTransformers ...
27ef2e7146cc7ae679af2e1d7d08ce27e76c14f26e8ade7c6ef6d327ba901c7e
Jupyter
12,081
300
# %% #%% Transitive Inference - Single model analysis ######################### from __future__ import division import numpy as np import task_train_test as tk import nn_models as nm import nn_analyses as nna import ti_functions as ti import postproc as pp datadir ...
bb2813ed08e939ce9a3cb9b3e6577beaa32ec9fc5e0a6bffe5fd985d5e52c830
Jupyter
12,099
288
# %% [markdown] # [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/PTB-MR/mrpro/blob/main/examples/notebooks/pgd_wavelet_reconstruction.ipynb) # %% import importlib if not importlib.util.find_spec('mrpro'): %pip install mrpro[notebooks] # %% [m...
cac358c4162b164f22d611a413af88c7b55f9b02ce308d0554f4cd882ddc8c12
Jupyter
12,232
279
# %% library('officer') library('R.matlab') library(dplyr) # %% [markdown] # # Read in data # %% data=read.csv('/dagher/dagher11/filip/MAPT_OB//data/dataset_excluded_nooutlierdexclusions.csv', header=T, quote='"') # %% results=matrix(ncol=6,nrow=length(c( grep('thickness_of',colnam...
2c78648854cbdb6c33f69ef44a601ceec3cd0cf4702febf9731e781d129a6cf2
Jupyter
12,336
370
# %% !{sys.executable} -m pip install seaborn # %% import scipy as sp import scipy.io import os import numpy as np import pandas as pd import glob import csv import random as rand from tqdm import tnrange, tqdm_notebook from collections import Iterable import matplotlib.pylab as plt import random as rand from ipywidge...
5b6e19f90450e87ccd85e512e06a1d629a19b759d754dce710661f86fbcc6475
Jupyter
12,370
296
# %% [markdown] # # `StratifiedGOAnalysis` class # - this class undertakes analyses related to GO # - this class calls wrapper functions (`gprofiler` and `get_go` in `tools/_go.py`) that calls R pkgs such as `AnnotationDBi` and `gprofiler2` from python env (See **Appendix** for details). # %% from tools import Stratif...
e9b500264c8c0293f180406c265ec293ce4eded37ce2857fd670567d67a20ad2
Jupyter
12,425
398
# %% [markdown] # [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/lucascamillomd/pyaging/blob/main/tutorials/tutorial_dnam.ipynb) [![Open In nbviewer](https://img.shields.io/badge/View%20in-nbviewer-orange)](https://nbviewer.jupyter.org/github/lucasc...
c2e1c9592889ba4069967300fd685bf377ef47031d0fb8d78f642e86cb7a65e4
Jupyter
12,458
260
# %% [markdown] # # GrimAge2 # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#Load-weights-i...
0cbfa9d3bb2945e36571f612edd60b4cfa2c2679295c352e18550664a42fa6ad
Jupyter
12,544
338
# %% [markdown] # # Library # %% # My library from molgraph.dataset import * from molgraph.testingconsensus import * from molgraph.visualize import * from molgraph.interpret import * from molgraph.experiment import * # General library import numpy as np import pandas as pd import scipy as sp import os # pytorch import...
018ff6a4642f0ec272967fd0846335bc025c7800832e966ac107967d8cabb97e
Jupyter
12,557
219
# %% [markdown] # # Running EVcouplings pipeline jobs # # # ------ # # ## Content # # This notebook demonstrates how to run EVcouplings jobs, and covers the following topics: # # (1) __Configuration files__: how to setup and specify settings # # (2) __Running jobs__: executing the config file (via the EVcouplings...
364b63b9ba0fb31e8c21614859384c10a18146c9e28c16a9ecd9b0e3f7660d66
Jupyter
12,655
335
# %% import os.path as op from glob import glob import gzip import pickle import matplotlib.pyplot as plt import nibabel as nib import numpy as np # from utils import plot_gradient, plot_subcortical_gradient, plot_meta_maps # %% result_dir = op.abspath("../results") data_dir = op.abspath("../data") output_dir = op.j...
20ba1b32d3febc9d8dbd71389b6dee67efb6a26275f2d8e1173b9c39b94a6558
Jupyter
12,656
464
# %% [markdown] # # Setup # %% # from google.colab import drive # drive.mount('/content/drive') # %% !pip install pandas numpy jax sklearn selfies rdkit exmol kdeepensemble tqdm padelpy pyyaml h5py !pip install -q tensorflowjs !nvidia-smi # %% # regular libraries import pandas as pd import numpy as np import os # M...
c6c93381694a81ca49e98bd77a2292c6e7353bce9270a0051200d4ea179ac541
Jupyter
12,770
416
# %% [markdown] # ### Check GPU hardware # %% !nvidia-smi # %% [markdown] # ### Download datasets and embeddings # %% !wget https://raw.githubusercontent.com/anhvt00/MCAPS/master/data/Independent-testsets/multi-species/dict.tsv !wget https://raw.githubusercontent.com/anhvt00/MCAPS/master/data/Independent-testsets/mu...
072f81622470c75b3720481e748387e55e83e7a250b4b0e7a4492a107ea5a808
Jupyter
12,857
362
# %% import matplotlib %matplotlib inline import numpy as np import matplotlib.pyplot as plt from helper import * from tqdm import tqdm_notebook import brainconn as bc import pandas as pd import seaborn as sns import nilearn.plotting as plotting import palettable as pal import matplotlib.colors as mcolors import matpl...
e1619978fde9e7312dfc1fcefec3d89d40b35155098217eaae8a35acc59ece8c
Jupyter
12,894
356
# %% import scipy as sp import scipy.io import os import numpy as np import pandas as pd import glob import csv import random as rand from tqdm import tnrange, tqdm_notebook from collections import Iterable import matplotlib.pylab as plt import random as rand from ipywidgets import * from scipy import stats import impo...
c5517afb1a47d492e5ae74088b8a5fa10e701c7ddc7bede2fb118f352e130f64
Jupyter
12,942
369
# %% [markdown] # # KDMAge # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#Load-weights-int...
6ac82571ef954496c160f839ac630b5d6eb4e4e0dc7fc07675beef5f36f83f6c
Jupyter
12,948
300
# %% [markdown] # This notebook illustrates how to compute the Imbalance Gain measure described in "Robust inference of causality in high-dimensional dynamical processes from the Information Imbalance of distance ranks" (V. Del Tatto, G. Fortunato, D. Bueti, A. Laio, https://arxiv.org/abs/2305.10817), using the illustr...
f4638cf44e248f3cc844200f4997a8f11dde680c07db6fffdbaae658d2310f54
Jupyter
12,972
327
# %% [markdown] # # Exporting calcium dynamics associated with epileptiform activity # Below are definitions of values in each of the output tables # # ## Cell Output Table # # - IIS_corr: r value, IIS amplitude vs. calcium change # - HFO_corr: r value, HFO amplitude vs. calcium change # - IIS_ave: Average calcium ch...
c1b757bac6d6271e1dac3014aa807b5544762a5782943d8ad0364c7f1012262b
Jupyter
13,048
307
# %% import numpy as np import sys import os import pandas as pd sys.path.append('../../') from script.Model_run import Speech_analysis # %% def monkey_patch_openpyxl(): '''Openpyxl has a bug with workbooks that have wrong cell styling information. Monkey patch the library so it can handle these types of work...
578daaaf0fc648539b1379aeee6f17eaf3c24f1f378d1111e7339bca710dcc9c
Jupyter
13,069
431
# %% [markdown] # # Library # %% # My library from molgraph.graphmodel import * import pickle import numpy as np import pandas as pd import scipy.stats import seaborn as sns import matplotlib.pyplot as plt from matplotlib.pyplot import figure from tqdm import tqdm import os # %% [markdown] # # SINGLE # %% # Load mo...
87921e28bd29cdb1eebe2d81bacd9bee3e160c17b5fbf3f10245f75564e3fefa
Jupyter
13,087
358
# %% import dask from dask.diagnostics import ProgressBar from dask.distributed import Client # %% import scipy as sp import scipy.io import os import numpy as np import pandas as pd import glob import csv import random as rand from tqdm import tnrange, tqdm_notebook from collections import Iterable import matplotlib....
1097824a3297cefc0085956d8aa85d92d880289691b927f5dad2baaa4bb6a359
Jupyter
13,150
340
# %% # finding mirror-symmetric units in trained/untrained networks # useful packages: import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import warnings warnings.filterwarnings("ignore") import matplotlib.gridspec as gridspec import torchlens as tl %matplotlib inline import matplotlib.patheffe...
bade82473abd29391b2624afcd783e7deee4dc7bd223374bac7aa130698b4756
Jupyter
13,341
402
# %% [markdown] # # Gene analysis # %% [markdown] # ## Get genetics data # %% import abagen atlas = abagen.fetch_desikan_killiany() # %% files = abagen.fetch_microarray(data_dir='/dagher/dagher9/filip/', donors='all', verbose=0) # %% expression_DKT = abagen.get_expression_data('/dagher/dagher11/filip/Downloads/OASI...
d203027ab30e00f92afa45613984bd399851fb0c3441e4136651a7690ff8ed22
Jupyter
13,393
512
# %% [markdown] # # **High-Dimensional Diffusion MRI Reconstruction Tutorial** # # ### Introduction: # # * High-dimensional MRI (HD-MRI) refers to the acquisition of more than 2D imaging data; # * Typical examples are dynamic MRI, quantitative parameter mapping, and **diffusion MRI**. # # # * This notebook # ...
e61cdc86e25d245c6fc55d64ce41de2483303b0bdeb315feff4f0b6b5e48c05c
Jupyter
13,420
286
# %% [markdown] # # A sinusoidal weight matrix can be learned by Oja's rule when forcing a sinusoidal input # # ## Fixing the activity and running the weight updates # %% import numpy as np import numpy.lib.stride_tricks import matplotlib.pyplot as plt import matplotlib import scipy.linalg import matplotlib.scale plt...
021ae7f6848471ba2438f4f44ff0dac2104c7c033f033eac6eb4809d7b56bcd7
Jupyter
13,503
413
# %% """Plot MED OFF vs. ON power (Figure 2).""" import os import sys from pathlib import Path import numpy as np import copy import pandas as pd import pte_stats import pte_decode from matplotlib import pyplot as plt from scipy.stats import sem from matplotlib import pyplot as plt from matplotlib.colors import Linear...
eafec5ca79971de7ebcdd79af103a67a0455c12649fcea3399f416873871667d
Jupyter
13,553
371
# %% [markdown] # (line)= # # # Fitting a model to data # # If you're reading this right now then you're probably interested in using # emcee to fit a model to some noisy data. # On this page, I'll demonstrate how you might do this in the simplest # non-trivial model that I could think of: fitting a line to data when...
5706c43fccf5390caa85e10e5e8106912f8496ac9027fb4a20a85545891e4130
Jupyter
13,577
441
# %% import igraph as ig import numpy as np import multiprocessing as mp from sklearn.metrics import jaccard_score from scipy.sparse import csr_matrix, coo_matrix, csc_matrix import ipywidgets as widgets from ipywidgets import interact import seaborn as sns # %% # Core scverse libraries import scanpy as sc import annd...
e9983d0edea8875253b88ce40776f097a210073f6a10ae360ae4e6634df8f992
Jupyter
13,662
282
# %% [markdown] # [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/PTB-MR/mrpro/blob/main/examples/notebooks/motion_corrected_reconstruction.ipynb) # %% import importlib if not importlib.util.find_spec('mrpro'): %pip install mrpro[notebooks] # ...
bfb683f77366e7ff4351cc8ff8ccd810c5f4e36c8110987e4ca56f0180c679e1
Jupyter
13,712
430
# %% # CIFAR10 dataset, digit recognition import torch import torchvision from torchvision import transforms, utils import numpy as np from torch.utils.data.sampler import SubsetRandomSampler import matplotlib.pyplot as plt import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from matplotli...
043a6ec19406b5a1fedc57d4c8e7d3be3475ef38bb166ec7c5b83434ddd98a25
Jupyter
13,716
435
# %% # SVHN dataset, digit recognition import torch import torchvision from torchvision import transforms, utils import numpy as np from torch.utils.data.sampler import SubsetRandomSampler import matplotlib.pyplot as plt import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from matplotlib i...
b99d7f1835cb0fd41ed34532af1cfbe7683f39b125b2482c30df61c2db84bd3f
Jupyter
13,816
360
# %% import matplotlib.pyplot as plt from msmfcode.core.config import * from msmfcode.evaluation.plot import plot_error from msmfcode.evaluation.data import load_experimental_data, load_experimental_config from msmfcode.models.cann import DMSMF, FMSMF, Grid, SSSF plt.rcParams.update({'font.size': 21}) plt.rcParams['te...
01256a4ca4f79a6b9c599ed56a1b1264575c2ebf9090dd7a999cd070e0ca041b
Jupyter
13,817
287
# %% [markdown] # <a href="https://colab.research.google.com/github/seanrjohnson/esmologs/blob/main/notebooks/Data_analysis.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Sensitive remote homology search by local alignment of sm...
5e29fdee027ba0f125029981a8e744107c2f6a02cd49e1f6590b1f91cf4f6af2
Jupyter
13,818
320
# %% [markdown] # # Vacuole Volumetry Analysis (WebKnossos .stl export) # This notebook reads .stl files downloaded from WebKnossos and performs data visualization and hyptothesis testing for the presence and distribution of neurodegenerative vacuoles. # # Before you begin, organize the .stl files as follows - # # ...
b4e72be2c35f95500e2f184ad915d2eb5555146cca24dc050660a889a87be568
Jupyter
13,860
335
# %% import pandas as pd import seaborn as sns import numpy as np import matplotlib.pyplot as plt import math from sklearn.metrics import roc_curve, auc, RocCurveDisplay, precision_recall_curve, PrecisionRecallDisplay import matplotlib as mpl from IPython import display from collections import OrderedDict from pathlib ...
ae5d977b29dd1533d2ab5102168ba70db45e384c05ad94567cdb517ad08aa229
Jupyter
13,867
321
# %% [markdown] # ## **SIMS Tutorial** # In this tutorial, we will walk through the [SIMS (Scalable, Interpretable Machine Learning for Single Cell)](https://www.cell.com/cell-genomics/fulltext/S2666-979X(24)00165-4) pipeline step by step. SIMS is a deep learning-based tool built on TabNet, a transformer-based model op...
33f01bd670597979a2bef78c0c2abdc08a1d4568d7e345c5d1aaccecda0797bd
Jupyter
13,876
490
# %% [markdown] # ## This notebook is used to generate the finalized version of the classifier, to simply feature transformation into the final form, and to test that the results are the same # # Most of the code comes from operational_classifier. # %% import pandas as pd import numpy as np import pickle import sys #...
1890f341a421d77fdea6faad4c72e5ee663402f9091a4ea9dbde5c0f00448cd3
Jupyter
13,909
204
# %% #hide from rxn_yields.core import * # %% [markdown] # # Predicting Chemical Reaction Yields # # > Predicting the yield of a chemical reaction from a reaction SMILES using Transformers # %% [markdown] # Artificial intelligence is driving one of the most important revolutions in organic chemistry. Multiple platfo...
91cdb76efa414ee166d52790e7a5dc55db2491613f5cf556268ea87ee37e43af
Jupyter
13,932
477
# %% [markdown] # # Auxiliary Notebook: Ramping cell analysis # # Determination of ramping status for individual astrocytes. # %% [markdown] # --- # %% [markdown] # ## Setup # %% [markdown] # #### Imports # %% # Others from pathlib import Path from tqdm import tqdm import numpy as np import pandas as pd import ...
ba67392de5096b4ae272eef9c397e9c1d6e5a4c982cb7ed12e3a5c092af7857d
Jupyter
13,953
369
# %% [markdown] # # Crossmodal project: Figure 2 # %% import scipy as sp import scipy.io import os import numpy as np import pandas as pd import glob import csv import random as rand from tqdm import tnrange, tqdm_notebook from collections import Iterable import matplotlib.pylab as mpl import random as rand from ipywi...
0fe4888d62d7a3e63614b47a2a733901ee4f2d596c00b78afbf76be7b76e6435
Jupyter
13,961
351
# %% [markdown] # # PhenoAgeSaoPaulo # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#Load-w...
86e63caaa002f629ad12f9f6c6cce9bb85a53ee3668fbf2228b11ae47c7042f0
Jupyter
14,018
575
# %% [markdown] # This notebook analyzes replicate 1 for the cell-fitness assay for KCNE1. # The sort was done # # The sequencing project was 7704 # %% cd /scratch2/glazeram/7704-AG/ # %% setwd("/scratch2/glazeram/7704-AG/") library(data.table) library(dplyr) library(ggplot2) library(tidyr) library(RColorBrewer) l...
ecc2ed5a7c924e44d0641e43fd8ee9d48bc3af29126295bc51104393bea570d4
Jupyter
14,059
336
# %% [markdown] # # Getting started with longitudinal normative modelling # # A normative model tells you where a single scan sits relative to a reference population (a z-score). With two or more visits per subject, we can ask a further question: # # > Did this subject change *more than expected* between visits? # #...
7db16cea3b50b8884464ceb7d6e1edc799ebc12289c4ff0b24d52c2e51fae036
Jupyter
14,093
392
# %% #!/usr/bin/env python3 # -*- coding: utf-8 -*- import pandas as pd import numpy as np from sklearn.preprocessing import StandardScaler import matplotlib.pyplot as plt import seaborn as sns from import_dataset import import_dataset, import_UKB_subs, dataset_to_data from nilearn.input_data import NiftiLabelsMasker i...
78d9d7faad943f3a3b9d0c4a70add20ae716a9de4fd3fb001a55f32fb2299f85
Jupyter
14,105
370
# %% [markdown] # # Netherlands Neurogenetics Database # Author: Nienke Mekkes <br> # Date: 21-Sep-2022. <br> # Correspond: n.j.mekkes@umcg.nl <br> # # ## Script: clinical history labeled training data: cleaning & exploration # Objectives: load and clean training data, do some basic data exploration # # # ### Input ...
f3ece65146afe11424dff7da25a585930ac9d58944c634600a9543ce5b4efea7
Jupyter
14,218
328
# %% import nibabel as nib from neuromaps.datasets import available_annotations from neuromaps import datasets from neuromaps.resampling import resample_images from neuromaps import parcellate from nilearn.datasets import fetch_atlas_surf_destrieux from neuromaps import datasets, images, nulls, resampling, plotting fro...
f917fd5f23777abe60628257bf270523489ea59feb82fc437344093d776c6606
Jupyter
14,288
331
# %% [markdown] # # Training with MJLab (MuJoCo Warp) and rl_games # # [MJLab](https://github.com/mujocolab/mjlab) provides Isaac Lab's manager-based task API # on top of MuJoCo Warp — GPU-parallel robotics environments with no Isaac Sim dependency. # rl_games ships a native wrapper (`env_name: mjlab_*`), shipped conf...
6433cee950ed1a76663124b39f87dad98fffd10f068010d169426a62f9410a2a
Jupyter
14,330
276
# %% [markdown] # # dPFT (DDR-based Pulmonary Function Test) Tutorial # # This tutorial is to preprocess a dicom file of DXR acquired images, and run SLEAP-based tracking # # dPFT is built to work with mp4s. There are ways to convert from dicom or AVI to mp4. Depending on your data/DXR machine, there might be convers...
77043003aa50a09df50f8768314a78c4eb40b90d3e197f1c2cfe0d7e129c1bc3
Jupyter
14,338
450
# %% # asymSVHN dataset, digit recognition import torch import torchvision from torchvision import transforms, utils, datasets import numpy as np from torch.utils.data.sampler import SubsetRandomSampler import matplotlib.pyplot as plt import torch.nn as nn import torch.optim as optim import torch.nn.functional as F fro...
1c6dfe603c1097298b176bf06ab080fb2e297dbc58cec2b79f8d1132689e9cb4
Jupyter
14,353
353
# %% [markdown] # In this notebook we will demonstrate some more advanced visualizations of MiniSom results. # %% from minisom import MiniSom # %% [markdown] # For this example we will again load the <a href="https://archive.ics.uci.edu/ml/datasets/seeds">seeds</a> dataset dataset using pandas: # %% import pandas as...
4a2fe1cbbc13e10bf8d61d3f3794972f4ad1856c0b39e1f0bca24ccac9bef8a4
Jupyter
14,412
455
# %% [markdown] # ## MODEL - Simulating Cavity Expansion for *Alasaadi et al.* # %% [markdown] # ### Notes # # - **Model** # - Use `simple_cell_sim` particle modeling engine to simulate cavity expansion and its effect on surrounding cells # - Place cells in ring-shaped band around a single large central "cell...
f981d6e5a9d2e89e5653507fc6c38a462fa0c33e325faed22af4bb88336fe196
Jupyter
14,727
469
# %% # symSVHN dataset, digit recognition import torch import torchvision from torchvision import transforms, utils import numpy as np from torch.utils.data.sampler import SubsetRandomSampler import matplotlib.pyplot as plt import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from matplotli...
dbd51ce071e150fc8ed9dd6ec81054b1ec5fa314e1789f8baafae88b166308ec
Jupyter
14,798
353
# %% """Plot time delay estimates (Figure 3D).""" import os import sys from pathlib import Path import numpy as np import copy import pandas as pd from matplotlib import pyplot as plt import pte_stats import pte_decode from scipy.stats import sem from scipy.signal import find_peaks cd_path = Path(os.getcwd()).absolut...
329f0a651ea9cc131a8a96dc1d2e765fc16f19a313a515d7217f7e68ac0fdb4c
Jupyter
14,811
353
# %% """Plot time delay estimates (Figure 3D).""" import os import sys from pathlib import Path import numpy as np import copy import pandas as pd from matplotlib import pyplot as plt import pte_stats import pte_decode from scipy.stats import sem from scipy.signal import find_peaks cd_path = Path(os.getcwd()).absolut...
0596240c12a512c08cd50667a8829c2fd596d0beb414965001b0be886dcb7323
Jupyter
14,905
466
# %% import numpy as np import torch from pytorch_lightning import Trainer from torch.distributions import normal from rgan.utils import trunc_normal_, TorchStandardScaler, \ SamplesDataset, NormToBoundsScaler, \ MechanisticModel from rgan.rgan import rGAN, defaultNetsRG...
dffff7525f6de622852f139821adabd7153d1127254e634ad7997765cae440a4
Jupyter
15,057
295
# %% [markdown] # # Tutorial: K562 HCT116 SP1 single-cell calling cards data. # %% [markdown] # In this tutorial, we will analyze the binding of the transcription factor Sp1 in K562 and HCT116 cell lines. These data are generated using single-cell calling cards (scCCs). The data is from [Moudgil et al., Cell. (2020)]...
64741dea92ba6690433d947baa0c4c5fb2ea8891c037ade425abf8b368412da7
Jupyter
15,078
471
# %% import numpy as np import torch from pytorch_lightning import Trainer from torch.distributions import normal from rgan.utils import trunc_normal_, TorchStandardScaler, \ SamplesDataset, NormToTransformedBetaScaler, \ MechanisticModel from rgan.rgan import rGAN, defa...
6a8555171dd87534a1ac457d9bd7709e3e9e81302a219241118b832c6685610e
Jupyter
15,282
420
# %% import scipy as sp import scipy.io from scipy import stats import os import numpy as np import pandas as pd import glob from sklearn.metrics import roc_curve, auc import matplotlib.pylab as mpl from matplotlib import gridspec import matplotlib.patches as patches import sys sys.path.append(os.getcwd()+'\\..') from...
f922e6d76943376204de2230ad911171f807fc56dc61bed439bd23f9a9c96ee4
Jupyter
15,285
435
# %% import warnings warnings.filterwarnings("ignore") import ipywidgets as widgets from ipywidgets import interactive from fmriprep_denoise.visualization import utils path_root = utils.repo2data_path() / "denoise-metrics" strategy_order = list(utils.GRID_LOCATION.values()) group_order = { "ds000228": ["adult"...
b1e71d5d6c2571d73e182e82a0fb0339457302c1b8e49b883c9573a7586478df
Jupyter
15,345
433
# %% """Example for plotting gradient data""" import os.path as op from glob import glob import pickle import numpy as np import matplotlib.image as mpimg from matplotlib.gridspec import GridSpec import matplotlib.pyplot as plt from nibabel import GiftiImage from nibabel.gifti import GiftiDataArray from surfplot.utils...
89fbcf31db8a96494271b750175d48b75589248ede17a70ddc4917c9c165f22d
Jupyter
15,376
341
# %% [markdown] # ## Example use of `chromosight quantify` # # In this notebook, we demonstrate how `chromosight quantify` can be used to compare chromatin loops between _S. cerevisiae_ cultures arrested in G1 phase vs metaphase. In this notebook, we re-analyse Hi-C data from [Garcia-Luis, J., Lazar-Stefanita, L., Gut...
8372c9c9cbe50b3d7601c28b53d0fc86a53bfccd0cc4f8efd14567b766568c35
Jupyter
15,550
406
# %% import scipy as sp import scipy.io import os import numpy as np import pandas as pd import glob import csv import random as rand from tqdm import tnrange, tqdm_notebook from collections import Iterable import matplotlib.pylab as mpl import random as rand from ipywidgets import * import colorlover as cl from scipy ...
09c46f15f36c370fb274eadba19d6bf23c1cf5eb1333760787b1a89f527a5114
Jupyter
15,617
361
# %% [markdown] # [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Denys88/rl_games/blob/master/notebooks/mjlab_training_colab.ipynb) # # # MJLab (MuJoCo Warp) + rl_games # # Trains a **Unitree Go1 flat-terrain velocity policy** end-to-end on the Co...
a08e001db616218ca42203f5237bead9286286782e78c5d6528df2809c2979bf
Jupyter
15,627
387
# %% # Copyright (c) 2012-2023, NECOTIS # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # - Redistributions of source code must retain the above copyright notice, # this list of conditions a...
7ee02263eaebcefa9f6b015224f710d0ca0bdfbb6c8481f0165e77418a5a7ce6
Jupyter
15,648
582
# %% [markdown] # # Fig. 4B # # Ext. Data Figs. 4A, 4B # ## Population-level mark differences # # For "Network-level encoding of local neurotransmitters in cortical astrocytes" (Cahill et al. 2024) # %% [markdown] # --- # %% [markdown] # ## Setup # %% [markdown] # #### Imports # %% # Typing from typing import ( ...
48a1dc471625fff02df0a2069beca00158f5cc8383f8bfb569d38801b88d4620
Jupyter
15,684
391
# %% # Copyright (c) 2012-2023, NECOTIS # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # - Redistributions of source code must retain the above copyright notice, # this list of conditions a...
19ab19344e5be8d2a48f5fd1f58433ba854efe67c8e87ab97827272006e1a457
Jupyter
15,768
395
# %% import scipy as sp import scipy.io import os import numpy as np import pandas as pd import glob import csv import random as rand from tqdm import tnrange, tqdm_notebook from collections import Iterable import matplotlib.pylab as plt import random as rand from ipywidgets import * from scipy import stats import impo...
595a7b6f9dbfdf40ead851ea4d607482374a877b69778414144e7d65eb94be70
Jupyter
15,782
387
# %% import torch import torchvision import os from torch.utils.data import DataLoader, Dataset, TensorDataset from PIL import Image, ImageOps import numpy as np import shutil import random from pathlib import Path import albumentations as A import cv2 from scipy.stats import norm, skewnorm import skimage # %% def lis...
6bec68828275d82d41a614c94a979313231a7d841014512c48190271e7ae0d6f
Jupyter
15,817
499
# %% [markdown] # # Classification results visualization # %% [markdown] # Import packages # %% import io import mne import copy import glob import array import matplotlib import numpy as np import pandas as pd import sklearn.metrics import seaborn as sns import scipy.io as sio import plotly.express as px import matp...
e4d0141491db6f3ac5f9a92a0eac64639dc3c12faa39ae18583f1095960b422f
Jupyter
15,874
427
# %% [markdown] # # Crossmodal project: Figure 2 # %% import scipy as sp import scipy.io import os import numpy as np import pandas as pd import glob import csv import random as rand from tqdm import tnrange, tqdm_notebook from collections import Iterable import matplotlib.pylab as mpl import random as rand from ipywi...
d4c48478537effbdf1baea6d2c09d31ab7b1a48eb07835999e5be23878f0acca
Jupyter
15,910
416
# %% #!pip install ipywidgets #!jupyter nbextension enable --py widgetsnbextension import scipy as sp import scipy.io import scipy.stats import os import numpy as np import pandas as pd import glob import csv import random as rand from tqdm import tnrange, tqdm_notebook import cmocean import matplotlib.patches as patc...
91ff6c1b01409b2e796b0042f53aadf39f9ac1d9e82bbcbc28b38ed7afceebe0
Jupyter
16,080
259
# %% [markdown] # # Tutorial: Brd4 bindings for Male/Female mouse bulk calling cards data. # %% [markdown] # We will analyze bulk calling cards datasets from [Kfoury et al., PNAS. (2021)](https://www.pnas.org/doi/10.1073/pnas.2017148118), which can be downloaded from [GEO](https://www.ncbi.nlm.nih.gov/geo/query/acc....
22e74bc858c6ee2466b9bae94fd9cbaac79ade77587edb7524b222cdab32371a
Jupyter
16,122
519
# %% library(data.table) library(plyr) library(dplyr) library(Seurat) library(ggplot2) library(repr) library(stringr) # %% library(extrafont) font_import(paths = "/Library/Fonts", prompt = FALSE) loadfonts() fonts() # %% plot_theme <- function() { theme_bw() + theme( panel.border = element_blank(), ...
4351033578bbbed23be9d285c3ac5bfccf2d5d788cfc6d53323b8f0327ebce2a
Jupyter
16,148
393
# %% import torch import torchvision import os from torch.utils.data import DataLoader, Dataset, TensorDataset from PIL import Image, ImageOps import numpy as np import shutil import random from pathlib import Path import albumentations as A import cv2 from scipy.stats import norm, skewnorm import skimage # %% def lis...
2ceffc5f218360affcb7f788f50f3b92581d8df1f3ae019f6f9036c503e89e8b
Jupyter
16,295
341
# %% [markdown] # ## Part2. Compare Taste Predictors # %% import numpy as np import pandas as pd import matplotlib.pyplot as plt import os PWD = os.path.abspath('.')+'/' print(PWD) # %% bs_train_path = os.path.join(PWD, 'dataset/taste_dataset/bitter_sweet/bs_train.csv') bn_train_path = os.path.join(PWD, 'dataset/tas...
87bacb3d84f6bee584b5a487d0a16082f4e0740015567f4f5289b519c72a50a7
Jupyter
16,307
415
# %% import scipy as sp import scipy.io import os import numpy as np import pandas as pd import glob import csv import random as rand from tqdm import tnrange, tqdm_notebook from collections import Iterable import matplotlib.pylab as plt import matplotlib as mpl import random as rand from ipywidgets import * import col...
e0c8183df59b666ec44488ed9c9869bbfb6c7807f4c42a82cccd24c40fef0bcf
Jupyter
16,358
398
# %% import torch import torchvision import os from torch.utils.data import DataLoader, Dataset, TensorDataset from PIL import Image, ImageOps import numpy as np import shutil import random from pathlib import Path import albumentations as A import cv2 from scipy.stats import norm, skewnorm import skimage # %% def lis...
a9d9745b5017ef9da67c6d0492a20ac8da1c233c5348e119b87e04718cef66d4
Jupyter
16,359
399
# %% import torch import torchvision import os from torch.utils.data import DataLoader, Dataset, TensorDataset from PIL import Image, ImageOps import numpy as np import shutil import random from pathlib import Path import albumentations as A import cv2 from scipy.stats import norm, skewnorm import skimage # %% def lis...
11fd0f36e3fc76ee3bc4694d3b061d9ecc006403099cdadaf5a4d4e484919054
Jupyter
16,443
447
# %% [markdown] # # SystemsAgeLung # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#Load-wei...
cbceb9a128e26c47abe2a4d83940befcca6022beaa349c333de4b54c887f1dc3
Jupyter
16,443
447
# %% [markdown] # # SystemsAgeBlood # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#Load-we...
ec280c61117534d44ba1616d766694663de0d740c4a1c4790bdafab9b5a12543
Jupyter
16,444
447
# %% [markdown] # # SystemsAgeLiver # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#Load-we...
a30e74da2659f78b8ada6fedbfe6cc2760fe7f93237a563d461519521333c826
Jupyter
16,445
447
# %% [markdown] # # SystemsAgeKidney # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#Load-w...
22be2aab9f3a5f811fe86f33b88d584d7092a09191dbf50ec0a29667a7f1e1d1
Jupyter
16,447
447
# %% [markdown] # # SystemsAgeImmune # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#Load-w...
888e5bf99201d0370e6aadc40f8dfc709015c13fe59d49ee39efc95fe2b565af
Jupyter
16,456
447
# %% [markdown] # # SystemsAge # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#Load-weights...
403f5bf5835b3a1f170d150a0c452d477628b01fc493c5f5039986718cdeee96
Jupyter
16,458
447
# %% [markdown] # # SystemsAgeHormone # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#Load-...
89ec25e09fefd8b043d55b5618aadb4e0ed9f8975a5f191f0937c4fc04b3cfbe
Jupyter
16,458
447
# %% [markdown] # # SystemsAgeHeart # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#Load-we...
eb3350d33b8d82608b4f459a1812e3fc16cbb66911d8cee0c751088f2e55920b
Jupyter
16,458
447
# %% [markdown] # # SystemsAgeBrain # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#Load-we...
9327d59d20008278927f66feb6fbacb61d7231e959e6a83cd9944e5e3ce47917
Jupyter
16,468
447
# %% [markdown] # # SystemsAgeMetabolic # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#Loa...
b6d3151426b38a981639385fc62964dbda9b7e5dacd70e9ac78839aaa2cf26a7
Jupyter
16,482
447
# %% [markdown] # # SystemsAgeInflammation # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model](#...
41eb0aefcb7693fb04bf2f5543b41861b618474ccaa635eda95428797fc9fcfd
Jupyter
16,527
447
# %% [markdown] # # SystemsAgeMusculoSkeletal # %% [markdown] # ## Index # 1. [Instantiate model class](#Instantiate-model-class) # 2. [Define clock metadata](#Define-clock-metadata) # 3. [Download clock dependencies](#Download-clock-dependencies) # 4. [Load features](#Load-features) # 5. [Load weights into base model...
d3c4bf8bc2d6323b84d7ab8cc7811561faaf63d8a0149e533b230a45ebd442fa
Jupyter
16,678
425
# %% import scipy as sp import scipy.io import os import numpy as np import pandas as pd import random as rand from tqdm import tnrange, tqdm_notebook from collections import Iterable import matplotlib.pylab as mpl import colorlover as cl from scipy import stats import importlib import sys sys.path.append(os.getcwd()+'...
58811a5f4429eeebd9622c885a3377bc83a9e6247383a9730a187dfd1f66269f
Jupyter
16,681
370
# %% [markdown] # # System dynamics when both the weights and activity evolve # # Using Oja's rule the weights should always converge to have an L2 norm of 1. # # Our derivation involved integrating over a period of rotating activity before making a weight update, so we sum weight updates over each period before just...
0db899380a69ab05407c9176daace4bfdae66accf901ca494c75f2b31abcde00
Jupyter
16,945
511
# %% import numpy as np import torch from pytorch_lightning import Trainer from torch.distributions import normal, uniform from rgan.utils import TorchStandardScaler, \ SamplesDataset, NormToBoundsScaler, \ MechanisticModel from rgan.rgan import rGAN, defaultNetsRGAN fro...