<commit_before># Makefile: build and deploy from web/ to publish/, start/stop the server.
# Copyright (c) 2011 <NAME>, <NAME>. All rights reserved.
# Code covered by the LGPL license.

LOG = node.log
SERVER = server.js
TARGET = publish
JSMIN = jsmin
MIN = min
WEB = web

web: clean deploy minify start

test: web
	node test/main.js

clean:
	rm -rf $(TARGET)/* $(LOG)

minify:
	for file in `find $(TARGET) -name '*\.js'` ; do cat "$${file}" | $(JSMIN) > "$${file}$(MIN)" ; mv "$${file}$(MIN)" "$${file}" ; done

start:
	cd $(TARGET) ; sudo nohup node ../$(SERVER) > ../$(LOG)

stop:
	for pid in `ps aux | grep node | grep $(SERVER) | awk '{print $$2}'` ; do sudo kill $$pid 2> /dev/null ; done

deploy:
	cp -r $(WEB)/* $(TARGET)

# time for a break
coffee:
	@echo "\n           )      (\n           (  )   )\n         _..,-(--,.._\n      .-;'-.,____,.-';\n     (( |            |\n      \`-;            ;\n         \\          /	\n      .-''\`-.____.-'''-.\n     (     '------'     )\n      \`--..________..--'\n";

# http://xkcd.com/149/
sandwich:
	@if [ `id -u` = "0" ] ; then echo "\nOKAY." ; else echo "\nWhat? Make it yourself." ; fi
<commit_msg>cleaned up Makefile<commit_after># Makefile: build and deploy from web/ to publish/, start/stop the server.
# Copyright (c) 2011 <NAME>, <NAME>. All rights reserved.
# Code covered by the LGPL license.

LOG = node.log
SERVER = server.js
TARGET = publish
JSMIN = jsmin
MIN = min
WEB = web

web: clean deploy minify start

clean:
	rm -rf $(TARGET)/* $(LOG)

deploy:
	cp -r $(WEB)/* $(TARGET)
	
minify:
	for file in `find $(TARGET) -name '*\.js'` ; do cat "$${file}" | $(JSMIN) > "$${file}$(MIN)" ; mv "$${file}$(MIN)" "$${file}" ; done

start:
	cd $(TARGET) ; sudo nohup node ../$(SERVER) > ../$(LOG)

stop:
	for pid in `ps aux | grep node | grep $(SERVER) | awk '{print $$2}'` ; do sudo kill $$pid 2> /dev/null ; done

coffee:
	@echo "\n           )      (\n           (  )   )\n         _..,-(--,.._\n      .-;'-.,____,.-';\n     (( |            |\n      \`-;            ;\n         \\          /	\n      .-''\`-.____.-'''-.\n     (     '------'     )\n      \`--..________..--'\n";

sandwich:
	@if [ `id -u` = "0" ] ; then echo "\nOKAY." ; else echo "\nWhat? Make it yourself." ; fi

{'fraction_non_alphanumeric': 0.23242274966412899, 'fraction_numerical': 0.00761307657859382, 'mean_word_length': 1.91644908616188, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '149485', 'n_tokens_mistral': 865, 'n_tokens_neox': 831, 'n_words': 263}