semvec/pypi-packages huggingface dataset:
lineident 1.3.1
Searches files line by line for given words
License: MIT

# Description

Searches files line by line for given words

# Installation

`pip install lineident`

# Usage

**From command line:**

`--path PATH --words WORDS [--method {or,and}] [--format {std,wln}]`

| Option | Short | Type | Default | Description |
|---|---|---|---|---|
|--path | -p | String | - | Path to file which shall be searched |
|--words | -w | String | - | CSV input e.g.: dog,cat,hello |
|--method | -m | String | or | or = Checks if one of the words is in the line <br> and = Checks if all words are in the line |
|--format | -f | String | std | std = Standard output <br> wln = Without Line Number |


# Example

`python -m lineident -p path/to/example_list.txt -w cat,dog,people -m or`

```
################################################################################

lineident by 5f0
Searches files line by line for given words

Current working directory: path/to/lineident

-->    Path: path/to/example_list.txt
-->     MD5: 175e1b9d0e5d980323dcd01e1d4b21e9
-->  SHA256: 3563b6334e666d43365882ba5a218592a9036f2eeb2dbc6ed38a66ff1175b2ac

Datetime: 01/01/1970 11:12:13

################################################################################

Search Options:
---

Method: or
 Words: ["cat", "dog", "people"]


Result:
---
Hits: 2
---

Line Nr: 44 --> cat
Line Nr: 51 --> dog
Line Nr: 53 --> people

################################################################################

Execution Time: 0.0 sec

```


# License

MIT
PyRedPack 0.2.6
Serialize any python datatypes and does redis actions using redis-py
License: MIT
Requires Python: >=3.8

# PyRedPack

* Serialize any python datatypes and executes redis commands using redis-py
* When loading, it auutomatically converts serialized data into original data types

## Getting Started

### Install via pypi

`pip install PyRedPack`

### Instantiate

```python
from pyredpack import Redis
r = Redis(host='localhost', port=6379)
```

## Supporting Data Types

* Built-in

   * string
   * number(int, float)
   * dictionary
   * list
   * tuple
   * etc (all other python built-in types)

* Module Classes

   * pandas
   * numpy

## Supporting Redis Commands

### PyRedPack Supports

* Basic Functions

   * KEYS
   * RANDOMKEY
   * TYPE
   * SET
   * GET

* Hash Functions

   * HKEYS
   * HSET
   * HMSET
   * HGET
   * HMGET
   * HGETALL
   * HVALS

* Set Functions

   * SADD
   * SREM
   * SMEMBERS
   * SPOP
   * SDIFF
   * SCARD (Default)
   * SRANDMEMBER

* List Functions

   * LPUSH
   * RPUSH
   * LPUSHX
   * RPUSHX
   * LRANGE
   * LPOP
   * RPOP
   * LINDEX

* List Extra Functions

   * ZLIB COMPRESS SET
   * ZLIB COMPRESS GET

## Examples

### String

* Originally redis stores string into bytes.

```python
s = "This is a String. \n스트링입니다."
print(s)

 r.set('s', s)   
 r.get('s')   
type(r.get('s'))
```

### Numbers

```python
mapping = {
        'a': 29,
        'b': 0.5335113,
        'c': np.float64(0.243623466363223),}   

r.hmset('nums', mapping)   
r.hmget('nums', *mapping.keys())   
list(mapping.values()) == r.hmget('nums', *mapping.keys())
```

### Nested Dictionaries and Lists

```python
l = [1,2,3]
d = {'a': 1, 'b': 2, 'c': 3}   

r.hmset('list and dictionary', {'list': l, 'dict': d})   

r.hgetall("list and dictionary")
{'list': [1, 2, 3], 'dict': {'a': 1, 'b': 2, 'c': 3}}

type(r.hgetall("list and dictionary")['list'])

type(r.hgetall("list and dictionary")['dict'])

```

### Pandas DataFrame

```python
df =  pd.DataFrame([[1,2,3,'235', '@$$#@'], 
                       ['a', 'b', 'c', 'd', 'e']])
print(df)
r.set('df', df)   
r.get('df')

type(r.get('df'))
```

### Numpy Array

### Compress data with Python Zlib package

# Author

`PyRedPack` is developed and maintained by Amir taherkhani (amirtaherkhani@outlook.com).  
It can be found here: https://github.com/amirtaherkhani/PyRedPack

Special thanks to:

* Andy McCurdy, the author of redis-py.