Skip to content

botchniaque/stream-sampler-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stream Sampler

Build Status

Simple stream sampler returning a random representative sample of a specified length.

Assumptions made while implementing the solution can be found here.

Usage

mvn install
cat file.txt | ./stream-sampler -n SIZE
./stream-sampler --help
Creates a random representative sample of length SIZE out of the input.
Input is either STDIN, or randomly generated within application.
If SEED is specified, then it's used for both - sample creation and input
generation.
 -g,--generate <INPUT_SIZE>   Size of random input to generate out of
                              'abcdefghijklmnoprstuwxyz'
    --help                    Show this message
 -n,--size <SIZE>             Sample size
 -s,--seed <SEED>             Seed for random number generator
dd if=/dev/urandom count=100 bs=100MB | base64 | ./stream-sampler -n 100

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages