Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢

Simon Byrne simonbyrne

🐢
View GitHub Profile
@GunnarFarneback
GunnarFarneback / Inflate.jl
Created Jan 4, 2014
Pure Julia implementation of decompression of zlib and gzip compressed data, as specified by RFC 1950-1952.
View Inflate.jl
# Pure Julia implementation of decompression of zlib and gzip
# compressed data, as specified by RFC 1950-1952.
module Inflate
export decompress, gunzip
# Huffman codes are internally represented by Vector{Vector{Int}},
# where code[k] are a vector of the values with code words of length
# k. Codes are assigned in order from shorter to longer codes and in
# the order listed. E.g.
@simonbyrne
simonbyrne / jbug.jl
Created Oct 15, 2012
A bugs-type sampler in julia
View jbug.jl
require("extras/distributions.jl")
require("slicesampler.jl")
import Distributions.*
macro buildslicesampler(model)
# pull apart the model into variables and distributions
variables = Dict{Symbol,Expr}()
unboundvars = Set{Symbol}()
for line in model.args