<commit_before>package ssh

import (
	"fmt"
	"reflect"
	"strings"

	"github.com/subsilent/kappa/datamodel"
	"github.com/subsilent/kappa/skl"
)

// Session provides session and connection related information
type Session struct {
	namespace string
	user      datamodel.User
}

// Executor executes successfully parsed queries
type Executor struct {
	session  Session
	terminal Terminal
	system   datamodel.System
}

// Execute processes each statement
func (e *Executor) Execute(w *ResponseWriter, stmt skl.Statement) {

	// Verify session has a user
	if e.session.user == nil {
		w.Fail(InternalServerError, "could not determine session user")
		return
	}

	switch stmt.NodeType() {
	case skl.UseNamespaceType:
		e.handleUseStatement(w, stmt)
	case skl.CreateNamespaceType:
		e.handleCreateNamespace(w, stmt)
	case skl.ShowNamespaceType:
		e.handleShowNamespace(w, stmt)
	}
}

func (e *Executor) handleUseStatement(w *ResponseWriter, stmt skl.Statement) {
	use, ok := stmt.(*skl.UseStatement)
	if !ok {
		w.Fail(InvalidStatementType, "expected *UseStatement, got %s instead", reflect.TypeOf(stmt))
		return
	}
<commit_msg>Fix pkg imports and pkg name<commit_after>package server

import (
	"fmt"
	"reflect"
	"strings"

	"github.com/subsilent/kappa/client"
	"github.com/subsilent/kappa/datamodel"
	"github.com/subsilent/kappa/skl"
)

// Session provides session and connection related information
type Session struct {
	namespace string
	user      datamodel.User
}

// Executor executes successfully parsed queries
type Executor struct {
	session  Session
	terminal client.Terminal
	system   datamodel.System
}

// Execute processes each statement
func (e *Executor) Execute(w *ResponseWriter, stmt skl.Statement) {

	// Verify session has a user
	if e.session.user == nil {
		w.Fail(InternalServerError, "could not determine session user")
		return
	}

	switch stmt.NodeType() {
	case skl.UseNamespaceType:
		e.handleUseStatement(w, stmt)
	case skl.CreateNamespaceType:
		e.handleCreateNamespace(w, stmt)
	case skl.ShowNamespaceType:
		e.handleShowNamespace(w, stmt)
	}
}

func (e *Executor) handleUseStatement(w *ResponseWriter, stmt skl.Statement) {
	use, ok := stmt.(*skl.UseStatement)
	if !ok {
		w.Fail(InvalidStatementType, "expected *UseStatement, got %s instead", reflect.TypeOf(stmt))
		return
	}

{'fraction_non_alphanumeric': 0.10277536860364267, 'fraction_numerical': 0.0, 'mean_word_length': 4.532374100719425, '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': '5902459', 'n_tokens_mistral': 794, 'n_tokens_neox': 761, 'n_words': 198}