<commit_before>/**
 * Created on 6/9/2014.
 *
 * STREAMS
 * Enable data to be processed piece-by-piece, especially for those data that are big.
 * Streams can be readable, writeable or both.
 *
 * Example of streams: Http request & response, File I/O
 *
 * REF:
 *      https://www.youtube.com/watch?v=9Ui3DaNO7lE
 */

var http = require('http');
var fs = require('fs');

run();

function run() {
    var argv = process.argv[2].toLowerCase();
    console.log('argv[2] = ' + argv);

    switch (argv) {
        case 'file_pipe' :
            fileStreamingWithPipe();
            break;
        case 'http_stream' :
            httpStreaming();
            break;
        case 'http_pipe' :
            httpStreamingWithPipe();<commit_msg>Add another reference<commit_after>/**
 * Created on 6/9/2014.
 *
 * STREAMS
 * Enable data to be processed piece-by-piece, especially for those data that are big.
 * Streams can be readable, writeable or both.
 *
 * Example of streams: Http request & response, File I/O
 *
 * REF:
 *      https://www.youtube.com/watch?v=9Ui3DaNO7lE
 *      http://ejohn.org/blog/node-js-stream-playground/
 */

var http = require('http');
var fs = require('fs');

run();

function run() {
    var argv = process.argv[2].toLowerCase();
    console.log('argv[2] = ' + argv);

    switch (argv) {
        case 'file_pipe' :
            fileStreamingWithPipe();
            break;
        case 'http_stream' :
            httpStreaming();
            break;
        case 'http_pipe' :
            httpStreamingWithPipe();
{'fraction_non_alphanumeric': 0.13580246913580246, 'fraction_numerical': 0.014294996751137101, 'mean_word_length': 2.3771929824561404, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '480725', 'n_tokens_mistral': 496, 'n_tokens_neox': 487, 'n_words': 126}