sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
debea1f5cca875067c8b14e1af8c0294bd4202208b1f4585bbfc013c6ee4f750 | Jupyter | 6,814 | 164 | # %%
import numpy as np
import os
import pandas as pd
import matplotlib.pyplot as plt
# import plotly.express as px
import seaborn as sns
import pickle
from pathlib import Path
hfont = {'fontname':'Myriad Pro'}
import matplotlib.ticker as mtick
from matplotlib import gridspec
import matplotlib.colors as colors
import ... |
5875cf9eb825c4f3606f05962277257282a1e778a922c3d06e003dbd23120970 | Jupyter | 6,820 | 224 | # %%
#import tensorrt as trt
from tensorrt_util import TensorrtModel
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from pathlib import Path
import random
import cv2
import torch
import torch.nn as nn
import torchvision
from torchvision import transforms
from tqdm.auto import tqdm
from data... |
f8e7b53c8d05d060558cb1b6e22a00bbb0798312c3e3c371ed0f539091ebab94 | Jupyter | 6,825 | 190 | # %% [markdown]
# # 2-Cell and 3-Cell Motifs in PyC Subgraph (Th=0)
# %%
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.vis... |
c63ef5ef1cd9d88fe599817edb851e176ef05b5ed42a937e4f08d3237a24c73c | Jupyter | 6,830 | 192 | # %% [markdown]
# # 2-Cell and 3-Cell Motifs in PyC Subgraph (Th=300)
# %%
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... |
d6d3cf06958bea73bb93f218048d43fe1a7215b9cb871251b8af54f5eebae2b8 | Jupyter | 6,833 | 207 | # %%
import pandas as pd
import numpy as np
import os
np.random.seed(42)
# %% [markdown]
# ### A) Expected data format for SSAML code.
# Make sure you have a .csv file with the following columns and row formats. The format differs for non-survival-analysis and survival-analysis tasks. Within runner_power.sh you will... |
0d9a0066b9a8285286b19d304afd31b27c4e31b66725826ea526c23525439f77 | Jupyter | 6,835 | 203 | # %% [markdown]
#
# ## Initial setup (code/data download)
# %%
%tensorflow_version 1
!wget https://github.com/lmcinnes/umap/archive/master.zip
!unzip -q master.zip
!rm master.zip
!cd umap-master
# %%
%cd umap-master/
!ls
# %%
!pip3 install -r requirements.txt
# %%
import umap
# %%
!git clone https://github.com/g... |
f3ba7ab5b0f6b13ddd063db0155e118ab6378a956b3a8918206a2804bc506e69 | Jupyter | 6,855 | 330 | # %% [markdown]
# # Analyze Contributions of different methods to Annotation
#
# This notebook analyzes relative contributions of different IEA methods to annotation
# %%
from oaklib import get_adapter
from oaklib.datamodels.vocabulary import IS_A, PART_OF
from oaklib.datamodels.association import Association
from oa... |
36f0b9e090c1047df936a1b6d177a40ebf4c556f06b02e94c24f61ea9248f645 | Jupyter | 6,874 | 201 | # %% [markdown]
# # Linhagem 3T3
# %% [markdown]
# # Importações estruturação dos dados
# %%
#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 nump... |
ae3b8cd161a71b81ea389e2edf295deb14b616a7dc9d8a38f7c74b9dea2c167e | Jupyter | 6,877 | 228 | # %%
import sys
import os
import itertools
import numpy as np
import scipy.stats as stats
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from mpl_toolkits.axes_grid1 import make_axes_locatable
from mpl_toolkits.axes_grid1.inset_locator import inset_axes
sys.path.append("../... |
90afdbc0dd6182d31d7c28735cd25b2b9a1029d5a41a72858fae89d3f6f17141 | Jupyter | 6,894 | 177 | # %%
from analysis import load_data_and_stim, run_analysis
import numpy as np
import cortex
import matplotlib.pyplot as plt
%matplotlib inline
import nibabel
# %%
data_path = '../data/'
results_path = '../res/'
surfaces = dict(S1='food_S1',
S2='food_S2',
S3='food_S3',
S... |
c09eb6b3c3c224d982b4f0e560df1454a1a2884800eacd9fb2afb3bd7a45db42 | Jupyter | 6,904 | 226 | # %% [markdown]
# # Collinear features
# %%
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from sklearn.ensemble import RandomForestRegressor
from sklearn.metrics import mean_absolute_error, mean_squared_error, mean_absolute_error
from sklearn.model_selection import cross_... |
cced5195b1bbeffa6ac569ac24d1535391c1f64510f78aea3c6afb5ec3928fc6 | Jupyter | 6,934 | 226 | # %% [markdown]
# <a href="https://colab.research.google.com/github/vekteo/ASRT_rapid_consolidation/blob/main/PDP_analysis.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Process Dissociation Procedure (PDP) task analysis code
# ... |
3ce4b2f4b2252bde2f18104fa6bdb8dec41a7b39575ecb4b30fc22a2a9d28d56 | Jupyter | 6,938 | 174 | # %% [markdown]
# # Code for VBM analysis
# - For the pilot experiment: using GUI with scripts: ANCOVA + ESTIMATE ([https://www.fil.ion.ucl.ac.uk/~john/misc/VBMclass10.pdf])
# - Code reference from: [Grégory Operto](http://xgrg.github.io/VBM-voxelwise-multiple-regression-in-Python/) and niLearn example: [niLearn VBM ex... |
8cfca04ff4843f935f1ef37806208687ee54ac3453bf45effc21b3d70d633390 | Jupyter | 6,940 | 190 | # %% [markdown]
# # Training / testing of GNN models
# %%
# import necessary packages
import sys
import numpy as np
import datetime
# import util scripts
# add path
sys.path.append('../utils/')
sys.path.append('../pred_models/')
import pred_utils
import gnn_torch_utils
import gnn_torch_models
import importlib
imp... |
a1ed4fc44e273ca01da350d6db74483d43daf6b2f7ba74091abe4171a2671497 | Jupyter | 6,940 | 230 | # %% [markdown]
# # Effect of voltage history on spike timing in a toy model with $I_A$
#
# Shown in fig. 2.
# %%
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
from ezeph... |
a7952a251c2d99f153f74ffa52e8f3fbc82351523f4982e556684d353963d96f | Jupyter | 6,946 | 169 | # %%
%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... |
1ebc79d308eab50fbd68fcfb41b344668a1b03f0fcfd4ba87d4bce8f7f57e733 | Jupyter | 6,957 | 174 | # %% [markdown]
# # Adding synapses
# This tutorial explains how to add synapses to connect the neuron populations we talked about in the previous tutorial into a balanced random network model.
#
# ## Install PyGeNN wheel from Google Drive
# Download wheel file
# %%
if "google.colab" in str(get_ipython()):
!gdown... |
47b1dadbe36041d7e660201739570b2be0f4fd5a321f27784181a0867a55a3ef | Jupyter | 7,007 | 194 | # %%
import numpy as np
import numpy.matlib
import matplotlib
%matplotlib inline
import h5py
import matplotlib.pyplot as plt
import sys,os
import importlib
import sklearn
import sklearn.decomposition
import sklearn.preprocessing
import datetime
import seaborn as sns
import pandas as pd
import scipy
import scipy.spatial... |
ac23d42f71fb2b2ba1417c343486be0be6e1fbf709fb65d0e4258538c1116f2d | Jupyter | 7,007 | 196 | # %%
import nibabel as nib
import os
import albumentations as A
import numpy as np
import plotly
import plotly.graph_objects as go
# %%
def load_img(file_path):
img = nib.load(file_path)
data = img.get_fdata()
# data = np.asarray(img.dataobj)
return data
# %%
#https://www.kaggle.com/s... |
c5252ee27a9cba5fd63e92d91f82ab413769bc86aff1424436de45eb0f71f6c7 | Jupyter | 7,015 | 196 | # %%
import numpy as np
import numpy.matlib
import matplotlib
%matplotlib inline
import h5py
import matplotlib.pyplot as plt
import sys,os
import importlib
import sklearn
import sklearn.decomposition
import sklearn.preprocessing
import datetime
import seaborn as sns
import pandas as pd
import scipy
import scipy.spatial... |
8f7895839848a4337bd4aa377f4b90a2c4179da318f5288f2a11f1418badbac9 | Jupyter | 7,021 | 180 | # %%
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, NvidiaSpringTrainDataset, NvidiaTrainDataset, NvidiaValidationDataset
from network import ... |
008c7ec661f2454987f5b327f7281a8db613fd29b35e5b45aecdb46e20356e45 | Jupyter | 7,023 | 320 | # %% [markdown]
# # $f/I$ curve parameters extracted from slice recordings
#
# Shown in fig. 1.
# %%
from common import colors, pvalue_thresholds, fliersize, savefig
# %%
import os
os.chdir(os.path.join('..', '..'))
print(os.getcwd())
# %%
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
impor... |
704f70dceaf36467efc7df2155312ed1640b4eeb19d0765fe278dceac9228810 | Jupyter | 7,028 | 131 | # %% [markdown]
# # Deception Detection supported by Machine Learning
# ## Literature review
# ### Introduction
# This Jupyter Notebook is part of the Literature Review Project and aims to disclose the data collected along the process, and
# work as a memory of all the steps taken as well.
#
# Currently, the manuscrip... |
433b4647eb880541509bd2e06f4755393b5ba37be4d378df38307573d3c6bc5a | Jupyter | 7,029 | 231 | # %%
import sys
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
import scipy.stats as stats
from scipy.fft import fft, fftfreq
import scipy.signal as sig
from sklearn import linear_model
import statsmodels.api as sm
sys.path.append("../../ndsvae/")
impor... |
79c347111188c0e00f30dd13dfe32a5931e42cb87dd9ded53782ca7e361e0b66 | Jupyter | 7,034 | 275 | # %%
from rdkit import Chem
import pandas as pd
from chembl_structure_pipeline import standardize_mol, get_parent_mol
# %%
initial_smi = pd.read_excel(r'../prediction_and_selection/Prediction_initializers_ROR_activ.xlsx')
initial_smi = list(initial_smi['SMILES'])
initial_smi = pd.DataFrame(initial_smi, columns=['SMILE... |
1f4046714e8a1badf396914b3b8ca3002e3c7b490134591ce7c07eab0f6bd2e4 | Jupyter | 7,053 | 171 | # %% [markdown]
# <H1> Enhancement of a general topological signal by scPrisma</h1>
#
# In this tutorial, we will demonstrate how to enhance the variance which is explained by a covarainace matrix which is provided by the user.
#
# Few design principles for designing theoretical covariance matrix:
# 1. scPrisma was d... |
588a462e376c8fbe47a3947ff8afffebab14a5021cc9142e985bf90e694878d0 | Jupyter | 7,059 | 232 | # %% [markdown]
# # Run Patch Classifier
# %%
%load_ext autoreload
%autoreload 2
# %%
import json
from keplergl import KeplerGl
import matplotlib.pyplot as plt
import numpy as np
import os
import pandas as pd
from tensorflow import keras
from tqdm.notebook import tqdm
from scripts.viz_tools import normalize, plot_im... |
f04148477bce57dc71602b9a8a0dee887072b3c69180edcc3f921c6be80f6f60 | Jupyter | 7,064 | 247 | # %%
import toml
import joblib
import random
import warnings
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from scipy import signal
from os.path import join
from tqdm.auto import tqdm
from toolz import partial
from collections import defaultdict
from tqdm.contrib.concurre... |
e18957b97237a9dcd77f35e03b97a2be4d3571ccdc7fb067dcac7274267864f8 | Jupyter | 7,068 | 285 | # %%
%load_ext autoreload
%autoreload 2
%matplotlib inline
# %%
from rl_analysis.plotting import setup_plotting_env, savefig
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import os
import seaborn as sns
# %%
import toml
with open("../analysis_configuration.toml", "r") as f:
analysis_conf... |
575a07af1332b98b0fa34c0efba295945a1ee0b7ba9cb00e162533645031356f | Jupyter | 7,081 | 186 | # %%
%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, NvidiaValidationDataset, Normalize
from pilotnet import PilotnetControl, Pilo... |
d6bc2ee9ed5079770e5520dcf6555df3bbd532f9d66b049239cc2b807e28f607 | Jupyter | 7,091 | 264 | # %% [markdown]
# # Compute syllable counts and scalars in an expanding window after syllable onset (for displaying examples)
#
# 1. Note that you can use a dask scheduler by setting `dask_address` to the address of the scheduler (see `../analysis_configuration.toml`)
# %%
%load_ext autoreload
%autoreload 2
%matplotl... |
bf0afb19c0ace906d09de3c7728ffa98c3711c2c7150efc1f531d42a382741bc | Jupyter | 7,133 | 188 | # %% [markdown]
# # OAK apply command
#
# This notebook is intended as a supplement to the [main OAK CLI docs](https://incatools.github.io/ontology-access-kit/cli.html).
#
# This notebook provides examples for the `apply` command, which applies any *change* conforming to the [KGCL](https://w3id.org/kgcl) specificatio... |
cfb7d213ebb3460da6ce19a1ab21017a979ee773507fcd892ec555dfb4ffc8ba | Jupyter | 7,138 | 244 | # %%
import os
import csv
import pandas as pd
import numpy as np
import random
import scipy.stats as stats
import json
from glob import glob
import re
import skimage as io
import matplotlib.pyplot as plt
# %%
#Create a csv with the initial columnnames
import csv
with open('database/smFISH_database.csv', 'w', newline='... |
ed0576de735108aabcd5698832ce17251c3fb7f7efc9b05d132e261c655c119f | Jupyter | 7,146 | 250 | # %%
from typing import Iterable, List
import numpy as np
import torch
from cgtasknet.tasks.reduce import (
CtxDMTaskParameters,
DMTaskParameters,
DMTaskRandomModParameters,
GoDlTaskParameters,
GoDlTaskRandomModParameters,
GoRtTaskParameters,
GoRtTaskRandomModParameters,
GoTaskParameter... |
51fef9c8d9107d5cb8bebfa783752f675b8867491c9243d6f2dccb8e013bd3b8 | Jupyter | 7,162 | 230 | # %%
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)
# %%
from cycler import cycler
clist = ['#1f77b4', '#ff7f0e', '#2ca02c', '#8c564b', '#9467b... |
9d3e1bb42bb7c11641c244e2078083ef78ea6696326e5f00f31af34517574a57 | Jupyter | 7,163 | 223 | # %%
import os
import matplotlib.pyplot as plt
from matplotlib import animation
import numpy as np
from tensorflow import keras
from tensorflow.keras import layers
from tqdm import tqdm
import sys
sys.path.append('../')
from scripts.get_s2_data_ee import get_history, get_history_polygon, get_pixel_vectors
%load_ext... |
cc32feb44e9c8e4b41edd906dc8f6d3c17489d94f337fce7d05618eb1f515a00 | Jupyter | 7,178 | 228 | # %%
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed... |
1735e1024c23b32df644a8fcf51a136eae99dd387c6ceee8143b1c7164aa63fb | Jupyter | 7,186 | 262 | # %%
# %% [markdown]
# %% [markdown]
# ```
# from dPCA import dPCA
# По обученной сети создается тензор
# actR = размером(num_trial, hidden_size, S, T)
# num_trial - число испытаний для каждого значения стимула
# hidden_size - число нейронов сети
# S - число стимулов (берем 10)
# T - число временных отсчетов в одно... |
2e208f752725c0cc7f7ad4629cb4289ce98af31e8e167a57644e98be3e2a6189 | Jupyter | 7,190 | 294 | # %%
%load_ext autoreload
%autoreload 2
import palm_tools
from palm_tools import TrackSets
from palm_tools.analysis import MMDInterUnitAnalysis, MDSAnalysis, MMDInterGroupAnalysis
from palm_tools.post_processing.gratin import Gratin, GratinParameters, GratinAllLengths
from palm_tools.post_processing import StepsAndDiff... |
94201ad9ce9f1e5c9d1f3754e6e26c7e830e0642b7d0488e100bd36b1c999ef1 | Jupyter | 7,212 | 205 | # %% [markdown]
# # Faster classification of the whole test set
# The model we developed in the previous tutorial classified MNIST successfully but was rather slow. Like ANNs, to maximise performance when simulating small SNNs like this on a GPU, we need to simulate multiple copies of the model at once and run them on ... |
91ef257f837e2ee6150bd1f7b12b7bed2a7e2ff1536f8cd31a031f10171fd564 | Jupyter | 7,241 | 229 | # %% [markdown]
# # Cell line A549
# %% [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 ... |
d9154dcfec335cd8e7c7ab9353acc6061d8cdf17a03b298fef77ebe73462da1a | Jupyter | 7,250 | 223 | # %% [markdown]
# # Linhagem A549
# %% [markdown]
# # Importações estruturação dos dados
# %%
#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 num... |
aeeaf24a792de7070e0d5aa14e3b599b9f615cf654bb809b89201da70e6800de | Jupyter | 7,255 | 251 | # %%
pip install tensorflow==2.4
# %%
pip install tensorflow-gpu==2.4
# %%
import cv2
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import os
from tensorflow.python import keras
from tensorflow.python.keras import Sequential
import matplotlib.pyplot as plt
from tensorflow.python.keras.layers... |
b7d94105891d8cb4bef1bcf40bf11ba6a0e5327ea8643a9ce2f45628eb18eba7 | Jupyter | 7,257 | 240 | # %% [markdown]
# # How does FFI affect temporal derivative encoding by simulated 5-HT neuron populations?
#
# Shown in fig. 7.
# %%
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
imp... |
2022ff59330eb89f6645ba172224f7595ce6ff26abeee23fa35f0a4ce9cfb9a0 | Jupyter | 7,287 | 160 | # %% [markdown]
# # Because BraTS20_Training_270 may have doubtful ground truth label, conduct the analysis to verify if the study result will be different with the alternative label of BraTS20_Training_270 being GBM
#
#
# Report the main study result on physicians' task performance with and without the assistance of... |
52b5c63ae47982a74a9ec262f0a24a6a7c71745ff4bc4f6ce2af8304c9e7b07a | Jupyter | 7,292 | 337 | # %%
from common import colors, sbarlw, insetlw, savefig
from gating_util import save_gating_params, get_plot_coordinates_with_error
# %%
import os; os.chdir(os.path.join('..', '..'))
print os.getcwd()
# %%
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.gridspec as gs
from mpl_toolkits.axes_gri... |
8c8006b7d1854e57a47daa77781e35d6c111909ce77641a98a84a3e55ff4c3a6 | Jupyter | 7,303 | 296 | # %%
from common import colors, pvalue_thresholds, insetlw, savefig
# %%
import os
os.chdir(os.path.join('..', '..'))
print(os.getcwd())
# %%
import re
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.gridspec as gs
import seaborn as sns
from scipy import stats
from ezephys im... |
bfc8a2b8a38cca0feb553d00b6fb5b74dfa0121be6e52adfd1d7495e6761aeeb | Jupyter | 7,307 | 300 | # %%
%load_ext autoreload
%autoreload 2
%matplotlib inline
# %%
from tqdm.auto import tqdm
from rl_analysis.plotting import (
setup_plotting_env,
geno_palette,
syllable_aliases,
clean_ticks,
savefig
)
import pandas as pd
import os
import seaborn as sns
import matplotlib.pyplot as plt
# %% [markdo... |
52f68bfae8a6de9dcd3a122514f824302f0315c5b470a203aa2780bcd6912de1 | Jupyter | 7,313 | 267 | # %%
# %% [markdown]
# %% [markdown]
# ```
# from dPCA import dPCA
# По обученной сети создается тензор
# actR = размером(num_trial, hidden_size, S, T)
# num_trial - число испытаний для каждого значения стимула
# hidden_size - число нейронов сети
# S - число стимулов (берем 10)
# T - число временных отсчетов в одно... |
acfe16467c99714fa7427164d959c9715a56570bb4556de6c2ea26018c498813 | Jupyter | 7,313 | 267 | # %%
# %% [markdown]
# %% [markdown]
# ```
# from dPCA import dPCA
# По обученной сети создается тензор
# actR = размером(num_trial, hidden_size, S, T)
# num_trial - число испытаний для каждого значения стимула
# hidden_size - число нейронов сети
# S - число стимулов (берем 10)
# T - число временных отсчетов в одно... |
4161fbdd5a8af3fc8600f672cb29e834498304dccf79fb1a0b61440abf62d2b7 | Jupyter | 7,354 | 191 | # %% [markdown]
# This notebook is given by Alex Li to generate confusion matrices using the output energy tables from different models.
# %%
!pip install --user pillow
# %%
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import matplotlib as mpl
import pickle
from sklearn... |
b32ba3035b66bef714007fd6cd5a194ea77de0fecfbb629670ef4e034776055d | Jupyter | 7,401 | 201 | # %% [markdown]
# # Walkthrough : Computing FCs
# %%
#import necessary packages
import numpy as np
import sys
import elephant
import matplotlib.pyplot as plt
import seaborn as sns
sys.path.append('../FC_scripts/')
import assembly_util # class for handling spike sorted outputs
# %%
#read-in example spike train
da... |
f5f5831922314b13539aa95f5634f53bbe1e78e58d529991cf4f33a242a699a9 | Jupyter | 7,423 | 170 | # %% [markdown]
# # Result on decision agreement and decision change patterns
# %%
from base_code import *
from scipy.stats import friedmanchisquare, wilcoxon
from statannot import add_stat_annotation
valid_data = pd.read_csv('../neurosurgeon35_data/neurosurgeon35.csv', index_col='Respondent ID')
xai25 = pd.read_csv(... |
6b0e43ba0669395918319f94864cbb15da1e0c480fe98d814d9938ee85f4b520 | Jupyter | 7,464 | 237 | # %% [markdown]
# # Most synapses in and out
# This notebook demonstrates a few ways to work with the synapse tables we've generated. As a working example, it demonstrates how to find the neurons with the most input and output synapse predictions within a table. It also demonstrates how to view these cells and their ... |
c011626ce77ed3a88a98a2b62797bbea2afe82e92da70a31f3985e7fed6c63f3 | Jupyter | 7,491 | 324 | # %%
%load_ext autoreload
%autoreload 2
%matplotlib inline
# %%
from rl_analysis.plotting import (
setup_plotting_env,
clean_ticks,
savefig,
clean_plot_labels
)
from rl_analysis.io.df import dlight_exclude
from joblib import Parallel, delayed
import pandas as pd
import matplotlib.pyplot as plt
import ... |
ffd50444e18ab4793faff31149338478ad5869dcbe1b15faaea06855e61c0b10 | Jupyter | 7,503 | 235 | # %% [markdown]
# # Exploration of MAxO
#
# The Medical Action Ontology (MAxO) (https://obofoundry.org/ontology/maxo) is an ontology of medical procedures, interventions, therapies, and treatments for disease with an emphasis on rare disease (RD).
#
# This notebooks shows an exploration of the contents of MAxO. It fo... |
8e8a1d4ef87f4f548eb51edb338a8bc412662d682b7c73ecc69bd3b090292fa2 | Jupyter | 7,524 | 242 | # %%
import numpy as np
from scipy.stats import vonmises
import matplotlib.pyplot as plt
import matplotlib
from scipy.special import i0, i1
matplotlib.rcParams.update({'font.size': 14,
'pdf.fonttype': 42,
'ps.fonttype': 42})
from matplotlib import rc
rc('font',**{... |
5cb9d2895d4c73585d86348c27a498b815a24f64ba297739545dc180bfa88fd3 | Jupyter | 7,610 | 291 | # %%
# Change directory to VSCode workspace root
import os
try:
os.chdir(os.path.join(os.getcwd(), '../..'))
print(os.getcwd())
except:
pass
# %% [markdown]
# # Initialize functions and parameters
# %%
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn... |
e2a5ccacd8683e4d32ae748d70c210ce15b4673d7bf1c25a3b388b817a08d84b | Jupyter | 7,610 | 233 | # %% [markdown]
# # Feedback-inhibition based gain control
# Based on the highly variable levels of Kenyon Cell activity found in the last tutorial, here we add feedback inhibition inspired by the Giant GABAergic Neuron (GGN) found in Drosophila and, with this in place, visualize the spiking activity of Kenyon Cells in... |
f544fe9f78d60454f5688a70561978c71bad075c6b16d1464cb95f127b2139e1 | Jupyter | 7,647 | 318 | # %% [markdown]
# ## Single-task DNN keras model training on RTECS
# %% [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... |
63c8a1d88e536c20b52e242ae6b1d9d33c9b3533b9d87ae2078f0764bba401f2 | Jupyter | 7,649 | 282 | # %% [markdown]
# # Here we are taking dataframes with dLight "snippets" (waveforms aligned to onset of an event) and computing basic summary features
# %% [markdown]
# 1. Load in dLight and scalar snippets
# 1. Load in pre-snippet dLight data to collect stats for downstream processing (e.g. syllable ID and sequence)
... |
52ae85a564fbdadacd4a375a8501773103c1d21ce88b618fc8409c13992769f6 | Jupyter | 7,753 | 229 | # %%
import torch
import matplotlib.pyplot as plt
from graphxai.datasets import ShapeGGen
# %%
dataset = ShapeGGen(
model_layers = 3,
num_subgraphs = 100,
subgraph_size = 12,
prob_connection = 0.1,
add_sensitive_feature = False
)
# %%
from torch_geometric.nn import GINConv
class GNN(torch.nn.Modu... |
352577e2628f4e013a88c8740d0b75f77b76cc1c6d08426f1b4d14c0136ccdef | Jupyter | 7,800 | 251 | # %% [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... |
158a6f09ee47ec05659225b0a1d12557fd8016bc11e3fdf97085a6f23b919a92 | Jupyter | 7,829 | 216 | # %% [markdown]
# # 2-Cell and 3-Cell Motifs in PyC Subgraph (Full)
# %%
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.vis... |
aacf79b54bb13c8d37a587e78ffa98d33e76ca915dd924752f50d10573991c1b | Jupyter | 7,839 | 255 | # %%
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()
# %%
experiment = "drosophila-2-rdpg-sbm"
run = 3
exp_path = Path(f"../models/runs/{experiment}/{run}")
run_path = exp_path / "run.json"
config_path = ex... |
39167c92da57ea607367ad2dcac9a3783aaa8d6ca73b2e81e4401264968ef873 | Jupyter | 7,851 | 261 | # %% [markdown]
# # Tutorial QSAR models
# This script was used to create the QSPRpred QSAR models used in the other tutorials.
# Make sure you have downloaded the tutorial data, if you want to reproduce the QSAR models.
# %% [markdown]
# ### Classification model to predict A2AR receptor binding affinity
# %%
# Load... |
385272e79e8e5c3c8a7226f01e81b857ab64eab710272677793fbf656dde9000 | Jupyter | 7,907 | 270 | # %%
%load_ext autoreload
%autoreload 2
from gratin.models.main_net import MainNet
from gratin.data.datamodule import DataModule
import pytorch_lightning as pl
from gratin.models.utils import get_predictions_of_dl
from gratin.training.callbacks import Plotter
import matplotlib.pyplot as plt
from pytorch_lightning impor... |
56d67ec1133b4143e670fef90d961fa1c196f45a0991fdcd62c53a177bc44060 | Jupyter | 7,914 | 273 | # %%
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... |
ad63d592e4150e8202d05a76fccbc2e6d9d0b5909e8109a380137b70e592377c | Jupyter | 7,918 | 295 | # %% [markdown]
# # EDA on full brain Drosophila larva connectome
# %%
# 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(), '../..')... |
878121a7761b0a53ece5941a40b4ba0ed81cc8f5265e760be54afa13a68b20bb | Jupyter | 7,919 | 214 | # %%
%load_ext autoreload
%autoreload 2
# %%
import geopandas as gpd
import requests
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
# %%
endpoint = 'http://api.plastic.watch.earthrise.media/sites?limit=10000'
response = requests.get(endpoint, params={'apikey': 'jahsdbvjahsdvaulhsdvoauysdg829... |
7d0efdf4b43720f60d2ad922a2f40c5b9c037d4d59ac36d715dde4287d6d91ca | Jupyter | 7,924 | 120 | # %% [markdown]
# # Analysis of Ephys-AFM data
# %% [markdown]
# The following notebook presents an example of a typical analysis pipeline. The analysis is performed in bulk on all data files within a given folder. Versions of the functions for analyzing single files are also present in the relevant modules if needed.... |
3f4db7fdb6914e15f725cabdd891921667c31bd0035231fa0de9741c0890cdc2 | Jupyter | 7,932 | 236 | # %%
import pandas as pd
import numpy as np
import os
from pathlib import Path
import matplotlib.pyplot as plt
import matplotlib.ticker as mtick
import seaborn as sns
import sys
sys.path.append(os.path.join(Path(os.getcwd()).parents[0], "functions"))
import warnings
warnings.filterwarnings('ignore')
import helper_funct... |
45f8af629a342d9464532fe4bb34fed9d11d3d14fe620e92d4d012c54cac52ca | Jupyter | 7,933 | 311 | # %% [markdown]
# ## Single-task DNN keras model training on ClinTox
# %% [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 ClinTox
# -... |
3681023b1ef0b7ea1c54b21e1471493a6c59e1409b939186c4dd1e444f78d546 | Jupyter | 7,955 | 278 | # %%
import pandas as pd
import pickle
import numpy as np
from scipy.stats import rankdata
from sklearn import metrics
import seaborn as sns
%pylab inline
%matplotlib inline
# %%
PepBindEnerDF = pickle.load( open("../computed_data/PepBindEnerDF.pickle","rb"))
# %%
#New name
NameTest = ["B2CL1_SORTCERY","MCL1_SORTCERY... |
65a08284d11f283eb3767002b44cbef765de81e369c13d7eaedf2ac0183290da | Jupyter | 7,960 | 258 | # %%
import brian2 as b
from brian2.units import amp, cm, ms, mV, ohm, pA, uF, um, uS, nS, mvolt, Hz
from dendrify import Dendrite, NeuronModel, Soma
# Brian params
INTEGRATION_METHOD = 'euler'
b.prefs.codegen.target = 'numpy'
# Simulation params
G_AMPA_DIST = 1*nS
G_AMPA_PROX = 2*nS
TAU_AMPA = 5*ms
# %%
%%timeit -r... |
713e3b6c09f0f7aabf7b513ae604aace2d98af140f6280fe8621a3191b2ef2ed | Jupyter | 8,000 | 226 | # %%
# set up enviroment
import numpy as np
import pandas as pd
import scanpy as sc
%matplotlib inline
from matplotlib import pyplot as plt
import matplotlib as mpl
import seaborn as sns
from sklearn.manifold import TSNE
import sklearn
pd.options.mode.chained_assignment = None # default='warn'
# %%
def load_list(... |
97807ff30ea7d8e4b28f52b280c57006905fa2bc6a73a78162fb9a20c02dee7e | Jupyter | 8,034 | 234 | # %%
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import matplotlib as mpl
import pickle
from sklearn.metrics import confusion_matrix, ConfusionMatrixDisplay
mpl.rcParams.update(
{'font.size': 24,
'axes.labelsize': 'medium',
'axes.titlesize': 'medium',
... |
fddb8f897b04f88cf63d7f8970e9303688216c2bc20117ba1afa38eb086189e1 | Jupyter | 8,041 | 173 | # %% [markdown]
# **Identify the path lengths of experimentally tested multihop connections**
# <Br>
# These values will be used as a baseline when analyzing multihop cascades
# %%
from data_settings import data_date_A1_brain, pairs_path
from pymaid_creds import url, name, password, token
import pymaid
rm = pymaid.Cat... |
cb9c46cd0bce5e1b2100f5e5cee7dcaa34eabf491c8b6c3c537239c8d823f715 | Jupyter | 8,051 | 222 | # %% [markdown]
# ## Figures for The Paper
# %%
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
# %% [markdown]
# # Dorsal_DF
# %%
%store -r df_Dorsal
df_Dorsal
df_Dorsal.to_csv('DorsalTrain.csv', sep='\t')
# %%
%store -r df_Dorsal_v
df_Dorsal_v
df_Dorsal_v.to_csv('DorsalValid.csv', sep='\... |
24e3c357f08c0ea19d9808362da1a178d48cd532c66618519b997efd95247588 | Jupyter | 8,052 | 259 | # %% [markdown]
# # Generating Molecules
#
# Here we focus on the final steps of our deep learning efforts, which is the generation of molecules with the built models. We will show the interface to use with different models and explore the generated chemistry via visualizations. In the `utils` package, we have defined... |
5107e3aca388a3fef518682dc9f4d4ca3329c75b97ee672368669eb8de81946e | Jupyter | 8,054 | 294 | # %%
import os
import pickle
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.gridspec as gs
import seaborn as sns
from grr.pltools import hide_border
from grr.ThresholdModel import constructMedianModel
# %%
plt.style.use(os.path.join('..', '..', 'figs', 'scripts', 'writeup', ... |
00a6377d3c7861daa97fd2d0a3a691dcea34f09d15f444ac235e6faca5b12a96 | Jupyter | 8,067 | 199 | # %% [markdown]
# <h1>Analysis and manipulation of the circadian rhythm and zonation in single-cell data of mouse liver lobules
# </h1>
# <h2>Reconstruction based on prior knowledge over pseudotime, cyclic and linear analysis</h2>
# This tutorial aims to provide an overview of the scPrisma workflow, including the foll... |
258efbb7ca487ff5b03ad5a1300846247984ceafdaac90a7d070a905e45cd6bf | Jupyter | 8,076 | 200 | # %% [markdown]
# <h1>Analysis of the circadian rhythm and zonation in mouse liver lobules</h1>
# <h2>Reconstruction by prior knowledge (full prior knowledge), cyclic and linear analysis</h2>
# This tutorial aims to provide an overview of the scPrisma workflow, including the following steps:
# 1. Ordering the cells acc... |
d0007e20c4ea2e12799195fe7739689a7224aa09bb626b7eae98fced38701d40 | Jupyter | 8,142 | 193 | # %% [markdown]
# # Deception Detection supported by Machine Learning
# %% [markdown]
# ## Literature Review - Corpus analysis
# This notebook is devoted to performing some analysis on the document corpus rather their content, both before and after screening phases.
# The charts and tables found below render a bibliog... |
202a6a8cd26dd2655edd18087b4f05fa084f00339dcfdf87f2ec85e05f275c65 | Jupyter | 8,154 | 202 | # %% [markdown]
# <h1>Analysis and manipulation of the circadian rhythm and zonation in single-cell data of mouse liver lobules
# </h1>
# <h2>Reconstruction based on prior knowledge over pseudotime, cyclic and linear analysis</h2>
# This tutorial aims to provide an overview of the scPrisma workflow, including the foll... |
68359be87c2f1cb4cba12cef210b3de4bf0d0aa54c32ec818a29141d1caac18b | Jupyter | 8,157 | 259 | # %%
# set up enviroment
from __future__ import division
import sys
import numpy as np
import pandas as pd
import scipy
import importlib
import scanpy as sc
%matplotlib inline
from matplotlib import pyplot as plt
import matplotlib as mpl
import seaborn as sns
import hdbscan
import scanpy as sc
import sklearn
from har... |
3d70d60e5e2cae5d07f419c1a37b61204bd1b10f245cf941e13a094a1efcf003 | Jupyter | 8,196 | 242 | # %%
import numpy as np
import os
from pathlib import Path
import pandas as pd
import matplotlib.pyplot as plt
# import plotly.express as px
import seaborn as sns
import pickle
sns.set_style("ticks")
hfont = {'fontname':'Myriad Pro'}
import matplotlib.ticker as mtick
from matplotlib import gridspec
from matplotlib imp... |
3e5fa9aede663c9c93f66ca4d281ac5089e2c3027f2a0fd082a0f3471ca9ed01 | Jupyter | 8,225 | 286 | # %% [markdown]
# # Temperature-dependence of 5-HT neuron population gain
# %%
from common import colors, pvalue_thresholds, savefig
from gain_util import (
infer_gaba_condition,
get_step_amplitudes,
GainSimulationVisualizer,
PSTHToGainIllustration
)
# %%
from __future__ import division
import os; os... |
85c1ed7e3162e62f657a39148dd657ad85b329b980c0d4024fc3b30e157e50da | Jupyter | 8,228 | 286 | # %% [markdown]
# Import some libraries
# --
# %%
import numpy as np
import matplotlib.pyplot as plt
import sys
from helper import *
# %% [markdown]
# Load the relevant simulation result data
# --
# %%
label= "2021-07-22-runs/run"
gid= "0.0"
pop= "PNs"
N= 800
nglo= N//5
spike_t= np.load(label+"_hom_"+gid+"_"+pop+"_s... |
1476640cbb059edc71285365207056bd8eb923e201a0bfcc2dca6776c79cba86 | Jupyter | 8,239 | 206 | # %% [markdown]
# This notebook was used to generate figures for Mindren Lu's MEng thesis.
# %%
from matplotlib import pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
# %%
coeffs = [0, 0.25, 0.5, 1, 2, 4, 8, 16]
means = [42.60, 44.93, 45.61, 45.90, 46.02, 45.54, 44.45, 42.47]
medians = [43.... |
b0520e22f41db89fcaa71209bdc64542a31f6b7e7c474b2ac7efa9874f191a3a | Jupyter | 8,250 | 307 | # %% [markdown]
# # Reconstructed cell neurite lengths
# Plotting both (1) path length distances to the leaves of the skeletons and (2) the dendritic lengths reconstructed as a percentage of the expected value.
# %%
import numpy as np
import pandas as pd
import random
from scipy import stats
from matplotlib import rc... |
d5e36009187a783b414e45d1a6b663c8b172d191ee1c80226dca4b8cb1881190 | Jupyter | 8,268 | 239 | # %% [markdown]
# <a href="https://colab.research.google.com/github/vekteo/ASRT_ultra_fast_consolidation/blob/main/ASRT_analysis.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # **ASRT analysis script for the rapid consolidation o... |
358ebbc06e04028738b5b44ea98f8eb8c3b15b9535f069906dcce86093e7f837 | Jupyter | 8,269 | 390 | # %%
# General Imports
import os
import pandas as pd
import numpy as np
from rdkit import Chem
from rdkit.Chem import Draw
from tensorflow import keras
import sys
from pathlib import Path
SELFIES_coder_path = Path("../SELFIES_coder")
sys.path.append(SELFIES_coder_path.as_posix())
import SELFIES_coder as SELFIES_CODER
i... |
346e7d48a22bb7be6cd17b6b4d4852571989ae8bcf359abdfd3a766a6aadaf66 | Jupyter | 8,270 | 270 | # %% [markdown]
# # Download and process the data
#
# Download the files from the GitHub repo: https://github.com/jianfcpku/SARS-CoV-2-RBD-DMS-broad
# %%
import os
import requests
# from most recent tagged commit
files_to_download = [
"https://raw.githubusercontent.com/jianfcpku/SARS-CoV-2-RBD-DMS-broad/53eb95b0... |
34b5367f242b77a6677739d0f31a5347a0e49d8a66ae318ef236e54493f49676 | Jupyter | 8,274 | 239 | # %%
%pylab inline
import math
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import os
import numpy as np
from scipy.stats import fisher_exact, pearsonr
import scipy
# %%
data_path = "/storage/pandaman/project/Alzheimers_ResNet/storage/gnomAD/simplified_gnomad.txt"
TF_names = ["PU1", "LHX2", ... |
5ad0cba748eb68d7c714d4bbb0758f908593e148a9aac3f8350259c203ccd81a | Jupyter | 8,276 | 390 | # %%
# General Imports
import os
import pandas as pd
import numpy as np
from rdkit import Chem
from rdkit.Chem import Draw
from tensorflow import keras
import sys
from pathlib import Path
SELFIES_coder_path = Path("../SELFIES_coder")
sys.path.append(SELFIES_coder_path.as_posix())
import SELFIES_coder as SELFIES_CODER
i... |
1e3e72eb9076933eafc3150ad563165171757e92cb754055eacf65f9cd8fd92b | Jupyter | 8,324 | 168 | # %%
# set up enviroment
from __future__ import division
import sys
import numpy as np
import pandas as pd
import scipy
import importlib
import scanpy as sc
%matplotlib inline
from matplotlib import pyplot as plt
import matplotlib as mpl
import seaborn as sns
from sklearn.manifold import TSNE
import sklearn
pd.opti... |
8134f57a5cf035b3c49e8ed63adb16216b4d7bd8425a83b7c4492bd261e22c5d | Jupyter | 8,342 | 231 | # %%
import os
import copy
import numpy as np
import pandas as pd
# %%
try:
from pfabnet import utils
from pfabnet.base import ENTITY_KEY, VISCOSITY_KEY
except ModuleNotFoundError as e:
os.chdir(os.getcwd() + '/../')
from pfabnet import base
from pfabnet.base import ENTITY_KEY, VISCOSITY_KEY
# %%
... |
c5fbad99b69088b1c0f1eedadeee6b10cab184ac48dbe541d1f581c360ba2389 | Jupyter | 8,355 | 268 | # %%
import toml
import joblib
import random
import warnings
import numpy as np
import pandas as pd
import seaborn as sns
import colorcet as cc
import matplotlib.pyplot as plt
from scipy import signal
from os.path import join
from toolz import partial
from tqdm.auto import tqdm
from collections import defaultdict
from... |
b2226537a5ab7788b5db051243aabbaa2bc47c47c4773e61779db581d8661c39 | Jupyter | 8,377 | 325 | # %%
import navis
import matplotlib.pyplot as plt
nl = navis.example_neurons()
# %%
nl.cable_length
# %%
df = nl.summary()
df.head()
# %%
nl[0].soma
# %%
nl[0].reroot(nl[0].soma)
# %%
nl_soma = nl[nl.soma != None]
nl_soma.reroot(nl_soma.soma, inplace=False)
# %%
# Downsample by "skipping" N nodes (here: 10)
nl_d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.