semvec/pypi-packages huggingface dataset:
gsselect 1.3.2
Gemini guide star selection and URL target-of-opportunity (TOO) triggering

# GSselect
This repository provides a python example of using the 
Gemini Observatory API for triggering template observations
that are On Hold. Details of the ToO activation process are
given [here](https://www.gemini.edu/observing/phase-ii/useful-know#ToO).
The document [urltoo_readme.txt](https://github.com/bryanmiller/gsselect/blob/master/urltoo_readme.txt)
give more details about the API.

The example triggering script is urltrigger.py but most of the 
code is for selecting a guide star. The triggering API does
not support the new automated guide star selection features 
in the Observing Tool. The script gsselect.py mimics these 
features and should find an appropriate guide star if one is 
available in the UCAC4 catalog. It can also display the guide
star candidates and the wavefront sensor field of view on a 
DDS image of the field.

Gsselect also has a 'find' position angle (PA) feature
that we never implemented in the OT. This will pick the best guide
star available and set the PA so that it is reachable. This is 
useful with the GMOS and F2 OIWFS guide probes if the PA
is unimportant.

## Installation
The scripts require a standard Python distribution that includes 
numpy (at least 1.15.4), matplotlib, astropy, and requests.

Then install the scripts by downloading and unpacking the zip
file or use git, e.g.

git clone https://github.com/bryanmiller/gsselect.git

The gsselect guide star selection routines can also be installed as a pip package with

pip install gsselect

## Authentication
Authentication for the trigger requires a 'user key' for the 
Observing Tool that is associated with an email address that
is included in the active program. See [this page](https://www.gemini.edu/observing/phase-ii/ot/ot-description/menu-bar#Keychain)
for more information on user keys and how to obtain one.
kubeobject 0.2.1
Easily Manage Kubernetes Objects.

# KubeObject

_A simple to use wrapping on top of Kubernetes custom resources with
object oriented semantics._

KubeObject allows you to use Kubernetes Custom Objects in an object
oriented way. It works by defining an object, by instantiating it with
a `name` and `namespace` and then "bounding" this object to a
Kubernetes object by creating it, or loading it, if it already exists.

# Quick Start

In the following example we create an "Istio" object, which will
manage one of the Custom Objects defined by the
[Istio](https://operatorhub.io/operator/istio) operator. A simple
lifecycle is explained below.

``` python
# Builds the object, but it is "unbound", this is, it is not
# referring to an actual object in Kubernetes.
istio = CustomObject("my-istio", "my-namespace", plural="istios", api_version="istio.banzaicloud.io/v1beta1")

# Let's pass the simplest spec we can
istio["spec"] = {"version": "1.1.0", "mtls": True}

# And now create it; after creation the object is "bound"
istio.create()
```

Updating the object's `Spec` and checking the object's `Status` is one
of our goals as well, like in the following example:

``` python
# The Istio operator should have started working on deploying
# this new Custom Resource. Let's get the status of the object
print(istio["status"])

# This is empty, because since calling `create()` we have not
# updated from the actual object in Kubernetes. Let's get an
# up-to-date object.
istio.reload()

# I want to avoid calling `reload()` everytime I need a new
# version
istio.auto_reload = True

# Now we'll wait until the object has reached a given status:
while istio["status"]["Status"] == "Reconciling": time.sleep(5)

# Check the Status after "Reconciling"
print("Our status is:", istio["status"]["Status"])
```

After doing all its work, the `Istio` object might need to be deleted:

``` python
istio.delete()
```
htmldocx 0.0.6
Convert html to docx
Requires Python: >=3.6

# htmldocx
Convert html to docx

Dependencies: `python-docx` & `bs4`

### To install

`pip install htmldocx`

### Usage

Add strings of html to an existing docx.Document object

```
from docx import Document
from htmldocx import HtmlToDocx

document = Document()
new_parser = HtmlToDocx()
# do stuff to document

html = '<h1>Hello world</h1>'
new_parser.add_html_to_document(html, document)

# do more stuff to document
document.save('your_file_name')
```

Convert files directly

```
from htmldocx import HtmlToDocx

new_parser = HtmlToDocx()
new_parser.parse_html_file(input_html_file_path, output_docx_file_path)
```

Convert files from a string

```
from htmldocx import HtmlToDocx

new_parser = HtmlToDocx()
docx = new_parser.parse_html_string(input_html_file_string)
```

Change table styles

Tables are not styled by default. Use the `table_style` attribute on the parser to set a table
style. The style is used for all tables.

```
from htmldocx import HtmlToDocx

new_parser = HtmlToDocx()
new_parser.table_style = 'Light Shading Accent 4'
```

To add borders to tables, use the `TableGrid` style:

```
new_parser.table_style = 'TableGrid'
```

Default table styles can be found here: https://python-docx.readthedocs.io/en/latest/user/styles-understanding.html#table-styles-in-default-template
almalinux-git-utils 0.0.1
Utilities for working with the AlmaLinux OS Git server
Requires Python: >=3.6

# almalinux-git-utils

Utilities for working with the AlmaLinux OS Git server.


## alma_get_sources

The `alma_get_sources` script downloads sources and BLOBs from the AlmaLinux
sources cache.

### Usage

Run the `alma_get_sources` in a git project root directory:

1. Clone an AlmaLinux RPM package git project from
   [git.almalinux.org](https://git.almalinux.org).
2. Switch to a required branch.
3. Run the `alma_get_sources` tool:
   ```shell
   $ alma_get_sources
   ```


## alma_blob_upload

The `alma_blob_upload` script uploads sources and BLOBs to the AlmaLinux
sources cache.

### Prerequirements

Create an AWS credentials file ~/.aws/credentials with the following content:

```ini
[default]
aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET_KEY
```


### Usage

The utility supports two types of input: a CentOS git repository metadata file
or a list of files to upload.

For CentOS repositories workflow will be the following:

1. Install the `get_sources.sh` script from the
   [centos-git-common](https://git.centos.org/centos-git-common) repository.
2. Clone a project and download its sources as described on the CentOS
   [Wiki](https://wiki.centos.org/Sources).
3. Run the `alma_blob_upload` tool (don't forget to replace `PROJECT_NAME` with
   an actual project name):
   ```shell
   $ alma_blob_upload -i .PROJECT_NAME.metadata
   ```

Alternatively, you can upload a list of files in the following way:

```shell
$ alma_blob_upload -f SOURCES/FILE_1 SOURCES/FILE_N
```

The `alma_blob_upload` utility can also generate a CentOS-compatible metadata
file:

```shell
$ alma_blob_upload -o .PROJECT_NAME.metadata -f SOURCES/FILE_1 SOURCES/FILE_N
```


## License

Licensed under the GPLv3 license, see the LICENSE file for details.
mutiny 0.3.1a0
Async ready API wrapper for Revolt API written in Python.
Requires Python: >=3.9,<3.10

# Mutiny
> Async ready API wrapper for Revolt API written in Python.

[![Sponsor on GitHub](https://img.shields.io/github/sponsors/jack1142?logo=github)](https://github.com/sponsors/jack1142)
[![Documentation Status](https://readthedocs.org/projects/mutiny/badge/)](https://mutiny.readthedocs.io)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://user-images.githubusercontent.com/6032823/111363465-600fe880-8690-11eb-8377-ec1d4d5ff981.png)](https://github.com/PyCQA/isort)
[![We use pre-commit!](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## Installation

**Python 3.9 or higher is required**

To install the library, you can just run the following command:

```sh
# Linux/OS X
python3.9 -m pip install -U mutiny

# Windows
py -3.9 -m pip install -U mutiny
```

## Documentation

There is no documentation yet, you can look at [examples folder](examples/)
if you want to get the hang of library's basic functionality.

## Links

[Mutiny's official Revolt server](https://app.revolt.chat/invite/GGW5WsgZ)
[GitHub Sponsors](https://github.com/sponsors/jack1142)

## License

Distributed under the Apache License 2.0. See ``LICENSE`` for more information.

---

> Jakub Kuczys &nbsp;&middot;&nbsp;
> GitHub [@jack1142](https://github.com/jack1142)
pyrealpro 0.2.0
Tools for building iRealPro songs.
Requires Python: >=3.6

# PyRealPro

The pyrealpro module provides classes that can be used to build a representation of a song, and render it in the import
URL format used by the iRealPro app.  It assumes that you have a passing familiarity with the 
[iRealPro import format](https://irealpro.com/ireal-pro-file-format/), but hopefully makes it easier to programmatically 
construct an iRealPro song than resorting to brute-force string concatenation.

## Concepts

The `Song` class is used to define a song that you wish to import into iRealPro. In addition to basic information like
title, composer, key, and style, a song's `measures` property may contain a list of `Measure` objects.

A `Measure` object's `chords` property will have one or more chord names, as well as additional properties that describe
time signature (as a `TimeSignature` object), barlines, endings, rehearsal marks, and text to be displayed underneath.

The `TimeSignature` class provides simple objects used by the `Measure` class to properly format the output ultimately
used by the `Song` class to generate an iRealPro URL.

## Example

```
from pyrealpro import Song, Measure, TimeSignature

s = Song(title="Automation Blues", composer="pyrealpro", key='G', style='New Orleans Swing',
                 composer_name_first="Otto",
                 composer_name_last="Matonne")

s.measures.append(Measure(chords='G7', barline_open='{', staff_text='Generated by pyrealpro'))
s.measures.append(Measure(chords='G7'))
s.measures.append(Measure(chords='G7'))
s.measures.append(Measure(chords='G7', barline_close=']'))

s.measures.append(Measure(chords='C7', barline_open='['))
s.measures.append(Measure(chords='C7'))
s.measures.append(Measure(chords='G7'))
s.measures.append(Measure(chords='G7', barline_close=']'))

s.measures.append(Measure(chords='D7', barline_open='['))
s.measures.append(Measure(chords='C7'))

s.measures.append(Measure(chords='G7', ending='N1'))
s.measures.append(Measure(chords='D7', barline_close='}'))

s.measures.append(Measure(chords='G7', ending='N2'))
s.measures.append(Measure(chords='G7', barline_close='Z'))

print(s.url())

```

The above program will output the following URL, which can be imported into iRealPro:

[irealbook://Automation%20Blues=Matonne%20Otto=New%20Orleans%20Swing=G=n=%7BT44%3CGenerated%20by%20pyrealpro%3EG7%20%20%20%7CG7%20%20%20%7CG7%20%20%20%7CG7%20%20%20%5D%5BC7%20%20%20%7CC7%20%20%20%7CG7%20%20%20%7CG7%20%20%20%5D%5BD7%20%20%20%7CC7%20%20%20%7CN1G7%20%20%20%7CD7%20%20%20%7DN2G7%20%20%20%7CG7%20%20%20Z](irealbook://Automation%20Blues=Matonne%20Otto=New%20Orleans%20Swing=G=n=%7BT44%3CGenerated%20by%20pyrealpro%3EG7%20%20%20%7CG7%20%20%20%7CG7%20%20%20%7CG7%20%20%20%5D%5BC7%20%20%20%7CC7%20%20%20%7CG7%20%20%20%7CG7%20%20%20%5D%5BD7%20%20%20%7CC7%20%20%20%7CN1G7%20%20%20%7CD7%20%20%20%7DN2G7%20%20%20%7CG7%20%20%20Z)

## iReal Pro File Format Reference

<https://irealpro.com/ireal-pro-file-format/>
slumba 3.1.0
JITted SQLite user-defined functions and aggregates
Requires Python: >=3.7.8,<3.10

# Put some Numba in your SQLite

## Fair Warning

This library does unsafe things like pass around function pointer addresses
as integers.  **Use at your own risk**.

If you're unfamiliar with why passing function pointers' addresses around as
integers might be unsafe, then you shouldn't use this library.

## Requirements

* Python `>=3.7`
* `numba`

Use `nix-shell` from the repository to avoid dependency hell.

## Installation

* `poetry install`

## Examples

### Scalar Functions

These are almost the same as decorating a Python function with `numba.jit`.

```python
from typing import Optional

from slumba import sqlite_udf


@sqlite_udf
def add_one(x: Optional[int]) -> Optional[int]:
    """Add one to `x` if `x` is not NULL."""

    if x is not None:
        return x + 1
    return None
```


### Aggregate Functions

These follow the API of the Python standard library's
`sqlite3.Connection.create_aggregate` method. The difference with slumba
aggregates is that they require two decorators: `numba.experimental.jit_class` and
`slumba.sqlite_udaf`. Let's define the `avg` (arithmetic mean) function for
64-bit floating point numbers.

```python
from typing import Optional

from numba.experimental import jitclass

from slumba import sqlite_udaf


@sqlite_udaf
@jitclass
class Avg:
    total: float
    count: int

    def __init__(self):
        self.total = 0.0
        self.count = 0

    def step(self, value: Optional[float]) -> None:
        if value is not None:
            self.total += value
            self.count += 1

    def finalize(self) -> Optional[float]:
        if not self.count:
            return None
        return self.total / self.count
```

### Window Functions

You can also define window functions for use with SQLite's `OVER` construct:

```python
from typing import Optional

from numba.experimental import jitclass

from slumba import sqlite_udaf


@sqlite_udaf
@jitclass
class WinAvg:  # pragma: no cover
    total: float
    count: int

    def __init__(self) -> None:
        self.total = 0.0
        self.count = 0

    def step(self, value: Optional[float]) -> None:
        if value is not None:
            self.total += value
            self.count += 1

    def finalize(self) -> Optional[float]:
        count = self.count
        if count:
            return self.total / count
        return None

    def value(self) -> Optional[float]:
        return self.finalize()

    def inverse(self, value: Optional[float]) -> None:
        if value is not None:
            self.total -= value
            self.count -= 1
```

#### Calling your aggregate function

Similar to scalar functions, we register the function with a `sqlite3.Connection` object:

```python
>>> import sqlite3
>>> from slumba import create_aggregate, create_function
>>> con = sqlite3.connect(":memory:")
>>> create_function(con, "add_one", 1, add_one)
>>> con.execute("SELECT add_one(1)").fetchall()
[(2,)]
```