sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
7422dba4b2317a07fa12799900b88122d86d0922599e9c624f86fd113825a1ec
Jupyter
10,567
303
# %% [markdown] # # Testcase: Private Attributes # %% [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 exported fil...
509f9cf7e49f702a1f20313d15496d9a9d74924ce14f1752709b9ee6cc24ac9a
Jupyter
10,665
377
# %% 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.colors as colors import matplotlib.pyplot as plt %matplotlib inline from mayavi import mlab mlab.init_notebook() _,_,luts1,luts2 = np.lo...
edd0cfeb3a336c45822f94f2fc9a28de37ecf2f9c60f8836f0e514ffa79c99ff
Jupyter
10,677
130
# %% [markdown] # $\textbf{Lead Author: Adele Myers}$ # # Inspired by: Guigui, Miolane, Pennec, 2022. Introduction to Riemannian Geometry and Geometric Statistics: from basic theory to implementation with Geomstats. # %% [markdown] # Dear Learner, # # Welcome. This is a set of notebooks designed to teach you how to ...
77eaa700c67903689ca8b365dfa5810b0a494ecef8e26119b59cd6989c8bcaa5
Jupyter
10,718
442
# %% [markdown] # # Introduction # # ### This notebook serves as a tutorial for using `gUtils` functions. # # ### gUtils is an R package developed to extend the functionality of GenomicRanges, the R package which stores genomic data and represents genomic locations in the Bioconductor project # %% [markdown] # ## ...
ba6ea0fedc3ea6e2ef3a05026b9fda36a839402769ca8a615f90b1c653e69964
Jupyter
10,731
282
# %% import os os.chdir('../') import DeepPurpose.DTI as models from DeepPurpose.utils import * from DeepPurpose.dataset import * # %% X_drug, X_target, y = load_process_KIBA('./data/', binary=False) drug_encoding = 'Morgan' target_encoding = 'CNN' train, val, test = data_process(X_drug, X_target, y, ...
719ec42f6c85095e89720e4ff4c37c7ef72aee8a20f654d6d13a98b9468937c1
Jupyter
10,733
256
# %% [markdown] # # Samples per feature dependence # %% [markdown] # How do power, association strength as well as errors in weights, scores and loadings depend on sample size? # %% [markdown] # ## Setup # %% import numpy as np import pandas as pd import xarray as xr import scipy.linalg import scipy.stats from scipy...
0fb7620f760edcba43824379da35c1f78628e8ef9cce48e22c8a2db5e43380bd
Jupyter
10,799
303
# %% [markdown] # # Testcase: Private Attributes Initialization with Both Options # %% [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...
0eae2eb8981a2c758c8219a38a0a6e4f7e85cdcf156bc6bc5589ed2cf1f48c46
Jupyter
10,855
442
# %% import os, glob from tqdm import tqdm import numpy as np from skimage.io import imread, imsave import matplotlib.pyplot as plt from matplotlib import rc plt.rcParams.update({'font.size': 20}) # plt.style.use('dark_background') rc('pdf', fonttype=42) import funcs import imp imp.reload(funcs) # %% folder = os.pat...
851ab6fc59b5f25bb9925d74acc6244a4a8aae253445352c0abd2fd72e6e952e
Jupyter
10,855
310
# %% import os os.chdir('../') import DeepPurpose.CompoundPred as property_pred from DeepPurpose.utils import * from DeepPurpose.dataset import * from sklearn.metrics import mean_squared_error, roc_auc_score, average_precision_score, f1_score import numpy as np from ax.plot.contour import interact_contour, plot_co...
e5f17cc1cadfd5dcefe4fc158c98ad86d7f501798ba4124d4cae2c369b23d975
Jupyter
11,056
301
# %% # calculates for each metastases pair # average impacts log-ratios (brain/extra-cranial) on pathways # median impact log-ratios of all altered genes on all genes # average impacts log-ratios on each gene # # # from the altered genes of all met. pairs # as basis for other scripts # saved for later: metPa...
4408769d5755c10f538ead09f09e0ba65e66de5d0feb61ec872176debcdefc81
Jupyter
11,076
304
# %% [markdown] # ### This notebook is for reproducing the paper results' subsection "Optimal $\gamma$-fused structure-function modular organization" and generate the panels of the figure S1. The goal of the notebook is to test different initial parcellations (iPAs), and comparing the results. We will select for the re...
af35acb4032141884eb4333f882eddea18f589f396ab03387c981cfc1622f43c
Jupyter
11,106
272
# %% [markdown] # # Churn Prediction - Predicting when your customers will churn # --- # %% [markdown] # ## 1 - Introduction # # A software as a service (SaaS) company provides a suite of products for Small-to-Medium enterprises, such as data storage, Accounting, Travel and Expenses management as well as Payroll mana...
2e4bb2d3dd0ef2d73c1ba54c2d727c1c48c51f02562a069aa9083380e419279b
Jupyter
11,223
306
# %% # calculates for each metastases pair # average impacts log-ratios (brain/extra-cranial) on pathways # median impact log-ratios of all altered genes on all genes # average impacts log-ratios on each gene # # # from the altered genes of all met. pairs # as basis for other scripts # saved for later: metPa...
69b31c273267605f054b5013969b11623cca48e962c46687766019cfc4aca2d5
Jupyter
11,338
240
# %% [markdown] # # Workflow Interface 104: Working with Keras # [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/intel/openfl/blob/develop/openfl-tutorials/experimental/workflow/104_Keras_MNIST_with_GPU.ipynb) # %% [markdown] # In this tutorial, we ...
4b913f226d52dd8eede7df6dcb8967e6ad31fce0b581aa71554e793d14ba1418
Jupyter
11,361
280
# %% [markdown] # ## Yeast gene trees in BHV space # # One of the biggest challenges in phylogenetics is that different data sets based on different genes can yield different phylogenetic trees. In an article published in *Nature* in 2003, Rokas et al. found that when data sets contain a small number of genes, it is e...
9e032452603fbbd159513dade67b7dab38cf8e2c72654934d4e5d101cd5b19f9
Jupyter
11,362
265
# %% [markdown] # # Samples per feature is a key parameter # %% [markdown] # We have used "samples per feature" as an effective sample size parameter to account for the fact that datasets can have hugely varying number of features. To see if this is justified we here plot sample-per-feature dependencies of several met...
6db2c30715d8ea129bf4d50612242f7f10c16941d162dc7997cb5f77cc729701
Jupyter
11,547
297
# %% # violin plots of impact log2-ratios, Suppl. Figure S4 # cluster heatmaps of log-ratio impacts on pathways, Figure 3 # Suppl. Table S7: log-impact and log-expression per pathway # Suppl. Table S9: expression impact quadrants shared pathways # %% library(ggplot2) library(gridExtra) library(pheatmap) library(scales...
24ac9cbbb1146e155172c48535fe4603547ea5a09f7847188f712de6907053bb
Jupyter
11,550
271
# %% [markdown] # # Clean Re-run — Notebook 3 of 3: Latency + Export benchmark (T4) # # **Run on an NVIDIA T4** (Runtime ▸ Change runtime type ▸ T4 GPU) — the deployment proxy. Run *after* # Notebook 1 has saved weights to `CLEAN_RERUN/phase1/*/run/weights/best.pt`. # # For every format this reports latency **broken ...
8b75a60e0af71e8d98c92badda95396b08d4a86a410e67bcc234249808b9e5f5
Jupyter
11,554
297
# %% # violin plots of impact log2-ratios, Suppl. Figure S4 # cluster heatmaps of log-ratio impacts on pathways, Figure 3 # Suppl. Table S7: log-impact and log-expression per pathway # Suppl. Table S9: expression impact quadrants shared pathways # %% library(ggplot2) library(gridExtra) library(pheatmap) library(scales...
50dfbdc31a6a536c8a246099938f42b85fa6f308f18d85ca1ed6060f6bda565e
Jupyter
11,635
310
# %% [markdown] # # Experiment 2: NHP Mapping (2D) # # In this tutorial, we will use the `optim-neurostim` library to perform a larger 2D optimization. # We will use a non-human primate (NHP) dataset, where stimuli delivered in the NHP motor cortex are associated with arm/hand muscles responses. # We will optimize the...
d6128b2df4e91abfbd2e3c72fdffd11b113c49ed0fc23ece7e6aa75d2ecfea8b
Jupyter
11,725
308
# %% 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, '...
215278f9f8f7729864eff1dcd80bac6c361dc14dd3ad0609dd243165b8c57b5f
Jupyter
11,744
285
# %% [markdown] # # Credit Risk - Computing the speed of repayment of loans # %% [markdown] # --- # %% [markdown] # ## 1 - Introduction # # Credit Risk refers to the likelihood that a borrower will not be able to repay a loan contracted by a lender. Thus throughout the years, financial institutions have developed va...
071820878a9c1aaf5baad14f78ada697dbae5d9c1b92a9d9adb80c0df97fd640
Jupyter
11,752
216
# %% [markdown] # # Density based retrieval relevance # # An important aspect of using embeddings-based retreival systems like Chroma is knowing whether there are relevant results to a given query in the existing dataset. As application developers, we would like to know when the system doesn't have enough information ...
ec8182a9b606534db1e1e3f47a9b26027c3c2b5fa0f571f3dc7266960aa36a24
Jupyter
11,758
352
# %% # Author: Guoqing Bao # School of Computer Science, The University of Sydney # Date: 2019-12-12 # GitHub Project Link: https://github.com/guoqingbao/Pathofusion # Please cite our work if you found it is useful for your research or clinical practice import os # os.environ["CUDA_VISIBLE_DEVICES"]="0" import gc gc.e...
1d6e651ffe5110d0662dc8ad4a4f8b08afdae8fc3c4e665106da65a7d9bc5ba0
Jupyter
11,773
283
# %% [markdown] # # Dimensionality Reduction of VGG16 # In this tutorial we will present how to create a reduced version of VGG16 using the techniques described in the article # # ''A Dimensionality Reduction Approach for Convolutional Neural Networks'', Meneghetti L., Demo N., Rozza G., https://arxiv.org/abs/2110.09...
d4f9fd3ea2ff2162534ea3df7aac41cd90666de30d9095643bc52dd3a9859083
Jupyter
11,905
295
# %% [markdown] # # Experiment 4: Spinal stimulation (4D) # # In this tutorial, we will use the `optim-neurostim` library to perform a 4D spinal stimulation spatio-temporal optimization. # # Here we will use a toy dataset based on real data. Stimuli delivered in the rat spinal cord, once at each step, are associated ...
8211dd45dd6bff14c6dc432c3fe6f70d31167d1006eaabc1179471bdb2b9a7ed
Jupyter
11,972
384
# %% 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...
9472afd504514a5f767a48fda1b91f02646dc74d83f772f519979cf83ae35cfd
Jupyter
12,004
353
# %% import numpy as np import pandas as pd # %% # -*- coding: utf-8 -*- # ---------------------------------------------------------------------------------------------------------------------------------- # A program for computing the CLB distance and the Jaccard index for different solutions and comparing them. # A...
427896710b8e922bd835374cbd9ba746e8548c66872f7ad46ab0de4374b4bb6e
Jupyter
12,024
386
# %% import os, glob, tqdm from skimage.io import imread, imsave import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from matplotlib import rc import matplotlib as mpl import scipy.ndimage as ndi from skimage.metrics import structural_similarity as ssim from skimage.metrics impo...
306f0a1fd3c422ecefd0e053b165b7c8ad7f4775b1b9fe7a5ccda0b8607b0a23
Jupyter
12,070
352
# %% import glob import importlib import os import random import sys from itertools import combinations import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import prettypyplot as pplt import scipy import seaborn as sns from matplotlib import ticker import extq # %% sys.path.insert(1, "../../....
9aab8a1f3b2ef594c697694cb1b02dbbf48f2fad9dad8826f478265d203bb44d
Jupyter
12,159
266
# %% [markdown] # ### Full implementation of GP-BO optimization of neurostimulation # %% [markdown] # @file OptimizeNeurostim.ipynb # %% [markdown] # @authors Rose Guay-Hottin https://github.com/RoseGH20 # Marco Bonizzato https://github.com/mbonizzato # @version 1.0 / June 2021 # %% [markdown] # The cod...
8e428ea05667223211d41376dd49aa8460e81f28d61ee7e29903e6bf43530f04
Jupyter
12,197
347
# %% [markdown] # # Scikit-learn Linear Regression Tutorial using Workflow Interface with Ridge Regularization # # # This tutorial demonstrates how to train a linear regression model using scikit-learn with Ridge regularization on a dataset, leveraging the new OpenFL Workflow Interface. The Workflow Interface provide...
58e24bc273abbedace1af0721752bcacd840087ef9ed5dbca87b5a11effae061
Jupyter
12,226
379
# %% [markdown] # # Testcase: Reference # %% [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 exported file will be...
4cdaffcb5762f294c4220f51895b695afc73c966f9735728d2780f9150d280f3
Jupyter
12,260
289
# %% import pandas as pd import seaborn as sns import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from matplotlib.lines import Line2D from copy import copy from itertools import product import sys from pathlib import Path sys.path.append(str(Path.cwd().parents[1] / 'project_utils')) # sys.path....
b2fd60511963bc897ec59386ad92956d244ae2b0298d290966f5d6a89448db6b
Jupyter
12,284
310
# %% [markdown] # # Experiment 3: Cortical Stimulation on Treadmill (2D) # # In this tutorial, we will use the `optim-neurostim` library for a 2D optimization. We will use a rat dataset, where stimuli delivered in the rat motor cortex are associated with leg muscles responses. We will optimize the xy position of the s...
1e1d9ec636089bbf26829cbda98243b47eef754efefa1ba1d1cd3987df33ccb7
Jupyter
12,317
408
# %% [markdown] # # Small network (one E- and one I-populations) # # We use this notebook to generate the data and plots focusing on the generation of gamma oscillations through E-I coupling for the revision of the eLife manuscript. # # There are several cases: # * [Disconnected](#disconnected_case) network of E-I, r...
28227345ef2c28dd31f789813567542c2e3c2ac16eee5ce23053661a82be7405
Jupyter
12,606
287
# %% import sys sys.path.append('../') from scipy import stats import pandas as pd import seaborn as sns; sns.set(style='ticks', context='paper', rc={'font.size': 6, 'axes.titlesize': 7, 'axes.labelsize': 7, ...
260d35adce09a2c81b78fe9b159a21ebe7a95b67ec7eab624aace2136f3e83a1
Jupyter
12,663
291
# %% [markdown] # # Analysing the frequencies of introgressed alleles in *D. sechellia* using IntroUNET # # This notebook takes us through the steps of our analysis of the results from running IntroUNET on our *D. simulans* and *D. sechellia* data set. Before we start here, we have already run IntroUNET on these data ...
147059834b7d553a90c58d6f9d90cfd61296c0ef10875d61845d17f87cae07c2
Jupyter
12,744
372
# %% [markdown] # # Data on Manifolds # %% [markdown] # Lead author: Nina Miolane. # %% [markdown] # We import the backend that will be used for geomstats computations and set a seed for reproducibility of the results. # %% import geomstats.backend as gs gs.random.seed(2020) # %% [markdown] # Finally, we import th...
9d05d742f19d49cbe939ec2ec3098129bc0d06cb86e8fcb30f5a9907d84ef682
Jupyter
12,853
268
# %% [markdown] # # # Workflow Interface 104: Working with Keras on CPU # [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/intel/openfl/blob/develop/openfl-tutorials/experimental/workflow/104_Keras_MNIST_with_CPU.ipynb) # # ## Training a CNN on CPU u...
54dbc16d55f62dc1a5d11226141be157843efc5eb1ae097f451d9036e56cf275
Jupyter
13,000
453
# %% from scanpy_recipes import sc import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # %% [markdown] # # *Aggr : # ## RV18001 - RV18002 - RV18003 # ## RV19001 - RV19002 - RV19004 - RV19005 - RV19006 - RV19007 - RV19008 - RV19009 # %% [markdown] # ## Loading data # %% ac =...
948795300f1516760f5432a4f3a64b2c9d0b7160d68f185ab635a580c8a8759b
Jupyter
13,010
392
# %% [markdown] # # Sample size calculator # %% [markdown] # We develop a sample size calculator for CCA and PLS. We had previously generated datasets for a variety of parameters and determined the corresponding required sample sizes to bound statistical power and error metrics. To circumvent the computational cost as...
728b93105bafd5af31fc90d9281c5943d5d49a34a69a91df6b56c3c4557b274a
Jupyter
13,034
338
# %% %matplotlib inline from pathlib import Path import h5py from types import SimpleNamespace from joblib import delayed, Parallel import numpy as np import pandas as pd from scipy import signal pd.set_option('display.max_rows', 30) import matplotlib.pyplot as plt import seaborn as sns sns.set(style='whitegrid', pa...
ad6fa7c25316985046b92bb0329f47c44691ba2879a516d1cd073f2f9256aebf
Jupyter
13,042
447
# %% # Before Starting to run the code, please upload following files: # - embed_proteins.py # - rnn_gru.pt # - data_BacLAB.csv # # - data_nonBacLAB.txt # # - data_BacLAB_plus_nonBacLAB.txt # # - List_kmers.csv # # - model_classifier.h5 # # - model_classifier.json # # %%...
5786e5d2dd94d8d04488d19904858419f84fd8d67890e77e50b69e8b195cc84d
Jupyter
13,116
280
# %% [markdown] # Here we shall learn the stochastic dynamics of the one-dimensional Fredrickson-Andersen (FA) model, consisting of binary spins on a lattice, through observation of a single trajectory. The trajectory of length $T$, obtained through kinetic (or continuous-time) Monte Carlo, consists of configurations a...
c99daefa9321e074486ec109961f50b8666153ba5148c22543deed99c590f335
Jupyter
13,120
381
# %% [markdown] # # Federated PyTorch UNET Tutorial using Workflow API # %% # Install dependencies if not already installed %pip install torch %pip install matplotlib %pip install ray # %% # Import installed modules import PIL import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as op...
aa1828f8f54f304cbecdd4ee6c5abf366376fdf821219dd3bcece211e0fb8dde
Jupyter
13,147
558
# %% import sys import importlib import gc import glob import random from itertools import combinations import numpy as np import sklearn import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib import ticker import seaborn as sns import prettypyplot as pplt import pyemma import mdtraj as md import M...
b5b8bb240090c712db6c0e51ca0ba27230060d445b11cbf3f31b76958eacb4ba
Jupyter
13,150
397
# %% [markdown] # # Loadings and Cross-loadings # %% [markdown] # We explore how many samples are necessary to obtain stable cross-loadings, and compare to loadings. # %% [markdown] # ## Setup # %% import warnings from matplotlib import MatplotlibDeprecationWarning warnings.simplefilter('ignore', MatplotlibDeprecati...
011483e06845df3ee20af0ad066dc913da644183f75733e02c4991936f20ef9c
Jupyter
13,184
404
# %% [markdown] # # Notebook to illustrate fish identification with a classifying CNN # %% [markdown] # Showing that neural networks can distinguish between individuals in a population of fish. We will use miniCARP, a restricted version of a library of fish images prepared by the lab as part of **[idtracker.ai](http:/...
254f75324f23b45f5e7a4c114320ed1c9d0b856448d069767438a2f1d9c57cdf
Jupyter
13,222
354
# %% [markdown] # # Experiment 1: Rat Mapping (2D) # # In this tutorial, we will use the `optim-neurostim` library for a 2D optimization. # We will use a rat dataset, where stimuli delivered in the rat motor cortex are associated with leg muscles responses. # We will optimize the xy position of the stimulation in orde...
6f19034de57afef0aeee43bfb14a02d50785a28adc2857970ed66a308292eab8
Jupyter
13,292
352
# %% [markdown] # # Notebook to illustrate fish identification with contrastive learning # %% [markdown] # We will demonstrate that an embedding CNN (ResNet18) can be trained to differentiate fish images from various animals. For this, we will use miniCARP, a simplified version of a fish image library developed by the...
d40ba89a1f5be5045fc1b9e0dadf39c8a261eeffeaca81c34bebdd5bcaf625ff
Jupyter
13,327
294
# %% [markdown] # # notebook to score all the datasets with the CoVES vs others # - create table of unsupervised methods (CoVES, ESM-IF, proteinMPNN, BLOSUM, EvCouplings) # - scoring of AT 3pos, AT 10pos, GFP, AAV, GRB2 # %% from os import listdir import matplotlib.pyplot as plt import matplotlib.gridspec as gs from s...
3f980d6fc74fd5b2ec842b904c012b090f85e02bfb1bc8aa244175a1463e18bd
Jupyter
13,337
424
# %% 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 pandas as pd import scipy as sc import numpy as np sys.path.insert(0, CODE_REPO_PATH) import read_data as rd import behaviour as ...
c0ab9d2ebde937c02dc1b1abb672bbab6629e8d639dc34acba17f314fe1c544b
Jupyter
13,347
365
# %% [markdown] # # Predictive Maintenance - Predicting when a machine will break # %% [markdown] # --- # %% [markdown] # ## 1 - Introduction # # We will consider that a manufacturing company uses many machines to build their final products. The factory is using IoT technologies via smart sensors to measure and save...
3936687a9854f0ab742903ba5370a6519e63d3b8619b60db1937e2007064dc98
Jupyter
13,365
594
# %% import pandas as pd import scipy.io as io import matplotlib.pyplot as plt import matplotlib.pylab as pylab from matplotlib.ticker import MaxNLocator import numpy as np from matplotlib import gridspec import seaborn as sns import pingouin as pg import copy import glob import os # %% from datetime import datetime, ...
e1bfeef70decdfd26c658f72c2dfc9f9f1a3890f0bca346393517bce4068d034
Jupyter
13,474
340
# %% import numpy as np import seaborn as sns import matplotlib.pyplot as plt from sklearn.manifold import TSNE import argparse import torch import torch.nn.functional as F import torch.nn as nn import numpy as np import copy import random import time import math import utils import models # %% def setup_seed(seed):...
326c3e290be0e7a1d93c3c072277ed294534f72674a5a758ae869468736f5721
Jupyter
13,495
351
# %% [markdown] # # Workflow Interface 201: Using Ray to request exclusive GPUs # [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/intel/openfl/blob/develop/openfl-tutorials/experimental/workflow/201_Exclusive_GPUs_with_Ray.ipynb) # %% [markdown] # I...
9ce9dd249d986dd1570ad82061dc959e5498b89c7eec259d5c0f22edaf344c98
Jupyter
13,507
457
# %% [markdown] # # Onslow et al. 2014 # # ### A Canonical Circuit for Generating Phase-Amplitude Coupling # # Replicating the Onslow model, consisting of a set of coupled E-I populations generating theta-nested gamma oscillations. The authors used the Wilson-Cowan formalism. Equations and parameters are given in the...
9f954be4a621f7fcc147e9d18c96a099aa0ecd72b1811cf190064c2e3e1264b4
Jupyter
13,512
386
# %% %matplotlib inline import matplotlib.pyplot as plt import time import numpy as np from six import iteritems import shelve from scipy.ndimage.measurements import label import h5py import PIL import os from IPython.display import Image, display from IPython.html.widgets import interact, fixed from IPython.html impo...
7ef228ecdd67eaa623a9a1e1da74bc24d22eb161045cf4987f403f586956ec7c
Jupyter
13,523
358
# %% library(parallel) library(pheatmap) library(xlsx) # %% basePath = "/data/bcu_projects/MelBrainSys_PostdocProject_Gruetzmann/publications/2022-my-MelBrainSys-paper/scripts-etc-for-publication/" myPath = paste0(basePath,"regNet/validation-cohort/") setwd(myPath) # %% localRlibs = paste0(basePath,"conda/lib/R/libra...
2539547156be961102cbda4fcb63692895712be9e1154da30a72eee31ef81d74
Jupyter
13,535
358
# %% library(parallel) library(pheatmap) library(xlsx) # %% basePath = "/data/bcu_projects/MelBrainSys_PostdocProject_Gruetzmann/publications/2022-my-MelBrainSys-paper/scripts-etc-for-publication/" myPath = paste0(basePath,"regNet/validation-cohort/") setwd(myPath) # %% localRlibs = paste0(basePath,"conda/lib/R/libra...
2bda7bcb045dc50e1105ceebdcb7b29de1a3b10a6fe0de68e916e49f8b6ef461
Jupyter
13,639
387
# %% [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/decoding_position_example.ipynb) # %% [markdown] # # Decoding position from firing rates # # In this example we show how position can be deco...
40e4a859aaa4565dcc661c5623ce136cb95185a7b0f8cbacc31efb14a7cb30a4
Jupyter
13,643
410
# %% [markdown] # # Load packages # %% suppressWarnings(suppressMessages(library(gUtils))) suppressWarnings(suppressMessages(library(BSgenome.Hsapiens.UCSC.hg19))) Sys.setenv(DEFAULT_BSGENOME = 'BSgenome.Hsapiens.UCSC.hg19::Hsapiens') # %% [markdown] # # Create GRanges for examples # %% ## instantiate GRanges object...
80639ae51567f2f2260da8ec4b4e0162f0c31dfa82ff8c4c5480dd7fe93a599f
Jupyter
13,688
390
# %% [markdown] # # 1: Import required packages & functions <a class="anchor" id="chapter1"></a> # %% # clear all variables for i in list(globals().keys()): if(i[0] != '_'): exec('del {}'.format(i)) #suppress future warnings -- not really a good idea from warnings import simplefilter # ignore all future ...
c6517d4ce2f9aee38d31cf2288983ab2de15f86ba7b7d81239421f1f53bcffe3
Jupyter
13,690
390
# %% library(tidyverse) # %% preprocessed_list = qs::qread('preprocessed_list.qs') outliers_list = qs::qread('outliers_list.qs') # %% outliers_tbl <- outliers_list %>% enframe(name = "Name", value = "Sample") %>% unnest(Sample) %>% rename(name = Sample, failed = Name) outliers_tbl # %% do_regional_pca_plot =...
a4892324700bb313151834da8102e5815df72a5f2e395dac69d3a94ed496e17b
Jupyter
13,727
345
# %% import pickle import matplotlib.pyplot as plt import numpy as np # %% def obtain_TPR(TP,FN): TPRs = [] for i in range(len(TP)): TPR = TP[i]/(TP[i]+FN[i]) TPRs.append(TPR) return TPRs def obtain_TNR(TN, FP): TNRs = [] for i in range(len(TN)): TNR = TN[i]/(TN[i]+FP[i]) ...
e3cffbbb9910e0dcdb420d4a46aac297af34f7aa45f9ccdb62fcd2e180d7c355
Jupyter
13,838
438
# %% [markdown] # <a href="https://colab.research.google.com/github/katemartian/Photometry_data_processing/blob/master/Photometry_data_processing.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # <h1><center>Photometry data processin...
d25d7ed7b5907ddece9cbf94fe49f4ee6f1cd2bf4116fbaef4547620e39bf431
Jupyter
13,902
309
# %% [markdown] # # Workflow API Tutorial: Keras MNIST # %% [markdown] # This tutorial demonstrates how to train a model using TensorFlow Keras on the MNIST dataset, leveraging the new OpenFL Workflow Interface. The Workflow Interface provides a novel way to compose federated learning experiments with OpenFL, enabling...
38fd9b7a744291671b41f2bced3f1764b33b239479429b7f68e5f107b281b5f9
Jupyter
13,930
231
# %% [markdown] # # DeepPurpose Deep Dive # ## Tutorial 1: Training a Drug-Target Interaction Model from Scratch # #### [@KexinHuang5](https://twitter.com/KexinHuang5) # # In this tutorial, we take a deep dive into DeepPurpose and show how it builds a drug-target interaction model from scratch. # # Agenda: # # - Pa...
3f9e3cc0a982e0c4b8071a57aff7f53317b5adea0313d2778bb0e0070c50949e
Jupyter
14,024
484
# %% [markdown] # # Supervised logistic regression fit # # This notebook fits a per-residue mutation effect model to combinatorial variant effect datasets. # # ## Inputs: # - measured effects of combinatorial protein variants, ie. # - X is a one-hot encoding of the amino acid variant # - Y is the measured v...
baff4306d29632b4540c5de39e5ff11d6c5a4897237e3b346559616b3e8e0912
Jupyter
14,142
385
# %% library(tidyverse) library(readxl) library(lubridate) library(patchwork) # Set the print width to 120 characters options(width = 120) # %% meta_0010 = read_xlsx('../data/metadata/0010/20190130 BW, FI - Collab with Tune Pers Group.xlsx', range = "B1:I19") %>% # Fill in missing Box IDs fill(`Box ID`) %>% # ...
44c12cff3b6171aeac3f406fdae715684be020d8f19b848f7edc1a7fbbf740d1
Jupyter
14,253
497
# %% 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...
b6928f82e27c94cfb498025c5c93eaf5cd7fc8d4b3b18194027b1e165d16bf04
Jupyter
14,296
398
# %% [markdown] # ## Trees, Trees, more Trees, oh my!! # # In this notebook, we demonstrate how one might use some of the learning algorithms implemented in geomstats to apply to a non-Euclidean geodesic metric space. # # We choose BHV space, which is the space of unrooted phylogenetic trees without pendant edges. # ...
3a254234fb23a89b58de7157d2756edce26550b68fa86cdc1679c0830244cc80
Jupyter
14,298
290
# %% [markdown] # # Workflow Interface 102 - Held out aggregator validation # [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/intel/openfl/blob/develop/openfl-tutorials/experimental/workflow/102_Aggregator_Validation.ipynb) # %% [markdown] # In this...
7500fd0e477222960b99dac0037fbb98f2dd428dd8d42da8a084132b277895fd
Jupyter
14,386
425
# %% [markdown] # # Image classification with Swin Transformers # %% !pip install -U tensorflow-addons # %% [markdown] # ## Setup # %% import matplotlib.pyplot as plt import numpy as np import tensorflow as tf import tensorflow_addons as tfa from tensorflow import keras from tensorflow.keras import layers import os ...
29d708065a785cb7d61b15de0663513b2d3ae49ad1cfc1c0323eb1a3f50a7ffb
Jupyter
14,416
453
# %% [markdown] # # this notebook is for the aggregation of all the clusters across subjects # The idea, then is to create a data frame containing each clusted unit, the snr, av. fr, isi viol, unique id within for the animal, an unique id within the cross session match. Other identifiers, session, tetrode, depth. # %...
d47d142bd181bb297c18e73adbb69347832b49a1009864376434733e83227ffd
Jupyter
14,422
321
# %% [markdown] # # notebook to score all the datasets with the CoVES vs others # - create scoring of AT 3pos, AT 10pos, GFP, AAV, GRB2 using unsupervised methods (CoVES, ESM-IF, proteinMPNN, BLOSUM, EvCouplings) # - # # # ### Inputs: # - the per protein residue preferences inferred from structure in order to calcul...
e8fd859fc15743492d13b5fcc8e0430a158a9727f9b487c8d993a1f3827460d5
Jupyter
14,578
533
# %% import numpy as np import matplotlib.pyplot as plt %matplotlib inline import os, sys sys.path.append(os.getcwd()+"/..") from rnn_scripts.utils import * from rnn_scripts.model import RNN from scipy.optimize import fsolve from rnn_scripts.utils import green_blue_colours cls = green_blue_colours() # %% # Load a mo...
1a84cf6aa25fe3aad8cd2f9fb510aa1adaf4c0c951ad9ee33d83d1d95c61fa3d
Jupyter
14,597
439
# %% %matplotlib inline import matplotlib.pyplot as plt import numpy as np import pandas as pd import os from glob import glob import seaborn as sns from PIL import Image np.random.seed(123) from sklearn.preprocessing import label_binarize from sklearn.metrics import confusion_matrix import itertools import keras from...
9f4833c3ce0d06705bda476cd08d245ba4ed273e01dd75226a9a1bceb6fb1e9e
Jupyter
14,615
443
# %% %matplotlib inline import matplotlib.pyplot as plt import numpy as np import pandas as pd import os from glob import glob import seaborn as sns from PIL import Image np.random.seed(123) from sklearn.preprocessing import label_binarize from sklearn.metrics import confusion_matrix import itertools import keras from...
8627e6dbca89b86245bc1093ba00d72070616ed5702eb12c40fdd8c4fabfecab
Jupyter
14,692
346
# %% [markdown] # <a href="https://colab.research.google.com/github/armiro/Covid19-Detection/blob/master/hands_on_covid_cxnet.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Up and running with COVID-CXNet # %% [markdown] # ## R...
78076c1255ae3b73c5262d5178df9a95b339f7200dcccd433b334f64fe78c4b3
Jupyter
14,762
360
# %% [markdown] # # MNIST Example: Workflow API # %% [markdown] # Welcome to the first OpenFL Experimental Workflow Interface tutorial! This notebook introduces the API to get up and running with your first horizontal federated learning workflow. This work has the following goals: # # - Simplify the federated workflo...
2b89caa07e976616a54d8f3fc54c2693a61421d2ed672f4f709aecb31e1befa9
Jupyter
14,846
442
# %% [markdown] # # Federated Runtime: 301_MNIST_Watermarking # %% [markdown] # This tutorial is based on the LocalRuntime example [301_MNIST_Watermarking](https://github.com/securefederatedai/openfl/blob/develop/openfl-tutorials/experimental/workflow/301_MNIST_Watermarking.ipynb). It has been adapted to demonstrate t...
8058e5dc0b2b2efcbf5857c8e33a2cee74f4421581b04f2157a7813d634946e2
Jupyter
14,900
375
# %% [markdown] # # Federated Evaluation with MNIST # %% [markdown] # ### Introduction # # Welcome to the first OpenFL Federated Evaluation Workflow Interface tutorial! This notebook demonstrates OpenFL capability of running your first horizontal federated evaluation workflow. This work has the following goals: # # ...
10b8647cd714ff9942f91989f2443ef08859c495353950bc3305d4d5aca755fb
Jupyter
14,961
408
# %% import matplotlib.pyplot as plt import numpy as np import pandas as pd from sksurv.compare import compare_survival from sksurv.nonparametric import kaplan_meier_estimator # %% MOCA_THRESHOLD = 24.5 MMSE_THRESHOLD = 28.5 # %% significant_prs = [ 'GRS__savage_2018__intelligence.txt', 'GRS__lee_2018__cognit...
0e58d946231bf8b6ef30a981a0894d0f2a5c9e0e5ccb2e6b1db1bd987e45f267
Jupyter
14,982
487
# %% [markdown] # # TA generalization error estimate, and ROC curves # - to rewrite # %% [markdown] # # TA linear and nonlinear fits # %% import tensorflow as tf import keras from scipy.sparse.linalg import lsmr import statsmodels.api as sm import random from scipy.stats import pearsonr, spearmanr import importlib...
62530c4a4a03b2f1a15e773b3a87eaf2faa3f7fa3c7b272983893a4c0e9f8f97
Jupyter
14,994
630
# %% import sys import importlib import gc import glob import random from itertools import combinations import numpy as np import sklearn import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib import ticker import seaborn as sns import prettypyplot as pplt import pyemma import mdtraj as md import ...
496b133cd97d153523741213f18b25846f7ef80a358356f837c81c804e3bdcbd
Jupyter
15,066
289
# %% [markdown] # # 2. Loading the Transport Properties ANNs models # # 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). # # Thi...
e0e8ec27c1f0b261a8eeb9312f8f7c3f825cd0306eb79f45083805303d8097c3
Jupyter
15,330
369
# %% [markdown] # # Workflow Interface 101: Quickstart # [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/intel/openfl/blob/develop/openfl-tutorials/experimental/workflow/101_MNIST.ipynb) # %% [markdown] # Welcome to the first OpenFL Experimental Wor...
e97bfaded5c36322aff68134906f545a038bcfc8fb36b9057e97a76fb0bfee6a
Jupyter
15,548
759
# %% [markdown] # ## Population coding # # Figure 3 # %% [markdown] # ### Data creation # %% import secorder as sec import matplotlib.pyplot as plt import numpy as np import scipy.stats as stats import os path = os.getcwd() + '\\figures\\' # %% def smooth_data(nt, tau, scale): x = scale*np.random.randn(nt+100)...
b152ebffeaa8c5e6467e7d3db93474cf50b2bef8542aed22d75ff695411ccd4d
Jupyter
15,549
527
# %% %matplotlib inline %load_ext autoreload %autoreload 2 import os from visualize import PyramidVisualizer, get_dataset, display_image, simple_visualizer, visualize_residuals from metroem.aligner import Aligner from corgie import residuals # %% "hi" # %% checkpiont = "starge3_base" #checkpoint_folder = "/usr/people...
f083262fc9311cdece71cbad0d2d9e5e0b342f0ea84d1fd0e8d67e8515409872
Jupyter
15,741
453
# %% #### ASSOCIATED DATA CAN BE FOUND AT ZENODO REPO FROM https://doi.org/10.1186/s13059-023-02846-8 #### import numpy as np import math import matplotlib.pyplot as plt import csv import pandas as pd from scipy import stats import re from scipy.stats.stats import pearsonr #import rpy2.robjects as robjects import rand...
cf9cddc2be0c8e607844e7dc7a09a9603e04e9ff6b609b338c664a27552c8e81
Jupyter
15,773
369
# %% [markdown] # # Dimensionality Reduction of SSD300 # # In this tutorial we will present how to create a reduced version of SSD300 using the techniques described in the article : # # L. Meneghetti, N. Demo and G. Rozza, "A Proper Orthogonal Decomposition Approach for Parameters Reduction of Single Shot Detector Ne...
837f5a717b58634ffd4ebe730f116a67ea4ad59e4f6beba6e02f16093f89aa5e
Jupyter
15,795
397
# %% ## loading package import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib import pylab import seaborn as sns from sklearn.metrics.pairwise import cosine_similarity from statannot import add_stat_annotation import matplotlib as mpl from scipy import stats, cluster import glob impo...
3f61f8fa7b5cdb3b883945488baf62becc9fc175c584586f1de3a8d748eabbf4
Jupyter
15,908
417
# %% import numpy as np import seaborn as sns import matplotlib.pyplot as plt from sklearn.manifold import TSNE import argparse import torch import torch.nn.functional as F import torch.nn as nn import numpy as np import copy import random import time import math import utils import models # %% def setup_seed(seed):...
7e7a3748b75deea951736647d8cf6fa6553e4771d42fb096c194c69a327b6dfd
Jupyter
15,958
417
# %% [markdown] # ### Linear Regression Tutorial using Workflow API # # This notebook demonstrates a linear regression tutorial using the Workflow Interface. The key steps include: # # 1. **Model Definition**: # - Define a linear regression model with Mean Squared Error (MSE) as the loss function. # # 2. **Synth...
0d4abd9a18a52674c5189d02b9feedcc36fa168eee6caba5b583616115cf9778
Jupyter
16,037
412
# %% library(DESeq2) library(tidyverse) library(ggplot2) # %% counts = read_csv('../03_build_meta_and_counts/counts.csv') %>% column_to_rownames('gene') counts %>% head # %% meta = read_csv('../03_build_meta_and_counts/meta_long.csv') %>% filter(!is.na(name)) %>% column_to_rownames("name") %>% mutate(name = rownames(...
7c4c8915d70bf9ec4045080532bdf75d7d7035113edeabde0b2e75c34cd0553f
Jupyter
16,090
379
# %% [markdown] # # setup # %% %matplotlib inline import eelbrain as eel import numpy as np import scipy, pathlib, importlib, mne, time, os, sys from tqdm import tqdm import matplotlib.pyplot as plt import preprocessing as pre import models as md import plotting from pathnames import * importlib.reload(pre) importlib....
f9e2803655c8db16c7b0f4c84f9070fd95b3ee7b9957ff24b2f1b0852f71fb5a
Jupyter
16,138
380
# %% [markdown] # # Information geometry # %% [markdown] # Lead author: Alice Le Brigant. # # Disclaimer: this notebook requires the use of the ```numpy``` backend. # # ## Table of contents: # * [Introduction](#sec1) # * [Geometry of normal distributions](#sec2) # * [Geometry of beta distributions](#sec3) # * [Learn...
45af17f0beb319bd96b215ec76f97ebcdf7061df071f34f91ab37e34dce1c1af
Jupyter
16,163
497
# %% [markdown] # # Hand gesture classification with EMG data using Riemannian metrics # %% [markdown] # Lead author: Marius Guerard. # # In this notebook we are using EMG time series collected by 8 electrodes placed on the arm skin. We are going to show how to: # # - Process these kind of signal into covariance mat...