semvec/pypi-packages huggingface dataset:
crimg 0.0.3
Crop and resize an image without aspect ratio distortion.
License: MIT

crimg
=====

crimg uses `Pillow <http://pillow.readthedocs.io/en/latest/>`_
to crop and resize an image as appropriate for web
presentation.
It is a convenience package that allows image
resizing without aspect ratio distortion.

API
---

crimg contains one useful function, ``crimg.crop_resize``.
The function takes three arguments:

    * image: a `PIL image <http://pillow.readthedocs.io/en/latest/reference/Image.html>`_ object
    * size: a 2-tuple of (width,height);  at least one must be specified
    * exact_size: whether to scale up for smaller images  

See ``crimg.crop_resize.__doc__`` for the function
documentation.  ``crop_resize`` returns the cropped and resized PIL image.

Command Line
------------

The command line program, ``crimg``, is included in this python
package.  The help for the program is displayed by running
``crimg`` with no arguments or ``crimg --help``.
akamaikickstart 1.0.0
Bootcamp examples for Akamai {OPEN} APIs
License: MIT

# Python Code Examples

This will guide you through the steps necessary to set up credentials and start playing with the sample code.  Note that once you've set up credentials for one language, you don't need to re-create them for another language.  If you set up the credentials for python, php will use the same credentials.

These instructions expect that you are in the examples/python subdirectory of the github repository.

# Authentication and Provisioning
The easiest way to walk through the needed provisioning and authentication to get your credentials is by following the instructions on [Authorizing your Client](https://developer.akamai.com/introduction/Prov_Creds.html) from the Getting started guide on our site.  Once you have done this, you'll be able to run the 'diagnostic tools' example scripts.

## Credential File Creation
You can get your credentials set up for use by the sample code by using the gen_edgerc.py command in the examples/python directory:
```bash
$ ./gen_edgerc.py
``` 

When you run gen_edgerc.py with no command line options, the script will create a 'default' section in your ~/.edgerc file.  For examples other than diagnostic_tools.py you'll need to pass the name of the appropriate section as an
argument, for example this is how you'd set up ccu.py:
```bash
./gen_edgerc.py ccu
```

You can find the correct name for the credentials section on the "section=" line in the example script.  If you run the script again for a specific section (including 'default') it will overwrite the previous credentials with your new ones.

## Diagnostic Tools - diagnostic_tools.py
The first example code to test is the diagnostic_tools.py script.  The credentials from the creation step give you permission to run the "dig" command from the API.

``` bash
./diagnostic_tools.py
```

This simple script runs the 'locations' call to find out where the Akamai servers are located.  The API can run the 'dig' for you from any of these locations.  Once it has done that, it grabs one at random and makes the dig call from there.

By reviewing the code you can see how simple it is to make API calls.

All of the sample code in the directory also supports --verbose to see the output on the screen, and/or --debug to see all of the HTTP traffic.  These flags can help enormously in figuring out what's going wrong or how it's working.

``` bash
./diagnostic_tools.py --verbose
./diagnostic_tools.py --debug
```

## CCU (Purge) - ccu.py
We have a [blog post](https://community.akamai.com/community/developer/blog/2015/08/20/getting-started-with-the-v2-open-ccu-api) with instructions on getting set up with the CCU API.
Prerequisites: ccu credentials and edit the filename to a valid file on your system
axel 0.0.7
Python events handling, C# style
License: MIT
Keywords: event raise handle

*Axel* is a very small Python library inspired by C#  
events that allows an easy and elegant events handling.

Examples::

    from axel import Event

    event = Event()
    def on_event(*args, **kwargs):
        return (args, kwargs)

    event += on_event                     #handler registration
    print(event(10, 20, y=30))        
    >> ((True, ((10, 20), {'y': 30}), <function on_event at 0x00BAA270>),)

    event -= on_event                     #handler is unregistered
    print(event(10, 20, y=30))     
    >> None


    class Mouse(object):
        def __init__(self):
            self.click = Event(self)
            self.click += self.on_click   #handler registration

        def on_click(self, sender, *args, **kwargs):
            assert isinstance(sender, Mouse), 'Wrong sender'
            return (args, kwargs)

    mouse = Mouse()
    print(mouse.click(10, 20))
    >> ((True, ((10, 20), {}),
    >>  <bound method Mouse.on_click of <__main__.Mouse object at ...>>),)

    mouse.click -= mouse.on_click         #handler is unregistered
    print(mouse.click(10, 20))
    >> None

Features::

  - handlers can receive the sender as their first argument
  - handlers can be executed in the same or separate threads
  - handlers may be executed synchronous or asynchronous
  - handlers execution may be synchronized on a lock
  - the time allocated for the execution of a handler is controllable
  - the number of actively executed handlers at one time is controllable
  - the execution result of a handler can be cached 
  - the result of the execution is provided as a tuple ((flag, result, handler),)
  - in case of error, the traceback may be provided for each handler in error

Contributors::

  Erwin Mayer <traderwin at gmail dot com>
  Rob van der Most <Rob at rmsoft dot nl>

Please see the documentation: https://pythonhosted.org/axel
firefox-cert-override 0.1.1
Tool for generating cert_override.txt for Firefox profiles.
License: MIT
Keywords: firefox certificate security

firefox-cert-override
=====================
.. image:: https://circleci.com/gh/Osmose/firefox-cert-override.svg?style=svg
   :target: https://circleci.com/gh/Osmose/firefox-cert-override

``firefox-cert-override`` is a Python library and CLI utility for reading and writing ``cert_override.txt`` files.

``cert_override.txt`` is located at the root of a Firefox profile directory and stores the per-domain certificate overrides for that profile. When you permanently add an exception for Firefox to trust a certificate for a specific domain, Firefox adds an entry to ``cert_override.txt``, and will read it on startup in the future to load the override again.

Installation
------------
``firefox-cert-override`` requires (read: has only been tested on) Python 3.5.
::

   $ pip install firefox-cert-override

API
---
There isn't any documentation for the API (yet), but ``firefox_cert_override/base.py`` is where the main functionality lives and is a quick skim.

CLI
---
The package adds a ``firefox-cert-override`` command that takes a list of domain and certificate file path pairs and outputs the contents for a ``cert_override.txt`` file with overrides for the given domains. See ``firefox-cert-override --help`` for more details.

License
-------
Licensed under the MIT License. See ``LICENSE`` for details.