Commit Graph

8 Commits

Author SHA1 Message Date
Christian Clauss
24d3cf8244
The black formatter is no longer beta (#5960)
* 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>
2022-01-30 20:29:54 +01:00
Jaydeep Das
65d3cfff2f
Added memoization function in fibonacci (#5856)
* Added memoization function in fibonacci

* Minor changes
2021-11-28 19:20:18 +01:00
Tianyi Zheng
84cca2119c
Rewrite maths/fibonacci.py (#5734)
* Rewrite parts of Vector and Matrix methods

* Refactor determinant method and add unit tests

Refactor determinant method to create separate minor and cofactor
methods.
Add respective unit tests for new methods.
Rename methods using snake case to follow Python naming conventions.

* Reorganize Vector and Matrix methods

* Update linear_algebra/README.md

Co-authored-by: John Law <johnlaw.po@gmail.com>

* Fix punctuation and wording

* Apply suggestions from code review

Co-authored-by: John Law <johnlaw.po@gmail.com>

* Deduplicate euclidean length method for Vector

* Add more unit tests for Euclidean length method

* Fix bug in unit test for euclidean_length

* Remove old comments for magnitude method

* Rewrite maths/fibonacci.py

* Rewrite timer and add unit tests

* Fix typos in fib_binet unit tests

* Fix typos in fib_binet unit tests

* Clean main method

Co-authored-by: John Law <johnlaw.po@gmail.com>
2021-11-01 18:06:35 +01:00
Tianyi Zheng
06ab650e08
Merge maths/fibonacci.py and maths/fibonacci_sequence_recursion.py (#5738)
* Rewrite parts of Vector and Matrix methods

* Refactor determinant method and add unit tests

Refactor determinant method to create separate minor and cofactor
methods.
Add respective unit tests for new methods.
Rename methods using snake case to follow Python naming conventions.

* Reorganize Vector and Matrix methods

* Update linear_algebra/README.md

Co-authored-by: John Law <johnlaw.po@gmail.com>

* Fix punctuation and wording

* Apply suggestions from code review

Co-authored-by: John Law <johnlaw.po@gmail.com>

* Deduplicate euclidean length method for Vector

* Add more unit tests for Euclidean length method

* Fix bug in unit test for euclidean_length

* Remove old comments for magnitude method

* Rewrite maths/fibonacci.py

* Rewrite timer and add unit tests

* Fix typos in fib_binet unit tests

* Fix typos in fib_binet unit tests

* Clean main method

* Merge fibonacci.py and fibonacci_sequence_recursion.py

* Fix fib_binet unit test

Co-authored-by: John Law <johnlaw.po@gmail.com>
2021-11-01 07:25:40 +01:00
Christian Clauss
5f4da5d616
isort --profile black . (#2181)
* updating DIRECTORY.md

* isort --profile black .

* Black after

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-06 09:44:19 +02:00
Christian Clauss
9316e7c014
Set the Python file maximum line length to 88 characters (#2122)
* flake8 --max-line-length=88

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-06-16 10:09:19 +02:00
William Zhang
9eac17a408 psf/black code formatting (#1277) 2019-10-05 10:14:13 +05:00
StephenGemin
9b945cb2b4 Iterative fibonacci with unittests from slash (#882)
* iterative and formula fibonacci methods

Added two ways to calculate the fibonacci sequence:  (1) iterative  (2) formula.  

I've also added a timer decorator so someone can see the difference in computation time between these two methods.  

Added two unittests using the slash framework.

* Update test_fibonacci.py

* remove inline comments per Contributing Guidelines

* Update sol5.py

* Create placeholder.py

* Update and rename maths/test_fibonacci.py to maths/tests/test_fibonacci.py

* Delete placeholder.py

* Create __init__.py

* Update test_fibonacci.py

* Rename Maths/lucasSeries.py to maths/lucasSeries.py

* Update and rename Project Euler/Problem 01/sol5.py to project_euler/problem_01/sol6.py
2019-06-08 20:25:34 +08:00