<commit_before># cassandra\_lock

A ruby lib to achieve consensus with Cassandra, inspired by a [post](http://www.datastax.com/dev/blog/consensus-on-cassandra). It can be used as lock in distributed systems.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'cassandra_lock'
```

And then execute:

```$ bundle```

Or install it yourself as:

```$ gem install cassandra_lock```

## Usage

Create the keyspace, see the example bellow.
<commit_msg>adds link to consensus<commit_after># cassandra\_lock

A ruby lib to achieve [consensus](http://en.wikipedia.org/wiki/Consensus_%28computer_science%29) with Cassandra, inspired by [consensus on cassandra](http://www.datastax.com/dev/blog/consensus-on-cassandra). It can be used as lock in distributed systems.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'cassandra_lock'
```

And then execute:

```$ bundle```

Or install it yourself as:

```$ gem install cassandra_lock```

## Usage

Create the keyspace, see the example bellow.

{'fraction_non_alphanumeric': 0.11702127659574468, 'fraction_numerical': 0.0038684719535783366, 'mean_word_length': 4.914285714285715, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5463214', 'n_tokens_mistral': 350, 'n_tokens_neox': 319, 'n_words': 112}