* Update knuth_morris_pratt.py - changed Boolean to Index
* Update knuth_morris_pratt.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update knuth_morris_pratt.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update knuth_morris_pratt.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update back_propagation_neural_network.py
* Update back_propagation_neural_network.py
* Update strings/knuth_morris_pratt.py
* Update knuth_morris_pratt.py
* Update knuth_morris_pratt.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>
* Solving the `Top k most frequent words` problem using a max-heap
* Mentioning Python standard library solution in `Top k most frequent words` docstring
* ruff --fix .
* updating DIRECTORY.md
---------
Co-authored-by: Amos Paribocci <aparibocci@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.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>
* Increased Readability Of Variables
* Update anagrams.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update anagrams.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.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>
* Refactoring the syntax using list comprehension
* Update detecting_english_programmatically.py
* Update detecting_english_programmatically.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added function that checks if a string is an isogram.
* Added wiki reference and fixed comments.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Made function name more self-documenting. Raise ValueError if string contains 1 or more digits. Renamed file. Lowercase string inside function.
* Removed check_isogram.py (file renamed).
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixed test failure.
* Raise ValueError when string has non-alpha characters. Removed import.
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add Spain National ID validator (#7574)
* is_spain_national_id()
* Update is_spain_national_id.py
* Some systems add a dash
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update comments in check_pangram.py script
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update and rename check_pangram.py to is_pangram.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>
* Added snake_case to Camel or Pascal case Fixes: #7028
* Added suggested changes
* Add ending empty line from suggestion
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update strings/snake_case_to_camel_pascal_case.py
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Caeden <caedenperelliharris@gmail.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>
* Update README.md
Added Google Cirq references
* Create barcode_validator.py
Barcode/EAN validator
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update barcode_validator.py
Included docstring and updated variables to snake_case
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update barcode_validator.py
Included docset and updated bugs
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update barcode_validator.py
Implemented the changes asked in review.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update barcode_validator.py
Updated with f-string format
* Update barcode_validator.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>
* adding the dna algorithm
* following bot recommendations
following bot recommendations for the indentation
* following bot recommendations
following bot recommendations regarding indentation [ again ]
* following bot recommendations
following bot recommendations regarding indentation [ again. ]
* following bot recommendations
following bot recommendations.
* 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>
* Added censor function
* Added censor code
* Added comments to the code
* modified censor function
* added decrypt function
* added cypher and decypher functions, deleted censor and decrypt functions
* Deleted decrypt.py
* Deleted censor.py
* edited the crypt and decrypt files
* Update cypher_txt.py
* Remove the endline in cypher.py
* Removed the print at the end of decypher.py
* added 4 new algorithms
* added tests to the four files
* added type hints for the function variables
* Deleted decode message
* Deleted code message
* Welford average algorithm
* added average welford algorithm
* is_narcissistic added
* added a descriptive name
* added max_sectors algorithm
* added find_unique
* added wave algorithm
* deleting average_welford [ in the wrong pr ]
* deleting is_narcissistic [ is in the wrong pr ]
* deleting max_sectors [ is in the wrong pr ]
* deleting find_unique [ is in the wrong pr ]
* deleting censor [ is in the wrong pr ]
* deleting decrypt [ is in the wrong pr ]
* fixed wave.py
fixed indentation and followed the bots reccomendations
* fixed wave.py again
* fixing wave.py for the third time.
* fixing wave.py
* merging strings/wave.py
merging the suggestion
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
* feat: added ngram algorithm
* fix(test): use `math.isclose` to match floating point numbers approximately
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
* Fix validate_initial_digits of credit_card_validator.py
@Bhargavishnu I think that I broke the logic of validate_initial_digits which should require that credit_card_number[0] is 3 before checking that credit_card_number[1] is 4, 5, or 7. Please verify the new changes and the new test cases to make sure that this is correct. Thanks!
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>