semvec/pypi-packages huggingface dataset:
bpolicy 0.3.3
A collection of basic policies for resources anti-spammer
License: MIT

BPOLICY
=======

A collection of basic policies for resources anti-spammer.

.. image:: http://img3.douban.com/view/biz/raw/public/f477075ba610e94.jpg
   :height: 240px
   :width: 300 px

Install from Pypi
-----------------
::

    pip install bpolicy


Basic Example
-------------
::

    import memcache
    from bpolicy.consts import MINUTE, HOUR
    from bpolicy import RatedPolicyFactory, ClockPolicyFactory, GenerationedPolicyFactory
    from bpolicy import chained_policy, silent_check

    store = memcache.Client(['127.0.0.1:9013'])
    rated_factory = RatedPolicyFactory(quota=10, interval=1 * MINUTE)
    clock_factory = ClockPolicyFactory(start_time=time(hour=1), end_time=time(hour=6), discount=0.3)
    generationed_factory = GenerationedPolicyFactory(quota=10, interval=1 * HOUR, discount=0.5, max_keep_traking=3)


    def check_policy(identity):
        return silent_check(chained_policy('hello', [generationed_factory, clock_factory, rated_factory], store), identity)


    identity = "88.88.23.1"
    for i in range(100):
        if check_policy(identity):
            print("success")
        else:
            print("banded")
smart_pinyin 0.4.5
Smart Chinese-to-Pinyin converter.
License: MIT

Pinyin
------

Smart Chinese-to-Pinyin converter.


Getting Started
---------------

    pip install smart_pinyin

Usage
-----

    >>> from pinyin import Pinyin
    >>> pinyin = Pinyin()
    >>> ' '.join(pinyin.get_pinyin('银行行长潘玮柏长了一头乌黑的白发， 睡觉睡的很晚, 道行很深', failure=''))
    >>> u'yin hang hang zhang pan wei bo zhang le yi tou wu hei de bai fa  shui jiao shui de hen wan  dao heng hen shen'
    
    >>> for i in pinyin.get_pinyin_all('自行车'): print list(i)
    [u'zi', u'hang', u'che']
    [u'zi', u'hang', u'ju']
    [u'zi', u'heng', u'che']
    [u'zi', u'heng', u'ju']
    [u'zi', u'xing', u'che']
    [u'zi', u'xing', u'ju']
swabbie 0.1.4
Helps manage your docker environment
License: MIT
Keywords: docker,clean,nuke,dangling images

Swabbie
=======

About
-----

Swabbie is a command-line utility designed to help you manage your
`docker <https://www.docker.com/>`__ images and containers.

Swabbie can clean up your dangling containers and images, restore docker
to a fresh install, and keep track of containers and images more
efficiently.

By using swabbie, you remove the need for shell scripts and bash aliases
to manage docker images and containers. Let swabbie keep track of those
commands for you!

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

Currently, to install swabbie as a package, download swabbie by cloning
this repo, create a virtualenv, and run

::

    pip install --editable .

on the command line from inside the main swabbie folder.

Usage
-----

``swabbie`` will list all of the commands that swabbie supports, which
are currently:

-  ``list``: lists images and containers (all or only running containers
   and correctly built images)
-  ``count``: tallies the total number of images and containers, as well
   as those that are functional
-  ``clean``: removes all dangling images and exited containers
-  ``nuke``: removes all images and containers; resets docker to fresh
   install state
-  ``shell``: reference guide for container and image access commands;
   has sub-arguments

Development
-----------

To add features to swabbie, set up your virtualenv and run

::

    pip install -r requirements.txt

To install swabbie as a local package so that it will update
automatically during development, run

::

    pip install --editable .

from the main folder.

Testing
~~~~~~~

Swabbie uses `nose <https://github.com/nose-devs/nose>`__ for unit
testing, so run ``nosetests`` from the main folder to execute the test
suite.

To install dependencies for running the tests, use

::

    pip install -r requirements-test.txt

Versioning
~~~~~~~~~~

Swabbie uses the
`bumpversion <https://github.com/peritus/bumpversion>`__ package for
versioning. The bumpversion.cfg file contains the necessary information
for updating the version, so just run

::

    bumpversion <major/minor/patch>

and bumpversion will do the rest.

Updating README
~~~~~~~~~~~~~~~

The readme is provided in both markdown and rst. One approach is to
write the readme in markdown, and then use pandoc to convert to rst:

::

    pandoc --from=markdown --to=rst --output=README.rst README.md

License
-------

MIT license, see LICENSE.txt.