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
### A Pluto.jl notebook ### | |
function parse_line(line) | |
patterns, values = split.(split(line," | "),' ') | |
return collect.(patterns),collect.(values) | |
end | |
function Part1(file) | |
total = 0 | |
uniques = Set([2,3,4,7]) |
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
abstract type Operation end | |
struct Acc <: Operation | |
value::Int | |
end | |
struct Jmp <: Operation | |
value::Int | |
end |
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
{ | |
"version":"2.1.0_1.53c", | |
"description": "Fiji is an image processing package — a \"batteries-included\" distribution of ImageJ, bundling many plugins which facilitate scientific image analysis. ", | |
"homepage":"https://fiji.sc/", | |
"license":{ | |
"identifier":"GPL-3.0-only", | |
"url":"https://github.com/fiji/fiji/blob/master/LICENSE.txt" | |
}, | |
"architecture": { | |
"64bit":{ |
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
function roll(roll) | |
m=match(r"(?<number>\d*)[dD](?<sides>\d+)", roll) | |
m["number"] == "" ? number = 1 : number=parse(Int,m["number"]) | |
sides=parse(Int,m["sides"]) | |
roll_dice(number,sides) | |
end | |
function roll_dice(number::Integer,sides::Integer) |
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
using CImGui | |
using CImGui.CSyntax | |
using CImGui.CSyntax.CStatic | |
using CImGui.GLFWBackend | |
using CImGui.OpenGLBackend | |
using CImGui.GLFWBackend.GLFW | |
using CImGui.OpenGLBackend.ModernGL | |
using Printf | |
@static if Sys.isapple() |
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
function subtypetree(t, level=1, indent=4) | |
level == 1 && println(t) | |
for s in subtypes(t) | |
println(join(fill(" ", level * indent)) * string(s)) | |
subtypetree(s, level+1, indent) | |
end | |
end |
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
function formatfilterstring(filter::NTuple{N,Union{String,Tuple{String,String}}}) where N | |
outarray = String[] | |
for i in eachindex(filter) | |
if typeof(filter[i])==String | |
push!(outarray,"",filter[i]) | |
else | |
push!(outarray,filter[i]...) | |
end | |
end | |
string(outarray[1],"|" .* outarray[2:end]...) |
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
module FileDialog | |
using QML | |
function filedialog(;title::String="File Dialog",foldermode::Bool=false,multiselect::Bool=false,filter::Array{String}=["All files (*)"],folder::String=pwd(),savemode::Bool=false) | |
qml_data = QByteArray(""" | |
import QtQuick 2.2 | |
import QtQuick.Dialogs 1.0 | |
import QtQuick.Controls 1.0 | |
import org.julialang 1.0 |