<commit_before>﻿var throttle = require('./utility/throttle');

const destination = __dirname + '/temp/';
const videoLink = 'http://istr.izlesene.com/data/videos/9645/9645256-480_3-170k.mp4?token=<PASSWORD>&ts=1<PASSWORD>';
const fileLink = 'http://download2.dvdloc8.com/trailers/divxdigest/bourne_ultimatum_trailer.zip';
const imageLink = 'http://www.w3schools.com/css/trolltunga.jpg';

function options(bps, chunkSize, highWaterMark) {
    return {
        bps: bps,
        chunkSize: chunkSize,
        highWaterMark: highWaterMark
    }
}

// 1 Mbit == 0.125 Mbyte == 125 000 byte
// limit or options
throttle.download(125000 * 5, videoLink, destination, 3000, function (err) {
    if (!err) {
        console.log('Download complete');
    } else {
        console.error(err);
    }<commit_msg>change to arrow func<commit_after>﻿var throttle = require('./utility/throttle');

const destination = __dirname + '/temp/';
const videoLink = 'http://istr.izlesene.com/data/videos/9645/9645256-480_3-170k.mp4?token=<PASSWORD>&ts=1<PASSWORD>796';
const fileLink = 'http://download2.dvdloc8.com/trailers/divxdigest/bourne_ultimatum_trailer.zip';
const imageLink = 'http://www.w3schools.com/css/trolltunga.jpg';

function options(bps, chunkSize, highWaterMark) {
    return {
        bps: bps,
        chunkSize: chunkSize,
        highWaterMark: highWaterMark
    }
}

// 1 Mbit == 0.125 Mbyte == 125 000 byte
// limit or options
throttle.download(125000 * 5, videoLink, destination, 3000, (err) => {
    if (!err) {
        console.log('Download complete');
    } else {
        console.error(err);
    }
{'fraction_non_alphanumeric': 0.14875, 'fraction_numerical': 0.058125, 'mean_word_length': 3.6271676300578033, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5414199', 'n_tokens_mistral': 626, 'n_tokens_neox': 550, 'n_words': 102}