<commit_before># Numerai Python API
Automatically download and upload data for the numer.ai machine learning competition

This API provides access to the Numerai API. The interface is programmed in Python and allows downloading the training data, uploading predictions, and accessing some user information. Some parts of the code were taken from [numerflow](https://github.com/ChristianSch/numerflow) by ChristianSch. Visit his [wiki](https://github.com/ChristianSch/numerflow/wiki/API-Reverse-Engineering), if you need further information on the reverse engineering process.

If you encounter a problem or have suggestions, feel free to open an issue.

# Installation
Clone this repository, then `cd` into this repository's directory.  Then:
```
pip install -e .
```

# Usage
```
import numerapi

napi = numerapi.NumerAPI('email', 'password')
napi.download_current_dataset(dest_path='.', unzip=True)
napi.upload_prediction('path/to/prediction.csv')
napi.get_user('username')
napi.get_scores('username')
napi.get_earnings_per_round('username')
```

# Documentation
### `download_current_dataset`
#### Parameters
* `dest_path`: Optional parameter. Destination folder for the dataset. Default: currrent working directory.
* `unzip`: Optional parameter. Decide if you wish to unzip the downloaded training data. Default: True

#### Return values
* `status_code`: Status code of the requests operation.

### `upload_prediction`<commit_msg>Simplify installation format<commit_after># Numerai Python API
Automatically download and upload data for the numer.ai machine learning competition

This API provides access to the Numerai API. The interface is programmed in Python and allows downloading the training data, uploading predictions, and accessing some user information. Some parts of the code were taken from [numerflow](https://github.com/ChristianSch/numerflow) by ChristianSch. Visit his [wiki](https://github.com/ChristianSch/numerflow/wiki/API-Reverse-Engineering), if you need further information on the reverse engineering process.

If you encounter a problem or have suggestions, feel free to open an issue.

# Installation
Clone this repository, then `cd` into this repository's directory.  Then `pip install -e .`

# Usage
```
import numerapi

napi = numerapi.NumerAPI('email', 'password')
napi.download_current_dataset(dest_path='.', unzip=True)
napi.upload_prediction('path/to/prediction.csv')
napi.get_user('username')
napi.get_scores('username')
napi.get_earnings_per_round('username')
```

# Documentation
### `download_current_dataset`
#### Parameters
* `dest_path`: Optional parameter. Destination folder for the dataset. Default: currrent working directory.
* `unzip`: Optional parameter. Decide if you wish to unzip the downloaded training data. Default: True

#### Return values
* `status_code`: Status code of the requests operation.

### `upload_prediction`
{'fraction_non_alphanumeric': 0.09555246699096595, 'fraction_numerical': 0.0, 'mean_word_length': 5.871121718377088, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1101886', 'n_tokens_mistral': 791, 'n_tokens_neox': 750, 'n_words': 293}