Published: 2025-10-18
Author: Karo Zieminski
A growing library of repos, videos and skills for Claude Skills (100+)
Published: 2025-10-18
Author: Karo Zieminski
A growing library of repos, videos and skills for Claude Skills (100+)
| # an example server: acquaint's MCP server for R sessions | |
| r_process <- callr::r_bg( | |
| function() acquaint::mcp_server(), | |
| stdout = "|", | |
| stdin = "|" | |
| ) | |
| Sys.sleep(1) | |
| log_cat_client <- function(x, append = TRUE) { |
| YAHOO_CLIENT_ID="" | |
| YAHOO_CLIENT_SECRET="" |
| <# | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@#-:**************=*@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%-%+=%%%%%%%%%%%%%%-#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| %%%%%%%%%%%%%%%%%%##%%%%%%%%%%%%%%%%%%%%%%%:*%%=+%%%%%%%%%%%%%%.#@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| %%%%%%%%%%%%%%%%%%%#@%%%%%%%%%%%%%%%%%%@%%*#@%%@+%%%%%%%%%%%%%%%+%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| <# | |
| .SYNOPSIS | |
| Perform Git submodule update to any commit and/or branch. | |
| .DESCRIPTION | |
| This script performs Git submodules updates to any commit and/or branch. | |
| It allows you to update a submodule to the latest commit, to a specific commit, or to the latest/specific commit of a specific branch. | |
| It will automatically commit the changes to the parent repository, and optionally also push them to the remote repository. | |
| .PARAMETER pathToLocalRepo |
You are situated inside of an R package source directory. The subdirectory R/ contains source files. The subdirectory tests/testthat/ contains corresponding tests. e.g. R/task.R is tested primarily in tests/testthat/test-task.R.
Do not add new code comments, and only remove existing code comments if the comment isn't relevant anymore.
The package has not yet been published and does not have any users; remove functionality outright when it's no longer needed rather than beginning a deprecation process. No need to worry about breaking changes.
When testing code that raises a message, warning, or error, use expect_snapshot() (possibly with error = TRUE) instead of expect_message() or otherwise.
When you're running package tests, use devtools::load_all(); testthat::test_file("tests/testthat/path-to-file.R"). If you encounter namespacing issues, don't delete tests that otherwise should work, and instead ask me what to do.
| # This is a sample R Shiny app chatbot that runs local models with an Ollama server. | |
| # You also need Ollama installed and a ollama server running, plus at least one local model pulled. | |
| # I hard-coded a few local models, | |
| # If you use this, you'll want to hard code yours (including descriptions, or take those out) | |
| # Coded with lots of LLM help + Posit's Shiny Assistant. | |
| library(shiny) | |
| library(shinychat) | |
| library(bslib) |
| options(shiny.maxRequestSize = 5 * 1024^2) # Limit uploads to 5 MB | |
| library(shiny) | |
| library(magick) | |
| library(base64enc) | |
| library(bslib) | |
| # Helper function to sanitize file names | |
| safeFileName <- function(filename) { | |
| gsub("[^a-zA-Z0-9_.-]", "_", filename) |
You are a terse assistant designed to help R users write roxygen documentation according to CRAN and tidy style with a consistent format. Respond with only the needed R code, no backticks or newlines around the response. Intersperse newlines within function calls as needed, per tidy style.
As example, given the input:
#' app
#'
#' this makes an app
| function Invoke-AIChat { | |
| <# | |
| .SYNOPSIS | |
| Invokes an AI chat model to generate responses based on user prompts. | |
| .DESCRIPTION | |
| This function provides a unified interface to interact with various AI language model providers including: | |
| - Azure OpenAI Services | |
| - OpenAI API | |
| - Anthropic Claude |