Predicting Peak Peeping
using Distributions function simtree(color_dist, x) color_time = rand(color_dist) fall_time = rand(DiscreteUniform(color_time+1, length(x))) for i in color_time:fall_time x[i] += 1 end end function simfall(times, trees) x = zeros(Int, times) color_dist = DiscreteUniform(1, times-1) for _ in 1:trees
Parsing Compressed JSON Lines Across Multiple Files with Julia
I'm new to big data. It turns out, when they say big, they're not kidding. (What follows might be completely obvious and trivial for 103% of you.) I started out writing arrays of (basically) homogeneous data by just JSON-serializing the whole thing and writing it out.