semvec/pypi-packages huggingface dataset:
otda 0.0.1
Package for doing optimal transport based domain adaptation.
License: MIT

Domain adaptation based on optimal transport
--------------------------------------------
Python package to simplify OT-based domain adaptation. This package uses [POT](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_color_images.html) as optimal transport backend.

Install with pip
----------------

```bash
$ python3 -m pip install otda --user
```

Install from source
-------------------

```bash
$ python3 setup.py install --user
```

Exemplary code snippet
----------------------

```python                                                                                                      
adapted_im = otda.colour_transfer(source_im, target_im, method='linear', nsamples=1000)
```

Run domain adaptation on a single image
---------------------------------------

```bash
$ python3 -m otda.run --source source.jpg --target target.jpg --output output.jpg --method emd
```
Available methods: linear, gaussian, sinkhorn, emd.


Some examples of the colour adaptation
--------------------------------------

<table>
    <thead>
        <tr>
            <th>Source image</th>
            <th>Target domain image</th>
            <th>Method</th>
            <th>Output</th>
            <th>Computation time</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td rowspan=5><img src="https://github.com/luiscarlosgph/ot-domain-adaptation/blob/main/images/source1.jpg?raw=true" width=640></td>
            <td rowspan=5><img src="https://github.com/luiscarlosgph/ot-domain-adaptation/blob/main/images/target1.jpg?raw=true" width=640></td>
        </tr>
        <tr>
            <td>Linear</td>
            <td><img src="https://github.com/luiscarlosgph/ot-domain-adaptation/blob/main/images/output1_linear.jpg?raw=true" width=640></td>
            <td>0.086s</td>
        </tr>
        <tr>
            <td>Gaussian (n=1000)</td>
            <td><img src="https://github.com/luiscarlosgph/ot-domain-adaptation/blob/main/images/output1_gaussian.jpg?raw=true" width=640></td>
            <td>19.194s</td>
        </tr>
        <tr>
            <td>Sinkhorn (n=1000)</td>
            <td><img src="https://github.com/luiscarlosgph/ot-domain-adaptation/blob/main/images/output1_sinkhorn.jpg?raw=true" width=640></td>
            <td>30.736s</td>
        </tr>
        <tr>
            <td>Earth mover's distance (n=1000)</td>
            <td><img src="https://github.com/luiscarlosgph/ot-domain-adaptation/blob/main/images/output1_emd.jpg?raw=true" width=640></td>
            <td>22.988s</td>
        </tr>
    </tbody>
</table>


License
-------

This repository is shared under an [MIT license](https://github.com/luiscarlosgph/ot-domain-adaptation/blob/main/LICENSE).


Author
------

Luis Carlos Garcia Peraza Herrera (luiscarlos.gph@gmail.com), 2020-2022.
sort-requirements-file 0.0.1
A package used to sort you requirements file.
License: MIT
Requires Python: >=3.8.0

<div align="center">

<h1>
  sort-requirements-file
</h1>

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

<br>
    
A CLI application used to sort your requirements file (`requirements.txt`, `poetry.toml`, ...), inspired by <a href="https://www.npmjs.com/package/sort-package-json">sort-package-json</a>.<br>

<br>

</div>

---

<br>

<details>
<summary>
  Table of contents
</summary>
  <br>
  <li> 
    <a href="#install">
      Install
    </a> 
  </li>
  <br>
  <li> 
    <a href="#usage">
      Usage
    </a> 
  </li>
</details>

<br>

## Install
You can install this package by cloning this repository, then run the [`setup.py`](/setup.py) file, or by using `pip` (the recommened way).
- Install using pip.
  Open the terminal, then run this command.
  ```cmd
  pip install git+https://github.com/HigherOrderLogic/sort-requirements-file
  ```
- Install using `git`.
  ```cmd
  # Clone the repository
  git clone https://github.com/HigherOrderLogic/sort-requirements-file.git
  cd sort-requirements-file
  # Install the package
  python setup.py install
  ```

## Usage
Open the terminal at where you requirements file is, the run `python -m sort_requirements_file`, and boom, your requirements file is sorted!
<br>

For more information on how to use the file, please see the documents.