semvec/pypi-packages huggingface dataset:
mlpkg 0.3
ML package
License: MIT

# ML Package

A Package through which multiple things can be done in a go like fitting a model of your own choice (regression/classification) and get final results in terms of model accuracy/ score/ mse/ mae/ confusion matrix and direct submission file which we need to upload in case of competitions.

Two things can be achieved from this package:
1. Results after fitting any Regression/classification algorithm of your own choice. Function to be used - **train_model**
2. Final submission file to be submitted directly in competitions. Function to be used - **return_csv**

### Requirements:
1. sklearn
2. numpy
3. pandas
4. Pre-processed data to be passed - data already cleaned, splitted into train and test
5. In **train_model** function, parameters to be passed:
   * x_train, y_train, x_test, y_test
   * model object
   * regression=True     *(if addressing regression problem)*
   * regression=False     *(if addressing classification problem (default is True))*
6. In **return_csv** function, parameters to be passed:
   * x_train, y_train, x_test, y_test
   * model object
   * sample submission file   *(dataframe)*
   * target column name    *(string)*
   * file location name    *(filepath where to be saved)*

### Installation & Usage
1. Make sure that your pip version is up-to-date: pip install --upgrade pip. Check version with pip -V. 
2. Select the correct package:
   * There are two packages (two versions of the package )and you should SELECT ONLY ONE OF THEM which is the latest one.
   * Install using `pip install mlpkg` with latest version
3. Import the package and use its functions: 
   `from ML_Utility import ML_package`
ping-pang 1.2.0
Ping a URL and output the status code and latency. Save to a log or CSV on an interval.
License: MIT
Requires Python: >=3.6

<div align="center">

# Ping Pang

Ping a URL and output the status code and latency. Save to a log or CSV on an interval.

[![Build Status](https://travis-ci.com/Justintime50/ping-pang.svg?branch=master)](https://travis-ci.com/Justintime50/ping-pang)
[![Coverage Status](https://coveralls.io/repos/github/Justintime50/ping-pang/badge.svg?branch=master)](https://coveralls.io/github/Justintime50/ping-pang?branch=master)
[![PyPi](https://img.shields.io/pypi/v/ping-pang)](https://pypi.org/project/ping-pang)
[![Licence](https://img.shields.io/github/license/justintime50/ping-pang)](https://opensource.org/licenses/mit-license.php)

<img src="assets/showcase.png" alt="Showcase">

</div>

I got tired of my internet underperforming and wanted to start correlating data across the span of a day to see what was up. Using this script, you can do just that by pinging a URL on an interval (recommended for short periods) or setting this script up on a cronjob (for long periods) and saving the output to a CSV where you can then builds graphs and charts to view your data. 

It should be noted that Ping Pang does not actually ping but instead does a GET request to the specified URL. This means that responses will appear a bit slower than simply pinging the same URL on the command line.

## Install

```bash
# Install tool
pip3 install ping-pang

# Install locally
make install

# Get Makefile help
make help
```

## Usage

```
Usage:
    ping-pang --url https://www.google.com --log ~/test.log --csv ~/test.csv --interval 10 --iterations 100

Options
    -h, --help            show this help message and exit
    -u URL, --url URL     The URL you would like to ping.
    -in INTERVAL, --interval INTERVAL
                            The interval before pinging the URL again (in seconds). Default: 1.
    -it ITERATIONS, --iterations ITERATIONS
                            The number of iterations to ping a URL. Default: 60.
    -l LOG_FILE, --log_file LOG_FILE
                            The path to save the output to a log.
    -c CSV_FILE, --csv_file CSV_FILE
                            The path to save the output to a CSV file.
```

## Development

```bash
# Lint the project
make lint

# Run tests
make test

# Run test coverage
make coverage

# Run the tool locally
venv/bin/python pingpang/ping_logic.py --help
```