semvec/pypi-packages huggingface dataset:
wp-tdk 0.0.1
Generates the boilerplate files for a custom wordpress theme
Requires Python: >=3.10

# Wordpress Theme Development Kit

Wisk is a CLI Tool to build all the boilerplate files for a Custom Wordpress Theme.  Just navigate to your themes folder in your terminal and use 'wsk' to generate the files.  There are options for with or without bootstrap, sass, and classic or block templating.  By default, bootstrap, sass, and classic mode are True.
dam-lev 0.1.2
Implements the Damerau–Levenshtein diff algorithm
Requires Python: >=3.8
Keywords: diff

=======
dam_lev
=======

:Author: Daniel Walker
:Version: 0.1.2
:Date: 2023-01-05

Overview
========

The :code:`dam_lev` package implements the
`Damerau–Levenshtein diff algorithm <https://en.wikipedia.org/wiki/Damerau–Levenshtein_distance>`_.  That is,
it will take two sequences and determine the minimum number of transpositions, substitutions, insertions, and
deletions needed to transform the first sequence into the second.

Usage
=====

The package exposes a single function, :code:`dam_lev.get_changes`.  It takes two sequences (i.e., they must
implement the :code:`__len__` and :code:`__getitem__` methods) and returns a list of :code:`dam_lev.Mutation`
objects.  There are four subclasses of :code:`dam_lev.Mutation` corresponding to the four types of
transformations.  For example,

.. code-block:: python

    diffs = dam_lev.get_changes('abcdef', 'bcedxy')
    print(diffs) # [Deletion(at=0), Transposition(at=3), Substitution(at=5, at2=4), Insertion(at=6, at2=5)]

We see that the sequence of transformations is:

* Delete the item at index 0 (:code:`'a'`)
* Transpose the item at index 3 (:code:`'d'`) with its successor
* Substitute the item at index 5 (:code:`'f'`) with the item from the second sequence at index 4 (:code:`'x'`)
* Insert at index 6 the item from the second sequence at index 5 (:code:`'y'`)

Note the index for the transposition.  Even though, after the deletion, the :code:`'d'` is at index 2, it's at
index 3 in the original version of the sequence.  Likewise for the successive mutations.

Key function
------------

You can also pass a callable as the :code:`key` keyword argument to :code:`dam_lev.get_changes`.  Similar to
:code:`list.sort`, this callable will be used to compare the elements of the sequences.  For example,

.. code-block:: python

    diffs = dam_lev.get_changes('aBc', 'AbC', key=str.upper)
    print(diffs) # []