To be able to edit code and run cells, you need to run the notebook yourself. Where would you like to run the notebook?

This notebook takes about 20 seconds to run.

In the cloud (experimental)

Binder is a free, open source service that runs scientific notebooks in the cloud! It will take a while, usually 2-7 minutes to get a session.

On your computer

(Recommended if you want to store your changes.)

  1. Copy the notebook URL:
  2. Run Pluto

    (Also see: How to install Julia and Pluto)

  3. Paste URL in the Open box

Frontmatter

If you are publishing this notebook on the web, you can set the parameters below to provide HTML metadata. This is useful for search engines and social media.

Author 1
👀 Reading hidden code
begin
struct Dog end
function Base.show(io::IO, ::MIME"image/jpg", ::Dog)
write(io, read(dog_file))
end
end
4.0 ms
true
👀 Reading hidden code
high_res = true
14.2 μs
"/tmp/jl_iWWHi6"
👀 Reading hidden code
dog_file = if high_res
download("https://upload.wikimedia.org/wikipedia/commons/e/ef/Pluto_in_True_Color_-_High-Res.jpg")
else
download("https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/Pluto_in_True_Color_-_High-Res.jpg/240px-Pluto_in_True_Color_-_High-Res.jpg")
end
416 ms

Downloaded image is 5337.573 kB

👀 Reading hidden code
22.9 ms
👀 Reading hidden code
import Distributed
215 μs
👀 Reading hidden code
Enter cell code...
69.9 μs
false
👀 Reading hidden code
show_dogs = false
13.4 μs
👀 Reading hidden code
@bind x html"<input type=range max=10000>"
259 ms
missing
👀 Reading hidden code
10.2 μs

This cell will have very large Uint8Arrays in the output body

👀 Reading hidden code
269 μs
# show_dogs && fill(fill(Dog(), 20),5)
👀 Reading hidden code
24.1 μs
false
show_dogs && fill(Dog(), 20)
👀 Reading hidden code
21.3 μs

Run the next cell to call GC on the server process:

👀 Reading hidden code
297 μs
# Distributed.remotecall_eval(Main, [1], :(GC.gc()))
👀 Reading hidden code
20.6 μs