sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
07569a10bc777aff9a761f367632d2e3a808d38b171d692e4664470e43e95e40 | Jupyter | 9,971 | 211 | # %% [markdown]
# # Structure of State Tensors
#
# In this tutorial, we will go over the different types of states used in MotorNet, how they flow during simulation, how they are structured and what information they carry.
#
# Let's start by importing what we need.
# %%
import os
import sys
import numpy as np
impor... |
ee3365ad4b355508bb50b28ee4c075a46324ddf21942a2def27fd608d967a477 | Jupyter | 9,978 | 432 | # %%
import pandas as pd
# %%
df_maf = pd.read_csv("maf_matched.csv", index_col=0)
# %%
df_groups = pd.read_csv("Allgroups_noDupIDs.csv", index_col=0)
# %%
df_maf.shape, df_groups.shape
# %%
common = list(set(df_maf.index.tolist())&set(df_groups.index.tolist()))
print(len(common))
# %%
df_maf, df_groups = df_maf.l... |
c363a338620ce6a852a0d2fc1a979dbc2fbedd0dc8a323cf01fe8da80e61137e | Jupyter | 10,009 | 347 | # %%
import nbimporter
from functions import *
%matplotlib inline
# %%
D7_dir='/home/mahdi/Desktop/data_selection_D7'
n,name=count(D7_dir)
out_dir='/home/mahdi/Desktop/valid'
n1,name1=count(out_dir)
# %%
i=0
reference=0
maximum_intensity=1705
loadable_model='200epoch_with_val.h5'
slice_num=5
# %% [markdown]
# # plot... |
dea502d6a22a54c7c506127b1bac45e6ef7ee47dc5f14f82550f46bdbe863996 | Jupyter | 10,026 | 310 | # %% [markdown]
# # Calculate RXE for public dataset, females only based on Apua's script
# This has been edited from Apua's script.
# %%
import numpy as np
import pandas as pd
from os import environ
from plotnine import *
from pyhere import here
import re, session_info
import statsmodels.api as sm
from functools impo... |
dcab0e936514bd2d14cddc50a3c267c04fecc6542caed7c37e5fd868102b4cdc | Jupyter | 10,046 | 260 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/agent/memory/composable_memory.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Simple Composable Memory
# %% [mark... |
117126b98004b84c5623f2b11b38ba2a1e4952a051793767ca6213c6ab3c544e | Jupyter | 10,054 | 338 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/multi_modal/cohere_multi_modal.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Multi-Modal Retrieval using Cohere M... |
8ceacc71afa917d73334e17ffbc6a37921ade5a08cc1749b56c18a24c85ab0c2 | Jupyter | 10,080 | 294 | # %% [markdown]
# # Local excitation/lateral inhibition linear rate model
# %% [markdown]
# ### The following code will provide an example of the effect of various input patterns have on the outputs of a recurrant network with local excitation/lateral inhibition connectivity.
# %% [markdown]
# ### Imports
# %%
impor... |
cd07f31f4789e51f57670f928a25bfe063c3ac5a1b6dc3a3fb5d9323a99fb5a8 | Jupyter | 10,080 | 316 | # %% [markdown]
# %%
# make sure jupyter path is correct for loading local moudules
import sys
# path to KineticAssembly_AD module relative to notebook
sys.path.append("../../")
import copy
from KineticAssembly_AD import ReactionNetwork, VectorizedRxnNet, VecSim, Optimizer, EquilibriumSolver
import networkx as nx
imp... |
77df9150b55bffaf835da87ae1c7b4ce1e864914fd1932f36534a7b30adc3dd0 | Jupyter | 10,126 | 288 | # %% [markdown]
# # AnnotationStore Neighbourhood Querying Benchmark
#
# In this notebook the neighbourhood querying capability of the toolbox is benchmarked.
#
# Here we will be searching for annotations labelled "A" within a distance $k$ of annotations labeleld "B":
#
#  workloads that allows you to query data based on semantics, rather than keywords.
# One of the biggest benefits of Oracle AI Vector Search is that semantic search on unstructured data ... |
287e908609d36a26014d5c2abc59d7c7aa7aebe80a0472069b596efa85c78ff9 | Jupyter | 10,186 | 215 | # %% [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... |
3150aac604992d68c6ad4d7c17d47730a6627583279076df5348eb18bb07c132 | Jupyter | 10,186 | 227 | # %%
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib.colors import LogNorm
import pickle
import seaborn as sns
import scipy
import gseapy as gp
lib_names = gp.get_library_name(organism='Human')
# %% [markdown]
# # Module-level analyses
# %%
# save gsea... |
3e460e4e8b4adc9230064fbf7450754c753cdb955bb435a9c9be7c518ee97dcb | Jupyter | 10,189 | 352 | # %% [markdown]
# # Router QueryEngine and SubQuestion QueryEngine
#
# In this notebook we will demonstrate:
#
# 1. **RouterQueryEngine** - Handle user queries to choose from predefined indices.
# 2. **SubQuestionQueryEngine** - breaks down the complex query into sub-questions for each relevant data source, then gath... |
cbb5da8940debf6b147fe0c620a11090f58a841dc04036a5a773ef83acc9b2b1 | Jupyter | 10,189 | 337 | # %%
import os
import sys
module_path = os.path.abspath(os.path.join('..'))
if module_path not in sys.path:
sys.path.append(module_path)
# %%
from utils.io import preprocess_data
import numpy as np
from paths import TRAINING_DATA_PATH
import glob
import matplotlib.pyplot as plt
import umap
from sklearn.preprocessi... |
737352171102d54d3510c712498701a872d4c80596632d3dac8d8afbafbadf20 | Jupyter | 10,205 | 235 | # %% [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... |
6ef8c61ce2ba472e1b63756c8277b6da69283580f002ccfd319dafb11310eb3f | Jupyter | 10,233 | 279 | # %%
import os, glob
import matplotlib.pyplot as plt
import loompy
import numpy as np
import pandas as pd
from cytograph.visualization.scatter import *
from pybedtools import BedTool
import torch
from deeplift.dinuc_shuffle import dinuc_shuffle
from deeplift.visualization import viz_sequence
from twobitreader import ... |
61f93ecaf5031d536209e622f5b4ae08dde1a3206ea95f0ec2649206d1fdb37b | Jupyter | 10,253 | 155 | # %% [markdown]
# MultiRAT preprocessing
# ================
# Joanes Grandjean
#
# 
#
# # Purpose
# In this section I re-submit failed `confound_correction` steps. These seemed to happen for two reasons: improper low pass filter for long TR dataset in the `aromal` strategy, or fai... |
453bf5a00bc1e93a8047424be9f57ff60589eb6daf1773a1831e39907fc3f35e | Jupyter | 10,264 | 365 | # %%
import numpy as np
import xarray as xr
import pandas as pd
from pathta import Study
from frites import set_mpl_style
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
import matplotlib.image as mpimg
from matplotlib.lines import Line2D
from ipywidgets import interact
# from paper_... |
3d07c56f12903a9917a8340867f44e3548905e1efde610e5de4c594bd7a37b42 | Jupyter | 10,287 | 325 | # %% [markdown]
# # Generate molecules. Export molecules into csv files
#
# %% [markdown]
# **Codes in this notebook are created mainly by Haotian Cui, and with minor adaptation by Gen Li**
# %% [markdown]
# Ps:Each block of code with no additional comments for modification is executed by clicking the Run button to ... |
a8db360cf925c315804007b9818cba8ee9b2f8c89a863521c8883752ed1e1654 | Jupyter | 10,291 | 231 | # %% [markdown]
# <a href="https://colab.research.google.com/github/HIRIS-Lab/HistologyHSI-GB/blob/main/main.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Introduction
#
# This notebook is intended to provide an basic example ... |
e0800e9aa1d49c2bbe5b012f7cd27e14f5ec79b1ff86ce8f0f3208ff4ad1be2e | Jupyter | 10,328 | 406 | # %%
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... |
b218695aa7f8dbb125ab5525efec008fc7005faca741d6c9637788dd018836fb | Jupyter | 10,379 | 260 | # %% [markdown]
# Install and Import Necessary Libraries
# %%
!pip install -q condacolab
import condacolab
condacolab.install()
!conda install -c bioconda anarci
# %%
# Import libraries
import numpy as np
import pandas as pd
import random
import matplotlib.pyplot as plt
from numpy.random import seed
# Import machi... |
66b027be7cb75d30566d6df300cc88b82728d23aa585606b186ed7dfc95cd201 | Jupyter | 10,381 | 268 | # %% [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... |
678b2d5d39e425eb14a806639570a5a17018ea469db22497125b902e27acd7c1 | Jupyter | 10,390 | 277 | # %%
# -- 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.... |
9ed9a339e12035bd766c8803122a379d0885c9cb0aaf452deeec598451960f3b | Jupyter | 10,424 | 292 | # %%
import os
import gc
import pathlib
import scipy.io
import pandas as pd
import numpy as np
import datetime as dt
from ctypes import *
from pypl2 import pypl2api, pypl2lib
# %% [markdown]
# ### take trial type under consideration
# %% [markdown]
# # handle files
# %%
def get_files_list(dir_name, files_type):
... |
b3245234424cc0541b491e349b998df907e5ad0999aae7377a74eda00b9737fe | Jupyter | 10,426 | 351 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/multi_modal/gpt4v_multi_modal_retrieval.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
#
# # Advanced Multi-Modal Retrieval using GPT4... |
0193af0812313b835722258ced5aec57f883da38fa21a3f542dc65c51b10fe43 | Jupyter | 10,475 | 302 | # %%
import csv
import random
import numpy as np
import json
import warnings
import operator
import h5py
from keras.models import model_from_json
from keras import backend as K
warnings.filterwarnings("ignore")
def format_tool_id(tool_link):
"""
Extract tool id from tool link
"""
tool_id_split = too... |
818542c175966825fd4e7668830c6e490dfc7a1762a2d79156adce87153dc81f | Jupyter | 10,494 | 295 | # %% [markdown]
# # Optimization Framework using auto-diff to optimize binding rates
#
#
# %% [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' v... |
2b49582519d2ec5ad3ff3d3b559fbba1a57033df74708bf6b09df0a96dd677d6 | Jupyter | 10,522 | 300 | # %% [markdown]
# # Optimization Framework using auto-diff to optimize binding rates
#
#
# %% [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' v... |
319e1e17170304ef874705dab617c31b9ecc6155ba3d5222d5ac98c229c5f47c | Jupyter | 10,527 | 216 | # %% [markdown]
# # Acquiring Data with Pycro-Manager
# %% [markdown]
# This tutorial demonstrates how to use the `Acquisition` class in Pycro-Manager to acquire data, as well as several powerful features that the class provides. As the areas highlighted in red in the figures below demonstrate, we'll be using several ... |
4719e4a2ab7bf448994baee2983ba2eb7d7fc6074c6c212bdcb9ba00effcde29 | Jupyter | 10,534 | 274 | # %% [markdown]
# # Import libraries and define functions + Initial setup
# %%
## Import Libraries
import pandas as pd
import numpy as np
from matplotlib_venn import venn2, venn2_circles, venn2_unweighted
from matplotlib_venn import venn3, venn3_circles
from matplotlib import pyplot as plt
%matplotlib inline
import se... |
7c0bb325dfacb820bc8e66b84d436c7dd13207bf58a24e9f22776ad12dd488bb | Jupyter | 10,540 | 297 | # %% [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... |
93b62cdc0c8139133cd9a66e8e37e8eb3aeb38f47741f9beea511b93e6f2ec1b | Jupyter | 10,591 | 219 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/evaluation/UpTrain.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # How to use UpTrain with LlamaIndex
# %% [markdo... |
4350ce2debebb667e296602a678606d4cd04ccfbec0d0ebeea25307c25885a63 | Jupyter | 10,608 | 306 | # %% [markdown]
# # Wu et al. combinatorial GB1 library extrapolation analysis
# %%
import os
from itertools import chain
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy.stats as st
from scipy.stats import spearmanr
# %%
CM = 1/2.54
WT = "MQYKLILNGKTLKGETTTEAVDAATAEKVFKQYANDNGVDGEW... |
162c2b088c6dcad340f1141a15b577f679e80f0ae47bf3f98b21b093e9952d8d | Jupyter | 10,624 | 229 | # %% [markdown]
# # Creating Weighted Moves
#
# This notebook was created in August 2016 during exploration in how to bias different types of moves in chemical space for the development of smirky and future chemical perception move proposal tools.
#
# **Authors**
# * Christopher I. Bayly OpenEye Scientific Software ... |
88e9284bebee3020872cfa7d18b66f2c0fc4569dab7b498f6438e4d66a48a22e | Jupyter | 10,635 | 367 | # %% [markdown]
# # Fine Tuning GPT-3.5-Turbo
#
# In this notebook, we walk through an example of fine-tuning gpt-3.5-turbo.
#
# Specifically, we attempt to distill GPT-4's knowledge, by generating training data with GPT-4 to then fine-tune GPT-3.5.
#
# All training data is generated using two different sections of ... |
4c1c65e6e5ff07def46ca667523ceb0186c4b04c1b0406e0c827629e4dce7e6e | Jupyter | 10,724 | 323 | # %%
import pandas as pd
import numpy as np
import anndata as ad
# %% [markdown]
# #### TCGA-BRCA (The Cancer Genome Atlas - Breast Cancer)
# %%
tcga = pd.read_csv(bkdata_path, sep='\t')
tcga = tcga.sort_index()
tcga.to_csv('../DATA/TCGA/TCGA_GDC_HTSeq_TPM.csv')
# %%
abis = pd.read_csv('../DATA/GSE107011/GSE107011_P... |
3a3c886469811bbf9007e7d99d81375085da59d33eee7371fc86746449561eb6 | Jupyter | 10,737 | 351 | # %%
## Import dependencies
import numpy as np
from os import path
import matplotlib.pyplot as plt
import os
import nmrglue as ng
import seaborn as sns
import sklearn
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error
import torch
import torch.nn as nn
import torch.opti... |
a79f04f4ea5ce748fd3eea5e87a1857468f2fda8b7283cad2da3bb3bdf4f8c01 | Jupyter | 10,742 | 391 | # %% [markdown]
# # 202311 Dataset Annotation
# %% [markdown]
# ## Please launch with command
#
# panel serve leaf_patch_annotation.ipynb --show --dev
#
# from the "src" folder
# %% [markdown]
# ## Source Selection
# Three options for SOURCE_FILE:
# - oiv_annotation.csv for the already annotated CSV file
#... |
f4819877c40351247b5419c670c727ec7c569784fcedc0b659399aa80886e859 | Jupyter | 10,744 | 317 | # %% [markdown]
# # Differential Expression using CMC scripts
# %%
# Dependencies
suppressMessages({library(CovariateAnalysis)
library(variancePartition)
library(BiocParallel)
library(data.table)
library(tidyverse)
library(synaps... |
690f8863932044aaf847b7d289884f6d590356f336061054a2dcbc0a8298a519 | Jupyter | 10,748 | 392 | # %% [markdown]
# # Supp: clinical scores group comparisons
# %% [markdown]
# - Project: HCP-EP
# - File Name: clinical_group_differences
# - Author: Haley Wang
# - Date Created: 2023-9-22
# - Last Modified: 2023-9-22
# - Code Status: Testing
# %%
import numpy as np
import pandas as pd
impor... |
91356e9b95466d980b62b099f0c8c2da8414e429e4526fa8f7d69194ac087390 | Jupyter | 10,763 | 249 | # %% [markdown]
# # Minimal model
# ## From Cole et al. (preprint), https://doi.org/10.1101/292045
#
# ## Illustrating effect of task timing as confound for task-state FC estimation
#
# ### Also: illustrating remaining effects of task timing on time series after "controlling" for task timing, due to temporal autocorr... |
14c3fcbce85ab448f6f8c8f772b04a873ad3e5171eead8a8f9888cac3dd53aa1 | Jupyter | 10,826 | 300 | # %% [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... |
cc2a0a2bc589a7fb770d6da4bb041628572c38ee838490e6423bbdc2dfdd6d3a | Jupyter | 10,828 | 439 | # %%
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
import shutil
import os
import subprocess
# %%
D7_dir='/home/mahdi/Desktop/data_selection_D7'
n,name=count(D7_dir)
out_dir='/home/mahdi/Des... |
c1754106e10d397432a5425279c03f447b7e22ad10c78db5b29a6e6984a33848 | Jupyter | 10,895 | 272 | # %% [markdown]
# # Tutorial 1 - Getting started
# %%
import os
from IPython import display
# %%
import imagingplus as ip
# %% [markdown]
# This notebook demonstrates a basic workflow through `imaging+`. We will take raw input files and create a multi-level data object that can be used for calcium imaging data proce... |
7de7c4e15c2144166ed2c0aca5455edf689fdfd09a928c5144987dd1578ae5d9 | Jupyter | 10,903 | 423 | # %%
import pandas as pd
import numpy as np
import os
import json
import altair as alt
import numpy as np
import glob
# %%
RELAX_FILES = [os.path.join("..", "results", "mammalian_REM2", "mammalian_REM2_codons.SA.fasta.RELAX.json")]
pvalueThreshold = 0.05
# %%
def getRELAX_TR(JSON):
print("# Opening:", JSON)
w... |
9aba5e37c27486365e3cb48648cb1f88de7c0a41108b81a1cb272c112a14a3cf | Jupyter | 10,910 | 292 | # %%
from itertools import chain
from functools import reduce
import pandas as pd
import numpy as np
from sklearn.manifold import MDS
import scipy
from matplotlib.colors import LinearSegmentedColormap
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
AAs = 'ACDEFGHIKLMNPQRSTVWY-'
WT = "MQYKLILN... |
8005b55d5a241b987a3b6720894dd46c54236230832914762532471891feac56 | Jupyter | 10,937 | 454 | # %%
import pandas as pd
import numpy as np
import os
import json
import altair as alt
%matplotlib inline
import numpy as np
import networkx as nx
#import altair as alt
import nx_altair as nxa
import matplotlib.pyplot as plt
# %%
JSON_FILE = os.path.join("..",
"results",
... |
042eb37bf27ef872518cda9107a96638c24175e6486b6d18fe11a382c2a1843c | Jupyter | 10,942 | 277 | # %%
import nibabel as nib
import nilearn.plotting as niplt
%matplotlib inline
import numpy as np
from pylab import *
# %%
rois=rois=['PostTemp','AntTemp','AngG','IFG','IFGorb','MFG','vmPFC','dmPFC','PMC','HG','V1']
parcel2roi=np.load('/jukebox/griffiths/bert-brains/black_data/Parcel2ROI.npy')
parcellation_nii=nib.loa... |
be5cf47a5d55b8764b6884a8a49359cba70d90c875051cfa5924a6404fdc6a4c | Jupyter | 10,944 | 303 | # %% [markdown]
# # Chroma quickstart
#
# 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 runni... |
be8f4330f5aa08878abbed216f8d7957028715b5fcd51f635c822b68e643b3e0 | Jupyter | 10,958 | 279 | # %% [markdown]
# # Check two SMIRNOFFs have the same typing
#
# This notebook was created to check that a change to a SMIRNOFF force field doesn't change the way it types
# molecules. This concern came from switching the decorator `'R'` to `'x'` so that the SMIRKS in the SMIRNOFF format would be compatible with OEtoo... |
47f892b486e5f12336e06f54fe21fe2b73878fcbcadbfaa02705b69cf90dcd8c | Jupyter | 10,970 | 300 | # %% [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... |
b558a6236053548af3bb4ddfb77452b817e29550d6a99a01b6ccecb3114e185d | Jupyter | 10,997 | 360 | # %%
#!/usr/bin/Rscript
#############################################################
options(stringsAsFactors = FALSE)
##############################################################
suppressMessages(
{
library(tidyverse)
library(data.table)
library(dynamicTreeCut)
library(fastcluster)
library... |
68a97350e84c5e931d22b5867f84c81357020159acad00888a6601a109b5a38d | Jupyter | 11,010 | 229 | # %% [markdown]
# # Building a custom task and network
#
# The purpose of this notebook is to create a network to control a plant, and to declare a task that the network can learn through the optimization process. The actual optimization process, and how to save and re-load a network will be discussed in another noteb... |
2d0be864de511486a87a7dcaef03d5f62f3cfc5d10aca5fb9becf4df374af012 | Jupyter | 11,042 | 408 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/finetuning/openai_fine_tuning_functions.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Fine Tuning with Function C... |
48aed42617f311902bdd87b827c73b91f00797bbe2cc89f4b75126f37506031c | Jupyter | 11,056 | 272 | # %%
import os
import pandas as pd
import json
import numpy as np
from collections import OrderedDict
from data.load import load_dataset
import matplotlib.pyplot as plt
import matplotlib.cm as cmap
import matplotlib as mpl
stat_file_name = 'df_metrics.csv'
MEAS_PATH = 'results/gradient_run/'
DATA_PATH = '/home/balint/... |
98e8d46c5d39ded346251f5f9e5191d0cc2f1d65c495a0a53269a9c40d421ea2 | Jupyter | 11,076 | 291 | # %%
# -- 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.... |
e506c640933e9676962c14c7a8d852422109a6925254378a7d7f6cbd71b52f68 | Jupyter | 11,084 | 291 | # %%
# -- 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
... |
f8ec653acbc7ed7d12e73015322a871a9356856c98e8952550ed74e73dea2168 | Jupyter | 11,086 | 285 | # %% [markdown]
# # Google AlloyDB for PostgreSQL - `AlloyDBChatStore`
#
# > [AlloyDB](https://cloud.google.com/alloydb) is a fully managed relational database service that offers high performance, seamless integration, and impressive scalability. AlloyDB is 100% compatible with PostgreSQL. Extend your database applic... |
3e0ee158d2c849d35df498aa0d0e3f8865bf0ffbe3984ec3dcbe4e73b238a2e8 | Jupyter | 11,092 | 370 | # %% [markdown]
# # `CleanSamples` model
# %%
# srun --nodes=1 --ntasks=1 --cpus-per-task=24 --mem=100g --time=04:00:00 --pty bash -i
# Sconda conda activate tensorflow2; cd /mnt/BioAdHoc/Groups/RaoLab/Edahi/Projects/09.TimeCourse5hmC/ForFerhatGit/FCDNN/results/cross_validation_allsamples; python
# %%
%load_ext lab... |
d2c2391d962c6249383f7fd752505e651036e1112700d718cec88b3743238fb4 | Jupyter | 11,094 | 373 | # %% [markdown]
# ##
# %% [markdown]
# # Creating a CodeAct Agent From Scratch
#
# While LlamaIndex provides a pre-built [CodeActAgent](https://docs.llamaindex.ai/en/stable/examples/agent/code_act_agent/), we can also create our own from scratch.
#
# This way, we can fully understand and customize the agent's behavi... |
c442edd9810dceea6829337757c8ef97a450006b3753c1bfd8b0c6e536298b94 | Jupyter | 11,122 | 303 | # %% [markdown]
# ## Multisensory modulation (Fig 6)
# This code examines how single neurons were modulated by multisensory information compared to unimodal information.
# %%
import os
from pathlib import Path
import numpy as np
import pandas as pd
from scipy import stats
import statsmodels.api as sm
import pingouin... |
a8c8472d43863c2058dce7bf327857df45663df9213a83ca1163e847688c24b4 | Jupyter | 11,168 | 255 | # %% [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... |
2790a60ff5d42312f8201b1e836fe35dd1772d4d1cfbd06c45a9799535704e47 | Jupyter | 11,170 | 293 | # %%
# -- 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.... |
40cf09083812877009687814e36a8fb60ba2d0798284743bf8edfb17859c018b | Jupyter | 11,194 | 354 | # %%
import os
import pickle
import numpy
import pandas
import matplotlib
from matplotlib import pyplot
import seaborn
import scipy.sparse as sp
import scipy.io as spio
import logomaker
# %%
%matplotlib inline
matplotlib.rcParams['figure.dpi'] = 120
matplotlib.rcParams['font.sans-serif'] = 'Helvetica'
pandas.set_op... |
0cbd19aa689b828336b3a28633c86d086e697ff3280baf02e8158b9a4ba835bc | Jupyter | 11,206 | 296 | # %% [markdown]
# Peakcalling Bam Stats and Filtering Report - Insert Sizes
# ================================================================
#
# This notebook is for the analysis of outputs from the peakcalling pipeline
#
# There are severals stats that you want collected and graphed (topics covered in this noteb... |
72adabc72d2b4086de70068d840c652a1a16c958934447882d54bff3bd682d4d | Jupyter | 11,212 | 261 | # %% [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... |
55c6ec0a5a2f4576f4186dd165194de5573f95995b114cb763a65ba2da8f73cb | Jupyter | 11,224 | 319 | # %% [markdown]
# # Optimization Framework using auto-diff to optimize binding rates
#
#
# %% [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' v... |
e116f9eecb97e35b7eed2f5fc71c4f7f63deb50dfd50cd3c199f4945a49b228f | Jupyter | 11,252 | 354 | # %% [markdown]
# # Evaluating RAG Systems
#
# Evaluation and benchmarking are crucial in developing LLM applications. Optimizing performance for applications like RAG (Retrieval Augmented Generation) requires a robust measurement mechanism.
#
# LlamaIndex provides essential modules to assess the quality of generated... |
ae87021c1c6730e72afed82e761947bde191c459a5370d1e0803703316fb80eb | Jupyter | 11,278 | 187 | # %%
# imports
from pathlib import Path
from astrocast.denoising import Network, PyTorchNetwork, SubFrameDataset, SubFrameGenerator
# %% [markdown]
# # General considerations
#
# This training is generally a one-time requirement; once completed, the model can be reapplied to subsequent datasets without the need for r... |
e2ff39862961d3fc7d8ed5fef38686f41f4c3c4edba613f9dd796ba9a154ae58 | Jupyter | 11,296 | 230 | # %% [markdown]
# # Create a custom Task
#
# In this tutorial, we will go over `Task` objects, how they work and how to build a custom subclass to implement your own task design.
#
# Let's start by importing what we need.
# %%
import os
import sys
import numpy as np
import tensorflow as tf
from IPython import get_ip... |
02fa9e64f95ba60b16c0ac06a354c8911a4b701e8de8b1498767fc3d9fc1bc3e | Jupyter | 11,300 | 347 | # %% [markdown]
# # NVIDIA NIMs
#
# The `llama-index-llms-nvidia` package contains LlamaIndex integrations for chat models and embeddings powered by [NVIDIA AI Foundation Models](https://www.nvidia.com/en-us/ai-data-science/foundation-models/), and hosted on the [NVIDIA API Catalog](https://build.nvidia.com/). NVIDIA ... |
dd42418df863f10e040794a8d493991da60239633b6ed00f967a65e8a2a3a714 | Jupyter | 11,303 | 354 | # %% [markdown]
# # Built-In Observability Instrumentation
#
# Within LlamaIndex, many events and spans are created and logged through our instrumentation system.
#
# This notebook walks through how you would hook into these events and spans to create your own observability tooling.
# %%
%pip install llama-index tre... |
3a5d370373770f49e3064f7de10226a463265b192dc994da3fbc4c4e1a8f7732 | Jupyter | 11,358 | 286 | # %%
## Import
import os
from fetalxbrainxmultiomics.deepNeuron.model import ConvolutionalClassificationModel
from fetalxbrainxmultiomics.deepNeuron.utils import *
import torch
from torch import nn
import numpy as np
import matplotlib.pyplot as plt
# %% [markdown]
# ## 1a. How to load the trained model
# %%
model = ... |
898d60ad9c9c350ee02bc14335a7ca64a3cc8286c7ebc5446be8dab504c3759b | Jupyter | 11,369 | 286 | # %%
## Import
import os
from fetalxbrainxmultiomics.deepNeuron.model import ConvolutionalClassificationModel
from fetalxbrainxmultiomics.deepNeuron.utils import *
import torch
from torch import nn
import numpy as np
import matplotlib.pyplot as plt
# %% [markdown]
# ## 1a. How to load the trained model
# %%
model = ... |
376d67b4f9b175fb1f06e3d79f98b825211f7afa3b6119d300679563c8afe7e6 | Jupyter | 11,393 | 294 | # %% [markdown]
# Install and Import Necessary Libraries
# %%
!pip install -q condacolab
import condacolab
condacolab.install()
# %%
from google.colab import drive
drive.mount('/content/drive')
# %%
%cd /content/drive/MyDrive/DeepSP
# %%
import sys, site
print("Python:", sys.version)
print("Executable:", sys.execut... |
cef69cefada07064c98038093f76bc2297a4649a079712ae4c5dac0ed73e9d7c | Jupyter | 11,407 | 230 | # %% [markdown]
# # Read and Visualize a WSI
#
# Click to open in: \[[GitHub](https://github.com/TissueImageAnalytics/tiatoolbox/blob/develop/examples/01-wsi-reading.ipynb)\]\[[Colab](https://colab.research.google.com/github/TissueImageAnalytics/tiatoolbox/blob/develop/examples/01-wsi-reading.ipynb)\]
#
# %% [markdo... |
1624d5a60becfc9973e112dbc4e268248c558b712b2dd51a58d30a4a1e639a76 | Jupyter | 11,430 | 275 | # %%
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import bioframe
from pybedtools import BedTool as pbt
import bbi
import cooler
import cooltools
# %% [markdown]
# ### 1. Study general properties
# %%
window = 120
map_size = 15
boundaries_plus = pd.read_csv(f"../data/bo... |
a53f11cd71a12c8e006d601a7c5caeb4a725943e929cf82284c4f9b5706033ab | Jupyter | 11,435 | 230 | # %% [markdown]
# ## notebook 03 c: repeatability analysis.
#
# As an alternative to quantifying the individual differences of median position error and comparing the distributions for the effect from 0 to 3 objects, and separately from 3 to 99 objects, we can use our established linear regression model with fixed ord... |
7e58a9e7058871182cb14cf6501b64e9a508ede4cf03f86b0d91de7bf099f648 | Jupyter | 11,436 | 230 | # %% [markdown]
# ## notebook 03a2: accuracy repeatability analysis
#
# As an alternative to quantifying the individual differences of median position error and comparing the distributions for the effect from 0 to 3 objects, and separately from 3 to 99 objects, we can use our established linear regression model with f... |
b934d3e534fecff7ce5cc807ba4348eb7316ca51c38fabd8b9f9b5934770ed6c | Jupyter | 11,496 | 230 | # %% [markdown]
# ## notebook 03p2: precision repeatability analysis
#
# As an alternative to quantifying the individual differences of position error variance and comparing the distributions for the effect from 0 to 3 objects, and separately from 3 to 99 objects, we can use our established linear regression model wit... |
597a5ca672b648171639e1e392052360369e3795580904f613e763fce1bbdfda | Jupyter | 11,502 | 312 | # %% [markdown]
# ### Generate multiple yield vs time curves from Kinetic Simulations ###
#
# Here we fix a kinetic protocol (rategrowth, diversification) and the type of optimization (kon or dG) and generate yield vs time curves at different concentration ranges. To change concentration before starting a simulation r... |
7824c94068e5d6c02f5850818c3fb5fa58af679641e02739e8154e5ed6661100 | Jupyter | 11,519 | 317 | # %% [markdown]
# # Library Import and Functions
# %%
## Import Libraries
import pandas as pd
import numpy as np
from matplotlib_venn import venn2, venn2_circles, venn2_unweighted
from matplotlib_venn import venn3, venn3_circles
from matplotlib import pyplot as plt
%matplotlib inline
import seaborn as sns
from wordclo... |
9bb1299d62af7f4c8cb89171fe5981600764eb55961edd728952739c809629b8 | Jupyter | 11,585 | 289 | # %%
import os
# this stops jax from stealing all the memory
os.environ["XLA_PYTHON_CLIENT_PREALLOCATE"]="false"
import jax
jax.config.update("jax_default_device", jax.devices("cpu")[0])
import svgutils.compose as svg
import seaborn as sns
import matplotlib.pyplot as plt
import jax.numpy as jnp
from glob import glob... |
6a5332d23074006322bf48eb60b6d880d7b38380c1defe31a0c4f11a881f6bb2 | Jupyter | 11,586 | 326 | # %%
import os
import dynamics
from packaging import version
import tensorflow as tf
import pandas as pd
from matplotlib import pyplot as plt
from scipy import stats
import glob
import numpy as np
import matplotlib.pyplot as plt
import hypernetx
from models import HigherOrderModel
import torch
from utils import return_... |
59ee8f82bc4333f80298c7c810d76d76c52171f088760ceed651287281fc9ac7 | Jupyter | 11,625 | 334 | # %% [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... |
b6bd658b207e7b879c5dc702286305a3dcf1d004d8d94c34fd6e9737b97508d4 | Jupyter | 11,646 | 375 | # %% [markdown]
# # Plotting eQTLs, increase font sizes
#
# ### Kynon Jade Benjamin and Apuã Paquola
# %%
import re
import functools
import subprocess
import numpy as np
import pandas as pd
from plotnine import *
from pandas_plink import read_plink
from warnings import filterwarnings
from matplotlib.cbook import mplD... |
71d5d230a5e53646b517b3c67c8eb06e03c986cb9584689ad6b03538201a279f | Jupyter | 11,648 | 375 | # %% [markdown]
# # Plotting eQTLs, increase font sizes
#
# ### Kynon Jade Benjamin and Apuã Paquola
# %%
import re
import functools
import subprocess
import numpy as np
import pandas as pd
from plotnine import *
from pandas_plink import read_plink
from warnings import filterwarnings
from matplotlib.cbook import mplD... |
a5defaa92172e69d8c3217eda6c553bca40a252d5ea438ffd3dc60196905c9f0 | Jupyter | 11,652 | 375 | # %% [markdown]
# # Plotting eQTLs, increase font sizes
#
# ### Kynon Jade Benjamin and Apuã Paquola
# %%
import re
import functools
import subprocess
import numpy as np
import pandas as pd
from plotnine import *
from pandas_plink import read_plink
from warnings import filterwarnings
from matplotlib.cbook import mplD... |
d9baf439cece9ea36470b3dc79b5ae3cc05fbf61e1f713382a430cba2df24304 | Jupyter | 11,667 | 360 | # %%
import numpy as np
from scipy.spatial import distance_matrix
from sklearn.base import BaseEstimator, ClusterMixin
from sklearn.metrics import pairwise_distances
from scipy.spatial import KDTree
# %%
import numpy as np
class dCrawler: #changed to fit the name / description
def __init__(self, threshold=1.0, ma... |
9c42f1a9b20d99323e6d9a584fc5e1dbc585e3018e922aad9280b3f9736aa5e4 | Jupyter | 11,678 | 366 | # %% [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... |
4813fd6bc0538e41da3a7e8917b231e9e0707fafe56115fdd14b7bbb881bd3d0 | Jupyter | 11,697 | 319 | # %% [markdown]
# # Table of Contents
#
# ## - Import libraries and define functions + Initial setup
#
# ## - Pre-process files
#
# ## - Make table
# %% [markdown]
# # Import libraries and define functions + Initial setup
# %%
## Import Libraries
import pandas as pd
import numpy as np
from matplotlib_venn import v... |
874d8e6719f4efbbb913c959b7abc3dfd1dcc78e79a9421863e8597513bbe794 | Jupyter | 11,700 | 335 | # %% [markdown]
# # Table of contents
#
# ### - Import libraries and define functions + Initial setup
#
# ### - Get factoids
# %% [markdown]
# # Import libraries and define functions + Initial setup
# %%
## Import Libraries
import pandas as pd
import numpy as np
from matplotlib_venn import venn2, venn2_circles, ven... |
a4377182395991fa8775bdac507f18be8389910c89ba0082a916b2f82b33c0b9 | Jupyter | 11,709 | 396 | # %%
## Import dependencies
import numpy as np
from os import path
import matplotlib.pyplot as plt
import os
import nmrglue as ng
import seaborn as sns
import sklearn
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error
import torch
import torch.nn as nn
import torch.opti... |
d1a15ef820c9b3f5d2e140111c13f61ed19c294991bc8ee9e0b5b605a9481710 | Jupyter | 11,719 | 366 | # %% [markdown]
# # Building a network
#
# The purpose of this notebook is to create a network to control an effector, and to train it to perform a task through the optimization process. We will also briefly cover how to save and re-load a network.
#
# For how to build an effector and environment from scratch, feel f... |
1f491edca51c904a5e9f64bad40f362b3032383b4591bf4cc5bf2083f0a37c7d | Jupyter | 11,724 | 277 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/cookbooks/airtrain.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # AirtrainAI Cookbook
#
# [Airtrain](https://www.... |
2f85d925c3405e8dfebc83dd7205a6298f01899dc292de7a42832319e2875de2 | Jupyter | 11,724 | 358 | # %% [markdown]
# # Table of contents
#
# ### - Import libraries and define functions + Initial setup
#
# ### - Import data
#
# ### - Make Plots & Tables
# %% [markdown]
# # Import libraries and define functions + Initial setup
# %%
## Import Libraries
import pandas as pd
import numpy as np
from matplotlib_venn im... |
bbfd8c08cdaaa9b1869a23f1576ca211f1407a42dead043d2f83b5acc421030e | Jupyter | 11,730 | 404 | # %%
cd ~/git/scim
# %%
import tensorflow as tf
tf.compat.v1.enable_eager_execution()
import numpy as np
import pandas as pd
import anndata
from itertools import cycle
import scanpy as sc
from pathlib import Path
import warnings
from scim.model import VAE, Integrator
from scim.discriminator import SpectralNormCriti... |
1554d1c00a66255601b130cb6c1bcabaae76820c9bcd6b1df965c499ea8a0871 | Jupyter | 11,756 | 390 | # %% [markdown]
# <a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/llm/oci_data_science.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# %% [markdown]
# # Oracle Cloud Infrastructure Data Science
#
#... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.