semvec/pypi-packages huggingface dataset:
torch-utils 0.1.2
Common Utils for PyTorch
License: MIT
Requires Python: >=3.6.0
Keywords: PyTorch Utils

# torch-utils [![Build Status](https://travis-ci.com/FebruaryBreeze/torch-utils.svg?branch=master)](https://travis-ci.com/FebruaryBreeze/torch-utils) [![codecov](https://codecov.io/gh/FebruaryBreeze/torch-utils/branch/master/graph/badge.svg)](https://codecov.io/gh/FebruaryBreeze/torch-utils) [![PyPI version](https://badge.fury.io/py/torch-utils.svg)](https://pypi.org/project/torch-utils/)

Common Utils for PyTorch.

## Installation

Need Python 3.6+.

```bash
pip install torch-utils
```

## Usage

1. Accuracy

```python
import torch_utils

# ...

top_1, top_5 = torch_utils.accuracy(output=..., target=..., top_k=(1, 5))
```

2. Meter

```python
import torch_utils

loss_meter = torch_utils.AverageMeter(name='Meter', length=10)
loss_meter.update(val=...)

print(loss_meter.avg, loss_meter.val)
print(loss_meter)
#> Test 0.00 (0.00)

progress_meter = torch_utils.ProgressMeter(total_steps=100, total_epochs=10)
progress_meter.update(step=10)
assert progress_meter.step == 10
assert progress_meter.ratio == 0.1
assert progress_meter.epoch == 1
print(progress_meter)
#> Step 10/100=10.0% (1/10)
```
imgextract 0.0.2
A python package for extracting images from PDF/TIF files
License: MIT
Keywords: pdf,tif,tiff,image

# imgextract 

[imgextract v0.0.2](https://pypi.org/project/imgextract/)

This python package can be used for extracting pages from PDF and TIF/TIFF files.


This packages uses poppler for reading pdf files and tkinter for gui, for windows platform poppler has been included in package and tkinter can be installed with python but for linux we have to install them manually.

## How to install poppler and tkinter

We can download poppler from [poppler](https://poppler.freedesktop.org/) 

OR

We can install poppler using below command 

```

sudo apt-get install python-poppler

```

Install tkinter in linux using below command

```

sudo apt-get update
sudo apt-get install python3-tk


```

## How to use

### pdf page extraction

```python

from imgextract.imgext import ImgExtractor

if __name__ == "__main__":
    ss = ImgExtractor()
    # input files path, out put files path and file type
    ss.extract("/home/user/pdf_files", "/home/user/image_files", "pdf")


```

### tif/tiff image extraction

```python

from imgextract.imgext import ImgExtractor

if __name__ == "__main__":
    ss = ImgExtractor()
    # input files path, out put files path and file type
    ss.extract("/home/user/tif_files", "/home/user/image_files", "tif")


```

### GUI for Image extraction


[![GUI for Image extraction](screenshot.png)](https://pypi.org/project/imgextract/)


```python

from imgextract.imggui import GuiExtractor

if __name__ == "__main__":
    ss = GuiExtractor()
    ss.openwindow()


```

### Installation

```shell
$ pip install imgextract
```

### License

  [MIT](LICENSE)
thumbup 1.5.1
A convenient video thumbnails generator.
License: MIT
Keywords: video thumbnail snapshot

thumbup :thumbsup:
==================
.. image:: https://badge.fury.io/py/thumbup.svg
    :alt: pypi
    :target: https://badge.fury.io/py/thumbup
.. image:: https://img.shields.io/github/license/mashape/apistatus.svg
    :alt: license
    :target: https://opensource.org/licenses/MIT
.. image:: https://travis-ci.org/bl4ck5un/thumbup.py.svg?branch=master
    :alt: travis-ci
    :target: https://travis-ci.org/bl4ck5un/thumbup.py


``thumbup`` is a command-line video thumbnails generator written in Python.

Getting thumbup
---------------

You'll need ``ffmpeg`` before you can use ``thumbup``, which can be installed by

.. code-block::

  # on macOS
  brew install ffmpeg

  # on ubuntu (>= 14.04)
  sudo apt-get install -y \
    libavformat-dev libavcodec-dev libavdevice-dev \
    libavutil-dev libswscale-dev libavresample-dev libavfilter-dev

``ffmpeg`` is also widely available for many other distros. Please refer to the official website https://www.ffmpeg.org.

``thumbup`` can be installed from ``pip`` by

.. code-block::

  pip install thumbup

Usage
-----

To generate thumbnails for video files ``file1`` and ``file2``, simply use

.. code-block::

  thumbup file1 file2

The above will create ``file1.jpg`` and ``file2.jpg`` in the same directory as the video files.

To generate thumbnails for all video files in directory ``dir``, use ``-r`` option. ``thumbup`` will recursively go through every video in directory ``dir`` and generate thumbnails next to them.

.. code-block::

  thumbup -r dir

Full help message for more control:


.. code-block::

    usage: thumbup.py [-h] [-v] [-r] [-f] [-o OFFSET] [-s X] FILE [FILE ...]

    thumbup video thumbnail generator vv1.5.1

    positional arguments:
      FILE                  one or more video files or directories (with -r)

    optional arguments:
      -h, --help            show this help message and exit
      -v, --verbose         logging more stuff
      -r, --rec             recursively go into all dirs
      -f, --force           force overwrite existing thumbnails
      -o OFFSET, --offset OFFSET
                            skip OFFSET (hh:mm:ss.ms or second) from the beginning
      -s X, --suffix X      add suffix to the output filename, input.mp4 ->
                            inputX.jpg