<commit_before>package app

import (
	"github.com/jessevdk/go-flags"
	"log"
	"os"
	"path/filepath"
	"strings"
)

type option_set struct {
	DisableS3 bool   `short:"d" long:"no-s3" description:"Disable publishing to S3"`
	OnlyRun   string `short:"o" long:"only" description:"Only run specific confiugration"`
}

var opts option_set

func Run(args []string) {
	args, mode := checkArgs(args)

	args, err := flags.ParseArgs(&opts, args)

	if strings.HasSuffix(args[0], ".enc") || len(args) >= 2 && mode != "compile" {
		performExtraction(args)
		return
	}

	abs, err := filepath.Abs(args[0])
	if err != nil {
		panicQuitf("Unable to expand %v\r\n", args[1])
	}

	performCompilation(abs, opts)
}

func checkArgs(args []string) ([]string, string) {
	if len(args) == 1 {
		printArgMessage(args[0])
		return []string{}, ""
	}

	appname := args[0]
	args = args[1:len(args)]

	var mode string
	if args[0] == "compile" || args[0] == "extract" {
		if len(args) == 1 {
			printArgMessage(appname)
			return []string{}, ""
		} else {
			mode = args[0]
			args = args[1:len(args)]
		}
	}

	return args, mode
}

func printArgMessage(appname string) {
	log.Printf("Usage: %v CONFIG_FILE\r\n", appname)
	panicQuitf("Usage: %v ENCRYPTED_FILE KEY_FILE [OUT_FILE]\r\n", appname)
}

func panicQuit() {
	os.Exit(1)
}

func panicQuitf(format string, v ...interface{}) {
	log.Printf(format, v...)
	os.Exit(1)
}
<commit_msg>Ambiguous<commit_after>package app

import (
	"github.com/jessevdk/go-flags"
	"log"
	"os"
	"path/filepath"
	"strings"
)

type option_set struct {
	DisableS3 bool   `short:"n" long:"no-s3" description:"Disable publishing to S3"`
	OnlyRun   string `short:"o" long:"only" description:"Only run specific confiugration"`
}

var opts option_set

func Run(args []string) {
	args, mode := checkArgs(args)

	args, err := flags.ParseArgs(&opts, args)

	if strings.HasSuffix(args[0], ".enc") || len(args) >= 2 && mode != "compile" {
		performExtraction(args)
		return
	}

	abs, err := filepath.Abs(args[0])
	if err != nil {
		panicQuitf("Unable to expand %v\r\n", args[1])
	}

	performCompilation(abs, opts)
}

func checkArgs(args []string) ([]string, string) {
	if len(args) == 1 {
		printArgMessage(args[0])
		return []string{}, ""
	}

	appname := args[0]
	args = args[1:len(args)]

	var mode string
	if args[0] == "compile" || args[0] == "extract" {
		if len(args) == 1 {
			printArgMessage(appname)
			return []string{}, ""
		} else {
			mode = args[0]
			args = args[1:len(args)]
		}
	}

	return args, mode
}

func printArgMessage(appname string) {
	log.Printf("Usage: %v CONFIG_FILE\r\n", appname)
	panicQuitf("Usage: %v ENCRYPTED_FILE KEY_FILE [OUT_FILE]\r\n", appname)
}

func panicQuit() {
	os.Exit(1)
}

func panicQuitf(format string, v ...interface{}) {
	log.Printf(format, v...)
	os.Exit(1)
}

{'fraction_non_alphanumeric': 0.17693409742120345, 'fraction_numerical': 0.012893982808022923, 'mean_word_length': 4.181818181818182, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3544818', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1090, 'n_words': 246}