<commit_before>package app

import (
	"bytes"
	"errors"
	"fmt"
	"github.com/megamsys/cloudinabox/models/orm"
	"github.com/megamsys/libgo/action"
	"github.com/megamsys/libgo/exec"
	"log"
	"time"
	"strings"
)
const layout = "Jan 2, 2006 at 3:04pm (MST)"
const (
	rootPath              = "/tmp"
	opennebulapreinstall  = "bash conf/trusty/opennebula/one_preinstall.sh"
	opennebulaverify      = "bash conf/trusty/opennebula/one_verify.sh"
	opennebulapostinstall = "bash conf/trusty/opennebula/one_postinstall.sh"
	opennebulainstall     = "bash conf/trusty/opennebula/one_install.sh"
	opennebulahostverify  = "bash conf/trusty/opennebulahost/host_verify.sh"
	opennebulahostinstall = "bash conf/trusty/opennebulahost/host_install.sh"
	megam                 = "bash conf/trusty/megam/megam.sh"
	cobbler               = "bash conf/trusty/cobblerd/cobbler.sh"
)

var ErrAppAlreadyExists = errors.New("there is already an app with this name.")

func CommandExecutor(app *App) (action.Result, error) {
	var e exec.OsExecutor
	var b bytes.Buffer
	var commandWords []string
	commandWords = strings.Fields(app.Command)

	fmt.Println(commandWords, len(commandWords))<commit_msg>call cobbler script with arg<commit_after>package app

import (
	"bytes"
	"errors"
	"fmt"
	"github.com/megamsys/cloudinabox/models/orm"
	"github.com/megamsys/libgo/action"
	"github.com/megamsys/libgo/exec"
	"log"
	"time"
	"strings"
)
const layout = "Jan 2, 2006 at 3:04pm (MST)"
const (
	rootPath              = "/tmp"
	opennebulapreinstall  = "bash conf/trusty/opennebula/one_preinstall.sh"
	opennebulaverify      = "bash conf/trusty/opennebula/one_verify.sh"
	opennebulapostinstall = "bash conf/trusty/opennebula/one_postinstall.sh"
	opennebulainstall     = "bash conf/trusty/opennebula/one_install.sh"
	opennebulahostverify  = "bash conf/trusty/opennebulahost/host_verify.sh"
	opennebulahostinstall = "bash conf/trusty/opennebulahost/host_install.sh"
	megam                 = "bash conf/trusty/megam/megam.sh"
	cobbler               = "bash conf/trusty/cobblerd/cobbler.sh install"
)

var ErrAppAlreadyExists = errors.New("there is already an app with this name.")

func CommandExecutor(app *App) (action.Result, error) {
	var e exec.OsExecutor
	var b bytes.Buffer
	var commandWords []string
	commandWords = strings.Fields(app.Command)

	fmt.Println(commandWords, len(commandWords))
{'fraction_non_alphanumeric': 0.11504047720494248, 'fraction_numerical': 0.006817213463996591, 'mean_word_length': 4.126637554585153, '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': '600985', 'n_tokens_mistral': 945, 'n_tokens_neox': 864, 'n_words': 154}