<commit_before>import logging

import fabric.api
import fabric.operations

from cloudenvy.envy import Envy


class EnvySCP(object):
    """SCP Files to your ENVy"""

    def __init__(self, argparser):
        self._build_subparser(argparser)

    def _build_subparser(self, subparsers):
        subparser = subparsers.add_parser('scp', help='scp help')
        subparser.set_defaults(func=self.run)

        subparser.add_argument('source')
        subparser.add_argument('target')
        subparser.add_argument('-n', '--name', action='store', default='',
                               help='specify custom name for an ENVy')
        return subparser

    def run(self, config, args):
        envy = Envy(config)

        if envy.ip():
            host_string = '%s@%s' % (envy.remote_user, envy.ip())

            with fabric.api.settings(host_string=host_string):
                fabric.operations.put(args.source, args.target)
        else:
            logging.error('Could not find IP to upload file to.')<commit_msg>Document source and target arguments of envy scp<commit_after>import logging

import fabric.api
import fabric.operations

from cloudenvy.envy import Envy


class EnvySCP(object):
    """SCP Files to your ENVy"""

    def __init__(self, argparser):
        self._build_subparser(argparser)

    def _build_subparser(self, subparsers):
        subparser = subparsers.add_parser('scp', help='scp help')
        subparser.set_defaults(func=self.run)

        subparser.add_argument('source',
                help='Local path to copy into your ENVy.')
        subparser.add_argument('target',
                help='Location in your ENVy to place file(s). Non-absolute '
                     'paths are interpreted relative to remote_user homedir.')
        subparser.add_argument('-n', '--name', action='store', default='',
                               help='specify custom name for an ENVy')
        return subparser

    def run(self, config, args):
        envy = Envy(config)

        if envy.ip():
            host_string = '%s@%s' % (envy.remote_user, envy.ip())

            with fabric.api.settings(host_string=host_string):
                fabric.operations.put(args.source, args.target)
        else:
            logging.error('Could not find IP to upload file to.')
{'fraction_non_alphanumeric': 0.11149825783972125, 'fraction_numerical': 0.0, 'mean_word_length': 2.5015243902439024, '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': '1184351', 'n_tokens_mistral': 688, 'n_tokens_neox': 660, 'n_words': 164}