<commit_before>require('dotenv').config();
const dash_button = require('node-dash-button');
const dash = dash_button(process.env.DASH_MAC, null, 1000, 'all');
const fs = require('fs');
const request = require('request');
const secureCamUrl = process.env.CAM_URL;
const AWS = require('aws-sdk');
const bucketName = process.env.BUCKET_NAME;
const ifttt_url = process.env.IFTTT_URL;
const moment = require('moment');
const path = require('path');

AWS.config.loadFromPath(path.resolve(__dirname, 'aws-credentials.json'));

const s3 = new AWS.S3({signatureVersion: 'v4'});
var s3Bucket = new AWS.S3({ params: { Bucket: bucketName } })

function download(uri, file) {
	return new Promise(function (resolve, reject) {
		request.head(uri, function (err, res, body) {
			if (err) {
				reject(err)
			} else {
				request(uri).pipe(fs.createWriteStream(path.resolve(__dirname, file))).on('close', async () => {
					let tmpFile = await readFileAsync(path.resolve(__dirname, file));
					resolve(tmpFile);
				})<commit_msg>using full path on environment variables<commit_after>const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '.env') });
const dash_button = require('node-dash-button');
const dash = dash_button(process.env.DASH_MAC, null, 1000, 'all');
const fs = require('fs');
const request = require('request');
const secureCamUrl = process.env.CAM_URL;
const AWS = require('aws-sdk');
const bucketName = process.env.BUCKET_NAME;
const ifttt_url = process.env.IFTTT_URL;
const moment = require('moment');

AWS.config.loadFromPath(path.resolve(__dirname, 'aws-credentials.json'));

const s3 = new AWS.S3({signatureVersion: 'v4'});
var s3Bucket = new AWS.S3({ params: { Bucket: bucketName } })

function download(uri, file) {
	return new Promise(function (resolve, reject) {
		request.head(uri, function (err, res, body) {
			if (err) {
				reject(err)
			} else {
				request(uri).pipe(fs.createWriteStream(path.resolve(__dirname, file))).on('close', async () => {
					let tmpFile = await readFileAsync(path.resolve(__dirname, file));
					resolve(tmpFile);
				})
{'fraction_non_alphanumeric': 0.16205910390848427, 'fraction_numerical': 0.008579599618684462, 'mean_word_length': 5.399390243902439, 'pattern_counts': {'":': 0, '<': 3, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1125688', 'n_tokens_mistral': 720, 'n_tokens_neox': 669, 'n_words': 156}