<commit_before>package main

import (
	"mysql"
	"fmt"
	"os"
)


func main() {
	//dbh, err := mysql.Connect("unix", "", "/var/run/mysqld/mysqld.sock", "test", "", ""); // Without password, user test, without database.
	dbh, err := mysql.Connect("tcp", "", "127.0.0.1:3306", "test", "test", "test") // With password, user test, with database.
	if err != nil {
		fmt.Printf("%s\n", err)
		os.Exit(1)
	}
	dbh.Use("test") //Select database

	res := new(mysql.MySQLResponse)
//	res, err = dbh.Query("INSERT INTO test (sha1) VALUES(SHA1('foo'))")

//	fmt.Printf("%s\n", res)
//	if err != nil {
//		fmt.Printf("%s\n", err)
//		os.Exit(1)
//	}
//	res, err = dbh.Query(fmt.Sprintf("DELETE FROM test WHERE id=%d", res.InsertId))
//	fmt.Printf("%s\n", res)
	res, err = dbh.Query("SELECT * FROM test")
	fmt.Printf("-----%s\n", res)
	for rowmap := res.FetchRowMap(); rowmap != nil; rowmap = res.FetchRowMap() {
		fmt.Printf("%#v ->", rowmap)
		fmt.Printf("%s\n", rowmap["sha1"]);
	}
	res, err = dbh.Query("SHOW PROCESSLIST")
	fmt.Printf("%s %s\n", res, err)
	for row := res.FetchRow(); row != nil; row = res.FetchRow() {
		for i := 0; i < len(row.Data); i++ {
			fmt.Printf("%s\t", res.ResultSet.Fields[i])
		}
		fmt.Printf("\n")
		for i := 0; i < len(row.Data); i++ {
			fmt.Printf("%s\t", row.Data[i])
		}
		fmt.Printf("\n")
		if err != nil {
			fmt.Printf("%s\n", err)
			os.Exit(1)
		}
	}
	dbh.Quit()
}<commit_msg>Make this match mysql_test.go structure<commit_after>package main

import (
	"mysql"
	"fmt"
	"os"
)


func main() {
	//dbh, err := mysql.Connect("unix", "", "/var/run/mysqld/mysqld.sock", "test", "", ""); // Without password, user test, without database.
	dbh, err := mysql.Connect("tcp", "", "127.0.0.1:3306", "test", "test", "") // With password, user test, with database.
	if err != nil {
		fmt.Printf("%s\n", err)
		os.Exit(1)
	}
	dbh.Use("test") //Select database

	res := new(mysql.MySQLResponse)

	res, err = dbh.Query("SET NAMES utf8")
	res, err = dbh.Query("INSERT INTO test (name, stuff) VALUES('testrow', '12345')")

	fmt.Printf("%s\n", res)
	if err != nil {
		fmt.Printf("%s\n", err)
		os.Exit(1)
	}
	res, err = dbh.Query(fmt.Sprintf("DELETE FROM test WHERE id=%d", res.InsertId))
	fmt.Printf("%s\n", res)
	res, err = dbh.Query("SELECT * FROM test")
	fmt.Printf("%s\n", res)

	for rowmap := res.FetchRowMap(); rowmap != nil; rowmap = res.FetchRowMap() {
		fmt.Printf("%#v\n", rowmap)
	}

	res, err = dbh.Query("SHOW PROCESSLIST")
	for rowmap := res.FetchRowMap(); rowmap != nil; rowmap = res.FetchRowMap() {
		fmt.Printf("%#v\n", rowmap)
	}

	dbh.Quit()
}
{'fraction_non_alphanumeric': 0.23648385842084793, 'fraction_numerical': 0.014002333722287048, 'mean_word_length': 3.528169014084507, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3047270', 'n_tokens_mistral': 1095, 'n_tokens_neox': 1061, 'n_words': 234}