<commit_before>package main

import (
	"crypto/tls"
	"fmt"
	"log"
	"net/http"
	"strings"
)

type WebCheck struct {
	Url    string `yaml:"url"`
	Status int    `yaml:"status"`
	Format string `yaml:"format"`
}

func init() {
	// TODO: Make sure SSL verification works. This is just a workaround.
	cfg := &tls.Config{InsecureSkipVerify: true}

	http.DefaultClient.Transport = &http.Transport{
		TLSClientConfig: cfg,
	}
}

func ParseWebCheck(data map[string]interface{}) WebCheck {
	check := WebCheck{}

	if data["url"] != nil {
		check.Url = data["url"].(string)
	}

	if data["status"] != nil {
		check.Status = data["status"].(int)
	} else {
		check.Status = 200
	}
<commit_msg>Set default http timeout to 10s<commit_after>package main

import (
	"crypto/tls"
	"fmt"
	"log"
	"net/http"
	"strings"
	"time"
)

type WebCheck struct {
	Url    string `yaml:"url"`
	Status int    `yaml:"status"`
	Format string `yaml:"format"`
}

func init() {
	// TODO: Make sure SSL verification works. This is just a workaround.
	cfg := &tls.Config{InsecureSkipVerify: true}

	http.DefaultClient.Transport = &http.Transport{
		TLSClientConfig: cfg,
	}

	http.DefaultClient.Timeout = time.Second * 10
}

func ParseWebCheck(data map[string]interface{}) WebCheck {
	check := WebCheck{}

	if data["url"] != nil {
		check.Url = data["url"].(string)
	}

	if data["status"] != nil {
		check.Status = data["status"].(int)
	} else {
		check.Status = 200
	}

{'fraction_non_alphanumeric': 0.15638148667601684, 'fraction_numerical': 0.0070126227208976155, 'mean_word_length': 3.920689655172414, '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': '3455263', 'n_tokens_mistral': 529, 'n_tokens_neox': 503, 'n_words': 127}