semvec/pypi-packages huggingface dataset:
qy-ip-parse 0.0.8
qy ip parse.
License: MIT
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*
Keywords: python qy ip parse

# qy ip parse

qy ip parse.


## Installing

Install and update using `pip`:

```
$ pip install -U qy-ip-parse
```


## A Simple Example

```python
import time

from qy_ip_parse import IP_IP

IP_IP.init(host='127.0.0.1', port=6379, pwd=None, ex=10)


if __name__ == '__main__':
    s = time.time()
    ip = IP_IP.parse('111.12.33.11')
    print(ip.country_name, ip.region_name, ip.city_name, ip.isp_domain)
    print(time.time() - s)
    time.sleep(5)
    s = time.time()
    ip = IP_IP.parse('111.12.32.11')
    print(ip.country_name, ip.region_name, ip.city_name, ip.isp_domain)
    print(time.time() - s)
    time.sleep(6)
    s = time.time()
    ip = IP_IP.parse('111.12.35.11')
    print(ip.country_name, ip.region_name, ip.city_name, ip.isp_domain)
    print(time.time() - s)
    time.sleep(5)
    s = time.time()
    ip = IP_IP.parse('111.12.55.11')
    print(ip.country_name, ip.region_name, ip.city_name, ip.isp_domain)
    print(time.time() - s)

```
hub-scraper 0.6.1
Tool to grab articles from the habr.com hubs.
License: MIT
Requires Python: >=3.8,<3.11
Keywords: habr.com,scraper,cli,tools

# Hub scraper

Tool to grab articles from the habr.com hubs.

## Requirements
- Python 3.8+

## Installation
```bash
pip install hub-scraper
```


## Usage
```bash
hub-scraper --help

hub-scraper -h python -of /home/user/Downloads/hubs
```

I'm using [Obsidian](https://obsidian.md/) to view the articles:
![](https://github.com/dmitriiweb/hub-scraper/raw/main/images/default-obsidian.png)
xontrib-log-all-history 1.1.0
persists all shell history in $HOME/.logs
License: MIT
Requires Python: >=3.6

<p align="center">
persists all shell history in `$HOME/.logs`
</p>

<p align="center">
If you like the idea click ⭐ on the repo and <a href="https://twitter.com/intent/tweet?text=Nice%20xontrib%20for%20the%20xonsh%20shell!&url=https://github.com/drmikecrowe/xontrib-log-all-history" target="_blank">tweet</a>.
</p>

# xontrib log-all-history

To install use pip:

```bash
xpip install xontrib-log-all-history
# or: xpip install -U git+https://github.com/drmikecrowe/xontrib-log-all-history
```

## Usage

```bash
xontrib load log_all_history
# TODO: what's next?
```

> :warning: If you using `SqliteHistory` backend, you **must** include `$XONSH_HISTORY_BACKEND = 'sqlite'` **before** loading.  For example:

```xonsh
$XONSH_HISTORY_BACKEND = 'sqlite'
xontrib load 'log-all-history'
```

## Architecture

This plugin intercepts history before sending to the `JsonHistory` or `SqliteHistory` backend. In short:

* Take the current command line and append to a history named:
    `$HOME/.logs/$PWD/xonsh-history-{DateTime}.log`
* For example:

```sh
 ~/P/P/x/xontrib-log-all-history  cat README.md > /dev/null
 ~/P/P/x/xontrib-log-all-history  tail $LOG_ALL_HISTORY_FILE
2022-03-11.21.17.01 cat README.md > /dev/null
 ~/P/P/x/xontrib-log-all-history 
```

I've been using this method since October in 2019 (both in bash and now xonsh). Here's stats on my logs directory:

```sh
 ~/P/P/x/xontrib-log-all-history  du -sh ~/.logs
16M     /home/mcrowe/.logs
 ~/P/P/x/xontrib-log-all-history  egrep '^201' ~/.logs -Rh | cut -b -7 | sort | uniq | head -n 1
2019-10
 ~/P/P/x/xontrib-log-all-history  find ~/.logs | wc -l
3645
 ~/P/P/x/xontrib-log-all-history 
```

## Searching History

Two helper aliases are enabled to assist in searching your accumulated history:

---

> `hgrep` -- "H"istory "Grep"

This command is simply `grep -ERh {SEARCH_STRING} $HOME/.logs` -- it searches all folders.

---

> `hgrep` -- "H"istory in this "D"irectory "Grep"

This command is simply `grep -ERh {SEARCH_STRING} $HOME/.logs/$PWD` -- it searches all logs you've done in this specific directory. The use-case for this is:

* You use the `python` command frequently
* You remember using a `python` command in the past for the current project with a lot of parameters you figured out, but you didn't save it.
  * If you did `hgrep python`, you'd find many entries.
  * By using `hdgrep python`, you find the specific command.

Example:

```sh
 ~/P/P/x/xontrib-log-all-history  hgrep cat | wc -l
1427
 ~/P/P/x/xontrib-log-all-history  hdgrep cat | wc -l
10
 ~/P/P/x/xontrib-log-all-history 
```

(yes, I did several `cat`s testing for the readme...)

## Optional Configuration

If you want to place to the logs in a different folder, set:

```xonsh
$LOG_ALL_HISTORY_DIR = f"{$HOME}/.all-logs"
xontrib load 'log-all-history'
```

## Credits

This package was created with [xontrib cookiecutter template](https://github.com/xonsh/xontrib-cookiecutter).
jinja2-workarounds 0.1.0
A jinja2 extension for includes with correct indentation
License: MIT
Requires Python: >=3.7,<4.0

# 🦸‍♂️ Not the solution `jinja2` deserves, but the workaround it needs right now.
`jinja2_workarounds` offers an extension for jinja2 that works around a long standing issue[^1]
where `include` does not preserve correct indentation for multi-line includes. Simply add the
`jinja2_workarounds.MultiLineInclude` [extension to your environment](https://jinja.palletsprojects.com/en/3.0.x/extensions/) and use the `indent content` directive to
correctly indent your multi-line includes.

## Installation
```pip install jinja2_workarounds```


## Usage example
```jinja2
# text.j2
this
is 
some 
text
```

```jinja2
# example.j2
example:
    {% include 'text.j2' indent content %}
```

is then rendered as 

```
example:
    this
    is 
    some 
    text
```

compared to `jinja2`'s default `include` which would result in 

```
example:
    this
is 
some 
text
```

## Advanced features
`MultiLineInclude` is compatible with custom `block_start_string` and `block_end_string`. It also works with 
the advanced features of `jinja2'`s `include` statement. The following variants are all supported and work as
expected

```jinja2
{% include 'missing.j2' ignore missing indent content %}  # handle missing templates
{% include ['foo.j2', 'bar.j2'] indent content %}  # multiple alternative templates
{% include 'child.j2' without context %}  # include child with/without content
{%- include 'child.j2' +%}  # include with custom whitespace control
```

[^1]: https://github.com/pallets/jinja/issues/178