semvec/pypi-packages huggingface dataset:
browser-hz 4.1.1
Tailored Selenium Wire extension for in-house project development.
Requires Python: <4.0,>=3.11

# Advertisements Browser

[<img src="https://img.shields.io/badge/development-advertisements_test-purple">](https://github.com/hubzaj/advertisements-test)
[![version](https://img.shields.io/pypi/v/browser-hz)](https://pypi.org/project/browser-hz/)

## Background

The initiation of this project had the goal of gaining a comprehensive understanding of the fundamental mechanisms behind Python packages, their distribution, and the process of releasing them. Poetry, a project and dependency management tool, was employed to achieve this objective. The resulting package was designed for internal use across different Python projects, including [advertisements-test](https://github.com/hubzaj/advertisements-test). Its main purpose is to provide insight into package management intricacies while serving as a valuable resource for a variety of Python projects.

### How to build project

Requirements:

-     Python ^3.11
-     Poetry ^1.8.2

### Working with terminal

1. Install `asdf` with required plugins.

 ```
  > brew install asdf
  > asdf plugin-add python
  > asdf plugin-add poetry
  > asdf install
 ```

### Configuration

Configuration is designed in a way to be controlled by environment variables.

    [BROWSER]

##### Default:

* Browser: `Chrome`

#### Supported browsers:

* `CHROME`
ml4teens 0.1.46
Machine Learning para Adolescentes (Machine Learning for Teens)

# ML4Teens

**Machine Learning for Teens** (Aprendizaje Automático para *adolescentes*)

Paquete Python (*ml4teens* en pip) que permite crear *arquitecturas basadas en bloques* que lleven a cabo un proceso de ML.

Cada bloque hace algo concreto, en modo *caja negra*; cada uno de ellos genera *signal*s y posee *slot*s en donde recibir las señales.

Un objeto (*singleton*) se encarga de emparejar los signals con slots (con control de tipos) y lanzar la red.

>[!NOTE]
>El submódulo *blocks*/*img* **está en estado estable**.
>
>El submódulo *blocks*/*nlp* **está en estado incompleto** pero usable.
>
>El submódulo *blocks*/*ds* **está en estado incompleto** pero usable.
>
>El submódulo *core* está en estado estable.
>
>La documentación está incompleta.

El código que sigue, muestra un ejemplo -básico- de lo que puede hacer el paquete (en la rama 'main').


```python
import ml4teens as ml;

from ml4teens.tools import prettyPrintException;

with ml.core.Context() as context:
     try:
       imagen   = ml.blocks.img.ImageSource();
       img2text = ml.blocks.img.ImageToText(caption="A photo of an");
       terminal = ml.blocks.Terminal();
       salida   = ml.blocks.Display(width=300);

       imagen  ("image") >> img2text("image" );
       imagen  ("image") >> salida  ("image" );
       img2text("text" ) >> terminal("stdout");

       source="https://img.freepik.com/foto-gratis/mujer-tiro-completo-bicicleta-al-aire-libre_23-2149413735.jpg";

       context.emit(target=imagen, slot_name="source", data=source);
       context.wait();

     except Exception as e:
       prettyPrintException(e);

```

Por otro lado, hacer un bloque es sencillo, uno básico que -por ejemplo- que se queda con sólo un canal de una imagen:

```python
from PIL.Image import Image;
from PIL.Image import fromarray;

from ml4teens.core import Block;

class SingleChannel(Block):

      #-------------------------------------------------------------------------
      # channel
      def __init__(self, **kwargs):
          super().__init__(**kwargs);
          assert isinstance(self.params.channel, int), "El parámetro 'channel' debe ser el número del canal (0, ...)";

      #------------------------------------------------------------------------- slots
      @Block.slot("image", {Image})
      def slot_image(self, slot, data):
          c=len(data.getbands());
          n=self.params.channel;
          assert n in range(0,c), f"El canal {n} no puede ser extraído de una imagen de {c} canales (recuerda: empieza a contar en 0)";
          imagen=data.getchannel(n);
          self.signal_image(imagen);

      #------------------------------------------------------------------------- signals
      @Block.signal("image", Image)
      def signal_image(self, data):
          return data;
```

Este bloque recibe imágenes (una a una) en el **slot** llamado *image* y reenvía el canal indicado de dicha imagen por medio de una señal,
igualmente llamada *image*.
testwizard.smart-tv 3.8.1
Testwizard for Smart TV testobjects

# Testwizard - Smart-Tv

> Python language support for testing Smart-Tv devices using testwizard

## Usage

* Import the [testwizard.test](https://pypi.org/project/testwizard.core/) and the testwizard.smart_tv packages
* Get a session and use it to create a Smart TV testobject.
* Use this object to execute commands.
* You can use the session to add results that will be reported to the robot when the script finishes or set results that will be posted immediately.

## Sample script

### Python (smart-tv.py)

```python
from testwizard.test import TestWizard
from testwizard.test import ResultCodes
from testwizard.smart_tv import SmartTv

with TestWizard() as TW:
    session = TW.session

    smartTv = SmartTv(session, "SmartTv")

    print("sendRCKey")
    result = smartTv.sendRCKey("menu")
    print(result.message)
    if not result.success:
        session.addFail(result.message)

    if not (session.hasFails or session.hasErrors):
        session.setResult(ResultCodes.PASS, "Test was successful")
```

### sidecar file (smart-tv.json)

```json
{
    "resources": [
        { 
            "category": "SMART_TV", 
            "name": "SmartTv", 
            "id": "TV Model 1"
        }
    ]
}
```

## Compatibility

The version is compatible with testwizard version 3.7

## License

[Testwizard licensing](https://www.resillion.com/testwizard/)
testwizard.web 3.8.1
Testwizard for Web testobjects

# Testwizard - Web

> Python language support for testing websites, web-apps or webservices using testwizard

## Usage

* Import the [testwizard.test](https://pypi.org/project/testwizard.test/) and the testwizard.web packages.
* Get a session and use it to create a web testobject.
* Use this object to execute commands.
* You can use the session to add results that will be reported to the robot when the script finishes or set results that will be posted immediately.

## Sample script

### Python (website.js)

```Python
from testwizard.test import TestWizard
from testwizard.test import ResultCodes
from testwizard.web import Web

with TestWizard() as TW:
    session = TW.session

    website = Web(session, "TestwizardWebsite")

    print("startWebDriver")
    result = website.startWebDriver()
    print(result.message)
    if not result.success:
        session.addFail(result.message)
        exit()

    # Add your commands here

    print("quitDriver")
    result = website.quitDriver()
    print(result.message)
    if not result.success:
        session.addFail(result.message)

    if not (session.hasFails or session.hasErrors):
        session.setResult(ResultCodes.PASS, "Test was successful")
```

### sidecar file (website.json)

```json
{
    "resources": [
        { 
            "category": "WEB", 
            "name": "TestwizardWebsite", 
            "id": "Testwizard web site"
        }
    ]
}
```

## Compatibility

The version is compatible with testwizard version 3.7

## License

[Testwizard licensing](https://www.resillion.com/testwizard/)
testwizard.set-top-box 3.8.1
Testwizard for set-top box testobjects

# Testwizard - set-top-box

> Python language support for testing set-top box devices using testwizard

## Usage

* Import the [testwizard.test](https://pypi.org/project/testwizard.test/) and the testwizard.set_top_box packages.
* Get a session and use it to create a set-top box testobject.
* Use this object to execute commands.
* You can use the session to add results that will be reported to the robot when the script finishes or set results that will be posted immediately.

## Sample script

### Python (set-top-box.py)

```python
from testwizard.test import TestWizard
from testwizard.test import ResultCodes
from testwizard.set_top_box import SetTopBox

with TestWizard() as TW:
    session = TW.session

    setTopBox = SetTopBox(session, "SetTopBox")

    print("sendRCKey")
    result = setTopBox.sendRCKey("menu")
    print(result.message)
    if not result.success:
        session.addFail(result.message)

    if not (session.hasFails or session.hasErrors):
        session.setResult(ResultCodes.PASS, "Test was successful")
```

### sidecar file (set-top-box.json)

```json
{
    "resources": [
        { 
            "category": "STB", 
            "name": "SetTopBox", 
            "id": "SetTopBox 1"
        }
    ]
}
```

## Compatibility

The version is compatible with testwizard version 3.7

## License

[Testwizard licensing](https://www.resillion.com/testwizard/)
testwizard.mobile 3.8.1
Testwizard for Mobile testobjects

# Testwizard - Mobile

> Python language support for testing Mobile devices using testwizard

## Usage

* Import the [testwizard.test](https://pypi.org/project/testwizard.test/) and the testwizard.mobile packages.
* Get a session and use it to create a mobile testobject.
* Use this object to execute commands.
* You can use the session to add results that will be reported to the robot when the script finishes or set results that will be posted immediately.

## Sample

### Python (mobile.py)

```Python
from testwizard.test import TestWizard
from testwizard.test import ResultCodes
from testwizard.mobile import Mobile

with TestWizard() as TW:
    session = TW.session

    mobile = Mobile(session, "Mobile")

    print("InitDriver")
    result = mobile.initDriver()
    print(result.message)
    if not result.success:
        session.addFail(result.message)
        exit()

    # Add your commands here

    print("QuitDriver")
    result = mobile.quitDriver()
    print(result.message)
    if not result.success:
        session.addFail(result.message)

    if not (session.hasFails or session.hasErrors):
        session.setResult(ResultCodes.PASS, "Test was successful")
```

### sidecar file (mobile.json)

```json
{
    "resources": [
        { 
            "category": "MOBILE", 
            "name": "Mobile", 
            "id": "Mobile 1"
        }
    ]
}
```

## Compatibility

The version is compatible with testwizard version 3.7

## License

[Testwizard licensing](https://www.resillion.com/testwizard/)
testwizard.android-set-top-box 3.8.1
Testwizard for Android set-top box testobjects

# Testwizard - Android set-top-box

> Python language support for testing Android set-top box devices using testwizard

## Usage

* Import the [testwizard.test](https://pypi.org/project/testwizard.test/) and the testwizard.android_set_top_box packages.
* Get a session and use it to create an Android set-top box testobject.
* Use this object to execute commands.
* You can use the session to add results that will be reported to the robot when the script finishes or set results that will be posted immediately.

## Sample script

### Python (android-set-top-box.py)

```python
from testwizard.test import TestWizard
from testwizard.test import ResultCodes
from testwizard.android_set_top_box import AndroidSetTopBox

with TestWizard() as TW:
    session = TW.session

    setTopBox = AndroidSetTopBox(session, "SetTopBox")

    print("sendRCKey")
    result = setTopBox.sendRCKey("menu")
    print(result.message)
    if not result.success:
        session.addFail(result.message)

    if not (session.hasFails or session.hasErrors):
        session.setResult(ResultCodes.PASS, "Test was successful")
```

### sidecar file (android-set-top-box.json)

```json
{
    "resources": [
        { 
            "category": "ANDROID_STB_TV", 
            "name": "SetTopBox", 
            "id": "SetTopBox 1"
        }
    ]
}
```

## Compatibility

The version is compatible with testwizard version 3.7

## License

[Testwizard licensing](https://www.resillion.com/testwizard/)