C program to sample input given some probability
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Makefile
Readme.md
default.nix
package.json
samp.c

Readme.md

samp

Sample input given some probability

Installation

Install with clib:

$ clib install jb55/samp

Install with nix:

$ nix-env -f https://jb55.com/pkgs -iA samp

Install with make:

$ git clone https://github.com/jb55/samp.git /tmp/samp
$ cd /tmp/samp && make install

Examples

Return a line 50% of the time

$ samp < data.txt

Return a line 10% of the time

$ samp 0.1 < data.txt

License

MIT