semvec/pypi-packages huggingface dataset:
wagtail-news-image 0.0.2
An extended Draftail image block for news sites.
License: MIT

# Wagtail News Image

This [Django](https://www.djangoproject.com/) app provides an inline image block for the Draftail WYSIWYG editor.

You can play with this plugin on a demo site [here](https://github.com/MattSegal/wagtail-news-image-demo).

This image block supports:

- upload
- search
- resize
- captions
- hyperlinks

This is what the image block looks like in the Draftail WYSIWYG editor:

<img src="./screenshots/WYSIWYG.png" alt="Wagtail WYSIWYG view" width="500px"/>

Clicking on the block reveals a modal, which allows you to edit the image:

<img src="./screenshots/modal.png" alt="Wagtail editor modal" width="500px"/>

## Installation

In `settings.py` you need to register the app in `INSTALLED_APPS`

```python
# settings.py

INSTALLED_APPS = [
  # ...
  'wagtailnewsimage',
  # ...
]
```

In `urls.py` you need to add `wagtailnewsimage.urls`. The base url (`wagtailnewsimage/`) can be configured to be whatever you like.

```python
# urls.py
urlpatterns = [
  # ...
  path(r'wagtailnewsimage/', include('wagtailnewsimage.urls')),
  # ...
]
```

In `models.py` you need to add `news-image` to your RichTextField features whitelist

```python
# models.py

class MyPage(Page):
    body = RichTextField(features=[
        # ...
        'news-image',
        # ...
    ])
```

## Dependencies

* Wagtail (2+)
* Django (1.11+)
* Django Rest Framework (3+)
lc 0.1
Beta reducer and shorthand representer for the λ-calculus
License: MIT
Requires Python: >=3.4, <4
Keywords: lambda calculus teaching

``lc``: The Lambda Calculus Beta Reducer
========================================

This tool helps you β-reduce terms in the λ-calculus by providing you with a
REPL::

   λ> (λc.c(λx.λy.x))((λx.λy.λf.fxy)(λf.λx.f(fx))(λf.λx.f(f(fx))))
   INPUT (λc.c(λx.λy.x))((λx.λy.λf.fxy)(λf.λx.f(fx))(λf.λx.f(f(fx))))
   β ==> (λx.λy.λf.fxy)(λf.λx.f(fx))(λf.λx.f(f(fx)))(λx.λy.x)
   β ==> (λy.λf.f(λf.λx.f(fx))y)(λf.λx.f(f(fx)))(λx.λy.x)
   β ==> (λf.f(λf.λx.f(fx))(λf.λx.f(f(fx))))(λx.λy.x)
   β ==> (λx.λy.x)(λf.λx.f(fx))(λf.λx.f(f(fx)))
   β ==> (λy.λf.λx.f(fx))(λf.λx.f(f(fx)))
   β ==> λf.λx.f(fx)

   Potential shorthand representations:
   -> As Church numeral 2

Input
-----

Notice the pretty unicode ``λ`` in the input: this REPL uses Readline to input
a ``λ`` when you type backslash (``\``).

Shorthands
----------

   You can start any 'Monty Python' routine and people finish it for you.
   Everyone knows it like shorthand.

   -- Robin Williams


Notice above the input was converted to its corresponding shorthand Church
numeral at the end. This interpreter has the notion of shorthand notations:

1. Shorthands are written in braces (``{}``) and are *case insensitive*.

2. Church numerals, as well as many other common shorthands, are predefined for
   you.

3. Braces can be omitted on church numerals, as digits are not allowed to be
   used as variables.

4. Use ``=`` operator to define a shorthand.

::

    λ> {ABC}=λf.λx.x
    λ> {ABC}
    INPUT λf.λx.x

    Potential shorthand representations:
    -> As Church numeral 0
    -> As {FALSE}
    -> As {ABC}
    λ> {IF}{FALSE}1{ABC}
    INPUT (λp.λa.λb.pab)(λx.λy.y)(λf.λx.fx)(λf.λx.x)
    β ==> (λa.λb.(λx.λy.y)ab)(λf.λx.fx)(λf.λx.x)
    β ==> (λb.(λx.λy.y)(λf.λx.fx)b)(λf.λx.x)
    β ==> (λx.λy.y)(λf.λx.fx)(λf.λx.x)
    β ==> (λy.y)(λf.λx.x)
    β ==> λf.λx.x

    Potential shorthand representations:
    -> As Church numeral 0
    -> As {FALSE}
    -> As {ABC}

Builtin Shorthands
~~~~~~~~~~~~~~~~~~

Besides a countably infinite number of Church numerals, the following
shorthands come builtin to the interpreter::

   {succ}=λn.λf.λx.f(nfx)
   {add}=λm.λn.(m{succ}n)
   {mult}=λm.λn.(m({add}n)0)
   {true}=λx.λy.x
   {false}=λx.λy.y
   {and}=λp.λq.pqp
   {or}=λp.λq.ppq
   {not}=λp.p{false}{true}
   {if}=λp.λa.λb.pab
   {cons}=λx.λy.λf.fxy
   {car}=λc.c{true}
   {cdr}=λc.c{false}
   {nil}=λx.{true}
   {pred}=λn.λf.λx.n(λg.λh.h(gf))(λu.x)(λu.u)
   {sub}=λm.λn.n{pred}m
   {zero?}=λn.n(λx.{false}){true}
   {nil?}=λp.p(λx.λy.{false})
   {lte?}=λm.λn.{zero?}({sub}mn)

Bugs
----

   None.  Mutts have fleas, not bugs.

   -- Mutt Manual Page

* ``{pred}`` (and, consequently, ``{sub}``) appear to have some sort of issue.

* When variables conflict as a result of application, they will display as the
  same variable, but the interpreter will still treat them as separate
  variables. What needs to be done is some sort of detection mechanism when
  this happens, and an automatic α-rename of the variable.

If you solve either of these, a PR is much appreciated!
snotebook 0.2.2
A rudimentary CLI to write and organize text
License: MIT
Keywords: cli commandline terminal notes python

# snote

[![Build Status](https://travis-ci.org/nicolemon/snote.svg?branch=master)](https://travis-ci.org/nicolemon/snote)

Rudimentary CLI to write and organize text.

I've got a ways to go in terms of features and documentation. Pull requests are
neat.

## Install

Downloading the repo and firing off `python setup.py install` does the trick.

## Configuration

Reads configuration from whichever file to which environment variable `SNOTE`
points.

Each notebook requires a valid path, where notes will be saved. Global settings
apply to all notebooks, and may be overwritten at a notebook level.

    [global]
    editor=vim
    ext=md
    datefmt=%Y-%m-%d
    timefmt=%H:%M:%S
    timestamp=[{time}]
    template=/path/to/template/file
    default_title='no title'

    [my-notebook]
    path=/path/to/directory

    [another]
    path=/path/to/another/directory
    editor=nano
    ext=rst

## Usage

    usage: snote [-h] [-t] [-f FILENAME]
                 notebook {update,u,new,n,list,l,ls,search,s} ...

    positional arguments:
      notebook              name of notebook to access

    optional arguments:
      -h, --help            show this help message and exit
      -t, --timestamp       add a timestamp to the note
      -f FILENAME, --filename FILENAME
                            name a new note, or search for a note to update

    actions:
      {update,u,new,n,list,l,ls,search,s}
                            notebook action, defaults to update
        update (u)          edit note; default action
        new (n)             create new note
        list (l, ls)        list note titles in notebook
        search (s)          list note titles containing the search term

## Motivaton

I wrote this for myself as a way to catalog my stream of consciousness, and an
exercise in packaging.