<commit_before>"use strict";

var GPS = require('./NMEAReader.js').NMEA;
var gps = new GPS('/dev/ttyUSB0', 4800);
// var gps = new GPS();

gps.onPosition = function(pos) {
  console.log("Position:", pos);
};
gps.onTime = function(epoch) {
  console.log("Time: " + new Date(epoch));
};

var exit = function() {
  gps.exit();
};

process.on('SIGINT', exit); // Ctrl C<commit_msg>nput from the node console (testGPS)<commit_after>"use strict";

console.log('To stop: Ctrl-C, or enter "quit" + [return]');

var util = require('util');
var GPS = require('./NMEAReader.js').NMEA;
var gps = new GPS('/dev/ttyUSB0', 4800);
// var gps = new GPS();

gps.onPosition = function(pos) {
  console.log("Position:", pos);
};
gps.onTime = function(epoch) {
  console.log("Time: " + new Date(epoch));
};

var exit = function() {
  gps.exit();
  process.stdin.pause();
};

process.on('SIGINT', exit); // Ctrl C
process.stdin.resume();
process.stdin.setEncoding('utf8');

process.stdin.on('data', function (text) {
//console.log('received data:', util.inspect(text));
  if (text.startsWith('quit')) {
    done();
  }
});

function done() {
  console.log("Bye now!");
  exit();
  process.exit();
};
{'fraction_non_alphanumeric': 0.22005097706032287, 'fraction_numerical': 0.009345794392523364, 'mean_word_length': 4.306306306306307, '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': '7673972', 'n_tokens_mistral': 447, 'n_tokens_neox': 438, 'n_words': 94}