From 77513ea630d72318684cf1d0a9198a22f4b547a7 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Tue, 28 Feb 2023 08:09:57 -0800 Subject: [PATCH] I guess it's 2023 now... --- src/pyutils/ansi.py | 2 +- src/pyutils/argparse_utils.py | 2 +- src/pyutils/bootstrap.py | 2 +- src/pyutils/collectionz/bidict.py | 2 +- src/pyutils/collectionz/bst.py | 2 +- src/pyutils/collectionz/interval_tree.py | 2 +- src/pyutils/collectionz/trie.py | 2 +- src/pyutils/compress/letter_compress.py | 2 +- src/pyutils/config.py | 2 +- src/pyutils/datetimes/constants.py | 2 +- src/pyutils/datetimes/dateparse_utils.g4 | 2 +- src/pyutils/datetimes/dateparse_utils.py | 2 +- src/pyutils/datetimes/datetime_utils.py | 2 +- src/pyutils/decorator_utils.py | 2 +- src/pyutils/dict_utils.py | 2 +- src/pyutils/exec_utils.py | 2 +- src/pyutils/files/directory_filter.py | 2 +- src/pyutils/files/file_utils.py | 2 +- src/pyutils/files/lockfile.py | 2 +- src/pyutils/function_utils.py | 2 +- src/pyutils/graph.py | 2 +- src/pyutils/id_generator.py | 2 +- src/pyutils/iter_utils.py | 2 +- src/pyutils/list_utils.py | 2 +- src/pyutils/logging_utils.py | 2 +- src/pyutils/math_utils.py | 2 +- src/pyutils/misc_utils.py | 2 +- src/pyutils/parallelize/deferred_operand.py | 2 +- src/pyutils/parallelize/executors.py | 2 +- src/pyutils/parallelize/parallelize.py | 2 +- src/pyutils/parallelize/smart_future.py | 2 +- src/pyutils/parallelize/thread_utils.py | 2 +- src/pyutils/persistent.py | 2 +- src/pyutils/remote_worker.py | 2 +- src/pyutils/search/logical_search.py | 2 +- src/pyutils/security/acl.py | 2 +- src/pyutils/state_tracker.py | 2 +- src/pyutils/stopwatch.py | 2 +- src/pyutils/text_utils.py | 2 +- src/pyutils/types/centcount.py | 2 +- src/pyutils/types/histogram.py | 2 +- src/pyutils/types/money.py | 2 +- src/pyutils/types/rate.py | 2 +- src/pyutils/types/simple.py | 2 +- src/pyutils/types/type_utils.py | 2 +- src/pyutils/unittest_utils.py | 2 +- src/pyutils/unscrambler.py | 2 +- 47 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/pyutils/ansi.py b/src/pyutils/ansi.py index 1039572..a60200f 100755 --- a/src/pyutils/ansi.py +++ b/src/pyutils/ansi.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """ A bunch of color names mapped into RGB tuples and some methods for diff --git a/src/pyutils/argparse_utils.py b/src/pyutils/argparse_utils.py index 4d23314..6553e2c 100644 --- a/src/pyutils/argparse_utils.py +++ b/src/pyutils/argparse_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """These are helpers for commandline argument parsing meant to work with Python's :mod:`argparse` module from the standard library (See: diff --git a/src/pyutils/bootstrap.py b/src/pyutils/bootstrap.py index 71bbcd4..429f1a4 100644 --- a/src/pyutils/bootstrap.py +++ b/src/pyutils/bootstrap.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """ If you decorate your main method (i.e. program entry point) like this:: diff --git a/src/pyutils/collectionz/bidict.py b/src/pyutils/collectionz/bidict.py index 77d11e0..6bd20c3 100644 --- a/src/pyutils/collectionz/bidict.py +++ b/src/pyutils/collectionz/bidict.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """ The :class:`pyutils.collectionz.bidict.BiDict` class is a subclass diff --git a/src/pyutils/collectionz/bst.py b/src/pyutils/collectionz/bst.py index aaefc1e..f492dfd 100644 --- a/src/pyutils/collectionz/bst.py +++ b/src/pyutils/collectionz/bst.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """A binary search tree implementation.""" diff --git a/src/pyutils/collectionz/interval_tree.py b/src/pyutils/collectionz/interval_tree.py index 878f628..4a8bdd8 100644 --- a/src/pyutils/collectionz/interval_tree.py +++ b/src/pyutils/collectionz/interval_tree.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """This is an augmented interval tree for storing ranges and identifying overlaps as described by: https://en.wikipedia.org/wiki/Interval_tree. diff --git a/src/pyutils/collectionz/trie.py b/src/pyutils/collectionz/trie.py index 0454ffa..2ba76a8 100644 --- a/src/pyutils/collectionz/trie.py +++ b/src/pyutils/collectionz/trie.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """This module contains the implementation of a Trie tree (or prefix tree). See: https://en.wikipedia.org/wiki/Trie. diff --git a/src/pyutils/compress/letter_compress.py b/src/pyutils/compress/letter_compress.py index 21a15b7..f713c1f 100644 --- a/src/pyutils/compress/letter_compress.py +++ b/src/pyutils/compress/letter_compress.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """ This is a simple, honestly, toy compression scheme that uses a custom diff --git a/src/pyutils/config.py b/src/pyutils/config.py index 073a2fe..6dd10e4 100644 --- a/src/pyutils/config.py +++ b/src/pyutils/config.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """Global program configuration driven by commandline arguments and, optionally, from saved (local or Zookeeper) configuration files... with diff --git a/src/pyutils/datetimes/constants.py b/src/pyutils/datetimes/constants.py index 0b3fed1..7cb9b7b 100644 --- a/src/pyutils/datetimes/constants.py +++ b/src/pyutils/datetimes/constants.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """Universal date/time constants.""" diff --git a/src/pyutils/datetimes/dateparse_utils.g4 b/src/pyutils/datetimes/dateparse_utils.g4 index 75db1e8..fc09366 100644 --- a/src/pyutils/datetimes/dateparse_utils.g4 +++ b/src/pyutils/datetimes/dateparse_utils.g4 @@ -1,4 +1,4 @@ -// © Copyright 2021-2022, Scott Gasch +// © Copyright 2021-2023, Scott Gasch // // antlr4 -Dlanguage=Python3 ./dateparse_utils.g4 // diff --git a/src/pyutils/datetimes/dateparse_utils.py b/src/pyutils/datetimes/dateparse_utils.py index d83f2d9..c3a25a5 100755 --- a/src/pyutils/datetimes/dateparse_utils.py +++ b/src/pyutils/datetimes/dateparse_utils.py @@ -3,7 +3,7 @@ # pylint: disable=W0201 # pylint: disable=R0904 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """ Parse dates / datetimes in a variety of formats. Some examples: diff --git a/src/pyutils/datetimes/datetime_utils.py b/src/pyutils/datetimes/datetime_utils.py index 55ceb9c..69f7fdf 100644 --- a/src/pyutils/datetimes/datetime_utils.py +++ b/src/pyutils/datetimes/datetime_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """Utilities related to dates, times, and datetimes.""" diff --git a/src/pyutils/decorator_utils.py b/src/pyutils/decorator_utils.py index 9b1e7a9..c8cb070 100644 --- a/src/pyutils/decorator_utils.py +++ b/src/pyutils/decorator_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch # A portion (marked) below retain the original author's copyright. """This is a grab bag of, hopefully, useful decorators.""" diff --git a/src/pyutils/dict_utils.py b/src/pyutils/dict_utils.py index c269723..1071bf5 100644 --- a/src/pyutils/dict_utils.py +++ b/src/pyutils/dict_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """This module contains helper functions for dealing with Python dictionaries.""" diff --git a/src/pyutils/exec_utils.py b/src/pyutils/exec_utils.py index 6d50194..e363718 100644 --- a/src/pyutils/exec_utils.py +++ b/src/pyutils/exec_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """Helper methods concerned with executing subprocesses.""" diff --git a/src/pyutils/files/directory_filter.py b/src/pyutils/files/directory_filter.py index d7499a2..cd8927a 100644 --- a/src/pyutils/files/directory_filter.py +++ b/src/pyutils/files/directory_filter.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """This module contains two classes meant to help reduce unnecessary disk I/O operations: diff --git a/src/pyutils/files/file_utils.py b/src/pyutils/files/file_utils.py index 5131312..a2f7bae 100644 --- a/src/pyutils/files/file_utils.py +++ b/src/pyutils/files/file_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """ This is a grab bag of file-related utilities. It has code to, for example, diff --git a/src/pyutils/files/lockfile.py b/src/pyutils/files/lockfile.py index 4767309..a4194f5 100644 --- a/src/pyutils/files/lockfile.py +++ b/src/pyutils/files/lockfile.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """This is a lockfile implementation I created for use with cronjobs on my machine to prevent multiple copies of a job from running in diff --git a/src/pyutils/function_utils.py b/src/pyutils/function_utils.py index f4202d3..ba1d469 100644 --- a/src/pyutils/function_utils.py +++ b/src/pyutils/function_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """Helper methods dealing with functions.""" diff --git a/src/pyutils/graph.py b/src/pyutils/graph.py index 903be14..2c3c727 100644 --- a/src/pyutils/graph.py +++ b/src/pyutils/graph.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """A simple graph class that can be optionally directed and weighted and some operations on it.""" diff --git a/src/pyutils/id_generator.py b/src/pyutils/id_generator.py index 108c230..054782e 100644 --- a/src/pyutils/id_generator.py +++ b/src/pyutils/id_generator.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """ A helper class for generating thread safe monotonically increasing diff --git a/src/pyutils/iter_utils.py b/src/pyutils/iter_utils.py index f5926ca..4622293 100644 --- a/src/pyutils/iter_utils.py +++ b/src/pyutils/iter_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """A collection of :class:`Iterator` subclasses that can be composed with another iterator and provide extra functionality: diff --git a/src/pyutils/list_utils.py b/src/pyutils/list_utils.py index 01bd76a..5f06a21 100644 --- a/src/pyutils/list_utils.py +++ b/src/pyutils/list_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """This module contains helper functions for dealing with Python lists.""" diff --git a/src/pyutils/logging_utils.py b/src/pyutils/logging_utils.py index 69b4d31..460d2c6 100644 --- a/src/pyutils/logging_utils.py +++ b/src/pyutils/logging_utils.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """ This is a module that offers an opinionated take on how whole program diff --git a/src/pyutils/math_utils.py b/src/pyutils/math_utils.py index 2270364..f84dca8 100644 --- a/src/pyutils/math_utils.py +++ b/src/pyutils/math_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """Helper utilities with a mathematical / statictical focus.""" diff --git a/src/pyutils/misc_utils.py b/src/pyutils/misc_utils.py index 8e52ae6..f2f098f 100644 --- a/src/pyutils/misc_utils.py +++ b/src/pyutils/misc_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """Miscellaneous utilities.""" diff --git a/src/pyutils/parallelize/deferred_operand.py b/src/pyutils/parallelize/deferred_operand.py index b06d23a..ddb6674 100644 --- a/src/pyutils/parallelize/deferred_operand.py +++ b/src/pyutils/parallelize/deferred_operand.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """This is the base class of :class:`pyutils.parallelize.smart_future.SmartFuture`, which is a diff --git a/src/pyutils/parallelize/executors.py b/src/pyutils/parallelize/executors.py index 0fb47dd..09d0711 100644 --- a/src/pyutils/parallelize/executors.py +++ b/src/pyutils/parallelize/executors.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """ This module defines a :class:`BaseExecutor` interface and three diff --git a/src/pyutils/parallelize/parallelize.py b/src/pyutils/parallelize/parallelize.py index 0004f17..3cf1f6a 100644 --- a/src/pyutils/parallelize/parallelize.py +++ b/src/pyutils/parallelize/parallelize.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """A decorator to help with simple parallelization. When decorated functions are invoked they execute on a background thread, process or diff --git a/src/pyutils/parallelize/smart_future.py b/src/pyutils/parallelize/smart_future.py index 9753e6f..6da4db2 100644 --- a/src/pyutils/parallelize/smart_future.py +++ b/src/pyutils/parallelize/smart_future.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """ A :class:`Future` that can be treated as a substutute for the result diff --git a/src/pyutils/parallelize/thread_utils.py b/src/pyutils/parallelize/thread_utils.py index 062f064..5f24714 100644 --- a/src/pyutils/parallelize/thread_utils.py +++ b/src/pyutils/parallelize/thread_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """Utilities for dealing with threads + threading.""" diff --git a/src/pyutils/persistent.py b/src/pyutils/persistent.py index cc165ae..c2d530f 100644 --- a/src/pyutils/persistent.py +++ b/src/pyutils/persistent.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """ This module defines a class hierarchy (base class :class:`Persistent`) and diff --git a/src/pyutils/remote_worker.py b/src/pyutils/remote_worker.py index a9b6d6c..eefc40a 100755 --- a/src/pyutils/remote_worker.py +++ b/src/pyutils/remote_worker.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """A simple utility to unpickle some code from the filesystem, run it, pickle the results, and save them back on the filesystem. This file diff --git a/src/pyutils/search/logical_search.py b/src/pyutils/search/logical_search.py index 1945900..e974464 100644 --- a/src/pyutils/search/logical_search.py +++ b/src/pyutils/search/logical_search.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """This is a module concerned with the creation of and searching of a corpus of documents. The corpus and index are held in memory. diff --git a/src/pyutils/security/acl.py b/src/pyutils/security/acl.py index 12ba891..8243c8c 100644 --- a/src/pyutils/security/acl.py +++ b/src/pyutils/security/acl.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """Right now this package only contains an implementation that allows you to define and evaluate Access Control Lists (ACLs) easily. For example:: diff --git a/src/pyutils/state_tracker.py b/src/pyutils/state_tracker.py index 90580f2..6c97dda 100644 --- a/src/pyutils/state_tracker.py +++ b/src/pyutils/state_tracker.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """This module defines several classes (:py:class:`StateTracker`, :py:class:`AutomaticStateTracker`, and diff --git a/src/pyutils/stopwatch.py b/src/pyutils/stopwatch.py index ae4c4f3..0def662 100644 --- a/src/pyutils/stopwatch.py +++ b/src/pyutils/stopwatch.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """A simple stopwatch decorator / context for timing things. This was factored out of decorator utils so that bootstrap.py can keep its imports lighter.""" diff --git a/src/pyutils/text_utils.py b/src/pyutils/text_utils.py index 66f6f22..c4c5601 100644 --- a/src/pyutils/text_utils.py +++ b/src/pyutils/text_utils.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """ Utilities for dealing with and creating text chunks. For example: diff --git a/src/pyutils/types/centcount.py b/src/pyutils/types/centcount.py index e589471..58a8274 100644 --- a/src/pyutils/types/centcount.py +++ b/src/pyutils/types/centcount.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """An amount of money represented as an integral count of cents so as to avoid floating point artifacts. Multiplication and division are diff --git a/src/pyutils/types/histogram.py b/src/pyutils/types/histogram.py index 55abd69..bcb1c5f 100644 --- a/src/pyutils/types/histogram.py +++ b/src/pyutils/types/histogram.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """ This is a text-based histogram class. It creates output like this: diff --git a/src/pyutils/types/money.py b/src/pyutils/types/money.py index 589af47..8199bed 100644 --- a/src/pyutils/types/money.py +++ b/src/pyutils/types/money.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """A class to represent money. This class represents monetary amounts as Python Decimals (see https://docs.python.org/3/library/decimal.html) internally. diff --git a/src/pyutils/types/rate.py b/src/pyutils/types/rate.py index 4e007e6..f9842bd 100644 --- a/src/pyutils/types/rate.py +++ b/src/pyutils/types/rate.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """A class to represent a rate of change.""" diff --git a/src/pyutils/types/simple.py b/src/pyutils/types/simple.py index 7b80c17..4165fc5 100644 --- a/src/pyutils/types/simple.py +++ b/src/pyutils/types/simple.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """Simple type helpers.""" diff --git a/src/pyutils/types/type_utils.py b/src/pyutils/types/type_utils.py index e760dba..e648fa0 100644 --- a/src/pyutils/types/type_utils.py +++ b/src/pyutils/types/type_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """Utility functions for dealing with typing.""" diff --git a/src/pyutils/unittest_utils.py b/src/pyutils/unittest_utils.py index abbc09c..b073e49 100644 --- a/src/pyutils/unittest_utils.py +++ b/src/pyutils/unittest_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """Helpers for unittests. diff --git a/src/pyutils/unscrambler.py b/src/pyutils/unscrambler.py index 03f3b2e..446863c 100644 --- a/src/pyutils/unscrambler.py +++ b/src/pyutils/unscrambler.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2021-2023, Scott Gasch """A fast (English) word unscrambler.""" -- 2.45.0