semvec/pypi-packages huggingface dataset:
quick-cache 0.3.1
QuickCache is a quick to use and easy to set up cache implementation.
License: MIT
Keywords: cache quick easy

quick\_cache
============

A quick and easy to use python caching system.

You can install *quick\_cache* via

.. code:: bash

    pip install --user quick_cache

and import it in python using:

.. code:: python

    from quick_cache import QuickCache

Create the cache object as follows:

.. code:: python

    def msg(message, *args, **kwargs):
        print(message.format(*args, **kwargs), file=sys.stderr)

    cache = QuickCache(base_file, quota=500, ram_quota=100, warnings=msg)

where ``base_file`` is an optional file whose *content* invalidates the
cache (ie., when the content of the file changes the cache is
invalidated; for large files it might be desirable to use the *mtime* in
the cache object below) and ``msg`` is an optional formatting function
that prints warnings (by default it's ``None`` which doesn't print
anything; warnings are emitted when the actual computation is faster
than reading the results from the cache or if other exceptional
situations occur). ``quota`` and ``ram_quota`` are optional maximal
cache sizes, both in RAM and on disk, in MB.

The caching functionality can then be used via:

.. code:: python

    with cache.get_hnd({
        # object identifying the task to cache
        # can be any combination of keys and values
        "param_a": 5,
        "input_file_c": os.path.getmtime(input_file_c), # for file change time
        ...
    }) as hnd:
        if not hnd.has():
            res = hnd.write(do_compute()) # compute your result here
        else:
            res = hnd.read()
    # your result is in res

The cache object used for creating the handle uniquely defines the task.
The object should contain all parameters of the task and the task
computation itself should be deterministic.
decol 1.1.7
A tool to drop or keep columns from a CSV file.
License: MIT
Requires Python: >=2.6, <4
Keywords: csv,command-line

decol
=====

[![Build Status](https://travis-ci.org/ctberthiaume/decol.svg?branch=master)](https://travis-ci.org/ctberthiaume/decol)

A tool to drop or keep columns from a CSV file.

### Features
* columns can be specified as 1-based integer indexes or column headers
* multiple indexes or headers can be specified as a comma-separated list
* negative indexes are supported
* index ranges are also supported, e.g. 1:2 for the first two column


### Usage
```
$ decol -h
Usage: decol [OPTIONS] INPUT OUTPUT

  A tool to drop or keep columns from a CSV file.

Options:
  -c, --columns COLUMNS       Comma-separated list of 1-based column indexes
                              to remove. Negative integers will index from the
                              end. May use a range, e.g. 1:2 or -3:-2 for
                              first and second of three columns. Ranges must
                              always be given in left to right column order
                              for both positive and negative indexes. Mutually
                              exclusive with --headers.
  -H, --headers HEADERS       Comma-separated list of columns to remove by
                              first-line header. Mutually exclusive with
                              --columns.
  -s, --sep SEPARATOR         Column separator.  [default: ,]
  -o, --output-sep SEPARATOR  Output column separator. [default: --sep value]
  --keep                      Keep only the specified columns in the order
                              specified in --columns or --headers.  [default:
                              False]
  --version                   Show the version and exit.
  -h, --help                  Show this message and exit.
```