<commit_before>package main

import (
	"eaciit/gdrj/model"
	"eaciit/gdrj/modules"
	"os"

	"github.com/eaciit/dbox"
	"github.com/eaciit/orm/v1"
	"github.com/eaciit/toolkit"
	// "strings"
	"time"
)

var conn dbox.IConnection
var count int

var (
	t0                          time.Time
	fiscalyear, iscount, scount int
	data                        map[string]float64
	masters                     = toolkit.M{}
)

func setinitialconnection() {
	var err error
	conn, err = modules.GetDboxIConnection("db_godrej")

	if err != nil {
		toolkit.Println("Initial connection found : ", err)
		os.Exit(1)
	}

	err = gdrj.SetDb(conn)
	if err != nil {
		toolkit.Println("Initial connection found : ", err)
		os.Exit(1)
	}
}

type plalloc struct {
	Key     string
	Current float64
	Expect  float64
	Total   float64
}

var plallocs = map[string]*plalloc{}

func buildRatio(tn string) error {
	plallocs = map[string]*plalloc{}
	rconn, _ := modules.GetDboxIConnection("db_godrej")
	defer rconn.Close()

	totalBlanks := map[string]float64{}

	ctrx, e := rconn.NewQuery().From(tn).
		Select().Cursor(nil)
	if e != nil {<commit_msg>disc act<commit_after>package main

import (
	"eaciit/gdrj/model"
	"eaciit/gdrj/modules"
	"os"

	"github.com/eaciit/dbox"
	"github.com/eaciit/orm/v1"
	"github.com/eaciit/toolkit"
	// "strings"
	"time"
)

var conn dbox.IConnection
var count int

var (
	t0                          time.Time
	fiscalyear, iscount, scount int
	data                        map[string]float64
	masters                     = toolkit.M{}
)

func setinitialconnection() {
	var err error
	conn, err = modules.GetDboxIConnection("db_godrej")

	if err != nil {
		toolkit.Println("Initial connection found : ", err)
		os.Exit(1)
	}

	err = gdrj.SetDb(conn)
	if err != nil {
		toolkit.Println("Initial connection found : ", err)
		os.Exit(1)
	}
}

type plalloc struct {
	Key     string
	Current float64
	Expect  float64
	Total   float64
}

var plallocs = map[string]*plalloc{}

func buildRatio(tn string) error {
	plallocs = map[string]*plalloc{}
	rconn, _ := modules.GetDboxIConnection("db_godrej")
	defer rconn.Close()

	//totalBlanks := map[string]float64{}

	ctrx, e := rconn.NewQuery().From(tn).
		Select().Cursor(nil)
	if e != nil {
{'fraction_non_alphanumeric': 0.13068949977467328, 'fraction_numerical': 0.012618296529968454, 'mean_word_length': 3.0217391304347827, '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': '6583723', 'n_tokens_mistral': 880, 'n_tokens_neox': 844, 'n_words': 175}