<commit_before># unit

![](https://raw.githubusercontent.com/karan/unit/master/_dna.jpg?token=<PASSWORD>%3D%3D)

A highly modular, fast API framework in Go backed by [martini](https://github.com/go-martini/martini), and distributed as a Docker container for easy installation and deployment.

`unit` is designed to be a highly modular and extensible API. These modules or extensions are called *units* and live in `units/` folder. Each unit is part of the `package units`.

`units` are independent modules that can do anything you want them to do. Imagine having one that can draw an image, another that saves an image to s3, and another that notifies users - all exposed through your own HTTP API.

Simply drop your `units` in the `units/` directory, and restart (rebuild) the API. `unit` discovers and links the API, and installs the necessary dependencies automagically.

To get started, take a look the [installation](#installation) steps, and [units docs](#writing-units).

## Contents

- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Accessing the API](#accessing-the-api)
- [Writing Units](#writing-units)
  - [Examples](#examples)
- [Benchmark](#benchmark)

## Prerequisites

- [Docker](https://docs.docker.com/installation/)
- [Docker Compose](https://docs.docker.com/compose/install/)
- [Docker Machine](https://docs.docker.com/machine/install-machine/) (Mac OS X)

## Installation

- `$ go get github.com/karan/unit`
- `$ docker-compose up`

#### Mac & Docker Machine

If you're using Docker Machine, follow these instructions for installation:

```bash
# Provision the docker engine
$ docker-machine create --driver virtualbox unit

# Set the environment
$ eval "$(docker-machine env unit)"

# See the IP address of the host
$ docker-machine ip unit

# Start the container
$ docker-compose up
```

## Accessing the API

If using Docker Machine, run `$ docker-machine ls` to find out the VM IP address.

If your IP is `192.168.99.100`, load `192.168.99.100:5000` in the browser of the computer running docker to access the API.
<commit_msg>fix installation step<commit_after># unit

![](https://raw.githubusercontent.com/karan/unit/master/_dna.jpg?token=<PASSWORD>%3D%3D)

A highly modular, fast API framework in Go backed by [martini](https://github.com/go-martini/martini), and distributed as a Docker container for easy installation and deployment.

`unit` is designed to be a highly modular and extensible API. These modules or extensions are called *units* and live in `units/` folder. Each unit is part of the `package units`.

`units` are independent modules that can do anything you want them to do. Imagine having one that can draw an image, another that saves an image to s3, and another that notifies users - all exposed through your own HTTP API.

Simply drop your `units` in the `units/` directory, and restart (rebuild) the API. `unit` discovers and links the API, and installs the necessary dependencies automagically.

To get started, take a look the [installation](#installation) steps, and [units docs](#writing-units).

## Contents

- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Accessing the API](#accessing-the-api)
- [Writing Units](#writing-units)
  - [Examples](#examples)
- [Benchmark](#benchmark)

## Prerequisites

- [Docker](https://docs.docker.com/installation/)
- [Docker Compose](https://docs.docker.com/compose/install/)
- [Docker Machine](https://docs.docker.com/machine/install-machine/) (Mac OS X)

## Installation

- `$ git clone <EMAIL>:karan/unit.git && cd unit/`
- `$ docker-compose up`

#### Mac & Docker Machine

If you're using Docker Machine, follow these instructions for installation:

```bash
# Provision the docker engine
$ docker-machine create --driver virtualbox unit

# Set the environment
$ eval "$(docker-machine env unit)"

# See the IP address of the host
$ docker-machine ip unit

# Start the container
$ docker-compose up
```

## Accessing the API

If using Docker Machine, run `$ docker-machine ls` to find out the VM IP address.

If your IP is `192.168.99.100`, load `192.168.99.100:5000` in the browser of the computer running docker to access the API.

{'fraction_non_alphanumeric': 0.1149232245681382, 'fraction_numerical': 0.013915547024952015, 'mean_word_length': 4.529177718832892, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '2028366', 'n_tokens_mistral': 1314, 'n_tokens_neox': 1194, 'n_words': 482}