sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
e4ddcea904aa2b89b259b6ec72ff376c7fe3b724372a0e4370ded81b55bf447d
Jupyter
16,236
359
# %% [markdown] # # Comparing model performances # # Our objective is to evaluate the performance of the seq#-classifier on simulations created using a range of evolutionary models. For this, we generate figures depicting the learning curves of the pre-trained models. Furthermore, we employ various metrics and sanity ...
1f4ca06610115b294995fb2de0dc3904abeca44ef48125f78c8c1c3617fc0d15
Jupyter
16,285
415
# %% [markdown] # ## Cavalli (MAGIC Cohort) Data Analysis and Integration with GSVA # Used for Figure 3 # # Author: Max Gold # %% import matplotlib.pyplot as plt import numpy as np import os import pandas as pd import seaborn as sns from sklearn.cluster import AgglomerativeClustering from scipy import stats import te...
1e353b4de9f0df2464d7c22e022ad8ebea2d4c9cc66014d0e74ca37c36f99dd6
Jupyter
16,327
344
# %% [markdown] # # Clean Re-run — Notebook 1 of 3: Training + Accuracy (Ultralytics models) # # **Run this on an NVIDIA A100 GPU** (Runtime ▸ Change runtime type ▸ A100, High-RAM). # Do **not** train on a T4 — too slow for 30 training runs. Keep the *same* GPU type for the whole notebook. # # This notebook trains **...
b62e65decdf6de4eff98e2a660f1e0b59d7b5b732e7582cb8783ff3f8ecbc9d5
Jupyter
16,394
502
# %% import os os.environ['R_HOME'] = '/Library/Frameworks/R.framework/Resources' # %% import numpy as np import pandas as pd from rpy2 import robjects import statsmodels.api as sm # %% [markdown] # # Load results for each cohort # %% [markdown] # ### DIGPD # %% df_digpd = pd.read_csv( 'Revision/Johann/With int...
afacd9f4508d44e01fd82b51686ae1e148401da6a2f56dfe7c569b2f01444a07
Jupyter
16,790
465
# %% import pandas as pd import scipy.io as io import matplotlib.pyplot as plt import matplotlib.pylab as pylab import numpy as np from matplotlib import gridspec import seaborn as sns import datetime from datetime import datetime, timedelta import pickle import glob # %% import matplotlib.dates as dates from scipy im...
90658d6fa8663ddaf5705738339c3237cfe7687f2976d43e58bf90c4803c567d
Jupyter
16,951
501
# %% import torch import numpy as np import matplotlib.pyplot as plt from scipy.optimize import curve_fit from scipy.stats import linregress import tqdm import pandas as pd import sys sys.path.append('./../..') from dynaphos import utils # %% # plt.rcParams.update({ # 'axes.labelsize': 'large', # 'font.size':...
598c71432096b96a79b91235cbbc05bd2cae9efe93f578c28f6002696385304c
Jupyter
16,984
369
# %% [markdown] # # How to prepare your own dataset for training an Object Detector # # %% [markdown] # ## Gathering data # First of all you need data. To train a robust classifier, we need a lot of pictures which should differ a lot from each other. So they should have different backgrounds, random object, and varyi...
90e94a08ff09d5a40584c3bb2f10fac382cb3c5bf441bbfa0cbe58fef0184588
Jupyter
17,108
232
# %% [markdown] # # SHIP: network building # # This tutorial will cover the essentials for building a network object in SHIP. # # ### Note on SHIP: # Spiking (neural network) Hardware In PyTorch is an emulation platform intended for hardware-based SNNs, based on compact models to mimic the behavior and functionalitit...
81d77d6fa0aa33fcbac87a1947fba4e470fefda1977518568b2096e908675627
Jupyter
17,165
413
# %% # predicts expression of the test data with the trained and random networks # predicts expression of MelBrainSys data # creates correlation plots: predicted and original expression: # Figure-2-gene-expr-prediction-correl.png # %% library(ggplot2) library(gridExtra) library(parallel) # %% basePath = "/data/bcu_...
9104edb89a70646a8b006442ed8fabb62b3dacd5caaf2024e679a676211aab6f
Jupyter
17,273
481
# %% [markdown] # # FederatedRuntime 101: Quickstart with MNIST # %% [markdown] # Welcome to the first **FederatedRuntime** Tutorial ! # This tutorial demonstrates how to deploy Federated-Learning experiment based on workflow interface on a distributed computing infrastructure. # # Data scientists often start by dev...
bbe0991a50252cec6ab2fdbb87424dd266100fabd85add1ea5167a8cf700537c
Jupyter
17,279
544
# %% # %% [markdown] # Todos: # # 1) dataset: splitting by folds, and traiing on particular folds only? # vs. # training on all data, irespective of fold. get the same training dataset as the pevious 2 papers. take the redo-database 19436 structures for training of which 300 are held out. # # - sample sequences ran...
20172fe339cc5e3f32595fbed2f7e8341103b49a4a776b7773853de43e3ce15e
Jupyter
17,361
368
# %% %matplotlib inline # %% [markdown] # # Import modules # %% from skan.pre import threshold from tqdm.notebook import tqdm from skimage.io import imread import os, re, glob from scipy.spatial.distance import cdist import pandas as pd from math import sqrt import numpy as np import skimage.io import matplotlib impo...
ef00b35a02c7b9eaa71c613cd512c6703fe5f10f6d452bc0bf0d3148dd740cbb
Jupyter
17,365
484
# %% # creates # - connectivity table for paper - SupplTable-S5-connectivity-stats.xls # - DotPlot of connections - SupplFigure-S5-source-target-interactions.png # - known melanoma driver gene ranking in networks - SupplTable-S6-key-driver-ranks.xls # %% library(ggplot2) library(gridExtra) library(parallel) librar...
00d52fc986c81e0747fb581287dade9fa7afcee1598daa25d01de405bf937a83
Jupyter
17,385
495
# %% # %% # %% # creates # - connectivity table for paper - SupplTable-S5-connectivity-stats.xls # - DotPlot of connections - SupplFigure-S3-source-target-interactions.png # - known melanoma driver gene ranking in networks - SupplTable-S6-key-driver-ranks.xls # %% library(ggplot2) library(gridExtra) library(...
2c1ea9481f5f00b570b0814c3561c46a0dee15acd04b98c55ba3a36ed1f3b28f
Jupyter
17,486
506
# %% # 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 numpy ...
96a989d2e758d5d004606b19c44935650ffcbcb5089711a6145d5dbbe0246890
Jupyter
17,703
438
# %% [markdown] # # Workflow Interface # ## Fine-tuning neural-chat-7b-v3 using Intel(R) Extension for Transformers and OpenFL # [![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/LLM/neur...
47cf3ac6164a22afa84bfc5f6e2d5e8726229adec053b6e681b74f5f63f10f98
Jupyter
17,760
460
# %% [markdown] # # Computing with triangular shapes in Kendall framework # %% [markdown] # Lead author: Elodie Maignant. # # David G. Kendall first took interest into triangular shapes while studying random alignments of points in archeology and related fields [[KK1980]](#References). Following this statistical stud...
b1f0646039bda246af6fb264f959fe0bc695607eee5c602762f431ad5a650e01
Jupyter
17,773
372
# %% [markdown] # # Clean Re-run — Notebook 2 of 3: D-Fine-Nano (official repo) # # **Run on an NVIDIA A100** (same as Notebook 1). D-Fine uses its own repo + COCO format, so it can't share # the Ultralytics environment — run it in a **separate Colab session** from Notebook 1. # # Produces D-Fine's Phase-1 metrics, p...
d7083f8a8323484d691513906210f1e75937ce66d1825f8f0b10fe66aaa89f1d
Jupyter
17,777
571
# %% import numpy as np import os import pandas as pd from scipy.stats import median_abs_deviation, chi2 import seaborn as sns import statsmodels.api as sm # %% [markdown] # # Data preprocessing # %% df_digpd = pd.read_excel('DIGPD data/dig_pd_2019_11.xlsx') df_pca_digpd = pd.read_csv('Ancestry/Genetic ancestry (pri...
115d2b01a40e95ec5c4b9358c2ac7f3b6b852e7a6d5f11baf9ccbf565e1261df
Jupyter
18,014
511
# %% [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 figures S2 and S3. The objective of the notebook is to represent the tree of the optimal parcellation and compu...
39be05f432a59622b6a49551c7c0d6d10136629e065450f4ba5d4835f646552a
Jupyter
18,020
627
# %% %load_ext rpy2.ipython # %% # %%R # install.packages('MuMIn', repos='http://cran.us.r-project.org') # %% import pandas as pd import numpy as np import pickle import matplotlib.pyplot as plt import matplotlib.pylab as pylab from matplotlib import gridspec import seaborn as sns import pingouin as pg import copy im...
e4f9a722b7fb1dd66402ceee8d8640c0c4c7e8f08727a7c88215b23776817bc0
Jupyter
18,062
589
# %% [markdown] # # Implement your own Riemannian Geometry # %% [markdown] # Lead author: Nina Miolane. # # Geomstats provides several Riemannian manifolds in its `geometry` folder. Yet, the manifold that you are interested in might not be available there. # # This notebook shows how to use Riemannian geometry on an...
1ea59d53baf0be15a7a74e897119ee6c7644b9617d971865e807dc22b1dd89a8
Jupyter
18,084
405
# %% [markdown] # # Workflow Interface 104: MNIST XPU # [![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_MNIST_XPU.ipynb) # %% [markdown] # Welcome to the OpenFL Experimental Workfl...
37695354502ffd3ed64a8558d4407bc668a63424d694b5b703b786ca9b8fb73e
Jupyter
18,148
410
# %% [markdown] # # Interactive notebook on how to build and examine neurodynamic models in PyRates: # # ## Setting up a Jansen-Rit-like cortical microcircuit using the Montbrio population model # # In this example, it is your task to use PyRates to build a new model of a cortical microcircuit, fusing the architectu...
538b5a99e38be520dfc8391daa5623edf675d6b19847e33f25a7a0ed0e4d9aca
Jupyter
18,159
480
# %% # make figures for Thalamic model # %% import numpy as np import scipy as sp from scipy import stats import matplotlib as mpl import matplotlib.pyplot as plt import pandas as pd import brian2 import pickle import copy mpl.rcParams['pdf.fonttype'] = 42 mpl.rcParams['ps.fonttype'] = 42 mpl.rcParams['svg.fonttyp...
eede07d65a461b3ae554f3992c3db2230028cfccf48ff1281d099715122a2635
Jupyter
18,261
554
# %% # gvp: implement gvp on pdb dataset for residue analysis # %% from constants import AA3_TO_AA1 # %% from pdbHelper import get_atoms_neighbor # %% # import numpy as np import torch import torch.nn as nn from gvp import GVP, GVPConvLayer, LayerNorm # %% GVP # %% torch.cuda.is_available() # %% [markdown] # # ...
255049d244601327f139baa3ac68eaf12feb6810d2baf3c9cdfa60462fa414e6
Jupyter
18,310
562
# %% [markdown] # ## SimpleForestPlot # %% 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 %autoreload 2 %load_ext watermark %watermark -n -u -v -iv -w -p gra...
e4fcc4dbc7dce4fc4f6115450b4f07587b24a096c2c4efb59a66a07299c5b9ca
Jupyter
18,336
593
# %% [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...
fc7bf33ce22d8b224b44900dfc588718727be420478b122c811be33a9f059ff5
Jupyter
18,386
670
# %% 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 ivac import extq...
472010a031f54b05f9a0183c376c5c94063ecc6567c918b93bca8f63e4ca7cd5
Jupyter
18,438
466
# %% [markdown] # # **SKIN DISEASE PREDICTION MODEL** # ### *version4* # %% [markdown] # ## Importing necessary modules and libraries # %% %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.see...
27734d3bb84d569e3e1f03321f54d4b7eb2fd396601ef9217df7e42102fe9dd2
Jupyter
18,441
285
# %% [markdown] # # SHIP: creating a model for a component # # This section focuses on the definition of a component's model. # # ### Note on SHIP: # Spiking (neural network) Hardware In PyTorch is an emulation platform intended for hardware-based SNNs, based on compact models to mimic the behavior and functionalitit...
8e049e64f5057591788306b4db0fa02ccdd4cc148c953cf29d9ae63982eac1aa
Jupyter
18,567
446
# %% [markdown] # # Shape analysis of curves with the Square Root Velocity metric # %% [markdown] # Lead author: Alice Le Brigant. # # In this notebook, we demonstrate how to compute distances between shapes of curves in $\mathbb R^2$ and $\mathbb R^3$ using the [`discrete_curves.py`](https://github.com/geomstats/geo...
f4b46a59376e71dc4f2bc257bcc1e41db36ce7a1d7145b102ca5ec4b9d060fe3
Jupyter
18,743
423
# %% [markdown] # # Interactive notebook on how to build and examine neurodynamic models in PyRates: # # ## Setting up a Jansen-Rit-like cortical microcircuit using the Montbrio population model # # In this example, it is your task to use PyRates to build a new model of a cortical microcircuit, fusing the architectu...
fcfb4c60ad9701b1632c6c447dd5e2fabad1eef5e2c22056c0c387e566820694
Jupyter
18,821
538
# %% import os, pandas as pd, numpy as np, json, matplotlib.pyplot as plt from natsort import natsorted from tqdm import tqdm os.chdir("./src/lib/hand_predictor") from utils.hand.api import ffmpeg4format, mp_kpts_generator, mp_kpts_preprocessing, hand_pos_inference, model_pred_severity from utils.hand.api import hand_...
71828f8f98699581701b61da124e51ad3aff1c6c0c9a48f37a036b56bbe725a3
Jupyter
18,854
568
# %% import os os.chdir('../') import DeepPurpose.CompoundPred as models from DeepPurpose.utils import * from DeepPurpose.dataset import * from sklearn.metrics import mean_squared_error, roc_auc_score, average_precision_score, f1_score # %% # %% def run_Morgan(fold_n, balanced): train = pd.read_csv('./aic...
c91d09ad82c77f5c71ed5e72524783e2345f59984e205de10459e44f42bdf14a
Jupyter
18,949
746
# %% [markdown] # # EDA and data split for Propedia # # Positive data downloaded from http://bioinfo.dcc.ufmg.br/propedia/download # %% import os import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns # %% DATA_DIR = '/home/ec2-user/SageMaker/efs/data/Propedia' # %% os.path.di...
55f6ff3117aa51a37b56052d19f02252148fb503711c2f25d5dbb64bd94d51b5
Jupyter
19,048
578
# %% import copy import glob import os import sys from typing import Any, Callable, NamedTuple, Sequence import dill as pickle # %% os.environ["CUDA_VISIBLE_DEVICES"] = "0" # %% import flax import flax.linen as nn import jax import matplotlib as mpl import matplotlib.pyplot as plt import mdtraj as md import numba as...
db35906795fbb332d2fc1ea3af4ad0497b3fcd3c611e4443e17b9752ccd3bb57
Jupyter
19,143
605
# %% import numpy as np import pandas as pd import leidenalg import scipy.sparse as sparse from scipy.io import mmread from scipy.stats import pearsonr, pointbiserialr from anndata import AnnData import anndata import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from matpl...
7ca6c917fa1d93225be1401ba71d1fd82fdfc90a43745f753086931836fd4b3f
Jupyter
19,308
533
# %% from google.colab import drive drive.mount('/content/drive') # %% # load data import numpy as np from numpy import genfromtxt path = '/content/drive/MyDrive/DeepOmics/Project1/Proposed/Simulations/Linear/S1/' X1Train = genfromtxt(path + 'X1Train.csv', delimiter=',') X1Test = genfromtxt(path + 'X1Test.csv', delimi...
9bbe4c747d3beac0fb5ef2849ec278ba455f9d1faa7a296e2d899840c4b45912
Jupyter
19,562
616
# %% import numpy as np import os import pandas as pd from scipy.stats import median_abs_deviation, chi2 import seaborn as sns import statsmodels.api as sm # %% [markdown] # # Data preprocessing # %% df_iceberg = pd.read_excel('ICEBERG data/export_iceberg_31052021.xlsx', sheet_name='Neuropsy') df_pca_iceberg = pd.re...
1da8c2a475c1ea704c045b1e08ec4355f0e83f038fd2730a925a6831fb890096
Jupyter
19,630
542
# %% [markdown] # # Towards biologically plausible phosphene simulation for the differentiable optimization of visual cortical prostheses # %% [markdown] # This notebook showcases some of the functionalities and applications of the phosphene simulator # %% [markdown] # ## 0. Imports # %% [markdown] # ##### Import s...
711f65829d994a4d22bbad67892bec9ea8833eb5fea5f671b9441297cb9928b8
Jupyter
19,648
558
# %% [markdown] # # Analysis of prior literature # %% [markdown] # Here, we look into CCAs reported in the literature. We analyze sample-size dependence of reported association strengths and estimate the corresopnding weight errors. # %% [markdown] # ## Setup # %% import numpy as np import pandas as pd import xarray...
d258d384677f598f01d45a1a9ed9532aaec8ea66ab3e7edf44607033c38b280d
Jupyter
19,701
413
# %% import numpy as np import pickle import os.path from os.path import isfile, join from os import path,listdir import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from scipy import stats import matplotlib.patches as patches from pathlib import Path from tifffile import imread, imsave !pip insta...
05ffb0c76dc9dc5330cdaafe27a8029625d25ec660e9a73ca5f569baa64a17db
Jupyter
19,855
612
# %% import numpy as np from matplotlib import pyplot as plt from scipy.optimize import curve_fit from scipy.stats import t, sem from scipy.stats import linregress import scipy.signal from tqdm.autonotebook import tqdm as notebook_tqdm import pandas as pd import seaborn as sns import sys sys.path.append('../..') imp...
9e4a42e0233ac9db6642235fe8ae50e54be32cf1de77f7f1d119a1fd61797e00
Jupyter
19,991
574
# %% # run locally on mac # or on O2 with dd_tf2_mamba # %% [markdown] # # to sample from gvp # %% [markdown] # # 1 sample sitewise from gvp # %% import pandas as pd import numpy as np import matplotlib.pyplot as plt import random import sys import importlib sys.path.append('/n/groups/marks/users/david/github/pare...
76fa79b6e944ba1c6421cf9117bec24cbc7152cc8d21e0cd039bd4a19c704e5f
Jupyter
20,122
716
# %% import numpy as np import os, sys sys.path.append(os.getcwd()+"/..") from rnn_scripts.train import * from rnn_scripts.utils import * from rnn_scripts.bifurcations import * from tasks.seqDS import * from scipy.cluster.vq import kmeans2 import matplotlib.pyplot as plt %matplotlib inline import matplotlib.patches as...
df541053d8a931d04060eadae7fb24f4fad48eb0d9a2ea1409c3740ed50662ae
Jupyter
20,199
525
# %% [markdown] # # Federated Fine-Tuning of Phi-4 Using OpenFL # %% [markdown] # # In this tutorial, we demonstrate how to fine-tune Microsoft's Phi-4 model in a federated learning workflow. # # We will fine-tune **Microsoft's [Phi4](https://huggingface.co/microsoft/phi-4)** model using a diverse dataset such as [M...
ffa668de3d664330884fd482b4f4c1e640343b581b45fa9bce60624c08a0e389
Jupyter
20,237
680
# %% %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 import cloudvolume as cv import matplotlib.pylab as plt import torch import tq...
6743ba8f734cc93231ac50285f1f33ab81d40abc38e982be849b4c4b3d6b598a
Jupyter
20,362
554
# %% # Fig S2-S3-S4, 4 # %% [markdown] # # Datasets Class and Data Analysis # %% [markdown] # In our work we investigated 5 datasets that contain several types of movements and diverse brain areas recorded (for more information about datasets check our paper or table "**Datasets Used in Study**" in github repositor...
d47546732bf8ebf60400f443fedff7963014ad89bc0e46424f9c05d7b488f3c4
Jupyter
20,383
526
# %% [markdown] # # setup # %% %matplotlib inline import eelbrain as eel import numpy as np import scipy, pathlib, importlib, mne, time, os, statsmodels, statsmodels.stats.multitest from tqdm import tqdm import matplotlib.pyplot as plt import preprocessing as pre import models as md import plotting from pathnames impo...
5e98a79b33e12a155d68da259da18645cd02516422416c68af6d637e82ef9941
Jupyter
20,395
664
# %% [markdown] # # Weight errors # %% [markdown] # How much do estimated CCA and PLS weights vary across repetitions, depending on sample size? # %% [markdown] # ## Setup # %% import warnings from matplotlib import MatplotlibDeprecationWarning warnings.simplefilter('ignore', MatplotlibDeprecationWarning) warnings.f...
a2a1da867dfc9e15af72ff14c734489faf6295c5e054a24f225fc3c12b341a9c
Jupyter
20,428
491
# %% ### 0.0 loading package import numpy as np import pandas as pd #import modin.pandas as modin_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 ...
026520a6c722a55a86d87a20f818500227deb7136adcbfd447d74edee7a7bc60
Jupyter
20,470
607
# %% BASE_PATH = '../../dynaphos-core/' import os import sys sys.path.append(BASE_PATH) import logging import dynaphos import torch import matplotlib.pyplot as plt import numpy as np import cv2 import ipywidgets as widgets from dynaphos import utils from dynaphos.cortex_models import get_visual_field_coordinates_fr...
24cc15cab58a21e2d265c1a7ffb0fe29c09b77508f058d8c55f042ef414c6791
Jupyter
20,484
641
# %% %matplotlib inline %load_ext autoreload %autoreload 2 import matplotlib 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 json import sys import operator from scipy import ndimage from pdb import...
eacb063facf59cee6607d0efc3fd24e6559d2c94090580f3ca75a48a236397e8
Jupyter
20,563
474
# %% [markdown] # # Hyperbolic Embedding of Graphs and Clustering # %% [markdown] # Lead authors: Thomas Gerald and Hadi Zaatiti. # # ## Introduction # %% [markdown] # From social networks to parse trees, knowledge graphs to protein interaction networks, Graph-Structured Data is endemic to a wide variety of natural ...
6ea28175b67d819bcddf4db854e6829805d70a5d652b0f2d18903f8c3dba4815
Jupyter
20,747
537
# %% [markdown] # # **SKIN DISEASE PREDICTION MODEL** # ### *version4* # %% [markdown] # ## Importing necessary modules and libraries # %% %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.see...
45be5eaeb73142a51155c2ed000d82d98edf291499523ba911818bf6d1209b41
Jupyter
20,775
517
# %% 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 import astropy.stats.circstats as astropy_circstats sys.path.insert(0, CODE_RE...
d1fbebdbf8341bf14d0b3ab0c9be78bdf2de0b0b50eca2b8cbc9e578be411458
Jupyter
20,807
764
# %% [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 example GRanges and data.table objects # %% ## insta...
fe166b023306e437b5a6be483e1aa417926b89882da94bc979ea80726bae7486
Jupyter
20,823
662
# %% import numpy as np import pandas as pd import leidenalg import scipy.sparse as sparse from scipy.io import mmread from scipy.stats import pearsonr, pointbiserialr from anndata import AnnData import anndata import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from matpl...
e52de91dc67913cef3f2f1f4d96c568cffccd3f5b5750fbbf9d3b3ecb5c921e7
Jupyter
20,888
675
# %% %matplotlib inline import sys import os import shutil import time import traceback from pathlib import Path import h5py import json import pickle from types import SimpleNamespace from importlib import reload from scipy import signal, stats, spatial, ndimage from scipy.interpolate import interp1d from sklearn im...
53bb903186141f01a576f6784bfb7219f4e70a5547bdbe2707a9d789a0ca46dd
Jupyter
20,898
607
# %% [markdown] # # 1. Data organization # %% !pip install numpy matplotlib pandas pymare myforestplot pypcurve scipy # %% import numpy as np import matplotlib.pyplot as plt import pickle, os, gzip, pandas as pd data_dir = '../Data' # %% [markdown] # ## 1.1 Study characteristics # %% df_study = pd.read_excel(f'{dat...
14c53f181eeee29e6721d399f47bcfb6f1ad58059c79a71f20a5e38f0f608fb4
Jupyter
20,959
631
# %% BASE_PATH = '../../../dynaphos-core/' import os import sys sys.path.append(BASE_PATH) import logging import dynaphos import torch import matplotlib.pyplot as plt import numpy as np import cv2 import ipywidgets as widgets from dynaphos import utils from dynaphos.cortex_models import get_visual_field_coordinate...
aa61cdf68db6ea9053a31afdd647281bdf5e404aac85b1b6058de063ba9dabf9
Jupyter
20,998
866
# %% %matplotlib inline import sys import os import shutil import time import traceback from pathlib import Path import h5py import json import pickle from types import SimpleNamespace from scipy import signal, stats, spatial from scipy.interpolate import interp1d from sklearn import linear_model as lm import nump...
031ba6fe4c337360d7e0bae92b9a03b2fc7593f921fdf5aaf35b580cebe79c9a
Jupyter
21,689
665
# %% import pandas as pd import scipy.io as io import matplotlib.pyplot as plt import matplotlib.pylab as pylab import numpy as np from matplotlib import gridspec import seaborn as sns import pingouin as pg import copy # %% from scipy import stats from scipy import sparse # %% from functools import partial # %% impo...
caeb1ad5ef875892c838d20286960fbed2a8a77bafd180a52942c0383358af88
Jupyter
21,767
587
# %% [markdown] # ## Forking # ChromaDB now supports forking. Below is an example using forking to chunk and embed a github repo, fork off of the collection for a new github branch, and apply diffs to the new branch. # %% ! pip install chromadb --quiet ! pip install tree-sitter --quiet ! pip install numpy --quiet ! pi...
40cf2ba94d3b0a6d1b9b5943d8fc929b990dbac36f2e98046b52e9c1f15ec5cb
Jupyter
22,247
434
# %% ## 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...
71ebede7f59c243434f16b16a5844e5c19e4cedcf57ede8edcfcf3298dbdcc69
Jupyter
22,309
913
# %% [markdown] # ## second order invariance # # Figure 1 and 2 # %% import matplotlib from tqdm import tqdm import secorder as sec import numpy as np import matplotlib.pyplot as plt import scipy as scp import scipy.stats as st import torch from torch import optim np.set_printoptions(precision=4) import pandas as pd...
a0bc6c490148d758c4c036ee9a45aad185eba15ddc3cde6752e4783dcb768e39
Jupyter
22,344
686
# %% import pandas as pd import scipy.io as io import matplotlib.pyplot as plt import matplotlib.pylab as pylab import numpy as np from matplotlib import gridspec import seaborn as sns import pingouin as pg import copy # %% from scipy import stats from scipy import sparse # %% from functools import partial # %% impo...
bbcdb2cdb9f3713d9066bf068a73823053c99456b457a8cdbb62812b0ad7e029
Jupyter
22,463
643
# %% 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 wind_task as ...
3f8090c57ddc3379874b13c13a52fbcacf7440c7d15f9d08c58ab82e7769be9d
Jupyter
22,496
729
# %% %load_ext rpy2.ipython # %% import pandas as pd import scipy.io as io import matplotlib.pyplot as plt import matplotlib.pylab as pylab import numpy as np from matplotlib import gridspec import seaborn as sns from datetime import datetime, timedelta import pickle import glob from tabulate import tabulate from tqdm...
ce2546e35fe922947c75d911edf689df764ea04901bff39de39c37f9760d48a3
Jupyter
22,539
638
# %% # extend the vanilla gvp with partial charge information, hydrogen atoms. # %% [markdown] # # get atom3d res dataset # %% import gvp from atom3d.datasets import LMDBDataset import torch_geometric from functools import partial import gvp.atom3d import torch.nn as nn import tqdm, torch, time, os import numpy as...
d6ec8d23713002789251b1ab91dfdc5e5ef2c578d1cd2095eb8b9a0d070747c1
Jupyter
22,654
609
# %% import os import nibabel as nib import pandas as pd import numpy as np import matplotlib.pyplot as plt import time import pickle import random from scipy import ndimage from skimage.filters import threshold_otsu from skimage.measure import label, regionprops from skimage import transform from skimage.transform ...
a653c4514a169750f4a071ac2d199b0428af848eb45af49f77cff8e110b65b0a
Jupyter
22,815
501
# %% [markdown] # # Workflow Interface 103 - Cyclic Institutional Incremental Learning # [![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/103_Cyclic_Institutional_Incremental_Learning.ip...
d026d901ca1916f2b252ffdaeb433924bfa9ef376d6ba900cc144fd39f3ed8ed
Jupyter
23,224
567
# %% [markdown] # # Hierarchical Classification with COVID-CXNet # # %% [markdown] # ## Importing libraries and run custom functions # %% import glob, numpy as np, cv2, matplotlib.pyplot as plt, tensorflow as tf, copy from tensorflow.keras.preprocessing.image import load_img, img_to_array, ImageDataGenerator from t...
58357aa5afc9ac100f0eb8269ef7f44ca666e1e66ae84049b67eb7215aceb879
Jupyter
23,254
469
# %% ## 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...
e9930b6def99c0e808564b624a16043ef030f07964244cbb7e09cb914d6b7b81
Jupyter
23,351
599
# %% # 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> # ----------------------------------...
2c6f29b196a0da52e68d4803eb1afda36cac038e2cd8f73ef3a0bd98e03ff7d2
Jupyter
23,388
694
# %% [markdown] # # Imagenet results # # + classification performance metrics # + AUROC # + AUPRC # + Accuracy # + Sensitivity # + specificity # %% import os import pickle import time import gc import torch import torch.nn as nn import torchvision.models as models import torchmetrics from t...
b78f7f30215ae1f10b9d399857b32041475cc3007236d2676b3f64ec55379074
Jupyter
23,645
653
# %% # Importing necessary libraries import os import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from tensorflow import keras from tensorflow.keras import layers from tensorflow.keras.optimizers import Adam from tensorflow.keras.utils import Sequence from keras_nlp.layers imp...
f1544834b6e48e98f826f0b053266c6f70173b0a2d33f33fcf19d447ae3a5fcc
Jupyter
23,679
511
# %% [markdown] # # SHIP: inference # # This part of the tutorial explains in more details how to use SHIP to perform the system simulation after building a network. # # ### Note on SHIP: # Spiking (neural network) Hardware In PyTorch is an emulation platform intended for hardware-based SNNs, based on compact models ...
9b831c3fd599aff7757626decef650e233f8f9748a12023131c40e5fda3026e6
Jupyter
23,739
565
# %% # produces # Figure 5: circos plots of source and target genes # SupplTable S10 target genes mean impact and expr. ratios per group # SupplFigure S8 target gene candidates scatterplot ompact vs. expression # %% library(reshape2) library(ggplot2) library(circlize) library(scales) # for alpha semi-transparency libr...
dd0d4baffbc13f8dd4f540c0266d4f24bc7b0bdb666ee96abdb39f820d55e379
Jupyter
23,746
568
# %% # produces # Figure 5: circos plots of source and target genes # SupplTable S10 target genes mean impact and expr. ratios per group # SupplFigure S6 target gene candidates scatterplot ompact vs. expression # %% # %% library(reshape2) library(ggplot2) library(circlize) library(scales) # for alpha semi-transparen...
7c195bc43c2655751395f447aec253f717cd9bb0c8c596f6b0b8dbf0eaaa7c41
Jupyter
23,792
573
# %% [markdown] # <a href="https://colab.research.google.com/github/armiro/COVID-CXNet/blob/master/multiclass_covid_cxnet.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Multiclass Classification with COVID-CXNet # # %% [markdo...
51a067fbb26f1ebba737e7bd54798557801831964a279c8af82ef2e90f815bac
Jupyter
23,893
704
# %% %load_ext rpy2.ipython # %% import pandas as pd import scipy.io as io import matplotlib.pyplot as plt import matplotlib.pylab as pylab import numpy as np from matplotlib import gridspec import seaborn as sns import datetime from datetime import datetime, timedelta import pickle import itertools import glob # %% ...
68263f389a2435fd6f1523f7e04d9a253b8952c0ff43700bae78c00517338b16
Jupyter
23,905
704
# %% %load_ext rpy2.ipython # %% import pandas as pd import scipy.io as io import matplotlib.pyplot as plt import matplotlib.pylab as pylab import numpy as np from matplotlib import gridspec import seaborn as sns import datetime from datetime import datetime, timedelta import pickle import itertools import glob # %% ...
2b4cd98d468d7b5088828c7b48ea281fdd6f3e28c56317a6df00b36c8784c2ba
Jupyter
24,123
986
# %% [markdown] # # EDA and split for ProtCID data # %% import os import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns # %% DATA_DIR = '/home/ec2-user/SageMaker/efs/data/ProtCID/JaredJanssen_Benchmark' # %% !ls -l {DATA_DIR} # %% # !ls -l {DATA_DIR}/non-physiol # %% # !wc -l...
ffd73559b8c27e503f1f1e353f6fc1df48dd51dc71e5225cbaeccac307bed865
Jupyter
24,438
644
# %% [markdown] # # Workflow Interface 401: Synthetic non-IID Dataset with FedProx Optimizer # [![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/401_FedProx_with_Synthetic_nonIID.ipynb) ...
05380bd289f7ef373dcf33ac0e372a50651a213eedc9d1765226c12fddd3b6a8
Jupyter
24,572
626
# %% import numpy as np import matplotlib import matplotlib.pyplot as plt from matplotlib import cm import yaml import sys sys.path.append('./../..') import os BASE_PATH = './../dynaphos-core/' sys.path.append(BASE_PATH) from dynaphos import utils import pandas as pd import seaborn as sns from scipy.optimize impo...
1527b77d10851f8821573364f24a43cea4573ecde6235fcbb954714c11c7d2e8
Jupyter
24,993
687
# %% [markdown] # # Secure Aggregation with MNIST # %% [markdown] # ### Introduction # # In Federated Learning (FL), Secure Aggregation (SecAgg) is a technique that allows the participants to collaborate on the central model without revealing their individual contributions (local model updates). The goal is to allow ...
847cbbea1155dd6dea72e1afe2bceef8f82a8aaf5dd41217c1a1f67521ef0e7e
Jupyter
25,008
532
# %% 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 random from statsmodels.stats.multitest import fdrcorrection import copy from collections import Counter im...
66c296269506cee85cec4c4df634fab5ee6407d5d6f417648aa75121f99bcc4f
Jupyter
25,400
546
# %% [markdown] # # Optimization of Sao Paulo traffic # %% [markdown] # Lead author: Jules Deschamps. # # This notebook presents a simple use case of *information geometry*, in the context of *traffic optimization* in Sao Paulo. # We rely on a dataset listing all traffic jams in Sao Paulo for the past two decades (th...
c21a64670954698d17fc19580cb091fffc336ab0fe2473940033a06f16afdf3d
Jupyter
25,764
621
# %% [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 futur...
bc4b63a428395a03b4142c0ca31e4ada9fffd31c2002a3890e7a66fa4fcc44e6
Jupyter
25,808
446
# %% [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] # Note: Before you start to read this notebook, run the following code. This will impo...
934444257e1f2e487478e3b412e58d9a84e402018e1bd0c1cdee9708a174901b
Jupyter
26,075
724
# %% [markdown] # # notebook to visualize evaluating sampled antitoxin and GFP sequences # %% import pandas as pd import numpy as np import matplotlib.pyplot as plt from os import listdir import os import math from collections import Counter from scipy.sparse.linalg import lsmr from copy import deepcopy import tensorf...
2a635536f41c3af0feebc2903cad78684a418e5ca5437f828bbdc7d931523a83
Jupyter
26,328
606
# %% # predicts expression of the test data with the trained and random networks # predicts expression of MelBrainSys data # creates correlation plots of these predicted and original expression: # Figure-2-gene-expr-prediction-correl.png # %% library(ggplot2) library(gridExtra) library(parallel) # %% basePath = "/d...
02674902596d0846bf17a39d218209d98e3cfd38f34c09e30c9e3f1e9e7af010
Jupyter
26,721
722
# %% [markdown] # # This is a usage example of simp_regress_test.py in pyhddmjags # # It follows a script in the [pyhddmjags](https://github.com/mdnunez/pyhddmjags) repository by Michael D. Nunez # # This script will run nicely on [Google Colab](https://colab.research.google.com/) without needing to install anything ...
e33c3b969f04a7352edc81efef748c0117400c65ea5ea98dcc396c4cb7da42a6
Jupyter
26,763
813
# %% [markdown] # # creating predictions for a position given a pdb structure # # from https://arxiv.org/pdf/2012.04035.pdf # # Environments are extracted from a non-redundant subset of high-resolution structures from the PDB. # Specifically, we use only X-ray structures with resolution <3.0 Å, and enforce a 60% sequ...
65822b5e495ca53f4e43fe9f2427a71e52dac3b4005262361d94f827bf9f0f2c
Jupyter
27,101
726
# %% [markdown] # # Workflow Interface 301: Watermarking # # [![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/301_MNIST_Watermarking.ipynb) # %% [markdown] # This OpenFL Workflow Inter...
d178376d1baee99ee715687f4ee6115b50b57f502028b3109762dc996c270071
Jupyter
27,218
746
# %% [markdown] # # Workflow Interface 402: Aggregator validation with a watermark dataset using Ray # # [![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/402_MNIST_Aggregator_Validation...
b7314f5af43941c861e831f2d1131a3e730120b60e8b2c6330e757eb817c016d
Jupyter
27,296
735
# %% [markdown] # # This is a usage example of simpleCPP_test.py in pyhddmjags # # It follows a script in the [pyhddmjags](https://github.com/mdnunez/pyhddmjags) repository by Michael D. Nunez # # This script will run nicely on [Google Colab](https://colab.research.google.com/) without needing to install anything you...
eb990251430d65f011d522e09f5cb721ea504a4cc18cd1a96668c0d4f2122f25
Jupyter
28,071
750
# %% [markdown] # # This is a usage example of generateCPP_test.py in pyhddmjags # # It follows a script in the [pyhddmjags](https://github.com/mdnunez/pyhddmjags) repository by Michael D. Nunez # # This script will run nicely on [Google Colab](https://colab.research.google.com/) without needing to install anything y...