Skip to content

Instantly share code, notes, and snippets.

@sglyon
sglyon / README.md
Last active May 10, 2017 19:04
python imports

Run with python other_file.py

@sglyon
sglyon / showtime.jl
Created April 5, 2017 17:13
showtime macros
macro showtime(ex)
blk = Expr(:block)
push!(blk.args, :(println($(sprint(Base.show_unquoted,ex)*" = "),
repr(begin value=$(esc(ex)) end))))
push!(blk.args, :value)
quote
local stats = Base.gc_num()
local elapsedtime = Base.time_ns()
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sglyon
sglyon / SHA_8aa5b35.txt
Created September 8, 2016 13:47
dolo.jl ea_quest3.mod import benchmarks
Benchmark for build_levels_func_body:
BenchmarkTools.Trial:
samples: 10000
evals/sample: 1
time tolerance: 5.00%
memory tolerance: 1.00%
memory estimate: 277.17 kb
allocs estimate: 4695
minimum time: 394.74 μs (0.00% GC)
median time: 431.94 μs (0.00% GC)
@sglyon
sglyon / Jiahao_horizontal_bar.ipynb
Last active July 28, 2016 20:59
Jiahao horizontal bar
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sglyon
sglyon / MyTypes.jl
Last active May 23, 2016 22:08
julia relative modules
module MyTypes
export TheParent
abstract TheParent
Base.show(io::IO, p::TheParent) = println(io, "Some instance of TheParent")
end # module
@sglyon
sglyon / testing_comm.ipynb
Created May 16, 2016 11:21
plotly+ijulia comm
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.