sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
4c40098c8823ee7e68960e5769a6baa7dd6694277a78ce8a2db483248f51f4bb | Jupyter | 2,746 | 88 | # %% [markdown]
# ## Vertical integration for paired datasets
#
# uniPort also involves a vertical integration method for paired-cell datasets. Here we use uniPort to integrates paired SNARE-seq CellLineMixture datasets from [GSE126074](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE126074).
# %%
import unipor... |
524a13203c847d5ac937a9fcf54466b4c9031450c163991e7f2d8463751386ec | Jupyter | 2,747 | 96 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/evaluation/QuestionGeneration.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # QuestionGeneration
#
# This notebook... |
e6fa6f32b5bb80e0db641c4298623bc698f92a8684b8c13545658de4618054bf | Jupyter | 2,750 | 52 | # %% [markdown]
# # Equilibrium Solver #
# The Equilibrium solver is designed to take a reaction network as input and solve for a correct equilibrium solution. It does this by writing the system as a system of equations. Solving these equations can give the expected concentrations of all species at Equilibrium.
#
# It... |
b50f91146ec86b2a4c2131f07dfb613efde4fd77e8da1569ec03be08fa3cf823 | Jupyter | 2,753 | 96 | # %% [markdown]
# # Quantitative Phase Imaging from Defocus Demo
#
# This notebook demonstrates reconstruction for Quantitative Phase Imaging (QPI) from defocus.
# The reconstruction is based on partially coherent optical diffraction tomography (ODT):
#
# J. M. Soto, J. A. Rodrigo, and T. Alieva, "Label-free quantita... |
1985d6c6067017f55227f996c8fa383f6bbd4a4427ac541fdf1106faf44ef750 | Jupyter | 2,758 | 81 | # %% [markdown]
# ## Predict scRNA-seq through MERFISH data
#
# uniPort trained an encoder network to project cells with common genes across datasets into a
# common cell-embedding latent space and a decoder network to reconstruct cells with common and
# specific genes. Therefore, once the coupled-VAE is trained well,... |
73a16dd510708d98c19e95f214b949e67c0aebcd53245e22a466aebfbed55478 | Jupyter | 2,761 | 93 | # %% [markdown]
# # Client of Baidu Intelligent Cloud's Qianfan LLM Platform
#
# Baidu Intelligent Cloud's Qianfan LLM Platform offers API services for all Baidu LLMs, such as ERNIE-3.5-8K and ERNIE-4.0-8K. It also provides a small number of open-source LLMs like Llama-2-70b-chat.
#
# Before using the chat client, yo... |
53531bb557f866beb8591bed0aa33c835fa8cf55d2a56bcc1b6ebca17d3cb838 | Jupyter | 2,775 | 107 | # %% [markdown]
# # Jina 8K Context Window Embeddings
#
# Here we show you how to use `jina-embeddings-v2` which support an 8k context length and is on-par with `text-embedding-ada-002`
# %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/jina_em... |
132520def3e74031bd92bd51edfe35dd6e094ef6507d1915a67fab127386805b | Jupyter | 2,779 | 106 | # %%
import numpy as np
import xarray as xr
import pandas as pd
from pathta import Study
from frites import set_mpl_style
from frites.conn import conn_links
from research.study.pblt import get_model, get_anat_table
from visbrain.utils import normalize
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
f... |
8595f1179a0bf530b6dff99d64756f7a887960c9838a62ed497681f2305fa812 | Jupyter | 2,780 | 115 | # %%
import pandas as pd
from scipy.stats import norm
import matplotlib.pyplot as plt
from sklearn.mixture import GaussianMixture
import os
import numpy as np
# %%
# read the Ginkgo CNV calls with empirical p-value generated from the last step
cnv_df = pd.read_pickle("STEP_7_out_CNV.pkl")
# %%
cnv_df.head()
# %%
cnv... |
6166d9c1145814a038f9a49c0f49f493063cafa5e916e2c2530982facc8c49fe | Jupyter | 2,788 | 61 | # %% [markdown]
# <a href="https://colab.research.google.com/drive/176IfpC2akqWOhDpVSnAA_eLEbzt4a5Fw?usp=sharing" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # PremAI Embeddings
#
# [PremAI](https://premai.io/) is an all-in-one platf... |
1cb6a5508b2aaea40ebdc0ffe4437a3f82c1223a844199e97a1982dcdecc0a9d | Jupyter | 2,789 | 99 | # %%
import torch
import os
os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
torch.set_default_tensor_type(torch.FloatTensor)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = torch.load('model_snnet_trained.pkl')
# %%
import numpy as np
noesypr1d_10 = np.load('MTBLS242_noesypr1d_10.npy')
noesypr... |
09b3c2ee3c753803f4e0440f5e429220b59ad3ea5c9812677ffc7a730669400a | Jupyter | 2,794 | 102 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/ollama_gemma.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Ollama - Gemma
# %% [markdown]
# ## Setup
# First... |
77d317a5fbbc5c07b6f3f710b00c9204ce0e9ed746a0c48025e067a247495e91 | Jupyter | 2,797 | 111 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/chat_engine/chat_engine_condense_question.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
#
# # Chat Engine - Condense... |
afaeaa1d53de38ad97e1bb3aa5ab428ed05354a8bd1ef06edaaef9c2aec97df1 | Jupyter | 2,802 | 71 | # %% [markdown]
# ## Preprocessing data of Markenscoff-Papadimitriou et al., Cell (2020)
# %%
import pandas as pd
import os, glob
from pybedtools import BedTool
# %%
pre = pd.read_excel("~/Dropbox/CWAS_paper_WD/Data/raw_annotations/Markenscoff-Papadimitriou_2020_TableS2.xlsx", sheet_name="S2A")
pre = pre.loc[pre['pre... |
329393dfb28e9640ffc1933f9cb09eae6e3d1eea67cb0c3fff62a02329b54d8d | Jupyter | 2,810 | 110 | # %% [markdown]
# # Examine overlaps with published data
# %%
import numpy as np
import pandas as pd
import session_info
from pyhere import here
# %% [markdown]
# ## Public si-eQTL analysis
# %%
shen = ["GDAP2", "AIM2", "SLAMF6", "RLF", "ATG4C", "FUT7",
"TMEM218", "C11orf74", "RAB35", "TMEM5", "HNRNPK",
... |
7e98c296565c4ca939129e904c6f77c44687c907fb548b97c5cca1eedf590964 | Jupyter | 2,812 | 103 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/data_connectors/OxylabsDemo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Oxylabs Reader
# %% [markdown]
# Use O... |
16add85e2873811713f5f8914e4c101df0171b4c475a6086c75d692fe6ab2436 | Jupyter | 2,824 | 78 | # %% [markdown]
# ### Tutorial 4 - NWB Conversion
# %% [markdown]
# Neurodata without borders (NWB) is the data standard that we employ for data storage, packaging and sharing. More information about the NWB project can be found here: https://pynwb.readthedocs.io/en/stable/index.html
# %% [markdown]
# We have created... |
d3233ac0e8f35ba79caa48e0b335e8d9a41637a66709e3019a9178ea4d4b943b | Jupyter | 2,832 | 110 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/customization/llms/SimpleIndexDemo-ChatGPT.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # ChatGPT
# %% [markdown]... |
dff78a7fafd45a5880742233b98278f5725e29f80edc1020dde841f819fc89b7 | Jupyter | 2,846 | 123 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/bedrock.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Bedrock
# %% [markdown]
# **Deprecated**: Use [llama-i... |
7fafbea5c9a04f5ef5e4da88fe74cf42206bdf5c96bbbbace69b0bc4efa09a53 | Jupyter | 2,847 | 89 | # %% [markdown]
# # Zyte Serp Reader
# %% [markdown]
# Zyte Serp Reader allows you to access the organic results from google search. Given a query string, it provides the URLs of the top search results and the text string associated with those.
# %%
# %pip install llama-index llama-index-readers-zyte-serp
# %% [mar... |
85944c845394d9416bcb193b73b55c18875f044eb69041c7449347d325cf9cd9 | Jupyter | 2,855 | 133 | # %%
!pip install --upgrade setuptools pip --user
!pip install --ignore-installed PyYAML
!pip install pycocotools>=2.0
# %%
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/ultralytics/y... |
ea97d45c430a0526d48570c5751dc80eee3419980ba500a9717946f5b74d41af | Jupyter | 2,857 | 116 | # %% [markdown]
# # Heroku LLM Managed Inference
#
# The `llama-index-llms-heroku` package contains LlamaIndex integrations for building applications with models on Heroku's Managed Inference platform. This integration allows you to easily connect to and use AI models deployed on Heroku's infrastructure.
# %% [markdo... |
3af881646eb9ad0af30e4b191cc9568a24965fc7e28f7cf6895239ac6a718cf0 | Jupyter | 2,861 | 80 | # %%
import os
import pandas as pd
import iFeatureOmegaCLI
import torch
import numpy as np
from torch_geometric.data import Data
import warnings
warnings.filterwarnings("ignore")
import pickle
from tqdm import tqdm
import multiprocessing
import logging
from torch_geometric.utils import add_self_loops
import contextlib
... |
b13a4078c84dddac4f3f56732ce692449d704b51046df88471a498239a80cb6b | Jupyter | 2,869 | 133 | # %%
!pip install --upgrade setuptools pip --user
!pip install --ignore-installed PyYAML
!pip install pycocotools>=2.0
# %%
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/ultralytics/y... |
efe78ac8b6036bde78f22941aad8152e26264b2f418e91a3265efb469b242744 | Jupyter | 2,870 | 102 | # %%
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
from polyfingerprints import models as pfp_models
import torch
# %%
OUTDIR="out"
BASEMODEL_DIR=os.path.join(OUTDIR,"models")
MODELNAME="test"
INFERXLS... |
31e80ca16c0e00085dce04cb96a20553dca84ae73cda62f9593fd87d724f4d6d | Jupyter | 2,874 | 111 | # %% [markdown]
# # Demo: Azure Table Storage as a ChatStore
#
# This guide shows you how to use our `AzureChatStore` abstraction which automatically persists chat histories to Azure Table Storage or CosmosDB.
#
# <a href="https://colab.research.google.com/drive/1b_0JuVwWSXiLZZjeBAPr-u5_Y9b34Zcp?usp=sharing" target="... |
1e545de6b8a43266c4ed28067299550de53ae107bd4be8302cadacc84d236343 | Jupyter | 2,896 | 82 | # %% [markdown]
# # Solving the case of protein interaction on the membrane
# In this problem we are trying to find concentrations of protain in time when the proteins are interacting on the membrane.
#
# The chemical equations we are dealing with are:
#
# $\ce{2A<->A2} \newline $
# $\ce{2A2<->A4} \newline $
# where ... |
25ceca9b358a788ad304e88daa9af227cf3763b033ed54a8b795c1c6e02fc818 | Jupyter | 2,896 | 89 | # %%
# Import libraries
import os
import re
import pandas as pd
import numpy as np
import seaborn as sms
from datetime import datetime, date, time
from natsort import natsorted
from scipy.io import loadmat # this is the SciPy module that loads mat-files
import matplotlib.pyplot as plt
plt.rcParams['svg.fonttype'] = 'n... |
678567a9db70f30353bb749593087681c6df4f332739bca2206f5e737df72c16 | Jupyter | 2,911 | 83 | # %% [markdown]
# # Integrate PDAC with scRNA
#
# uniPort can output a global optimal transport (OT) plan, i.e., a cell-cell correspondence matrix, that provides flexible transfer learning for deconvolution of spatial heterogeneous data using scRNA data in OT space, instead of embedding latent space.
# %%
import uni... |
899c17bfbbe632dc2e29753407e82b077016c99ae1a02ac195e3b61ba4abcab4 | Jupyter | 2,914 | 54 | # %% [markdown]
# Peakcalling Peak Stats
# ================================================================
#
# This notebook is for the analysis of outputs from the peakcalling pipeline relating to the quality of the peakcalling steps
#
# There are severals stats that you want collected and graphed - you can click o... |
c55bea0c6eeb9479e3cfa8550ffe50e2f01cf3fa77e60c457d9b8d8541f991e7 | Jupyter | 2,914 | 99 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/groq.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Groq
#
# Welcome to Groq! 🚀 At Groq, we've developed the... |
c37c5a8499c14ed313ec19378431d0650b68582c886b07f70c09a4afe1b78bb8 | Jupyter | 2,915 | 141 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/cohere.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Cohere
# %% [markdown]
# ## Basic Usage
# %% [markdown... |
45cf95713ab9857ebcae78e3c3c5076129e64fb7f09844423a49c083a1646117 | Jupyter | 2,917 | 98 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/gemini.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Google GenAI Embeddings
#
# Using Google's `goog... |
8243e1b5ede228b419c8edb61df7b6608d9aa9fde0a5cb1ec7668f2e8bb83885 | Jupyter | 2,931 | 87 | # %%
import os
import sys
import random
from os import path
import scipy
from skimage.filters import gaussian, threshold_otsu, threshold_triangle,threshold_mean,threshold_isodata,threshold_minimum
from skimage.filters import threshold_li
from skimage import measure
import matplotlib.pyplot as plt
import time
import mat... |
34f7689e2ad809c99d0ac989f7ac860d83ee9d8e64f5b4d8fa7e1b8aaa7bbb6b | Jupyter | 2,944 | 82 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/ingestion/parallel_execution_ingestion_pipeline.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Distributed Ingesti... |
d0ac2181a1a5cd34902fda0bd76e423d5a3845f53bad4f8ca458f720101ce932 | Jupyter | 2,952 | 80 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/customization/llms/AzureOpenAI.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Azure OpenAI
# %% [markdown]
# Azur... |
5144e92d6008675c67e3615513333a7231236ce4c43df85dcd34f7f6658cf588 | Jupyter | 2,956 | 112 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/customization/prompts/completion_prompts.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Completion Prompts Customi... |
a851656fb07a2bccd348824014d5b6e23744c68d91b50c71955cda7985515270 | Jupyter | 2,958 | 123 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/index_structs/knowledge_graph/FalkorDBGraphDemo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # FalkorDB Graph Stor... |
cdd1f66a32e8726b1eff675b502f36cd4a14caed4b0351e12ede6b8f5dd6f805 | Jupyter | 2,970 | 163 | # %%
import os
import cv2
import glob
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# %%
imgs = ['IMG_0348', 'P_20221017_150542', 'P_20221017_161510']
# %%
name = imgs[0] #'P_20221017_161510'#P_20221017_161510
fold = 6
folder = 'test'
# %%
folds_exp = {1: 'exp13', 6: 'exp14', 10: 'exp12'... |
f433655fb66560b588867929786efb254ab5de19925553836b5c06b33f904aa7 | Jupyter | 2,970 | 100 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/openvino.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Optimum Intel LLMs optimized with IPEX backend
#
# [O... |
a26f188f6cc584c93237ed2d3a1eba10d36f7f1692192a5957920e9e3acc4faa | Jupyter | 2,981 | 97 | # %%
require(clusterProfiler)
require(ggplot2)
require(org.Hs.eg.db)
# %%
packageVersion("clusterProfiler")
# %%
figdir = "figures"
# %% [markdown]
# # high
# %%
genelist <- read.csv("high_promoters_allCpGs.csv")[,"Promoter"]
# %%
length(genelist)
# %%
length(unique(genelist))
# %%
gene.df <- bitr(genelist, from... |
ad26a1371dab86395968263db67380fb88251b3c382015a7292e0651f431e71f | Jupyter | 2,987 | 74 | # %% [markdown]
# <div class="header">
# <img src="cgat_logo.jpeg" alt="logo" style="float:left;width:150px; height:150px"/>
# <img src="wimm.png" alt="logo" style="float:right;width:150px; height:140px"/>
# <center><b><font size="5" color='firebrick'>cgat BAMStats Report: for summarizing various information fro... |
0c95a9a7ff0c08b488075d25453db39cbc3efcb2a8588e7dac79c0e0c227b7cf | Jupyter | 2,999 | 98 | # %%
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
# %%
sc.set_figure_params(dpi=200)
# %%
with open('/data/projects/robin/cell_free/proteomics_WGCNA/module_genes.json') as handle: # '/data/projects/robin/cell_free/prot_f/module_... |
bac0e51df057bdeacfa5595656405a893cc6d3ecd6dd7efaa76ca61f028f5753 | Jupyter | 3,002 | 117 | # %%
import importlib
from matplotlib import pyplot as plt
import astrocast.reduction as red
import astrocast.clustering as clust
import astrocast.analysis as ana
import astrocast.autoencoders as AE
import astrocast.helper as helper
for pack in [red, clust, helper, ana, AE]:
importlib.reload(pack)
# %% [markdown... |
b1a12d850981f4ce7f33368a0c97efea9e9674dc0a4ebdc64f203aba0437cccc | Jupyter | 3,004 | 110 | # %% [markdown]
# # Docstore Demo
#
# This guide shows you how to directly use our `DocumentStore` abstraction. By putting nodes in the docstore, this allows you to define multiple indices over the same underlying docstore, instead of duplicating data across indices.
#
# <a href="https://colab.research.google.com/git... |
31b0e7fd470e991516c09e50d5a1f4a9440a2625fb5feac991749bd7b78d9a72 | Jupyter | 3,022 | 105 | # %% [markdown]
# ## Diagonal integration with contrastive learning
#
# A integration task is called diagonal integration if different modalities share no correspondence information, either among cells or features, e.g., scATAC peaks and scRNA genes, we can use label annotations as prior information to improve the per... |
d8a3e8756a8c829867ee516739a7edd73bc49ac9217629e7666326996b371372 | Jupyter | 3,046 | 118 | # %% [markdown]
# # Timelapse of timelapses and z-stacks
#
# This notebook shows how to repeatedly acquire a short time series and then a z stack at a set with a set delay in between.
#
# In this example we acquire a time series of `duration = 2` seconds and then a z stack parameterized by
# ```z_start = -2.5; z_end ... |
f91dcbd6d4b54473210a97beaa4d0043c7ead7e5b25d39a9638b46713ea2f164 | Jupyter | 3,063 | 136 | # %%
import pandas as pd
import numpy as np
import nbimporter
from functions import *
from numpy import *
import matplotlib.pyplot as plt
%matplotlib inline
import statistics
from sklearn.metrics import mean_squared_error
# %%
D7_dir='/home/mahdi/Desktop/data_selection_D7'
n,name=count(D7_dir)
# %%
out_dir='/home/ma... |
6f56f4087a76c6300b3040959a266413f51c5114b7b84d4720dc49176859f1bf | Jupyter | 3,065 | 111 | # %% [markdown]
# # Heroku LLM Managed Inference Embedding
#
# The `llama-index-embeddings-heroku` package contains LlamaIndex integrations for building applications with embeddings models on Heroku's Managed Inference platform. This integration allows you to easily connect to and use AI models deployed on Heroku's in... |
78ec33817ef6153544bf47f084efd9bf122007a9496b9d1a64e83d8030135105 | Jupyter | 3,067 | 109 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/customization/llms/SimpleIndexDemo-Huggingface_camel.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # HuggingFace LL... |
23c927bc4d2f30659b85e02326d2e2085a264d18bdfd1fe8cf8f84df6f367067 | Jupyter | 3,070 | 107 | # %%
import numpy as np
import pandas as pd
import torch
from pypots.utils.metrics.error import calc_mae, calc_rmse, calc_mre
import sys
sys.path.append("../scripts")
from utils import DataReader, SynDataset
from train import BTSTN
# %%
########################################
# Data
#################################... |
ccfe1c0e3e893c244cc20e23b07ca85c4e941011cf9c4b61411c1ff3959a2f00 | Jupyter | 3,087 | 65 | # %%
import torch
import scanpy as sc
import pandas as pd
import numpy as np
# read h5ad rna/seqfish data
device = torch.device('cuda:2')
adata_rna = sc.read_h5ad('/data/msyuan/Cross-omics-Annotator/SPANN_Package/sample_data/adata_rna.h5ad')
adata_seqfish = sc.read_h5ad('/data/msyuan/Cross-omics-Annotator/SPANN_Packag... |
f5323893fc624b30690e5062a7db31a4991968054c5cc76023237bade7dd0fdd | Jupyter | 3,091 | 129 | # %% [markdown]
# # Tutorial 4: Use SEDR to process Stereo-seq data
# %%
import numpy as np
import pandas as pd
import scanpy as sc
import matplotlib.pyplot as plt
import seaborn as sns
import os
from pathlib import Path
from tqdm import tqdm
import warnings
warnings.filterwarnings('ignore')
from scipy.sparse impor... |
31ebe8d9700ecb9ece6cdf0ff7d6df1d091e2f98be0eb64ecf6e817ac6c16201 | Jupyter | 3,123 | 87 | # %%
import os
import sys
import random
from os import path
import scipy
from skimage.filters import gaussian, threshold_otsu, threshold_triangle,threshold_mean,threshold_isodata,threshold_minimum
from skimage.filters import threshold_li
from skimage import measure
import matplotlib.pyplot as plt
import time
import mat... |
03906f661035e1463797e91814eba25d975b5eec578a86bdbb7404cc1fbacff8 | Jupyter | 3,125 | 95 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/sagemaker_embedding_endpoint.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Interacting with Embeddings... |
28881a08c56a07133746124a29a416aa8bead7f41a4ad724f855f5400ded0bcc | Jupyter | 3,139 | 93 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/sagemaker_embedding_endpoint.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Interacting with Embeddings... |
5898aad153448e9d6e1e62ff054408c4bc30a83b4b19db14052b0cc52df07460 | Jupyter | 3,162 | 103 | # %%
# 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... |
d5e2066f9d16be45ebb2dd52e8efba3f0ff3a078891adfae33b866533eeb984a | Jupyter | 3,177 | 128 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/chat_engine/chat_engine_context.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
#
# # Chat Engine - Context Mode
# %%... |
54647a9f32a36a06bd3bd387f1b7285eb346f0e85b1b91ed5bfab7379cf6fd5a | Jupyter | 3,179 | 122 | # %%
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
import pandas as pd
import seaborn as sns
import bioframe as bf
import cooler
import cooltools
import warnings
mpl.rc('lines', linewidth=0.4)
mpl.rc('font', family='Helvetica', size=8)
mpl.rc('axes', labelsize=8, titlesize=8, linewidth=0.... |
138c1f0253d1e07f59f6d09dbf1d6501e81993d07632fe7c38c8ff145b25e5a2 | Jupyter | 3,185 | 93 | # %% [markdown]
# # Integrate BRCA with scRNA
#
# uniPort can output a global optimal transport (OT) plan, i.e., a cell-cell correspondence matrix, that provides flexible transfer learning for deconvolution of spatial heterogeneous data using scRNA data in OT space, instead of embedding latent space.
# %%
import uni... |
72a4f9df53ad686896114f890b47a808c011c43676bae93b8701ceaa0e3d137b | Jupyter | 3,187 | 70 | # %% [markdown]
# # Tutorial 2
#
# Annotate and evaluate seqfish data with novel cell detection.
# %%
import torch
import scanpy as sc
import pandas as pd
import numpy as np
# read h5ad rna/seqfish data
device = torch.device('cuda:2')
adata_rna = sc.read_h5ad('/data/msyuan/Cross-omics-Annotator/SPANN_Package/sample... |
4a363a5b1098aa179d4f45d59a27c4ee74f530bdcd2898a29f2f2260bf4625a7 | Jupyter | 3,205 | 70 | # %% [markdown]
# # Tutorial 2
#
# Annotate and evaluate seqfish data with novel cell detection.
# %%
import torch
import scanpy as sc
import pandas as pd
import numpy as np
# read h5ad rna/seqfish data
device = torch.device('cuda:2')
adata_rna = sc.read_h5ad('/data/msyuan/Cross-omics-Annotator/SPANN_Package/sample... |
6a5012778752c3c140a66b2e39a225f5cc7ab52b8d1d187816258afbf64fa730 | Jupyter | 3,212 | 129 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/customization/prompts/chat_prompts.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Chat Prompts Customization
# %%... |
ef02645a2e7e0522a0aaae26d693980293698ed9c8b411937731d22d18ee55a3 | Jupyter | 3,220 | 156 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/upstage.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Upstage
# %% [markdown]
# If you're opening this Noteb... |
3f73a587369caa0c0eb3709b85b75d49f9ca1520031732740cba83f5d78a4515 | Jupyter | 3,239 | 157 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/nomic.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Nomic Embedding
#
# Nomic has released v1.5 🪆🪆�... |
e9b7908f77e8438ffe5f4ede46683967c305acd1a45be2870bccaa2cfe02e1cf | Jupyter | 3,249 | 131 | # %% [markdown]
# # Exploring the eigen values and correlation with phenotypes
# %%
suppressPackageStartupMessages({
library(ComplexHeatmap)
library(tidyverse)
library(ggpubr)
})
# %% [markdown]
# ## Prepare data
# %% [markdown]
# ### Load phenotypes data
# %%
pheno = data.table::fread("../../../../inpu... |
0cd12e55c0baea86549b1c14d5dd992c577b0f7ab859c2954678ed5754f27c60 | Jupyter | 3,269 | 93 | # %% [markdown]
# # Nonequilibrium Switching Free Energy Analysis
#
# This notebook is useful for examining the results of nonequilibrium switching calculations performed with the Perses tool. It enables examination of work traces as well as trajectories.
# %% [markdown]
# ## Import required libraries
# %%
import nu... |
8efeb99ccd7a7139e4a08fcbeb1a602f11d6b2fa21aa7978ca3f4991ad481e2b | Jupyter | 3,271 | 95 | # %% [markdown]
#
# ## MERFISH data preprocessing
#
# We apply uniPort to integrate high-plex RNA imaging-based spatially resolved MERFISH data with scRNA-seq data. The MERFISH data includes 64,373 cells with 155 genes, and the scRNA-seq data includes 30,370 cells with 21,030 genes from six mice measured with dissoci... |
caca64ca1414cca6007a0c31533c83353778612ad4e397c2aa5561cf1cc06d89 | Jupyter | 3,287 | 126 | # %% [markdown]
# # vLLM
#
# There's two modes of using vLLM local and remote. Let's start form the former one, which requeries CUDA environment available locally.
#
# ### Install vLLM
#
# `pip install vllm` <br>
# or if you want to compile you can [compile from source](https://docs.vllm.ai/en/latest/getting_star... |
7e6ed4e6c942807dcda44a9868660bdb4a2e3b5e6b3e264f584266e926051279 | Jupyter | 3,320 | 153 | # %%
import pandas as pd
import numpy as np
import os
import json
import altair as alt
import csv
import json
# %%
FASTA = "mammalian_REM2_codons.SA.FilterOutliers.fasta"
JSON_FILE_FEL = os.path.join("..",
"results",
"mammalian_REM2",
... |
b4a79da51514bc8529add2304d185abc391dcd313b4822bba52ce1d355ea1728 | Jupyter | 3,324 | 115 | # %% [markdown]
# # Ingestion Pipeline + Document Management
#
# Attaching a `docstore` to the ingestion pipeline will enable document management.
#
# Using the `document.doc_id` or `node.ref_doc_id` as a grounding point, the ingestion pipeline will actively look for duplicate documents.
#
# It works by
# - Storing ... |
7d78b7e9cd3bfb40d0592f434a0e97b8b326119ba0ffbaca10309160097a71b2 | Jupyter | 3,341 | 107 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/rungpt.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # RunGPT
# RunGPT is an open-source cloud-native large-sca... |
f244b65e17ca04049e3c7fcec5a686f23ca5e1adfbcaa5900a13f939879d2e78 | Jupyter | 3,344 | 137 | # %% [markdown]
# # Tutorial 1: 10X Visium data
#
# SEDR can be used to process 10X Visium data to extract low-dimension representation. In this tutorial, we use sample #151673 from Dorsolateral Prefrontal Cortex (DLPFC) dataset to introduce the analysis pipeline.
#
# The raw Visium data can be downloaded from http:... |
ecea89d55532ecd02cc96b4a916582e1afbae24540e3e77c416edcf8a73d9e1b | Jupyter | 3,345 | 104 | # %%
from spatial_transcriptome_spm import spatial_normalization, mol2imgs, get_corr_map
import matplotlib.pyplot as plt
import numpy as np
# %%
tissue_dirs= ['./Buzzi_HemeHpx/sham/',
'./Buzzi_HemeHpx/heme_0030/',
'./Buzzi_HemeHpx/heme_0125/',
'./Buzzi_HemeHpx/heme_0500/', ... |
e24abfb71bfe9b7af62d344c9a250a77dd146e4a50c942348d68fdc9083f98f0 | Jupyter | 3,353 | 141 | # %%
# Scatter plot of the univariate data
# Annotate the data by the species taxonomic grouping.
# Scatter plots of the A-A (Same-Same) taxonomic groupings
# One big scatter plot colored by all of the pairs.
# PCA
# PCA annotated with the groups.
# %%
import pandas as pd
from sklearn.decomposition import PCA
imp... |
39e3eb6aaf945e884fa75ff1cd85b3809b0704f791435f474bc1e592b7585ebd | Jupyter | 3,362 | 111 | # %%
%reload_ext autoreload
%autoreload 2
%matplotlib inline
# %%
import numpy as np
from pathlib import Path
import matplotlib.pyplot as plt
# %%
from independent_vector_analysis.visualization import plot_scv_covs
# %%
from relationship_structure_identification.visualization import individual_rho
from relationship_... |
fa18176931d70eac76f2ef5ac373b81c7a7dff50cb4a0d775e3ab44ca60f8d07 | Jupyter | 3,380 | 114 | # %%
## Load libraries
import pandas as pd
import numpy as np
# %%
'''
function name: fix_column_names
purpose: Fixing the column names, making them smaller, informative, and consistent
input: The raw counts dataframe for either genes or transcripts
output: Same dataframe with improved column names
'''
def fix_co... |
510d488c14fa176afd2e85de07a3eee0c825e3c6940e580634ab06a90139c9e2 | Jupyter | 3,382 | 144 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/ingestion/advanced_ingestion_pipeline.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %%
%pip install llama-index-vector-stores-weavi... |
25e3523c9243b7e3b41596d11d3cbba7ac518144503aa98b9ba97fb07247f1b9 | Jupyter | 3,392 | 123 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/data_connectors/DatabaseReaderDemo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Database Reader
# %% [markdown]... |
d20be6e8080d6096f1bb0a5bbd0b92ae12cd6c10aa00f5d15b9db445987d423e | Jupyter | 3,401 | 131 | # %%
import os
import numpy
import pandas
import matplotlib
from matplotlib import pyplot
import seaborn
import logomaker
# %%
%matplotlib inline
matplotlib.rcParams['figure.dpi'] = 120
pandas.set_option('display.max_colwidth', -1)
# %% [markdown]
# # Helper functions
# %%
def one_hot_encode(sequences, seq_len=100... |
fe00d587bdef4e4476ef002bda7f7a9f410f3a65e97edf63614f486df8121a81 | Jupyter | 3,417 | 125 | # %% [markdown]
# # Data preprocessing
#
# The PBMC data consists of paired scATAC-seq and scRNA-seq profiles, but we treat them as unpaired.
# %%
import uniport as up
import numpy as np
import pandas as pd
import scanpy as sc
# %% [markdown]
# ### Read cell types
# %%
labels = pd.read_csv('PBMC/meta.txt', sep='\t'... |
336eee147de1528d50912b12fcb82e5ab75916b1f913bf1fd450ef2e61d0f52d | Jupyter | 3,421 | 110 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/cerebras.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Cerebras
#
# At Cerebras, we've developed the world's... |
4cb4916d677ad6d6f9b62c7d581f09028c034cc6170448ae0e49a9db7ba9c435 | Jupyter | 3,435 | 125 | # %% [markdown]
# # NVIDIA LLM Text Completion API
#
# The `llama-index-llms-nvidia` package extends the `NVIDIA` class to support the `/completions` API for code completion models such as:
#
# - `bigcode/starcoder2-7b`
# - `bigcode/starcoder2-15b`
# %% [markdown]
# ## Installation
# %%
%pip install --upgrade --qui... |
b88d90dc5145f908f5c7a565e9a2ff3b0c3a059df9feb59236072256b15ee79f | Jupyter | 3,437 | 92 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/evaluation/semantic_similarity_eval.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Embedding Similarity Evaluator
... |
7f61293612b95e4e7df5dfe91ed2188bba4c17c6fb57869f9ae4b4a5520041d8 | Jupyter | 3,441 | 134 | # %%
import os
import sys
import pandas as pd
from sklearn.decomposition import PCA
import matplotlib.pyplot as plt
#import os
from tqdm import tqdm
# %%
df_tmalign = pd.read_csv(os.path.join("..",
"tables",
'TM_Align_Results.csv'), index_col=0)
df_tmalign
# %%
df_... |
cd10e5ea79f663844a75032a982a33321725e2ae882fe6d2ea16ebcbed894062 | Jupyter | 3,446 | 107 | # %% [markdown]
# # Extract unique female specific SZ-associated genes
# %%
import functools
import numpy as np
import pandas as pd
from scipy.stats import mannwhitneyu
from statsmodels.stats.multitest import fdrcorrection
# %%
@functools.lru_cache()
def get_res_df():
return pd.read_csv('../../../../../interactio... |
6bccf5736595a52f8cad38de9c82db80c735e8340178200676fe557c34aec8bd | Jupyter | 3,448 | 108 | # %% [markdown]
# # PBMC data preprocessing
#
# We apply uniPort to integrate transcriptomic and epigenomic data using scATAC (gene activity matrix) and scRNA datasets profiled from peripheral blood mononuclear cells (PBMC), including 11259 paired cells with 19434 genes in scATAC and 26187 genes in scRNA.The PBMC data... |
b68af834ebd44813de75e7d56017209152c76623ebb854e2e9bd71d4df97a497 | Jupyter | 3,454 | 129 | # %% [markdown]
# ### Load Model
# %%
import torch
import os
os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
torch.set_default_tensor_type(torch.FloatTensor)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = torch.load('model_snnet_trained.pkl')
# %% [markdown]
# ### 10 sample from 600-serum da... |
81f60c1d0f865f2a45edaeb77a02c8234aefb6840da860c1bf611a9f51ba330e | Jupyter | 3,468 | 173 | # %%
import pandas as pd
# %%
df = pd.read_csv("merged_groups_maf.csv", index_col=0)
# %%
df = df.iloc[:,5:]
df
# %%
df.columns
# %%
df[['PTEN', 'EGFR', 'RB1', 'TP53', 'NF1',
'PIK3R1', 'ATRX', 'PIK3CA', 'TERT', 'CIC', 'FUBP1']].melt()["value"].unique()
# %%
grs = ['Missense_Mutation',
'Frame_Shift_D... |
671d88fb82f23eaf92993d62b889acb7ab37bfd27b6c0bcd34e7b4f3b3b3f56b | Jupyter | 3,469 | 113 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/customization/llms/SimpleIndexDemo-Huggingface_stablelm.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # HuggingFace... |
90c5f7a1310977c1acea9aa087452bed29e3a1273a30a6a2296a253b7674ea79 | Jupyter | 3,471 | 129 | # %% [markdown]
# First import libraries and look for data
# %%
%matplotlib inline
import os
import pandas as pd
pd.set_option('display.mpl_style', 'default')
pd.set_option('display.line_width', 5000)
pd.set_option('display.max_columns', 60)
import matplotlib.pyplot as plt
from pandas.tools import plotting
from IPy... |
43f652202b9bbc9f2826f069cd46a6500e6799c2c8dfd0a260bfe89703d84575 | Jupyter | 3,473 | 111 | # %%
import os
import numpy
import pandas
# %%
designs = [
# 4 sequences with varied MRL from observed data, 50nt utr
{
'source': 'from_data_50bp_defined_range_mrl.csv',
'description': 'Varied MRLs from 50bp library',
'prefix': 'GGGACATCGTAGAGAGTCGTACTTA',
},
# 4 sequences... |
2707c0d26e0c0766c5520779edf4667f981e6db64a20aa1ddaeacb0753d1dd80 | Jupyter | 3,474 | 108 | # %% [markdown]
# # Sample Representation
#
# A core component of volumetric rendering is computing samples along a ray. The representation of these samples is important. We use conical frustums to represent samples. The conical frustums are defined via the following parameters:
#
# ```{image} imgs/frustums.png
# :al... |
932af41d59dfda45ca7b4475b2ceca4b7805e1b2aefbca083eccd1256cbb4397 | Jupyter | 3,474 | 143 | # %% [markdown]
# # Anthropic Haiku Cookbook
#
# Anthropic has released [Claude 3 Haiku](https://www.anthropic.com/news/claude-3-haiku). This notebook provides you to get a quick start with using the Haiku model. It helps you explore the capabilities of model on text and vision tasks.
#
# %% [markdown]
# #### Instal... |
cc67f70ee18787b60a0a7b43814ed0fa0c5e5b170c03470d657ddb20f4e33a3f | Jupyter | 3,492 | 112 | # %% [markdown]
# # Memory in Bedrock AgentCore
# %% [markdown]
# Bedrock AgentCore Memory is a managed AWS service that allows you to create and manage memory resources that store conversation contexts for agents.
# %% [markdown]
# To get started, you will need to install LlamaIndex and the AgentCore Memory integrat... |
6f1a51d9908b59d1b8448d960d05173174311cbbe48bcbebaa5b271b511d635a | Jupyter | 3,498 | 111 | # %% [markdown]
# # Extract unique female specific SZ-associated genes
# %%
import functools
import numpy as np
import pandas as pd
from scipy.stats import mannwhitneyu
from statsmodels.stats.multitest import fdrcorrection
# %%
@functools.lru_cache()
def get_res_df():
return pd.read_csv('../../../../../interactio... |
dc87e52d95f0dee8841d1cf540e05fce10000d7e2e1175e8fe1f799a9aa7172c | Jupyter | 3,498 | 82 | # %%
from IPython import display
# %%
import packerlabimaging as pkg
# %% [markdown]
# This notebook demonstrates a basic workflow of using the packerlabimaging package.
#
# The fundamental types of imaging trials accepted for this workflow are:
# - 2photon imaging
# - All Optical Experiment (2photon imaging + o... |
71fee6a941b895e55a4de3f5510d5d45f403d7abf9fbcf1b5df9bbec4adc5117 | Jupyter | 3,502 | 73 | # %% [markdown]
# ## Mixing Sage and Amber force fields: BRD4 benchmark
#
# This example applies SMIRNOFF-format parameters to BRD4 inhibitors from the [living review on binding free energy benchmark systems](https://www.annualreviews.org/doi/abs/10.1146/annurev-biophys-070816-033654) by Mobley and Gilson. The BRD4 sy... |
d36a64964e3019147e26ded85f274544fde6a4784ca71c7203ad16372027e60c | Jupyter | 3,518 | 114 | # %%
import cooler
import pandas as pd
import numpy as np
import scipy
from scipy import stats as st
import seaborn as sns
import matplotlib.pyplot as plt
import pybedtools
# %% [markdown]
# # Input data to run this notebook
# %%
# Merged Hi-C data
# Run 1_merge_Hi-C.sh script to obtain these maps
clr_neur_path = '..... |
3f66a332414fed850924e59a978cba4d295b2c9190d9474b757d0f2e2b78d9cb | Jupyter | 3,526 | 133 | # %% [markdown]
# # Using Opus 4.1 with LlamaIndex
#
# In this notebook we are going to exploit [Claude Opus 4.1 by Anthropic](https://www.anthropic.com/news/claude-opus-4-1) advanced coding capabilities to create a cute website, and we're going to do it within LlamaIndex!
# %% [markdown]
# ## Build an LLM-based assi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.