semvec/pypi-packages huggingface dataset:
pymoc 0.5.2
Multi-Order Coverage map module for Python

Multi-Order Coverage map module for Python
==========================================

Introduction
------------

.. startpymocintro

PyMOC is a module for manipulating Multi-Order Coverage (MOC)
maps.  It includes support for reading and writing the three
encodings mentioned in the IVOA recommendation: FITS, JSON
and ASCII.

PyMOC also includes a utility program ``pymoctool`` to allow
MOC files to be manipulated from the command line.

.. endpymocintro

.. startpymocinstall

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

The module can be installed using the ``setup.py`` script::

    python setup.py install

Unit Tests
~~~~~~~~~~

Prior to installation, the unit tests can be run using::

    PYTHONPATH=lib python3 -m unittest

or::

    PYTHONPATH=lib python2 -m unittest discover

The `test-extra` directory contains additional tests which may take
longer to perform.  You can exclude these by specifying just the
plain `test` directory, for example with::

    PYTHONPATH=lib python -m unittest discover -s test

The routines included in the doctests should also be covered by
the unit tests.  However to ensure the documentation is correct,
they can be checked with::

    sphinx-build -b doctest doc doc/_build/doctest

Requirements
~~~~~~~~~~~~

For reading and writing data in FITS format, the ``astropy``
library is required.

``Healpy`` is needed for some of the utility functions such as
``plot_moc`` and ``catalog_to_moc``.

.. endpymocinstall

License
-------

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Additional Links
----------------

* `Documentation at Read the Docs <http://pymoc.readthedocs.io/en/latest/>`_
* `Repository at GitHub <https://github.com/grahambell/pymoc>`_
* `Entry on PyPI <https://pypi.python.org/pypi/pymoc>`_
xtiler 0.1.0
Coordinate system for tiling with hexagons.
Requires Python: >=3.8
Keywords: coordinate, grid, hexagon, tiling

# Hexa-tiling
Coordinate system for tiling with hexagons.

## What does the grid look like?

![Explaining illustration](images/illustration.jpg)

## How does it work?

### Rings and angles
The grid can be viewed as accumulation of concentric **rings**.
On the image, the **origin** is labelled 0,
surrounded by the **ring #1** composed of tiles 1-6,
surrounded by the **ring #2** composed of tiles 7-18.

### Numbering
Tiles are numbered from 0, in increasing order, starting at the
**origin** (center of the grid), spiraling around the **origin**,
with the first tile of each **ring** at 0°.

### Coordinates
Polar coordinates can be used to find a tile.
Each tile has a **radius** and an **angle**.

- The **radius** is the distance to the **origin**,
corresponding to the rank of the **ring** the tile belongs to.
- The **angle**, in degrees, is measured between the direction
"noon" (or "up", "north", etc) and the position of the tile.

## The maths behind it

### Ring length (Perimeter)
Let the ring length be $P$ and its rank $n$.

$$P(0) = 1$$

$$P(1) = 6$$

$$\forall n > 1, \quad P(n) = 2P(n-1)$$

$$\forall n > 0, \quad P(n) = 6 * 2^{n-1}$$

### Grid size (Area)
Let the number of tiles for a grid with $n$ rings be $A$.

$$A(n) = \sum^{n}_{i = 0}{P(i)}$$

$$= 1 + \sum^{n}_{i = 1}{6 * 2^{i-1}}$$

$$= 1 + 6 * \sum^{n-1}_{i = 0}{2^{i}}$$

$$= 1 + 6 * (2^n - 1)$$

$$= 6 * 2^n - 5$$

### Number from coordinates
Let the number of a tile be $X$, its radius $n$ and its angle $\alpha$.

$$X(0, \alpha) = 0$$

$$\forall n > 0, \quad  X(n, \alpha) = A(n - 1) + \frac{\alpha}{360}P(n)$$

$$= 6 * 2^{n-1} - 5 + \frac{\alpha}{360}*6 * 2^{n-1}$$

$$= 6 * 2^{n-1}(1 + \frac{\alpha}{360}) -5$$

### Radius
To find the radius $n$ given the number $X$:

$$X = 0 \Leftrightarrow n = 0$$

$$0 \le \alpha < 360$$

$$\implies \forall n > 0, \quad X(n, 0) \quad \le \quad X(n,\alpha) \quad < \quad X(n, 360)$$

$$\implies \forall n > 0, \quad A(n - 1) + \frac{0}{360}P(n) \quad \le \quad X \quad < \quad A(n - 1) + \frac{360}{360}P(n)$$

$$\implies \forall n > 0, \quad A(n - 1) \quad \le \quad X \quad < \quad A(n - 1) + P(n) = A(n)$$

$$\implies \forall n > 0, \quad 6 * 2^{n-1} - 5 \quad \le \quad X \quad < \quad 6 * 2^n - 5$$

$$\implies \forall n > 0, \quad 2^{n-1} \quad \le \quad \frac{X + 5}{6} \quad < \quad 2^n$$

$$\implies \forall n > 0, \quad n-1 \quad \le \quad \log _2(\frac{X + 5}{6}) \quad < \quad n$$

$$\implies \forall n > 0, \quad n = \lfloor \log _2(\frac{X + 5}{6}) \rfloor + 1$$

### Angle
Tile 0 has no angle.

$$\forall n > 0, \quad X(n, \alpha) = 6 * 2^{n-1}(1 + \frac{\alpha}{360}) -5$$

$$X + 5 = 6 * 2^{n-1}(1 + \frac{\alpha}{360})$$

$$\frac{X + 5}{6 * 2^{n-1}} = 1 + \frac{\alpha}{360}$$

$$360(\frac{X + 5}{6 * 2^{n-1}} - 1) = \alpha$$

$$360(\frac{X + 5}{6 * 2^{\lfloor \log _2(\frac{X + 5}{6}) \rfloor + 1-1}} - 1) = \alpha$$

$$360(\frac{X + 5}{6 * 2^{\lfloor \log _2(\frac{X + 5}{6}) \rfloor }} - 1) = \alpha$$
liara-cloud 2.0
Unofficial library for account management and services in Liara Cloud
Requires Python: ~=3.7
Keywords: liara, liara-cloud

## Liara
> Unofficial library for account management and services in [Liara](https://liara.ir) Cloud

### Quik start
```python
from liara import Client

client = Client(name="my_account")

result = client.get_my_account()
print(result.fullname)
```

### Another Login Example
```python
from liara import Client

api_token = "API_TOKEN"

client = Client(api_token=api_token)

result = client.get_my_account()
print(result.fullname)
```

### Contribution
Contributions to the project are welcome! If you find any bugs or have suggestions for improvements, please open an issue or submit a pull request on GitHub.

### Install & Update
```bash
pip install -U liara-cloud
```