semvec/pypi-packages huggingface dataset:
bisect-find-first-bad 0.0.4
tool like `git bisect run` but checks arbitrary options and not uses git to switch versions
Requires Python: >=3.8

# bisect-find-first-bad
[`git bisect run`](https://git-scm.com/docs/git-bisect#_bisect_run) can only search through commits.
This search don't use git to switch versions. You can check arbitrary options for `is_bad`.

## install
```
pip install bisect-find-first-bad
```

## usage
you should subclass from `BisectFindFirstBad` and implement 1 method `is_bad` or `is_good`.
This method should return `True/False` which indicates is option good or bad.
When instantiating your class you should provide a sequence of options to check. They should be sorted by `is_bad`. Left side of options are good options and on the right are bad ones.


## simple example
```py
from bisect_find_first_bad import BisectFindFirstBad

class FirstGreaterThan3(BisectFindFirstBad):
    def is_bad(self, op) -> bool:
        return op > 3

# or you can use is_good:
class FirstGreaterThan3(BisectFindFirstBad):
    def is_good(self, op) -> bool:
        return op <= 3

first_greater_than_3 = FirstGreaterThan3(options = (1, 2, 3, 4, 5, 6))
```

```py
>>> first_greater_than_3.is_bad(2)
False

>>> first_greater_than_3.is_bad(5)
True

>>> first_greater_than_3()
4 start
4: BAD
2 start
2: GOOD
3 start
3: GOOD
====================================================================================================
first bad option is: 4
4
```


## more complex example - find first bad version of poetry dependency
```py
import subprocess
from bisect_find_first_bad import BisectFindFirstBad

class FirstBadDependencyVersion(BisectFindFirstBad):
    def is_bad(self, op) -> bool:
        # kinda setup
        subprocess.check_call(f'git checkout HEAD -- poetry.lock pyproject.toml && poetry add "my_library=={op}"', shell=True)

        # check is_bad
        return bool(subprocess.run('make test', shell=True).returncode)

first_bad_dependency_version = FirstBadDependencyVersion(options='''\
v0.0.1
v0.0.2
v0.0.3
v0.1.0
v0.1.1
v0.1.2
v0.2.0
v0.2.1
'''.splitlines())
```

```py
>>> first_bad_dependency_version()
v0.1.1 start
v0.1.1: GOOD
v0.2.0 start
v0.2.0: BAD
v0.1.2 start
v0.1.2: BAD
====================================================================================================
first bad option is: v0.1.2
'v0.1.2'
```
IUNI 0.0.2
IUNI is a reliable, highly versatile and comprehensive testing framework
Keywords: python,testing,assertions,unit tests,functional tests,web,api testing,api,security testing,test

The IUNI framework is a highly versatile and comprehensive testing framework designed to provide developers with a
robust toolset for testing software code. The framework offers a unit testing, Web API performance testing and Security
Testing modules.

### More information:
https://github.com/dcohen52/iuni

### Contribution

This project is open source, and contributions from the community are highly valued and appreciated. If you are
interested in contributing to the development of this project, please feel free to reach out or submit a pull request on GitHub.
tldream 0.6.1
A tiny little diffusion drawing app
Requires Python: >=3.7

<p align="center">
<div align="center">
  <img height=96 src="https://user-images.githubusercontent.com/3998421/222906944-40a06042-e6d5-48f5-905e-b635469e7005.svg"/> 
  <h1>tldream</h1>
</div>
</p>

<p align="center">A tiny little diffusion drawing app</p>

<p align="center">
  <a href="https://github.com/Sanster/tldream">
    <img alt="total download" src="https://pepy.tech/badge/tldream" />
  </a>
  <a href="https://pypi.org/project/tldream/">
    <img alt="version" src="https://img.shields.io/pypi/v/tldream" />
  </a>
   <a href="https://colab.research.google.com/drive/1m1qBE3N8VWDqE__8zRP8hvEE0JPzk7rp?usp=sharing">
    <img alt="Open in Colab" src="https://colab.research.google.com/assets/colab-badge.svg" />
  </a>
</p>


https://user-images.githubusercontent.com/3998421/223580181-6375fc76-414a-4837-b7ab-4fb07509afd3.mp4

### Features
- Support any Stable Diffusion 1.5 model on HuggingFace or local ckpt/safetensors
- Support multi-language translation: zh, ja, ko, ru

### Quick Start

```bash
# In order to use the GPU, install cuda version of pytorch first.
# pip install torch==1.13.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
pip install tldream
tldream --model runwayml/stable-diffusion-v1-5 --device cuda
```

If you are not familiar with python/pip, you can try this installer: [Windows 1-click Installer](https://github.com/Sanster/tldream/blob/tldream/scripts/README.md)

### Command line arguments

* `--listen / --no-listen`: If true, start server at 0.0.0.0  [default: no-listen]
* `--port INTEGER`: [default: 4242]
* `--device TEXT`: Device to use (cuda, cpu or mps)  [default: cuda]
* `--model TEXT`: Any HuggingFace Stable Diffusion model id. Or local ckpt/safetensors path  [default: runwayml/stable-diffusion-v1-5]
* `--lang TEXT`: Translation language model. ['en', 'zh', 'ja', 'ko', 'ru']  [default: en]
* `--low-vram / --no-low-vram`: Use low vram mode  [default: no-low-vram]
* `--fp32 / --no-fp32`: Use float32 mode (For NVIDIA 16xx GPU)  [default: no-fp32]
* `--nsfw-filter / --no-nsfw-filter`: Enable nsfw filter  [default: nsfw-filter]
* `--cache-dir TEXT`: Model cache directory, by default model downloaded to ~/.cache/huggingface/hub
* `--local-files-only / --no-local-files-only`: Not connect to HuggingFace server, add this flag if model has been downloaded  [default: no-local-files-only]