From: Steven Baltakatei Sandoval Date: Sun, 8 Aug 2021 08:04:30 +0000 (+0000) Subject: chore(u/p/sleepRand.py):Update comments X-Git-Tag: 0.5.0~43 X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/commitdiff_plain/a967b286845c5754d4fbfd1fab2cff6ff56be352?ds=inline;hp=252ebb00f5568d5fa53cc890b08642e453585f79 chore(u/p/sleepRand.py):Update comments --- diff --git a/unitproc/python/sleepRand.py b/unitproc/python/sleepRand.py index 3917506..7a9b2b7 100755 --- a/unitproc/python/sleepRand.py +++ b/unitproc/python/sleepRand.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 # Desc: Pauses a random amount of time. Random distribution is inverse gaussian. -# Version: 0.0.4 +# Version: 0.0.5 # Depends: python 3.7.3 -# Usage: ./sleepRand.py [-v] [-p L] SECONDS +# Usage: ./sleepRand.py [-v] [-p P] SECONDS # Input: SECONDS: float seconds (mean of inverse gaussian distribution) -# L: precision (lambda of inverse gaussian distribution) +# P: precision (lambda of inverse gaussian distribution) # Example: python3 sleepRand.py -vv -p 8.0 60.0 import argparse; @@ -38,6 +38,7 @@ args = parser.parse_args(); # Define functions def setup_logging(verbosity): + '''Sets up logging''' # Depends: module: argparse # Ref/Attrib: Haas, Florian; Configure logging with argparse; https://xahteiwi.eu/resources/hints-and-kinks/python-cli-logging-options/ base_loglevel = 30; @@ -71,6 +72,7 @@ setup_logging(args.verbosity); logging.debug('DEBUG:Debug logging output enabled.'); logging.debug('DEBUG:args.verbosity:' + str(args.verbosity)); logging.debug('DEBUG:args:' + str(args)); + ## Reject negative floats. try: ### Get desired mean