Python package with recognition tools.
Project description
STATPRLY
STATPRLY
- is a python package with recognition tools.
Set of tools:
* Bayesian recognition digit based on standards
Getting started
Requirements
Ubuntu 16.04 & 18.04
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
MacOS
Install Python 3.7 (also, we support 3.6):
$ brew install python3
Installation
Install the package from the PyPi through pip:
$ pip3 install statprly
Usage
Bayesian Recognition Digit
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.
Development
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
Production
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: ******
Contributing
Request pull request's review
If you want to your pull request to be review, ensure you:
If you want to your pull request to be review, ensure you:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file statprly-0.1.2.tar.gz
.
File metadata
- Download URL: statprly-0.1.2.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1f78d44d3216b43baa4393b4b0a5dd9af31c23f62af456d999387a02b93f298 |
|
MD5 | d990297101fe6416f78a345ba989d90e |
|
BLAKE2b-256 | 37ad6cb3d0edfeacb2eaddb14b0244ba0c6c4ea216fd9b0c913f83015123f1cd |