<commit_before>tokamak
=======

data fusion simulation with continuous model validation

Framework for data fusion to provide continuous prediction 
and validation of a composite model.

## Installation ##

### Generators ###

http://webapplog.com/tutorial-node-js-and-mongodb-json-rest-api-server-with-mongoskin-and-express-js/

Ubuntu 13.10:

    $ sudo apt-get update
    $ sudo apt-get upgrade
    $ sudo apt-get install nodejs nodejs-dev npm mongodb
    $ cd generators
    $ npm install
    $ npm test

    # npm install superagent
    # npm install expectjs
    # npm install express
    # npm install mongoskin
    # npm install mocha

    # Add rest = true and bind_ip = 0.0.0.0 to your mongodb conf.
    $ sudo nano -w /etc/mongodb.conf
    $ sudo /etc/init.d/mongodb restart

### Running Generators ###

Server:

	$ cd generators/sensor
    $ node sensor.js

Client: 

	$ cd generators/sensor
    $ node sensor_pool.js
    ...

Client refresh cycle:

    $ watch -n 5 --exec node sensor_pool.js

Tests:

    $ ./node_modules/mocha/bin/mocha tokamak.test.js 
<commit_msg>Minor revision for running sensor generator test.<commit_after>tokamak
=======

data fusion simulation with continuous model validation

Framework for data fusion to provide continuous prediction 
and validation of a composite model.

## Installation ##

### Generators ###

http://webapplog.com/tutorial-node-js-and-mongodb-json-rest-api-server-with-mongoskin-and-express-js/

Ubuntu 13.10:

    $ sudo apt-get update
    $ sudo apt-get upgrade
    $ sudo apt-get install nodejs nodejs-dev npm mongodb
    $ cd generators
    $ npm install
    $ npm test

    # npm install superagent
    # npm install expectjs
    # npm install express
    # npm install mongoskin
    # npm install mocha

    # Add rest = true and bind_ip = 0.0.0.0 to your mongodb conf.
    $ sudo nano -w /etc/mongodb.conf
    $ sudo /etc/init.d/mongodb restart

### Running Generators ###

Server:

	$ cd generators/sensor
    $ node sensor.js

Client: 

	$ cd generators/sensor
    $ node sensor_pool.js
    ...

Client refresh cycle:

    $ watch -n 5 --exec node sensor_pool.js

Tests:

    $ ./node_modules/mocha/bin/mocha sensor.test.js 

{'fraction_non_alphanumeric': 0.09877105143377332, 'fraction_numerical': 0.008192990441511151, 'mean_word_length': 2.8027681660899653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '436457', 'n_tokens_mistral': 762, 'n_tokens_neox': 678, 'n_words': 210}