sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 10.7k | content stringlengths 1 200k |
|---|---|---|---|---|
c93ab3e2e9bcc8fa6ca93157d46f73674b57eb347ec16f660424381a45308fa4 | Jupyter | 9,949 | 227 | # %% [markdown]
# # Separation by Cell
#
# ### This code separates resampled filament points into different cells based on their distance to the cell membranes. It assumes that there are only two cells in the volume and each actin point is allocated to the cell whose membrane it is closest to.
# %% [markdown]
# ## In... |
b1869f915c5ee71bdb580b2a669f614a1d8b12d181e8127571c5b948f8ed2680 | Jupyter | 9,971 | 327 | # %% [markdown]
# # Oscillation analysis: HFB onsets
#
# Here we determine if the activation times of PNGs are associated with background rhythmic activity of excitatory neurons.
#
# **Dependencies:**
#
# Spike recordings, PNG detection and significance testing:
# - Note that recorded spike trains are non-determinis... |
00eb2ff74189f2b992bf85da5dc219144f1659fc0331514c7ca4d6ce0b823510 | Jupyter | 10,283 | 327 | # %%
import sys
import os
# 👇 Change this path to the actual directory where PRISM_load.py and related files are stored
code_path = "~/src/"
# Check whether the path exists; if so, add it to the system path
if os.path.exists(code_path):
if code_path not in sys.path:
sys.path.append(code_path)
pri... |
6a8953c7128b678306211b98e449ffc9217e98f3488da25ef1c065fac4bfed4e | Jupyter | 10,394 | 303 | # %%
%matplotlib inline
# %% [markdown]
#
# # Tutorial 3: Null models for gradient significance
# In this tutorial we assess the significance of correlations between the first
# canonical gradient and data from other modalities (curvature, cortical
# thickness and T1w/T2w image intensity). A normal test of the signif... |
b75da228474f6f1d1fcfcd1a5ebeea98f424d3bc2f5850c9e02337f47d2cc3b6 | Jupyter | 10,428 | 189 | # %%
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np
import scipy.stats as ss
# %%
plt.rcParams["font.family"] = "arial"
plt.rcParams["font.size"] = 7
plt.rcParams['axes.linewidth'] = 0.5
plt.rcParams['xtick.major.width'] = 0.25
plt.rcParams['xtick.major.size'] = 2
plt.... |
99ace93bc58ce5e160be8e6e9e686dc86e6a7f59b8c23949899b9c3991b9e1d3 | Jupyter | 10,458 | 268 | # %%
import pymaid
import navis
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import scipy.stats as stats
import seaborn as sns
import scikit_posthocs as sp
from matplotlib.ticker import PercentFormatter
#connect your catmaid instance
instance=pymaid.CatmaidInstance('https://radagast.hms.harva... |
604e312ad60083931bfb3583eb74e523a2f51a4a76388eb1321f4a324f6885f3 | Jupyter | 10,460 | 298 | # %%
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import pingouin as pg
pd.options.mode.chained_assignment = None # default='warn'
# %%
plt.rcParams["font.family"] = "arial"
plt.rcParams["font.size"] = 7
plt.rcParams['axes.linewidth'] = 0.5
plt.rcParams['xtick.major.wid... |
9736957652aa949907c29cc76ec1f79dfc604266aaaf544144f3068246296a8b | Jupyter | 10,480 | 325 | # %%
# %%
import sys
import os
# 👇 Change this path to the actual directory where PRISM_load.py and related files are stored
code_path = "~/src/"
# Check whether the path exists; if so, add it to the system path
if os.path.exists(code_path):
if code_path not in sys.path:
sys.path.append(code_path)
... |
d836b3cd0844779296791977750e3952f32c47849d9e7e6d546f942cbda80354 | Jupyter | 10,491 | 268 | # %%
import pymaid
import navis
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import scipy.stats as stats
import seaborn as sns
import scikit_posthocs as sp
from matplotlib.ticker import PercentFormatter
#connect your catmaid instance
instance=pymaid.CatmaidInstance('https://radagast.hms.harva... |
03e2778b1f26ff38186d6225dee53fa35a08c9cafaeacb64fa6c67e116a6fc30 | Jupyter | 10,494 | 328 | # %%
import numpy as np
import pickle
import matplotlib.pyplot as plt
import glob
def showResponseMap(all_ISJs, trial_len_ms, prestim_len_ms, samp_interval,
NDIRS=8, tick_interval_ms=250, f_ax=None, show_xlabels=True):
if f_ax is None:
f, ax = plt.subplots(1,1)
else:
f, ax ... |
71f7498c540e7e558f6cd2e502adbd16e65f26280d72b2c10ea077564849e015 | Jupyter | 10,542 | 235 | # %% [markdown]
# # Completeness of the low-level feature representation
#
# Recruitment of *informative* low-level (**L**) neurons into labelled binding circuits, graded by
# PNG F1, for **N3P2 / ALL** and **N4P2 / ALL** (three detection trials each) at the post-trained
# checkpoint. For a PNG anchored at layer *l* t... |
142fe8147d0d5091fc89a319173e33a6df20d1a0e413302a808d9c3db52cb27c | Jupyter | 10,575 | 314 | # %% [markdown]
# # Plot feature sharing across multiple HFBs
#
# Spike rasters of neuronal activity involved in two PNGs.
#
# **Dependencies:**
#
# Significance testing:
# - PNG detection and significance testing for N4P2: after network training
# - **This workflow is time-consuming to run**
# - Note that recorded ... |
120ee261005406d120503fe9db968fb87fd7e97dc51eae3486a4b1c3402bc2dd | Jupyter | 10,607 | 341 | # %%
# %%
import sys
import os
# 👇 Change this path to the actual directory where PRISM_load.py and related files are stored
code_path = "~/src/"
# Check whether the path exists; if so, add it to the system path
if os.path.exists(code_path):
if code_path not in sys.path:
sys.path.append(code_path)
... |
fdb637492f00b99c7659827d252c8fd461c2b184d0cb6b3c43c6ec7b7e801fd9 | Jupyter | 10,644 | 271 | # %%
import pymaid
import navis
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import scipy.stats as stats
import seaborn as sns
import scikit_posthocs as sp
from matplotlib.ticker import PercentFormatter
#connect your catmaid instance
instance=pymaid.CatmaidInstance('https://radagast.hms.harva... |
3bde95fcae83f935642b897f22a7530fa87838960abdb46b3c6d53bc919bb3be | Jupyter | 10,657 | 420 | # %% [markdown]
# # Literature Analyses
#
# This notebook analyses the collected and curated literature data for the aperiodic-clinical project.
# %%
from pathlib import Path
from collections import Counter
import numpy as np
import pandas as pd
# %%
# Import local code
from local.utils import (replace_multi_str, ... |
36fc53683390e2c014180794d6b42dcf910c7bfe0334cbb8c9b2e623b568d882 | Jupyter | 10,677 | 419 | # %% [markdown]
# # Feature selectivity N4P2 (noise)
#
# Neuronal response properties before and after training with Gaussian noise applied to shapes from N4P2.
#
# **Dependencies:**
#
# - Inference spike recordings for N4P2: both before and after network training
# - Depends on N4P2 workflows (with and without the ... |
6b4d612e18ccf1fa86d54dba7035ac561c4e26c06e909d1338658baea63a8159 | Jupyter | 10,677 | 271 | # %%
import pymaid
import navis
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import scipy.stats as stats
import seaborn as sns
import scikit_posthocs as sp
from matplotlib.ticker import PercentFormatter
#connect your catmaid instance
instance=pymaid.CatmaidInstance('https://radagast.hms.harva... |
69ed39d67f2f4adcb99f70aafcef3023c8640b0a7d4a030ee513728182a8cbfa | Jupyter | 10,720 | 232 | # %%
import pandas as pd
import matplotlib.pyplot as plt
from fafbseg import flywire
import pymaid
import navis
import numpy as np
import seaborn as sns
import scipy.stats as stats
import scikit_posthocs as sp
flywire.get_materialization_versions()
# %%
#connect your catmaid instance
instance=pymaid.CatmaidInstance('... |
4cf6f62d0cb122a6d64ed6fce0a5747db4abea1131146f45ad16ddae897274e6 | Jupyter | 10,783 | 328 | # %% [markdown]
# # Information analysis: N3P2 and N4P2
#
# Single-neuron information analysis and informative-neuron counts for convex boundary contour elements.
#
# This plots Fig 9 and supplementary S1 Fig.
#
# **Objectives**
#
# - Measure information conveyed by single L4 neurons regarding convex-boundary conto... |
2ea103a12fab0ac14d0146e2f40c82c6d25e7ac7d90831d4bef56415b29705c9 | Jupyter | 10,809 | 289 | # %% [markdown]
# #### 0. Import modules and define functions
# %%
import numpy as np
import pickle
import matplotlib.pyplot as plt
from scipy.spatial.distance import pdist, squareform
from utils import *
from scipy.optimize import lsq_linear
from sklearn.decomposition import PCA
plt.rcParams['figure.figsize'] = (6.0... |
15201247ca97792730ca01bdf4cdaf83284a07261d6c2706af67ac381568f8a2 | Jupyter | 10,865 | 288 | # %% [markdown]
# # Visualization - Custom Components
#
#
# ### The Boltzmann Wealth Model
# %% [markdown]
# If you want to get straight to the tutorial checkout these environment providers:<br>
# [](https://mybinder.org/v2/gh/mesa/mesa/main?labpath=docs%2Ftutorials%2F6... |
172a2f84916c62f2d75d474964c91f64f56e70c7459fdcad792b4827fb6f4b74 | Jupyter | 10,892 | 312 | # %%
from pathlib import Path
import numpy as np
import pandas as pd
from tqdm.notebook import tqdm
import seaborn as sns
import matplotlib.pyplot as plt
# %%
import json
with open('med_categories.json','r') as f:
med_categories = json.load(f)
med_categories
# %%
fig,axs = plt.subplots(3, 4, figsize=(14,10), gri... |
ded9e13f35196ee752b409f23e33469116de1740b0817393ef015ef3839eabde | Jupyter | 11,040 | 223 | # %% [markdown]
# # init
# %%
import os
import sys
import copy
import glob
import numpy as np
import matplotlib.pyplot as plt
from tqdm.auto import tqdm
import pickle
from scipy import stats
import importlib
import time
import tifffile as tf
import shutil
from matplotlib.backends.backend_pdf import PdfPages
import jso... |
fcfa26a5f9084e0656e193992db960e7bde33bd59c8f93aa9cbc4ae6ba52ea78 | Jupyter | 11,059 | 328 | # %% [markdown]
# # Expansion Data
# This code will recreate figure panels as well as plot individual dendrites and determine summary values of key variables
# >> mean diam <br>
# >> length <br>
# >> distance <br>
# >> resistance <br>
# %%
import matplotlib.pyplot as plt
plt.rc("axes.spines", top=False, right=Fal... |
c026e859020a785b9b6b60d6d52706bdcf38651e0e92572f11ecb7ebad183e01 | Jupyter | 11,085 | 319 | # %%
# Imports
from pathlib import Path
import flammkuchen as fl
import torch
import numpy as np
import matplotlib.pyplot as plt
%matplotlib qt
# Metrics
from sklearn.metrics import (
accuracy_score, f1_score, precision_score,
recall_score, precision_recall_curve, confusion_matrix, auc)
# Custom imports
impor... |
97575bbf575ed20818b45c9537b877a5bb4bbd599abc796cb2f1f0eb6f24f76b | Jupyter | 11,103 | 308 | # %% [markdown]
# # **Introduction**
#
# In this tutorial, we demonstrate how to use autoencoer (AE) on Mouse hematopoietic dataset. The mouse hematopoietic dataset is time-series scRNA-seq datasewas downloaded from the NCBI Gene Expression Omnibus (GEO) under accession number GSE140802, or alternatively from thets [... |
caa1dc718a6969e4d1e87bd5136ed2f7427d7f5d04f0e0b1c398e9bf825ff68d | Jupyter | 11,171 | 268 | # %%
import anndata as ad
import scanpy as sc
import gc
import sys
import cellanova as cnova
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sea
from metrics import calculate_metrics
seed = 10
np.random.seed(seed)
# %%
def calculate_mean_proportion_matrix(df):
"""
Cal... |
9acf778dbad61ba63e12d2f4018934a8aa03ce6fb6fc3d58cbb6c04c39e1bcd1 | Jupyter | 11,291 | 295 | # %% [markdown]
# # *Stoic* — Protein Stoichiometry Prediction
#
# **Fast and accurate protein stoichiometry prediction.**
#
# Enter one protein sequence per unique chain/entity. *Stoic* predicts how many copies of each chain are present in the assembled complex.
#
# ---
# %%
#@title **Setup** — install dependencie... |
10fa2bfb2a64737fd7aabc12581920c965f6b8c0df887de21906eef7c94c0fff | Jupyter | 11,305 | 467 | # %% [markdown]
# # Hierarchical feature integration
#
# Hierarchical integration of neuronal responses for feature selective neurons in the last two layers, L3 and L4, trained on N4P2 shapes.
#
# **Dependencies:**
#
# - Inference spike recordings for N4P2 (Trial #15): both before and after network training
# - Depe... |
15315955a8d3313a20b53662db38eeff6c5a3881bfdbb7fb28c1163b8897c6ec | Jupyter | 11,363 | 293 | # %% [markdown]
# # Using extra features and descriptors
# %% [markdown]
# This notebook demonstrates how to use extra features and descriptors in addition to the default Chemprop featurizers.
#
# * Extra atom and bond features are used in addition to those calculated by Chemprop internally.
# * Extra atom descripto... |
e470c4d283a81088d555e644e235dc1cee0df9136e9b471f8a25fb354118a201 | Jupyter | 11,380 | 271 | # %% [markdown]
# # Visualization - Dynamic Agents
#
#
# ### The Boltzmann Wealth Model
# %% [markdown]
# If you want to get straight to the tutorial checkout these environment providers:<br>
# [](https://mybinder.org/v2/gh/mesa/mesa/main?labpath=docs%2Ftutorials%2F7_vi... |
05a88c6808c7771bea1faed3c4e697867919db5a9f24482b1d9dbd294c51edc2 | Jupyter | 11,387 | 253 | # %% [markdown]
# ## Computing resampling distance histogram
#
# ##### This code loads data from CSV files, calculates distances between points, and then creates and displays a histogram of those distances. It also combines control and induced tomo lists and works with two cells (cell 1 and cell 2) within each tomo fi... |
4b5d30d00b396ea331a9efd502b8d6bf01389e5ed00334f97f3729f608cad4c4 | Jupyter | 11,540 | 268 | # %% [markdown]
# # Bundle Analysis
#
# ##### This script identifies points on filaments that form a bundle with other filaments. Credits to Marc Siggel (Kosinski/Mahamid lab) for the initial translation of matlab code to python.
# %% [markdown]
# ## Initialization
# %%
import numpy as np
import pandas as pd
from s... |
d1e6f4b724a02bda5c01332b4eba4b7db4619df956364af5b2b7e0dc7b1ab2b6 | Jupyter | 11,651 | 365 | # %%
#conda activate tf2, tf2.10
import matplotlib.pyplot as plt
from PIL import Image
import tensorflow as tf
import numpy as np
import os
from utils import *
from glob import glob
try:
from tensorflow.python.keras.applications import ResNet50
from tensorflow.python.keras.applications.resnet50 import preproces... |
7e9af1af13185bea6dced7ca69ba9d94e1dae0017de3e5f0a372ac911ecbff24 | Jupyter | 11,702 | 267 | # %% [markdown]
# # Tutorial on applying NDreamer to single cell experimental perturbation analysis
#
# In this notebook, I will provide a step-by-step illustration on how to run NDreamer for single cell experimental perturbation analysis. We use the PBMC dataset as used in the manuscript, which comes from https://pub... |
0a9f50d0d59127530cc0f3e1677384b9d0cc9c35d14c4981a061e694bf4d3ff4 | Jupyter | 11,796 | 408 | # %% [markdown]
# # Resilience of the network to input noise
#
# Network robustness to Gaussian input noise measured using single neuron information analysis.
#
# **Objectives**
#
# - Measure information conveyed by single L4 neurons regarding a left-convex boundary element
# - Compare the network performance across... |
0427c9d5c98ae6dbb8c0dc3cba352fa6771f850aa278f3805b694ffce9755056 | Jupyter | 12,079 | 333 | # %%
import numpy as np
import pickle
import matplotlib.pyplot as plt
from scipy.spatial.distance import pdist, squareform
from utils import *
from scipy.optimize import lsq_linear
from ian.dset_utils import *
from sklearn.decomposition import PCA
plt.rcParams['figure.figsize'] = (6.0, 4.0)
plt.rcParams['figure.dpi'] ... |
5d560bfec7f1eaac9c2698e5c233fe7eca455e281fa79c5ba448fa429fa018d5 | Jupyter | 12,130 | 254 | # %% [markdown]
# # Adding Space
#
# ### The Boltzmann Wealth Model
# %% [markdown]
# If you want to get straight to the tutorial checkout these environment providers:<br>
# (with Google Account) [](https://colab.research.google.com/github/mesa/mesa/b... |
02576b8db31e646cf7d69c0cce16a507c53c5c89678bfb6af6e1de2dc1748e0d | Jupyter | 12,200 | 303 | # %% [markdown]
# # Visualization - Basic Dashboard
#
#
# ### The Boltzmann Wealth Model
# %% [markdown]
# If you want to get straight to the tutorial checkout these environment providers:<br>
# [](https://mybinder.org/v2/gh/mesa/mesa/main?labpath=docs%2Ftutorials%2F6_v... |
0947ea07ca5fe620acc0291bd856cf0b84f12ca97cac59b72440d442b241c229 | Jupyter | 12,200 | 395 | # %% [markdown]
# # Network sensitivity analysis: single-neuron selectivity
#
# Sensitivity of single-neuron selectivity to key network parameters.
#
# This notebook explores the effect of hyperparameter sweeps (learning rate, competition, delays) on single-neuron information.
#
# **Dependencies:**
#
# ---
#
# A) ... |
0f9af9eaa920bfd658163e02d62ca46aa7e8a8b2663a8cb6bae92641b35c8038 | Jupyter | 12,269 | 291 | # %%
import anndata as ad
import scanpy as sc
import gc
import sys
import cellanova as cnova
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sea
from metrics import calculate_metrics
sc.settings.verbosity = 0
sc.settings.set_figure_params(dpi=400)
pd.set_option('display.max_co... |
ada2f2e253380ea09bad25b3bc1ec209524c0e575b1c32a99521863f9f84930c | Jupyter | 12,446 | 396 | # %% [markdown]
# # Tutorial 2: Human Cortical Development with Missing Modality
#
# ## Overview
#
# **mmVelo** (multimodal Velocity) estimates RNA and chromatin velocities simultaneously
# across cells that may be profiled with different modalities:
#
# | Modality | Observed | Inferred (cross-modal) |
# |----------... |
755db3e6edbcd98c3a4f08752d009b84fe44a656eadf3fe428d3ea310da915d9 | Jupyter | 12,504 | 399 | # %%
#default_exp seq.experimental
# %%
#export
import numpy
import scipy
import scipy.signal
from matplotlib import pyplot
import seaborn
import pandas as pd
import pyfastx
import pyfaidx
from tqdm import tqdm
import pyBigWig
from katmap.utilities import progbar
import ncls
from itertools import product
from katmap... |
59cbcabf9198f2a57a1f0e60ae64d9b769b6276d569f4bec679faed9cf971fde | Jupyter | 12,690 | 427 | # %% [markdown]
# # Plot onset timings and regression
#
# PNG onset timing, timing precision, and feature selectivity for three-sided shapes (N3P2).
#
# **Dependencies:**
#
# Spike recordings, PNG detection and significance testing:
# - Note that recorded spike trains, PNG significance testing are non-deterministic:... |
877e3cf0b31f265b7bcb9a94e44a3c318de5272fb8ef8860fef8c142f7fdb55b | Jupyter | 12,762 | 295 | # %%
import pandas as pd
import matplotlib.pyplot as plt
from fafbseg import flywire
import pymaid
import navis
import numpy as np
import seaborn as sns
import scipy.stats as stats
import scikit_posthocs as sp
flywire.get_materialization_versions()
# %%
#connect your catmaid instance
instance=pymaid.CatmaidInstance('... |
d13fc69eb5df8424ae261c5f99e294eb1afb408ceb093f9c2be6b28dd6cef759 | Jupyter | 12,785 | 280 | # %% [markdown]
# # Reuse and binding-neuron ambiguity
#
# Structural reuse across the three circuit roles, and the ambiguity and resolution of the
# binding neuron, for the N4P2 / **ALL** (FF + LAT + FB) network at the post-trained checkpoint.
# Roles are lag-ordered: **L** (low-level, fires first), **H** (high-level... |
045e3264305d259fbacca8d9b9722479b302fd17f2ed668de15aacdfb2c003fc | Jupyter | 12,996 | 366 | # %% [markdown]
# # Atom and Bond Prediction
# %% [markdown]
# [](https://colab.research.google.com/github/chemprop/chemprop/blob/main/examples/mol_atom_bond.ipynb)
# %%
# Install chemprop from GitHub if running in Google Colab
import os
if os... |
1a9fd6ecf3e5ebb4157814782bab48097047c06b6b3d1abc4855c8c29fb3b22c | Jupyter | 13,040 | 390 | # %% [markdown]
# # Robustness & Sensitivity Analysis for HFB Detection
#
# This notebook explores:
# - Sensitivity of detected PNG counts to temporal-span and timing-tolerance parameters.
#
# **Dependencies:**
#
# ---
#
# Significance testing:
# - PNG detection and significance testing for N3P2: after network trai... |
12e296bdf56b3bfc8ce0b7fb109059c08609f3bc6f94790e396f7929fa079951 | Jupyter | 13,100 | 350 | # %% [markdown]
# # Tutorial 1: Embryonic Mouse Brain
#
# This tutorial demonstrates **mmVelo** applied to 10x Multiome data from the embryonic mouse brain (E18). We train a deep generative model to jointly infer cell state dynamics, spliced RNA velocity, and chromatin velocity.
#
# **Reference**: 10x Genomics E18 mo... |
c412722bfdb9cc637d874c11183ba0cc35d382a9fbf3094157bd503d5b4f8df4 | Jupyter | 13,416 | 282 | # %%
import scanpy as sc
import pandas as pd
import statistics
import sys
import getopt
import os
import matplotlib.pyplot as mp
import anndata as ad
import time
# %%
sc.settings.figdir = "../results/figures/"
print(sc.__version__)
print(ad.__version__)
print(pd.__version__)
# %%
adata = ad.read_h5ad("h5s/ASAP_adata_... |
9a9126bace669fee2973bbc20a1ae238b94edfc1acfe3eb19fd8a370946a83d0 | Jupyter | 13,485 | 358 | # %%
import numpy as np
import matplotlib.pyplot as plt
import mdtraj as md
import pandas as pd
from scipy.stats import pearsonr
# %%
def count_molecules(pdb_file):
"""
Count the number of molecules in a PDB file using MDTraj.
"""
traj = md.load(pdb_file)
topology = traj.topology
molecules = li... |
48bd5e1eee9110ac455a962de63b046812fd65167ff54f06967636fd2d6ee8a8 | Jupyter | 13,509 | 282 | # %% [markdown]
# # Membrane-filament distance calculation
#
# #### This assumes that a file memb_surface_area.csv already exists in the directory, calculated by memb_area_calc.m (under memb_surface_area_calculation of the repository)
# %% [markdown]
# ## Initialization
# %%
import numpy as np
import pandas as pd
f... |
9f6ee11c05cb024e90d84d515104dc64789e83182534b61afb80c2a90fb6d1d6 | Jupyter | 13,536 | 386 | # %%
import seaborn as sns
import pandas as pd
import numpy as np
import shutil
import os
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import seaborn as sns
from matplotlib.dates import DateFormatter
from dateutil.relativedelta import relativedelta
from scipy.optimize import curve_fit
# %%
fit_df... |
e6e48524e3cd6a54830c5ace1635ccbec868badcf07b9648054f8c4d826c10e0 | Jupyter | 13,668 | 378 | # %%
import seaborn as sns
import pandas as pd
import numpy as np
import shutil
import os
import matplotlib.pyplot as plt
from matplotlib.dates import DateFormatter
from dateutil.relativedelta import relativedelta
from scipy.optimize import curve_fit
from scipy.stats import lognorm
# %%
#import the CSV containing real... |
387665e77032486cae55e359cc359baf5a1f421ef72366dac3f4bef8f7a4a8e2 | Jupyter | 14,318 | 299 | # %%
import os
os.environ["OMP_NUM_THREADS"] = "1"
import torch as tc
tc.set_num_threads(1)
import matplotlib.pyplot as plt
import numpy as np
from sklearn.mixture import GaussianMixture as GMM
import re
from spatial_separation.classification_utils import *
import sys
import pickle
from analysis_utils import *
sys.path... |
341d96a8b265ade59cf38185bd7c605149c5cc813df04904ce73d85d7e660109 | Jupyter | 14,390 | 324 | # %% [markdown]
# # Collecting Data
#
# ### The Boltzmann Wealth Model
# %% [markdown]
# If you want to get straight to the tutorial checkout these environment providers:<br>
# (with Google Account) [](https://colab.research.google.com/github/mesa/mes... |
0c080b34877709c2173fbc7b7c92847da231e0b464d5c7153989c4881543bc1f | Jupyter | 14,567 | 349 | # %%
import warnings
warnings.filterwarnings('ignore')
# %% [markdown]
# # Libraries
# %%
import sys
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from stabl.stabl import Stabl, plot_stabl_path, plot_fdr_graph, export_stabl_to_csv, save_stabl_results
from stabl.preprocessing import LowInfoFi... |
4ac3b81b30ffe13f9c706fe232102f86bf7cedbaeab6134a01c811615af0b2f2 | Jupyter | 14,595 | 254 | # %%
#default_exp inference.summaries
# %% [markdown]
# # experimental.diagnostics
#
# > A submodule containing diagonistics for interpreting inferred models.
# %%
#export
from katmap.utilities import progbar
from arviz import psislw
import pandas as pd
import numpy
import scipy, scipy.stats, scipy.special
import ja... |
5820b2941b5d78489135b1f60023ab0e08ee2f3f3939f92cdd0b0fd66fc4b2ed | Jupyter | 14,692 | 427 | # %% [markdown]
# # Agent Activation
# ### The Boltzmann Wealth Model
# %% [markdown]
# **Important:**
# - If you are just exploring Mesa and want the fastest way to execute the code we recommend executing this tutorial online in a Colab notebook. [](ht... |
325e6ff8a757cda2b65fd92ea946bb2ab95f96676400bbc45ead747c2e563c96 | Jupyter | 14,891 | 394 | # %% [markdown]
# # **Introduction**
#
# In this tutorial, we demonstrate how to use DiffusionOT to train on the EMT dataset and perform downstream analyses such as Stochastic Trajectory Analysis (STA), inferring underlying Gene Regulatory Networks (GRNs), identifying critical genes, and conducting gene perturbation a... |
b42375fa428d100c77179fe1a3a1597ce42394c021d57d414494bf833ddb950d | Jupyter | 15,087 | 449 | # %%
import pandas as pd
from polyleven import levenshtein
import numpy as np
import matplotlib.pyplot as plt
from sklearn.linear_model import Lasso, Ridge
from sklearn.metrics import r2_score, mean_squared_error
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error
from da... |
941632723750fcf899e2382a2188ef3fe8d6cfd55a1dc06347d08c6c1a9cc379 | Jupyter | 15,207 | 423 | # %% [markdown]
# # Working with AgentSets
# ### The Boltzmann Wealth Model
# %% [markdown]
# **Important:**
# - If you are just exploring Mesa and want the fastest way to execute the code we recommend executing this tutorial online in a Colab notebook. [](https://mybinder.org/v2/gh/mesa/mesa/main?labpath=docs%2Ftu... |
39f2eb67b33238d2b73a260daeb2bc949dda5cfda4dbf475cf73363dda0fbd52 | Jupyter | 15,578 | 472 | # %% [markdown]
# ## Figure 5
#
# The input files are available at [our repository on Zenodo](https://doi.org/10.5281/zenodo.19499423).
# %%
import os
import numpy as np
import pandas as pd
import scanpy as sc
from matplotlib import pyplot as plt
import seaborn as sns
from statsmodels.stats.proportion import propo... |
5f16032ac4a0868c39121a88fe8cadb71fccd3a69eef5453bd0e6f306d877df5 | Jupyter | 15,596 | 396 | # %% [markdown]
# # Visualization - Advanced Space Rendering
#
#
# ### The Boltzmann Wealth Model
# %% [markdown]
# If you want to get straight to the tutorial checkout these environment providers:<br>
# [](https://mybinder.org/v2/gh/mesa/mesa/main?labpath=docs%2Ftutori... |
b52cb63edeea8b73e01854b109589276ab31d89513a8aa6625973ba73a5c680a | Jupyter | 15,639 | 305 | # %%
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import scipy.stats as stats
import numpy as np
import pingouin as pg
# %%
plt.rcParams["font.family"] = "arial"
plt.rcParams["font.size"] = 7
plt.rcParams['axes.linewidth'] = 0.5
plt.rcParams['xtick.major.width'] = 0.25
plt.rcParams['xtick... |
2c15ddd26dbf7acc8c678adc328f576ae51bc1bba44cd24cc5b41c011d75a404 | Jupyter | 15,703 | 355 | # %%
import pandas as pd
import matplotlib.pyplot as plt
from fafbseg import flywire
import pymaid
import navis
import numpy as np
import seaborn as sns
import scipy.stats as stats
import scikit_posthocs as sp
flywire.get_materialization_versions()
# %%
#connect your catmaid instance
instance=pymaid.CatmaidInstance('... |
bcd4891a84170621abfcbb08ac4b4a5941362924a3abd2b35bf3edd6d588678f | Jupyter | 15,749 | 440 | # %%
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import scipy.stats as stats
# %%
swc_file = 'MICrONS_864691135693733567.swc'
column_names = ['ID', 'typ', 'x', 'y', 'z', 'radius', 'parent_id']
data = pd.read_csv(swc_file, sep=' ', comment='#', header=None, names=column_names)
# %%
def draw_... |
3363833d7c693bf1ec9e4538dbe586805293951537e97acf9a01c37b55bb9f98 | Jupyter | 15,771 | 303 | # %%
# Import general libraries
import numpy as np
import pandas as pd
import re
import pickle
import torch
from brian2 import *
from sbi import utils, inference
import matplotlib.pyplot as plt
import os
from pathlib import Path
import getpass
import psutil
from dataclasses import dataclass, field, asdict
import copy
... |
08d4307b277ca2f3e446dc0ade90b66de16419d016e31b2a28f655fefc55d8cc | Jupyter | 15,900 | 492 | # %%
#default_exp stats.binding
# %% [markdown]
# # stats.binding
#
# > A submodule containing classes and functions for transforming nonlinear predictors (e.g. affinity, eCLIP enrichment) into linear predictors
# %% [markdown]
# ## Overview
# %%
#hide
from matplotlib import pyplot
# %%
#export
from abc import ABC... |
2e65ff2b4e6a6edb4f8153390f4eab5d79ee14ce454b5090449d176eeb4e8c63 | Jupyter | 16,235 | 368 | # %% [markdown]
# # Creating Your First Model
#
# ### The Boltzmann Wealth Model
# %% [markdown]
# **Important:**
# - If you are just exploring Mesa and want the fastest way to execute the code we recommend executing this tutorial online in a Colab notebook. [ for the initial translation of matlab code to python.
# %% [markdown]
# ## Initialization
# %%
import numpy as np
import pandas as pd
from scipy.spatial.distance import cdis... |
e380b9604bc088fef807199946c15f482b6e233ff111399a0d9c28b8da34c3a0 | Jupyter | 16,760 | 501 | # %%
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
pd.options.mode.chained_assignment = None # default='warn'
# %%
plt.rcParams["font.family"] = "arial"
plt.rcParams["font.size"] = 7
plt.rcParams['axes.linewidth'] = 0.5
plt.rcParams['xtick.major.width'] = 0.25
plt.rcPa... |
c23be1a40afd821984f7e2bc79218a16e29552c46ae1a0521db82e9fdd8358ab | Jupyter | 16,778 | 475 | # %% [markdown]
# # Molly exercise
#
# This exercise will introduce you more to the [Molly.jl](https://github.com/JuliaMolSim/Molly.jl) package for molecular simulation. Julia 1.10 and Molly 0.22.3 or later are recommended. Basic familiarity with Julia and molecular dynamics concepts is assumed. You may find the [Moll... |
4395c98bee354d9cf0dc7b640a6df312db50749254b3482a595887672e63a1c1 | Jupyter | 16,932 | 527 | # %% [markdown]
# # Supplementary: Side-resolved information analysis
#
# Single-neuron information analysis and informative-neuron counts for convex/concave boundaries at each N3P2/N4P2 object side.
#
# - This plots S3 and S4 Figs.
# - This is the (FF + LAT + FB) network architecture.
#
# **Dependencies:**
#
# ---... |
7b3125ac43041d925ad5a14e413cf3216a22b901c1e3f84175d19c36648c5b27 | Jupyter | 17,019 | 322 | # %% [markdown]
# # Siamese U-Net Quickstart
# %% [markdown]
# **IMPORTANT**: Two packages packages need to be installed manually before running bio-image-unet: CUDA and PyTorch. To install CUDA 11.1 which is officially supported by PyTorch, navigate to [its installation page](https://developer.nvidia.com/cuda-11.1.1-... |
c46311536d13e7dcbb41699cda1ae1b87f440b76f0c1e0e1c5fb646f8d7a884d | Jupyter | 17,073 | 439 | # %%
import seaborn as sns
import pandas as pd
import numpy as np
import shutil
import os
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import seaborn as sns
from matplotlib.dates import DateFormatter
from dateutil.relativedelta import relativedelta
# %%
country_list = ['SE', 'DE', 'IT', 'DK', 'FR... |
bc013007d7ea2cf2f756ee48f52b34a7fa88a6ca41bfa40d68c906b38b04fd6b | Jupyter | 17,240 | 507 | # %%
import pandas as pd
import bambi as bmb
import pingouin as pg
import joblib
from os import listdir
from os.path import join
from pathlib import Path
import numpy as np
import mne
from scipy.stats import zscore
import matplotlib.pyplot as plt
import seaborn as sns
import pymc as pm
import aesara.tensor as at
import... |
79a073b3641c66c5ac7239050061d0e63c4d4c105b2e3a7781f07bea2ca742f2 | Jupyter | 17,377 | 349 | # %%
import os
os.environ["OMP_NUM_THREADS"] = "1"
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import patches
from scipy.stats import mannwhitneyu
from statsmodels.stats.multitest import multipletests
from analysis_utils import *
# %% [markdown]
# ### Regions
# %%
D = 11
T = 80
target = "rest"
... |
3a78dab5dd6c854ff750a142750a52ac9693448b181b65eb8542ccdc1ed2dd74 | Jupyter | 17,488 | 507 | # %%
#I would like to dissect better the Neurons cluster..
# %%
adata = sc.read_h5ad('02_Results/CSTB_annotated_09.h5ad')
# %%
adata
# %%
sc.pl.umap(adata, color=['DSCAM','type'], show=False,vmax=0.5,frameon=False, legend_loc='right margin', legend_fontsize=12, wspace=0.1)
# %%
adata.obs['annotated'].value_counts()... |
6d3cf6a2a0032945656af9cf8edba13f7e17a688698bab41ee75b9de209105fd | Jupyter | 17,531 | 488 | # %%
import os
# https://allensdk.readthedocs.io/en/latest/visual_coding_neuropixels.html#
#https://allensdk.readthedocs.io/en/latest/_static/examples/nb/ecephys_quickstart.html
from ipywidgets import FloatProgress
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import pickle
from allensdk.brain_... |
df859ccb4373be0ba67aced1510d22b0a84ee22563bcaa5b2d459747924b9336 | Jupyter | 17,541 | 458 | # %%
#default_exp plotting
# %%
#export
import numpy, scipy
import scipy.stats as st
import warnings
#Screw you seaborn and your updated API
# warnings.filterwarnings("ignore")
import seaborn
from matplotlib import pyplot
try:
import logomaker
except:
pass
import json
import pandas as pd
from spliceformats.w... |
c5f5a0fec87ba791828010304a8b9e6da55ac3e96fc42bac5e613554e79d250d | Jupyter | 17,812 | 571 | # %% [markdown]
# # Interpretability with Monte Carlo Tree search
#
# Based on the paper Jin et al., [Multi-Objective Molecule Generation using Interpretable Substructures](https://arxiv.org/abs/2002.03244) and modified from Chemprop v1 [interpret.py](https://github.com/chemprop/chemprop/blob/master/chemprop/interpret... |
7d49c8d5e4a0d91a5a266484fdadb7b721f7bd73f5752a4a8f27c45783562535 | Jupyter | 17,902 | 554 | # %%
from neurodsp.spectral import compute_spectrum
from neurodsp.utils import create_times
from neurodsp.plts.spectral import plot_power_spectra
import pingouin as pg
from fooof import FOOOFGroup
from natsort import natsorted
from os import listdir
from os.path import join
import numpy as np
import pandas as pd
imp... |
05687d4b9b3384f281c4978c7c1548972908f3ff5b4d2446974b8990bc86c2ce | Jupyter | 18,167 | 528 | # %%
import os
# https://allensdk.readthedocs.io/en/latest/visual_coding_neuropixels.html#
#https://allensdk.readthedocs.io/en/latest/_static/examples/nb/ecephys_quickstart.html
from ipywidgets import FloatProgress
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import pickle
from allensdk.brain_... |
b9323acea2aeb8469f9d9961b559cb1e3805a7b527968ea2db17d0d7e44ac2b0 | Jupyter | 19,271 | 635 | # %% [markdown]
# # PNG detections: Retention across pipeline stages
#
# Stage-wise retention of three-neuron PNGs through the HFB detection pipeline.
#
# **Pipeline stages**
#
# 1. Unconstrained (`hfb_unconstrained.db`): All detected triplet PNG candidates with layer structure `[L-1, L, L]` and synaptic connections... |
2244dd6aef1973d3b442d0feb002e33ad3ac6a3285882bd87c218390677997d7 | Jupyter | 19,575 | 378 | # %% [markdown]
# # Table of contents
# * [Before we start](#intro)
# - [Prerequisites](#prereq)
# - [About the notebook](#aboutnb)
# - [Test data](#testd)
# * [From build to launch](#fbtl)
# - [AIDAmri image build](#build)
# - [Create a container](#contcreate)
# - [(Re-)start the container](#co... |
5e63bb3e03b45496dcc9bb75051706202643f55c46a84600c24c87c8fa6890c3 | Jupyter | 19,638 | 294 | # %%
#default_exp commandline
# %% [markdown]
# # Commandline
#
# > Contains functions and classes for parsing KATMAP's command line scripts
# %%
#export
import sys
import os, argparse, sys, datetime
from os.path import abspath
import seaborn
from matplotlib import pyplot
import numpy, scipy
from katmap.utiliti... |
6433b18c03aa44e6db0c128a6ff78b2567a1661cbd2bcc56bae0c32992fcaf5d | Jupyter | 20,169 | 696 | # %%
#default_exp models.lm
# %% [markdown]
# # model.lm
#
# > A submodule containing classes and functions for computing the linear portion of the generalized additive models
# %%
#export
from jax import jit, grad, hessian
from jax import jit
import jax.numpy as jnp
import jax.scipy as jsc
from katmap.stats.binding... |
70c6dc6aee9a86e30d45b3d75f199a3fb83f7ac17c509d8c9dc74984199f8b0d | Jupyter | 20,290 | 456 | # %% [markdown]
# # TAPA tutorial — speaker diarization + phonetic analysis
#
# TAPA takes a recording (a file or a YouTube URL) and produces **per-speaker
# phonetic measurements**: vowel formants, stop voice-onset time (VOT), and
# fricative spectral moments.
#
# The pipeline runs six stages:
#
# | stage | what it... |
8b00320072d757a7b96a2a162a7b4faa72457266416ac5b7610dba96809e2db5 | Jupyter | 20,330 | 484 | # %%
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import scipy.stats as stats
import statsmodels
import scikit_posthocs as sp
import sys
import scipy
# %%
#monkey patching violion plot
import matplotlib as mpl
import warnings
from seaborn.categorical import _Categorica... |
272deca114a97d6123babe2de45b08e5106990de96304641e92807373e0dd6a1 | Jupyter | 20,375 | 484 | # %%
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import scipy.stats as stats
import statsmodels
import scikit_posthocs as sp
import sys
import scipy
# %%
#monkey patching violion plot
import matplotlib as mpl
import warnings
from seaborn.categorical import _Categorica... |
45c5150a64c4d85c138a043058867dc528868a32229316b6a8aacbab7041ffa1 | Jupyter | 20,382 | 487 | # %%
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import scipy.stats as stats
import statsmodels
import scikit_posthocs as sp
import sys
import scipy
import pymaid
import navis as nv
# %%
#monkey patching violion plot
import matplotlib as mpl
import warnings
from seabo... |
a7ed805fc8d5ce08c421f4c7df4f5ac6c825ddb2d718414b6ed18a361be4090d | Jupyter | 20,475 | 485 | # %%
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import scipy.stats as stats
import statsmodels
import scikit_posthocs as sp
import sys
import scipy
# %%
#monkey patching violion plot
import matplotlib as mpl
import warnings
from seaborn.categorical import _Categorica... |
5cf0b86262f21e7e8169e594afc0e23176be4114afebf25cdd19e511e3352eb9 | Jupyter | 20,514 | 487 | # %%
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import scipy.stats as stats
import statsmodels
import scikit_posthocs as sp
import sys
import scipy
import pymaid
import navis as nv
# %%
#monkey patching violion plot
import matplotlib as mpl
import warnings
from seabo... |
345ee1a6c6ecfb6d157d5f33c6e0cfc803494f72b843f604b76720b4024baa11 | Jupyter | 20,531 | 484 | # %%
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import scipy.stats as stats
import statsmodels
import scikit_posthocs as sp
import sys
import scipy
# %%
#monkey patching violion plot
import matplotlib as mpl
import warnings
from seaborn.categorical import _Categorica... |
7ad09c36dbd6d8dcd57da9c17853e8b28421b81091126595ca1e17f14e619c7a | Jupyter | 20,576 | 487 | # %%
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import scipy.stats as stats
import statsmodels
import scikit_posthocs as sp
import sys
import scipy
import pymaid
import navis as nv
# %%
#monkey patching violion plot
import matplotlib as mpl
import warnings
from seabo... |
2f20120f49d155f9795dbf2c9aa1e4a4499db1f4fdd58ec175f4196726d33f8c | Jupyter | 20,586 | 485 | # %%
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import scipy.stats as stats
import statsmodels
import scikit_posthocs as sp
import sys
import scipy
# %%
#monkey patching violion plot
import matplotlib as mpl
import warnings
from seaborn.categorical import _Categorica... |
8397f385550d7aaff8fb01cdd35c3dd210aa9ba90261133667ce38af4b3fda1a | Jupyter | 20,595 | 484 | # %%
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import scipy.stats as stats
import statsmodels
import scikit_posthocs as sp
import sys
import scipy
# %%
#monkey patching violion plot
import matplotlib as mpl
import warnings
from seaborn.categorical import _Categorica... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.