semvec/pypi-packages huggingface dataset:
cx-economics 1.0.0
Analyze CX economics using NPS and revenue data.
License: MIT
Requires Python: >=3.6


# cx_economics

`cx_economics` is a Python library designed to analyze the economics of customer experience (CX) using Net Promoter Score (NPS) and revenue data. It supports both B2C and B2B scenarios, providing insights into CX transitions and their financial implications.

## Features

1. Generate synthetic customer or account data with pre- and post-NPS scores and revenue.
2. Compute Net Promoter Score (NPS) for pre- and post-periods.
3. Calculate revenue metrics (average, median) for pre- and post-periods.
4. Analyze customer transitions across NPS categories (Promoter, Passive, Detractor).
5. Support for B2C and B2B survey types with appropriate data aggregation.

## Installation

You can install `cx_economics` via pip:

```bash
pip install cx_economics
```

## Quick Start

### 1. Import and Initialize the Library

```python
from cx_economics import CXEconomics

# Initialize the CXEconomics class with a seed for reproducibility
cx = CXEconomics(seed=42)
```

### 2. Generate Sample Data

```python
# Generate 1000 customer records for a B2C scenario
data = cx.generate_sample_data(num_customers=1000, b2b=False)
print("Sample Data:")
print(data.head())
```

### 3. Analyze CX Economics

```python
# Analyze CX economics for a B2C survey
stats = cx.analyze_cx_economics(survey_type='B2C')
print("Analysis Statistics:")
print(stats)
```

### 4. Calculate Transition Statistics

```python
# Calculate transition statistics
transitions = cx.get_transition_stats()
print("CX Transitions (DataFrame):")
print(transitions)
```

## Use Cases

1. **Identify CX Trends:** Compare pre- and post-NPS scores to track improvements or declines in customer satisfaction.
2. **Revenue Impact Analysis:** Understand the financial implications of changes in customer loyalty.
3. **Transition Analysis:** Gain insights into how customers move between loyalty categories and their associated revenue impact.
4. **Support for B2B Scenarios:** Aggregate data at the account level for business-to-business CX analysis.

## License

This library is licensed under the MIT License.
syml 0.6.2
SYML (Simple YAML-like Markup Language) is a simple markup language with similar structure to YAML, but without all the gewgaws and folderol.
License: MIT
Requires Python: <4.0,>=3.12

SYML
----

![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/eykd/syml/ci.yaml)
![PyPI - Version](https://img.shields.io/pypi/v/syml)


SYML (Simple YAML-like Markup Language) is a simple markup language with
similar structure to YAML, but without all the gewgaws and folderol.


Example
=======

Here's a simple SYML document:

``` python

>>> document = """
foo:
  - bar
  - baz
  - blah
    boo
    baloon

booleans?:
  - True
  - False
  - true
  - false
  - TRUE
  - FALSE
"""
```

And the resulting data structure::

``` python
>>> import syml
>>> syml.loads(document)
{'foo': ['bar', 'baz', 'blah\nboo\nbaloon'],
 'booleans?': ['True', 'False', 'true', 'false', 'TRUE', 'FALSE']}
```


All leaf values in SYML are just plain ol' strings. No ints, floats, bools, or
nasty remote code execution bugs!
wiki2md 0.1.3
python library for converting wikipedia articles to markdown
License: MIT
Requires Python: <4.0,>=3.11
Keywords: wikimedia, api, python

# Wiki2Md

An opinionated tool for converting wikipedia HTML into markdown suitable for ingestion by LLMs.

- removes citations (.reference)
- removes ref list (.reflist)
- removes js table headers and footers (.pcs-collapse-table-icon)
- removes metadata like portal lists (.metadata)
- removes flag icons
- optionally removes links

Install the pre-commit hooks with `poetry run pre-commit install` or just run them manually e.g. `poetry run ruff check`
what2_grapheme 0.2.0
Default template for PDM package
License: MIT
Requires Python: >=3.13

# What2 Grapheme

A pure Python implementation of the Unicode algorithm for breaking strings of text (i.e., code point sequences) into extended grapheme clusters ("user-perceived characters") as specified in [Unicode Standard Annex #29](https://unicode.org/reports/tr29/), "Unicode Text Segmentation". API functions include type annotations. This package conforms to version 16.0 of the Unicode standard, released in September 2024, and has been rigorously tested against the official Unicode test file to ensure accuracy.

Note: Package contains grapheme data files 
as downloaded from [Unicode Data Files](https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/)
and associated license.

Unicode data files are under the associated unicode license.
Use of this package should be in accordance with those terms.

## Why?

```python
>>> from what2_grapheme import api
>>> string = 'u̲n̲d̲e̲r̲l̲i̲n̲e̲d̲'
>>> len(string)
20
>>> api.is_safe(string)
False
>>> api.length(string)
10
>>> string[:3]
'u̲n'
>>> api.strslice(string, 0, 3)
'u̲n̲d̲'
```

## Usage

Functions are available in `what2_grapheme.api`:
```python
>>> from what2_grapheme import api
```

- `is_safe`: Whether a string is safe to handle using builtin `str` operations.
- `iter_grapheme_sizes`: Iterate through grapheme cluster lengths.
- `contains`: Grapheme aware is-substring test.
- `graphemes`: Break a string to a list of graphemes.
- `length`: Grapheme aware length.
- `strslice`: Grapheme aware slicing

## Updating UTF data version

It's possible to load newer versions of grapheme
data with the provided functions by downloading
data files. If rules haven't changed, this will
continue to work without code change. To load newer
data files load data using
`what2_grapheme.grapheme_property.lookup.GraphemeBreak`
then pass an instance of that class to `api` functions as the `properties` argument.

If rules change, code will need changing.

## Implementation

This package includes 3 different implementations of
the grapheme break rules. A simple state machine, 
a fast state machine and a RegEx based
implementation. The last is the one exposed in
`api` as it's the fastest but not easily understood.

## Performance

The first usage is slow due to raw data being parsed
and caches being populated, but after that it's
faster than any alternative I've found.

To run benchmarks, checkout and install dev
dependencies using `pdm` then run `python -m bm`.
The benchmark is thrown together. This package
includes 3 different implementations of the grapheme
break rules, 2 are included in the benchmark.
winandrodumpi 0.10
Android Window dumper
License: MIT
Keywords: Automation, Android, botting


# Android Window dumper

Android window dumper ```cmd window dump-visible-window-views``` to pandas DataFrame

```pip install winandrodumpi```

Cython and a C compiler must be installed! The module will be compiled the first time you import it!

```py
import pandas as pd
from cythondfprint import add_printer
from winandrodumpi import parse_window_elements
import numpy as np

add_printer(1)
allparsed = parse_window_elements(
    dump_cmd=[
        "adb",
        "-s",
        "127.0.0.1:5556",
        "shell",
        "cmd window dump-visible-window-views",
    ],
)
alldfs = []
itemindex = 0
for parsed in allparsed:
    try:
        df = pd.DataFrame.from_dict(parsed, orient="index", dtype=object)
        df2 = np.array_split(df, df.loc[~df["id"].isna()].index)
        for item in df2:
            alldfs.append(item.ffill().bfill().assign(aa_itemindex=itemindex))
            itemindex += 1
    except Exception as e:
        print(e)
df = pd.concat(alldfs, ignore_index=True)
print(df)
```