semvec/pypi-packages huggingface dataset:
mikatools 1.0.2
Quick methods for everyday Python programming

# Mikatools

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3977549.svg)](https://doi.org/10.5281/zenodo.3977549)

Mikatools provides fast and easy methods for common Python coding tasks.
Some functionality:
 - [script_path()](https://github.com/mikahama/mikatools/wiki/Miscellaneous#script_pathjoin_filenone) gives the location of the current Python script
 - [json_dump(data, file_path)](https://github.com/mikahama/mikatools/wiki/JSON-and-Pickle) saves a dictionary in UTF-8 in a pretty format with indentation, real unicode characters (no unreadable escaped letters) and sorts the keys.
 - [json_load(file_path)](https://github.com/mikahama/mikatools/wiki/JSON-and-Pickle) loads json with UTF-8 encoding
 - [download_file(url, path, show_progress=False)](https://github.com/mikahama/mikatools/wiki/Miscellaneous#download_fileurl-path-show_progressfalse) downloads a file and saves it on the disk
 - [open_read(file, password=None, salt=""")](https://github.com/mikahama/mikatools/wiki/Text-file-streams) opens a UTF-8 file for reading and optionally decrypts it
 - [open_write(file, password=None, salt="")](https://github.com/mikahama/mikatools/wiki/Text-file-streams) opens a UTF-8 file for writing and optionally encrypts it
 - [Super easy multitasking!](https://github.com/mikahama/mikatools/wiki/Multitasking)

[Read the wiki for more](https://github.com/mikahama/mikatools/wiki)

The library mostly provides functionality for my other libraries.

# Cite:

    @software{mika_hamalainen_2020_3977549,
      author       = {Mika Hämäläinen},
      title        = {mikahama/mikatools 1.0.0},
      month        = aug,
      year         = 2020,
      publisher    = {Zenodo},
      version      = {1.0.0},
      doi          = {10.5281/zenodo.3977549},
      url          = {https://doi.org/10.5281/zenodo.3977549}
    }
kernel-quantile-regression 0.0.15
Kernel quantile regression
Requires Python: >=3.10

# Kernel quantile regression
The kernel_quantile_regression package is an open source implementation of the quantile regressor technique introduced in  [[1]](#1).

This repo contains the code for reproducing the research paper [Probabilistic energy forecasting through quantile regression in reproducing kernel Hilbert spaces](https://arxiv.org/pdf/2408.04405). This article has been published in the ACM SIGEnergy Energy Informatics Review.

Example of kernel quantile regression on the Melbourne temperature data [[2]](#2).
![alt text](https://github.com/luca-pernigo/kernel_quantile_regression/blob/main/plots/melbourne/melborune_gaussian_rbf_kernel_quantile_regression.png?raw=true)


## Installation
Use the package manager [pip](https://pypi.org/project/kernel-quantile-regression/) to install kernel_quantile_regression.

```bash
pip install kernel-quantile-regression
```

## Usage

```python
from kernel_quantile_regression.kqr import KQR

# create model instance
# specify your quantile q and hyperparameters C and gamma
kqr_1=KQR(alpha=q, C=100, gamma=0.5)

# train model
kqr_1.fit(X_train, y_train)

# predict
kqr_1.predict(X_test)
```
## Repo files
- Data/
The Data directory contains the raw files for the GEFCom2014 challenge [[3]](#3), data can be accessed from Dr. Tao Hong blog http://blog.drhongtao.com/2017/03/gefcom2014-load-forecasting-data.html. The Data folder contains also the transformed raw data, those constitute the input for our probabilistic forecasting study.

- plots/
Plots for the tutorial and experiments.

- src/kernel_quantile_regression
Source code.

- train_test
scripts to train the models, saved and test them.
    - models
    contains , for each quantile, the pickled trained models.


- utils
Utility functions for extracting, loading and transforming raw data of the GEFCom2014 challenge.

- kqr_tutorial.py
Getting started example, where our method is compared against other valid quantile regressors.

## References
<a id="1">[1]</a> Ichiro Takeuchi, Quoc V. Le, Timothy D. Sears, and Alexander J. Smola. 2006. Non-
parametric Quantile Estimation. Journal of Machine Learning Research 7, 45 (2006),
1231–1264. https://www.jmlr.org/papers/volume7/takeuchi06a/takeuchi06a.pdf

<a id="2">[2]</a> Rob J Hyndman, David M Bashtannyk, and Gary K Grunwald. 1996. Estimating and
visualizing conditional densities. Journal of Computational and Graphical Statistics
5, 4 (1996), 315–336. https://www.jstor.org/stable/1390887

<a id="3">[3]</a> Tao Hong, Pierre Pinson, Shu Fan, Hamidreza Zareipour, Alberto Troccoli, and Rob J.Hyndman. 2016b. Probabilistic energy forecasting: Global Energy Forecasting
Competition 2014 and beyond. International Journal of Forecasting 32, 3 (2016),
896–913. https://www.sciencedirect.com/science/article/abs/pii/S0169207016000133?via%3Dihub

## License
[MIT](https://choosealicense.com/licenses/mit/)
auto-pwlf 0.2.0
Automated piecewise linear fitting
Requires Python: >=3.7

# Auto PWLF
Piecewise Linear Fit with option to automatically find the optimal number of line segments.

[Documentation](https://autopwlf.readthedocs.io/en/latest/#)

The piecewise fitting uses the [pwlf module](https://github.com/cjekel/piecewise_linear_fit_py) with full credit to all contributors to this package.
AutoPWLF exists as an add-on to this package.


![image](https://github.com/user-attachments/assets/cb21b3c2-2ccc-49ff-ab42-f4aa2b991091)
pybadcomments 0.2.1
The linter to detect undesirable words and phrases in comments.
Requires Python: >=3.9

[![tests](https://github.com/M-Moon/pybadcomments/actions/workflows/python-package.yml/badge.svg?branch=main)](https://github.com/M-Moon/pybadcomments/actions/workflows/python-package.yml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![License: MIT](https://black.readthedocs.io/en/stable/_static/license.svg)](https://github.com/M-Moon/pybadcomments/blob/main/LICENSE)

# PyBadComments Linter

A Python code linter designed to find banned words/phrases in Python comments and raise a warning.

A list of words and phrases can be supplied to the library in its pyproject.toml configuration and it will search
any given files for those words in the comments and raise a warning, pointing to the exact line and
offending word that has caused the warning. It uses regex and will match the exact characters in the
strings provided, including any whitespace.

It can be installed as a pre-commit hook to allow for pre-commit linting.

## References
Inspired and aided by [tryceratops](https://github.com/guilatrova/tryceratops)

## Testing
### Samples

Sample files for testing on can be provided in the 'samples' folder. These files act like real Python scripts upon which the linter can be run to test for banned words.

Feel free to add any sample files needed to test unique cases.

### Testing code without a sample file

It is possible to provide Python code as a string and test upon that in test files.

[WIP] Need to ensure the code is setup to allow this.