<commit_before>* UNIS
UNIS and the MS (also included in this codebase) are a part of the
Periscope measurement framework which also includes BLiPP. You can
find more information about all these components [[https://github.com/GENI-GEMINI/GEMINI/wiki][here]].

** Installation
*** For Debian, but should adapt to any linux flavor
First, you'll need a few basic things
#+BEGIN_SRC
$ sudo apt-get install python-setuptools python-dev
#+END_SRC

UNIS and the MS use MongoDB as their backend data store. Install it
and start it in whatever way you like.
#+BEGIN_SRC
$ sudo apt-get install mongodb
#+END_SRC

You might also need swig
#+BEGIN_SRC
$ sudo apt-get install swig
#+END_SRC

Now run the setup script in top level of the repository. You can use
=--prefix= or =--install-dir= to install it somewhere other than the
default location. The default usually requires using sudo.
#+BEGIN_SRC
$ python setup.py install
#+END_SRC

You can attempt to run it
#+BEGIN_SRC
$ periscoped
#+END_SRC

or to run it straight from the repository
#+BEGIN_SRC
$ python periscope/app.py
#+END_SRC

Either of which will start it running on port 8888.

You may encounter problems related to AUTH or GEMINI specific files, I'll try to cover these.

*** For Redhat, create RPM...
#+BEGIN_SRC
python setup.py bdist_rpm --requires python,python-setuptools,python-httplib2,python-mock,python-tornado,python-unittest2,\
validictory,asyncmongo,jsonpath,jsonpointer,mongodb-server,m2crypto --release 4
#+END_SRC

*** m2crypto issue
If you see something like
#+BEGIN_SRC
ImportError: /usr/local/lib/python2.7/dist-packages/M2Crypto-0.21.1-py2.7-linux-x86_64.egg/M2Crypto/__m2crypto.so: undefined symbol: SSLv2_method
#+END_SRC

You're probably running Ubuntu - try installing python-m2crypto from apt-get.
#+BEGIN_SRC<commit_msg>Added missing dependencies for rpm build<commit_after>* UNIS
UNIS and the MS (also included in this codebase) are a part of the
Periscope measurement framework which also includes BLiPP. You can
find more information about all these components [[https://github.com/GENI-GEMINI/GEMINI/wiki][here]].

** Installation
*** For Debian, but should adapt to any linux flavor
First, you'll need a few basic things
#+BEGIN_SRC
$ sudo apt-get install python-setuptools python-dev
#+END_SRC

UNIS and the MS use MongoDB as their backend data store. Install it
and start it in whatever way you like.
#+BEGIN_SRC
$ sudo apt-get install mongodb
#+END_SRC

You might also need swig
#+BEGIN_SRC
$ sudo apt-get install swig
#+END_SRC

Now run the setup script in top level of the repository. You can use
=--prefix= or =--install-dir= to install it somewhere other than the
default location. The default usually requires using sudo.
#+BEGIN_SRC
$ python setup.py install
#+END_SRC

You can attempt to run it
#+BEGIN_SRC
$ periscoped
#+END_SRC

or to run it straight from the repository
#+BEGIN_SRC
$ python periscope/app.py
#+END_SRC

Either of which will start it running on port 8888.

You may encounter problems related to AUTH or GEMINI specific files, I'll try to cover these.

*** For Redhat, create RPM...
#+BEGIN_SRC
python setup.py bdist_rpm --requires python,python-setuptools,python-httplib2,python-mock,python-tornado,python-unittest2,\
validictory,asyncmongo,jsonpath,jsonpointer,mongodb-server,m2crypto,python-argparse,pymongo --release 4
#+END_SRC

*** m2crypto issue
If you see something like
#+BEGIN_SRC
ImportError: /usr/local/lib/python2.7/dist-packages/M2Crypto-0.21.1-py2.7-linux-x86_64.egg/M2Crypto/__m2crypto.so: undefined symbol: SSLv2_method
#+END_SRC

You're probably running Ubuntu - try installing python-m2crypto from apt-get.
#+BEGIN_SRC
{'fraction_non_alphanumeric': 0.08637236084452975, 'fraction_numerical': 0.014258294488620784, 'mean_word_length': 4.9124797406807135, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1289683', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1172, 'n_words': 438}