sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
d3e35961fe54da16570344adb1d2aecbc7662d96590d6a889c1dca27bf5d6869
Jupyter
1,273
61
# %% [markdown] # First import libraries and set dictionary # %% %matplotlib inline import os import pandas as pd import cPickle import matplotlib.pyplot as plt from pandas.tools import plotting workingdir='../test/sampledata/ocn/' folders=os.listdir(workingdir) # %% [markdown] # load all quantified files from all ...
d395b8656a43091dd44c8706ef8a91b16b586d747c9f870df41627c8b357a7ad
Jupyter
1,290
47
# %% import packerlabimaging as pkg import packerlabimaging.plotting as plotting # %% # import data trialobj (TwoPhotonImaging Trial object) expobj = pkg.import_obj(pkl_path='/home/pshah/Documents/code/packerlabimaging/tests/RL109_analysis.pkl') print(expobj) trialobj = expobj.load_trial(trialID='t-005') # %% [markd...
5c5a0a027bbb44e65d23e9a1a12f0b356f003e29e99f6467674da611d35dcfa3
Jupyter
1,296
47
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/data_connectors/TwitterDemo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Twitter Reader # %% %pip install llama...
a3e4f2aba702c4f7b2021ac2953cead28c3f95d02e608f950637b3c5c3aa784a
Jupyter
1,305
60
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/llm_predictor.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # LLM Predictor # %% [markdown] # If you're openin...
17197b4216ee73523e1ea28752e95336057fb0db28aaa7102657056d38ca4b0b
Jupyter
1,313
38
# %% [markdown] # ## Preprocessing data of Domcke et al., Science (2020) # %% [markdown] # #### Data from https://descartes.brotmanbaty.org/bbi/human-chromatin-during-development/ # ##### Cicero_coaccessibility_scores_by_cell_type.csv.gz # %% import os import pandas as pd from pybedtools import BedTool domcke_cre = ...
55c9904464339a0ef0a95756c36b0d6fe81fe04e15f90381aecee0a7cff499d6
Jupyter
1,329
54
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/everlyai.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # EverlyAI # %% [markdown] # If you're opening this Not...
7eef164d702fe986f0e26fa3da914ed880b84ac647d253c380b064345aa61fc9
Jupyter
1,342
47
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/modelscope.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # ModelScope Embeddings # %% [markdown] # In t...
46bdaa889331c84bf7e3660b99840cbb557f0eeb1608a690048f28fc689ccb1b
Jupyter
1,353
55
# %% import matplotlib.pyplot as plt import numpy as np import scipy.io as sio from oset.generic.lp_filter.lp_filter_zero_phase import lp_filter_zero_phase # Load the MATLAB .mat file # Example 1: data = sio.loadmat("../../../datasets/sample-data/SampleECG1.mat") x = data["data"] # Example 2: # data = sio.loadmat('....
d2d17a4c1ceb3c9d137996edd71cd550b9b5cc488a9c83efeb364c63e3b32056
Jupyter
1,353
46
# %% import numpy as np %matplotlib inline import matplotlib.pylab as plt import pandas as pd from arsenic import plotting, stats, wrangle, absolute, plotlying # %% raw_results = wrangle.read_csv('../data/example.csv') # %% plotting.plot_DDGs(raw_results,method_name='softwarename',target_name='made up protein', plo...
0bfcb6e10666d19f6ce95cda974ec4466debd19670fa3886cc5282536b22a73a
Jupyter
1,360
45
# %% [markdown] # # Tutorial 3 - Making Useful Plots # %% import packerlabimaging as pkg import packerlabimaging.plotting as plotting # %% # import data trialobj (TwoPhotonImaging Trial object) expobj = pkg.import_obj(pkl_path='/home/pshah/Documents/code/packerlabimaging/tests/RL109_analysis.pkl') print(expobj) tria...
760ea4dbd42f36eded2a355abdef4dd083c249a98fc29ceb1225dd1334b528c1
Jupyter
1,364
35
# %% !git clone https://github.com/Merlinaphist/ReproduceANNA16.git # %% import numpy as np import pandas as pd from sklearn.metrics import mean_squared_error from math import sqrt from statistics import mean, stdev from sklearn.neighbors import KNeighborsRegressor # %% rmse = [] for i in range(5): X_train = pd.r...
c39e81962c0a1c757707c271193f2ec81a599924ff07c64c091ef13288d78f23
Jupyter
1,415
59
# %% import numpy as np import matplotlib.pyplot as plt import functions_emt as f from params_emt import * import time import pandas as pd import anndata as ad # %% import importlib importlib.reload(f) tm = 1000. # simulation time (dt=0.1 is set in the time_course_emt() function ) b = 1. np.random.seed(100) # loa...
df9463d31620c3ca456474f19bd087d3a22e3d1501e4c687ae6ce4d68a26047f
Jupyter
1,423
61
# %% import numpy as np import matplotlib.pyplot as plt import functions_emt as f from params_emt import * import time import pandas as pd import anndata as ad # %% import importlib importlib.reload(f) tm = 1000. # simulation time (dt=0.1 is set in the time_course_emt() function ) b = 1. np.random.seed(0) # load i...
ce10f9bebe590630afde15b91ffd40c7103ee59a89b9ef07a4e344d46ea8439a
Jupyter
1,426
71
# %% [markdown] # Copyright (c) 2021, David Williams, Reza Sameni # # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. # %% [markdown] # ## Import dependencies # %% import numpy as np import scipy.io as spio imp...
da9ce6e5bf4721ac50d4fa63771fecdf7574a6a75f5d0eb25d4ba15380b1a616
Jupyter
1,434
52
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/data_connectors/MongoDemo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # MongoDB Reader # Demonstrates our MongoDB...
8b50060c94d90038d84c9f65dd58b4a47d28c507de438a7bdb3dabf7eac6fbe4
Jupyter
1,438
50
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/customization/streaming/SimpleIndexDemo-streaming.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Streaming # %% [...
02ae2fbf18517b403aa9953672241b6143cc582087125af8ad4b64eef3271988
Jupyter
1,445
45
# %% [markdown] # ## Preprocessing data of Ziffra et al., Nature (2021) # %% import pandas as pd import os, glob from natsort import natsort_keygen # %% peaks = pd.read_excel("~/Dropbox/CWAS_paper_WD/Data/raw_annotations/Ziffra2021_TableS2-13.xlsx", sheet_name="ST2 AllPrimaryPeaks") enhancers = pd.read_excel("~/Dropb...
434b3cb734c4e6cdacbdd69e92d09b47a56d27be16fcfad790c7b779c25aefcd
Jupyter
1,447
38
# %% [markdown] # # Reproducing topic heatmaps in the paper for SUPPORT cohorts # # Authors: Lexie Li, George H. Chen # %% import os, pickle, json, re import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib import colors import seaborn as sb from visualization_utils import * import war...
f9a377dc4e3adde105fe3bdd58fd11d5b068647280411fa259fb9e38fc69c03c
Jupyter
1,450
63
# %% import pandas as pd import pymaid rm = pymaid.connect_catmaid() # %% n = pymaid.get_neuron(16) # %% # Get all connectors cn = n.connectors # Add a column with the URL to coordinates cn['URL'] = pymaid.url_to_coordinates(cn, stack_id=5, ...
d25356424edf5116f29a17f2ce76bc7670a1d2a6d323c70e3c27168618e3261f
Jupyter
1,451
50
# %% import os # %% os.getcwd() # %% import sys print(sys.path) # %% print(sys.executable) # %% from packerlabimaging.imaging_utils import AllOptical # %% # 1) ### prepare trial and photostim experiment information below before running run_photostim_processing() data_path_base = '/home/pshah/mnt/qnap/Data/2020-12-...
65f4e578c3b2b8c6202fc2a960d9f1961c80b5f5ff0e12dcc04fe580cfa2c581
Jupyter
1,463
56
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/data_connectors/QdrantDemo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Qdrant Reader # %% %pip install llama-i...
7c87aa8419f71bdca707d06eeb5f51dd7ae86cd563810d12c9c7ee0eff8c0285
Jupyter
1,464
48
# %% [markdown] # # Tutorial 3 - Making Useful Plots # %% import imagingplus as ip import imagingplus.plotting as plotting # %% [markdown] # ### import data # %% # import data as a `trialobj` (here we are importing a TwoPhotonImaging Trial object) expobj = ip.import_obj(pkl_path='/mnt/qnap_share/Data/imagingplus-ex...
dacadb8b57b55c99668629db5269734c35c3f96ff3ad9401b7a1ea9a282c31eb
Jupyter
1,495
63
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/chat_engine/chat_engine_repl.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Chat Engine - Simple Mode REPL # %% [...
66dc07a79386922348c37b28b29737cbd7af3ad711ec52cdf528092661cbee5f
Jupyter
1,524
58
# %% import os import numpy as np import seaborn as sns import pandas as pd import matplotlib.pyplot as plt from datetime import datetime df = pd.read_csv('allWordAnalysis_wNodeCount_shifted.zip') # Define the threshold nodeCount threshold_value = 20 # Set values above threshold to the fixed number df = df[df['arcLe...
a2a43e2bd12b070cf0fee3e1de83f4bf3b5ab09b557dfa14dc1a669ff69465d0
Jupyter
1,533
64
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/anyscale.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Anyscale # %% [markdown] # If you're opening this Not...
3a4ee9f7b725a39aa9332d64b7b6b8665c6dc8c5e45ab53d81c2686f8a48c6ce
Jupyter
1,537
73
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/upstage.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Upstage Embeddings # %% [markdown] # If you're ...
fbd751957621b556adf64357902a436d02264bc8607ab7096136f8bc0eb1b5c5
Jupyter
1,538
45
# %% import shutil import os import pandas as pd import numpy as np from importlib.machinery import SourceFileLoader # import the module from the given path wfdb_csv = SourceFileLoader("csv", "/labs/samenilab/team/deepanshi/wfdb-python/wfdb/io/convert/csv.py").load_module() print(wfdb_csv) fname_in = 'sample_raw.csv...
2c36c211b7b4c1a81fcd6d4db49a8e2425d96f35899ac1df807ca3ee26ac7675
Jupyter
1,539
65
# %% import cooler import pandas as pd import numpy as np from statannot import add_stat_annotation import seaborn as sns import matplotlib.pyplot as plt # %% [markdown] # # Input data to run this notebook # %% # Merged Hi-C data # Run 1_merge_Hi-C.sh script to obtain these maps files=['../data/NeuNplus.sampled.1000....
2f6451f6a80b4f4169b9071a8ed87a76ab5ae2c1af3fd8c0e55f8106d760a32c
Jupyter
1,539
50
# %% [markdown] # # Ollama Llama Pack Example # %% [markdown] # ### Setup Data # %% !wget "https://www.dropbox.com/s/f6bmb19xdg0xedm/paul_graham_essay.txt?dl=1" -O paul_graham_essay.txt # %% from llama_index.core import SimpleDirectoryReader # load in some sample data reader = SimpleDirectoryReader(input_files=["pa...
b2ad87644e270188686459ff5d2bf72f8a9aff93050e8e617832757b99cd2e78
Jupyter
1,544
46
# %% [markdown] # # Venn diagram comparing female and male SZ differential expression results # %% import pandas as pd import matplotlib.pyplot as plt from matplotlib_venn import venn2 # %% plt.rcParams.update({'font.size': 22, 'font.weight': 'bold'}) # %% def get_deg_df(tissue, feature): fn1 = "../../../%s/fema...
18db8105a7d9aa6f553abda429e51b80dbac7a5ec9b8fa0122943b808215726b
Jupyter
1,546
54
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/ollama_embedding.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Ollama Embeddings # %% [markdown] # If...
fb476f682302cbfa342112fb1723e447ad762492767103bfa46b105b1eadc854
Jupyter
1,552
56
# %% # 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...
9ba344f404d27addb3f2a866910d4547d6b4f1722c6a3c8a08c226ef8509ea17
Jupyter
1,553
55
# %% import nbimporter from functions import * import glob, os # %% output_direction='/home/mahdi/python codes/start/s21_RND_another_ref' input_direction='/home/mahdi/Desktop/data_selection_D7/S28_MSL.nii.gz' reference=136 maximum_intensity=1705 model='200epoch_with_val.h5' main(input_direction,reference,output_dir...
41bb6b095d996f94702a48b06a317f4848e488d3309499f7a5495f807ef25b9d
Jupyter
1,559
44
# %% [markdown] # MultiRAT environement preparation # ================ # Joanes Grandjean # # ![rat art](../assets/img/rat_art.png) # # # Foreword # # This and the follow are jupyter files which contains all the code for # reproducing my analysis and detail the process. The code is meant to be # followed step-wise. ...
6222fb963a7a17612958f61db049faadc9d84d261ee58a2c55614ac87dbcbdc5
Jupyter
1,562
56
# %% [markdown] # In this notebook, we are going to show how to use [BGE-M3](https://huggingface.co/BAAI/bge-m3) with LlamaIndex. # # BGE-M3 is a hybrid multilingual retrieval model that supports over 100 languages and can handle input lengths of up to 8,192 tokens. The model can perform (i) dense retrieval, (ii) spar...
7d6879a67a03263e8526e2891eabf798236a989f60e3a1400e4401f52ab908ca
Jupyter
1,562
55
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/data_connectors/DiscordDemo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Discord Reader # Demonstrates our Disco...
009f573e400d261ee0003118e1138b727a40ce306ff156e47ada48874d863895
Jupyter
1,563
42
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/text_embedding_inference.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Text Embedding Inference # # T...
0c241dc89691b64a1ae97f986e61913114dc17e6548e792149af0eeba33bd292
Jupyter
1,583
61
# %% import pickle, numpy as np, pandas as pd, networkx as nx, warnings warnings.filterwarnings('ignore') import sys import matplotlib, matplotlib.pyplot as plt matplotlib.rcParams['font.sans-serif'] = "Arial" matplotlib.rcParams['font.family'] = "Arial" import seaborn as sns, OmicsIntegrator as oi # %% infile= "/mn...
2141421a6e5a730e27c2856f18d7ecf773b0c71f8bd80c8a7dc81ed98bc680d4
Jupyter
1,587
59
# %% [markdown] # # Deplot Reader Demo # # In this notebook we showcase the capabilities of our ImageTabularChartReader, which is powered by the DePlot model https://arxiv.org/abs/2212.10505. # %% %pip install llama-index-readers-file # %% from llama_index.readers.file import ImageTabularChartReader from llama_index...
258a66fe6fd82b48162d0d9a85dd6f7aa6fc86380f6e970f168bfc694deb6cac
Jupyter
1,601
50
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/data_connectors/MakeDemo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Make Reader # # We show how LlamaIndex ca...
c795a8af00843e9459f7a006370aea88b1d308ee6c8e100e197ed9bdc8c40a28
Jupyter
1,615
80
# %% [markdown] # Copyright (c) 2021, David Williams, Reza Sameni # # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. # %% [markdown] # ## Import dependencies # %% import numpy as np import scipy.io as spio imp...
b2b9e9843f1f1db4483c08f7f670e6fa974ed8c580da6dcf5b2ac39303406546
Jupyter
1,616
71
# %% import os import pandas as pd # %% df_tcga = pd.read_excel("GBM_Methylom_TCGA_clinical-data.xlsx", index_col=0) df_tcga.columns = df_tcga.iloc[0].tolist() df_tcga = df_tcga.iloc[1:] df_tcga = df_tcga.set_index("Sample ID") # %% df_groups1 = pd.read_csv("/data/projects/robin/DNAm_revision...
68199abf581a7ee0567613d88bf35c0b032d18deaa2f7ee2e8d84712e8cce0b4
Jupyter
1,636
60
# %% [markdown] # # MistralRS LLM # # **NOTE:** MistralRS requires a rust package manager called `cargo` to be installed. Visit https://rustup.rs/ for installation details. # %% %pip install llama-index-core %pip install llama-index-readers-file %pip install llama-index-llms-mistral-rs %pip install llama-index-llms-h...
d055160ba2410e53cff8744473326f4dd6a78a3318d57e81b5baa2ea142fe80f
Jupyter
1,644
43
# %% import os import numpy as np import pandas as pd from os import listdir from os.path import isfile, join # %% directory = r'C:\Users\shirahad\Documents\research\electrophysiology\analyze_electrophysiology_data\psth\files' # %% [markdown] # # PAY ATTENTION TO 7 OR 10 INTENSITIES # %% intensities_file_path = r'C:...
1a860f052ac4eab7178e0425080f13acdb8ab6e0cef18f1d3bb693490eb3aa27
Jupyter
1,650
47
# %% # -- coding: utf-8 -- import warnings warnings.filterwarnings("ignore") import sys sys.path.append('../') 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.environ['CUDA_VISIBLE_DEVICES'] = '-1'...
f775664a84846d48e69fe8cc878d158685f0e74af073d3ee7fe1402f574361ae
Jupyter
1,651
84
# %% [markdown] # # Netmind AI LLM # # This notebook shows how to use `Netmind AI` as an LLM. Check out the full list of models [netmind.ai](https://www.netmind.ai/). # # Visit https://www.netmind.ai/ and sign up to get an API key. # %% [markdown] # ## Setup # %% [markdown] # If you're opening this Notebook on cola...
fec9f7f17693923d43642d9c1bfc92c1fdc3a6620f12c64bed33126416a572a7
Jupyter
1,655
59
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/data_connectors/SlackDemo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Slack Reader # Demonstrates our Slack dat...
eaa8cbeb35ae4d43d166c9fc8adbeb3f547b81ed0050bef0d2d35a307b4d7a3d
Jupyter
1,661
70
# %% [markdown] # # Agents with Structured Outputs # # When you run your agent or multi-agent framework, you might want it to output the result in a specific format. In this notebook, we will see a simple example of how to apply this to a FunctionAgent!🦙🚀 # %% [markdown] # Let's first install the needed dependencie...
bac47c7bd86dbec6fe4a463de74e91cb914e910630f226aec9a00ca5a1c1f711
Jupyter
1,667
57
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/chat_engine/chat_engine_best.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Chat Engine - Best Mode # %% [markdow...
fdfc276e47ef364a364d70079419fc05c2395fbf8406e98790a0d6138d6463f6
Jupyter
1,670
82
# %% [markdown] # # Featherless AI LLM # # This notebook shows how to use `Featherless AI` as an LLM. Check out the full list of models [featherless.ai](https://www.featherless.ai/). # # Visit https://www.featherless.ai/ and sign up to get an API key. # %% [markdown] # ## Setup # %% [markdown] # If you're opening t...
c6c5345be19424c15c5c88f2982da3976efc6a072f7d8060df309569cb63f3b1
Jupyter
1,672
75
# %% [markdown] # # Gene term enrichment analysis # %% suppressMessages({ library(clusterProfiler) library(org.Hs.eg.db) library(enrichplot) library(pathview)}) # %% extract_geneList <- function(dft, keytype='EntrezID'){ dft = na.exclude(dft) gg = as.vector(dft[, 'logFC']) names(gg) = as.v...
63524fbc8dc8eec1888031a8bbe9829ec1ec84dc57ad2fea83405b24b4440d84
Jupyter
1,678
57
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/alephalpha.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Aleph Alpha Embeddings # %% [markdown] # If ...
1b89152e5bbbb0b8229b4279f3863f5aa680a09d3b4a613cbfde8a66318eab9e
Jupyter
1,682
63
# %% import nbimporter from functions import * import voxelmorph as vxm import neurite as ne %matplotlib inline # %% data_dir='/home/mahdi/Desktop/data_selection_D1' split=1 batch_size=32 #maximum=maxx(data_dir) maximum=1584 # %% # let's get some data val_generator = affine_generator(data_dir,batch_size,maximum,split...
1de1788fdf236d812a97159e4f826caed93803de461d967f1fe0aeb812dd63f5
Jupyter
1,701
68
# %% [markdown] # # CpG_Aggregate API usage # %% [markdown] # ## Import module # %% # Import main module from pycoMeth.CpG_Aggregate import CpG_Aggregate # Optionally inport jupyter helper functions from pycoMeth.common import head, jhelp, stdout_print # %% [markdown] # ## Getting help # %% jhelp(CpG_Aggregate) ...
878e6997dd150adb4b8dc7cda8c6f36ccc2f4b209457afe59ebd7d77e4ecde98
Jupyter
1,704
49
# %% # -- coding: utf-8 -- import warnings warnings.filterwarnings("ignore") import sys sys.path.append('../') 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.environ['CUDA_VISIBLE_DEVICES'] = '-1'...
594211167e156dec0ac1bf50e8f6059b3841c498c87982f03f4d4396ce041d56
Jupyter
1,708
54
# %% import numpy as np import matplotlib.pyplot as plt import pandas as pd # Dictionary to manage paths and method names method_files = { 'native': '../vectorizeFalse_assignFalse_deepcopyFalse.npy', 'module-based': '../vectorizeTrue_assignTrue_deepcopyTrue.npy', 'functional-based': '../vectorizeTrue_assig...
854add82cdebd3e2e9b214e80da4e455de7820e4a94418f79ab1ccc9d01d1106
Jupyter
1,719
64
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/data_connectors/ChromaDemo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Chroma Reader # %% [markdown] # If you'...
d77fa4b4a1a22df67df88cff0346a273906996b9e7ed1f2e1be06775d1a005e5
Jupyter
1,719
68
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/lmstudio.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # LM Studio # %% [markdown] # ## Setup # %% [markdown]...
c93867179fe97ee421284ead349a7b62a5b65c8eb578cde537f8e2c6966d16fe
Jupyter
1,720
65
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/data_connectors/DashvectorReaderDemo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # DashVector Reader # %% [markd...
2664c0a28426555af2cd2ae2c950172a31898695bc6e0dca696eb2af2158902d
Jupyter
1,731
74
# %% [markdown] # # Check sex chromosomes for caudate nucleus # %% suppressMessages({library(dplyr) library(ggpubr)}) # %% [markdown] # ## Get and annotated sex from genotypes # %% sexcheck_file = paste0('../../../input/genotypes/check_sex/_m/', 'LIBD_Brain_TopMed.sexcheck')...
d47b1c1fc5c537044e1db3bd466be6cebfdb609906e53879cf48f9f68ebe766f
Jupyter
1,737
75
# %% [markdown] # # Chat Memory Buffer # # **NOTE:** This example of memory is deprecated in favor of the newer and more flexible `Memory` class. See the [latest docs](https://docs.llamaindex.ai/en/stable/module_guides/deploying/agents/memory/). # # The `ChatMemoryBuffer` is a memory buffer that simply stores the las...
68f5abf4e18215e0c531623b4ef4e82b5712d44e630453be38fd3632d6539331
Jupyter
1,753
73
# %% [markdown] # # Visualize GO analysis # %% import numpy as np import pandas as pd # %% def get_top_GO(tissue, fn, label): df = pd.read_csv(fn, sep='\t').sort_values('p_value').head(10) df['Log10'] = -np.log10(df['p_value']) df['Tissue'] = tissue df['Direction'] = label return df # %% tissue =...
ecd5d407b1d26eab44e67e2531baf02063dbf53fe069a8439a6760c5ca712557
Jupyter
1,754
80
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/openai.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Fireworks # %% [markdown] # If you're opening this Note...
1174e6ea215499d9e5acb437b05b8ae918269e46dae303af036fe4425da42f14
Jupyter
1,755
62
# %% import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import os import scipy.io # %% df1 = pd.read_csv('htRmatrix.csv'); df2 = pd.read_csv('htPmatrix.csv'); # %% df1.head() # %% df2.head() # %% np.zeros_like(df1) # %% mask = np.zeros_like(df1, dtype=np.bool) # %% mask[n...
47d58917ebc8adc0f08db669cadde85fab938f2ff569fc032d546528585bc367
Jupyter
1,782
49
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/data_connectors/PsychicDemo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Psychic Reader # Demonstrates the Psych...
4245c02549b12ad4e921421e61ec1ece2f599ce85f9b0ef6e1a2f903c83ce8ca
Jupyter
1,783
68
# %% import pandas as pd import matplotlib.pyplot as plt import os # %% def get_start_index(df, cnv_start): if cnv_start <= df.iloc[0].start: return 0 else: start_index = df.index[df["start"] <= cnv_start].tolist()[-1] if df.iloc[start_index].end <= cnv_start: start_index +=...
ba280183f326d06623fca23c781faf484426af2e8ad22c8b159a0a3e573a985f
Jupyter
1,785
70
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/customization/streaming/chat_engine_condense_question_stream_response.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] #...
eb8afd29fe4babfd4a233becb9ff3a3a3c0b0578b5d13b65998cb113bab4d282
Jupyter
1,804
67
# %% import re import numpy as np import matplotlib.pyplot as plt plt.rcParams['font.size'] = 20 import json import random # %% def running_mean(x, N): cumsum = np.cumsum(np.insert(x, 0, 0)) return (cumsum[N:] - cumsum[:-N]) / float(N) # %% def get_results(txt_file, number=15): # Using readlines() f...
b866f76b7a53a4d9bf5a87649bdfea87d75abd5406258b7a6110c932fbc651ec
Jupyter
1,810
63
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/elasticsearch.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Elasticsearch Embeddings # %% [markdown] ...
04da46526690334130d9aa10fef5c4d8b92ab1521dc55b22573ad35a8959cd1d
Jupyter
1,812
66
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/chat_engine/chat_engine_personality.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Chat Engine with a Personality ...
28683ba118b7ae1287e4b2ae6d3552c75911aafc157fcb865efbd0ba1154d529
Jupyter
1,814
72
# %% [markdown] # # Visualize KEGG analysis # %% import numpy as np import pandas as pd # %% def get_top_GO(tissue, fn, label): df = pd.read_csv(fn, sep='\t').sort_values('p_value') df = df[(df['source'].isin(['KEGG', 'REAC']))].head(10) df['Log10'] = -np.log10(df['p_value']) df['Tissue'] = tissue ...
191e96eaa18a5dc22a432ae9133b68cb1686d8d80857ec5adf69ee22f42e07ab
Jupyter
1,819
61
# %% [markdown] # # Plot RXE comparisons # %% library(ggpubr) library(tidyverse) # %% save_ggplots <- function(p, fn, w=7, h=7){ for(ext in c('.svg', '.png', '.pdf')){ ggsave(p, filename=paste0(fn, ext), width=w, height=h) } } # %% df = data.table::fread("../../_m/RXE_public.csv") %>% mutate(Reg...
815d39c13ee9278aaf4138097a69e64eb0768ca78705337b0b509f8af1f3094c
Jupyter
1,820
63
# %% import pandas as pd import numpy as np import nibabel as nib import nbimporter from functions import * from numpy import * import matplotlib.pyplot as plt %matplotlib inline # %% ndim = 2 unet_input_features = 2 loadable_model='200epoch_with_val.h5' # data shape 64*64 s=(64,64) inshape = (*s, unet_input_features...
092ebea18b4f4580502a5f359b70923cb72c9eac65fd2c07170278c6157db9e2
Jupyter
1,846
109
# %% [markdown] # # DrugComb # # ### summary data (v1.5) # # https://drugcomb.org/download/ # # * summary_v_1_5.csv # %% [markdown] # # CCLE # # ### omics data of cancer cell lines (Pubclic 22Q4) # # https://depmap.org/portal/download/all/ # # * OmicsExpressionProteinCodingGenesTPMLogp1.csv # * OmicsSomaticMutat...
d1db8f0d2b41f42a5323c0f4dacf8b75d50c6cc0dcc9e055719b91046881fb40
Jupyter
1,858
71
# %% [markdown] # # Functional enrichment analysis with g:Profiler # %% library(tidyverse) library(gprofiler2) # %% [markdown] # ## Load DEG results # %% deg <- data.table::fread('../../metrics_summary/_m/male_specific_DE_4features.txt') %>% select(gencodeID, ensemblID, Symbol, logFC, "adj.P.Val") deg %>% head(2...
b676ba492578f966c7546adbc841b179a0b2368fbea2cd4ac2825b7c3dd91742
Jupyter
1,860
47
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/evaluation/BeirEvaluation.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # BEIR Out of Domain Benchmark # %% [markd...
962b4685145363d562e1d1214c01b9a8162c73abbfe765341505f917919a176c
Jupyter
1,864
80
# %% from pathlib import Path import time from huggingface_hub import create_repo, HfApi import com_const as cc # %% repo_id = "treizh/oiv_ld_phenotyping" # %% create_repo(repo_id, exist_ok=True) # %% api = HfApi() # %% def upload_file(file_path: Path, dst_path=None): api.upload_file( path_or_fileobj=...
a1dd2c7fb83bee4c82fda6d4bd9268b05e1a7962bb9175f8792564ddaa601068
Jupyter
1,866
63
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/cloudflare_workersai.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Cloudflare Workers AI Embeddings #...
9762469481d8ab183d2a2871162f8314395d9600aa8f55b2d0fc9e30b1b93990
Jupyter
1,871
76
# %% %load_ext autoreload %autoreload 2 import os from pathlib import Path import Bio.PDB # TODO: make a proper package for interactive usage, will remove need for hack try: if CORRECT_DIR: pass except: os.chdir("..") CORRECT_DIR = True from matplotlib import pyplot as plt from src import featu...
ed88c8a046d9b3eed2ffcc03d059baab848e880eba1f4c41a5d086a531926e1a
Jupyter
1,872
77
# %% [markdown] # # Functional enrichment analysis with g:Profiler # %% library(tidyverse) library(gprofiler2) # %% [markdown] # ## Load DEG results # %% deg <- data.table::fread('../../metrics_summary/_m/female_specific_DE_4features.txt') %>% select(gencodeID, ensemblID, Symbol, logFC, "adj.P.Val") deg %>% head...
9db154e15df980e899a404b9aebea8503bd5de77d52a97c2e07e4fbb07537943
Jupyter
1,880
73
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/openrouter.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # OpenRouter # %% [markdown] # OpenRouter provides a ...
a23df4f490d53df82679f1a7afdbb100a41a16d2995c8d1b2fb2eea302afa81c
Jupyter
1,888
49
# %% [markdown] # ## Mixing Sage and Amber force fields: Toluene in T4 Lysozyme # %% [markdown] # ### Parametrize a molecule with the Sage force field # # First, we parametrize the ligand (toluene) with the SMIRNOFF-format Sage force field through the usual route to create an OpenMM `System`. # %% from openff.toolki...
ac4b7dc74b3eab1e7cacc62b2412da10b06ac89dd6ac3a19db61975c4d3a1283
Jupyter
1,890
97
# %% import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import numpy as np %matplotlib inline # %% [markdown] # # direction # %% direction='/media/mahdi/HD710 PRO/R&d/result/tsnr_centerfix_result.csv' df = pd.read_csv(direction) df # %% [markdown] # # seperate spine ans csf part # %% csf_...
403b60cf33844971fb82fe8a72fcb04b7f93ec47c0c8638fdcc99fb9c00227e2
Jupyter
1,894
49
# %% [markdown] # # Model-guided ligand optimization # # # ## This notebook exemplifies our framework for model-guided ligand optimization. # # ### Optimization Objectives for Sequences: # #### 1) Selective potency at GCGR # #### 2) Selective potency at GLP-1R # #### 3) High-potency at both receptors. # %% [mark...
63e8c444be25a76f3e96cef06e1bc9fa18e9fcaec248f1a7a2c2a553dfe61099
Jupyter
1,896
62
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/clarifai.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Embeddings with Clarifai # # LlamaIndex has su...
9a5b2dfb8ac1315b87574d49e3b06b8bb95195e5925f4f66ca88a7f50c3db037
Jupyter
1,899
47
# %% [markdown] # ## notebook 04: repeatability plotting # # In this notebook we use the output from the linear mixed models and repeatability analyses from the previous notebook to generate Figure WWW from the publication. # %% # importing python packages from matplotlib import pyplot as plt import pandas as pd impo...
1057abe4a279cc939382bea986f317599cd5b7b76a79e15cb4d67e235bd63aab
Jupyter
1,905
47
# %% [markdown] # ## notebook 04: repeatability plotting # # In this notebook we use the output from the linear mixed models and repeatability analyses from the previous notebook to generate Figure WWW from the publication. # %% # importing python packages from matplotlib import pyplot as plt import pandas as pd impo...
89a35533fb59402cba89e4c0721babc1f7b58502bc09ecf58b61584a6454787d
Jupyter
1,916
72
# %% [markdown] # # Interval_Aggregate API usage # %% [markdown] # ## Import module # %% # Import main module from pycoMeth.Interval_Aggregate import Interval_Aggregate # optionally inport jupyter helper functions from pycoMeth.common import head, jhelp, stdout_print # %% [markdown] # ## Getting help # %% jhelp (...
299a2400820821531778b3990f45b71e63856dfa692ff127b974a14fa049d5ef
Jupyter
1,920
59
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/data_connectors/lagecy_office_reader.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Legacy Office Reader # %% [ma...
ff21806b3e3bf3e52032f813856f59ef4edbd69ed03a139bf29aadb34112dab8
Jupyter
1,928
47
# %% [markdown] # ## notebook 03a3: repeatability plotting # # In this notebook we use the output from the linear mixed models and repeatability analyses from the previous notebook to generate Figure WWW from the publication. # %% # importing python packages from matplotlib import pyplot as plt import pandas as pd im...
76a07544897e34b119834b644e6371b3d4f4707a0c63edb08da15552497c2c71
Jupyter
1,937
49
# %% [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] # # Oracle Cloud Infrastructure Generative AI # # Oracle C...
48bedc12314c1cac5ff53dfd56c1da1532f5046ba986dd8eb6c2c5af8a6ea5e9
Jupyter
1,955
81
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/embeddings/OpenAI.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # OpenAI Embeddings # %% [markdown] # If you're op...
b318bbb9c2b0967302bd7adc3d0cc2415262f56def67a9841ac45cf9401461f1
Jupyter
1,959
72
# %% [markdown] # # LlamaHub Demostration # # Here we give a simple overview of how to use data loaders and tools (for agents) within [LlamaHub](llamahub.ai). # # **NOTES**: # # - You can learn how to use everything in LlamaHub by clicking into each module and looking at the code snippet. # - Also, you can find a [...
c3b95a9699646924c371fa32072939554f549c51c038ab271e54bff533f60d16
Jupyter
1,961
47
# %% [markdown] # ## notebook 03p3: precision repeatability plotting # # In this notebook we use the output from the linear mixed models and repeatability analyses from the previous notebook to generate Figure WWW from the publication. # %% # importing python packages from matplotlib import pyplot as plt import panda...
4cd1c24657bc8f3c4a5a9947c5847b36938e7a99d4b6c302fd7efc6281fba938
Jupyter
1,966
86
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/yi.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Yi LLMs # # This notebook shows how to use Yi series LLMs. ...
0a010fa5651a7f03c49a5370765f1f4f0ebccf40d7e05780b2623825f2fefccb
Jupyter
1,967
49
# %% [markdown] # # Llamafile Embeddings # %% [markdown] # # One of the simplest ways to run an LLM locally is using a [llamafile](https://github.com/Mozilla-Ocho/llamafile). llamafiles bundle model weights and a [specially-compiled](https://github.com/Mozilla-Ocho/llamafile?tab=readme-ov-file#technical-details) vers...
5e1ef300484d4325b391b71cccb3350faea58e689f566de9d8cd545dc76634c9
Jupyter
1,974
69
# %% [markdown] # # Extract male bias genes on the X chromosome # %% import session_info import pandas as pd from pyhere import here # %% def get_deg(): fn = here("differential_expression/tissue_comparison/summary_table", "_m/differential_expression_analysis_4features_sex.txt.gz") df = pd.read_c...
0d8d3591d2165d005785e655c3f99d4c3d98a62ae0aa1f1567c8ea202d8ce4fa
Jupyter
1,982
87
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/together.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Together AI LLM # # This notebook shows how to use `T...
6ef9631eb8abfd9fea7721d703d2f05eb8aaa5c4ebea287266cfd31539418d37
Jupyter
2,025
110
# %% [markdown] # <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/friendli.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # %% [markdown] # # Friendli # %% [markdown] # ## Basic Usage # %% [mark...
ed06744ed6d11106d9f6b91f3d29f45e22032b629a4b596ca9e6a979783c94cf
Jupyter
2,040
72
# %% [markdown] # # Get References from PDFs # # This guide shows you how to use LlamaIndex to get in-line page number citations in the response (and the response is streamed). # # This is a simple combination of using the page number metadata in our PDF loader along with our indexing/query abstractions to use this ...