<commit_before>#!/usr/bin/env node

var program = require("commander");
var path = require("path");
var fs = require("fs")
var optinPackage = require(path.join(__dirname, "../", "package.json"));
var q = require("q");
/* commands */

var loadCommand = function(cmd) {
    var self = this;
    return function() {
        require("../lib/" + cmd)
            .apply(self, arguments);
    }
}
program
    .version(optinPackage.version)
    .usage(" - " + optinPackage.description)
    .description(optinPackage.description)
    .option("-o --option [value]", "generic option")

program
    .command("host <variation_id> [port]")
    .description("Host")
    .action(loadCommand("host"));

program
    .command("init [project_description]")
    .description("Initialize an optimizely project.")
    .option("-r --remote", "Initialize project remotely as well as locally.")
    .option("-p --pull", "Pull project by initializing")
    .option("-j --jquery", "Include Jquery (new project)")
    .option("-a --archive", "Archive (new project)")
    .option("-e --experiments", "Download experiments.")
    .option("-v --variations", "Download variations. (Implies --experiments)")
    .action(loadCommand("init-project"));

program
    .command("experiment <description> <url> [variation_descriptions]")
    .description("Create Experiment Host")
    .option("-r --remote", "Create experiment remotely as well as locally.")
    .action(loadCommand("create-experiment"));

program
    .command("variation <experiment> <descriptions>")
    .description("Create Experiment Host")
    .option("-r --remote", "Create experiment remotely as well as locally.")
    .action(loadCommand("create-variation"));

/*
program
    .command("list <experiment> <descriptions>")
    .description("List all experiments and variations")
    .option("-r --remote", "Include remote experiments and variations")
    .action(loadCommand("list"));

program
    .command("push <experiment>")
    .description("Synchronize experiments and variations")
    .action(loadCommand("push"));


program
.command("experiment <description> [variation_descriptions...]")<commit_msg>Modified Descriptions<commit_after>#!/usr/bin/env node

var program = require("commander");
var path = require("path");
var fs = require("fs")
var optinPackage = require(path.join(__dirname, "../", "package.json"));
var q = require("q");
/* commands */

var loadCommand = function(cmd) {
    var self = this;
    return function() {
        require("../lib/" + cmd)
            .apply(self, arguments);
    }
}
program
    .version(optinPackage.version)
    .usage(" - " + optinPackage.description)
    .description(optinPackage.description)
    .option("-o --option [value]", "generic option")

program
    .command("host <variation_id> [port]")
    .description("Host Variations")
    .action(loadCommand("host"));

program
    .command("init [project_description]")
    .description("Initialize an optimizely project.")
    .option("-r --remote", "Initialize project remotely as well as locally.")
    .option("-p --pull", "Pull project by initializing")
    .option("-j --jquery", "Include Jquery (new project)")
    .option("-a --archive", "Archive (new project)")
    .option("-e --experiments", "Download experiments.")
    .option("-v --variations", "Download variations. (Implies --experiments)")
    .action(loadCommand("init-project"));

program
    .command("experiment <description> <url> [variation_descriptions]")
    .description("Create Variation")
    .option("-r --remote", "Create experiment remotely as well as locally.")
    .action(loadCommand("create-experiment"));

program
    .command("variation <experiment> <descriptions>")
    .description("Create Experiment")
    .option("-r --remote", "Create variation remotely as well as locally.")
    .action(loadCommand("create-variation"));

/*
program
    .command("list <experiment> <descriptions>")
    .description("List all experiments and variations")
    .option("-r --remote", "Include remote experiments and variations")
    .action(loadCommand("list"));

program
    .command("push <experiment>")
    .description("Synchronize experiments and variations")
    .action(loadCommand("push"));


program
.command("experiment <description> [variation_descriptions...]")
{'fraction_non_alphanumeric': 0.170828471411902, 'fraction_numerical': 0.0, 'mean_word_length': 3.920780711825488, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6834318', 'n_tokens_mistral': 1199, 'n_tokens_neox': 1209, 'n_words': 309}