semvec/pypi-packages huggingface dataset:
voxgan 0.0.2
Python package to generate 2D and 3D images using Generative Adversarial Networks and PyTorch
Requires Python: >=3.9
Keywords: python, deep learning, deep generative modeling, GAN, 2D, 3D, PyTorch

# voxgan

[![DOI:10.25919/cdgf-cw44](http://img.shields.io/badge/DOI-10.25919/cdgf--cw44-B31B1B.svg)](https://doi.org/10.25919/cdgf-cw44)

voxgan is a Python package to generate 2D and 3D images using Generative Adversarial Networks and PyTorch. It was developed to help along the project [FluvGAN](https://github.com/grongier/fluvgan), with no specific development planned beyond this project.

## Installation

You can directly install voxgan from pip:

    pip install voxgan

Or from GitHub using pip:

    pip install git+https://github.com/grongier/voxgan.git

To run the Jupyter notebook in [examples](examples) you will also need pandas, matplotlib, and jupyter, which you can install from pip too:

    pip install pandas matplotlib jupyter

## Usage

Here's a basic example of voxgan's API:

```
from voxgan.models.dcgan import DCGAN3d

# Define a PyTorch dataset for training
training_dataset = # TO DEFINE

# Define a GAN based on DCGAN, which includes generator and discriminator
gan = DCGAN3d()
# Configure the GAN for training, including the optimizers
gan.configure()
# Train the GAN
gan.train(training_dataset)
# Generate 10 samples
samples = gan.predict(num_samples=10)
```

For a more complete example, see the Jupyter notebook [using_voxgan.ipynb](examples/using_voxgan.ipynb) in [examples](examples). For more advanced uses of voxgan, see [FluvGAN](https://github.com/grongier/fluvgan).

## Citation

If you use voxgan in your research, please cite the original article(s) describing the method(s) you used (see the docstrings for the references). You can also cite voxgan itself:

> Rongier, G. (2021) voxgan. v1. CSIRO. Software Collection. https://doi.org/10.25919/cdgf-cw44

Here is the corresponding BibTex entry if you use LaTex:

    @misc{Rongier2021,
        author = "Rongier, Guillaume",
        title = "voxgan",
        number = "v1",
        institution = "CSIRO",
        type = "Software Collection",
        year = "2021",
        doi = "10.25919/cdgf-cw44"
    }

## Credits

This software was written by:

| [Guillaume Rongier](https://github.com/grongier) <br>[![ORCID Badge](https://img.shields.io/badge/ORCID-A6CE39?logo=orcid&logoColor=fff&style=flat-square)](https://orcid.org/0000-0002-5910-6868)</br> |
| :---: |

## License

Copyright notice: Technische Universiteit Delft hereby disclaims all copyright interest in the program voxgan written by the Author(s). Prof.dr.ir. S.G.J. Aarninkhof, Dean of the Faculty of Civil Engineering and Geosciences

&#169; 2021-2025, Guillaume Rongier  
&#169; 2020-2021, Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230

This work is licensed under a MIT OSS licence, see [LICENSE](LICENSE) for more information.
gwsamplefind 0.1.0
Access gravitational-wave sample data

:code:`gwsamplefind` allows access to inidividual events posterior samples and found injection sets.
It is primarily intended as a command line tool, but can also be used as a library.

.. warning::

    This code (and associated server) is currently very much in development and so may not be reliable.
    Especially, the specific host referred to below may not be available at all times.

Basic Usage
-----------

To download a set of samples for all events more significant than a given inverse false alarm rate (IFAR), you can use the following command:

.. code-block:: bash

    $ python -m gwsamplefind --outdir ./tmp --n-samples 10 --parameters mass_1_source --seed 10 --host https://gwsamples.duckdns.org --ifar-threshold 5

To select only a subset of events you can use the `--events` flag:

.. code-block:: bash

    $ python -m gwsamplefind --outdir ./tmp --n-samples 10 --parameters mass_1_source --seed 10 --host https://gwsamples.duckdns.org --ifar-threshold 5 --events GW150914_095045 GW190517_055101

.. note::

    The `--events` flag is a space-separated list of event names using the `GWYYMMDD_SUBDAY` format.

Alternatively, to download a set of injections passing a matching threshold on IFAR, you can use the following command:

.. code-block:: bash

    $ python -m gwsamplefind --outdir ./tmp --n-samples 10 --parameters mass1_source --seed 10 --host https://gwsamples.duckdns.org --ifar-threshold 5 --injection-set o1+o2+o3_bbhpop_real+semianalytic

If repeated calls are going to be made, the `--host` argument can be avoided by setting the :code:`GWSAMPLEFIND_SERVER` environment variable.

Alternatively, :code:`gwsamplefind` can be used as a library:

.. code-block:: python

    In [1]: from gwsamplefind.client import Client

    In [2]: client = Client("https://gwsamples.duckdns.org")

    In [3]: client.events()[:3]
    Out[3]: ['GW150914_095045', 'GW151012_095443', 'GW151226_033853']

    In [4]: client.samples("GW190403_051519", ["mass_1_source", "mass_2_source"], 10, seed=123)
    Out[4]: (       mass_1_source  mass_2_source
    171        84.189941      12.951107
    10120      65.196794      39.803265
    2453       93.339017      13.003137
    3715       90.226224      18.606987
    7594       58.999799      30.350026
    6600       77.465397      28.502002
    2840       77.523519      21.019240
    1959      106.907594      11.683538
    2053       95.548452      26.507532
    599        71.564036      25.451262, {'filename': 'IGWN-GWTC2p1-v2-GW190403_051519_PEDataRelease_mixed_cosmo.h5', 'model': 'C01:IMRPhenomXPHM'})
octoanalytics 0.3.6
Quantitative analysis for power markets
Keywords: python, quantitative, risk, power, quant, octopusenergy




<p align="center">
  <img src="images/logo_octoanalytics.png" alt="octoanalytics logo" width="200"/>
</p>

[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# octoanalytics 📊⚡

**Energy consumption forecasting & risk premium analysis for the French electricity market**

---

## Description


`octoanalytics` is a Python toolkit for:

- Retrieving and smoothing **weather data** via Open-Meteo API.
- Training and evaluating **load forecasting models** (MW) using Random Forest.
- Generating **interactive visualizations** comparing actual vs. forecasted values.
- Accessing **spot and forward price data** (annual, monthly, PFC) from **Databricks SQL**.
- Computing **volume and shape risk premiums**, key for energy portfolio management.

---

## Installation

```bash
pip install octoanalytics
```

> ⚠️ You need a valid Databricks access token to retrieve market data.

---

## Dependencies

- `pandas`
- `numpy`
- `scikit-learn`
- `plotly`
- `matplotlib`
- `tqdm`
- `requests`
- `tentaclio`
- `yaspin`
- `holidays`
- `dotenv`
- `databricks-sql-connector`

---

## Main Features

### 🔁 Weather data retrieval and smoothing

```python
from octoanalytics import get_temp_smoothed_fr

temp_df = get_temp_smoothed_fr(start_date="2024-01-01", end_date="2024-12-31")
```

---

### ⚡ Load forecasting

```python
from octoanalytics import eval_forecast

forecast_df = eval_forecast(df=load_df(), temp_df=temp_df, cal_year=2024)
```

---

### 💰 Risk premium calculation

#### Volume Risk

```python
from octoanalytics import calculate_prem_risk_vol

premium = calculate_prem_risk_vol(forecast_df, spot_df, forward_df)
```

#### Shape Risk

```python
from octoanalytics import calculate_prem_risk_shape

shape_risk = calculate_prem_risk_shape(forecast_df, pfc_df, spot_df)
```

---

### 🔌 Databricks SQL connections

```python
from octoanalytics import get_spot_price_fr, get_forward_price_fr_annual

spot_df = get_spot_price_fr(token=DB_TOKEN, start_date="2024-01-01", end_date="2024-12-31")
forward_df = get_forward_price_fr_annual(token=DB_TOKEN, cal_year=2025)
```

---

## Package Structure

```
octoanalytics/
│
├── __init__.py
├── core.py              # Main logic
├── ...
```

---

## Authors

**Jean Bertin**  
📧 jean.bertin@octopusenergy.fr

**Thomas Maaza**  
📧 thomas.maaza@octoenergy.com

---

## License

MIT – free to use, modify, and distribute.

---

## Roadmap

- [ ] Add XGBoost model
- [ ] Load anomaly detection
- [ ] Flask REST API deployment
- [ ] Automatic PDF report generation

---

## Full Demo

To be included in `examples/forecast_demo.ipynb`.