Created
November 18, 2025 21:50
-
-
Save edavidaja/fda738a4f30db866f78897f23768044f to your computer and use it in GitHub Desktop.
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(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