semvec/pypi-packages huggingface dataset:
pi18n 0.1.3
A Python internationalization (i18n) package
License: MIT

# Pi18n
Pi18n is an internationalization library for Python

## Installation
Install using pip
```shell
pip install pi18n
```

## Getting started
Pi18n lets you internationalize your Python app in a simple way. It works like this:
- Provide Pi18n with as many JSON files as languages your app is going to support.
  - Each file will be named with the locale of the language it represents.
  - The content that is going to be placed in the app will be in each of these files, translated into the language that 
  the file represents and associated with a code. 
  - The way a translation is associated with a code is by a JSON object: each key of the object is the code, and the value
  is the translation associated to the code for every language.
  - Every JSON object of every file must have the same keys.
  - Translations can contain named parameters (placeholders) that will be replaced by a certain value on translation-time. Provide 
  as many as needed with this syntax: `{param-code}`.
- Instantiate an object of `TranslationService` class. Its constructor must receive:
  1. The path with the translation files.
  2. The default locale.
- Call the `get` method of the `TranslationService` instance for getting a translation:
  1. Provide the translation code to the `get` method as the first argument.
  2. Optionally, provide parameters to the translation either as a dict or as keyword arguments.

## Usage
### 1. Place some translation files in your project
**resources/es.json**
```json
{
  "HELLO_WORLD": "Hola mundo!",
  "WITH_PARAMS": "Los parámetros son: {fruit1}, {fruit2} and {fruit3}"
}
```
**resources/en.json**
```json
{
  "HELLO_WORLD": "Hello world!",
  "WITH_PARAMS": "Params are: {fruit1}, {fruit2} and {fruit3}"
}
```

### 2. Create an instance of `TranslationService`
**main.py**
```python
from pi18n import TranslationService

translation_service = TranslationService('resources', 'es')
```

### 3. Use the `TranslationService`
Get a translation:

```python
translation = translation_service.get("HELLO_WORLD")
print(f"Message in Spanish: {translation}")

>>> "Message in Spanish: Hola mundo!"
```

Change locale at runtime:

```python
translation_service.change_locale("en")
translation = translation_service.get("HELLO_WORLD")
print(f"Message in English: {translation}")

>>> "Message in English: Hello world!"
```

Get a translation that receives some params as a dict:
```python
params = {"fruit1": "apple", "fruit2": "orange", "fruit3": "banana"}
translation = translation_service.get("WITH_PARAMS", params)
print(f"Message with params: {translation}")

>>> "Message with params: Params are: apple, orange and banana"
```

Get a translation that receives some params as kerword arguments:
```python
translation = translation_service.get("WITH_PARAMS", fruit1="apple", fruit2="orange", fruit3="banana")
print(f"Message with params: {translation}")

>>> "Message with params: Params are: apple, orange and banana"
```
numpy-ringbuffer 0.2.2
Ring buffer implementation for numpy
License: MIT
Keywords: numpy,buffer,ringbuffer,circular buffer

# numpy_ringbuffer

[![Build Status](https://github.com/eric-wieser/numpy_ringbuffer/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/eric-wieser/numpy_ringbuffer/actions/workflows/main.yml)
[![codecov](https://codecov.io/gh/eric-wieser/numpy_ringbuffer/branch/master/graph/badge.svg)](https://codecov.io/gh/eric-wieser/numpy_ringbuffer)

Ring (aka circular) buffers backed by a numpy array, supporting:

 * Operations from `collections.deque`
   * `b.append(val)`
   * `b.appendleft(val)`
   * `b.extend(val)`
   * `b.extendleft(val)`
   * `b.pop(val)`
   * `b.popleft(val)`
 * The `collections.Sequence` protocol (unoptimized)
 * C-side unwrapping into an array with `np.array(b)`
 * Arbitrary element dtypes, including extra dimensions like `RingBuffer(N, dtype=(int, 3))`

For example:

```python
import numpy as np
from numpy_ringbuffer import RingBuffer

r = RingBuffer(capacity=4, dtype=np.bool)
r.append(True)
r.appendleft(False)
print(np.array(r))  # array([False, True])
```
spatial-interpolators 1.0.0.4
Spatial interpolation tools for Python
License: MIT
Keywords: spatial interpolation,regridding,regridding over a sphere

=====================
spatial-interpolators
=====================

|Language|
|License|
|PyPI Version|
|Documentation Status|
|Binder|
|Pangeo|

.. |Language| image:: https://img.shields.io/pypi/pyversions/spatial-interpolators?color=green
   :target: https://www.python.org/

.. |License| image:: https://img.shields.io/github/license/tsutterley/spatial-interpolators
   :target: https://github.com/tsutterley/spatial-interpolators/blob/master/LICENSE

.. |PyPI Version| image:: https://img.shields.io/pypi/v/spatial-interpolators.svg
   :target: https://pypi.python.org/pypi/spatial-interpolators/

.. |Documentation Status| image:: https://readthedocs.org/projects/spatial-interpolators/badge/?version=latest
   :target: https://spatial-interpolators.readthedocs.io/en/latest/?badge=latest

.. |Binder| image:: https://mybinder.org/badge_logo.svg
   :target: https://mybinder.org/v2/gh/tsutterley/spatial-interpolators/master

.. |Pangeo| image:: https://img.shields.io/static/v1.svg?logo=Jupyter&label=PangeoBinderAWS&message=us-west-2&color=orange
   :target: https://aws-uswest2-binder.pangeo.io/v2/gh/tsutterley/spatial-interpolators/master?urlpath=lab

Functions to spatially interpolate data over Cartesian and spherical grids

Dependencies
############

- `cython: C-extensions for Python <https://cython.org>`_
- `matplotlib: Python 2D plotting library <https://matplotlib.org/>`_
- `numpy: Scientific Computing Tools For Python <https://www.numpy.org>`_
- `scipy: Scientific Tools for Python <https://www.scipy.org/>`_

Download
########

| The program homepage is:
| https://github.com/tsutterley/spatial-interpolators
| A zip archive of the latest version is available directly at:
| https://github.com/tsutterley/spatial-interpolators/archive/master.zip

Disclaimer
##########

This project contains work and contributions from the `scientific community <./CONTRIBUTORS.rst>`_.
It includes software developed at NASA Goddard Space Flight Center (GSFC) and the
University of Washington Applied Physics Laboratory (UW-APL).
This software not sponsored or maintained by the Universities Space Research Association (USRA), or NASA.
It is provided here for your convenience but *with no guarantees whatsoever*.

License
#######

The content of this project is licensed under the
`Creative Commons Attribution 4.0 Attribution license <https://creativecommons.org/licenses/by/4.0/>`_
and the source code is licensed under the `MIT license <LICENSE>`_.