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
Caeden
d5a9f649b8
Add flake8-builtins to pre-commit and fix errors ( #7105 )
...
Ignore `A003`
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 19:53:59 +05:30
algobytewise
9b60be67af
[mypy] fix small folders 2 ( #4293 )
...
* Update perceptron.py
* Update binary_tree_traversals.py
* fix machine_learning
* Update build.yml
* Update perceptron.py
* Update machine_learning/forecasting/run.py
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-03-26 12:21:16 +01:00
Christian Clauss
7ebe2b9593
Test the exception conditions ( #1853 )
...
* Text exception conditions
These are ValueErrors, not AttributeErrors.
* fixup! Format Python code with psf/black push
* Update perceptron.py
* Update perceptron.py
* Update perceptron.py
* Revert the test
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-04-13 02:10:21 +02:00
Christian Clauss
bfcb95b297
Create codespell.yml ( #1698 )
...
* fixup! Format Python code with psf/black push
* Create codespell.yml
* fixup! Format Python code with psf/black push
2020-01-18 13:24:33 +01:00
himanshujain171
53ff735701
Factors of a number ( #1493 )
...
* Factors of a number
* Update factors.py
* Fix mypy issue in basic_maths.py
* Fix mypy error in perceptron.py
* def primes(max: int) -> List[int]:
* Update binomial_heap.py
* Add a space
* Remove a space
* Add a space
2019-10-29 23:54:30 +01:00
percy07
f8e97aa597
Update basic_maths.py ( #1517 )
...
* Update basic_maths.py
Add Doctests.
* Update basic_maths.py
* Add a space to fix the doctest
2019-10-29 21:54:31 +01:00
Janith Wanniarachchi
dfea6f3f0b
✅ added tests for Perceptron in Neural Networks ( #1506 )
...
* ✅ added tests for Perceptron in Neural Networks
* Space
* Format code with psf/black
2019-10-29 11:53:29 +01: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
Christian Clauss
36684db278
Travis CI: Add pytest --doctest-modules machine_learning ( #1016 )
...
* Travis CI: Add pytest --doctest-modules neural_network
Fixes #987
```
neural_network/perceptron.py:123: in <module>
sample.insert(i, float(input('value: ')))
../lib/python3.7/site-packages/_pytest/capture.py:693: in read
raise IOError("reading from stdin while output is captured")
E OSError: reading from stdin while output is captured
-------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
('\nEpoch:\n', 399)
------------------------
value:
```
* Adding fix from #1056 -- thanks @QuantumNovice
* if __name__ == '__main__':
* pytest --ignore=virtualenv # do not test our dependencies
2019-08-10 22:48:00 +02:00
cclauss
c2e8582abd
Travis CI: Add pytest --doctest-modules neural_network ( #1028 )
...
* neural_network/perceptron.py: Add if __name__ == '__main__':
* Remove tab indentation
* Add neural_network to the pytests
2019-07-18 13:10:52 +02:00
dilson
84ae00197f
Fixed typo error in perceptron.py
2018-11-14 21:08:43 -03:00
Alex Brown
ea2ddaaf6a
all valid python 3
2018-10-20 14:45:08 -05:00
Alex Brown
564179a0ec
increment 1
2018-10-19 07:48:28 -05:00