<commit_before># xChainer

## Build instruction

### Build the core library

Build `build/xchainer/libxchainer.so` with the following commands.

```shell-session
$ ( mkdir -p build && cd build && cmake .. && make )
```

Install headers and the library with `make install`.
To specify the installation path, pass `-DCMAKE_INSTALL_PREFIX=<...>` to `cmake`.

### Build the Python binding

To install the `xchainer` Python package in `Release` mode, run the following at the repository root:

```shell-session
$ pip install .
```

To build the Python binding as a C++ project, pass `-DBUILD_PYTHON=1` to `cmake`,
then `make` will automatically build the Python binding.

## Information for developers

### Python format and lint

We use `flake8` and `autopep8`. To install, run:

```
$ pip install hacking flake8 autopep8
```

To format and make changes to Python codes in place, run the following at the repository root:

```
$ autopep8 python tests -r --global-config .pep8 --in-place
```

Lint:

```
$ flake8 python tests
```

### C++ format

We use `clang-format`. To install on Ubuntu, run:

```
$ sudo apt-get install clang-format
```

To format and make changes to C++ codes in place, run the following at the repository root:

```shell-session
$ run-clang-format.sh --in-place
```

### C++ Lint (cpplint)

We use `cpplint`. To install it, run:

```shell-session
$ pip install cpplint
```
<commit_msg>Fix README: add scripts/ in script name<commit_after># xChainer

## Build instruction

### Build the core library

Build `build/xchainer/libxchainer.so` with the following commands.

```shell-session
$ ( mkdir -p build && cd build && cmake .. && make )
```

Install headers and the library with `make install`.
To specify the installation path, pass `-DCMAKE_INSTALL_PREFIX=<...>` to `cmake`.

### Build the Python binding

To install the `xchainer` Python package in `Release` mode, run the following at the repository root:

```shell-session
$ pip install .
```

To build the Python binding as a C++ project, pass `-DBUILD_PYTHON=1` to `cmake`,
then `make` will automatically build the Python binding.

## Information for developers

### Python format and lint

We use `flake8` and `autopep8`. To install, run:

```
$ pip install hacking flake8 autopep8
```

To format and make changes to Python codes in place, run the following at the repository root:

```
$ autopep8 python tests -r --global-config .pep8 --in-place
```

Lint:

```
$ flake8 python tests
```

### C++ format

We use `clang-format`. To install on Ubuntu, run:

```
$ sudo apt-get install clang-format
```

To format and make changes to C++ codes in place, run the following at the repository root:

```shell-session
$ scripts/run-clang-format.sh --in-place
```

### C++ Lint (cpplint)

We use `cpplint`. To install it, run:

```shell-session
$ pip install cpplint
```

{'fraction_non_alphanumeric': 0.12983814215341308, 'fraction_numerical': 0.005629838142153413, 'mean_word_length': 4.031858407079646, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6898004', 'n_tokens_mistral': 940, 'n_tokens_neox': 887, 'n_words': 364}