sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
5c5a043636a43170c1c0f6cfe09110c6c13fd076533d651a64104404928a046d
Jupyter
7,595
157
# %% [markdown] # # Latin Hypercube Sampling # This notebooks walks through [Latin Hypercube Sampling](https://en.wikipedia.org/wiki/Latin_hypercube_sampling) (LHS) and explains how it differs from the standard [Gaussian Random Sampling](https://en.wikipedia.org/wiki/Normal_distribution) implemented in LIME. # # Stan...
6dbf08be74257d9b3f466edf542db3b2d1616ec77753d64b14f171409867b78b
Jupyter
7,597
196
# %% import numpy as np import emilys.optics.aperture as ap import emilys.optics.mtf as mtf import emilys.image.arrayplot as aplt import matplotlib.pyplot as plt import scipy.optimize as opt import time %matplotlib inline # %% # this calculates an aperture on a grid with mtf convolution # aperture values are 1 for ful...
dcb335a1a2abf9d6e04f819bfe958fb28a25515a068d478d1426f136193298d2
Jupyter
7,597
281
# %% import os, itertools import cupy as cp import numpy as np from scipy.stats import norm from numba import jit, njit, prange from tqdm import trange, tqdm # %% [markdown] # ## Routines # %% [markdown] # #### Learning rules # %% class BilinearPlasticityRule: def __init__(self): self.f = lambda x:x ...
9a55b27ed1dc13fdc911bf1a031e202482a1f92474faa19cfa234ddcc98d67d4
Jupyter
7,599
308
# %% [markdown] # # Figure 2 (Training and evaluating on the same database) # %% from collections import defaultdict from mol2ccs.utils import performance_evaluation import pandas as pd import seaborn as sns import matplotlib.gridspec as gridspec from matplotlib import pyplot as plt import numpy as np from utils impo...
67c43665b763ced6a22420fb67b7890557959b620fb32a252a8f0d17c6eefca3
Jupyter
7,607
215
# %% import json from pathlib import Path import nltk import csv from pytorch_pretrained_bert.tokenization import BasicTokenizer #nltk.download('punkt') # %% [markdown] # **Convert BRAT-Format into JSON** # %% path_ann = Path('test').glob('*.ann') path_txt = Path('test').glob('*.txt') d = {} for txt,ann in zip(path...
9e10c5c734db7e5739979b565609dd1a45265eae6d16c17b8fa2fda4424c0076
Jupyter
7,609
295
# %% import pandas as pd import numpy as np import dask.dataframe as dd import dask.array as da import anndata import scanpy as sc from os.path import join # %% [markdown] # # Read data # %% PATH = '/mnt/dssmcmlfs01/merlin_cxg_2023_05_15_sf-log1p' # %% ddf = dd.read_parquet(join(PATH, 'train'), split_row_groups=Tru...
7bfb7fd0e6649b5c2d0803f7f47d466853b3552e42923a5b075ab3c88d19ae69
Jupyter
7,667
181
# %% import os import numpy as np import cv2 import tensorflow as tf import random import numpy as np import cv2 import face_recognition from tensorflow.keras.applications import ResNet50 from tensorflow.keras.layers import Dense, GlobalAveragePooling2D, Multiply from tensorflow.keras.models import Model from tensorflo...
454ac0a9686a511eae36a2896f25b02b351a7bcfe091a87487eeb3ffca1c986f
Jupyter
7,686
233
# %% [markdown] # # Deep Neural Network acrchitecture # # Purpose: Create DNN architecture. # # Author: Gabriel Rodrigues Palma and Rafael de Andrade Moral # %% # visualisation modules import matplotlib.pyplot as plt # Data manipulation modules import numpy as np import pandas as pd # Machine learning modules from...
bce3e0221787e92e978bae48879c5516e7849ab106ed59037d2abd5123b47171
Jupyter
7,698
167
# %% [markdown] # (dev_pytorch)= # # PyTorch via NIRTorch # # PyTorch is a popular deep learning framework that many of the NIR-supported libraries are built on. # We have built the [`nirtorch` package](https://github.com/neuromorphs/nirtorch) to make it easier to develop PyTorch extensions for the NIR-supported libra...
82f381e3db3acdc887c75ae4692b37b27d839d1b82f39bd69bee68f4b3e2be5e
Jupyter
7,706
199
# %% import numpy as np import config.config as config from validation import Validation from Environment import Env from Agent_EKF import * from pathlib import Path import sys; sys.path.append('../analysis/') from my_utils import reset_seeds # %% def training(datapath, seed_number, task='gain', TOTAL_EP...
84f23912062d04da52ff6c938b65b1baaddb9c823b8879228625e0a38f3f0643
Jupyter
7,711
206
# %% [markdown] # # torch geometric + skorch @ CORA dataset # %% !date # %% [markdown] # This is an example for how to use skorch with [torch geometric](https://pytorch-geometric.readthedocs.io/). The code is based on the [introduction example](https://pytorch-geometric.readthedocs.io/en/latest/notes/introduction.htm...
640e9f3b929dc47d7fd3d002fbf8dd6a2efd310161fb3c01fadb44f02de1bf45
Jupyter
7,849
298
# %% import numpy as np import matplotlib.pyplot as plt # %% spks = [ [12, 11, 20, 33, 35, 36, 47, 48, 53, 53], [8, 15, 19, 31, 32, 36, 45, 46, 50, 57], [11, 11, 20, 30, 34, 38, 44, 47, 52, 56] ] # %% EV_LW = 7 ARR_S = 15 SP_LW = 4 Y_OFF = 0.2 X_OFF = 2 # %% spk_t = [10, 13, 19, 32, 34, 37, 46, 48, 51...
11aa031dcc430d12e64a4bc41ebf6f45c12f6f4966ae8fb99430980655f303c4
Jupyter
7,879
289
# %% [markdown] # # Calculate scDRS scores for different parameters # %% %load_ext lab_black import os, sys # %% import scdrs.util as util import scdrs.data_loader as dl import scdrs.method as md import submitit import os from os.path import join import glob import shutil import yaml import pandas as pd import numpy ...
e620baa5005aa92a0abd6e61b1c988c244072a1f6a9db2897a81c3a6e911edec
Jupyter
7,879
239
# %% !pip install -e /dss/dsshome1/04/di93zer/git/cellnet --no-deps # %% [markdown] # # Visualize training dynamics # %% import os import re from os.path import join import tensorboard as tb import pandas as pd import seaborn as sns import numpy as np import matplotlib.pyplot as plt # %% # logs under: https://tenso...
f5740a60e80e799d3b9893021a2537f4540e2b13e4feaa4d9d29e9ff95e664dd
Jupyter
7,889
301
# %% [markdown] # # Figure 3 (Evaluating on a different chemical space) # %% from collections import defaultdict from mol2ccs.utils import performance_evaluation import pandas as pd import seaborn as sns import matplotlib.gridspec as gridspec from matplotlib import pyplot as plt import numpy as np from utils import S...
93b2fdac75d2a0d1478b56dc18e80c3899c646a41a906fb8a0b4f926c012ea0e
Jupyter
7,898
236
# %% import json import os import numpy as np import snntorch as snn from snntorch import functional as SF from snntorch import surrogate import torch import torch.nn as nn from torch.utils.data import DataLoader, TensorDataset seed = 42 np.random.seed(seed) torch.manual_seed(seed) torch.manual_seed(seed) torch.use_de...
5417e05c74f1181b92aa594432e1b5454d019ae9405b5c9b682287bae45ba609
Jupyter
7,914
254
# %% [markdown] # (tune-huggingface-example)= # # # Using Huggingface Transformers with Tune # # <a id="try-anyscale-quickstart-ray-tune-pbt_transformers" href="https://console.anyscale.com/register/ha?render_flow=ray&utm_source=ray_docs&utm_medium=docs&utm_campaign=ray-tune-pbt_transformers"> # <img src="../../_...
0c38019e97c5556521d650c9771478447a1d5103b4513894de1bfc098c2e4852
Jupyter
7,922
226
# %% [markdown] # This notebook uses an older version of snnTorch, install via: # ``` # pip install git+https://github.com/jeshraghian/snntorch@40ad1360c644f948889cb9610121397c6ce943c8 # ``` # %% import json import os import numpy as np import snntorch as snn from snntorch import functional as SF from snntorch import ...
6cab8011df8f2f30e2f793a5103a86b1d71bba86a4e7f26a4846e924d11ed95b
Jupyter
7,931
196
# %% import scanpy as sc import pandas as pd import numpy as np import scipy as sp from statsmodels.stats.multitest import multipletests import os from os.path import join import time from anndata import read_h5ad # scTRS tools import scdrs.util as util import scdrs.data_loader as dl import scdrs.method as md # auto...
47c7c955425b3e6d6de69cd34efa71c817dea0e790eea6dbfe28e61f0841495d
Jupyter
7,943
230
# %% #import import pickle from matplotlib import pyplot as plt import numpy as np import pandas as pd from scipy import stats from scipy.ndimage import gaussian_filter1d import seaborn as sns # %% # Load data folder = '/Volumes/Elements/data_for_uploaded/' # Load pickle file with open(folder + 'Fig.S12/' + 'dFovF.tx...
31a968868b5f5ff8d8c906ddbc5fbc925919fa11ccc8c4e241ad0b3ed98b44ce
Jupyter
7,946
163
# %% [markdown] # # A Simple MapReduce Example with Ray Core # # <a id="try-anyscale-quickstart-map_reduce" href="https://console.anyscale.com/register/ha?render_flow=ray&utm_source=ray_docs&utm_medium=docs&utm_campaign=map_reduce"> # <img src="../../_static/img/run-on-anyscale.svg" alt="try-anyscale-quickstart"> ...
fbe3d396d1bc0bcdd9dacd31eb2247d4623f1eeb180287298c4da80d77ef24d3
Jupyter
7,953
214
# %% [markdown] # # Transfer Learning with skorch # %% [markdown] # In this tutorial, you will learn how to train a neural network using transfer learning with the `skorch` API. Transfer learning uses a pretrained model to initialize a network. This tutorial converts the pure PyTorch approach described in [PyTorch's T...
59f87cc4e62162fcd1390a6d38f77646366ad7dd4276a334dd5e99ba51e2656a
Jupyter
8,000
245
# %% [markdown] # ## This script plots the distribution of the closest distance between the cluster center to the UGUGUG motif, on FLARE confident clusters # %% [markdown] # ## MeOH samples compared with PFA samples # %% import os cwd = os.getcwd() main_dir = cwd print(main_dir) # %% import pandas as pd from glob im...
d22766bc2500ab0b1a201d1122e4e348d47d528a90bfffeb17efe82aae0bae04
Jupyter
8,028
219
# %% [markdown] # ## Learning Rate Schedulers with Skorch # # This notebook demonstrates 3 learning rate schedulers in skorch: # # StepLR, ReduceROn Plateau and Cosine Annealing. This notebook was contributed by [Parag Ekbote](https://github.com/ParagEkbote). # # Firstly you will need to install the following libra...
285f8df72974cf3bd6a14c3723bb8bbd44ae58217fe00678240a7615533dd879
Jupyter
8,038
247
# %% [markdown] # ## This script plots the distribution of the closest distance between the cluster center to the UGCAUG motif, on FLARE confident clusters # %% [markdown] # ## MeOH samples compared with PFA samples # %% import os cwd = os.getcwd() main_dir = cwd print(main_dir) # %% import pandas as pd from glob im...
b18d0593e16609d39825e262a8888e18706b96dad752d6960244c019b106c861
Jupyter
8,066
224
# %% [markdown] # This notebook uses an older version of snnTorch, install via: # ``` # pip install git+https://github.com/jeshraghian/snntorch@40ad1360c644f948889cb9610121397c6ce943c8 # ``` # %% import json import os import numpy as np import snntorch as snn from snntorch import functional as SF from snntorch import ...
4220fbfd50df239b95c8d73e6f20b8729e17e43dc5b645946dde1929e1e7edc2
Jupyter
8,078
249
# %% [markdown] # ## Volumetric data processing # This is a simple demo on toy 3d data for source extraction and deconvolution using CaImAn. # For more information check demo_pipeline.ipynb which performs the complete pipeline for # 2d two photon imaging data. # %% #%% try: get_ipython().magic(u'load_ext autorel...
88ce8edcdcbaaba82deb9001fe974a8aaa9805baaf1988e6e7fa4e09b542480b
Jupyter
8,078
218
# %% [markdown] # # 11 Synapse maps # %% [markdown] # ## Define paths and initialize packages # %% import numpy as np paths = np.load('Paths.npy', allow_pickle=True).item(); import numpy as np import pandas as pd import matplotlib import seaborn as sns """ Matplotlib backends: matplotlib qt5 generates free floating...
a2f6f2a664ba7a95733bcf476fec4ffe14f5e28d662fe9ccc374ac77117316bf
Jupyter
8,099
227
# %% [markdown] # # PulseInputDDM neural model tutorial # # This is a not very detailed detailed crash course in using this code to fit the classic "Bing's model" to neural and choice data. Things you can learn: # # - How to load your data # - How to plot some PSTHs, grouped by evidence strength # - How to fit the mo...
f0921ee50e11926eb561576a26dd0027d942f9e23f773d35dc9e3c5f8e1ed1bf
Jupyter
8,117
218
# %% [markdown] # # 11 Synapse maps # %% [markdown] # ## Define paths and initialize packages # %% import numpy as np paths = np.load('Paths.npy', allow_pickle=True).item(); import numpy as np import pandas as pd import matplotlib import seaborn as sns """ Matplotlib backends: matplotlib qt5 generates free floating...
456b6d24f0338c68eb0ace78301ec2912bb26c832391881e54ca7a7deba8c7eb
Jupyter
8,130
251
# %% [markdown] # # Evaluate DeepFace's Results In The Big Picture # %% import pandas as pd from IPython.display import display, HTML from sklearn import metrics import matplotlib.pyplot as plt # %% alignment = [False, True] models = ["Facenet512", "Facenet", "VGG-Face", "ArcFace", "Dlib", "GhostFaceNet", "SFace", "O...
6b83ed33ba957ec7c7abf1affb49d808242b0f2458110b8ca5ea176b7d1722d9
Jupyter
8,163
276
# %% %load_ext lab_black %load_ext autoreload %autoreload 2 import matplotlib matplotlib.rcParams["pdf.fonttype"] = 42 matplotlib.rcParams["ps.fonttype"] = 42 import numpy as np import pandas as pd import os, sys import scTRS.data_loader as dl import pandas as pd import numpy as np from os.path import join from stat...
950aa24267dd2742aebe0ca5a813437c4bed14d0303b6a340cf994c3a248f683
Jupyter
8,169
177
# %% [markdown] # # STARDUST (ROA-based version) # %% [markdown] # This Jupyter Notebook provides an interactive version of STARDUST for analysis using ROA-based fluorescence data. The required input for this analysis one mask/map and the time series generated from the map. Functions used in this script are defined an...
28d3f46c055f4dfb57b65ed975c235c6ddb9b2c65c533b847e8f607b0cada43b
Jupyter
8,180
312
# %% import pandas as pd import numpy as np # %% def set_term(column1,column2): if not pd.isnull(column1): return column1 if not pd.isnull(column2): return column2 else: return np.nan # %% def separate_id(column,idx): for i in column: if idx in i: column.re...
dcc0d783d3a8d6a571f2deb542424fad359442f839a50f62f8c03d78c48cc867
Jupyter
8,189
285
# %% %load_ext lab_black import os, sys %load_ext autoreload %autoreload 2 import matplotlib matplotlib.rcParams["pdf.fonttype"] = 42 matplotlib.rcParams["ps.fonttype"] = 42 import scdrs.util as util import scdrs.data_loader as dl import scdrs.method as md import submitit import os import pandas as pd import numpy ...
140e8961f9493b1190c2d36f39362bea70f8a62a557f1c32b3e1bd3c519bb464
Jupyter
8,240
223
# %% [markdown] # # Activity maps - Sup Figure 2 # %% [markdown] # ## Define paths and initialize packages # %% import numpy as np paths = np.load('Paths.npy', allow_pickle=True).item(); import numpy as np import pandas as pd import matplotlib import seaborn as sns """ Matplotlib backends: matplotlib qt5 generates ...
b08be203a30cff06ca989955821dd25c49e48a59afe64169ace7e5d4dd96fffe
Jupyter
8,247
226
# %% [markdown] # # Activity maps - Sup Figure 2 # %% [markdown] # ## Define paths and initialize packages # %% import numpy as np paths = np.load('Paths.npy', allow_pickle=True).item(); import numpy as np import pandas as pd import matplotlib import seaborn as sns """ Matplotlib backends: matplotlib qt5 generates ...
bc87384ab77445f0d90d0bf3429d52f75c710d2f5e0c0f35fd08b89e86d3dc8a
Jupyter
8,256
268
# %% [markdown] # # PerStruc-Denoiser # %% # Jupyter-notebook magic # For the matplotlib %matplotlib inline # For reload functions explicitly %load_ext autoreload %autoreload 2 # %% # Imports ## Add the modules to the system path import os import sys sys.path.append(os.path.join("..")) ## Libs import glob import ...
353ee72c0d6695a908b849e3fe9c343f5742737ec89b08c19c027877eafeb209
Jupyter
8,265
291
# %% [markdown] # # Evaluate Metlin-CCS train and test in CCSBase # %% from mol2ccs.utils import performance_evaluation import pandas as pd import seaborn as sns import matplotlib.gridspec as gridspec from matplotlib import pyplot as plt from matplotlib_venn import venn3 from utils import ( compare_models_by_addu...
3c7b5cfa933577eeec0430bf42a96995443289d54ba57d58e1e74eb1dbbd4c9e
Jupyter
8,326
294
# %% [markdown] # # Evaluate CCSBase train and test in Metlin-CCS # %% from mol2ccs.utils import performance_evaluation import pandas as pd import seaborn as sns import matplotlib.gridspec as gridspec from matplotlib import pyplot as plt from matplotlib_venn import venn3 from utils import ( compare_models_by_addu...
74782beebae44a918c65254f38cec76da5025c84df7684d61cdd9b9d0c659421
Jupyter
8,328
96
# %% rsync -avzhe ssh \ /media/concha-eloko/Linux/PhageDEPOdetection/FP_2108/AY349011.3_prot_AAQ55000.1_65.pdb \ conchae@garnatxa.srv.cpd:/home/conchae/ rsync -avzhe ssh \ conchae@garnatxa.srv.cpd:/home/conchae/ \ /media/concha-eloko/Linux/PhageDEPOdetection/ /home/conchae/software/SWORD2/SWORD2.py -i /home/conchae/...
fc00fe4943d88facd1409fe17130b043209ed406eb00acd0143f47fe86353b19
Jupyter
8,339
218
# %% [markdown] # # Neural space-time model example on structured illumination microscopy (SIM) data # Jupyter lab demo for "Neural space-time model for dynamic multi-shot imaging" by Ruiming Cao, et al. (2024) # %% %load_ext autoreload %autoreload 2 %matplotlib widget import os import numpy as np import jax import ja...
510150b78ffe39f755f31d9bf81651be531a1a7c6f1134e59fbdba48e70238b6
Jupyter
8,356
246
# %% [markdown] # # Converting an ANN to an SNN # # This tutorial walks you through how to convert your pre-trained model to a spiking version. # %% [markdown] # ## Defining an ANN # We define a simple convolutional architecture. # %% import torch.nn as nn ann = nn.Sequential( nn.Conv2d(1, 20, 5, 1, bias=False)...
add02b311f5359249b12b60b06309128f8fd163897a501d7679bbfd6d8922f59
Jupyter
8,387
273
# %% import scanpy as sc import numpy as np import scipy as sp import pandas as pd import matplotlib.pyplot as plt from matplotlib import rcParams from matplotlib import colors import seaborn as sns # %% [markdown] # ## Load data # %% adata=sc.read_loom('../Interneurons_processed.loom') # %% adata.obs_names=adata.o...
22298f51dbcb7b9c63288c40b24704e73e73cde81bb2cdcd04b18755eb101a18
Jupyter
8,416
212
# %% [markdown] # # Training an SNN with fewer SynOps and monitoring the firing rate # In the previous tutorial we saw how we can train an ANN with a low number of synaptic operations (SynOps). The same can be done when training an SNN directly. For good measure we will also monitor the neuron firing rates to make sure...
9343b6e434568fbf8c15117467c59456abe175cd0aadaf82701e6f563c508d49
Jupyter
8,435
199
# %% [markdown] # # `GCDM-SBDD` Tutorial, Part 2 - Filtering Generated Molecules using PoseBusters # %% [markdown] # ## Overview # # `GCDM-SBDD` provides a robust means of filtering new 3D molecules once generated within a target protein pocket of interest. As an illustrative real-world example, one can do so using t...
eae78df50f058fbebaed38e714c27ce7cc4bad6eeb16cc2b91cf4e8cd2120595
Jupyter
8,474
211
# %% [markdown] # # Import backage # %% import sys sys.path.append("../..") import numpy as np import matplotlib.pyplot as plt from matplotlib import cm import random %matplotlib inline # %% import torch from torch import nn from torch import distributions from torch.nn.parameter import Parameter from exp.sir.train i...
6afd2e4deb1591c22df04fd032516b8472df262cde346fb7283f6ae8e1d9fbac
Jupyter
8,486
269
# %% [markdown] # # Summarize results at cell-type level for the purpose of contrasting results across species # 1. Proportion of FDR < 10% at various parameter for scDRS. # 2. Cell type level p-value for scDRS # 3. Geary's C statistics for 10kb, 1000 genes default settings. # 4. LDSC-SEG p-value # %% %load_ext lab_b...
52fdb679ef8d0a7f007dc880629b9eddbb8945d95d5e25717a3e03166fbad058
Jupyter
8,512
222
# %% import os import numpy as np import cv2 import tensorflow as tf import random from sklearn.metrics import confusion_matrix, f1_score, accuracy_score from scipy.stats import mode import gc # Import the garbage collection module from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Conv...
546eeec813204f769c5cb8085a1f9f71c84da4af63d72e533f9504631a2fbd52
Jupyter
8,512
305
# %% [markdown] # <a href="https://colab.research.google.com/github/shksherry/Dynamic-Offloading-of-ANN-Model-Algorithm-Analysis/blob/main/Dynamic_Offloading_of_ANN_Model_Algorithm_Analysis_in_(Smart_home_dataset)_Code_.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Ope...
c1aa02d6f950e3b4e22d40ca30034609bd3a714c362900614a0770d5979b21af
Jupyter
8,513
231
# %% [markdown] # # Tutorial on how to use dSpikesClassifier # # dSpikesClassifier can predict the type of dentate spike (i.e. either DS1 or DS2) # # To use it, you only need the local field potential (LFP) signal from the granule-cell layer of the dentate gyrus (DG) and the times of the dentate spikes. # # In this ...
5c9665a56444b8bfbd7a546b69a566769ae235216895d857b08fb46998cb5d61
Jupyter
8,516
291
# %% [markdown] # ## This script produced 20 shuffled FLARE bed file (shuffle within the region) # %% import os cwd = os.getcwd() main_dir = cwd print(main_dir) # %% import pandas as pd import pybedtools from glob import glob # %% [markdown] # ### Load peak files: cleaned confident peaks # %% peak_filepaths = sort...
e2d2a3be5c647788804047e144bc2c6e5e39bdf83fb48fc44b5924813a7eed40
Jupyter
8,538
168
# %% [markdown] # ## Example of online analysis using OnACID # # Complete pipeline for online processing using CaImAn Online (OnACID). # The demo demonstates the analysis of a sequence of files using the CaImAn online # algorithm. The steps include i) motion correction, ii) tracking current # components, iii) detecti...
6ea09c1066ed4ec5344f472798b04eaa091184b9d0855e6f96e4dd0d3aa143b1
Jupyter
8,553
266
# %% using PulseInputDDM, MAT, LinearAlgebra # %% x_joint = Vector(undef, 3); H_joint = Vector(undef, 3); CIs_joint = Vector(undef, 3); # %% x_choice = Vector(undef, 3); H_choice = Vector(undef, 3); CIs_choice = Vector(undef, 3); # %% joint_model_path = joinpath(abspath(joinpath(pwd(), "..")), "models/joint"); choic...
56759c9c82aa327e9621c689608ece52451c7b73857fc6fd43696ecdba4abb7c
Jupyter
8,593
309
# %% [markdown] # # Goal : Save the Safada (or the ambiguous ones) # *** # ## I. Loading the dataframes # ## II. Transform the features : PCA # ## III. Clustering # ## IV. Scan the results # *** # %% import pandas as pd import os import json path_df = "/media/concha-eloko/Linux/depolymerase_building/DBsuite_Dpo_fil...
6750df8f2b6654131f5b73baa6073ba1fb8885103a54a95b8c2b5f39b3853a1b
Jupyter
8,607
223
# %% [markdown] # # Basic characteristics of synaptic input development - Figure 3 # %% [markdown] # ## Define paths and initialize packages # %% import numpy as np paths = np.load('Paths.npy', allow_pickle=True).item(); import numpy as np import pandas as pd import matplotlib import seaborn as sns from scipy import...
63afe831634ce1bed7f3b114b8a563645f7f245d31b6d6a0d1ed89200fa54752
Jupyter
8,652
262
# %% [markdown] # # Figure 3: STDP # %% # Imports ## General import os from copy import deepcopy from itertools import product from types import SimpleNamespace import sys sys.path.append("..") from RNN_helpers import * from IPython.display import display, Markdown ## Numerical import numpy as np import pandas as p...
577e39587adf853ff9cc12ae381c47499d18c1458af90513d4786dc3622eba57
Jupyter
8,692
309
# %% [markdown] # # Distance to Confidence # # DeepFace performs a hard classification by clearly separating same person and different persons based on the pre-tuned threshold. # # This notebook builds a logistic regression model to convert calculated distances to probalistic estimate, indicating how likely the class...
7afec9f4785c82af6a24fde88e72a10d74dbd3c3cc6d907d266f12f2221dc9c2
Jupyter
8,730
240
# %% # Matrix Manipulation/Management Libraries import pandas as pd import numpy as np # Data Visualization Libaries import seaborn as sns import matplotlib as mpl import matplotlib.pyplot as plt from scipy.stats import fisher_exact # Bioinformatics Libraries import pybedtools # Statistical Tests, Machine Learning, ...
b8cb3a6a76d010e4bd8e6eb92a054c063f1044ef14253f267721397240651147
Jupyter
8,751
205
# %% [markdown] # # Introduction to ML using ML4H # %% [markdown] # ## Prerequisites # - Basic comfort with python, some linear algebra, some data science # - Follow the instructions in the main [README](https://github.com/broadinstitute/ml4h) for installing ML4H # - Data used in this notebook is available here ([gs:/...
2cb4ab6fd826291149f4fdb90769a4cdb6a4fdcff3a22c92a53434ad176ea5f9
Jupyter
8,758
167
# %% [markdown] # # Dpo Detection Tool script : # *** # %% import pandas as pd import os from collections import Counter import torch path_work = "/media/concha-eloko/Linux/depolymerase_building" #path_work = "/home/conchae/PhageDepo_pdb" from transformers import AutoModelForTokenClassification, AutoTokenizer model...
d0be5995a01f4d2960dc2148d4606fee6d107c8692c010065afc4bddeac3bbff
Jupyter
8,762
243
# %% # %load_ext autoreload # %autoreload # %matplotlib widget # %% import flammkuchen as fl from matplotlib import pyplot as plt import numpy as np from scipy import io import seaborn as sns import matplotlib.gridspec as gridspec from matplotlib.ticker import FormatStrFormatter from pathlib import Path import pandas ...
2623ca9d7969d94f554e3d307ed4181fa651ea010f654a9f9d66dc2d405dc387
Jupyter
8,773
276
# %% [markdown] # # Flash responses # # This notebook introduces flash responses and the flash response index (FRI). # # The FRI measures whether a cell depolarizes to bright or to dark increments in a visual input. # %% [markdown] # **Select GPU runtime** # # To run the notebook on a GPU select Menu -> Runtime ->...
78798d6f40009ab2d799a72ae1ad9a7610f86985c5c7dfc87a25c30b2400e025
Jupyter
8,782
254
# %% [markdown] # # Train a Pytorch Lightning Image Classifier # # <a id="try-anyscale-quickstart-lightning_mnist_example" href="https://console.anyscale.com/register/ha?render_flow=ray&utm_source=ray_docs&utm_medium=docs&utm_campaign=lightning_mnist_example"> # <img src="../../../_static/img/run-on-anyscale.svg" ...
545f84807bf006a804322fd87b95b28dba480a17b80703ff51d1b28f8e650499
Jupyter
8,789
304
# %% [markdown] # In this notebook, we propose a demonstartion of different expression analysis in omicverse. We apply our implementation as well as the original code on the bulk data of Alzheimer's disease. # # # Different expression analysis # # ## Setting up data # %% import scanpy as sc import pandas as pd impor...
e44b533e3018c970d8ad62d7bc7607393e161cc63df52216fb093a3a9e02a027
Jupyter
8,805
309
# %% from gimpformats.gimpXcfDocument import GimpDocument import cv2 import numpy as np # Concave hull import os import sys import pandas as pd from descartes import PolygonPatch import matplotlib.pyplot as plt sys.path.insert(0, os.path.dirname(os.getcwd())) import alphashape # %% def imageListFromXcf(fileName): ...
eba42c6d101fbd4635dbfe99c97e51c03440d71d115fb793e38dbd34877104c4
Jupyter
8,808
273
# %% !pip install -e /dss/dsshome1/04/di93zer/git/cellnet --no-deps # %% from os.path import join import numpy as np import pandas as pd import lightning.pytorch as pl import dask.dataframe as dd from cellnet.estimators import EstimatorCellTypeClassifier from cellnet.models import TabnetClassifier # %% DATA_PATH = ...
1fe2a5733e6285b7792c50730394cbe8856ff91fafbf652aa8022869ed7004a4
Jupyter
8,857
237
# %% from transformers import AutoModelForTokenClassification, AutoTokenizer import torch from torch import nn import torch.nn.functional as F from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, roc_auc_score , matthews_corrcoef, confusion_matrix from sklearn.model_selection import tra...
86b4c943355def30619d5ec37b6d6e2da6409173642d8fcdd230c033aef675d1
Jupyter
8,859
224
# %% import numpy as np import config.config as config from validation import Validation from Environment import Env from Agent_RNN import * from pathlib import Path import sys; sys.path.append('../analysis/') from my_utils import reset_seeds # %% def training(datapath, seed_number, Actor, Critic, task='gain', ...
a9837ca7c68805474987e66c4145d09937499b19029b9852d916f50366cbc4b2
Jupyter
8,902
265
# %% [markdown] # # Fine-tuning a BERT model with skorch and Hugging Face # %% [markdown] # In this notebook, we follow the fine-tuning guideline from [Hugging Face documentation](https://huggingface.co/docs/transformers/training). Please check it out if we you want to know more about BERT and fine-tuning. Here, we as...
4e75363f0fdd304f7814132ce18a4c46fd948784d09f7afe5647f72206af57f3
Jupyter
8,905
259
# %% from model import * from attention import pHLA_attns_draw_save from mutation import * from utils import Logger, cut_peptide_to_specific_length # %% import math from sklearn import metrics from sklearn import preprocessing import numpy as np import pandas as pd import re import time import datetime import random r...
af4d6d6d121e5a303607fc69d0fc3cb257c022527ad86c02fb868c63cb3f1388
Jupyter
8,905
271
# %% [markdown] # # Creating checkpoints on the Hugging Face Hub # %% [markdown] # This short notebook explains how you can create a model checkpoint on [Hugging Face Hub](https://huggingface.co/docs/hub/repositories). # %% import subprocess # Installation on Google Colab try: import google.colab subprocess....
200215e8400683bd47ff9cb3b21e37e04777a9c8c487d6571d875b18bf8758a8
Jupyter
8,913
288
# %% %load_ext autoreload %autoreload 2 # %% import os, sys, subprocess, time, pdb import itertools, uuid import numpy as np import scipy from scipy.stats import pearsonr from tqdm.auto import tqdm, trange import matplotlib import matplotlib.pyplot as plt sys.path.insert(0, '../network') from measures import * # %% ...
17a40e20f8c01f88360198a3077cacfeff21ab409704b5e9f6bb54ca194ddea1
Jupyter
8,915
229
# %% [markdown] # # PFRL Quickstart Guide # # This is a quickstart guide for users who just want to try PFRL for the first time. # # If you have not yet installed PFRL, run the command below to install it: # ``` # pip install pfrl # ``` # # If you have already installed PFRL, let's begin! # # First, you need to imp...
c21184918d0c2e83afa473b7d8fe90ef62e9c5f05a2f203f0609e85ecf45c427
Jupyter
8,916
310
# %% [markdown] # # Process TDBRAIN # > Preprocessing and feature computation for the TDBRAIN dataset # %% import pandas as pd from pathlib import Path from functools import partial from dask.distributed import Client, LocalCluster, fire_and_forget from dask_jobqueue import LSFCluster from fastcore.transform import P...
005368077750de0e72797b8a89527ea5c2dd24f6113ddc13d336f808749ed9dc
Jupyter
8,935
195
# %% [markdown] # # Image Classification Batch Inference with Huggingface Vision Transformer # # <a id="try-anyscale-quickstart-huggingface_vit_batch_prediction" href="https://console.anyscale.com/register/ha?render_flow=ray&utm_source=ray_docs&utm_medium=docs&utm_campaign=huggingface_vit_batch_prediction"> # <img...
3c9612f12bc9eb64460895cc3333962538508419ef12901853902c839d614f24
Jupyter
9,000
199
# %% [markdown] # Install SimpleElastix and SimpleITK python module by the original tutorial # https://simpleelastix.readthedocs.io/GettingStarted.html # %% #import necessary packages import SimpleITK as sitk import matplotlib.pyplot as plt import os import numpy as np from skimage.io import imread, imsave from skim...
dfd6e9cf1a280946a92b657d8f0fd55e01f00049aa5c91887c4c881522eedae4
Jupyter
9,024
198
# %% import pandas as pd from paintone_rsn.data_loading import load_subjectiid, exclusion, load_timeseries from paintone_rsn.data_preproc import connectivity_matrix, connectivitylabelname import paintone_rsn.mlfunctions as myml from scipy.stats import pearsonr import numpy as np import pickle # %% # load behavior vari...
419b9c696b3421f435155d4317a3d1f02e8ccb315d13fe1c5c1ad7ea6f6e628a
Jupyter
9,126
326
# %% [markdown] # # init # %% [markdown] # ## import package # %% import os import time from subprocess import call import numpy as np import pandas as pd import seaborn as sns from scipy import stats import seaborn as sns import matplotlib.pyplot as plt import scipy as sc from matplotlib.colors import ListedColorma...
2ccbbd84d68208ecd472f0e77d7a127c31268a45fe5f6a602ad889de4721edda
Jupyter
9,141
222
# %% [markdown] # # A quick (and over-simplified) introduction to spiking neurons # # Author: Sadique Sheik # # Spiking neural networks are considered to be the `third generation` of neural networks preceeded by McCulloch-Pitts threshold neurons (`first generation`) which produced digital outputs and Artificial Neura...
82c155298b574a2fe05139a6f1dd5571925f735dba40ebc2d81b37ba361eb889
Jupyter
9,189
247
# %% import scanpy as sc import numpy as np import scipy as sp import pandas as pd import matplotlib.pyplot as plt from matplotlib import rcParams from matplotlib import colors import seaborn as sns # %% [markdown] # ## Load data # %% adata=sc.read_loom('../Interneurons_processed.loom') # %% adata.obs_names=adata.o...
8c13fd5421bb7a7550d91d6a1572f75fdb87ccaa9e92c9a7bbc387c85bd9af5e
Jupyter
9,191
227
# %% # Map manual subfield labels from 2D histology slice to volume # %% #import pyvips print('get imports...') import sys import geopandas as gpd import json import matplotlib.pyplot as plt import numpy as np import rasterio.features import os import tirl print(tirl.__version__) from tirl.timage import TImage #import...
fb1adb31aad0c15a74fc7fd831e5c43df1dd7d9073ddc16b8dcbfc5f35f045df
Jupyter
9,217
369
# %% # required packages: countdown-timer pyserial numpy av # %% %load_ext autoreload %autoreload 2 # %% import numpy as np import subprocess import datetime import multiprocessing as mp import sys, time #sys.path.append('simple_pyspin/') from multicamera_acquisition.simple_pyspin import Camera import PySpin from cou...
4a094ca161c5b73d8c5c4161ce5951dbc497df3c9841e111fab35172e536317a
Jupyter
9,256
355
# %% !pip install -e /dss/dsshome1/04/di93zer/git/cellnet --no-deps # %% from os.path import join from typing import List import anndata import scanpy as sc import dask.dataframe as dd import dask.array as da import pandas as pd import numpy as np # %% def get_count_matrix_and_obs(ddf, columns: List[str] = None): ...
f7f56e371b3414e72d195bcdb5f67469c7d56e6a6d6746b8ff6b9c74a928a661
Jupyter
9,256
224
# %% [markdown] # # London Air Quality Tutorial # # <a # target="_blank" href="https://colab.research.google.com/github/google/bayesnf/blob/main/docs/tutorials/BayesNF_Tutorial_on_London_Air_Quality.ipynb"> # <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> # </a> # %% # Downl...
cc156a8f5f566bed47f56326ee0071e2d0d1461333edc5be4b90b80ff82c5b49
Jupyter
9,308
292
# %% [markdown] # # Spiking CNN from NIR to SpiNNaker2 # # In this notebook we will show how a pre-trained Spiking CNN NIR model can be deployed onto the SpiNNaker2 chip. # # py-spinnaker2, the high-level software interface for running spiking neural networks on SpiNNaker2, provides an API similar to PyNN and allows ...
edd5b59f81428bc05f7fd22f29fa195f68722b32b7b8bd26ef0dc124bd136af4
Jupyter
9,331
239
# %% import os import scipy.io import numpy as np #from tensorflow.keras.models import Model from tensorflow.keras.layers import (Dense, Activation, Permute, Dropout, Conv2D, MaxPooling2D, AveragePooling2D, SeparableConv2D, DepthwiseConv2D, Batch...
b17dae9a71e2d3bcb9b2511739a9dc76fb90970e56b367658fa6df72087a7eea
Jupyter
9,337
351
# %% !pip install -e /dss/dsshome1/04/di93zer/git/cellnet --no-deps # %% !pip install -q SPARQLWrapper # %% # !pip install -q cellxgene-census !pip install -q obonet # %% %load_ext autoreload # %% import pickle import os from os.path import join import numpy as np import pandas as pd import seaborn as sns import ...
4c2c97ae269cf32d6a023bcd1807432dafa7c558048a2415dc9d6f8aca576650
Jupyter
9,346
272
# %% import os import numpy as np import seaborn as sns # for plots import pandas as pd from pathlib import Path import matplotlib.pyplot as plt from scipy import stats as sps # to calcualte confidence intervals, etc from adjustText import adjust_text # to adjust the text labels in the plots (pip install adjustText) fr...
a36b669caaaa42f3f6d18691693c4f555625d6bb38e26a350a39cbbe7e53207e
Jupyter
9,357
241
# %% [markdown] # # Nuclei Image Segmentation Tutorial # %% [markdown] # In this tutorial, we will implement a [UNet](https://arxiv.org/abs/1505.04597) to solve Kaggle's [2018 Data Science Bowl Competition](https://www.kaggle.com/c/data-science-bowl-2018). The challenge asks participants to find the location of nuclei...
9527537b7d60f79b7bbf027a87e9770f827e8a3041abe987bdb260eb18a0de85
Jupyter
9,360
212
# %% [markdown] # ## Introduction # If you would like to add a reaction to the databases which does not currently appear in the database you should follow these steps here. If you already have initial and final frames, you can avoid this step and instead please see https://github.com/facebookresearch/fairchem/blob/4164...
8121b0cb31a128d7e399a4ef15835d5fa3afdac8a0f863738e48b548a6701166
Jupyter
9,397
227
# %% import numpy as np import pandas as pd from collections import Counter # %% # Read msigdb immune signatures DATA_PATH='/n/holystore01/LABS/price_lab/Users/mjzhang/scDRS_data' def parse_term(term): study_name = term.split('_')[0] reg_dir = term.split('_')[-1] gs_name = term.replace('%s_'%study_name,...
da0cb31a1f7890c52875c1df44742d1350dafc6ec50a354da04c1926ee07e1ad
Jupyter
9,402
317
# %% [markdown] # # Table of Contents # # 1. [Import & Set Up](#import_everything) # 2. [Load data](#load_data) # 3. [Get the parameter that's being adjusted and the values](#Get_the_parameter_thats_being_adjusted_and_the_values) # 3. [Plot learning rate vs. within pair correlation (pre- and post-learning)](#Plot_lear...
515aa502ad7ebf8289333b406961dd99aab0ba9e9e3fdfbd57157bb79ece32d2
Jupyter
9,425
306
# %% [markdown] # # Table of Contents # # 1. [Import & Set Up](#import_everything) # 2. [Load data](#load_data) # 3. [Get the parameter that's being adjusted and the values](#Get_the_parameter_thats_being_adjusted_and_the_values) # 3. [Plot learning rate vs. within pair correlation (pre- and post-learning)](#Plot_lear...
4f9ae8a682506a7763ac1971cdc0289a281fba683223714cf3502574fb19e1d8
Jupyter
9,430
231
# %% import numpy as np import config.config as config from validation import Validation from Environment import Env from Agent_RNN_EKF import * from pathlib import Path import sys; sys.path.append('../analysis/') from my_utils import reset_seeds # %% def training(datapath, seed_number, Actor, Critic, task='gain', ...
a7f1b8f276c61e14f5662ee46634e50024fb626a5378261df3679778e6df9efe
Jupyter
9,434
179
# %% [markdown] # <div align="center"> # # <a href="https://ultralytics.com/yolov8" target="_blank"> # <img width="1024", src="https://raw.githubusercontent.com/ultralytics/assets/main/yolov8/banner-yolov8.png"></a> # # # <br> # <a href="https://console.paperspace.com/github/ultralytics/ultralytics"><img src...
872b0acdfd6a98d4bd824b3c56a40d494b313fc8a4fba344bcfd6a3f21acb6dd
Jupyter
9,448
252
# %% [markdown] # This Notebook/demo uses spike interface, [here is how to install Spike Interface](https://spikeinterface.readthedocs.io/en/latest/installation.html) # %% import sys from pathlib import Path import spikeinterface as si import spikeinterface.extractors as se import spikeinterface.preprocessing as spre...
d3dea55299dded621be3cd2e009e3737638677649154ea1167c4c368f5b28532
Jupyter
9,488
401
# %% import argparse import sys import os import logging import numpy as np from scipy.stats import pearsonr from scipy.stats import norm from scipy.optimize import minimize sys.path.insert(0, '../network') from network import * from transfer_functions import ErrorFunction, ReLU, LIF from sequences import Sequence fr...
479508debcc17eefe5c807025b5c267b71a31050195cd91e78c2a4df052e41a3
Jupyter
9,498
220
# %% %matplotlib inline import numpy as np import matplotlib import matplotlib.pyplot as plt from skimage import data from batchgenerators.dataloading.data_loader import DataLoaderBase # %% [markdown] # ## Let's create a DataLoader that gives us some image. Your implementation will vary depending on your dataset. He...
dad0b7b69a10af59a549b9474198e297a67208c6afe658481a3ba97274976f17
Jupyter
9,532
407
# %% [markdown] # # Forward Simulation of 2D VEP model at Source level # %% import os import sys import time import errno import time import timeit import numpy as np import numba from numba import jit import matplotlib.pyplot as plt from matplotlib import colors, cm # %% import warnings warnings.simplefilter("ign...