<commit_before>import nc
import emc2

class CreatorHM50(emc2.CreatorEMC2):
    def init(self): 
        iso.CreatorEMC2.init(self) 
	
    def program_begin(self, id, comment):
	self.write( ('(' + comment + ')' + '\n') )

nc.creator = CreatorHM50()<commit_msg>Changed the tool_change() routine to move the spindle up to a safe height between tool changes.  This is not my long-term solution but it will do for now.<commit_after>import nc
import iso_codes
import emc2

iso_codes.codes = emc2.CodesEMC2()

class CreatorHM50(emc2.CreatorEMC2):
	def init(self): 
		iso.CreatorEMC2.init(self) 
	
	def program_begin(self, id, comment):
		self.write( ('(' + comment + ')' + '\n') )

	def tool_change(self, id):
		self.write_blocknum()
		self.write('G53 G00 Z350\n')
		self.write_blocknum()
		self.write((iso_codes.codes.TOOL() % id) + '\n')


nc.creator = CreatorHM50()
{'fraction_non_alphanumeric': 0.13937282229965156, 'fraction_numerical': 0.029036004645760744, 'mean_word_length': 4.161676646706587, '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': '5657300', 'n_tokens_mistral': 351, 'n_tokens_neox': 316, 'n_words': 77}