<commit_before>var stream     = require('stream');
var util       = require('util');
var fs         = require('fs');
var os         = require('os');
var path       = require('path');
var moment     = require('moment');
var CRLF       = "\r\n";
var MIMECHUNK  = 76; // MIME standard wants 76 char chunks when sending out.
var BASE64CHUNK= 24; // BASE64 bits needed before padding is used
var MIME64CHUNK= MIMECHUNK * 6; // meets both base64 and mime divisibility
var BUFFERSIZE = MIMECHUNK*24*7; // size of the message stream buffer
var counter    = 0;

// support for nodejs without Buffer.concat native function
if(!Buffer.concat)
{
   require("bufferjs/concat");
}

var generate_boundary = function()
{
   var text       = "";
   var possible    = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'()+_,-./:=?";

   for(var i=0; i < 69; i++)
      text += possible.charAt(Math.floor(Math.random() * possible.length));

   return text;
};

var Message = function(headers)
{
   this.attachments  = [];
   this.alternative  = null;
   var now = new Date();
   this.header       = {
      "message-id":"<" + now.getTime() + "." + (counter++) + "." + process.pid + "@" + os.hostname() +">",
      "date":moment().format("ddd, DD MMM YYYY HH:mm:ss ZZ")
   };
   this.content      = "text/plain; charset=utf-8";

   for(var header in headers)
   {<commit_msg>Fix date format in header for time zones with offset in minutes as well as hours<commit_after>var stream     = require('stream');
var util       = require('util');
var fs         = require('fs');
var os         = require('os');
var path       = require('path');
var moment     = require('moment');
var CRLF       = "\r\n";
var MIMECHUNK  = 76; // MIME standard wants 76 char chunks when sending out.
var BASE64CHUNK= 24; // BASE64 bits needed before padding is used
var MIME64CHUNK= MIMECHUNK * 6; // meets both base64 and mime divisibility
var BUFFERSIZE = MIMECHUNK*24*7; // size of the message stream buffer
var counter    = 0;

// support for nodejs without Buffer.concat native function
if(!Buffer.concat)
{
   require("bufferjs/concat");
}

var generate_boundary = function()
{
   var text       = "";
   var possible    = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'()+_,-./:=?";

   for(var i=0; i < 69; i++)
      text += possible.charAt(Math.floor(Math.random() * possible.length));

   return text;
};

var Message = function(headers)
{
   this.attachments  = [];
   this.alternative  = null;
   var now = new Date();
   this.header       = {
      "message-id":"<" + now.getTime() + "." + (counter++) + "." + process.pid + "@" + os.hostname() +">",
      "date":moment().format("ddd, DD MMM YYYY HH:mm:ss ") + moment().format("Z").replace(/:/, '')
   };
   this.content      = "text/plain; charset=utf-8";

   for(var header in headers)
   {
{'fraction_non_alphanumeric': 0.1573389651531151, 'fraction_numerical': 0.023231256599788808, 'mean_word_length': 3.0892086330935253, 'pattern_counts': {'":': 4, '<': 7, '<?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': '1252136', 'n_tokens_mistral': 1000, 'n_tokens_neox': 939, 'n_words': 257}