<commit_before>package proxyfactory

import (
	"crypto/tls"
	"net/http"
	"net/url"
	"os/exec"
	"strings"
	"time"

	log "github.com/Sirupsen/logrus"
	"github.com/gallir/goproxy"
	"github.com/mikesimons/earl"
)

// ProxyFactory holds all state for the proxy factory
type ProxyFactory struct {
	proxies            map[string]*goproxy.ProxyHttpServer
	availabilityChecks map[string](func() bool)
	availability       map[string]bool
	Logger             *log.Logger
}

// New is the constructor function for ProxyFactory
func New() *ProxyFactory {
	pf := &ProxyFactory{
		proxies:            make(map[string]*goproxy.ProxyHttpServer),
		availabilityChecks: make(map[string](func() bool)),
		availability:       make(map[string]bool),
		Logger:             log.New(),
	}

	go func() {
		for _ = range time.Tick(30 * time.Second) {<commit_msg>Updates goproxy to fork with PR#84 applied<commit_after>package proxyfactory

import (
	"crypto/tls"
	"net/http"
	"net/url"
	"os/exec"
	"strings"
	"time"

	log "github.com/Sirupsen/logrus"
	"github.com/mikesimons/goproxy"
	"github.com/mikesimons/earl"
)

// ProxyFactory holds all state for the proxy factory
type ProxyFactory struct {
	proxies            map[string]*goproxy.ProxyHttpServer
	availabilityChecks map[string](func() bool)
	availability       map[string]bool
	Logger             *log.Logger
}

// New is the constructor function for ProxyFactory
func New() *ProxyFactory {
	pf := &ProxyFactory{
		proxies:            make(map[string]*goproxy.ProxyHttpServer),
		availabilityChecks: make(map[string](func() bool)),
		availability:       make(map[string]bool),
		Logger:             log.New(),
	}

	go func() {
		for _ = range time.Tick(30 * time.Second) {
{'fraction_non_alphanumeric': 0.12272460364063417, 'fraction_numerical': 0.0035231943628890195, 'mean_word_length': 3.519893899204244, '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': '7221284', 'n_tokens_mistral': 609, 'n_tokens_neox': 575, 'n_words': 126}