<commit_before>SCenter analytics
================
Analytics application which doesn't part of the cluster from [Sport Center](https://github.com/haghard/sport-center) but allows run Spark jobs using Cassandra as a source of data

Run in local mode from sbt
=================

`sbt lanalytics`


Get docker image
=================

`docker pull haghard/scenter-analytics:v0.1`


Run docker image in interactive mode
================

`docker run --net="host" -it haghard/scenter-analytics:v0.1 --HTTP_PORT=8001 --DB_HOSTS=192.168.0.xxx` 


By default server will bind on "eth0" enterface. If you need to change it should pass additional parameter --NET_INTERFACE

`docker run --net="host" -it haghard/scenter-analytics:v0.1 --HTTP_PORT=8001 --DB_HOSTS=192.168.0.xxx --NET_INTERFACE=en0`


Example routes
===============

http GET [host]:[port]/api/login?"login=...&password=..."

http GET [host]:[port]/api/standing/playoff-14-15?teams=cle,okc 'Cookie:_sessiondata=...'

http GET [host]:[port]/api/teams/season-15-16?teams=cle,okc 'Cookie:_sessiondata=...'

http GET [host]:[port]/api/player/stats?"name=<NAME>&period=season-15-16&team=gsw"

http GET [host]:[port]/api/leaders/pts/season-14-15?teams=cle,okc 'Cookie:_sessiondata=...' 

http GET [host]:[port]/api/leaders/reb/season-15-16?teams=cle,okc 'Cookie:_sessiondata=...'<commit_msg>Fix readme<commit_after>SCenter analytics
================
Analytics application which doesn't part of the cluster from [Sport Center](https://github.com/haghard/sport-center) but allows run Spark jobs using Cassandra as a source of data

Run in local mode from sbt
=================

`sbt lanalytics`


Get docker image
=================

`docker pull haghard/scenter-analytics-spark:v0.1`


Run docker image in interactive mode
================

`docker run --net="host" -it haghard/scenter-analytics-spark:v0.1 --HTTP_PORT=8001 --DB_HOSTS=192.168.0.xxx` 


By default server is going to bind on "eth0" enterface. If you need to change it you should pass additional parameter --NET_INTERFACE

`docker run --net="host" -it haghard/scenter-analytics-spark:v0.1 --HTTP_PORT=8001 --DB_HOSTS=192.168.0.xxx --NET_INTERFACE=en0`


Example routes
===============

http GET [host]:[port]/api/login?"login=...&password=..."

http GET [host]:[port]/api/standing/playoff-14-15?teams=cle,okc 'Cookie:_sessiondata=...'

http GET [host]:[port]/api/teams/season-15-16?teams=cle,okc 'Cookie:_sessiondata=...'

http GET [host]:[port]/api/player/stats?"name=<NAME>&period=season-15-16&team=gsw"

http GET [host]:[port]/api/leaders/pts/season-14-15?teams=cle,okc 'Cookie:_sessiondata=...' 

http GET [host]:[port]/api/leaders/reb/season-15-16?teams=cle,okc 'Cookie:_sessiondata=...'
{'fraction_non_alphanumeric': 0.20466321243523317, 'fraction_numerical': 0.037009622501850484, 'mean_word_length': 5.171232876712328, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '994940', 'n_tokens_mistral': 995, 'n_tokens_neox': 913, 'n_words': 209}