I wrote weightsFunctions.jl, which computes the weights.