<commit_before>package index

import (
	"fmt"
	"net"
	"net/url"
	"strconv"
)

type IndexConfig struct {
	Host string
	Port int
}

func NewIndexConfig() *IndexConfig {
	return &IndexConfig{
		Host: "localhost",
		Port: 6080,
	}
}

type DatabaseConfig struct {
	Name     string
	Host     string
	Port     int
	Username string
	Password string
}

func NewDatabaseConfig() *DatabaseConfig {
	return &DatabaseConfig{
		Name:     "acoustid",
		Host:     "localhost",
		Port:     5432,
		Username: "acoustid",
		Password: "<PASSWORD>",
	}
}

func (cfg *DatabaseConfig) URL() *url.URL {
	var u url.URL
	u.Scheme = "postgresql"
	u.User = url.UserPassword(cfg.Username, cfg.Password)
	u.Host = net.JoinHostPort(cfg.Host, strconv.Itoa(cfg.Port))
	u.Path = fmt.Sprintf("/%s", cfg.Name)
	return &u
}<commit_msg>Disable SSL for PostgreSQL connections<commit_after>package index

import (
	"fmt"
	"net"
	"net/url"
	"strconv"
)

type IndexConfig struct {
	Host string
	Port int
}

func NewIndexConfig() *IndexConfig {
	return &IndexConfig{
		Host: "localhost",
		Port: 6080,
	}
}

type DatabaseConfig struct {
	Name     string
	Host     string
	Port     int
	Username string
	Password string
}

func NewDatabaseConfig() *DatabaseConfig {
	return &DatabaseConfig{
		Name:     "acoustid",
		Host:     "localhost",
		Port:     5432,
		Username: "acoustid",
		Password: "<PASSWORD>",
	}
}

func (cfg *DatabaseConfig) URL() *url.URL {
	var u url.URL
	u.Scheme = "postgresql"
	u.User = url.UserPassword(cfg.Username, cfg.Password)
	u.Host = net.JoinHostPort(cfg.Host, strconv.Itoa(cfg.Port))
	u.Path = fmt.Sprintf("/%s", cfg.Name)
	var params url.Values
	params.Add("sslmode", "disable")
	u.RawQuery = params.Encode()
	return &u
}
{'fraction_non_alphanumeric': 0.13114754098360656, 'fraction_numerical': 0.00936768149882904, 'mean_word_length': 3.7209944751381214, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4961481', 'n_tokens_mistral': 651, 'n_tokens_neox': 625, 'n_words': 155}