<commit_before>import click
from syncano_cli.account.command import AccountCommands
from syncano_cli.base.options import WarningOpt
from syncano_cli.config import ACCOUNT_CONFIG_PATH


@click.group()
def top_account():
    pass


@top_account.group()
@click.pass_context
@click.option('--config', help=u'Account configuration file.')
def accounts(ctx, config):
    """Handle Syncano Account functionality."""
    account_commands = AccountCommands(config_path=config or ACCOUNT_CONFIG_PATH)
    ctx.obj['account_commands'] = account_commands


@accounts.command()
@click.pass_context
def register(ctx):
    """Allows to register new Syncano Account. Email and password are obligatory."""
    account_commands = ctx.obj['account_commands']
    account_commands.formatter.write('Create an account in Syncano.', WarningOpt())
    email = account_commands.prompter.prompt('email')
    password = account_commands.prompter.prompt('password', hide_input=True)
    repeat_password = account_commands.prompter.prompt('repeat password', hide_input=True)
    password = account_commands.validate_password(password, <PASSWORD>)
    first_name = account_commands.prompter.prompt('first name (enter to skip)', default='')
    last_name = account_commands.prompter.prompt('last name (enter to skip)', default='')

    account_commands.register(
        email=email,
        password=password,
        first_name=first_name,
        last_name=last_name,
    )
    account_commands.formatter.write('Registration successful for email: {}.'.format(email))<commit_msg>[CORE-1703] correct accounts commands displaying;<commit_after>import click
from syncano_cli.account.command import AccountCommands
from syncano_cli.base.options import WarningOpt, SpacedOpt, ColorSchema
from syncano_cli.config import ACCOUNT_CONFIG_PATH


@click.group()
def top_account():
    pass


@top_account.group()
@click.pass_context
@click.option('--config', help=u'Account configuration file.')
def accounts(ctx, config):
    """Handle Syncano Account functionality."""
    account_commands = AccountCommands(config_path=config or ACCOUNT_CONFIG_PATH)
    ctx.obj['account_commands'] = account_commands


@accounts.command()
@click.pass_context
def register(ctx):
    """Allows to register new Syncano Account. Email and password are obligatory."""
    account_commands = ctx.obj['account_commands']
    account_commands.formatter.write('Create an account in Syncano.', SpacedOpt(), WarningOpt())
    email = account_commands.prompter.prompt('email')
    password = account_commands.prompter.prompt('password', hide_input=True)
    repeat_password = account_commands.prompter.prompt('repeat password', hide_input=True)
    password = account_commands.validate_password(password, repeat_password)
    first_name = account_commands.prompter.prompt('first name (enter to skip)', default='')
    last_name = account_commands.prompter.prompt('last name (enter to skip)', default='')

    account_commands.register(
        email=email,
        password=password,
        first_name=first_name,
        last_name=last_name,
    )
    account_commands.formatter.write('Registration successful for email: {}.'.format(email), SpacedOpt())
    account_commands.formatter.write("{}: `{}`".format(
        click.style('Create your first instance now', fg=ColorSchema.INFO),
        click.style('syncano instances create my-new-instance', fg=ColorSchema.WARNING)
    ), SpacedOpt())
{'fraction_non_alphanumeric': 0.1131525226013415, 'fraction_numerical': 0.0011665208515602217, 'mean_word_length': 5.236363636363636, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '4905349', 'n_tokens_mistral': 983, 'n_tokens_neox': 954, 'n_words': 213}