semvec/pypi-packages huggingface dataset:
config-better 1.1.0
Configure your application in a friendlier and more consistent way!
License: MIT
Requires Python: >=3.0.*
Keywords: config better xdg directory

# config-better

[![PyPI](https://img.shields.io/pypi/v/config-better.svg?style=flat-square)](https://pypi.org/project/config-better/)
[![CircleCI Build Status](https://img.shields.io/circleci/token/a23936ed1748d98b98003357c1e205619209af66/project/github/kade-robertson/config-better/master.svg?style=flat-square)](https://circleci.com/gh/kade-robertson/config-better)
[![Codecov](https://img.shields.io/codecov/c/github/kade-robertson/config-better.svg?style=flat-square)](https://codecov.io/gh/kade-robertson/config-better)

Make use of directories for configuration / data / caching better and more user-friendly!

This module provides support for the XDG Base Directory specification, and OS-friendly fallbacks for Windows, Mac OS, and Linux if not otherwise specified.

## Usage

```python
import os.path

import configbetter

c = configbetter.Config('appname')

with open(os.path.join(c.config, 'config.json')) as conf:
    # ...
```

Available parameters for creating a `Config` instance:

- `force_unix` allows you to force using Unix-like paths on Windows/Darwin if desired. This isn't really recommended on Windows but on Darwin it seems as though programs without a GUI usually use Unix-like configuration paths while GUI apps use the "standard" Darwin paths. By default this is `False`.

Available properties of `Config`:

- `.cache`, which points to `$XDG_CACHE_HOME` if available, otherwise uses a generic system equivalent.
- `.config`, which points to `$XDG_CONFIG_HOME` if available, otherwise uses a generic system equivalent.
- `.data`, which points to `$XDG_DATA_HOME` if available, otherwise uses a generic system equivalent.

Additionally, the following methods are provided:

- `.makedirs()` will create the cache, config and data directories if they do not already exist, including all parent directories.
- `.rmdirs()` will remove any program-specific directories that would have been created by config-better.

## Installation

```bash
pip install config-better
```

## Developing

1. Clone the repo
2. `git checkout -b some-feature-or-bugfix`
3. Do work
4. Test with `pytest` (add tests to maintain coverage as best as possible)
5. Run `yapf -ir .` and `isort -rc .` to standardize.
6. Make a PR.
mpl-colors 0.2.0
Enums representing named colors available in matplotlib
License: MIT
Requires Python: >=3.6

# mpl_colors

A python 3.6+ library extending matplotlib's color handling.

## Named color enums

Makes matplotlib's [named colors](https://matplotlib.org/examples/color/named_colors.html) more discoverable.

Defines enums for each of matplotlib's sets of named colours (base, Tableau, xkcd and CSS4), and one which combines all of them (where Tableau and xkcd names are prepended with `TAB_` and `XKCD_` respectively, like matplotlib).
Color names are in `SCREAMING_SNAKE_CASE`, as recommended.
Names originally containing a slash (`/`) replace it with the `_SLASH_` (necessary to prevent collisions).

Instances of these enums are also instances of a named tuple with members `r`, `g`, and `b` (all floats between 0 and 1).
They also support a number of methods for conversion into `colour.Color` objects, and RGBA, HSL, HSV, and YIQ tuples.
Also, length-6 hex strings (prepended with `#`) and `colour`'s "web" format (whichever is shortest of W3C named color, length-3 hex, or length-6 hex, preferring named as a tie-break).

The enums are automatically generated directly from `matplotlib.colors` using the included `make_colors.py`.
Like matplotlib, they support both spellings of the word "grey"/"gray".

## LabelColormap

`matplotlib.colors.Colormap` subclass which deterministically converts integers into a random RGB tuple.

```python
from matplotlib import pyplot as plt
import numpy as np

from mpl_colors import LabelColorMap

img = np.random.randint(0, 255, (20, 20), dtype=np.uint8)
masked = np.ma.masked_where(img < 100, img)

fig, ax = plt.subplots()
ax.imshow(masked, cmap=LabelColorMap(), interpolation='nearest')
fig.show()
```
jupyter-source-magic 0.1.2
A Jupyter Notebook %%magic to quickly edit and run source code
License: MIT
Keywords: ipython

# Jupyter Source Magic

A Jupyter Notebook %%magic to quickly edit and run source code.

- Both saves and evaluates source code when cell is run
- Accepts and evaluates other cell magic annotations, without saving them
- Deals with existing files and monitors external changes

Disclaimer
----------

This is an experimental project. Use at your own risk.

Usage
------

Load extension inside a Jupyter notebook:

```
%load_ext jupytersourcemagic
```

Add code with Cell magic:

```
%%source path/to/source.py
# code to run
```

Run to save and evaluate.

Examples
--------

Save and run a script:

```
%%source path/to/source.py
print('hello')
```

Load an existing source to edit.

```
%loadsource path/to/source.py
## when run, cell contents will be replaced with path/to/source.py
```

Handle other cell magic annotations:

```
%%source path/to/source.sh
%%bash
echo 'hello'
```

Help
-----

Display usage and configuration options:

```
%%source?
```

Installation
------------

Install and activate dependencies:

- [ipywidgets](https://github.com/jupyter-widgets/ipywidgets)
- [jupyter-interval-widget](https://github.com/srizzo/jupyter-interval-widget)

Then:

    $ pip install jupyter-source-magic