semvec/pypi-packages huggingface dataset:
aiojarm 0.2.2
Async JARM client
Requires Python: >=3.7,<4.0

# aiojarm

![CI](https://github.com/ninoseki/aiojarm/workflows/CI/badge.svg)
![Python versions](https://img.shields.io/pypi/pyversions/aiojarm.svg)
[![PyPI version](https://badge.fury.io/py/aiojarm.svg)](https://badge.fury.io/py/aiojarm)

Async version of [JARM](https://github.com/salesforce/jarm).

## Installation

```bash
pip install aiojarm
```

## Usage

```python
import asyncio
import aiojarm

loop = asyncio.get_event_loop()
fingerprints = loop.run_until_complete(
    asyncio.gather(
        aiojarm.scan("www.salesforce.com"),
        aiojarm.scan("www.google.com"),
        aiojarm.scan("www.facebook.com"),
        aiojarm.scan("github.com"),
    )
)
print(fingerprints)
# [
#     (
#         "www.salesforce.com",
#         443,
#         "23.42.156.194",
#         "2ad2ad0002ad2ad00042d42d00000069d641f34fe76acdc05c40262f8815e5",
#     ),
#     (
#         "www.google.com",
#         443,
#         "172.217.25.228",
#         "27d40d40d29d40d1dc42d43d00041d4689ee210389f4f6b4b5b1b93f92252d",
#     ),
#     (
#         "www.facebook.com",
#         443,
#         "31.13.82.36",
#         "27d27d27d29d27d1dc41d43d00041d741011a7be03d7498e0df05581db08a9",
#     ),
#     (
#         "github.com",
#         443,
#         "52.192.72.89",
#         "29d29d00029d29d00041d41d0000008aec5bb03750a1d7eddfa29fb2d1deea",
#     ),
# ]
```

## CLI usage

```bash
$ aiojarm --help
Usage: aiojarm [OPTIONS] HOSTNAMES...

Arguments:
  HOSTNAMES...  IPs/domains or a file which contains a list of IPs/domains per
                line  [required]


Options:
  --port INTEGER         [default: 443]
  --max-at-once INTEGER  [default: 8]
  --install-completion   Install completion for the current shell.
  --show-completion      Show completion for the current shell, to copy it or
                         customize the installation.

  --help                 Show this message and exit.

$ aiojarm 1.1.1.1
1.1.1.1,443,1.1.1.1,27d3ed3ed0003ed1dc42d43d00041d6183ff1bfae51ebd88d70384363d525c

$ aiojarm google.com.ua google.gr
google.com.ua,443,172.217.25.195,27d40d40d29d40d1dc42d43d00041d4689ee210389f4f6b4b5b1b93f92252d
google.gr,443,216.58.220.131,27d40d40d29d40d1dc42d43d00041d4689ee210389f4f6b4b5b1b93f92252d

# or you can input hostnames via a file
$ aiojarm list.txt
```

## License

JARM is created by Salesforce's JARM team and it is licensed with 3-Clause "New" or "Revised" License.

- https://github.com/salesforce/jarm/blob/master/LICENSE.txt
niteru 0.2.1
A set of similarity metrics to compare html files
Requires Python: >=3.7,<4.0

# niteru

[![PyPI version](https://badge.fury.io/py/niteru.svg)](https://badge.fury.io/py/niteru)
[![Python CI](https://github.com/ninoseki/niteru/actions/workflows/test.yml/badge.svg)](https://github.com/ninoseki/niteru/actions/workflows/test.yml)
[![Coverage Status](https://coveralls.io/repos/github/ninoseki/niteru/badge.svg?branch=main)](https://coveralls.io/github/ninoseki/niteru?branch=main)
[![Documentation](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://ninoseki.github.io/niteru/)

This package provides a set of functions to measure the similarity between HTMLs.

**Note**: This is a fork of [html-similarity](https://github.com/matiskay/html-similarity).

## Key differences

- Type hints
  - All functions have proper type hints
- Dependency free
  - Works along with plain Python

## Installation

```bash
pip install niteru
```

## How it works

### Structural Similarity

Uses sequence comparison of the html tags to compute the similarity.

We do not implement the similarity based on tree edit distance because it is slower than sequence comparison.

### Style Similarity

Extracts CSS classes of each html document and calculates the jaccard similarity of the sets of classes.

### Joint Similarity (Structural Similarity and Style Similarity)

The joint similarity metric is calculated as::

```python
k * structural_similarity(html1, html2) + (1 - k) * style_similarity(html1, html2)
```

All the similarity metrics take values between 0.0 and 1.0.

### Recommendations for joint similarity

Using `k=0.3` gives better results. The style similarity gives more information about the similarity rather than the structural similarity.

## Examples

Here is an example:

```python
html1 = '''
<h1 class="title">First Document</h1>
<ul class="menu">
  <li class="active">Documents</li>
  <li>Extra</li>
</ul>
 '''

html2 = '''
<h1 class="title">Second document Document</h1>
<ul class="menu">
  <li class="active">Extra Documents</li>
</ul>
'''

from niteru import style_similarity, structural_similarity, similarity

style_similarity(html1, html2) # => 1.0
structural_similarity(html1, html2) # => 0.8571428571428571
similarity(html1, html2) # => 0.9285714285714286
```
stoclust 0.1.6
Modular methods for stochastic clustering

# `stoclust` is a package of modularized methods for stochastic and ensemble clustering techniques. 

By modular, I mean that there are few methods in this package which act as a single pipeline for clustering a dataset–––rather, the methods each form a unit of what might be a larger clustering routine.

These modular units are designed to be compatible with general clustering methods from
other packages, like `scipy.clustering` or `sklearn.cluster`. However, we also provide
specific methods for implementing clustering algorithms whose underlying mathematics
is rooted in stochastic analysis and dynamics. Additionally, one can add a stochastic
twist to any clustering method by using ensemble clustering, which uses randomness to
probe the stability and robustness of clustering results.

The core of our package is currently:

1. The two classes `Aggregation` and `Hierarchy`, which respectively
formalize a single clustering or partition of a set, and a
   hierarchical clustering of a set, each in a manner that is amicable to
   `numpy` and `pandas` indexing,
and allows cross-referencing between subsets and supersets;

2. The `ensemble` module, which can be used to generate noisy ensembles from a base
dataset and to apply clustering methods to already-generated ensembles

3. The `clustering` module, which contains functions implementing selected
stochastic clustering techniques;

4. The `simulation` and `regulators` modules, which currently allows the generation
of regulated Markov random walks.

In addition to these are several auxiliary modules such as
`distance`, which contains methods for calculating simple distance metrics from data;
`visualization`, which contains methods for easily generating Plotly visualizations
of data and clusters; and
`utils`, which contains useful miscellaneous functions.

Check out our [**site**](https://samlikesphysics.github.io/stoclust/) 
for documentation, examples and further info!

# Installation

To install from `pip`, run

```
>>> pip install stoclust
```

To build from source, you can either download the 
[zip](https://github.com/samlikesphysics/stoclust/archive/main.zip) 
or [tarball](https://github.com/samlikesphysics/stoclust/tarball/main) directly, 
or clone the GitHub repository via

```
>>> git clone https://github.com/samlikesphysics/stoclust.git
```

Then run in the the same folder as `setup.py`:

```
>>> python setup.py build
>>> python -m pip install .
```

# Dependencies

`stoclust` depends on the following packages:

| Package | Recommended version |
| ------- | ------------------- |
| `numpy` | 1.15.0              |
| `scipy` | 1.1.0               |
| `plotly`| 4.12.0              |
| `pandas`| 0.25.0              |
| `tqdm`  | 4.41.1              |
undocinclude 0.2.1
Sphinx' literalinclude, but without docstrings
Requires Python: >=3.7

undocinclude
============

Sphinx plugin that provides a directive `undocinclude`, which is basically [`literalinclude`][0] but hacked to omit docstrings.

Supports a subset of `literalinclude`'s options.

## Installation

Add this package to your requirements, and modify your Sphinx `conf.py`:

```python
extensions = [
    # ...
    'undocinclude.extension',
    # ...
]
```

## Example

```rst
.. undocinclude:: /path/to/script.py
```

[0]: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-literalinclude
ebemse 0.1
A package for selecting ensemble members using entropy theory

# ebemse | *Entropy-Based Ensemble Members SElection*

*ebemse* is a Python library for the selection of a set of mutually exclusive, collectivelly exaustive (MECE) ensemble members.

The library implements the approach presented by [Darbandsari and Coulibaly (2021)](http://doi.org/https://doi.org/10.1016/j.jhydrol.2020.125577) as step that antecedes the further merging of a set of ensemble forecasts.


## Installing

The library can be installed using the traditional pip:

    pip install ebemse

And is listed on the Python Package Index (*pypi*) at []().


## Using

Suppose you have a file named ```example.csv``` with the following content:

```
Date,       Memb_A, Memb_B, ...,  Memb_Z, Obsv
2020/05/15, 1.12,   1.05,   ...,  0.5,    1.01
2020/05/16, 1.15,   1.12,   ...,  0.9,    1.10
2020/05/17, 1.13,   1.32,   ...,  1.1,    1.29
...         ...     ...     ...,  ...,    ...
2020/11/30, 1.22,   0.95,   ...,  0.3,    0.87
```

In which the columns starting with "Memb_" hold the realization of one ensemble member for the time interval and "Obsv" holds the observed values for the same time interval.

If your our objective is to select a MECE set considering obaservations, it can be done using the standard parameters by:

```
import pandas as pd
import ebemse

# read file
data_ensemble = pd.read_csv("example.csv").to_dict('list')
data_obsv = data_ensemble["Obsv"]
del data_ensemble["Obsv"], data_ensemble["Date"]

# perform selection
selected_members = ebemse.select_ensemble_members(data_ensemble, data_obsv)
```

The variable ```selected_members``` will be a dictionary with the following keys and values:

- **history**: dictionary with the following additional information related with the selection process:
	- **total_correlation**: list of floats
	- **joint_entropy**: list of floats
	- **transinformation**: list of floats or ```None```
- **selected_members**: list of string with the labels of the selected elements
- **original_ensemble_joint_entropy**: float


## Further information

### select\_ensemble\_members()

Arguments:
- all_ensemble_members: dict
- observations: Union[list, tuple, np.array, None] (default: *None*)
- n_bins: Union[int, None] (default: *10*)
- bin_by: str (default: *"quantile_individual"*)
- beta_threshold: float (default: *0.9*)
- n_processes: int (default: *1*)
- minimum_n_members: int (default: *2*)
- verbose: bool (default: *False*)