<commit_before># resp

Resp makes the [Redis Mass Insertion](https://redis.io/topics/mass-insert) simple.

## Installation

```bash
pip install resp
```

## Usage

```bash
python -m resp -i /path/to/dump.txt -d ',' -r 'RPUSH {0} {1}' | recis-cli --pipe
```

If the order of the data isn't relevant, you can split the origin file in multiple chunks and pipe them to the script concurrently:

```bash
cat /path/to/dump.txt | parallel -j4 --block 1M -I ,, --pipe 'python -m resp -r "SET {0} {1}" -p' | recis-cli --pipe<commit_msg>Change short description<commit_after># resp

Making the [Redis](https://redis.io/) [Mass Insertion](https://redis.io/topics/mass-insert) simple.

## Installation

```bash
pip install resp
```

## Usage

```bash
python -m resp -i /path/to/dump.txt -d ',' -r 'RPUSH {0} {1}' | recis-cli --pipe
```

If the order of the data isn't relevant, you can split the origin file in multiple chunks and pipe them to the script concurrently:

```bash
cat /path/to/dump.txt | parallel -j4 --block 1M -I ,, --pipe 'python -m resp -r "SET {0} {1}" -p' | recis-cli --pipe
{'fraction_non_alphanumeric': 0.16913123844731978, 'fraction_numerical': 0.011090573012939002, 'mean_word_length': 3.402439024390244, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, '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': '438897', 'n_tokens_mistral': 407, 'n_tokens_neox': 376, 'n_words': 142}