* 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>
* Added the matrix_exponentiation.py file in maths directory
* Implemented the requested changes
* Update matrix_exponentiation.py
* resolve merge conflict with upstream branch
* add new line at end of file
* add wavelet_tree
* fix isort issue
* updating DIRECTORY.md
* fix variable names in wavelet_tree and correct typo
* Add type hints and variable renaming
* Update data_structures/binary_tree/wavelet_tree.py
Add doctests to placate the algorithm-bot, thanks to @cclauss.
Co-authored-by: Christian Clauss <cclauss@me.com>
* Move doctest to individual functions and reformat code
* Move common test array to the global scope and reuse in tests
* MMove test array to global scope and minor linting changes
* Correct the failing pytest tests
* MUse built-in list for type annotation
* Update wavelet_tree.py
* types-requests
* updating DIRECTORY.md
* Update wavelet_tree.py
* # type: ignore
* # type: ignore
* Update decrypt_caesar_with_chi_squared.py
* ,
* Update decrypt_caesar_with_chi_squared.py
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Aniruddha Bhattacharjee <aniruddha@Aniruddhas-MacBook-Air.local>
* fix(mypy): type annotations for cipher algorithms
* Update mypy workflow to include cipher directory
* fix: mypy errors in hill_cipher.py
* fix build errors
* Initial fix for mypy errors in some cipher algorithms
* fix(mypy): Update type hints
* fix(mypy): Update type hints for enigma_machine2.py
* Update as per the suggestion
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* rename base64_cipher.py to base64_encoding.py
* edit base64_encoding.py
* import necessary modules inside doctests
* make it behave like the official implementation
* replace format with f-string where possible
* replace format with f-string
Co-authored-by: Christian Clauss <cclauss@me.com>
* fix: syntax error due to closing parenthese
* reformat code
Co-authored-by: Christian Clauss <cclauss@me.com>
* Add initial support for moving tests to GitHub
* Add setup Python step in the workflow
* Remove Travis CI config file
* Fix GitHub action file for build to trigger on PR
* Use Python 3.8 as tensorflow is not yet supported
* Fix ciphers.hill_cipher doctest error
* Fix: instagram crawler tests failing on GitHub actions
* Fix floating point errors in doctest
* Small change to test cache
* Apply suggestions from code review
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update instagram_crawler.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* create beaufort cipher
if you like my code, merge it and add the label as `hacktoberfest-accepted`
* update the file
* Update beaufort_cipher.py
* Update beaufort_cipher.py
* update as per black formatter
* Update beaufort_cipher.py
* update the file
* update file
* update file
* update file
* update file
* Fix all errors mentioned in pre-commit run:
- Fix end of file
- Remove trailing whitespace
- Fix files with black
- Fix imports with isort
* Fix errors
* Update morse_code_implementation.py
Added more characters to MORSE_CODE_DICT for a more complete dictionary.
Split words with "/" instead of a space as is standard.
Fixed bug when encrypting a message with a comma.
* Fixed comment typo
* fix assignment of a variable to itself
* Fix unnecessary 'else' clause in loop
* formatting and redundant reasignment fix
* mark unreachable code with a TODO comment
* fix variable defined multiple times
* fix static method without static decorator
* revert unintended autoformatting
Co-authored-by: Christian Clauss <cclauss@me.com>
* revert autoformatting issue
* applied black autoformatting
Co-authored-by: Christian Clauss <cclauss@me.com>
* black format
* updating DIRECTORY.md
* fixes
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.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>
* Added more flexibility to functions, decreased amount of repeating code
* Added docstrings
* Updated input functions
* Added doctests
* removed test piece of code
* black .
* Updated caesar cipher standard alphabet to fit python 3.8
* Update and rename sleepsort.py to sleep_sort.py
* Or 4
Co-authored-by: Christian Clauss <cclauss@me.com>
* added decrypt_caesar_with_chi_squared.py and ran all checks
* Updated default parameters
Removed mistake with mutable default arguments
Co-authored-by: Christian Clauss <cclauss@me.com>
* Updated handling for optional arguments
Co-authored-by: Christian Clauss <cclauss@me.com>
* Changed return statement to tuple
Made function return a tuple instead of a list
* Added more doctests
* Fixed spelling mistakes
* black . - reformatted decrypt_caesar_with_chi_squared.py
* Updated if statements to fit the updated code
* Minimized amount of lines in the code.
Co-authored-by: Christian Clauss <cclauss@me.com>
* A1Z26 Cipher
* A1Z26 Cipher
* Added type hints
* Added Doctests
* removed tabs, spaces instead
* corrected doctest
* corrected doctest
* info URLs added
* Condensed decode to one line
* Condensed encode function to a single line
* Nice one!
Co-authored-by: Christian Clauss <cclauss@me.com>
* autoblack: actions/checkout@v1 # Use v1, NOT v2
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* spelling corrections
* review
* improved documentation, removed redundant variables, added testing
* added type hint
* camel case to snake case
* spelling fix
* review
* python --> Python # it is a brand name, not a snake
* explicit cast to int
* spaces in int list
* "!= None" to "is not None"
* Update comb_sort.py
* various spelling corrections in documentation & several variables naming conventions fix
* + char in file name
* import dependency - bug fix
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Travis CI: Don’t allow bare exceptions
* fixup! Format Python code with psf/black push
* except IOError:
* except IOError:
* Update hamming_code.py
* IndexError
* Get rid of the nonsense logic
Co-authored-by: John Law <johnlaw.po@gmail.com>
I revised my implementation and found out that I have miss a inner loop for t. x and y should be recalculated everytime when t is divisble by 2. I have also included a more readble source for this algorithm.
* added RSA_factorization.py
This algorithm can effectively factor RSA large prime N given public key e and private key d.
* Rename RSA_factorization.py to rsa_factorization.py
* Add definitions for d, e, and N
* Simplified DES
* Add files via upload
Diffie Hellman algorithm to generate a secret key.
* Update sdes.py
* Format code with psf/black and add doctests
* Update morse_code_implementation.py
* Delete porta_cipher.py
* Update mixed_keyword_cypher.py
* Mixed keyword cypher added
* issue with mixed keyword fixed
* no math included
* hardcoded inputs
* porta cypher added
* porta cypher added
* commented in mixed keyword according to contrib.md
* introduced shuffled_shift_cipher.py in /ciphers
* made requested changes
* introduced doctests, type hints
removed __make_one_digit()
* test_end_to_end() inserted
* Make test_end_to_end() a test ;-)
* Atbash.py: Both raw_input() and unichr() were removed in Python 3
@sateslayer and @AnupKumarPanwar your reviews please.
* Remove any leading / trailing whitespace from user input
* subset_generation
generate all possible subset of size n of a given array of size r
* Rename subset_generation to subset_generation.py
* Update subset_generation.py
I made all changes I could . What I mean is I removed all the empty space .......
There some comment extra if you feel removing those comments please do so yourself pls provide spacing as it should be
* Create morse_Code_implementation.py
* Any more changes pls let me know
* avrage.py
calculate and print the avrage of number list.
* Update base64_cipher.py
encoding and decoding base64 without any module.
* Update and rename avrage.py to average.py
* update find_lcm algorithm
I made find_lcm more efficient form O(num1*num2) to O(min{num1,num2}).