Reservoir sampling in a few lines of awk:
https://github.com/taltman/scripts/blob/master/EDA/samp
It's shorter than this ruby implementation, and includes copious documentation, file handling, and corner-case support.
https://github.com/taltman/scripts/blob/master/EDA/samp
It's shorter than this ruby implementation, and includes copious documentation, file handling, and corner-case support.
No comments yet.