<commit_before>#!/usr/bin/python
from daemon import Daemon
import sys
import time

PIDFILE = '/var/run/yourdaemon.pid'

class YourDaemon(Daemon):
	
	def run(self):
		# Define your tasks here
		# Anything written in python is permitted
		# For example you can clean up your server logs every hour
			
		while True:
			# The daemon will repeat your tasks according to this variable
			# it's in second so 60 is 1 minute, 3600 is 1 hour, etc. 
			time.sleep(60)

if __name__ == "__main__":

	daemon = YourDaemon(PIDFILE)
	
	if len(sys.argv) == 2:

		if 'start' == sys.argv[1]:
			try:
				daemon.start()
			except:
				pass
		
		elif 'stop' == sys.argv[1]:
			print "Stopping ..."
			daemon.stop()
		<commit_msg>Print an exception with the error if starting the daemon fails<commit_after>#!/usr/bin/python
from daemon import Daemon
import sys
import time
import traceback

PIDFILE = '/var/run/yourdaemon.pid'

class YourDaemon(Daemon):
	
	def run(self):
		# Define your tasks here
		# Anything written in python is permitted
		# For example you can clean up your server logs every hour
			
		while True:
			# The daemon will repeat your tasks according to this variable
			# it's in second so 60 is 1 minute, 3600 is 1 hour, etc. 
			time.sleep(60)

if __name__ == "__main__":

	daemon = YourDaemon(PIDFILE)
	
	if len(sys.argv) == 2:

		if 'start' == sys.argv[1]:
			try:
				daemon.start()
			except:
				traceback.print_exc(file=sys.stdout)
		
		elif 'stop' == sys.argv[1]:
			print "Stopping ..."
			daemon.stop()
		
{'fraction_non_alphanumeric': 0.10488126649076517, 'fraction_numerical': 0.017150395778364115, 'mean_word_length': 3.1561643835616437, 'pattern_counts': {'":': 2, '<': 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': '1406676', 'n_tokens_mistral': 606, 'n_tokens_neox': 500, 'n_words': 178}