sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
bd2bc31f3fc7ca204b25678d7d044f6daf4851fcf40d845d0a7003f0561661b2
Jupyter
15,397
374
# %% import sys sys.path.append('/Users/mahsazarei/Grantlab Brugada Dropbox/TerraMera/Gitlab/Mahsa/AA_APLID/Amino_Acid_manuscript/helper_functions') from load_data import * from utils import * from models import * # %% [markdown] # # Step 1: Read AAM (spectra) and AA proportions (ground-truth) # %% root_dir = '/Users...
ddab4dcf63c740ed50e156cb836e18f92283c3121dab48c2743afb01d999b38c
Jupyter
15,409
381
# %% import os os.chdir('C:\\Users\\arif\\OneDrive - Higher Education Commission\\HI Research\\pyimagesearch') from sklearn.metrics import mean_squared_error, mean_absolute_error, explained_variance_score, r2_score from timeseires.utils.to_split import to_split from timeseires.utils.multivariate_multi_step import multi...
862ad8cd25509bfddec90fbb2cff0c6545e9e4dd59dc634d003c709ea74b8fbd
Jupyter
15,420
378
# %% import os os.chdir('C:\\Users\\arif\\OneDrive - Higher Education Commission\\HI Research\\pyimagesearch') from sklearn.metrics import mean_squared_error, mean_absolute_error, explained_variance_score, r2_score from timeseires.utils.to_split import to_split from timeseires.utils.multivariate_multi_step import multi...
b4898eae20b4c51d4e98a4c5e7929ed287c53b8c9e5c1963d766e0257d4c368b
Jupyter
15,454
381
# %% import os os.chdir('C:\\Users\\arif\\OneDrive - Higher Education Commission\\HI Research\\pyimagesearch') from sklearn.metrics import mean_squared_error, mean_absolute_error, explained_variance_score, r2_score from timeseires.utils.to_split import to_split from timeseires.utils.multivariate_multi_step import multi...
10366930cb8ad7008e1c37291168aec6434ae5a3d4c1dae877bb7fb3ee377e88
Jupyter
15,466
466
# %% [markdown] # # # More flexibility over the training loop and samplers # %% [markdown] # Note, you can find the original version of this notebook at [docs/advanced_tutorials/18_training_interface.ipynb](https://github.com/sbi-dev/sbi/blob/main/docs/advanced_tutorials/18_training_interface.ipynb) in the `sbi` repo...
c3232e5f6aa8e992f1db81dc72a75c6b5962ba8cc6c8906ab36ad58e2af1ff73
Jupyter
15,474
395
# %% [markdown] # ### Imports # %% %load_ext autoreload %autoreload 2 #%matplotlib notebook %matplotlib inline # %% # Computational packages import numpy as np import matplotlib.pyplot as plt import torch import tqdm # General packages import datetime import sys import os # custom packages import ratsimulator from ...
7ad400bae29f01dc64aa8b0035f99f9f4506e3cece46dc69154ef8342a8fdb51
Jupyter
15,531
381
# %% import os os.chdir('C:\\Users\\arif\\OneDrive - Higher Education Commission\\HI Research\\pyimagesearch') from sklearn.metrics import mean_squared_error, mean_absolute_error, explained_variance_score, r2_score from timeseires.utils.to_split import to_split from timeseires.utils.multivariate_multi_step import multi...
9e03d5fcd57e25118d5b3dce95f5a46c0b23542ab7732084b8226b8976f571f8
Jupyter
15,546
495
# %% # IMPORT STATEMENTS import cv2 import re import numpy as np from matplotlib import pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable, axes_size import matplotlib.patches as patches import matplotlib.colors as colors import PIL import math get_ipython().magic('matplotlib inline') import pandas a...
42eea994f7f7eea11e7380afd4ae041bc7883a64fdd57e416e05b128369d2f9a
Jupyter
15,575
381
# %% import os os.chdir('C:\\Users\\arif\\OneDrive - Higher Education Commission\\HI Research\\pyimagesearch') from sklearn.metrics import mean_squared_error, mean_absolute_error, explained_variance_score, r2_score from timeseires.utils.to_split import to_split from timeseires.utils.multivariate_multi_step import multi...
267b3973e34cbe511208d177ab49259abd290b016bbbde45e7cb5b0d6b77495c
Jupyter
15,582
376
# %% [markdown] # # Test Specificity Filters # %% import os from pathlib import Path from oligo_designer_toolsuite.database import OligoDatabase, ReferenceDatabase from oligo_designer_toolsuite.oligo_specificity_filter import ( ExactMatchFilter, BlastNFilter, BlastNSeedregionFilter, BlastNSeedregio...
42f66cd1c6ec02b0678aab36f0ba79aafb7403d259140f3395404da0d222acb0
Jupyter
15,646
383
# %% import os os.chdir('C:\\Users\\Syed Hasnat\\OneDrive - Higher Education Commission\\HI Research\\pyimagesearch') from sklearn.metrics import mean_squared_error, mean_absolute_error, explained_variance_score, r2_score from timeseires.utils.to_split import to_split from timeseires.utils.multivariate_multi_step impor...
68c5d89a2bee475fa12f218c3bbc94b10d347bd9ff48e35eeedd37d64eb38103
Jupyter
15,845
385
# %% import os os.chdir('C:\\Users\\Syed Hasnat\\OneDrive - Higher Education Commission\\HI Research\\pyimagesearch') from sklearn.metrics import mean_squared_error, mean_absolute_error, explained_variance_score, r2_score from timeseires.utils.to_split import to_split from timeseires.utils.multivariate_multi_step impor...
de8d3f1868331f71ee2771c41502d5450a4ae369d5e3f7dda9ac87fc5e56e4c6
Jupyter
16,013
383
# %% [markdown] # # SBI with iid data and permutation-invariant embeddings # # There are scenarios in which we observe multiple data points per experiment and we can assume that they are independent and identically distributed (iid, i.e., they are assumed to have the same underlying model parameters). # For example, i...
3cb6f751a883011a6036522176291f3116e21e259e6c29b3da5ad582236fc6be
Jupyter
16,209
418
# %% [markdown] # # Channel Combination Performance Matrix (Recording-wise) # # This notebook generates heatmap visualizations comparing sleep staging performance # across different EEG/EOG channel combinations for AnySleep vs U-Sleep models. # # ## Purpose # # Analyze how the choice of input channels affects model ...
a7855808a24bb554deb1be3230a031ae63b9bd20164fa66b2fa993af0aea7d30
Jupyter
16,440
484
# %% import argparse import numpy as np import tensorflow as tf import keras.backend as K import matplotlib.pyplot as plt from keras.utils import np_utils from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten, Conv2D, MaxPooling2D from keras.regularizers import l2 import g...
069d3423e0f785bf5499e046c5888a1bc9360c899a7a5914de3a7d35f83fc81c
Jupyter
16,621
481
# %% [markdown] # # WHODAS 2.0 functionality prediction # # **Authors:** *Santiago de Leon*, *Jesús Herrera López*, *Emese Sükei* # # One-month long time-series data were summarized using statistical measures (minimum, maximum, mean, median, standard deviation, IQR), creating 64 features. We then applied a sequentia...
1c8f57adce48f95c34d2f99ebf4933de4e4b6e1e6a96e057d6766783234b4a8a
Jupyter
17,122
439
# %% [markdown] # # How to choose abstraction levels in sbi # %% [markdown] # `sbi` offers flexibility ranging from simple, high-level workflows to full control over neural networks and sampling. This guide shows: # # 1. **Four abstraction levels** for controlling the density estimator (common to NPE and NLE) # 2. **...
d84c472a84de21052b3e7fe35fb083f94c67d60237f20a3263850d000b882ab5
Jupyter
17,253
502
# %% [markdown] # ![这是图片](xingyun.jpg "Magic Gardens")<br><br> # 事情是这样的<br> # 我本来已经<br> # 打算完结这个分析了<br> # 但杜老师,居然<br> # 竟然,也是不出意料<br> # 叫我加一个参数<br> # %% [markdown] # # TBS # %% [markdown] # ## preparing # %% import pandas as pd import matplotlib.pyplot as plt import hddm import numpy as np import pickle from patsy ...
b62a8cc5a5eb0778f819fd77a771474fab7bce16c7b96f38bf7d59a64de05077
Jupyter
17,273
503
# %% [markdown] # ![这是图片](星云2.jpg "Magic Gardens")<br><br> # 事情是这样的<br> # 我本来已经<br> # 打算完结这个分析了<br> # 但杜老师,居然<br> # 竟然,也是不出意料<br> # 叫我加一个参数<br> # %% [markdown] # # TBS # %% [markdown] # ## preparing # %% import pandas as pd import matplotlib.pyplot as plt import hddm import numpy as np import pickle from patsy impo...
35b32ddef7db8bc3617be29f5ba8a1a06e44afb5f4d8b2c8b06dd273cb07f153
Jupyter
17,282
598
# %% [markdown] # # Obtaining adversarials # ## Attack methods: CW, BIM, FGSM # %% import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from datetime import datetime # %% cd C:/Users/fjdur/Documents/utils/ # %% import utils_guided_retraining as utils # %% from importlib import reload utils =...
e94bb1b9f5f529ec33fedfe0d270b15034e14df44df6db73387d0c00c2cdffea
Jupyter
17,344
501
# %% [markdown] # ![这是图片](星云2.jpg "Magic Gardens")<br><br> # 事情是这样的<br> # 我本来已经<br> # 打算完结这个分析了<br> # 但杜老师,居然<br> # 竟然,也是不出意料<br> # 叫我加一个参数<br> # %% [markdown] # # TBS # %% [markdown] # ## preparing # %% import pandas as pd import matplotlib.pyplot as plt import hddm import numpy as np import pickle from patsy impo...
fabf1cd1929edb80fe84cb9f477ffea98fc7a22f858d9df3b4b6772bd73f34c9
Jupyter
17,355
500
# %% [markdown] # ![这是图片](花瓶.jpg "Magic Gardens")<br><br> # 事情是这样的<br> # 我本来已经<br> # 打算完结这个分析了<br> # 但杜老师,居然<br> # 竟然,也是不出意料<br> # 叫我加一个参数<br> # %% [markdown] # # TBS # %% [markdown] # ## preparing # %% import pandas as pd import matplotlib.pyplot as plt import hddm import numpy as np import pickle from patsy impor...
12f2379b17574d301af8222c99c738c94460e3948fa4d0de62f1c8f147837351
Jupyter
17,357
395
# %% import pandas as pd import numpy as np import io from rdkit import Chem from rdkit.Chem import AllChem from rdkit.Chem import Draw from rdkit.Chem.Draw import rdMolDraw2D import IPython.display from collections import defaultdict from tqdm import tqdm import matplotlib.pyplot as plt from matplotlib.colors import L...
e222291909e27dcc4fbcfc44f395ff366d1b22d1da77c7185e54bbfc57eae97f
Jupyter
17,370
506
# %% [markdown] # ![这是图片](xingyun.jpg "Magic Gardens")<br><br> # 事情是这样的<br> # 我本来已经<br> # 打算完结这个分析了<br> # 但杜老师,居然<br> # 竟然,也是不出意料<br> # 叫我加一个参数<br> # %% [markdown] # # TBS # %% [markdown] # ## preparing # %% import pandas as pd import matplotlib.pyplot as plt import hddm import numpy as np import pickle from patsy ...
3c084d117f50520ea24009229bbfe8650ffa2cdaa3008473dadd7855a43702f9
Jupyter
17,446
502
# %% [markdown] # ![这是图片](星云2.jpg "Magic Gardens")<br><br> # 事情是这样的<br> # 我本来已经<br> # 打算完结这个分析了<br> # 但杜老师,居然<br> # 竟然,也是不出意料<br> # 叫我加一个参数<br> # %% [markdown] # # TBS # %% [markdown] # ## preparing # %% import pandas as pd import matplotlib.pyplot as plt import hddm import numpy as np import pickle from patsy impo...
c7498562aab707816b9c6982a416bb42bcdddc5d4f98259d851b164217f5bc02
Jupyter
17,465
624
# %% [markdown] # # Obtaining adversarials # ## Attack methods: CW, BIM, FGSM # %% import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from datetime import datetime # %% pwd # %% cd ../../utils/ # %% import utils_guided_retraining as utils # %% from importlib import reload utils = reload(u...
755abcfe8bbac71bbe7175a9cfe67f6097fd6d2f0bcf284dda0e081809468a56
Jupyter
17,468
468
# %% import seaborn as sns import pandas as pd from matplotlib.colors import LinearSegmentedColormap import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec import numpy as np # %% # Functions for custom normalization of colorbar import matplotlib def _forward(x): return np.sqrt(x) def _inverse(...
0c86e5e2adc67ba7b37d1086c519c86ef7923f2a56007ddddbf52d4a156517ca
Jupyter
17,473
503
# %% [markdown] # ![这是图片](星云2.jpg "Magic Gardens")<br><br> # 事情是这样的<br> # 我本来已经<br> # 打算完结这个分析了<br> # 但杜老师,居然<br> # 竟然,也是不出意料<br> # 叫我加一个参数<br> # %% [markdown] # # TBS # %% [markdown] # ## preparing # %% import pandas as pd import matplotlib.pyplot as plt import hddm import numpy as np import pickle from patsy impo...
bdc0090814569840f5cec78c0a576948a9f5e2264dcdb2d04501f19e78bcdae2
Jupyter
17,479
539
# %% import numpy as np import joblib import skimage import matplotlib as mpl import matplotlib.pyplot as plt import scipy import tifffile as tif from tqdm.notebook import tqdm from pathlib import Path from cycler import cycler from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar from mpl_toolkits.axes...
1524dfd0a023eb2dc57f59267ec28a3473811873a8df76d058f2c2c4ff089e55
Jupyter
17,487
512
# %% [markdown] # ![这是图片](catcat.jpg "Magic Gardens")<br><br> # 事情是这样的<br> # 我本来已经<br> # 打算完结这个分析了<br> # 但杜老师,居然<br> # 竟然,也是不出意料<br> # 叫我加一个参数<br> # %% [markdown] # # TBS # %% [markdown] # ## preparing # %% import pandas as pd import matplotlib.pyplot as plt import hddm import numpy as np import pickle from patsy i...
7fe00d63af325212e5c0cbce91dd5fd5669287e4cbb920d4ab2a7da567df129c
Jupyter
17,509
557
# %% import os PODCAST_ROOT = os.environ.get("PODCAST_ROOT", "/engram/naplab/users/rs4613/Podcast") # set to your copy of the dataset # %% [markdown] # #### ChatGPT was used to assist writing code. The authors reviewed, edited, and take full responsibility for the content. # %% root_dir = f'{PODCAST_ROOT}' base_dir...
224dcaefd6361d0d44b28145147903d42f1bd8ccf4effcbd145a9261006ae215
Jupyter
17,571
545
# %% [markdown] # ### Need to first run `simulate_full.ipynb` to generate the data used in this notbeook # %% import numpy as np import joblib import skimage import matplotlib as mpl import matplotlib.pyplot as plt import scipy import tifffile as tif from tqdm.notebook import tqdm from pathlib import Path from cycler...
3a5b8080b5448c3355b6085f6c3ee7a2f8f7a1564ef593d9da81dc7013413ee3
Jupyter
17,595
469
# %% [markdown] # # SBI for decision-making models # # In [this # tutorial](https://sbi.readthedocs.io/en/latest/advanced_tutorials/12_iid_data_and_permutation_invariant_embeddings.html), # we showed how to use SBI with trial-based iid data. Such scenarios can arise, # for example, in models of perceptual decision mak...
869490271f0de942dff73e9c5e5d96b88a3b011b5ce9f8706de5c45e9b6846c8
Jupyter
17,685
620
# %% [markdown] # # Obtaining adversarials # ## Attack methods: CW, BIM, FGSM # %% import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from datetime import datetime # %% cd ../../utils/ # %% import utils_guided_retraining as utils # %% from importlib import reload utils = reload(utils) # %...
2752dd0e0982ee29e112c6cd0fc9237fbe7511e167973c6330b40dce281bc186
Jupyter
17,695
543
# %% [markdown] # <a href="https://colab.research.google.com/github/open-mmlab/mmpose/blob/master/demo/MMPose_Tutorial.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # MMPose Tutorial # # Welcome to MMPose colab tutorial! In this...
4f1716554715e0d9a5fffb120abfa5f66aa2f2dd3d66c792dff355eda2437a97
Jupyter
17,810
569
# %% import pandas as pd from matplotlib import pyplot as plt import numpy as np import dit import admUI import math # %% [markdown] # # Introduction # # Information and its theory are an important quantity that govern many fields, rangning from communication to machine learning. In this tutorial, we are going to d...
8184a754454dc4fcbda148045c20ae0d04e92ed15f8fdd74e4bc9ad287edeca5
Jupyter
17,904
625
# %% [markdown] # # Obtaining adversarials # ## Attack methods: CW, BIM, FGSM # %% import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from datetime import datetime # %% cd C:/Users/fjdur/Documents/utils/ # %% import utils_guided_retraining as utils # %% from importlib import reload utils =...
5a0bd4eab296f4075694964fa9abdfadf39c6d69d863c9ba36a9b9d864596702
Jupyter
18,155
362
# %% [markdown] # # How to configure the neural network # %% [markdown] # A **config object** describes the neural estimator and its settings. Pass it to a trainer to choose and configure the network. # # Each model has its own config class. Unsupported or misspelled fields raise an error at construction. # # This g...
e15b2713259c79a3944f1a3212bc6c2c047cfdcbb6186616ff60e26ececf2a4e
Jupyter
18,302
562
# %% # IMPORT STATEMENTS import re import numpy as np import matplotlib from matplotlib import pyplot as plt %matplotlib inline import pandas as pd import sys sys.path.append("/booleanfs2/sahoo/Hegemon") sys.path.append("../") import StepMiner as smn import HegemonUtil as hu acolor = ["#00CC00", "#D8A03D","#EC008C", ...
28c727984d55d09245e66145ebe36f24b2f31e2d727fa2802a51615aa96b4e18
Jupyter
18,350
309
# %% import glob import json import logging import sys from os.path import dirname import matplotlib.pyplot as plt import numpy as np from sklearn.model_selection import train_test_split, StratifiedKFold console_handler = logging.StreamHandler(sys.stdout) file_handler = logging.FileHandler("logs/anysleep_dodo_vs_dodh...
9b938b0cd4e020eb0ded9263da654de232a0454bb2b7608936d6d51c481b1c61
Jupyter
18,507
409
# %% import sys if "../" not in sys.path: sys.path.append("../") import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt import scipy from tqdm.notebook import tqdm import seaborn as sns sns.set(rc={'figure.facecolor':'white'}) plt.rcParams["figure.facecolor"] = "white" sns.set...
5e2e05be55bfb4dede42f66e79adb1ae1f2c7754078f1cd8208a8d6a3a641f2a
Jupyter
18,622
536
# %% %matplotlib inline # Load surface mask and distance matrix import glob import h5py import numpy as np from brainspace.gradient import GradientMaps from brainspace.gradient import alignment import matplotlib.pyplot as plt import matplotlib.cm as cm from sklearn.decomposition import PCA import helpers HCPFilename...
2e0942c72ae75f2590f5587465a5cb3a774089e0bfcbe62b3a4ab656214661c2
Jupyter
18,800
431
# %% import glob import json import os import re import matplotlib.pyplot as plt import numpy as np from sklearn.metrics import cohen_kappa_score, f1_score from tabulate import tabulate score_order = ["Wake", "N1", "N2", "N3", "REM"] # %% reprod_results_paths = [ "../../logs/exp001/exp001a/sweep-2025-07-30_12-29...
9f92f801ed41790c1f40a4b13e762cd5daaad446eb8f6c188a8094af52575c52
Jupyter
18,815
525
# %% """ Basic settings... """ # -*- coding: utf-8 -*- %load_ext autoreload %autoreload 2 import os, time # select GPU for training os.environ["CUDA_VISIBLE_DEVICES"] = "3" # import tensorflow.experimental.numpy as np import numpy as np import tensorflow as tf import random import scipy.io as scio import h5py impor...
bdbd83286ca4daafe3fca55d99b833b4b83b27ce603e0fe0834bc52a7eba0722
Jupyter
19,004
545
# %% [markdown] # # Figure 4 and 5: Inference over distance-based rules # # This notebook contains the Python code for generating Figure 4 and 5 in the paper. # The figure shows the results for performing SBI on the distance-based wiring rules. # # The training data and inference objects are pre computed and only lo...
474a6644121034858f3c28ccfe92de5dc12972264833d292ccccad020827d0fc
Jupyter
19,206
506
# %% [markdown] # ### Computation of sBTRF from processed EEG data and comparison with behavior # See the other python scripts to see the pre-processing steps and computations of the individual multichannel binaural TRFs (mcBTRF). The preprocessing steps involve band-pass flitering the raw EEG, rejection of ocular proj...
8dc037515aa4db98973b9a0cf3264b888535024b78b810a50f8d0e3ef5e6a041
Jupyter
19,217
411
# %% [markdown] # Importing relevant packages and modules # %% %load_ext autoreload %autoreload 2 #%matplotlib notebook %matplotlib inline # %% import sys from pathlib import Path # Plotting import numpy as np from matplotlib import pyplot as plt plt.style.use('bioAI.mplstyle') import copy ''' CUSTOM PACKAGES ''' #...
84339e73b6b72b776b67c6ce2f1a87af2761a752e06cfba001c6482888928dcd
Jupyter
19,223
659
# %% [markdown] # # Obtaining adversarials # ## Attack methods: CW, BIM, FGSM # %% import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from datetime import datetime # %% pwd # %% cd ../utils/ # %% import utils_guided_retraining2 as utils # %% from importlib import reload utils = reload(uti...
3a2be21df38766779b8e852be5d56c3cbb18072edde3d65bc72fd3c06222303e
Jupyter
19,339
448
# %% import pandas as pd import numpy as np import io from rdkit import Chem from rdkit.Chem import AllChem from rdkit.Chem import Draw from rdkit.Chem.Draw import rdMolDraw2D import IPython.display from collections import defaultdict from tqdm import tqdm import matplotlib.pyplot as plt from matplotlib.colors import L...
ad1b21ce7f086ed4824e296df9cd27ff01154daa9a95e982f754673bd7b884a6
Jupyter
19,596
343
# %% import glob import json import logging import sys from functools import partial import matplotlib.pyplot as plt import numpy as np from sklearn.model_selection import train_test_split, StratifiedKFold console_handler = logging.StreamHandler(sys.stdout) file_handler = logging.FileHandler("logs/anysleep_mnc_nt1_sf...
107895efeb37f540df13329329f8d9fe2e02fc30aa48668219074122b88d9c78
Jupyter
19,633
603
# %% [markdown] # ## Code to reproduce Figure 4 of PMID: 37516087 # ### Alternatively you can just click on [this link](https://colab.research.google.com/drive/18tmFN7gJS9eKhN88AU2a9eKsuM8hRNP3?usp=sharing) to copy this code from Google Colab # ### and click on the "Run all" button on the top # %% import requests url ...
7842c08d018ff5c7ae785ef3a12fe0a0e8db048f5008ce769367411bbf2613db
Jupyter
19,882
576
# %% [markdown] # # AI-guided Discovery of a Barrier-Protective Therapy in Inflammatory Bowel Disease # # Authors: Debashis Sahoo1-3†*, Lee Swanson4†, Ibrahim M. Sayed5†$, Gajanan D. Katkar4, Stella-Rita Ibeawuchi5, Yash Mittal6, Rama F. Pranadinata4, Courtney Tindle4, Mackenzie Fuller4, Dominik L. Stec4, John T. Chan...
0e5f0227d7eea543744122a65424bff8ca156cb823d781f93a3dfcffc3720980
Jupyter
20,188
442
# %% import sys if "../" not in sys.path: sys.path.append("../") from os import path import numpy as np import pandas as pd import matplotlib import matplotlib.pyplot as plt from scipy import ndimage as ndi from scipy import stats import seaborn as sns # sns.set_palette("deep") sns.set_theme(style="whitegrid") sns....
44050ee3f4dc34873ff17e1f127aa757863878cd824f066f44f1276b7eb3cc59
Jupyter
20,224
492
# %% import sys if "../" not in sys.path: sys.path.append("../") from os import path import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy import ndimage as ndi from scipy import stats from tqdm.notebook import tqdm import random import pickle import seaborn as sns # sns.set_palette("de...
2a8725085932f5a1a5948eaf94695943c7357da7f0e439dd510c331fc0694bf6
Jupyter
20,533
469
# %% import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import numpy as np import scipy import statsmodels.stats.multitest import glob import warnings warnings.filterwarnings("ignore") import matplotlib as mpl import matplotlib.font_manager mpl.rcParams['pdf.fonttype'] = 42 font = {'size' : 12}...
fea9d0b58da559dbe00fccef4b5a3e48de42db3157d62bac915e5edaff15b122
Jupyter
20,621
556
# %% [markdown] # # API of implemented methods # # This notebook spells out the API for all algorithms implemented in the `sbi` toolbox: # # - [Neural Posterior estimation (NPE)](https://sbi.readthedocs.io/en/latest/tutorials/16_implemented_methods.html#neural-posterior-estimation-npe) # # - [Neural Likelihood estim...
442dc91fb922a408d2ddb668c882586e578252d9430a2e4e7f457176784a86e3
Jupyter
20,670
504
# %% import os os.chdir('C:\\Users\\Syed Hasnat\\OneDrive - Higher Education Commission\\HI Research\\pyimagesearch') from sklearn.metrics import mean_squared_error, mean_absolute_error, explained_variance_score, r2_score from timeseires.utils.to_split import to_split from timeseires.utils.multivariate_multi_step impor...
18b716208e4b57066bb760bc46ae639b6bc0cc5c883d6570616a10c11345d3d7
Jupyter
20,830
645
# %% [markdown] # ### EDA # # The output files of this notebook can be found under **eda** file. # %% import pandas as pd import numpy as np import statsmodels.api as sm import scipy.stats as st import matplotlib.pyplot as plt import seaborn as sn import matplotlib.mlab as mlab from sklearn.preprocessing import Stand...
f10d72fea363aaef505d3820bbed4766ffe564dc9afc91dfcefc7dc3afa28c5f
Jupyter
20,917
653
# %% [markdown] # ### Generate the post hoc dataset for analysis # %% import math import time import parmap import pickle import multiprocessing from imagen_posthocloader import * import matplotlib.pyplot as plt import seaborn as sns from plot_results_posthoc import * %matplotlib inline # %% num_cores = multiprocessi...
ae55729342fd361326567862fa171f0e8d3bae0f1feb549870cb212f499e1a14
Jupyter
21,851
684
# %% import cv2 import re import numpy as np from matplotlib import pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable, axes_size import matplotlib.patches as patches import matplotlib.colors as colors import PIL import math get_ipython().run_line_magic('matplotlib', 'inline') import pandas as pd imp...
abe4d91f86842e396f61bd1a81a19e91e95060b486504549eda2464aed0e53f8
Jupyter
22,706
607
# %% [markdown] # # Topological Data Analysis (TDA) of PDGFRβ+ labeled nuclei (FISH). # %% [markdown] # ## Preview # # This notebook reports the topological data analysis (TDA) for PDGFRβ+ nuceli (labeled with fluorescence in situ hybridization) in three ROIs of the ischemic hemisphere. Please note that this notebook...
b4fff8470719ad0cfa3db65667e275c34fdd9c9b13f9ed85fcf2d5dfec0a65af
Jupyter
23,105
427
# %% [markdown] # # Simulation-based Calibration in SBI # # After a density estimator has been trained with simulated data to obtain a posterior, # the estimator should be made subject to several **diagnostic tests**. This needs to be # performed before being used for inference given the actual observed data. _Posteri...
14b4f0b3d373bf77e2990270ccc8fb56e599434208758e9e5a11457ce7f36cfa
Jupyter
23,219
651
# %% # IMPORT STATEMENTS import cv2 import re import numpy as np from matplotlib import pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable, axes_size import matplotlib.patches as patches import matplotlib.colors as colors import PIL import math get_ipython().magic('matplotlib inline') import pandas a...
38bd152fcb6c5ba046ada1ec2b8c53bf7b37796bba74f464241812c69c2ff472
Jupyter
23,640
575
# %% import matplotlib.pyplot as plt import scipy.io as spio import pandas as pd import numpy as np import os import seaborn as sns from my_tools import * from ranked_structural_connectivity import * import pickle from IPython.display import Image import matplotlib.lines as mlines from scipy import spatial from matplo...
e1ba308fa6e9ba709e37fda78fade8417e94e2588b9bf7ac8ff3cd09868fd7cd
Jupyter
24,320
715
# %% #options: cc200, dosenbach160, aal p_ROI = "cc200" p_fold = 10 p_center = "Stanford" p_mode = "whole" p_augmentation = True p_Method = "ASD-DiagNet" # %% parameter_list = [p_ROI,p_fold,p_center,p_mode,p_augmentation,p_Method] print("*****List of patameters****") print("ROI atlas: ",p_ROI) print("per Center or who...
781bc034ab4811a2ad76609b60baee23e0ba6634c282fe3c621d1c9fa4ddd597
Jupyter
24,914
788
# %% [markdown] # # Code for "Mapping the landscape of magnetic field effects on neural repair: a systematic review, mathematical model, and meta-analysis" # ### Written by: Meghan McGraw and Gabrielle Gilmer # %% [markdown] # # Imports # ### Import packages into Python # %% import numpy as np %matplotlib inline im...
3a89665fecd99dea52e3e1827714b4f2a81db28916d97f1e1975c6d26d9e5098
Jupyter
24,917
854
# %% # IMPORT STATEMENTS import cv2 import re import numpy as np import matplotlib from matplotlib import pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable, axes_size import matplotlib.patches as patches import matplotlib.colors as colors import PIL import math get_ipython().magic('matplotlib inline...
66f619731b02e8810127f1d78d30d0076ef4584f83e0c8a38f0fefae4e78b2d5
Jupyter
25,044
868
# %% import numpy as np import pandas as pd from pandas import read_csv import pickle from sklearn.preprocessing import MinMaxScaler, StandardScaler from sklearn.preprocessing import OneHotEncoder # %% df=pd.read_csv('C:\\Users\\Syed Hasnat\\OneDrive\\Journal Paper\\Code\\Hasant code\\dataset_plots_code\\Dataset\\7_Da...
aa3cbaa1e5d6ca55b77fa3dd40ec83e9007367884b4c1f51868b88fb5e376d63
Jupyter
25,616
568
# %% [markdown] # # SENSITIVITY ANALYSIS # The preliminary results in our IMAGEN paper advocates for a more in-depth understanding of what contributes to the significant performance of the ML models for the three time-points. Here we will throw several _what-if_ and _why_ questions at the results to help us understand ...
f1b4028053815d10ee51c2cd4b84788ef0728b94a8d2653026b2c71c90f86feb
Jupyter
25,665
777
# %% pip install tensorflow==2.5 # %% pip install keras==2.5 # %% pip install cv2 # %% pip install opencv-python # %% from keras.datasets import mnist from keras.utils import np_utils import numpy as np import keras # %% from matplotlib import pyplot # %% from sklearn.model_selection import train_test_split imp...
ea81d3c65f9ace78a4ce658768798ba93b3b6496b7bdca1edcb2e751cc6040b9
Jupyter
26,221
774
# %% [markdown] # # Initialisation # %% import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib import os import pyabf import seaborn as sns import shelve import sys from scipy.stats import zscore from sklearn.cluster import AgglomerativeClustering from scipy.cluster.hierarchy import...
4136e5193c0c221b7ece7b2c4622bdbf299cc4c9c814963f998d588cbd38c3a8
Jupyter
26,259
731
# %% [markdown] # # chx10 recruitment analysis during MLR electrical stimulation # # ---------- # # # # # %% import numpy as np import pandas as pd import os import sys import pickle import logging from matplotlib import cm import matplotlib.pyplot as plt sys.path.insert(1, '../utils/') from import_data im...
7127a8dc33e300b82a76666732de221691be3df4a08f8a990752e0b060dd8221
Jupyter
27,100
1,279
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: MNIST # %% [markdown] # ## Experiment configuration 3 # %% pip install --user tensorflow==2.5 # %% import argparse import numpy as np import tensorflow as tf import tensorflow.keras.backend as K import matplotlib.pyplot as plt from tens...
16413572eda19b5bcaf0d2ecd9235721e32bbcd398ab54a4e6f6f9445bb84661
Jupyter
27,359
572
# %% [markdown] # # Vector Field Methods: FMPE and NPSE # # `sbi` incorporates recent algorithms based on Flow Matching and Score Matching generative models, which are also referred to as Continuous Normalizing Flows (CNF) and Denoising Diffusion Probabilistic Models (DDPM), respectively. # # At the highest level, yo...
081c94b07f1adcbd6a1b648e3637ee37dce3e5f9e0f45b067e822b5cc5ec7e0a
Jupyter
27,449
1,285
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: GTSRB # %% [markdown] # ## Experiment configuration 3 # %% pip install --user tensorflow==2.5 # %% import argparse import numpy as np import tensorflow as tf import keras.backend as K import matplotlib.pyplot as plt from keras.utils imp...
2a1589bf1d898aae79a1e704a109687455d5e14f3bf97de9a954713586602e1b
Jupyter
27,510
1,285
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: MNIST # %% [markdown] # ## Experiment configuration 3 # %% pip install --user tensorflow==2.5 # %% import argparse import numpy as np import tensorflow as tf import keras.backend as K import matplotlib.pyplot as plt from keras.utils imp...
5a20b47f270dbdbd260fb01e070f23cf791aff35dc400f92adb50b5c9445bc91
Jupyter
28,729
770
# %% [markdown] # ### Organise file structure to BIDS and create a holdout split # # Reference documentation links: # * IMAGEN's native documentation: https://imagen-europe.com/resources/imagen-dataset/documentation/ # * Our local documentation: https://github.com/ritterlab/deepMRI/wiki/IMAGEN # * Their github reposit...
fb8f5e945aa5e6d3128d579df5a175dc7bc9852d6e9115c4a7648dd6b69f8ed3
Jupyter
30,001
1,340
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: CIFAR-10 # %% [markdown] # ## Experiment configuration 3 # %% pip install --user tensorflow==2.5 # %% import argparse import numpy as np import tensorflow as tf import keras.backend as K import matplotlib.pyplot as plt from keras.utils ...
38cd24c1d7037bb41b368bc5bf75c0ab73e8f0fb8c39f91d5968e40df03cf3d0
Jupyter
30,083
1,472
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: GTSRB # %% [markdown] # ## Experiment configuration 2 # %% pip install --user tensorflow==2.5 # %% import argparse import numpy as np import tensorflow as tf import keras.backend as K import matplotlib.pyplot as plt from keras.utils imp...
2f57e6d4e6ba1d5fb23d71be624d4f378e2cd3c2a4945ae2f6befa039c8bb416
Jupyter
30,244
1,473
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: GTSRB # %% [markdown] # ## Experiment configuration 1 # %% [markdown] # ## Configuration 1 # 1. Incremental guided retraining starting from scratch using the new adversarial inputs and original training set # %% pip install --user tensorf...
5382e3cb259fa8b0d322acce73546566e35530c7903f1f196f71ba632aa21d72
Jupyter
31,043
1,372
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: Intel # %% [markdown] # ## Experiment configuration 3 # %% pip install --user tensorflow==2.5 # %% import argparse import numpy as np import tensorflow as tf import keras.backend as K import matplotlib.pyplot as plt from keras.utils imp...
8fe80319a67142d3e636195410dd46e167872d8d8e0fb3fa1f7ffe8fa322f1a4
Jupyter
31,060
852
# %% # IMPORT STATEMENTS import sys sys.path.append("Hegemon/") sys.path = ["BoNE/"] + sys.path import matplotlib matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['ps.fonttype'] = 42 try: reload # Python 2.7 except NameError: try: from importlib import reload # Python 3.4+ except Imp...
4c66cf7b74d7bf75bbf6b61ebe54f7e6fcef7c842668e6ee36ce92ce156323a0
Jupyter
31,094
860
# %% %load_ext autoreload %autoreload 2 # %% import pandas as pd import numpy as np from glob import glob from os.path import join import os from scikits.bootstrap import ci import matplotlib.pyplot as plt import seaborn as sns from statsmodels.stats.multitest import fdrcorrection sns.set(style="whitegrid", contex...
305d517083bedee8a7ed1c29ffd06af0ffe73889d9d3b3729dbf3e3e5dbf398c
Jupyter
31,153
1,347
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: MNIST # %% [markdown] # ## Experiment configuration 2 # %% import argparse import numpy as np import tensorflow as tf import keras.backend as K import matplotlib.pyplot as plt from keras.utils import np_utils from keras.models import Seq...
2ddaa6638323e3ebdc85fda1fb541e43e37b52e8d2acc87cb345ea00e86e6e4f
Jupyter
31,253
805
# %% [markdown] # # Model Misspecification in SBI # # In this tutorial, we would describe how to detect prior misspecification, one instance of model misspecification in Simulation-based Inference (SBI), and demonstrate it on two simulators: a toy 2d Gaussian mean inference task, and the [Hodgkin-Huxley # model](https...
c29acf6b9fb47f4cf5dee64f3d396112c388fb395aec1dae21b54bf95fd86086
Jupyter
31,314
1,375
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: CIFAR-10 # %% [markdown] # ## Experiment configuration 1 # %% [markdown] # ## Configuration 1 # 1. Incremental guided retraining starting from scratch using the new adversarial inputs and original training set # %% pip install --user tens...
dac3a5b4adfc6e9dd5cb39bffc2d19708d82dd0ed69301f6dd4d1c9e62d91424
Jupyter
31,460
1,361
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: MNIST # %% [markdown] # ## Experiment configuration 1 # %% [markdown] # ## Configuration 1 # 1. Incremental guided retraining starting from scratch using the new adversarial inputs and original training set # %% #pip install --user tensor...
a149962b809350fc63fa91aa390a60738f9e1220522eb58fb4a2153698e54a5f
Jupyter
31,875
1,380
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: MNIST # %% [markdown] # ## Experiment configuration 2 # %% import argparse import numpy as np import tensorflow as tf import tensorflow.keras.backend as K import matplotlib.pyplot as plt #from keras.utils import np_utils from tensorflow....
ca5b0da5eb731b6f28f85efb5b515dc38f342959b861c3c647f2155ccb5eec02
Jupyter
31,881
1,420
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: CIFAR-10 # %% [markdown] # ## Experiment configuration 1 # %% [markdown] # ## Configuration 1 # 1. Incremental guided retraining starting from scratch using the new adversarial inputs and original training set # %% #pip install --user ten...
50a0f08c4db1a755f440f9d929510d47ce7f1066f5727d70d456f7ddb138e061
Jupyter
32,301
1,440
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: Intel # %% [markdown] # ## Experiment configuration 1 # %% [markdown] # ## Configuration 1 # 1. Incremental guided retraining starting from scratch using the new adversarial inputs and original training set # %% pip install --user tensorf...
0b09ab2fc2ea80fccf46575a70848b88c24d5ebabd8a383da70cdf97cf02ea1f
Jupyter
32,359
952
# %% from Bio.SeqUtils import MeltingTemp as mt from Bio.SeqUtils import Seq from oligo_designer_toolsuite.oligo_property_calculator import calc_tm_nn, calc_gc_content # %% import numpy as np import pandas as pd from scipy.sparse import lil_matrix class OligoOverlapCalculatorNew: def _get_overlapping_matrix(sel...
395f54a8f6cab78edf4053cfe849cf05969dd506d1b9e2d6cb094a9eb567b42f
Jupyter
32,531
1,415
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: CIFAR-10 # %% [markdown] # ## Experiment configuration 2 # %% pip install --user tensorflow==2.5 # %% import argparse import numpy as np import tensorflow as tf import keras.backend as K import matplotlib.pyplot as plt from keras.utils ...
2f5a7bfe9f73558e5cbcd5be7cc44a01438dd40a4042f8aeac0016ae844c6056
Jupyter
33,239
605
# %% [markdown] # # Local Classifier Two-Sample Tests (L-C2ST) # # # After a density estimator has been trained with simulated data to obtain a posterior, the estimator should be made subject to several diagnostic tests. This diagnostic should be performed before the posterior is used for inference given the actual ...
50044174996ba2c7d1e11eddbe942f80bd37eeb6c668d34e17b06bf5c98a5b9e
Jupyter
33,355
1,472
# %% [markdown] # # Ordering by metrics and retraining phase # # ## Dataset: Intel # %% [markdown] # ## Experiment configuration 2 # %% pip install --user tensorflow==2.5 # %% import argparse import numpy as np import tensorflow as tf import keras.backend as K import matplotlib.pyplot as plt from keras.utils imp...
6a572521e2a6a986490c5823f1a5604bdf671ccd6272c53e00a28c9db593709d
Jupyter
33,591
1,140
# %% %matplotlib inline import glob import h5py import numpy as np from brainspace.gradient import GradientMaps from brainspace.gradient import alignment import matplotlib.pyplot as plt import matplotlib.cm as cm from sklearn.decomposition import PCA import helpers HCPFilenamesList = glob.glob('../IndSubHCP/*.mat') HC...
04a663c3a8553b400ac2aebb355fe31b40fbf325acae555597ee74238dc6e704
Jupyter
34,268
744
# %% # This notebook is for generating results for all subjects with cross-validation, and saving necessary variables for mapping # %% # load necessary libraries # -*- coding: utf-8 -*- %load_ext autoreload %autoreload 2 import os, time # select GPU for training os.environ["CUDA_VISIBLE_DEVICES"] = "2" # import ten...
ac0373c40dd22353e28c920d5ced4012d18d5c74bf9d8420e2adc179f3733bb7
Jupyter
34,529
1,208
# %% [markdown] # ## Molecular Signatures for Microbe-Associated Colorectal Cancers # %% # IMPORT STATEMENTS import cv2 import re import numpy as np import matplotlib matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['ps.fonttype'] = 42 from matplotlib import pyplot as plt from mpl_toolkits.axes_grid1 impor...
20201cc5be6ad5ba25813ea41bdb015650b0a138baf943e3e44a8624ced583a4
Jupyter
34,881
1,036
# %% pip install tensorflow==2.5 # %% pip install keras==2.5 # %% pip install cv2 # %% pip install opencv-python # %% from keras.datasets import mnist from keras.utils import np_utils import numpy as np import keras # %% from matplotlib import pyplot # %% from sklearn.model_selection import train_test_split imp...
df239d3302039e57e310033f63a51122dfe46b5bf8bc764223d9e27b3dfb32bc
Jupyter
36,007
954
# %% [markdown] # # Linear Discriminative Analysis (LDA) Feature Selection (FS) Framework # %% import os import sys import pandas as pd import numpy as np import math from scipy.signal import savgol_filter from itertools import combinations import matplotlib.pyplot as plt from cycler import cycler import matplotlib...
c8117146a6d39c98969104c4b7b60564fcc25686a9771225ce39005eae7c517d
Jupyter
37,296
1,196
# %% import os PODCAST_ROOT = os.environ.get("PODCAST_ROOT", "/engram/naplab/users/rs4613/Podcast") # set to your copy of the dataset # %% [markdown] # #### ChatGPT was used to assist writing code. The authors reviewed, edited, and take full responsibility for the content. # %% root_dir = f'{PODCAST_ROOT}' res_dir ...