<commit_before># Active Sample

[![Gem Version](https://badge.fury.io/rb/active_sample.svg)](https://badge.fury.io/rb/active_sample)
[![Build Status](https://travis-ci.org/JuanitoFatas/active_sample.svg?branch=master)](https://travis-ci.org/JuanitoFatas/active_sample)

Sample functionality for Active Record.

## Usage

```ruby
User.count # => 0
User.sample => nil

User.count # => 100
User.sample => #<User id: 42, ...>
User.sample(2) => #<ActiveRecord::Relation [#<User id: 1>, #<User id: 42>]>

User.count # => 100
User.sample(200) => #<ActiveRecord::Relation [All Users but shuffled]>
```

## Installation

Add this line to your application's Gemfile:

```ruby
gem "active_sample"
```

And then execute:
<commit_msg>Add a warning in README.md [ci skip]<commit_after># Active Sample

[![Gem Version](https://badge.fury.io/rb/active_sample.svg)](https://badge.fury.io/rb/active_sample)
[![Build Status](https://travis-ci.org/JuanitoFatas/active_sample.svg?branch=master)](https://travis-ci.org/JuanitoFatas/active_sample)

Sample functionality for Active Record.

## Usage

**Don't use this for large set of data for now (See [#1](https://github.com/JuanitoFatas/active_sample/issues/1)).**

```ruby
User.count # => 0
User.sample => nil

User.count # => 100
User.sample => #<User id: 42, ...>
User.sample(2) => #<ActiveRecord::Relation [#<User id: 1>, #<User id: 42>]>

User.count # => 100
User.sample(200) => #<ActiveRecord::Relation [All Users but shuffled]>
```

## Installation

Add this line to your application's Gemfile:

```ruby
gem "active_sample"
```

And then execute:

{'fraction_non_alphanumeric': 0.18572331017056223, 'fraction_numerical': 0.02147820593809223, 'mean_word_length': 5.068965517241379, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 27, 'https://': 9, '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': '2668142', 'n_tokens_mistral': 613, 'n_tokens_neox': 560, 'n_words': 126}