<commit_before>/**
 * @class UTIL
 * A utility class.
 * @private
 * @experimental
 * @singleton
 */
var obj = {};

// Utilities
Object.defineProperties(obj,{

  // STATICS
  testing: {
    enumerable: false,
    writable: true,
    configurable: false,
    value: false
  },

  /**
   * @property {Boolean} PROXY_SUPPORT
   * Indicates the environment has ES6 Direct Proxy Support
   * @readonly
   * @private
   */
  PROXY_SUPPORT: {
    enumerable: false,
    get: function(){
      return process.execArgv.indexOf('--harmony') > -1;
    }
  },

  _cfg:{
    enumerable: false,
    writable: true,
    value: null
  },


  // METHODS
  /**
   * @method bufferjoiner
   * A custom buffer joiner.
   */
  bufferjoiner: {
    enumerable: true,
    get: function(){return require('./bufferjoiner');}
  },


  /**
   * @method watch
   * The watch module.
   * @return {Object}
   */
  watch: {
    enumerable: false,
    get: function(){
      return require('watch');
    }
  },


  /**
   * @method wrench
   * The wrench utility library.
   * @return {Object}
   */
  wrench: {
    enumerable: false,
    get: function(){
      return require('wrench');
    }
  },


  /**
   * @method writeableDir
   * Determines whether the directory is writeable or not.
   * @param {String} dir
   * The directory in question.
   * @returns {Boolean}
   */
  writeableDir: {
    enumerable: false,
    writable: true,
    value: function(dir){
      var fs = require('fs');
      if (!dir || !fs.existsSync(dir))
        return undefined;

      if (!fs.statSync(dir).isDirectory())
        return undefined;

      /*var testFile = dir+'/'+;
      try {
        fs.writeFileSync(testFile, ' ');
        fs.unlinkSync(testFile);
        return dir;
      } catch (e) {
        return undefined;
      }*/
     return dir;
    }
  },

  tempDir: {
    enumerable: true,
    writable: false,
    value: require('os').tmpDir()
  },

  /**
   * @method notImplemented
   * Log a `NOT IMPLEMENTED` message to the console, indicating what method is not yet implemented in the API.
   * @param {String} filename
   * The absolute path of the file that contains the non-implemented function.
   * @param {String} msg
   * The message to display (such as method name and/or line number).
   */
  notImplemented: {
    enumerable: true,
    writable: false,
    configurable: false,
    value: function(filename,msg){
      if (!this.testing){
        console.log('NOT IMPLEMENTED:'.bold.cyan);
        console.log((filename+':').cyan,msg.yellow,'\n');
      }
    }
  },

  /**
   * @method sleep
   * A generic method to sleep for a specific amount of time.
   */
  sleep: {
    enumerable: false,
    writable: false,
    configurable: false,
    value: function(period){
      var st = new Date().getTime();
      while(new Date().getTime() <= st+(period*1000)){}
      return;
    }
  },

  /**
   * @method unrequire
   * Reverts `require('some_module')`. Requires the full path of the module in order to work.
   * @param file (required)
   * The absolute path of the file that should be *un*required.
   * @private
   */
  unrequire: {
    enumerable: true,
    writable: false,
    configurable: false,
    value: function(file){
      delete require.cache[file];<commit_msg>Removed WAMP<commit_after>/**
 * @class UTIL
 * A utility class.
 * @private
 * @experimental
 * @singleton
 */
var obj = {};

// Utilities
Object.defineProperties(obj,{

  // STATICS
  testing: {
    enumerable: false,
    writable: true,
    configurable: false,
    value: false
  },

  /**
   * @property {Boolean} PROXY_SUPPORT
   * Indicates the environment has ES6 Direct Proxy Support
   * @readonly
   * @private
   */
  PROXY_SUPPORT: {
    enumerable: false,
    get: function(){
      return process.execArgv.indexOf('--harmony') > -1;
    }
  },

  _cfg:{
    enumerable: false,
    writable: true,
    value: null
  },


  // METHODS
  /**
   * @property {Object} bufferjoiner
   * A custom buffer joiner.
   */
  bufferjoiner: {
    enumerable: true,
    get: function(){
			return require('./bufferjoiner');
		}
  },
	

  /**
   * @property {Object" watch
   * The watch module.
   * @return {Object}
   */
  watch: {
    enumerable: false,
    get: function(){
      return require('watch');
    }
  },


  /**
   * @method {Object} wrench
   * The wrench utility library.
   * @return {Object}
   */
  wrench: {
    enumerable: false,
    get: function(){
      return require('wrench');
    }
  },


  /**
   * @method writeableDir
   * Determines whether the directory is writeable or not.
   * @param {String} dir
   * The directory in question.
   * @returns {Boolean}
   */
  writeableDir: {
    enumerable: false,
    writable: true,
    value: function(dir){
      var fs = require('fs');
      if (!dir || !fs.existsSync(dir))
        return undefined;

      if (!fs.statSync(dir).isDirectory())
        return undefined;

      /*var testFile = dir+'/'+;
      try {
        fs.writeFileSync(testFile, ' ');
        fs.unlinkSync(testFile);
        return dir;
      } catch (e) {
        return undefined;
      }*/
     return dir;
    }
  },

  tempDir: {
    enumerable: true,
    writable: false,
    value: require('os').tmpDir()
  },

  /**
   * @method notImplemented
   * Log a `NOT IMPLEMENTED` message to the console, indicating what method is not yet implemented in the API.
   * @param {String} filename
   * The absolute path of the file that contains the non-implemented function.
   * @param {String} msg
   * The message to display (such as method name and/or line number).
   */
  notImplemented: {
    enumerable: true,
    writable: false,
    configurable: false,
    value: function(filename,msg){
      if (!this.testing){
        console.log('NOT IMPLEMENTED:'.bold.cyan);
        console.log((filename+':').cyan,msg.yellow,'\n');
      }
    }
  },

  /**
   * @method sleep
   * A generic method to sleep for a specific amount of time.
   * @param {Number} period
   * The number of seconds to sleep.
   */
  sleep: {
    enumerable: false,
    writable: false,
    configurable: false,
    value: function(period){
      var st = new Date().getTime();
      while(new Date().getTime() <= st+(period*1000)){}
      return;
    }
  },

  /**
   * @method unrequire
   * Reverts `require('some_module')`. Requires the full path of the module in order to work.
   * @param {String} file (required)
   * The absolute path of the file that should be *un*required.
   * @private
   */
  unrequire: {
    enumerable: true,
    writable: false,
    configurable: false,
    value: function(file){
      delete require.cache[file];
{'fraction_non_alphanumeric': 0.1355421686746988, 'fraction_numerical': 0.0018072289156626507, 'mean_word_length': 2.3779247202441507, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5027342', 'n_tokens_mistral': 2151, 'n_tokens_neox': 2099, 'n_words': 582}