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
julia> struct Wrapper | |
dict::Dict{Symbol, Any} | |
end | |
julia> Base.getproperty(w::Wrapper, k::Symbol) = get!(getfield(w, :dict), k, Wrapper(Dict{Symbol,Any}())) | |
julia> Base.setproperty!(w::Wrapper, k::Symbol, val) = setindex!(getfield(w, :dict), val, k) | |
julia> w = Wrapper(Dict()) | |
Wrapper(Dict{Symbol, Any}()) |
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
# Edit Pluto (in place!) to run in an air-gapped environment | |
# Editing a package after it's installed is bad. But hey, this works. | |
# Before running this script, you can instantiate a new depot to avoid | |
# contaminating your main depot. Something like: | |
# | |
# push!(empty!(DEPOT_PATH), "my/new/depot/path") | |
# using Pkg | |
# Pkg.activate("my/project/path") | |
# Pkg.instantiate() |
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
sepal_length | sepal_width | petal_length | petal_width | variety | |
---|---|---|---|---|---|
5.1 | 3.5 | 1.4 | .2 | Setosa | |
4.9 | 3 | 1.4 | .2 | Setosa | |
4.7 | 3.2 | 1.3 | .2 | Setosa | |
4.6 | 3.1 | 1.5 | .2 | Setosa | |
5 | 3.6 | 1.4 | .2 | Setosa | |
5.4 | 3.9 | 1.7 | .4 | Setosa | |
4.6 | 3.4 | 1.4 | .3 | Setosa | |
5 | 3.4 | 1.5 | .2 | Setosa | |
4.4 | 2.9 | 1.4 | .2 | Setosa |