Metadata-Version: 2.1
Name: reinautils
Version: 0.0.3
Summary: General utilities
Home-page: https://github.com/yuval6957/reinautils
Author: Yuval Reina
Author-email: yuval.reina@gmail.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE

# reinautils

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## The Utilities included are:

------------------------------------------------------------------------

<a
href="https://github.com/yuval6957/reinautils/blob/main/reinautils/parameters.py#LNone"
target="_blank" style="float:right; font-size:smaller">source</a>

### Parameters

>      Parameters (**kargs)

A splecial class whos atributes can be referenced as attributs or as
dictionaty keys

------------------------------------------------------------------------

<a
href="https://github.com/yuval6957/reinautils/blob/main/reinautils/torchutils.py#LNone"
target="_blank" style="float:right; font-size:smaller">source</a>

### device_by_name

>      device_by_name (name:str)

Return reference to cuda device by using Part of it’s name

Args: name: part of the cuda device name (shuuld be distinct)

Return: Reference to cuda device

Updated: Yuval 12/10/19

------------------------------------------------------------------------

<a
href="https://github.com/yuval6957/reinautils/blob/main/reinautils/torchutils.py#LNone"
target="_blank" style="float:right; font-size:smaller">source</a>

### DatasetCat

>      DatasetCat (*datasets)

Concatenate datasets for Pytorch dataloader

The normal pytorch implementation does it only for raws. this is a
“column” implementation

Arges: datasets: list of datasets, of the same length

Updated: Yuval 12/10/2019

## Install

``` sh
pip install reinautils
```

## How to use

### Parameters

You can create a Parameters class from dict

``` python
params=Parameters(first=1,second='A')
print(params.first)
```

    1

You can also creat a Parameters class and populate it from a json file

``` python
params2=Parameters().from_json('config_demo.json')
print(params2)
```

    Parameters:
       path : Parameters:
          data : /workspace/hd/
          tmp : /workspace/hd/tmp/
          features : /workspace/nvme/features/
          train : /workspace/nvme/train/
          models : /workspace/hd/models/
          output : /workspace/hd/outputs/
          test : /workspace/nvme/test/
       platform : myserver


