Skip to main content
reservoir-sampling-cli
======================

A command line tool to randomly sample k items from an input S containing n items.

> Reservoir sampling is a family of randomized algorithms for randomly choosing a sample of k items from a list S containing n items, where n is either a very large or unknown number.
> --<cite><http://en.wikipedia.org/wiki/Reservoir_sampling></cite>

Installation
------------

pip install -e git+ssh://git@github.com/RyanBalfanz/preservoir-sampling-cli.git#egg=resamp

Usage
-----

Show help message

$ resamp -h
usage: Randomly sample k items from an input S containing n items.
[-h] [-k NUM_ITEMS] [--preserve-order]
[infile] [outfile]

positional arguments:
infile
outfile

optional arguments:
-h, --help show this help message and exit
-k NUM_ITEMS, --num-items NUM_ITEMS
An integer number giving the size of the reservoir
--preserve-order Preserve input ordering

Sample 10 words from /usr/share/dict/words preserving the original order

$ cat /usr/share/dict/words | resamp -k10 --preserve-order
Paralipomenon
frankalmoign
hauntingly
hellion
laniiform
lithify
semicollapsible
sniveled
stolkjaerre
unaloud

Metadata

Release files for reservoir-sampling-cli 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reservoir-sampling-cli 0.1
File Size Uploaded Provenance Actions
reservoir-sampling-cli-0.1.tar.gz 1.8 kB Without provenance Details for reservoir-sampling-cli-0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for reservoir-sampling-cli 0.1
File Interpreter ABI Platform Actions
reservoir_sampling_cli-0.1-py27-none-any.whl Python 2.7 none any Details for reservoir_sampling_cli-0.1-py27-none-any.whl

Total release size: 5.5 kB

Release files / reservoir-sampling-cli-0.1.tar.gz

Download URL reservoir-sampling-cli-0.1.tar.gz
Size 1.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e901fe41b6f9b407fa116ac8b4df38518ec8203907f5537f318d67c662a9bf12
BLAKE2b-256 checksum
How to use checksums
ee86fef0d5af1038e2cfa1d766da67e68ad9bc43b779fce0a0b30ee27edfd7c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / reservoir_sampling_cli-0.1-py27-none-any.whl

Download URL reservoir_sampling_cli-0.1-py27-none-any.whl
Size 3.7 kB
Tags Python 2.7
SHA-256 checksum
How to use checksums
c17e1239c16283420ce57f5d219e73384d42aab809e8de04332f327f677c6ea5
BLAKE2b-256 checksum
How to use checksums
2f44c4ecbd9528bf5f2937c3ffb133192433d3056e4af4aaddefae94c698f514
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for reservoir-sampling-cli 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page