semvec/pypi-packages huggingface dataset:
graphene-healthchecker 0.1.4
Python library for RPC-healthchecking for graphene blockchains
Keywords: graphene,blockchain,health,api,rpc

# Graphene Backend Healthchecking

## Installation

    pip3 install graphene-healthchecker

## Running Health Check

```
Usage: graphenehealth [OPTIONS] URL

Options:
  --listen INTEGER
  --help            Show this message and exit.
```

**Example**:

```
graphenehealth --listen 8080 https://__ENDPOINT__
```

## Deploy with UWSGI

To deploy with UWSGI, please copy the `config-defaults.yml` file
into your working directory and deploy with systemd.

In `backend-health.service`, replace the variables in `{{ ... }}`
and install it in your systemd directory `/etc/systemd/system`.

## Health Check

1. Check if a connection can be established to the backend node. 
   (Raise HTTP/402 if not.)
2. Check that the returned answer from the backend has status code 200.
   (Raise HTTP/402 if not.)
3. Check if the answer has a "result" key in its json representation.
   (Raise HTTP/402 if not.)
4. Obtain the time of the most recent block as well as the next
   maintenance time
5. Check that current head time is less than 60 seconds old and next
   maintenance interval is more than 10 seconds in the future.
   (Raise HTTP/402 if not.)
DecisionTreeConstraints 0.1
Building Decision Trees with Constraints
Keywords: decision trees classifier pruning constraints

# Decision Tree Constraints 

This is a sample code of the `PruneToSizeK` method for sklearn [Decision Tree Classifier](https://scikit-learn.org/stable/modules/tree.html).

Usage:
```
from sklearn.datasets import load_iris
from sklearn import tree
from DecisionTreeConstraints import SizeConstraintPruning

iris = load_iris()
clf = tree.DecisionTreeClassifier()
clf = clf.fit(iris.data, iris.target)

MAX_SIZE=6
SizeConstraintPruning(MAX_SIZE).pruneToSizeK(clf)

accuracy = clf.score(iris.data, iris.target)
print('Training accuracy for max size %s: %.3f' % (MAX_SIZE, accuracy))
```

Garofalakis, M., Hyun, D., Rastogi, R. et al. Data Mining and Knowledge Discovery (2003) 7: 187. [doi:10.1023](https://doi.org/10.1023/A:1022445500761).