semvec/pypi-packages huggingface dataset:
pbm-liumou-Stable 1.0.0
这是一个Python日常开发中常用的数据、功能基础处理函数，例如IP地址切割，子网掩码换算等
Requires Python: >=3.0

# pbm

#### 介绍
这是一个Python日常开发中常用的数据、功能基础处理函数，例如IP地址切割，子网掩码换算等

#### 软件架构
软件架构说明


#### 安装教程

1.  xxxx
2.  xxxx
3.  xxxx

#### 使用说明

1.  xxxx
2.  xxxx
3.  xxxx

#### 参与贡献

1.  Fork 本仓库
2.  新建 Feat_xxx 分支
3.  提交代码
4.  新建 Pull Request


#### 特技

1.  使用 Readme\_XXX.md 来支持不同的语言，例如 Readme\_en.md, Readme\_zh.md
2.  Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
3.  你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
4.  [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目，是综合评定出的优秀开源项目
5.  Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6.  Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
get-user-agent-pls 0.1.2
A package to fetch get-user-agent strings
Requires Python: >=3.6

# Get User Agent Pls

This Python package allows you to fetch the current user-agent strings for popular browsers. It uses web scraping to fetch the user-agent strings from the website useragentstring.com.

## How it works

The package contains two main scripts:

1. `get_user_agent_pls_scraper.py`: This script scrapes the user-agent strings for various browsers from useragentstring.com and saves them in a JSON file (`user-agents.json`). The browsers it fetches the user-agent strings for are Edge, Chrome, Firefox, Safari, and GoogleBot.

2. `get_user_agent_pls.py`: This script fetches a user-agent string. If the `USER_AGENT_API_KEY` environment variable is not set, it uses the locally saved `user-agents.json` file. If the file doesn't exist, it calls `get_user_agent_pls_scraper.py` to fetch and save the latest user agents. If the `USER_AGENT_API_KEY` environment variable is set, it uses the API to fetch the user-agent string.

## How to use

1. Install the package using `pip install get_user_agent_pls`.
2. Import the `fetch_user_agent` function from the `get_user_agent_pls` module.
3. Call the function with the browser and operating system as arguments. The available options for the browser are "Edge", "Chrome", "Firefox", "Safari", and "GoogleBot". The operating system argument is currently not used. For example, `fetch_user_agent("chrome", "windows")`.

Example returned values:

- For Chrome: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.3"
- For Firefox: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0"
- For Safari: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15"
- For Edge: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.3 Edg/89.0.774.50"
- For GoogleBot: "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

## Dependencies

The package requires the following Python libraries:

- requests
- beautifulsoup4

These can be installed using `pip install -r requirements.txt`.

## License

This package is licensed under the MIT License. See the `LICENSE` file for more details.
## Running the tests

To run the tests, navigate to the root directory of the project and run the following command:

```bash
make test
```

This will discover and run all the test cases in the `test_user_agent.py` file. The unit tests create a `user-agents.json` file if it does not exist before the tests run. If the file did not exist before the tests, it is removed after the tests complete.

Here is an example of successful unit tests:

```bash
$ make test
python -m unittest discover
..
----------------------------------------------------------------------
Ran 2 tests in 0.001s

OK
```
substring-structures 0.0.2
Structures for doing substring searches.
Requires Python: >=3.10

# substring_structures

https://pypi.org/project/substring-structures/

Python library for substring search structures. Includes implementations of [Ukkonen's algorithm](https://en.wikipedia.org/wiki/Ukkonen%27s_algorithm), the [Aho-Corasick algorithm](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm),
and the [Knuth-Morris-Pratt algorithm](https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm).

## Ukkonen's Suffix Tree

```py
>>> from substring_structures import SuffixTree

>>> hello = SuffixTree("hello")
>>> "lo" in hello
True
>>> "he" in hello
True
>>> "hi" in hello
False
```

Suffix tree implementation based on descriptions from https://www.charliemistrata.com/posts/ukkonens-algorithm.

This suffix tree can be precomputed for a string `S` in O(N) time using Ukkonen's algorithm.
It can then be used to check if a string `W` of length M is a substring of `S` in O(M) time.

## Aho-Corasick String Finite State Machine

```py
>>> from substring_structures import ACStringFSM

>>> greetings = ACStringFSM({"hello", "hi", "hey"})
>>> greetings.find_substrings_in_superstring(superstring="hi, hello")
{"hello", "hi"}
```

Structure used to preprocess a set of substrings to efficiently do substring checks.

Based on the [Aho-Corasick algorithm](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm),
this structure is an FSM (finite state machine) that can be computed in O(N) time for a set of
strings `strings` of total character count N. It can then be used to efficiently check which
strings in `strings` are in an arbitrary larger string `superstring` using the
`find_substrings_in_superstring(superstring)` method.

## Knuth-Morris-Pratt Prefix Fallback

```py
>>> from substring_structures import KMPPrefixFallback

>>> KMPPrefixFallback("bababooie")
KMPPrefixFallback(string='bababooie', fallback_length_by_prefix_length=[-1, 0, 0, 1, 2, 3, 0, 0, 0])
>>> baba = KMPPrefixFallback("baba")
>>> baba.contained_by("ababab")
True
>>> baba.contained_by("keke")
False
```

Structure used to preprocess a string `W` of length M in O(M) time so that you can check
if its a substring of another string `S` of length N in O(N) time using `KMPPrefixFallback(w).contained_by(s)`.

It does this by generating a structure of string W that allows you to "fallback" from a longer prefix of
W to a shorter prefix of W on a character mismatch when searching S. The code here
is based on descriptions at https://www.charliemistrata.com/posts/knuth-morris-pratt.

This class is mainly to illustrate the Knuth-Morris-Pratt algorithm as python has
a fast built-in algorithm for substring search.