* add median of matrix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix formating
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Fix ruff errors
Renamed neural_network/input_data.py to neural_network/input_data.py_tf
because it should be left out of the directory for the following
reasons:
1. Its sole purpose is to be used by neural_network/gan.py_tf, which is
itself left out of the directory because of issues with TensorFlow.
2. It was taken directly from TensorFlow's codebase and is actually
already deprecated. If/when neural_network/gan.py_tf is eventually
re-added back to the directory, its implementation should be changed
to not use neural_network/input_data.py anyway.
* updating DIRECTORY.md
* Change input_data.py_tf file extension
Change input_data.py_tf file extension because algorithms-keeper bot is being picky about it
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* updating DIRECTORY.md
* feat: Count negative numbers in sorted matrix
* updating DIRECTORY.md
* chore: Fix pre-commit
* refactor: Combine functions into iteration
* style: Reformat reference
* feat: Add timings of each implementation
* chore: Fix problems with algorithms-keeper bot
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* test: Remove doctest from benchmark function
* Update matrix/count_negative_numbers_in_sorted_matrix.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update matrix/count_negative_numbers_in_sorted_matrix.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update matrix/count_negative_numbers_in_sorted_matrix.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update matrix/count_negative_numbers_in_sorted_matrix.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update matrix/count_negative_numbers_in_sorted_matrix.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update matrix/count_negative_numbers_in_sorted_matrix.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* refactor: Use sum instead of large iteration
* refactor: Use len not sum
* Update count_negative_numbers_in_sorted_matrix.py
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* pre-commit: Upgrade psf/black for stable style 2023
Updating https://github.com/psf/black ... updating 22.12.0 -> 23.1.0 for their `2023 stable style`.
* https://github.com/psf/black/blob/main/CHANGES.md#2310
> This is the first [psf/black] release of 2023, and following our stability policy, it comes with a number of improvements to our stable style…
Also, add https://github.com/tox-dev/pyproject-fmt and https://github.com/abravalheri/validate-pyproject to pre-commit.
I only modified `.pre-commit-config.yaml` and all other files were modified by pre-commit.ci and psf/black.
* [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>
* refactor: Move pascals triange to maths/
* Update xgboost_classifier.py
* statsmodels is now compatible with Python 3.11
* statsmodels is now compatible with Python 3.11
* cython>=0.29.28
* cython>=0.29.28 # For statsmodels on Python 3.11
Co-authored-by: Christian Clauss <cclauss@me.com>
* added recursive dfs backtracking for count paths with doctests
* fixed doc testing
* added type hints
* redefined r as row, c as col
* fixed naming conventions, ran mypy, only tests that didn't pass were using List[], rathan list()
* added another doctest, as well as a explanation above
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update matrix/count_paths.py
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* Update matrix/count_paths.py
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
Co-authored-by: J <jasondevers@wireless-10-105-49-243.umd.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* added support for inverse of 3x3 matrix
* Modified Docstring and improved code
* fixed an error
* Modified docstring
* Apply all suggestions from code review
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* added script for solving system of linear equations in two variables
* implemented all the suggested changes
* changed RuntimeError to ValueError
* Update matrix/system_of_linear_equation_in_2_variables.py
* Update matrix/system_of_linear_equation_in_2_variables.py
* Update and rename system_of_linear_equation_in_2_variables.py to cramers_rule_2x2.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Maximum area of island program added
* Update matrix/max_area_of_island.py
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
* Update matrix/max_area_of_island.py
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
* Update matrix/max_area_of_island.py
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
* Review's comment resolved
* max area of island
* PR Comments resolved
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Test case fail fix
* Grammer correction
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* flake8 issue resolved
* some variable name fix
* Update matrix/max_area_of_island.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update matrix/max_area_of_island.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* PR, comments resolved
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update matrix/max_area_of_island.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update matrix/max_area_of_island.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* PR, comments resolved
* Update max_area_of_island.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Typo
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* ci: Add ``flake8-pep3101`` plugin to ``pre-commit``
* refactor: Remove all modulo string formatting
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactor: Remove ``flake8-pep3101`` plugin from ``pre-commit``
* revert: Revert to modulo formatting
* refactor: Use f-string instead of `join`
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Create binary_search_matrix.py
Added an algorithm to search in matrix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update binary_search_matrix.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix Indentation
* Update matrix/binary_search_matrix.py
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: Christian Clauss <cclauss@me.com>
* MAINT: Used f-string method
Updated the code with f-string methods wherever required for a better and cleaner understanding of the code.
* Updated files with f-string method
* Update rsa_key_generator.py
* Update rsa_key_generator.py
* Update elgamal_key_generator.py
* Update lru_cache.py
I don't think this change is efficient but it might tackle the error as the error was due to using long character lines.
* Update lru_cache.py
* Update lru_cache.py
Co-authored-by: cyai <seriesscar@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.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>