<commit_before>from fabric.api import env, execute, hosts, local
import fabric.contrib.project as project


env.use_ssh_config = True

SOURCE_DIR = './source/'
BUILD_DIR = './_build/'
BUILD_JS_FILENAME = 'build.js'
REQUIREJS_FILENAME = 'require-2.1.0.js'
GOOGLE_ANALYTICS_FILENAME = 'google-analytics.txt'
PUBLISH_HOST = 'stuartkeith'
PUBLISH_REMOTE_DIR = '/home/stuartkeith/webapps/static/html/webaudiosequencer/'

GLUE_EACH_TEMPLATE = """
span.{{ class_name }}, .{{ class_name }}::-webkit-slider-thumb {
    background-image: url({{ sprite_url }});
    background-repeat: no-repeat;
}

span.{{ class_name }} {
    background-position: {{ x }}px {{ y }}px;
    height: {{ height }}px;
    width: {{ width }}px;
    margin-left: {{ (-width / 2)|int }}px;
    margin-top: {{ (-height / 2)|int }}px;
}

.{{ class_name }}::-webkit-slider-thumb {
    background-position: ({{ x }}px - $button-border) ({{ y }}px - $button-border);
}

${{ class_name }}-width: {{ width }}px;
${{ class_name }}-height: {{ height }}px;

"""

def _read_google_analytics_file_contents():
    try:
        with open(GOOGLE_ANALYTICS_FILENAME) as ga_file:
            contents = ga_file.read()
    except IOError:
            contents = ''

    return contents

def clean():
    local('rm %s -rf' % BUILD_DIR)

def scss():
    local('sass %sscss/main.scss %scss/main.css \
           --style compressed' % (SOURCE_DIR, SOURCE_DIR))<commit_msg>Rearrange rm arguments in fabfile.<commit_after>from fabric.api import env, execute, hosts, local
import fabric.contrib.project as project


env.use_ssh_config = True

SOURCE_DIR = './source/'
BUILD_DIR = './_build/'
BUILD_JS_FILENAME = 'build.js'
REQUIREJS_FILENAME = 'require-2.1.0.js'
GOOGLE_ANALYTICS_FILENAME = 'google-analytics.txt'
PUBLISH_HOST = 'sk'
PUBLISH_REMOTE_DIR = '/home/stuartkeith/webapps/static/html/webaudiosequencer/'

GLUE_EACH_TEMPLATE = """
span.{{ class_name }}, .{{ class_name }}::-webkit-slider-thumb {
    background-image: url({{ sprite_url }});
    background-repeat: no-repeat;
}

span.{{ class_name }} {
    background-position: {{ x }}px {{ y }}px;
    height: {{ height }}px;
    width: {{ width }}px;
    margin-left: {{ (-width / 2)|int }}px;
    margin-top: {{ (-height / 2)|int }}px;
}

.{{ class_name }}::-webkit-slider-thumb {
    background-position: ({{ x }}px - $button-border) ({{ y }}px - $button-border);
}

${{ class_name }}-width: {{ width }}px;
${{ class_name }}-height: {{ height }}px;

"""

def _read_google_analytics_file_contents():
    try:
        with open(GOOGLE_ANALYTICS_FILENAME) as ga_file:
            contents = ga_file.read()
    except IOError:
            contents = ''

    return contents

def clean():
    local('rm -rf %s' % BUILD_DIR)

def scss():
    local('sass %sscss/main.scss %scss/main.css \
           --style compressed' % (SOURCE_DIR, SOURCE_DIR))
{'fraction_non_alphanumeric': 0.17346938775510204, 'fraction_numerical': 0.003518648838845883, 'mean_word_length': 3.4842271293375395, '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': '3126258', 'n_tokens_mistral': 1057, 'n_tokens_neox': 1008, 'n_words': 211}