sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
bb1b04afc372afef128511f81ff6356a39103d827f33493b198fb757bfc224d5 | Jupyter | 5,276 | 206 | # %%
import os
import pickle
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.utils import shuffle
from tensorflow import keras
from tensorflow.keras import layers
import sys
sys.path.append('../')
from scripts.get_s2_data_ee imp... |
77d9c8f7287b53b4f25c68084ffc78f53ea602792c7942b1884a2befbe1084ac | Jupyter | 5,277 | 204 | # %%
import numpy as np
# %%
#Extract all treat relationship- target relations
TR = {}
TR[24]='Merged:Treatment'
TRl=list(TR.keys())
# %%
with open('valid2id.txt','r') as flr:
flw=open('validlstm.txt','a')
head=flr.readline()
line=flr.readline()
while(len(line)>0):
(h,t,r)=line.strip... |
66695e229eaf31ddee058edfeefc101a0d9e65a3cd3d04c996b9d2bfbf1bb4c9 | Jupyter | 5,293 | 136 | # %%
from thingsmri.dataset import ThingsmriLoader
import matplotlib.pyplot as plt
import numpy as np
from nilearn.masking import unmask
# %% [markdown]
# # Working with ROIs
# %% [markdown]
# Often times, you might want to limit your analyses to specific regions of interest in the brain, either to study different an... |
65513dfb75169e4acab9f456b8a925542288eeaf8d368a00cd10df78c107725f | Jupyter | 5,301 | 182 | # %%
import numpy as np
import os
from pathlib import Path
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
hfont = {'fontname':'Myriad Pro'}
import matplotlib.ticker as mtick
from matplotlib import gridspec
import sys
sys.path.append(os.path.join(Path(os.getcwd()).parents[0], "functions"))
imp... |
f47b4d622d43a34e134c574b4c4b78edd70523a44240dadcb40387421d798708 | Jupyter | 5,322 | 149 | # %% [markdown]
# # Common Neighbor Rule 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.visualization import *
from utils.common... |
898d46a58033ac374343c90f93abb1f8ff15b77fdba1a3b9179d096ae6aab2f0 | Jupyter | 5,347 | 149 | # %% [markdown]
# # Common Neighbor Rule 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.visualization import *
from utils.comm... |
0b68d5daad58957c642d0e5fc3d4909cbde0f0e78f8efcf4ef649fed453ed745 | Jupyter | 5,368 | 182 | # %%
import pickle
%matplotlib inline
%pylab inline
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import pandas as pd
import re
from scipy import stats
# %%
AllName = ["x1","m1","f100"] #This is the dataset I want to use
figsize(20,5)
#DF for concat data merge on seqience
for name in AllNa... |
685cf0222572bf31e6b0a37c383bf257d8cd819727079c3e5c0bd25fb5e64734 | Jupyter | 5,377 | 136 | # %%
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Patch
import circularFiltering as flt
from scipy.stats import norm
import matplotlib
import glob
import os
import re
from matplotlib import rc
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
# %%
mu_perf = 0.5
sig_pe... |
f850a699ea81c4436a0e052e6062e49fe634cd40d8393c89ba7b9c805fbcab37 | Jupyter | 5,394 | 157 | # %% [markdown]
# # Visualize all candidate patches
# For a given list of coordinates, create a grid of images centered at each coordinate
# %%
import os
import ee
import pandas as pd
import matplotlib.pyplot as plt
import sys
sys.path.append('../')
from scripts.get_s2_data_ee import get_history, get_history_polygon... |
5d9d11b6064a723b88848d92daad87b8857f68acdcb467cc06e2595c3132972d | Jupyter | 5,405 | 181 | # %% [markdown]
# ##### This notebook generates train / valid / test (0.8 / 0.1 / 0.1) splits for Tox21, based on the random splitting method in MoleculeNet
#
# Splits were created for seeds of 122, 123, 124 (same seeds as MoleculeNet).
#
# All splits are saved in data/tox21/split_data folder
#
# Raw Tox21 data wa... |
92debf334c6c2afa9779df2aa5a24095261044e43e551e03d78af2166360a280 | Jupyter | 5,414 | 145 | # %% [markdown]
# <a href="https://colab.research.google.com/github/phbradley/alphafold_finetune/blob/main/alphafold_ft_colab_pipeline_v1.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # alphafold_finetune colab
#
# This draft co... |
7cb35ee27756dea6810de4eb41b9463b92a3a152850a2c39c02f576bb400ac97 | Jupyter | 5,418 | 204 | # %%
from common import colors, sbarlw, insetlw, savefig
# %%
import os
os.chdir(os.path.join('..', '..'))
print(os.getcwd())
# %%
from __future__ import division, print_function
import re
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from ezephys import pltools
from ezephys.rectools impor... |
b27d4f08164952e9aa1ec1e9f1b79f45e2a2f3f47b0475b428eeccff480ed8e7 | Jupyter | 5,437 | 210 | # %%
import numpy as np
import os
import pandas as pd
import pickle
import sys
sys.path.append(os.path.join(os.getcwd(), "functions"))
import helper_functions as hfn
# %% [markdown]
# # define paths
# %%
path = os.getcwd()
datapath = os.path.join(path,'data')
rawpath = os.path.join(datapath, 'raw')
savepath = os.p... |
f8279c71b8c62f37eeb45402cc2d8605f31f88bd7e1244360f32cb768ca078ac | Jupyter | 5,437 | 204 | # %%
import pandas as pd
import numpy as np
import statsmodels.api as sm
import matplotlib.pyplot as plt
import seaborn as sns
# %%
import warnings
warnings.filterwarnings('ignore')
# %%
# %%
plt.rcParams['figure.dpi'] = 80
plt.rcParams['font.family'] = 'Helvetica'
plt.rcParams['ytick.labelsize'] = 20
plt.rcParam... |
9257d18b314710f3ca95554fefd673d9cf0e76aabf517b59cc2c22c62c809950 | Jupyter | 5,448 | 195 | # %%
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
sys.path.append("../../ndsvae/")
import ndsvae as ndsv
sys.path.ap... |
ad227eb28e568b4e935f8bab1f9d7c6b8c906f18444813e77a2482c575d9fcee | Jupyter | 5,492 | 168 | # %% [markdown]
# # OAK statistics 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 `statistics` command, which can be used to calculate basic descriptive statistics
# for an ontology... |
247d32cfe1e12d0de56f01bc19d670c3c43c077d1561316347f0028630164e36 | Jupyter | 5,515 | 151 | # %% [markdown]
# # Mesh example
# This demonstrates basic 3D visualization of meshes and skeletons using vtk, as well as calculating shortest paths along a mesh.
# <span style="background-color: #aaaaaa">**NOTE:**</span> This example uses more memory than allocated to most binder instances, and may be killed during ... |
2cf388e61ecc2022a4cc9536847ed19727b214c6d7d8b7e4cf9682c31a6fb3c4 | Jupyter | 5,550 | 212 | # %% [markdown]
# # Compute syllable counts in bins across optoda sessions
# %%
%load_ext autoreload
%autoreload 2
%matplotlib inline
# %%
from functools import partial
from rl_analysis.behavior.util import normalize_df, filter_feedback_dataframe
from rl_analysis.batch import apply_parallel_joblib
from rl_analysis.io... |
bf5b79afe18e95e1604b0bb64e48b52026c66b410c94f06436fc6cb5a61ffbd0 | Jupyter | 5,550 | 193 | # %% [markdown]
# # Basic Ontology Interface Demo
#
# this demonstrates the use of the BasicOntologyInterface which provides simplified access to local or remote
# ontologies.
#
# We demonstrate the use of different backends, but in practice you will likely only use one depending on your use case.
#
# - pronto or sq... |
a4523998406e1aee3ddfdeeee90bf60bf7f9b5a4a1b83e1e0b27eb3a8c6a4e20 | Jupyter | 5,555 | 168 | # %% [markdown]
# # OAK validate-definitions 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 `validate-definitions` command.
# This forms part of a suite of *validate* commands.
# ... |
6f1c36cc63e7a46eee26ca3e5fb49549720479dd120e0452ca21127b5aa2f6aa | Jupyter | 5,556 | 126 | # %% [markdown]
# # Demo: Prepare training dataset for VCD-Net
# Generate patches to feed the VCD-Net model from provided 3D synthetic tubulin images.
#
# We implement a Matlab GUI for this task, which includes light field simulation and several other pre-processings. Check [this repo](https://github.com/feilab-hust/V... |
4389177231b9c404590d28bdfcb4b0d614cdd71604920e0c7a542544b7122fd3 | Jupyter | 5,580 | 147 | # %%
%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, sem, pearsonr
from sklearn import linear_model
import statsmodels.api as sm
# %%
def read_score_map(weight_file, position_file):
score_map = {}
... |
660cebe71691d045ef3b757d033fe886c10b3acc71a2035385a738f0fb510c7e | Jupyter | 5,586 | 170 | # %%
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 dataloading.nvidia import NvidiaResizeAndCrop, Normalize, NvidiaDatas... |
393af9c32319886140641f8649baab2c27a5f507b5d6e9e52458a340b769a695 | Jupyter | 5,602 | 239 | # %%
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... |
07cfb3a96bf049e6f95b199903a150c93103290bb2d3222d641c816ef03b3186 | Jupyter | 5,618 | 197 | # %% [markdown]
# # Visualize $f/I$ curves for DRN SOM cells
#
# Shown in fig. 1.
# %%
from __future__ import division
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 seaborn as sns
import pandas as pd
f... |
154960ebafb03a4c870a46e07e5655d276467385917dc0c0e7cc63ec7a46e0f9 | Jupyter | 5,630 | 155 | # %% [markdown]
# # OAK diff-via-mappings 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 `diff-via-mappings` command, which can be used to **find differences between two ontologies ... |
50c0bde181ae87c5f8a1dc49754cdc99c9ccb7ab64533f9c29138c64500f9cc0 | Jupyter | 5,645 | 174 | # %% [markdown]
# # Presenting latency-coded inputs
# In this first tutorial we build an input layer of spiking "projection neurons" for our mushroom body model which converts MNIST digits into latency-coded spikes.
#
# ## Install PyGeNN wheel from Google Drive
# Download wheel file
# %%
if "google.colab" in str(get_... |
5a585e139c63b3cd63bdb4be17574137072c4fd094edd2b82c0676e5d8a9d40e | Jupyter | 5,666 | 187 | # %%
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from sklearn.ensemble import RandomForestRegressor
from sklearn.base import clone
from rfpimp import *
import warnings
warnings.filterwarnings('ignore')
def mkdf(columns, importances):
I = pd.DataFrame(data={'Feature':columns, 'Importance... |
a8ec06af46959400c2a43d1c8f1d8b9aab68428b4cacc4f72b3d72407ba93c4f | Jupyter | 5,672 | 207 | # %%
import sys
import os
import itertools
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
import scipy.optimize as spopt
import scipy.integrate as spi
import scipy.stats as sps
import tensorflow as tf
import pandas as pd
sys.path.append("../../ndsvae/")
import ndsvae as ... |
1022bfa5c68ebc9f4aad6d3d41d4d47792f080d0d78b81fb1a2df29a47a9ef02 | Jupyter | 5,680 | 196 | # %%
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("../... |
2f86550ecbd73ab74b679345caf0928caa3e26d33f6652163803c96e79c96a19 | Jupyter | 5,684 | 182 | # %%
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import cross_val_score
from sklearn.base import clone
from rfpimp import *
import warnings
warnings.filterwarnings('ignore')
def mkdf(columns, importances):
... |
158703262bcc7757cefb795a1482ca0ac4d1892b1dfd7848cdee9d06114f5d47 | Jupyter | 5,692 | 146 | # %%
%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, sem, pearsonr
from sklearn import linear_model
import statsmodels.api as sm
# %%
def read_score_map(weight_file, position_file):
score_map = {}
... |
27d4c0219ecb622c0193466484d60c9685165d072cc080a3471bfbc987775843 | Jupyter | 5,701 | 212 | # %%
import sys
import os
import itertools
import random
from PIL import Image
#from libsvm import *
from libsvm.svmutil import *
# Image data constants
DIMENSION = 105
ROOT_DIR = "/content/SVM/training/"
FLAT = "FlatResized"
GABLE = "GableResized"
HIP = "HipResized"
CLASSES = [FLAT, GABLE, HIP]
TEST_ROOT_DIR = "/co... |
b8a9ab3c4460f89787767bd11c63b6ffebb8e3c87e265260f636939828673c7c | Jupyter | 5,734 | 224 | # %% [markdown]
# # Scratchpad for paper revisions
# %% [markdown]
# %%
%load_ext autoreload
%autoreload 2
import pickle
import os, sys
root_path = os.path.realpath('../')
sys.path.append(root_path)
import torch
from pathlib import Path
import numpy as np
import random
from utils.data import make_blobs_dataset, m... |
245c2058318996974549296a0d81c4b284da6d6747ff4212eaaae270de02a44c | Jupyter | 5,741 | 152 | # %%
import pickle
import numpy as np
import sys
import matplotlib.pyplot as plt
import pandas as pd
from sklearn import metrics
from sklearn.model_selection import cross_val_predict
from sklearn.tree import DecisionTreeClassifier
from sklearn import tree
from six import StringIO
import pydotplus
from IPython.displa... |
b63a88093d5ae217137c7cc85cc6249e845689dcf19d4170aefb2041ccc00ac1 | Jupyter | 5,782 | 193 | # %% [markdown]
# # Basic Ontology Interface Demo
#
# this demonstrates the use of the BasicOntologyInterface which provides simplified access to local or remote
# ontologies.
#
# We demonstrate the use of different backends, but in practice you will likely only use one depending on your use case.
#
# - pronto or sq... |
3017268def0e7d91994f58309907eeca3ed88e44065641ff33fffd31f201789e | Jupyter | 5,785 | 156 | # %%
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
sns.set_style("ticks")
hfont = {'fontname':'Myriad Pro'}
import matplotlib.ticker as mtick
from matplotlib import gridspec
from matplotlib import colors
import sys
sys.path.... |
3f83c7f1bb4b55e7414c0290a45538d43b1576c67d1a48a6dcf63a95c49074ce | Jupyter | 5,785 | 193 | # %%
import os
import pickle
import matplotlib.pyplot as plt
import numpy as np
from sklearn.decomposition import PCA
from sklearn.manifold import TSNE
from tensorflow import keras
np.random.seed(1)
# %%
# Sentinel 2 band descriptions
band_descriptions = {
'B1': 'Aerosols, 442nm',
'B2': 'Blue, 492nm',
'B... |
6373f46394e6a11954147f177b8844fe0daddf754bbb37c31f9a6c9e0b93d4e2 | Jupyter | 5,790 | 141 | # %%
import pandas as pd
import numpy as np
from pathlib import Path
import pingouin as pg
from scikit_posthocs import posthoc_nemenyi_friedman, posthoc_conover_friedman, sign_plot, sign_plot
import pickle
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from pathlib import P... |
de1a138921f45e136de6d05f58f1020404a1cdbf45688410fc5608724b50228e | Jupyter | 5,801 | 157 | # %% [markdown]
# # Scaffold-based reinforcement learning and molecule generation
#
# In some cases you might have idea of a scaffold or fragments that your new molecules should contain. In this case, it usefull to do the reinforcement learning and the molecule generation with preselected fragments (single fragment or... |
cd2b38866bb19f4d5ef7e2b87e93a465d8b7de5176e1b6d01ec38718e7c09d0c | Jupyter | 5,809 | 121 | # %%
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')
mri_wise = pd.read_csv('../computational_data/mri_wise_acc.csv')
dr_wise = pd.read_csv('../computational_data/dr_wise_acc.csv')
fold1 = pd... |
2c81a565ffb19e969914ca8141fa74ff9d75a5f4973bac9dbc71d0681350508d | Jupyter | 5,888 | 232 | # %%
import pickle
import pandas as pd
import seaborn as sns
import numpy as np
from matplotlib import pyplot as plt
import glob
import re
from mpl_toolkits import mplot3d
%pylab inline
%matplotlib inline
# %%
myAmino = ['A', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'V', 'W', 'Y... |
0ce1640b4292ee4f34099ebcadbcab1ff23b1c206eb6d1b6a6a0e38d93fc0e91 | Jupyter | 5,905 | 195 | # %%
from py2cytoscape.data.cyrest_client import CyRestClient
from IPython.display import Image
import networkx as nx
import pandas as pd
import navis
rm = navis.CatmaidInstance('url', 'http_user', 'http_pw', 'token')
print('navis version:', navis.__version__)
# %%
# Fire up the cytoscape interface - this will th... |
7396265f08261ecfc12265522f434dd5752a78c351b7a1325e7aaf14c4baf3e7 | Jupyter | 5,905 | 198 | # %% [markdown]
# # Train Patch Classifier
# This notebook loads inputs created in `create_patch_dataset` to train a spatial classifier
# %%
%load_ext autoreload
%autoreload 2
# %%
import json
import os
import pickle
import matplotlib.pyplot as plt
from matplotlib import animation
import numpy as np
from sklearn.mod... |
331945a81419721ed568b7363e239a0c6f2a6d09adf0cf8161bf37e1658f2c85 | Jupyter | 5,915 | 160 | # %%
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Patch
import circularFiltering as flt
from scipy.stats import vonmises
import matplotlib
import glob
import re
import os
matplotlib.rcParams.update({'font.size': 14,
'pdf.fonttype': 42,
... |
2f3ed9216f75b1e09112bb05e31291476a688430966ed348da34ecdd7d28fa79 | Jupyter | 5,916 | 168 | # %%
import matplotlib.pyplot as plt
%matplotlib inline
import sys
sys.path.append('../source/')
sys.path.append('../utilities/')
from common_imports import set_num_threads
set_num_threads(2) # Set the number of cores. Must be executed before importing numpy&numba.
import numpy as np
import pickle
import rbm,utilities
... |
faa2255569a889695b7263b8ec9497e0621bbea4885caa3deb6420aa2ad955ef | Jupyter | 5,924 | 206 | # %% [markdown]
# ## Import modules
# %%
from __future__ import division
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 seaborn as sns
import pandas as pd
from grr.cell_class import Cell
from grr.T... |
981a364e7243e4ed1cc1c089f74eba60629f2c29863ec412e453496f541b5722 | Jupyter | 5,945 | 188 | # %% [markdown]
# # Worked out example of using SSAML
# %% [markdown]
# Step 1. Build a fake file. Use the code below to do this. The file will be called
# sample_data_FAKE.csv
# %%
import pandas as pd
import numpy as np
import os
np.random.seed(42)
# fake datafile
fakefile = 'sample_data_FAKE.csv'
# First make fak... |
26b9faf6920e239880e34fc7457f8c2364a9e390e3cc42da48de3d18eed37129 | Jupyter | 5,991 | 247 | # %% [markdown]
# # TQIP Model Inference
# %% [markdown]
# This notebook illustrates how the TQIP AI models can be used for inference.
# Models are from the paper "Assesing the Utility of Deep Neural Networks in Dynamic Risk Prediction After Trauma"
#
# Notebooks illustrating data preprocessing as well as model trai... |
4aeae388beb071a5e026dc6bd3aeacb20f960b5d7f5760c00ae483558c828af7 | Jupyter | 5,991 | 146 | # %%
%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
from torchvision import transforms
from dataloading.nvidia import NvidiaDataset, NvidiaValidationDataset, Normalize
from pilotnet import Pilo... |
2e2b68ec0a548ff5660898487de82a8364f0e0dfc8d78f4f1f10f5881c44d382 | Jupyter | 5,995 | 171 | # %%
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... |
5a388ea49ba53427ee3f2b7ec87572d45ab93a04d4c298633fc781abd3c23af4 | Jupyter | 6,018 | 244 | # %%
%load_ext autoreload
%autoreload 2
%matplotlib inline
# %%
from rl_analysis.io.df import dlight_exclude_toml
from rl_analysis.plotting import setup_plotting_env, clean_ticks, savefig
from rl_analysis.util import pd_zscore
from tqdm.auto import tqdm
from copy import deepcopy
import matplotlib.pyplot as plt
import... |
fa37f42ceade2e37b649c1bf3091447a9c4df04a5658b5f1e22f2f66de86d64b | Jupyter | 6,056 | 198 | # %% [markdown]
# <a href="https://colab.research.google.com/github/ikmtd/Classification_Demonstration/blob/main/Classification_Demonstration_code.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %%
!git clone https://github.com/ikmtd/Classificatio... |
627dc020f59db37b5aa33341d5405f6ef746b875ceefaa9c30d1e3de607858cb | Jupyter | 6,066 | 226 | # %% [markdown]
# <a href="https://colab.research.google.com/github/vekteo/ASRT_PDP_jsPsych/blob/main/analysis_notebooks/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 analy... |
c8ec2b0ef1f9b34ea2d0e07cb62b985c6aea04dd96bfdb0d0b1091ab303ce89f | Jupyter | 6,069 | 205 | # %% [markdown]
# #### Imports
# %%
# Visualization
import matplotlib.pyplot as plt
# Builtin
from pathlib import Path
import sys
import os
import pdb
# Add repo path to system path for additional imports.
# Note the relative depth from this notebook to system repo
# in case you want to move this file
nb_path = st... |
3652093e75d7aff15c5d887c64c9b8e66c23f786f5892e2dbbaa403686ac6d95 | Jupyter | 6,075 | 215 | # %%
%load_ext autoreload
%autoreload 2
%matplotlib inline
# %%
from tqdm.auto import tqdm
from rl_analysis.plotting import setup_plotting_env, savefig, clean_ticks, plot_pval
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import os
import seaborn as sns
# %%
import toml
with open("../analys... |
4e6be957e5c263d7013725f15a30ee8f594c349a31de4f6e9e164dc105fd47a9 | Jupyter | 6,082 | 156 | # %%
import os, sys
import numpy as np
import pandas as pd
%run setup_notebook.ipynb
# %%
sys.path.append('/home/thijs/repos/zf-rbm/figure_notebooks/')
import plotting_functions as pf
import analysis_functions as af
import swap_sign_RBM as ssrbm
pf.set_fontsize(font_size=12)
%load_ext autoreload
%autoreload 2
# %%
##... |
2ef29d9ad60ee9054094ac8eb27e53b1a4de5309012eba30a6910cd2b82ce95f | Jupyter | 6,089 | 159 | # %%
import os, sys
import numpy as np
import pandas as pd
%run setup_notebook.ipynb
# %%
sys.path.append('/home/thijs/repos/zf-rbm/figure_notebooks/')
import plotting_functions as pf
import analysis_functions as af
import swap_sign_RBM as ssrbm
pf.set_fontsize(font_size=12)
%load_ext autoreload
%autoreload 2
# %%
##... |
e432b47e675a05a67882c90349f220dd83933d09c28c74efe456d484af3a5e39 | Jupyter | 6,094 | 203 | # %% [markdown]
# ## Comparación de modelos de Dectectron2
# ### Autor: José Miguel Ramírez Sanz
# #### Imports
# %%
import detectron2
from detectron2.utils.logger import setup_logger
setup_logger()
import timeit
import math
import os
import pandas as pd
import pickle as pk
import numpy as np
import cv2
from matplotl... |
93a3167b68a1c1c19c9fa4074a38bb80e12de4c7f05498cc46cca5f05bf0f598 | Jupyter | 6,102 | 176 | # %% [markdown]
# #### Imports
# %%
# Visualization
import matplotlib.pyplot as plt
# Builtin
from pathlib import Path
import sys
import os
import pdb
# Add repo path to system path for additional imports.
# Note the relative depth from this notebook to system repo
# in case you want to move this file
nb_path = st... |
de56599c19e9cc050f35eecbe15ad1811ba4956279018880ba77e69b463312d5 | Jupyter | 6,127 | 248 | # %% [markdown]
# # Example: Fast and accurate prediction of the regioselectivity of electrophilic aromatic substitution reactions
#
# RegioSQM method protonates all aromatic C–H carbon atoms and identifies those with the lowest free energies in **solvent** using the semiempirical quantum chemical **method** as the mo... |
68293cfa4683832fc69455462ff4e920d8cb421890e7e5576ad89ea4aceced8b | Jupyter | 6,179 | 177 | # %% [markdown]
# # Classification of the entire test set
# In this tutorial we're going to take the model we developed in the previous tutorial, run it on the entire MNIST testing set and calculate the overall classification accuracy.
#
# ## Install PyGeNN wheel from Google Drive
# Download wheel file
# %%
if "googl... |
8a121fea9e1913d846f71b8e8f4582a4a592f44508591812d33ffcca45d94652 | Jupyter | 6,243 | 171 | # %% [markdown]
# #### Imports
# %%
# Visualization
import matplotlib.pyplot as plt
# Builtin
from pathlib import Path
import sys
import os
import pdb
# Add repo path to system path for additional imports.
# Note the relative depth from this notebook to system repo
# in case you want to move this file
nb_path = st... |
f73ae723c0a3d342022d5e2ec047dc8a5b3d31e65664fa137d67ed82c367dc9e | Jupyter | 6,249 | 249 | # %% [markdown]
# Shown in fig. 1.
# %%
from common import colors, pvalue_thresholds, savefig
# %%
import os
os.chdir(os.path.join('..', '..'))
print(os.getcwd())
# %%
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from scipy import stats
from ezephys import pltools
from... |
0a2c917859b8bd57d0ca5f28a10a00c9098557b251a8df562a5726d9a61b4757 | Jupyter | 6,273 | 157 | # %% [markdown]
# This is an example of SimSwap on processing video with multiple faces with designated sources.
#
# Code path: https://github.com/neuralchen/SimSwap
# Paper path: https://arxiv.org/pdf/2106.06340v1.pdf.
# %%
## make sure you are using a runtime with GPU
## you can check at Runtime/Change runtime type... |
80589f0c0b328dd0dc802dee0cc01a96e73f736bde65f7572455c4712cd0a5ea | Jupyter | 6,288 | 219 | # %% [markdown]
# # Run Patch Classifier
# %%
import json
import os
import sys
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from tensorflow import keras
sys.path.append('../')
from scripts.get_s2_data_ee import get_history, band_descriptions
from scripts.viz_tools import *
%load_ext autor... |
494fc2c3685a3a704905269249bd881acb6e3346f16fc7c490d857bae62b7f52 | Jupyter | 6,291 | 160 | # %% [markdown]
# # Create Pixel Spectrogram Dataset
# This notebook downloads Sentinel data to produce inputs to a spectral-temporal pixelwise-classifier.
# Currently the notebook supports two time-steps, as defined by SPECTROGRAM_INTERVAL, below.
#
# ## Inputs
# The notebook operates by loading a set of sampling s... |
807d49ce4656a7e4251e07e4c3b683df57f6a4b2af65f3599290a5cfaa444b85 | Jupyter | 6,339 | 261 | # %% [markdown]
# # Example of setting up a optimization pipeline based on coordinates
#
# More explicit example for when you want to have fall-back calculations for failed geomeotry optimization
# %%
%load_ext autoreload
%autoreload 2
%matplotlib inline
# %%
import collections
import functools
import logging
impor... |
5c54b10dadfbb66f5616d978702e0f7fe30365c877f9d31044c65f9c46e11482 | Jupyter | 6,346 | 228 | # %%
import os
import sys
import itertools
import numpy as np
import pandas as pd
import scipy.stats as stats
import scipy.signal as sig
import scipy.io as spio
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
import seaborn as sns
from sklearn.decomposition import PCA
from... |
df482e5299cdd56edfb71e794e1aab1cc9080f8cff61c1c31d0d6ed7398291d6 | Jupyter | 6,367 | 265 | # %%
%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
from sklearn import model_selection
from sklearn import linear_model
import pandas as pd
imp... |
7a9b37b538099a8358648e8ad6fe6e4b70ad928e30079bb2d339abc7d558afaf | Jupyter | 6,381 | 192 | # %% [markdown]
# # Generate synapse EM image chunks and segmentation layers
#
# Extract synapse EM image chunks and segmentation layers from MICrONS public dataset.
#
# Integer encoding of mask as follows:
# - Background => 0
# - Presynaptic process => 1
# - Synaptic cleft => 2
# - Postsynaptic process => 3
# %%
im... |
bd3cb1fca677b27ad0a701598e2b9eb6169bf9bd6876b000e0ee949de2236f8e | Jupyter | 6,381 | 143 | # %%
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')
mri_wise = pd.read_csv('../computational_data/mri_wise_acc.csv')
dr_wise = pd.read_csv('../computational_data/dr_wise_acc.csv')
fold1 = pd... |
5411d38cf9dcbb24a12d4ab38f26e16a6a280c356f48e7a0a66018442799fd95 | Jupyter | 6,393 | 240 | # %% [markdown]
# # OMOP/N3C Examples
#
# See [https://github.com/jhu-bids/TermHub/issues/516](https://github.com/jhu-bids/TermHub/issues/516)
# %% [markdown]
# ## Basic term lookup
#
# First we will create an adapter object for a previously created sqlite database containing the N3C version of OMOP.
# %%
from oakl... |
4c76a34cab16404648ca413d83a6a6614e76a49159c3206bd4000bda26441a5c | Jupyter | 6,397 | 247 | # %%
%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 get_closed_loop_parquet_columns
import pandas as pd
import numpy as np
import os
import seaborn as sns
# ... |
eeb5ba4b87b1d6d032e6f0232ed54c8f6f8eb165647d69b3c03573ba5f6f4270 | Jupyter | 6,406 | 253 | # %%
# Load data
import pickle
pickle_in = open("optimality_parsed_results.pickle","rb")
results = pickle.load(pickle_in)
# %%
# Load pytorch
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
... |
596965d4efa5fb895d788f3005c0c5b48b80e751dfcd047dc7e61dffc39401ca | Jupyter | 6,410 | 194 | # %% [markdown]
# # Adding Kenyon Cells
# In this second tutorial we add a large population of Kenyon Cells to the mushroom body and visualize their spiking activity in response to latency coded MNIST digits.
#
# ## Install PyGeNN wheel from Google Drive
# Download wheel file
# %%
if "google.colab" in str(get_ipython... |
f904588eafc15b283d2efa1352f6de88884a9b330a4291e697ab6176a00e5b55 | Jupyter | 6,412 | 253 | # %%
# Load data
import pickle
pickle_in = open("_data/optimality_parsed_results.pickle","rb")
results = pickle.load(pickle_in)
# %%
# Load pytorch
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Vari... |
80293d8de2866158e12ef91a5c5f5bb7f9bb79473991b1a1d9faa51c637991e6 | Jupyter | 6,427 | 274 | # %%
import os
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from graspy.simulations import sbm
from src.io import savefig
from graspy.plot import heatmap
FNAME = os.path.basename(__file__)[:-3]
print(FNAME)
sns.set_context("talk")
def stashfig(name, **kws):
savefig(name, foldername... |
03e9f766fb3d67a0ab86073498f319c093307f7e59091cfe173306e57f4b0b94 | Jupyter | 6,446 | 242 | # %%
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... |
c273ddca041e17c7f14f00e32290fdb486a91276cc963ae2bf7cbb32593b4fb6 | Jupyter | 6,475 | 229 | # %%
import sys
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
import seaborn as sns
import scipy.stats as stats
from scipy.fft import fft, fftfreq
import scipy.signal as sig
from sklearn import linear_model
sys.path.append("../../ndsvae/")
import ndsva... |
c84ea9ec7e29a1d53f8e325eeb3cbda176edc0c4e21c7e489262682646daefad | Jupyter | 6,497 | 219 | # %% [markdown]
# #### Imports
# %%
# Visualization
import matplotlib.pyplot as plt
# Builtin
from pathlib import Path
import sys
import os
import pdb
# Add repo path to system path for additional imports.
# Note the relative depth from this notebook to system repo
# in case you want to move this file
nb_path = s... |
187ac71e8a116e65fa4a1dc7cb40cc9078d0b8871458b190278a925a2d1834fa | Jupyter | 6,505 | 159 | # %%
import numpy as np
import numpy.matlib
import matplotlib
%matplotlib inline
import h5py
import matplotlib.pyplot as plt
# import matplotlib.cm as cm
# from mpl_toolkits.axes_grid1 import make_axes_locatable
# from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_axes
# from mpl_toolkits.axes_grid.inset_lo... |
cc567196a620dc87faa85fe3e7263c203b9ce775cbdf1a17b716da95c672cd11 | Jupyter | 6,510 | 194 | # %%
import scipy.io as scio
import numpy as np
import os
from glob import *
import nibabel as nib
import pandas as pd
import random
from sklearn.feature_selection import SelectKBest, f_classif
from sklearn.pipeline import make_pipeline
from sklearn.svm import LinearSVC
from sklearn.svm import SVC
from sklearn.tree im... |
f63d428cd97fe1c7a372f979adefb76199b62ca4829db4d60463f1e990f90472 | Jupyter | 6,512 | 191 | # %% [markdown]
# # SMILES enumeration, vectorization and batch generation
#
# [](https://www.cheminformania.com/useful-information/smiles-enumeration-as-data-augmentation-for-molecular-neural-networks/)
# %% [markdown]
# SMILES en... |
8c176683a1c9d8e1cc332c8b541aea7334414ff08a45bf5e7295346f703cca2d | Jupyter | 6,536 | 184 | # %%
from os.path import join as pjoin
from nilearn.masking import unmask
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from sklearn.linear_model import LinearRegression
from nilearn.plotting import plot_stat_map
from thingsmri.dataset import load_animacy_size
# %% [markdown]
# # Predicting v... |
96a02cc1d65ecec53cb8c900fc6b4006e0d06b20ce03aff73d0ca9103396f31c | Jupyter | 6,536 | 222 | # %%
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 import Dense, Activation, Dropout, Flatten, Conv2D, MaxPooling2D,Averag... |
7708d7cf0cf5e1c9585a9ddf14529e450a0ac5e51c6931228df48d0af2f78dc8 | Jupyter | 6,552 | 218 | # %% [markdown]
# # Generating stability plots and frequency spectra heatmaps for the local model
# %% [markdown]
# ### Import modules with respective paths
# %%
# this path append is for binder only
import sys
sys.path.append("../../")
#spectrome modules
# from spectrome.stability import GetPoles_Laplace
from spect... |
f7f2d142c072404c32b2cd5db308015e6dcfd64f469b67f59ff8138a5ba970aa | Jupyter | 6,562 | 213 | # %% [markdown]
# # Example DRN network simulation with variable $dI/dt$ input
#
# Shown in fig. 7.
# %%
from common import colors, pvalue_thresholds, sbarlw, savefig
# %%
from __future__ import division
import os; os.chdir(os.path.join('..', '..'))
print os.getcwd()
# %%
import warnings
import re
import pickle
i... |
296fd8240370f57fd5290fe418801170f3371be480e2eab825ab70c2b7879b50 | Jupyter | 6,603 | 223 | # %%
#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... |
ffba8c4d699feda9cba9763d0e3cda5a0adfc49e1654dc3aebf2ee546acd7dd8 | Jupyter | 6,630 | 191 | # %%
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(font_scale=1.5, style='ticks')
import warnings
warnings.filterwarnings('ignore')
from spike2calcium_sigmoid_ALS import *
# %% [markdown]
# ## Figure A
# %%
nf = 'sensor_456_subject_478349_cell_9'
f_dff = f'GCaMP8_exported_ROIs_s2f_f... |
c9d585ec89f924724bfd6bd38b6e4a8f4dd6c51dcfbf39101965ca211b861c17 | Jupyter | 6,684 | 239 | # %% [markdown]
# ## Imports
# %%
import logging
logging.basicConfig()
#logging.getLogger().setLevel(logging.INFO)
logging.getLogger("tifffile").setLevel(logging.CRITICAL)
logging.getLogger("tifffile.tifffile").setLevel(logging.CRITICAL)
logging.getLogger("tifffile.TiffPage").setLevel(logging.CRITICAL)
logging.getLogg... |
6de4bd8ae94fdc0340ba5963321aad46d1d4e2490734a331154a347f712eda56 | Jupyter | 6,699 | 196 | # %% [markdown]
# # OAK enrichment 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 `enrichment` command which produces a summary of ontology classes that are enriched in the associat... |
cb75845a020ed82f576ad91b873e567eb1b215bd139febdbb46b91b7896881ec | Jupyter | 6,721 | 213 | # %% [markdown]
# ##### This notebook generates train / valid / test (0.8 / 0.1 / 0.1) splits for RTECS, based on the random splitting method in MoleculeNet
#
# Splits were created for seeds of 122, 123, 124 (same seeds as MoleculeNet), using:
#
# - MoleculeNet Splitting method: https://github.com/deepchem/deepchem/b... |
c3207f4dd37a13e03c00d46ce6330774a5444c715882c9bcf30dae405337f010 | Jupyter | 6,765 | 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... |
e2695cf4c9064e90680db55ff871c478e7171dcce670f7f3b1994f701544ea24 | Jupyter | 6,774 | 160 | # %%
%run ../setup_notebook.ipynb
# %%
import matplotlib.image as mpimg
from mpl_toolkits.axes_grid1 import make_axes_locatable
from mpl_toolkits.axes_grid1.colorbar import colorbar as mpl_colorbar
import plotting_functions as pf
import analysis_functions as af
import swap_sign_RBM as ssrbm
pf.set_fontsize(font_size=1... |
7b9761b60704899101782f18fff36601e0728bb659215be2397be68de5348819 | Jupyter | 6,791 | 260 | # %%
%load_ext autoreload
%autoreload 2
%matplotlib inline
# %%
from rl_analysis.plotting import setup_plotting_env, savefig, clean_ticks
from rl_analysis.info.util import dm_entropy
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import os
import seaborn as sns
# %%
import toml
with open("../... |
654b14b3f812c6919703873271cbbecfb5639e4dc328a1bd10de5ac8dab488d5 | Jupyter | 6,799 | 170 | # %%
import numpy as np
import math
import matplotlib.pyplot as plt
import seaborn as sns
plt.style.use('seaborn-darkgrid')
# %%
## Gamma analysis
gamma = np.load('gamma_analysis.npz')
gamma_pba = np.load('gamma_analysis_pba.npz')
pr = gamma["arr_1"]
pr_pba = gamma_pba["arr_1"]
print(pr.shape, pr_pba.shape)
# Print ... |
2cfbe50e42df0d8effea0b9c1bce14b354007885bd914418b19c89bc53ebc678 | Jupyter | 6,804 | 205 | # %% [markdown]
# # Linhagem Huh7
# %% [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... |
3ae361ecb2c8ae5456f145600e41c5d76786a64c162b711501adcd75d8b8b789 | Jupyter | 6,806 | 240 | # %% [markdown]
# # Cell line Huh7
# %% [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
... |
080fc17cd169bded94a8fca19713252455ef02bb7fcba39cff3ea2d1304c7bbb | Jupyter | 6,807 | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.