* Move and reimplement convert_number_to_words.py
- Move convert_number_to_words.py from web_programming/ to conversions/
- Reimplement the algorithm from scratch because the logic was very
opaque and too heavily nested
- Add support for the Western numbering system (both short and long)
because the original implementation only supported the Indian
numbering system
- Add extensive doctests and error handling
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Add doctests to continued_fraction.py for 0 and neg nums
* Fix continued_fraction.py to work for negative nums
Fix continued_fraction.py to work for negative nums by replacing int() call with floor()
* Move comment in doctest
* updating DIRECTORY.md
* fix(get-top-billionaires): Handle timestamp before epoch
* updating DIRECTORY.md
* revert(pyproject): Re-implement ignore lru_cache
* fix(age): Update age to current year
* fix(doctest): Make years since dynamic
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* changes to accommodate special case
* changed n_slack calculation method
* fix precommit typehints
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* n_art_vars inputs
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: docstrings and typehints
* fix: doctest issues when running code
* additional check and doctests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix ruff
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix whitespace
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* rsa key doctest
* move doctest to module docstring
* all tests to doctest
* moved is_right to property
* is right test
* fixed rsa doctest import
* Test error when deleting non-existing element
* fixing ruff EM102
* convert property 'is_right' to one-liner
Also use 'is' instead of '=='
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* child instead of children
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* remove type hint
* Update data_structures/binary_tree/binary_search_tree.py
---------
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* fix: typo
#8770
* refactor: delete unnecessary continue
* add test grids
* fix: add \_\_eq\_\_ in Node class
#8770
* fix: delete unnecessary code
- node in self.open_nodes is always better node
#8770
* fix: docstring
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: docstring max length
* refactor: get the successors using a list comprehension
* Apply suggestions from code review
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Added functions to calculate temperature of an ideal gas and number of moles of an ideal gas
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update physics/ideal_gas_law.py
Renamed function name
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update physics/ideal_gas_law.py
Updated formatting
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update physics/ideal_gas_law.py
Removed unnecessary parentheses
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update physics/ideal_gas_law.py
Removed unnecessary parentheses
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update ideal_gas_law.py
Updated incorrect function calls moles of gas system doctests
* Update physics/ideal_gas_law.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Reduce the complexity of linear_algebra/src/polynom_for_points.py
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix
* Fix review issues
---------
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>
* updated the url and tags for yahoo finance
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updated to return the error text
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.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>
* tanh function been added
* tanh function been added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* tanh function is added
* tanh function is added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* tanh function added
* tanh function added
* tanh function is added
* Apply suggestions from code review
* ELU activation function is added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* elu activation is added
* ELU activation is added
* Update maths/elu_activation.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Exponential_linear_unit activation is added
* Exponential_linear_unit activation is added
* SiLU activation is added
* SiLU activation is added
* mish added
* mish activation is added
* inter_quartile_range function is added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Mish activation function is added
* Mish action is added
* mish activation added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* mish activation added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* inter quartile range (IQR) function is added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* IQR function is added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* code optimized in IQR function
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* interquartile_range function is added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update maths/interquartile_range.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Changes on interquartile_range
* numpy removed from interquartile_range
* Fixes from code review
* Update interquartile_range.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* The window will now remain open after the fractal is finished being drawn, and will only close upon your click.
* Update fractals/sierpinski_triangle.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Input for user choose his Collatz sequence
Now the user can tell the algorithm what number he wants to run on the Collatz Sequence.
* updating DIRECTORY.md
---------
Co-authored-by: Hugo Folloni <hugofollogua07@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* enhance the implementation of queue using list
* enhance readability of queue_on_list.py
* rename 'queue_on_list' to 'queue_by_list' to match the class name
* Fix greyscale computation and inverted coords
* Fix test
* Add test cases
* Add reference to the greyscaling formula
---------
Co-authored-by: Colin Leroy-Mira <colin.leroy-mira@sigfox.com>
* Added file basic_orbital_capture
* updating DIRECTORY.md
* added second source
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed spelling errors
* accepted changes
* updating DIRECTORY.md
* corrected spelling error
* Added file basic_orbital_capture
* added second source
* fixed spelling errors
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* applied changes
* reviewed and checked file
* added doctest
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* removed redundant constnant
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added scipy imports
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added doctests to capture_radii and scipy const
* fixed conflicts
* finalizing file. Added tests
* Update physics/basic_orbital_capture.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>
* Reimplement polynomial_regression.py
Rename machine_learning/polymonial_regression.py to
machine_learning/polynomial_regression.py
Reimplement machine_learning/polynomial_regression.py using numpy
because the old original implementation was just a how-to on doing
polynomial regression using sklearn
Add detailed function documentation, doctests, and algorithm
explanation
* updating DIRECTORY.md
* Fix matrix formatting in docstrings
* Try to fix failing doctest
* Debugging failing doctest
* Fix failing doctest attempt 2
* Remove unnecessary return value descriptions in docstrings
* Readd placeholder doctest for main function
* Fix typo in algorithm description
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>