From 78bc1f28dcaac796225fadf02b89b5a35edee2c8 Mon Sep 17 00:00:00 2001 From: MaximSmolskiy Date: Sun, 12 Jan 2025 03:25:13 +0300 Subject: [PATCH 1/7] Empty commit From 8c92cd98f2be48356099da631219339433980450 Mon Sep 17 00:00:00 2001 From: MaximSmolskiy Date: Sun, 12 Jan 2025 03:30:42 +0300 Subject: [PATCH 2/7] Fix --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 7b7176705c44..8c11d6db388a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -123,6 +123,8 @@ lint.ignore = [ "UP038", # Use `X | Y` in `{}` call instead of `(X, Y)` -- DO NOT FIX ] +lint.flake8-builtins.builtins-allowed-modules = ["base64", "wave"] + lint.per-file-ignores."data_structures/hashing/tests/test_hash_map.py" = [ "BLE001", ] From 9d620940bccbdf869d573537a29b60278f3eb6a8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 12 Jan 2025 00:31:08 +0000 Subject: [PATCH 3/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8c11d6db388a..cca6305513a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -123,8 +123,6 @@ lint.ignore = [ "UP038", # Use `X | Y` in `{}` call instead of `(X, Y)` -- DO NOT FIX ] -lint.flake8-builtins.builtins-allowed-modules = ["base64", "wave"] - lint.per-file-ignores."data_structures/hashing/tests/test_hash_map.py" = [ "BLE001", ] @@ -149,6 +147,8 @@ lint.per-file-ignores."project_euler/problem_099/sol1.py" = [ lint.per-file-ignores."sorts/external_sort.py" = [ "SIM115", ] +lint.flake8-builtins.builtins-allowed-modules = [ "base64", "wave" ] + lint.mccabe.max-complexity = 17 # default: 10 lint.pylint.allow-magic-value-types = [ "float", From 982c62f9ab2e14061aef42143b1db7f1f272d1a6 Mon Sep 17 00:00:00 2001 From: MaximSmolskiy Date: Sun, 12 Jan 2025 03:32:08 +0300 Subject: [PATCH 4/7] Fix --- project_euler/problem_002/sol4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project_euler/problem_002/sol4.py b/project_euler/problem_002/sol4.py index 3a2e4fce341c..a13d34fd760e 100644 --- a/project_euler/problem_002/sol4.py +++ b/project_euler/problem_002/sol4.py @@ -61,7 +61,7 @@ def solution(n: int = 4000000) -> int: if n <= 0: raise ValueError("Parameter n must be greater than or equal to one.") getcontext().prec = 100 - phi = (Decimal(5) ** Decimal(0.5) + 1) / Decimal(2) + phi = (Decimal(5) ** Decimal("0.5") + 1) / Decimal(2) index = (math.floor(math.log(n * (phi + 2), phi) - 1) // 3) * 3 + 2 num = Decimal(round(phi ** Decimal(index + 1))) / (phi + 2) From 9812ccd1b290da6f381295c97cd002ac050cc6b4 Mon Sep 17 00:00:00 2001 From: MaximSmolskiy Date: Sun, 12 Jan 2025 03:34:07 +0300 Subject: [PATCH 5/7] Fix --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index cca6305513a9..a842fed2b266 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -147,6 +147,7 @@ lint.per-file-ignores."project_euler/problem_099/sol1.py" = [ lint.per-file-ignores."sorts/external_sort.py" = [ "SIM115", ] + lint.flake8-builtins.builtins-allowed-modules = [ "base64", "wave" ] lint.mccabe.max-complexity = 17 # default: 10 From 452a66b527a24c357544338c7c37e6dbf4efa5cc Mon Sep 17 00:00:00 2001 From: MaximSmolskiy Date: Sun, 12 Jan 2025 10:17:43 +0300 Subject: [PATCH 6/7] Fix --- ciphers/{base64.py => base64_cipher.py} | 0 pyproject.toml | 3 --- strings/{wave.py => wave_string.py} | 0 3 files changed, 3 deletions(-) rename ciphers/{base64.py => base64_cipher.py} (100%) rename strings/{wave.py => wave_string.py} (100%) diff --git a/ciphers/base64.py b/ciphers/base64_cipher.py similarity index 100% rename from ciphers/base64.py rename to ciphers/base64_cipher.py diff --git a/pyproject.toml b/pyproject.toml index a842fed2b266..7b7176705c44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -147,9 +147,6 @@ lint.per-file-ignores."project_euler/problem_099/sol1.py" = [ lint.per-file-ignores."sorts/external_sort.py" = [ "SIM115", ] - -lint.flake8-builtins.builtins-allowed-modules = [ "base64", "wave" ] - lint.mccabe.max-complexity = 17 # default: 10 lint.pylint.allow-magic-value-types = [ "float", diff --git a/strings/wave.py b/strings/wave_string.py similarity index 100% rename from strings/wave.py rename to strings/wave_string.py From 8e67f54d6768531b94816b58e522f90474cd6ca8 Mon Sep 17 00:00:00 2001 From: MaximSmolskiy Date: Sun, 12 Jan 2025 07:17:57 +0000 Subject: [PATCH 7/7] updating DIRECTORY.md --- DIRECTORY.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DIRECTORY.md b/DIRECTORY.md index 3f0a5dbb140f..aad6c72aa8ee 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -86,7 +86,7 @@ * [Baconian Cipher](ciphers/baconian_cipher.py) * [Base16](ciphers/base16.py) * [Base32](ciphers/base32.py) - * [Base64](ciphers/base64.py) + * [Base64 Cipher](ciphers/base64_cipher.py) * [Base85](ciphers/base85.py) * [Beaufort Cipher](ciphers/beaufort_cipher.py) * [Bifid](ciphers/bifid.py) @@ -1331,7 +1331,7 @@ * [Title](strings/title.py) * [Top K Frequent Words](strings/top_k_frequent_words.py) * [Upper](strings/upper.py) - * [Wave](strings/wave.py) + * [Wave String](strings/wave_string.py) * [Wildcard Pattern Matching](strings/wildcard_pattern_matching.py) * [Word Occurrence](strings/word_occurrence.py) * [Word Patterns](strings/word_patterns.py)