<commit_before>Beers and Breweries application using node.
-------------------------------------------

This is a sample web application written with the node.js and couchnode 
library.

We are using couchnode library for accessing couchbase database. Installing
couchnode is not straight forward as it uses libcouchbase_ and a C++ binding to
libcouchbase. Refer to couchnode_ project for installation instructions.

Make sure that you connect with a valid couchbase server and have the
``beer-sample`` bucket installed.  `s3counts_designs.js` sets up view design docs
used by this application. To setup the additional design documents,

.. code-block:: bash

    node beer.js --setup     // --setup switch will setup the design document.

Following is the gist of what the map function does with `beer` documents,

``beer/by_name``::

    function(doc, meta) {
        if (doc.type && doc.type == "beer") {
            emit(doc.name, null);
        }
    }

Following is the gist of what the map function does with `brewery` documents,

``brewery/by_name``::

    function(doc, meta) {
        if (doc.type && doc.type == "brewery") {
            emit(doc.name, null);
        }
    }


To run the webapp, simply do::

    node beer.js

And connect to ``localhost:1337``

.. _npm: https://npmjs.org/
.. _libcouchbase: https://github.com/couchbase/libcouchbase
.. _couchnode: https://github.com/couchbase/couchnode<commit_msg>Replaced README with something better and added creds info.<commit_after>An S3 Log Change Detector
-------------------------------------------

This app will graph the number of requests for a full object (in this case,
to determine the number of full downloads) based on S3 log files imported
into a Couchbase bucket and looking at S3 to find the object size itself.

Dependencies
------------

A Couchbase cluster with two buckets, one cache and one for the data.

A connection to an S3 bucket with log data.

Credentials required to make this app run
-----------------------------------------

AWS creds for S3 in ~/.aws/config

Bucket connection info in `config/default.yaml`, see the example.

{'fraction_non_alphanumeric': 0.1384180790960452, 'fraction_numerical': 0.004708097928436911, 'mean_word_length': 2.6324786324786325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4682535', 'n_tokens_mistral': 591, 'n_tokens_neox': 569, 'n_words': 255}