From e4fd6e643af95c62b129f1ca521ab59611ddc8f3 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Wed, 15 Nov 2023 13:29:55 +0000 Subject: [PATCH 1/4] fix: requirements/requirements_opencv.txt to reduce vulnerabilities The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-NUMPY-2321964 - https://snyk.io/vuln/SNYK-PYTHON-NUMPY-2321966 - https://snyk.io/vuln/SNYK-PYTHON-NUMPY-2321970 From e8152d84de7ffad0d504f990c97776eaedd73711 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Wed, 15 Nov 2023 13:31:06 +0000 Subject: [PATCH 2/4] fix: requirements/requirements_writers.txt to reduce vulnerabilities The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-PILLOW-5918878 - https://snyk.io/vuln/SNYK-PYTHON-PILLOW-6043904 - https://snyk.io/vuln/SNYK-PYTHON-TORNADO-5537286 - https://snyk.io/vuln/SNYK-PYTHON-TORNADO-5840803 - https://snyk.io/vuln/SNYK-PYTHON-TORNADO-6041512 --- requirements/requirements_writers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements_writers.txt b/requirements/requirements_writers.txt index d2bcf1db..2c9cd3af 100644 --- a/requirements/requirements_writers.txt +++ b/requirements/requirements_writers.txt @@ -4,5 +4,5 @@ pandas pillow>=10.0.1 # not directly required, pinned by Snyk to avoid a vulnerability scikit-learn sorcery -tornado>=6.3.2 # not directly required, pinned by Snyk to avoid a vulnerability +tornado>=6.3.3 # not directly required, pinned by Snyk to avoid a vulnerability visdom From bd8f87fae3473fdd102ee70abcf245fee4bd8c42 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Wed, 15 Nov 2023 13:31:23 +0000 Subject: [PATCH 3/4] fix: requirements/requirements_torch.txt to reduce vulnerabilities The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-PILLOW-5918878 - https://snyk.io/vuln/SNYK-PYTHON-PILLOW-6043904 From 9408f60e359d28af05fbd3cf298e328ae08a8c35 Mon Sep 17 00:00:00 2001 From: Christian Heider Nielsen Date: Thu, 7 Dec 2023 15:01:28 +0100 Subject: [PATCH 4/4] minor bump --- draugr/__init__.py | 2 +- draugr/numpy_utilities/__init__.py | 6 ++++-- draugr/numpy_utilities/hashing.py | 6 +++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/draugr/__init__.py b/draugr/__init__.py index a41d25e3..4b2dd354 100644 --- a/draugr/__init__.py +++ b/draugr/__init__.py @@ -5,7 +5,7 @@ __project__ = "Draugr" __author__ = "Christian Heider Lindbjerg" -__version__ = "1.1.6" +__version__ = "1.2.0" __doc__ = r""" Created on 27/04/2019 diff --git a/draugr/numpy_utilities/__init__.py b/draugr/numpy_utilities/__init__.py index 1df4ba83..2153674d 100644 --- a/draugr/numpy_utilities/__init__.py +++ b/draugr/numpy_utilities/__init__.py @@ -16,10 +16,12 @@ try: from .channel_transform import * from .manipulation import * - from .datasets import * + + # from .datasets import * from .sampling import * from .powers import * - from .signal_utilities import * + + # from .signal_utilities import * from .raster_grid_2d_masking import * from .mixing import * from .hashing import * diff --git a/draugr/numpy_utilities/hashing.py b/draugr/numpy_utilities/hashing.py index 0cd4165b..ef0f23d8 100644 --- a/draugr/numpy_utilities/hashing.py +++ b/draugr/numpy_utilities/hashing.py @@ -30,10 +30,14 @@ def positive_int_hash( ) -> int: """ - :param hasher: :param s: + :type s: str :param limit_size: + :type limit_size: Optional[int] + :param hasher: Which hashing function to use + :type hasher: callable :return: + :rtype: int """ pos_int = hasher(s.encode("utf-8")) & 0xFFFFFFFF if limit_size: # Wrap around