semvec/pypi-packages huggingface dataset:
apc-ipmi-monitor-ericbo 0.1.1
Trigger a graceful shutdown on all servers in the event there is an extended power outage.
Requires Python: >=3.6

# ericbo/apc-ipmi-monitor 
![Python package](https://github.com/ericbo/apc-ipmi-monitor/workflows/Python%20package/badge.svg)
![Upload Python Package](https://github.com/ericbo/apc-ipmi-monitor/workflows/Upload%20Python%20Package/badge.svg)

**WARNING!** This is just a prof of concept I created during some free time. It
is not in a state were I would use it in my own homelab yet.

A tool designed for non enterprise APC branded UPS's. This will allow you to define
many IPMI devices across your network and will trigger a graceful shutdown on all
servers in the event there is an extended power outage.

## Getting Started
In the system that will be directly interfacing with the APC UPS, you must have
apcupsd and ipmitool installed. On Ubuntu, this can be installed with the following
commands:

```shell script
sudo apt-get -y install apcupsd
sudo apt-get -y install ipmitool
```

### Running apcupsd
For this script to monitor the status of your APC battery **apcupsd** must be running.
Assuming you are using an APC with a single USB connection, make sure `UPSCABLE`
and `UPSTYPE` are both set to **usb** in your `/etc/apcupsd/apcupsd.conf` file. I
would also suggest commenting out `DEVICE /dev/ttyS0`. Example:

```text
## apcupsd.conf v1.1 ##
...
UPSCABLE usb
...
UPSTYPE usb
...
#DEVICE /dev/ttyS0
```

[source](https://www.pontikis.net/blog/apc-ups-on-ubuntu-workstation)

### Running the Monitor
You will need pip installed, specifically pip for python 3. You can then directly
install this package via pypi.org by running the following:

```text
sudo apt-get -y install python3-pip
pip3 install apc-ipmi-monitor-ericbo
```

Next create a simple config file with a list of your servers & credentials:

```yaml
servers:
  server 1:
    hostname: 0.0.0.0
    username: ADMIN
    password: ADMIN
  server 2:
    hostname: 0.0.0.0
    username: ADMIN
    password: ADMIN
apc_shutdown_threshold:
  field: BCHARGE # Which field do you want to consider
  value: 80      # When the field dips bellow this value, all servers will shutdown
```

Finally you can get a quick overview of all your IPMI devices by running:
```text
apc-ipmi-monitor monitoring server-status
```

### Running on Startup
Finally, you will want to ensure this monitor is being ran regularly. I would
suggest using systemctl or crontabs. The example bellow is a simple crontab setup.
In the future there will be a full guide on setting this up with systemctl.

```text
crontab -e

* * * * * python /home/user/upc-ipmi-tool/src/__main__.py # Run every minute
```
getsecret 0.0.6
Reads credentials from a yaml file

# getsecret

Reads credentials from a file `.getsecret.yaml`

## Install

```bash
pip install getsecret
```

## Using

Create a file `.getsecret.yaml`. It should be in YAML format. An example follows:

```yaml
username: foobar
password: supersecret
```

Now you can access those variables in your code as follows:

```python
from getsecret import getsecret
username = getsecret('username')
password = getsecet('password')
```

Now the values of username and password are the ones specified in `.getsecret.yaml` (foobar and supersecret, respectively).

The file `.getsecret.yaml` can be located in the working directory (`./.getsecret.yaml`), or at the user's home directory (`~/.getsecret.yaml`)

If you pass an additional parameter, it will be used as the default if the key is not found in `.getsecret.yaml`. For example, the following will look for the `username` key in `.getsecret.yaml`, and will default to `root` if it is not found:

```python
from getsecret import getsecret
username = getsecret('username', 'root')
```

## Author

[Geza Kovacs](https://github.com/gkovacs)

## License

MIT

## Related

[getsecret npm package](https://www.npmjs.com/package/getsecret) for javascript on browser/nodejs
BIO-PEPPA 1.2.1
Phylogeny Enhanded Prediction of PAn-genome https://doi.org/10.1101/2020.01.03.894154
Keywords: bioinformatics,microbial,genomics,MLST,pan-genome

About PEPPA
PEPPA (Phylogeny Enhanced Pipeline for PAn-genome) is a pipeline that can construct a pan-genome from thousands of genetically diversified bacterial genomes. PEPPA implements a combination of tree- and synteny-based approaches to identify and exclude paralogous genes, as well as similarity-based gene predictions that support consistent annotations of genes and pseudogenes in individual genomes.

Citation
If you use GrapeTree please cite the pre-print in BioRxiv:

Z Zhou, M Achtman (2020) "Accurate reconstruction of the pan- and core- genomes of bacteria with PEPPA" bioRxiv, doi: `https://doi.org/10.1101/2020.01.03.894154 <https://doi.org/10.1101/2020.01.03.894154>`_

* `installation <docs/source/usage/installation.rst>`_
* `quickstart <docs/source/usage/quickstart.rst>`_
* `parameters <docs/source/usage/parameters.rst>`_
* `inputs <docs/source/usage/inputs.rst>`_
* `outputs <docs/source/usage/outputs.rst>`_