semvec/pypi-packages huggingface dataset:
dateweek 0.1.1
Neste modulo são disponibilizadas funções de calendários.
Requires Python: >=3.9

# DateWeek

DateWeek is a Python package for working with w-sat weeks.

## Usage

```python
from dateweek import DateWeek
from datetime import datetime

# Creating a DateWeek object for the current week
current_week = DateWeek.current_week()

# Creating a DateWeek object for a specific week
week = DateWeek(2020, 1)

# Creating a DateWeek object from a datetime
week = DateWeek.from_datetime(datetime(2020, 1, 1))


# Creating a DateWeek object from a string
week = DateWeek.from_str("2020-01-01")

# Getting the first day and last day of the week
first_day, last_day = week.first_day, week.last_day


# Finding the previous week
previous_week = current_week - 1

# Finding the next week
next_week = current_week + 1

```

## Development

### Conda

```bash
conda env create -f environment.yml
conda activate dateweek
pip install -e .
pip install -e .[dev]
pip install -e .[unittest]
```
souptools 2.1.7
CSS tools
Requires Python: >=3.5

[![Donate via PayPal][donate-image]][donate-link]
[![Discord][discord-image]][discord-link]
[![Build][github-ci-image]][github-ci-link]
[![Coverage Status][codecov-image]][codecov-link]
[![PyPI Version][pypi-image]][pypi-link]
[![PyPI Downloads][pypi-down]][pypi-link]
[![PyPI - Python Version][python-image]][pypi-link]
![License][license-image-mit]

# Soup Sieve

## Overview

Soup Sieve is a CSS selector library designed to be used with [Beautiful Soup 4][bs4]. It aims to provide selecting,
matching, and filtering using modern CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
specifications up through the latest CSS level 4 drafts and beyond (though some are not yet implemented).

Soup Sieve was written with the intent to replace Beautiful Soup's builtin select feature, and as of Beautiful Soup
version 4.7.0, it now is :confetti_ball:. Soup Sieve can also be imported in order to use its API directly for
more controlled, specialized parsing.

Soup Sieve has implemented most of the CSS selectors up through the latest CSS draft specifications, though there are a
number that don't make sense in a non-browser environment. Selectors that cannot provide meaningful functionality simply
do not match anything. Some of the supported selectors are:

- `.classes`
- `#ids`
- `[attributes=value]`
- `parent child`
- `parent > child`
- `sibling ~ sibling`
- `sibling + sibling`
- `:not(element.class, element2.class)`
- `:is(element.class, element2.class)`
- `parent:has(> child)`
colorcorrectionML 0.0.2.1
Do color correction of images using machine learning.
Requires Python: >=3.7

# ColorCorrectionML

ColorCorrectionML is a Python package for color correction of images using machine learning. It uses ML regression methods (linear, least sqaure, and partial least squares regression) to learn the color correction function from a training image with a color checker. The learned function is then applied to correct the color of a test image.

## Installation
```shell
pip install colorcorrectionML
```

## Usage
```python
from ColorCorrectionML import ColorCorrectionML
import cv2

img = cv2.imread('Images/img2.png')

cc = ColorCorrectionML(img, chart='Classic', illuminant='D50')

method = 'pls' # 'linear', 'lstsq', 'pls' 
# for linear regression, least square regression, and partial least square regression respectively
show = True

kwargs = {
    'method': method,
    'degree': 3, # degree of polynomial
    'interactions_only': False, # only interactions terms,
    'ncomp': 10, # number of components for PLS only
    'max_iter': 5000, # max iterations for PLS only
    'white_balance_mtd': 0 # 0: no white balance, 1: learningBasedWB, 2: simpleWB, 3: grayWorldWB,
    }

M, patch_size = cc.compute_correction(
    show=show,
    **kwargs
)
    

# resize img by 2
# img = cv2.resize(img, (0,0), fx=0.3, fy=0.3, interpolation=cv2.INTER_AREA)

img_corr = cc.correct_img(img, show=True)
# img_corr = cc.Parallel_correct_img(img, chunks_=50000, show=True)
```

## Example results
Scatter plot of the original image and the corrected image color values
![scatter plot](Images/scatter_plots.png)

Color correction results
![color correction results](Images/results1.png)


## TODO
1. Add other reference color values (D55, D65, D70, D75)
2. Add other color charts (ColorChecker24, ColorCheckerSG, ColorCheckerDC)
3. Add other color spaces (CIELab, XYZ, etc.)
4. Add other regression methods (Ridge, Lasso, ElasticNet, etc.)
5. Refine the white balance methods