<commit_before>package client

import "github.com/dontpanic92/wxGo/wx"
import "github.com/andrewarrow/simplecoin.life/words"
import "strconv"
import "fmt"

var ui_from wx.TextCtrl
var ui_amount wx.TextCtrl
var ui_to wx.TextCtrl
var ui_add wx.Button
var ui_bar wx.Gauge
var ui_percent wx.StaticText

var balance wx.StaticText
var currentUser string

func setupFeeds(f *TheFrame) {
	f.sizer.Clear(true)
}

func take(f *TheFrame) {
	coins, _ := strconv.ParseFloat(balance.GetLabelText(), 10)
	coins += 0.01
	balance.SetLabelText(fmt.Sprintf("%f", coins))
}

func setupError(f *TheFrame, text string) {
	row3 := wx.NewBoxSizer(wx.VERTICAL)
	msg := wx.NewStaticText(f.frame, wx.ID_ANY, text, wx.DefaultPosition, wx.DefaultSize, 0)
	row3.Add(msg, 0, wx.ALL|wx.EXPAND, 5)
	msg2 := wx.NewStaticText(f.frame, wx.ID_ANY, "Please quit app and try again.", wx.DefaultPosition, wx.DefaultSize, 0)
	row3.Add(msg2, 0, wx.ALL|wx.EXPAND, 5)
	f.sizer.Add(row3, 0, wx.ALL|wx.EXPAND, 5)
	f.frame.Layout()
}

func login(f *TheFrame) {
	currentUser = ui_from.GetLineText(0)
	f.sizer.Clear(true)
	row := wx.NewBoxSizer(wx.HORIZONTAL)
	msg := wx.NewStaticText(f.frame, wx.ID_ANY, "Public Name", wx.DefaultPosition, wx.DefaultSize, 0)
	row.Add(msg, 0, wx.ALL|wx.EXPAND, 5)
	name := wx.NewStaticText(f.frame, wx.ID_ANY, currentUser, wx.DefaultPosition, wx.DefaultSize, 0)
	row.Add(name, 0, wx.ALL|wx.EXPAND, 5)
<commit_msg>working<commit_after>package client

import "github.com/dontpanic92/wxGo/wx"
import "github.com/andrewarrow/simplecoin.life/words"
import "strconv"
import "fmt"
import "strings"

//import "math"

var ui_from wx.TextCtrl
var ui_amount wx.TextCtrl
var ui_to wx.TextCtrl
var ui_add wx.Button
var ui_bar wx.Gauge
var ui_percent wx.StaticText

var balance wx.StaticText
var currentUser string

func setupFeeds(f *TheFrame) {
	f.sizer.Clear(true)
}

func take(f *TheFrame) {
	coins, _ := strconv.ParseFloat(balance.GetLabelText(), 10)
	coins += 0.01
	c := fmt.Sprintf("%f", coins)
	index := strings.Index(c, ".")
	balance.SetLabelText(c[0 : index+3])
}

func setupError(f *TheFrame, text string) {
	row3 := wx.NewBoxSizer(wx.VERTICAL)
	msg := wx.NewStaticText(f.frame, wx.ID_ANY, text, wx.DefaultPosition, wx.DefaultSize, 0)
	row3.Add(msg, 0, wx.ALL|wx.EXPAND, 5)
	msg2 := wx.NewStaticText(f.frame, wx.ID_ANY, "Please quit app and try again.", wx.DefaultPosition, wx.DefaultSize, 0)
	row3.Add(msg2, 0, wx.ALL|wx.EXPAND, 5)
	f.sizer.Add(row3, 0, wx.ALL|wx.EXPAND, 5)
	f.frame.Layout()
}

func login(f *TheFrame) {
	currentUser = ui_from.GetLineText(0)
	f.sizer.Clear(true)
	row := wx.NewBoxSizer(wx.HORIZONTAL)
	msg := wx.NewStaticText(f.frame, wx.ID_ANY, "Public Name", wx.DefaultPosition, wx.DefaultSize, 0)
	row.Add(msg, 0, wx.ALL|wx.EXPAND, 5)
	name := wx.NewStaticText(f.frame, wx.ID_ANY, currentUser, wx.DefaultPosition, wx.DefaultSize, 0)
	row.Add(name, 0, wx.ALL|wx.EXPAND, 5)

{'fraction_non_alphanumeric': 0.14991304347826087, 'fraction_numerical': 0.02017391304347826, 'mean_word_length': 5.004175365344468, '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': '7411925', 'n_tokens_mistral': 1205, 'n_tokens_neox': 1162, 'n_words': 245}