semvec/pypi-packages huggingface dataset:
get-rectangle-infos 0.10
There are 3 common rectangle formats, and converting them all the time really is a pain in the a**
License: MIT
Keywords: rectangle,convert,coordinates


# There are 3 common rectangle formats, and converting them all the time really is a pain in the a**
### Using this function, you get all 3 formats, center coordinates, height, width and the area


```python
# Tested with:
# Python 3.9.13
# Windows 10

pip install get-rectangle-infos

from get_rectangle_infos import get_rectangle_information

format_1x4 = (0, 0, 100, 200)
format_4x2 = [(0, 0), (100, 0), (100, 200), (0, 200)]
format_2x2 = [(0, 0), (100, 200)]

print(get_rectangle_information(rect=(0, 0, 100, 200)))
# Rect(format_1x4=(0, 0, 100, 200), format_4x2=[(0, 0), (100, 0), (100, 200), (0, 200)], format_2x2=[(0, 0), (100, 200)], height=200, width=100, area=20000, center=(50, 100))

print(get_rectangle_information(rect=[(0, 0), (100, 0), (100, 200), (0, 200)]))
# Rect(format_1x4=(0, 0, 100, 200), format_4x2=[(0, 0), (100, 0), (100, 200), (0, 200)], format_2x2=[(0, 0), (100, 200)], height=200, width=100, area=20000, center=(50, 100))

print(get_rectangle_information(rect=[(0, 0), (100, 200)]))
# Rect(format_1x4=(0, 0, 100, 200), format_4x2=[(0, 0), (100, 0), (100, 200), (0, 200)], format_2x2=[(0, 0), (100, 200)], height=200, width=100, area=20000, center=(50, 100))



	
```
personal-man 1.1.1
Personal Manpages (pman)
License: MIT
Requires Python: >=3.10.5,<4.0.0

# personal-man (`pman`)

> **Note**
>
> I am archiving this project in favor of [cheat](https://github.com/cheat/cheat), which provides the same features and more!

Personal Manpages

## Installation

1. [Install `ripgrep`](https://github.com/BurntSushi/ripgrep/tree/000015791742bb1280f1853adb714fdee1ba9f8e#installation)

1. Install the `pman` CLI with pipx

   ```sh
   pipx install personal-man
   ```

1. Run `pman` to check that installation succeeded and to see the available commands

1. The help output will display the directory for your personal manpages, but you can change the default by exporting an environment variable: `PMAN_DOC_PATH`. I personally have a directory within my main Obsidian vault so that I can edit the files in [Obsidian](https://obsidian.md/) and search with `pman`

## Usage

![VHS Demo](./demo.gif)

For more example code, see the [scripts] directory or the [tests].

## Project Status

See the `Open Issues` and/or the [CODE_TAG_SUMMARY]. For release history, see the [CHANGELOG].

## Contributing

We welcome pull requests! For your pull request to be accepted smoothly, we suggest that you first open a GitHub issue to discuss your idea. For resources on getting started with the code base, see the below documentation:

- [DEVELOPER_GUIDE]
- [STYLE_GUIDE]

## Code of Conduct

We follow the [Contributor Covenant Code of Conduct][contributor-covenant].

### Open Source Status

We try to reasonably meet most aspects of the "OpenSSF scorecard" from [Open Source Insights](https://deps.dev/pypi/personal_man)

## Responsible Disclosure

If you have any security issue to report, please contact the project maintainers privately. You can reach us at [dev.act.kyle@gmail.com](mailto:dev.act.kyle@gmail.com).

## License

[LICENSE]

[changelog]: ./docs/CHANGELOG.md
[code_tag_summary]: ./docs/CODE_TAG_SUMMARY.md
[contributor-covenant]: https://www.contributor-covenant.org
[developer_guide]: ./docs/DEVELOPER_GUIDE.md
[license]: https://github.com/kyleking/personal-man/LICENSE
[scripts]: https://github.com/kyleking/personal-man/scripts
[style_guide]: ./docs/STYLE_GUIDE.md
[tests]: https://github.com/kyleking/personal-man/tests
datascale 1.1.1
Functions for automatic scaling of matplotlib plot axes/resolution to data
License: MIT

<h1><img align="left" src="https://github.com/benkrichman/datascale/raw/main/images/datascale_icon.png" width="130">datascale</h1>

Functions for automatic scaling of matplotlib line width, marker width, fontsize, and resolution to data

\
[![Downloads](https://pepy.tech/badge/datascale)](https://pepy.tech/project/datascale)   
[![PyPI version](https://badge.fury.io/py/datascale.svg)](https://badge.fury.io/py/datascale)

## Installation

```bash
pip install datascale
```

or

```bash
pip install git+https://github.com/benkrichman/datascale.git@main
```

## Main Functions

### plotdatasize()

Scale line width, marker width, or fontsize for plots to correspond directly to the scale of data on either/both plot axes. For more detail see help output:
```python
help(datascale.plotdatasize)
```

![plotdatasize() example](https://github.com/benkrichman/datascale/raw/main/images/datascale_plotdatasize_test.png?raw=true)

To reproduce this image view test() in datascale.py or use
```python
datascale.test()
```

### plotdatadpi()

Scale dpi of output image to produce a certain number of points per data unit on either/both plot axis/axes. Useful for plots that need a certain amount of detail per axis unit (e.g. geographic projections). For more detail see help output:
```python
help(datascale.plotdatadpi)
```

![plotdatadpi() example](https://github.com/benkrichman/datascale/raw/main/images/datascale_plotdatadpi_test.png?raw=true)

To reproduce this image view test() in datascale.py or use
```python
datascale.test()
```
namedtuple-from-dict 0.10
namedtuple from dict / valid identifier from string
License: MIT
Keywords: namedtuple,dict,identifier


# namedtuple from dict / valid identifier from string 


```python
# Tested with:
# Python 3.9.13
# Windows 10

pip install namedtuple-from-dict

from namedtuple_from_dict import create_valid_identifier, dict_to_namedtuple

from string import printable
from random import choices, randrange

# startwith will be added if the original string starts with a number
# 9times6 -> aa_9times6

testdict = {
    1: "hallo",
    "n k q": 223,
    (1, 2, 4): {222, 333},
    "validkey1": "test",
    "validkey2": "tes1t",
    "notvalidkey!1": "tes1t",
}

testtuple = dict_to_namedtuple(dic=testdict, name="testdata", startwith="aa_")

print(testtuple)
for i in range(10):
    randomchars = "".join(choices(printable, k=randrange(3, 10)))
    varname = create_valid_identifier(randomchars, startwith="aa_")
    print(f"{randomchars=}")
    print(f"{varname=}")


# testdata(aa_1='hallo', n_k_q=223, aa_1_2_4={333, 222}, validkey1='test', validkey2='tes1t', notvalidkey_1='tes1t')
# randomchars=':ga(F'
# varname='ga_F'
# randomchars='lh[)iN>A/'
# varname='lh_iN_A'
# randomchars='fI&mE)'
# varname='fI_mE'
# randomchars='//YW'
# varname='YW'
# randomchars='aY\x0c'
# varname='aY'
# randomchars='k|\ts \x0b'
# varname='k_s'
# randomchars='!kGhJ`'
# varname='kGhJ'
# randomchars='8u*s'
# varname='aa_8u_s'
# randomchars='\\z;_cP'
# varname='z__cP'
# randomchars='e)=Qb\t7p'
# varname='e_Qb_7p'

	
```
gitspy 0.3.0
Intuitive Git for Python
License: MIT
Requires Python: >=3.8,<4.0
Keywords: commandline,git,script,tree,wrapper

gitspy
======
.. image:: https://img.shields.io/badge/License-MIT-yellow.svg
    :target: https://opensource.org/licenses/MIT
    :alt: License
.. image:: https://img.shields.io/pypi/v/gitspy
    :target: https://pypi.org/project/gitspy/
    :alt: PyPI
.. image:: https://github.com/jshwi/gitspy/actions/workflows/ci.yml/badge.svg
    :target: https://github.com/jshwi/gitspy/actions/workflows/ci.yml
    :alt: CI
.. image:: https://results.pre-commit.ci/badge/github/jshwi/gitspy/master.svg
   :target: https://results.pre-commit.ci/latest/github/jshwi/gitspy/master
   :alt: pre-commit.ci status
.. image:: https://github.com/jshwi/gitspy/actions/workflows/codeql-analysis.yml/badge.svg
    :target: https://github.com/jshwi/gitspy/actions/workflows/codeql-analysis.yml
    :alt: CodeQL
.. image:: https://codecov.io/gh/jshwi/gitspy/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/jshwi/gitspy
    :alt: codecov.io
.. image:: https://readthedocs.org/projects/gitspy/badge/?version=latest
    :target: https://gitspy.readthedocs.io/en/latest/?badge=latest
    :alt: readthedocs.org
.. image:: https://img.shields.io/badge/python-3.8-blue.svg
    :target: https://www.python.org/downloads/release/python-380
    :alt: python3.8
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/psf/black
    :alt: Black
.. image:: https://img.shields.io/badge/linting-pylint-yellowgreen
    :target: https://github.com/PyCQA/pylint
    :alt: pylint

Intuitive Git for Python
------------------------


Install
-------
Dependencies: git ^2.0.0 (tested)

``pip install gitspy``

Development

``poetry install``

Example Usage
-------------

Get branch
**********

Capture will store stdout, which can then be consumed by calling `git.stdout()`

Default is to return returncode and print stdout and stderr to console

.. code-block:: python

    >>> import gitspy
    >>> git = gitspy.Git()
    >>> git.init(capture=True)  # ['...']
    0

Consume stdout (a list containing a str)

.. code-block:: python

    >>> len(git.stdout())  # []
    1

No commands have been called yet since last call to `stdout` so stdout is empty

.. code-block:: python

    >>> len(git.stdout())  # []
    0

Stdout can be accrued

.. code-block:: python

    >>> git.init(capture=True)  # ['...']
    0
    >>> git.init(capture=True)  # ['...', '...']
    0
    >>> len(git.stdout())  # []
    2

Stdout is consumed

.. code-block:: python

    >>> len(git.stdout())  # []
    0

Get commit hash
***************

.. code-block:: python

    >>> git.rev_parse("HEAD", capture=True)  # ['...']
    0
    >>> len(git.stdout()[0])  # []
    40