master
Commits on Oct 8, 2020
-
Add default args and type hints for problem 7 (#2973)
- Add default argument values - Add type hints - Change one letter variable names to a more descriptive one - Add doctest for `solution()`
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits
Commits on Oct 7, 2020
-
Add type hints and default args for problem 20 (#2962)
- Improved variable names - Added type hints - Added default argument values for validate_solutions script
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Add default arguments for Project Euler problem 6 (#2957)
- Add default arguments to solution function - Add link to Project Euler problem 6 - Add doctest for testing `solution()` - Removed test_solutions.py as it is redundant
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits
Commits on Oct 4, 2020
-
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits
Commits on Sep 30, 2020
-
Add badges for code style and pre-commit in README.md (#2516)
* Add badges for code style and pre-commit * Update badge style to flat-square * Update Gitpod logo style to flat-square
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Add GitHub action for pre-commit (#2515)
* Add GitHub action file for pre-commit * Fix errors exposed by pre-commit hook: - Remove executable bit from files without shebang. I checked those file and it was not needed. - Fix with black * Apply suggestions from code review Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: Christian Clauss <cclauss@me.com>
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Add pre-commit hook for TheAlgorithms/Python (#2511)
* Add pre-commit basic config file * Add pre-commit to requirements.txt * Small tweaks and use stable for black * Fix isort section in pre-commit-config file * Fix errors and EOF only for Python files
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Fix all errors mentioned in pre-commit run (#2512)
* 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
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits
Commits on Sep 28, 2020
-
Fix imports for all namespace packages (#2506)
* Fix imports as they're namespace packages * Fix import for scripts/validate_filenames.py * Fix path in doctest
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
1
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Add algorithm for testing Project Euler solutions (#2471)
* Add file for testing Project Euler solutions * Remove the importlib import * Update project_euler/solution_test.py Co-authored-by: Christian Clauss <cclauss@me.com> * Small tweaks to project_euler/solution_test.py * Test Project Euler solutions through Travis * Improved testing for Project Euler solutions: - Renamed file so that it isn't picked up by pytest - Fail fast on validating solutions through Travis CI * Update validate_solutions.py * Use namedtuple for input parameters and answer - Remove logging - Remove unnecessary checks for PROJECT_EULER_PATH as Travis CI picks up the same path * Fix flake8 errors: line too long * Small tweaks to validate_solutions.py * Add all answers & back to using dictionary * Using pytest for testing Project Euler solutions - As we want to fail fast on testing solutions, we need to test using this script first before we use tests written by the author. - As pytest stops testing as soon as it receives a traceback, we need to use pytest-subtests to tell pytest to test all the iterations for the function with given parameters. * Print error messages in oneline format * Separated answers into a separate file: - Add custom print function to print all the error messages at the end of all the tests - Let Travis skip if this failed Co-authored-by: Christian Clauss <cclauss@me.com>
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits
Commits on Sep 27, 2020
-
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits
Commits on Sep 24, 2020
-
Add solution() for problem 54 of Project Euler (#2472)
* Add solution() for problem 54 of Project Euler * Add type hints for solution() function
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits
Commits on Sep 23, 2020
-
Config Travis CI for two jobs (#2463)
* Testing Travis CI configuration for project Euler * Fix: Installing mypy and pytest-cov for testing * Remove unnecessary checks for project_euler job * Removing branches section * Update .travis.yml * Update .travis.yml * Update .travis.yml * Update .travis.yml Co-authored-by: Christian Clauss <cclauss@me.com>
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits
Commits on Sep 20, 2020
-
Create problem_54 in project Euler (#2451)
* Add solution and test files for project euler 54 * Update sol1.py * updating DIRECTORY.md * Fix: use proper path to open files * Commit suggestions: - Use list comprehension instead of map - Sort imports using isort * Changes made as suggested (simplified a lot): - List and set comprehension instead of itemgetter - Using enumerate as it's easy to read - Divided into list of card values and set of card suit as set will remove all the duplicate values. So, no need for double indexing. - Add test for testing multiple calls to five_high_straight function * Add suggestions and simplified: - Split generate_random_hands function into two: - First will generate a random hand - Second, which will be called, will return a generator object Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>Verified
This commit was created on GitHub.com and signed with a verified signature using GitHubβs key.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits