shuf-rs

Crates.ioshuf-rs
lib.rsshuf-rs
version0.2.0
sourcesrc
created_at2021-07-07 18:33:10.083113
updated_at2024-07-19 18:17:20.309242
descriptionGenerate random permutations of an iterable with reservior sampling
homepagehttps://github.com/gmodena/shuf-rs/
repositoryhttps://github.com/gmodena/shuf-rs/
max_upload_size
id419978
size17,330
Gabriele Modena (gmodena)

documentation

README

shuf-rs

Shuffle lines of text with reservior sampling.

Build

cargo build --release

The resulting binary is found under target/release/shuf.

Usage

USAGE:
    shuf [OPTIONS] [path]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -n, --head-count=COUNT <num>    Number of lines to read

ARGS:
    <path>    The path to the file to read

mod shuf

src/shuf.rs contains a reusable implementation of reservior sampling, that works on any iterable.

Commit count: 8

cargo fmt