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
3.8 ms
true
👀 Reading hidden code
high_res = true
12.6 μs
"/tmp/jl_deaaid"
👀 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
355 ms

Downloaded image is 5337.573 kB

👀 Reading hidden code
15.7 ms
👀 Reading hidden code
import Distributed
171 μs
👀 Reading hidden code
Enter cell code...
68.1 μs
false
👀 Reading hidden code
show_dogs = false
10.2 μs
👀 Reading hidden code
@bind x html"<input type=range max=10000>"
237 ms
missing
👀 Reading hidden code
11.6 μs

This cell will have very large Uint8Arrays in the output body

👀 Reading hidden code
205 μs
# show_dogs && fill(fill(Dog(), 20),5)
👀 Reading hidden code
19.3 μs
false
show_dogs && fill(Dog(), 20)
👀 Reading hidden code
15.7 μs

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

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