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

var cob = require('../'),
    fs = require('fs'),
    path = require('path'),
    nopt = require('nopt'),
    noptions = {
      help: Boolean,
      version: Boolean,
      get: Array,
      set: Array,
      input: String,
      output: String
    },
    shorts = {
      g: ['--get'],
      s: ['--set'],
      i: ['--input'],
      f: ['--input'],
      o: ['--output'],
      h: ['--help'],
      v: ['--version']
    },
    options = nopt(noptions, shorts, process.argv),
    input_stream,
    output_stream,
    cob_stream

if (options.help) return help()
if (options.version) return version()

if (!options.input) {
  input_stream = process.stdin
} else {
  input_stream = fs.createReadStream(options.input)
}

if (!options.output) {
  output_stream = process.stdout
} else {
  output_stream = fs.createWriteStream(options.output)
}

if (!options.set && !options.get) {
  cob_stream = cob()
} else if (options.set) {
  var to_set = {}
  for (var i = 0, l = options.set.length; i < l; ++i) {<commit_msg>extra args are gets<commit_after>#!/usr/bin/env node

var cob = require('../'),
    fs = require('fs'),
    path = require('path'),
    nopt = require('nopt'),
    noptions = {
      help: Boolean,
      version: Boolean,
      get: Array,
      set: Array,
      input: String,
      output: String
    },
    shorts = {
      g: ['--get'],
      s: ['--set'],
      i: ['--input'],
      f: ['--input'],
      o: ['--output'],
      h: ['--help'],
      v: ['--version']
    },
    options = nopt(noptions, shorts, process.argv),
    input_stream,
    output_stream,
    cob_stream

if (options.help) return help()
if (options.version) return version()

if (options.argv.remain.length) {
  options.get = (options.get || []).concat(options.argv.remain)
}

if (!options.input) {
  input_stream = process.stdin
} else {
  input_stream = fs.createReadStream(options.input)
}

if (!options.output) {
  output_stream = process.stdout
} else {
  output_stream = fs.createWriteStream(options.output)
}

if (!options.set && !options.get) {
  cob_stream = cob()
} else if (options.set) {
  var to_set = {}
  for (var i = 0, l = options.set.length; i < l; ++i) {
{'fraction_non_alphanumeric': 0.18326512050932242, 'fraction_numerical': 0.0009095043201455207, 'mean_word_length': 2.559870550161812, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4059378', 'n_tokens_mistral': 764, 'n_tokens_neox': 765, 'n_words': 182}