semvec/pypi-packages huggingface dataset:
hx-sdk 0.1.3
HexelStudio Python SDK
Requires Python: >=3.9
Keywords: ai, hexelstudio, hx, knowledge, memory, sdk

# HX SDK

Python SDK for HexelStudio.

## Installation

```bash
pip install hx-sdk
```

## Configuration

Just set your API key — org, workspace, and environment are automatically extracted from the token:

```bash
export HX_API_KEY="your-api-key"
```

Optionally override the base URL:
```bash
export HX_BASE_URL="https://api.hexelstudio.com"  # default
```

## Usage

```python
from hx import Client

client = Client()

# Knowledge search
results = client.knowledge.search("ks_support", "refund policy")

# Memory operations
client.memory.add(
    "ms_support",
    messages=[
        {"role": "user", "content": "I prefer email"},
        {"role": "assistant", "content": "Noted!"}
    ],
    user_id="user_123"
)

memories = client.memory.search("ms_support", "preferences", user_id="user_123")

# Access tenant info from token (if needed)
print(client.org_id)
print(client.workspace_id)
print(client.environment_id)
```

## Documentation

See [docs.hexelstudio.com](https://docs.hexelstudio.com/sdk/python) for full API reference.
pySigma-backend-databricks 0.1.5
pySigma backend for Apache Spark/Databricks
Requires Python: <=3.14,>=3.10
Keywords: cybersecurity, apache spark, spark, sigma, databricks

![Tests](https://github.com/alexott/databricks-sigma-backend/actions/workflows/test.yml/badge.svg)
![Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/alexott/GitHub Gist identifier containing coverage badge JSON expected by shields.io./raw/alexott-databricks-sigma-backend.json)
![Status](https://img.shields.io/badge/Status-pre--release-orange)

Status: **experimental**, work in progress:

* Although `cidrmatch` is generated, you still need to provide corresponding function as UDF (I'll add example later)
* Requires more testing

# pySigma Databricks Backend

This is the Databricks backend for pySigma. It provides the package `sigma.backends.databricks` with the `DatabricksBackend` class.
Further, it contains the following processing pipelines in `sigma.pipelines.databricks`:

* `snake_case`: convert column names into snake case format

It supports the following output formats:

* default: plain Databricks/Apache Spark SQL queries
* dbsql: Databricks SQL queries with rules metadata (title, status) embedded as comment
* detection_yaml: Yaml markup for my own detection framework

## Unbound Keyword Search

The backend supports Sigma rules with unbound keywords (values without field names). These keywords search the raw log line.

### Configuration

By default, the backend looks for keywords in a field named `raw`. You can customize this:

**Command Line:**
```bash
sigma convert -t databricks -O raw_log_field=message rule.yml
```

**Programmatic:**
```python
from sigma.backends.databricks import DatabricksBackend

backend = DatabricksBackend(raw_log_field="event_data")
```

### Examples

**Simple Keywords (OR logic):**
```yaml
detection:
    keywords:
        - 'EVILSERVICE'
        - 'svchost.exe -n evil'
    condition: keywords
```
Generates: `contains(lower(raw), lower('EVILSERVICE')) OR contains(lower(raw), lower('svchost.exe -n evil'))`

**Keywords with |all (AND logic):**
```yaml
detection:
    keywords:
        '|all':
            - 'Remove-MailboxExportRequest'
            - ' -Identity '
    condition: keywords
```
Generates: `contains(lower(raw), lower('Remove-MailboxExportRequest')) AND contains(lower(raw), lower(' -Identity '))`

**Mixed with Field Conditions:**
```yaml
detection:
    selection:
        EventID: 4688
    keywords:
        - 'mimikatz'
    condition: selection and keywords
```
Generates: `EventID = 4688 AND contains(lower(raw), lower('mimikatz'))`

**Wildcards in Keywords:**
```yaml
detection:
    keywords:
        - '*malware*'      # uses contains()
        - 'cmd.exe*'       # uses startswith()
        - '*.dll'          # uses endswith()
    condition: keywords
```

**Regex Patterns:**
```yaml
detection:
    keywords:
        - '|re': '.*evil(cmd|powershell).*'
    condition: keywords
```
Generates: `raw rlike '.*evil(cmd|powershell).*'`

## Maintainer

This backend is currently maintained by:

* [Alex Ott](https://github.com/alexott/)
permutations-younes 0.0.1
A Python utility to generate all permutations of a list of elements using Heap's algorithm.
Requires Python: >=3.10

# Permutations Generator

A Python utility to generate all permutations of a list of elements using Heap's algorithm.

## Overview

This script generates all possible permutations of a given list of elements. It uses Heap's algorithm, an efficient recursive approach that generates permutations by swapping elements in a systematic manner.

## Usage

Run the script from the command line with a list of elements to permute:

```bash
python permutations.py element1 element2 element3 ...
```

### Example

```bash
python permutations.py 1 2 3
```

Output:
```
['1', '2', '3']
---------------------------------------
1 2 3 
1 3 2 
2 1 3 
2 3 1 
3 1 2 
3 2 1 
```

## Requirements

- Python 3.6 or higher

## Notes

- Elements are treated as strings when passed via command line
- The total number of permutations for n elements is n! (factorial)
- For large input lists (n > 10), execution time and memory usage will increase significantly

## License

This project is licensed under the MIT License. See the [LICENSE](https://github.com/procrastinator-101/permutations/blob/main/LICENSE) file for more details.