sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
4bd91a4381077c241e6ea765bfe6a322102241154d1117c9b1591fe880eb1082
Jupyter
4,871
157
# %% [markdown] # # PGExplainer on BA-Shapes dataset for 2-layer GCN # %% import os import os.path as osp import torch from torch_geometric.data import DataLoader from torch_geometric.data import download_url, extract_zip from dig.xgraph.dataset import SynGraphDataset from dig.xgraph.models import * from dig.xgraph....
0670acb5cd6878180dc4e601167ca90031d9c359f698ba340c8e29dc7e264b9a
Jupyter
4,882
170
# %% import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import sys import os BASE_PATH = './../dynaphos-core/' sys.path.append(BASE_PATH) sys.path.append('./../..') from dynaphos import utils results = pd.read_csv('results/predicted_temporal_dynamics.csv') activation, brightness = results['p...
7e5449aefd3b03aac01eea21d256ca0d8066518d12ed1e09bfd405f04e030b23
Jupyter
4,944
211
# %% [markdown] # ## Quality Control for MALDI Data # Used for Figure 6 # # Author: Max Gold # %% import numpy as np import os import pandas as pd import scanpy as sc import matplotlib.pyplot as plt import seaborn as sns import math from scipy import stats from sklearn.cluster import KMeans # %% base_fold = '../...
9b2aaa9f647d49ec2d9606bf0a4958c58a07cd447640f505e8d832847c5c0170
Jupyter
4,949
177
# %% [markdown] # # Plotting Electron Densities # # This notebook is meant to show how you can plot machine learned densities. It uses an example structure and pretrained model. You should use this as a template with your own structure(s) and model(s) # %% %load_ext autoreload %autoreload 2 import sys import os impo...
1c9a6d9a5d39e5c5cdaeaf505fd23a223d6fc8d51edf29ed8fe3fcd12c5e5369
Jupyter
4,995
168
# %% %load_ext autoreload %autoreload 2 import math import numpy as np import torch import torch_geometric from utils import get_iso_permuted_dataset from utils import flatten_list device = torch.device("cuda" if torch.cuda.is_available() else "cpu") #device = torch.device("cpu") print (device) torch.set_default_d...
bece265d9d896cf5a97edb992602bae174c573a05fe4b9b1d91b53bc11c53868
Jupyter
5,015
127
# %% [markdown] # [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/RatInABox-Lab/RatInABox/blob/main/demos/extensive_example.ipynb) # %% [markdown] # ## Extensive RatInABox example # In this example we: # 1. Initialise environment. A rectangular env...
936dd5d9cf0b3cff9eb7b99497eb07f174850aa4bb6eba2f49ab745b1317cdd2
Jupyter
5,073
145
# %% # General imports import glob import os.path import numpy as np from task2_regression.models.happyquokka import happyquokka from task2_regression.models.adt_env import ADT from task2_regression.models.vlaai import vlaai from task2_regression.models.eegnet_env import EEGNet from task2_regression.models.fcnn_env im...
338272f9803a0a4bb6be0b9f1f5c13cefeccbffdb80695acbd40b59c71376070
Jupyter
5,097
115
# %% import sys sys.path.append('../') from scipy import stats import pandas as pd import seaborn as sns; sns.set(style='ticks', context='talk', rc={'font.size': 6, 'axes.titlesize': 7, 'axes.labelsize': 7, ...
6db3aa5db637bee254d66c412002bedc34cd15169180129675a68c933ee36322
Jupyter
5,133
193
# %% [markdown] # # CCA vs PLS errors # %% import numpy as np import xarray as xr from gemmr.data import load_outcomes, print_ds_stats from gemmr.metrics import * from gemmr.sample_size.interpolation import calc_n_required_all_metrics from gemmr.util import subset_ds import colorcet import holoviews as hv hv.extensi...
878b28186d157415fd12f84cda5ba7e83502ab1ecd1f8bf3352aa7b51bc2758d
Jupyter
5,162
219
# %% [markdown] # ## Joint Graphical Lasso Analysis for MALDI Data # Used for Figure 6 # # Author: Max Gold # %% from collections import Counter import itertools import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib import networkx as nx import os import scanpy as sc from scipy impo...
caf51fce750b864d450cfd722a95a84870cb96a0bb171e39236c3491049f6442
Jupyter
5,166
107
# %% [markdown] # # Basic embedding retrieval with Chroma # # This notebook demonstrates the most basic use of Chroma to store and retrieve information using embeddings. This core building block is at the heart of many powerful AI applications. # # ## What are embeddings? # # Embeddings are the A.I-native way to rep...
8adfc1b9391ff8b80a615b1533a41137f948ec030b83c658c3ff2ab6f7b36bee
Jupyter
5,213
137
# %% [markdown] # # inferring amino acid preference predictions from structure # - take PDB file and convert to LMDB dataset (following https://github.com/drorlab/atom3d/tree/master/atom3d) # - then take the trained RES-GVP model to find atom predictions # # ### Inputs needed: # - the equivariant graph neural network ...
8ef873a92e49f62fcbcd6fd9cf31c5d14a367f35a4d5363b9ee20232cc149056
Jupyter
5,213
165
# %% from sklearn.preprocessing import normalize from sklearn.feature_selection import chi2,mutual_info_regression import scipy.cluster.hierarchy as shc import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.metrics import silhouette_score,calinski_harabasz_score,davies_bouldin_score # %% ...
1cbaa01bf85f165aea7ff8e8120af52fb5f4e891f2fba5dbc477ecc67fc29716
Jupyter
5,318
165
# %% CODE_REPO_PATH='/YOUR_PATH/Converting_allo_goal_to_ego_steering/analysis/' import warnings warnings.filterwarnings('ignore') from importlib import reload import sys import os import numpy as np import scipy as sc import pandas as pd sys.path.insert(0, CODE_REPO_PATH) import read_data as rd import pfl3_stim as p...
2ddf25c7f4581cbe4c7ed1ffb26842a803ab8c81daf3ef1be67460c2f59c8285
Jupyter
5,343
191
# %% [markdown] # # Testcase: Subset of Collaborators # %% [markdown] # # Getting Started # %% [markdown] # Initially, we start by specifying the module where cells marked with the `#| export` directive will be automatically exported. # # In the following cell, `#| default_exp experiment `indicates that the exporte...
0f1f9cee13a8f14bfb8fc78e52af7ca2d8bc75f06a89c42a73023e1f38d36ecb
Jupyter
5,357
131
# %% import sys sys.path.append('../') import numpy as np import pandas as pd from sklearn.linear_model import LinearRegression import seaborn as sns; sns.set(style='ticks', context='paper', rc={'font.size': 6, 'axes.titlesize': 7, ...
4e678f7955811f07690bc782468c1f572e02de83d8b59e53dbefb596aeb1d21a
Jupyter
5,376
178
# %% import pandas as pd import matplotlib.pyplot as plt # %% df1 = pd.read_csv ('EpochAccuracy1300.csv') # %% df1 # %% epochs = df1. iloc[:, 0] accuracy = df1.iloc[:, 1] # %% fig = plt.figure(figsize=(5,5)) fig.suptitle('OptLSTM') plt.plot(epochs ,accuracy) plt.xlabel('Training Epochs') plt.ylabel('Validation Accu...
13787d258d9c4665f3f9393fd26bd78095183eb6bf3b7adf79984f8e08f53f37
Jupyter
5,387
225
# %% [markdown] # # Fréchet Mean and Tangent PCA # # Lead author: Nina Miolane. # # This notebook shows how to compute the Fréchet mean of a data set. # Then it performs tangent PCA at the mean. # %% import matplotlib.pyplot as plt import geomstats.backend as gs import geomstats.visualization as visualization from ...
1f9ed0cb85f82b6f2e59f11c62315a0739a8ae0a43d2f0097b2f3851d5fb1ef9
Jupyter
5,413
195
# %% [markdown] # # Prepare full/intact complexes for the PDBBind dataset # %% import os import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import torch # %% from tqdm import tqdm import pickle # %% from rdkit import Chem from Bio.PDB import PDBParser, MMCIFParser from Bio.P...
0eb0b4ae6de142caedbb49cb2562792eb201efeb02bf553d8eeb34382977c52c
Jupyter
5,459
196
# %% import cloudknot as ck import itertools import numpy as np import pandas as pd # %% input_dirs = ["b0-tensorfa-dwiqc"] # %% gold_standard = pd.read_csv("expert-ratings/expert_ratings.csv") report_subs = ["sub-" + sub for sub in gold_standard["subject"]] len(report_subs) # %% def create_tfrecs(s3_input_dir, seed...
848aefda979269693041b393db8a5192107343d42da14a66d126412cd040813a
Jupyter
5,465
170
# %% [markdown] # # Quickstart # %% from typing import Union, Optional, List, Dict, Tuple, Any import pandas as pd import numpy as np import matplotlib.pyplot as plt %matplotlib inline import statsmodels.api as sm import statsmodels.formula.api as smf import myforestplot as mfp %load_ext watermark %watermark -n -u -...
4f11d0095f9d1bd93e242c5dae626bda69d4c4f3142a9bd0fdc9a530dd95510a
Jupyter
5,483
168
# %% [markdown] # # Quickstart # %% from typing import Union, Optional, List, Dict, Tuple, Any import pandas as pd import numpy as np import matplotlib.pyplot as plt %matplotlib inline import statsmodels.api as sm import statsmodels.formula.api as smf import myforestplot as mfp %load_ext watermark %watermark -n -u -...
54c955d29f829137c622419547596d0d7fbf659d40fc6e7d1e04e92bc3163c4f
Jupyter
5,490
238
# %% [markdown] # # 211220 Ground truth # - 211102 synapse annotation # - 211119 synapse annotation # %% import numpy as np import tifffile as tif from cloudvolume import CloudVolume import itertools import operator # %% def chunk_bboxes_2d(vol_size, chunk_size, overlap=(0, 0), offset=None, mip=0): if mip > 0:...
ef9c5f2f8e4985af1ff39c7fac05cf5ccb593dd49c2f6686eef0172a7b7eb8a2
Jupyter
5,531
193
# %% %matplotlib inline %load_ext autoreload %autoreload 2 # %% from configuration import * import pandas as pd import spikeinterface.full as si from spikeinterface.sortingcomponents.benchmark.benchmark_motion_interpolation import BenchmarkMotionInterpolationMearec from figure_waveforms_distortion import plot_templ...
37a122e1d06c3eb621e145a89df222dd0e050a6fe07f6dd254c388421198fc9b
Jupyter
5,533
217
# %% import sys import os import importlib import random from itertools import combinations import glob import numpy as np import scipy import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib import ticker import seaborn as sns import prettypyplot as pplt import mdtraj as md import MDAnalysis as mda...
a472cc9f6162c265fbc7059ff4ff883ea8f182058e31440ed82934200236ca9f
Jupyter
5,613
151
# %% import numpy as np import os,sys sys.path.append(os.getcwd()+"/..") from rnn_scripts.train import load_rnn from rnn_scripts.utils import su_stats from matplotlib.colors import colorConverter as cc from matplotlib.lines import Line2D import matplotlib.pyplot as plt %matplotlib inline # %% # Load sweep # ----------...
2f3aa0fde347859fc5107dc25a61c5a7326b659b8979dd2c3cc45715379b31a6
Jupyter
5,633
176
# %% # читаем датасет import numpy as np import pandas as pd # load dataset from file csv # f = 'D:/koltsov_python_scripts/Tomotopy/preprocessing_data/20news_lem.csv' f = 'C:/koltcov_python_scripts/Word_embeding project/coherence/lenta_lem_2_utf8.csv' #f = 'D:/koltsov_python_scripts/Tomotopy/preprocessing_data/WoS11967...
a4c09e1d28064c008724edc5a1754359333283668da08accd01b9487590fbe55
Jupyter
5,686
127
# %% [markdown] # This example aims to demonstrate our detection method step-by-step for the user, so they have a firm understanding of how the process works and can easily run it with their own data. In it we detect defects in a single segmented image where the centroid cordinates and cell orientations have already be...
5192871ff1d76dc1eb68ea1f993751b5bc0f5839d566317a56fb3480b304a146
Jupyter
5,725
127
# %% [markdown] # # Conjuctive grid cells [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/RatInABox-Lab/RatInABox/blob/main/demos/conjunctive_gridcells_example.ipynb) # # In this demo we'll show a very simple way one could model conjuctive grid cel...
2163b1a5e0e5493960e1ca7a84848bcac61dffe5a83c34a8577da79efaf2dd19
Jupyter
5,765
218
# %% [markdown] # # Parse protein complexes from datasets and count the number of nodes/edges, and atoms. # # Then filter out complexes with too many atoms # %% from rdkit import Chem from transformers import T5Tokenizer, T5EncoderModel import pytorch_lightning as pl from pytorch_lightning.callbacks.early_stopping i...
027de5adb03ced010922fdbb8df8e2b861f58551f6e540f99965d03dd0ffa0b8
Jupyter
5,797
136
# %% [markdown] # # Use Roboflow with Chroma # # With [Roboflow Inference](https://inference.roboflow.com), you can calculate image embeddings using CLIP, a popular multimodal embedding model. You can then store these embeddings in Chroma for use in your application. # # In this guide, we are going to discuss how to ...
e844ce8fbdaf67be9ec52a179831dfa83536edf6663be45a65f94e7204fb5301
Jupyter
5,798
227
# %% import matplotlib.pyplot as plt import matplotlib.colors as colors import nibabel as nib import numpy as np import os import os.path as op from glob import glob from nilearn import plotting # %% nifti_dir = "../data/osfstorage/deep-learning-qc/integrated-gradients" confusion_classes = ["true_pos", "true_neg", "f...
d1337664bfcd147b7a9bf162701d76432bc152471de9a81e1ac57e68bd177fb3
Jupyter
5,828
173
# %% import pandas as pd import numpy as np import matplotlib.pyplot as plt from os import listdir from covesTools import read_sampled_mut_key from scipy.sparse.linalg import lsmr from copy import deepcopy import sys sys.path.append('../') import importlib import myTools importlib.reload(myTools) from myTools import...
7328a236ee3d19b7881951b1cc960b9bcdf4940bcc2a6c20063635f2ab1a26e8
Jupyter
5,835
162
# %% [markdown] # ## Graph Space # $\textbf{Lead Author: Anna Calissano}$ # %% [markdown] # Dear Learner, # # in this notebook we are going to see gpca and regression in graph space in action. # %% import matplotlib.pyplot as plt import networkx as nx import geomstats.backend as gs import geomstats.datasets.utils a...
9ba90053c794ac323eaae29ff621c012315be5c1cadad3e529681e642a6678f3
Jupyter
5,839
210
# %% import os, sys import pandas as pd import numpy as np from scipy import stats from matplotlib import pyplot as plt import seaborn as sns from biotite.structure.io.pdb import PDBFile from biotite import structure as struct from foldingdiff import plotting # %% sctm_table = pd.read_csv( "/home/wukevin/projec...
fd348142c5122635e0248020dfd28f5e3e79133fa5acd1fb0e8a0a9b1188b662
Jupyter
5,985
196
# %% [markdown] # # Multimodal Retrieval # # Chroma supports multimodal collections, i.e. collections which contain, and can be queried by, multiple modalities of data. # # This notebook shows an example of how to create and query a collection with both text and images, using Chroma's built-in features. # %% [markdo...
c9b53dc1f3e38d3001056229104de4a1de87fbe43cd4c4005d29a4c40ecf9439
Jupyter
5,995
218
# %% [markdown] # # Within-subject MVPA # %% ### Import packages ### Please install nltools first if you have not installed it before. See tutorials for nltools: http://neurolearn.readthedocs.io/en/latest/ from nltools.mask import expand_mask, collapse_mask from nltools.data import Brain_Data import seaborn as sns im...
8fab54f67e77b7e19fd7b4ec2c6fc39be8c5adc69a415a93b907ffdda1d61235
Jupyter
6,023
201
# %% %matplotlib inline %load_ext autoreload %autoreload 2 import os from visualize import PyramidVisualizer, get_dataset, display_image, simple_visualizer from metroem.aligner import Aligner from corgie import residuals # %% #os.environ["CUDA_VISIBLE_DEVICES"]="0" #os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" #impor...
ebef86d65939b4be0eb3032ad0f5ad6d47e8dce5ae18d5dc8b2d44e336bc31f3
Jupyter
6,028
169
# %% import scipy.io as io import matplotlib.pyplot as plt import matplotlib.pylab as pylab import numpy as np import seaborn as sns # %% import matplotlib.pyplot as plt font = {'family': 'serif', 'serif': ['Helvetica']} plt.rc('font', **font) plt.rc('text', usetex=False) # %% label_fontsize = 16 title_fontsize = 18...
74058555fd51c75f21aa3ac81e23cbb76c3112b209d17d3c6c6b5dc61ed45dce
Jupyter
6,042
231
# %% [markdown] # ## Explore data and analysis. # %% [markdown] # Here we will reproduce a figure from the manuscript. We will start by loading and analyzing some files. We will then make some plots. # %% %load_ext autoreload %autoreload 2 import numpy as np import matplotlib.pyplot as plt # just to show plots duri...
9f4338ca60d189436ee158a2714b6610087ddba4f7dadad2d5b5644a20892a4e
Jupyter
6,052
232
# %% import numpy as np import matplotlib.pyplot as plt import os, sys sys.path.append(os.getcwd()+"/..") from rnn_scripts.utils import* from rnn_scripts.model import * from rnn_scripts.train import * from rnn_scripts.coupled_oscillators import * from tasks.seqDS import * import matplotlib.pylab as pl %matplotlib inlin...
977f8467f1d659b4c74b138c33d27bb553ee89585999cd50e3fb697c2c02a611
Jupyter
6,062
138
# %% import numpy as np import pandas as pd from scipy.spatial.transform import Rotation import seaborn as sns; sns.set(style='white', context='paper', rc={'font.size': 7, 'axes.titlesize': 9, 'axes.labelsize': 8, ...
ea7b6a082c1bdbee1ba90ba4f83ae7ae332111949a47ac3511cddf5d3de529cc
Jupyter
6,074
167
# %% import os os.chdir('../') # %% import DeepPurpose.DTI as models from DeepPurpose.utils import * from DeepPurpose.dataset import * # %% from time import time t1 = time() X_drug, X_target, y = load_process_KIBA('./data/', binary=False) drug_encoding = 'CNN' target_encoding = 'Transformer' train, val, test = dat...
e67e5be64991619e4ae4dfc03f029dfb9a8cb118d5cb953f4503e603d504eb07
Jupyter
6,133
180
# %% import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import matplotlib as mpl import sys sys.path.append('./../..') from dynaphos import utils # %% plt.style.use('../_figurestyle/small.mplstyle') PLOT_ZERO_ACTIVATIONS = 'standard' # choose: 'standard', 'ignore', 'crosses...
aac2027adb00a503f250a043821b3cd12180e90d79741b1e3883695ac19ca849
Jupyter
6,197
166
# %% # Copyright (C) 2022-2024 TU Darmstadt # SPDX-License-Identifier: Apache-2.0 # ----------------------------------------------------------- # Primary author: Phillip Rieger <phillip.rieger@trust.tu-darmstadt.de> # Co-authored-by: Torsten Krauss <torsten.krauss@uni-wuerzburg.de> # ----------------------------------...
2d18125e25132698ac453e74cb56187008b2c193676ca299d8522a9626f41fc9
Jupyter
6,291
140
# %% [markdown] # # Quickstart # # In this guide, we will train a simple Convolutional Neural Network (CNN) on MNIST handwritten digits dataset. We will simulate a Federated Learning experiment between two collaborators, orchestrated by an aggregator, via few CLI commands. # # OpenFL must be installed for this tutori...
de83ff2f476e4a4384cec14f8b56c395e6beb1f4023e1be9d97ce4ef5d322843
Jupyter
6,308
222
# %% import cloudknot as ck import itertools ck.set_region('us-west-2') # %% import AFQ.data as afqd study = afqd.S3BIDSStudy( "hbn-curated", "fcp-indi", "data/Projects/HBN/BIDS_curated/derivatives/qsiprep", subjects="all", ) # %% def afq_hbn(subject): import AFQ print(AFQ.__version__) ...
1c3375d93efd70d177f6f7d343747845d663517d30f7ecbf1e4454e838d4a622
Jupyter
6,327
194
# %% !pip install git+https://github.com/securefederatedai/openfl.git !pip install -r ../workflow_interface_requirements.txt !pip install torch !pip install torchvision # %% from copy import deepcopy import numpy as np import torch import torchvision from time import time from torchvision import datasets, transforms f...
f8f63f660dce0082950b4368e447796694a4ac2110d1f5dc6866e046a31b864f
Jupyter
6,372
136
# %% import sys sys.path.append('../') import pandas as pd import seaborn as sns; sns.set(style='ticks', context='paper', rc={'font.size': 6, 'axes.titlesize': 7, 'axes.labelsize': 7, ...
dde3445500427c3c161f07a009c56701ae13e153e18495219349c0562fabd6ae
Jupyter
6,407
187
# %% [markdown] # # sample sequences based on local structure # use the residue preferences learned from structural microenvironment to sample combinatorial variants with Boltzmann function # # ### inputs: # - the structure based residue preferences # - a set of positions and mutations to be sampled # # ### outputs: ...
0dbc01540fa5eb632ee95e2bc3f71c4327672aaa6371b6bebf3ccf720b8adace
Jupyter
6,419
216
# %% import os, sys import functools import tempfile import multiprocessing as mp from typing import * import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from tqdm.auto import tqdm from biotite import structure as struct from biotite.structure.io.pdb import PDBFile from fol...
02372244b8587bbb859a31f2eeed301e693c9bb4acf322183ff045bd9d7f1ca5
Jupyter
6,433
224
# %% [markdown] # Computational Neurophysiology Laboratory, Brain Institute, UFRN, Brazil<br> # Rodrigo MM Santiago<br> # 2023 # %% [markdown] # # WFbC # *Waveform-based classification of dentate spikes* # %% [markdown] # ### Function import # %% [markdown] # **Custom functions** # %% import dentatespike as ds # %...
3d90ba01d49e451b8f883f101d3086405e862033dd0f669abdab8aa9ccbfc0ad
Jupyter
6,455
170
# %% [markdown] # # Example to use the pipeline with your own model # %% import os import torch import torch.nn.functional as F from torch_geometric.nn import GINEConv from molx.dataset import Molecule3D from molx.mol3d import Mol3DTrainer, eval3d from molx.model import make_mask device = torch.device('cuda' if torc...
7be9c05397494030021047f61463c07a21fcfbbd047799c22d1ac0715abb94c8
Jupyter
6,477
219
# %% %matplotlib inline %load_ext autoreload %autoreload 2 import os from visualize import PyramidVisualizer, get_dataset, display_image, simple_visualizer from metroem.aligner import Aligner from corgie import residuals # %% #os.environ["CUDA_VISIBLE_DEVICES"]="0" #os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" #impor...
323f0f4e8265a21462039d99f63cb954eaaa8450d21de0c1471399bee12e62f5
Jupyter
6,510
245
# %% [markdown] # # Testing for modules impacted by diet # %% #load packages pkgs <- c("mgcv", "lme4", "ggplot2", "vroom", "dplyr", "forcats", "tidyr", "Seurat", "SingleCellExperiment", "gratia", "MASS", "fitdistrplus", "furrr", "tidyverse") vapply(pkgs, library, logical(1), character.only = TRUE, logical.return = TRU...
3b19291ff9fd791649a8c416d084fca108c3cb46d678071c480407c4ca555f72
Jupyter
6,521
247
# %% import AFQ.data as afqd import cloudknot as ck import importlib import s3fs import json import os.path as op import numpy as np import pandas as pd # %% study = afqd.S3BIDSStudy( "hbn_curated-0", bucket="fcp-indi", s3_prefix="data/Projects/HBN/BIDS_curated", subjects=1, ) qsiprep_study = afqd.S3B...
3f13c04b7a69fe07d6fd76388e47af618a5967d5a0c7301b12ef1a211228187e
Jupyter
6,532
249
# %% [markdown] # # Testing for modules impacted by diet # %% #load packages pkgs <- c("mgcv", "lme4", "ggplot2", "vroom", "dplyr", "forcats", "tidyr", "Seurat", "SingleCellExperiment", "gratia", "MASS", "fitdistrplus", "furrr", "tidyverse") vapply(pkgs, library, logical(1), character.only = TRUE, logical.return = TRU...
fb7352c0c3f4d9cee36a5fc4be697627f43c7ac50fd6c0a01740cad0462f14c6
Jupyter
6,542
246
# %% [markdown] # # Testing for modules impacted by diet # %% #load packages pkgs <- c("mgcv", "lme4", "ggplot2", "vroom", "dplyr", "forcats", "tidyr", "Seurat", "SingleCellExperiment", "gratia", "MASS", "fitdistrplus", "furrr", "tidyverse") vapply(pkgs, library, logical(1), character.only = TRUE, logical.return = TRU...
3fac0a264ce90100bdce77f4473cfeabbecccb712252a23e02f624c76e335832
Jupyter
6,574
216
# %% [markdown] # ## GSVA Consensus Clustering # Generally used for Figure 2 # # Author: Max Gold # %% import matplotlib import matplotlib.colors as mcolors import matplotlib.image as mpimg import matplotlib.pyplot as plt import numpy as np import os import pandas as pd import seaborn as sns from scipy import stats ...
03c70394d6ca4ea90dabbee47cf88f06402999999a7b38dda671b60bc5c1f716
Jupyter
6,599
157
# %% [markdown] # # Custom Dataset for image classification # In this tutorial, we will describe how to create and use a custom dataset for the aim of image classification, following https://www.kaggle.com/basu369victor/pytorch-tutorial-the-classification. # %% [markdown] # ## Custom dataset # First of all, you need ...
9c27875a925f3f7e427af25601f7fe73a9979ce33b8e870b3ab9ceae0559000d
Jupyter
6,623
224
# %% [markdown] # # Classifying hands poses with Kendall shape spaces # %% [markdown] # Lead author: Nina Miolane. # # In this tutorial, we show how to use geomstats to perform a shape data analysis. Specifically, we aim to study the difference between two groups of data: # - hand poses that correspond to the action ...
c90f8bb16e681edeb32748ba8f33ca667014559f089725d80c6cbaefe34bed24
Jupyter
6,624
179
# %% [markdown] # <a href="https://colab.research.google.com/github/armiro/Covid19-Detection/blob/master/unet_lung_segmentation.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% from tensorflow.keras.layers import Conv2D, Conv2DTranspose, MaxPool...
f10ccbe4c5fc5759eb3646101d858c11ac838eb112148a7128e7bc388347d56c
Jupyter
6,633
172
# %% [markdown] # ### This notebook is for reproducing a part of the paper results' subsection "Multi-scale hierarchical $\gamma$-fused structure-function modular organization" and generate the panels of the figure 2. The goal of the notebook is to represent how the node strength of the $\gamma$-fused structure-functio...
e30a5097909113a6aad45ee3b22ca2d1cb3956afcffb2998be26f265aa1e675b
Jupyter
6,635
149
# %% [markdown] # # Scikit-learn Compatibility # %% [markdown] # --- # %% [markdown] # ## 1 - Introduction # # `pysurvival` estimator models can be adapted to be used with [`scikit-learn`](https://scikit-learn.org/)'s cross-validation, hyperparameter optimization, and pipeline functionalities. This notebook explains...
5a41e5cbf4d2e779860a0444184e07a4fd7fd8e4e1e216f6cff9e853f7d73e2d
Jupyter
6,680
229
# %% %load_ext autoreload %autoreload 2 import sys if "/home/alee/psi4_mod/build/stage/lib" not in sys.path: sys.path.append("/home/alee/psi4_mod/build/stage/lib") print(sys.path) import psi4 import math import numpy as np import torch import torch_geometric from utils import get_iso_permuted_dataset from u...
38ac0308ce49bbcb40abea5545c08bde9a46cc4ff23804423e4ef66cf0613a58
Jupyter
6,732
211
# %% [markdown] # # Akam et al. 2012 # # ### Oscillators as Neural Masses # # We will make a toy model of Wilson-Cowan oscillators that exhibit phase reset. The parameters are given in the paper (Methods, subsection _Wilson-Cowan model_). # %% sum2 = sum # backup for plotting later from brian2 import * # %% def g...
6b7619d1ab8b16b7d239234b01c35a472012986883f549d861c8f750fc80e2db
Jupyter
6,734
194
# %% [markdown] # # Align all and Compute for Graphs # # $\textbf{Lead Author: Anna Calissano}$ # %% [markdown] # Dear learner, # # the aim of the current notebook is to introduce the align all and compute as a learning method for graphs. The align all and compute allows to estimate the Frechet Mean, the Generalize...
b67b6c358258f82aab007823168b8bca9b97509c065c118373ee76f34e4b9249
Jupyter
6,761
208
# %% [markdown] # расчет coherence базируется на двух типов данных # (бибилиотека из gensim) # 1. датасет # 2. тематическое решение # %% # читаем датасет import numpy as np import pandas as pd # load dataset from file csv # level1 - lenta #f = 'C:/koltcov_python_scripts/Word_embeding project/lenta/level1/ETM_lenta1_d...
f4a9b881d0c4ce73196da990247f1b935ba295dd9cfb5b09ad72c1bffbabf4b5
Jupyter
6,772
264
# %% import numpy as np import os, sys sys.path.append(os.getcwd()+"/..") from rnn_scripts.train import * from rnn_scripts.utils import * from tasks.seqDS import * import matplotlib.pyplot as plt %matplotlib inline from mayavi import mlab mlab.init_notebook() cls = green_blue_colours() _,_,lut1,lut2 = np.load('../da...
6d6f9d014e0cf870e5383ab2165e661ea2477bc1dc1a071dbcecdcb41e16443f
Jupyter
6,780
208
# %% [markdown] # # Partially denoise items in test set # # To get a better sense of how we do on different length structures, we take test set items, and ask our model to denoise partially noised versions of them. We can then compare overall reconstruction error as a function of length. # %% import os, sys import mu...
1566486ef64c6c2e78c1740c9524ebfccde9fc8bf7c7d4a842c68ec9e76746c2
Jupyter
6,783
254
# %% import logging from glob import glob from live2p.workers import RealTimeQueue from live2p.utils import (get_nchannels, get_nvols, get_tslice, ptoc, slice_movie, tic, get_true_mm3d_range) from live2p.offline import run_plane_offline # logging setup # change fo...
350c56013a67c49144e8a4d820a61cf19ec55c441cd5c06f29a6e2908ceec25f
Jupyter
6,785
247
# %% %matplotlib inline %load_ext autoreload %autoreload 2 from visualize import PyramidVisualizer, get_dataset, simple_visualizer from metroem.aligner import Aligner from collections import defaultdict import random # %% import modelhouse import json iter_count = 500 model_path = "gs://corgie/models/pyramid_m4m6m9...
fbc610dedd210973bb04c81297ad47d9ad52e4104469e470b9630c83c878511a
Jupyter
6,808
156
# %% [markdown] # # Tutorial for sslgraph # %% [markdown] # In this hand-on code tutorial, we will show how to reproduce and develop self-supervised learning (SSL) methods using our DIG library. Specifically, we show how to implement existing SSL methods, how to develop and evaluate your own methods, and how to extrac...
698de437410a8f4583efac391fd897296fa4e45fc3ab73f6103a61ec06c9eb98
Jupyter
6,832
128
# %% [markdown] # # 1. Exploring the transport properties database # # This notebook is part of the Supporting Information of the article *Simulation and data-driven modeling of the transport properties of the Mie fluid* by Gustavo Chaparro and Erich A. Müller. (Submitted to Journal of Physical Chemistry B). # # This...
4390158e048c8eb9120c17d8814d7024a100a8797c49beed8b5af55bdfff8110
Jupyter
6,858
217
# %% import sys import os BASE_PATH = './../dynaphos-core/' sys.path.append(BASE_PATH) import time import cv2 import numpy as np import torch from dynaphos.image_processing import sobel_processor, canny_processor from dynaphos.simulator import GaussianSimulator from dynaphos.utils import load_params, load_coordinate...
71d220a34478286dbe4bb2f59b6c029e6d32f51c7d072e3b175f95da9eccab66
Jupyter
6,866
206
# %% [markdown] # # Practical Examples # %% from typing import Union, Optional, List, Dict, Tuple, Any import pandas as pd import numpy as np import matplotlib.pyplot as plt %matplotlib inline import statsmodels.api as sm import statsmodels.formula.api as smf import myforestplot as mfp %load_ext autoreload %autorelo...
e6575f263fb2983d8b80adb78daf1d3ce02eecf5fe6368590114e44c1b56db59
Jupyter
6,871
198
# %% # to be run locally on macbook with evcouplings installed # %% import evcouplings from evcouplings.couplings import CouplingsModel import matplotlib.pyplot as plt from scipy.stats import pearsonr, spearmanr plt.style.use('/Users/davidding/PycharmProjects/pareSingleLibrary2/codebase/src/paper_style1.mplstyle') d...
a6abf57e488c97216617414c1591f4c9bd4e5bb95304bba664cae97be5d4e986
Jupyter
6,907
210
# %% import scanpy as sc import pandas as pd import decoupler as dc import scipy import copy import numpy as np sc.settings.verbosity = 3 # verbosity: errors (0), warnings (1), info (2), hints (3) sc.logging.print_header() sc.settings.set_figure_params(dpi=80, facecolor='white') # %% l = sc.read_mtx("snRN...
f22b9161d22095e2a51552075ef09a525315a7ad75961bbb3dff92f2e2cbd7c6
Jupyter
6,914
237
# %% import cloudknot as ck import itertools import numpy as np # %% def create_tfrecs(sites, seed): import nobrainer import numpy as np import os import os.path as op import pandas as pd import re from glob import glob from s3fs import S3FileSystem fs = S3FileSystem() buc...
8b354419d18d9e6c08c2a94cddc43d72b802c80206f3e10200884621186f3cba
Jupyter
6,945
201
# %% # defines and prepares altered genes, i.e. differential promoter methylation + expression tendency # saved in altered-genes-per-patient.rds # overlap of these between metastases pairs # %% library(pheatmap) library(ggplot2) # %% basePath = "/data/bcu_projects/MelBrainSys_PostdocProject_Gruetzmann/publications/20...
e6909a28ca9729c773fb527c60c796b9018d51558b9f890ee763b8393fd0cd79
Jupyter
6,949
201
# %% # defines and prepares altered genes, i.e. differential promoter methylation + expression tendency # saved in altered-genes-per-patient.rds # overlap of these between metastases pairs # %% library(pheatmap) library(ggplot2) # %% basePath = "/data/bcu_projects/MelBrainSys_PostdocProject_Gruetzmann/publications/20...
7c2a11d79fee7af83c2bd0d100be62caa22d24aee71fedf0f5962444ea4e259b
Jupyter
6,956
178
# %% import sys sys.path.append('../../') import os from tqdm import tqdm import numpy as np import pandas as pd import seaborn as sns; sns.set(style='ticks', context='paper', rc={'font.size': 6, 'axes.titlesize': 7, '...
5d9151d5866107c0aaf2ecac1d50f612d515df98b8d348b973807ecacbf591c6
Jupyter
7,006
267
# %% import sys import os import importlib import random from itertools import combinations import glob import numpy as np import scipy import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib import ticker import seaborn as sns import prettypyplot as pplt import mdtraj as md import MDAnalysis as mda...
2deeaa0fad7163f3b28977c6b08fcec12464c416c1ecf50b61bf8ad17066dcea
Jupyter
7,038
186
# %% import sys import os BASE_PATH = './../dynaphos-core/' sys.path.append(BASE_PATH) import time import cv2 import numpy as np import torch from dynaphos.image_processing import sobel_processor, canny_processor from dynaphos.simulator import GaussianSimulator from dynaphos.utils import load_params, load_coordinate...
7cdd14a74dcf16f7860e6f32f35ad46869a6211af5fda767cc4b4d725ce024e5
Jupyter
7,048
157
# %% [markdown] # ## Trained model and optimal hyperparameters # # We have provided trained model and hyperparameters of SphereNet on QM9 and MD17 [here](https://github.com/divelab/DIG_storage/tree/main/3dgraph). # %% [markdown] # ## Example of 3D Graph # # Here we provide the example code for SphereNet on QM93D and...
83d8f9887b5c2bbb08eaaa0863d319eb2e6268dba0776da16c1a035c7927cf99
Jupyter
7,054
220
# %% [markdown] # ## Jaccard index # Predicts the species of each binary flash sequence by computing the Jaccard index with literature or population references. # %% %matplotlib inline import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import itertools, math from sklearn.metri...
551479f6f34e0503a20473ef6851f45ad811ab9b54f17ff7de2c4d9848ed2861
Jupyter
7,055
248
# %% import sys sys.path.append('./..') import logging import dynaphos import torch import matplotlib.pyplot as plt import numpy as np import cv2 import os import pandas as pd import time import pickle from dynaphos import utils from dynaphos.cortex_models import get_visual_field_coordinates_from_cortex_full, Map, ...
de2c4176df16f5543447a926d31c65b511ac4138e7982865e28de1ee60566752
Jupyter
7,058
248
# %% import sys sys.path.append('./../..') import logging import dynaphos import torch import matplotlib.pyplot as plt import numpy as np import cv2 import os import pandas as pd import time import pickle from dynaphos import utils from dynaphos.cortex_models import get_visual_field_coordinates_from_cortex_full, Ma...
b8745b8f5f31ee0faf70dcd25d1b3d0a41e2fc9063983a62cc439a0de8427bf8
Jupyter
7,125
224
# %% [markdown] # ## SVM # Classifies in the 3-dimensional space of flash parameters (flash duration, number of flashes, interflash gap) using SVM. # %% %matplotlib inline import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import itertools, math from sklearn.metrics import roc...
7d8256bffcc85f7de6f34d8057ac4f9e044768641cfad1ada1fe1108362a36ad
Jupyter
7,129
220
# %% [markdown] # # Dot product # Predicts the species of each binary flash sequence by taking the dot product with literature or population references. # %% %matplotlib inline import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import itertools, math from sklearn.metrics impor...
a78b3dc5915f543b675782e10a9fe4db2aec24cc8a6cc44c790d834d4bd696c0
Jupyter
7,141
206
# %% import neo import numpy as np import quantities as pq import matplotlib.pyplot as plt import seaborn as sns from pathlib import Path import sys sys.path.append(str(Path.cwd().parents[1] / 'project_utils')) from project_paths import project_paths import cobrawap.pipeline sys.path.append(str(Path(cobrawap.pipeline._...
814b33f13b5f21c50ae0a62f7b7d4951be13bde6a4db30e4019206aced1be77c
Jupyter
7,177
183
# %% import os import cellrank as cr import scanpy as sc import anndata import numpy as np import warnings warnings.filterwarnings("ignore") import scvelo as scv scv.settings.verbosity = 3 scv.settings.set_figure_params("scvelo") cr.settings.verbosity = 2 # %% datapath = "/hwfssz1/ST_BIOINTEL/P20Z10200N0039/06.groups...
36fdb2ae24281de36e480fbe5f72bbe89a93aa7fc7a9c60be9fd5784a6a37be2
Jupyter
7,188
261
# %% from Bio import SeqIO import torch import numpy as np from torch.utils import data import torch.nn as nn # %% ### preprocess the fasta data, keep the correspondence in the dictionary fasta_data file_in = "zika-fasta1.fa" fasta_sequences = SeqIO.parse(open(file_in),'fasta') fasta_data = {} seq_string = [] for...
08c13bd5671eaab6b9aac266d278e498617c026ff7a95b35b2c9743688d548c6
Jupyter
7,214
176
# %% # mainSim code # thalamic model # AUG 9 2021 # %% import numpy as np import scipy as sp import matplotlib as mpl import matplotlib.pyplot as plt import pandas as pd import brian2 import pickle import copy import seaborn as sns # %% # load helper functions from helper import generate_pref, plot_pref import mod...
b910415441c84332e2af2cbbe428b3040aba8ce6aeb568d6d11c676da7969b50
Jupyter
7,219
182
# %% import os os.chdir('../') # %% import DeepPurpose.oneliner as oneliner from DeepPurpose import dataset import time # %% X_repurpose, drug_names, drug_CID = dataset.load_antiviral_drugs('./data') # %% start = time.time() target, target_name = dataset.load_SARS_CoV2_Protease_3CL() oneliner.repurpose(target = targ...
37d585fc4cc46121b6f6eeb79e6ead81df64ead3a61db6a46ea8f7ff695280cd
Jupyter
7,235
271
# %% [markdown] # # Neurodesign comparison of design generators # # In this notebook, we will compare 3 methods to generate an experimental design: # - a design optimised using the genetic algorithm # - a design optimised using simulations # - a randomly drawn design # # We will do so using simulations: what is the r...
21e2a86f1af1bcfd338cc589e24ab8e80e3c833c22f5ed9ccdf1eb34085e0e48
Jupyter
7,255
153
# %% [markdown] # # Tutorial for 3D graphs # # In this hand-on code tutorial, we will show how to learn representations and predict properties of 3D graphs using our DIG library. Specifically, we show how run experiments **on QM9 and MD17 using the implemented SphereNet**. You can easily replace SphereNet with SchNet,...
f0476ec7390a62a7cd7cc3bdfb3311ac6fd64a12bd18d619110648428022dcd7
Jupyter
7,264
246
# %% # plotting the ROC curve for GFP oracle classification into half maximal fluorescence on 90-10% training-test # %% import importlib import pandas as pd import numpy as np import matplotlib.pyplot as plt from os import listdir import covesTools importlib.reload(covesTools) from covesTools import read_sampled_mut_...
07583b5a11955318bed81790b4b4dc54b2b3ea5a246e1548e2790be90af58e0f
Jupyter
7,275
156
# %% [markdown] # # Learning on Tangent Data # %% [markdown] # Lead author: Nicolas Guigui. # # In this notebook, we demonstrate how any standard machine learning algorithm can be used on data that live on a manifold yet respecting its geometry. In the previous notebooks we saw that linear operations (mean, linear we...
21a64360dce77cac027932728486b7504c1ad8cb310c9ff95bf75080262720c1
Jupyter
7,348
212
# %% import neo import numpy as np import quantities as pq import pandas as pd from pathlib import Path import sys sys.path.append(str(Path.cwd().parents[1] / 'project_utils')) from project_paths import project_paths from cobrawap.pipeline.utils.neo_utils import time_slice from cobrawap.pipeline.utils.io_utils import l...