<commit_before>#!/bin/bash
set -e
set -x

##### WARNING!!!
#
# THIS IS A HELPER SCRIPT FOR DEVELOPMENT.
# IT IS USED TO RUN KONTROL, PROXY AND EXAMPLE KITE.
#

##### MANUAL STEPS
#
# 1. make sure that your gopath is set correctly (kite-repo:koding-repo)
# 2. cd into kite repo
#

# kill all running processes
killall main        || true
killall math-simple || true

# delete existing kite.key
rm -rf $HOME/.kite

# delete existing kontrol data
rm -rf /tmp/kontrol-data

# generate rsa keys
openssl genrsa -out /tmp/privateKey.pem 2048
openssl rsa -in /tmp/privateKey.pem -pubout > /tmp/publicKey.pem

# initialize machine with new kite.key
go run kontrol/kontrol/main.go -public-key /tmp/publicKey.pem -private-key /tmp/privateKey.pem -init -username devrim -kontrol-url "ws://localhost:4000"

# run essential kites
go run kontrol/kontrol/main.go -public-key /tmp/publicKey.pem -private-key /tmp/privateKey.pem -data-dir /tmp/kontrol-data &
go run proxy/proxy/main.go     -public-key /tmp/publicKey.pem -private-key /tmp/privateKey.pem &

# run simple math kite
go run examples/math-simple.go<commit_msg>run.sh: fix paths<commit_after>#!/bin/bash
set -e
set -x

##### WARNING!!!
#
# THIS IS A HELPER SCRIPT FOR DEVELOPMENT.
# IT IS USED TO RUN KONTROL, PROXY AND EXAMPLE KITE.
#

##### MANUAL STEPS
#
# 1. make sure that your gopath is set correctly (kite-repo:koding-repo)
# 2. cd into kite repo
#

# kill all running processes
killall main        || true
killall math-simple || true

# delete existing kite.key
rm -rf $HOME/.kite

# delete existing kontrol data
rm -rf /tmp/kontrol-data

# generate rsa keys
openssl genrsa -out /tmp/privateKey.pem 2048
openssl rsa -in /tmp/privateKey.pem -pubout > /tmp/publicKey.pem

# initialize machine with new kite.key
go run kontrol/kontrol/main.go -public-key /tmp/publicKey.pem -private-key /tmp/privateKey.pem -init -username devrim -kontrol-url "ws://localhost:4000"

# run essential kites
go run kontrol/kontrol/main.go -public-key /tmp/publicKey.pem -private-key /tmp/privateKey.pem -data-dir /tmp/kontrol-data &
# go run proxy/proxy/main.go     -public-key /tmp/publicKey.pem -private-key /tmp/privateKey.pem &

# run simple math kite
go run examples/math/math.go
{'fraction_non_alphanumeric': 0.12251356238698011, 'fraction_numerical': 0.009041591320072333, 'mean_word_length': 3.4527162977867203, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '837899', 'n_tokens_mistral': 845, 'n_tokens_neox': 796, 'n_words': 241}