<commit_before><p align="center">
  <img src="https://i.imgur.com/AmrHhZV.png" width="425" height="200">
</p>

<div align="center">

[![travis build](https://img.shields.io/travis/amicks/Speculator.svg)](://travis-ci.org/amicks/Speculator)
![python version](https://img.shields.io/pypi/pyversions/Speculator.svg)
[![license](https://img.shields.io/pypi/l/Speculator.svg)](https://github.com/amicks/Speculator/blob/master/LICENSE)
[![tag](https://img.shields.io/github/tag/amicks/speculator.svg)](https://github.com/amicks/Speculator/archive/0.1.tar.gz)
![status](https://img.shields.io/pypi/status/Speculator.svg)

</div>

<br/>

Speculator is an API for predicting the price trend of cryptocurrencies like Bitcoin and Ethereum.

Normal markets will also be added in future updates.

## Getting Started
Using Python: `python main.py`

Using Public REST API:
``` bash
python api.py
curl http://localhost:5000/api/public/predict
```

For a full list of SQLALCHEMY\_DATABASE\_URI formats, see [SQLAlchemy's docs](http://flask-sqlalchemy.pocoo.org/2.3/config/) under "Connection URI Format".

**Prediction Example:**
<p>
  <img src="https://i.imgur.com/c6JdDWt.png" width="700" height="180">
</p>

Use the `--help` flag for a complete list of optional arguments.
###### Note: A website for a friendly user experience is in development

### Dependencies
Make sure these packages are installed before running Speculator:
``` bash
pip3 install delorean requests numpy tensorflow scikit-learn pandas flask flask-caching flask-restful flask-sqlalchemy psycopg2 webargs
```

### API
#### Web RESTful API
Just start the Flask server then make requests:

``` bash
python api.py
curl http://localhost:5000/api/public/predict -X GET
```

If you want to access the private API, simply make the DB connection an environment variable:
```
export SQLALCHEMY_DATABASE_URI='postgresql://username:password@host:port/db'
```

Private API access with a DB is enabled by default in api/\_\_init\_\_.py
Set `ENABLE_DB = False` to disable this.

##### Resources/Routes

---
<commit_msg>Fix typo<commit_after><p align="center">
  <img src="https://i.imgur.com/AmrHhZV.png" width="425" height="200">
</p>

<div align="center">

[![travis build](https://img.shields.io/travis/amicks/Speculator.svg)](://travis-ci.org/amicks/Speculator)
![python version](https://img.shields.io/pypi/pyversions/Speculator.svg)
[![license](https://img.shields.io/pypi/l/Speculator.svg)](https://github.com/amicks/Speculator/blob/master/LICENSE)
[![tag](https://img.shields.io/github/tag/amicks/speculator.svg)](https://github.com/amicks/Speculator/archive/0.1.tar.gz)
![status](https://img.shields.io/pypi/status/Speculator.svg)

</div>

<br/>

Speculator is an API for predicting the price trend of cryptocurrencies like Bitcoin and Ethereum.

Normal markets will also be added in future updates.

## Getting Started
Using Python: `python main.py`

Using Public REST API:
``` bash
python api.py
curl http://localhost:5000/api/public/predict
```

**Prediction Example:**
<p>
  <img src="https://i.imgur.com/c6JdDWt.png" width="700" height="180">
</p>

Use the `--help` flag for a complete list of optional arguments.
###### Note: A website for a friendly user experience is in development

### Dependencies
Make sure these packages are installed before running Speculator:
``` bash
pip3 install delorean requests numpy tensorflow scikit-learn pandas flask flask-caching flask-restful flask-sqlalchemy psycopg2 webargs
```

### API
#### Web RESTful API
Just start the Flask server then make requests:

``` bash
python api.py
curl http://localhost:5000/api/public/predict -X GET
```

If you want to access the private API, simply make the DB connection an environment variable:
```
export SQLALCHEMY_DATABASE_URI='postgresql://username:password@host:port/db'
```

For a full list of SQLALCHEMY\_DATABASE\_URI formats, see [SQLAlchemy's docs](http://flask-sqlalchemy.pocoo.org/2.3/config/) under "Connection URI Format".

Private API access with a DB is enabled by default in api/\_\_init\_\_.py
Set `ENABLE_DB = False` to disable this.

##### Resources/Routes

---

{'fraction_non_alphanumeric': 0.1496962332928311, 'fraction_numerical': 0.013122721749696233, 'mean_word_length': 4.863247863247863, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 18, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '273143', 'n_tokens_mistral': 1445, 'n_tokens_neox': 1322, 'n_words': 365}