semvec/pypi-packages huggingface dataset:
ipa-tools 0.0.1.dev0
iPA client
License: MIT

ipa-tools
=========

.. image:: logo_ipa.png
   :target: https://indicepa.gov.it/

A set of command-line tools to interact with the Italian [Public Administration Index (IPA)](https://indicepa.gov.it/).

Preconditions
-------------

Retrieve an API key from the iPA website for free:

https://www.indicepa.gov.it/documentale/n-webservices.php
febhd-clustering 0.1.0
Smart Hyperdimensional Clustering algorithm: FebHD
License: MIT
Requires Python: >=3.8,<4.0

# hd-clustering

**Authors**: Alejandro Hernández Cano, Mohsen Imani.

## Installation

In order to install the package, simply run the following:

```
pip install febhd_clustering
```

Visit the PyPI [project page](https://pypi.org/project/febhd_clustering/) for
more information about releases.

## Documentation

Read the [documentation](https://febhd_clustering.readthedocs.io/en/latest/)
of this project. 

## Quick start

The following code generates dummy data and trains a FebHD clustering model
with it.

```python
>>> import febhd_clustering
>>> dim = 10000
>>> n_samples = 1000
>>> features = 100
>>> clusters = 5
>>> x = torch.randn(n_samples, features) # dummy data
>>> model = febhd_clustering.FebHD(clusters, features, dim=dim)
>>> if torch.cuda.is_available():
...     print('Training on GPU!')
...     model = model.to('cuda')
...     x = x.to('cuda')
...
Training on GPU!
>>> model.fit(x, epochs=10)
>>> ypred = model(x)
>>> ypred.size()
torch.Size([1000])
```

For more examples, see the `examples/` directory.

## Citation request

If you use hd-clustering, please cite the following papers:

1. Alejandro Hernández-Cano, Yeseong Kim, Mohsen Imani. "A Framework for
   Efficient and Binary Clustering in High-Dimensional Space". IEEE/ACM Design
   Automation and Test in Europe Conference (DATE), 2021.

2. Mohsen Imani, et al. "DUAL: Acceleration of Clustering Algorithms using
   Digital-based Processing In-Memory"r IEEE/ACM International Symposium on
   Microarchitecture (MICRO), 2020.
pydict2json 0.1.0
Given a printed python dict, convert it to JSON
License: MIT
Requires Python: >=3.6

Convert the string representation of a Python dictionary to JSON

You've got a Python dictionary that was printed to a log file.  You want to run it through JSON tools, like [jq](https://stedolan.github.io/jq/) but it's not actually JSON.

This command line tool allows you convert to JSON.


## Why?

If you're the owner of a python script that writes simply does `print(str(d))` you should consider changing it to use `print(json.dumps(d))` instead.
However, you're not always the owner of scripts you use and you can't always change the code.
Instead, convert from the python string representation of a dictionary to JSON.


## Examples

```
$ cat input.txt
{'example': {'number': 42, 'text': 'lorem ipsum', 'boolean': True}}
```

Let's convert it to JSON with:

```
$ cat input.txt | python3 -m pydict2json
{"example": {"number": 42, "text": "lorem ipsum", "boolean": true}}
```

That's hard to read, let's pretty print:

```
$ cat input.txt | python3 -m pydict2json --pretty
{
  "example": {
    "number": 42,
    "text": "lorem ipsum",
    "boolean": true
  }
}
```

Much better.

Now that it's JSON we can use all our favorite JSON tools like `jq`:

```
$ cat input.txt | python3 -m pydict2json | jq .example.number
42
```

The tool also supports input directly on the command line:

```
$ python3 -m pydict2json --literal "{'a': None}"
{"a": null}
```