semvec/pypi-packages huggingface dataset:
zunis 0.3
Neural Importance Sampling
License: MIT

ZüNIS: Normalizing flows for neural importance sampling
==============================

ZüNIS (Zürich Neural Importance Sampling) a work-in-progress Pytorch-based library for Monte-Carlo integration
 based on Neural imporance sampling [[1]](https://arxiv.org/abs/1808.03856), developed at ETH Zürich.
In simple terms, we use artificial intelligence to compute integrals faster.

The goal is to provide a flexible library to integrate black-box functions with a level of automation comparable to the
VEGAS Library [[2]](https://pypi.org/project/vegas/), while using state-of-the-art methods that go around
the limitations of existing tools.

## Installation

### Using `pip`

The library is available on PyPI:
```bash
 pip install zunis 
```

The latest version can be installed directly from GitHub:
```bash
    pip install 'git+https://github.com/ndeutschmann/zunis#egg=zunis&subdirectory=zunis_lib'
```

### Setting up a development environment

If you would like to contribute to the library, run the benchmarks or try the examples,
the easiest is to clone this repository directly and install the extended requirements:
````bash
# Clone the repository
git clone https://github.com/ndeutschmann/zunis.git ./zunis
# Create a virtual environment (recommended)
python3.7 -m venv  zunis_venv
source ./zunis_venv/bin/activate
pip install --upgrade pip
# Install the requirements
cd ./zunis
pip install -r requirements.txt
# Run one benchmark (GPU recommended)
cd ./experiments/benchmarks
python benchmark_hypersphere.py
````

## Library usage

For basic applications, the integrator is provided with default choices and can be created and used as follows:

```python
import torch
from zunis.integration import Integrator

device = torch.device("cuda")

d = 2

def f(x):
    return x[:,0]**2 + x[:,1]**2

integrator = Integrator(d=d,f=f,device=device)
result, uncertainty, history = integrator.integrate()
```

The function `f` is integrated over the `d`-dimensional unit hypercube and 

* takes `torch.Tensor` batched inputs with shape `(N,d)` for arbitrary batch size `N` on `device`
* returns `torch.Tensor` batched inputs with shape `(N,)` for arbitrary batch size `N` on `device`

A more systematic documentation is under construction [here](https://zunis.readthedocs.io).
slidedown 0.7.0
Simple slide decks with Markdown and Python
License: MIT
Requires Python: >=3.6,<4.0
Keywords: slideshow,markdown,idom

# Slidedown

- Do you ✍️ Slides?
- Do you 😠 PowerPoint?
- Do you ❤️ Markdown?

---

# You're in Luck!

Turn markdown like this:

```markdown
# Step 1

Create an awesome slide deck.

# Step 2

Present it to awesome people.

# Step 3

Profit?
```

Into slides like this:

<img
  style="outline: 1px solid black"
  src="https://github.com/rmorshea/slidedown/raw/master/docs/simple-slide-example.gif"
/>

# How?

1. Install `slidedown` with `pip`

```bash
pip install slidedown
```

2. Start presenting your markdown files

```bash
slidedown README.md
```

3. Open up your browser

```
http://localhost:5678/client/index.html
```

# Interactive Elements

You can embed interactive views into your slides using [IDOM](https://github.com/idom-team/idom),
by adding an HTML element into your markup with an attribute of the form
`data-idom="your_script.py"` where `your_script.py` should be placed in the same
directory that `slidedown` was invoked and must contains a function `Main()` or `main()`
that returns an IDOM element or a VDOM dict. All other `data-` attributes will be
interpreted as parameters to pass to that function.

# IDOM in Slidedown Example

The following markup:

```markdown
# Hello IDOM!

<span data-idom="hello" data-greeting="hello" />
```

and a script `hello.py` containing:

```python
import idom

@idom.component
def Main(greeting: str):
    hi_count, set_hi_count = idom.hooks.use_state(1)
    return idom.html.button(
        {"onClick": lambda event: set_hi_count(hi_count + 1)},
        f"IDOM said {greeting} {hi_count} time(s)",
    )
```

Should produce the following output:

<img
  style="width: 500px"
  src="https://github.com/rmorshea/slidedown/raw/master/docs/slidedown-hello-idom.gif"
/>

# Config File

Slidedown supports a `slidedown.json` config file that can be placed adjacent to your
Markdown in order to configure the options used when running. The available options
match those seen in the help message (`slidedown --help`) except with all usages of `-`
replaced with `_`. For example:

```json
{
  "host": "127.0.0.1",
  "no_browser": true,
  "no_reload": false,
  "port": 5678,
  "reload_delay": 3.0,
  "reload_ignore": ["ignore-dir/*"],
  "reload_watch": ["watch-dir/*"],
  "show_options": false,
  "start_slide": 0
}
```