-
iTerm2
-
Command Line Tools
xcode-select –install
This file contains hidden or 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
| <artifacts_info> | |
| The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity. | |
| # Good artifacts are... | |
| - Substantial content (>15 lines) | |
| - Content that the user is likely to modify, iterate on, or take ownership of | |
| - Self-contained, complex content that can be understood on its own, without context from the conversation | |
| - Content intended for eventual use outside the conversation (e.g., reports, emails, presentations) | |
| - Content likely to be referenced or reused multiple times |
This file contains hidden or 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
| # httpuv | |
| library(httpuv) | |
| handle <- function(req) { | |
| input <- req[["rook.input"]] | |
| postdata <- input$read_lines() | |
| jsonlite::toJSON(paste0("Hello ", | |
| jsonlite::fromJSON(paste(postdata)), "!")) | |
| } | |
| httpuv::runServer( | |
| host = "0.0.0.0", |
This file contains hidden or 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
| library(dplyr) | |
| library(arrow) | |
| library(duckdb) | |
| # install.packages(c("dplyr", "arrpw", "duckdb", "nycflights13")) | |
| ## Export the nycflights13 dataset to arrow format ---- | |
| nycflights13::flights |> |
This file contains hidden or 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
| ### Change these parts here ---------------------------------------------------- | |
| # Set to your working directory where there is a template.md file | |
| setwd(here::here()) | |
| # Locations | |
| vault_location <- stop('Add Vault Location') # Location of markdown files | |
| attachments_dir <- stop('Add Vault Subdirectory Location') # subdirectory of vault_location for png-files | |
| imap_mail <- stop('Set imap mail client') # mail client |
This file contains hidden or 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
| #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| # | |
| # ##### ### # ##### | |
| # # # # # # # # # | |
| # # # # # # # # | |
| # ##### # # # # ##### | |
| # # # # ####### # # | |
| # # # # # # # | |
| # ####### ### # ##### |
This file contains hidden or 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
| library(tidymodels) | |
| tidymodels_prefer() | |
| theme_set(theme_bw()) | |
| library(doMC) | |
| registerDoMC(cores = 20) | |
| # ------------------------------------------------------------------------------ | |
| data(ad_data) |
This file contains hidden or 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
| library(shiny) | |
| library(jsonlite) | |
| # we'll store received data in a local json file | |
| write_json(list(), "data.json") | |
| post_handler <- function(req, response) { | |
| # we'll catch everything that's POST for this demo but you'll want to make | |
| # sure you don't step on shiny's built-in POST handlers | |
| # (I'm pretty sure this handler is called after shiny's handlers but :shrug:) |
This file contains hidden or 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
| # | |
| # This is a Shiny web application. You can run the application by | |
| # clicking the 'Run App' button above. | |
| # | |
| # Find out more about building applications with Shiny here: | |
| # | |
| # http://shiny.rstudio.com/ | |
| # | |
| library(shiny) |
This file contains hidden or 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
| Menu entry Default shortcut~ | |
| Start/Close | |
| . Start R (default) \rf | |
| . Start R (custom) \rc | |
| -------------------------------------------------------- | |
| . Close R (no save) \rq | |
| . Stop (interrupt) R :RStop | |
| ----------------------------------------------------------- |
NewerOlder