Skip to content

Commit

Permalink
trival update [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
cfhamlet committed Jul 6, 2018
1 parent ee6d65a commit 9799455
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ Python implementation of fast approximation reservioir sampling.
* Command line
```
$ os-fast-reservoir -h
usage: os-fast-reservoir [-h] [-v] [-f INPUT_FILE] -n NUM
usage: os-fast-reservoir [-h] [-v] [-f FILES [FILES ...]] -n NUM
Reservoir sample tool.
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-f INPUT_FILE, --file INPUT_FILE
file to be sampled (default: stdin)
-f FILES [FILES ...], --files FILES [FILES ...]
files to be sampled (default: stdin)
-n NUM, --num NUM sample number
```

Expand Down
4 changes: 2 additions & 2 deletions src/os_fast_reservoir/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def execute(argv=None):
nargs='+',
type=argparse.FileType('rb'),
default=[binary_stdin],
dest='inputs')
dest='files')
parser.add_argument('-n', '--num',
help='sample number',
type=check_positive,
Expand All @@ -58,7 +58,7 @@ def execute(argv=None):

args = parser.parse_args(argv[1:])
sample = ReservoirSampling(args.num)
for line in chain.from_iterable(args.inputs):
for line in chain.from_iterable(args.files):
sample.sample(line)
for line in sample:
binary_stdout.write(line)

0 comments on commit 9799455

Please sign in to comment.