* pre-commit: Upgrade psf/black for stable style 2023
Updating https://github.com/psf/black ... updating 22.12.0 -> 23.1.0 for their `2023 stable style`.
* https://github.com/psf/black/blob/main/CHANGES.md#2310
> This is the first [psf/black] release of 2023, and following our stability policy, it comes with a number of improvements to our stable style…
Also, add https://github.com/tox-dev/pyproject-fmt and https://github.com/abravalheri/validate-pyproject to pre-commit.
I only modified `.pre-commit-config.yaml` and all other files were modified by pre-commit.ci and psf/black.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* updating DIRECTORY.md
* Fix mypy errors in lorentz_transformation_four_vector.py
* Remove unused symbol vars
* Add function documentation and rewrite algorithm explanation
Previous explanation was misleading, as the code only calculates Lorentz
transformations for movement in the x direction (0 velocity in the y and
z directions) and not movement in any direction
* updating DIRECTORY.md
* Update error message for speed
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* add maths/Gcd of N Numbers
* add maths/Gcd of N Numbers
* add maths/Gcd of N Numbers
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add maths/Gcd of N Numbers
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add maths/Gcd of N Numbers
* add maths/Gcd of N Numbers
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add maths/Gcd of N Numbers
* add maths/Gcd of N Numbers
* more pythonic
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* more pythonic
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* merged
* merged
* more readable
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: Add `fib_recursive_cached` func
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* doc: Show difference in time when caching algorithm
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* updating DIRECTORY.md
* Update sierpinski_triangle.py header doc
* Remove unused PROGNAME var in sierpinski_triangle.py
The PROGNAME var was used to print an image description in the reference
code that this implementation was taken from, but it's entirely unused
here
* Refactor triangle() function to not use list of vertices
Since the number of vertices is always fixed at 3, there's no need to
pass in the vertices as a list, and it's clearer to give the vertices
distinct names rather than index them from the list
* Refactor sierpinski_triangle.py to use tuples
Tuples make more sense than lists for storing coordinate pairs
* Flip if-statement condition in sierpinski_triangle.py to avoid nesting
* Add type hints to sierpinski_triangle.py
* Add doctests to sierpinski_triangle.py
* Fix return types in doctests
* Update fractals/sierpinski_triangle.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* updating DIRECTORY.md
* Format local_weighted_learning.py doctests for clarity
* Refactor local_weighted_learning.py to use np.array instead of np.mat
The np.matrix class is planned to be eventually depreciated in favor of
np.array, and current use of the class raises warnings in pytest
* Update local_weighted_learning.py documentation
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Refactor bottom-up function to be class method
* Add type hints
* Update convolve function namespace
* Remove depreciated np.float
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* Renamed function for consistency
* updating DIRECTORY.md
* Remove extra imports in gamma.py doctests
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* - add "lz77_compressor" class with compress and decompress methods using LZ77 compression algorithm
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* - use "list" instead "List", formatting
* - fix spelling
* - add Python type hints
* - add 'Token' class to represent triplet (offset, length, indicator)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* - add test, hange type rom List to list
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* - remove extra import
* - remove extra types in comments
* - better test
* - edit comments
* - add return types
* - add tests for __str__ and __repr__
* Update lz77.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Add autoclave cipher
* Update autoclave with the given suggestions
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixing errors
* Another fixes
* Update and rename autoclave.py to autokey.py
* Rename gaussian_naive_bayes.py to gaussian_naive_bayes.py.broken.txt
* Rename gradient_boosting_regressor.py to gradient_boosting_regressor.py.broken.txt
* Rename random_forest_classifier.py to random_forest_classifier.py.broken.txt
* Rename random_forest_regressor.py to random_forest_regressor.py.broken.txt
* Rename equal_loudness_filter.py to equal_loudness_filter.py.broken.txt
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* feat: Add hexagonal number
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* add backtracking word search
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* review notes fixes
* additional fixes
* add tests
* small cleanup
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* small cleanup 2
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update backtracking/word_search.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update backtracking/word_search.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update backtracking/word_search.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update backtracking/word_search.py
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added Bi-Directional Dijkstra
* Added Bi-Directional Dijkstra
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added doctest and type hints
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Rename Bi_directional_Dijkstra.py to bi_directional_dijkstra.py
* Update bi_directional_dijkstra.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update bi_directional_dijkstra.py
* Update bi_directional_dijkstra.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update bi_directional_dijkstra.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update bi_directional_dijkstra.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update bi_directional_dijkstra.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update bi_directional_dijkstra.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update bi_directional_dijkstra.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update bi_directional_dijkstra.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update bi_directional_dijkstra.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update bi_directional_dijkstra.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: Add juggler sequence
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactor: Remove temp variable
* refactor: Change error type for negative numbers
* refactor: Remove # doctest: +NORMALIZE_WHITESPACE
* refactor: Remove int typecasting
* test: Add unit tests for n=10 and n=25
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* A deeper introduction to blockchain technology
* Update README.md
Rectified errors as image was not visible
* Delete img1.jpg
Deleting the image as it is not getting accepted in PR merge
* Delete img2.jpg
Deleting the image as it is not getting accepted in PR merge
* Update README.md
Removed all image s in the document
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update README.md
Commited the suggested changes and submitting for review.
* Update README.md
Changed a sentence that needed grammatical correction.
* Update README.md
Added the changes suggested by review panel
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: Add twin prime algorithm
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: Fix broken import statement
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: Add pronic number implementation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: Add automorphic number implementation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactor: Add type checking for number
* refactor: Rename variable n to number
* test: Add doctest
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* test: Add unit test for number=0
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added BB84 algorithm.
* Function name lowercase + imports fix
I thought uppercase was appropriate because they're initials.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update quantum/bb84.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Removed python < 3.11 restriction from qiskit
* Removed python < 3.11 restriction from qiskit
* scikit-learn
* Update quantum/bb84.py
Correct typo in `default_rng()` call
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
* Update 3n_plus_1.py
1. Minor issue with ValueError message: Given integer should be positive, not greater than 1, as 1 is allowed.
2. += calls underlying list extend method which might be slower. Calling apend seems more appropriate.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* add prefix sum
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Reduce the complexity of other/graham_scan.py
* Lower the --max-complexity threshold in the file .flake8
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix tests
* Update other/graham_scan.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update graham_scan.py
* Update other/graham_scan.py
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>