```md
# PCHJLIB - Joesifer
<h1 align="center">
<img src="https://i.imgur.com/AUXxUzd.png" width="500" alt="PCHJLIB - Joesifer">
</h1><br>
[](https://pypi.org/project/pchjlib/)
[](https://github.com/Joesifer/pchjlib)
[](https://www.python.org/)
[](https://github.com/Joesifer)
## ๐ Requirements
- **Python**: >= 3.7
- **gmpy2**: Optional for big integer support in features like checking large primes. Install via `pip install gmpy2`.
## ๐ ๏ธ Installation
๐ Install the core library without optional dependencies.
๐ก **Note:** To download the icon (logo) to your `site-packages` folder, run `pchj-icon`.
### ๐ง Option 1: Install from GitHub (development version)
```bash
python -m pip install git+https://github.com/Joesifer/pchjlib.git
```
### ๐ฆ Option 2: Install from PyPI (stable release)
```bash
python -m pip install pchjlib
```
### ๐ Then run:
```bash
pchj-icon
```
### ๐ Optional: Enable additional features
To activate big integer support (e.g., for large primes in `is_prime`), install `gmpy2`:
```bash
python -m pip install gmpy2
```
---
## โ Basic Usage
๐ก **Note:** `{function}` can be `is_prime`, `generate_prime_list`, etc.
### โ
Option 1: Import a single function
```bash
from pchjlib.{primes} import {function}
result = {function}(value_1, value_2, ...)
```
### โ
Option 2: Call via the module
```bash
import pchjlib.{primes}
result = pchjlib.{primes}.{function}(value_1, value_2, ...)
```
---
## ๐ Key Features
- ๐ **Special Number Checking and Generation**: Supports prime, emirp, Fibonacci, perfect, narcissistic, amicable, square, strong, twin prime, abundant, and happy numbers.
- ๐ **Divisor and Multiple Operations**: Generate divisor lists, compute GCD, LCM, and perform prime factorization.
- ๐งน **List and String Processing**: Remove duplicates, extract digits/numbers/characters, and compress/decompress strings.
- ๐ **Encryption and Decryption**: Implements Caesar cipher (for educational use only).
- โจ **Special Calculations**: Includes electricity bill calculation, largest number with a given digit sum, sequence generation, and inversion counting.
## ๐ Table of Contents
- ๐ข [Prime and Related Number Functions](#-prime-and-related-number-functions-primespy)
- ๐ [Fibonacci Functions](#-fibonacci-functions-fibonaccipy)
- ๐ง [Perfect, Narcissistic, Amicable, and Happy Number Functions](#-perfect-narcissistic-amicable-and-happy-number-functions-special_numbers1py)
- ๐ [Square, Strong, and Friendly Number Functions](#-square-strong-and-friendly-number-functions-special_numbers2py)
- ๐ [Divisor and Multiple Functions](#-divisor-and-multiple-functions-divisors_multiplespy)
- ๐ฏ [Twin Prime and Abundant Number Functions](#-twin-prime-and-abundant-number-functions-twin_abundantpy)
- ๐ [Prime Factorization Functions](#-prime-factorization-functions-prime_factorizationpy)
- ๐งต [List and String Processing Functions](#-list-and-string-processing-functions-string_processingpy)
- ๐๏ธ [Caesar Cipher Functions](#%EF%B8%8F-caesar-cipher-functions-caesar_cipherpy)
- ๐ฅ [Special Calculation Functions](#-special-calculation-functions-special_calculationspy)
- ๐ [Sequence Generation Functions](#-sequence-generation-functions-sequence_generationpy)
- ๐ข [Inversion Counting Functions](#-inversion-counting-functions-inversion_countingpy)
- ๐ [Sample Command List for the `pchjlib` Library](#-sample-command-list-for-the-pchjlib-library)
- ๐งช [Running Tests](#-running-tests)
- ๐ ๏ธ [Update History](#%EF%B8%8F-update-history)
---
### ๐ข Prime and Related Number Functions (primes.py)
**is_prime(input_number)**
Checks if a number is prime.
- Parameter: `input_number` (int)
- Returns: `True` if prime, `False` otherwise.
- Raises: `InvalidInputError` if not an integer or negative.
- Example: `is_prime(7)` โ `True`
**generate_prime_list(limit)**
Generates primes from 0 to `limit` using the Sieve algorithm.
- Parameter: `limit` (int)
- Returns: List of primes.
- Raises: `InvalidInputError` if `limit` < 2 or not an integer.
- Example: `generate_prime_list(10)` โ `[2, 3, 5, 7]`
**is_emirp(input_number)**
Checks if a number is an emirp (prime with prime reverse).
- Parameter: `input_number` (int)
- Returns: `True` if emirp, `False` otherwise.
- Raises: `InvalidInputError` if not a positive integer >= 2.
- Example: `is_emirp(13)` โ `True`
**generate_emirp_list(limit)**
Generates emirp numbers from 2 to `limit`.
- Parameter: `limit` (int)
- Returns: List of emirp numbers.
- Raises: `InvalidInputError` if `limit` < 2 or not an integer.
- Example: `generate_emirp_list(20)` โ `[13, 17]`
---
### ๐ Fibonacci Functions (fibonacci.py)
**fibonacci_at_index(index)**
Calculates the Fibonacci number at a given index with caching.
- Parameter: `index` (int)
- Returns: Fibonacci number.
- Raises: `InvalidInputError` if not a non-negative integer.
- Example: `fibonacci_at_index(5)` โ `5`
**generate_fibonacci_list(count)**
Generates the first `count` Fibonacci numbers.
- Parameter: `count` (int)
- Returns: List of Fibonacci numbers.
- Raises: `InvalidInputError` if not a non-negative integer.
- Example: `generate_fibonacci_list(5)` โ `[0, 1, 1, 2, 3]`
---
### ๐ง Perfect, Narcissistic, Amicable, and Happy Number Functions (special_numbers1.py)
**sum_of_divisors(input_number)**
Computes the sum of positive divisors (excluding itself).
- Parameter: `input_number` (int)
- Returns: Sum of divisors.
- Raises: `InvalidInputError` if not a positive integer.
- Example: `sum_of_divisors(6)` โ `6`
**sum_of_digits(input_number)**
Calculates the sum of a number's digits.
- Parameter: `input_number` (int)
- Returns: Sum of digits.
- Raises: `InvalidInputError` if not an integer.
- Example: `sum_of_digits(123)` โ `6`
**is_perfect_number(input_number)**
Checks if a number is perfect.
- Parameter: `input_number` (int)
- Returns: `True` if perfect, `False` otherwise.
- Raises: `InvalidInputError` if not a positive integer.
- Example: `is_perfect_number(6)` โ `True`
**generate_perfect_number_list(limit)**
Generates perfect numbers from 1 to `limit`.
- Parameter: `limit` (int)
- Returns: List of perfect numbers.
- Raises: `InvalidInputError` if not a positive integer.
- Example: `generate_perfect_number_list(10)` โ `[6]`
**is_narcissistic_number(input_number)**
Checks if a number is narcissistic.
- Parameter: `input_number` (int)
- Returns: `True` if narcissistic, `False` otherwise.
- Raises: `InvalidInputError` if not a non-negative integer.
- Example: `is_narcissistic_number(153)` โ `True`
**generate_narcissistic_number_list(limit)**
Generates narcissistic numbers from 0 to `limit`.
- Parameter: `limit` (int)
- Returns: List of narcissistic numbers.
- Raises: `InvalidInputError` if not a non-negative integer.
- Example: `generate_narcissistic_number_list(10)` โ `[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`
**are_amicable_numbers(number1, number2)**
Checks if two numbers are amicable.
- Parameters: `number1`, `number2` (int)
- Returns: `True` if amicable, `False` otherwise.
- Raises: `InvalidInputError` if not positive integers.
- Example: `are_amicable_numbers(220, 284)` โ `True`
**is_happy_number(input_number)**
Checks if a number is happy.
- Parameter: `input_number` (int)
- Returns: `True` if happy, `False` otherwise.
- Raises: `InvalidInputError` if not a positive integer.
- Example: `is_happy_number(19)` โ `True`
**generate_happy_number_list(limit)**
Generates happy numbers from 1 to `limit`.
- Parameter: `limit` (int)
- Returns: List of happy numbers.
- Raises: `InvalidInputError` if not a positive integer.
- Example: `generate_happy_number_list(10)` โ `[1, 7, 10]`
---
### ๐ Square, Strong, and Friendly Number Functions (special_numbers2.py)
**is_square_number(input_number)**
Checks if a number is a perfect square.
- Parameter: `input_number` (int)
- Returns: `True` if square, `False` otherwise.
- Raises: `InvalidInputError` if not a non-negative integer.
- Example: `is_square_number(16)` โ `True`
**generate_square_number_list(limit)**
Generates square numbers from 0 to `limit`.
- Parameter: `limit` (int)
- Returns: List of square numbers.
- Raises: `InvalidInputError` if not a non-negative integer.
- Example: `generate_square_number_list(10)` โ `[0, 1, 4, 9]`
**are_friendly_numbers(number1, number2)**
Checks if two numbers are friendly.
- Parameters: `number1`, `number2` (int)
- Returns: `True` if friendly, `False` otherwise.
- Raises: `InvalidInputError` if not positive integers.
- Example: `are_friendly_numbers(30, 140)` โ `True`
**is_strong_number(input_number)**
Checks if a number is a strong number (sum of factorial of its digits equals the number itself).
- Parameter: `input_number` (int)
- Returns: `True` if strong, `False` otherwise.
- Raises: `InvalidInputError` if not a non-negative integer.
- Example: `is_strong_number(145)` โ `True`
---
### ๐ Divisor and Multiple Functions (divisors_multiples.py)
**sum_of_divisors(input_number)**
Computes the sum of positive divisors (excluding itself).
- Parameter: `input_number` (int)
- Returns: Sum of divisors.
- Raises: `InvalidInputError` if not a positive integer.
- Example: `sum_of_divisors(6)` โ `6`
**generate_divisor_list(input_number, positive_only=True)**
Generates divisors of a number.
- Parameters: `input_number` (int), `positive_only` (bool)
- Returns: List of divisors.
- Raises: `InvalidInputError` if not an integer or zero.
- Example: `generate_divisor_list(6)` โ `[1, 2, 3, 6]`
**generate_multiple_list(base_number, limit, positive_only=True)**
Generates multiples of a number up to `limit` times.
- Parameters: `base_number` (int), `limit` (int), `positive_only` (bool)
- Returns: List of multiples.
- Raises: `InvalidInputError` if not integers, number is zero, or limit < 1.
- Example: `generate_multiple_list(3, 5)` โ `[3, 6, 9, 12, 15]`
**common_divisors(numbers)**
Generates common divisors for a list of numbers.
- Parameter: `numbers` (list)
- Returns: List of common divisors.
- Raises: `InvalidInputError` if not a list or contains non-integers; `MathError` if fewer than 2 non-zero elements.
- Example: `common_divisors([12, 18])` โ `[1, 2, 3, 6]`
**greatest_common_divisor(numbers)**
Computes the GCD of a list of numbers.
- Parameter: `numbers` (list)
- Returns: GCD value.
- Raises: `InvalidInputError` if not a list or contains non-integers; `MathError` if fewer than 2 non-zero elements.
- Example: `greatest_common_divisor([12, 18])` โ `6`
**least_common_multiple(numbers)**
Computes the LCM of a list of numbers.
- Parameter: `numbers` (list)
- Returns: LCM value.
- Raises: `InvalidInputError` if not a list, contains non-integers, or zeros; `MathError` if fewer than 2 elements.
- Example: `least_common_multiple([4, 6])` โ `12`
---
### ๐ฏ Twin Prime and Abundant Number Functions (twin_abundant.py)
**is_twin_prime(input_number)**
Checks if a number is a twin prime.
- Parameter: `input_number` (int)
- Returns: `True` if twin prime, `False` otherwise.
- Raises: `InvalidInputError` if not an integer.
- Example: `is_twin_prime(5)` โ `True`
**generate_twin_prime_list(limit)**
Generates twin primes from 2 to `limit`.
- Parameter: `limit` (int)
- Returns: List of twin primes.
- Raises: `InvalidInputError` if not an integer >= 2.
- Example: `generate_twin_prime_list(20)` โ `[3, 5, 7, 11, 13, 17, 19]`
**is_abundant_number(input_number)**
Checks if a number is abundant.
- Parameter: `input_number` (int)
- Returns: `True` if abundant, `False` otherwise.
- Raises: `InvalidInputError` if not a positive integer.
- Example: `is_abundant_number(12)` โ `True`
**generate_abundant_number_list(limit)**
Generates abundant numbers from 1 to `limit`.
- Parameter: `limit` (int)
- Returns: List of abundant numbers.
- Raises: `InvalidInputError` if not a positive integer.
- Example: `generate_abundant_number_list(20)` โ `[12, 18, 20]`
---
### ๐ Prime Factorization Functions (prime_factorization.py)
**prime_factors(input_number)**
Factorizes a number into prime factors.
- Parameter: `input_number` (int)
- Returns: List of prime factors.
- Raises: `InvalidInputError` if not a positive integer > 1.
- Example: `prime_factors(12)` โ `[2, 2, 3]`
**greatest_common_prime_divisor(number1, number2)**
Finds the greatest common prime divisor of two numbers.
- Parameters: `number1`, `number2` (int)
- Returns: Greatest common prime divisor.
- Raises: `InvalidInputError` if not positive integers > 1; `MathError` if no common prime divisor.
- Example: `greatest_common_prime_divisor(12, 18)` โ `3`
---
### ๐งต List and String Processing Functions (string_processing.py)
**remove_duplicates(items)**
Removes duplicates from a list and sorts in descending order.
- Parameter: `items` (list)
- Returns: Sorted list without duplicates.
- Raises: `InvalidInputError` if not a list/tuple.
- Example: `remove_duplicates([1, 2, 2, 3])` โ `[3, 2, 1]`
**extract_digits_from_string(text)**
Extracts individual digits from a string.
- Parameter: `text` (str)
- Returns: List of digits.
- Example: `extract_digits_from_string("abc123")` โ `[1, 2, 3]`
**extract_numbers_from_string(text)**
Extracts full numbers from a string.
- Parameter: `text` (str)
- Returns: List of numbers.
- Example: `extract_numbers_from_string("abc123def456")` โ `[123, 456]`
**extract_characters(text)**
Extracts non-digit characters from a string.
- Parameter: `text` (str)
- Returns: List of characters.
- Example: `extract_characters("a1b2c3")` โ `['a', 'b', 'c']`
**compress_string(text, compress_type)**
Compresses a string using two methods.
- Parameters: `text` (str), `compress_type` (int)
- Returns: Compressed string.
- Example (type 1): `compress_string("google", 1)` โ `'e2gl2o'`
- Example (type 2): `compress_string("google", 2)` โ `'g2ogle'`
**compress_string_without_numbers(input_text)**
Compresses a string by removing consecutive duplicates.
- Parameter: `input_text` (str)
- Returns: Compressed string.
- Example: `compress_string_without_numbers("hhhoocssssiiinnnhhhhh")` โ `'hocsinh'`
**decompress_string(text)**
Decompresses a string with numeric counts.
- Parameter: `text` (str)
- Returns: Decompressed string.
- Example: `decompress_string("g2ogle")` โ `"google"`
**unique_characters_string(text)**
Creates a string with unique characters in order of appearance.
- Parameter: `text` (str)
- Returns: String with no duplicates.
- Example: `unique_characters_string("google")` โ `"gole"`
---
### ๐๏ธ Caesar Cipher Functions (caesar_cipher.py)
**caesar_cipher_to_numbers(text, shift)**
Converts a string to a list of Caesar cipher numbers.
- Parameters: `text` (str), `shift` (int)
- Returns: List of shifted numbers.
- Example: `caesar_cipher_to_numbers("ABC", 3)` โ `[3, 4, 5]`
**caesar_cipher_from_numbers(numbers, shift)**
Decodes a list of Caesar cipher numbers into a string.
- Parameters: `numbers` (list), `shift` (int)
- Returns: Decoded string.
- Example: `caesar_cipher_from_numbers([3, 4, 5], 3)` โ `"ABC"`
---
### ๐ฅ Special Calculation Functions (special_calculations.py)
**calculate_electricity_bill_Vietnamese(old_reading, new_reading)**
Calculates an electricity bill based on Vietnamese pricing tiers.
- Parameters: `old_reading`, `new_reading` (float)
- Returns: String with consumption and cost.
- Example: `calculate_electricity_bill_Vietnamese(100, 150)` โ `"- Electricity consumed this month: 50.0 Kwh\n- Electricity bill this month: 83900.0 VND"`
**largest_number_with_digit_sum(digit_count, target_sum)**
Finds the largest number with `digit_count` digits summing to `target_sum`.
- Parameters: `digit_count` (int), `target_sum` (int)
- Returns: Largest number as a string.
- Example: `largest_number_with_digit_sum(3, 15)` โ `'960'`
---
### ๐ Sequence Generation Functions (sequence_generation.py)
**generate_sequence_rule_1(count)**
Generate a sequence of positive integers according to the rule:
- One number is divisible by **1**,
- Two numbers are divisible by **2**,
- Three numbers are divisible by **3**,
- and so on, the numbers increase until the number of numbers is `count`.
- Parameter: `count` (int)
- Returns: List of sequence numbers.
- Example: `generate_sequence_rule_1(10)` โ `[1, 4, 6, 9, 12, 15, 16, 20, 24, 28]`
**generate_sequence_rule_2(base, count)**
Generates `count` multiples of `base`.
- Parameters: `base` (int), `count` (int)
- Returns: List of multiples.
- Example: `generate_sequence_rule_2(2, 5)` โ `[0, 2, 4, 6, 8]`
**generate_sequence_rule_3(count, base)**
Generates powers of `base` from 0 to `count-1`.
- Parameters: `count` (int), `base` (int)
- Returns: List of powers.
- Example: `generate_sequence_rule_3(5, 2)` โ `[1, 2, 4, 8, 16]`
---
### ๐ข Inversion Counting Functions (inversion_counting.py)
**count_inversions(numbers)**
Counts the number of inversions in a list.
- Parameter: `numbers` (list)
- Returns: Number of inversions.
- Example: `count_inversions([1, 3, 2])` โ `1`
---
## ๐ Sample Command List for the `pchjlib` Library
## 1. Primes and Emirps
- **Check if a number is prime:**
`python pchjmain.py primes_and_emirps --is_prime <number>`
_Example:_ `python pchjmain.py primes_and_emirps --is_prime 17`
- **Generate a list of primes:**
`python pchjmain.py primes_and_emirps --generate_prime_list <limit>`
_Example:_ `python pchjmain.py primes_and_emirps --generate_prime_list 50`
- **Check if a number is an emirp:**
`python pchjmain.py primes_and_emirps --is_emirp <number>`
_Example:_ `python pchjmain.py primes_and_emirps --is_emirp 13`
- **Generate a list of emirps:**
`python pchjmain.py primes_and_emirps --generate_emirp_list <limit>`
_Example:_ `python pchjmain.py primes_and_emirps --generate_emirp_list 100`
## 2. Twin Primes and Abundant Numbers
- **Check if a number is a twin prime:**
`python pchjmain.py twin_primes_and_abundant --is_twin_prime <number>`
_Example:_ `python pchjmain.py twin_primes_and_abundant --is_twin_prime 5`
- **Generate a list of twin primes:**
`python pchjmain.py twin_primes_and_abundant --generate_twin_prime_list <limit>`
_Example:_ `python pchjmain.py twin_primes_and_abundant --generate_twin_prime_list 50`
- **Check if a number is abundant:**
`python pchjmain.py twin_primes_and_abundant --is_abundant <number>`
_Example:_ `python pchjmain.py twin_primes_and_abundant --is_abundant 12`
- **Generate a list of abundant numbers:**
`python pchjmain.py twin_primes_and_abundant --generate_abundant_list <limit>`
_Example:_ `python pchjmain.py twin_primes_and_abundant --generate_abundant_list 100`
## 3. Fibonacci Sequence
- **Compute the Fibonacci number at a given index:**
`python pchjmain.py fibonacci --at_index <index>`
_Example:_ `python pchjmain.py fibonacci --at_index 10`
- **Generate a list of Fibonacci numbers:**
`python pchjmain.py fibonacci --generate_list <count>`
_Example:_ `python pchjmain.py fibonacci --generate_list 5`
## 4. Special Numbers 1 (Perfect, Narcissistic, Amicable, Happy)
- **Check if a number is perfect:**
`python pchjmain.py special_numbers_1 --is_perfect <number>`
_Example:_ `python pchjmain.py special_numbers_1 --is_perfect 28`
- **Generate a list of perfect numbers:**
`python pchjmain.py special_numbers_1 --generate_perfect_list <limit>`
_Example:_ `python pchjmain.py special_numbers_1 --generate_perfect_list 1000`
- **Check if a number is narcissistic:**
`python pchjmain.py special_numbers_1 --is_narcissistic <number>`
_Example:_ `python pchjmain.py special_numbers_1 --is_narcissistic 153`
- **Generate a list of narcissistic numbers:**
`python pchjmain.py special_numbers_1 --generate_narcissistic_list <limit>`
_Example:_ `python pchjmain.py special_numbers_1 --generate_narcissistic_list 1000`
- **Check if two numbers are amicable:**
`python pchjmain.py special_numbers_1 --are_amicable <number1> <number2>`
_Example:_ `python pchjmain.py special_numbers_1 --are_amicable 220 284`
- **Check if a number is happy:**
`python pchjmain.py special_numbers_1 --is_happy <number>`
_Example:_ `python pchjmain.py special_numbers_1 --is_happy 19`
- **Generate a list of happy numbers:**
`python pchjmain.py special_numbers_1 --generate_happy_list <limit>`
_Example:_ `python pchjmain.py special_numbers_1 --generate_happy_list 100`
## 5. Special Numbers 2 (Square, Strong, Friendly)
- **Check if a number is a perfect square:**
`python pchjmain.py special_numbers_2 --is_square <number>`
_Example:_ `python pchjmain.py special_numbers_2 --is_square 16`
- **Generate a list of perfect squares:**
`python pchjmain.py special_numbers_2 --generate_square_list <limit>`
_Example:_ `python pchjmain.py special_numbers_2 --generate_square_list 100`
- **Check if a number is strong:**
`python pchjmain.py special_numbers_2 --is_strong <number>`
_Example:_ `python pchjmain.py special_numbers_2 --is_strong 145`
- **Check if two numbers are friendly:**
`python pchjmain.py special_numbers_2 --are_friendly <number1> <number2>`
_Example:_ `python pchjmain.py special_numbers_2 --are_friendly 30 140`
## 6. Divisors and Multiples
- **Generate a list of divisors:**
`python pchjmain.py divisors_and_multiples --generate_divisor_list <number>`
_Example:_ `python pchjmain.py divisors_and_multiples --generate_divisor_list 28`
- **Generate a list of multiples:**
`python pchjmain.py divisors_and_multiples --generate_multiple_list <number> <limit>`
_Example:_ `python pchjmain.py divisors_and_multiples --generate_multiple_list 3 20`
- **Find common divisors:**
`python pchjmain.py divisors_and_multiples --common_divisors <number1> <number2> [<number3> ...]`
_Example:_ `python pchjmain.py divisors_and_multiples --common_divisors 12 18 24`
- **Compute GCD (Greatest Common Divisor):**
`python pchjmain.py divisors_and_multiples --gcd <number1> <number2> [<number3> ...]`
_Example:_ `python pchjmain.py divisors_and_multiples --gcd 12 18 24`
- **Compute LCM (Least Common Multiple):**
`python pchjmain.py divisors_and_multiples --lcm <number1> <number2> [<number3> ...]`
_Example:_ `python pchjmain.py divisors_and_multiples --lcm 4 5 6`
## 7. Prime Factorization
- **Prime factorization:**
`python pchjmain.py prime_factorization --prime_factors <number>`
_Example:_ `python pchjmain.py prime_factorization --prime_factors 100`
- **Greatest common prime divisor:**
`python pchjmain.py prime_factorization --greatest_common_prime_divisor <number1> <number2>`
_Example:_ `python pchjmain.py prime_factorization --greatest_common_prime_divisor 12 18`
## 8. String Processing
- **Remove duplicate elements:**
`python pchjmain.py string_processing --remove_duplicates <elem1> <elem2> ...`
_Example:_ `python pchjmain.py string_processing --remove_duplicates 1 2 2 3 4 4`
- **Extract digits:**
`python pchjmain.py string_processing --extract_digits "<string>"`
_Example:_ `python pchjmain.py string_processing --extract_digits "a1b2c3"`
- **Extract numbers:**
`python pchjmain.py string_processing --extract_numbers "<string>"`
_Example:_ `python pchjmain.py string_processing --extract_numbers "a12b34c56"`
- **Extract non-digit characters:**
`python pchjmain.py string_processing --extract_characters "<string>"`
_Example:_ `python pchjmain.py string_processing --extract_characters "a1b2c3"`
- **Compress a string (type 1 or 2):**
`python pchjmain.py string_processing --compress "<string>" <compress_type>`
_Example:_ `python pchjmain.py string_processing --compress "aaabbbcc" 1`
- **Compress a string without counts:**
`python pchjmain.py string_processing --compress_without_numbers "<string>"`
_Example:_ `python pchjmain.py string_processing --compress_without_numbers "aaabbbcc"`
- **Decompress a string:**
`python pchjmain.py string_processing --decompress "<compressed_string>"`
_Example:_ `python pchjmain.py string_processing --decompress "a3b2c1"`
- **Get unique characters in a string:**
`python pchjmain.py string_processing --unique_characters "<string>"`
_Example:_ `python pchjmain.py string_processing --unique_characters "aaabbbcc"`
## 9. Caesar Cipher
- **Convert text to Caesar numbers:**
`python pchjmain.py caesar_cipher --to_numbers "<text>" <shift>`
_Example:_ `python pchjmain.py caesar_cipher --to_numbers "abc" 3`
- **Convert Caesar numbers back to text:**
`python pchjmain.py caesar_cipher --from_numbers <shift> <num1> <num2> ...`
_Example:_ `python pchjmain.py caesar_cipher --from_numbers 3 4 5 6`
## 10. Special Calculations
- **Calculate an electricity bill:**
`python pchjmain.py special_calculations --electricity_bill <old_reading> <new_reading>`
_Example:_ `python pchjmain.py special_calculations --electricity_bill 100 200`
- **Find the largest number with given digits sum:**
`python pchjmain.py special_calculations --largest_number <digit_count> <digit_sum>`
_Example:_ `python pchjmain.py special_calculations --largest_number 3 15`
## 11. Sequence Generation
- **Generate sequence by rule 1:**
`python pchjmain.py sequence_generation --rule1 <count>`
_Example:_ `python pchjmain.py sequence_generation --rule1 5`
- **Generate sequence by rule 2:**
`python pchjmain.py sequence_generation --rule2 <base> <count>`
_Example:_ `python pchjmain.py sequence_generation --rule2 2 5`
- **Generate sequence by rule 3:**
`python pchjmain.py sequence_generation --rule3 <count> <base>`
_Example:_ `python pchjmain.py sequence_generation --rule3 5 2`
## 12. Inversion Counting
- **Count inversions in a list:**
`python pchjmain.py inversion_counting --count <elem1> <elem2> ...`
_Example:_ `python pchjmain.py inversion_counting --count 2 3 1 4`
---
### Note
- Replace `<...>` with actual values when running the command.
- Ensure commands are executed in the directory containing `pchjmain.py`.
- For detailed help on any category, run `python pchjmain.py <category> -h` (e.g., `python pchjmain.py primes_and_emirps -h`).
---
## ๐งช Running Tests
To run the unit tests for the library, navigate to the project root and execute:
```bash
python -m unittest discover tests
```
This will discover and run all tests in the `tests/` directory. Ensure the library is installed in editable mode (`pip install -e .`) for proper import resolution.
---
## ๐ ๏ธ Update History
> **๐
Latest Update:** August 11, 2025
> **๐ฆ Total Releases:** 92
---
## ๐ 2025
### 1.6.0 โ 1.5.0 (August 11, 2025)
- ๐ง Fixed minor bugs
- โ
Updated `is_strong_number` to the standard factorion definition (sum of factorial of digits equals the number) Removed variant parameter for simplicity; future versions may add separate functions for related concepts like powerful numbers
- โ
Adjusted CLI for `special_numbers_2`: Removed `--variant` option from `--is_strong`
- โ๏ธ Updated README: Revised description and example for `is_strong_number` in the functions section and Sample Command List; incremented version and release count
- โ Removed `solve_equation` function and its corresponding "Equation Solving" category in the command-line interface (now 12 categories total)
- โ
Eliminated dependency on `numpy` by optimizing `generate_prime_list` with `bytearray` for memory efficiency
- โ
Added optional integration with `gmpy2` for handling large primes in `is_prime`
- โ
Added type hints to all functions for better code readability and IDE support
- โ
Added detailed examples to docstrings for all functions
- โ
Optimized performance: Switched `fibonacci_at_index` to iterative loop; improved `largest_number_with_digit_sum` to correctly return the largest number by reversing the result; increased range in `generate_sequence_rule_1` for larger counts
- โ
Updated variable names for clarity (e.g., `number` to `input_number`)
- โ
Fixed minor bugs in string compression examples and sequence generation
- โ๏ธ Updated README: Removed Equation Solving section, updated Requirements and Installation (removed numpy references, added gmpy2), updated function descriptions with new examples, renumbered Sample Command List to 12 categories
### 1.4.5 โ 1.3.0 (August 7-8, 2025)
- ๐ง Fixed minor bugs
---
### 1.2.3 โ 1.0.1 (August 4โ5, 2025)
- โ Removed functions
- `tao_day_chu`
- `uoc_chung_cua_danh_sach`
- `abundant_number_check`
- `xau_ki_tu_khong_trung_lap`
- ๐ง Fixed minor bugs
- โ๏ธ Updated README
- โ
Added logo support via `pchj-icon`
- โ
Added Sample **Command List** for the `pchjlib` Library
- โ
Enhanced `main` for expanded functions
---
### ๐ BIG UPDATE (August 3, 2025)
### 1.0.0 โ 0.1.5.1 (August 4โ5, 2025)
- ๐ Major performance, error handling, documentation, and testing overhaul
- Performance optimizations
- Caching `fibonacci_at_index`
- Optimized `is_emirp` and `is_strong_number`
- Error handling improvements
- Specific error messages
- Boundary checks
- Documentation and examples
- Complex examples for `solve_equation` and string functions
- README enhancements: detailed examples, better install instructions, removed deprecated references
- Testing
- Unit tests for all core functions
- โ Discontinue dependency on `roman` library
- โ Removed unused functions
- `teen_code_yahoo`
- `mp_tai_xuong`
- `mp_tinh_toan`
- `mp_loading`
- `mp_christmas_tree`
- `chuong_trinh_matrix`
- `one_two_three`
- `pythagore`
- โ
Switched README to English
- โ
Enhanced `solve_equation` and `generate_sequence_rule_1`
- โ
Improved `generate_multiple_list` and `greatest_common_divisor`
---
### 0.1.5 โ 0.1.4 (August 2, 2025)
- โ Removed `chuyen_doi_so_la_ma`
- ๐ง Fixed and updated `chuong_trinh_matrix`
- โ
Added negative divisor/multiple options
- ๐ง Fixed `common_divisors`
- โ Removed extra helper functions
- โ
Merged string compression functions
---
### 0.1.3.2 โ 0.1.2 (August 1, 2025)
- ๐ง Minor bug fixes
- โ
Consolidated strong-number logic
- โก Optimized Fibonacci and prime functions
- ๐ Added type hints, docstrings, input validation, and error documentation
---
### 0.1.1.3 โ 0.1.0.7 (July 31, 2025)
- โ๏ธ README updates
- ๐ง Bug fixes and updated `numpy` & `roman` dependencies
---
### 0.1.0.6 โ 0.1.0.3 (July 28โ30, 2025)
- ๐ง Bug fixes
---
### 0.1.0.2 โ 0.1.0 (July 28, 2025)
- ๐ง Minor content fixes
- โ Removed several legacy functions
- ๐งน Complete code overhaul
---
#### ๐ต 0.0.5.x โ Minor Tweaks
- **0.0.5.2.1 & 0.0.5.2** (July 27, 2025)
- โ๏ธ README fixes
- **0.0.5.1** (July 27, 2025)
- ๐ Updated `teen_code_yahoo`
- **0.0.5.0** (July 26, 2025)
- โ Removed `an_ky_tu`
---
## ๐ 2024
### 0.0.4.1 (October 17, 2024)
- ๐ Added `tao_day_chu`
- ๐ Updated `one_two_three`
---
### 0.0.4.0 & 0.0.3.9 (May 5, 2024)
- โ๏ธ README fixes
---
### 0.0.3.8 & 0.0.3.7 (May 4โ5, 2024)
- ๐ Updated `mp_christmas_tree` variants
---
### 0.0.3.6 & 0.0.3.5 (March 1โ3, 2024)
- ๐งช Testing phase
---
### 0.0.3.4 (February 26, 2024)
- โ Added `uoc_chung_cua_danh_sach`
---
### 0.0.3.3 โ 0.0.3 (February 20โ21, 2024)
- ๐ง README & metadata enhancements
- โ Added abundant number check
- โ Added `xau_ki_tu_khong_trung_lap`
- โ Removed `ki_tu_trung_lap`
---
### 0.0.2.10 โ 0.0.2.7 (February 18โ19, 2024)
- ๐ง README updates
- ๐งช Testing
---
### 0.0.2.6 (February 18, 2024)
- โ๏ธ Switched to MIT License
---
### 0.0.2.5 โ 0.0.2.1 (February 14โ18, 2024)
- ๐ง README & tests
---
### 0.0.2 โ 0.0.1 (February 14, 2024)
- ๐ Fixed dependencies
- ๐งช Testing
---
### 0.0.0.1 (February 14, 2024)
- ๐ Initial release!
```
Raw data
{
"_id": null,
"home_page": null,
"name": "pchjlib",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "pchjlib, math, education, numbers, prime numbers, fibonacci, string processing, caesar cipher",
"author": "Joesifer",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/fa/05/fe000552402a9d57d2d1261b72c7b0fc4cba34f1a992f794c3a46c1b6dda/pchjlib-1.6.0.tar.gz",
"platform": null,
"description": "```md\r\n# PCHJLIB - Joesifer\r\n\r\n<h1 align=\"center\">\r\n<img src=\"https://i.imgur.com/AUXxUzd.png\" width=\"500\" alt=\"PCHJLIB - Joesifer\">\r\n</h1><br>\r\n\r\n[](https://pypi.org/project/pchjlib/)\r\n[](https://github.com/Joesifer/pchjlib)\r\n[](https://www.python.org/)\r\n[](https://github.com/Joesifer)\r\n\r\n## \ud83d\udcda Requirements\r\n\r\n- **Python**: >= 3.7\r\n- **gmpy2**: Optional for big integer support in features like checking large primes. Install via `pip install gmpy2`.\r\n\r\n## \ud83d\udee0\ufe0f Installation\r\n\r\n\ud83d\ude80 Install the core library without optional dependencies.\r\n\r\n\ud83d\udca1 **Note:** To download the icon (logo) to your `site-packages` folder, run `pchj-icon`.\r\n\r\n### \ud83d\udd27 Option 1: Install from GitHub (development version)\r\n\r\n```bash\r\npython -m pip install git+https://github.com/Joesifer/pchjlib.git\r\n```\r\n\r\n### \ud83d\udce6 Option 2: Install from PyPI (stable release)\r\n\r\n```bash\r\npython -m pip install pchjlib\r\n```\r\n\r\n### \ud83d\udd04 Then run:\r\n\r\n```bash\r\npchj-icon\r\n```\r\n\r\n### \ud83c\udf1f Optional: Enable additional features\r\n\r\nTo activate big integer support (e.g., for large primes in `is_prime`), install `gmpy2`:\r\n\r\n```bash\r\npython -m pip install gmpy2\r\n```\r\n\r\n---\r\n\r\n## \u2753 Basic Usage\r\n\r\n\ud83d\udca1 **Note:** `{function}` can be `is_prime`, `generate_prime_list`, etc.\r\n\r\n### \u2705 Option 1: Import a single function\r\n\r\n```bash\r\nfrom pchjlib.{primes} import {function}\r\nresult = {function}(value_1, value_2, ...)\r\n```\r\n\r\n### \u2705 Option 2: Call via the module\r\n\r\n```bash\r\nimport pchjlib.{primes}\r\nresult = pchjlib.{primes}.{function}(value_1, value_2, ...)\r\n```\r\n\r\n---\r\n\r\n## \ud83c\udf1f Key Features\r\n\r\n- \ud83d\udd0d **Special Number Checking and Generation**: Supports prime, emirp, Fibonacci, perfect, narcissistic, amicable, square, strong, twin prime, abundant, and happy numbers.\r\n- \ud83d\udd17 **Divisor and Multiple Operations**: Generate divisor lists, compute GCD, LCM, and perform prime factorization.\r\n- \ud83e\uddf9 **List and String Processing**: Remove duplicates, extract digits/numbers/characters, and compress/decompress strings.\r\n- \ud83d\udd10 **Encryption and Decryption**: Implements Caesar cipher (for educational use only).\r\n- \u2728 **Special Calculations**: Includes electricity bill calculation, largest number with a given digit sum, sequence generation, and inversion counting.\r\n\r\n## \ud83d\udcda Table of Contents\r\n\r\n- \ud83d\udd22 [Prime and Related Number Functions](#-prime-and-related-number-functions-primespy)\r\n- \ud83c\udf00 [Fibonacci Functions](#-fibonacci-functions-fibonaccipy)\r\n- \ud83e\udde0 [Perfect, Narcissistic, Amicable, and Happy Number Functions](#-perfect-narcissistic-amicable-and-happy-number-functions-special_numbers1py)\r\n- \ud83d\udcd0 [Square, Strong, and Friendly Number Functions](#-square-strong-and-friendly-number-functions-special_numbers2py)\r\n- \ud83d\udcca [Divisor and Multiple Functions](#-divisor-and-multiple-functions-divisors_multiplespy)\r\n- \ud83d\udc6f [Twin Prime and Abundant Number Functions](#-twin-prime-and-abundant-number-functions-twin_abundantpy)\r\n- \ud83d\udd0d [Prime Factorization Functions](#-prime-factorization-functions-prime_factorizationpy)\r\n- \ud83e\uddf5 [List and String Processing Functions](#-list-and-string-processing-functions-string_processingpy)\r\n- \ud83c\udfdb\ufe0f [Caesar Cipher Functions](#%EF%B8%8F-caesar-cipher-functions-caesar_cipherpy)\r\n- \ud83d\udca5 [Special Calculation Functions](#-special-calculation-functions-special_calculationspy)\r\n- \ud83d\udd01 [Sequence Generation Functions](#-sequence-generation-functions-sequence_generationpy)\r\n- \ud83d\udd22 [Inversion Counting Functions](#-inversion-counting-functions-inversion_countingpy)\r\n- \ud83d\udccb [Sample Command List for the `pchjlib` Library](#-sample-command-list-for-the-pchjlib-library)\r\n- \ud83e\uddea [Running Tests](#-running-tests)\r\n- \ud83d\udee0\ufe0f [Update History](#%EF%B8%8F-update-history)\r\n\r\n---\r\n\r\n### \ud83d\udd22 Prime and Related Number Functions (primes.py)\r\n\r\n**is_prime(input_number)**\r\nChecks if a number is prime. \r\n - Parameter: `input_number` (int) \r\n - Returns: `True` if prime, `False` otherwise. \r\n - Raises: `InvalidInputError` if not an integer or negative. \r\n - Example: `is_prime(7)` \u2192 `True`\r\n\r\n**generate_prime_list(limit)**\r\nGenerates primes from 0 to `limit` using the Sieve algorithm. \r\n - Parameter: `limit` (int) \r\n - Returns: List of primes. \r\n - Raises: `InvalidInputError` if `limit` < 2 or not an integer. \r\n - Example: `generate_prime_list(10)` \u2192 `[2, 3, 5, 7]`\r\n\r\n**is_emirp(input_number)**\r\nChecks if a number is an emirp (prime with prime reverse). \r\n - Parameter: `input_number` (int) \r\n - Returns: `True` if emirp, `False` otherwise. \r\n - Raises: `InvalidInputError` if not a positive integer >= 2. \r\n - Example: `is_emirp(13)` \u2192 `True`\r\n\r\n**generate_emirp_list(limit)**\r\nGenerates emirp numbers from 2 to `limit`. \r\n - Parameter: `limit` (int) \r\n - Returns: List of emirp numbers. \r\n - Raises: `InvalidInputError` if `limit` < 2 or not an integer. \r\n - Example: `generate_emirp_list(20)` \u2192 `[13, 17]`\r\n\r\n---\r\n\r\n### \ud83c\udf00 Fibonacci Functions (fibonacci.py)\r\n\r\n**fibonacci_at_index(index)**\r\nCalculates the Fibonacci number at a given index with caching. \r\n - Parameter: `index` (int) \r\n - Returns: Fibonacci number. \r\n - Raises: `InvalidInputError` if not a non-negative integer. \r\n - Example: `fibonacci_at_index(5)` \u2192 `5`\r\n\r\n**generate_fibonacci_list(count)**\r\nGenerates the first `count` Fibonacci numbers. \r\n - Parameter: `count` (int) \r\n - Returns: List of Fibonacci numbers. \r\n - Raises: `InvalidInputError` if not a non-negative integer. \r\n - Example: `generate_fibonacci_list(5)` \u2192 `[0, 1, 1, 2, 3]`\r\n\r\n---\r\n\r\n### \ud83e\udde0 Perfect, Narcissistic, Amicable, and Happy Number Functions (special_numbers1.py)\r\n\r\n**sum_of_divisors(input_number)**\r\nComputes the sum of positive divisors (excluding itself). \r\n - Parameter: `input_number` (int) \r\n - Returns: Sum of divisors. \r\n - Raises: `InvalidInputError` if not a positive integer. \r\n - Example: `sum_of_divisors(6)` \u2192 `6`\r\n\r\n**sum_of_digits(input_number)**\r\nCalculates the sum of a number's digits. \r\n - Parameter: `input_number` (int) \r\n - Returns: Sum of digits. \r\n - Raises: `InvalidInputError` if not an integer. \r\n - Example: `sum_of_digits(123)` \u2192 `6`\r\n\r\n**is_perfect_number(input_number)**\r\nChecks if a number is perfect. \r\n - Parameter: `input_number` (int) \r\n - Returns: `True` if perfect, `False` otherwise. \r\n - Raises: `InvalidInputError` if not a positive integer. \r\n - Example: `is_perfect_number(6)` \u2192 `True`\r\n\r\n**generate_perfect_number_list(limit)**\r\nGenerates perfect numbers from 1 to `limit`. \r\n - Parameter: `limit` (int) \r\n - Returns: List of perfect numbers. \r\n - Raises: `InvalidInputError` if not a positive integer. \r\n - Example: `generate_perfect_number_list(10)` \u2192 `[6]`\r\n\r\n**is_narcissistic_number(input_number)**\r\nChecks if a number is narcissistic. \r\n - Parameter: `input_number` (int) \r\n - Returns: `True` if narcissistic, `False` otherwise. \r\n - Raises: `InvalidInputError` if not a non-negative integer. \r\n - Example: `is_narcissistic_number(153)` \u2192 `True`\r\n\r\n**generate_narcissistic_number_list(limit)**\r\nGenerates narcissistic numbers from 0 to `limit`. \r\n - Parameter: `limit` (int) \r\n - Returns: List of narcissistic numbers. \r\n - Raises: `InvalidInputError` if not a non-negative integer. \r\n - Example: `generate_narcissistic_number_list(10)` \u2192 `[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\r\n\r\n**are_amicable_numbers(number1, number2)**\r\nChecks if two numbers are amicable. \r\n - Parameters: `number1`, `number2` (int) \r\n - Returns: `True` if amicable, `False` otherwise. \r\n - Raises: `InvalidInputError` if not positive integers. \r\n - Example: `are_amicable_numbers(220, 284)` \u2192 `True`\r\n\r\n**is_happy_number(input_number)**\r\nChecks if a number is happy. \r\n - Parameter: `input_number` (int) \r\n - Returns: `True` if happy, `False` otherwise. \r\n - Raises: `InvalidInputError` if not a positive integer. \r\n - Example: `is_happy_number(19)` \u2192 `True`\r\n\r\n**generate_happy_number_list(limit)**\r\nGenerates happy numbers from 1 to `limit`. \r\n - Parameter: `limit` (int) \r\n - Returns: List of happy numbers. \r\n - Raises: `InvalidInputError` if not a positive integer. \r\n - Example: `generate_happy_number_list(10)` \u2192 `[1, 7, 10]`\r\n\r\n---\r\n\r\n### \ud83d\udcd0 Square, Strong, and Friendly Number Functions (special_numbers2.py)\r\n\r\n**is_square_number(input_number)**\r\nChecks if a number is a perfect square. \r\n - Parameter: `input_number` (int) \r\n - Returns: `True` if square, `False` otherwise. \r\n - Raises: `InvalidInputError` if not a non-negative integer. \r\n - Example: `is_square_number(16)` \u2192 `True`\r\n\r\n**generate_square_number_list(limit)**\r\nGenerates square numbers from 0 to `limit`. \r\n - Parameter: `limit` (int) \r\n - Returns: List of square numbers. \r\n - Raises: `InvalidInputError` if not a non-negative integer. \r\n - Example: `generate_square_number_list(10)` \u2192 `[0, 1, 4, 9]`\r\n\r\n**are_friendly_numbers(number1, number2)**\r\nChecks if two numbers are friendly. \r\n - Parameters: `number1`, `number2` (int) \r\n - Returns: `True` if friendly, `False` otherwise. \r\n - Raises: `InvalidInputError` if not positive integers. \r\n - Example: `are_friendly_numbers(30, 140)` \u2192 `True`\r\n\r\n**is_strong_number(input_number)**\r\nChecks if a number is a strong number (sum of factorial of its digits equals the number itself). \r\n - Parameter: `input_number` (int) \r\n - Returns: `True` if strong, `False` otherwise. \r\n - Raises: `InvalidInputError` if not a non-negative integer. \r\n - Example: `is_strong_number(145)` \u2192 `True`\r\n\r\n---\r\n\r\n### \ud83d\udcca Divisor and Multiple Functions (divisors_multiples.py)\r\n\r\n**sum_of_divisors(input_number)**\r\nComputes the sum of positive divisors (excluding itself). \r\n - Parameter: `input_number` (int) \r\n - Returns: Sum of divisors. \r\n - Raises: `InvalidInputError` if not a positive integer. \r\n - Example: `sum_of_divisors(6)` \u2192 `6`\r\n\r\n**generate_divisor_list(input_number, positive_only=True)**\r\nGenerates divisors of a number. \r\n - Parameters: `input_number` (int), `positive_only` (bool) \r\n - Returns: List of divisors. \r\n - Raises: `InvalidInputError` if not an integer or zero. \r\n - Example: `generate_divisor_list(6)` \u2192 `[1, 2, 3, 6]`\r\n\r\n**generate_multiple_list(base_number, limit, positive_only=True)**\r\nGenerates multiples of a number up to `limit` times. \r\n - Parameters: `base_number` (int), `limit` (int), `positive_only` (bool) \r\n - Returns: List of multiples. \r\n - Raises: `InvalidInputError` if not integers, number is zero, or limit < 1. \r\n - Example: `generate_multiple_list(3, 5)` \u2192 `[3, 6, 9, 12, 15]`\r\n\r\n**common_divisors(numbers)**\r\nGenerates common divisors for a list of numbers. \r\n - Parameter: `numbers` (list) \r\n - Returns: List of common divisors. \r\n - Raises: `InvalidInputError` if not a list or contains non-integers; `MathError` if fewer than 2 non-zero elements. \r\n - Example: `common_divisors([12, 18])` \u2192 `[1, 2, 3, 6]`\r\n\r\n**greatest_common_divisor(numbers)**\r\nComputes the GCD of a list of numbers. \r\n - Parameter: `numbers` (list) \r\n - Returns: GCD value. \r\n - Raises: `InvalidInputError` if not a list or contains non-integers; `MathError` if fewer than 2 non-zero elements. \r\n - Example: `greatest_common_divisor([12, 18])` \u2192 `6`\r\n\r\n**least_common_multiple(numbers)**\r\nComputes the LCM of a list of numbers. \r\n - Parameter: `numbers` (list) \r\n - Returns: LCM value. \r\n - Raises: `InvalidInputError` if not a list, contains non-integers, or zeros; `MathError` if fewer than 2 elements. \r\n - Example: `least_common_multiple([4, 6])` \u2192 `12`\r\n\r\n---\r\n\r\n### \ud83d\udc6f Twin Prime and Abundant Number Functions (twin_abundant.py)\r\n\r\n**is_twin_prime(input_number)**\r\nChecks if a number is a twin prime. \r\n - Parameter: `input_number` (int) \r\n - Returns: `True` if twin prime, `False` otherwise. \r\n - Raises: `InvalidInputError` if not an integer. \r\n - Example: `is_twin_prime(5)` \u2192 `True`\r\n\r\n**generate_twin_prime_list(limit)**\r\nGenerates twin primes from 2 to `limit`. \r\n - Parameter: `limit` (int) \r\n - Returns: List of twin primes. \r\n - Raises: `InvalidInputError` if not an integer >= 2. \r\n - Example: `generate_twin_prime_list(20)` \u2192 `[3, 5, 7, 11, 13, 17, 19]`\r\n\r\n**is_abundant_number(input_number)**\r\nChecks if a number is abundant. \r\n - Parameter: `input_number` (int) \r\n - Returns: `True` if abundant, `False` otherwise. \r\n - Raises: `InvalidInputError` if not a positive integer. \r\n - Example: `is_abundant_number(12)` \u2192 `True`\r\n\r\n**generate_abundant_number_list(limit)**\r\nGenerates abundant numbers from 1 to `limit`. \r\n - Parameter: `limit` (int) \r\n - Returns: List of abundant numbers. \r\n - Raises: `InvalidInputError` if not a positive integer. \r\n - Example: `generate_abundant_number_list(20)` \u2192 `[12, 18, 20]`\r\n\r\n---\r\n\r\n### \ud83d\udd0d Prime Factorization Functions (prime_factorization.py)\r\n\r\n**prime_factors(input_number)**\r\nFactorizes a number into prime factors. \r\n - Parameter: `input_number` (int) \r\n - Returns: List of prime factors. \r\n - Raises: `InvalidInputError` if not a positive integer > 1. \r\n - Example: `prime_factors(12)` \u2192 `[2, 2, 3]`\r\n\r\n**greatest_common_prime_divisor(number1, number2)**\r\nFinds the greatest common prime divisor of two numbers. \r\n - Parameters: `number1`, `number2` (int) \r\n - Returns: Greatest common prime divisor. \r\n - Raises: `InvalidInputError` if not positive integers > 1; `MathError` if no common prime divisor. \r\n - Example: `greatest_common_prime_divisor(12, 18)` \u2192 `3`\r\n\r\n---\r\n\r\n### \ud83e\uddf5 List and String Processing Functions (string_processing.py)\r\n\r\n**remove_duplicates(items)**\r\nRemoves duplicates from a list and sorts in descending order. \r\n - Parameter: `items` (list) \r\n - Returns: Sorted list without duplicates. \r\n - Raises: `InvalidInputError` if not a list/tuple. \r\n - Example: `remove_duplicates([1, 2, 2, 3])` \u2192 `[3, 2, 1]`\r\n\r\n**extract_digits_from_string(text)**\r\nExtracts individual digits from a string. \r\n - Parameter: `text` (str) \r\n - Returns: List of digits. \r\n - Example: `extract_digits_from_string(\"abc123\")` \u2192 `[1, 2, 3]`\r\n\r\n**extract_numbers_from_string(text)**\r\nExtracts full numbers from a string. \r\n - Parameter: `text` (str) \r\n - Returns: List of numbers. \r\n - Example: `extract_numbers_from_string(\"abc123def456\")` \u2192 `[123, 456]`\r\n\r\n**extract_characters(text)**\r\nExtracts non-digit characters from a string. \r\n - Parameter: `text` (str) \r\n - Returns: List of characters. \r\n - Example: `extract_characters(\"a1b2c3\")` \u2192 `['a', 'b', 'c']`\r\n\r\n**compress_string(text, compress_type)**\r\nCompresses a string using two methods. \r\n - Parameters: `text` (str), `compress_type` (int) \r\n - Returns: Compressed string. \r\n - Example (type 1): `compress_string(\"google\", 1)` \u2192 `'e2gl2o'` \r\n - Example (type 2): `compress_string(\"google\", 2)` \u2192 `'g2ogle'`\r\n\r\n**compress_string_without_numbers(input_text)**\r\nCompresses a string by removing consecutive duplicates. \r\n - Parameter: `input_text` (str) \r\n - Returns: Compressed string. \r\n - Example: `compress_string_without_numbers(\"hhhoocssssiiinnnhhhhh\")` \u2192 `'hocsinh'`\r\n\r\n**decompress_string(text)**\r\nDecompresses a string with numeric counts. \r\n - Parameter: `text` (str) \r\n - Returns: Decompressed string. \r\n - Example: `decompress_string(\"g2ogle\")` \u2192 `\"google\"`\r\n\r\n**unique_characters_string(text)**\r\nCreates a string with unique characters in order of appearance. \r\n - Parameter: `text` (str) \r\n - Returns: String with no duplicates. \r\n - Example: `unique_characters_string(\"google\")` \u2192 `\"gole\"`\r\n\r\n---\r\n\r\n### \ud83c\udfdb\ufe0f Caesar Cipher Functions (caesar_cipher.py)\r\n\r\n**caesar_cipher_to_numbers(text, shift)**\r\nConverts a string to a list of Caesar cipher numbers. \r\n - Parameters: `text` (str), `shift` (int) \r\n - Returns: List of shifted numbers. \r\n - Example: `caesar_cipher_to_numbers(\"ABC\", 3)` \u2192 `[3, 4, 5]`\r\n\r\n**caesar_cipher_from_numbers(numbers, shift)**\r\nDecodes a list of Caesar cipher numbers into a string. \r\n - Parameters: `numbers` (list), `shift` (int) \r\n - Returns: Decoded string. \r\n - Example: `caesar_cipher_from_numbers([3, 4, 5], 3)` \u2192 `\"ABC\"`\r\n\r\n---\r\n\r\n### \ud83d\udca5 Special Calculation Functions (special_calculations.py)\r\n\r\n**calculate_electricity_bill_Vietnamese(old_reading, new_reading)**\r\nCalculates an electricity bill based on Vietnamese pricing tiers. \r\n - Parameters: `old_reading`, `new_reading` (float) \r\n - Returns: String with consumption and cost. \r\n - Example: `calculate_electricity_bill_Vietnamese(100, 150)` \u2192 `\"- Electricity consumed this month: 50.0 Kwh\\n- Electricity bill this month: 83900.0 VND\"`\r\n\r\n**largest_number_with_digit_sum(digit_count, target_sum)**\r\nFinds the largest number with `digit_count` digits summing to `target_sum`. \r\n - Parameters: `digit_count` (int), `target_sum` (int) \r\n - Returns: Largest number as a string. \r\n - Example: `largest_number_with_digit_sum(3, 15)` \u2192 `'960'`\r\n\r\n---\r\n\r\n### \ud83d\udd01 Sequence Generation Functions (sequence_generation.py)\r\n\r\n**generate_sequence_rule_1(count)**\r\nGenerate a sequence of positive integers according to the rule: \r\n - One number is divisible by **1**, \r\n - Two numbers are divisible by **2**, \r\n - Three numbers are divisible by **3**, \r\n - and so on, the numbers increase until the number of numbers is `count`. \r\n - Parameter: `count` (int) \r\n - Returns: List of sequence numbers. \r\n - Example: `generate_sequence_rule_1(10)` \u2192 `[1, 4, 6, 9, 12, 15, 16, 20, 24, 28]`\r\n\r\n**generate_sequence_rule_2(base, count)**\r\nGenerates `count` multiples of `base`. \r\n - Parameters: `base` (int), `count` (int) \r\n - Returns: List of multiples. \r\n - Example: `generate_sequence_rule_2(2, 5)` \u2192 `[0, 2, 4, 6, 8]`\r\n\r\n**generate_sequence_rule_3(count, base)**\r\nGenerates powers of `base` from 0 to `count-1`. \r\n - Parameters: `count` (int), `base` (int) \r\n - Returns: List of powers. \r\n - Example: `generate_sequence_rule_3(5, 2)` \u2192 `[1, 2, 4, 8, 16]`\r\n\r\n---\r\n\r\n### \ud83d\udd22 Inversion Counting Functions (inversion_counting.py)\r\n\r\n**count_inversions(numbers)**\r\nCounts the number of inversions in a list. \r\n - Parameter: `numbers` (list) \r\n - Returns: Number of inversions. \r\n - Example: `count_inversions([1, 3, 2])` \u2192 `1`\r\n\r\n---\r\n\r\n## \ud83d\udccb Sample Command List for the `pchjlib` Library\r\n\r\n## 1. Primes and Emirps\r\n\r\n- **Check if a number is prime:**\r\n`python pchjmain.py primes_and_emirps --is_prime <number>` \r\n _Example:_ `python pchjmain.py primes_and_emirps --is_prime 17`\r\n\r\n- **Generate a list of primes:**\r\n`python pchjmain.py primes_and_emirps --generate_prime_list <limit>` \r\n _Example:_ `python pchjmain.py primes_and_emirps --generate_prime_list 50`\r\n\r\n- **Check if a number is an emirp:**\r\n`python pchjmain.py primes_and_emirps --is_emirp <number>` \r\n _Example:_ `python pchjmain.py primes_and_emirps --is_emirp 13`\r\n\r\n- **Generate a list of emirps:**\r\n`python pchjmain.py primes_and_emirps --generate_emirp_list <limit>` \r\n _Example:_ `python pchjmain.py primes_and_emirps --generate_emirp_list 100`\r\n\r\n## 2. Twin Primes and Abundant Numbers\r\n\r\n- **Check if a number is a twin prime:**\r\n`python pchjmain.py twin_primes_and_abundant --is_twin_prime <number>` \r\n _Example:_ `python pchjmain.py twin_primes_and_abundant --is_twin_prime 5`\r\n\r\n- **Generate a list of twin primes:**\r\n`python pchjmain.py twin_primes_and_abundant --generate_twin_prime_list <limit>` \r\n _Example:_ `python pchjmain.py twin_primes_and_abundant --generate_twin_prime_list 50`\r\n\r\n- **Check if a number is abundant:**\r\n`python pchjmain.py twin_primes_and_abundant --is_abundant <number>` \r\n _Example:_ `python pchjmain.py twin_primes_and_abundant --is_abundant 12`\r\n\r\n- **Generate a list of abundant numbers:**\r\n`python pchjmain.py twin_primes_and_abundant --generate_abundant_list <limit>` \r\n _Example:_ `python pchjmain.py twin_primes_and_abundant --generate_abundant_list 100`\r\n\r\n## 3. Fibonacci Sequence\r\n\r\n- **Compute the Fibonacci number at a given index:**\r\n`python pchjmain.py fibonacci --at_index <index>` \r\n _Example:_ `python pchjmain.py fibonacci --at_index 10`\r\n\r\n- **Generate a list of Fibonacci numbers:**\r\n`python pchjmain.py fibonacci --generate_list <count>` \r\n _Example:_ `python pchjmain.py fibonacci --generate_list 5`\r\n\r\n## 4. Special Numbers 1 (Perfect, Narcissistic, Amicable, Happy)\r\n\r\n- **Check if a number is perfect:**\r\n`python pchjmain.py special_numbers_1 --is_perfect <number>` \r\n _Example:_ `python pchjmain.py special_numbers_1 --is_perfect 28`\r\n\r\n- **Generate a list of perfect numbers:**\r\n`python pchjmain.py special_numbers_1 --generate_perfect_list <limit>` \r\n _Example:_ `python pchjmain.py special_numbers_1 --generate_perfect_list 1000`\r\n\r\n- **Check if a number is narcissistic:**\r\n`python pchjmain.py special_numbers_1 --is_narcissistic <number>` \r\n _Example:_ `python pchjmain.py special_numbers_1 --is_narcissistic 153`\r\n\r\n- **Generate a list of narcissistic numbers:**\r\n`python pchjmain.py special_numbers_1 --generate_narcissistic_list <limit>` \r\n _Example:_ `python pchjmain.py special_numbers_1 --generate_narcissistic_list 1000`\r\n\r\n- **Check if two numbers are amicable:**\r\n`python pchjmain.py special_numbers_1 --are_amicable <number1> <number2>` \r\n _Example:_ `python pchjmain.py special_numbers_1 --are_amicable 220 284`\r\n\r\n- **Check if a number is happy:**\r\n`python pchjmain.py special_numbers_1 --is_happy <number>` \r\n _Example:_ `python pchjmain.py special_numbers_1 --is_happy 19`\r\n\r\n- **Generate a list of happy numbers:**\r\n`python pchjmain.py special_numbers_1 --generate_happy_list <limit>` \r\n _Example:_ `python pchjmain.py special_numbers_1 --generate_happy_list 100`\r\n\r\n## 5. Special Numbers 2 (Square, Strong, Friendly)\r\n\r\n- **Check if a number is a perfect square:**\r\n`python pchjmain.py special_numbers_2 --is_square <number>` \r\n _Example:_ `python pchjmain.py special_numbers_2 --is_square 16`\r\n\r\n- **Generate a list of perfect squares:**\r\n`python pchjmain.py special_numbers_2 --generate_square_list <limit>` \r\n _Example:_ `python pchjmain.py special_numbers_2 --generate_square_list 100`\r\n\r\n- **Check if a number is strong:**\r\n`python pchjmain.py special_numbers_2 --is_strong <number>` \r\n _Example:_ `python pchjmain.py special_numbers_2 --is_strong 145`\r\n\r\n- **Check if two numbers are friendly:**\r\n`python pchjmain.py special_numbers_2 --are_friendly <number1> <number2>` \r\n _Example:_ `python pchjmain.py special_numbers_2 --are_friendly 30 140`\r\n\r\n## 6. Divisors and Multiples\r\n\r\n- **Generate a list of divisors:**\r\n`python pchjmain.py divisors_and_multiples --generate_divisor_list <number>` \r\n _Example:_ `python pchjmain.py divisors_and_multiples --generate_divisor_list 28`\r\n\r\n- **Generate a list of multiples:**\r\n`python pchjmain.py divisors_and_multiples --generate_multiple_list <number> <limit>` \r\n _Example:_ `python pchjmain.py divisors_and_multiples --generate_multiple_list 3 20`\r\n\r\n- **Find common divisors:**\r\n`python pchjmain.py divisors_and_multiples --common_divisors <number1> <number2> [<number3> ...]` \r\n _Example:_ `python pchjmain.py divisors_and_multiples --common_divisors 12 18 24`\r\n\r\n- **Compute GCD (Greatest Common Divisor):**\r\n`python pchjmain.py divisors_and_multiples --gcd <number1> <number2> [<number3> ...]` \r\n _Example:_ `python pchjmain.py divisors_and_multiples --gcd 12 18 24`\r\n\r\n- **Compute LCM (Least Common Multiple):**\r\n`python pchjmain.py divisors_and_multiples --lcm <number1> <number2> [<number3> ...]` \r\n _Example:_ `python pchjmain.py divisors_and_multiples --lcm 4 5 6`\r\n\r\n## 7. Prime Factorization\r\n\r\n- **Prime factorization:**\r\n`python pchjmain.py prime_factorization --prime_factors <number>` \r\n _Example:_ `python pchjmain.py prime_factorization --prime_factors 100`\r\n\r\n- **Greatest common prime divisor:**\r\n`python pchjmain.py prime_factorization --greatest_common_prime_divisor <number1> <number2>` \r\n _Example:_ `python pchjmain.py prime_factorization --greatest_common_prime_divisor 12 18`\r\n\r\n## 8. String Processing\r\n\r\n- **Remove duplicate elements:**\r\n`python pchjmain.py string_processing --remove_duplicates <elem1> <elem2> ...` \r\n _Example:_ `python pchjmain.py string_processing --remove_duplicates 1 2 2 3 4 4`\r\n\r\n- **Extract digits:**\r\n`python pchjmain.py string_processing --extract_digits \"<string>\"` \r\n _Example:_ `python pchjmain.py string_processing --extract_digits \"a1b2c3\"`\r\n\r\n- **Extract numbers:**\r\n`python pchjmain.py string_processing --extract_numbers \"<string>\"` \r\n _Example:_ `python pchjmain.py string_processing --extract_numbers \"a12b34c56\"`\r\n\r\n- **Extract non-digit characters:**\r\n`python pchjmain.py string_processing --extract_characters \"<string>\"` \r\n _Example:_ `python pchjmain.py string_processing --extract_characters \"a1b2c3\"`\r\n\r\n- **Compress a string (type 1 or 2):**\r\n`python pchjmain.py string_processing --compress \"<string>\" <compress_type>` \r\n _Example:_ `python pchjmain.py string_processing --compress \"aaabbbcc\" 1`\r\n\r\n- **Compress a string without counts:**\r\n`python pchjmain.py string_processing --compress_without_numbers \"<string>\"` \r\n _Example:_ `python pchjmain.py string_processing --compress_without_numbers \"aaabbbcc\"`\r\n\r\n- **Decompress a string:**\r\n`python pchjmain.py string_processing --decompress \"<compressed_string>\"` \r\n _Example:_ `python pchjmain.py string_processing --decompress \"a3b2c1\"`\r\n\r\n- **Get unique characters in a string:**\r\n`python pchjmain.py string_processing --unique_characters \"<string>\"` \r\n _Example:_ `python pchjmain.py string_processing --unique_characters \"aaabbbcc\"`\r\n\r\n## 9. Caesar Cipher\r\n\r\n- **Convert text to Caesar numbers:**\r\n`python pchjmain.py caesar_cipher --to_numbers \"<text>\" <shift>` \r\n _Example:_ `python pchjmain.py caesar_cipher --to_numbers \"abc\" 3`\r\n\r\n- **Convert Caesar numbers back to text:**\r\n`python pchjmain.py caesar_cipher --from_numbers <shift> <num1> <num2> ...` \r\n _Example:_ `python pchjmain.py caesar_cipher --from_numbers 3 4 5 6`\r\n\r\n## 10. Special Calculations\r\n\r\n- **Calculate an electricity bill:**\r\n`python pchjmain.py special_calculations --electricity_bill <old_reading> <new_reading>` \r\n _Example:_ `python pchjmain.py special_calculations --electricity_bill 100 200`\r\n\r\n- **Find the largest number with given digits sum:**\r\n`python pchjmain.py special_calculations --largest_number <digit_count> <digit_sum>` \r\n _Example:_ `python pchjmain.py special_calculations --largest_number 3 15`\r\n\r\n## 11. Sequence Generation\r\n\r\n- **Generate sequence by rule 1:**\r\n`python pchjmain.py sequence_generation --rule1 <count>` \r\n _Example:_ `python pchjmain.py sequence_generation --rule1 5`\r\n\r\n- **Generate sequence by rule 2:**\r\n`python pchjmain.py sequence_generation --rule2 <base> <count>` \r\n _Example:_ `python pchjmain.py sequence_generation --rule2 2 5`\r\n\r\n- **Generate sequence by rule 3:**\r\n`python pchjmain.py sequence_generation --rule3 <count> <base>` \r\n _Example:_ `python pchjmain.py sequence_generation --rule3 5 2`\r\n\r\n## 12. Inversion Counting\r\n\r\n- **Count inversions in a list:**\r\n`python pchjmain.py inversion_counting --count <elem1> <elem2> ...` \r\n _Example:_ `python pchjmain.py inversion_counting --count 2 3 1 4`\r\n\r\n---\r\n\r\n### Note\r\n\r\n- Replace `<...>` with actual values when running the command. \r\n- Ensure commands are executed in the directory containing `pchjmain.py`. \r\n- For detailed help on any category, run `python pchjmain.py <category> -h` (e.g., `python pchjmain.py primes_and_emirps -h`).\r\n\r\n---\r\n\r\n## \ud83e\uddea Running Tests\r\n\r\nTo run the unit tests for the library, navigate to the project root and execute:\r\n\r\n```bash\r\npython -m unittest discover tests\r\n```\r\n\r\nThis will discover and run all tests in the `tests/` directory. Ensure the library is installed in editable mode (`pip install -e .`) for proper import resolution.\r\n\r\n---\r\n\r\n## \ud83d\udee0\ufe0f Update History\r\n\r\n> **\ud83d\udcc5 Latest Update:** August 11, 2025\r\n> **\ud83d\udce6 Total Releases:** 92\r\n\r\n---\r\n\r\n## \ud83d\udccc 2025\r\n### 1.6.0 \u2192 1.5.0 (August 11, 2025)\r\n- \ud83d\udd27 Fixed minor bugs \r\n- \u2705 Updated `is_strong_number` to the standard factorion definition (sum of factorial of digits equals the number) Removed variant parameter for simplicity; future versions may add separate functions for related concepts like powerful numbers \r\n- \u2705 Adjusted CLI for `special_numbers_2`: Removed `--variant` option from `--is_strong` \r\n- \u270f\ufe0f Updated README: Revised description and example for `is_strong_number` in the functions section and Sample Command List; incremented version and release count \r\n- \u274c Removed `solve_equation` function and its corresponding \"Equation Solving\" category in the command-line interface (now 12 categories total) \r\n- \u2705 Eliminated dependency on `numpy` by optimizing `generate_prime_list` with `bytearray` for memory efficiency \r\n- \u2705 Added optional integration with `gmpy2` for handling large primes in `is_prime` \r\n- \u2705 Added type hints to all functions for better code readability and IDE support \r\n- \u2705 Added detailed examples to docstrings for all functions \r\n- \u2705 Optimized performance: Switched `fibonacci_at_index` to iterative loop; improved `largest_number_with_digit_sum` to correctly return the largest number by reversing the result; increased range in `generate_sequence_rule_1` for larger counts \r\n- \u2705 Updated variable names for clarity (e.g., `number` to `input_number`) \r\n- \u2705 Fixed minor bugs in string compression examples and sequence generation \r\n- \u270f\ufe0f Updated README: Removed Equation Solving section, updated Requirements and Installation (removed numpy references, added gmpy2), updated function descriptions with new examples, renumbered Sample Command List to 12 categories \r\n\r\n### 1.4.5 \u2192 1.3.0 (August 7-8, 2025)\r\n- \ud83d\udd27 Fixed minor bugs \r\n\r\n---\r\n\r\n### 1.2.3 \u2192 1.0.1 (August 4\u20135, 2025)\r\n\r\n- \u274c Removed functions \r\n - `tao_day_chu` \r\n - `uoc_chung_cua_danh_sach` \r\n - `abundant_number_check` \r\n - `xau_ki_tu_khong_trung_lap` \r\n\r\n- \ud83d\udd27 Fixed minor bugs \r\n\r\n - \u270f\ufe0f Updated README \r\n\r\n- \u2705 Added logo support via `pchj-icon` \r\n\r\n- \u2705 Added Sample **Command List** for the `pchjlib` Library \r\n\r\n- \u2705 Enhanced `main` for expanded functions \r\n\r\n\r\n---\r\n\r\n### \ud83c\udf89 BIG UPDATE (August 3, 2025)\r\n### 1.0.0 \u2192 0.1.5.1 (August 4\u20135, 2025)\r\n\r\n- \ud83d\ude80 Major performance, error handling, documentation, and testing overhaul \r\n\r\n- Performance optimizations \r\n - Caching `fibonacci_at_index` \r\n - Optimized `is_emirp` and `is_strong_number` \r\n\r\n- Error handling improvements \r\n - Specific error messages \r\n - Boundary checks \r\n\r\n- Documentation and examples \r\n - Complex examples for `solve_equation` and string functions \r\n - README enhancements: detailed examples, better install instructions, removed deprecated references \r\n\r\n- Testing \r\n - Unit tests for all core functions \r\n\r\n- \u274c Discontinue dependency on `roman` library \r\n\r\n- \u274c Removed unused functions \r\n - `teen_code_yahoo` \r\n - `mp_tai_xuong` \r\n - `mp_tinh_toan` \r\n - `mp_loading` \r\n - `mp_christmas_tree` \r\n - `chuong_trinh_matrix` \r\n - `one_two_three` \r\n - `pythagore` \r\n\r\n- \u2705 Switched README to English \r\n\r\n- \u2705 Enhanced `solve_equation` and `generate_sequence_rule_1` \r\n\r\n- \u2705 Improved `generate_multiple_list` and `greatest_common_divisor` \r\n\r\n\r\n---\r\n\r\n### 0.1.5 \u2192 0.1.4 (August 2, 2025)\r\n\r\n- \u274c Removed `chuyen_doi_so_la_ma` \r\n\r\n- \ud83d\udd27 Fixed and updated `chuong_trinh_matrix` \r\n\r\n- \u2705 Added negative divisor/multiple options \r\n\r\n- \ud83d\udd27 Fixed `common_divisors` \r\n\r\n- \u274c Removed extra helper functions \r\n\r\n- \u2705 Merged string compression functions \r\n\r\n\r\n---\r\n\r\n### 0.1.3.2 \u2192 0.1.2 (August 1, 2025)\r\n\r\n- \ud83d\udd27 Minor bug fixes \r\n\r\n- \u2705 Consolidated strong-number logic \r\n\r\n- \u26a1 Optimized Fibonacci and prime functions \r\n\r\n- \ud83d\udcda Added type hints, docstrings, input validation, and error documentation \r\n\r\n\r\n---\r\n\r\n### 0.1.1.3 \u2192 0.1.0.7 (July 31, 2025)\r\n\r\n- \u270f\ufe0f README updates \r\n\r\n- \ud83d\udd27 Bug fixes and updated `numpy` & `roman` dependencies \r\n\r\n\r\n---\r\n\r\n### 0.1.0.6 \u2192 0.1.0.3 (July 28\u201330, 2025)\r\n\r\n- \ud83d\udd27 Bug fixes \r\n\r\n\r\n---\r\n\r\n### 0.1.0.2 \u2192 0.1.0 (July 28, 2025)\r\n\r\n- \ud83d\udd27 Minor content fixes \r\n\r\n- \u274c Removed several legacy functions \r\n\r\n- \ud83e\uddf9 Complete code overhaul \r\n\r\n\r\n---\r\n\r\n#### \ud83d\udd35 0.0.5.x \u2014 Minor Tweaks\r\n\r\n- **0.0.5.2.1 & 0.0.5.2** (July 27, 2025) \r\n - \u270f\ufe0f README fixes \r\n\r\n- **0.0.5.1** (July 27, 2025) \r\n - \ud83c\udd95 Updated `teen_code_yahoo` \r\n\r\n- **0.0.5.0** (July 26, 2025) \r\n - \u274c Removed `an_ky_tu` \r\n\r\n\r\n---\r\n\r\n## \ud83d\udccc 2024\r\n\r\n### 0.0.4.1 (October 17, 2024)\r\n\r\n- \ud83c\udd95 Added `tao_day_chu` \r\n\r\n- \ud83d\udd04 Updated `one_two_three` \r\n\r\n\r\n---\r\n\r\n### 0.0.4.0 & 0.0.3.9 (May 5, 2024)\r\n\r\n- \u270f\ufe0f README fixes \r\n\r\n\r\n---\r\n\r\n### 0.0.3.8 & 0.0.3.7 (May 4\u20135, 2024)\r\n\r\n- \ud83c\udf84 Updated `mp_christmas_tree` variants \r\n\r\n\r\n---\r\n\r\n### 0.0.3.6 & 0.0.3.5 (March 1\u20133, 2024)\r\n\r\n- \ud83e\uddea Testing phase \r\n\r\n\r\n---\r\n\r\n### 0.0.3.4 (February 26, 2024)\r\n\r\n- \u2795 Added `uoc_chung_cua_danh_sach` \r\n\r\n\r\n---\r\n\r\n### 0.0.3.3 \u2192 0.0.3 (February 20\u201321, 2024)\r\n\r\n- \ud83d\udd27 README & metadata enhancements \r\n\r\n- \u2795 Added abundant number check \r\n\r\n- \u2795 Added `xau_ki_tu_khong_trung_lap` \r\n\r\n- \u274c Removed `ki_tu_trung_lap` \r\n\r\n\r\n---\r\n\r\n### 0.0.2.10 \u2192 0.0.2.7 (February 18\u201319, 2024)\r\n\r\n- \ud83d\udd27 README updates \r\n\r\n- \ud83e\uddea Testing \r\n\r\n\r\n---\r\n\r\n### 0.0.2.6 (February 18, 2024)\r\n\r\n- \u2696\ufe0f Switched to MIT License \r\n\r\n\r\n---\r\n\r\n### 0.0.2.5 \u2192 0.0.2.1 (February 14\u201318, 2024)\r\n\r\n- \ud83d\udd27 README & tests \r\n\r\n\r\n---\r\n\r\n### 0.0.2 \u2192 0.0.1 (February 14, 2024)\r\n\r\n- \ud83d\udc1e Fixed dependencies \r\n\r\n- \ud83e\uddea Testing \r\n\r\n\r\n---\r\n\r\n### 0.0.0.1 (February 14, 2024)\r\n\r\n- \ud83c\udf89 Initial release!\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A versatile Python toolkit for mathematical operations and string processing, including prime numbers, Fibonacci sequences, and Caesar ciphers.",
"version": "1.6.0",
"project_urls": {
"Homepage": "https://github.com/Joesifer/pchjlib"
},
"split_keywords": [
"pchjlib",
" math",
" education",
" numbers",
" prime numbers",
" fibonacci",
" string processing",
" caesar cipher"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1f249cde2396b7403d523c1a03921525ec79f1f759b26271f81b5cce183f02c7",
"md5": "000cede6ab0dc62c26a6ef5ac3e613c0",
"sha256": "4c42483cd30cbcf40de97731759c287d53a5a8990980edea6c636f8c6844ffa9"
},
"downloads": -1,
"filename": "pchjlib-1.6.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "000cede6ab0dc62c26a6ef5ac3e613c0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 57029,
"upload_time": "2025-08-11T02:39:08",
"upload_time_iso_8601": "2025-08-11T02:39:08.375903Z",
"url": "https://files.pythonhosted.org/packages/1f/24/9cde2396b7403d523c1a03921525ec79f1f759b26271f81b5cce183f02c7/pchjlib-1.6.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fa05fe000552402a9d57d2d1261b72c7b0fc4cba34f1a992f794c3a46c1b6dda",
"md5": "b84dab73181b646be79921dbdd72b2dc",
"sha256": "5bcf9a8b37f9743de141716db2d9c811ac92b1a1958e3d70b837a055db6484b1"
},
"downloads": -1,
"filename": "pchjlib-1.6.0.tar.gz",
"has_sig": false,
"md5_digest": "b84dab73181b646be79921dbdd72b2dc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 69839,
"upload_time": "2025-08-11T02:39:10",
"upload_time_iso_8601": "2025-08-11T02:39:10.690918Z",
"url": "https://files.pythonhosted.org/packages/fa/05/fe000552402a9d57d2d1261b72c7b0fc4cba34f1a992f794c3a46c1b6dda/pchjlib-1.6.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-11 02:39:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Joesifer",
"github_project": "pchjlib",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pchjlib"
}