Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 124 additions & 0 deletions docs/sphinx/source/releases/release-0.6.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
==============================================================================
DistArray 0.6 release
==============================================================================

**Mailing List:** distarray@googlegroups.com

**Documentation:** http://distarray.readthedocs.org

**License:** Three-clause BSD

**Python versions:** 2.7, 3.4, and 3.5

**OS support:** \*nix and Mac OS X

What is DistArray?
------------------

DistArray aims to bring the ease-of-use of NumPy to data-parallel
high-performance computing. It provides distributed multi-dimensional NumPy
arrays, distributed ufuncs, and distributed IO capabilities. It can
efficiently interoperate with external distributed libraries like Trilinos.
DistArray works with NumPy and builds on top of it in a flexible and natural
way.

0.6 Release
-----------

Noteworthy improvements in this release include:

* a new website, (http://docs.enthought.com/distarray/), with links to
DistArray talks and presentations,
* redistribution for block-distributed (and non-distributed) DistArrays,
* experimental "quickstart" installation scripts,
* an easier API for ``Context.apply``
* expanded and improved example notebooks, including a new parallel Gaussian
Elimination example by Prashant Mital,
* compatibility with NumPy 1.9,
* expanded TravisCI testing (OS X and Python 3.5),
* logos by Erick Michaud, and
* several bug-fixes and code improvements.

Existing features
-----------------

DistArray

* supports NumPy-like slicing, reductions, and ufuncs on distributed
multidimensional arrays;
* has a client-engine process design -- data resides on the worker processes,
commands are initiated from master;
* allows full control over what is executed on the worker processes and
integrates transparently with the master process;
* allows direct communication between workers, bypassing the master process
for scalability;
* integrates with IPython.parallel for interactive creation and exploration of
distributed data;
* supports distributed ufuncs (currently without broadcasting);
* builds on and leverages MPI via MPI4Py in a transparent and user-friendly
way;
* has basic support for unstructured arrays;
* supports user-controllable array distributions across workers (block,
cyclic, block-cyclic, and unstructured) on a per-axis basis;
* has a straightforward API to control how an array is distributed;
* has basic plotting support for visualization of array distributions;
* separates the array’s distribution from the array’s data -- useful for
slicing, reductions, redistribution, broadcasting, and other operations;
* implements distributed random arrays;
* supports ``.npy``-like flat-file IO and hdf5 parallel IO (via ``h5py``);
leverages MPI-based IO parallelism in an easy-to-use and transparent way;
and
* supports the distributed array protocol [protocol]_, which allows
independently developed parallel libraries to share distributed arrays
without copying, analogous to the PEP-3118 new buffer protocol.

Planned features
----------------

Planned features include

* array re-distribution capabilities for more distribution types;
* lazy evaluation and deferred computation for latency hiding;
* examples of interoperation with Trilinos [Trilinos]_;
* distributed broadcasting support.
* integration with other packages [petsc]_ that subscribe to the distributed
array protocol [protocol]_;
* distributed fancy indexing;
* out-of-core computations;
* support for distributed sorting and other non-trivial distributed
algorithms; and
* end-user control over communication and temporary array creation, and other
performance aspects of distributed computations.

History and funding
-------------------

Brian Granger started DistArray as a NASA-funded SBIR project in 2008.
Enthought picked it up as part of a DOE Phase II SBIR [SBIR]_ to provide a
generally useful distributed array package. It builds on NumPy, MPI, MPI4Py,
IPython, IPython.parallel, and interfaces with the Trilinos suite of
distributed HPC solvers (via PyTrilinos [Trilinos]_).

This material is based upon work supported by the Department of Energy under
Award Number DE-SC0007699.

This report was prepared as an account of work sponsored by an agency of the
United States Government. Neither the United States Government nor any agency
thereof, nor any of their employees, makes any warranty, express or implied,
or assumes any legal liability or responsibility for the accuracy,
completeness, or usefulness of any information, apparatus, product, or process
disclosed, or represents that its use would not infringe privately owned
rights. Reference herein to any specific commercial product, process, or
service by trade name, trademark, manufacturer, or otherwise does not
necessarily constitute or imply its endorsement, recommendation, or favoring
by the United States Government or any agency thereof. The views and opinions
of authors expressed herein do not necessarily state or reflect those of the
United States Government or any agency thereof.


.. [protocol] http://distributed-array-protocol.readthedocs.org/en/rel-0.10.0/
.. [Trilinos] http://trilinos.org/
.. [petsc] http://www.mcs.anl.gov/petsc/
.. [SBIR] http://www.sbir.gov/sbirsearch/detail/410257

.. vim:spell
4 changes: 2 additions & 2 deletions docs/www/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ documentation).
If you want to change major features or styling of the site, you can change
settings in ``pelicanconf.py``. We're currently using the
``pelican-bootstrap3`` theme for Pelican, and the ``flatly`` theme for
Bootstrap. The easist way to change the look of the site is to choose another
Bootstrap. The easiest way to change the look of the site is to choose another
Bootstrap theme from `bootswatch`_, but there are also other `pelican themes`_
available
available.


.. _pelican: http://blog.getpelican.com/
Expand Down
5 changes: 5 additions & 0 deletions docs/www/content/release-notes/release-0-6-0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:date: 2015-10-15
:category: Release Notes
:tags: releases

.. include:: ../../../sphinx/source/releases/release-0.6.rst
4 changes: 4 additions & 0 deletions docs/www/pelican-plugins/liquid_tags/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.tox
test_data/cache/
test_data/output/theme/
_nb_header.html
83 changes: 78 additions & 5 deletions docs/www/pelican-plugins/liquid_tags/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,50 @@ To insert a sized and labeled image in your document, enable the

{% img [class name(s)] path/to/image [width [height]] [title text | "title text" ["alt text"]] %}

### Base64 Image (inline image) tag

There is one more tag for image: ``b64img``. It is based on ``img`` tag, but instead of inserting link on image it acutally reads image and inserts it as base64 text into ``<img src=`` attribute.

To use it:

1. Enable ``liquid_tags.b64img``
1. Insert tag as you'd insert image one: ``{% b64img [class name(s)] path/to/image [width [height]] [title text | "title text" ["alt text"]] %}``

Images are read on compilation phase so you can use any local path (just be sure that image will remain there on next compilation)

## Instagram Tag
To insert a sized and labeled Instagram image in your document by its shortcode (such as ``pFI0CAIZna``), enable the ``liquid_tags.gram`` plugin and use the following:

{% gram shortcode [size] [width] [class name(s)] [title text | "title text" ["alt text"]] %}

You can specify a size with `t`, `m`, or `l`.

## Flickr Tag
To insert a Flickr image to a post, follow these steps:

1. Enable ``liquid_tags.flickr``
2. [Get an API key from Flickr](https://www.flickr.com/services/apps/create/apply)
3. Add FLICKR_API_KEY to your config
4. Add this to your document:

``{% flickr image_id [small|medium|large] ["alt text"|'alt text'] %}``

## Giphy Tag
To insert a gif from Giphy in your document by its id (such as ``aMSJFS6oFX0fC``), enable the ``liquid_tags.giphy`` plugin and use the following:

{% giphy gif_id ["alt text"|'alt text'] %}

IMPORTANT: You have to request a production API key from giphy [here](https://api.giphy.com/submit).
For the first runs you could also use the public beta key you can get [here](https://github.com/giphy/GiphyAPI).

## Soundcloud Tag
To insert a Soundcloud Widget to a post, follow these steps:

1. Enable ``liquid_tags.soundcloud``
2. Add this to your document:

``{% soundcloud track_url %}``

## Youtube Tag
To insert youtube video into a post, enable the
``liquid_tags.youtube`` plugin, and add to your document:
Expand All @@ -34,6 +78,8 @@ To insert youtube video into a post, enable the
The width and height are in pixels, and can be optionally specified. If they
are not, then the dimensions will be 640 (wide) by 390 (tall).

If you're experiencing issues with code generating (i.e. missing closing tags), add `SUMMARY_MAX_LENGTH = None` to your config.

## Vimeo Tag
To insert a Vimeo video into a post, enable the
``liquid_tags.vimeo`` plugin, and add to your document:
Expand All @@ -43,6 +89,8 @@ To insert a Vimeo video into a post, enable the
The width and height are in pixels, and can be optionally specified. If they
are not, then the dimensions will be 640 (wide) by 390 (tall).

If you're experiencing issues with code generating (i.e. missing closing tags), add `SUMMARY_MAX_LENGTH = None` to your config.

## Video Tag
To insert flash/HTML5-friendly video into a post, enable the
``liquid_tags.video`` plugin, and add to your document:
Expand All @@ -56,6 +104,19 @@ which is used as a preview of the video.
To use a video from file, make sure it's in a static directory and put in
the appropriate url.

## Audio Tag
To insert HTML5 audio into a post, enable the ``liquid_tags.audio`` plugin,
and add to your document:

{% audio url/to/audio [url/to/audio] [url/to/audio] %}

Up to 3 audio urls are possible. So you can add different versions of
the audio file you want to post because not every browser support every
file format.

To use a audio from file, make sure it's in a static directory and put in
the appropriate url.

## Include Code
To include code from a file in your document with a link to the original
file, enable the ``liquid_tags.include_code`` plugin, and add to your
Expand Down Expand Up @@ -83,7 +144,8 @@ setting, e.g.:
STATIC_PATHS = ['images', 'code']

## IPython notebooks
To insert an ipython notebook into your post, enable the

To insert an [IPython][] notebook into your post, enable the
``liquid_tags.notebook`` plugin and add to your document:

{% notebook filename.ipynb %}
Expand All @@ -97,7 +159,9 @@ config file:
Because the conversion and rendering of notebooks is rather involved, there
are a few extra steps required for this plugin:

- First, you will need to install IPython >= 1.0 [[1](#1)]
- First, you will need to install IPython:

pip install ipython==2.4.1

- After typing "make html" when using the notebook tag, a file called
``_nb_header.html`` will be produced in the main directory. The content
Expand Down Expand Up @@ -143,13 +207,22 @@ The notebook tag also has two optional arguments: ``cells`` and ``language``.
### Collapsible Code in IPython Notebooks

The plugin also enables collapsible code input boxes. For this to work
you first need to copy the file ``pelicanhtml_1.tpl`` (for IPython
1.x) ``pelicanhtml_2.tpl`` (for IPython 2.x) to the top level of your
you first need to copy the file ``pelicanhtml_3.tpl`` (for IPython
3.x, ``pelicanhtml_2.tpl`` (for IPython 2.x)...) to the top level of your
Pelican blog. Notebook input cells containing the comment line ``#
<!-- collapse=True -->`` will be collapsed when the html page is
loaded and can be expanded by clicking on them. Cells containing the
comment line ``# <!-- collapse=False -->`` will be open on load but
can be collapsed by clicking on their header. Cells without collapse
comments are rendered as standard code input cells.

[<a name="1">1</a>] http://ipython.org/
## Testing

To test the plugin in multiple environments we use [tox](http://tox.readthedocs.org/en/latest/), to run the entire test suite, just type:

```
cd path/to/liquid_tags
tox
```

[IPython]: http://ipython.org/
75 changes: 75 additions & 0 deletions docs/www/pelican-plugins/liquid_tags/audio.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
"""
Audio Tag
---------
This implements a Liquid-style audio tag for Pelican,
based on the pelican video plugin [1]_

Syntax
------
{% audio url/to/audio [url/to/audio] [/url/to/audio] %}

Example
-------
{% audio http://example.tld/foo.mp3 http://example.tld/foo.ogg %}

Output
------
<audio controls><source src="http://example.tld/foo.mp3" type="audio/mpeg"><source src="http://example.tld/foo.ogg" type="audio/ogg">Your browser does not support the audio element.</audio>

[1] https://github.com/getpelican/pelican-plugins/blob/master/liquid_tags/video.py
"""
import os
import re
from .mdx_liquid_tags import LiquidTags

SYNTAX = "{% audio url/to/audio [url/to/audio] [/url/to/audio] %}"
AUDIO = re.compile(r'(/\S+|https?:\S+)(?:\s+(/\S+|https?:\S+))?(?:\s+(/\S+|https?:\S+))?')

AUDIO_TYPEDICT = {'.mp3': 'audio/mpeg',
'.ogg': 'audio/ogg',
'.oga': 'audio/ogg',
'.opus': 'audio/ogg',
'.wav': 'audio/wav',
'.mp4': 'audio/mp4'}


def create_html(markup):
match = AUDIO.search(markup)
if match:
groups = match.groups()
audio_files = [g for g in groups if g]

if any(audio_files):
audio_out = '<audio controls>'

for audio_file in audio_files:

base, ext = os.path.splitext(audio_file)

if ext not in AUDIO_TYPEDICT:
raise ValueError("Unrecognized audio extension: "
"{0}".format(ext))

# add audio source
audio_out += '<source src="{}" type="{}">'.format(
audio_file, AUDIO_TYPEDICT[ext])

# close audio tag
audio_out += 'Your browser does not support the audio element.'
audio_out += '</audio>'

else:
raise ValueError("Error processing input, "
"expected syntax: {0}".format(SYNTAX))

return audio_out


@LiquidTags.register('audio')
def audio(preprocessor, tag, markup):
return create_html(markup)


# ---------------------------------------------------
# This import allows image tag to be a Pelican plugin
from liquid_tags import register
Loading