Skip to content

Instantly share code, notes, and snippets.

View dralletje's full-sized avatar
🛰️
😱🦁🤨

Michiel Dral dralletje

🛰️
😱🦁🤨
View GitHub Profile
@dralletje
dralletje / Stacktrace.md
Created May 3, 2021 19:46
BoundsError: attempt to access 1-element Vector{String} at index [2]

BoundsError: attempt to access 1-element Vector{String} at index [2]

  1. getindex @ array.jl:801[inlined]
  2. (::NCAUtilities.var"#73#77"{Module})(::DataFrames.DataFrame, ::String, ::Int64) @ NCAUtilities.jl:179
  3. _broadcast_getindex_evalf @ broadcast.jl:648[inlined]
  4. _broadcast_getindex @ broadcast.jl:621[inlined]
  5. getindex @ broadcast.jl:575[inlined]
  6. copyto_nonleaf!(::Vector{Publish.Objects.Table{DataFrames.DataFrame}}, ::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, NCAUtilities.var"#73#77"{Module}, Tuple{Base.Broadcast.Extruded{Vector{DataFrames.DataFrame}, Tuple{Bool}, Tuple{Int64}}, Base.RefValue{String}, Int64}}, ::Base.OneTo{Int64}, ::Int64, ::Int64) @ broadcast.jl:1078
  7. copy @ broadcast.jl:930[inlined]
  8. materialize @ broadcast.jl:883[inlined]
### A Pluto.jl notebook ###
# v0.14.0
using Markdown
using InteractiveUtils
# ╔═╡ 46b1e7b2-8460-11eb-3454-f7fa9542f903
begin
import Pkg
Pkg.add([
### A Pluto.jl notebook ###
# v0.14.0
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local el = $(esc(element))
### A Pluto.jl notebook ###
# v0.14.0
using Markdown
using InteractiveUtils
# ╔═╡ 46b1e7b2-8460-11eb-3454-f7fa9542f903
begin
import Pkg
Pkg.add([
### A Pluto.jl notebook ###
# v0.12.17
using Markdown
using InteractiveUtils
# ╔═╡ 232fcca6-412f-11eb-02d9-9d1fca0a05c7
md"""
# Weird Pluto Performance Case
### A Pluto.jl notebook ###
# v0.12.16
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local el = $(esc(element))
### A Pluto.jl notebook ###
# v0.12.15
using Markdown
using InteractiveUtils
# ╔═╡ d07a2949-f621-4714-9edf-33660d83ee0a
md"""
# Experiments with Garbage Collection
# ╔═╡ 8dcf6da4-b05c-4cb3-a566-0a03180d3554
function to_expr(x::T) where T <: Union{
AttributeDoubleQuoted,
AttributeSingleQuoted,
AttributeUnquoted,
BeforeAttributeName,
StateData,
}
:($(T)($(to_expr(x.value))))
end
@dralletje
dralletje / htl.jl
Last active November 14, 2020 17:02
### A Pluto.jl notebook ###
# v0.12.10
using Markdown
using InteractiveUtils
# ╔═╡ 14bec8b8-13b2-11eb-2a31-5f0544ad5b56
function displayonly(m::Module)
if isdefined(m, :PlutoForceDisplay)
return m.PlutoForceDisplay