semvec/pypi-packages huggingface dataset:
hei-calculator 0.1.5
A Python package to calculate Healthy Eating Index (HEI-2015) scores from dietary intake data.
License: MIT
Requires Python: >=3.8

# hei-calculator

**hei-calculator** is a Python package that calculates the **Healthy Eating Index (HEI-2015)** from dietary intake data stored in CSV files.  
It is designed for **researchers, students, and public health professionals** who want to evaluate diet quality easily.

---

## 📖 What is HEI-2015?

The **Healthy Eating Index (HEI-2015)** is a scoring system (0–100 points) that measures how closely a diet follows the **2015–2020 Dietary Guidelines for Americans**.  
It includes **13 components** covering fruits, vegetables, proteins, grains, fats, and sugars.  

- **Higher scores** → Better diet quality  
- **Lower scores** → Poorer diet quality  

---

## 📝 Input Requirements

Your CSV file must include these columns:  

- `kcal` → Total energy intake (kcal)  
- `F_TOTAL` → Total fruits  
- `G_WHOLE` → Whole grains  
- `V_TOTAL` → Total vegetables  
- `V_LEGUMES` → Legumes  
- `V_DRKGR` → Dark green vegetables  
- `D_TOTAL` → Total dairy  
- `PF_TOTAL` → Total protein foods  
- `PF_SEAFD_HI` → Seafood (high in n-3 fats)  
- `PF_SEAFD_LOW` → Seafood (low in n-3 fats)  
- `PF_SOY` → Soy products  
- `PF_NUTSDS` → Nuts and seeds  
- `PF_LEGUMES` → Legumes (protein category)  
- `G_REFINED` → Refined grains  
- `ADD_SUGARS` → Added sugars (grams)  
- `SOLID_FATS` → Saturated fats (grams)  
- `Sodium` / `SODIUM` / `NA` / `sodium` → Sodium (mg)  

---

## 📊 Output

The package calculates **13 HEI-2015 component scores** and one **total score**:

1. HEI_total_fruits  
2. HEI_whole_fruits  
3. HEI_total_veg  
4. HEI_green_and_beans  
5. HEI_whole_grains  
6. HEI_total_dairy  
7. HEI_total_protein  
8. HEI_sea_food  
9. HEI_fatty_acids  
10. HEI_refined_grains  
11. HEI_sodium  
12. HEI_added_sugar  
13. HEI_saturated_fat  

➡️ **HEI_total** = Sum of all 13 components  

The results are saved in a **new CSV file** with these additional columns.

---

## ⚙️ Installation

Install from PyPI:

```bash
pip install hei-calculator
```

---

## 🚀 Usage

```python
from hei_calculator import process_csv

# Example usage
process_csv("input_filepath.csv",
            "output_filepath.csv")
```

### Output only HEI columns
```python
from hei_calculator import process_csv
process_csv("input_filepath.csv", "hei_output_only_filepath.csv", only_hei_columns=True)

```
---

## 👩‍🔬 Who Can Use This?

- **Researchers** working with dietary survey data  
- **Public health professionals** evaluating nutrition programs  
- **Students** learning about diet quality assessment  
- **Anyone** interested in applying the HEI-2015 scoring system  

---

## 📢 Notes

- Ensure all required columns are present in your CSV file.  
- If sodium values are missing, the package sets `HEI_sodium = 0` and shows a warning.  
- Calculations follow the HEI-2015 scoring standards.  

---

## 📜 License

This project is provided under the MIT License.
zyntex 0.2.3
A high-level Python package to parse and generate Zig code.
License: MIT
Requires Python: >=3.9
Keywords: zig parser codegen

# Zyntex - Zig code parser for Python
![Downloads](https://img.shields.io/pypi/dm/zyntex?style=flat-square&color=%234287f5)
![License](https://img.shields.io/github/license/xXenvy/zyntex?style=flat-square&color=%234287f5)
![Python Version](https://img.shields.io/pypi/pyversions/zyntex?style=flat-square&color=%234287f5)
![Zig](https://img.shields.io/badge/zig-v0.15.1-0074C1?style=flat-square&?logo=zig&logoColor=white&color=%234287f5)

Zyntex is a Python library that allows you to parse and generate Zig code at a high level.
Function bodies and other low-level elements are currently returned as raw strings.
Currently, it can parse Zig code written in version **0.15.1** - the
supported parsing version will be continuously updated in the future.

Internally, it uses bindings to Zig's std AST parser, making it both fast and memory-efficient.
**Important:** currently bindings are only available for `windows-x86_64`, `macos-x86_64`, and `linux-x86_64`.
For more information, read the [docs](https://zyntex.readthedocs.io/en/stable).

**Be aware that the project is at a very early stage of development
and is actively being developed.**

## Features
- Parse Zig source from strings or files.
- Code generation - emitting Zig code from Python objects via premade printers.
- High-performance, low-memory parsing powered by Zig’s `std` parser.
- Easy-to-use, Pythonic API designed for inspection Zig code.
- Zero-dependency - the project requires no external dependencies on either the Zig side or the Python side.

## Installation
```bash
pip install zyntex
```

## Minimal example
```python
from typing import cast

from zyntex.code_generation.premade import DefaultCodePrinter
from zyntex.parsing.syntax import VariableDeclaration
from zyntex.parsing import SourceCode

code_printer = DefaultCodePrinter()
src = SourceCode("const result: usize = 15 + 15;")

variable = cast(VariableDeclaration, src.content[0])
variable.is_public = True
print(code_printer.print(src)) # pub const result: usize = 15 + 15;
```