Skip to content

Instantly share code, notes, and snippets.

@shashi
shashi / tullio_matmul.jl
Last active Aug 19, 2020
distributed matmul using Tullio.jl
View tullio_matmul.jl
using Tullio
using Dagger
using Dagger: DArray, chunks, Thunk, ArrayDomain
struct Zero end
Base.zero(::Type{Thunk}) = delayed(()->Zero())()
Base.zero(::Type{Union{Zero, ArrayDomain}}) = Zero()
Base.:(+)(z::Zero, x) = x
Base.:(+)(x, z::Zero) = x
Base.:(+)(z::Zero, x::Zero) = z
View JuliaGizmos-Introduction.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shashi
shashi / Benchmarks - loadtable.ipynb
Last active Nov 27, 2017
JuliaDB benchmarks vs Pandas
View Benchmarks - loadtable.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View either.jl
immutable IRef{T}
value::T
IRef() = new()
IRef(value) = new(value)
end
immutable Result{T,S}
issuccess::Bool
value::IRef{T}
error::IRef{S}
View docgen.jl
using Lazy
function methoddoc(name, sign, doc)
vbox(
fontweight(bold, code(string(name) * "(" * join(map(string, sign.types), ", ") *")" )),
doc
)
end
function showdoc(fn::Function, fndoc)
View APL and Julia.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shashi
shashi / sneaky-dom.js
Last active Mar 29, 2016
Sneaky, Shady DOM
View sneaky-dom.js
(function() {
function Sneaky (node) {
var lightNode = Polymer.dom(node)
this.lightNode = lightNode
this.node = lightNode.node
}
Sneaky.prototype = Polymer.dom()
Object.defineProperties(Sneaky.prototype, {
@shashi
shashi / layout.jl
Created Apr 27, 2015
Slides for my talk at MetaRefresh 2015. Made with https://github.com/shashi/Escher.jl
View layout.jl
# An infinite number of mathematicians walk into a bar...
using Color
colors = distinguishable_colors(9)
box(w, h, n) =
empty |> fillcolor(colors[n % 9 + 1]) |> size(w, h)
View Fluid Images.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Gadfly + Patchwork.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.