* Added docstrings,doctests and fixed a bug
* Added docstrings,doctests and fixed a bug
* Added docstrings,doctests and fixed a bug
* Added docstrings and doctests with a bug fix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added docstrings and doctests with a bug fix
* Update ciphers/trifid_cipher.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update ciphers/trifid_cipher.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Docstrings edit
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update trifid_cipher.py
* Update pyproject.toml
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Create vernam_cipher.py
added vernam cipher
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
added return type
* Update vernam_cipher.py
added type hint for plaintext and key
* Update vernam_cipher.py
added tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
Added tests
* Update vernam_cipher.py
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* Update vernam_cipher.py
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update vernam_cipher.py
* Update ciphers/vernam_cipher.py
* Update vernam_cipher.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>
* Added permutation_cipher.py
* Added type hints for parameters
* Added doctest in functions
* Update ciphers/permutation_cipher.py
Ya i felt the same but held back because there is a implementation of transposition_cipher.py. But that's is different from the one i have implemented here.
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update ciphers/permutation_cipher.py
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update ciphers/permutation_cipher.py
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update ciphers/permutation_cipher.py
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update ciphers/permutation_cipher.py
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update ciphers/permutation_cipher.py
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update ciphers/permutation_cipher.py
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Changes
---------
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Deleted greatest_common_divisor def from many files and instead imported the method from Maths folder
* Deleted greatest_common_divisor def from many files and instead imported the method from Maths folder, also fixed comments
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Deleted greatest_common_divisor def from many files and instead imported the method from Maths folder, also fixed comments
* Imports organized
* recursive gcd function implementation rolledback
* more gcd duplicates removed
* more gcd duplicates removed
* Update maths/carmichael_number.py
* updated files
* moved a file to another location
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Added fractionated_morse_cipher
* Added return type hint for main function
* Added doctest for main
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Replaced main function
* changed the references section
Co-authored-by: Christian Clauss <cclauss@me.com>
* removed repetitive datatype hint in the docstring
Co-authored-by: Christian Clauss <cclauss@me.com>
* changed dictionary comprehension variable names to something more compact
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update fractionated_morse_cipher.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>
* rsa key doctest
* move doctest to module docstring
* all tests to doctest
* moved is_right to property
* is right test
* fixed rsa doctest import
* Test error when deleting non-existing element
* fixing ruff EM102
* convert property 'is_right' to one-liner
Also use 'is' instead of '=='
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* child instead of children
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* remove type hint
* Update data_structures/binary_tree/binary_search_tree.py
---------
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* refactored the code
* the code will now pass the test
* looked more into it and fixed the logic
* made the code easier to read, added comments and fixed the logic
* got rid of redundant code + plaintext can contain chars that are not in the alphabet
* fixed the reduntant conversion of ascii_uppercase to a list
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* keyword and plaintext won't have default values
* ran the ruff command
* Update linear_discriminant_analysis.py and rsa_cipher.py (#8680)
* Update rsa_cipher.py by replacing %s with {}
* Update rsa_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update linear_discriminant_analysis.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update linear_discriminant_analysis.py
* Update linear_discriminant_analysis.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update linear_discriminant_analysis.py
* Update linear_discriminant_analysis.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update linear_discriminant_analysis.py
* Update machine_learning/linear_discriminant_analysis.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update linear_discriminant_analysis.py
* updated
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* fixed some difficulties
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added comments, made printing mapping optional, added 1 test
* shortened the line that was too long
* Update ciphers/mixed_keyword_cypher.py
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Rohan Anand <96521078+rohan472000@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update rsa_cipher.py by replacing %s with {}
* Update rsa_cipher.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update linear_discriminant_analysis.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update linear_discriminant_analysis.py
* Update linear_discriminant_analysis.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update linear_discriminant_analysis.py
* Update linear_discriminant_analysis.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update linear_discriminant_analysis.py
* Update machine_learning/linear_discriminant_analysis.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update linear_discriminant_analysis.py
* updated
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* 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>
* 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>
* Adopt Python >= 3.8 assignment expressions using auto-walrus
* 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>
* ci: Add ``flake8-pep3101`` plugin to ``pre-commit``
* refactor: Remove all modulo string formatting
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactor: Remove ``flake8-pep3101`` plugin from ``pre-commit``
* revert: Revert to modulo formatting
* refactor: Use f-string instead of `join`
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* MAINT: Used f-string method
Updated the code with f-string methods wherever required for a better and cleaner understanding of the code.
* Updated files with f-string method
* Update rsa_key_generator.py
* Update rsa_key_generator.py
* Update elgamal_key_generator.py
* Update lru_cache.py
I don't think this change is efficient but it might tackle the error as the error was due to using long character lines.
* Update lru_cache.py
* Update lru_cache.py
Co-authored-by: cyai <seriesscar@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* The black formatter is no longer beta
* pre-commit autoupdate
* pre-commit autoupdate
* Remove project_euler/problem_145 which is killing our CI tests
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* add 5 README files
* empty commit to (hopefully) get rid of the `test-are-failling` label
* Update ciphers/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update conversions/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update cellular_automata/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update computer_vision/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update conversions/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update compression/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>