<commit_before><!-- ----------------------------------------------------------------
----------------------------------------------------------------- -->

# pylib -- General Libray of Python Programming

- **Composer**: Currying and composing functions 

- **Singleton**: Simple Singleton and Parameterized Singleton

- **SelectExt**: A wrapper class for select 



## Motivation

A general programming tools, which is useful for any Python programs, like
itertools, functools etc.


## Examples

### Composer

1. Composing a function without 'def' statement

```python
# _0 is a place holder for positional argument
_0 = composer(0)

# Composing a function to calculate (x + 3) - 10
func = composer(operator.add, _0, 3) >> composer(operator.sub, _0, 10)

# Print '13' as a result<commit_msg>snapshot<commit_after><!-- ----------------------------------------------------------------
----------------------------------------------------------------- -->

# PyLib -- General Libray of Python Programming

- **Composer**: Currying and composing functions 

- **Singleton**: Simple Singleton and Parameterized Singleton

- **SelectExt**: A wrapper class for select 

- **IteratorExt**: Some extensions like itertools



## Motivation

A general programming tools, which is useful for any Python programs, like
itertools, functools etc.


## Examples

### Composer

1. Composing a function without 'def' statement

```python
# _0 is a place holder for positional argument
_0 = composer(0)

# Composing a function to calculate (x + 3) - 10
func = composer(operator.add, _0, 3) >> composer(operator.sub, _0, 10)

# Print '13' as a result
{'fraction_non_alphanumeric': 0.2512254901960784, 'fraction_numerical': 0.01715686274509804, 'mean_word_length': 2.1104761904761906, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1231052', 'n_tokens_mistral': 430, 'n_tokens_neox': 399, 'n_words': 164}