semvec/pypi-packages huggingface dataset:
cbpi4-PCF8574-GPIO 0.0.6
CraftBeerPi4 PCF8574 Actor Plugin
Keywords: globalsettings

# CraftBeerPi4 PCF8574 IO Actor Plugin 

### PCF8574 based Actor

Plugin will add an PCF8574Actor which has to possibility to define up 8 additional actors to your pi. The board needs to be connected via I2C
Theoretically, multiple boards (up to 8) could be connected with different addresses to make up to 64 IO ports available. However, the pulgin supports one board.

### Installation: 
- sudo pip3 install cbpi4-PCF8574-GPIO
- or install from repo: sudo pip3 install https://github.com/avollkopf/cbpi4-PCF8574-GPIO/archive/main.zip
	
### Usage:

- Configure the PCF8574 I2C Address in the cbpi global settings. 

![PCF8574 I2C address Settings](https://github.com/avollkopf/cbpi4-PCF8574-GPIO/blob/main/PCF8574_Address_Settings.png?raw=true)

- Add an actor under Hardware/Actor and select PCF8574Actor
- Select the pin you want to switch (p0 to p7)
- Select 2 or 5 seconds for the Samplingtime (Will define the 'Resolution' for Power settings)
- Select Inverted yes or no. No means, that the pin will be on high if the sensor is active

### Hardware requirements:

Some information can be found here: https://www.instructables.com/PCF8574-GPIO-Extender-With-Arduino-and-NodeMCU/
Connect the device to 5 Volt, GND and your I2C bus. Check the Address ans set it to a different address if required
According to the datasheet, the pins can handle up to 25 mA. If you want to trigger an SSR or a relais, it is recommended to add a darlington array like the ULN2308

### Changelog:

- 10.06.23: (0.0.6) bump version to release
- 02.06.23: (0.0.6.rc1) Added cbpi4 version requirement
- 07.04.23: (0.0.6.a1) Added fucntions for plugins settings selection branches of server and ui
- 11.05.22: (0.0.5) Updated README (removed cbpi add)
- 10.05.22: (0.0.4) Removed cbpi dependency
- 10.12.21: (0.0.3) Updated README
- 09.12.21: (0.0.2) Bug Fix for power
- 09-12-21: (0.0.1) Initial release
morsecode-enhanced 1.0.3
A package for encoding and decoding Morse code.
Requires Python: >=3.6

# MorseCodeEnhanced

MorseCodePlus is a Python package that provides functionality for encoding and decoding Morse code.

## Installation

You can install MorseCodePlus using pip:

```shell
pip install morsecode_enhanced
```
 
# Usage

## Encoding

To encode text into Morse code, you can use the encode function:

```python
from morsecode_enhanced import MorseCode

mc = MorseCode()
encoded_word = mc.encode_word('Hello, World!')
print(encodex_word)


```

Output:
```text
.... . .-.. .-.. --- --..-- / .-- --- .-. .-.. -.. -.-.--
```

## Decoding

To decode Morse code into text, you can use the decode function:

```python
from morsecode_enhanced import MorseCode

mc = MorseCode()
decoded_message = mc.decode('.... . .-.. .-.. --- --..-- / .-- --- .-. .-.. -.. -.-.--')
print(decoded_message)

```

Output:
```text
HELLO, WORLD!
```

# More Functionalities

```python
from morsecode_enhanced import MorseCode

mc = MorseCode()
encoded_word = mc.encode_word('Hello')
print(encoded_word)

decoded_word = mc.decode_word('.-..')
print(decoded_word)

random_morse = mc.generate_random_morse(10)

is_valid_morse = mc.is_valid_morse_code(encoded_word)

analyzed = mc.analyze_frequency('.-..')

visualised = mc.visualize_morse_code('.-..')

duration = mc.calculate_duration('.-..')



```

# Contributing

Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request on [GitHub](https://github.com/danysrour/MorseCode).

# License

This project is licensed under the [MIT License](https://github.com/danysrour/morsecodeplus.git)

```text

You can now copy this code and use it as your README.md file.
```
supreme-task 0.1.1
Prefect tasks plus added functionality to enforce type checking and help in debugging helping to reduce negative engineering!
Requires Python: >=3.8,<3.11
Keywords: prefect,tasks,workflow,orchestration

# A prefect extension giving prefect tasks super powers

## Motivation
Prefect tasks plus added functionality to enforce type checking and help in debugging helping to reduce negative engineering!

## How to setup

Using pip:

```bash
pip install supreme_task
```

## How to use

### Runtime type checking

Get runtime type checking thanks to [typeguard](http) by importing the `@task` decorator from `supreme_task` instead of `prefect`. 

See the example `run.py` file:

```python run.py
from supreme_task import task

@task
def add(x: int, y: int) -> int:
    return x + y

add.fn(x="1", y=2)
```

Running `python run.py` will raise the following exception:

```python
Traceback (most recent call last):
  File "run.py", line 9, in <module>
    add.fn(x="1", y=2)
  File "run.py", line 5, in add
    def add(x: int, y: int) -> int:
  File "supreme-task-py38/lib/python3.8/site-packages/typeguard/_functions.py", line 135, in check_argument_types
    check_type_internal(value, annotation, memo)
  File "supreme-task-py38/lib/python3.8/site-packages/typeguard/_checkers.py", line 761, in check_type_internal
    raise TypeCheckError(f"is not an instance of {qualified_name(origin_type)}")
typeguard.TypeCheckError: argument "x" (str) is not an instance of int  
```

### Persistence of flow run inputs

Get persistence of flow run inputs by importing the `@task` decorator from `supreme_task` instead of `prefect` to help with debugging.

i.e. given a file `run.py`:

```python run.py
from supreme_task import task
from prefect import flow
from prefect.filesystems import LocalFileSystem

@task
def faulty_add(x: int, y: int) -> int:
    if x == 1:
        raise ValueError("x is 1")
    return x + y

@flow(result_storage=LocalFileSystem(basepath="results/"))
def my_flow() -> None:
    faulty_add(x=1, y=2)

my_flow()
```

We update our prefect configuration to enable result persistence:

```bash
prefect config set PREFECT_RESULTS_PERSIST_BY_DEFAULT=true
```

We then run the flow by running `python run.py`

We now inspect the results directory:

```bash
$ tree results 
results
├── 514aaa4ae0134405a639cbd9a17365da
├── b662c63ff9854b0e9383d7f6cf0a5b76
└── inputs
    └── faulty_add
        └── 2023-06-10T10-47-04+0000
```

The inputs for failed task runs are saved under `results/inputs/<task_name>/<start_run_time>`.