semvec/pypi-packages huggingface dataset:
batch-tar 0.1.2
To tar/compress files/directories in batch mode.
Requires Python: >=3

# batch-tar

## 1 Introduction

`batch-tar` is a tool to tar (and compress) files or directories in batch mode.

## 2 Installation

    pip install batch-tar

There will be a command `batch_tar` created under the same directory as your `pip` command.

## 3 Usage

    $ batch_tar

    usage: batch_tar [-h] [-l <file>] [-L [<str> [<str> ...]]]
                     [-workdir <directory>] [-tarfile <str>] [-regex <str>]
                     [-compress {z,j}] [-rm] [-p] [--version]

    To tar/compress files/directories in batch mode. By Guanliang Meng, see
    https://github.com/linzhi2013/batch_tar. version: 0.1

    optional arguments:
      -h, --help            show this help message and exit
      -l <file>             path list to be dealed with
      -L [<str> [<str> ...]]
                            basenames of files/subdirecotries in `-workdir`. If
                            `-workdir` was not specified, `-workdir ./` is
                            assumed.
      -workdir <directory>  working directory. must specify `-regex` together
      -tarfile <str>        group all the files/subdirecotries into one file.tar
                            (.bz2 or .gz). only works with `-L` and `-workdir`
      -regex <str>          deal with only the files/subdirecotries in `-l` or
                            `-workdir` whose basenames match the regular
                            expression
      -compress {z,j}       For the subdirecotries, when executing `tar -cf`, also
                            add parameter `z` or `j` for `tar` command. The files
                            will always be gzipped if this option was not set.
      -rm                   delete the files/subdirecotries when tar finishs.
      -p                    only print out the commands, not run. then you can use
                            qsub-sge.pl to submit multiple jobs. Useful to handle
                            a lot of files because I run in single thread mode
                            only! [False]
      --version             show program's version number and exit

## Author
Guanliang MENG

## Citation

Currently I have no plan for publishing this script.
lru-cache-pubsub-cache-clear 0.0.9
redis based cache_clear() for lru_cache

# lru_cache_pubsub_cache_clear
`lru_cache_pubsub_cache_clear` is a decorator to broadcast `cache_clear()` calls to `lru_cache` across
multiple instances of an application. This allows for local cache access speed and redis-like centralized cache invalidation. Example:

```
from lru_cache_pubsub_cache_clear.decorators import lru_cache_pubsub_cache_clear
from django_redis import get_redis_connection


@lru_cache_pubsub_cache_clear(get_redis_connection=get_redis_connection,
                              channel_name='CHANNEL_CACHE_CLEAR')
@lru_cache(maxsize=1000000)
def get_data(key)
    ...
    return value
```
Here `get_redis_connection` is a callable which returns a redis connection (e.g. `django_redis.get_redis_connection`).


Then every time one of app instances calls `get_data.cache_clear()` it will be executed on all connected instances.
keras-one-cycle-lr 0.0.1
Keras implementation of One Cycle Policy and LR Finder

# Keras-training-tools 

Implementation of some of the very effective tools for training Deep Learning (DL) models that I came across while doing the fastai course on [Practical Deep Learning for Coders](https://course.fast.ai/). 

The tools were first presented in the following papers by Leslie N. Smith:
- LR Finder: [A disciplined approach to neural network hyper-parameters: Part 1 -- learning rate, batch size, momentum, and weight decay](https://arxiv.org/abs/1803.09820)
- One Cycle Scheduler: [Cyclical Learning Rates for Training Neural Networks](https://arxiv.org/abs/1506.01186)

My implementations are a port of the code in [fastai library](https://github.com/fastai/fastai) (originally, based on Pytorch) to Keras and are heavily inspired by some of earlier efforts in this direction:

- https://github.com/surmenok/keras_lr_finder
- https://github.com/titu1994/keras-one-cycle

Here's another article I referred to: [How Do You Find A Good Learning Rate](https://sgugger.github.io/how-do-you-find-a-good-learning-rate.html) by Sylvain Gugger of fastai which provides an intuitive understanding of how fastai's LR finder works. 

I'll keep updating this repository with the new tools I come across that could be practically useful for training a DL model.