sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
f8720859bac33ba1b19fcd442cf52607e811552482832f1d5b721684fa04dd82
Jupyter
19,808
300
# %% import pandas as pd import numpy as np import json # %% results = """ Camera v1 {'mae': 0.27153275613021877, 'rmse': 0.38624637618598856, 'max': 1.7149375548548547, 'failure_rate': 2.816812454605741, 'distance': 7315.052901123929, 'distance_per_intervention': 166.2512022982711, 'interventions': 44, 'whiteness': 4...
5ba8a121340ea2fce0ee0506f3a6130c7e222ac663d8647b777fa3581c3dc992
Jupyter
19,863
630
# %% [markdown] # # Find the best parameters for the RL model and fit # %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% from tqdm.auto import tqdm from rl_analysis.util import count_transitions from rl_analysis.io.df import dlight_exclude from rl_analysis.models_rl.models import simulate from rl_analysi...
d71f10249683d62ccf37e532928ee297e6c0d6a45612de4237dfaa3f44f89683
Jupyter
20,094
490
# %% import shutil import time from typing import final from openai import AsyncOpenAI import json import os import asyncio import pandas as pd # OPENAI - TEXT --------------------------------------------- async def OpenAI_QA_FunctionCall_general(message_content:str, model_name: str, openai_api, ...
47f9fa224b6728deba6e03c95990fc16d0f3588a055e82a6fb48223664bb849c
Jupyter
20,097
587
# %% [markdown] # <a href="https://colab.research.google.com/github/Poirazi-Lab/dendrify/blob/main/paper_figures/Fig4_notebook.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # ## Overview # > *In this interactive Python notebook, we...
4d76ef46b3ecef4be35f6f26dc4ce3d05d6e0a6b31ed5abcc383516c4bb66d29
Jupyter
20,118
588
# %% [markdown] # <a href="https://colab.research.google.com/github/Poirazi-Lab/dendrify/blob/main/paper_figures/Fig4_notebook.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # ## Overview # > *In this interactive Python notebook, we...
0c8487c24dc0923befc2b0895217d1f9d0055f78d02121d49e4518d28ccd8520
Jupyter
20,124
640
# %% [markdown] # ##### This notebook creates STDNN-FP (pytorch) for classification prediction on RTECS # # RTECS dataset has been commented out. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # Before use define desired pathways to save models,: # - path variable, in "Create checkp...
20c42fef12c5d2b728e9516a964c349f5d68b8a3ce6f490b14c1ecf32f32a1be
Jupyter
20,138
394
# %% [markdown] # # Repoerting MNI/PPMI/ADNI data demographics and initial test for L2 based matching # This is the notebook for dataset demographics visualziation and choosing the propor testing the matching the control subjects with our ET subjects to creat new subsamples that is # ## Data: # - 1. MNI demograph...
3f6a9d07be8722c08f414a04949133892a10ff0acca67f8daa10b252e70658c7
Jupyter
20,168
649
# %% [markdown] # ##### This notebook creates STDNN-SE (pytorch) for classification prediction on RTECS # # RTECS dataset has been commented out. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # Before use define desired pathways to save models,: # - path variable, in "Create checkp...
448238a50dd4af26b549829b8e92e01b961f0d24b2f30197affe9129ff988481
Jupyter
20,283
446
# %% [markdown] # # Synthetic generation # Notebook used to make whole stacks of synthetic data based on single step results (synthetic_tests.ipynb). # # **Note that there are a lot of hard coded numbers below. They are/have been empirically tuned by visual comparison to real data.** # **Note:** the script `run_ge...
4396d25382a05a3d61622f0a61b375a2836fc97591cd20321e5b3f1ac4c95aa5
Jupyter
20,286
742
# %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% from rl_analysis.plotting import savefig, setup_plotting_env, clean_ticks, geno_palette from rl_analysis.io.df import dlight_exclude_toml from rl_analysis.photometry.snippet import get_shuffle_average from functools import partial from tqdm.auto import tq...
4fbd920f156bf78106006a9543b6aded2e56a34f3c8d3501a7a332c321ab03ae
Jupyter
20,320
575
# %% [markdown] # # Annotate experiments # Notebook used to create binary annotations for experiments using a computer vision approach, or deep networks. # Manual tuning and correction are used to improve the quality of the detection, before it is used as ground truths. # %% %matplotlib inline import os, sys, time,...
4b98178250a57d9593bffb4173c5399672090af1f6305d6f8c1e64dc94655693
Jupyter
20,332
666
# %% [markdown] # # Extracting Reaction Networks from RHEA # # This notebook shows how to extract edges connecting RHEA reactions based on shared non-currency metabolites. The resulting network can be used to analyze the connectivity of RHEA reactions. # # # %% # TAXID = "9606" # Hs TAXID = "7227" # Dmel OUTDIR =...
85216fefc19a495525f5073eb9a4710b264c76307b29c1bd04bb3a31a4f3de5b
Jupyter
20,334
643
# %% [markdown] # ##### This notebook creates STDNN-FP (pytorch) for classification prediction on ClinTox # # Using split data already saved. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # Before use define desired pathways to save models,: # - path variable, in "Create checkpoint"...
8fc749d7696538e1ad72ff7b43ade329ae83d3fdf12d49845d06ef323c50a835
Jupyter
20,343
648
# %% [markdown] # ##### This notebook creates STDNN-SE (pytorch) for classification prediction on Tox21 # # Using split data already saved. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # Before use define desired pathways to save models,: # - path variable, in "Create checkpoint" s...
de37713389d595cbfac1af9abe5b2da233c580aae3c71fa62ec96058dce994ff
Jupyter
20,460
645
# %% [markdown] # ##### This notebook creates STDNN-FP (pytorch) for classification prediction on Tox21 # # Using split data already saved. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # Before use define desired pathways to save models,: # - path variable, in "Create checkpoint" s...
1e525fd13a57cd46423c2823ea0641e2cc197abd9721835b9e115cf0c35ad442
Jupyter
20,466
657
# %% [markdown] # ##### This notebook creates STDNN-SE (pytorch) for classification prediction on ClinTox # # Using split data already saved. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # Before use define desired pathways to save models,: # - path variable, in "Create checkpoint"...
e40a17278917cff28ecc800fdb5e7314fab535bed9b2f54b14e79d37392c5817
Jupyter
20,512
603
# %% [markdown] # ## NoteBook to Train and Visualize the Features Network # %% # Importing bunch of libraries import os import cv2 as cv import time import random import warnings import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm from itertools import chain from skimage.io import imread, imshow...
3d269fd1860a84ad531f84632d73449e9f9e9862ebd41f6f03b848c949a05b97
Jupyter
20,638
691
# %% """ jupyter-nbconvert report_arch.ipynb --to python python -u report_arch.py --expt_dir ~/plume/plumezoo/latest/fly/memory/ """ # %% 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 a...
ee1ba6a661270396d08b4ad10ee9d9de1c696720652d414bcf3c5632806a94b5
Jupyter
20,925
555
# %% 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 = [] for fol...
bee436aef35a38e7017174c1b331aed9ab481e4ada801437b1a8d22f159540ca
Jupyter
21,164
643
# %% import pymesh # %% import numpy as np import sys sys.path.append("../../../source/") # %% ground_truth_dir = 'ground_truth/' masif_pred_dir = 'masif_pred/' transient_interactions_file = 'testing_transient.txt' # List of sppider_predictions sppider_pred_dir = 'sppider_pred/' # List of intpred_predictions intpre...
ab896ecfecc097de5a44a67de11bf4d88b180b9db35812c1186dd23f4e569031
Jupyter
21,202
837
# %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% use_platform = "cpu" # %% if use_platform == "cpu": import numpyro import multiprocessing as mp numpyro.set_host_device_count(mp.cpu_count() * 10) numpyro.set_platform("cpu") # %% import jax.numpy as jnp import jax from jax.example_libra...
0358bc8fac6b5f4e24b97999535fcd4eb56d544f2bfa9eff092e7865d90bedcd
Jupyter
21,224
575
# %% [markdown] # # Tracking test # Perform test for the neuron tracking (identities). # Inputs are RGB and binary detection frames, and the tracker outputs frames similar to the binary segmentation with a different values for each neuron identity: # * 0: background pixels # * 1: pixels of the axon n°1 # * 2:...
5b6b64dad63fcba54828aa8131b9e798014ae377bdd21f4d7aed392b892480e3
Jupyter
21,449
487
# %% [markdown] # # Hsp70 protein Notebook # The Hsp70 protein is chaperone protein; they can assist folding and assembly of newly synthesized proteins, trigger refolding cycles of misfolded proteins, transport unfolded proteins through organelle membranes, and when necessary, deliver non-functional proteins to the pro...
30b504d691eee5f6fdb74cd084f664edd3dfee1386cfb7a9f4d61fa2b57a6922
Jupyter
21,465
685
# %% [markdown] # ##### This notebook creates MTDNN-SE (pytorch) for classification prediction on ClinTox and RTECS # # Using split data already saved. # # RTECS dataset has been commented out. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # Before use define desired pathways to s...
c58b8bb54cd4b6a55e7746d46cd84cbae8437d1385f06bb81f304588144847c1
Jupyter
21,513
671
# %% from functools import partial import json import os import pickle from datetime import datetime import ee import geemap from multiprocessing.dummy import Pool as ThreadPool import matplotlib.pyplot as plt import numpy as np import pandas as pd from tqdm.notebook import tqdm import sys sys.path.append('../') from...
506842d8f5874ee9c7e3a5f40b0c5658051fd4e92b3ac5f231dd152d9f45c9f6
Jupyter
21,677
682
# %% [markdown] # ##### This notebook creates MTDNN-FP (pytorch) for classification prediction on ClinTox and RTECS # # Using split data already saved. # # RTECS dataset has been commented out. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # Before use define desired pathways to s...
29c99792218f8a0f84c991e976cda5e8339eadc236c07c694b4bf14fc9c106e0
Jupyter
21,753
685
# %% [markdown] # # Setup # # %% [markdown] # ## Get files / dependencies # %% %tensorflow_version 1 # %% !python --version # %% !git clone https://github.com/google-research/proteinfer %cd proteinfer !pip3 install -qr requirements.txt import pandas as pd import tensorflow import inference import parenthood_l...
62273d95d5681f8c673e054bb56ac9c0c3b9584845acc1858e585a785f46288e
Jupyter
21,783
693
# %% [markdown] # ##### This notebook creates MTDNN-SE (pytorch) for classification prediction on Tox21 and RTECS # # Using split data already saved. # # RTECS dataset has been commented out. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # Before use define desired pathways to sav...
d827ae6a9adb18583cb4a3c77dbf08db0aa38eaaecce76b03d1b2d8485f6aef0
Jupyter
21,874
553
# %% [markdown] # ### This notebook takes the reader through all the test data used throughout the manuscript and creates clean and usable files for each panel # # For each saved file, the fields correspond to : # <pre> # `sequence` : the sequence # `Measured Expression` : the measured expression (or expression change...
71a0bf5ce3e87db81c1981a2229a1297802f7d2f20a5de321b760b0e11ca2bc3
Jupyter
21,951
820
# %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% from tqdm.auto import tqdm from rl_analysis.plotting import ( setup_plotting_env, clean_ticks, clean_plot_labels, format_pval, savefig ) from rl_analysis.regression import model_fit from rl_analysis.io.df import dlight_exclude from rl_...
440b09a10b7348f0d6d15212925a09e1f7c724c368304cb7adb8c8f9d3003d11
Jupyter
21,977
692
# %% [markdown] # ##### This notebook creates MTDNN-SE (pytorch) for classification prediction on Tox21, ClinTox, and RTECS # # Using split data already saved. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # Before use define desired pathways to save models,: # - path variable, in "...
d746200118abbb61ec4374443c1057f4b8d76327deed92bde7924038b4aae5cd
Jupyter
22,005
689
# %% [markdown] # ##### This notebook creates MTDNN-FP (pytorch) for classification prediction on Tox21 and RTECS # # Using split data already saved. # # RTECS dataset has been commented out. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # Before use define desired pathways to sav...
9f6f17c5940c934b92b89c2683c1c5365b5a8362f6b1a83c3944bc21e2d6d032
Jupyter
22,102
688
# %% [markdown] # ##### This notebook creates MTDNN-FP (pytorch) for classification prediction on Tox21 and ClinTox # # Using split data already saved. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # Before use define desired pathways to save models,: # - path variable, in "Create c...
5c7aaa4570bc16f0a9c8a9b33105ba5690f8e5e9f8bd9e90bad4c12468377fcb
Jupyter
22,223
519
# %% [markdown] # ## 1: Import required packages & functions <a class="anchor" id="chapter1"></a> # %% print('Importing libraries') %reset -f import warnings warnings.filterwarnings("ignore", category=FutureWarning) # clear all variables for i in list(globals().keys()): if(i[0] != '_'): exec('del {}'.fo...
5c612c0ce47686d0bed89d51f224c0c23b51cd3f138728a0e0d810c4d59ecf2c
Jupyter
22,248
608
# %% [markdown] # ## NoteBook to Train and Visualize the U-Net Network # %% # Importing bunch of libraries import os import sys import time import random import warnings import cv2 as cv import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm_notebook as tqdm from skimage.io import imread, imshow fro...
7b8737301b981a5745592c6fa6dc019e9057ab351cf7dbc7e04a25acbf7a83a1
Jupyter
22,306
621
# %% from __future__ import division import os import math import random import scipy.stats as stats import numpy as np import seaborn as sns import pymworks import pickle from collections import Counter import matplotlib.pyplot as plt %matplotlib inline # %% sns.set_style('ticks') # %% pickle_files_have_phases = Fal...
5da9a068a6825414047dbf1f92740ccb8078c3d6c513589935e0e9765512a45d
Jupyter
22,316
717
# %% %pylab inline %config InlineBackend.figure_format = 'retina' #pip install pytorch-lightning # pip install ipywidgets # %% gpu_info = !nvidia-smi gpu_info = '\n'.join(gpu_info) if gpu_info.find('failed') >= 0: print('Not connected to a GPU') else: print(gpu_info) # %% #install pyg import os import torch os....
a96f92b8b6b73b3888a2fcdcadb66a33b219b771c2538f2ae987149e5c86e14b
Jupyter
22,471
632
# %% [markdown] # # Train a Patch Classifier via Weak Labeling # %% [markdown] # This notebook takes strongly labeled data, generates an ensemble of patch classifiers, trains an SVM, then uses all of this to generate weak labels on a ton of unlabeled data. This unlabeled data with weak labels is then combined with the...
9e7184b5bbf51d5e75e09a78fdbe92b93033500ee12ff7c1dcf01f1e02e70e0e
Jupyter
22,706
711
# %% [markdown] # ##### This notebook creates MTDNN-SE (pytorch) for classification prediction on Tox21, ClinTox, and RTECS # # Using split data already saved. # # RTECS dataset has been commented out. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # Before use define desired pathw...
17ef9799657bfac78d0e492375b33bef52f6f8a5d6a92ed1c2b3714ffe2322c8
Jupyter
22,878
647
# %% [markdown] # # Knowledge Assembly # %% from network import Network from helpers import fit_sigmoid, mean_squared_error, rotate, load_behavioural_data from plotting import plotting_init, matrix_plot, mds_plot import torch import numpy as np from scipy.special import expit from sklearn import manifold from sklearn...
5cfc46766ba7f3f27fbdfb9e8bda0e644750e6bbf7b254aff56d99b4265ce3f3
Jupyter
22,953
715
# %% [markdown] # ##### This notebook creates MTDNN-FP (pytorch) for classification prediction on Tox21, ClinTox, and RTECS # # Using split data already saved. # # RTECS dataset has been commented out. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # # Before use define desired pa...
2c0828bafb61b1273ef1700ee681c50fdc18f298bbd7994a31739cc1c8a7d3da
Jupyter
22,985
902
# %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% from tqdm.auto import tqdm from rl_analysis.plotting import ( setup_plotting_env, geno_palette, syllable_aliases, savefig, plot_pval, clean_ticks ) from rl_analysis.batch import apply_parallel_joblib from rl_analysis.behavior.util ...
0cf3f962052e436f569bc333d65eb12adb273f45e1bccc2952741fbea0e16b60
Jupyter
23,108
635
# %% [markdown] # ## NoteBook to Optimize the Parameters for the U-Net Network # %% # Importing bunch of libraries import os import sys import time import random import warnings import cv2 as cv import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm_notebook as tqdm from skimage.io import imread, i...
239b861e501954471dc6bdb17bbfa1191f26669f1d94bfd9b8dca03070cf1fab
Jupyter
23,138
537
# %% [markdown] # # Weighted Margin Classifier (QNN) # *Reformulation of [PennyLane's Margin Classifier](https://pennylane.ai/qml/demos/tutorial_multiclass_classification.html). Disabled random batch sampling from training set per iteration.* # - **Weighted**: weighted loss function to handle class imbalance # - **Marg...
1826f58e213b4851df32aa56e7c1d4847895cfc5df1ffd06c1759d457417f81c
Jupyter
23,274
785
# %% """ jupyter-nbconvert report_correlations.ipynb --to python; python -u report_correlations.py MDIRS=$(ls -d trained_models/ExptDynamic20210521/*VRNN*/) for MDIR in $MDIRS; do python -u report_correlations.py --model_dir $MDIR done """ # %% from __future__ import division import os import glob import pickle fro...
679f01463fa451fcc5907402a4aa537bfdfca8000eae54550f7aeb0518d66d12
Jupyter
23,279
618
# %% import numpy as np import pandas as pd import os from pathlib import Path import selfies as sf from rdkit import Chem import pandas as pd # %% [markdown] # # Molecule retrieval from Zinc20 smi files # %% Is_data_prepared = True if not Is_data_prepared: tranche_dirs = ['FK', 'DC', 'BB', 'JA', 'HE', 'GA'...
72b72d872ce7d8845cc7b5661c9bae7cb30ab562e43b11472df15364005822f8
Jupyter
23,322
396
# %% [markdown] # # Getting Started with Selene # # This tutorial explores the core components of Selene, and should teach you everything you need to know to train a simple model on biological sequence data. # Before starting this tutorial, you need to install Selene. # Instructions for installation are available [he...
fb2cfa451a3d2124ad829f193278a977ecfd90cf0caa84100f1a5094d05ab284
Jupyter
23,353
475
# %% [markdown] # # Where Ontology Similarity and Text-Embedding Similarity Disagree # # For a sample of term pairs in each of several ontologies, we compare: # # - **ontology similarity**, computed from the terms' ancestor closures: # 1. Jaccard over `is_a` ancestors; # 2. Jaccard over `is_a` + `part_of` ancesto...
11c988af8b986ed0ee34e9689d5e8412d6e912a1d2634a950c7a34ba6d4a551b
Jupyter
23,416
692
# %% # 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()) os.chdir("/Users/bpedigo/JHU_code/maggot_mod...
415e03f3aeb0681c1540bdd670d2db5157d9472eaa731f8c7adbf37bdf549f02
Jupyter
23,598
717
# %% import numpy as np from tensorflow import keras from tensorflow.keras import layers # %% import pickle import pandas as pd import matplotlib.pyplot as plt import os from sklearn.preprocessing import normalize as sklearn_normalize from sklearn.utils import shuffle from tqdm.notebook import tqdm from matplotlib imp...
4bd6a744315516e4cf542a10b85ce57b5dace016dac92fd9bfac4af80ee3df73
Jupyter
23,814
779
# %% import os import sys module_path = os.path.abspath(os.path.join('..')) if module_path not in sys.path: sys.path.append(module_path) # %% from visualization_utils import ( ImageType, generate_aim_spec, align_aims, read_image_to_numpy, single_axis_image_and_masks ) import numpy as np import pandas as ...
bbc174803816a81e043e6075d8b6d88da047ddb96855be54d535f5704fe4ce0e
Jupyter
23,945
894
# %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% from tqdm.auto import tqdm from rl_analysis.plotting import ( setup_plotting_env, clean_plot_labels, savefig, clean_ticks, plot_pval, format_pval, geno_palette, ) from sklearn import model_selection from copy import deepcopy fr...
d0264e22cd618f66a03a74162ce91389a6464123450df9c41ccbe5adcdd61488
Jupyter
23,976
880
# %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% from rl_analysis.plotting import ( setup_plotting_env, geno_palette, syllable_aliases, lighten_color, clean_ticks, savefig ) from collections import defaultdict from scipy.stats import pearsonr from sklearn.utils import shuffle fro...
861147935e4631e3f75fc53674703eb44f45bf1175bea05688f3f6ed55082b87
Jupyter
24,695
772
# %% [markdown] # # Setup # # %% [markdown] # ## Get files / dependencies # %% %tensorflow_version 1 # %% !git clone https://github.com/google-research/proteinfer %cd proteinfer !pip3 install -qr requirements.txt import pandas as pd import tensorflow import inference import parenthood_lib import baseline_utils...
25668952d7a844a25ffccae5ea3b91c68b051165c26e361b307c91357f704e13
Jupyter
24,855
639
# %% 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...
c36eeb6a07505b09dab320a2d19884ef3946de62c1946b3b7689775be221b5d5
Jupyter
25,002
954
# %% from manager import ModelManager from tables import Cells, Model_Waveforms, Models, Cell_Closest_Ephyz_Clusters from pandas import DataFrame import numpy as np import pandas from matplotlib import pyplot as plt import string from scipy.stats import pearsonr import statsmodels.formula.api as smf import hdbscan fr...
10cc4911f659a7f15847ddee792a188b2199798e2c403675b4b9dab5a31ab6d2
Jupyter
25,285
786
# %% [markdown] # # Libraies # %% import warnings import os import sys import sqlite3 import time import numpy as np import random import pandas as pd import math import matplotlib.pyplot as plt from sklearn.model_selection import StratifiedKFold from sklearn.metrics import auc from sklearn.metrics import roc_auc_sco...
272d589690ed0c00a22e0705bf2f22b7687c33892cc802285bfeb9a132951dbd
Jupyter
25,797
593
# %% import ipywidgets as wg import pandas as pd import matplotlib.pyplot as plt import numpy as np import igraph import copy from mpl_toolkits.mplot3d import Axes3D from IPython.display import Image from jie.demo import mock_experiment, error_types, polymer_model, polymer_skip, find_polymer from jie.aligner import ...
c027ad7225b83bbb2f640c833e0c2982190f0b67c7253d731bb75ba5ed1dfaba
Jupyter
26,464
545
# %% [markdown] # # About the Model # # TODO (advantages, disadvantages, some pictures from the application note, ...) # # ## Data Preparation # # In this tutorial, we assume you already extracted the required data and models with the download utility as described in the [README](README.md) file. They should be loca...
6424e681d6394a0d53fc2a282c2b35879e7cd2866dd67297fd86128c9ab0e1fa
Jupyter
26,484
359
# %% [markdown] # # Merging volumentric ROI measures and freesurfer surface measures. # - Cortical thickness/volume/aseg/wmparc data generated by "../tab_data/freesurfer_stats2table.sh" from fMRIPrep_20.2.0 freesurfer_6.0.1 # - Cerebellar segmetations in both SUIT34 and MDTB10 spaces. # - Uses participants data (../tab...
d9ba244f652c7f0675ee467f8a9baaaf6f01e18118dbfd101c0157d8ce6d41c7
Jupyter
26,534
796
# %% [markdown] # # Plot yeast RBD DMS escape maps # %% [markdown] # ## Import modules and read data # Import Python modules: # %% import itertools import os import altair as alt import numpy import pandas as pd import sklearn.manifold # %% [markdown] # Disable max rows specifier for Altair: # %% _ = alt.data_t...
319250ee6016ffd4402a1391b11c1b06908da920e0ac9c9c05b4b739130132b5
Jupyter
27,486
740
# %% """ If not already in your environment, install necessary packages.""" #!pip install pickle, scipy # %% from common_functions import * from plotting_functions import * # %% import math import numpy as np from scipy import stats import matplotlib.pyplot as plt import pickle from random import randint # %% p_val...
1ae1cf68d8faab8fb472d8a69ebaf13084e1c03115f852281dd9c36616fcfb48
Jupyter
28,259
728
# %% [markdown] # ## LLMs # %% #%pip install shap %pip install xgboost import pandas as pd import shap import matplotlib.pyplot as plt import openpyxl import numpy as np # %% excel_path= r"C:\Users\LEGION\Documents\GIT\Tehran_COVID_Cohort\DO_NOT_PUBLISH\LLM_X_test_dataset.xlsx" ground_truth_col = 'Inhospital Mortalit...
d06d007980213c43ef190a0ac57f5ec1b972c10bdbe00e5c775199a211de59c8
Jupyter
28,580
496
# %% [markdown] # ## Power analysis for: Reproducibility of cerebellum atrophy involvement in advanced ET. # # 1. Working with only MNI dataset will result in underpowered research: # posthoc power analysis with alpha=0.05, et=38, nc=32 and effect size 0.61 (obtained from literature median, both 1-sided and 2...
aaf9d78883dc0937ba8770ef5f3e54c8691b9b157d5314be08e5954af0cf3ce1
Jupyter
29,185
837
# %% [markdown] # <a href="https://colab.research.google.com/github/Poirazi-Lab/dendrify/blob/main/paper_figures/Fig5_notebook.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # ## Overview # > *In this interactive Python notebook, we...
3d061ed9c991862dc560b21490f1ad05f7b080e9c6b1d3f9bb4e05ea355c2e90
Jupyter
29,206
838
# %% [markdown] # <a href="https://colab.research.google.com/github/Poirazi-Lab/dendrify/blob/main/paper_figures/Fig5_notebook.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # ## Overview # > *In this interactive Python notebook, we...
d5b3bff0a23f4e77d53c3d901e4b09412926ce9ddae56b81372952e506d8f3de
Jupyter
29,343
826
# %% [markdown] # ### Getting started # %% import warnings warnings.filterwarnings("ignore", message="Boolean inputs to the `inclusive` argument are deprecated infavour of `both` or `neither`.") import numpy as np import pandas as pd import copy import tqdm import matplotlib.pyplot as plt from collections import de...
3970cc0ef462b23e0eb7197b89915c5115da4a6bfc9539758223b0ef7b8a3504
Jupyter
29,483
684
# %% [markdown] # ## Script to parse behavioral data from pickle files # # The purpose of this notebook is to parse the behavioral data in the appropriate pickle files into a format that is easily usable for analysis and plotting. # # The pickle files for each animal contain dictionaries where the keys are session na...
fd0a46e415bd4ebc8045516a29ef51bc2d435149bb27e64e5510efb83ea05120
Jupyter
29,501
808
# %% [markdown] # ### Getting started # %% import warnings warnings.filterwarnings("ignore", message="Boolean inputs to the `inclusive` argument are deprecated infavour of `both` or `neither`.") import numpy as np import pandas as pd import copy import tqdm import matplotlib.pyplot as plt from collections import de...
2ee5a16f690e59806eea36f1e08ccf914118925f02fbe8fb03a1d41e62f81960
Jupyter
29,829
1,170
# %% [markdown] # # CHEBI Slimmer # # Creates a simplified version of CHEBI by conflating all members of a conjugate clique. # %% [markdown] # ## Initial setup # # Imports and use OAK to get an adapter to CHEBI sqlite database. # %% from typing import Optional, List from collections import defaultdict import panda...
b61dc0b41da2dee94f370300452ab3dbeb536a0431f4980fc40cd90b0a2902b9
Jupyter
30,429
1,101
# %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% from tqdm.auto import tqdm from rl_analysis.plotting import ( setup_plotting_env, clean_ticks, savefig, ) from scipy.stats import mannwhitneyu from rl_analysis.photometry.decoding.models import exp_smoother from rl_analysis.photometry.decodi...
2eae73e083153c6ae3bb337959bd2656d18b9290d02f2264575347fb00a29976
Jupyter
31,392
617
# %% import numpy as np import matplotlib.pyplot as plt import pandas as pd import pickle import scipy.stats import plotting_functions as pf import analysis_functions as af import sklearn pf.set_fontsize(font_size=12) %load_ext autoreload %autoreload 2 plt.rcParams['font.family'] = 'sans-serif' plt.rcParams['font.sans-...
a18a32f8843c869daff795fcd11b8c7f519f0b86b42c0950935c4a7cb33d81b8
Jupyter
31,686
1,187
# %% import math import torch import torch.nn as nn import torchvision import torchvision.transforms as transforms import matplotlib.pyplot as plt import pytorch_lightning as pl import torch.nn.functional as F from pytorch_lightning import Trainer from torchnlp.nn.attention import Attention # %% from blitz.modules imp...
0fe9c275b6ef4ed6bc0e7d20623a95659bcc22952cc987ea4765c7f18e450760
Jupyter
31,704
1,078
# %% [markdown] # # This notebook plots figures that are used to analyse CASM dataset. # # Smaple data is provided if the size is < 25 mb. Otherwise, the relevant script used to create the necessary input data file on the cloud is referenced. # %% [markdown] # List of the small files available to run this notebook:...
289b693da62fab77e0422f6a639d065022d8411be33efdbdc4cd036bf4de0e21
Jupyter
32,123
825
# %% # If not already in your environment, install necessary packages. #!pip install pickle, scipy # %% from common_functions import * from plotting_functions import * # %% import math import numpy as np from scipy import stats import matplotlib.pyplot as plt import pickle from scipy.stats import zscore, pearsonr, m...
90ff046f0b5cc30e9b603f351d64ce8be5cb4b3c4b92502a1bb484ab457fa161
Jupyter
32,127
815
# %% [markdown] # ## 1: Import required packages & functions <a class="anchor" id="chapter1"></a> # %% print('Importing libraries') %reset -f import warnings warnings.filterwarnings("ignore", category=FutureWarning) # clear all variables for i in list(globals().keys()): if(i[0] != '_'): exec('del {}'.fo...
e5938cb3d4352d744eff4d03471ac37fa1ecbe05ad70e41732212877bb9947e8
Jupyter
32,693
823
# %% [markdown] # # Synthetic data test # This notebook was used to perform tests for the synthetic data generation. # **Note that there are a lot of hard coded numbers below. They are/have been empirically tuned by visual comparison to real data.** # Steps: # 1. Add neurons as gaussians (foreground) # 2. Defor...
100ae83a88366d258571efa15cb2c9b38086593faed7a75061ea79148da8f1a3
Jupyter
32,801
767
# %% import sys import os import glob import collections import shutil import subprocess import numpy as np import pandas as pd from openeye import oechem from scipy import stats from sklearn.metrics import roc_auc_score, roc_curve from sklearn.utils import resample from sklearn.linear_model import LinearRegression ...
35caed593bc5e76da741bd39b32ccf8b5a4bc61fe04263bd8e301ba98b497688
Jupyter
33,682
1,007
# %% 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.preprocessing import normalize as sklearn_normalize from sklearn.utils import shuffle from tensorflow import keras from tensorflow.keras i...
8bb2733c361e454b9c5882402c7dbd97bc1869b1078a555efd88612849ae1570
Jupyter
34,169
970
# %% import numpy as np import matplotlib.pyplot as plt from sklearn.decomposition import PCA import copy import torch import torch.nn.functional as F import sys sys.path.append('/content/drive/MyDrive/neuro_research/stp_networks/') import networks as nets import net_utils as net_utils import int_data as syn import...
0b40a0b7ef8c2bad1dbe185534c8f2758b10fbfe3dde665ccd71c112c7500b3d
Jupyter
34,785
1,073
# %% [markdown] # # Gain of DRN populations and networks # # Shown in figs. 5, 6, 5S3. # %% from common import colors, pvalue_thresholds, savefig from gain_util import ( infer_gaba_condition, get_step_amplitudes, GainSimulationVisualizer, PSTHToGainIllustration, ) # %% from __future__ import division...
e80872dc96c9f524d31506508adacf10450cf6b4cca3fbaadd20a7643985abd6
Jupyter
34,960
1,264
# %% %load_ext autoreload %autoreload 2 %matplotlib inline # %% from tqdm.auto import tqdm from rl_analysis.plotting import ( setup_plotting_env, syllable_aliases, clean_ticks, format_pval, savefig ) from rl_analysis.util import whiten from rl_analysis.photometry.encoding_average.util import run_in...
3d91cc9c08acca1be4e0a078b462314b0042a7af9ede00ba837d5ef11e57c75f
Jupyter
35,350
1,113
# %% [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...
f97675450340e9458741abf7275c1bfc302349b0dd49f0179d98fa6b561035d8
Jupyter
35,921
563
# %% [markdown] # # Recurrent Neural Network # # Historically, [there have been many attempts](https://doi.org/10.3390/ijms22041676) to develop an algorithm that can generate chemical entities with desirable properties. Many of the early methods relied on evolutionary aglorithms, but today deep neural networks have be...
743966b3b0bdad7d05041a918486d03c5f616d0616b829dd0a09d6bb9fad9bec
Jupyter
36,030
682
# %% [markdown] # # Deception Detection supported by Machine Learning # %% [markdown] # ## Literature Review - Mind maps # This notebook is devoted to show all the mind maps built as a summary of all the selected studies. # # Mind maps are ascendingly sorted by publishing year and title. Each section shows the articl...
a61fc014d2a68c6a280ed893b3028941837dd64ac770c3095d3cf40ec225af5c
Jupyter
36,059
854
# %% [markdown] # ## Script to parse behavioral data from pickle files # # The purpose of this notebook is to parse the behavioral data in the appropriate pickle files into a format that is easily usable for analysis and plotting. # # The pickle files for each animal contain dictionaries where the keys are session na...
c168eebf6b19cf130b3fe32a6eb5b01c5179c03fec7cc73c83c410c978084949
Jupyter
36,086
1,316
# %% import matplotlib.pyplot as plt import numpy as np import torch from cgtasknet.tasks.reduce import ( CtxDMTaskParameters, DMTaskParameters, DMTaskRandomModParameters, GoDlTaskParameters, GoDlTaskRandomModParameters, GoRtTaskParameters, GoRtTaskRandomModParameters, GoTaskParameters, ...
789b28808487d65a15e8480437ca10b18391987320ce0d2c08c7713f36e6352c
Jupyter
36,207
892
# %% [markdown] # ## Script to parse behavioral data from pickle files # # The purpose of this notebook is to parse the behavioral data in the appropriate pickle files into a format that is easily usable for analysis and plotting. # # The pickle files for each animal contain dictionaries where the keys are session na...
5356ca0fccecc8c2d518c234302e815c51f21cc1e2176396f5b5b38f0060c221
Jupyter
36,360
1,054
# %% [markdown] # # TQIP Data Preprocessing # %% [markdown] # This notebook illustrates how we preprocessed the data for the paper: "Assesing the Utility of Deep Neural Networks in Dynamic Risk Prediction After Trauma" # # The TQIP database can be requested through the American College of Surgeons website at # https...
c98aa05ddc6f32c975806e42cac534bcf3bd75cbdb7167e82b14a9c1e10c29b1
Jupyter
37,175
1,013
# %% [markdown] # # AxoID with Optic Flow Warping # Notebook used to test detection and tracking together to start the work for AxoID. # This is the second iteration with use of Optic Flow Warping to get automatically good annotations. # # Workflow: # 1. Detection: # 1. Make a binary segmentation out of t...
3ff2d591c351034fef70d58c8bc3be5ed32a088838f5383c7648961888b67c52
Jupyter
38,552
1,048
# %% [markdown] # # Whole-brain recordings of spontaneous activity of larval zebrafish # # Light-sheet fluorescence microscopy is a novel imaging method for simultaneously recording the activity of whole brains of small vertebrae (larval zebrafish) at neuron scale (~40K neurons). # The measured patterns of spontaneou...
e7c07bbbbd56e26b41d9e9aa171a77b2c648a63de686b3c984cdfce600581622
Jupyter
38,853
1,080
# %% [markdown] # This notebook is used to study model performance on the stability datasets from Rocklin et al. (2017) https://www.science.org/doi/10.1126/science.aan0693 # %% import Bio.PDB import numpy as np import pandas as pd import re from matplotlib import pyplot as plt from scipy.stats import ttest_rel # %%...
1f08aa4c2d058b579eb4749753af6355307a98fc46f27dc2af0f079748179aac
Jupyter
39,067
1,009
# %% [markdown] # ## 1: Import required packages & functions <a class="anchor" id="chapter1"></a> # %% print('Importing libraries') %reset -f import warnings warnings.filterwarnings("ignore", category=FutureWarning) # clear all variables for i in list(globals().keys()): if(i[0] != '_'): exec('del {}'.fo...
2cda874894c615e98cc87b999e6009112a88d8dd3f03b87f5da6ffa1690fb7a7
Jupyter
39,614
1,087
# %% [markdown] # This is a notebook which combines the code from notebooks 1_Concat_scoring_method to 4_analyse_benchmark into one notebook for faster analysis, but even more condensed than the pipeline notebook for faster analysis, only computing correlation coefficients between experimental and predicted energies. T...
5e8be01f130236976a6cc8e7912efb0caec7d1d1ed4fe1b6fe1abf1c166e5c14
Jupyter
39,919
1,012
# %% import torch import torch.nn.functional as F import numpy as np import pandas as pd from matplotlib import pyplot as plt # %% def sortcery_loss(etab, E_idx, data): ''' Compute the mean squared error between the etab's predicted energies for peptide-protein complexes and experimental energies derived from SORT...
8ba705441a1a574eb464cf2b65524f4452ef3db870b703febdd5e90a0df36928
Jupyter
40,065
732
# %% [markdown] # # Cerebellar volumetry analysis with GLM # ## Data: # - 1. Freesurfer results: ICV. Lh/Rh_cerebellum_gm/wm (generated by "collect_volumes.sh" script); # - Left/ Right cerebellum gray/white matter volumes # - 2. Cerebellar SUIT segmentation with SUIT and MAGeT (MDTB) atlas; # ...
fabe4d062ca34ea5469985b0eed864a4bc1a07ee6a4e3c5d6841b27b552e32e5
Jupyter
40,575
1,298
# %% [markdown] # This is a notebook which combines the code from notebooks 1_Concat_scoring_method to 4_analyse_benchmark into one notebook for faster analysis. These notebooks are taken from Frappier et al. (2019) https://www.sciencedirect.com/science/article/pii/S0969212619300085 # %% import glob import re import o...
13867e1c56320fe7b58ec589fff5e69dd5b7d50da464ee3ecfa9354bc052e95c
Jupyter
40,588
1,253
# %% [markdown] # ##### This notebook creates Transfer Learning (TL) experiment, with base model trained on RTECS, transferred to predict on ClinTox # # Using split data already saved. # # RTECS dataset has been commented out. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # To cre...
cba3dc5a866f7c12a0999c9e4c339902f2b91a1143f4a868d56c1fa672160ff4
Jupyter
40,621
1,252
# %% [markdown] # ##### This notebook creates Transfer Learning (TL) experiment, with base model trained on Tox21, transferred to predict on ClinTox # # Using split data already saved. # # Notebook shows results for seed = 124, but we also ran on seed 122, 123. # # To create TL model. Base model was trained with a ...
09b6e892bd62fd630b15fec84c69785065d00bc483e5f3e56a52102da11de8d5
Jupyter
41,085
329
# %% [markdown] # # Output neurons and learning # In this tutorial we add Mushroom Body Output Neurons (MBONS) to the model and train the weights connecting them to the Kenyon Cells using a simple event-driven STDP rule. # # ## Install PyGeNN wheel from Google Drive # Download wheel file # %% if "google.colab" in str...