<commit_before>(function (JSUS) {

	
	
	function OBJ(){};

	
    OBJ.equals = function (o1, o2) {
    	
        if (!o1 || !o2) return false;
      	
    	// Check whether arguments are not objects
    	if ( typeof o1 in {number:'',string:''}) {
    		if ( typeof o2 in {number:'',string:''}) {
        		return (o1 === o2);
        	}
    		return false;
    	}
    	else if ( typeof o2 in {number:'',string:''}) {
    		return false;
    	}
    	

  	  
      for (var p in o1) {
          if (o1.hasOwnProperty(p)) {
        	  
        	  if ('undefined' === typeof o2[p] && 'undefined' !== typeof o1[p]) return false;
        	  
        	  switch (typeof o1[p]) {
                  case 'object':
                      if (!OBJ.equals(o1[p],o2[p])) return false;
                    	
                  case 'function':
                      if (o1[p].toString() !== o2[p].toString()) return false;
                    	
                  default:
                      if (o1[p] !== o2[p]) return false; 
              }
          } 
      }

      
      // Check whether o2 has extra properties
      // TODO: improve, some properties have already been checked!
      for (p in o2) {
    	  if (o2.hasOwnProperty(p)) {
    		  if ('undefined' === typeof o1[p] && 'undefined' !== typeof o2[p])
    			  return false;
    	  }
      }

      return true;
    };
	
	OBJ.getListSize = function (list) {	
		var n = 0;
		for (var key in list) {
		    if (list.hasOwnProperty(key)) {
		    	n++;
		    }
		}
		
		//console.log('Calculated list length ' + n);
		
		return n;
	};
	
	
	
	OBJ._obj2Array = function(obj, keyed) {
	    var result = [];
	    for (var key in obj) {
	       if (obj.hasOwnProperty(key)) {
	    	   if ( 'object' === typeof obj[key] ) {
					result = result.concat(OBJ._obj2Array(obj[key],keyed));
				}
				else {
					if (keyed) result.push(key);
			        result.push(obj[key]);
				}
	    	   
	       }
	    }
	  
	    return result;
	};
	
	OBJ.obj2Array = function (obj) {
	    return OBJ._obj2Array(obj);
	};
	
	/**
	 * Creates an array containing all keys and values of the obj.
	 */
	OBJ.obj2KeyedArray = function (obj) {
	    return OBJ._obj2Array(obj,true);
	};
	
	OBJ.objGetAllKeys = function (obj) {
		var result = [];
	    for (var key in obj) {
	       if (obj.hasOwnProperty(key)) {
	    	   result.push(key);
	    	   if ('object' === typeof obj[key]) {
	    		   result = result.concat(OBJ.objGetAllKeys(obj[key]));
	    	   }
	       }
	    }
	    return result;
	};
	

	
	/**
	 * Creates an array of key:value objects.
	 * 
	 */
	OBJ.implodeObj = function (obj) {
		//console.log(obj);
	    var result = [];
	    for (var key in obj) {
	       if (obj.hasOwnProperty(key)) {
	    	   var o = {};
	    	   o[key] = obj[key];
	           result.push(o);
	           //console.log(o);
	       }
	    }
	    return result;
	};
	
	

	
	
	/**
	 * Creates a perfect copy of the obj
	 */
	OBJ.clone = function (obj) {
		var clone = {};
		for (var i in obj) {
			if ( 'object' === typeof obj[i] ) {
				clone[i] = OBJ.clone(obj[i]);
			}
			else {
				clone[i] = obj[i];<commit_msg>Random CF faces working. Minor fixes to do remain<commit_after>(function (JSUS) {

	
	
	function OBJ(){};

	
    OBJ.equals = function (o1, o2) {
    	
        if (!o1 || !o2) return false;
      	
    	// Check whether arguments are not objects
    	if ( typeof o1 in {number:'',string:''}) {
    		if ( typeof o2 in {number:'',string:''}) {
        		return (o1 === o2);
        	}
    		return false;
    	}
    	else if ( typeof o2 in {number:'',string:''}) {
    		return false;
    	}
    	

  	  
      for (var p in o1) {
          if (o1.hasOwnProperty(p)) {
        	  
        	  if ('undefined' === typeof o2[p] && 'undefined' !== typeof o1[p]) return false;
        	  
        	  switch (typeof o1[p]) {
                  case 'object':
                      if (!OBJ.equals(o1[p],o2[p])) return false;
                    	
                  case 'function':
                      if (o1[p].toString() !== o2[p].toString()) return false;
                    	
                  default:
                      if (o1[p] !== o2[p]) return false; 
              }
          } 
      }

      
      // Check whether o2 has extra properties
      // TODO: improve, some properties have already been checked!
      for (p in o2) {
    	  if (o2.hasOwnProperty(p)) {
    		  if ('undefined' === typeof o1[p] && 'undefined' !== typeof o2[p])
    			  return false;
    	  }
      }

      return true;
    };
	
	OBJ.getListSize = function (list) {	
		var n = 0;
		for (var key in list) {
		    if (list.hasOwnProperty(key)) {
		    	n++;
		    }
		}
		
		//console.log('Calculated list length ' + n);
		
		return n;
	};
	
	
	
	OBJ._obj2Array = function(obj, keyed) {
	    var result = [];
	    for (var key in obj) {
	       if (obj.hasOwnProperty(key)) {
	    	   if ( 'object' === typeof obj[key] ) {
					result = result.concat(OBJ._obj2Array(obj[key],keyed));
				}
				else {
					if (keyed) result.push(key);
			        result.push(obj[key]);
				}
	    	   
	       }
	    }
	  
	    return result;
	};
	
	OBJ.obj2Array = function (obj) {
	    return OBJ._obj2Array(obj);
	};
	
	/**
	 * Creates an array containing all keys and values of the obj.
	 */
	OBJ.obj2KeyedArray = function (obj) {
	    return OBJ._obj2Array(obj,true);
	};
	
	OBJ.objGetAllKeys = function (obj) {
		var result = [];
	    for (var key in obj) {
	       if (obj.hasOwnProperty(key)) {
	    	   result.push(key);
	    	   if ('object' === typeof obj[key]) {
	    		   result = result.concat(OBJ.objGetAllKeys(obj[key]));
	    	   }
	       }
	    }
	    return result;
	};
	

	
	/**
	 * Creates an array of key:value objects.
	 * 
	 */
	OBJ.implodeObj = function (obj) {
		//console.log(obj);
	    var result = [];
	    for (var key in obj) {
	       if (obj.hasOwnProperty(key)) {
	    	   var o = {};
	    	   o[key] = obj[key];
	           result.push(o);
	           //console.log(o);
	       }
	    }
	    return result;
	};
	
	

	
	
	/**
	 * Creates a perfect copy of the obj
	 */
	OBJ.clone = function (obj) {
		var clone = {};
		for (var i in obj) {
			if (obj.hasOwnProperty(i)) {
				if ( 'object' === typeof obj[i] ) {
					clone[i] = OBJ.clone(obj[i]);
				}
				else {
					clone[i] = obj[i];
				}
{'fraction_non_alphanumeric': 0.14970723215698686, 'fraction_numerical': 0.01012818483937332, 'mean_word_length': 1.545308095046315, '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': '3599862', 'n_tokens_mistral': 2432, 'n_tokens_neox': 2137, 'n_words': 511}