-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Peter Solymos <psolymos@gmail.com>
- Loading branch information
Showing
259 changed files
with
500,763 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"name": "app.py", "content": "import seaborn as sns\nimport matplotlib.pyplot as plt\nfrom shiny import App, render, ui\n\nfaithful = sns.load_dataset(\"geyser\")\nx = faithful.waiting\n\n\napp_ui = ui.page_fixed(\n ui.panel_title(\"Old Faithful\"),\n ui.output_plot(id = \"histogram\"),\n ui.input_slider(\n id=\"n\", \n label=\"Number of bins:\", \n min=1, \n max=50, \n value=25,\n ticks=True\n ),\n)\n\ndef server(input, output, session):\n @output\n @render.plot(alt=\"Histogram of waiting times\")\n def histogram():\n plt.hist(\n x, \n bins = input.n(), \n density=False, \n color=\"#BB74DB\",\n edgecolor=\"white\")\n plt.title(\"Histogram of waiting times\")\n plt.xlabel(\"Waiting time to next eruption [mins]\")\n plt.ylabel(\"Frequency\")\n\napp = App(ui = app_ui, server = server)\n", "type": "text"}, {"name": "requirements.txt", "content": "shiny>=0.10.2\nmatplotlib\nseaborn\n", "type": "text"}] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Shiny examples browser</title> | ||
<script | ||
src="../shinylive/load-shinylive-sw.js" | ||
type="module" | ||
></script> | ||
<script src="../shinylive/jquery.min.js"></script> | ||
<script src="../shinylive/jquery.terminal/js/jquery.terminal.min.js"></script> | ||
<link | ||
href="../shinylive/jquery.terminal/css/jquery.terminal.min.css" | ||
rel="stylesheet" | ||
/> | ||
<script type="module"> | ||
import { runApp } from "../shinylive/shinylive.js"; | ||
const response = await fetch("../app.json"); | ||
if (!response.ok) { | ||
throw new Error("HTTP error loading app.json: " + response.status); | ||
} | ||
const appFiles = await response.json(); | ||
|
||
const appRoot = document.getElementById("root"); | ||
runApp(appRoot, "editor-terminal-viewer", {startFiles: appFiles}, "python"); | ||
</script> | ||
<link rel="stylesheet" href="../shinylive/style-resets.css" /> | ||
<link rel="stylesheet" href="../shinylive/shinylive.css" /> | ||
</head> | ||
<body> | ||
<div style="height: 100vh; width: 100vw" id="root"></div> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Shiny App</title> | ||
<script | ||
src="./shinylive/load-shinylive-sw.js" | ||
type="module" | ||
></script> | ||
<script type="module"> | ||
import { runApp } from "./shinylive/shinylive.js"; | ||
const response = await fetch("./app.json"); | ||
if (!response.ok) { | ||
throw new Error("HTTP error loading app.json: " + response.status); | ||
} | ||
const appFiles = await response.json(); | ||
|
||
const appRoot = document.getElementById("root"); | ||
runApp(appRoot, "viewer", {startFiles: appFiles}, "python"); | ||
</script> | ||
<link rel="stylesheet" href="./shinylive/style-resets.css" /> | ||
<link rel="stylesheet" href="./shinylive/shinylive.css" /> | ||
</head> | ||
<body> | ||
<div style="height: 100vh; width: 100vw" id="root"></div> | ||
</body> | ||
</html> |
Oops, something went wrong.