semvec/pypi-packages huggingface dataset:
lightware 0.0.1
Python library to provide a  communication link with LightWare Eth switches.

## LightWare RESTFUL API


### Console commands

    To run test: make tests

    To run application: make run

    To run all commands at once : make all


### App URL

    Open the following url on your browser to view swagger documentation
    http://127.0.0.1:5000/


### Using Postman

    Authorization header is in the following format:

    Key: Authorization
    Value: "token_generated_during_login"
async_lru 1.0.2
Simple lru_cache for asyncio
Keywords: asyncio

async_lru
=========

:info: Simple lru cache for asyncio

.. image:: https://travis-ci.org/aio-libs/async_lru.svg?branch=master
    :target: https://travis-ci.org/aio-libs/async_lru

.. image:: https://img.shields.io/pypi/v/async_lru.svg
    :target: https://pypi.python.org/pypi/async_lru

.. image:: https://codecov.io/gh/aio-libs/async_lru/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/aio-libs/async_lru

Installation
------------

.. code-block:: shell

    pip install async_lru

Usage
-----

This package is 100% port of Python built-in function `functools.lru_cache <https://docs.python.org/3/library/functools.html#functools.lru_cache>`_ for `asyncio <https://docs.python.org/3/library/asyncio.html>`_

.. code-block:: python

    import asyncio

    import aiohttp
    from async_lru import alru_cache


    @alru_cache(maxsize=32)
    async def get_pep(num):
        resource = 'http://www.python.org/dev/peps/pep-%04d/' % num
        async with aiohttp.ClientSession() as session:
            try:
                async with session.get(resource) as s:
                    return await s.read()
            except aiohttp.ClientError:
                return 'Not Found'


    async def main():
        for n in 8, 290, 308, 320, 8, 218, 320, 279, 289, 320, 9991:
            pep = await get_pep(n)
            print(n, len(pep))

        print(get_pep.cache_info())
        # CacheInfo(hits=3, misses=8, maxsize=32, currsize=8)

        # closing is optional, but highly recommended
        await get_pep.close()


    loop = asyncio.get_event_loop()

    loop.run_until_complete(main())

    loop.close()

Python 3.3+ is required

Thanks
------

The library was donated by `Ocean S.A. <https://ocean.io/>`_

Thanks to the company for contribution.
wetransfer 0.2.0
A Python SDK for WeTransfer's Public API

# WeTransfer Python SDK
A Python SDK for the WeTransfer's Public API
## Installation
Use PYPI to install latest stable version:
```
pip install wetransfer
```

Checkout the repository and inside the repo's root directory use pip to install latest version to your environment with:
```
pip install .
```

## Usage
**Before starting make sure you have an API key acquired from [Developers Portal](https://developers.wetransfer.com/).**

As a first step you need to create a client and fill in your board name:
```python
from wetransfer.client import WTApiClient

kwargs = {"key":  "<my-very-personal-api-key>"}
wt_client = WTApiClient(**kwargs)
```

After you have the client instance you need to authorize using this client:
```python
wt_client.authorize()
```

If authorization is successful you should be able to create an new empty transfer
```python
transfer = wt_client.create_transfer(transfer_name="My very first Transfer")
```

Afterwards you should be able to add items to it

```python
from wetransfer.items import File

f1 = File("~/test.txt")
f2 = File("~/test2.txt")
transfer.add_items([f1, f2])

print(transfer)

```

After calling `add_items` method the upload process should start. As soon as it returns you should be
able to see details for this transfer and access the url that your transfer is available for download.

The full code snippet is as follows:
```python
import sys
from wetransfer.items import File, Link
from wetransfer.client import WTApiClient

kwargs = {"key":  "<my-very-personal-api-key>"}
wt_client = WTApiClient(**kwargs)

if not wt_client.authorize():
    sys.exit(0)

transfer = wt_client.create_transfer(transfer_name="My very first Transfer")

f1 = File("./test.txt")
l1 = Link("https://wetransfer.com/", "WeTransfer Website")

transfer.add_items([f1, l1])

print(transfer)
```

which if you run it you should see something like:
```
Transfer with id: <id>, can be found in short url: <str>, with following items: ['Transfer item, file type, with size 10, name test.txt, and local path /Users/bla/test.txt, has 1 multi parts']
```

### Helper methods
If you need to upload only file you can skip the `File` objects creation and use a helper function that allows you to specify a list of paths as strings and will add these for you a given `Transfer`
```python
transfer.add_files(["file1.txt", "file2.txt"])
```

Similar method exist for URLs:
```python
transfer.add_links(["https://wetransfer.com/", "http://www.visitgreece.gr/"])
```

## Debugging
If you need to debug or investigate weird behaviours you can enable logs for this SDK by enabling the dedicated python logger
```python
import logging

logging.basicConfig()
logging.getLogger("wetransfer-python-sdk").setLevel(logging.DEBUG)

kwargs = {"key":  "<my-very-personal-api-key>"}
wt = WTApiClient(**kwargs)
...
``` 

You can set the severity level accordingly depending on the verbosity you desire.

## Contributing
See [dedicated](./CONTRIBUTING.md) section.
azure-status 0.0.2
Azure Status Health page scraper

# Azure Status

This is a python package which scrapes [Azure Status Health page](https://azure.microsoft.com/en-gb/status/)

## Usage

```
from azure_status import AzureStatus
a.status()
stats = a.status()

stat[0]
'Last updated 19 seconds ago'

stat[1]['americas']['compute']['virtual_machines']
{'east_us': 'good', 'east_us_2': 'good', 'central_us': 'good', 'north_central_us': 'good', 'south_central_us': 'good', 'west_central_us': 'good', 'west_us': 'good', 'west_us_2': 'good', 'canada_east': 'good', 'canada_central': 'good', 'brazil_south': 'good'}
```

All the keys are lower case, stripped, snake cased, and without any chars except [a-z0-9\ \.]
dominantcolors 0.1.0
A module to grab dominant colors from image

# Dominant Colors
A python module for grabbing dominant colors from an image. It's much faster than colorthief.


## Installation

```bash
pip install dominantcolors
```

## Usage
```python
from dominantcolors import get_image_dominant_colors
dominant_colors = get_image_dominant_colors(image_path='/path/to/image_path',num_colors=3)
```

## Performance
```python
import time
from colorthief import ColorThief
from dominantcolors import get_image_dominant_colors

image_path = 'examples/image.jpg'
start_time = time.time()
color_thief = ColorThief(image_path)
dominant_colors = color_thief.get_palette(3, quality=1)
print('colorthief uses %s seconds.' % (time.time() - start_time))
#OUTPUT: colorthief uses 1.2148401737213135 seconds.

start_time = time.time()
dominant_colors = get_image_dominant_colors(image_path, 3)
print('dominantcolors uses %s seconds.' % (time.time() - start_time))
#OUPUT: dominantcolors uses 0.11298108100891113 seconds.
```

## Thanks
Thanks to AI Shack for its [original tutorial](http://aishack.in/tutorials/dominant-color/).

## Better
If you feel anything wrong, feedback or pull requests are welcome.