semvec/pypi-packages huggingface dataset:
django-staticfiles-bootstrap 3.0.3
Twitter Bootstrap staticfiles for django
License: MIT

django-staticfiles-bootstrap
============================

Easily include twitter bootstrap in your django apps

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

    pip install django-staticfiles-bootstrap


Make sure your django project is configured to use staticfiles, then add this to your INSTALLED_APPS

    INSTALLED_APPS += ['django-staticfiles-bootstrap',]

Usage
-----

You can use this in two different ways in your templates

### STATIC_URL

    <link href="{{ STATIC_URL }}bootstrap/css/bootstrap.css" rel="stylesheet">
    <script src="{{ STATIC_URL }}bootstrap/js/bootstrap.js"></script>

### static template tag

    {% load static from staticfiles %}
    <link href="{% static "bootstrap/css/bootstrap.min.css" %}" rel="stylesheet">

Plugins
-------

If you want to use the JavaScript plugins, you will need jQuery. For that, I suggest django-staticfiles-jquery.

Code prettifying requires Google code prettify. For that, I suggest django-staticfiles-google-code-prettify.
Puppy 0.1.8
DSL for creating NetCDF files
License: MIT
Keywords: netcdf data array math

A DSL for creating NetCDF files. Here's a simple example:

.. code-block:: python

    from pup import *

    class Test(NetCDF):
        # NC_GLOBAL attributes go here
        history = 'Created for a test'

        # dimensions need to be set explicitly only when they
        # have no variable associated with them
        dim0 = Dimension(2)

        # variables that don't specify dimensions are assumed to
        # be their own dimension
        time = Variable(range(10), record=True, units='days since 2008-01-01')

        # now a variable with dimensions (time,)
        temperature = Variable(range(10), (time,), units='deg C')

    Test.save('simple.nc')

This will produce the following NetCDF file::

    netcdf simple {
    dimensions:
        dim0 = 2 ;
        time = UNLIMITED ; // (10 currently)
    variables:
        int time(time) ;
            time:units = "days since 2008-01-01" ;
        int temperature(time) ;
            temperature:units = "deg C" ;

    // global attributes:
            :history = "Created for a test" ;
    data:

     time = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ;

     temperature = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ;
    }

Compare this with the code necessary to do the same using common NetCDF
libraries:


.. code-block:: python

    f = netcdf_file("simple.nc", "w")

    f.history = "Created for a test"

    f.createDimension("dim0", 2)

    f.createDimension("time", None)
    time = f.createVariable("time", "i", ("time",))
    time.units = "days since 2008-01-01"
    time[:] = range(10)

    temperature = f.createVariable("temperature", "i", ("time",))
    temperature.units = "deg C"
    temperature[:] = range(10)

By default it uses pupynere for creating files, but this can be overloaded; we
can use the netCDF4 module, for example, which allows us to specify groups:

.. code-block:: python

    from netCDF4 import Dataset

    class Test(NetCDF):
        loader = Dataset
        ...

        foo = Group(
            dim = Dimension(10),
            var = Variable(range(10)),
            ...
        )
    Test.save('simple.nc', format='NETCDF4')

Changelog:

:0.1.8:   Ensure record dimensions are created first.
:0.1.7:   Convert strings to array of chars.
:0.1.6:   Fix bug in dimension name.
:0.1.5:   Added support for Groups when using netcdf4.
:0.1.4:   Added support for masked arrays.
:0.1.3:   Pass keyword arguments in save() to the loader.
:0.1.2:   Improved optional loader detection.
:0.1.1:   Added pupynere dependency.
:0.1:     Initial release.