Skip to content

Commit

Permalink
dump ElectronDisplay as failing and redundant
Browse files Browse the repository at this point in the history
  • Loading branch information
ablaom committed May 22, 2024
1 parent 1225b32 commit e9f6c36
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 192 deletions.
6 changes: 3 additions & 3 deletions DEVELOPER_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ generated won't run properly.

## Generating the notebooks

To generate notebooks do `include("path/to/HelloJulia/src/generate_all.jl")`. For some tutorials, a notebook
may not be generated, because of some known issue. A warning will be issued and you'll
need to generate the relevant notebook by hand.
To generate notebooks do `> julia HelloJulia/src/generate_all.jl`. For some tutorials, a
notebook may not be generated, because of some known issue. A warning will be issued and
you'll need to generate the relevant notebook by hand.

For example, to generate an executed python notebook for `notebooks/01_first_steps/`, copy
`notebook.unexecuted.ipynb` to `notebook.ipynb`; execute the latter file and save.
Expand Down
32 changes: 1 addition & 31 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.10.3"
manifest_format = "2.0"
project_hash = "2edfe41f97de8e611b2e9ed77953e997d683e955"
project_hash = "216dfc3d9c6ec25313c025bc5f5c0b55962d1f00"

[[deps.ARFFFiles]]
deps = ["CategoricalArrays", "Dates", "Parsers", "Tables"]
Expand Down Expand Up @@ -414,12 +414,6 @@ git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464"
version = "1.0.0"

[[deps.DataValues]]
deps = ["DataValueInterfaces", "Dates"]
git-tree-sha1 = "d88a19299eba280a6d062e135a43f00323ae70bf"
uuid = "e7dc6d0d-1eca-5fa6-8ad6-5aecde8b7ea5"
version = "0.4.13"

[[deps.Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down Expand Up @@ -519,18 +513,6 @@ git-tree-sha1 = "98fdf08b707aaf69f524a6cd0a67858cefe0cfb6"
uuid = "792122b4-ca99-40de-a6bc-6742525f08b6"
version = "0.3.0"

[[deps.Electron]]
deps = ["Base64", "FilePaths", "JSON", "Pkg", "Sockets", "URIParser", "UUIDs"]
git-tree-sha1 = "a53025d3eabe23659065b3c5bba7b4ffb1327aa0"
uuid = "a1bb12fb-d4d1-54b4-b10a-ee7951ef7ad3"
version = "3.1.2"

[[deps.ElectronDisplay]]
deps = ["Base64", "Electron", "FilePaths", "IteratorInterfaceExtensions", "JSON", "Markdown", "TableShowUtils", "TableTraits"]
git-tree-sha1 = "714865b8d0ec66d90283acc737da9e534307f5e6"
uuid = "d872a56f-244b-5cc9-b574-2017b5b909a8"
version = "1.0.1"

[[deps.EnumX]]
git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237"
uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56"
Expand Down Expand Up @@ -1990,12 +1972,6 @@ deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
version = "1.0.3"

[[deps.TableShowUtils]]
deps = ["DataValues", "Dates", "JSON", "Markdown", "Unicode"]
git-tree-sha1 = "2a41a3dedda21ed1184a47caab56ed9304e9a038"
uuid = "5e66a065-1f0a-5976-b372-e0b8c017ca10"
version = "0.2.6"

[[deps.TableTraits]]
deps = ["IteratorInterfaceExtensions"]
git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39"
Expand Down Expand Up @@ -2074,12 +2050,6 @@ git-tree-sha1 = "4d4ed7f294cda19382ff7de4c137d24d16adc89b"
uuid = "981d1d27-644d-49a2-9326-4793e63143c3"
version = "0.1.0"

[[deps.URIParser]]
deps = ["Unicode"]
git-tree-sha1 = "53a9f49546b8d2dd2e688d216421d050c9a31d0d"
uuid = "30578b45-9adc-5946-b283-645ec420af67"
version = "0.4.1"

[[deps.URIs]]
git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b"
uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
Expand Down
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
ElectronDisplay = "d872a56f-244b-5cc9-b574-2017b5b909a8"
IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a"
MLJ = "add582a8-e3ab-11e8-2d5e-e98b27df1bc7"
Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7"
Expand Down
Binary file modified notebooks/01_first_steps/my_first_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 15 additions & 16 deletions notebooks/01_first_steps/notebook.ipynb

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions notebooks/01_first_steps/notebook.jl
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,7 @@ using PkgOnlineHelp

# ## Plotting

using ElectronDisplay #src
using CairoMakie
CairoMakie.activate!(type = "png")

#-

Expand Down
11 changes: 4 additions & 7 deletions notebooks/01_first_steps/notebook.pluto.jl
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,8 @@ md"Uncomment and execute the next line to launch Distribution documentation in y
# ╔═╡ 2a96dfa7-cf5a-4e7f-8704-dbab8e09b4f1
md"## Plotting"

# ╔═╡ 912dc07c-b98e-45fb-a02f-27b6c05e4d02
begin
using CairoMakie
CairoMakie.activate!(type = "png")
end
# ╔═╡ abf0bff8-2645-4597-a02f-27b6c05e4d02
using CairoMakie

# ╔═╡ 8c61ce1f-4ef7-47c9-bea4-3d467d48781c
begin
Expand Down Expand Up @@ -472,7 +469,7 @@ md"The following shows that named tuples share some behaviour with dictionaries:

# ╔═╡ cb2c42bf-21b5-4e04-9727-ed822e4fd85d
begin
t = (x = 1, y = "cat", z = 4.5
t = (x = 1, y = "cat", z = 4.5)
keys(t)
end

Expand Down Expand Up @@ -606,7 +603,7 @@ md"""
# ╟─60aef579-9404-4272-8f78-ab549ef1544e
# ╠═a35c0fe8-afc4-4eaf-a8a4-a53f5149481e
# ╟─2a96dfa7-cf5a-4e7f-8704-dbab8e09b4f1
# ╠═912dc07c-b98e-45fb-a02f-27b6c05e4d02
# ╠═abf0bff8-2645-4597-a02f-27b6c05e4d02
# ╠═8c61ce1f-4ef7-47c9-bea4-3d467d48781c
# ╠═bf64e629-d0bc-4e89-97c5-2979af8a507d
# ╟─a7f061b8-d1ed-4b1f-b639-63c76c72c513
Expand Down
3 changes: 1 addition & 2 deletions notebooks/01_first_steps/notebook.unexecuted.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -964,8 +964,7 @@
"outputs": [],
"cell_type": "code",
"source": [
"using CairoMakie\n",
"CairoMakie.activate!(type = \"png\")"
"using CairoMakie"
],
"metadata": {},
"execution_count": null
Expand Down
6 changes: 3 additions & 3 deletions notebooks/03_machine_learning/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@
{
"output_type": "execute_result",
"data": {
"text/plain": "untrained Machine; caches model-specific representations of data\n model: FillImputer(features = Symbol[], …)\n args: \n 1:\tSource @296 ⏎ ScientificTypesBase.Table{Union{AbstractVector{ScientificTypesBase.Continuous}, AbstractVector{ScientificTypesBase.Count}, AbstractVector{ScientificTypesBase.Multiclass{3}}, AbstractVector{ScientificTypesBase.Textual}, AbstractVector{Union{Missing, ScientificTypesBase.Multiclass{3}}}, AbstractVector{ScientificTypesBase.Multiclass{2}}}}\n"
"text/plain": "untrained Machine; caches model-specific representations of data\n model: FillImputer(features = Symbol[], …)\n args: \n 1:\tSource @090 ⏎ ScientificTypesBase.Table{Union{AbstractVector{ScientificTypesBase.Continuous}, AbstractVector{ScientificTypesBase.Count}, AbstractVector{ScientificTypesBase.Multiclass{3}}, AbstractVector{ScientificTypesBase.Textual}, AbstractVector{Union{Missing, ScientificTypesBase.Multiclass{3}}}, AbstractVector{ScientificTypesBase.Multiclass{2}}}}\n"
},
"metadata": {},
"execution_count": 18
Expand Down Expand Up @@ -838,7 +838,7 @@
{
"output_type": "execute_result",
"data": {
"text/plain": "untrained Machine; caches model-specific representations of data\n model: DecisionTreeClassifier(max_depth = 0, …)\n args: \n 1:\tSource @201 ⏎ ScientificTypesBase.Table{Union{AbstractVector{ScientificTypesBase.Continuous}, AbstractVector{ScientificTypesBase.Count}, AbstractVector{ScientificTypesBase.Multiclass{2}}, AbstractVector{ScientificTypesBase.Multiclass{3}}, AbstractVector{ScientificTypesBase.Textual}}}\n 2:\tSource @746 ⏎ AbstractVector{ScientificTypesBase.Multiclass{2}}\n"
"text/plain": "untrained Machine; caches model-specific representations of data\n model: DecisionTreeClassifier(max_depth = 0, …)\n args: \n 1:\tSource @126 ⏎ ScientificTypesBase.Table{Union{AbstractVector{ScientificTypesBase.Continuous}, AbstractVector{ScientificTypesBase.Count}, AbstractVector{ScientificTypesBase.Multiclass{2}}, AbstractVector{ScientificTypesBase.Multiclass{3}}, AbstractVector{ScientificTypesBase.Textual}}}\n 2:\tSource @872 ⏎ AbstractVector{ScientificTypesBase.Multiclass{2}}\n"
},
"metadata": {},
"execution_count": 29
Expand Down Expand Up @@ -870,7 +870,7 @@
{
"output_type": "execute_result",
"data": {
"text/plain": "trained Machine; caches model-specific representations of data\n model: DecisionTreeClassifier(max_depth = 0, …)\n args: \n 1:\tSource @201 ⏎ ScientificTypesBase.Table{Union{AbstractVector{ScientificTypesBase.Continuous}, AbstractVector{ScientificTypesBase.Count}, AbstractVector{ScientificTypesBase.Multiclass{2}}, AbstractVector{ScientificTypesBase.Multiclass{3}}, AbstractVector{ScientificTypesBase.Textual}}}\n 2:\tSource @746 ⏎ AbstractVector{ScientificTypesBase.Multiclass{2}}\n"
"text/plain": "trained Machine; caches model-specific representations of data\n model: DecisionTreeClassifier(max_depth = 0, …)\n args: \n 1:\tSource @126 ⏎ ScientificTypesBase.Table{Union{AbstractVector{ScientificTypesBase.Continuous}, AbstractVector{ScientificTypesBase.Count}, AbstractVector{ScientificTypesBase.Multiclass{2}}, AbstractVector{ScientificTypesBase.Multiclass{3}}, AbstractVector{ScientificTypesBase.Textual}}}\n 2:\tSource @872 ⏎ AbstractVector{ScientificTypesBase.Multiclass{2}}\n"
},
"metadata": {},
"execution_count": 30
Expand Down
116 changes: 6 additions & 110 deletions notebooks/99_solutions_to_exercises/notebook.ipynb

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions notebooks/99_solutions_to_exercises/notebook.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ xs = -5:(0.1):5
ys = f.(xs);

using CairoMakie
using ElectronDisplay #src
CairoMakie.activate!(type = "svg") #nb

fig = hist(samples, normalization=:pdf)
lines!(xs, ys)
Expand Down
5 changes: 2 additions & 3 deletions notebooks/99_solutions_to_exercises/notebook.pluto.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ begin
@show mu var
end

# ╔═╡ f5122507-66bb-49ea-a0de-1721c1bc2df2
# ╔═╡ 8130ea17-aa57-4733-a0de-1721c1bc2df2
begin
d = Normal(0, sqrt(2))
f(x) = pdf(d, x)
Expand All @@ -84,7 +84,6 @@ begin
ys = f.(xs);

using CairoMakie
CairoMakie.activate!(type = "svg")

fig = hist(samples, normalization=:pdf)
lines!(xs, ys)
Expand Down Expand Up @@ -155,7 +154,7 @@ md"""
# ╟─860bb453-c2f1-446d-8d7e-8e449afd1c48
# ╟─cd6e9fce-e54a-48c3-a949-7f3bd292fe31
# ╠═2da628f3-c301-4e4d-8514-99938a2932db
# ╠═f5122507-66bb-49ea-a0de-1721c1bc2df2
# ╠═8130ea17-aa57-4733-a0de-1721c1bc2df2
# ╟─4f939d4a-e802-4b7d-bca8-7eec7950fd82
# ╟─63f410ea-c37a-4761-9873-1b1430e635cc
# ╠═cb2c42bf-21b5-4e04-b43e-d0ebe87da176
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@
"ys = f.(xs);\n",
"\n",
"using CairoMakie\n",
"CairoMakie.activate!(type = \"svg\")\n",
"\n",
"fig = hist(samples, normalization=:pdf)\n",
"lines!(xs, ys)\n",
Expand Down
6 changes: 3 additions & 3 deletions notebooks/mandelbrot/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
" 0.009891 seconds (5.28 k allocations: 332.234 KiB, 98.28% compilation time)\n"
" 0.011320 seconds (5.28 k allocations: 332.234 KiB, 98.37% compilation time)\n"
]
},
{
Expand Down Expand Up @@ -149,7 +149,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
" 0.000145 seconds (43 allocations: 2.109 KiB)\n"
" 0.000189 seconds (43 allocations: 2.109 KiB)\n"
]
},
{
Expand Down Expand Up @@ -190,7 +190,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
" 0.035204 seconds (26.63 k allocations: 1.729 MiB, 99.02% compilation time)\n"
" 0.038862 seconds (26.63 k allocations: 1.729 MiB, 99.03% compilation time)\n"
]
},
{
Expand Down
16 changes: 8 additions & 8 deletions notebooks/secret_sauce/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
" 0.003674 seconds (537 allocations: 37.133 KiB, 95.45% compilation time)\n"
" 0.003671 seconds (537 allocations: 37.133 KiB, 95.27% compilation time)\n"
]
},
{
Expand Down Expand Up @@ -135,7 +135,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
" 0.000151 seconds (43 allocations: 2.156 KiB)\n"
" 0.000152 seconds (43 allocations: 2.156 KiB)\n"
]
},
{
Expand Down Expand Up @@ -206,7 +206,7 @@
{
"output_type": "execute_result",
"data": {
"text/plain": "3-element Vector{Float64}:\n 0.7431637368576477\n 0.030701177164791704\n 0.15852663813312062"
"text/plain": "3-element Vector{Float64}:\n 0.6203553053582552\n 0.6122479425520462\n 0.7573644719199655"
},
"metadata": {},
"execution_count": 6
Expand All @@ -226,13 +226,13 @@
"name": "stdout",
"output_type": "stream",
"text": [
" 0.002530 seconds (432 allocations: 29.953 KiB, 94.16% compilation time)\n"
" 0.003196 seconds (432 allocations: 29.953 KiB, 94.61% compilation time)\n"
]
},
{
"output_type": "execute_result",
"data": {
"text/plain": "3-element Vector{Float64}:\n 0.8314233209161767\n 0.9282456668245344\n 0.36794638988610495"
"text/plain": "3-element Vector{Float64}:\n 0.9647031650112521\n 0.6214013313566943\n 1.0831088350498796"
},
"metadata": {},
"execution_count": 7
Expand All @@ -258,13 +258,13 @@
"name": "stdout",
"output_type": "stream",
"text": [
" 0.000123 seconds (44 allocations: 2.234 KiB)\n"
" 0.000139 seconds (44 allocations: 2.234 KiB)\n"
]
},
{
"output_type": "execute_result",
"data": {
"text/plain": "3-element Vector{Float64}:\n 0.8314233209161767\n 0.9282456668245344\n 0.36794638988610495"
"text/plain": "3-element Vector{Float64}:\n 0.9647031650112521\n 0.6214013313566943\n 1.0831088350498796"
},
"metadata": {},
"execution_count": 8
Expand Down Expand Up @@ -715,7 +715,7 @@
{
"output_type": "execute_result",
"data": {
"text/plain": "2×3 Matrix{Float64}:\n 4.0 4.0 4.0\n 4.0 5.0 5.0"
"text/plain": "2×3 Matrix{Float64}:\n 4.0 5.0 5.0\n 4.0 5.0 5.0"
},
"metadata": {},
"execution_count": 26
Expand Down

0 comments on commit e9f6c36

Please sign in to comment.