<commit_before>Douban CODE
===========

* Website: <http://douban-code.github.io>
* Guide: <http://douban-code.github.io/pages/getting-started.html>

Dependency
----------
- Python 2.7+
- pip >= 1.4.1

Prepare
-------
- mysql # default port

```
# import code/databases/schema.sql to database `valentine`
$ mysql -uroot -e 'create database valentine;'
$ mysql -uroot -D valentine < code/databases/schema.sql
```

- memcached # default port

- customize code config
```
# after clone code repo you can change the default config by:
$ touch CODE_REPO/code/local_config.py
# overwrite configs defined in code/config.py.
$ vim CODE_REPO/code/local_config.py
```

Getting started
---------------

```
git clone https://github.com/douban/code.git
cd code
mysql -uroot -e 'create database valentine;'
mysql -uroot -D valentine < code/databases/schema.sql
virtualenv venv
. venv/bin/activate
pip install cython  # should install first
pip install -U setuptools  # python-libmemcached require updated setuptools<commit_msg>Modify README for correct sql path<commit_after>Douban CODE
===========

* Website: <http://douban-code.github.io>
* Guide: <http://douban-code.github.io/pages/getting-started.html>

Dependency
----------
- Python 2.7+
- pip >= 1.4.1

Prepare
-------
- mysql # default port

```
# import code/databases/schema.sql to database `valentine`
$ mysql -uroot -e 'create database valentine;'
$ mysql -uroot -D valentine < vilya/databases/schema.sql
```

- memcached # default port

- customize code config
```
# after clone code repo you can change the default config by:
$ touch CODE_REPO/code/local_config.py
# overwrite configs defined in code/config.py.
$ vim CODE_REPO/code/local_config.py
```

Getting started
---------------

```
git clone https://github.com/douban/code.git
cd code
mysql -uroot -e 'create database valentine;'
mysql -uroot -D valentine < vilya/databases/schema.sql
virtualenv venv
. venv/bin/activate
pip install cython  # should install first
pip install -U setuptools  # python-libmemcached require updated setuptools
{'fraction_non_alphanumeric': 0.15212091662603608, 'fraction_numerical': 0.0048756704046806435, 'mean_word_length': 3.5398230088495577, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '6754347', 'n_tokens_mistral': 708, 'n_tokens_neox': 665, 'n_words': 188}