Skip to content

Instantly share code, notes, and snippets.

View simonbyrne's full-sized avatar
🦘

Simon Byrne simonbyrne

🦘
View GitHub Profile
@simonbyrne
simonbyrne / jbug.jl
Created October 15, 2012 19:48
A bugs-type sampler in julia
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
@GunnarFarneback
GunnarFarneback / Inflate.jl
Created January 4, 2014 11:41
Pure Julia implementation of decompression of zlib and gzip compressed data, as specified by RFC 1950-1952.
# 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.