<commit_before>(function(t){function r(t){if(!(this instanceof r))return new r(t);if(this.buffer="","string"==typeof t)this.write(t,0);else if(Array.isArray(t))for(var e=0;e<t.length;++e)this.writeUInt8(t[e],e);else r.isStringBuffer(t)&&(this.buffer=t.buffer)}function e(t){var r="";if(t.length<2)for(var e=t.length;2>e;++e)r+="0";return r+=t}function f(t){var r=(128&t[0])>>>7,e=((127&t[0])<<1)+((128&t[1])>>>7),f=0;for(t[1]&=127,i=0;i<=2;++i)f+=t[i+1]<<8*(2-i);return f|=8388608,h(r?-f:f,e-150)}function n(t){var r=(128&t[0])>>>7,e=((127&t[0])<<4)+((240&t[1])>>>4),f=0;for(t[1]&=15,i=0;i<=6;++i)f+=h(t[i+1],8*(6-i));return f+=4503599627370496,h(r?-f:f,e-1075)}function u(t,r){var e=[];if(r===l)return e.push(t),e;if(r===(c|l))return 0>t?u(s(-t,8),l):u(t,l);if(r===g)return e.push(t>>>8),e.push(255&t),e;if(r===(c|g))return 0>t?u(s(-t,16),g):u(t,g);if(r===d)return e.push(t>>>24&255),e.push(t>>>16&255),e.push(t>>>8&255),e.push(255&t),e;if(r===(c|d))return 0>t?u(s(-t,32),d):u(t,d);if(r===I){t=+t;var f,n,i=127,o=t;return f=0>o?1:0,o=Math.abs(o),n=Math.log(o)/Math.log(2),n=n>0?Math.floor(n):Math.ceil(n),o*=Math.pow(2,-n+23),i+=n,o=Math.round(o),o&=8388607,e.push(f<<7),e[0]+=(254&i)>>>1,e.push((1&i)<<7),e[1]+=o>>>16&127,e.push(o>>>8&255),e.push(255&o),e}if(r===E){t=+t;var f,n,i=1023,o=t;f=0>o?1:0,o=Math.abs(o),n=Math.log(o)/Math.log(2),n=n>0?Math.floor(n):Math.ceil(n),o*=Math.pow(2,-n+52),i+=n,o=Math.round(o),o=parseInt(o.toString(2).substr(1),2),e.push(f<<7),e[0]+=i>>>4,e.push((15&i)<<4),e[1]+=15&Math.floor(h(o,-48));for(var a=40,b=0;6>b;++b,a-=8)e.push(255&Math.floor(h(o,-a)));return e}}function h(t,r){var e=0;if(r>0)for(;r>e;)t*=2,e++;else for(r=-r;r>e;)t/=2,e++;return t}function s(t,r){return r>31||!r?~t:(t^o(r))+1}function o(t){return(1<<t)-1}function a(t,r,e){for(var f=t.length-1;f>=0&&r.apply(e,[t[f],f,t])!==!1;f--);}function b(t,r,e){return 0>t&&0===r.length?0:(-1===t?t=r.length-(e?1:0):0>t&&(t=r.length+(e?0:1)+t%(r.length+(e?0:1))),t)}var t=this,c=1,l=0,g=2,d=4,I=6,E=7;r.concat=function(t){return r(t.reduce(function(t,r){return t+r.buffer},""))},r.isStringBuffer=function(t){return t instanceof r},r.byteLength=function(t,r){r||(r="ascii");var e;switch(t+="",r){case"ascii":case"binary":case"raw":e=t.length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":e=2*t.length;break;case"hex":e=t.length>>>1;break;default:e=t.length}return e},r.INSPECT_MAX_BYTES=50,r.prototype={writeUInt8:function(t,r){return t=+t,r=b(r,this.buffer),r===this.buffer.length?this.buffer+=String.fromCharCode(t):this.buffer=this.buffer.substr(0,r)+String.fromCharCode(t)+this.buffer.substr(r+1),r+1},writeInt8:function(t,r){return t=+t,t=0>t?s(-t,8):t,r=b(r,this.buffer),r===this.buffer.length?this.buffer+=String.fromCharCode(t):this.buffer=this.buffer.substr(0,r)+String.fromCharCode(t)+this.buffer.substr(r+1),r+1},writeUInt16LE:function(t,r){t=+t;var e=u(t,g),f="";return a(e,function(t){f+=String.fromCharCode(t)}),r=b(r,this.buffer),r>=this.buffer.length||-1===r?this.buffer+=f:this.buffer=this.buffer.substr(0,r)+f+this.buffer.substr(r+2),r+2},writeUInt16BE:function(t,r){t=+t;var e=u(t,g),f="";return e.forEach(function(t){f+=String.fromCharCode(t)}),r=b(r,this.buffer),r>=this.buffer.length||-1===r?this.buffer+=f:this.buffer=this.buffer.substr(0,r)+f+this.buffer.substr(r+2),r+2},writeInt16LE:function(t,r){return t=+t,t=0>t?s(-t,16):t,0>r&&(r=this.buffer.length-(r+1)%this.buffer.length),this.writeUInt16LE(t,r)},writeInt16BE:function(t,r){return t=+t,t=0>t?s(-t,16):t,0>r&&(r=this.buffer.length-(r+1)%this.buffer.length),this.writeUInt16BE(t,r)},writeUInt32LE:function(t,r){t=+t;var e=u(t,d),f="";a(e,function(t){f+=String.fromCharCode(t)}),r=b(r,this.buffer),r===this.buffer.length||-1===r?this.buffer+=f:this.buffer=this.buffer.substr(0,r)+f+this.buffer.substr(r+4)},writeUInt32BE:function(t,r){t=+t;var e=u(t,d),f="";e.forEach(function(t){f+=String.fromCharCode(t)}),r=b(r,this.buffer),r===this.buffer.length||-1===r?this.buffer+=f:this.buffer=this.buffer.substr(0,r)+f+this.buffer.substr(r+4)},writeInt32LE:function(t,r){return t=+t,t=0>t?s(-t,32):t,this.writeUInt32LE(t,r)},writeInt32BE:function(t,r){return t=+t,t=0>t?s(-t,32):t,this.writeUInt32BE(t,r)},writeFloatLE:function(t,r){var e=u(t,I);r=b(r,this.buffer);for(var f=e.length-1;f>=0;--f)this.writeUInt8(e[f],r+(e.length-1-f));return r+4},writeFloatBE:function(t,r){var e=u(t,I);return r=b(r,this.buffer),e.forEach(function(t,e){this.writeUInt8(t,r+e)},this),r+4},writeDoubleLE:function(t,r){var e=u(t,E);for(r=b(r,this.buffer),i=e.length-1;i>=0;--i)this.writeUInt8(e[i],r+(e.length-1-i));return r+8},writeDoubleBE:function(t,r){var e=u(t,E);return r=b(r,this.buffer),e.forEach(function(t,e){this.writeUInt8(t,r+e)},this),r+8},readUInt8:function(t){return t>>>=0,t=b(t,this.buffer,!0),this.buffer.charCodeAt(t)},readInt8:function(t){t>>>=0;var r=this.buffer.charCodeAt(t);return 128&r?-s(r,8):r},readUInt16LE:function(t){return t>>>=0,t=b(t,this.buffer,!0),this.buffer.charCodeAt(t)|this.buffer.charCodeAt(t+1)<<8},readUInt16BE:function(t){return t>>>=0,t=b(t,this.buffer,!0),this.buffer.charCodeAt(t)<<8|this.buffer.charCodeAt(t+1)},readInt16LE:function(t){var r=this.readUInt16LE(t);return 32768&r?-s(r,16):r},readInt16BE:function(t){var r=this.readUInt16BE(t);return 32768&r?-s(r,16):r},readUInt32LE:function(t){return t>>>=0,t=b(t,this.buffer,!0),0>t&&(t=this.buffer.length-(t+1)%this.buffer.length),this.buffer.charCodeAt(t)|this.buffer.charCodeAt(t+1)<<8|this.buffer.charCodeAt(t+2)<<16|this.buffer.charCodeAt(t+3)<<24},readUInt32BE:function(t){return t>>>=0,t=b(t,this.buffer,!0),this.buffer.charCodeAt(t)<<24|this.buffer.charCodeAt(t+1)<<16|this.buffer.charCodeAt(t+2)<<8|this.buffer.charCodeAt(t+3)},readInt32LE:function(t){var r=this.readUInt32LE(t);return 2147483648&r?-s(r,32):r},readInt32BE:function(t){var r=this.readUInt32BE(t);return 2147483648&r?-s(r,32):r},readFloatLE:function(t){var r=[];t=b(t,this.buffer,!0);for(var e=0;4>e;++e)r.push(this.readUInt8(t+e));return r.reverse(),f(r)},readFloatBE:function(t){var r=[];t=b(t,this.buffer,!0);for(var e=0;4>e;++e)r.push(this.readUInt8(t+e));return f(r)},readDoubleLE:function(t){var r=[];t=b(t,this.buffer,!0);for(var e=0;8>e;++e)r.push(this.readUInt8(t+e));return r.reverse(),n(r)},readDoubleBE:function(t){var r=[];t=b(t,this.buffer,!0);for(var e=0;8>e;++e)r.push(this.readUInt8(t+e));return n(r)},fill:function(t,r,e){"string"==typeof t&&(t=t.charCodeAt(0)),r||(r=0),e||(e=this.length),r=b(r,this.buffer),e=b(e,this.buffer);for(var f="",n=r;e>n;++n)f+=String.fromCharCode(t);return this.buffer=this.buffer.substr(0,r)+f+this.buffer.substr(e),this},slice:function(t,e){t||(t=0),e||(e=this.length),t=b(t,this.buffer,!0),e=b(e,this.buffer,!0);var f=r();return f.buffer=this.buffer.substr(t,e-t),f},copy:function(t,r,e,f){return r||(r=0),e||(e=0),f||(f=this.length),0>r&&(r=this.buffer.length-(r+1)%this.buffer.length),e=b(e,this.buffer,!0),f=b(f,this.buffer,!0),r=b(r,this.buffer),0>e&&(e=this.buffer.length-(e+1)%this.buffer.length),0>f&&(f=this.buffer.length-(f+1)%this.buffer.length),t.buffer=t.buffer.substr(0,r)+this.buffer.substr(e,f-e)+t.buffer.substr(r+f-e),this},equals:function(t){return this.buffer===t.buffer},toJSON:function(){return JSON.stringify(this.buffer)},toString:function(){return this.buffer},write:function(t,r){r=b(r,this.buffer);for(var e=0;e<t.length;++e)this.writeUInt8(t.charCodeAt(e),r+e)},inspect:function(){return"<StringBuffer "+function(){for(var t="",f=0;f<r.INSPECT_MAX_BYTES&&f<this.length;++f)t+=e(this.readUInt8(f).toString(16))+(f===r.INSPECT_MAX_BYTES-1||f===this.length-1?"":" ");return t}.call(this)+">"},get:function(t){return this.buffer.charCodeAt(t)}},Object.defineProperty(r.prototype,"length",{get:function(){return this.buffer.length}}),"undefined"!=typeof exports?"undefined"!=typeof module&&module.exports&&(exports=module.exports=r):t.StringBuffer=r}).call(this);<commit_msg>fixed negative indices<commit_after>(function(t){function r(t){if(!(this instanceof r))return new r(t);if(this.buffer="","string"==typeof t)this.write(t,0);else if(Array.isArray(t))for(var e=0;e<t.length;++e)this.writeUInt8(t[e],e);else r.isStringBuffer(t)&&(this.buffer=t.buffer)}function e(t){var r="";if(t.length<2)for(var e=t.length;2>e;++e)r+="0";return r+=t}function f(t){var r=(128&t[0])>>>7,e=((127&t[0])<<1)+((128&t[1])>>>7),f=0;for(t[1]&=127,i=0;i<=2;++i)f+=t[i+1]<<8*(2-i);return f|=8388608,h(r?-f:f,e-150)}function n(t){var r=(128&t[0])>>>7,e=((127&t[0])<<4)+((240&t[1])>>>4),f=0;for(t[1]&=15,i=0;i<=6;++i)f+=h(t[i+1],8*(6-i));return f+=4503599627370496,h(r?-f:f,e-1075)}function u(t,r){var e=[];if(r===l)return e.push(t),e;if(r===(c|l))return 0>t?u(s(-t,8),l):u(t,l);if(r===g)return e.push(t>>>8),e.push(255&t),e;if(r===(c|g))return 0>t?u(s(-t,16),g):u(t,g);if(r===d)return e.push(t>>>24&255),e.push(t>>>16&255),e.push(t>>>8&255),e.push(255&t),e;if(r===(c|d))return 0>t?u(s(-t,32),d):u(t,d);if(r===I){t=+t;var f,n,i=127,o=t;return f=0>o?1:0,o=Math.abs(o),n=Math.log(o)/Math.log(2),n=n>0?Math.floor(n):Math.ceil(n),o*=Math.pow(2,-n+23),i+=n,o=Math.round(o),o&=8388607,e.push(f<<7),e[0]+=(254&i)>>>1,e.push((1&i)<<7),e[1]+=o>>>16&127,e.push(o>>>8&255),e.push(255&o),e}if(r===v){t=+t;var f,n,i=1023,o=t;f=0>o?1:0,o=Math.abs(o),n=Math.log(o)/Math.log(2),n=n>0?Math.floor(n):Math.ceil(n),o*=Math.pow(2,-n+52),i+=n,o=Math.round(o),o=parseInt(o.toString(2).substr(1),2),e.push(f<<7),e[0]+=i>>>4,e.push((15&i)<<4),e[1]+=15&Math.floor(h(o,-48));for(var a=40,b=0;6>b;++b,a-=8)e.push(255&Math.floor(h(o,-a)));return e}}function h(t,r){var e=0;if(r>0)for(;r>e;)t*=2,e++;else for(r=-r;r>e;)t/=2,e++;return t}function s(t,r){return r>31||!r?~t:(t^o(r))+1}function o(t){return(1<<t)-1}function a(t,r,e){for(var f=t.length-1;f>=0&&r.apply(e,[t[f],f,t])!==!1;f--);}function b(t,r,e){return 0>t&&0===r.length?0:(-1===t?t=r.length-(e?1:0):0>t&&(t=r.length+(e?0:1)+t%(r.length+(e?0:1))),t)}var t=this,c=1,l=0,g=2,d=4,I=6,v=7;r.concat=function(t){return r(t.reduce(function(t,r){return t+r.buffer},""))},r.isStringBuffer=function(t){return t instanceof r},r.byteLength=function(t,r){r||(r="ascii");var e;switch(t+="",r){case"ascii":case"binary":case"raw":e=t.length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":e=2*t.length;break;case"hex":e=t.length>>>1;break;default:e=t.length}return e},r.INSPECT_MAX_BYTES=50,r.prototype={writeUInt8:function(t,r){return t=+t,r=b(r,this.buffer),r===this.buffer.length?this.buffer+=String.fromCharCode(t):this.buffer=this.buffer.substr(0,r)+String.fromCharCode(t)+this.buffer.substr(r+1),r+1},writeInt8:function(t,r){return t=+t,t=0>t?s(-t,8):t,r=b(r,this.buffer),r===this.buffer.length?this.buffer+=String.fromCharCode(t):this.buffer=this.buffer.substr(0,r)+String.fromCharCode(t)+this.buffer.substr(r+1),r+1},writeUInt16LE:function(t,r){t=+t;var e=u(t,g),f="";return a(e,function(t){f+=String.fromCharCode(t)}),r=b(r,this.buffer),r>=this.buffer.length||-1===r?this.buffer+=f:this.buffer=this.buffer.substr(0,r)+f+this.buffer.substr(r+2),r+2},writeUInt16BE:function(t,r){t=+t;var e=u(t,g),f="";return e.forEach(function(t){f+=String.fromCharCode(t)}),r=b(r,this.buffer),r>=this.buffer.length||-1===r?this.buffer+=f:this.buffer=this.buffer.substr(0,r)+f+this.buffer.substr(r+2),r+2},writeInt16LE:function(t,r){return t=+t,t=0>t?s(-t,16):t,0>r&&(r=this.buffer.length-(r+1)%this.buffer.length),this.writeUInt16LE(t,r)},writeInt16BE:function(t,r){return t=+t,t=0>t?s(-t,16):t,0>r&&(r=this.buffer.length-(r+1)%this.buffer.length),this.writeUInt16BE(t,r)},writeUInt32LE:function(t,r){t=+t;var e=u(t,d),f="";a(e,function(t){f+=String.fromCharCode(t)}),r=b(r,this.buffer),r===this.buffer.length||-1===r?this.buffer+=f:this.buffer=this.buffer.substr(0,r)+f+this.buffer.substr(r+4)},writeUInt32BE:function(t,r){t=+t;var e=u(t,d),f="";e.forEach(function(t){f+=String.fromCharCode(t)}),r=b(r,this.buffer),r===this.buffer.length||-1===r?this.buffer+=f:this.buffer=this.buffer.substr(0,r)+f+this.buffer.substr(r+4)},writeInt32LE:function(t,r){return t=+t,t=0>t?s(-t,32):t,this.writeUInt32LE(t,r)},writeInt32BE:function(t,r){return t=+t,t=0>t?s(-t,32):t,this.writeUInt32BE(t,r)},writeFloatLE:function(t,r){var e=u(t,I);r=b(r,this.buffer);for(var f=e.length-1;f>=0;--f)this.writeUInt8(e[f],r+(e.length-1-f));return r+4},writeFloatBE:function(t,r){var e=u(t,I);return r=b(r,this.buffer),e.forEach(function(t,e){this.writeUInt8(t,r+e)},this),r+4},writeDoubleLE:function(t,r){var e=u(t,v);for(r=b(r,this.buffer),i=e.length-1;i>=0;--i)this.writeUInt8(e[i],r+(e.length-1-i));return r+8},writeDoubleBE:function(t,r){var e=u(t,v);return r=b(r,this.buffer),e.forEach(function(t,e){this.writeUInt8(t,r+e)},this),r+8},readUInt8:function(t){return t=b(t,this.buffer,!0),this.buffer.charCodeAt(t)},readInt8:function(t){var r=this.buffer.charCodeAt(t);return 128&r?-s(r,8):r},readUInt16LE:function(t){return t=b(t,this.buffer,!0),this.buffer.charCodeAt(t)|this.buffer.charCodeAt(t+1)<<8},readUInt16BE:function(t){return t=b(t,this.buffer,!0),this.buffer.charCodeAt(t)<<8|this.buffer.charCodeAt(t+1)},readInt16LE:function(t){var r=this.readUInt16LE(t);return 32768&r?-s(r,16):r},readInt16BE:function(t){var r=this.readUInt16BE(t);return 32768&r?-s(r,16):r},readUInt32LE:function(t){return t=b(t,this.buffer,!0),0>t&&(t=this.buffer.length-(t+1)%this.buffer.length),this.buffer.charCodeAt(t)|this.buffer.charCodeAt(t+1)<<8|this.buffer.charCodeAt(t+2)<<16|this.buffer.charCodeAt(t+3)<<24},readUInt32BE:function(t){return t=b(t,this.buffer,!0),this.buffer.charCodeAt(t)<<24|this.buffer.charCodeAt(t+1)<<16|this.buffer.charCodeAt(t+2)<<8|this.buffer.charCodeAt(t+3)},readInt32LE:function(t){var r=this.readUInt32LE(t);return 2147483648&r?-s(r,32):r},readInt32BE:function(t){var r=this.readUInt32BE(t);return 2147483648&r?-s(r,32):r},readFloatLE:function(t){var r=[];t=b(t,this.buffer,!0);for(var e=0;4>e;++e)r.push(this.readUInt8(t+e));return r.reverse(),f(r)},readFloatBE:function(t){var r=[];t=b(t,this.buffer,!0);for(var e=0;4>e;++e)r.push(this.readUInt8(t+e));return f(r)},readDoubleLE:function(t){var r=[];t=b(t,this.buffer,!0);for(var e=0;8>e;++e)r.push(this.readUInt8(t+e));return r.reverse(),n(r)},readDoubleBE:function(t){var r=[];t=b(t,this.buffer,!0);for(var e=0;8>e;++e)r.push(this.readUInt8(t+e));return n(r)},fill:function(t,r,e){"string"==typeof t&&(t=t.charCodeAt(0)),r||(r=0),e||(e=this.length),r=b(r,this.buffer),e=b(e,this.buffer);for(var f="",n=r;e>n;++n)f+=String.fromCharCode(t);return this.buffer=this.buffer.substr(0,r)+f+this.buffer.substr(e),this},slice:function(t,e){t||(t=0),e||(e=this.length),t=b(t,this.buffer,!0),e=b(e,this.buffer,!0);var f=r();return f.buffer=this.buffer.substr(t,e-t),f},copy:function(t,r,e,f){return r||(r=0),e||(e=0),f||(f=this.length),0>r&&(r=this.buffer.length-(r+1)%this.buffer.length),e=b(e,this.buffer,!0),f=b(f,this.buffer,!0),r=b(r,this.buffer),0>e&&(e=this.buffer.length-(e+1)%this.buffer.length),0>f&&(f=this.buffer.length-(f+1)%this.buffer.length),t.buffer=t.buffer.substr(0,r)+this.buffer.substr(e,f-e)+t.buffer.substr(r+f-e),this},equals:function(t){return this.buffer===t.buffer},toJSON:function(){return JSON.stringify(this.buffer)},toString:function(){return this.buffer},write:function(t,r){r=b(r,this.buffer);for(var e=0;e<t.length;++e)this.writeUInt8(t.charCodeAt(e),r+e)},inspect:function(){return"<StringBuffer "+function(){for(var t="",f=0;f<r.INSPECT_MAX_BYTES&&f<this.length;++f)t+=e(this.readUInt8(f).toString(16))+(f===r.INSPECT_MAX_BYTES-1||f===this.length-1?"":" ");return t}.call(this)+">"},get:function(t){return this.buffer.charCodeAt(t)},clear:function(){return this.buffer="",this}},Object.defineProperty(r.prototype,"length",{get:function(){return this.buffer.length},set:function(t){if(t>this.buffer.length)for(var r=t;r<this.buffer.length;++r)this.buffer+="\x00";t<this.buffer.length&&(this.buffer=this.buffer.substr(0,t))}}),"undefined"!=typeof exports?"undefined"!=typeof module&&module.exports&&(exports=module.exports=r):t.StringBuffer=r}).call(this);
{'fraction_non_alphanumeric': 0.3065670517327976, 'fraction_numerical': 0.055813661476644905, 'mean_word_length': 16.485181119648736, 'pattern_counts': {'":': 18, '<': 85, '<?xml version=': 0, '>': 174, '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': '2090238', 'n_tokens_mistral': 7938, 'n_tokens_neox': 7643, 'n_words': 239}