semvec/pypi-packages huggingface dataset:
shortfun 0.1.1
Short lambda functions for functional built in operations
License: MIT
Requires Python: >=3.8,<4.0

# `shortfun`

This package provides a functional way to use python operators. Using this package would prevent the need to do something such as:

```py
lambda x: x + 10
```

where we use a lambda function to pass in arguments to a function (in this case +) one at a time.

## Examples:

```py
>>> from shortfun import sf

>>> filtered = filter(sf.gt(10), [1, 20, 10, 8, 30])  # Greater-than function
>>> list(filtered)
[20, 30]
```

```py
>>> from shortfun import sf

>>> mapped = map(sf.add(10), [1, 20, 10, 8, 30])  # Addition function
>>> list(mapped)
[11, 30, 20, 18, 40]
```

The majority of python dunder methods are implemented in `shortfun` where it makes sense.

## Even Shorter Functions

This API is more limited, but in certain situations you can use the underscore variable provided by this package as a replacement for `lambda x: x ...`

```py
>>> from shortfun import _

>>> filtered = filter(_ > 10, [1, 20, 10, 8, 30])  # instead of: lambda x: x > 10
>>> list(filtered)
[20, 30]
```

```py
>>> from shortfun import _

>>> mapped = map(_ + 10, [1, 20, 10, 8, 30]) # instead of: lambda x: x + 10
>>> list(mapped)
[11, 30, 20, 18, 40]
```
jupyter-jsonnet 0.4
A simple Jsonnet kernel for Jupyter
License: MIT

Jupyter-Jsonnet
===============

This package provides a Jupyter Kernel to support the Jsonnet language.  It is
based on the official Jsonnet Python bindings.

After installing it, you need to register it to Jupyter with the command:
```sh
python3 -m jupyter_jsonnet.post_install
```

This kernel extends jsonnet syntax slightly to permit

* Cells containing only statements (These produce no result, but are checked
  for errrors).
* Definitions (statements) from previous cells to carry over, even if the cell
  containing the definition produced a result.
* Using `//jupyter: string` as the first line of a cell causes the output to be
  the raw string instead of the json-escaped version, similarly to `--string`
  at the CLI.  For use with e.g. `std.manifestTomlEx()`

The parsing to separate statements from expressions is very simple, and can
easily be fooled by semicolons that do not terminate statements, like in
comments or strings.

Building from Source
====================
Ensure PyPA `build` is installed:

```sh
pip3 install build
python3 -m build
```

I don't currently have a satisfactory way of doing develop/editable installs.