* 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>
* add an algorithm to spin some words
* Update index.py
* Adding type hint of spin_words function
* Update and rename python_codewars_disemvowel/index.py to strings/reverse_long_words.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added regular expression implimentation using dp
* replaced input() with example values
* Apply suggestions from code review
Co-authored-by: Christian Clauss <cclauss@me.com>
* changed returning value to bool and added test cases
* added doctest
Co-authored-by: John Law <johnlaw.po@gmail.com>
* added test cases
* Apply suggestions from code review
Co-authored-by: John Law <johnlaw.po@gmail.com>
* shifted to strings
* Changed filename
* Update function name to match_pattern
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update function name to match_pattern
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
* add phone_validator method
* change the phone_validator to indian_phone_validator
* Unnecessary comments removed
* all comments deleted
* Fixes: #{} new line issue
* code reformatted using black
* Removed an extra '=' which was creating an error while running a program.
* Removed the unexpected expression part.
* Added program for swap cases in string folder
* removed if condition and exchange word with char
* added '=' sign which I removed before because of unknowing error from pycharm
* added space in test
* removed costraint from problem statement
* Update cocktail_shaker_sort.py
* Update naive_string_search.py
* Update swap_case.py
* psf/black " not '
* added new line at the end of the file
* Fix flake8 issues
* added new line at the end of the file
* added True and fixed comment
* python file end with \n
* Update swap_case.py
* Update strings/swap_case.py
* Update strings/swap_case.py
* Apply suggestions from code review
* Update strings/swap_case.py
* Update swap_case.py
* Update swap_case.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Tighten up psf/black and flake8
* Fix some tests
* Fix some E741
* Fix some E741
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* fix: space count in strings/word_occurrence.py
* Update strings/word_occurrence.py
Co-Authored-By: Christian Clauss <cclauss@me.com>
* Update strings/word_occurrence.py
Co-Authored-By: Christian Clauss <cclauss@me.com>
* Update strings/word_occurrence.py
Co-Authored-By: Christian Clauss <cclauss@me.com>
* Update word_occurrence.py
Seems like, there is no need o `occurrence.pop('', None)`
Co-authored-by: Christian Clauss <cclauss@me.com>
* Create Python/quantum/README.md
Started at #1831
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Python Program that fetches top trending news
* Python Program that fetches top trending news
* Revisions in Fetch BBC News
* psf/black Changes
* Python Program to send slack message to a channel
* Slack Message Revision Changes
* Python Program to check Palindrome String
* Doctest Added
* Python Program to check whether a String is Panagram or not
* Python Program to check whether a String is Panagram or not
* Check Panagram Script Added
* Panagram Script Added
* Anagram Script Changes
* Anagram Alphabet Check Added
* Python Program to fetch github info
* fix: Syntax Error lgtm display in matrix/matrix_operation.py.
* Testing for None should use the 'is' operator.
* fix: Too many arguments for string format.
* fix: supress lgtm alert as false positive.
* style: Unnecessary 'pass' statement.
* Revert "fix: Syntax Error lgtm display in matrix/matrix_operation.py."
This reverts commit 4c629b4ce1.
* Added print function into matrix_multiplication_addition.py and removed blank space in data_structures/binary tree directory
* Removed .vs/ folder per #893
* Rename matrix_multiplication_addition.py to matrix_operation.py
* Unicode test on strings/rabin_karp.py per #1067
* Added matrix exponentiation approach for finding fibonacci number.
* Implemented the way of finding nth fibonacci.
* Complexity is about O(log(n)*8)
* Updated the matrix exponentiation approach of finding nth fibonacci.
- Removed some extra spaces
- Added the complexity of bruteforce algorithm
- Removed unused function called zerro()
- Added some docktest based on request
* Updated the matrix exponentiation approach of finding nth fibonacci.
- Removed some extra spaces
- Added the complexity of bruteforce algorithm
- Removed unused function called zerro()
- Added some docktest based on request
* Updated Rabin Karp algorithm.
- Previous solution is based on the hash function of python.
- Implemented ruling hash to get the appropriate complexity of rabin karp.
* Updated Rabin Karp algorithm.
- Previous solution is based on the hash function of python.
- Implemented ruling hash to get the appropriate complexity of rabin karp.
* Implemented ruling hash to appropriate complexity of Rabin Karp
Added unit pattern testing