semvec/pypi-packages huggingface dataset:
carbonplan-styles 0.5.1
CarbonPlan plotting styles
License: MIT
Requires Python: >=3.10
Keywords: matplotlib, altair

<p align="left" >
<a href='https://carbonplan.org'>
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://carbonplan-assets.s3.amazonaws.com/monogram/light-small.png">
  <img alt="CarbonPlan monogram." height="48" src="https://carbonplan-assets.s3.amazonaws.com/monogram/dark-small.png">
</picture>
</a>
</p>

# carbonplan / styles

**plot styles for matplotlib and altair**

[![CI](https://github.com/carbonplan/styles/actions/workflows/main.yaml/badge.svg)](https://github.com/carbonplan/styles/actions/workflows/main.yaml)
![PyPI](https://img.shields.io/pypi/v/carbonplan_styles)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

A collection of plotting styles for [Matplotlib](https://matplotlib.org/) and [Altair](https://altair-viz.github.io/).

Try it out on Binder:
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/carbonplan/styles/main?urlpath=lab)

## install

```shell
pip install "carbonplan[styles]"
```

## usage

There are currently two separate styles/themes available in this package:

1. `carbonplan_dark`: black background, lighter colors
2. `carbonplan_light`: white background, darker colors

Both styels/themes are automatically made available in Matplotlib and Altair.

### matplotlib

```python
from carbonplan import styles

styles.mpl.set_theme(style='carbonplan_dark')
```

### altair

```python
import altair as alt

alt.themes.enable('carbonplan_dark')
```

## license

All the code in this repository is [MIT](https://choosealicense.com/licenses/mit/)-licensed. We include attribution for this content, and we please request that you also maintain that attribution if using this data.

## about us

CarbonPlan is a nonprofit organization that uses data and science for climate action. We aim to improve the transparency and scientific integrity of climate solutions with open data and tools. Find out more at [carbonplan.org](https://carbonplan.org/) or get in touch by [opening an issue](https://github.com/carbonplan/styles/issues/new) or [sending us an email](mailto:hello@carbonplan.org).
datasus-dbc 0.1.3
Decompress DATASUS's dbc files into dbf files
License: MIT
Requires Python: >=3.8
Keywords: dbc, dbf, datasus, compression, blast

# datasus-dbc-py

[![PyPI version](https://badge.fury.io/py/datasus-dbc.svg)](https://pypi.org/project/datasus-dbc/)

This python library enables the decompression of `*.dbc` files commonly found on Brazil's DATASUS FTP server into `*.dbf` files.

This is a python bindings of the sibling library [datasus-dbc](https://crates.io/crates/datasus-dbc), written in rust. Because of that, this library should be **compatible with most platforms**.

## Instalation

```
pip install datasus-dbc
```

## Usage

- To decompress a `*.dbc` file into a `*.dbf`, use the `decompress` function:

```python
import datasus_dbc

datasus_dbc.decompress("input.dbc", "output.dbf")
```

- If you have the raw bytes of a `*.dbc` file, you can use `decompress_bytes` function to obtain the decompressed `*.dbf` raw bytes in memory:

```python
import datasus_dbc

with open("input.dbc", "rb") as file:
    dbf_bytes = datasus_dbc.decompress_bytes(file.read())
    print(dbf_bytes)
```

## Reading *.dbf files

This library does not support reading the contents of a `*.dbf` file. However, you can still use one of the following libraries: [simpledbf](https://pypi.org/project/simpledbf/) or [dbfread](https://pypi.org/project/dbfread/1.0.6/).

## Found a bug?
If you encounter a bug or have a feature request, please feel free to create an [issue](https://github.com/mymatsubara/datasus-dbc-py/issues/new) on our GitHub repository. We welcome your feedback!
cpselect2 1.0.6
Matlab's cpselect alternative for Python
License: MIT
Requires Python: <4.0,>=3.10

# cpselect

*Alternative to Matlab's cpselect tool*


**Continuation of the [cpselect project](https://github.com/hofmann-tobias/cpselect) from Tobias Hoffmann**

I have fixed the bug caused by the [newer version of matplotlib](https://github.com/hofmann-tobias/cpselect/pull/5). I have also asked if this project could be maintained by some other larger libraries like [opencv](https://github.com/opencv/opencv/issues/23784) or [scikit-image](https://github.com/scikit-image/scikit-image/issues/7055), but none of them are able to do so!

I will try to keep this project up to date since some toolchains depend on it, but my Qt knowledge is quite rusty...

It would be amazing if we could switch from Qt to [streamlit](https://streamlit.io/) or [dash](https://dash.plotly.com/) for displaying the GUI in the browser! So if someone has an idea, please open up an issue for discussion :)

## Prerequisites
You will need to have the following packages installed:
- matplotlib (tested with 3.0.1)
- Pillow (tested with 5.3.0)
- PyQt5 (tested with 5.11.3)


## Installing and import

Install the package using pip (since `cpselect` is already taken, I have opted for `cpselect2`)

```sh
pip install cpselect2
```

and import it with

```py
from cpselect2.cpselect import cpselect
```

## Using cpselect
Just call function `cpselect`. The function takes two inputs, two strings with the path to your pictures.

```py
controlpointlist = cpselect("path/to/image1", "path/to/image2")
```

It will return a list object, which contains a dictionary for each control point.
```py
[
    {
        'point_id': 1,
        'img1_x': 1060.4614978873824,
        'img1_y': 1152.554044351164,
        'img2_x': 136.567465687222,
        'img2_y': 1095.033125293419,
    },
    {
        'point_id': 2,
        'img1_x': 1681.815230178675,
        'img1_y': 727.6577421225597,
        'img2_x': 1378.2481704454449,
        'img2_y': 101.68856148684131,
    }
]
```