semvec/pypi-packages huggingface dataset:
pagerduty-auto-ack 1.0.0
Automatic acks for the PagerDuty incidents
License: MIT
Requires Python: >=3.11,<4.0

# pagerduty-auto-ack

Sometimes you can not acknowledge an incident manually, but you also can not really respond to it.
These are (and should be when you are on-call) usually short moments, taking about 15-20 minutes.
A good example here is taking a shower.
In such cases you may want to automatically acknowledge the incidents, to prevent loud notifications or calls from
disturbing other people.

This script monitors the incidents that are assigned to you and acks them if needed.
At the end of execution (when stopped with C^c) it displays the incidents that it acknowledged.

```
usage: pagerduty-auto-ack [-h] --pagerduty-api-key PAGERDUTY_API_KEY [--interval INTERVAL] [--urgency {high,low}]

Monitor and automatically ACKnowledge PagerDuty incidents

options:
  -h, --help            show this help message and exit
  --pagerduty-api-key   PAGERDUTY_API_KEY
  --interval INTERVAL   how often (in seconds) to run the check
  --urgency {high,low}  defaults to all urgencies
```

## Requirements

It requires a user-level API key to run.
This API key starts with the `u+` prefix and can be generated by following the [PagerDuty API docs](https://support.pagerduty.com/docs/api-access-keys#section-generate-a-user-token-rest-api-key).

## How to run it

Fast and easy way is to use `pipx`:

```
pipx install pagerduty-auto-ack
pagerduty-auto-ack --pagerduty-api-key <api_key>
```

For development you can clone the repo and run the script with `poetry`:

```
poetry install
poetry run pagerduty-auto-ack --pagerduty-api-key <api_key>
```
spectre-api 0.5.5
Wrapper to use the Lumeta Spectre API
License: MIT

# spectre-api-python

## General
This module is intended to make it a bit easier to work with
The Firemon Corporation's Lumeta (was named "Spectre" API.

Lumeta and Spectre are both registered trademarks of Firemon 

Install this module by running `pip3 install spectre-api`

### Introduction
This Python module is intended to be a relatively light weight wrapper around the Spectre API.
The idea is to abstract out some of the authentication and paging pieces to make it easier to
focus on fine-tuning the actual underlying calls.  Basically, you configure a server
(currently using username/password or API Key authentication) and then have it perform API calls.
For example:
```python
>>> import spectreapi
>>> s = spectreapi.UsernameServer("cc", "username", "password")
>>> r = s.get("zonedata/devices", params = { "filter.zone.id": 1} )
>>> for d in r:
...     if d['ip'] is not None:
...             print(d['ip'])
...
10.2.1.1
10.201.0.1
10.201.0.7
10.202.0.1
10.202.0.2
172.18.1.180
>>>
```
Another, slightly cleaner way to do this would be to use the query methods
```python
>>> import spectreapi
>>> z = spectreapi.UsernameServer('cc','username','password').get_zone_by_name('Zone1')
>>> q=z.query().detail('Attributes')
>>> for d in q.run():
...     if d['ip'] is not None:
...             print(d['ip'])
...
10.2.1.1
10.201.0.1
10.201.0.7
10.202.0.1
10.202.0.2
172.18.1.180
>>>
```


## Servers
A **Server** is the base class that has most of the functionality
needed to use the Spectre API.  You'll instantiate a more specific
**Server** based on which authentication method you're using.

### UsernameServer
`spectreapi.UsernameServer(<server>, <username>, <password>, [<page_size>,] [<verify>])`
Where:

`<server>` = The IP address or DNS name of the Spectre Command Center 

`<username>` = Username

`<password>` = Password 

`<page_size>` = How many results should a GET request return at a time.

`<verify>` = Should we verify the SSL certificate of the server (True or False, defaults to False).  You'll want to leave this a False unless you've given your command center an actual SSL certificate.



Behind the scenes, this makes an API call to `system/information` with basic authentication
(over https) and then uses the resulting JSESSIONID cookie for the rest of the time.

### APIKeyServer
`spectreapi.APIKeyServer(<server>, <api_key>, [, <page_size>] [, <verify>])`
Where:

`<server>` = The IP address or DNS name of the Spectre Command Center 

`<api_key>` = API Key for API access.  You get this via the GUI or by issuing the
`user key new <username>` command at the command center CLI.

`<page_size>` = How many results should a GET request return at a time.

`<verify>` = Should we verify the SSL certificate of the server (True or False, defaults to False).  You'll want to leave this a False unless you've given your command center an actual SSL certificate.



## GET, POST, PUT, DELETE

## Notes on using the underlying Spectre API
parsematic 1.0.0
Parsematic: a basic math parser written in python
License: MIT
Requires Python: >=3.7,<4.0

<img src="https://img.shields.io/github/actions/workflow/status/infibrocco/parsematic/python-package.yml?style=for-the-badge" height="25"> <img src="https://img.shields.io/badge/license-MIT-0?style=for-the-badge" height="25"> <img src="https://img.shields.io/github/repo-size/infibrocco/parsematic?style=for-the-badge" height="25"> <img src="https://sloc.xyz/github/infibrocco/parsematic/?style=for-the-badge" height="25"> <img src="https://img.shields.io/github/stars/infibrocco/parsematic?style=for-the-badge" height="25"> <img src="https://img.shields.io/badge/python_version-3.7%2C%203.8%2C%203.9%2C%203.10%203.11%2C%203.12-37?style=for-the-badge" height="25">
<img src="https://forthebadge.com/images/featured/featured-built-with-love.svg" height="25">
<img src="https://forthebadge.com/images/featured/featured-powered-by-electricity.svg" height="25">
<img src="https://img.shields.io/badge/code_style-black-000000.svg?style=for-the-badge" height="25">
<img src="https://img.shields.io/badge/imports-isort-1674b1?style=for-the-badge&labelColor=ef8336" height="25">
<img src="https://img.shields.io/badge/mypy-checked-2a6db2?style=for-the-badge" height="25">

# Parsematic

This is a basic math parser that can parse mathematical expressions.

## Features

Parses a variety of mathematical expressions, including:

- Integers `(0, 1, 5, -7)`, Floats `(3.14159, 2.7, 0.5)`

- Basic arithmetic operations `(+, -, \*, /, \*\*, //, %)`

- Constants `PI, TAU, NAN, E, INF`

- Comparison operators `(==, !=, <, >, <=, >=)`

- Parentheses for grouping

- Mathematical functions `(sin, cos, tan, abs, sqrt, log, fact, gcd, lcm, xor, int, float, min, max)`

## Usage

First, install it with:

```
pip install parsematic
```

Import the MathParser class:

```Python
from math_parser import MathParser
```

Create a MathParser instance:

```Python
parser = MathParser()
```

Use the parse() method to parse and evaluate an expression:

```Python
result = parser.parse("2 + 3 * (4 - 1)")
print(result) # Output: 11
```

Or, use it from the command line

```Python
python -m parsematic "2 + 3 * (4 - 1)"
```

Supported Operators:

- Arithmetic operators: `+, -, \_, / (true division), // (floor division), \*\* (exponentiation), % (modulo)`
- Comparison operators: `==, !=, <, >, <=, >=`
- Supported Functions
  `sin, cos, tan, abs, sqrt, log,
fact (factorial),
gcd (greatest common divisor),
lcm (least common multiple),
xor (bitwise exclusive or),
int, float (type conversions),
min, max`

## Error Handling

The parser will raise exceptions for invalid syntax or unsupported operations.

## Additional Notes

The parser currently does support constants or user-defined functions (although you have to modify MathFunc.funcs). (but not variables within the parser itself)

## Contributing

Pull requests are welcome!