semvec/pypi-packages huggingface dataset:
img-renamer 2.6.0
Script to rename images in numberic order
Requires Python: >=3.0

# Image renamer

Production [![build status](https://gitlab.com/miicat/img-renamer/badges/production/pipeline.svg)](https://gitlab.com/miicat/img-renamer/commits/production)

Master [![build status](https://gitlab.com/miicat/img-renamer/badges/master/pipeline.svg)](https://gitlab.com/miicat/img-renamer/commits/master)

## Description

**img_renamer** is a Python script to rename images in numberic order.


## Usage

See [wiki](https://gitlab.com/miicat/img-renamer/-/wikis/) for full usage


### Basic usage

This will rename all images in `~/Pictures` folder like this: `0000001.png`, `0000002.png`, `0000003.png`...

`img_renamer ~/Pictures`  
Output:

```text
image.png -> 0000001.png
picture.jpg -> 0000002.jpg
img.jpeg -> 0000003.jpg
____________________
Renaming 3 of 3
Are you sure you want to rename (y/n): y
Do you want to save a log file(y/n): n
```


### Print help text

Simply run this `img_renamer --help`


## Author
[Miika Launiainen](https://gitlab.com/miicat)


## Donating

If you want to support me, feel free to use paypal
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/miicat)


## License

This library is licensed under GPLv3
pnp-timeit 0.5.0
Measure execution time of small code snippets, write to log
Requires Python: >=3.6

# Project description
> Author: PyPnPteam <pypnp@protonmail.com>

## Introduction
Measure execution time of small code snippets, write to log, Plug and Play style



## Installation
This package can either be installed using pip or from a tarball using the standard Python distutils.

If installing using pip, you can download latest version from PyPI:

    pip install pypnp-timeit

If you are installing from a tarball, run the following command as an administrative user:

    python setup.py install


# Example & Usage
## Example Code 1

copy following code to file: aa.py

    import time
    from pnp_timeit.pnp_timeit import Pnp_Timeit

    @Pnp_Timeit.timeit
    def myfunc(arg1, arg2, arg3='hello'):
        time.sleep(3)

    if __name__ == "__main__":
        Pnp_Timeit.enable()
        myfunc("a1", "a2", arg3="hello world")


execute file: aa.py

    $ python aa.py

    {"func": "myfunc", "args": ["a1", "a2"], "kwargs": {"arg3": "hello world"}, "time_cost_seconds": 3.002114}



## Example Code 2

copy following code to file: bb.py

    import time
    import logging
    from pnp_timeit.pnp_timeit import Pnp_Timeit

    @Pnp_Timeit.timeit
    def myfunc(arg1, arg2, arg3='hello'):
        time.sleep(3)

    if __name__ == "__main__":

        logger = logging.getLogger("MYTEST_LOGGER")
        ch = logging.StreamHandler()
        formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
        ch.setFormatter(formatter)
        logger.addHandler(ch)
        logger.setLevel(logging.INFO)

        Pnp_Timeit.enable(logger)
        myfunc("a1", "a2", arg3="hello world")



execute file: bb.py

    $ python bb.py

    2020-06-08 16:39:54,151 - MYTEST_LOGGER - INFO - {"func": "myfunc", "args": ["a1", "a2"], "kwargs": {"arg3": "hello world"}, "time_cost_seconds": 3.
01584}





# License
MIT license.

If needed for inclusion in other open source projects, I’m glad to relicense this code.



# Bugs, Feature Requests & Patches

# Security Issues


# Contact
PyPnP team <pypnp@protonmail.com>
numpyprint 0.1.5
prints numpy arrays nicely
Requires Python: >=3.6

# NumpyPrint

Numpyprint uses the Package prettytable to print numpy arrays in a nice format. At the moment this works well until a 2D Dimension.

## Installation

```bash
pip install numpyprint

or

python3 -m pip install numpyprint
```

## What is it

NumpyPrint nicely prints an numpy array with the help of the package PrettyTable. It prints arrays of any dimension.

### Example

```python
import numpy as np
from numpyprint import np_print

numpy_array = np.random.rand(1,2,3)*100
np_print(numpy_array)
```

The output with the default settings looks like this:

```bash
+---+----------------------------+---------------------------+
| 0 | +---+--------------------+ | +---+-------------------+ |
|   | | 0 | 40.361415789985486 | | | 0 | 89.54304456427288 | |
|   | | 1 | 42.44964170184573  | | | 1 | 43.11298502039822 | |
|   | | 2 | 19.234562477482196 | | | 2 |  40.0682288789328 | |
|   | +---+--------------------+ | +---+-------------------+ |
+---+----------------------------+---------------------------+
```

It prints a nice table with frame boarders and row numbers.

## How to use it

### Print to Console

```python
import numpy as np
import numpyprint as npp

array = np.random.rand(3, 2, 3)*100

npp.np_print(array)

# or with change of some settings

npp.np_print(array,precision= 2 ,row_numbers= True, column_numbers= True,odd_vertical= False,style='plain')

```

### Use it in Jupyter Notebooks

In Jupyter Notebook it is possible to use HTML to format the output. The following command prints the numpy array in a nice table.

```python
import numpy as np
import numpyprint as npp

array = np.random.rand(3, 2)

npp.np_display(array)
```

### Get the PrettyTable Object

If you want the PrettyTable object you can use `np_format()`. But keep in mind that multidimensional arrays have nested tables.

```python
import numpy as np
import numpyprint as npp

array = np.random.rand(3, 2)

table = npp.np_format(array)
```

## Change the Default Settings

The defaults/settings are:

```python
defaults=dict({
    'row_numbers': True,
    'column_numbers': False,
    'precision': None, # None or int like 2
    'style': 'default', # 'default' or 'plain'
    'odd_vertical': True
})
```

It is possible to change it like:

```python
import numpy as np
import numpyprint as npp

npp.defaults['precision'] = 2
```