<commit_before># -*- coding: utf-8 -*-

from argparse import ArgumentParser
import sys

import neroman

def create_config_parser():
    parser = ArgumentParser()
    parser.add_argument('--experiment',
            metavar='folder',
            nargs=1,
            help='Creates experiments according to the config file found in'
            'the folder')
    parser.add_argument('--cluster',
            metavar=('id', 'address', 'type'),
            nargs=3,
            help='Specify a new cluster for computing')
    parser.add_argument('--user',
            metavar=('name', 'email'),
            nargs=2,
            help='Updates user information')
    parser.add_argument('--submit',
            nargs="+",
            help='Submits an experiment to be run')
    parser.add_argument('--status',
            metavar='experiment_id',
            nargs='?',
            const='all',
            help='Displays neronet status information')
    return parser

def main():
    """Parses the command line arguments and starts Neroman
    """
    parser = create_config_parser()
    args = parser.parse_args()
    nero = neroman.Neroman()
    if args.experiment:
        experiment_folder = args.experiment[0]
        try:
            nero.specify_experiments(experiment_folder)
            nero.save_database()
        except (FileNotFoundError, neroman.FormatError) as e:
            print(e)
    if args.cluster:
        cluster_id = args.cluster[0]
        address = args.cluster[1]
        cluster_type = args.cluster[2]
        nero.specify_cluster(cluster_id, address, cluster_type)
    if args.user:
        name = args.user[0]
        email = args.user[1]
        nero.specify_user(name, email)
    if args.status:
        try:
            nero.status(args.status)
        except IOError as e:
            print(e)
    if args.submit:<commit_msg>Samuel fixed nerocli.<commit_after># -*- coding: utf-8 -*-

from argparse import ArgumentParser
import sys

import neronet.neroman

def create_config_parser():
    parser = ArgumentParser()
    parser.add_argument('--experiment',
            metavar='folder',
            nargs=1,
            help='Creates experiments according to the config file found in'
            'the folder')
    parser.add_argument('--cluster',
            metavar=('id', 'address', 'type'),
            nargs=3,
            help='Specify a new cluster for computing')
    parser.add_argument('--user',
            metavar=('name', 'email'),
            nargs=2,
            help='Updates user information')
    parser.add_argument('--submit',
            nargs="+",
            help='Submits an experiment to be run')
    parser.add_argument('--status',
            metavar='experiment_id',
            nargs='?',
            const='all',
            help='Displays neronet status information')
    return parser

def main():
    """Parses the command line arguments and starts Neroman
    """
    parser = create_config_parser()
    args = parser.parse_args()
    nero = neronet.neroman.Neroman()
    if args.experiment:
        experiment_folder = args.experiment[0]
        try:
            nero.specify_experiments(experiment_folder)
            nero.save_database()
        except (FileNotFoundError, neronet.neroman.FormatError) as e:
            print(e)
    if args.cluster:
        cluster_id = args.cluster[0]
        address = args.cluster[1]
        cluster_type = args.cluster[2]
        nero.specify_cluster(cluster_id, address, cluster_type)
    if args.user:
        name = args.user[0]
        email = args.user[1]
        nero.specify_user(name, email)
    if args.status:
        try:
            nero.status(args.status)
        except IOError as e:
            print(e)
    if args.submit:
{'fraction_non_alphanumeric': 0.1127739176910743, 'fraction_numerical': 0.005344735435595938, 'mean_word_length': 2.121768140116764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '4075002', 'n_tokens_mistral': 1086, 'n_tokens_neox': 1085, 'n_words': 249}