Commit Graph

47 Commits

Author SHA1 Message Date
Christian Clauss
e9e7c96465
Create GitHub Pages docs with Sphinx (#11888) 2024-10-08 19:09:28 +02:00
Christian Clauss
0177ae1cd5
Upgrade to Python 3.13 (#11588) 2024-09-30 23:01:15 +02:00
Maxim Smolskiy
fd27953d44
Reenable files when TensorFlow supports the current Python (#11318)
* Remove python_version < '3.12' for tensorflow

* Reenable dynamic_programming/k_means_clustering_tensorflow.py

* updating DIRECTORY.md

* Try to fix ruff

* Try to fix ruff

* Try to fix ruff

* Try to fix ruff

* Try to fix ruff

* Reenable machine_learning/lstm/lstm_prediction.py

* updating DIRECTORY.md

* Try to fix ruff

* Reenable computer_vision/cnn_classification.py

* updating DIRECTORY.md

* Reenable neural_network/input_data.py

* updating DIRECTORY.md

* Try to fix ruff

* Try to fix ruff

* Try to fix mypy

* [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

---------

Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-12 09:35:49 +01:00
Poojan Smart
5987f86192
Add automatic differentiation algorithm (#10977)
* Added automatic differentiation algorithm

* file name changed

* Resolved pre commit errors

* updated dependency

* added noqa for ignoring check

* adding typing_extension for adding Self type in __new__

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* sorted requirement.text dependency

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* resolved ruff

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-27 10:47:24 +02:00
Tianyi Zheng
bb8f194957
Delete texttable from dependencies (#10565)
* Disable unused dependencies

Comment out dependencies in requirements.txt that are only used by currently-disabled files

* Delete unused dependency
2023-10-16 02:01:01 +02:00
Tianyi Zheng
c9ba5e1b6f
Disable unused dependencies (#10467)
Comment out dependencies in requirements.txt that are only used by currently-disabled files
2023-10-14 22:08:52 +02:00
Christian Clauss
0f4e51245f
Upgrade to Python 3.12 (#9576)
* DRAFT: GitHub Actions: Test on Python 3.12

Repeats #8777
* #8777 

Some of our dependencies will not be ready yet.

* Python 3.12: Disable qiskit and tensorflow algorithms

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-03 14:47:10 +05:30
Rafael Zimmer
79b043d35c
Texture analysis using Haralick Descriptors for Computer Vision tasks (#8004)
* 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>
2023-09-05 00:04:36 -04:00
Caeden Perelli-Harris
4a83e3f0b1
Fix failing build due to missing requirement (#8900)
* feat(cellular_automata): Create wa-tor algorithm

* updating DIRECTORY.md

* chore(quality): Implement algo-keeper bot changes

* build: Fix broken ci

* git rm cellular_automata/wa_tor.py

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-07-28 20:12:31 +02:00
Christian Clauss
179298e3a2
Revert "Add LeNet Implementation in PyTorch (#7070)" (#8621)
This reverts commit b2b8585e63.
2023-04-08 06:22:26 +05:30
Ishan Dutta
b2b8585e63
Add LeNet Implementation in PyTorch (#7070)
* 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>
2023-04-07 17:51:25 +02:00
Maxim Smolskiy
56a40eb3ee
Reenable files when TensorFlow supports the current Python (#8602)
* 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>
2023-04-01 19:43:11 +02:00
Abhishek Chakraborty
8951d857fe
BB84 QKD algorithm (#7898)
* Added BB84 algorithm.

* Function name lowercase + imports fix

I thought uppercase was appropriate because they're initials.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update quantum/bb84.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Removed python < 3.11 restriction from qiskit

* Removed python < 3.11 restriction from qiskit

* scikit-learn

* Update quantum/bb84.py

Correct typo in `default_rng()` call

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>

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: Maxim Smolskiy <mithridatus@mail.ru>
2022-11-08 18:24:21 +01:00
Caeden Perelli-Harris
598f6a26a1
refactor: Condense password related files in one (#7939)
* refactor: Condense `password` related files in one

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update other/password.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* dynamic_programming

* test: Make test input `str`

* requirements.txt: Remove cython>=0.29.28  # For statsmodels on Python 3.11

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-11-02 17:20:57 +01:00
Caeden Perelli-Harris
f512b4d105
refactor: Move pascals triange to maths/ (#7932)
* 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>
2022-11-01 20:25:39 +01:00
Christian Clauss
a31edd4477
Test on Python 3.11 (#6591)
* Test on Python 3.11 release candidate 2

* tensorflow; python<3.11

* tensorflow; python_version < 3.11

* tensorflow; python_version < "3.11"

* sympy, tensorflow; python_version < "3.11"

* sklearn; python_version < "3.11"

* matplotlib, pandas, qiskit

* statsmodels; python_version < "3.11"

* Bring back Pandas

* Problem deps are qiskit, statsmodels, and tensorflow

* updating DIRECTORY.md

* python-version: 3.11-dev --> 3.11

* updating DIRECTORY.md

* Add pytest --ignore to pyproject.toml

* Update build.yml

* Update pyproject.toml

* Update pyproject.toml

* Python 3.11

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-10-31 14:50:03 +01:00
Sagar Giri
0f06a0b5ff
Add web program to fetch top 10 real time billionaires using the forbes API. (#7538)
* Add web program to fetch top 10 realtime billioners using forbes API.

* Provide return type to function.

* Use rich for tables and minor refactors.

* Fix tiny typo.

* Add the top {LIMIT} in rich table title.

* Update web_programming/get_top_billioners.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Change the API path.

* Update get_top_billioners.py

Co-authored-by: Caeden Perelli-Harris <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>
2022-10-23 16:35:27 +02:00
Alan Paul
831280cedd
Add quantum_random.py (#7446)
* Create quantum_random.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update quantum_random.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update quantum_random.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update quantum/quantum_random.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update quantum/quantum_random.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update quantum/quantum_random.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update quantum_random.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update quantum_random.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* requirements.txt: Add projectq

* Update quantum_random.py

* Update quantum/quantum_random.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update quantum_random.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update quantum_random.py

* Update quantum_random.py

* Update quantum/quantum_random.py

* Update quantum/quantum_random.py

* Update quantum_random.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>
2022-10-20 12:27:13 +02:00
CenTdemeern1
04698538d8
Misc fixes across multiple algorithms (#6912)
Source: Snyk code quality
Add scikit-fuzzy to requirements

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-16 10:55:38 +05:30
Martmists
a04a6365de
Add Equal Loudness Filter (#7019)
* Add Equal Loudness Filter

Signed-off-by: Martmists <martmists@gmail.com>

* NoneType return on __init__

Signed-off-by: Martmists <martmists@gmail.com>

* Add data to JSON as requested by @CenTdemeern1 in a not very polite manner

Signed-off-by: Martmists <martmists@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* 'modernize'

Signed-off-by: Martmists <martmists@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update audio_filters/equal_loudness_filter.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update equal_loudness_filter.py

* Update equal_loudness_filter.py

* Finally!!

* Arrgghh

Signed-off-by: Martmists <martmists@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>
2022-10-12 15:19:00 +02:00
Christian Clauss
f707f6d689
Upgrade to Python 3.10 (#5992)
* Upgrade to Python 3.10

* Upgrade to Python 3.10

* mypy || true

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-02-13 06:57:44 +01:00
Andrew Grangaard
551c65766d
[Mypy] fix other/least_recently_used (#5814)
* makes LRUCache constructor concrete

* fixes bug in dq_removal in other/least_recently_used

+ deque.remove() operates by value not index

* [mypy] Annotates other/least_recently_used over generic type

+ clean-up: rename key_reference to match type.

* [mypy] updates example to demonstrate LRUCache with complex type

* Adds doctest to other/least_recently_used

* mypy.ini: Remove exclude = (other/least_recently_used.py)

* Various mypy configs

* Delete mypy.ini

* Add mypy to .pre-commit-config.yaml

* mypy --ignore-missing-imports --install-types --non-interactive .

* mypy v0.910

* Pillow=8.3.7

* Pillow==8.3.7

* Pillow==8.3.2

* Update .pre-commit-config.yaml

* Update requirements.txt

* Update pre-commit.yml

* --install-types  # See mirrors-mypy README.md

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-11-16 15:01:17 +01:00
Maxim Smolskiy
729aaf6427
Improve Project Euler problem 014 solution 2 (#5744)
* Improve solution

* Uncomment code that has been commented due to slow execution affecting Travis

* Fix

* scikit-fuzzy is causing broken builds

* fuzz = None

* Update fuzzy_operations.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-11-04 17:01:21 +01:00
Souvik Ghosh
0ea5c734e1
sock_merchant.py: Matching socks by color (#5761)
* Python file for finding number of pairs

* updating DIRECTORY.md

* fixed iterative_pair.py

* further fixed with type casting

* fixed naming conventions

* further fixed with naming convention

* documented done

* build issue fixed

* updating DIRECTORY.md

* Revert "documented done"

This reverts commit 3be15ca374.

* Update canny.py

* Update test_digital_image_processing.py

* Update sobel_filter.py

* requirements.txt fixed

* keras<2.7.0

* Update sock_merchant.py

* doctest with black fixed

* Update sock_merchant.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-11-03 21:24:50 +01:00
Prakhar Gurunani
827b8f04a4
Get top 10 HN posts (#5604)
* updating DIRECTORY.md

* updating DIRECTORY.md

* Create get_top_hn_posts.py

* updating DIRECTORY.md

* Add return type and desc

* Add texttable

* Update web_programming/get_top_hn_posts.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update web_programming/get_top_hn_posts.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Get top 10 posts

* Update get_top_hn_posts.py

* Don't use texttable

* Setup doctest

* Fix pre-commit issues

* Remove print statement

* Add hackernews_top_stories_as_markdown()

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-10-26 15:13:23 +02:00
Prakhar Gurunani
f93c7d4d80
Get user tweets (#5593)
* updating DIRECTORY.md

* Create get_user_tweets.py

* updating DIRECTORY.md

* Reformat code with black

* Add argument type

* Add return type

* Add tweepy

* Fix isort issues

* Fix flake8 issues

* WIP: doctest

* Doctest setup and format with pre-commit

* Remove doctests

* Update web_programming/get_user_tweets.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update get_user_tweets.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-10-26 10:05:13 +02:00
Aniruddha Bhattacharjee
b743e44259
Wavelet tree (#4267)
* Added the matrix_exponentiation.py file in maths directory

* Implemented the requested changes

* Update matrix_exponentiation.py

* resolve merge conflict with upstream branch

* add new line at end of file

* add wavelet_tree

* fix isort issue

* updating DIRECTORY.md

* fix variable names in wavelet_tree and correct typo

* Add type hints and variable renaming

* Update data_structures/binary_tree/wavelet_tree.py

Add doctests to placate the algorithm-bot, thanks to @cclauss.

Co-authored-by: Christian Clauss <cclauss@me.com>

* Move doctest to individual functions and reformat code

* Move common test array to the global scope and reuse in tests

* MMove test array to global scope and minor linting changes

* Correct the failing pytest tests

* MUse built-in list for type annotation

* Update wavelet_tree.py

* types-requests

* updating DIRECTORY.md

* Update wavelet_tree.py

* # type: ignore

* # type: ignore

* Update decrypt_caesar_with_chi_squared.py

* ,

* Update decrypt_caesar_with_chi_squared.py

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Aniruddha Bhattacharjee <aniruddha@Aniruddhas-MacBook-Air.local>
2021-06-08 22:49:33 +02:00
onlinejudge95
002c545aee
Removes python_version condition on tensorflow (#4435) 2021-05-17 13:58:51 +02:00
The Data Lady
4ab39c2001
Removed keras dependency from requirements.txt (#4374) 2021-05-17 17:06:14 +05:30
Christian Clauss
3fdbf9741d
Python 3.9 (#3926)
* Upgrade to Python 3.9

* pip install wheel for faster builds

* updating DIRECTORY.md

* requirements.txt: tensorflow; python_version < '3.9'

* keras requires tensorflow

* Rename lstm_prediction.py to lstm_prediction.py_tf

* Update requirements.txt

* updating DIRECTORY.md

* Update requirements.txt

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2020-11-24 12:41:10 +01:00
Nandiya
12c69800bd
Forecast (#3219)
* add forecasting code

* add statsmodel

* sort import

* sort import fix

* fixing black

* sort requirement

* optimize code

* try with limited data

* sort again

* sort fix

* sort fix

* delete warning and black

* add code for forecasting

* use black

* add more hints to describe

* add doctest

* finding whitespace

* fixing doctest

* delete

* revert back

* revert back

* revert back again

* revert back again

* revert back again

* try trimming whitespace

* try adding doctypeand etc

* fixing reviews

* deleting all the space

* fixing the build

* delete x

* add description for safety checker

* deleting subscription integer

* fix docthint

* make def to use function parameters and return values

* make def to use function parameters and return values

* type hints on data safety checker

* optimize code

* Update run.py

Co-authored-by: FVFYK3GEHV22 <fvfyk3gehv22@FVFYK3GEHV22s-MacBook-Pro.local>
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-10-24 16:07:27 +02:00
Abhishek Jaisingh
6e01004535
Add First Quantum Qiskit Code Tutorial (#3173)
* Add First Quantum Qiskit Code Tutorial

* Add Qiskit Requirement

* Address Review Comments

* fixup! Format Python code with psf/black push

* Update q1.py

* updating DIRECTORY.md

* Update and rename q1.py to single_qubit_measure.py

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-10-12 21:41:05 +02:00
Christian Clauss
ddfa9e4f22
Travis CI: Remove redundant tests (#2523)
* Travis CI: Remove redundant tests

* fixup! before_script

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-30 19:26:38 +02:00
Dhruv
ae65f55de3
Add pre-commit hook for TheAlgorithms/Python (#2511)
* Add pre-commit basic config file

* Add pre-commit to requirements.txt

* Small tweaks and use stable for black

* Fix isort section in pre-commit-config file

* Fix errors and EOF only for Python files
2020-09-30 10:39:14 +02:00
Meysam
2e790ce4ca
file-transfer: writing tests and ensuring that all is going well (#2413)
* file-transfer: writing tests and ensuring that all is going well

* def send_file(filename: str = "mytext.txt", testing: bool = False) -> None:

* send_file(filename="mytext.txt", testing=True)

* Update send_file.py

* requirements.txt: lxml

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-11 23:13:43 +02:00
Christian Clauss
1fb1fdd130
requirements.txt: Unpin numpy (#2287)
* requirements.txt: Unpin numpy

* fixup! Format Python code with psf/black push

* Less clutter

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-08-06 17:50:23 +02:00
Jeffin Francis
8a8527f1bd
Added Lstm example for stock predection (#1908)
* Added Lstm example for stock predection

* Changes after review

* changes after build failed

* Add Kiera’s to requirements.txt

* requirements.txt: Add keras and tensorflow

* psf/black

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-05-07 08:53:44 +02:00
Prince Gangurde
b64c4af296
Create gaussian_naive_bayes.py (#1861)
* Create Gaussian_Naive_Bayes.py

Added Gaussian Naive Bayes algorithm in the module machine learning

* Rename Gaussian_Naive_Bayes.py to gaussian_naive_bayes.py

* requirements.txt: pip install xgboost

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-04-17 09:38:44 +08:00
Christian Clauss
652b891a75
Travis CI: Upgrade to Python 3.8 (#1783)
* Travis CI: Upgrade to Python 3.8

* updating DIRECTORY.md

* Tensorflow is not yet compatible with Python 3.8

* Disable k_means_clustering_tensorflow.py

* updating DIRECTORY.md

* Disable gan.py

* updating DIRECTORY.md

* Disable input_data.py

* updating DIRECTORY.md

* pip install a current version of six
2020-02-23 04:23:00 +01:00
Christian Clauss
b9bff8f3a7
Remove \r from strings (#1622)
* Remove \r from strings

* Satisfy tensorflow with numpy>=1.17.4
2019-12-10 15:53:50 +01:00
Mantas Zimnickas
5616fa9e62 Add pytest-cov (#1578)
* Add pytest-cov

Also added coverage report in .travis.yml file.

* updating DIRECTORY.md

* Sort by missing statements

* sort = Cover
2019-11-17 19:37:58 +01:00
kunal kumar barman
43f99e56c9 Python program that surfs 3 site at a time (#1389)
* Python program that scrufs 3 site at a time

add input in the compiling time  like --  python3 project1.py (man)

* Update project1.py

* noqa: F401 and reformat with black

* Rename project1.py to web_programming/crawl_google_results.py

* Add beautifulsoup4 to requirements.txt

* Add fake_useragent to requirements.txt

* Update crawl_google_results.py

* headers={"UserAgent": UserAgent().random}

* html.parser, not lxml

* link, not links
2019-10-18 23:30:52 +02:00
Jigyasa G
a7f3851939 fuzzy operations added (#1310)
* fuzzy operations added

* fuzzy inference system added

* unnecessary files removed

* requirements added

* Modified requirements for travis ci

* Modified requirements for travis ci

* Add scikit-fuzzy to requirements.txt
2019-10-18 20:26:48 +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
QuantumNovice
05e567c2f9 Code to change contrast (#1060)
* Add files via upload

* Update requirements.txt

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload
2019-07-21 13:03:39 +02:00
cclauss
e6eaa078e2
Pytest the entire repo (#980)
* Pytest the entire repo

* Do each directory for now...

* YAML files hate tabs

* Add more requirements

* pip install opencv-python

* Comment out FTP

* Add pandas and sklearn to requirements

* Comment out FTP, graphs, machine_learning, maths, neural_network, project_euler

* Update .travis.yml

* Comment out Data structures

* if __name__ == "__main__":

* pytest --ignore=

* pytest .

* Update .travis.yml

* pytest . --doctest-modules --ignore=${IGNORE}

* Ignore --ignore because it just hangs
2019-07-10 06:59:39 +02:00
cclauss
b7f13d991c Travis CI: Run black, doctest, flake8, mypy, and pytest (#964)
* Travis CI: Add type checking with mypy

* Create requirements.txt

* script: mypy --ignore-missing-stubs=cv2,numpy .

* Delete requirements.txt

* script: mypy --ignore-missing-imports .

* Run doctests

* Disable doctest -v other/detecting_english_programmatically.py

* Pytest

* No |

* pytest || true

* Run black doctest flake8 mypy pytest

* after_success: Build Directory.md

* Typo in filename: Dictionary.txt --> dictionary.txt'

Discovered via doctest run in #964

* python -m doctest -v

* pip install black flake8 mypy pytest

* pytest --doctest-glob='*.py'

* pytest --doctest-modules

* pytest --doctest-modules ./sorts

* pytest --doctest-modules ./ciphers ./other ./searches ./sorts ./strings || true

* if __name__ == "__main__":

* if __name__ == "__main__":

* if __name__ == '__main__':

* if __name__ == '__main__':

* if __name__ == '__main__':

* Create requirements.txt

* Update requirements.txt

* if __name__ == "__main__":

* Lose the doctests

* if __name__ == '__main__':

* Remove print-a-tuple

* doctest: Added missing spaces

* Update tabu_search.py

* The >>> are not doctests so change to >>)

* Travis CI: Run black, doctest, flake8, mypy, and pytest

* Link to the separate DIRECTORY.md file

* Update README.md
2019-07-08 23:27:51 +08:00