<commit_before>#!/usr/bin/env node

var npm = require('npm');
var fs = require('fs');
var path = require('path');
var module = require('yargs').argv._[0];

npm.load({
	loaded: false
}, function (err) {
	// catch errors
	npm.commands.install([module], function (er, data) {

		var modulePath = process.cwd() + '/' + path.normalize('./node_modules/' + module);

		fs.exists(modulePath + '/bower.json', function(exists) {

			if (!exists) {
				console.error("module or bower file not found");
				return;
			}

			var bower = require(modulePath + '/bower.json');

			if (!bower.main) {
				console.error("main section not found in bower.json");
				return
			}

			if (typeof bower.main === "string") bower.main = [bower.main];

			bower.main.forEach(function (main) {
				var src = path.normalize(modulePath + '/' + main);
				var dst = process.cwd() + '/public/vendors/' + path.basename(main);
				fs.createReadStream(src).pipe(fs.createWriteStream(dst));
			});

		});

	});
});
<commit_msg>loglevel silent & help<commit_after>#!/usr/bin/env node

var npm = require('npm');
var fs = require('fs');
var path = require('path');
var module = require('yargs').argv._[0];

npm.load({
	loaded: false,
	loglevel: 'silent'
}, function (err) {

	npm.commands.install([module], function (er, data) {

		var modulePath = process.cwd() + '/' + path.normalize('./node_modules/' + module);

		fs.exists(modulePath + '/bower.json', function(exists) {

			if (!exists) {
				console.error("module or bower file not found");
				return;
			}

			var bower = require(modulePath + '/bower.json');

			if (!bower.main) {
				console.error("main section not found in bower.json");
				return
			}

			if (typeof bower.main === "string") bower.main = [bower.main];

			bower.main.forEach(function (main) {
				var src = path.normalize(modulePath + '/' + main);
				var dst = process.cwd() + '/public/vendors/' + path.basename(main);
				fs.createReadStream(src).pipe(fs.createWriteStream(dst));

				if (path.extname(main) === '.js') {
					console.log("\nCopy this\n" + '<script src="vendors/' + path.basename(main) + '"></script>' + "\n");
				}
				if (path.extname(main) === '.css') {
					console.log("\nCopy this\n" + '<link rel="stylesheet" href="vendors/' + path.basename(main) + '">' + "\n");
				}

			});

		});

	});
});

{'fraction_non_alphanumeric': 0.20198961937716264, 'fraction_numerical': 0.0008650519031141869, 'mean_word_length': 3.41412213740458, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '3881356', 'n_tokens_mistral': 924, 'n_tokens_neox': 792, 'n_words': 168}