<commit_before>//Javascript Requires
var express = require('express');
var app = express();
var bodyParser = require('body-parser');
var tropowebapi = require('tropo-webapi');
var request = require('request');
var multer  = require('multer')
var upload = multer({ dest: 'uploads/' })
var fs = require('fs');
var fsAccess = require('fs-access');
var xlsx = require('node-xlsx');

app.use(bodyParser.json())

//placedCalls tracks Tropo session ID's with DID's dialed
var placedCalls = {}

//Spark Public Integrations Hook Room URL - get from Web Spark Client Integrations Tab
var sparkHook = null

//timer object used to clear timeout
var timerknock = null

//Tropo Call App Token to trigger Tropo Voice Web-API Script
var tropoToken = '<PASSWORD>'

//Express Engine to accept XLSX file
app.post('/dataformupload', upload.single('file'), function (req, res, next) {

  	//console.log(req.body) - Contains form parameters - may be useful for getting Spark Hook URL 
  	console.log(req.body)
  	if (req.body.sparkHookURL != null) {
  		sparkHook = req.body.sparkHookURL
  		console.log(sparkHook)
  		fs.writeFileSync('uploads/sparkHookURL.txt',sparkHook)
  	}
	var tmp_path = req.file.path;
	var target_path = 'uploads/numbersToValidate.xlsx';
	var src = fs.createReadStream(tmp_path);
  	var dest = fs.createWriteStream(target_path);
  	src.pipe(dest);
  	src.on('end', function() {<commit_msg>Update formatting<commit_after>//Javascript Requires
var express = require('express');
var app = express();
var bodyParser = require('body-parser');
var tropowebapi = require('tropo-webapi');
var request = require('request');
var multer  = require('multer')
var upload = multer({ dest: 'uploads/' })
var fs = require('fs');
var fsAccess = require('fs-access');
var xlsx = require('node-xlsx');

app.use(bodyParser.json())

//Tropo Call App Token to trigger Tropo Voice Web-API Script
//EDIT THIS LINE HERE
var tropoToken = '<PASSWORD>'



//placedCalls tracks Tropo session ID's with DID's dialed
var placedCalls = {}

//Spark Public Integrations Hook Room URL - get from Web Spark Client Integrations Tab
var sparkHook = null

//timer object used to clear timeout
var timerknock = null

//Express Engine to accept XLSX file
app.post('/dataformupload', upload.single('file'), function (req, res, next) {

  	//console.log(req.body) - Contains form parameters - may be useful for getting Spark Hook URL 
  	console.log(req.body)
  	if (req.body.sparkHookURL != null) {
  		sparkHook = req.body.sparkHookURL
  		console.log(sparkHook)
  		fs.writeFileSync('uploads/sparkHookURL.txt',sparkHook)
  	}
	var tmp_path = req.file.path;
	var target_path = 'uploads/numbersToValidate.xlsx';
	var src = fs.createReadStream(tmp_path);
  	var dest = fs.createWriteStream(target_path);
  	src.pipe(dest);
  	src.on('end', function() {
{'fraction_non_alphanumeric': 0.1301564722617354, 'fraction_numerical': 0.0, 'mean_word_length': 4.494140625, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2600307', 'n_tokens_mistral': 945, 'n_tokens_neox': 901, 'n_words': 265}