Reservoir Sampling with Uniform Probability

Assume you have a million lines of data in ordered pairs and you want to plot it in GNU Plot. That’s likely to kill your computer. Indeed, plotting a million dots on a graph does not give more information than that plotting a thousand dots. Therefore, how we can sample... [more]

gdb -ex “set pagination 0″ -ex “thread apply all bt” –batch -p ${pid} | awk ‘BEGIN { s = “”; } /Thread/ { print s; s = “”; } /^\#/ { if (s != “” ) { s = s “,”$4} else { s = \$4 } } END... [more]