semvec/pypi-packages huggingface dataset:
sidekick-properties 0.1.0
Lazy properties and attributes for sidekick.
License: MIT License
Requires Python: >=3.6

=======================
``sidekick.properties``
=======================

Functions in this module are helpers intended to create convenient and
declarative idioms when declaring classes. Perhaps it is not entirely correct
calling them "functional", but since some patterns such as lazy properties
are common in functional libraries, Sidekick has a module for doing that.

This library can be installed independently from the rest of sidekick distribution
using ``pip install sidekick-properties``. Prefer depending on sidekick-properties
if your project only use those functions.

Quick start
===========

.. code-block:: python

    from typing import NamedTuple
    from sidekick.properties import lazy, alias, delegate_to  # or from sidekick.api import *


    class Person(NamedTuple):
        name: str
        age: int
        full_name = alias('name')

    p = Person('Karl Heinrich', age=29)

Now ``p.full_name`` is now an alias to ``p.name``. This usage simply exposes an attribute
under a different name. func:`alias` can be configured in many different ways by choosing mutability
and simple transformations between the exposed alias and the original attribute.

.. code-block:: python

    class Employee(NamedTuple):
        person: Person
        role: str
        name = delegate_to('person')
        age = delegate_to('person')

        @lazy
        def photo(self):
            return download_from_server(f'http://url.img/employees/{self.name}')
jammer 0.1
Library for jax based affine-invariant MCMC sampling
License: MIT License
Requires Python: >=3.6
Keywords: jax,MCMC,affine-invariant,goodman-weare,sampler

# jammer

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

A jax based affine-invariant MCMC hammer that can leverage GPUs to speed up sampling for computationally intensive likelihoods. It implements the [Goodman-Weare](https://msp.org/camcos/2010/5-1/p04.xhtml) algorithm as described in [dfm++](https://arxiv.org/abs/1202.3665) and is inspired by the popular [`emcee`](https://github.com/dfm/emcee) library. The `just-in-time` compilation together with `vectorized` likelihood evaluation for the walkers gives significant speed-up even on CPUs when compared to emcee

## Installation

To install `jammer`, please clone this repository and then run `python setup.py install` inside it \
You can also install this via `pip` using
```
pip install jammer
```
To run it on a GPU, you must have an installation of `jaxlib` compatible with your CUDA version. For more information, please refer to the official [guidelines](https://github.com/google/jax#installation) 

The API for `jammer` is slightly different from `emcee`. This might change in the future.