semvec/pypi-packages huggingface dataset:
pcf8574 0.1.3
Library for communication with PCF8574 IO expander over I2C
License: MIT

PCF8574
=======

This is a Python library for use with the [PCF8574](http://www.nxp.com/documents/data_sheet/PCF8574.pdf) I2C IO expander chip. It abstracts the 8 bit IO port as a Python list, and allows the read/writing of individual pins or the whole port at once.

## Installation

The library depends on the `smbus-cffi` package. You may need to `apt-get install libffi-dev` if you're on a debian based system. Otherwise, simply:

```
pip install pcf8574
```

## Usage

```python
In [1]: from pcf8574 import PCF8574

In [2]: i2c_port_num = 1

In [3]: pcf_address = 0x20

In [4]: pcf = PCF8574(i2c_port_num, pcf_address)

In [5]: pcf.port
Out[5]: [True, True, True, True, True, True, True, True]

In [6]: pcf.port[0] = False

In [7]: pcf.port
Out[7]: [False, True, True, True, True, True, True, True]

In [8]: pcf.port = [True, False, True, False, True, False, True, False]

In [9]: pcf.port
Out[9]: [True, False, True, False, True, False, True, False]

In [10]: pcf.port[7]
Out[10]: False

In [11]: pcf.port[6]
Out[11]: True
```
cutsets 1.4
Computation of minimal cutsets using MOCUS Algorithm
License: MIT
Requires Python: >=3.6

# FT-MCS
FT-MCS is small library which computes the minimal cutsets of a given fault tree using the famous MOCUS algorithm [1, 2]. 

## Installation 

Install from [PyPi](https://pypi.org/project/cutsets/)

> pip install cutsets

## Usage

### 1) aircraft.csv

```csv
TOP,And,B1 B2
B1,Or,C1 C2 C3 C4
B2,Or,C5 C6 C7
C1,And,D1 D2
C2,And,D1 E2
E2,Or,D3 D4
C3,And,D5 E3
E3,Or,D2 D6
C4,And,D1 D7
C5,And,D5 E5
E5,Or,D2 D6
C6,And,D8 E6
E6,Or,D2 D4 D6
C7,And,D8 E7
E7,Or,D4 D9
```

```python
import cutsets

ft = cutsets.get_ft(aircraft.csv)

cs = cutsets.mocus(ft)

print (cs)
```

```
output:

[['C2', 'B2'], ['B2', 'C3'], ['C4', 'B2'], ['D1', 'B2', 'D2']]
```

### 2) example.py


```python
#!/usr/bin/env python3

import cutsets 

simple_ft = [("TOP", "Or", ["E1", "E2"]),
      ("E1", "Or", ["a", "b"]),
      ("E2", "And", ["c", "d"])]

cs = cutsets.mocus (simple_ft)
```

> ./example.py

```
Output:

[['a'], ['b'], ['d', 'c']]

```

## References

1. N. Limnios and R. Ziani, "An Algorithm for Reducing Cut Sets in Fault-Tree Analysis," in IEEE Transactions on Reliability, vol. 35, no. 5, pp. 559-562, Dec. 1986, doi: 10.1109/TR.1986.4335545.
2. J. B. Fussell, W. E. Vesely,"A New Methodology for Obtaining Cut Sets for Fault Trees", Trans. Am. Nucl. Soc., vol 15, 1972 Jun, pp 262-263.
aioimap 0.2.7
Receive e-mails from an IMAP server asynchronously and trigger a callback with the message.
License: MIT

# aioimap: Asyncio IMAP client
Receive e-mails from an IMAP server asynchronously and trigger a callback with the message.

## Dependencies
aioimap requires:
* Python (>=3.7)
* aioimaplib (>=0.7.18)
* python-dotenv
* fastapi (>=0.61)
* uvicorn (>=0.12)

## Usage
Assume a project structure as so:  
```
project  
|  
|--app.py  
|--.env  
```

**app.py:**
```
from aioimap import Message

def callback(m: Message):
    print("Subject: {}".format(m.subject))
    print("Sender: {}".format(m.sender))
    # do some other fun stuff
```

**Terminal (without .env file):**
```
cd path/to/project
python -m aioimap --host <EMAILSERVER> -u <EMAILID> -p <PWD> -a "app:callback"
```

If you have a **.env** file in the same directory:
```
SERVER=<EMAILSERVER>
EMAIL=<EMAILID>
PASS=<PWD>
```

Then **Terminal (with .env file):**
```
cd path/to/project
python -m aioimap -a "app:callback"
```