<commit_before>function usage() {
  print("Usage:")
  print("  csp5 path/to/sketch")
  quit()
}

if (arguments.length < 1) {
  usage()
}

function loadCoffeeFile(path) {
  var code = CoffeeScript.compile(readFile(path)) //, { bare: true })
  eval(code)
}

var pathToSketch = arguments[0]


if (/\.js$/.test(pathToSketch)) {
  load(pathToSketch)
} else if (/\.coffee$/.test(pathToSketch)) {
  var CoffeeScript = require('coffee-script').CoffeeScript
  loadCoffeeFile(pathToSketch)
}<commit_msg>moving loading of CoffeeScript to it's right place<commit_after>function usage() {
  print("Usage:")
  print("  csp5 path/to/sketch")
  quit()
}

if (arguments.length < 1) {
  usage()
}

function loadCoffeeFile(path) {
  var CoffeeScript = require('coffee-script').CoffeeScript
  var code = CoffeeScript.compile(readFile(path)) //, { bare: true })
  eval(code)
}

var pathToSketch = arguments[0]


if (/\.js$/.test(pathToSketch)) {
  load(pathToSketch)
} else if (/\.coffee$/.test(pathToSketch)) {
  loadCoffeeFile(pathToSketch)
}
{'fraction_non_alphanumeric': 0.16715542521994134, 'fraction_numerical': 0.005865102639296188, 'mean_word_length': 4.446808510638298, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3974461', 'n_tokens_mistral': 396, 'n_tokens_neox': 376, 'n_words': 71}