sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
146de24dae2062fc4cf3454f881aeae46fe9bd6b9e9373304467fdbd3bdc518e | Jupyter | 6,861 | 214 | # %% [markdown]
# ## Create annotation key file (YAML) for CWAS analyses
# %%
import yaml
import pandas as pd
import os, glob
# %%
# Specify the path to your YAML file
yaml_file_path = '/Users/yujinkim/Dropbox/CWAS_paper_WD/Data/raw_annotations/annotation_keys.yaml'
# Open the YAML file and load its content
with ope... |
ca919dde5f5e2d0e2aed2666ab7da449b1c594898fb29e319b81657354498733 | Jupyter | 6,866 | 244 | # %% [markdown]
# # Tablestore Demo
#
# This guide shows you how to directly use our `DocumentStore` abstraction backed by Tablestore. By putting nodes in the docstore, this allows you to define multiple indices over the same underlying docstore, instead of duplicating data across indices.
# %%
%pip install llama-ind... |
e58dbaa5bbbe533f370b5f22e03ae55fec470762bf965422b1cd8ff00cbc515b | Jupyter | 6,868 | 212 | # %% [markdown]
# # Optimization Framework using auto-diff to predict binding rates
# %% [markdown]
# ## Import the necessary modules
# %%
# make sure jupyter path is correct for loading local moudules
import sys
# path to steric_simulator module relative to notebook
sys.path.append("../../../")
import copy
# %%
fro... |
e459a26481ef305c35cc7e1590abd514097fddb4ebab3e7d17a08498f8317a8f | Jupyter | 6,881 | 176 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/azure_openai.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Azure AI model inference
#
# This notebook explai... |
a4a2e095bfd9c33def895a514d8c8770b2c407f4f7ff2d1dd4cb3f5583f0b647 | Jupyter | 6,884 | 209 | # %% [markdown]
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required... |
07c25f0c09291736eba7a3e970fd7f9d513434f5fa0d8c871ad2f8fb8dc8eb4e | Jupyter | 6,886 | 256 | # %%
import numpy as np
import matplotlib.pyplot as plt
from skimage.io import*
from scipy import ndimage as ndi
import napari
from skimage.morphology import*
from skimage.segmentation import*
from skimage.measure import*
import seaborn as sns
from sklearn.linear_model import LinearRegression
from sklearn.metrics impor... |
06735fae335de716d73100ed74d2b307545c4de595c706bea51b47a99e436967 | Jupyter | 6,925 | 209 | # %%
# -- coding: utf-8 --
import warnings
warnings.filterwarnings("ignore")
import sys
#sys.path.append('../')
sys.path.append('../../../run_came/')
from analysis_utils import ttest_plot_utils
from analysis_utils import homo_random_config as config
import os
if __name__ == '__main__':
cfg = config._C
#os.... |
5b0b08c80bd6ce89c6bfa654262354aac1c06f92eee08989bcecd3a3b2bf18c6 | Jupyter | 6,928 | 267 | # %% [markdown]
# # `Individual` models
# %%
# Sconda conda activate tensorflow2; cd /mnt/BioAdHoc/Groups/RaoLab/Edahi/Projects/09.TimeCourse5hmC/ForFerhatGit/FCDNN/results/deeplift_analysis/; python
# %%
%load_ext lab_black
# %%
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import json
from... |
acf3b8aa192b820b0eb6b7d9fecdaf041f9d71a9924f0fd0a4fe950e02c8e385 | Jupyter | 6,938 | 199 | # %% [markdown]
# # Tutorial 2 - Data organization inside Imaging+
# %%
import imagingplus as ip
# %% [markdown]
# **This notebook demonstrates the basics of how data is organized inside of a trial object.**
#
#
# %% [markdown]
# ## Importing data analysis objects
# The first step to begin using the data analysis ... |
de286c4f23e2d8da7db3ede8d0eb9f39d98060a79b4a57403a14c7f3f9c540c1 | Jupyter | 6,954 | 209 | # %%
# -- coding: utf-8 --
import warnings
warnings.filterwarnings("ignore")
import sys
#sys.path.append('../')
sys.path.append('../../../run_came/')
from analysis_utils import ttest_plot_utils_origin
from analysis_utils import homo_random_config as config
import os
if __name__ == '__main__':
cfg = config._C
... |
8516594506c9c5c45b3127cf84951b9c0af2138d3fc6da506ec99c2ec659dd43 | Jupyter | 6,964 | 147 | # %% [markdown]
# # Create a Custom Loss
#
# In this tutorial, we will go over `Loss` objects, how they can be declared and assigned, and how to build a custom `Loss`.
#
# Let's start by importing what we need.
# %%
import os
import sys
import numpy as np
import tensorflow as tf
from IPython import get_ipython
col... |
ed3c50443c4e6a701b401a9d28053cc3ad8b4bebf56e15a61e9960fafbc8418a | Jupyter | 6,976 | 169 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/evaluation/mt_bench_human_judgement.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Benchmarking LLM Evaluators On ... |
250650a25e9312b6c045228d3195e0f314701c457b71d7d1935a1c31155794fb | Jupyter | 7,000 | 237 | # %% [markdown]
# # Optimization Framework using auto-diff to predict binding rates
# %% [markdown]
# ## Import the necessary modules
# %%
# make sure jupyter path is correct for loading local moudules
import sys
# path to steric_simulator module relative to notebook
sys.path.append("../../")
import copy
from Kinetic... |
a81c4bf56e98b91dccb4983c45c53248e1065bf5ccbe5556242e11324d76cb95 | Jupyter | 7,003 | 130 | # %% [markdown]
# ## Build and Compose Conditioners
#
# ### Overview
# Protein design via Chroma is highly customizable and programmable. Our robust Conditioner framework enables automatic conditional sampling tailored to a diverse array of protein specifications. This can involve either restraints (which bias the dis... |
eae5186117c73e3a6a0eef281f78e6337c82a045c968727c0354baa78d638e18 | Jupyter | 7,005 | 186 | # %% [markdown]
# # Discord Thread Management
#
# This notebook walks through the process of managing documents that come from ever-updating data sources.
#
# In this example, we have a directory where the #issues-and-help channel on the LlamaIndex discord is dumped periodically. We want to ensure our index always ha... |
c6b023e48ead2c55663313035c2e504f7fc948e562af0b5ed2f4617ffed908d0 | Jupyter | 7,008 | 153 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/xinference_local_deployment.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Xorbits Inference
#
# In this demo... |
e00761e9490fb9c6d1e797e40d42a195b85f78d517475c923ddef88aac59d8bf | Jupyter | 7,010 | 237 | # %% [markdown]
# # Optimization Framework using auto-diff to predict binding rates
# %% [markdown]
# ## Import the necessary modules
# %%
# make sure jupyter path is correct for loading local moudules
import sys
# path to steric_simulator module relative to notebook
sys.path.append("../../")
import copy
from Kinetic... |
f68f04c4314173c66fc39de781a45bf5151cca478be464a0475127074a55287a | Jupyter | 7,015 | 190 | # %% [markdown]
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required... |
4fda7cd26872509b4d7a2cf90f0025fac4df19177ad9327765de1894e4f29dc6 | Jupyter | 7,022 | 225 | # %%
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import scanpy as sc
import json
# %%
df_high = pd.read_csv("high_manifest_all.csv", index_col=0)
df_low = pd.read_csv("low_manifest_all.csv", index_col=0)
# %%
print(df_high.shape[0], df_low.shape[0])
# %%
df_... |
90cebd998174f4c48acd654f40c5ffdad7e19231d367a1db4a3d3a91e94795d8 | Jupyter | 7,024 | 181 | # %% [markdown]
# ## Plotting relative free energy results from example csv file
# #### The example.csv file contains both the experimental absolute free energies, and the calculated relative free energies for a set of ligands.
# %%
import numpy as np
%matplotlib inline
import matplotlib.pylab as plt
from arsenic i... |
e9e7740b10f8ace8c78466417d0a884eae498a4be25b3ac8d27a65bce0050e5f | Jupyter | 7,041 | 147 | # %% [markdown]
# ## notebook 04a2: quantifying condition and individuality effect in accuracy
#
# We quantify the effect from 0 to 3 objetcs, and separately from 3 to 99 objects, by plotting the differences in median individual position errors.
# %%
# importing python packages
import numpy as np
import pandas as pd
... |
4528bf1c9821637b6fbf09b5532759945933c69b21a10a862121f13d49054ab1 | Jupyter | 7,044 | 227 | # %% [markdown]
# # Reducing Multi-Turn Confusion with LlamaIndex Memory
#
# [Recent research](https://arxiv.org/abs/2505.06120) has shown the performance of an LLM significantly degrades given multi-turn conversations.
#
# To help avoid this, we can implement a custom short-term and long-term memory in LlamaIndex to... |
84cdb7d35ae097d824d6361732c4200b8b13812a28327250684021c8104b4d3d | Jupyter | 7,046 | 160 | # %%
from brian2 import *
from scipy.io import savemat
import matplotlib.pyplot as plt
import numpy as np
import random
for loop in range(1,11):
start_scope()
################################################################################
# Model parameters
#############################################... |
ffc807649eae1ca201c995db595ed4933ce68828dae3a0ac9241c1d9dd4644e4 | Jupyter | 7,054 | 209 | # %% [markdown]
# # Chroma Tutorial
#
# First, run the [setup cell](#setup) below. Then, run [this cell](#unconditional-chain) to get a Chroma sample. Further examples are below.
# %%
# @title Setup
# @markdown [Get your API key here](https://chroma-weights.generatebiomedicines.com) and enter it below before running... |
b8d32d92965bf281f77de8f482f0d3d8952d7e41c572ef371ca97f29de3eb0a1 | Jupyter | 7,062 | 202 | # %%
import numpy as np
import h5py
import os
import glob
import random
import umap
import umap.plot
import matplotlib.pyplot as plt
import matplotlib as mpl
# %% [markdown]
# ## Indices
# Only load subsequences not being "gap subsequences", subsequences entirely made up Ns, or flagged subsequences. Therefore the thos... |
ce130c8ebcad335707cbd7f7547ad59e01dc05c76429c60e80da276249f2a459 | Jupyter | 7,068 | 246 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/metadata_extraction/MetadataExtraction_LLMSurvey.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Automated Metadata... |
e744ca1c5df013f443221a74d4d539744ba2bc15a4760bd3899dff34f9cdb491 | Jupyter | 7,073 | 233 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/multi_modal/anthropic_multi_modal.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
#
# # Multi-Modal LLM using Anthropic model for image... |
745c14fbef2a19f9804ae95b3461221ca9148a2a8b8031f6e72fc2acb3fe7330 | Jupyter | 7,090 | 186 | # %%
import matplotlib.pyplot as plt
import seaborn as sns
import wandb
# %%
api = wandb.Api()
# %%
sweep = api.sweep("dive-ci/Invariant_Phy/8cnq0za9")
# %%
finished_runs = [run for run in sweep.runs if run.state == "finished"]
# %%
finished_runs
# %%
finished_runs[0].config
# %%
finished_runs[0].summary
# %%
f... |
8b793fd492e3ba2dded5fa97791768efc40f6c9b3047483315ece8c0304e64ba | Jupyter | 7,111 | 185 | # %% [markdown]
# <a href="https://colab.research.google.com/github/nerfstudio-project/nerfstudio/blob/tancik%2Fpolycam/colab/demo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# <p align="center">
# <picture>
# <source med... |
2facaa3d776bef0d0d2851d0363a64bedddb0378eee9e4184f4a4b37166e2cf3 | Jupyter | 7,137 | 252 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/evaluation/Deepeval.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # 🚀 DeepEval - Open Source Evals with Tracing
# ... |
4207987ae9a83c511b1874ff5daff21c84bc647ce05c5470a8fdddddcd5de34d | Jupyter | 7,148 | 237 | # %%
import os
import matplotlib.pyplot as plt
import numpy as np
from tensorflow.keras.applications import VGG19
from tensorflow.keras.applications.vgg19 import preprocess_input, decode_predictions
from skimage.io import imread
from skimage.transform import resize
from explainability import LRP, LRPStrategy
data = ... |
2aa2f5514ce080663db2d029a923158ac6584aab3d27321f3f190c160265d857 | Jupyter | 7,151 | 254 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/multi_modal/image_to_image_retrieval.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
#
# # Image to Image Retrieval using CLIP embeddin... |
4a367ec659b9e7865b9f96214394745b297c36ace4fbe58334145545fc8f5b91 | Jupyter | 7,157 | 199 | # %% [markdown]
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required... |
1689981d983d6b87dea1d6d21cf94a8b2bf3f5981fc7ad11e46319b035afa462 | Jupyter | 7,163 | 185 | # %% [markdown]
# # Ray Samplers
#
# ## Overview
#
# Once we have a set of cameras, we want to cast camera rays associated with each pixel.
#
# Along these ray we will sample the _field_ and aggregate the samples to predict the pixels value (ie. color). The parameterization of the samples are described [here](./vis... |
4d24ce6bcd3ce3d2db4fb5eebb6b1ec61dda6d3a394a54498e8a8145cf90d50c | Jupyter | 7,168 | 196 | # %%
from pathlib import Path
import numpy as np
import importlib
from matplotlib import pyplot as plt
import humanize
import sys
import os, psutil
import time
import shutil
import pandas as pd
import seaborn as sns
import warnings
from sklearn.metrics import ConfusionMatrixDisplay, confusion_matrix
import logging
impo... |
0040b57a43afdb1dc89c24cfcd91ae114bb98314eed1e65f08086a778a4af616 | Jupyter | 7,182 | 200 | # %% [markdown]
# # Differential Expression with limma-voom pipeline
# %%
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(dplyr)
library(limma)
library(edgeR)
library(here)
library(sva)
})
# %% [markdown]
# ## Functions
# %% [markdown]
# ### Simple functions
# %%
save_... |
8b613c2b0b9f64843f2c0a194b46538b9f8f22a3ece30b30b4d17c0f2a118e55 | Jupyter | 7,190 | 188 | # %% [markdown]
# # <font color='firebrick'><center>Report for Fragment Library Type</center> </font>
#
# This page contains the library fragment type information that is generated using a cgat specific tool. This information can be required for a number of downstream processes such as running featurecounts for RNA-s... |
0be6353de6de9a3ebb19ba964914829db071b28a796fdb2894778c5c907a51e2 | Jupyter | 7,195 | 144 | # %% [markdown]
# ## notebook 04: quantifying condition and individuality effect
#
# We quantify the effect from 0 to 3 objetcs, and separately from 3 to 99 objects, by plotting the differences in median individual position errors.
# %%
# importing python packages
import numpy as np
import pandas as pd
from matplotli... |
9be9c02d81d43ddee8ed55afa5583fc96af5d02c0355e74adc3db9883c6c06f6 | Jupyter | 7,195 | 210 | # %% [markdown]
# <a href="https://colab.research.google.com/github/arneschneuing/DiffSBDD/blob/main/colab/DiffSBDD.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # DiffSBDD: Structure-based Drug Design with Equivariant Diffusion ... |
ccb2b4698e96458a03101e721a802d38b70caaf6020f72d31ee1e434856ecd17 | Jupyter | 7,195 | 249 | # %%
import tensorflow as tf
import numpy as np
import pandas as pd
import anndata as ad
# %% [markdown]
# ## Load training data
# %%
## Load simulated pseudo-bulk dataset and labels.
## Pseudo-bulk GEPs were generated by using `simulate` function from Scaden
y = ad.read_h5ad('C:/Users/yw_ji/Documents/MSc Thesis/DATA... |
dcf648cb89f54359eca7f857d250dbffd22c02c99f7ac78222dabe501fbb0292 | Jupyter | 7,228 | 201 | # %% [markdown]
# # Differential Expression with limma-voom pipeline
# %%
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(dplyr)
library(limma)
library(edgeR)
library(here)
library(sva)
})
# %% [markdown]
# ## Functions
# %% [markdown]
# ### Simple functions
# %%
save_... |
db5e47552c250bc6beeea26d91bbb543b6a15d0900ef8a35a951a64233c018bc | Jupyter | 7,251 | 204 | # %% [markdown]
# # Generate coef overlay for tract mapping
# %% [markdown]
# - Project: HCP-EP
# - File Name: Generate_overlay
# - Author: Haley Wang
# - Date Created: 2023-08-07
# - Last Modified: 2023-08-08
# - Code Status: TESTING
# %%
from pathlib import Path
import h5py
import os
impor... |
551a6a6c0fff8f25e47dbea18de30852eb01458c20835a729ae9a35124b4c6ab | Jupyter | 7,257 | 239 | # %%
# make sure jupyter path is correct for loading local moudules
import sys
# path to steric_simulator module relative to notebook
sys.path.append("../../../")
import copy
# %%
from KineticAssembly_AD import ReactionNetwork, VectorizedRxnNet, VecSim, Optimizer, EquilibriumSolver,OptimizerExp
import networkx as nx
i... |
607ce6fb284d9eb38ba820ab4e2946578f5c66fa0dfbd4a597479fb6ee51627c | Jupyter | 7,265 | 229 | # %%
import torch
import h5py
import os
import sys
direc = "/mnt/data/shared/jacob/GFNO"
os.chdir(direc)
sys.path.append(direc)
from models.FNO import FNO2d, FNO3d
from models.GFNO import GFNO2d, GFNO3d
from models.Unet import Unet_Rot_M, Unet_Rot_3D
from models.radialNO import radialNO2d, radialNO3d
from utils import... |
92a52ff19a9ace34de1289fbdf43c29c2a6aefd7cdb0ce8559d6039301c11650 | Jupyter | 7,285 | 244 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/multi_modal/ChromaMultiModalDemo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Chroma Multi-Modal Demo with Llama... |
82d5d14ddbee917e1d23430951394f260691260eb59ca3c4398d8a7b0ce88074 | Jupyter | 7,309 | 205 | # %% [markdown]
# - Prepare input for FitHiC2
# - Run FitHiC2
# - Filter results
# %%
import pandas as pd
import numpy as np
import cooler
import bioframe as bf
import utils
# %% [markdown]
# # Input data to run this notebook
# %%
"""In this notebook we use our Hi-C data combined with Hi-C
from Hu et al., 2021: htt... |
b9c72e62b3d67a8635ad5c174d2bc207b8580203a5307d3a4b28c8791b4e337a | Jupyter | 7,313 | 209 | # %%
import os
from docx import Document
from docx.shared import Inches
m_lens = ['0.5hrs', '1hrs', '1.5hrs', '2hrs', '2.5hrs']
RESULT_PATH = './results/9th_run/'
MODEL = 'mcdcnn'
relevant_files = ['tst-types-hist.png', 'tst-predictions-types.png', 'conf-matrix.png', 'conf-graph.png']
models = ['mcdcnn', 'inception'... |
97cf371cb8408d9896ae4c00e2f02949d35ad14720df76458c9e35e5d0840a5a | Jupyter | 7,315 | 230 | # %% [markdown]
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required... |
019c98864e3f06baf1347eea52938713b5545b956bf7c19f40a79083406f1bb9 | Jupyter | 7,316 | 245 | # %% [markdown]
# # Determine only kon from observed yield vs time data #
# %% [markdown]
# ## Import necessary modules ##
# %%
# make sure jupyter path is correct for loading local moudules
import sys
# path to steric_simulator module relative to notebook
sys.path.append("/home/adip/mjohn218_KineticAssembly")
import... |
177fcad0eec21a365569ff5afad367bd6908be4054a327065ac8e82eabebb3eb | Jupyter | 7,334 | 263 | # %% [markdown]
# # Feature summary of differential expression analysis
# %%
import numpy as np
import pandas as pd
# %%
def annotate_DE(feature):
# Annotate DE results
df = pd.read_csv(f'../../_m/{feature.lower()}s/diffExpr_maleVfemale_full.txt',
sep='\t', index_col=0)\
.rena... |
dfa9e6eada8898b963594b56e5daa46a5ba789e3dde53d21c3949306564e67f4 | Jupyter | 7,340 | 263 | # %% [markdown]
# # Feature summary of differential expression analysis
# %%
import numpy as np
import pandas as pd
# %%
def annotate_DE(feature):
# Annotate DE results
df = pd.read_csv(f'../../_m/{feature.lower()}s/diffExpr_maleVfemale_full.txt',
sep='\t', index_col=0)\
.rena... |
20e42dee8a42fb01dce852be92607c8704ad83d223f396130630b6e0118eaf54 | Jupyter | 7,344 | 232 | # %%
import datetime
def printbar():
nowtime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
print("\n"+"="*8 + "%s"%nowtime)
printbar()
# %% [markdown]
# ### Load data
# %%
import numpy as np
no_smoker_cpmgpr1d = np.load(r'MTBLS374_nosmoker_cpmgpr1d.npy')
smoker_cpmgpr1d = np.load(r'MTBLS374_smoker_... |
cfb731582dad8c582f87dec425b18513c7380f1cba6ddec7ddb43a4262f6f044 | Jupyter | 7,344 | 260 | # %% [markdown]
# # 2D QLIPP Simulation and Reconstruction Demo
#
# This notebook demonstrates forward simulation and reconstruction for Quantitative Label-free Imaging with Phase and Polarization (QLIPP).
# The simulation and reconstruction are based on the QLIPP paper ([here](https://elifesciences.org/articles/55502... |
df3a12cfaacfae9ad1791bbebddf2d80f4d9e045706fc1104cd4afea3b9cddc6 | Jupyter | 7,346 | 216 | # %%
########## import ##########
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
from tfdone import done
print('successfully imported')
# %%
########## backbone model ##########
# ** NOTE **
# I recommend using Vision Transformer (ViT) as a backbone model for DONE,
# but for simplicity I he... |
a24e79c979b879f41ebfbd038f05122fd290c54bb439d4d4c42f4b42322986b7 | Jupyter | 7,352 | 263 | # %% [markdown]
# # Feature summary of differential expression analysis
# %%
import numpy as np
import pandas as pd
# %%
def annotate_DE(feature):
# Annotate DE results
df = pd.read_csv(f'../../_m/{feature.lower()}s/diffExpr_maleVfemale_full.txt',
sep='\t', index_col=0)\
.rena... |
aa79149c5749df467dd27244af8f8fe76ca77aa7bd3bc485817ff76fde6b7cac | Jupyter | 7,371 | 219 | # %%
pip install tfdone
# %%
########## import ##########
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
from tfdone import done
print('successfully imported')
# %%
########## backbone model ##########
# ** NOTE **
# I recommend using Vision Transformer (ViT) as a backbone model for DONE,
... |
ac183cd6c1deb20903a0f79e5688893b8faa0697703e75b4e797d3abbd4dfdd0 | Jupyter | 7,401 | 234 | # %%
import matplotlib.pyplot as plt
import numpy as np
from sklearn.metrics.pairwise import euclidean_distances
from sklearn.preprocessing import OneHotEncoder
from typing import Tuple
np.random.seed(42)
def generate_square(shape: Tuple[int] = (16, 16, 16)) -> np.ndarray:
img = np.zeros(shape)
corner = np.... |
e849740ace957c5b569e5da95374ff10642ce6c96b676eba15541bf326726a2d | Jupyter | 7,440 | 197 | # %% [markdown]
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required... |
6e2b10d610369ea7c325f22f75cabeb0f74c4db1c10bdcfb581cc4e5ea10b643 | Jupyter | 7,443 | 250 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/low_level/retrieval.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Building Retrieval from Scratch
#
# In this tu... |
16a449fe20d49c18279cf15ff9c7a5a6996a68de5f63a699d544fce63289dac9 | Jupyter | 7,460 | 209 | # %%
import polyfingerprints as pfp
import pandas as pd
import numpy as np
from wrapconfig import YAMLWrapConfig
import os
import shutil
import matplotlib.pyplot as plt
# %%
OUTDIR="out"
curated_csv = os.path.join(OUTDIR,"expanded_data.csv")
TARGET_VALUE="numerical_attr2"
# %%
# load curated dataset and info
df = pd... |
3312b195276ccc0e669aa265083b0fd39670df6875d0c95d3798fdc4cdaa380f | Jupyter | 7,467 | 235 | # %%
pip install ..
# %%
import hummuspy as hummus
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import networkx as nx
# %% [markdown]
# ### Load config file
# %%
config = hummus.config.open_config("../../../../HuMMuS/hummus_package/vignettes/test_multiplex_genes/config/config.yml")
# %%
hu... |
0d418b448c0a09b899ff3d0cd914e1d2e7dac54a96bbe83936a349b510f97e76 | Jupyter | 7,502 | 247 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/agent/openai_agent_context_retrieval.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Context-Augmented Function Cal... |
7b546cb3a2aa3495f916e6fd6ae535eb5af9ca5dca1888ce918eafae9c519962 | Jupyter | 7,513 | 228 | # %%
from pathlib import Path
import numpy as np
import importlib
from matplotlib import pyplot as plt
import humanize
import sys
import os, psutil
import time
import shutil
import pandas as pd
import seaborn as sns
import warnings
from sklearn.metrics import ConfusionMatrixDisplay, confusion_matrix
import logging
imp... |
fbe583642c4817453f4072164e702bad2750a1d724ce239e5e90f365682b333e | Jupyter | 7,520 | 255 | # %%
import os
import random
import numpy
import pandas
import matplotlib
from matplotlib import pyplot
import seaborn
import editdistance
import logomaker
# import nupack
# %%
%matplotlib inline
matplotlib.rcParams['figure.dpi'] = 120
matplotlib.rcParams['font.sans-serif'] = 'Helvetica'
pandas.set_option('display.... |
560478a7d8586f64ae25551c410cf16345a817d2873728634e33baa50d809e46 | Jupyter | 7,578 | 241 | # %% [markdown]
# # Demo: compressive Ratio 8:1
#
# This notebook provides a guide on using a pre-trained model to reconstruct the original images from their compressed versions.
# %% [markdown]
# # libs
# %%
import numpy as np
import matplotlib.pyplot as plt
from tqdm.notebook import trange, tqdm
from mpl_toolkits... |
75eb3d6d4fa4f0279a3d4e76dea8539de1635e0ae027f67ad92985c393a082a1 | Jupyter | 7,596 | 263 | # %% [markdown]
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required... |
e79d90cdee11df7d4b376e313808b4e4ff01ca63ffdb7a897939db40d62af2be | Jupyter | 7,598 | 247 | # %%
import matplotlib.pyplot as plt
import numpy as np
from sklearn.metrics.pairwise import euclidean_distances
from sklearn.preprocessing import OneHotEncoder
from typing import Tuple
np.random.seed(42)
def generate_square(shape: Tuple[int] = (16, 16, 16)) -> np.ndarray:
img = np.zeros(shape)
corner = np.... |
12dbcf787e703ac24ee6b5a111a790ad410199fb6c9f07d46b01925b3e9719ba | Jupyter | 7,627 | 229 | # %% [markdown]
# ## Project Information
#
#
# **Author/Developer:**
# - Alexandra Fischbach
# - Contact: fischbach.a@northeastern.edu
# - Affiliation: Northeastern University
#
# **Example Data Source for this Notebook:**
# - Data is available on the OpenNeuro database (OpenNeuro Dataset, ds005747, version 1.2.1) ... |
0a561c6455286c5f2fdbd83b8e205866fc11dbdb85721e03a3f8a9cb88d746a7 | Jupyter | 7,629 | 235 | # %% [markdown]
# # Calculate RXE for public dataset, females only based on Apua's script
# %%
import re
import functools
import numpy as np
import pandas as pd
from os import environ
from plotnine import *
from scipy.stats import variation
from warnings import filterwarnings
from scipy.stats import mannwhitneyu
from ... |
dcb90cc67abf2fc6cc002358c51fd271ae2110b46d81736fac6fd6fa959fe4da | Jupyter | 7,698 | 259 | # %% [markdown]
# # Imports & load data
# %%
from rdkit import Chem
import numpy as np
import os
import sys
import tarfile
from collections import Counter
import matplotlib.pyplot as plt
params = {'text.usetex': True,
'text.latex.unicode': True,
'mathtext.fontset': 'stixsans'}
plt.rcParams.update... |
a91fa16aa4be9b1d9b79c3a75a0084fac0bf989de66811239530512be4f253f1 | Jupyter | 7,720 | 139 | # %%
setwd("..")
# %%
source("Source/functions.R")
library("data.table")
library("VennDiagram")
library("ggplot2")
library("pheatmap")
library("ape")
# %%
chrmproperties <- fread(file = "Report/artifact/chrmbases_properties.csv.gz")
support_byposmut <- fread(file = "Report/SNVs/filter/basediffperc_cutdemux_sub500k_q3... |
5884bbccac5bbba63e9cfa5830eb358302812adf607d5e50b42b15986099ee91 | Jupyter | 7,728 | 204 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llama_dataset/uploading_llama_dataset.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Contributing a LlamaDataset T... |
94c182dd5289d45ceebeb49ab0e7e613af74242876373a3abdeb9d93710102dd | Jupyter | 7,732 | 221 | # %% [markdown]
# # Observability with Arize Phoenix - Tracing and Evaluating a LlamaIndex Application
#
# LlamaIndex provides high-level APIs that enable users to build powerful applications in a few lines of code. However, it can be challenging to understand what is going on under the hood and to pinpoint the cause ... |
d6ac18897a79e44949ec1062095c19a00143d99af2a1b54f2456e142d0604c44 | Jupyter | 7,741 | 328 | # %% [markdown]
# # Llama3 Cookbook
#
# Meta developed and released the Meta [Llama 3](https://ai.meta.com/blog/meta-llama-3/) family of large language models (LLMs), a collection of pretrained and instruction tuned generative text models in 8 and 70B sizes. The Llama 3 instruction tuned models are optimized for dialo... |
a77ccf33c5e21f292eb2bd95fa41e2046ded70a60b65742b218a13ba97751ac9 | Jupyter | 7,742 | 231 | # %% [markdown]
# [](https://colab.research.google.com/drive/1r5MH4aIzxT4cNOrEetH0ZvyTTY0UQRNP)
# %% [markdown]
# ## AIMon's LlamaIndex Extension for LLM Response Evaluation
#
# This notebook introduces AIMon's evaluators for the LlamaIndex fra... |
20748ea95870eb1c7b99ebba6635f5bb1179537cf9b53baed0f04a839c67954e | Jupyter | 7,759 | 160 | # %%
#matplotlib inline
from neuromaps.datasets import fetch_fsaverage
fetch_fsaverage(density='164k', url=None, data_dir=None, verbose=1)
# %%
from neuromaps.datasets import available_annotations
for annotation in available_annotations():
print(annotation)
# %%
from neuromaps.datasets import fetch_annotation
f... |
eb56a9d5a138d172dba86d58d4fc0acce5cfbf4281fe9047ac6e01b9f905e2a6 | Jupyter | 7,804 | 253 | # %% [markdown]
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required... |
dce1abd0721eabb45f47bb1a260332093710cb14fab0d86496bd55588fd0a7ac | Jupyter | 7,837 | 228 | # %% [markdown]
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required... |
6b061f2cd6c6ac04a4860ab1fd0e9dde8135e2209f1f935fefe78a530b4d2ad4 | Jupyter | 7,853 | 315 | # %% [markdown]
# # Nebula Graph Store
# %%
%pip install llama-index-llms-openai
%pip install llama-index-embeddings-openai
%pip install llama-index-graph-stores-nebula
%pip install llama-index-llms-azure-openai
# %%
# For OpenAI
import os
os.environ["OPENAI_API_KEY"] = "INSERT OPENAI KEY"
import logging
import sy... |
29372f42a05b129a2010536bdac54a84935298a926b90a9f7740aa9ada35d5d3 | Jupyter | 7,862 | 213 | # %%
%matplotlib agg
import copy
from utils.model import model_names_eps30, model_names_logr
from utils.ml import MLPNetwork, MOVotingRegressor
from utils.log import auto_log
from utils.vis_shap import summary_legacy
import shap
from shap.plots import colors
import pandas as pd
import numpy as np
import tensorflow a... |
85f171847521e4359d2acfff8203779bd5bd1caa7fc20023e846a8a911cb7ef8 | Jupyter | 7,867 | 178 | # %%
import numpy as np
import nibabel as nib
import matplotlib.pyplot as plt
import nilearn.plotting as niplt
%matplotlib inline
import os
# %%
black_subs=['sub-300', 'sub-304', 'sub-293', 'sub-273', 'sub-265', 'sub-307', 'sub-283', 'sub-275',
'sub-291', 'sub-297', 'sub-303', 'sub-294', 'sub-286', 'sub-282', 'sub... |
9f906119c304bafc39ea8c42b47bfc919e0b18cb037ada90adbc9298d91e8a76 | Jupyter | 7,883 | 272 | # %% [markdown]
# [](https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/cookbooks/mongodb_retrieval_strategies.ipynb)
#
# [](https://www.mongodb... |
47781da8679c6b39dc0841ea4213833b09ffdbb8b29dfc60c809017e64d649cb | Jupyter | 7,888 | 250 | # %% [markdown]
# # RNA Velocity and Metastability
#
# One biologically-challenged assumption about application of traditional RNA velcoity:
#
# The scale of RNA splicing/unsplicing dynamics is within hours, while in many scRNA-seq datasets, the underlying time scale of cell development is within days.
#
# **Intuiti... |
30c5f847a54e2c48436e9692a0920c1117855daec689b71886b87a79e5abefa3 | Jupyter | 7,910 | 273 | # %%
# make sure jupyter path is correct for loading local moudules
import sys
# path to steric_simulator module relative to notebook
sys.path.append("../../../")
import copy
from KineticAssembly_AD import ReactionNetwork, VectorizedRxnNet, VecSim, Optimizer, EquilibriumSolver
import networkx as nx
import torch
from to... |
c0ea3fb06850f8418c1e2da30c7dbe7142957918b9530e07cbb615f9cc991b10 | Jupyter | 7,912 | 314 | # %% [markdown]
# # Multi-Modal RAG System
#
# In this notebook we will demonstrate the following:
#
# 1. Querying images with a Multi-Modal LLM.
# 2. Buidling a Multi-Modal RAG System.
# %% [markdown]
# ## Installation
# %%
!pip install llama-index-multi-modal-llms-openai
!pip install llama-index-vector-stores-qdr... |
01e0bf6f109a11fb6c5af84cd7ca5a0a4726c5d6c8d5431f0c757c51bf64c12c | Jupyter | 7,931 | 210 | # %%
# 1st Cell
import polyfingerprints as pfp
import pandas as pd
import numpy as np
from wrapconfig import YAMLWrapConfig
import os
import shutil
import matplotlib.pyplot as plt
# %%
# 2nd Cell: load curated dataset and info
OUTDIR="out"
curated_csv = os.path.join(OUTDIR,"expanded_data.csv")
df = pd.read_csv(curat... |
0cf48e3a304a5aeb1dd3a2517e4725626db9f665a1c0553d947289675543a3ca | Jupyter | 7,980 | 231 | # %% [markdown]
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required... |
19a8cdf594554773bec157002aed098a852f0d8f1bdd36a5bae69564ccaee3f2 | Jupyter | 7,986 | 237 | # %% [markdown]
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required... |
47563b466206ee488eed9e2195338de18fc447eab4a0cc6d3a394bdd70883925 | Jupyter | 7,990 | 198 | # %% [markdown]
# ## Import necessary modules
#
# Every Jupyter Notebook requires the path to the KineticAssembly_AD modules (.py files in the root directory) to be mentioned. This can be done by adding the path to the 'PATH' variable of the system environment.
#
# Additonal modules are also imported which are requi... |
8f70c9f8871c1e9c4b83d3b95a5c516928a9aa72f4126ece57f88d48214b6cb5 | Jupyter | 7,990 | 251 | # %% [markdown]
# # Prebuilt CodeAct Agent w/ LlamaIndex
#
# LlamaIndex offers a prebuilt CodeAct Agent that can be used to write and execute code, inspired by the original [CodeAct paper](https://arxiv.org/abs/2402.01030).
#
# With this agent, you provide an agent with a set of functions, and the agent will write co... |
ee90704a79867350390ad545931f9250a1d3df794017f2e8a8f2796c05021995 | Jupyter | 8,001 | 281 | # %%
# make sure jupyter path is correct for loading local moudules
import sys
# path to steric_simulator module relative to notebook
sys.path.append("../../../")
import copy
from KineticAssembly_AD import ReactionNetwork, VectorizedRxnNet, VecSim, Optimizer, EquilibriumSolver
import networkx as nx
import torch
from to... |
6d8f18ca97077b7bf10e34ad601ab809073e844d81d32d44b9b636f21434db90 | Jupyter | 8,004 | 312 | # %%
import numpy
import matplotlib
from matplotlib import pyplot
import pickle
import pandas
import scipy
import seaborn
import tensorflow
from sklearn import preprocessing
import tensorflow.keras
from tensorflow.keras.preprocessing import sequence
from tensorflow.keras.optimizers import RMSprop
from tensorflow.kera... |
8eff72d7bb0c4c3aeeded1b8607784584c1eb9fdd282c390b446f257ec24e7ab | Jupyter | 8,018 | 197 | # %% [markdown]
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required... |
b4d10056049dee72551ed682af102d028e34014acd0ce183ff2f37d5fbfcb352 | Jupyter | 8,060 | 224 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/agent/openai_agent_query_plan.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # OpenAI Agent Workarounds for Lengthy ... |
0b67393b8f10de87c18014b57021d62b0eccd49d927fa9c18ca623138ad6c9f3 | Jupyter | 8,073 | 304 | # %%
import os
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import numpy as np
import random
import math
import copy
from torch.utils.data import DataLoader, Dataset, ConcatDataset
from torch.utils.data.dataset import Subset
from sklearn.model_selection import KFold
fr... |
178956b346345a920e7e4f87b7bae67564e418f8ce92294f2f78c476eaae70f7 | Jupyter | 8,078 | 250 | # %% [markdown]
# Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required... |
9e6145d2ad87bed339f451e54c4beaa10429cc638053eef9c5913f8d5cc0f0fe | Jupyter | 8,104 | 251 | # %%
import sys
import torch
print(f"Python version: {sys.version}, {sys.version_info} ")
print(f"Pytorch version: {torch.__version__} ")
# %%
!nvidia-smi
# %%
!wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-tiny.pt
# %%
!python detect.py --weights ./yolov7-tiny.pt --conf 0.25 --img-size 640... |
e72064615cd5b6064f736697cdeccc56c4474143634dae76bb1262e3a8a2789d | Jupyter | 8,113 | 224 | # %% [markdown]
# # NVIDIA NIMs
#
# The `llama-index-embeddings-nvidia` package contains LlamaIndex integrations building applications with models on
# NVIDIA NIM inference microservice. NIM supports models across domains like chat, embedding, and re-ranking models
# from the community as well as NVIDIA. These model... |
c7244110da9b3e16c12c6dfd7d90654a30d43d3c6915dc0ade75d4d3818ad6df | Jupyter | 8,132 | 230 | # %% [markdown]
# # Memory in LlamaIndex
#
# The `Memory` class in LlamaIndex is used to store and retrieve both short-term and long-term memory.
#
# You can use it on its own and orchestrate within a custom workflow, or use it within an existing agent.
#
# By default, short-term memory is represented as a FIFO queu... |
da7073f47df83037ba2b76322665d0c23366d1232825477f402b7552455417b6 | Jupyter | 8,166 | 313 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/cohereai.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # CohereAI Embeddings
#
# Cohere Embed is the fi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.