semvec/pypi-packages huggingface dataset:
ifitpy 0.0.8
Simple data fitting package
License: MIT
Keywords: fitting, datascience, iminuit

# Pyfit
### This an ongoing project!

```
pip install ifitpy
```
# Fitter Package Instructions  

## 1. Creating a Fitter Instance  
```python
f = Fitter("linear")  # Available types: "linear", "expo", "gaussian", "gaussian2d", "poly"
```

This package provides fitting capabilities for given `x, y` data, encapsulating both `iminuit` and `curve_fit`.  

Functions are categorized as:  
- **Simple**: `"linear"`, `"expo"`  
- **Complex**: `"gaussian"`, `"gaussian2d"`, `"poly"`

## 2. Performing a Fit  

### Simple Functions (`linear`, `expo`)
```python
f.fit(x, y)  # Estimates initial parameters automatically  
f.fit(x, y, p0)  # Uses provided initial parameters (p0)
```

### Complex Functions (`gaussian`, `gaussian2d`, `poly`)
```python
f.fit(x, y, n)  # Fits using `n` components (e.g., a sum of `n` Gaussians or an `n`-degree polynomial)  
f.fit(x, y, p0)  # Uses provided initial parameters  
f.fit(x, y, n, p0)  # Uses both `n` components and provided initialization parameters  
```
> **Note:** For `fit(x, y, n, p0)`, the length of `p0` must be `n * parameters_to_fit`.

## 3. Binned Fitting  
The `fitBinned` function allows fitting a profile histogram instead of raw data, which is often faster and accounts for statistical fluctuations.  
```python
f.fitBinned(x, y, bins=50)
```

## 4. Extracting Fit Results  
```python
f.fit([0, 10], [0, -10])
p = f.getParams()

print(p)         # Prints a summary of available variables  
print(p.vars)    # List of fit results  
print(p.m)       # Slope for the "linear" type  
print(p.b)       # Intercept for the "linear" type  
```

## 5. Evaluating the Fitted Function  
```python
print(f.evaluate([20]))  # Evaluates the function at x = 20 (useful for plotting)
```
DataValidityCheck 0.0.4
A Python package for validating various types of data.
License: MIT

# DataValidityCheck - Data Validation Package

## Overview
**DataValidityCheck** is a Python package designed to validate personal data, including emails, phone numbers, dates, and URLs. It provides robust validation methods to ensure data accuracy and compliance with common formats.

## Table of Contents
- [Installation](#installation)
- [Features](#features)
- [Usage](#usage)
  - [Email Validation](#email-validation)
  - [Phone Number Validation](#phone-number-validation)
  - [Date Validation](#date-validation)
  - [URL Validation](#url-validation)
- [Contributing](#contributing)
- [Author](#author)
- [License](#license)

## Installation
To install **DataValidityCheck**, use:
```bash
pip install DataValidityCheck
```

## Features
- **Email Validation**: Ensures a valid email format with proper domain structure.
- **Phone Number Validation**: Supports Nigerian phone numbers in local and international formats.
- **Date Validation**: Validates dates in the `DD/MM/YYYY` format, including leap years.
- **URL Validation**: Checks for valid domain structures, including `http://`, `https://`, and `www.` prefixes.

## Usage
First, import the `DataValidator` class:
```python
from DataValidityCheck import DataValidator

validator = DataValidator()
```

### Email Validation
```python
print(validator.validate_email("user@example.com"))  # Valid email address
print(validator.validate_email("invalid-email"))  # Invalid email format, ensure it follows example "example@domain.com."
```

### Phone Number Validation
```python
print(validator.validate_phone("08123456789"))  # Valid phone number
print(validator.validate_phone("+2348123456789"))  # Valid phone number
print(validator.validate_phone("123456"))  # Invalid phone number format
```

### Date Validation
```python
print(validator.validate_date("29/02/2024"))  # Valid date (Leap year)
print(validator.validate_date("31/04/2023"))  # Invalid date (April has 30 days)
```

### URL Validation
```python
print(validator.validate_url("https://www.google.com"))  # Valid URL
print(validator.validate_url("htp://invalid.com"))  # Invalid URL format
```

## Contributing
Contributions are welcome! To contribute:
1. Fork the repository.
2. Create a new branch (`feature-branch`).
3. Commit your changes.
4. Submit a pull request.

Ensure you run tests before submitting:
```bash
pytest tests/
```

## Author
**Olajide Oluwafemi Richard**

## License
This package is open-source and available under the [MIT License](LICENSE).