<commit_before># pip install boto
# pip install fabric
# pip install mako

from mako.template import Template
from fabric.api import *
import aws, time

@task
def provision_activemq():
    node = aws.provision_with_boto('activemq')
    configure_server_cfg(node.hostname)
    with connection_to_node(node):
        setup_puppet_standalone()
        put('/tmp/server.cfg', '/tmp')
        put('client.cfg', '/tmp')
        put('activemq.xml', '/tmp')
        put('activemq.pp', '/tmp')
        sudo('puppet apply /tmp/activemq.pp')

@task
def provision_node(node_name):
    node = aws.provision_with_boto(node_name)
    configure_server_cfg(aws.read_config().get('activemq', 'public_dns_name'))
    with connection_to_node(node):
        setup_puppet_standalone()
        put('/tmp/server.cfg', '/tmp')
        put('node.pp', '/tmp')
        sudo('puppet apply /tmp/node.pp')

@task
def mco_ping():
    node = aws.provision_with_boto('activemq')
    with connection_to_node(node):
        run('mco ping')

@task
def cleanup():
    config = aws.read_config()
    for section in config.sections():
        print 'Shutting down', section, '...'
        aws.terminate_instance(section)
<commit_msg>open shell to given node<commit_after># pip install boto
# pip install fabric
# pip install mako

from mako.template import Template
from fabric.api import *
import aws, time

@task
def provision_activemq():
    node = aws.provision_with_boto('activemq')
    configure_server_cfg(node.hostname)
    with connection_to_node(node):
        setup_puppet_standalone()
        put('/tmp/server.cfg', '/tmp')
        put('client.cfg', '/tmp')
        put('activemq.xml', '/tmp')
        put('activemq.pp', '/tmp')
        sudo('puppet apply /tmp/activemq.pp')

@task
def provision_node(node_name):
    node = aws.provision_with_boto(node_name)
    configure_server_cfg(aws.read_config().get('activemq', 'public_dns_name'))
    with connection_to_node(node):
        setup_puppet_standalone()
        put('/tmp/server.cfg', '/tmp')
        put('node.pp', '/tmp')
        sudo('puppet apply /tmp/node.pp')

@task
def shell(node_name):
    node = aws.provision_with_boto(node_name)
    with connection_to_node(node):
        open_shell()

@task
def mco_ping():
    node = aws.provision_with_boto('activemq')
    with connection_to_node(node):
        run('mco ping')

@task
def cleanup():
    config = aws.read_config()
    for section in config.sections():
        print 'Shutting down', section, '...'
        aws.terminate_instance(section)

{'fraction_non_alphanumeric': 0.1372626582278481, 'fraction_numerical': 0.0, 'mean_word_length': 3.375432525951557, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '862395', 'n_tokens_mistral': 838, 'n_tokens_neox': 842, 'n_words': 172}