semvec/pypi-packages huggingface dataset:
pythis 1.4
zen of python in Simplified Chinese
License: MIT
Keywords: zen python chinese

pythis
~~~~~~

pythis is the zen of python in Simplified Chinese.  


Install
--------

install using pip::

    pip install pythis
    
Usage
--------

Just like the zen in python, you type::
    
    import this

To show the Simplified Chinese version, you type::

    import pythis

Enjoy & Fun
------------
django-fence 0.0.3
Simple middleware to restrict access to "private beta" sites
License: MIT

django-fence
============

This is a simple Django app with middleware to block access (in a
user-friendly, but not particularly secure way) to early beta or testing sites.

The middleware checks for the presence of a session token. If it matches the
token specified in settings, the request procedes normally; if it doesn't,
the middleware displays a "please enter the token" form instead.  A single
token is shared for all authorized viewers.

The point is not to provide high security, but to instead prevent casual
visitors and crawlers from poking around a beta or testing site, while at the
same time making it *super easy* to give access to designers and people of
varying computer literacy.  You just have to tell them:  "Oh, the magic word is
'fiddlesticks'", and they can instantly get access without having to do any
sort of registration.  The goal is to be nicer user experience than HTTP basic
auth for this purpose.

Installation
~~~~~~~~~~~~

Get it into your path.  This ought to work::

    pip install -e http://github.com/yourcelf/django-fence.git

Usage
~~~~~

1. Add ``fence`` to ``INSTALLED_APPS``::

    INSTALLED_APPS += ('fence',)

2. Add middleware::

    MIDDLEWARE_CLASSES += ("fence.middleware.Fence",)

3. Define the magic word::

    FENCE_TOKEN = "secret"
    
4. Create a template to display in ``fence/say_the_magic_word.html``.  An example template::

    {% extends "base.html" %}

    {# Add a class to <body> which lets us hide footers/headers/etc. #}
    {% block body_class %}front-gate{% endblock %}

    {% block content %}

        <form method='post' action=''>{% csrf_token %}
            <p>We're still in beta.  What's the magic word?</p>
            {{ form }}
            <input type='submit' value='Let me in!' />
        </form>

    {% endblock %}

License
~~~~~~~

MIT License.

Copyright (C) 2012 Charlie DeTar

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Authors
~~~~~~~

By Charlie DeTar.
incisive 0.1.0
A tiny library for handling CSV files.
License: MIT
Keywords: csv tools

incisive
========

**incisive** is a tiny library for handling CSV in Python. It's a wrapper for the csv module.


Usage
-----

* You can read a csv file like this::

    >>> iris = read_csv("data/iris.csv")
    >>> iris.next()
    {'petal_length': 1.4,
     'petal_width': 0.2,
     'sepal_length': 5.1,
     'sepal_width': 3.5,
     'species': 'setosa'}

`read_csv` returns a generator. Note that `incisive`, by default, tries to guess the type of the columns.


* Writing a CSV file can be done in two ways:
  
1. with a list of dictionaries::

    >>> data = [{'name': 'Lancelot', 'actor': 'John Cleese', 'color': 'blue'},
               {'name': 'Galahad', 'actor': 'Michael Palin', 'color': 'yellow'}]

    >>> write_csv('bridge.csv', ('name', 'actor', 'color'), data=data)

(the keys are the field names of the CSV file.)

2. or with just a list of rows::

    >>> rows = [('Lancelot', 'John Cleese', 'blue'),
            ('Galahad', 'Michael Palin', 'yellow')]

    >>> write_csv('bridge.csv', ('name', 'actor', 'color'), rows=rows)

Note that this second method requires that your field names correspond exactly
to the elements of your rows.


Features
--------

* Simple API
* Guess the types when it's possible 
* Accept functions to specify the types
pyeqs 0.13.1
Django Querysets-esque implementation for Elasticsearch
License: MIT

# PyEQS [![Build Status](https://travis-ci.org/Yipit/pyeqs.svg?branch=master)](https://travis-ci.org/Yipit/pyeqs) [![Coverage Status](https://coveralls.io/repos/Yipit/pyeqs/badge.png)](https://coveralls.io/r/Yipit/pyeqs)

#### Python Elasticsearch QuerySets

A python library to simplify building complex Elasticsearch JSON queries.  Based on the Django QuerySet API, backed by the [official python elasticsearch library](https://github.com/elasticsearch/elasticsearch-py).  Supports Elasticsearch `1.0+`.

This is an attempt to provide an interface familiar to users of Django Querysets.  Due to the differences in the backends it was impossible to mirror the Queryset API and maintain full search functionality.  Be aware when using this library that the interfaces may not have the same trade-offs and caveats.

#### Current Development Status

Currently pre `v1.0`, so the API is not locked in.  This project aims to follow [semantic versioning](http://semver.org/) once it reaches a stable API.  Issues may arise as the backend `elasticsearch-py` library locks its versions to **Elasticsearch** releases.

## Installation

```bash
pip install pyeqs
```

## Usage

Check out the [API Reference](https://github.com/Yipit/pyeqs/blob/master/API_REFERENCE.md) for examples.

## Alternatives

#### Python
* [ElasticUtils](http://elasticutils.readthedocs.org/en/latest/): A library by Mozilla uses a syntax leveraging built-in &, | and ~ to construct queries.
* [Elasticsearch-dsl-py](https://github.com/elasticsearch/elasticsearch-dsl-py): A library by Elasticsearch that is similar and compatible with ElasticUtils.
* [Django-Haystack](https://github.com/toastdriven/django-haystack): A library that wraps multiple search backends and presents them in the same interface as Django models.  In my experience a very all-in-one solution that makes it hard to manipulate Elasticsearch directly, but wonderful when you need the feature set.

#### Ruby
* [Plunk](https://github.com/elbii/plunk): A ruby library to allow you to write strings to queries that have more power than simple 'query string' requests

#### Haskell
* [Bloodhound](https://github.com/bitemyapp/bloodhound/): A basic Elasticsearch Client that also has the ability to leverage the language's built-in operators to construct queries.

#### Perl
* [ElasticSearch::SearchBuilder](https://metacpan.org/pod/ElasticSearch::SearchBuilder): An Elasticsearch Client to help with constructing complex queries and filters.