sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
b1f8e3ab3bcb9bc0edba76d2f0cff83a69bb49d1c42c341a0d3bf27de57cf1f5 | Jupyter | 706 | 34 | # %% [markdown]
# Make sure that we have the latest version of pandas-profiling.
# %%
!pip install -U data-profiling
# %%
# Standard Library Imports
from pathlib import Path
# Installed packages
import pandas as pd
# Our package
from data_profiling import ProfileReport
from data_profiling.utils.cache import cache_f... |
d0e84a78149ec17003f773dbcff237557cf5839644c21081dbd44f6aadb0e5c9 | Jupyter | 714 | 25 | # %%
import numpy as np
from matplotlib.image import imread
from skimage.measure import label, regionprops
from skimage.color import rgb2gray, rgba2rgb
points_path = 'Sample/Clandmarks.png'
image_path = 'Sample/Cim.png'
points_im = imread(points_path)
rgb_im = rgba2rgb(points_im)
im = rgb2gray(rgb_im)
rgb_points = rgb... |
e3ded2c30e862ebcfe3db1d8a8c4db4ebe0e2cd6c1d317f23c6f64b4217f89f7 | Jupyter | 739 | 36 | # %%
from tqdm import tqdm
# %%
%load_ext autoreload
%autoreload 2
# %%
import logging
import sys
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
# %%
from multicamera_acquisition.paths import DATA_DIR
from multicamera_acquisition.acquisition import acquire_video
# %%
save_location = DATA_DIR / 'tests'
... |
1e58d56b91dd39b1f06428d305a041b83d4ea9042102bef19c2fc2cb0c806d18 | Jupyter | 795 | 42 | # %% [markdown]
# # New training set for the model. <br> The T-SNE results advocate for at least 3 Dpo labels <br>
# > 1: Beta helix<br>
# > 2: Beta propeller<br>
# > 3: triple helix<br>
# ***
# ## Preparing the dataset
# ### I. Old dataset
# ### II.
#
# ***
# %%
import nglview as nv
import os
def view_pdb(file) :... |
338f70057eb88fe5e8e70bd2c7f732c055118a6c1b4baa21a60223d43c096f6c | Jupyter | 807 | 33 | # %%
%load_ext autoreload
%autoreload 2
# %%
from multicamera_acquisition.paths import DATA_DIR
from multicamera_acquisition.acquisition import acquire_video
# %%
save_location = DATA_DIR / 'tests'
# %%
camera_list = [
{'name': 'top', 'serial': 24535665, 'brand':'basler', 'gain': 12, 'display': False},
{'nam... |
f0fab5c423b6c121129e52247707270434460b24af53285a781c9725863dff0d | Jupyter | 810 | 29 | # %% [markdown]
# ## Training protocol
# Iterates through synaptic network initialization parameters and executes training for each
#
# See 'fit_script_stage123.py' for details of training
# %%
import numpy as np
from fit_script_stage123 import fit_script_stage123
from tools.lattices import WS_network
import os
nois... |
0dba75e2df46126650082b797ec339040c091241f19938a9cb2f9c8cc06b4799 | Jupyter | 819 | 18 | # %% [markdown]
# Main notebook containing relevant analysis steps, run for each model.
#
# The script `notebook_per_model.py' automatically copies this notebook to an ensemble directory and executes it for newly trained ensembles using papermill.
#
# **Warning:** You can loose your work! Don't edit automatically cr... |
5e116eb3327d7c21720a1cdc75bb511bee3ae16ef1888bc84bcdd1a8fcab3bd7 | Jupyter | 819 | 38 | # %% [markdown]
# # Detection Family Figure
# %%
# Imports
import numpy as np
import matplotlib.pyplot as plt
import json
plt.style.use("./style_sheet.mplstyle")
col = ["xkcd:muted blue", "xkcd:coral pink"]
# %%
# Load data
fname = "figdata/ideal_data_detection_task_family.json"
data = json.load(open(fname, "r"))
s... |
31c9291b7995f6c253efe6537ab5683ce93c5fa9410a6394e439fc6df7d8c455 | Jupyter | 824 | 39 | # %% [markdown]
# # Main
# %% [markdown]
# ## Initialization of packages
# %%
import numpy as np
import pandas as pd
import matplotlib
%matplotlib notebook
import matplotlib.pyplot as plt
import os
import sys
# %% [markdown]
# ## Paths
# for all Notebooks
# %%
paths = {'analysis': 'Analysis/',
'plot': 'Ana... |
b922304f998784ecb3c0344ae043b81d157072945be71b4f652a10a7128e6858 | Jupyter | 841 | 40 | # %%
# This code should enable you to get started with using the stimuli and neural responses from the data set.
# If you want more, please contact:
# Ben Willmore (benjamin.willmore@dpag.ox.ac.uk), or
# Michael Lohse (m.lohse@ucl.ac.uk)
# %%
from pcmdata import Clusters
# %%
# load data (dataset H) without spike ... |
f25893adf4aa8c44a8af0c5174c87a8b67c90b78d314cf4049075fa32667d6ae | Jupyter | 887 | 37 | # %% [markdown]
# # UniFMIR: Pre-training a Foundation Model for Universal Fluorescence Microscopy Image Restoration
# This demo allows you to run the models on your own images or the examples from the paper. Please refer to the paper for more details.
# %% [markdown]
# ## 1. Clone the repository and prepare environm... |
f54dffe30abd54e5d9adf1bf2a5b91381cdb6ccfa09b48e5446642687fde1d16 | Jupyter | 931 | 66 | # %%
# Core scverse libraries
import scanpy as sc
import anndata as ad
# Data retrieval
import pooch
# %%
adata = sc.read_h5ad("SEA-AD.h5ad")
# %%
sub=adata.obs[['donor_id', 'ADNC']]
sub_adata=adata[adata.obs['ADNC'].isin(['Intermediate', 'Low','High','Not AD'])]
print(sub_adata.obs)
#from collections import C... |
c50e74f2a93745360bd5dee7f5a13ca2e9970cc6daeae00f7c89e88718919cb6 | Jupyter | 946 | 42 | # %%
from pypylon import pylon
# %%
camera = pylon.InstantCamera(pylon.TlFactory.GetInstance().CreateFirstDevice())
camera.Open()
# %%
# demonstrate some feature accessdi.SetSerialNumber("2134234")
new_width = camera.Width.GetValue() - camera.Width.GetInc()
if new_width >= camera.Width.GetMin():
camera.Width.SetV... |
ed75f1c967ddddbd030e2965e163983b2180d86711f348414d1cfd9e4720ab17 | Jupyter | 954 | 20 | # %%
from pybioportal import copy_number_segment as cns
# %%
df1a = cns.fetch_copy_number_segments(sample_study_ids=[
{"sample_ids": ["P-0000004-T01-IM3", "P-0000950-T01-IM3"], "study_id": "msk_met_2021"},
{"sample_ids": ["TCG... |
300970992daff952ee454e7b1cddf51247428bdea00c6dd835644aa56b4abd2c | Jupyter | 963 | 44 | # %% [markdown]
# # Norse
#
# Norse is a deep learning simulator for spiking neural networks, built on PyTorch.
#
# ## Import a NIR graph to Norse
# %%
import norse.torch as norse
import torch
import nir
# Create a NIR Network
affine_weights = torch.tensor([[1.0, 2.0], [3.0, 4.0]])
affine_bias = torch.tensor([1.0,... |
e50c950318ead91ed5675420c33428a8fb7ccc3e893c50482fa3708816553b2e | Jupyter | 969 | 52 | # %% [markdown]
# # Yellow Taxy NYC
#
# ### Data Profiling in Databricks with data-profiling
# %% [markdown]
# Read a Delta table
# %%
input_table_name = "default.yellowtaxi_trips"
df = spark.table(input_table_name)
# %%
display(df)
# %% [markdown]
# ## Data profiling with data-profiling
#
# pandas-profiling is n... |
27f48fd5a93c5ab972df36aa958fe7308679bcab709116fd7578b4d831a22495 | Jupyter | 996 | 29 | # %%
from pybioportal import patients as pts
# %%
df1 = pts.get_all_patients(keyword="TCGA")
df1
# %%
df2a = pts.fetch_patients(patient_identifiers=[
{"patient_ids": ["TCGA-3C-AAAU","TCGA-3C-AALI"],
"study_id": "brca_tcga"... |
843d3b7a563f006e6dc6d5165cc7e2b06f5c8b289dd720e696cc43747c59761e | Jupyter | 1,003 | 24 | # %%
import numpy as np
from tensorflow.keras.models import load_model
from ml4h.models.model_factory import get_custom_objects
from ml4h.tensormap.ukb.demographics import age_in_days, af_dummy2, sex_dummy1
from ml4h.tensormap.ukb.survival import mgb_afib_wrt_instance2, mgb_death_wrt_instance2
# %%
output_tensormaps =... |
ba854e43ac3813c4e9b49c6c5e2f5e15791e1f90e512bdc9cd8a5a451d07bea5 | Jupyter | 1,028 | 95 | # %%
import torch
import matplotlib.pyplot as plt
# %%
entrada = torch.rand(4,1,64,64)
# %%
plt.imshow(entrada[0,0])
# %%
entrada.shape
# %%
modelo = torch.nn.Sequential(
torch.nn.Conv2d(1, 64, 3, padding=1),
torch.nn.Conv2d(64, 128, 3, padding=1),
torch.nn.Conv2d(128, 3, 3, padding=1),
)
# %%
... |
bf8696972d7fc937e9a8f60f111b65eecdf2bf5764bae65182a6ebb95e3229b0 | Jupyter | 1,035 | 44 | # %%
import numpy as np
import os
import zipfile
import pandas as pd
import shutil
# %%
image_path = './Data/Images/'
images = os.listdir(image_path)
# %%
# sav 파일 경로 지정
#file_path = './Data/231107_PSG.xlsx'
file_path = './Data/231203_PSG.xlsx'
# sav 파일 읽기
df = pd.read_excel(file_path)
df['sex'] = df['sex'].map({'F... |
e65d7c11f5dfdbcde91dc707259feab8a5d2654a298747673ad313cef3266ef1 | Jupyter | 1,049 | 55 | # %%
import torch
import norse
import snntorch
import snntorch.import_nirtorch
import nir
import importlib
importlib.reload(norse)
# %%
nir_graph = nir.read("braille_noDelay_bias_zero.nir")
net = snntorch.import_nirtorch.from_nir(nir_graph)
# %%
test_data_path = "data/ds_test.pt"
ds_test = torch.load(test_data_path)
... |
363e0ed12062a6b9eb111d143200a63f9a39d373a662a732815466653d0dc769 | Jupyter | 1,074 | 44 | # %%
from os.path import join
import xgboost as xgb
import numpy as np
import dask.dataframe as dd
# %%
DATA_PATH = '/mnt/dssmcmlfs01/merlin_cxg_2023_05_15_sf-log1p'
# %%
x_train = np.load(join(DATA_PATH, 'pca/x_pca_training_train_split_256.npy'))
y_train = dd.read_parquet(join(DATA_PATH, 'train'), columns='cell_typ... |
d8686b16751ce58d4cefec4aae53af808bb5e233a3d5a2761f1d7d904dd4944c | Jupyter | 1,078 | 40 | # %%
%load_ext autoreload
%autoreload 2
# %%
from multicamera_acquisition.paths import DATA_DIR
from multicamera_acquisition.acquisition import acquire_video
# %%
import logging
import sys
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
# %%
save_location = DATA_DIR / 'tests'
# %%
camera_list = [
{'... |
646c83e0643d7801b4c88d7b3ad742dab9fbc3770947cd407ffef82f71e00b68 | Jupyter | 1,095 | 56 | # %%
import spyx
import spyx.nn as snn
import jax
import jax.numpy as jnp
import numpy as np
import nir
# %%
isis = [
6, 15, 4, 3, 0, 2, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 14
]
d1 = list(np.concatenate([isi*[0]+[1] for isi in isis]))[:100]
d = jnp.array([[e]... |
2ea965c55de5ba9311289ef9a95e8766cd0a22689e260a772bf4c9886cf0749d | Jupyter | 1,100 | 48 | # %% [markdown]
# # Norse
#
# Norse is a deep learning simulator for spiking neural networks, built on PyTorch.
#
# ```{include} ../../../tmp/examples/norse/supported_primitives.md
# %% [markdown]
# ## Import a NIR graph to Norse
# %%
import norse.torch as norse
import torch
import nir
# Create a NIR Network
affi... |
05c8af050085772813cf1caa3d1c6ba2c78054c6cb3a0cbad88585a66f691088 | Jupyter | 1,103 | 42 | # %% [markdown]
# # imports
# %%
%matplotlib inline
import eelbrain as eel
import numpy as np
import scipy, pathlib, importlib, mne, time, os, sys
from tqdm import tqdm
import matplotlib.pyplot as plt
import clicks, utils
from pathnames import *
mne.set_log_level(verbose='error')
dBstrs=['66dB', '54dB', '42dB', '30dB'... |
7e94e733dc4a54636ff261e699dc74ba4d1c31f81e375b51def12c18c08bfedb | Jupyter | 1,109 | 57 | # %%
from pypylon import pylon
# %%
camera = pylon.InstantCamera(pylon.TlFactory.GetInstance().CreateFirstDevice())
camera.Open()
# %%
# set gain
camera.GainAuto.SetValue("Off")
# %%
camera.Gain.SetValue(12)
# %%
# Test exposure time
camera.ExposureAuto.SetValue("Off")
# %%
camera.ExposureTime.SetValue(2000)
# %%... |
2bd15b613a9e7cb60751f883162f0efb3c1fdcd65df5a55b022fa844361145d3 | Jupyter | 1,113 | 46 | # %%
# Python Script
# Using emilys.optics.aberration
#
# by J. Barthel / Forschungszentrum Jülich GmbH, Jülich, Germany
# email: ju.barthel@fz-juelich.de
#
# 2019 July 3
#
# Part of the emilys project: https://github.com/ju-bar/emilys
# published under the GNU GPL 3.0 License
#
# %%
import numpy as np
import matplotl... |
0bcb7e651edf02d2a2e615565a7fed85ffa4a7276c6202503ee57df6d03064bc | Jupyter | 1,128 | 25 | # %%
from pybioportal import gene_panel_data as gpd
# %%
df1a = gpd.fetch_gene_panel_data(molecular_profile_ids=["brca_tcga_gistic", "acc_tcga_gistic", "brca_tcga_mutations"])
df1a
# %%
df1b = gpd.fetch_gene_panel_data(molecular_prof_sample_ids=[
{"molecular_profile_id": "b... |
e162ddd22cdb9a082b518a474e3d1da404e2640bb283597f8076d7a1ad222a06 | Jupyter | 1,152 | 43 | # %%
import pandas as pd
import numpy as np
# %%
#import
data = pd.read_csv('/Users/luopei/Documents/Research/Hypocretin/oxlight/SI oxlight/Zscore+F/7185_AS_VP.csv')
# %%
#Chop for +/-10 seconds around each new bout of NN Sniff
ts = data.loc[data['Upright'] == 1]['time'].tolist() #only rows where prox_new is 1
event... |
706e0706e9fc7446e5445d3d64ea9533b185187c78da14c7eb93b9c38928e16b | Jupyter | 1,162 | 42 | # %% [markdown]
# # Import the required packages
# %%
import os
import json
from aihwkit.experiments.runners import InferenceCloudRunner
from aihwkit.cloud.client.entities import CloudJobStatus
# %% [markdown]
# ## Create a local runner and check the job status of the experiment
#
# The code is checking for the en... |
7b0a4c844f389d946dfba578cc4373ce97d68a1bfc4a34c9054631d58e45d1e0 | Jupyter | 1,166 | 51 | # %% [markdown]
# # snnTorch
#
# snnTorch is a deep learning simulator for spiking neural networks, built on PyTorch.
# %% [markdown]
# ## Import a NIR graph to snnTorch
# %%
import snntorch as snn
import torch
import nir
# Create a NIR Network
affine_weights = torch.tensor([[1.0, 2.0], [3.0, 4.0]])
affine_bias = ... |
a0f8fc6e8987192b18dcb06a06b2a486eda5b68cd2df1f625d15aa43f5437d1a | Jupyter | 1,182 | 53 | # %% [markdown]
# The autoreload instruction reloads modules automatically before code execution, which is helpful for the update below.
# %%
%load_ext autoreload
%autoreload 2
# %% [markdown]
# Make sure that we have the latest version of pandas-profiling.
# %%
import sys
!"{sys.executable}" -m pip install -U data... |
91d73975b37bfec04595e79b1768fa1aa2240ca65b49a283b9ec6048e069945a | Jupyter | 1,185 | 25 | # %%
from pybioportal import discrete_copy_number_alterations as dcna
# %%
df1 = dcna.get_discrete_copy_numbers_in_molecular_profile(molecular_profile_id="brca_tcga_gistic",
sample_list_id="brca_tcga_all",
... |
5c94d7913d6e7f9cc7dbd014c0c90d0161a5e8b25bd39e029ede94ab589086ad | Jupyter | 1,196 | 37 | # %%
from pybioportal import samples as sp
# %%
df1 = sp.get_samples_by_keyword(keyword="TCGA")
df1
# %%
df2a = sp.fetch_samples(sample_identifiers=[
{"sample_ids": ["TCGA-AR-A1AR-01","TCGA-BH-A1EO-01","TCGA-BH-A1ES-01"],
"study... |
a4c1cf010c40b42535456031e0deef62e401b58b77632e424503f01adf08b9f6 | Jupyter | 1,196 | 24 | # %% [markdown]
# # Step 0: Data Download
# %% [markdown]
# We apply DeepDeWedge to a single tilt series collected from Chlamydomonas Reinhardtii. The tilt series is part of the Tomo110 dataset ([which can be downloaded here](https://download.fht.org/jug/cryoCARE/Tomo110.zip)), which was used in the tutorial for the [... |
a4286e3c8744b45939c3d1e8fcec3597d5b86e00786ed4a352195583256197c7 | Jupyter | 1,198 | 65 | # %%
%load_ext autoreload
%autoreload 2
# %%
import json
import os
import json
import wfdb
import pickle
import torch
import tqdm
import gzip
import networkx
import numpy as np
import sak
import sak.torch
import sak.torch.nn
import sak.torch.nn as nn
import sak.torch.nn
import sak.torch.train
import sak.torch.data
im... |
b320e5737e3d4e6b712db4835dc40318363a5cb3dba526d581eadc666fd94f6f | Jupyter | 1,210 | 46 | # %%
import pandas as pd
import matplotlib.pyplot as plt
import hddm
print hddm.__version__
import kabuki
print kabuki.__version__
# %%
data = hddm.load_csv('./hddm_input.csv')
data.head(10)
# %%
data = hddm.utils.flip_errors(data)
label_texts = ['','No stimulus','0 head / 80 tail','80 head 0 tail','80 head / 80 ta... |
3a8dd400a14246f94ec5dda87147160e18330502b04442951b9cfb782b82e860 | Jupyter | 1,238 | 61 | # %%
from pybioportal import treatments as trt
# %% [markdown]
# Get the Study IDs of all studies
# %%
from pybioportal import studies as std
studies = std.get_all_studies(projection="DETAILED")
std_ids = studies["studyId"].to_list()
print(f"First Study IDs of {len(std_ids)}: {std_ids[0:5]}")
# %%
trt.fetch_status_d... |
2d5a638ed44f12acc5d2ddacf87b3b63b250e7fc6502897d61072ca1b13c152a | Jupyter | 1,242 | 30 | # %%
import numpy as np
import pandas as pd
from sergio import sergio
# %% [markdown]
# # Simulate Clean Data _ Steady-State Simulation
# %%
sim = sergio(number_genes=100, number_bins = 9, number_sc = 300, noise_params = 1, decays=0.8, sampling_state=15, noise_type='dpd')
sim.build_graph(input_file_taregts ='steady-s... |
63f9df2c8bb154c4850e5a839cf06c0516f10467eca9b91fc5e2e4cfa8007b20 | Jupyter | 1,245 | 44 | # %% [markdown]
# ## This script subtracts the Buffer only noise from intersected beds
# %%
import os
cwd = os.getcwd()
main_dir = cwd
print(main_dir)
# %%
import pybedtools
from glob import glob
confident_peaks_dir = main_dir + '/confident_clusters/'
all_sample=sorted(glob(os.path.join(confident_peaks_dir, '*_co... |
ea131bb351ff3953a8efbdb1aec42f92b6f543598be9a128e8629fecf0064040 | Jupyter | 1,253 | 36 | # %%
import pandas as pd
# %%
combo_3d = pd.read_parquet("ccs-prediction/combined_metlin_ccsbase_train_test_split_3d.parquet")
# %%
combo_3d.source.value_counts()
# %%
combo_3d.split.value_counts()
# %%
# train metlin
combo_3d[(combo_3d.source == "metlin") & (combo_3d.split.str.contains("train"))].to_parquet("ccs-p... |
7d00d271016958715bdc629ec5df8c5e7bbed66773bc4ea5506a685a35e11b65 | Jupyter | 1,254 | 52 | # %%
import torch
import torch.nn as nn
import sinabs
from sinabs.nir import from_nir
import numpy as np
import nir
# %%
graph = nir.read('lif_norse.nir')
for nkey, node in graph.nodes.items():
print(f"{nkey:7} {node}")
# %%
isis = [
6, 15, 4, 3, 0, 2, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 13, 0, 0, ... |
17c711c6d728c830e0ccb16f2d3c7832939406a24c68e83a54f2283776f0350b | Jupyter | 1,265 | 58 | # %% [markdown]
# # Segmentation
# %% [markdown]
# ## Loading Models
# %%
from ultralytics import YOLO
model = YOLO("yolo12n-seg.pt")
# %% [markdown]
# ## Training
# %%
results = model.train(data = "data/yolo_cropped/data.yaml",
epochs = 100,
imgsz = 64... |
73151b41e575afa924ae892d5c5714131789fb657f171126ca8605d9dd0e2d07 | Jupyter | 1,290 | 58 | # %% [markdown]
# # Train cryo-CARE Network
#
# In this notebook we initialize a new model and train it.
# %%
from train_cryo_care import CryoCARE
from csbdeep.models import Config
from csbdeep.utils import plot_history
import numpy as np
# %% [markdown]
# ## Create Model
#
# We use the standard `CSBDeep` config.
... |
1737d42e4c6d8c9c48b674108b11c7362038d0b4483172be616ac32f6210d28b | Jupyter | 1,298 | 38 | # %% [markdown]
# <a href="https://colab.research.google.com/github/hzwer/arXiv2020-RIFE/blob/main/Colab_demo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %%
!git clone https://github.com/hzwer/arXiv2020-RIFE
# %%
!mkdir /content/arXiv2020-RIF... |
376403d38e1b881244c76a1a548a3784469779dec3a723e93a75a6797852d8f5 | Jupyter | 1,299 | 74 | # %%
%load_ext autoreload
%autoreload 2
# %%
import awswrangler as wr
import pandas as pd
# %% [markdown]
# ### Step 1:
# Download the METLINCCS dataset
#
# Link: https://metlin.scripps.edu/landing_page.php?pgcontent=mainPage
#
# Click on METLIN-CCS | METLIN CCS Lipids and download the excel, export it as csv and l... |
5adf05b79bfc498aab45d231252f5790fac0ab019482e2cc389ba094b7880b91 | Jupyter | 1,311 | 60 | # %% [markdown]
# # Imports
# %%
from multisensory import (
ClassicalTask,
BalancedComodulationTask,
DetectionTask,
MAPClassifier,
)
import pickle
from pathlib import Path
root = Path(".")
save_path = root / "ideal_data"
# %% [markdown]
# # Hyperparameters
# %%
# Tasks
tasks = [
ClassicalTask(s... |
ca72b49bb156fb5ca3ff8a52cb35f4300ae39dd80c5f352184af96655e7f9d7a | Jupyter | 1,324 | 49 | # %%
import loompy
import numpy as np
import pandas as pd
from anndata import AnnData
import scanpy as sc
# %%
lc = loompy.connect("./raw/zeisel_2018/l5_all.loom")
# %%
X = lc.layers[""].sparse().T.tocsr()
dict_obs = dict()
for k in lc.col_attrs.keys():
if k == "Comment":
continue
dict_obs[k] = lc.co... |
5e904a1c432e5a50ee66f296ce0451af6dc9b4f880d39a0abf290a2ddef018a3 | Jupyter | 1,325 | 64 | # %% [markdown]
# # Run power analysis
# Steps:
# 1. Define input data
# - Statistical parametric map array
# - Mask array
# - Data type (t- or z-values)
# - Analysis design (one- or two-sample)
# - Sample size
# - Cluster-defining threshold
# - Alpha (cluster-extent threshold)
# - FWHM
... |
bb80775874f10122f949a45622488ea6abe3ce59b57b8a9e7c97274a0cbfe543 | Jupyter | 1,337 | 29 | # %%
from pybioportal import molecular_data as md
# %%
df1a = md.fetch_molecular_data(entrez_gene_ids=["672","675"],
molecular_profile_ids=["brca_tcga_mrna", "acc_tcga_rna_seq_v2_mrna"])
df1a
# %%
df1b = md.fetch_molecular_data(entrez_gene_ids=["672","675"],
... |
e0c9ee1d8b71a6523915872c881d8842d498715f18534729708b7e6fd4e0b059 | Jupyter | 1,359 | 70 | # %%
# http://justinblaber.org/acquiring-stereo-images-with-spinnaker-api-hardware-trigger/
# %%
import matplotlib.pyplot as plt
import PySpin
# %%
# Set camera serial numbers
camera_serials = [22181547]
serial_1 = str(camera_serials[0])
# %%
# Get system
system = PySpin.System.GetInstance()
# %%
# Get camera list... |
7df6f4b45229ca49268a67807b682853913fa1ce25263a8483f4413e522e32da | Jupyter | 1,388 | 46 | # %%
from pmlb import fetch_data, nearest_datasets
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
%matplotlib inline
# %%
pmlb_stats= pd.read_csv('../pmlb/all_summary_stats.tsv', sep='\t')
print('potential dimensions:',[c for c in pmlb_stats.columns if c != 'dataset'])
pm... |
8f156af06d42356863d8895dbf7ad95fe0ffdeab7be70440216e01a7a21e8794 | Jupyter | 1,391 | 49 | # %%
import os
import json
from pprint import pprint
from PIL import Image
import glob as glob
import matplotlib.pyplot as plt
from IPython.display import Video
# %% [markdown]
# ### This notebook walks through how to load a video stimulus and its corresponding metadata.
# %%
dataset_root = "/your/path/to/BOLDMoments... |
827d873b8dbd4e197d540a9ac15bb62e41f429237fa49f7f6d23c70a89a07a5b | Jupyter | 1,404 | 91 | # %%
import pypylon.pylon as py
# %%
from pypylon import pylon
# %%
camera_serials = [24535665, 24548223]
# %%
NUM_CAMERAS = 2
# %%
tlf = py.TlFactory.GetInstance()
# %%
# create a device filter for Pylon CamEmu devices
di = py.DeviceInfo()
# %%
di
# %%
devs = tlf.EnumerateDevices([di,])
# %%
devs
# %%
devs[0]... |
4750ca4f3cc29e60467fe6a0e7830cf3fe075e98df32db3c7def9ae71a58a4db | Jupyter | 1,422 | 61 | # %% [markdown]
# # snnTorch
#
# snnTorch is a deep learning simulator for spiking neural networks, built on PyTorch.
#
# ```{include} ../../../tmp/examples/snntorch/supported_primitives.md
# %% [markdown]
# ## Import a NIR graph to snnTorch
# %%
from snntorch.import_nir import import_from_nir
import torch
import ... |
5d34ca776e290e0b5c5e5fd6329c9f33f1cdf5090b9e72912fffef6659adb905 | Jupyter | 1,422 | 60 | # %%
import torch
import torch.nn as nn
import snntorch as snn
import numpy as np
# from snntorch import export
import nir
import nirtorch
# %%
graph = nir.read('lif_norse.nir')
graph.nodes
# %%
net = snn.import_from_nir(graph)
# %%
isis = [
6, 15, 4, 3, 0, 2, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 13, 0... |
373104d6590c8841c5aa191167ac00c24761a36ccfcd99e3d7c45430e62a06c6 | Jupyter | 1,430 | 76 | # %%
from fimpy.core import H5SplitDataset
from fimpy.pipeline.twop import align_2p_volume
from pathlib import Path
from fimpy.loading.twop import load_2p
# %% [markdown]
# # Load one
# %%
path = Path(r"J:\_Shared\experiments\E0032_luminance\v01_flashes\IO\181024_f1")
# %%
load_2p(path, pattern="*im*/*mat_files*/a... |
395bfc7c2b2c766561babda55e621f0ee882e6bc20f443d54e5e58dbc2eaa1ef | Jupyter | 1,434 | 51 | # %%
import numpy as np
from matplotlib.pylab import plt
import numpy as np
import seaborn as sns
def parse_energy_matrix(f):
i,j = 0,0
energy = np.zeros((60,60))
for l in f.readlines():
if 'Energy' in l:
energy[i][j] = float(l.split(' ')[-1])
j += 1
... |
efa3e266421d916dbd5807205117ae88ec27b81152d18b73b6a898b0267f799c | Jupyter | 1,434 | 46 | # %% [markdown]
# ## Spyx
#
# Spyx is a JAX-based SNN/Deep learning framework that enables fully JIT compiled optimization of models.
# %%
import spyx
import spyx.nn as snn
import jax
import jax.numpy as jnp
import nir
# %% [markdown]
# ## Import a NIR graph to Spyx:
# %%
# Load the NIR graph from disk
nir_graph ... |
e4adc0ed872367012d5056e361f185ddcdb03964aafd387b2bf579a705cc00d6 | Jupyter | 1,482 | 62 | # %% [markdown]
# ### Example notebook for model training and inference
# - Author: Xiaohui Zhang
# %%
%load_ext autoreload
%autoreload 2
import tensorflow as tf
import importlib
import os, random
import json
import sys
import numpy as np
import argparse
from model_attention_bilstm import model
from dataloader_sleep... |
3914718007c1640cde82a61362d8cacf8d4f8413cbde4ebec70514d3ff8c4b7e | Jupyter | 1,502 | 48 | # %% [markdown]
# # Spyx
#
# Spyx is a JAX-based SNN/Deep learning framework that enables fully JIT compiled optimization of models.
#
# ```{include} ../../../tmp/examples/spyx/supported_primitives.md
# %%
import spyx
import spyx.nn as snn
import jax
import jax.numpy as jnp
import nir
# %% [markdown]
# ## Import ... |
41bbbcc5436fbe3c491f1070ecfa9d2deb6bb2060aaebf2d43382508b496662f | Jupyter | 1,508 | 51 | # %%
# This notebook can be used to load hesin files, typecast columns type and the saving as hesin.tsv format
# %%
import pandas as pd
import numpy as np
# %%
txt_file_path = "" #/home/user/hesin_oper.txt
tsv_file_path = "" #/home/user/hesin_oper.tsv
df=pd.read_csv("file_path", sep = "\t")
df
# %%
df.dtypes
# %%
... |
03ec35741e547af465f34a83d4ce7b46f49a98a0e0fa80c93a81672f000ad28d | Jupyter | 1,525 | 46 | # %%
import numpy as np
import pandas as pd
# %%
# Table 2
temp_df = pd.read_excel('/n/holystore01/LABS/price_lab/Users/mjzhang/scTRS_data/single_cell_data/'
'mouse_liver_halpern_nature_2017/SuppTable3_zonation.xlsx', skiprows=2, index_col=0)
# %%
df_hom = pd.read_csv('/n/holystore01/LABS/pr... |
a3356b1ed6100ec3facd78f292e7865838bc7aeed8ab5b3f73bd28f7a7253bbd | Jupyter | 1,550 | 76 | # %%
import pyreadstat
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from scipy import stats
import seaborn as sns
import os
from Mymodule.ModelHandler import *
from Mymodule.Utils import *
from Mymodule.GradCam import *
from Mymodule.BatchHandler import *
from sklearn.metrics import roc_auc_... |
da273ea22c47f1c6f3f25334ca2666b8d7ef2122153f0b08d35dad5adb2eb57c | Jupyter | 1,553 | 68 | # %%
from rockpool.nn.combinators import Sequential
from rockpool.nn.modules import LinearTorch, LIFNeuronTorch
import numpy as np
import pandas as pd
import torch
import matplotlib.pyplot as plt
# %%
d0 = [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1... |
0cbe2ef60fd570ce5ef88b6ced23d80be3db1725bd2ef3e83197c1232928be55 | Jupyter | 1,563 | 70 | # %%
!pip install -q SPARQLWrapper
# %%
!pip install -e /dss/dsshome1/04/di93zer/git/cellnet --no-deps
# %%
import os
from os.path import join
import pandas as pd
import numpy as np
# %%
DATA_PATH = '/mnt/dssmcmlfs01/merlin_cxg_2023_05_15_sf-log1p'
# %% [markdown]
# # Compute lookup matrices
# %%
cell_type_mappi... |
ae46c09024be9c81ad54c48faa080af896ffd45a9a739de7c8d6c3f390726736 | Jupyter | 1,570 | 36 | # %%
input_path = "./data/GSE199460_original3000_preprocessed.h5ad"
%run /geniusland/home/fangyi/jupyter/CLEAR-main/Revise.py \
--input_h5ad_path={input_path} \
--aug_prob 0.0 --obs_label_colname ""
# %%
count_csv_path = f"./result/CLEAR/feature_CLEAR_{name}_original{gene}_preprocessed.csv"
label_csv_path=f"./result/... |
b26163642b6d73fceca1790c7b7ec21f8d134462e2443188d6c41127d1a00b82 | Jupyter | 1,573 | 40 | # %%
import os
import random
import subprocess
from multiprocessing.pool import ThreadPool
import time
import pandas as pd
# Generate a list of path of filtered MSA
path_proteins = "/home/conchae/ML_depolymerase/get_candidates/millard/scanned_MSA"
paths = [f"{path_proteins}/{msa}" for msa in os.listdir(f"{path_protein... |
f17fb8c0cf5104c0bbcc62f6a2fdd51251f8a3f74c79eae94840bf6f5800aed1 | Jupyter | 1,576 | 34 | # %% [markdown]
# ### formatting censor.tsv file
# %%
import pandas as pd
import numpy as np
# %%
LOCAL_DATA_FOLDER = ""#this is the same path that is being referred in do_all.sh file#/mnt/disks/ana-disk/ukbiobank_project/ukbb7089_2023_07_25/
df_censor = pd.read_csv(LOCAL_DATA_FOLDER+"censor.tsv.gz",sep = "\t", comp... |
a976e6fc70b7c69b2cafd87b41bbe378b8e19f188ac5fd1d865d64fd0c5a497a | Jupyter | 1,578 | 55 | # %% [markdown]
# # Make the SWORD2 prediction
# ***
# ### I. The prediction
# ### II. Scan through the IPR results
# ***
# %%
import os
import subprocess
from multiprocessing.pool import ThreadPool
path_work = "/home/conchae/PhageDepo_pdb"
path_pdb = f"{path_work}/phagedepo_out"
path_out = f"{path_work}/sword2_ou... |
b8de380823c5ee14855a4f27dc46aaa56adfed3be8b51cd6cfa3b526d5102bcd | Jupyter | 1,581 | 80 | # %%
!pip install celltypist
# %%
from os.path import join
import anndata
import scanpy as sc
import numpy as np
import pandas as pd
import dask.dataframe as dd
import dask.array as da
from scipy.sparse import csr_matrix
# %% [markdown]
# # Get subset training data
# %%
def get_count_matrix_and_obs(ddf):
x = (... |
318e8c3563bb7e96185e7a3869f9ec07f8e1d397a2dbcca143507f3a530cc5ac | Jupyter | 1,597 | 52 | # %%
from corrts import *
import numpy as np
import plotly.express as px
import plotly.graph_objs as go
import plotly.io as pio
import matplotlib.pyplot as plt
pio.templates.default = "simple_white"
# %%
gaussian_kernel = lambda t,r: np.exp(-r*t**2/2)
lags = np.arange(0,1000)
rgs = np.logspace(-4,0,100)[::-1]
a... |
92e076634022a6401465b0ab3104c01f81e320f5b374c3044fc023d59051962a | Jupyter | 1,609 | 53 | # %%
import pandas as pd
import anndata
from anndata import AnnData
import scanpy as sc
import matplotlib.pyplot as plt
from os.path import join
import numpy as np
import glob
# %%
raw_dir = "raw/habib_2016/"
# %%
df_mat = pd.read_csv(join(raw_dir, "SCP1/expression/DATA_MATRIX_LOG_TPM.txt"), sep='\t', index_col=0)
df... |
9ea2e6fb5d5bd54924749a9902779c7b5060a7ca27e6ace019578d5ba1a31801 | Jupyter | 1,610 | 78 | # %%
# http://justinblaber.org/acquiring-stereo-images-with-spinnaker-api-hardware-trigger/
# %%
import PySpin
# %%
# Set camera serial numbers
camera_serials = [22181547,22181612]
serial_1 = str(camera_serials[0])
serial_2 = str(camera_serials[1])
# %%
# Get system
system = PySpin.System.GetInstance()
# %%
# Get ... |
ca2d3f0ec7c43fb0ae262495556925dd8ab272501f51f1b3cbf169aeea76cf96 | Jupyter | 1,614 | 44 | # %%
from build_docker import *
import unittest
import pprint
DEBUG_MODE = False
this_script_path = os.path.realpath('__file__')
# %%
# example args for testing different scenarios
EXAMPLE_BUILD_TAG = "my.example"
# build from local files, and push to both Dockerhub and GCR
EXAMPLE_ARGS_LOCAL = ['--targets', 'all',... |
e88de1508d3d6343e5c52f670d8a4e44c818dee848694e08017aa56a91b9d6cf | Jupyter | 1,656 | 37 | # %% [markdown]
# # Install the ml4h toolkit for machine learning on clinical data
#
# The following commands will install the [ml4h toolkit for machine learning on clinical data](https://github.com/broadinstitute/ml4h) on your Terra [detachable persistent disk](https://support.terra.bio/hc/en-us/articles/360047318551... |
9644ce1d1d879ec77ddc651d69de3feb8a20dc767c13273e46b8b14c542f8c12 | Jupyter | 1,663 | 61 | # %% [markdown]
# # Annotate relative radial distance from nuclear center
#
# For each read in the PGP1 dataset, find its normalized radial distance from the nuclear center.
# %%
import importlib
import os, sys, warnings
import numpy as np
import pandas as pd
sys.path.append(os.path.abspath(os.path.join(r"..", r".")... |
1e9e690043d455830f964e570a6cf0a088014db3bc2b9b256682b42653844e99 | Jupyter | 1,680 | 69 | # %%
import norse
import numpy as np
import pandas as pd
import torch
import matplotlib.pyplot as plt
# %%
d0 = [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,... |
240a9dd1f6666918705af50a69cdfdc624a30d2edeb6b15009e176e2afa2016d | Jupyter | 1,698 | 59 | # %% [markdown]
# # Sinabs
#
# Sinabs is a deep learning library for spiking neural networks which is based on PyTorch and focuses on fast training as well as inference on neuromorphic hardware.
#
# `sinabs.to_nir` and `sinabs.from_nir` methods allow you to seemlessly navigate between `nir` and `sinabs`. Once your mo... |
d46667e4b21275718bac224cd776916da4cec460a127ce75b00bdc9bb3759c4c | Jupyter | 1,704 | 60 | # %%
import numpy as np
import matplotlib.pyplot as plt
from emilys.image.arrayplot import arrayplot2d
%matplotlib inline
# %%
# development imports with autoreload
%load_ext autoreload
%autoreload 1
# %%
# development import specifics
%aimport emilys.image.kernels
# %%
# load an image file and show it
nx = 256
ny =... |
19b4b609629ecbf5cd3e46adaee9d5fd22aaedcb8f94133ff098a2d89ae2865e | Jupyter | 1,743 | 75 | # %%
# This tutorial is based on
# https://mne.tools/dev/auto_tutorials/preprocessing/20_rejecting_bad_data.html
import os
import numpy as np
import mne
from jointdecorrelation import EventBasedArtifactProjector
mne.set_log_level('error')
# %%
# download and load the MNE sample dataset
sample_data_folder = mne.d... |
635aa55a2ab07065977dcb64b01d277cc69d2c5df220f823555c34eb063e1c78 | Jupyter | 1,747 | 35 | # %%
from pybioportal import mutations as mts
# %%
df1 = mts.get_muts_in_mol_prof_by_sample_list_id(molecular_profile_id="brca_tcga_mutations",
sample_list_id="brca_tcga_all",
entrez_gene_id="672")
df1
# %%
df2a = mts.... |
6d71edf74389409bbfeaffcc9483c9778613ce737154f043c7311dbd4f4dc18e | Jupyter | 1,754 | 72 | # %% [markdown]
# # YData Profiling: HCC Dataset
# Source of data: https://www.kaggle.com/datasets/mrsantos/hcc-dataset
#
# As modifiations have been introduced for the purpose of this use case, the .csv file is provided (hcc.csv).
# %% [markdown]
# ## Import libraries
# %%
import pandas as pd
from data_profiling i... |
d00617dda99033a1035be271c7dc3b0531791ee1e37cce5e8fff72858b179000 | Jupyter | 1,755 | 79 | # %%
import numpy as np
import pandas as pd
import scanpy as sc
import matplotlib as mpl
import matplotlib.pyplot as plt
from copy import copy
vir = copy(mpl.cm.viridis)
vir.set_under("lightgray")
sc.settings.verbosity = 3
sc.logging.print_header()
sc.settings.set_figure_params(figsize = [12,10],dpi =100... |
59044d1991a5fab170536053d70998a9e4b5b1b33dab3f1da3bfc40127b551f6 | Jupyter | 1,767 | 56 | # %%
import pandas as pd
import os
from tqdm import tqdm
from Bio import SeqIO
# %%
# %%
seq_to_remove = SeqIO.parse(f"{path_DePP_results}/remove_benchmark.fasta", "fasta")
seq_to_remove_list = [record.seq for record in seq_to_remove]
# %%
df_final_results = pd.read_csv(f"{path_DePP_results}/full_benchmark_dataf... |
8315991e358f43aa6d7c68d85bdee27937de4c34ad1cc2a2b1797b7969045d80 | Jupyter | 1,779 | 61 | # %% [markdown]
# # Sinabs
#
# Sinabs is a deep learning library for spiking neural networks which is based on PyTorch and focuses on fast training as well as inference on neuromorphic hardware.
#
# `sinabs.to_nir` and `sinabs.from_nir` methods allow you to seemlessly navigate between `nir` and `sinabs`. Once your mo... |
4ef44265a1e7d7dd1ef94a1be97d5320ab7a55a6a5a08cc31b9ea4d46a271867 | Jupyter | 1,782 | 83 | # %% [markdown]
# # Figure 3
# %%
%load_ext autoreload
%autoreload 2
from flyvis import EnsembleView
# %%
EnsembleView(
"flow/0000",
best_checkpoint_fn_kwargs={"validation_subdir": "validation", "loss_file_name": "loss"},
)
# %% [markdown]
# ## a
# %%
task_error = ensemble.task_error()
# %%
embedding_and_... |
a6ff9e13486c976e377f8fded1de939d8fd38e8bbee7961477bf9f04223b72c2 | Jupyter | 1,816 | 70 | # %% [markdown]
# # Test notebook Titanic
# %%
from pathlib import Path
import numpy as np
import pandas as pd
from IPython.utils.capture import capture_output
from ipywidgets import widgets
from data_profiling import ProfileReport
from data_profiling.utils.cache import cache_file
# %%
# Read the Titanic Dataset
fi... |
10002e07e0c60657511a5b55654d6594b9c0f0755aaf764181d36eeebaa25e0f | Jupyter | 1,828 | 56 | # %%
import numpy as np
import pandas as pd
# %%
DIC_PATHWAY = {'Glycolysis': 'REACTOME_GLYCOLYSIS',
'Lipogenesis': 'REACTOME_TRIGLYCERIDE_BIOSYNTHESIS',
'Bile acid production':'KEGG_PRIMARY_BILE_ACID_BIOSYNTHESIS',
'Glutamine synthesis':'',
'Xenobiotic metab... |
c7e5abeab7585d42c76ec20ebf2d47b6ade1bd127d5d50a9b46f64816c40daf8 | Jupyter | 1,830 | 103 | # %%
import pandas as pd
import numpy as np
# %% [markdown]
# # Drug Targets
# %%
drug_targets = pd.read_csv('data/COVID/drug_target.csv')
drug_targets
# %%
drug_targets['evidence_url'] = drug_targets['Evidence'].apply(lambda x: x[x.find('https:'):-1])
# %%
drug_targets.iloc[0].evidence_url
# %%
drug_targets['Term... |
b626d75eed8911676bc1b2c9d7a982c60a7ac957ccc4cf528ece860812c4f111 | Jupyter | 1,844 | 66 | # %%
import matplotlib.pyplot as plt
import nir
import numpy as np
from spinnaker2 import s2_nir, brian2_sim
# load NIR model
nir_model = nir.read("two_lif_neurons.nir")
s2_nir.add_output_to_node("lif1", nir_model, "out_lif1")
# %%
def run_two_neuron_model_on_s2(nir_model, duration, dt):
times = np.arange(0, dur... |
cfd9b399c37490bef5027ec96f9327e26b79de237c0a58e9631516d8c1f7d957 | Jupyter | 1,893 | 77 | # %%
from lisa_user_data import genome_tools
# %%
import importlib
# %%
genome_tools = importlib.reload(genome_tools)
r = [genome_tools.Region('chr1', start, end) for start, end in zip([1,10,20,30],[12,15,23,33])]
r2 = [genome_tools.Region('chr1', start, end) for start, end in zip([1,10,20,30],[12,15,23,33])]
r.appe... |
825a3fe7fbeb49f747d6ba3c64eb159421079804c00ae73a21ce955d610a6c8f | Jupyter | 1,896 | 75 | # %%
import torch
import tonic
import norse
import nir
import numpy as np
from collections import defaultdict
import tqdm
# %%
nir_graph = nir.read("cnn_sinabs.nir")
{k: type(v) for k, v in nir_graph.nodes.items()}
# %%
g = norse.torch.from_nir(nir_graph)
# %%
to_frame = tonic.transforms.ToFrame(sensor_size=tonic.da... |
9cd974522d593f007c4ef756cb5c72e0a779500db576a61e8b5924ef9c1d4f1b | Jupyter | 1,899 | 59 | # %% [markdown]
# # Python tutorial for using Attentive Chrome
# %% [markdown]
# ## 1. Install kipoi
# This can be done by using `pip`. (Ex `pip install kipoi`). Note that you need anaconda or miniconda installed. Refer to https://kipoi.org/docs/#installation for more information.
# %% [markdown]
# ## 2. Using Attent... |
8282165e9a45dbcb8511ab40301ea752cde0c24270d0ad6aa7873cb420b7b74c | Jupyter | 1,905 | 77 | # %%
import os
from os.path import join
import dask.dataframe as dd
import dask.array as da
import numpy as np
import pandas as pd
from dask_ml.decomposition import IncrementalPCA
# %%
PATH = '/mnt/dssmcmlfs01/merlin_cxg_2023_05_15_sf-log1p'
# %%
def get_count_matrix(ddf):
x = (
ddf['X']
.map_pa... |
88d4ab229887e02fd913d096aa526cbb307fc61d60f6066d5efda8054c3ea9d5 | Jupyter | 1,907 | 101 | # %%
import pandas as pd
import numpy as np
# %% [markdown]
# # MESH
# %%
important_columns_mesh = [
'Class ID',
'Preferred Label',
'Synonyms',
'Obsolete',
'Semantic Types',
'CUI'
]
# %%
mesh_df = pd.read_csv(
"data/MESH.csv", # relative python path to subdirectory
sep=',',
u... |
77700c3a5e5045e7b281ec7d0ccb7ea6f79f4ce5c5f161b88d5c29daf7160da3 | Jupyter | 1,918 | 49 | # %%
import nir
import numpy as np
# %%
ng1 = nir.read('braille_v2.nir')
ng2 = nir.read('braille_v2a.nir')
# %%
sorted(ng1.edges) == sorted([('lif2', 'output'), ('input', 'fc1'), ('fc2', 'lif2'),
('lif1.lif', 'lif1.w_rec'), ('lif1.w_rec', 'lif1.lif'),
('fc1',... |
682cf8d3c10257602e1c1108a60e539237b43aa2bac5f355fa89eca8a4e4fd62 | Jupyter | 1,920 | 49 | # %%
import nir
import numpy as np
# %%
ng1 = nir.read('braille_v2.nir')
ng2 = nir.read('braille_v2a.nir')
# %%
sorted(ng1.edges) == sorted([('lif2', 'output'), ('input', 'fc1'), ('fc2', 'lif2'),
('lif1.lif', 'lif1.w_rec'), ('lif1.w_rec', 'lif1.lif'),
('fc1',... |
75b9bf86cac1369cf525bb02337deb6fe559e26b27413b8fc066168ae35fcc8e | Jupyter | 1,920 | 98 | # %% [markdown]
# # Create unit test data for comparison between matlab and Python
# %%
addpath('./matlab')
# %%
fprintf('MATLAB version\n')
version
clear
# %%
[stauts, data_path] = system('python -c "import mne; print(mne.datasets.testing.data_path(), end=str())"')
# %%
fname = strcat(data_path, '/MEG', '/sample',... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.