<commit_before>var express = require("express");
var app = express();
var Parse = require('parse').Parse;
var fs = require('fs');
var async = require('async');
var CronJob = require('cron').CronJob;

var mandrill = require('mandrill-api/mandrill');
var mandrill_client = new mandrill.Mandrill('SHEcyBuLZHi6eUGzQCHTEA');

var APP_ID = "wPfUNl194r9U53Ag5VCSBsl6E7iEMLJTKUb6lFmg";
var JS_KEY = "<KEY>";

Parse.initialize(APP_ID, JS_KEY);

var BCard = Parse.Object.extend('BCard');
var query = new Parse.Query(BCard);
query.equalTo('send', false);

	query.find({
		success: function(cards) {
			async.each(cards, function (item, callback){
				var base64Data = item.get('dataimg').replace(/^data:image\/png;base64,/,"");
				var fon = item.get('fon');
				var id = item.id;
				var fonBase64 = '';

				var email = item.get('type');

				if( !validateEmail (email) ) return;

				var html = '';
				html += '<h1>Привіт!</h1>'
				html += '<p>Підкреслюй свій стиль за допомогою персональної візитки у додатку.<br/><br/>Приємного дня!</p>';

				var imageToEmail = {
					type: 'image/png',
					name: 'FRONT.png',
					content : base64Data
				};

				var message = {
					"html": html,
					"subject": "Твоя візитка готова!",
					"from_email": "<EMAIL>",
					"from_name": "Rothmans",
					"to": [],
					"attachments" : []
				};

				message.attachments.push(imageToEmail);
				message.to.push({"email" : email});

				if( !fon ){
					sendEmail ();
				}
				else{
					fs.readFile(fon, 'binary', function(err, fon){
						if( err ) return;
						fonBase64 = new Buffer(fon, 'binary').toString('base64');
						var fon = {
							type: 'image/png',
							name: 'BACK.png',
							content : fonBase64
						}
						message.attachments.push(fon);
						sendEmail();
					})<commit_msg>changes<commit_after>var express = require("express");
var app = express();
var Parse = require('parse').Parse;
var fs = require('fs');
var async = require('async');
var CronJob = require('cron').CronJob;

var mandrill = require('mandrill-api/mandrill');
var mandrill_client = new mandrill.Mandrill('SHEcyBuLZHi6eUGzQCHTEA');

var APP_ID = "wPfUNl194r9U53Ag5VCSBsl6E7iEMLJTKUb6lFmg";
var JS_KEY = "<KEY>";

Parse.initialize(APP_ID, JS_KEY);

var BCard = Parse.Object.extend('BCard');
var query = new Parse.Query(BCard);
query.equalTo('send', false);

	query.find({
		success: function(cards) {
			async.each(cards, function (item, callback){
				var base64Data = item.get('dataimg').replace(/^data:image\/png;base64,/,"");
				var fon = item.get('fon');
				var id = item.id;
				var fonBase64 = '';

				var email = item.get('type');

				if( !validateEmail (email) ) return;

				var html = '';
				html += '<h1>Привіт!</h1>'
				html += '<p>Підкреслюй свій стиль за допомогою персональної візитки у додатку.<br/><br/>Приємного дня!</p>';

				var imageToEmail = {
					type: 'image/png',
					name: 'FRONT.png',
					content : base64Data
				};

				var message = {
					"html": html,
					"subject": "Твоя візитка готова!",
					"from_email": "<EMAIL>",
					"from_name": "Rothmans",
					"to": [],
					"attachments" : []
				};

				message.attachments.push(imageToEmail);
				message.to.push({"email" : email});
				if( !fon ){
					sendEmail ();
				}
				else{
					fs.readFile(fon, 'binary', function(err, fon){
						if( err ) return;
						fonBase64 = new Buffer(fon, 'binary').toString('base64');
						var fon = {
							type: 'image/png',
							name: 'BACK.png',
							content : fonBase64
						}
						message.attachments.push(fon);
						sendEmail();
					})
{'fraction_non_alphanumeric': 0.17467003650659926, 'fraction_numerical': 0.015164279696714406, 'mean_word_length': 3.2304038004750595, 'pattern_counts': {'":': 10, '<': 19, '<?xml version=': 0, '>': 19, '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': '541052', 'n_tokens_mistral': 1644, 'n_tokens_neox': 1306, 'n_words': 264}