### Numerapi Main Competition Usage Example Source: https://github.com/uuazed/numerapi/blob/master/README.md Demonstrates how to use the numerapi library for the main Numerai competition. Includes downloading datasets, checking for new rounds, retrieving leaderboard information, managing models, uploading predictions, staking, and processing daily user performances into a pandas DataFrame. API tokens can be passed directly or set via environment variables. ```python import numerapi napi = numerapi.NumerAPI(verbosity="info") napi.download_dataset("v4/train.parquet", "train.parquet") leaderboard = napi.get_leaderboard() if napi.check_new_round(): print("new round has started within the last 12hours!") else: print("no new round within the last 12 hours") example_public_id = "somepublicid" example_secret_key = "somesecretkey" napi = numerapi.NumerAPI(example_public_id, example_secret_key) model_id = napi.get_models()['uuazed'] napi.upload_predictions("preds.csv", model_id=model_id) napi.stake_increase(1.2) import pandas as pd df = pd.DataFrame(napi.daily_user_performances("uuazed")) ``` -------------------------------- ### Numerapi Numerai Signals Usage Example Source: https://github.com/uuazed/numerapi/blob/master/README.md Illustrates the usage of the numerapi library for the Numerai Signals competition. Covers downloading data, accessing leaderboard information, setting up API tokens, uploading predictions, fetching daily user performances as a pandas DataFrame, and utilizing the diagnostics tool for prediction analysis. ```python import numerapi napi = numerapi.SignalsAPI() leaderboard = napi.get_leaderboard() example_public_id = "somepublicid" example_secret_key = "somesecretkey" napi = numerapi.SignalsAPI(example_public_id, example_secret_key) model_id = napi.get_models()['uuazed'] napi.upload_predictions("preds.csv", model_id=model_id) import pandas as pd df = pd.DataFrame(napi.daily_user_performances("uuazed")) napi.upload_diagnostics("preds.csv", model_id=model_id) napi.upload_diagnostics(df=df, model_id=model_id) napi.diagnostic(model_id) ``` -------------------------------- ### Numerapi Submit Command Help Source: https://github.com/uuazed/numerapi/blob/master/README.md Shows the help specific to the 'submit' command, detailing its options for uploading predictions. ```bash $ numerapi submit --help Usage: numerapi submit [OPTIONS] PATH Upload predictions from file. Options: --tournament INTEGER The ID of the tournament, defaults to 1 --model_id TEXT An account model UUID (required for accounts with multiple models --help Show this message and exit. ``` -------------------------------- ### Numerapi CLI Help Source: https://github.com/uuazed/numerapi/blob/master/README.md Displays the main help message for the Numerapi CLI, outlining available commands and general usage. ```bash $ numerapi --help Usage: numerapi [OPTIONS] COMMAND [ARGS]... Wrapper around the Numerai API Options: --help Show this message and exit. Commands: account Get all information about your account! check-new-round Check if a new round has started within... competitions Retrieves information about all... current-round Get number of the current active round. daily-model-performances Fetch daily performance of a model. daily-submissions-performances Fetch daily performance of a user's... dataset-url Fetch url of the current dataset. download-dataset Download specified file for the given... download-dataset-old Download dataset for the current active... leaderboard Get the leaderboard. list-datasets List of available data files models Get map of account models! profile Fetch the public profile of a user. stake-decrease Decrease your stake by `value` NMR. stake-drain Completely remove your stake. stake-get Get stake value of a user. stake-increase Increase your stake by `value` NMR. submission-filenames Get filenames of your submissions submit Upload predictions from file. transactions List all your deposits and withdrawals. user Get all information about you!... version Installed numerapi version. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.