semvec/pypi-packages huggingface dataset:
django-staticblocks 0.5
staticblocks provides you with tools for content managers to easily include flatpage content as a snippet in your templates while retaining structured control over the templates themselves
License: BSD
Keywords: django template static

staticblocks provides you with tools for content managers to easily
include flatpage content as a snippet in your templates while
retaining structured control over the templates themselves.

The template designers will define page blocks in the templates. 

The content managers will choose which flatpage to use as the snippet
embedded in each page block.

You must have 'django.contrib.flatpages' in your INSTALLED_APPS.

To install, add 'staticblocks' to your INSTALLED_APPS and re-run syncdb.

Using it
========

Code to write
-------------

On the template level, define your static blocks with arbitrary string labels
by passing the label into the scope of the included template snippet::

  {% with "index.html/firstpageblock" as blockname %}
    {% include 'staticblock/widgets/block.html' %}
  {% endwith %}
    
  {% with "index.html/secondpageblock" as blockname %}
    {% include 'staticblock/widgets/block.html' %}
  {% endwith %}

On the site, allowed users will now be able to associate that page block
with a flatpage, which will be pulled in as page content into that block.

Permissions to assign
---------------------

Assign the following permisssions to your users and groups as desired::

  flatpages.add_flatpage
  flatpages.change_flatpage
  staticblocks.add_staticblock
  staticblocks.change_staticblock

Templates to use
----------------

You can customize the layout of the pulled-in block by editing or forking
these templates::

  staticblock/templates/staticblock/widgets/block.html 
  staticblock/templates/staticblock/widgets/title.html
django-monsieur 0.0.2
.
License: BSD

====================
django-monsieur
====================

monsieur is a Django app designed to track/monitor/query arbitrary
events over periods of time.

====================
Usage
====================

Once installed (instructions below), simply import monsieur and start
logging events.

::

  # views.py
  import monsieur

  def handler(request):
      try:
          handle_request(request)
      except Exception as e:
          # log exception to monsieur and add os/browser attributes
          os, browser = parse_ua(request.META.get('HTTP_USER_AGENT'))
          name = e.message or 'Unknown exception in handler()'
          monsieur.incr(name, 1, 'view errors', os=os, browser=browser)


monsieur has a query system similar to Django's querysets::

  >>> import monsieur
  >>> q = monsieur.Q.tag('view errors')
  >>> q = q.filter(os='windows')
  >>> q = q.granularity('hour')
  >>> q.eval()
  {'integer division or modulo by zero': [{'dt': datetime.datetime(2013, 1, 7, 20, 0, 0, 0), 'count': 1}, ...]}


--------------------
Q constructors
--------------------

::
  
  Q.tag(x)        # x = TAG | [TAG1, TAG2, ...]

  Q.events(x)     # x = NAME | [NAME1, NAME2, ...]


--------------------
Q methods
--------------------

::

  q.filter(**kwargs)   # key=value to filter by
  
  q.start(x)           # x = datetime.datetime 
  
  q.end(x)             # x = datetime.datetime
  
  q.granularity(x)     # x = 'minute' | 'hour' | 'day'


--------------------
Q evaluation methods
--------------------

::

  q.names()

  q.eval()
mycloud 0.51
Work distribution for small clusters.
License: BSD

MyCloud
=======

Leverage small clusters of machines to increase your productivity.

MyCloud requires no prior setup; if you can SSH to your machines, then
it will work out of the box. MyCloud currently exports a simple
mapreduce API with several common input formats; adding support for your
own is easy as well.

Usage
=====

Starting your cluster:

::

    import mycloud

    cluster = mycloud.Cluster(['machine1', 'machine2'])

    # or use defaults from ~/.config/mycloud
    # cluster = mycloud.Cluster()

Map over a list:

::

    result = cluster.map(compute_factors, range(1000))

ClientFS makes accessing local files seamless!

::

    def my_worker(filename):
      do_work(mycloud.fs.FS.open(filename, 'r'))

    cluster.map(['client:///my/local/file'], my_worker)

Use the MapReduce interface to easily handle processing of larger
datasets:

::

    from mycloud.mapreduce import MapReduce, group
    from mycloud.resource import CSV  
    input_desc = [CSV('client:///path/to/my_input_%d.csv') % i for i in range(100)]
    output_desc = [CSV('client:///path/to/my_output_file.csv')]

    def map_identity(kv_iter, output):
      for k, v in kv_iter:
        output(k, int(v[0]))

    def reduce_sum(kv_iter, output): 
      for k, values in group(kv_iter):
        output(k, sum(values))

    mr = MapReduce(cluster, map_identity, reduce_sum, input_desc, output_desc)

    result = mr.run()

    for k, v in result[0].reader():
      print k, v

Performance
===========

It is, keep in mind, written entirely in Python.

Some simple operations I've used it for (6 machines, 96 cores):

-  Sorting a billion numbers: ~5m
-  Preprocessing 1.3 million images (resizing and SIFT feature
   extraction): ~1 hour

Input formats
=============

Mycloud has builtin support for processing the following file types:

-  LevelDB
-  CSV
-  Text (lines)
-  Zip

Adding support for your own is simple - just write a resource class
describing how to get a reader and writer. (see resource.py for
details).

Why?!?
======

Sometimes you're developing something in Python (because that's what you
do), and you decide you'd like it to be parallelized. Our current
options are multiprocessing (limiting us to a single machine) and Hadoop
streaming (limiting us to strings and Hadoop's input formats).

Also, because I could.

Credits
=======

MyCloud builds on the phenomonally useful
`cloud <http://pypi.python.org/pypi/cloud/>`_ serialization,
`SSH/Paramiko <http://pypi.python.org/pypi/paramiko/1.9.0>`_, and
`LevelDB <http://pypi.python.org/pypi/leveldb>`_ libraries.
trac-MultiRepoSearchPlugin 0.6
Search the text of source code in your Trac repositories (0.12 and up)
License: BSD

To install::

  pip install -r requirements.txt
  python setup.py develop

Add to your trac.conf::

  [components]
  multireposearch.* = enabled

Upgrade your trac environment::

  trac-admin path/to/env upgrade

Prepare all available repositories with an initial indexing::

  trac-admin path/to/env multireposearch reindex_all

You will now be able to perform text searches of repository contents through the trac search UI.

As long as you have your trac post-commit or post-receive hooks properly configured, 
source will remain up-to-date.

Otherwise, to manually reindex a single repository, you ca run::

  trac-admin path/to/env multireposearch reindex repo-name

Where repo-name is the name assigned to your repository in Trac.

Changelog
=========

0.6 (2013-01-15)
----------------

* The plugin's search source is now off by default, so Trac searches will not include
  source code results unless the user explicitly checks the "Source Repository" box
  on the search form.  This way the plugin won't impact performance of searches unless
  the user actually wants to search through source code.  (This behavior may change 
  in the future, but not until there exists a search backend that's faster than unindexed
  full text search on a database column.)

0.5 (2013-01-15)
----------------

* Selectively reindex only the files that were changed or added in each changeset, rather than
  reindexing the entire repository. (http://trac-hacks.org/ticket/9790)

0.4 (2013-01-11)
----------------

* Errors will no longer occur when repositories or files are removed from the underlying
   system but still referenced in the search backend's list of search results.
   (http://trac-hacks.org/ticket/9791, http://trac-hacks.org/ticket/10792, http://trac-hacks.org/ticket/10793)
* Removed broken index on text contents for new installations (http://trac-hacks.org/ticket/10619)

0.3 (2012-09-28)
----------------

* Search backends are now expected to match against filenames as well as file contents.
  The provided SQLIndexer component has been updated to search for filenames as well.
  (http://trac-hacks.org/ticket/10298)

0.2.1 (2012-02-17)
------------------

* Supports Trac 0.12 for real this time (http://trac-hacks.org/ticket/9803)


0.2 (2012-02-13)
----------------

* Now supports Trac 0.12 as well as 0.13 (http://trac-hacks.org/ticket/9786)

0.1 (2012-02-01)
----------------

* First release.
fanstatic-tools 0.2
fanstatic tools
License: BSD

Fanstatic tools |Build Status|_
===============================

Fanstatic is a smart static resource publisher for Python. For more
information on what it's about and how to use it, see:
http://fanstatic.org

.. |Build Status| image:: https://travis-ci.org/MiCHiLU/fanstatic-tools.png
.. _`Build Status`: http://travis-ci.org/MiCHiLU/fanstatic-tools

Shell Utilities
---------------
Fanstatic tools comes with a utility script called ``mkfanstaticsymlink``.
Please type ``mkfanstaticsymlink --help`` at the shell prompt to
know more about this tool.

::

  $ mkfanstaticsymlink
  make symlink fanstatic/angularjs to ../site-packages/js/angular/resources
  make symlink fanstatic/bootstrap to ../site-packages/js/bootstrap/resources
  make symlink fanstatic/jquery to ../site-packages/js/jquery/resources

  $ mkfanstaticsymlink --sys_path_appends=site-packages --versioning --versioning_use_md5 --base_url=static --publisher_signature=lib --dry-run
  make symlink static/lib/angularjs/+version+643d90594087d56cea34e2b460fc94f2 to ../../../site-packages/js/angular/resources
  make symlink static/lib/bootstrap/+version+94b615ca583b25c0374fac2f91e6a814 to ../../../site-packages/js/bootstrap/resources
  make symlink static/lib/jquery/+version+171ea6989058db3f1fa646d1292bb650 to ../../../site-packages/js/jquery/resources


Installation
------------
Installing from PyPI using ``pip``::

    pip install fanstatic-tools

Installing from PyPI using ``easy_install``::

    easy_install fanstatic-tools

Installing from source::

    python setup.py install


Dependencies
------------
1. Python 2.6, 2.7, 3.2+ or PyPy.
2. six_


Licensing
---------
Fanstatic tools is licensed under the terms of the `BSD 3-Clause`_.

Copyright 2012 ENDOH takanao.

Project `source code`_ is available at Github. Please report bugs and file
enhancement requests at the `issue tracker`_.


.. links:
.. _six: http://pypi.python.org/pypi/six
.. _BSD 3-Clause: http://opensource.org/licenses/BSD-3-Clause
.. _issue tracker: http://github.com/MiCHiLU/fanstatic-tools/issues
.. _source code: http://github.com/MiCHiLU/fanstatic-tools