semvec/pypi-packages huggingface dataset:
swatcher 1.0.3
Generate Adobe ASE swatches from images.
License: MIT
Requires Python: >=3.8
Keywords: adobe,color,swatches

# Swatcher

Swatcher is a Python module for generating Adobe ASE color swatches from images.

## Background

Swatcher was born out of necessity in my day job as a Graphic Designer. 👨‍💻

Often, I need to extract **exact** color values from images for use in Adobe products and I just couldn't find a good way...

> "Isn't there already software that samples colors from images?"

Yeah, there's a bunch, problem is, most are designed for sampling photographs and use algorithms that provide approximate color values. I typically sample computer generated graphics with fairly distinct colors, and I need **exact** values. 🎯

FYI, Swatcher works great on photographs too! 📸

Credit to [Marcos Ojeda](https://github.com/nsfmc/swatch) for his work on the Adobe ASE file writer. 👏

## Installation

Install Swatcher with `pip`:

    pip install swatcher

## Usage

```python
from swatcher import Swatcher

s = Swatcher('/path/to/your/image.jpg')

# view the most common colors (RGB values)
s.palette
```

Swatcher will automatically sample the provided image at initialization using the default settings `max_colors=8` and `sensitivity=75`. I have found these general settings to work best for most images.

ℹ️ You can also specify `max_colors` and `sensitivity` at object creation.

```python
s = Swatcher('/path/to/your/image.jpg', max_colors=5, sensitivity=125)
```

### View the sampled swatches

To view the sample palette swatches in your default system image viewer.

```python
s.show_palette_image()
```

### Resample the image

If the sampled colors were not what you were expecting, you can easily resample your image with different settings.

```python
s.sample(max_colors=4, sensitivity=50)
```

-   **max_colors**: Maximum number of colors to sample (may sample less)
-   **sensitivity**: How perceptively different (Euclidean Distance) a color must be from others to be included in the sampled palette. _A lower value = more similar colors, a higher value = less similar colors._

#### Sensitivity Example:

If you have numerous grey values in your image, reducing the sensitivity will make sure you sample each individual grey. On the flip side, a landscape photograph with a lot of sky will probably sample too many blue values. Increasing the sensitivity will sample a more diverse palette with colors from more areas of the photograph.

### Export an Adobe ASE swatch file

Once you have a palette you like, you can export it to an Adobe ASE swatch file for use in Adobe design products.

```python
s.export_ase_file()
```

By default, the ASE swatch file will be saved in one of two places depending on how you initialized your Swatcher object.

1. If you provided an image file path, the Adobe ASE swatch file will be saved in the same directory.
2. If you provided a file object, the Adobe ASE swatch file will be saved in your current users home directory.

**_...or export to a specific location_**

```python
s.export_ase_file("path/you/want/to/use/")
```

## Resources

-   [PyPi](https://pypi.python.org/pypi/swatcher)
webapp-health-check 1.5
wen app health plugin
License: MIT

Description
===========

Checks web apps health.

`VERSION  <webapp_health_check/VERSION>`__

Install
=======

Linux::

    sudo pip3 install webapp_health_check --upgrade

Also is possible to use::

    sudo python3 -m pip install webapp_health_check --upgrade

On windows with python3.5::

    pip install webapp_health_check --upgrade

For proxies add::

    --proxy='http://user:passw@server:port'

Usage
=====

Use the command line::

    > webapp_health_check --help
      usage: webapp_health_check [-h] [-u [URL]] [-a [APP_NAME]] [-e [EXTRA_ARGS]]

        optional arguments:
        -h, --help            show this help message and exit
        -u [URL], --url [URL]
                              url to check 		
        -a [APP_NAME], --app_name [APP_NAME]
                              app_name is the key entry where the description is located
        -e [EXTRA_ARGS], --extra_args [EXTRA_ARGS]
                              extra args


Example usage
=============

Example use:

    > webapp_health_check -u "https://xxx/" -a process_app_name

    {"status":"Healthy","totalDuration":"00:00:02.4136092","entries":{"process_app_name":{"data":{},"description":"Process health check was successful.","duration":"00:00:02.4106469","status":"Healthy"}}}     

Nagios config
=============

Example command::

    define command{
        command_name  webapp_health_check
        command_line  /usr/local/bin/webapp_health_check -u "$ARG1$" -a "$ARG2$" --extra_args='$ARG3$'
    }

Example service::

    define service {
            host_name                       SERVERX
            service_description             service_name
            check_command                   webapp_health_check!http://url/!process_app_name
            use				                generic-service
            notes                           some useful notes
    }

You can use ansible role that already has the installation and command: https://github.com/CoffeeITWorks/ansible_nagios4_server_plugins
py-gene-fusions 0.0.3
Package for structuring gene fusions
License: MIT
Requires Python: >=3.7

# py-gene-fusions

Base Package for Fusion Curation

### Installation

To install py-gene-fusions:
```commandline
pip install py-gene-fusions
```

For a development install, we recommend using Pipenv. See the 
[pipenv docs](https://pipenv-fork.readthedocs.io/en/latest/#install-pipenv-today) 
for direction on installing pipenv in your compute environment.
 
Once installed, from the project root dir, just run:

```commandline
pipenv lock
pipenv sync
```

### Init coding style tests

Code style is managed by [flake8](https://github.com/PyCQA/flake8) and checked prior to commit.

We use [pre-commit](https://pre-commit.com/#usage) to run conformance tests.

This ensures:

* Check code style
* Check for added large files
* Detect AWS Credentials
* Detect Private Key

Before first commit run:

```commandline
pre-commit install
```


### Running unit tests

Running unit tests is as easy as pytest.

```commandline
pipenv run pytest
```
peach-partner 0.0.5
Peach Partner Library is a platform agnostic Python package to help integrating PeachPayments with their partners.
License: MIT
Requires Python: >=3.9,<4.0

# Peach Partner Library

## Overview

**Peach Partner Library** is a platform agnostic Python package to help integrating PeachPayments with their partners.


**Documentation**:

**Source Code**: https://gitlab.com/peachpayments/peach-partner-python/

---

## Usage
Package requires Python 3.9+

### Installation
```sh
# pip
$ pip3 install peach-partner
```
```sh
# poetry
$ poetry add peach-partner
```
### Result codes
```python
from peach_partner.result_codes import result_codes

result_codes.TRANSACTION_SUCCEEDED.code == "000.000.000"
result_codes.get("000.000.000").name == "TRANSACTION_SUCCEEDED"
result_codes.get("000.000.000").description == "Transaction succeeded"
```
### Field validation
TODO
### Authentication
TODO
sisosign 0.3.2
A command-line tool for those times when you can't decide who should go.
License: MIT
Requires Python: >=3.7,<4.0

# sisosign

For those times when you are pair programming and the story is running longer than expected. Someone needs to go but you can't decide who should stay on the story.

Why not have a computer make these tough choices for you? **sisosign** makes it easy.

## Installation

```pip install sisosign```

You might need `sudo` depending on your setup.

## Example usage

`sisosign firstname1 firstname2`

This will print a message informing you of who should stay. Et voila! Problem solved.

## Conclusion

That's it. It doesn't do anything else.
SCUECAuth 1.1.4
The authentication module of SCUEC.
License: MIT
Requires Python: >=2.7

# SCUEC信息门户认证模块

> 声明：写这个模块的初衷是学习Python的模块开发，开源是为了方便有需要的同学用作学习研究。使用者需自行承担因不正常使用此模块而产生的一切后果，本人不负任何责任！使用此模块则代表同意此声明。

## 安装

```python
pip install SCUECAuth
```

## 简单使用

```python
# -*- coding: utf-8 -*-
from scuec_auth import SCUECAuth

sa = SCUECAuth()
session = sa.login('工号/学号', '密码')

# 接下来就可以使用session访问有登录限制的地址了，例如session.get(url)，具体方法参照requests.Session
```

##  详细使用

```python
# -*- coding: utf-8 -*-
from scuec_auth import SCUECAuth, debug

# is_verify : 是否验证登录后的session，默认True
# is_debug  : 是否输出认证过程中的debug信息，默认为False
sa = SCUECAuth(is_verify=False, is_debug=False) # 关闭session验证

# 开启session缓存，登录成功后的session将被缓存，有效期默认为1800秒，即30分钟
sa.open_session_cache(max_age=1800)

# 使用用户信息登录，此session将被缓存
# 30分钟内当前用户多次使用login方法都将得到缓存的session，通过该session访问相关地址会更新其最近使用时间以维持会话
# 当缓存的session最近30分钟一直未被使用，则login方法将获取新的session并再次缓存
session = sa.login('工号/学号', '密码')

# 验证session
if sa.verify_session(session):
    debug(tag='验证', msg='session是有效的')
    # 使用session访问有登录限制的地址，例如session.get(url)，具体方法参照requests.Session

sa.logout(username='') # 默认清理当前用户登录所产生session，可通过username参数清除指定用户session

# 关闭session缓存，所有用户登录缓存都将被清除
sa.close_session_cache()
```

## 简单应用

> 此模块基于Python，你可以在任何以Python为开发语言的程序或框架中使用，这里以flask为例

```python
# -*- coding: utf-8 -*-
from flask import Flask, request, render_template
from scuec_auth import SCUECAuth

app  = Flask(__name__)
sa = SCUECAuth()
sa.open_session_cache()

@app.route('/', methods=['GET', 'POST'])
def index():
    if request.method == "GET":
        return render_template('index.html')
    uname = str(request.form.get('username')).strip()
    passwd = str(request.form.get('password')).strip()
    if SCUECAuth.is_username_valid(uname) and len(passwd)!=0:
        if sa.login(uname, passwd):
            return '1'
    return '0'

if __name__ == '__main__':
    app.run()
```

代码地址：[/examples/flask](https://github.com/WengChaoxi/scuec-auth/tree/main/examples/flask)

测试地址：[https://scuec-auth.wengcx.top](https://scuec-auth.wengcx.top)