Skip to content

Instantly share code, notes, and snippets.

julia> using CairoMakie
[ Info: Precompiling CairoMakie [13f3f980-e62b-5c42-98c6-ff1f3baf88f0]
ERROR: LoadError: InitError: could not load library "/Users/patrick/.julia/artifacts/bf37190b92ac2fc3dd5e7073ff7ec7bbfd10343f/lib/libavdevice.58.13.100.dylib"
dlopen(/Users/patrick/.julia/artifacts/bf37190b92ac2fc3dd5e7073ff7ec7bbfd10343f/lib/libavdevice.58.13.100.dylib, 0x0001): Library not loaded: @rpath/libssl.1.1.dylib
Referenced from: <CB15E436-8C0A-3897-AEDE-C5935555F236> /Users/patrick/.julia/artifacts/bf37190b92ac2fc3dd5e7073ff7ec7bbfd10343f/lib/libavdevice.58.13.100.dylib
Reason: tried: '/Users/patrick/.julia/artifacts/bf37190b92ac2fc3dd5e7073ff7ec7bbfd10343f/lib/./libssl.1.1.dylib' (no such file), '/Users/patrick/.julia/artifacts/bf37190b92ac2fc3dd5e7073ff7ec7bbfd10343f/lib/./libssl.1.1.dylib' (no such file), '/Users/patrick/.julia/juliaup/julia-1.9.0+0.aarch64.apple.darwin14/lib/julia/libssl.1.1.dylib' (no such file), '/Users/patrick/.julia/juliaup/julia-1.9.0+0.aarch64.apple.darwin14/lib/julia/../lib
module FieldDocstringsMWE
struct Foo
"a field"
a
"b field"
b
end
end
@pbouffard
pbouffard / startup.jl
Last active March 1, 2023 21:07
My latest startup.jl
# # Kwong book
function subtypetree(roottype::Type, level = 1, indent = 4)
level == 1 && println(roottype)
for s in subtypes(roottype)
println(join(fill(" ", level * indent)) * string(s))
subtypetree(s, level + 1, indent)
end
end
# using Eyeball # doesn't work within atreplinit()?
@pbouffard
pbouffard / simpleconnectiontest.jl
Created February 22, 2021 13:35
Error trying to chain 2 simple ODEs in ModelingToolkit
using ModelingToolkit
@parameters t a
@variables x(t) f(t)
D = Differential(t)
eqs = [
D(x) ~ -a*x + f
]
decay = name -> ODESystem(eqs, name=name)
@pbouffard
pbouffard / array_as_image.jl
Last active November 7, 2020 16:29
Array as image in Pluto
### A Pluto.jl notebook ###
# v0.12.4
using Markdown
using InteractiveUtils
# ╔═╡ 9f663af6-2112-11eb-0b66-3f380137db7b
begin
struct BWImage
data::Array{UInt8, 2}