semvec/pypi-packages huggingface dataset:
pelican-shiori 0.2.1
Shiori theme for Pelican
License: MIT
Keywords: python pelican pelican-theme static-site


pelican-shiori
==============

.. image:: https://badge.fury.io/py/pelican-shiori.svg
    :target: https://pypi.python.org/pypi/pelican-shiori

:code:`pelican-shiori` is a port of the Shiori_ theme (originally built for
Jekyll by `Elle Kasai`_) to Pelican_.

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

.. code-block:: bash

    $ pip install pelican-shiori

Requirements
------------

- assets_ plugin for Pelican
- working SASS_ compiler

Usage
-----

In your pelican :code:`settings.py`, set the :code:`THEME` and
:code:`ASSET_CONFIG` variables like the following -

.. code-block:: python

    import pelican_shiori

    THEME = pelican_shiori.path()
    ASSET_CONFIG = pelican_shiori.asset_config()

Configuration
-------------

The following configuration variables are supported.

- :code:`SHIORI_AVATAR_URL`: URL of the avatar you'd like to show on the sidebar
- :code:`SHIORI_HIDE_SIDEBAR`: whether or not to show the sidebar
- :code:`SHIORI_INDEX_ARTICLES_COUNT`: number of articles to show on the index page
- :code:`SHIORI_THEME`: which color scheme to use (one of :code:`dark`,
  :code:`turquoise`, :code:`green`, :code:`blue`, :code:`purple`,
  :code:`orange`, :code:`red`)

Color Schemes
-------------

This theme is available in multiple color schemes (based on `Flat UI Colors`_).
The default value for the color scheme is set to (surprise) :code:`default`. To
change it to one of the supported values, adjust the :code:`SHIORI_THEME` and
:code:`ASSET_CONFIG` variables as follows -

.. code-block:: python

    SHIORI_THEME = 'blue'
    ASSET_CONFIG = pelican_shiori.asset_config(SHIORI_THEME)

Please make sure that the argument given to :code:`pelican_shiori.asset_config`
is the same as :code:`SHIORI_THEME`. `Bad things`_ may happen otherwise.

.. _assets: https://github.com/getpelican/pelican-plugins/tree/master/assets
.. _Bad things: https://www.xkcd.com/292
.. _Elle Kasai: http://ellekasai.com
.. _Flat UI Colors: http://flatuicolors.com
.. _Pelican: https://blog.getpelican.com
.. _SASS: http://sass-lang.com/install
.. _Shiori: https://ellekasai.github.io/shiori
cmsplugin-ss-grid 0.1.0a7
Bootstrap grid plugin for djangocms
License: MIT
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <4
Keywords: djangocms bootstrap grid

djangocms bootstrap grid
==================================

An opinionated implementation of a bootstrap grid plugin for djangocms.

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

    pip install cmsplugin_ss_grid

In your settings.py

    INSTALLED_APPS = (
        ...
        'cmsplugin_ss_grid',
    )

In settings.py:

    CMSPLUGIN_SS_GRID = dict(
        CELL_DEFAULT_CLASS='class-added-to-all-cells'
    )

Development
-----------

We use djangocms-helper to execute django commands and run tests.

To run test:

    djangocms-helper cmsplugin_ss_grid test --cms


Create migrations:

    djangocms-helper cmsplugin_ss_grid makemigrations --cms

Tested on
    * Python 2.7. 3.4, 3.5
    * Django 1.8, 1.9, 1.10
    * DjangoCms 3.4
sqlist 0.2.2
List-like wrapper for SQLite
License: MIT

.. image:: https://travis-ci.org/valericus/sqlist.svg?branch=master
    :target: https://travis-ci.org/valericus/sqlist

SQList is like `shelve <https://docs.python.org/3/library/shelve.html>`_ but for lists. It serializes data with `pickle <https://docs.python.org/3/library/pickle.html>`_ and puts into SQLite database.

Usage
=====

SQList object behaves mostly like casual Python list. For example you can create SQList from list.

>>> import sqlist
>>> values = sqlist.SQList([1, 2, 3])
>>> values
sqlist.SQList([1, 2, 3])

You can get item from list by index.

>>> values[0]
1
>>> values[-1]
3

Slices are available too.

>>> values[0:2]
[1, 2]

You can easily append item to SQList and pop them from it.

>>> values.append(23)
>>> values
sqlist.SQList([1, 2, 3, 23])
>>> valuea.pop(0)
1
>>> values
sqlist.SQList([2, 3, 23])

Unfortunately inserting is not available yet but planned for future versions.


Sorting
=======

You can easily sort SQList just in place, but be careful, this sorting can be quite long.

>>> values.sort(key=lambda x: 1 / x)
>>> values
sqlist.SQList([23, 3, 2])
>>> values.sort()
>>> values
sqlist.SQList([2, 3, 23])

Also there is a way to keep your SQList permanently sorted.

>>> values = sqlist.SQList(['a', 'aa', 'aaaa'], key=lambda x: len('x'))
>>> values
sqlist.SQList(['a', 'aa', 'aaaa'], key=lambda x: len('x'))
>>> values.append('bbb')
>>> values
sqlist.SQList(['a', 'aa', 'bbb', 'aaaa'], key=lambda x: len('x'))

This way is a bit ugly but it was designed for high performance.

Multithreading
==============

At the moment SQList is not thread safe, may be it will become so later.