<commit_before>// Generated by CoffeeScript 1.7.1
(function() {
  module.exports = (function(x) {
    return x.clone();
  })({
    version: "makefile-coffee 0.3.0",
    RegExp: RegExp,
    fs: require('fs'),
    touch: require('touch'),
    execSync: require('execSync'),
    setTimeout: setTimeout,
    clearTimeout: clearTimeout,
    ruleToRx: function(x) {
      var escaperx;
      escaperx = function(str) {
        return str.replace(/[.^$*+?()[{\\|\]-]/g, '\\$&');
      };
      return new this.RegExp("^" + escaperx(x).replace("%", "(.*)") + "$");
    },
    maxDepth: 7,
    rule: function() {
      var args, deps, k, opts, t, target, task, v, x;
      args = (function() {
        var _i, _len, _results;
        _results = [];
        for (_i = 0, _len = arguments.length; _i < _len; _i++) {
          x = arguments[_i];
          _results.push(x);
        }
        return _results;
      }).apply(this, arguments);
      target = null;
      deps = [];
      task = null;
      opts = {};
      while (args.length) {
        x = args.shift();
        t = typeof x;
        if (t === "string") {
          if (target == null) {
            target = x;
          } else {
            deps.push(x);
          }
        } else if (t === "function") {
          task = x;
        } else if (t === "object") {
          for (k in x) {
            v = x[k];
            opts[k] = v;
          }
        }
      }
      if (/%/.test(target)) {
        this.trace("Adding rule for " + target);
        this.rules.push({
          target: target,
          deps: deps,
          opts: opts,
          task: task,
          rx: this.ruleToRx(target)
        });
      } else {
        delete this.targets[target];
        this.trace("Adding rule for " + target);
        this.targets[target] = {
          deps: deps,
          opts: opts,
          task: task
        };
      }
      return this;
    },
    'var': function() {
      var args, name, x;
      args = (function() {
        var _i, _len, _results;
        _results = [];
        for (_i = 0, _len = arguments.length; _i < _len; _i++) {
          x = arguments[_i];
          _results.push(x);
        }
        return _results;
      }).apply(this, arguments);
      name = args.shift();
      delete this.vars[name];
      if (args.length > 0) {
        this.vars[name] = args.join(' ');
      } else {
        this.vars[name] = name;
      }
      return this;
    },
    sh: function() {
      var args, cmd, cmdparts, k, opt, retCode, t, v, x, _i, _len;
      args = (function() {
        var _i, _len, _results;
        _results = [];
        for (_i = 0, _len = arguments.length; _i < _len; _i++) {
          x = arguments[_i];
          _results.push(x);
        }
        return _results;
      }).apply(this, arguments);
      cmdparts = [];
      opt = {};
      for (_i = 0, _len = args.length; _i < _len; _i++) {
        x = args[_i];
        t = typeof x;
        if (t === 'string') {
          cmdparts.push(x);
        } else {
          for (k in x) {
            v = x[k];
            opt[k] = v;
          }
        }
      }
      cmd = cmdparts.join(' ');
      if (opt.out) {
        cmd = cmd + ' >' + opt["out"];
      }
      if (opt["in"]) {
        cmd = cmd + ' <' + opt["in"];
      }
      this.show(cmd);
      if (!this.testRun) {
        retCode = this.execSync.run(cmd);
      }
      if (retCode !== 0) {
        throw "Shell command failed: " + cmd;
      }
    },
    vars: [],
    rules: [],
    targets: {},
    clone: function() {
      var k, v, y;
      y = (function(_arg) {
        var rule;
        rule = _arg.rule;
        return function() {
          return rule.apply(y, arguments);
        };
      })(this);
      for (k in this) {
        v = this[k];
        y[k] = v;
      }
      y;
      y.vars = this.vars.slice(0);
      y.rules = this.rules.slice(0);
      y.targets = (function(_this) {
        return function(x) {
          var _ref;
          _ref = _this.targets;
          for (k in _ref) {
            v = _ref[k];
            x[k] = v;
          }
          return x;
        };
      })(this)({});
      return y;
    },
    process: process,
    echo: function() {
      var args, x;
      args = [
        (function() {
          var _i, _len, _results;
          _results = [];
          for (_i = 0, _len = arguments.length; _i < _len; _i++) {
            x = arguments[_i];
            _results.push(x);
          }
          return _results;
        }).apply(this, arguments)
      ];
      this.process.stdout.write(args.join(' ') + "\n");
      return this;
    },
    setup: function(s) {
      if (s != null) {
        s.apply(this);
      }
      return this;
    },
    loadMakefile: function(f) {
      var add, c, error, heading, line, lineno, match, rule, _i, _len, _ref;
      if (f == null) {
        f = 'Makefile';
      }
      if (this.fs.existsSync(f)) {
        try {
          c = this.fs.readFileSync(f);
          if ((c = c.toString()) == null) {
            throw "Could not decode file";
          }
        } catch (_error) {
          error = _error;
          this.error("Could not read " + f + ": " + error);
        }
        lineno = 0;
        add = (function(_this) {
          return function(heading, rule) {
            var args, expandVars;
            rule = (function(rule) {
              var compile, x;
              compile = function(x) {<commit_msg>build<commit_after>// Generated by CoffeeScript 1.7.1
(function() {
  module.exports = (function(x) {
    return x.clone();
  })({
    version: "makefile-coffee 0.3.0",
    RegExp: RegExp,
    fs: require('fs'),
    touch: require('touch'),
    execSync: require('execSync'),
    setTimeout: setTimeout,
    clearTimeout: clearTimeout,
    ruleToRx: function(x) {
      var escaperx;
      escaperx = function(str) {
        return str.replace(/[.^$*+?()[{\\|\]-]/g, '\\$&');
      };
      return new this.RegExp("^" + escaperx(x).replace("%", "(.*)") + "$");
    },
    maxDepth: 7,
    rule: function() {
      var args, deps, k, opts, t, target, task, v, x;
      args = (function() {
        var _i, _len, _results;
        _results = [];
        for (_i = 0, _len = arguments.length; _i < _len; _i++) {
          x = arguments[_i];
          _results.push(x);
        }
        return _results;
      }).apply(this, arguments);
      target = null;
      deps = [];
      task = null;
      opts = {};
      while (args.length) {
        x = args.shift();
        t = typeof x;
        if (t === "string") {
          if (target == null) {
            target = x;
          } else {
            deps.push(x);
          }
        } else if (t === "function") {
          task = x;
        } else if (t === "object") {
          for (k in x) {
            v = x[k];
            opts[k] = v;
          }
        }
      }
      if (/%/.test(target)) {
        this.trace("Adding rule for " + target);
        this.rules.push({
          target: target,
          deps: deps,
          opts: opts,
          task: task,
          rx: this.ruleToRx(target)
        });
      } else {
        delete this.targets[target];
        this.trace("Adding rule for " + target);
        this.targets[target] = {
          deps: deps,
          opts: opts,
          task: task
        };
      }
      return this;
    },
    'var': function() {
      var args, name, x;
      args = (function() {
        var _i, _len, _results;
        _results = [];
        for (_i = 0, _len = arguments.length; _i < _len; _i++) {
          x = arguments[_i];
          _results.push(x);
        }
        return _results;
      }).apply(this, arguments);
      name = args.shift();
      delete this.vars[name];
      if (args.length > 0) {
        this.vars[name] = args.join(' ');
      } else {
        this.vars[name] = name;
      }
      return this;
    },
    sh: function() {
      var args, cmd, cmdparts, k, opt, retCode, t, v, x, _i, _len;
      args = (function() {
        var _i, _len, _results;
        _results = [];
        for (_i = 0, _len = arguments.length; _i < _len; _i++) {
          x = arguments[_i];
          _results.push(x);
        }
        return _results;
      }).apply(this, arguments);
      cmdparts = [];
      opt = {};
      for (_i = 0, _len = args.length; _i < _len; _i++) {
        x = args[_i];
        t = typeof x;
        if (t === 'string') {
          cmdparts.push(x);
        } else {
          for (k in x) {
            v = x[k];
            opt[k] = v;
          }
        }
      }
      cmd = cmdparts.join(' ');
      if (opt.out) {
        cmd = cmd + ' >' + opt["out"];
      }
      if (opt["in"]) {
        cmd = cmd + ' <' + opt["in"];
      }
      this.show(cmd);
      if (!this.testRun) {
        retCode = this.execSync.run(cmd);
      }
      if (retCode !== 0) {
        throw "Shell command failed: " + cmd;
      }
    },
    vars: [],
    rules: [],
    targets: {},
    clone: function() {
      var k, v, y;
      y = (function(_arg) {
        var rule;
        rule = _arg.rule;
        return function() {
          return rule.apply(y, arguments);
        };
      })(this);
      for (k in this) {
        v = this[k];
        y[k] = v;
      }
      y;
      y.vars = this.vars.slice(0);
      y.rules = this.rules.slice(0);
      y.targets = (function(_this) {
        return function(x) {
          var _ref;
          _ref = _this.targets;
          for (k in _ref) {
            v = _ref[k];
            x[k] = v;
          }
          return x;
        };
      })(this)({});
      return y;
    },
    process: process,
    echo: function() {
      var args, x;
      args = [
        (function() {
          var _i, _len, _results;
          _results = [];
          for (_i = 0, _len = arguments.length; _i < _len; _i++) {
            x = arguments[_i];
            _results.push(x);
          }
          return _results;
        }).apply(this, arguments)
      ];
      this.process.stdout.write(args.join(' ') + "\n");
      return this;
    },
    setup: function(s) {
      if (s != null) {
        s.apply(this);
      }
      return this;
    },
    loadMakefile: function(f) {
      var add, c, error, heading, line, lineno, match, rule, _i, _len, _ref;
      if (f == null) {
        f = 'Makefile';
      }
      if (this.v == null) {
        this.v = this.vars;
      }
      if (this.fs.existsSync(f)) {
        try {
          c = this.fs.readFileSync(f);
          if ((c = c.toString()) == null) {
            throw "Could not decode file";
          }
        } catch (_error) {
          error = _error;
          this.error("Could not read " + f + ": " + error);
        }
        lineno = 0;
        add = (function(_this) {
          return function(heading, rule) {
            var args, expandVars;
            rule = (function(rule) {
              var compile, x;
              compile = function(x) {
{'fraction_non_alphanumeric': 0.16309915843395537, 'fraction_numerical': 0.0031101353823637027, 'mean_word_length': 1.3720980689954436, 'pattern_counts': {'":': 2, '<': 15, '<?xml version=': 0, '>': 7, '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': '3346201', 'n_tokens_mistral': 3617, 'n_tokens_neox': 3572, 'n_words': 871}