<commit_before>(function() {
	var imports = new JavaImporter(java.io, java.util, java.lang, 
			com.xafero.jaddle.web, com.xafero.sfs.Hoster,
			java.util.concurrent, java.net, java.awt);

	with (imports) {
		var getAddresses = function() {
			var results = new LinkedHashSet();
			for each (var ni in Collections.list(NetworkInterface.getNetworkInterfaces())) 
				for each (var ia in Collections.list(ni.getInetAddresses())) {
					if (ia.isLoopbackAddress() || ia.isLinkLocalAddress())
						continue;
					results.add(ia);
				}
			return results;
		};
		// Set up container
		var hostedFiles = new LinkedHashMap();
		// Serve function
		var serve = function(root, key, val) {
			var file = new File(root, val);
			hostedFiles.put(key, file);
		};
		return {
			exec : function(work, args, env) {
				// Loop for all files
				for (var i = 0; i < args.length; i = i + 2) {
					var link = args[i];
					var target = args[i+1];
					serve(work, link, target);
				}
				// Start up server
				var port = 8080;
				var allNet = "0.0.0.0";
				var server = new ServePlugin(hostedFiles);
				var hoster = new Hoster(allNet, port, new File(""), server);
				var pool = Executors.newCachedThreadPool();
				pool.submit(hoster);
				// Open browser
				for each (var addr in getAddresses()) {
					var escapedAddr = addr.getHostAddress();
					if (escapedAddr.contains(":"))
						escapedAddr = '['+escapedAddr+']';
					var endpoint = (hoster.getEndpoint() + "").replace(allNet, escapedAddr);
					var uri = URI.create(endpoint);
					print(" Endpoint = " + uri);
					Desktop.getDesktop().browse(uri);
				}
				// Wait for exit
				print("Press any key to quit...");
				System.in.read();
				pool.shutdown();
				// System.exit(0);
				print("Done.");
				return pool;
			}
		}
	}
});<commit_msg>Added do not wait option to serve task for higher ordered scripts invoking it<commit_after>(function() {
	var imports = new JavaImporter(java.io, java.util, java.lang, 
			com.xafero.jaddle.web, com.xafero.sfs.Hoster,
			java.util.concurrent, java.net, java.awt);

	with (imports) {
		var getAddresses = function() {
			var results = new LinkedHashSet();
			for each (var ni in Collections.list(NetworkInterface.getNetworkInterfaces())) 
				for each (var ia in Collections.list(ni.getInetAddresses())) {
					if (ia.isLoopbackAddress() || ia.isLinkLocalAddress())
						continue;
					results.add(ia);
				}
			return results;
		};
		// Set up container
		var hostedFiles = new LinkedHashMap();
		// Serve function
		var serve = function(root, key, val) {
			var file = new File(root, val);
			hostedFiles.put(key, file);
		};
		return {
			exec : function(work, args, env) {
				// Loop for all files
				for (var i = 0; i < args.length; i = i + 2) {
					var link = args[i];
					var target = args[i+1];
					serve(work, link, target);
				}
				// Start up server
				var port = 8080;
				var allNet = "0.0.0.0";
				var server = new ServePlugin(hostedFiles);
				var hoster = new Hoster(allNet, port, new File(""), server);
				var pool = Executors.newCachedThreadPool();
				pool.submit(hoster);
				// Open browser
				for each (var addr in getAddresses()) {
					var escapedAddr = addr.getHostAddress();
					if (escapedAddr.contains(":"))
						escapedAddr = '['+escapedAddr+']';
					var endpoint = (hoster.getEndpoint() + "").replace(allNet, escapedAddr);
					var uri = URI.create(endpoint);
					print(" Endpoint = " + uri);
					Desktop.getDesktop().browse(uri);
				}
				// Decide...
				if (env.get('DONT_WAIT'))
					return pool;
				// Wait for exit
				print("Press any key to quit...");
				System.in.read();
				pool.shutdown();
				System.exit(0);
				print("Done.");
			}
		}
	}
});
{'fraction_non_alphanumeric': 0.15122873345935728, 'fraction_numerical': 0.006481231433972455, 'mean_word_length': 2.8423236514522823, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1077492', 'n_tokens_mistral': 1556, 'n_tokens_neox': 1225, 'n_words': 324}