Skip to content

Instantly share code, notes, and snippets.

View johnmyleswhite's full-sized avatar

John Myles White johnmyleswhite

View GitHub Profile
@slycoder
slycoder / gist:8150548
Created December 27, 2013 18:07
Closure speeds: Result: 0.5260329246520996 0.656851053237915 0.5118138790130615
begin
local y::Vector{Int64} = zeros(Int64, 1000000)
global demo2
function demo2()
x = y
for ii in 1:1000000
@inbounds x[ii] += 3
end
return x
end
@guanix
guanix / bogosort.jl
Last active January 1, 2016 16:39
Bogosort and Bogobogosort in Julia
function bogosort(v::Array)
if length(v) == 1
return v
end
c = deepcopy(v)
while !issorted(c)
shuffle!(c)
end
@avibryant
avibryant / gist:11376572
Last active March 13, 2016 01:51
Google <=> Open Source Rosetta Stone
GFS = HDFS
MapReduce = Hadoop
BigTable = HBase
Protocol Buffers = Thrift or Avro (serialization)
Stubby = Thrift or Avro (RPC)
ColumnIO = Parquet
Dremel = Impala
Chubby = Zookeeper
Omega = Mesos
Borg = Aurora
@cscheid
cscheid / main.jl
Created September 10, 2014 22:51
bare-bones stress majorization in julia
# You should totally ignore this because it's the first piece of Julia I've ever written.
# 2-clause BSD, blah.
function make_cycle(n)
result = Dict{Int32, Array{Int32}}()
for i = 1:n
ii = i - 1
push!(result, i, [1 + ((i+n-2) % n), 1 + i % n])
end
result
type DataFrame{N,D}
data::D
end
immutable Field{s}
end
Field(s::Symbol) = Field{s}()
function DataFrame(;kwds...)
@0xabad1dea
0xabad1dea / singularthey.md
Last active June 18, 2022 18:01
Singular They in Technical English

Guidelines for Singular They in Technical English

by 0xabad1dea, December 2014

This document is an RFC of sorts for increasing the adoption rate of Singular They in technical English. This is not an ultimatum; this is not shaming anyone who has done otherwise; and this is definitely not applicable to any other language.

What is Singular They?

@quinnj
quinnj / juliacon2015.jl
Last active August 29, 2015 14:23
Managing Data in Julia: Old Tricks, New Tricks Code
Pkg.clone("https://github.com/quinnj/Mmap.jl")
Pkg.clone("https://github.com/quinnj/CSV.jl")
Pkg.add("ODBC")
Pkg.checkout("SQLite","jq/remodel")
Pkg.add("SQLite")
Pkg.checkout("SQLite","jq/updates")
reload("Mmap")
reload("CSV")