<commit_before>'use strict';

var pty = require('pty.js');

module.exports = function(grunt){

    grunt.registerTask('ec2_list', function(){
        var done = this.async();
        var cli = pty.spawn('aws', [
            'ec2', 'describe-instances',
            '--filters', 'Name=instance-state-name,Values=' + name
        ], { env: conf() });

        grunt.log.writeln('Getting EC2 instance list...');

        cli.on('data', function(data){
            grunt.log.writeln(data);
        });

        cli.on('error', function(err){
            grunt.fatal(err);
        });

        cli.on('end', done);
    });
};
<commit_msg>filter ec2_list by instance status<commit_after>'use strict';

var pty = require('pty.js');

module.exports = function(grunt){

    grunt.registerTask('ec2_list', function(state){
        var done = this.async();
        var cli = pty.spawn('aws', [
            'ec2', 'describe-instances',
            '--filters', 'Name=instance-state-name,Values=' + ( state || 'running')
        ], { env: conf() });

        grunt.log.writeln('Getting EC2 instance list...');

        cli.on('data', function(data){
            grunt.log.writeln(data);
        });

        cli.on('error', function(err){
            grunt.fatal(err);
        });

        cli.on('end', done);
    });
};

{'fraction_non_alphanumeric': 0.18792971734148206, 'fraction_numerical': 0.0053475935828877, 'mean_word_length': 2.1642512077294684, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5866454', 'n_tokens_mistral': 431, 'n_tokens_neox': 410, 'n_words': 73}