* Bloom filter with tests
* has functions constant
* fix type
* isort
* passing ruff
* type hints
* type hints
* from fail to erro
* captital leter
* type hints requested by boot
* descriptive name for m
* more descriptibe arguments II
* moved movies_test to doctest
* commented doctest
* removed test_probability
* estimated error
* added types
* again hash_
* Update data_structures/hashing/bloom_filter.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* from b to bloom
* Update data_structures/hashing/bloom_filter.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update data_structures/hashing/bloom_filter.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* syntax error in dict comprehension
* from goodfather to godfather
* removed Interestellar
* forgot the last Godfather
* Revert "removed Interestellar"
This reverts commit 35fa5f5c4b.
* pretty dict
* Apply suggestions from code review
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update bloom_filter.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>
* Queue implementation using two Stacks
* fix typo in queue/queue_on_two_stacks.py
* add 'iterable' to queue_on_two_stacks initializer
* make queue_on_two_stacks.py generic class
* fix ruff-UP007 in queue_on_two_stacks.py
* enhance readability in queue_on_two_stacks.py
* Create queue_by_two_stacks.py
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
* add torch to requirements
* add lenet architecture in pytorch
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add type hints
* remove file
* add type hints
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update variable name
* add fail test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add newline
* reformatting
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add type hints to md5.py
* Rename some vars to snake case
* Specify functions imported from math
* Rename vars and functions to be more descriptive
* Make tests from test function into doctests
* Clarify more var names
* Refactor some MD5 code into preprocess function
* Simplify loop indices in get_block_words
* Add more detailed comments, docs, and doctests
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* Add type hints to md5.py
* Rename some vars to snake case
* Specify functions imported from math
* Rename vars and functions to be more descriptive
* Make tests from test function into doctests
* Clarify more var names
* Refactor some MD5 code into preprocess function
* Simplify loop indices in get_block_words
* Add more detailed comments, docs, and doctests
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* Convert str types to bytes
* Add tests comparing md5_me to hashlib's md5
* Replace line-break backslashes with parentheses
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Remove python_version < "3.11" for tensorflow
* Reenable neural_network/input_data.py_tf
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Try to fix ruff
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Try to fix ruff
* Try to fix ruff
* Try to fix ruff
* Try to fix pre-commit
* Try to fix
* Fix
* Fix
* Reenable dynamic_programming/k_means_clustering_tensorflow.py_tf
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Try to fix ruff
---------
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>
* updating DIRECTORY.md
* Fix mypy errors in lu_decomposition.py
* Replace for-loops with comprehensions
* Add explanation of LU decomposition and extra doctests
Add an explanation of LU decomposition with conditions for when an LU
decomposition exists
Add extra doctests to handle each of the possible conditions for when a
decomposition exists/doesn't exist
* updating DIRECTORY.md
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Update receive_file.py
Here are the changes I made:
Added the main() function and called it from if __name__ == "__main__" block. This makes it easier to test the code and import it into other programs.
Added socket.AF_INET as the first argument to socket.socket(). This specifies the address family to be used, which is necessary when using connect().
Changed print(f"{data = }") to print("Received:", len(data), "bytes"). This makes it clearer what's happening and how much data is being received.
Changed the final print statement to "Successfully received the file". This makes it more accurate and descriptive.
Moved the import statement to the top of the file. This is a common convention in Python.
* [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>
* added kadane's algorithm directory with one problem's solution.
* added type hints
* Rename kaadne_algorithm/max_product_subarray.py to dynamic_programming/max_product_subarray.py
* Update dynamic_programming/max_product_subarray.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update max_product_subarray.py
* Update max_product_subarray.py
* Update dynamic_programming/max_product_subarray.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update max_product_subarray.py
* Update max_product_subarray.py
* Update max_product_subarray.py
* Update max_product_subarray.py
* Update max_product_subarray.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update max_product_subarray.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update max_product_subarray.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update max_product_subarray.py
* Update max_product_subarray.py
* Update dynamic_programming/max_product_subarray.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update dynamic_programming/max_product_subarray.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update max_product_subarray.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>
* Reduce the complexity of graphs/bi_directional_dijkstra.py
* Try to lower the --max-complexity threshold in the file .flake8
* Lower the --max-complexity threshold in the file .flake8
* updating DIRECTORY.md
* updating DIRECTORY.md
* Try to lower max-complexity
* Try to lower max-complexity
* Try to lower max-complexity
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* add circular convolution
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add type hint for __init__
* rounding off final values to 2 and minor changes
* add test case for unequal signals
* changes in list comprehension and enumeraton
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.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>
* updating DIRECTORY.md
* Fix mypy errors in lorentz_transformation_four_vector.py
* Remove unused symbol vars
* Add function documentation and rewrite algorithm explanation
Previous explanation was misleading, as the code only calculates Lorentz
transformations for movement in the x direction (0 velocity in the y and
z directions) and not movement in any direction
* updating DIRECTORY.md
* Update error message for speed
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>