Skip to content

Instantly share code, notes, and snippets.

Avatar
🏔️

Connor Burns ctrekker

🏔️
View GitHub Profile
View BindCellId.jl
### A Pluto.jl notebook ###
# v0.17.5
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
View plutorest.py
import requests
from requests.utils import quote
import msgpack
import array
VERSION = 'v1'
DEFAULT_HOST = 'localhost:1234'
View REST HTTP Docs.jl
### A Pluto.jl notebook ###
# v0.14.3
using Markdown
using InteractiveUtils
# ╔═╡ 732b9e4a-7852-45f3-8dfb-4840570f1006
html"""
<style>
.requestBody, .responseBody {
View plutostateToJulia.jl
import Pluto
function plutostate_to_julia(state::Dict{Any, Any}, juliafile::AbstractString)
cell_order = UUID.(state["cell_order"])
cells_dict = Dict([UUID(k) => Pluto.Cell(cell_id=UUID(k), code=v["code"], code_folded=v["code_folded"]) for (k, v) state["cell_inputs"]])
cells = [cells_dict[id] for id cell_order]
nb = Pluto.Notebook(cells, "", uuid4())
open(juliafile, "w") do io
Pluto.save_notebook(io, nb)
View plutostateToJulia.js
function plutostateToJulia(statefile, juliafile) {
const fakeBind = `macro bind(def, element)
quote
local el = \$(esc(element))
global \$(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : missing
el
end
end`;
const _notebook_header = '### A Pluto.jl notebook ###';
View PlutostateToJulia.jl
### A Pluto.jl notebook ###
# v0.14.5
using Markdown
using InteractiveUtils
# ╔═╡ 0cbce490-af5c-11eb-224c-b761bb1f8571
using Pluto, PlutoUI, UUIDs
# ╔═╡ a5f7d50a-6231-4f42-a756-697cdb0b7c4c
View REST Docs.jl
### A Pluto.jl notebook ###
# v0.14.3
using Markdown
using InteractiveUtils
# ╔═╡ f91fe30b-41f7-41e7-ad0e-1b66b121f3af
md"""
# "What you see is what you REST"
Welcome to Pluto's "What you see is what you REST" documentation! Firstly I encourage you to run this notebook locally, as many of the examples will interface with this notebook through WYSIWYR.
View CreatedWithPluto.jl
### A Pluto.jl notebook ###
# v0.12.18
using Markdown
using InteractiveUtils
# ╔═╡ 53f64470-424f-11eb-3fa5-a587d71794ed
md"
# This was made inside Pluto!
"