* Added Scaled Exponential Linear Unit Activation Function
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update scaled_exponential_linear_unit.py
* Update scaled_exponential_linear_unit.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update scaled_exponential_linear_unit.py
* Update scaled_exponential_linear_unit.py
* Update scaled_exponential_linear_unit.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update scaled_exponential_linear_unit.py
* Update scaled_exponential_linear_unit.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Create haralick_descriptors
* Working on creating Unit Testing for Haralick Descriptors module
* Type hinting for Haralick descriptors
* Fixed docstrings, unit testing and formatting choices
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixed line size formatting
* Added final doctests
* Changed main callable
* Updated requirements.txt
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update computer_vision/haralick_descriptors.py
No! What if the Kernel is empty?
Example:
>>> kernel = np.zeros((1))
>>> kernel or np.ones((3, 3))
array([[1., 1., 1.],
[1., 1., 1.],
[1., 1., 1.]])
Co-authored-by: Christian Clauss <cclauss@me.com>
* Undone wrong commit
* Update haralick_descriptors.py
* Apply suggestions from code review
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix ruff errors in haralick_descriptors.py
* Add type hint to haralick_descriptors.py to fix ruff error
* Update haralick_descriptors.py
* Update haralick_descriptors.py
* Update haralick_descriptors.py
* Update haralick_descriptors.py
* Try to fix mypy errors in haralick_descriptors.py
* Update haralick_descriptors.py
* Fix type hint in haralick_descriptors.py
---------
Co-authored-by: Rafael Zimmer <rzimmerdev@monmo.localdomain>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Style sigmoid function in harmony with pep guideness
* [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: Tianyi Zheng <tianyizheng02@gmail.com>
* Updated postfix_evaluation.py to support Unary operators and floating point numbers Fixes#8754 and #8724
Also merged evaluate_postfix_notations.py and postfix_evaluation.py into postfix_evaluation.py
Signed-off-by: Arijit De <arijitde2050@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Updated postfix_evaluation.py to support Unary operators and floating point numbers. Fixes#8754 and formatted code to pass ruff and black test.
Also merged evaluate_postfix_notations.py and postfix_evaluation.py into postfix_evaluation.py which fixes#8724 and made sure it passes doctest
Signed-off-by: Arijit De <arijitde2050@gmail.com>
* Fixed return type hinting required by pre commit for evaluate function
Signed-off-by: Arijit De <arijitde2050@gmail.com>
* Changed line 186 to return only top of stack instead of calling the get_number function as it was converting float values to int, resulting in data loss. Fixes#8754 and #8724
Signed-off-by: Arijit De <arijitde2050@gmail.com>
* Made the requested changes
Also changed the code to make the evaluate function first convert all the numbers and then process the valid expression.
* Fixes#8754, #8724 Updated postfix_evaluation.py
postfix_evaluation.py now supports Unary operators and floating point numbers.
Also merged evaluate_postfix_notations.py and postfix_evaluation.py into postfix_evaluation.py which fixes#8724. Added a doctest example with unary operator.
* Fixes#8754, #8724 Updated postfix_evaluation.py
postfix_evaluation.py now supports Unary operators and floating point numbers.
Also merged evaluate_postfix_notations.py and postfix_evaluation.py into postfix_evaluation.py which fixes#8724. Added a doctest example with unary operator.
* Fixes#8754, #8724 Updated the parse_token function of postfix_evaluation.py
ostfix_evaluation.py now supports Unary operators and floating point numbers.
Also merged evaluate_postfix_notations.py and postfix_evaluation.py into postfix_evaluation.py which fixes#8724. Added a doctest example with unary operator and invalid expression.
* Fixes#8754, #8724 Updated postfix_evaluation.py
postfix_evaluation.py now supports Unary operators and floating point numbers.
Also merged evaluate_postfix_notations.py and postfix_evaluation.py into postfix_evaluation.py which fixes#8724. Added a doctest example with unary operator and invalid expression.
* Update postfix_evaluation.py
* Update postfix_evaluation.py
* Update postfix_evaluation.py
* Update postfix_evaluation.py
* Update postfix_evaluation.py
---------
Signed-off-by: Arijit De <arijitde2050@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>
* use np.dot
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* further improvements using array slicing
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update arc_length.py
Wrote the output of testcase
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update arc_length.py
Added the requested changes
* Update arc_length.py
followed the change request
* Update arc_length.py
followed suggestions
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Octal to Binary Convert
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* mention return type
* code scratch
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* mentioned return type
* remove comment
* added documention and some test cases
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add another test case
* fixes documention
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Documention and test cases added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* documention problem solved
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* error in exit 1
* [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: BamaCharanChhandogi <b.c.chhandogi@gmailcom>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* 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>