<commit_before># social-dist

Simple instruction to start

Once you clone this repo, you need to setup the virtual environment first.

cd to the project folder (It has a file called requirements.txt)

Do
    
    virtualenv env

Waiting for the virtual environment setup process...

After the setup process finish, type

    source env/bin/activate
    
    pip install -r requirenments.txt
    
Then pip will help you get all the packages we need.

In the case of installing any new package and you want to add the package to the requirement list, you can check the package list by typing

    pip freeze
    
If you want to update the requirement.txt file, type

    pip freeze > requirements.txt
    
--------------

Flask is simple to use when you want to upgrade your database. 

If you do not have the migration folder at the root dir. You should run

    python manage.py db init
    python manage.py db migrate
    python manage.py db upgrade
    
Then Flask will automatically add a migration folder and setup all the things for you.
    
If you already have a migration folder and the .sqlite file, run

    python manage.py db upgrade
    
We can talk about this part later.
<commit_msg>Add how to run app section.<commit_after># social-dist

##How to run
###Run local with default environment

Do

```
python app.py
```

###Run local with production environment

Do

```
env FLASK_CONFIG=production python app.py
```

If want to put psql database support, do

```
env DATABASE_URL={databse_url} FLASK_CONFIG=production python app.py
```

###Run on heroku
After push code to the heroku instance, the app will automaticly start by gunicorn.

####Limitations
The gunicorn does not support 503 error pages.

The only way to see the error msg on heroku is to use the logs console.
```
heroku logs -t
```

##Simple instruction to start

Once you clone this repo, you need to setup the virtual environment first.

cd to the project folder (It has a file called requirements.txt)

Do

    virtualenv env

Waiting for the virtual environment setup process...

After the setup process finish, type

    source env/bin/activate

    pip install -r requirenments.txt

Then pip will help you get all the packages we need.

In the case of installing any new package and you want to add the package to the requirement list, you can check the package list by typing

    pip freeze

If you want to update the requirement.txt file, type

    pip freeze > requirements.txt

--------------

Flask is simple to use when you want to upgrade your database.

If you do not have the migration folder at the root dir. You should run

    python manage.py db init
    python manage.py db migrate
    python manage.py db upgrade

Then Flask will automatically add a migration folder and setup all the things for you.

If you already have a migration folder and the .sqlite file, run

    python manage.py db upgrade

We can talk about this part later.


{'fraction_non_alphanumeric': 0.051735874744724304, 'fraction_numerical': 0.0010211027910142954, 'mean_word_length': 3.1985714285714284, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '1389430', 'n_tokens_mistral': 787, 'n_tokens_neox': 755, 'n_words': 446}