* 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>
* New algorithm added
* Errors resolvedc
* New Algorithm
* New algorithm added
* Added new algorithm
* work
* New algorithm added
* Hope this is final
* Update electronics/ohms_law.py
Co-authored-by: xcodz-dot <71920621+xcodz-dot@users.noreply.github.com>
* update decimal value & negative value test
* update as cclauss suggest
* Update electronics/ohms_law.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* updated as suggested by cclauss
* update as suggested by cclauss
* Update as suggested by cclauss
* Update ohms_law.py
Co-authored-by: xcodz-dot <71920621+xcodz-dot@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* fixes#3944 authentication error
* Fixes: #3944 authentication error
* Fixed docstring failure in pre-commit, Fixed request.get params to GitHub REST API standards
* run black formatter
* Add USER_TOKEN constant and checks if empty, removes deprecated docstring
* Add descriptive dict type hint, change headers format to f-string
* Add Accept header
* Fix pre-commit error
* Fix pre-commit error
* Add test for fetch_github_info
* Remove test function from main file
* Create test_fetch_github_info.py
* Update test_fetch_github_info.py
* Update test_fetch_github_info.py
* No need to cover __name__ == __main__ block
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Updated the code to track visited Nodes with Set data structure instead of Lists to bring down the lookup time in visited from O(N) to O(1)
as doing O(N) lookup each time in the visited List will become significantly slow when the graph grows
* add solution for euler problem 89
* updates to accommodate euler solution guideline updates
* use more descriptive vars
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added solution for Project Euler problem 129.
* Added doctest for solution() in project_euler/problem_129/sol1.py
* Update formatting. Reference: #3256
* More descriptive function and variable names, more doctests.
* Project Euler problem 188 solution
* fix superscript notation
* split out modexpt() function, and rename parameters
* Add some more doctest, and add type hints
* Add some reference links
* Update docstrings and mark helper function private
* Fix doctests and remove/improve redundant comments
* fix as per style guide
* 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>
* Add type hints, documentation and tests.
* Update searches/ternary_search.py
Sort collection and remove the assertion logic.
Co-authored-by: Christian Clauss <cclauss@me.com>
* Remove assert sorted logic.
* Add assertion list is ordered.
* updating DIRECTORY.md
* updating DIRECTORY.md
* Format with black.
* Change names of variables to descriptive names
* Remove print in doctests
* Fix variables to snake_case notation.
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* requirements: add qiskit
major library required for quantum computing
* quantum: add quantum ripple adder implementation
right now we are essentially performing the same task as a classic ripple adder
Signed-off-by: rupansh-arch <rupanshsekar@hotmail.com>
* Add project euler problem 50
* Apply format changes
* Descriptive function/parameter name and type hints
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Name: Prime square remainders
Let pn be the nth prime: 2, 3, 5, 7, 11, ..., and
let r be the remainder when (pn−1)^n + (pn+1)^n is divided by pn^2.
For example, when n = 3, p3 = 5, and 43 + 63 = 280 ≡ 5 mod 25.
The least value of n for which the remainder first exceeds 10^9 is 7037.
Find the least value of n for which the remainder first exceeds 10^10.
Reference: https://projecteuler.net/problem=123
reference: #2695
Co-authored-by: Ravi Kandasamy Sundaram <rkandasamysundaram@luxoft.com>
* Added solution to Euler 64.
Added Python solution to Project Euler Problem 64.
Added a folder problem_064.
Added __init__.py file.
Added sol1.py file.
* Update sol1.py
Made formatting changes as mentioned by pre-commit
* Update sol1.py
Minor changes to variable naming and function calling as mentioned by @ruppysuppy
* Update sol1.py
Changes to function call as mentioned by @cclauss
* Added a solution for Project Euler Problem 203 (https://projecteuler.net/problem=203)
* Simplified loop that calculates the coefficients of the Pascal's Triangle. Changes based on review suggestion.
* Moved get_squared_primes_to_use function outside the get_squarefree function and fixed a failing doctest with the former.
* kth order statistics divide and conquer algorithm
* add explanation of algorithm.
* fix PEP8 line too long error
* update order to be compliant to isort
* add doctest
* make file black compliant