semvec/pypi-packages huggingface dataset:
perg-search 0.0.2
Search code for patterns that match a given string
Requires Python: >=3.9

# perg: like grep, but backwards

grep finds all the strings in your files that match a given pattern.

perg finds all the patterns in your files that match a given string.

Patterns may be regexes, globs, or other pattern-matching languages.
Patterns may also be format strings or templates.

## Examples

### Webapp routes

Ever forget where you defined the route that handles that URL?

```python
@app.get("/items/{item_id}")
def read_item(item_id: int, q: Union[str, None] = None):
    return {"item_id": item_id, "q": q}
```

`perg '/items/12345'` would find the `@app.get` line.

### Log entries

Trying to figure out where that log line comes from?

`perg "User Alice performed a login action."` would find this code:

```python
logging.info(f"User {user} performed a {action} action.")
```

## Won't this just find every `.*`, `.`, `%`, or  `*` in the codebase?

By default, `perg` uses simple heuristics to ignore matches where the pattern would also match the empty string or any single byte.
This gets rid of most of the pointless matches.

Additionally, for each match, `perg` attempts various edits to your test string to decide how much information in your test string is implied by the pattern.

For the string `foo bar baz`, the following regexes are sorted from most to least informative:

- `foo bar baz`
- `foo [a-z]* baz`
- `foo [a-zA-Z]* baz`
- `foo .* baz`
- `foo .*`
- `...........`
- `.*`

Anything that scores worse than 50% as strict as the best match is hidden by default.
This threshold can be adjusted with `--pct-of-best-score`, and this behavior can be disabled entirely with `--no-score-by-information`.

(Additional details can be seen in the docstring for `information()` in heuristics.py.)

# Language support

For each programming language perg supports, there is a module in `syntaxes/`.

Currently supported languages:

- python

Each syntax module must have a method `parse(f, filename)`.
This method will be passed the file object and filename of each source file.
It should return an iterator of `Pattern` objects.

A `Pattern` object contains:

- The location of the pattern (filename, starting & ending line numbers and columns)
- A set of check functions which determine whether the given string matches the pattern.

This allows a single pattern to be checked against several different pattern languages.
For example, a string literal found in your source code could be tested as a format string, a regex, a glob, a SQL pattern, and for string equality.
jcon 0.5.8
Move Windows desktop icons programmatically in Python
Requires Python: >=3.6

# JCON — Relocate Windows Desktop Icons in Python

A lightweight Python package to programmatically get and set Windows desktop icon positions using native Windows APIs.

---

## Features

- Retrieve count and position of desktop icons  
- Move desktop icons to specified screen coordinates  
- Automatically snaps icon positions to the desktop grid (handles DPI and icon size)  
- Pure Python with standard library (`ctypes`), no external dependencies

---

## Installation

```bash
pip install jcon
```
InitDecaytor 0.4.4
Simulation of the thermal decomposition of free-radical initiators
Requires Python: >=3.8

# InitDecaytor
##### _Thermal decomposition of free-radical initiators_

The purpose of this program is to simulate the thermal decomposition of 
free radical initiators based on reported kinetic data and a set of (virtual)
experimental parameters, such as the concentration and temperature.  

Currently, multiple charges of a variety of radical initiators are supported 
at a constant temperature. 
Alternatively, a temperature profile can be imported from the Huber SpyControl software. 
The end-time of the experiment can be visualized
based on a desired threshold of initiator relative to its maximum concentration.

Developed on a fresh python install (v3.13) with the most recent package versions in June 2025. 
In case of issues, please consider updating your packages. 

##### How to get started?
Install InitDecaytor:

```bash
pip install InitDecaytor
```

or upgrade if you've installed a previous version before:

```bash
pip install --upgrade InitDecaytor
```

Create a python script, for example `GUI.py`, containing the following code: 

```python
import InitDecaytor

if __name__ == '__main__':
    app = InitDecaytor.GUI()
    app.run(debug=True)
```

Finally, run the script: 
```bash
python GUI.py
```

This  will generate a link to open the user interface in your browser. (Ctrl+)Click the link or copy-paste it manually. Tested with Microsoft Edge.

##### License

InitDecaytor is available free of charge under an MIT License. 
See the LICENCE file for more details.


##### Changelog

###### 0.4
* All important basic functions are now included in the GUI 
  * Some invalid combinations of input elements are now captured
  * Everything seems to work fine, but no thorough checks for bugs performed yet

###### 0.3
* Initial GUI

###### 0.2
* Temperature profiles supported
  * CSV file from the Huber SpyControl software be imported
  * Should be readily expandable to other CSV formats/layouts

###### 0.1
* Initial release
crawlquest 0.1.3
Auto GET/POST web scraping helper for Python requests.
Requires Python: >=3.8

# CrawlQuest
[![Test Status](https://github.com/leewr9/crawlquest/actions/workflows/test.yml/badge.svg)](https://github.com/leewr9/crawlquest/actions/workflows/test.yml)
[![Publish Status](https://github.com/leewr9/crawlquest/actions/workflows/publish.yml/badge.svg)](https://github.com/leewr9/crawlquest/actions/workflows/publish.yml)


Lightweight wrapper around Python `requests` that automatically chooses between `GET` and `POST` based on the presence of a payload.  
Perfect for **web scraping**, **automation**, and **crawling tools** where fast and adaptive request behavior is needed.

## Features

- Automatically uses `GET` if no payload, `POST` if payload is present
- Supports returning **JSON**, **HTML**, **raw bytes**
- Optional `requests.Session` injection for cookie/session reuse
- Simple API with built-in error handling
- Customizable timeout and headers

## Installation

```bash
pip install crawlquest
```

### Alternatively, install manually

```bash
git clone https://github.com/leewr9/crawlquest.git
cd crawlquest
pip install .
```

## Usage

```python
from crawlquest import json, html, raw

# Automatically POSTs (since payload exists)
res = json("https://httpbin.org/post", payload={"key": "value"})

# Automatically GETs (no payload)
html_content = html("https://example.com")

# Raw bytes (e.g., image or file)
binary = raw("https://httpbin.org/image/png")
```

### Using a persistent session (cookie reuse)

```python
import requests
from crawlquest import json

session = requests.Session()
json("https://httpbin.org/cookies/set?mycookie=value", session=session)
res = json("https://httpbin.org/cookies", session=session)

print(res)
# Output: {'cookies': {'mycookie': 'value'}}
```

## API Reference

### `json(url, payload=None, headers=None, timeout=10.0, session=None) -> dict | None`

- Automatically parses JSON response.
- Returns `None` if decoding fails.

### `html(url, ...) -> str`

- Returns the text (HTML) of the response.
- Automatically applies `apparent_encoding` if needed.

### `raw(url, ...) -> bytes`

- Returns the raw byte content (e.g., for images or binary files).

## Error Handling

All internal HTTP calls raise `RuntimeError` with context on failure

```python
try:
    data = json("https://example.com/api")
except RuntimeError as e:
    print(f"Request failed: {e}")
```

## License  
This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.