boondh-0.1.5
توضیحات
A Swiss Knife
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | boondh-0.1.5 |
| نام | boondh |
| نسخه کتابخانه | 0.1.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Rohit Mehra |
| ایمیل نویسنده | iirohitmehra@gmail.com |
| آدرس صفحه اصلی | https://github.com/rohit-mehra/boondh |
| آدرس اینترنتی | https://pypi.org/project/boondh/ |
| مجوز | - |
# boondh
A Personal Library
- Encapsulate boilerplate code
- Data processing code
- ML Frameworks (NLP tasks - SeqClassification, Entity Extractions etc.)
# install
```bash
pip3 install -U boondh
```
For nightly
```bash
git clone https://github.com/rohit-mehra/boondh.git
cd boondh
pip install .
```
# sample use
> Parallelize any function
```python
from boondh import mp_func
# Any function to be applied on each element of data
def base_func(value, sq=True):
if sq: return value ** 2
return value
# Any data
data = [0, 1, 2, 3, 4]
# Collected results - Ordered by default
results = mp_func(base_func, # apply this in parallel
'value', # the data argument name in above function
data, # contains elements to be processed
sq=True # any arg of the `to be applied` function
)
```
```python
# configure chunksize and set ordered as False for perfromance gain
results = mp_func(base_func, 'value', data, chunksize=200, ordered=False, sq=True)
```
> Arrange files in your directory (usually the `Download` directory.. :smile:)
- This will scan the directory and create `type folders` like `csv_`, `txt_` etc.
- Move respective filetypes into these folders.
```bash
python -m boondh.utils.arrange_files -D "$(pwd)"
```
OR
```bash
python -m boondh.utils.arrange_files -D /Users/<myusername>/Downloads/
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6.0 | Python |
نحوه نصب
نصب پکیج whl boondh-0.1.5:
pip install boondh-0.1.5.whl
نصب پکیج tar.gz boondh-0.1.5:
pip install boondh-0.1.5.tar.gz