semvec/pypi-packages huggingface dataset:
novikovtv-parser-yandex 1.0.16
This is the yandex search engine parser
Requires Python: >=3.11

from novikovtv_parser_yandex.parsers.models.site_data import SiteParserData

# Парсер поисковой выдачи Яндекса

## Пример

```py


from enum import Enum

from pydantic import BaseModel

from novikovtv_parser_yandex.parsers.models.site_data import SiteParserData
from novikovtv_parser_yandex.parsers.yandex_text_search_api import YandexSearchTextApiV1, ParserType


class ParserRouteType(str, Enum):
    YANDEX: str = "yandex"
    FNS: str = "fns"
    VK: str = "vk"
    TENCHAT: str = "tenchat"


class ParserAPIType(int, Enum):
    """Перечисление типов парсера API."""
    Deferred = 0  # Отложенный парсинг
    Day = 1  # Дневной парсинг
    Night = 2  # Ночной парсинг


class ParserRequest(BaseModel):
    """Модель запроса на парсинг."""
    tg_user_id: int
    query: str
    type: ParserAPIType


async def yandex(parser_request: ParserRequest, search_id: int):
    """Выполняет парсинг Яндекса по запросу пользователя."""
    yandex_api = await YandexSearchTextApiV1.create(
        oauth_token="",
        folder_id="",
        api_key_v1="")

    p_type: ParserType = ParserType.Day
    if parser_request.type == ParserAPIType.Day.value:
        p_type = ParserType.Day
    elif parser_request.type == ParserAPIType.Night.value:
        p_type = ParserType.Night

    site_parse_data_list: list[SiteParserData]
    _, site_parse_data_list = await yandex_api.search(parser_request.query, p_type, search_id)
```
bellasplit 1.1.0
Creating splits of whole slide image scan data for digital pathology deep learning applications
Requires Python: >=3.10

# Ballatrix Split

A microservice creating data splits for deep learning applications in digital pathology.

It operates on a storage sqlite database created by the [bellastore](https://github.com/spang-lab/bellastore) package.\
This database is particularly helpful when querying metadata of specific slides for downstream tasks
via our custom digital pathology API `bellapi`.

## Installation

The source code is currently hosted under [https://github.com/spang-lab/bellasplit](https://github.com/spang-lab/bellasplit).

Binary installers are available at PyPi.

```sh
pip install bellasplit
```

## Usage

Under [docs/.env](docs/.env) you find a simple template for an .env file that needs to be located in your current environment and hold
the path to a `yaml` config file. A minimal config file is provided under [docs/bellameta.yaml](docs/bellameta.yaml).
This config in particular defines the valid `SPLITNAME`s available to this package.

```python
from dotenv import load_dotenv
load_dotenv()

from bellasplit.types import Splitname
print(Splitname.list())
```


In order to fetch data for a new split the `DataSource` interface is to be used, implementing the `get_data` method.

```python
from bellameta import types as t

from bellasplit.database import Db
from bellasplit.base_split import DataSource, Split, SplitWriter

class Subtyping(DataSource):
    def __init__(self,
                 db: Db):
        super().__init__(db = db,
                            task= t.Task.Subtyping)

    
    def get_data(self, **kwargs):
        # here we have room for fetching and modifying the data
        # in this minimal example we simply call the filter method, i.e.,
        # the fetched data results from searching the data that
        # satisfies the conditions specified in **kwargs
        data = self.filter(**kwargs)
        return data
```

In order to fetch the data filters can be defined via `**kwargs`:

```python
db = Db()
source = Subtyping(db=db)

# the conditions to filter for
kwargs = {
    'stain': [t.Stain.HE],
    'class': [t.Subtype.DLBCL, t.Subtype.FL],
    'cohort': [t.Cohort.Example]
}

source_data = source.get_data(**kwargs)
```

In order to create and write the final split the `Split` and `SplitWriter` classes are used:

```python
split = Split(source_data = source_data, splitname = Splitname.from_int(0), test_size = 0.4, val_size=0.2)
writer = SplitWriter(db=db, split=split)
writer.write()
```

## Documentation

Along with the [source code](https://github.com/spang-lab/bellasplit), under [docs/demo.ipynb](docs/demo.ipynb), we provide a demo leading you through the features of this package via an application scenario.
For further documentation see also the test suite.
hold-your-shell 0.1.6
Preview and confirm scripts before executing them.
Requires Python: >=3.7

# hold-your-shell

`hold-your-shell` is a command line program (TUI) that previews shell
scripts (or any shebang script) in a pager, and asks the user to
confirm execution.

This single file program is written for Python 3.x and only uses the
stdlib.

![image](https://github.com/user-attachments/assets/1219de6e-32b2-4dbe-8016-e836adf5d7e1)

## Install

Pip install:

```
pip install hold-your-shell
```

Manual install:

```
HY_BIN=~/.local/bin/hold-your-shell
mkdir -p $(dirname ${HY_BIN})

wget -O ${HY_BIN} https://raw.githubusercontent.com/EnigmaCurry/hold-your-shell/refs/heads/master/hold_your_shell/hold_your_shell.py

chmod +x ${HY_BIN}
```

## Usage

 * Pipe any script to the stdin of `hold-your-shell`.
 * The script will be previewed on the first tab shown: `Script Preview`.
 * Press TAB to cycle through the other tabs, including `Env Vars`.
 * Use the up, down, PgUp, PgDown, `j`, or `k` keys to scroll the
   text.
 * Use the left, right, `h`, or `l` keys to select the action and
   press `Enter` to confirm.
   * Choose `Yes` to run the script.
   * Choose `No` to cancel and quit (default).
   * Choose `Edit` to open the script in your preferred `$EDITOR`,
     allowing you to customize it before running it.
 
## Examples

### Read from stdin

```
echo "whoami" | hold-your-shell
```

```
echo -e '#!/bin/python\nprint("Hello from Python!")' | hold-your-shell
```


```
cat <<'EOF' | hold-your-shell
echo "What is your name?"
read NAME
echo "Hello $NAME"
EOF
```

```
curl https://get.docker.com/ | hold-your-shell
```

### Read from file

```
cat <<EOF > test.txt
#!/bin/env python
print("Hello from Python!")
EOF

hold-your-shell --consume test.txt
```

`--consume` will **delete** the input file immediately after it reads
it.

### Linger

```
echo whoami | hold-your-shell --linger
```

`--linger` will have the program remain running after completion of
the script until a key is pressed.

## Development

See [DEVELOPMENT.md](DEVELOPMENT.md)