diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-05-26 10:53:47 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-05-26 10:53:47 +0100 |
| commit | b349ffe2a8af1262dde4dbac7bbe4f51a669fac4 (patch) | |
| tree | 045bf3a2b7bf6ac76d02afa5715e9ea094adc71d /execs/python | |
| parent | Don't update pip in Dockerfile (diff) | |
| parent | Update changelog (diff) | |
| download | TCPDBench-b349ffe2a8af1262dde4dbac7bbe4f51a669fac4.tar.gz TCPDBench-b349ffe2a8af1262dde4dbac7bbe4f51a669fac4.zip | |
Merge branch 'update'
Diffstat (limited to 'execs/python')
| -rw-r--r-- | execs/python/cpdbench_zero.py | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/execs/python/cpdbench_zero.py b/execs/python/cpdbench_zero.py new file mode 100644 index 00000000..951fa9ea --- /dev/null +++ b/execs/python/cpdbench_zero.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +A method that always returns no change points + +Author: G.J.J. van den Burg +Date: 2020-05-07 +License: MIT +Copyright: 2020, The Alan Turing Institute + +""" + +import argparse +import time + +from cpdbench_utils import load_dataset, exit_success + + +def parse_args(): + parser = argparse.ArgumentParser(description="Wrapper for None-detector") + parser.add_argument( + "-i", "--input", help="path to the input data file", required=True + ) + parser.add_argument("-o", "--output", help="path to the output file") + return parser.parse_args() + + +def main(): + args = parse_args() + + data, mat = load_dataset(args.input) + + start_time = time.time() + + locations = [] + + stop_time = time.time() + runtime = stop_time - start_time + + exit_success(data, args, {}, locations, runtime, __file__) + + +if __name__ == "__main__": + main() |
