* some pytest on math folder
* Run the test function via a doctest
Also format the code with psf/black as discussed in CONTRIBUTING.md
* Update abs.py
* Update average_mean.py
* Create autocomplete_using_trie.py
The program aims to design a trie implementation for autocomplete which is easy to understand and ready to run.
* Removed unused import
* Updated the list value
* Update autocomplete_using_trie.py
* Run the code through Black and add doctest
* Implementation of Hardy Ramanujan Algorithm
* added docstrings
* added doctests
* Run Python black on the code
* Travis CI: Upgrade to Python 3.8
* Revert to Python 3.7
* 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
* Update DIRECTORY
* Updated DIRECTORY
* Fixed bug in directory build and re-build the directory.md
* fixed url issue
* fixed indentation in Directory.md
* Add problem-18 of project-euler
* Delete sol1.py
* Delete files
* Added more details to question
* Added doctest in printNGE()
* Made changes to fix Travis CI build
* Remove the trailing whitespace
* Added Pytests for Decission Tree
Modified the mean_squared_error to be a static method
Created the Test_Decision_Tree class
Consists of two methods
1. helper_mean_squared_error_test: This method calculates the mean squared error manually without using
numpy. Instead a for loop is used for the same.
2. test_one_mean_squared_error: This method considers a simple test case and compares the results by the
helper function and the original mean_squared_error method of Decision_Tree class. This is done using asert
keyword.
Execution:
PyTest installation
pip3 install pytest OR pip install pytest
Test function execution
pytest decision_tree.py
* Modified the pytests to be compatible with the doctest
Added 2 doctest in the mean_squared_error method
For its verification a static method helper_mean_squared_error(labels, prediction) is used
It uses a for loop to calculate the error instead of the numpy inbuilt methods
Execution
```
pytest .\decision_tree.py --doctest-modules
```
* Update treap.py
check merge()
* Update treap.py
random() is used. its difficult to write doctests
l->left
r->right
key->value
add __repr__ and __str__ in preorder
* renamed module to extend the acronym
* add type hints (will not work with Python less than 3.4)
* update docstring
* refactor the function
* add unittests for the least common squares multiple