<commit_before># Ruby-Tensorflow

## Description
This repository contains Ruby API for utilizing [TensorFlow](https://github.com/tensorflow/tensorflow).

## Dependencies

- [Bazel](http://www.bazel.io/docs/install.html)
- [TensorFlow](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md)
- [Google-Protoc gem](https://github.com/google/protobuf/tree/master/ruby) ( for installation do  ```gem install google-protoc --pre ```)
- [Protobuf](https://github.com/google/protobuf)
- [Swig](http://www.swig.org/download.html)

## Installation

All the dependencies mentioned above must be installed in your system before you proceed further.   

### Clone and Install TensorFlow

This package depends on the TensorFlow shared libraries, in order to compile
these libraries do the following:
```
git clone --recurse-submodules https://github.com/tensorflow/tensorflow
cd tensorflow
```
This command clones the repository and a few sub modules. After this you should do:
```
bazel build //tensorflow:libtensorflow.so
```
This command takes in the order of 10-15 minutes to run and creates a shared library. When finished, copy the newly generated libtensorflow.so shared library:
```
# Linux
sudo cp bazel-bin/tensorflow/libtensorflow.so /usr/lib/

# OSX
sudo cp bazel-bin/tensorflow/libtensorflow.so /usr/local/lib
```
### Install `ruby-tensorflow`

Clone and install this Ruby API:
```
git clone https://github.com/Arafatk/ruby-tensorflow.git
cd ruby-tensorflow
cd ext
ruby extconf.rb
make
make install # Creates ../lib/ruby/site_ruby/X.X.X/<arch>/tf/Tensorflow.bundle (.so Linux)
cd ./..
bundle exec rake install
```
The last command is for installing the gem.

### Run tests and verify install
```
bundle exec rake spec
```
This command is to run the tests.

## License

Copyright (c) 2016, <NAME>.

All rights reserved.<commit_msg>If rvm is used then Tensorflow.bundle location is different<commit_after># Ruby-Tensorflow

## Description
This repository contains Ruby API for utilizing [TensorFlow](https://github.com/tensorflow/tensorflow).

## Dependencies

- [Bazel](http://www.bazel.io/docs/install.html)
- [TensorFlow](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md)
- [Google-Protoc gem](https://github.com/google/protobuf/tree/master/ruby) ( for installation do  ```gem install google-protoc --pre ```)
- [Protobuf](https://github.com/google/protobuf)
- [Swig](http://www.swig.org/download.html)

## Installation

All the dependencies mentioned above must be installed in your system before you proceed further.   

### Clone and Install TensorFlow

This package depends on the TensorFlow shared libraries, in order to compile
these libraries do the following:
```
git clone --recurse-submodules https://github.com/tensorflow/tensorflow
cd tensorflow
```
This command clones the repository and a few sub modules. After this you should do:
```
bazel build //tensorflow:libtensorflow.so
```
This command takes in the order of 10-15 minutes to run and creates a shared library. When finished, copy the newly generated libtensorflow.so shared library:
```
# Linux
sudo cp bazel-bin/tensorflow/libtensorflow.so /usr/lib/

# OSX
sudo cp bazel-bin/tensorflow/libtensorflow.so /usr/local/lib
```
### Install `ruby-tensorflow`

Clone and install this Ruby API:
```
git clone https://github.com/Arafatk/ruby-tensorflow.git
cd ruby-tensorflow
cd ext
ruby extconf.rb
make
make install # Creates ../lib/ruby/site_ruby/X.X.X/<arch>/tf/Tensorflow.bundle (.so Linux)
             # Creates ${GEM_HOME}/gems/tensorflow-0.0.1/lib/tf/Tensorflow.bundle (.so with rvm)
cd ./..
bundle exec rake install
```
The last command is for installing the gem.

### Run tests and verify install
```
bundle exec rake spec
```
This command is to run the tests.

## License

Copyright (c) 2016, <NAME>.

All rights reserved.
{'fraction_non_alphanumeric': 0.12136047410461222, 'fraction_numerical': 0.0054109765524349394, 'mean_word_length': 4.384188626907074, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 12, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5023271', 'n_tokens_mistral': 1233, 'n_tokens_neox': 1162, 'n_words': 376}