sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
051f028436b6e4f3848be8fd7dc759472d9c7d429739f4fec2cba0c65bad0a5c
Jupyter
8,378
364
# %% import matplotlib.pyplot as plt import numpy as np import torch from norse.torch.functional.lif_adex import LIFAdExParameters from norse.torch.functional.lif_adex_refrac import LIFAdExRefracParameters from tqdm import tqdm from cgtasknet.net.lifadexrefrac import SNNlifadexrefrac from cgtasknet.instruments.instru...
c037258ac22732949de16e36568eca50cafe1ce655dc9877e2e280022afe436b
Jupyter
8,384
202
# %% import h5py from keplergl import KeplerGl import matplotlib.pyplot as plt import numpy as np import pandas as pd # %% file_paths = ['../data/lidar/bali_icesat-2/177244051/processed_ATL08_20181223162928_13140108_003_01.h5', '../data/lidar/bali_icesat-2/177253330/processed_ATL08_20181022192540_0369010...
cd36361e5c7b4b6cd434481ed4a2a66a2e14d84de353bc74585970086b2530a2
Jupyter
8,388
365
# %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% from rl_analysis.plotting import ( savefig, clean_plot_labels, setup_plotting_env, clean_ticks, ) import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import os # %% [markdown] # # Helper functions...
dff36e45afc380e38735b7f33812a1eb26a4491cd227d5b58a3c3308036ef889
Jupyter
8,399
361
# %% import matplotlib.pyplot as plt import numpy as np import torch from norse.torch.functional.lif_adex import LIFAdExParameters from norse.torch.functional.lif_adex_refrac import LIFAdExRefracParameters from tqdm import tqdm from cgtasknet.net.lifadexrefrac import SNNlifadexrefrac from cgtasknet.instruments.instru...
d8bf6486bce498feb530bd4bf56658a217992c35e7b8e26b719aea2666c927e1
Jupyter
8,411
306
# %% # %% [markdown] # %% [markdown] # ``` # from dPCA import dPCA # По обученной сети создается тензор # actR = размером(num_trial, hidden_size, S, T) # num_trial - число испытаний для каждого значения стимула # hidden_size - число нейронов сети # S - число стимулов (берем 10) # T - число временных отсчетов в одно...
0ecdb9acde5fc82dc1b7250fbca3ecf8e6ecc2ffe071426c03151374c3995b2b
Jupyter
8,425
312
# %% # %% [markdown] # %% [markdown] # ``` # from dPCA import dPCA # По обученной сети создается тензор # actR = размером(num_trial, hidden_size, S, T) # num_trial - число испытаний для каждого значения стимула # hidden_size - число нейронов сети # S - число стимулов (берем 10) # T - число временных отсчетов в одно...
5bb7d973ae48e42dabc9c0637dc725e888ab5a24a79b1836fdd0252f77fd36ed
Jupyter
8,425
312
# %% # %% [markdown] # %% [markdown] # ``` # from dPCA import dPCA # По обученной сети создается тензор # actR = размером(num_trial, hidden_size, S, T) # num_trial - число испытаний для каждого значения стимула # hidden_size - число нейронов сети # S - число стимулов (берем 10) # T - число временных отсчетов в одно...
76a785bc5ebfc8061106cc61ed4cdfee619294c5827beb754d18739041c45dd3
Jupyter
8,425
336
# %% %matplotlib # %% from common import colors, sbarlw, insetlw, savefig from gating_util import ( mark_time_interval, save_gating_params, load_gating_params, get_plot_coordinates_with_error, ) # %% import os; os.chdir(os.path.join('..', '..')) print(os.getcwd()) # %% from functools import partial ...
d2b82c2539301e8886954591369ffb65114daae9d4df85dcafcdc1fe73cfa189
Jupyter
8,425
312
# %% # %% [markdown] # %% [markdown] # ``` # from dPCA import dPCA # По обученной сети создается тензор # actR = размером(num_trial, hidden_size, S, T) # num_trial - число испытаний для каждого значения стимула # hidden_size - число нейронов сети # S - число стимулов (берем 10) # T - число временных отсчетов в одно...
8f0e3813910868ebfe198b2455846e745fd30fce36a389b938f23f03c6205edf
Jupyter
8,436
283
# %% [markdown] # # Temperature-dependence of derivative encoding by 5-HT neuron populations # # Shown in fig. 7S1. # %% from common import colors, savefig # %% from __future__ import division import os; os.chdir(os.path.join('..', '..')) print os.getcwd() # %% import warnings import re import copy import pickle ...
190303e4a2841504b9158d661dbd402da615ed8c069a39c6bef1b712de8c57b5
Jupyter
8,444
277
# %% [markdown] # # Tutorial for resVAE ensemble # # Here, we will show a brief tutorial or demo for using resVAE ensemble. # # We will cover only resVAE ensemble here, so please refer to the documentations of scanpy or anndata as needed: # * scanpy: https://scanpy.readthedocs.io/en/stable/ # * anndata: https://annda...
1d94bc885afe2be22a6a0282a3a8abc1e8d6712eee6e7684b709e7470763e123
Jupyter
8,460
279
# %% from pathlib import Path import os %autoreload 2 import src.utils as utils import seaborn as sns import matplotlib.pyplot as plt %matplotlib inline os.getcwd() # %% [markdown] # ### Choose experiment, print out configurations # %% experiment = "drosophila-3-rdpg-sbm" run = 6 exp_path = Path(f"../models/runs/{ex...
d526952827b7a845b321334f92d5d2645c1d0c018b6cadc9abd6cec77a3718e9
Jupyter
8,469
189
# %% [markdown] # # Session selection helper for converting ADNI/PPMI dicoms to BIDS nifti. # # This is how we select the most recent sessions of the subjects from PPMI and ADNI to get an elder population so that we have better matched control cohort for the local ET cohort. # %% from pathlib import Path import nipyp...
d0ed340c6a4f146678741f19d9583d65d886962f7c9163e80514261ea600ce96
Jupyter
8,471
332
# %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% from tqdm.auto import tqdm from rl_analysis.plotting import ( setup_plotting_env, clean_ticks, savefig, clean_plot_labels ) from rl_analysis.io.df import dlight_exclude from scipy.stats import norm from joblib import Parallel, delayed imp...
257641846e2cf88279ad459fa25edb3cbdba99ed23fd5379118a058f36d6a390
Jupyter
8,482
234
# %% import matplotlib.pyplot as plt import numpy as np import torch from cgtasknet.instruments.instrument_subgroups import SubgroupFinder from norse.torch.functional.lif_adex import LIFAdExParameters from norse.torch.functional.lif_adex_refrac import LIFAdExRefracParameters from tqdm import tqdm from cgtasknet.net.l...
c46081023ba00e73d818510d55ddadc2b0cffa1e0c8ce466e2021d8a2c8e751b
Jupyter
8,487
332
# %% [markdown] # Derivate from https://colab.research.google.com/drive/13CAM8mL1u7ZsqNhfZLv7bNb1rdhMI64d # %% [markdown] # # Upload Radiographs to figshare # %% [markdown] # # Load Libraries # %% import hashlib import json import os import requests from requests.exceptions import HTTPError import pandas as pd # %...
a93e23bc5ebda4966076e79e58350a39c40e4c4e777c60dde8226f577d2ad821
Jupyter
8,495
338
# %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% from tqdm.auto import tqdm from rl_analysis.plotting import setup_plotting_env, clean_ticks, savefig from rl_analysis.io.df import dlight_exclude_toml import pandas as pd import os import numpy as np import matplotlib.pyplot as plt # %% [markdown] # ## ...
fb19c5b02a40770ff03d8c0e4bc623b5750d4286c124cc09aa3a2b62c6044315
Jupyter
8,495
238
# %% [markdown] # <H1> Introduction to scPrisma- De novo reconstruction </h1> # <h1>Analysis of the cell cycle in HeLa S3 cells</h1> # # This tutorial aims to provide a comprehensive overview of the scPrisma workflow, including the following steps: # # 1. Reconstruction of a target signal from scratch, utilizing only...
3d6f0de082c5175edec10680978a9d1fe9682f2e19b64f4c71e9ac805df683a1
Jupyter
8,500
367
# %% import matplotlib.pyplot as plt import numpy as np import torch from norse.torch.functional.lif_adex import LIFAdExParameters from norse.torch.functional.lif_adex_refrac import LIFAdExRefracParameters from tqdm import tqdm from cgtasknet.net.lifadexrefrac import SNNlifadexrefrac from cgtasknet.instruments.instru...
9a54e0f24df1cc635c055709aea9c93d9d44ff93eaecf4fa49377649d5d37b14
Jupyter
8,532
282
# %% #Load the required libraries import numpy as np import pandas as pd from tensorflow import keras from keras.models import Model,load_model from keras import backend as K from keras import models, layers from keras.models import Sequential, model_from_json from keras.layers.core import Dense from matplotlib import...
dbb7a28995cbfe980e7ca80bbf2dbc2f09a1ca9eeb98fdd148d556b921bf4510
Jupyter
8,538
228
# %% [markdown] # <H1> Introduction to scPrisma- De novo reconstruction </h1> # <h1>Analysis of the cell cycle in HeLa S3 cells</h1> # # This tutorial aims to provide a comprehensive overview of the scPrisma workflow, including the following steps: # # 1. Reconstruction of a target signal from scratch, utilizing only...
5cfaed2116a6e9e491a56a471ecb9c2067505848bad90c52bf98687f054759bc
Jupyter
8,562
214
# %% [markdown] # # Preprocessing of QC measures # # ## Cohorts # - MNI ET/NC, PPMI NC, ADNI2 NC # # ## Criterias # - All QC scores (freesurfer, suit, maget) >=2 # # ## Input # MNI QC results: ../tab_data/qc/mni_qc.csv # # PPMI QC results: ../tab_data/qc/ppmi_qc.csv # # ADNI QC results: ../ta...
f3645a9cb3629630fcc876364aa5bb06ce7a53d4676c396851578cd5e2408664
Jupyter
8,585
294
# %% from rdkit import Chem from rdkit.DataStructs.cDataStructs import TanimotoSimilarity from rdkit.Chem.MolStandardize import rdMolStandardize import pubchempy as pcp import pandas as pd import matplotlib.pyplot as plt # %% initial_smi = pd.read_excel(r'../prediction_and_selection/Prediction_initializers_ROR_activ.x...
422e2a33a59490fb5d16bf92d09f6bbc5b47db61ba5a4a2d485c577b5ddd6736
Jupyter
8,595
248
# %% [markdown] # # Code for analyzing volume output # - Uses volumetric data CSVs (../results/) generated by "collect_volumes.sh" script part of [MAGeTBrain pipeline](https://github.com/CobraLab/documentation/wiki/MAGeTBrain#collecting-volumes) # - Uses participants data (../metadata/) for inclusion/exclusion criteria...
6b545cb19fb2d24726ec48407c0e760262775fdc80ae465a2ea567936a111b50
Jupyter
8,604
321
# %% """ jupyter-nbconvert report_plots.ipynb --to python; python -u report_plots.py """ # %% from __future__ import division import os import glob import pickle from natsort import natsorted import argparse import os import sys import numpy as np import tqdm import pandas as pd import scipy as sp import numpy as np...
033da8d67b183e045d3752a227d49ee2efed733de29449b99cbd614a22bc640f
Jupyter
8,622
365
# %% import matplotlib.pyplot as plt import numpy as np import torch from norse.torch.functional.lif_adex import LIFAdExParameters from norse.torch.functional.lif_adex_refrac import LIFAdExRefracParameters from tqdm import tqdm from cgtasknet.net.lifadexrefrac import SNNlifadexrefrac from cgtasknet.instruments.instru...
dabe598e76bbcbaa95b90017095611aa16108f160c5952979010a9ec7ef9ddf5
Jupyter
8,640
220
# %% [markdown] # # 2-Cell and 3-Cell Motifs in PyC Subgraph (Th=100, with Proximity Constraints) # %% import os import random from time import time import pandas as pd import numpy as np import networkx as nx from utils.utils import * from utils.proximity import * from utils.graph_creation import * from utils.motif_...
9f54ce9a52fc71ec0f9ee6cefa7f99b26e99bca2a70be9163e7ebe816347cfc8
Jupyter
8,651
231
# %% [markdown] # # Render 3D Scale Bar # This demonstrates two techinques to create 3D scale bars on 3D visualization plots. # <span style="background-color: #aaaaaa">**NOTE:**</span> This example requires access to an X windows system to view the results. # %% # lets import some stuff.. from meshparty import trime...
b80588de3b50c077c40fbefbcb866369c57bbd87f27a4659684880cb303c2c77
Jupyter
8,652
201
# %% import sys sys.path.append('/home/thijs/repos/dnp-code/PGM3_correct/source/') sys.path.append('/home/thijs/repos/dnp-code/PGM3_correct/utilities/') sys.path.append('PGM3_correct/source/') # the path where the folder PGM is. sys.path.append('PGM3_correct/utilities/') # the path where the folder PGM is. # %% import...
a6bac188c577a2d81f4adcc8fbbb8c02699f4bba38f6504cbd929989af9c2eb2
Jupyter
8,656
284
# %% [markdown] # # Import Packages # %% # Default packages import os from os.path import join from datetime import date, datetime, timedelta from joblib import load, dump # Set current directory to "src" os.chdir(join(os.getcwd(), os.pardir, "src")) print(f"Current working directory: {os.getcwd()}") # Installed pac...
e7d57816d4a50e4973c15cdfecf61e017504228700e1b624e80430171ebfc8d8
Jupyter
8,699
296
# %% [markdown] # # Here we are computing the "binned" correlation between dLight and scalar variables shown in Figure 1 # %% [markdown] # Specifically, in this notebook we are: # # 1. Z-scoring the dLight data per session # 1. Binning dLight and scalars # 1. For dLight computing the average per bin and the peak rate...
6903a11acf18d4d71fe9a7083be7f73775460f954672b6d077d6130fb000b1cc
Jupyter
8,711
312
# %% [markdown] # # Responses to current steps recorded in DRN slices # # Shown in fig. 1. # %% from common import colors, sbarlw # %% import os; os.chdir(os.path.join('..', '..')) print(os.getcwd()) # %% import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gs import pandas as pd import ...
4881f1b31b9783ac3c12dc00a30127e0c57b67dbffca3e993de906df412f4732
Jupyter
8,735
228
# %% [markdown] # # Command line OAK usage for ontology editors (Alpha) # # ## Background (read this carefully) # # This guide is for usage of OAK on the command line with the *-edit* version of ontologies. # # In general, most users should **never** use the edit version. The exception is if you are part of the # de...
34e44ad848b0140bff6f497aea9a9d735f18c3c2c22aef2eccafb96f8d0473b3
Jupyter
8,802
237
# %% [markdown] # ## Why do we need this? # # # We are trying to solve several problems by proposing a new file format. Specifically: # # * Saving each conformation as individual file is producing too many files # * Using pickle-based approaches (joblib) makes format python-specific and not backwards compatible; t...
9eb48edad2ef08b021b3cfb316bc0aad578c55c5b4bfd5526a55862693553425
Jupyter
8,826
205
# %% [markdown] # <a href="https://colab.research.google.com/github/vekteo/ASRT_ultra_fast_consolidation/blob/main/Offline_online_changes_analysis.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # **Code for calculating offline vs....
23ffd475232bd4a07eca79bbf71d2190a0015c135fcd0f6dca4e1b87233e995b
Jupyter
8,855
297
# %% import os os.chdir(os.path.join('..', '..')) print(os.getcwd()) # %% import pickle import warnings import re import pandas as pd import matplotlib.pyplot as plt import matplotlib.gridspec as gs import seaborn as sns from grr.pltools import hide_border # %% plt.style.use(os.path.join('figs', 'scripts', 'writeup...
7d1eaaa5a9678070c3f2a1b5aa38fdd83aed092a3124953e3d1b965051ab4b38
Jupyter
8,937
218
# %% [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...
958fb9a00885181a45f3d4d48465b0f0638c860135e704b03ee7dabbeacfbb2b
Jupyter
8,969
396
# %% from tqdm.auto import tqdm from rl_analysis.plotting import setup_plotting_env, geno_palette from rl_analysis.maya.process import ( TARGETS, add_area, add_trial_count, add_onset_and_duration, ) from rl_analysis.io.df import exclude_uuids import pandas as pd import matplotlib.pyplot as plt import nu...
117a674389dc7c7c46d1a5db84f9faff1065773f939b801e4a31d379ca6a333c
Jupyter
8,973
324
# %% [markdown] # <style> # .extra-info p { # color: firebrick; # font-size: 13px; # font-weight: bold; # } # </style> # # # Dendrify basics # # In this first part of the tutorial series, we’ll focus on creating single compartments and updating their equations. In the second part, we’ll dive into how to...
95aeb1fb108b76f5ae48dc3fa6ec6157595d503b6daae6418a476265df3bdc60
Jupyter
8,974
265
# %% [markdown] # # Multi-task scorers # The scorers in the reinforcement learning framework described in the previous notebook are designed to work with a single task. # Multiple scorers can be added to the environment to handle multiple tasks. # However, we can also design a single scorer that can handle multiple tas...
816a07afee90c268d5f4b28e67b148da90c668bbd7b0df8db2f1a8339f896b4f
Jupyter
9,000
205
# %% %cd .. # %% import numpy as np import pandas as pd import matplotlib.pyplot as plt from pathlib import Path from tqdm.auto import tqdm import torch import torch.nn as nn import torchvision from dataloading.nvidia import NvidiaDataset, NvidiaTrainDataset, NvidiaValidationDataset, Normalize from pilotnet import P...
7e676045a186204a6c3c3f6ff3946cb8253decb39d3c881a8d633ead0a6eec1b
Jupyter
9,007
261
# %% import pickle import os import time import numpy as np import polychrom from polychrom import polymerutils from polychrom import forces from polychrom import forcekits from polychrom.simulation import Simulation from polychrom.starting_conformations import grow_cubic from polychrom.hdf5_format import HDF5Reporter...
dd2cf64cdb9dd9b0107a074d0b35eb25807cb6a4a6c46343b1b3c1e3b183ff14
Jupyter
9,027
294
# %% #Load the required libraries import numpy as np import pandas as pd from tensorflow import keras from keras.models import Model,load_model from keras import backend as K from keras import models, layers from keras.models import Sequential, model_from_json from keras.layers.core import Dense from matplotlib import...
60b513b472611079ba97e885ec194459096f6adad8e1ba049ffa9141dba0c496
Jupyter
9,079
280
# %% [markdown] # # Run Temporal Patch Classifier # Currently set up to run a temporal patch classifier that takes inputs of shape `(batch_size, h, w, 24)` # %% %load_ext autoreload %autoreload 2 # %% import json from keplergl import KeplerGl import matplotlib.pyplot as plt import numpy as np import os import pandas ...
15f184500f9787182fa8bd4856b08bdd8818d42941e1af8b0b399f3f3733f8fb
Jupyter
9,083
373
# %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% from tqdm.auto import tqdm from rl_analysis.plotting import ( setup_plotting_env, syllable_aliases, clean_ticks, savefig ) from rl_analysis.util import rle import pandas as pd import os import seaborn as sns import numpy as np import matp...
788b96455573ae3c7c39d98d1705e77520fd9c703f89e2a0ab1a988ef465edf6
Jupyter
9,084
222
# %% [markdown] # # 3T3 Cell Line # %% [markdown] # # Imports data structuring # %% #organização dos arquivos import os #salvar/carregar arquivos em diferentes formatos import joblib #organizando os arquivos de forma aleatória import random #gerar gráfico import matplotlib #estruturação dos dados import numpy as np #...
0e42dfd7bbc2f3ac97d7000c6aca4c6ccde0947695ccdbdd3b8ff6af8e25483b
Jupyter
9,090
291
# %% [markdown] # # Check GPU # %% #Check for GPU import tensorflow as tf # if tf.test.gpu_device_name(): # print('Default GPU Device: {}'.format(tf.test.gpu_device_name())) # else: # print('Please install GPU version of TF') tf.test.is_gpu_available() # %% #check keras and tf versions import keras print(kera...
ebdec8f85ba2051af479b58115dc0654a1803ced3e589366ef66a9cf71a00f8c
Jupyter
9,105
263
# %% [markdown] # # Import Packages # %% # Default packages import os from os.path import join from datetime import date, datetime, timedelta # Set current directory to "src" os.chdir(join(os.getcwd(), os.pardir, "src")) print(f"Current working directory: {os.getcwd()}") # Installed packages import numpy as np impor...
97ff830efe6720415ec348b3f8f12d2bf1438c18e2d78d3b1118f6247e3f7c24
Jupyter
9,107
236
# %% import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.ticker as mtick from matplotlib import gridspec import seaborn as sns import os from pathlib import Path import itertools import sys import pickle sys.path.append(os.path.join(Path(os.getcwd()).parents[0], "functions")) import...
7faab723d24e08fde375b5e2dc9cfb6415ac77fc724361048872ccc10b550b7d
Jupyter
9,112
264
# %% from caveclient import CAVEclient import nglui import numpy as np import pandas as pd import matplotlib.pyplot as plt # %% # this is the datastack name of the public release # passing it will auto-configure many of the services client = CAVEclient('minnie65_public_v117') # %% client.materialize.get_tables() # ...
fdf72e16ec96fd7075fd3a19b59bd42dca4a3389c9030aa52a3eb193fe7033f2
Jupyter
9,116
260
# %% import os import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from tqdm import tqdm from sklearn.metrics import roc_curve from sklearn.metrics import precision_recall_curve from sklearn.metrics import auc from sklearn.metrics import classification_report from sklearn.metri...
a28874d974a7daf732d7739cc7218a2c625ae48d9b46cb3598d4746ed0407386
Jupyter
9,130
345
# %% [markdown] # # Structure-Function Analysis # - Related to Figure 7. # - Visual response is correlated with connectivity. # %% import numpy as np import pandas as pd import pickle import datajoint as dj import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import seaborn as sns import statsmode...
ced5ff226873a09a4160ad075902fb2e56745923b6a5fd17863850a9805c771f
Jupyter
9,146
255
# %% [markdown] # # Code for analyzing volume output # - Uses cortical thickness data CSVs (../results/FreeSurfer) generated by "../scripts/freesurfer_surface_measures.sh" script using aparcstats2table utility from [FreeSurfer pipeline](http://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferAnalysisPipelineOverview) # - Us...
cac2ca2574e4a147f7db00afc6a6d5e69014aabef04e38486930f8683f212d9b
Jupyter
9,150
253
# %% [markdown] # # Replay Model # %% from network import Network import torch import numpy as np import matplotlib.pyplot as plt import seaborn as sns from functools import partial from multiprocessing import Pool # %% [markdown] # ## Set Hyperparameters # %% # Random seeds seeds_n = 20 mds_seed = 1 # Number of ...
82a2e78eb0ba5ad59e910f24db0fc2174af0e4230c331973b005e3fa2e3abb1e
Jupyter
9,167
241
# %% [markdown] # # GCN for predicting binding energy of transaminase mutants # # Use IGT or Spektral or any other form of GCN to predict the binding energy of a given transaminase mutant. # # The aim is to use binding energy data from 100,000 VfTA mutants (generated by Rosetta). # # Dataset is a set of ...
77089d225ca8cebab3e8f8cbc38562ee2c66ceaace32ed74a2eb746b0041fd3d
Jupyter
9,174
345
# %% import toml import joblib import random import numpy as np import pandas as pd import colorcet as cc import seaborn as sns import matplotlib.pyplot as plt from toolz import get from scipy import signal from os.path import join from tqdm.auto import tqdm from rl_analysis.behavior.moseq import syll_onset from rl_an...
c9b7e4e43e12ef9595b74591e42332ef0332a1265199db6025a1fc9280d4f8e0
Jupyter
9,195
191
# %% [markdown] # # THINGS-fMRI usage notes # %% [markdown] # For a detailed description of the data and the procedures that generated it, see [the THINGS-data preprint](https://doi.org/10.1101/2022.07.22.501123). # %% from os.path import join as pjoin import glob import numpy as np import pandas as pd from nilearn.m...
3c39d8aa066a81e0c05f598ef427bc2233cda50c32a3f92cdc7e3368f08c0204
Jupyter
9,205
123
# %% import pandas as pd import numpy as np import json # %% #in here are automatic intervention counts that may be wrong and do not exclude intersections and traffic results = """ Camera v1 (May) {'mae': 0.23088668332126538, 'rmse': 0.30444885103275254, 'max': 1.3838765496927377, 'failure_rate': 0.961781827385472,'di...
e929d0eead55a1d56dca58beedac3f4a2aa6f9cd5b083d4c2a00e88612ad7512
Jupyter
9,226
266
# %% import sys import os import itertools import numpy as np import matplotlib import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec import scipy.optimize as spopt import scipy.integrate as spi import scipy.stats as stats import tensorflow as tf import pandas as pd sys.path.append("../../ndsvae/...
56df79080cecdb49cf96082fc6dc42afaf07ec5adb057b5710c1c85038904c27
Jupyter
9,253
206
# %% [markdown] # # 1. Get doctor wise accuracy # %% import numpy as np import pandas as pd from sklearn.metrics import accuracy_score from base_code import * valid_data = pd.read_csv('../neurosurgeon35_data/neurosurgeon35.csv', index_col='Respondent ID') xai25 = pd.read_csv('../computational_data/xai25.csv') dr_wi...
493185cab8f238930776a4b6656154cb93649eddb1451410b3653464049cce2f
Jupyter
9,257
277
# %% import geojson import matplotlib.pyplot as plt import json import numpy as np import pandas as pd from PIL import Image import rasterio as rs from rasterio.plot import show from rasterio import warp from skimage import morphology from skimage.feature import blob_doh # %% def pixels_to_coords(x, y, src_img): l...
774ca0a1649c170079a813aa343cfa357828adb64ee3092e54ca3149bac8e715
Jupyter
9,269
285
# %% [markdown] # # Dissecting cell types for anatomical structures - Lung Epithelial Cells (advanced) # # This how-to walks through the process of extracting cell types for anatomical structures. # It illustrates some of the challenges and nuances of ontology extraction in domains such as anatomy. # # In theory it s...
a118801d3fab8e045ff0a16cde898d3b860e8fb160d6ca266041de1c613a1d1a
Jupyter
9,290
309
# %% [markdown] # # Generating stability plots and frequency spectra heatmaps for the macroscopic model # %% # this path append is for binder only import sys sys.path.append("../../") # spectrome modules from spectrome.utils import functions, path from spectrome.brain import Brain from spectrome.forward import ntf_m...
0293f732fd10836f67e7eb3f8fe02521a85fab1c4da64fc978f1034fb5feebc7
Jupyter
9,312
305
# %% import sys import os import itertools import numpy as np import matplotlib import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec from mpl_toolkits import mplot3d from sklearn.decomposition import PCA import pandas as pd sys.path.append("../../ndsvae/") import ndsvae as ndsv sys.path.append(...
fb0d57e5e1ebf0e1513026905d1d816916ba1ddfb1bdff7e61cecc6e90a3e10d
Jupyter
9,353
262
# %% import os import pandas as pd import numpy as np import torch import matplotlib.pyplot as plt import seaborn as sns from sklearn.utils import shuffle from tqdm import tqdm # %% np.random.seed(42) torch.manual_seed(42) # %% [markdown] # # Study population # %% data_dir = '../datafiles/chexpert/' input_csv = 'che...
dfe02b15a6b8aa8df2cc390f35266f02c202faf70f681d9c93871ea388b3f896
Jupyter
9,355
301
# %% [markdown] # # Check GPU # %% #Check for GPU import tensorflow as tf # if tf.test.gpu_device_name(): # print('Default GPU Device: {}'.format(tf.test.gpu_device_name())) # else: # print('Please install GPU version of TF') tf.test.is_gpu_available() # %% #check keras and tf versions import keras print(kera...
b513ab276213f822678a413d8e65f7a414a6907164e519b16a73e1004777b80a
Jupyter
9,373
275
# %% import os import numpy as np import pandas as pd from tqdm.notebook import tqdm import matplotlib.pyplot as plt import seaborn as sns from sklearn import metrics sns.set(context='notebook', style='white', font_scale=1.2) # %% try: import crossmapy as cmp except: import sys sys.path.append('../') ...
7f5efb0179674d1832044d3c3b8bfbe9415a91614ebe3c2459f941bdf0af4e30
Jupyter
9,463
354
# %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% from tqdm.auto import tqdm from rl_analysis.plotting import ( setup_plotting_env, clean_ticks, savefig ) from rl_analysis.models_rl.util import zscore_missing_data, shuffle_rows_copy from rl_analysis.util import count_transitions from rl_analy...
ec9354be593c1fe068d15b10f6e227a1d8667a0d6284114cce8a717db3215c7e
Jupyter
9,474
373
# %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% from tqdm.auto import tqdm from rl_analysis.plotting import setup_plotting_env, clean_ticks, savefig import pandas as pd import os import seaborn as sns import numpy as np # %% import toml with open("../analysis_configuration.toml", "r") as f: anal...
0aa6507332224b437a633579f87c8f639e6e289600b7b140afff673d09303691
Jupyter
9,483
282
# %% import numpy as np import os from pathlib import Path import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import pickle hfont = {'fontname':'Myriad Pro'} import matplotlib.ticker as mtick from matplotlib import gridspec import matplotlib.colors as colors import sys sys.path.append(os.path.jo...
56c6f2b0870e7398dcf971630eb68fdb6b769ba801f31b5d941e1da11c4b4fed
Jupyter
9,520
269
# %% %pylab inline import os import matplotlib matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['ps.fonttype'] = 42 # %% def find_variants(pval_file, start, end): x = [] header = True for line in open(pval_file): if header: header = False continue elems =...
70c998b2fa1bdaddfe839da66e8ad85da7ef43e09395631e8e2387328b49906d
Jupyter
9,563
420
# %% import matplotlib.pyplot as plt import numpy as np import torch from norse.torch.functional.lif_adex import LIFAdExParameters from norse.torch.functional.lif_adex_refrac import LIFAdExRefracParameters from tqdm import tqdm from cgtasknet.net.lifadexrefrac import SNNlifadexrefrac from cgtasknet.instruments.instru...
0bac88c632ab8b7bb8095574075c32ca7ef1074cee9cbb22c374b7a48bbb1594
Jupyter
9,612
304
# %% [markdown] # ## This is an example for doing 1D loop extrusion simulations # # The class is designed to be very flexible and easy to modify. It provides several small tools to make efficient simulations, and shows how to deal with LEF states, with two legs, etc. # # %% import numpy as np import pandas as pd i...
5ee6ba3c52efed5c79546313ecf6b9eb7b96c08f683a606735e059cb1f56e26b
Jupyter
9,638
355
# %% [markdown] # # Libraries import # %% import matplotlib.pyplot as plt import pandas as pd from rdkit import Chem, DataStructs from rdkit.Chem import AllChem, Descriptors import rdkit from rdkit.Chem import QED import warnings warnings.filterwarnings('ignore') # %% [markdown] # # Data loading # %% ROR_mol = pd.re...
4b048ab25c898379e663ef1d461c517b67853496a1063e68f645b3ce20408b8d
Jupyter
9,650
155
# %% [markdown] # # Data Sets # # You have to preprocess the data depending on the model you want to build. You can refer to sections relevant for your model of interest: # # 1. [Graph-Based Transformer](#Preparing-Data-for-the-Graph-Based-Transformer) # 2. [Smiles-Based Transformer](#Preparing-Data-for-the-Smiles-Ba...
4543af0bbbd9620ef3ecafdf47114ae086a4f5f55aed5889b70250f3321cbfe2
Jupyter
9,658
421
# %% import matplotlib.pyplot as plt import numpy as np import torch from norse.torch.functional.lif_adex import LIFAdExParameters from norse.torch.functional.lif_adex_refrac import LIFAdExRefracParameters from tqdm import tqdm from cgtasknet.net.lifadexrefrac import SNNlifadexrefrac from cgtasknet.instruments.instru...
2125389f82c3ac71805da1545705f2c4f1093163cfdc553dcdfad46e2b47618c
Jupyter
9,670
349
# %% import sys import pickle import pandas as pd import glob import re # %% # TODO define the folder of etabs you want to study here STUDY_PATH = "../../frappier_termless/tic0/*.etab" # %% myAmino = ["R","H","K","D","E","S","T","N","Q","C","G","P","A","V","I","L","M","F","Y","W"] FullAmino = ["ARG","HIS","LYS","ASP...
e21537751cd123abd1b86e849d18115deff498d08ae66dfb5386ec444c574fbd
Jupyter
9,673
357
# %% [markdown] # # Libraries import # %% import matplotlib.pyplot as plt import pandas as pd from rdkit import Chem, DataStructs from rdkit.Chem import AllChem, Descriptors import rdkit from rdkit.Chem import QED import warnings warnings.filterwarnings('ignore') # %% [markdown] # # Data loading # %% ROR_mol = pd.re...
8f0ef2ab0531f475c7abada210aac4a9fb007d6ad2ecb51fc5ce3de56bb8cb00
Jupyter
9,682
309
# %% import matplotlib.pyplot as plt from matplotlib.lines import Line2D import numpy as np import os import pickle from sklearn.model_selection import train_test_split from sklearn.utils import shuffle from tensorflow import keras from tensorflow.keras import layers from tqdm import tqdm np.random.seed(1) # %% def n...
01143b174dd666ccc36eab5818ade840b3656d91191de23907e21593462d8c20
Jupyter
9,705
303
# %% import os import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from tqdm import tqdm # %% [markdown] # # Study population # %% data_dir = '../datafiles/chexpert/' df_demo = pd.DataFrame(pd.read_excel(data_dir + 'CHEXPERT DEMO.xlsx', engine='openpyxl')) df_demo = df_demo.r...
25359d6ecced14ee1e2fcfe28a2eae56bbd1a88767b6981b802a6518291a6d6c
Jupyter
9,716
193
# %% [markdown] # ## Figures for The Paper # %% import numpy as np import matplotlib.pyplot as plt import seaborn as sns # %% #This how we load txt files from each forsal model of 10 #Train fused1_t_avg_cos = np.loadtxt('Fused_Train_AvgCosSim_1.txt', dtype="float",delimiter=",") fused2_t_avg_cos = np.loadtxt('Fused_...
711b3eebd21ce776bf6c1ca6637ce587fbd1d331943fe44604e512f47f9ea752
Jupyter
9,732
409
# %% import numpy as np import torch.nn.functional as fn import torch #load the entity list E = {} with open('entity2id.txt','r') as flr: line=flr.readline() line=flr.readline() while(len(line)>0): (name, idd)=line.strip().split('\t') E[int(idd)]=name line=flr.readline() #load the r...
b104568c091d0ef05511555a1d7e8a325093bfe64d55303519cfeedeccd3220c
Jupyter
9,768
157
# %% [markdown] # # Analyzing Mutations with Trained Models # # In this tutorial, we will explore some of Selene's tools for exploring and interpreting sequence predictions. # We are generally interested in models that predict various output labels for an input biological sequence. # For instance, we might want to pre...
28a81329884f5b9daaef6f84f7bf93589cddd669a43ef9493a458140136a69ab
Jupyter
9,773
299
# %% import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.ticker as mtick from matplotlib import gridspec import seaborn as sns sns.set_style("ticks") import os from pathlib import Path import itertools import sys import pickle import sys sys.path.append(os.path.join(Path(os.getcwd()...
70db40658d3f1ccfae291552a77edf559502b3e8195e90e32dcadcda28886613
Jupyter
9,773
423
# %% import matplotlib.pyplot as plt import numpy as np import torch from norse.torch.functional.lif_adex import LIFAdExParameters from norse.torch.functional.lif_adex_refrac import LIFAdExRefracParameters from tqdm import tqdm from cgtasknet.net.lifadexrefrac import SNNlifadexrefrac from cgtasknet.instruments.instru...
cb72bd5b40f293dc95df15215139661a47c4fecd44f9b3aa31afabfe23c35333
Jupyter
9,783
265
# %% [markdown] # <H1> Introduction to scPrisma </h1> # <h2> Reconstruction with partial prior knowledge</h2> # # This tutorial aims to provide a comprehensive overview of the scPrisma workflow, including the following steps: # # 1. Reconstruction of a target signal from scratch, utilizing prior knowledge of cell cyc...
169e9ee99f7167f07f0ffe612346ff0f2c3e2787fd0e514d866050751d9915e3
Jupyter
9,819
266
# %% [markdown] # <H1> Introduction to scPrisma </h1> # <h2> Reconstruction with partial prior knowledge</h2> # # This tutorial aims to provide a comprehensive overview of the scPrisma workflow, including the following steps: # # 1. Reconstruction of a target signal from scratch, utilizing prior knowledge of cell cyc...
3b906806ca0d046957e1687cd26f8f1180be33f8c1355b301ebe8619d24fd150
Jupyter
9,937
270
# %% import numpy as np import os from pathlib import Path import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import pickle import matplotlib.lines as mlines import matplotlib.ticker as mtick from matplotlib import gridspec import sys sys.path.append(os.path.join(Path(os.getcwd()).parents[0], "fu...
1c86a28847c00c0709c9d4c5e032ac4571a13e192cc3f76e226f884ece54ec99
Jupyter
9,957
193
# %% [markdown] # ## Figures for The Paper # %% import numpy as np import matplotlib.pyplot as plt import seaborn as sns # %% #This how we load txt files from each forsal model of 10 #Train dorsal1_t_avg_cos = np.loadtxt('Dorsal_Train_AvgCosSim_1.txt', dtype="float",delimiter=",") dorsal2_t_avg_cos = np.loadtxt('Dor...
57eb6d0e4b16907f8d1876c4f384416cb96f4504eaecf5d933e3e04eaab48340
Jupyter
9,964
308
# %% import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import matplotlib as mpl import pickle mpl.rcParams.update({'font.size': 14, 'axes.labelsize': 'medium', 'axes.titlesize': 'medium', 'legend.fontsize': 12}) # %% def fold_analysis(run_name): dfs_fold = pd.read_csv(f'...
07a86889ef16c9f328d5510a93f31896968e0c2ea4d4e275885a8e359f64c300
Jupyter
9,972
264
# %% [markdown] # # 2-Cell and 3-Cell Motifs in PyC Subgraph (Th=100) # %% import os import random from time import time import pandas as pd import numpy as np import networkx as nx from utils.utils import * from utils.proximity import * from utils.graph_creation import * from utils.motif_counts import * from utils.v...
f7f1a9aef54df6a77b5b6772e9b18c270af2448f6c84640ba303e6c6a13d1f8b
Jupyter
9,987
352
# %% [markdown] # ## Single-task DNN keras model training on Tox21 # %% [markdown] # This notebook creates a single-task DNN classification model to predict toxicity (toxic / nontoxic) on the RTECS dataset, using # - same splits as pytorch MTDNN and STDNN # - same architecture as the pytorch STDNN on RTECS # - FP...
4a7f23d7881e4faddc733beb44bb6310ab5361646c1e97c121fc5a2f9b565279
Jupyter
10,014
272
# %% [markdown] # # ROI detection with Deep Learning # Notebook used to test training of deep neural network with PyTorch for detecting ROIs. # %% %matplotlib inline import os, sys, time, shutil import random import ipywidgets as widgets from ipywidgets import interact import numpy as np import matplotlib import mat...
d82da57d96d134ca1ec81fef6f48754c6cb57706b91e676ce5cccd1579eecd27
Jupyter
10,015
372
# %% import numpy as np import pandas as pd from scipy.io import loadmat import glob import os import sys import matplotlib.pyplot as plt import seaborn as sns sns.set(style="white") from scipy import stats from mne.viz import circular_layout, plot_connectivity_circle import statsmodels.api as sm from statsmodels.form...
2b44a0f1c882ee0471513b8e29a25ded27949e461d89f03cd461f05d4bf9535f
Jupyter
10,024
402
# %% # Change directory to VSCode workspace root so that relative path loads work correctly. Turn this addition off with the DataScience.changeDirOnImportExport setting # ms-python.python added import os try: os.chdir(os.path.join(os.getcwd(), '../..')) print(os.getcwd()) except: pass # %% [markdown] # # Signal f...
66b2588d0acfd26525902d461706ee2db5673cc61075060bb4047a36b7ce4ea5
Jupyter
10,035
308
# %% import os import numpy as np import pandas as pd from tqdm.notebook import tqdm import matplotlib.pyplot as plt import seaborn as sns from sklearn import metrics sns.set(context='notebook', style='white', font_scale=1.2) # %% try: import crossmapy as cmp except: import sys sys.path.append('../') ...
a1c9119269302aebda2e470270f2a7682268244388348a2e6d906559e7995bf2
Jupyter
10,038
294
# %% import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.ticker as mtick from matplotlib import gridspec import seaborn as sns sns.set_style("ticks") import os from pathlib import Path import itertools import sys import pickle import sys sys.path.append(os.path.join(Path(os.getcwd()...
dae752f81d818b9bfe3101705e227f4086e46c8352e5e139af7ada3336072f5b
Jupyter
10,074
355
# %% [markdown] # # Compute syllable sequences and entropy in an expanding window after syllable onset (for display examples) # # 1. Note that you can use a dask scheduler by setting `dask_address` to the address of the scheduler (see `../analysis_configuration.toml`) # 1. Note that you must compute `syllable_stats_of...
318d16cc1e814a62c538e1b305d400e7306e5aecdd236dbafaad5b5dbd9410b7
Jupyter
10,092
368
# %% [markdown] # # Libraries import # %% import matplotlib.pyplot as plt import pandas as pd from rdkit import Chem, DataStructs from rdkit.Chem import AllChem, Descriptors import rdkit from rdkit.Chem import QED import warnings warnings.filterwarnings('ignore') from chembl_structure_pipeline import standardize_mol, ...
6139c18371710ff6d72604a95b6c1cefc2bf7d249a78ea8f9b56ccee594c7cf1
Jupyter
10,142
441
# %% import matplotlib.pyplot as plt import numpy as np import torch from norse.torch.functional.lif_adex import LIFAdExParameters from norse.torch.functional.lif_adex_refrac import LIFAdExRefracParameters from tqdm import tqdm from cgtasknet.net.lifadexrefrac import SNNlifadexrefrac from cgtasknet.instruments.instru...