semvec/pypi-packages huggingface dataset:
parsuricata 0.4.1
Parse Suricata rules
License: MIT
Requires Python: >=3.6,<4.0
Keywords: suricata,security

# parsuricata

Parse Suricata rules


# Installation

```bash
pip install parsuricata
```


# Usage

```python
from parsuricata import parse_rules

source = '''
  alert http $HOME_NET any -> !$HOME_NET any (msg: "hi mum!"; content: "heymum"; http_uri; sid: 1;)
'''

rules = parse_rules(source)
print(rules)
#
# alert http $HOME_NET any -> !$HOME_NET any ( \
#   msg: hi mum!; \
#   content: heymum; \
#   http_uri; \
#   sid: 1; \
# )

rule = rules[0]

print(rule.action)
# alert

print(rule.protocol)
# http

print(rule.src)
# $HOME_NET

print(rule.src_port)
# any

print(rule.direction)
# ->

print(rule.dst)
# !$HOME_NET

print(rule.dst_port)
# any

for option in rule.options:
    print(f'{option.keyword} = {option.settings}')
#
# msg = hi mum!
# content = heymum
# http_uri = None
# sid = 1
```
SRLR 0.1.8
A package for sketched ridgeless estimator simulations, optimizing generalization. Identify the best sketching size to minimize out-of-sample risks. Stable risk curves in optimally sketched estimator eliminate peaks found in full-sample estimator. SRLR offers practical method to discover the ideal sketching size.
License: MIT
Requires Python: >=3.6
Keywords: python,sketched ridgeless linear regression

# SRLR

Sketched Ridgeless Linear Regression

## Description

This repository presents numerical simulations that analyze the empirical risks of the sketched ridgeless estimator, aiming to enhance generalization performance. The simulations focus on determining optimal sketching sizes that minimize out-of-sample prediction risks. The results reveal that the optimally sketched estimator exhibits stable risk curves, effectively eliminating the peaks observed in the full-sample estimator. Additionally, we introduce a practical procedure to empirically identify the optimal sketching size.

Suppose we observe data vectors  (x<sub>i</sub>,y<sub>i</sub>) that follow a linear model y<sub>i</sub>=x<sub>i</sub><sup>T</sup>&beta;<sup>*</sup>+&epsilon;<sub>i</sub>, i=1,...n, where y<sub>i</sub> is a univariate response,  x<sub>i</sub> is a d-dimensional predictor, &beta;<sup>*</sup> denotes the vector of regression coefficients, and &epsilon;<sub>i</sub> is a random error. We consider the ridgeless least square estimator β̂=(X<sup>T</sup>X)<sup>+</sup>X<sup>T</sup>Y.

With this package, the simulation results in [this paper](https://arxiv.org/abs/2302.01088) can be reporduced.

## Examples

Please refer to [tutorial.ipynb](https://github.com/statsle/SRLR_python/blob/main/tutorial.ipynb) for a comprehensive example and step-by-step guide.


## Reference

Chen, X., Zeng, Y., Yang, S. and Sun, Q. Sketched Ridgeless Linear Regression: The Role of Downsampling. [Paper](https://arxiv.org/abs/2302.01088)
autopack-tools 0.4.6
Package Manager for AI Agent tools
License: MIT
Requires Python: >=3.8.1,<4.0

# AutoPack

AutoPack is a Python library and CLI designed to interact with the [AutoPack repository](https://autopack.ai)
repository, a collection of tools for AI. It is designed to be agent-neutral with a simple interface.

## Installation

You can install AutoPack using pip:

```bash
pip install autopack-tools
```

## Usage

AutoPack provides both a CLI and a Python library for interacting with the AutoPack repository.

### CLI: `autopack`

- Search for Packs: `autopack search {query}`
- Install Packs: `autopack install {Pack ID}`

### Python library: `autopack`

The `autopack` Python library allows you to work with Packs programmatically. Key functionalities include:

- Search for Packs: `pack_search(query)`
- Get a Pack: `get_pack(pack_id)`
- Get all installed Packs: `get_all_installed_packs()`
- Install a Pack: `install_pack(pack_id)`
- Select packs using an LLM: `select_packs(task_description, llm)`

For detailed examples and more information, refer to
the [AutoPack documentation](https://github.com/AutoPackAI/autopack/wiki).

## Contributing

We welcome contributions to the AutoPack ecosystem. Here are some ways you can help:

- **Create new tools!** Expand the AutoPack repository by developing and submitting your own tools. Share your ideas and
  solutions with the AutoPack community.
- **Try it out for yourself**: Test AutoPack in your projects and provide feedback. Share your experiences, report bugs,
  and suggest improvements by opening issues on GitHub.
- **Contribute code**: Help improve AutoPack by opening pull requests. You can choose to work on unresolved issues or
  implement new features that you believe would enhance the functionality of the library. Please note that the AutoPack
  library is intentionally designed to be compact and straightforward.

We appreciate your contributions and look forward to your involvement in making AutoPack a vibrant and valuable resource
for the autonomous AI community.

## License

AutoPack is released under the [MIT License](https://opensource.org/licenses/MIT).
yahoorequests 1.0
A simple Python library for getting stock prices and company names from Yahoo Finance.
License: MIT
Requires Python: >=3.4
Keywords: Stocks,Yahoo,Finance

# Yahoo Requests

A small Python library for getting prices and full names of companies using Yahoo.

## Author

Theodor Gajhede from the north of Denmark

## Usage

```python
from YahooRequests import YahooRequests as yr

# Get the live price of Google
price = yr.price("googl")

# Get the full company name of Google
name = yr.name("googl")
```
## Installation
```python
pip install YahooRequests 
```
## Support
If ``` import YahooRequests from YahooRequests``` doesn't work
 try using the "--user" flag when  installing with pip or contact RedDied at reddied@gmail.com

## Credits
#### Thanks to u/Diapolo10 for helping with version 0.2.
gravityforms-python 0.1.0
API wrapper for Gravityforms (Wordpress plugin) written in Python
License: MIT
Requires Python: >=3.7,<4.0

# gravityforms-python
![](https://img.shields.io/badge/version-0.1.0-success) ![](https://img.shields.io/badge/Python-3.8%20|%203.9%20|%203.10%20|%203.11-4B8BBE?logo=python&logoColor=white)  

*gravityforms-python* is an API wrapper for Gravityforms (Wordpress plugin), written in Python.  
This library uses Oauth1 for authentication.
## Installing
```
pip install gravityforms-python
```
## Usage
```python
from gravityforms.client import Client
client = Client(base_url, consumer_key, consumer_secret)
```
### List Entries
```python
entries = client.list_entries()
```
### Filter entries
```python
entries = client.filter_entries(filter_field, 
            filter_value, 
            filter_operator, 
            sorting_direction=None, 
            page_size=None, 
            form_id=None
)
```
### List Forms
```python
forms = client.list_forms()
```
### Get Form detail
```python
form = client.get_form(form_id)
```
ai-functions 0.4.3
manage openai functions and execution
License: MIT
Requires Python: >=3.9,<4.0

# Python AI Functions


Simple library that can convert from python functions to a JSON schema description of those functions, suitable for use with AI libraries.


## Installation

`pip install ai-functions`

## Usage

For example:

```
from ai_functions import get_openai_functions, execute_function


def search_web(query: Annotated[str, "google formatted keywords to search for"]):
    """Search the web"""

print(openai_function_dict([search_web]))
```


Also, if you get a `response.function_call` from openai, you can use `execute_function`

```
openai_function_execute([search_web], function_call)
```

Or, if you have the name and arguments split out already:

```
function_execute([search_web], name, arguments)
```

Finally, if you want a container to handle this:

```
from ai_functions import AIFunctions


container = AIFunctions([search_web, add_calendar_entry])

functions = container.openai_dict()
subset_functions = container.openai_dict(["search_web"])
container.execute("search_web", {"query":"top web hosting sites"})
container.opeanai_execute({"name": "search_web", "arguments": "{\"query\":\"top web hosting sites\"}")

```
## What stuff does this handle?

 - Converts your annotated schema into an appropriate prompt 
 - Handles converting arguments to JSON if they are specified as a string.
 - Auto-casts arguments to the right types, if they aren't right.
 - Raises errors that AI engines understand if returned as a function response, instead of errors with poor descriptions.

## Async execute
 - If a loop is provided to the AIFunctions constructor, or to any execute calls, it will be used to schedule a coroutine.
 - Async versions of execute are available, prefix all calls with `async_`


### Some fine print

If you want to have a paramter that is still seen as "valid", but isn't part of the schema, you can 
annotate it with None as the description.  But this is really an "enforcement" thing, and might not
belong in this library.

Dealing with context is a beast in chat apps, so more work here might be helpful.

For example, I use meta-functions that unlock others, to prevent context-bloat.  

Might put that in another lib soon, or put it here.