semvec/pypi-packages huggingface dataset:
workerio 0.1.0
WorkerIO
Requires Python: >=3.9

# WorkerIO
A tool that allows you to create your own workers and distribute work among them.

Each worker creates its own thread in which it will fetch jobs from the `queue.SimpleQueue` queue and execute them in its `execute` method.
The result of the job is returned using `asyncio.Future`.

> [!WARNING]
> Since everything will be executed in another thread, use thread-safe functions. Do not modify files unless you are sure they are not open in another worker.

### Installing
> [!NOTE]
> TODO

### Basic examples
```py
import workerio
from asyncio import new_event_loop
from requests import get


class MyUrlWorker(workerio.Worker):
    def execute(self, url: str):
        return get(url).text


manager = workerio.Manager()
manager.add_worker(MyUrlWorker())

async def main(): 
    manager.start_all()

    result = await manager.put_work(MyUrlWorker, "https://example.com")
    print(result)

    manager.stop_all_nowait()

if __name__ == "__main__":
    loop = new_event_loop()
    loop.run_until_complete(main())
```

```py
import workerio
from asyncio import Future


class MyManager(workerio.Manager):
    def put_work(self, worker_type, *args, **kwargs) -> Future:
        suitable_workers = self.get_suitable_workers(worker_type, *args, **kwargs)

        if len(suitable_workers) == 0:
            raise workerio.SuitableWorkerNotFound()

        selected_worker = suitable_workers[0]
        for worker in suitable_workers:
            if worker.qsize == 0 and worker.check(*args, **kwargs):
                selected_worker = worker
                break

        return selected_worker.put_job(*args, **kwargs)

manager = MyManager()

```
tissue-properties 0.3.0
A python library for computing/looking up various tissue properties used in laser bioeffect models.
Requires Python: >=3.12

# A python library for calculating/looking up various tissue properties for laser bioeffect calculations

To simulate the exposure of tissue (skin or retina) to laser radiation, several properties characterizing the thermo-optical response of the tissue are needed.
These include absorption coefficients, transmission coefficients, conductivity, density, specific heat, etc. This library is a collection of tissue property data
sets that have been reported in the literature.

# Installing

Install with pip (or your favorite virtual environment manager)

```bash
pip install tissue-properties
```

# Usage

```
# Print out the absorption coefficients as a function of wavelength used in the 
# paper "Retinal-Temperature Increases Produced by Intense Light Sources" by
# Mainster in 1970. These values were extracted from Figure 3.
from tissue_properties.optical.absorption_coefficient import mainster
from tissue_properties.units import Q_

RPE = mainster.RPE()
choroid = minster.Choroid()

print("# wavelength retina choroid")
for wavelength in range(400,1405,5):
    l = Q_(wavelength,'nm')
    mu_r = RPE(l)
    mu_c = RPE(l)
    print(l,mu_r,mu_c)

# We can also get information about data set. Currently only the reference is
# provided, in BibTex format.
bibtex_text = RPE.get_reference()
print(bibtex_text)
```