<commit_before>package orchestrate

import (
	"fmt"
	"html/template"
	"net/http"

	"github.com/apex/log"
	"github.com/facebookgo/grace/gracehttp"
	"github.com/gin-contrib/multitemplate"
	"github.com/gin-gonic/gin"
	"github.com/jmoiron/sqlx"
	"github.com/spf13/viper"
	"gopkg.in/gin-contrib/cors.v1"

	"github.com/thetorproject/proteus/proteus-common/middleware"

	"github.com/thetorproject/proteus/proteus-orchestrate/orchestrate/api/v1"
	"github.com/thetorproject/proteus/proteus-orchestrate/orchestrate/sched"
)

var ctx = log.WithFields(log.Fields{
	"cmd": "events",
})

func initDatabase() (*sqlx.DB, error) {
	db, err := sqlx.Open("postgres", viper.GetString("database.url"))<commit_msg>Rename ctx pkg from event -> orchestrate<commit_after>package orchestrate

import (
	"fmt"
	"html/template"
	"net/http"

	"github.com/apex/log"
	"github.com/facebookgo/grace/gracehttp"
	"github.com/gin-contrib/multitemplate"
	"github.com/gin-gonic/gin"
	"github.com/jmoiron/sqlx"
	"github.com/spf13/viper"
	"gopkg.in/gin-contrib/cors.v1"

	"github.com/thetorproject/proteus/proteus-common/middleware"

	"github.com/thetorproject/proteus/proteus-orchestrate/orchestrate/api/v1"
	"github.com/thetorproject/proteus/proteus-orchestrate/orchestrate/sched"
)

var ctx = log.WithFields(log.Fields{
	"pkg": "orchestrate",
})

func initDatabase() (*sqlx.DB, error) {
	db, err := sqlx.Open("postgres", viper.GetString("database.url"))
{'fraction_non_alphanumeric': 0.1652542372881356, 'fraction_numerical': 0.005649717514124294, 'mean_word_length': 5.214912280701754, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 4, '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': '5208653', 'n_tokens_mistral': 589, 'n_tokens_neox': 585, 'n_words': 62}