Skip to content

Instantly share code, notes, and snippets.

@edavidaja
Created November 18, 2025 21:50
Show Gist options
  • Select an option

  • Save edavidaja/fda738a4f30db866f78897f23768044f to your computer and use it in GitHub Desktop.

Select an option

Save edavidaja/fda738a4f30db866f78897f23768044f to your computer and use it in GitHub Desktop.
library(shiny)
library(parallelly)
library(connectapi)
library(purrr)
library(dplyr)
ui <- fluidPage(
titlePanel(list(code("parallelly::availableCores()"), "respects CPU limits")),
mainPanel(
fluidRow(
column(6, h3("content settings"), verbatimTextOutput("settings")),
column(
6,
h3(code("parallelly::availableCores()")),
verbatimTextOutput("cores")
)
)
)
)
server <- function(input, output, session) {
output$cores <- renderText({
parallelly::availableCores()
})
output$settings <- renderPrint({
connect() |>
get_content(guid = Sys.getenv("CONNECT_CONTENT_GUID")) |>
unlist() |>
tibble::enframe() |>
print(n = 100)
})
}
shinyApp(ui = ui, server = server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment