This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Cydar batch correction" | |
author: "" | |
date: "`r Sys.Date()`" | |
output: | |
html_document: | |
toc: true | |
toc_float: true | |
toc_depth: 3 | |
code_download: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Include docstring package to render documentation | |
if (!requireNamespace("docstring", quietly = TRUE)) { | |
install.packages("docstring") | |
} | |
library(docstring) | |
average_expression_heatmaps <- function(object, | |
assay = NULL, | |
columns_to_keep = NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Include docstring package to render documentation | |
if (!requireNamespace("docstring", quietly = TRUE)) { | |
install.packages("docstring") | |
} | |
library(docstring) | |
catalyst_expression_heatmaps <- function(sce, | |
by = "sample_id", | |
by_keep = NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render_md_as_rmd <- function(file, overwrite = TRUE, ...) { | |
file_name <- fs::path_ext_remove(file) | |
file_to_render <- fs::file_copy( | |
path = file, | |
new_path = fs::path(file_name, ext = "Rmd"), | |
overwrite = overwrite | |
) | |
tryCatch( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Tidytuesday - Week 29" | |
format: | |
html | |
--- | |
## Libraries | |
```{r libraries} | |
library(tidyverse) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The goal of this file is to provide a FastAPI application for handling | |
# chat requests amd generation AI-powered responses using conversation chains. | |
# The application uses the LangChaing library, which includes a chatOpenAI model | |
# for natural language processing. | |
# The `StreamingConversationChain` class is responsible for creating and storing | |
# conversation memories and generating responses. It utilizes the `ChatOpenAI` model | |
# and a callback handler to stream responses as they're generated. | |
# The application defines a `ChatRequest` model for handling chat requests, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""QA Chatbot streaming using FastAPI, LangChain Expression Language , OpenAI, and Chroma. | |
Features | |
-------- | |
- Persistent Chat Memory: | |
Stores chat history in a local file. | |
- Persistent Vector Store: | |
Stores document embeddings in a local vector store. | |
- Standalone Question Generation: | |
Rephrases follow-up questions to standalone questions in their original language. |