<commit_before>
var hostname = '3siysh.messaging.internetofthings.ibmcloud.com';
var clientId = 'd:3siysh:sparkcore:112233445566';
var password = '<PASSWORD>';
var userName = 'use-token-auth';
/*
var hostname = 'localhost';
var clientId = 'd:3siysh:sparkcore:112233445566';
var password = '<PASSWORD>';
var userName = 'use-token-auth';
*/


  var milleage=0;
  var client;
function run(){

  var mqtt    = require('mqtt');
  client  = mqtt.connect('mqtt://' + userName +':'+ password + '@' + hostname + '?clientId=' + clientId );

    setInterval(function(){
      if(milleage<49000)
      {
        milleage=milleage+500;
      }
      //console.log("publishing");

      var message = '{"d":{"v":"4","vin":"1234","lic":"BUS1","mf":76,"mb":73,"mt":' + milleage + ',"t":"-","tilt":"N"}}';
      client.publish('iot-2/evt/status/fmt/json', message);
      //console.log("published");
    },250);
<commit_msg>add local mode<commit_after>var localmode=false;
if(process.argv[2]=="--localMode")
{
  localmode=true;
}



var hostname = '3siysh.messaging.internetofthings.ibmcloud.com';
var clientId = 'd:3siysh:sparkcore:112233445566';
var password = '<PASSWORD>';
var userName = 'use-token-auth';
var port     = 1883;

if(localmode)
{
  console.log("Running with local MQTT broker");
  hostname = 'localhost';
  clientId = 'device';
  port = 11883;
  password = '';
  userName = '';
}
/*
var hostname = 'localhost';
var clientId = 'd:3siysh:sparkcore:112233445566';
var password = '<PASSWORD>';
var userName = 'use-token-auth';
*/


  var milleage=0;
  var client;
function run(){

  var mqtt    = require('mqtt');
  client  = mqtt.connect('mqtt://' + userName +':'+ password + '@' + hostname + ':' + port + '?clientId=' + clientId );

    setInterval(function(){
      if(milleage<49000)
      {
        milleage=milleage+500;
      }
      //console.log("publishing");

      var message = '{"d":{"v":"4","vin":"1234","lic":"BUS1","mf":76,"mb":73,"mt":' + milleage + ',"t":"-","tilt":"N"}}';
      client.publish('iot-2/evt/status/fmt/json', message);
      //console.log("published");
    },250);

{'fraction_non_alphanumeric': 0.21278625954198474, 'fraction_numerical': 0.05248091603053435, 'mean_word_length': 3.9341176470588235, 'pattern_counts': {'":': 18, '<': 9, '<?xml version=': 0, '>': 7, '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': '709089', 'n_tokens_mistral': 849, 'n_tokens_neox': 768, 'n_words': 131}