semvec/pypi-packages huggingface dataset:
gumpgpd 1.0.1
GPD analysis tools for DVCS, DVMP, and lattice inputs
License: MIT
Requires Python: >=3.8

# GUMP: Generalized Parton Distributions through Universal Moment Parameterization

This repository contains the source code for the **Generalized Parton Distributions through Universal Moment Parameterization (GUMP)** program, designed for global analysis of GPDs.

## Overview

- **GPD Calculations:**  
  The script under folder `/Examples` provides example workflows to generate PDFs, GPDs and cross-sections using GUMP parameters obtained from the fitting program.

- **Performance Note:**  
  Evaluating GPDs can be computationally intensive, as it involves QCD evolution in moment space and numerical contour integrals to transform back to the momentum fraction (x) space.

## Usage

- **For simple usage** install through pip by ```pip install gumpgpd```. Check the script under ```/Examples``` for example usage.

- **For modified package and developer**  download the whole branch and run ```pip install -e .``` to install locally (Make sure to ```pip uninstall gumpgpd``` to avoid conflicts if you install the pip version already)

## Change log

- ** v.1.0.1 **: bug fix in GPD calculations.

## Documentation
For detailed documentation and further information, please visit:  
[https://yuxunguo.github.io/GUMP-Global-GPDs/](https://yuxunguo.github.io/GUMP-Global-GPDs/)
tokentik 0.1.1
A simple utility to estimate token counts using tiktoken o200k_base
License: MIT
Requires Python: >=3.9

# Tokentik

A lightweight Python utility for estimating token counts in text, specifically optimized for modern LLMs using the `o200k_base` encoding.

## Installation

```bash
pip install tokentik
```

## Usage

```python
from tokentik import count_tokens

text = "Hello, world!"

# Estimate tokens using the default 'o200k_base' encoding (GPT-4o)
token_count = count_tokens(text)
print(f"Token count: {token_count}")

# Specify a different encoding model (e.g., 'cl100k_base' for GPT-4/GPT-3.5)
token_count_v2 = count_tokens(text, model="cl100k_base")
print(f"Token count (cl100k_base): {token_count_v2}")
```

## Configuration

### Environment Variables

`tiktoken` needs to download and cache the BPE (Byte Pair Encoding) vocabulary files. By default, it uses a temporary directory. To specify a persistent location for these files, set the `TIKTOKEN_CACHE_DIR` environment variable:

```bash
export TIKTOKEN_CACHE_DIR="/path/to/your/models/tiktoken"
```

This is highly recommended for production environments or Cloud Run environments where the storage might be mounted (e.g., at `/mnt/models/tiktoken`).

## Acknowledgments

Special thanks to [OpenAI](https://openai.com/) for their [tiktoken](https://github.com/openai/tiktoken) library, which this utility is built upon.

## License

MIT