<commit_before>
var   fs = require('graceful-fs')
    , path = require('path')
    , wrench = require('wrench')
    , fse = require('fs-extra')
    , cmd = require('./process')


exports.object_size = function(obj) {
    var size = 0, key;
    for (key in obj) {
        if (obj.hasOwnProperty(key)) size++;
    }
    return size;
};

exports.random_int = function(min, max) {
    return Math.floor(Math.random() * (max - min)) + min;
}

exports.to_hex = function(value) {
   return (value+0x10000).toString(16).substr(-4).toUpperCase();
}

exports.ios_uniqueid = function(flow) {

    return ''+
      exports.to_hex( exports.random_int(0, 32767) ) +
      exports.to_hex( exports.random_int(0, 32767) ) +
      exports.to_hex( exports.random_int(0, 32767) ) +
      exports.to_hex( exports.random_int(0, 32767) ) +
      exports.to_hex( exports.random_int(0, 32767) ) +
      exports.to_hex( exports.random_int(0, 32767) );

}

exports.array_union = function(a,b) {
    var r = a.slice(0);
    b.forEach(function(i) { if (r.indexOf(i) < 0) r.push(i); });
    return r;<commit_msg>util; adding system_arch helper<commit_after>
var   fs = require('graceful-fs')
    , path = require('path')
    , wrench = require('wrench')
    , fse = require('fs-extra')
    , cmd = require('./process')


exports.object_size = function(obj) {
    var size = 0, key;
    for (key in obj) {
        if (obj.hasOwnProperty(key)) size++;
    }
    return size;
};

exports.random_int = function(min, max) {
    return Math.floor(Math.random() * (max - min)) + min;
}

exports.to_hex = function(value) {
   return (value+0x10000).toString(16).substr(-4).toUpperCase();
}


exports.system_arch = function(flow) {
    if(process.arch == 'x64') {
        return '64';
    } else if(process.arch == 'ia32') {
        return '32';
    }
} //system_arch

exports.ios_uniqueid = function(flow) {

    return ''+
      exports.to_hex( exports.random_int(0, 32767) ) +
      exports.to_hex( exports.random_int(0, 32767) ) +
      exports.to_hex( exports.random_int(0, 32767) ) +
      exports.to_hex( exports.random_int(0, 32767) ) +
      exports.to_hex( exports.random_int(0, 32767) ) +
      exports.to_hex( exports.random_int(0, 32767) );

}

exports.array_union = function(a,b) {
    var r = a.slice(0);
    b.forEach(function(i) { if (r.indexOf(i) < 0) r.push(i); });
    return r;
{'fraction_non_alphanumeric': 0.1708350996184824, 'fraction_numerical': 0.04408647732089869, 'mean_word_length': 3.0972222222222223, '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': '731353', 'n_tokens_mistral': 934, 'n_tokens_neox': 863, 'n_words': 158}