semvec/pypi-packages huggingface dataset:
GetSubString 1.0.11
Get stdout line substring based on regexp.
License: MIT
Requires Python: >=3.5

# GetSubStr

Utility that allows you get substring of each stdout line based on regexp.

```
GetSubStr v1.0.6 - gets substring of each stdout line based on regexp.

positional arguments:
  regexp_pattern        Regexp pattern

optional arguments:
  -h, --help            show this help message and exit
  -l CUT_LEFT, --left-cut CUT_LEFT
                        Cut N chars from left side of result
  -r CUT_RIGHT, --right-cut CUT_RIGHT
                        Cut N chars from right side of result
  --lwrap L_WRAP        Wrap results from left side by specified char(s)
  --rwrap R_WRAP        Wrap results from left side by specified char(s)
  -s, --strip           Strip spaces from left and right side of result
  -j JOIN_RESULTS, --join-results JOIN_RESULTS
                        Join all results with specified char(s)
  --join-matches JOIN_MATCHES
                        Join more regexp matches with specified char(s). Default is TAB \t
  --reverse-matches     Reverse order of matches
  --split SPLIT         Split result by specified string.
  --split-after SPLIT_AFTER
                        Split result by specified string after each X match. For example split after every 5th ',' uccurence.
  -f FIND_REPLACE, --find-replace FIND_REPLACE
                        Find string and replace it with another string. It have to be defined in following format "find::replace"
  -o OUTPUT_FORMAT, --output-format OUTPUT_FORMAT
                        Output format for matches (Best if you are using regexp groups). ex: "myId:{0} yourId:{1}"
  -i, --ignore-errors   Ignore errors caused regexp.
  ```
  
### example #1:
```bash
printf "**** Error while updating article content id=498 ****\n**** Error while updating article content id=512 ****\n" \
| getsub "id\=\d+" -l 3 -j "," --lwrap "\"" --rwrap "\""
```
output:
```
"498","512"
```

### example #2 - grep lines from common logfile:
```bash
> grep "Error" error.log | getsub "id\=\d+" -l 3 -j "," --lwrap "\"" --rwrap "\""
```
output:
```
"680093","679962","678612","678313","678043","677973","676873","676431","675696"
```

### example #3 - custom output format:
```bash
printf "123 456\n789 012" | getsub "(\d+) (\d+)" -o "i='{0}'...j='{1}'"
```
output:
```
i='123'...j='456'
i='789'...j='012'
```


# Installation
```bash
sudo python3 setup.py install
```
or
```bash
pip3 install GetSubString
```
or without PIP
```bash
wget https://gitlab.com/alda78/getsubstr/-/archive/master/getsubstr-master.tar \
&& tar -xf getsubstr-master.tar \
&& cd getsubstr-master/ \
&& sudo python3 setup.py install \
&& cd ../ \
&&  sudo rm -rf getsubstr-master
```
django-fsm-admin-lite 0.1.0
Integrate django-fsm state transitions into Django Admin.
License: MIT
Requires Python: >=3.8,<4.0
Keywords: django,fsm

# django-fsm-admin-lite

![Generic badge](https://github.com/etchegom/django-fsm-admin-lite/actions/workflows/tests.yml/badge.svg)


Integrate [django-fsm](https://github.com/viewflow/django-fsm) state transitions into Django Admin.

Alternative of [django-fsm-admin](https://github.com/gadventures/django-fsm-admin), with a lighter version of the frontend part.

Features:
- display available transitions in model admin so that user can apply them
- mark FSM protected fields as read only

Limitations:
- transition methods parameters are not handled

---

## Installation

```
pip install django-fsm-admin-lite
```
Or, for the latest git version
```
python -m pip install 'django-fsm-admin-lite @ git+https://github.com/etchegom/django-fsm-admin-lite.git'
```

---

## Usage

Make you model admin class inherit from the mixin class `FSMAdminMixin`.

```python
from django.contrib import admin
from fsm_admin_lite.mixins import FSMAdminMixin

@admin.register(MyModel)
class MyModelAdmin(FSMAdminMixin, admin.ModelAdmin):
    fsm_fields = [
        "state",
    ]
```

---

## Configuration

| Admin class attribute             | Option                                              |
|-----------------------------------|-----------------------------------------------------|
| `fsm_fields`                      | List of FSM fields to handle                        |
| `fsm_transition_success_msg`      | Admin message for transition success                |
| `fsm_transition_error_msg`        | Admin message for transition error                  |
| `fsm_transition_not_allowed_msg`  | Admin message for transition not allowed error      |
| `fsm_transition_not_valid_msg`    | Admin message for transition not valid error        |
| `fsm_context_key`                 | Template context key for FSM transitions            |
| `fsm_post_param`                  | POST parameter name for FSM transitions             |

---

## Run example

```
make example
```

Then go to [http://127.0.0.1:8000/admin](http://127.0.0.1:8000/admin), login with `admin`/`password` and create a new blog post object.


---

## TODO
- improve the default template files
- display all the transitions (not available transition should be represented as disabled buttons)
a-pandas-ex-logcat2df 0.10
ADB logcat to Pandas DataFrame for better debugging
License: MIT
Keywords: adb,android,debugging,pandas,DataFrame


### ADB logcat to Pandas DataFrame

```python
pip install a-pandas-ex-logcat2df

from a_pandas_ex_logcat2df import pd_add_adb_logcat_to_df
import pandas as pd
pd_add_adb_logcat_to_df()

adb_path = "C:\\Users\\USERNAME\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe"
deviceserial = "localhost:5745"
df = pd.Q_logcat2df(adb_path=adb_path, deviceserial=deviceserial,exit_keys='ctrl+x', timeout=None)


....
b'12-01 10:05:39.212 24637 24637 E System  : \tat android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1053)\r\n'
b'12-01 10:05:39.212 24637 24637 E System  : \tat android.app.ActivityThread.handleBindApplication(ActivityThread.java:5418)\r\n'
b'12-01 10:05:39.212 24637 24637 E System  : \tat android.app.ActivityThread.-wrap2(ActivityThread.java)\r\n'
b'12-01 10:05:39.212 24637 24637 E System  : \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1548)\r\n'
b'12-01 10:05:39.212 24637 24637 E System  : \tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n'
b'12-01 10:05:39.212 24637 24637 E System  : \tat android.os.Looper.loop(Looper.java:154)\r\n'
b'12-01 10:05:39.212 24637 24637 E System  : \tat android.app.ActivityThread.main(ActivityThread.ja
....


# ctrl+x

Killing the process
df
Out[3]: 
                        aa_log_1  ...                                       aa_whole_log
0               audio_hw_primary  ...            audio_hw_primary: choose pcmC0D0p for 0
1      InputMethodManagerService  ...  InputMethodManagerService: packageName=com.goo...
2      InputMethodManagerService  ...  InputMethodManagerService: ime_enabled = false...
3      InputMethodManagerService  ...  InputMethodManagerService: packageName=com.goo...
4      InputMethodManagerService  ...  InputMethodManagerService: ime_enabled = false...
..                           ...  ...                                                ...
345               BitmapDrawable  ...       BitmapDrawable: BitmapDrawable cannot decode
346    android.widget.GridLayout  ...  android.widget.GridLayout: horizontal constrai...
347                         View  ...  View    : requestLayout() improperly called by...
348  WatchWhileTimeBarController  ...  WatchWhileTimeBarController: isScrubbing: no a...
349  WatchWhileTimeBarController  ...  WatchWhileTimeBarController: getDisplayCurrent...
[350 rows x 9 columns]

```
hit-cli 0.0.4
Graviti Github workflow CLI
License: MIT
Requires Python: >=3.6
Keywords: github,git,hit

# Github Workflow CLI —— hit

[![Pre-commit](https://github.com/Graviti-AI/hit-cli/actions/workflows/pre-commit.yaml/badge.svg)](https://github.com/Graviti-AI/hit-cli/actions/workflows/pre-commit.yaml)
[![Downloads](https://pepy.tech/badge/hit-cli/month)](https://pepy.tech/project/hit-cli)
[![GitHub](https://img.shields.io/github/license/Graviti-AI/hit-cli)](https://github.com/Graviti-AI/hit-cli/blob/main/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/hit-cli)](https://pypi.org/project/hit-cli/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hit-cli)](https://pypi.org/project/hit-cli/)

The github pull request based workflow is quite tedious and complicated,
`hit` CLI simplify the workflow by wrapping `git` CLI and github API.

## Installation

`hit` CLI has below dependences:

-   [`git`](https://git-scm.com)

Install `hit` CLI by pip:

```bash
pip3 install hit-cli
```

## Usage

```bash
$ hit --help
Usage: hit [OPTIONS] COMMAND [ARGS]...

  Usage: 'hit' + COMMAND.

Options:
  --version   Show the version and exit.
  -h, --help  Show this message and exit.

Commands:
  auth   Get Github Auth for hit CLI.
  clean  Detele useless local and remote develop branch.
  clone  Fork + clone + initialize the target github repo for hit CLI.
  land   Merge the pull request then clean and sync repo.
  pull   Sync the local and remote develop repo with upstream repo.
  push   Push the local branch to remote and create/update the pull request.
```

## Shell completion

```bash
# add this to your ~/.bashrc
eval "$(_HIT_COMPLETE=source_bash hit)"
```

```zsh
# add this to your ~/.zshrc
eval "$(_HIT_COMPLETE=source_zsh hit)"
```

```fish
# add this to your ~/.config/fish/completions/foo-bar.fish
eval (env _HIT_COMPLETE=source_fish hit)
```

See detailed info in [Click Shell Completion](https://click.palletsprojects.com/en/7.x/bashcomplete/)