STATPRLY
- is a python package with recognition tools.
Set of tools:
* Bayesian recognition digit based on standards
If you have 16.04 version, install system requirements with the following terminal commands:
$ sudo apt update && sudo apt install -y software-properties-common build-essential
Install Python 3.7 (also, we support 3.6):
$ brew install python3
Install the package from the PyPi through pip:
$ pip3 install statprly
Recognize random digit with noise:
import numpy
from statprly import MonoDigitRecognizer
if __name__ == '__main__':
recognizer = MonoDigitRecognizer()
noise = 0.1
with open('path_to_digit_to_recognize') as f:
digit_to_predict = f.read()
digit_to_predict = numpy.array(digit_to_predict)
recognized_digit = recognizer.recognize(
digit_to_predict_data=digit_to_predict,
noise_probability=noise,
)
print(recognized_digit)
Recognize random digit with noise with data from Pattern Recognition Server
:
Install requirements to interact with server:
$ pip3 install websockets
Example code can be found here: Link to github gist.
Clone the project and move to project folder:
$ git clone https://github.com/Alladin9393/statprly.git && cd statprly
Create virtualenv and install requirements:
$ virtualenv venv -p python3 && source venv/bin/activate
$ pip3 install -r requirements/development.txt
To run tests use:
$ coverage run -m pytest -vv tests
When you have developed new functionality, check it with the following command. This command creates the Python package from source code instead of installing it from the PyPi:
$ pip3 uninstall -y statprly && rm -rf dist/ statprly.egg-info && \
python3 setup.py sdist && pip3 install dist/*.tar.gz
To build the package and upload it to PypI to be accessible through pip, use the following commands. Twine requires the username and password of the account package is going to be uploaded to.
$ python3 setup.py sdist
$ twine upload dist/*
username: alladin9393
password: ******
If you want to your pull request to be review, ensure you:
If you want to your pull request to be review, ensure you: