semvec/pypi-packages huggingface dataset:
pyethnicity 0.0.27
Predict race from name and location
Requires Python: >=3.6

# pyethnicity:
[![PyPI version](https://badge.fury.io/py/pyethnicity.svg)](https://badge.fury.io/py/pyethnicity)
![PyPI - Downloads](https://img.shields.io/pypi/dm/pyethnicity)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![Tests](https://github.com/CangyuanLi/pyethnicity/actions/workflows/tests.yaml/badge.svg)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)

## What is it?

**pyethnicity** is a Python package to predict race from name and location and sex from first name. To the best of the author's knowledge, it outperforms all existing open-source models. It does this by training a Bidirectional LSTM on the largest, most comprehensive dataset of name and self-reported race thus far. It uses voter registration data from all 50 states. Additionally, it incorporates location features and improved versions of Bayesian Improved Surname Geocoding and Bayesian Improved Firstname Surname Geocoding to form an ensemble model that achieves up to 36.8% higher F1 scores than the next-best performing model. Finally, it provides CFPB-compliant and up-to-date versions of BISG and BIFSG.

# Usage:

Please see https://pyethnicity.readthedocs.io/en/latest/ for full documentation.

## Installing

The easiest way is to install **pyethnicity** is from PyPI using pip:

```sh
pip install pyethnicity
```

## Running

Pyethnicity exposes several functions. It supports block group, tract, and zip code level features. Each function takes in a scalar or array-like of inputs and returns a polars DataFrame of the input and the predictions.

```python
import pyethnicity

zcta = 27106
tract = 72153750502
first_name = "cangyuan"
last_name = "luo"

pyethnicity.bisg(last_name, zcta=zcta)
pyethnicity.bifsg(first_name, last_name, zcta=zcta, tract=tract)
pyethnicity.predict_race_fl(first_name, last_name)
pyethnicity.predict_race_flg(first_name, last_name, tract=tract)
pyethnicity.predict_race(first_name, last_name, zcta=zcta)
```


## Performance

**pyethnicity**

![](https://github.com/CangyuanLi/pyethnicity/raw/master/assets/ensemble_stats.png)

**rethnicity**

![](https://github.com/CangyuanLi/pyethnicity/raw/master/assets/reth_stats.png)

**ethnicolr**

![](https://github.com/CangyuanLi/pyethnicity/raw/master/assets/eth_stats.png)

Please see the correpsonding paper ["Can We Trust Race Prediction?"](https://github.com/CangyuanLi/pyethnicity/blob/master/paper.pdf) for more details.


# TODO:

- Re-train model to support Native American and Multiracial.

This package is still in active development. Please report any issues!
create-ragbits-app 0.1.1
Set up a modern LLM app by running one command
Requires Python: >=3.11

# create-ragbits-app

A CLI tool to create new ragbits applications from templates.

## Usage

```bash
# Create a new ragbits application
uvx create-ragbits-app
```

## Available Templates

- **rag**: Basic RAG (Retrieval Augmented Generation) application

## Creating Custom Templates

Templates are stored in the `templates/` directory. Each template consists of:

1. A directory with the template name
2. A `template_config.py` file with template metadata and questions
3. Template files, with `.j2` extension for files that should be processed as Jinja2 templates

Available variables in templates:
- `project_name`: Name of the project
- `pkg_name`:  Name of the python package
- `ragbits_version`: Latest version of ragbits
- Custom variables from template questions

## Template structure

To create a new template, add a directory under `templates/` with:

1. Template files (ending in `.j2`) - these will be rendered using Jinja2
2. A `template_config.py` file with template metadata and questions

For example, see the `templates/example-template` directory.

### Template Configuration

The `template_config.py` file should define a `TemplateConfig` class that inherits from `TemplateConfig` and creates a `config` instance at the bottom of the file:

```python
from typing import List
from create_ragbits_app.template_config_base import (
    TemplateConfig,
    TextQuestion,
    ListQuestion,
    ConfirmQuestion
)

class ExampleTemplateConfig(TemplateConfig):
    name: str = "My Template Name"
    description: str = "Description of the template"

    questions: List = [
        TextQuestion(
            name="variable_name",
            message="Question to display to user",
            default="Default value"
        ),
        # More questions...
    ]

# Create instance of the config to be imported
config = ExampleTemplateConfig()
```
pyRFC3339 2.1.0
Generate and parse RFC 3339 timestamps
Requires Python: >=3.9
Keywords: rfc-3339, timestamp, iso-8601, datetime

Description
===========

.. image:: https://github.com/kurtraschke/pyRFC3339/actions/workflows/python.yml/badge.svg
    :target: https://github.com/kurtraschke/pyRFC3339/actions/workflows/python.yml
    :alt: Build Status

.. image:: https://readthedocs.org/projects/pyrfc3339/badge/?version=latest
    :target: https://pyrfc3339.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

pyRFC3339 parses and generates :RFC:`3339`-compliant timestamps using `Python <https://www.python.org/>`_ `datetime.datetime <https://docs.python.org/3/library/datetime.html#datetime-objects>`_ objects.

>>> from pyrfc3339 import generate, parse
>>> from datetime import datetime, timezone
>>> generate(datetime.now(timezone.utc)) #doctest:+ELLIPSIS
'...T...Z'
>>> parse('2009-01-01T10:01:02Z')
datetime.datetime(2009, 1, 1, 10, 1, 2, tzinfo=datetime.timezone.utc)
>>> parse('2009-01-01T14:01:02-04:00')
datetime.datetime(2009, 1, 1, 14, 1, 2, tzinfo=datetime.timezone(datetime.timedelta(days=-1, seconds=72000)))

Installation
============

To install the latest version from `PyPI <https://pypi.org/>`_:

``$ pip install pyRFC3339``

To install the latest development version:

``$ pip install https://github.com/kurtraschke/pyRFC3339/tarball/main#egg=pyRFC3339-dev``

Tests as well as enforcement of code style, formatting, and type safety are run with `tox <https://tox.wiki/>`_:

``$ tox``

To build the documentation with Sphinx:

``$ tox -e docs``

The documentation is also available online at:

https://pyrfc3339.readthedocs.io/
fx-lib 0.5.3
FX's personal common lib
Keywords: fx_lib

======
fx-lib
======


Frank Xu(FX)'s personal FX common lib in Python



Install
--------

    .. code-block:: bash

        pip install git+https://github.com/frankyxhl/py_fx_lib

    or

    .. code-block:: bash

        pip install fx-lib



Log Module
----------

    .. code-block:: python

        import logging
        from fx_lib.log import setup_logging

        setup_logging(".sync.logging.yaml", default_level=logging.DEBUG)
        log = logging.getLogger("frank")

        # Usage
        # log.info("Hello, World")



Email Module
------------

    .. code-block:: python

        from fx_lib.zoho_email import Email

        # Usage
        # with Email.read_config() as e:
        #     e.send("Email Title", "Content")



Example
**********************
Please check here `Config example file <docs/log_config_example.yaml>`_


=======
History
=======

0.1.0 (2019-07-28)
------------------

* First release on PyPI.
git-changes 0.0.3
A way to manage commit messages
Requires Python: >=3.12

# git-changes

I just want to manage my commit messages.

---

## Why?

i just want to keep track of the changes that I make. Instead of adding many changes at once and then writing a long commit message, I just want to add the each change with a message and then commit them.

---

## Installation

```console
pip3 install git-changes
```

---

## Usage

### Initializing

After installing run the below command in a **git repo**

```console
gitc --init
```

### Adding changes with messages

```console
$ git addm file -m 'adding a new file' --type=fix
[fix] adding a new file
```

The `--type` is optional. The currently supported choices for `--type` are

```console
$ git addm -help
usage: gitc-add [-h] -m MESSAGE [--type {feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert}]

options:
  -h, --help            show this help message and exit
  -m MESSAGE, --message MESSAGE
                        Message to add
  --type {feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert}
                        The type of the change
```


### Show Message

To list all the messages that will added to the next commit, run

```console
$ git show-messages
[fix] new hello file
[fix] adding a new file
[perf] fix some_function
[refactor] change var name
```

### Commit

In order to commit with all these message all you have to do is run.

```console
$ git commit
```
This will open up commit message editor with all the set message for the current commit.

![Terminal image](docs/image.png)

> NOTE: you cannot simply save and exit this file; since this is a template you have to make
> some changes to it. I suggest adding a title that summarizes all these changes.

After a successful commit all the messages will be automatically removed.

```console
$ git show-messages
No commit messages yet!.. To add new message run
git addm -m <message> [--type]

```

### Bye...