<commit_before>#import drmaa
import argparse
import subprocess
import shlex
import codecs

def runLocally(commandsFilename):
	with codecs.open(commandsFilename) as f:
		for command in f:
			#split = shlex.split(command.strip())
			command = command.strip()
			return_code = subprocess.call(command, shell=True)
			assert return_code == 0, "Command (%s) gave non-zero error (%d)" % (command,return_code)
			

if __name__ == '__main__':
	parser = argparse.ArgumentParser(description='Cluster tool for DRMAA-compliant clusters (e.g. SGE/Slurm) for running large groups of jobs')
	parser.add_argument('--jobList',type=str,required=True,help='File containing one row per command')
	parser.add_argument('--local',action='store_true',help='Whether to actually just run the command on this node and ignore using a cluster')

	args = parser.parse_args()

	assert args.local == True, "Cluster is on the todo list"<commit_msg>Cluster prints out commands it runs<commit_after>#import drmaa
import argparse
import subprocess
import shlex
import codecs

def runLocally(commandsFilename):
	with codecs.open(commandsFilename) as f:
		for command in f:
			#split = shlex.split(command.strip())
			command = command.strip()
			print("Executing: %s" % command)
			return_code = subprocess.call(command, shell=True)
			assert return_code == 0, "Command (%s) gave non-zero error (%d)" % (command,return_code)
			

if __name__ == '__main__':
	parser = argparse.ArgumentParser(description='Cluster tool for DRMAA-compliant clusters (e.g. SGE/Slurm) for running large groups of jobs')
	parser.add_argument('--jobList',type=str,required=True,help='File containing one row per command')
	parser.add_argument('--local',action='store_true',help='Whether to actually just run the command on this node and ignore using a cluster')

	args = parser.parse_args()

	assert args.local == True, "Cluster is on the todo list"
{'fraction_non_alphanumeric': 0.1138771186440678, 'fraction_numerical': 0.001059322033898305, 'mean_word_length': 5.403389830508474, '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': '3280005', 'n_tokens_mistral': 601, 'n_tokens_neox': 564, 'n_words': 179}