<commit_before>package main

import (
	"flag"
	"fmt"
	"net/url"
	"os"
	"path/filepath"
	"time"

	"github.com/mohae/autofact"
	"github.com/mohae/autofact/client"
)

var cfgFile = "autofact-client.json"
var infFile = "autoinf.dat"

// This is the default directory for autofact-client app data.
var defaultAutoFactDir = "$HOME/.autofactclient"

// default
var connCfg client.ConnCfg

// TODO: reconcile these flags with config file usage.  Probably add contour
// to handle this after the next refactor of contour.
func init() {
	flag.StringVar(&connCfg.ServerAddress, "address", "127.0.0.1", "the server address")
	flag.StringVar(&connCfg.ServerAddress, "a", "127.0.0.1", "the server address (short)")
	flag.StringVar(&connCfg.ServerPort, "port", "8675", "the connection port")
	flag.StringVar(&connCfg.ServerPort, "p", "8675", "the connection port (short)")
	connCfg.ConnectInterval = time.Duration(5) * time.Second
	connCfg.ConnectPeriod = time.Duration(15) * time.Minute
}

func main() {
	os.Exit(realMain())
}

func realMain() int {
	// Load the AUTOPATH value
	autopath := os.Getenv(autofact.PathVarName)
	if autopath == "" {
		autopath = defaultAutoFactDir
	}
	autopath = os.ExpandEnv(autopath)
	// make sure the autopath exists (create if it doesn't)
	err := os.MkdirAll(autopath, 0760)
	if err != nil {<commit_msg>default autofact workdir is now $HOMEPATH/.autofact<commit_after>package main

import (
	"flag"
	"fmt"
	"net/url"
	"os"
	"path/filepath"
	"time"

	"github.com/mohae/autofact"
	"github.com/mohae/autofact/client"
)

var cfgFile = "autofact-client.json"
var infFile = "autoinf.dat"

// This is the default directory for autofact-client app data.
var defaultAutoFactDir = "$HOME/.autofact"

// default
var connCfg client.ConnCfg

// TODO: reconcile these flags with config file usage.  Probably add contour
// to handle this after the next refactor of contour.
func init() {
	flag.StringVar(&connCfg.ServerAddress, "address", "127.0.0.1", "the server address")
	flag.StringVar(&connCfg.ServerAddress, "a", "127.0.0.1", "the server address (short)")
	flag.StringVar(&connCfg.ServerPort, "port", "8675", "the connection port")
	flag.StringVar(&connCfg.ServerPort, "p", "8675", "the connection port (short)")
	connCfg.ConnectInterval = time.Duration(5) * time.Second
	connCfg.ConnectPeriod = time.Duration(15) * time.Minute
}

func main() {
	os.Exit(realMain())
}

func realMain() int {
	// Load the AUTOPATH value
	autopath := os.Getenv(autofact.PathVarName)
	if autopath == "" {
		autopath = defaultAutoFactDir
	}
	autopath = os.ExpandEnv(autopath)
	// make sure the autopath exists (create if it doesn't)
	err := os.MkdirAll(autopath, 0760)
	if err != nil {
{'fraction_non_alphanumeric': 0.14173522812266268, 'fraction_numerical': 0.02019446522064323, 'mean_word_length': 4.504115226337449, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '3714756', 'n_tokens_mistral': 990, 'n_tokens_neox': 951, 'n_words': 245}