<commit_before># Installation

These installation notes should cover most Debian Linux variants (on any architecture). Very minor changes should be required to deploy on RHEL variants like CentOS, and there is specific emphasis on Raspbian because that's the typical deployment target.

You can, however, run `piku` on any POSIX-like environment where you have Python, [uWSGI][uwsgi] and SSH.

For installation, you only require `root`/`sudo` access and the following three files:

* `piku.py`
* `uwsgi-piku.service` (this one is for `systemd` systems such as Raspbian Jessie/Debian 8)
* `uwsgi-piku.dist` (this one should only be necessary on older systems)

Copy them across to the machine you'll be using as a server before you get started with the rest.

## Setting up the `piku` user (Debian Linux, any architecture)

`piku` requires a separate user account to run. To create a new user with the right group membership (we're using the built-in `www-data` group because it's generally thought of as a less-privileged group), enter the following command:

```bash
sudo adduser --disabled-password --gecos 'PaaS access' --ingroup www-data piku
```

This user _is not supposed to login to your system_. Instead, you'll interact with `piku` via SSH, and set things up by using `su`:

```bash
sudo su - piku
mkdir ~/.ssh
chmod 700 ~/.ssh
# now copy the piku script to this user account
cp /tmp/piku.py ~/piku.py
```

## Dependencies

Before running `piku` for the first time, you need to install the following Python packages at the system level:

### Raspbian Jessie, Debian 8, Ubuntu

```bash
sudo apt-get install git python-virtualenv python-pip
sudo pip install -U click
```
<commit_msg>Version<commit_after># Installation

These installation notes should cover most Debian Linux variants (on any architecture). Very minor changes should be required to deploy on RHEL variants like CentOS, and there is specific emphasis on Raspbian because that's the typical deployment target.

You can, however, run `piku` on any POSIX-like environment where you have Python, [uWSGI][uwsgi] and SSH.

For installation, you only require `root`/`sudo` access and the following three files:

* `piku.py`
* `uwsgi-piku.service` (this one is for `systemd` systems such as Raspbian Jessie/Debian 8)
* `uwsgi-piku.dist` (this one should only be necessary on older systems)

Copy them across to the machine you'll be using as a server before you get started with the rest.

## Setting up the `piku` user (Debian Linux, any architecture)

`piku` requires a separate user account to run. To create a new user with the right group membership (we're using the built-in `www-data` group because it's generally thought of as a less-privileged group), enter the following command:

```bash
sudo adduser --disabled-password --gecos 'PaaS access' --ingroup www-data piku
```

This user _is not supposed to login to your system_. Instead, you'll interact with `piku` via SSH, and set things up by using `su`:

```bash
sudo su - piku
mkdir ~/.ssh
chmod 700 ~/.ssh
# now copy the piku script to this user account
cp /tmp/piku.py ~/piku.py
```

## Dependencies

Before running `piku` for the first time, you need to install the following Python packages at the system level:

### Raspbian Jessie, Debian 8, Ubuntu 16.04

```bash
sudo apt-get install git python-virtualenv python-pip
sudo pip install -U click
```

{'fraction_non_alphanumeric': 0.08190419869899468, 'fraction_numerical': 0.004139562389118865, 'mean_word_length': 4.395534290271132, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '553893', 'n_tokens_mistral': 1041, 'n_tokens_neox': 951, 'n_words': 497}