semvec/pypi-packages huggingface dataset:
arduino-web-inject 0.1.43
Inject and build web files into your sketches
License: MIT


Project Name
Welcome to Project Name! This is a Python project that does XYZ.

Installation
To install Project Name, you can use pip:

Copy code
pip install project-name
Usage
To use Project Name, you can import it in your Python code:

python
Copy code
import project_name

# Use project_name here
For more details and examples, please refer to the project's documentation on GitHub.

Documentation
For detailed documentation and examples, please refer to the project's documentation on GitHub:

https://github.com/your-username/project-name

License
This project is licensed under the MIT License - see the LICENSE file for details.

Thank you for using Project Name!
whitening 0.2
Document whitening (foreground separation)
License: MIT

# Document whitening (foreground separation)

This package tries to separate text/line foreground and background by 2D median
filter.

<img src="data/IMG_3262.jpg" alt="original" width="250">
<img src="data/IMG_3262_fg.jpg" alt="foreground" width="250">
<img src="data/IMG_3262_bg.jpg" alt="background" width="250">

## Installation

Install from PyPI. Works on Python 3.

```bash
pip install whitening
```

## Example usage

### Python API

It works with images represented as `PIL.Image` or as a numpy array. Images can
be either RGB or grayscale.

```python
import numpy as np
import PIL.Image

from whitening import whiten

# possible to use numpy array as input/output
image = np.asarray(PIL.Image.open('image.jpg'), dtype='uint8')
foreground, background = whiten(image, kernel_size=20, downsample=4)
PIL.Image.fromarray(foreground).save('foreground.jpg', 'jpeg')

# or directly a PIL image
image = PIL.Image.open('image.jpg')
foreground, background = whiten(image, kernel_size=20, downsample=4)
foreground.save('foreground.jpg', 'jpeg')
```

### CLI

It install an entry point called `whiten`.

```bash
# help
$ whiten -h

# whiten an image and save the foreground output
$ whiten input.jpg foreground.jpg

# specify the kernel size
$ whiten input.jpg foreground.jpg -k 100

# work in grayscale instead of RGB (3x faster)
$ whiten input.jpg foreground.jpg -g

# downsample the image 4x (faster, but a bit less precise)
$ whiten input.jpg foreground.jpg -d 4

# save also the background
$ whiten input.jpg foreground.jpg -b background.jpg
```

We assume the original images is a product of foreground and background,
thus we can recover the foreground by dividing the image by the background:
`I = F * B => F = I / B`. We try to approximate the background by 2D median
filtering the original image which suppresses sparse features such as text and
lines.

Select kernel size that's enough for not making artifacts while small enough
to keep computation fast. A good starting point is 50 pixels.

A 9.5 Mpx image can be processed on a MacBook in 15 s, with grayscale and
downsampling 4x the run time can be reduced to 1 s! Quite good results can be
obtained even with kernel size 10 and downsampling 16x.

More info: http://bohumirzamecnik.cz/blog/2015/image-whitening/

## Development

See the `Makefile` for various development tasks.

## License

Author: Bohumír Zámečník <bohumir.zamecnik@gmail.com>

Supported by [Rossum](https://rossum.ai), creating a world without manual data entry.
pysmx 0.4.0
Interact with SourceMod plug-ins
License: MIT
Requires Python: >=3.7,<4.0

# pysmx

**pysmx** is a Python package for parsing, executing, and simulating the environment of SourceMod plug-ins.


## Quickstart

```shell
pip install pysmx
```

```python
from smx import compile_plugin

plugin = compile_plugin('''
    public TwoPlusTwo() {
        return 2 + 2;
    }
    public float FiveDividedByTen() {
        return 5.0 / 10.0;
    }
    public String:Snakes() {
        new String:s[] = "hiss";
        return s;
    }
''')

print(plugin.runtime.call_function_by_name('TwoPlusTwo'))
# 4
print(plugin.runtime.call_function_by_name('FiveDividedByTen'))
# 0.5
print(plugin.runtime.call_function_by_name('Snakes'))
# 'hiss'
```
loss 0.1.2
Loss
License: MIT
Requires Python: >=3.8,<4.0

# loss

> Loss

WARNING: This repo is in development. It was automatically generated with [mkpylib](https://github.com/shawwn/scrap/blob/master/mkpylib). If you're reading this message, it means that I use this repo for my own purposes right now. It might not do anything at all; the default functionality is `print('TODO')`.

If you really want to try it out, feel free. I recommend reading through the [tests](/tests/test_basic.py) and commit history to see if it does what you need, or [ask me](#contact) for status updates.

Stay tuned!

## Install

```
pip3 install -U loss
```

Or develop locally:

```
git clone https://github.com/shawwn/loss ~/loss
cd ~/loss
python3 setup.py develop
```

## Usage

```py
import loss

print('TODO')
```

## License

MIT. See [LICENSE](/LICENSE) file.

## Contact

A library by [Shawn Presser](https://www.shawwn.com). If you found it useful, please consider [joining my patreon](https://www.patreon.com/shawwn)!

My Twitter DMs are always open; you should [send me one](https://twitter.com/theshawwn)! It's the best way to reach me, and I'm always happy to hear from you.

- Twitter: [@theshawwn](https://twitter.com/theshawwn)
- Patreon: [https://www.patreon.com/shawwn](https://www.patreon.com/shawwn)
- HN: [sillysaurusx](https://news.ycombinator.com/threads?id=sillysaurusx)
- Website: [shawwn.com](https://www.shawwn.com)