<commit_before>Create MozDef Index
===================

Edit 'mozdef_index_setup.sh' and...

.. code::

        $ ./mozdef_index_setup.sh

Get oauth2 credentials
======================

See http://gspread.readthedocs.org/en/latest/oauth2.html for a guided version of this.

As your user, login to https://console.developers.google.com/project/ and create a new project.
Go to "API&Auth/APIs".
Give that project API rights for the Drive API.
Go to "API&Auth/Credentials".
Click "Create client ID" as "Service ID".
You'll get a JSON key back (JWT), that's your credentials.


.. note::

	Make sure you authorize your Service email to all the spreadsheets you'll want to have access to! By default it
has no accesses.<commit_msg>Update documentation to setup mozdef<commit_after>Setup MozDef
============

Create the index
----------------

Edit 'mozdef_index_setup.sh' and...

.. code::

        $ ./mozdef_index_setup.sh

Add the plugin
--------------

Ensure your MozDef has the RRA plugin: https://github.com/jeffbryner/MozDef/blob/master/mq/plugins/rra.py

Get oauth2 credentials
======================

See http://gspread.readthedocs.org/en/latest/oauth2.html for a guided version of this.

As your user, login to https://console.developers.google.com/project/ and create a new project.
Go to "API&Auth/APIs".
Give that project API rights for the Drive API.
Go to "API&Auth/Credentials".
Click "Create client ID" as "Service ID".
You'll get a JSON key back (JWT), that's your credentials.


.. note::

	Make sure you authorize your Service email to all the spreadsheets you'll want to have access to! By default it
has no accesses.
{'fraction_non_alphanumeric': 0.15299877600979192, 'fraction_numerical': 0.0024479804161566705, 'mean_word_length': 3.6448863636363638, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7000468', 'n_tokens_mistral': 507, 'n_tokens_neox': 484, 'n_words': 188}