Commit Graph

9 Commits

Author SHA1 Message Date
Caeden
4d0c830d2c
Add flake8 pluin flake8 bugbear to pre-commit (#7132)
* ci(pre-commit): Add ``flake8-builtins`` additional dependency to ``pre-commit`` (#7104)

* refactor: Fix ``flake8-builtins`` (#7104)

* fix(lru_cache): Fix naming conventions in docstrings (#7104)

* ci(pre-commit): Order additional dependencies alphabetically (#7104)

* fix(lfu_cache): Correct function name in docstring (#7104)

* Update strings/snake_case_to_camel_pascal_case.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update data_structures/stacks/next_greater_element.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update digital_image_processing/index_calculation.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update graphs/prim.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update hashes/djb2.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* refactor: Rename `_builtin` to `builtin_` ( #7104)

* fix: Rename all instances (#7104)

* refactor: Update variable names (#7104)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* ci: Create ``tox.ini`` and ignore ``A003`` (#7123)

* revert: Remove function name changes (#7104)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rename tox.ini to .flake8

* Update data_structures/heap/heap.py

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>

* refactor: Rename `next_` to `next_item` (#7104)

* ci(pre-commit): Add `flake8` plugin `flake8-bugbear` (#7127)

* refactor: Follow `flake8-bugbear` plugin (#7127)

* fix: Correct `knapsack` code (#7127)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2022-10-13 18:03:06 +02:00
Rohan R Bharadwaj
46842e8c5b
Add missing type hints in matrix directory (#6612)
* Update count_islands_in_matrix.py

* Update matrix_class.py

* Update matrix_operation.py

* Update nth_fibonacci_using_matrix_exponentiation.py

* Update searching_in_sorted_matrix.py

* Update count_islands_in_matrix.py

* Update matrix_class.py

* Update matrix_operation.py

* Update rotate_matrix.py

* Update sherman_morrison.py

* Update spiral_print.py

* Update count_islands_in_matrix.py

* formatting

* formatting

* Update matrix_class.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-04 20:05:56 +02:00
arfy slowy
8e5c3536c7
[fixed] unused variable, standalone running, import doctest module (#4673)
* [fixed] unused variable, standalone running, import doctest module

information [standalone running](https://www.geeksforgeeks.org/what-does-the-if-__name__-__main__-do/)

Signed-off-by: slowy07 <slowy.arfy@gmail.com>

* Update other/fischer_yates_shuffle.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* [fixed] change to tuple and fixing callfunction

Signed-off-by: slowy07 <slowy.arfy@gmail.com>

* Update matrix/spiral_print.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update matrix/spiral_print.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* fixing

Co-authored-by: Christian Clauss <cclauss@me.com>

* [fixed] sprial matrix

Signed-off-by: slowy07 <slowy.arfy@gmail.com>

* Update spiral_print.py

* Update spiral_print.py

* Update spiral_print.py

* Update spiral_print.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-08-28 20:07:10 +02:00
CarsonHam
61f3119467
Change occurrences of str.format to f-strings (#4118)
* f-string update rsa_cipher.py

* f-string update rsa_key_generator.py

* f-string update burrows_wheeler.py

* f-string update non_recursive_segment_tree.py

* f-string update red_black_tree.py

* f-string update deque_doubly.py

* f-string update climbing_stairs.py

* f-string update iterating_through_submasks.py

* f-string update knn_sklearn.py

* f-string update 3n_plus_1.py

* f-string update quadratic_equations_complex_numbers.py

* f-string update nth_fibonacci_using_matrix_exponentiation.py

* f-string update sherman_morrison.py

* f-string update levenshtein_distance.py

* fix lines that were too long
2021-02-23 11:23:49 +05:30
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
Christian Clauss
47a9ea2b0b
Simplify code by dropping support for legacy Python (#1143)
* Simplify code by dropping support for legacy Python

* sort() --> sorted()
2019-08-19 15:37:49 +02:00
cclauss
dc1de946ea Use correct function names in nth_fibonacci_using_matrix_exponentiation.py (#1045)
@AnupKumarPanwar @ParthS007 @poyea Could I please get a quick review on this one because I made a mistake here that breaks the build for new pull requests.
2019-07-19 16:55:45 +08:00
Md. Mahbubur Rahman
60c608d85a Added matrix exponentiation approach for finding fibonacci number. (#1042)
* 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

* Tighten up main() and add comments on performance
2019-07-19 09:41:37 +02:00