<commit_before># santiago - webhook dispatching service
# https://github.com/topfreegames/santiago
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright © 2016 Top Free Games <<EMAIL>>

PACKAGES = $(shell glide novendor)
DIRS = $(shell find . -type f -not -path '*/\.*' | grep '.go' | grep -v "^[.]\/vendor" | xargs -n1 dirname | sort | uniq | grep -v '^.$$')

setup-hooks:
	@cd .git/hooks && ln -sf ../../hooks/pre-commit.sh pre-commit

setup: setup-hooks
	@type nsqlookupd >/dev/null 2>&1 || { echo >&2 "Please ensure NSQ is installed before continuing.\nFor more information, refer to http://nsq.io/deployment/installing.html.\n\nSetup aborted!\n"; exit 1; }
	@go get -u github.com/ddollar/forego
	@go get -u github.com/onsi/ginkgo/ginkgo
	@go get -u github.com/Masterminds/glide/...
	@glide install

build:
	@go build $(PACKAGES)
	@mkdir -p bin/
	@go build -o ./bin/snt-worker ./worker/main.go 

work:
	@go run worker/main.go start -p 6667 -i 15 -d -m 3

work-prod:
	@go run worker/main.go start -p 6667<commit_msg>Generating for all platforms/archs<commit_after># santiago - webhook dispatching service
# https://github.com/topfreegames/santiago
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright © 2016 Top Free Games <<EMAIL>>

PACKAGES = $(shell glide novendor)
DIRS = $(shell find . -type f -not -path '*/\.*' | grep '.go' | grep -v "^[.]\/vendor" | xargs -n1 dirname | sort | uniq | grep -v '^.$$')

setup-hooks:
	@cd .git/hooks && ln -sf ../../hooks/pre-commit.sh pre-commit

setup: setup-hooks
	@type nsqlookupd >/dev/null 2>&1 || { echo >&2 "Please ensure NSQ is installed before continuing.\nFor more information, refer to http://nsq.io/deployment/installing.html.\n\nSetup aborted!\n"; exit 1; }
	@go get -u github.com/ddollar/forego
	@go get -u github.com/onsi/ginkgo/ginkgo
	@go get -u github.com/Masterminds/glide/...
	@glide install

build:
	@go build $(PACKAGES)
	@mkdir -p bin/
	@go build -o ./bin/snt-worker ./worker/main.go 
	@go build -o ./bin/snt ./main.go 

cross:
	@mkdir -p ./bin
	@echo "Building for linux-i386..."
	@env GOOS=linux GOARCH=386 go build -o ./bin/snt-linux-i386 ./main.go
	@env GOOS=linux GOARCH=386 go build -o ./bin/snt-worker-linux-i386 ./worker/main.go
	@echo "Building for linux-x86_64..."
	@env GOOS=linux GOARCH=amd64 go build -o ./bin/snt-linux-x86_64 ./main.go
	@env GOOS=linux GOARCH=amd64 go build -o ./bin/snt-worker-linux-x86_64 ./worker/main.go
	@echo "Building for darwin-i386..."
	@env GOOS=darwin GOARCH=386 go build -o ./bin/snt-darwin-i386 ./main.go
	@env GOOS=darwin GOARCH=386 go build -o ./bin/snt-worker-darwin-i386 ./worker/main.go
	@echo "Building for darwin-x86_64..."
	@env GOOS=darwin GOARCH=amd64 go build -o ./bin/snt-darwin-x86_64 ./main.go
	@env GOOS=darwin GOARCH=amd64 go build -o ./bin/snt-worker-darwin-x86_64 ./worker/main.go
	@chmod +x bin/*

work:
	@go run worker/main.go start -p 6667 -i 15 -d -m 3

work-prod:
	@go run worker/main.go start -p 6667
{'fraction_non_alphanumeric': 0.16777188328912468, 'fraction_numerical': 0.033819628647214856, 'mean_word_length': 3.196105702364395, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '5332975', 'n_tokens_mistral': 1265, 'n_tokens_neox': 1162, 'n_words': 328}