semvec/pypi-packages huggingface dataset:
waterf 2.1.2
Chaining tasks on Google Appengine's (GAE) taskqueue.
License: BSD
Keywords: google appengine gae taskqueue deferred

A convenience module on top of the deferred library that comes with the Google AppEngine (GAE).

In a nutshell::

    from waterf import queue, task

    queue.inorder(
        task(check_condition),
        queue.parallel(
            task(remove, id=101),
            task(remove, id=102),
            task(remove, id=103)
        ),
        task(email, to='foo@bar.com')
    ).enqueue()

Should be pretty self-explanatory: it first runs the function ``check_condition``, then it runs the function ``remove`` three times in parallel, after that it runs ``email``.

To abort execution of a series you either raise ``queue.PermanentTaskFailure`` or as a convenience return ``queue.ABORT``. If you return another task, you further defer so to speak: the original task will get resolved (or aborted) as soon as the new (returned) task gets resolved (or aborted).

You use ``task()`` exactly the same as you used ``deferred.defer()``::

    task(check, id=102, _countdown=20)
    task(email, to='foo@bar.com', _queue='mailer')

After constructing a task you ``enqueue()`` it; the relation to the deferred.defer is roughly speaking::

    task(foo, 'bar').enqueue()  <==> deferred.defer(foo, 'bar')
    task(foo, 'bar').run()      <==> foo('bar')

Enqueue'ing takes (again) the same options defer took, overruling the ones you used in the constructor, e.g.::

    task(foo).enqueue(queue='mailer', countdown=60)

waterf adds two options::

    use_id  True | False | str
            Use if you don't come up with a good name to prevent double-scheduling
            The value True means autogenerate a good id, otherwise takes your str
            Defaults to True if a name is not set, otherwise to False

    release_after <seconds>
            Determines when the id will be released after your task has finished
            Defaults to 0, immediately

Tasks implement a jquery-like callback interface::

    task(foo).then(email_user, email_admin).always(...)

The callbacks must accept as their first argument the message the task sent. But this message passing will likely be dropped in a future version, because it's unused by the library.

On top of the waterf.queue there is some experimental jet set in the waterf.snake module, which implements a ndb.tasklet like api::

    from waterf import snake

    def A():
        raise snake.Return('A')

    def B(): ...

    def work():
        anA = yield snake.task(A)
        yield snake.task(B), snake.task(C) ...  # parallel yield

    snake.task(work).enqueue()




Note that you have to enable the deferred library in your app.yaml

::

    builtins:
    - deferred: on

Thank you.
anigmo 0.0.1a3
anigmo: artificial intelligence for abstract logic games
License: BSD

# anigmo: Artificial Intelligence in abstract logic games

[`anigmo`](https://github.com/cwoebker/anigmo) is an AI library that can be used to play abstract logic games.

[![Status unavailable](https://secure.travis-ci.org/cwoebker/anigmo.png?branch=master)](http://travis-ci.org/cwoebker/anigmo)

---

## Naming ##

**Why anigmo?**

Because.

## What is this? ##

A library.

## Installation

It's as simple as that:

`$ pip install anigmo` (This doesn't work yet)

## Usage

Go look at the code for now.

## Features ##

Everything you ever wished for.

## Documentation ##

If you actually want to learn about this library check out the [documentation](http://cwoebker.github.io/anigmo)

## Contribute

[Fork and contribute!](http://github.com/cwoebker/anigmo)

---

For questions and suggestions, feel free to shoot me an email <me@cwoebker.com>

Follow [@cwoebker](http://twitter.com/cwoebker)

---

Copyright (c) 2013, Cecil Woebker.
License: BSD (see LICENSE for details)
duckduckgo2 0.242
Library for querying the DuckDuckGo API
License: BSD

==================
python-duckduckgo
==================

A Python library for querying the DuckDuckGo API.

Copyright Michael Stephens <me@mikej.st>, released under a BSD-style license.

Source: http://github.com/crazedpsyc/python-duckduckgo
Original source: http://github.com/mikejs/python-duckduckgo (outdated)

This version has been forked from the original to handle some new features of the API, and switch from XML to JSON.

Installation
============

To install run

    ``python setup.py install``

Usage
=====

    >>> import duckduckgo
    >>> r = duckduckgo.query('DuckDuckGo')
    >>> r.type
    u'answer'
    >>> r.results[0].text
    u'Official site'
    >>> r.results[0].url
    u'http://duckduckgo.com/'
    >>> r.abstract.url
    u'http://en.wikipedia.org/wiki/Duck_Duck_Go'
    >>> r.abstract.source
    u'Wikipedia'
    
    >>> r = duckduckgo.query('Python')
    >>> r.type
    u'disambiguation'
    >>> r.related[1].text
    u'Python (programming language), a computer programming language'
    >>> r.related[1].url
    u'http://duckduckgo.com/Python_(programming_language)'
    >>> r.related[7].topics[0].text # weird, but this is how the DDG API is currently organized
    u'Armstrong Siddeley Python, an early turboprop engine'


    >>> r = duckduckgo.query('1 + 1')
    >>> r.type
    u'nothing'
    >>> r.answer.text
    u'1 + 1 = 2'
    >>> r.answer.type
    u'calc'

    >>> print duckduckgo.query('19301', kad='es_ES').answer.text
    19301 es un código postal de Paoli, PA
    >>> print duckduckgo.query('how to spell test', html=True).answer.text
    <b>Test</b> appears to be spelled right!<br/><i>Suggestions: </i>test, testy, teat, tests, rest, yest.

The easiest method of quickly grabbing the best (hopefully) API result is to use duckduckgo.get_zci::
    >>> print duckduckgo.get_zci('foo')
    The terms foobar /ˈfʊːbɑːr/, fubar, or foo, bar, baz and qux are sometimes used as placeholder names in computer programming or computer-related documentation. (https://en.wikipedia.org/wiki/Foobar)
    >>> print ddg.get_zci('foo fighters site')
    http://www.foofighters.com/us/home

Special keyword args for query():
 - useragent   - string, The useragent used to make API calls. This is somewhat irrelevant, as they are not logged or used on DuckDuckGo, but it is retained for backwards compatibility.
 - safesearch  - boolean, enable or disable safesearch.
 - html        - boolean, Allow HTML in responses?