semvec/pypi-packages huggingface dataset:
navajo 0.4.1
Talk to your code!

# navajo

Talk to your code!

## Setup

1. Make sure you have the latest version: `pip install --upgrade navajo`

1. Run the `navajo` command.

1. You will then be asked which directory to index. This needs to be an absolute path to the root of your codebase. Please note that indexing can take a long time if your project is large (expect about three minutes per 100k LoC).

1. Once indexing is complete you will be ready to chat! There are a few built-in commands, which you can list with `help`.
py-conventional-commits 0.0.3
Package to check conventional commits
Requires Python: >=3.0

# py-conventional-commits

## Summary

Package for check conventional commits written only in python

## Description

The goal of this project is to validate commit messages using the Conventional Commits specification. The Conventional Commits specification is a set of rules that standardizes commit messages in software projects, making it easier to read and interpret changes made to the codebase. The specification can be found at https://www.conventionalcommits.org/en/v1.0.0/#specification.

Commit message validation will be performed using a Python script that will be automatically executed by the commit-msg Git Hook whenever a new commit is made. The script will check whether the commit message follows the pattern defined by the Conventional Commits specification and, if it does not comply, it will prevent the commit and display an error message indicating the issue.

The project will use Python's re library to create regular expressions that define the pattern of a valid commit message. In addition, a configuration file will be created to allow developers to customize some of the validation rules according to the specific needs of the project.

## Features

- Validate commit messages using the Conventional Commits specification.
- Prevent commits if the message does not comply with the specification.
- Display an error message indicating the issue with the commit message.
- Allow customization of validation rules via a configuration file.
- Automatically executed by the commit-msg Git Hook.

## Benefits

- Standardize commit messages across the project, making it easier to read and interpret changes made to the codebase.
- Improve the overall quality of commit messages, leading to better communication and collaboration among developers.
- Depend exclusively on Python, specifically on 0 other packages.

## Installation

Global installation

```bash
sudo pip3 install -U py-conventional-commits
```

### Python project

You can add it to your local project using one of these:

```bash
pip install -U py-conventional-commits
```

for Poetry >= 1.2.0:

```bash
poetry add py-conventional-commits --group dev
```

for Poetry < 1.2.0:

```bash
poetry add py-conventional-commits --dev
```
midgard-discord 0.8.0
ChatOps discord bot to request and provision Openstack resources in MidgardLab
Requires Python: >=3.10,<4.0

# Midgard Discord bot

[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/nqngo/midgard-discord/main.svg)](https://results.pre-commit.ci/latest/github/nqngo/midgard-discord/main) [![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-310/)

**Midgard** is a private OpenStack cloud for VAIT testing, training, and development purpose. This project aims to simplify and allow quick provisioning of OpenStack VM using an opinionated workflow entirely through Discord, following a ChatOps model.

## Motivations
1. **Midgard** is an OpenStack lab running entirely on-premise. While it has NAT connectivity, the sticking point is how to direct ingress point to the VMs provisioned inside the lab.
2. For most teaching lab, the users do not deviate from a standard configuration.
3. The resource should be accessible to most users so beginners and professionals alike can quickly provision, experiment and shutdown their solutions.
4. We want to avoid running jumpboxes.
5. We want to avoid installing any VPN solution.
6. We want to avoid software client dependencies, access should simply be SSH into the VM.

## Software Architecture

The software architecture for the bot is as followed:

![Midgard-Discord Bot Architecture Diagram](https://www.plantuml.com/plantuml/svg/JL3BJiGm3BpxAwpUMUxLgbgn2pVWWFY0D76hgcsySX8u8FvzxJwadZAUcOwdlgJi99Tv0i_pdIF5ZDNx47eduOLpXIvXondyn2NWRKYU9HWPLWYRydcdg55-D8ttOHEhgptTv8JmW_8loxW4-mwSpopudKYCAFf2v41OlOQUlaX-I1PhO3-gvmyG3qMlRvXBZ3IPPuFm3y5brxgaARSDhHaj0DWAF3yr-m_KECHCeZtIhgdekrhtQ9pHcnFFfrDZnwZnUROB6QLbPXT30ygheR4b1XMjTPQSRkYB4ApCckExutWusVBraQbHDxYUK2Xn4Ky9BXH3cQS7)

1. Users will interface with the MidgardLab entirely through Discord slash commands.
2. The Discord bot will communicate with the OpenStack API on the users' behalf to setup an account, register public key and provision VM.
3. The Discord bot will also setup Cloudflare DNS tunnels to allow users to SSH into the VMs provisioned.

## Usage

Run the bot with the following command:

```bash
poetry run midgard
```

## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.

## License
This project is licensed under the terms of the [MIT license](LICENSE).
optibot 0.0.2
A splinters to scripts generator
Requires Python: >=3.8

# Optibot

> Create splinters like this

```
{{ optiid("splinter1") }}

{{ optitask("model") }}
{{ optitask("train") }}
{{ optitask("classification") }}

{{ optiimport("from sklearn.ensemble import RandomForestClassifier")}}

{{ optivar("model")}}
{{ optivar("X")}}
{{ optivar("y")}}

{{ optiparam("n_estimators", "int", min=0, max=100) }}
{{ optiparam("random_state", "int", min=0, max=40000) }}

---

# Train a Lasso model with alpha=0.1
{{model}} = RandomForestClassifier(n_estimators={{n_estimators}}, random_state={{random_state}})
{{model}}.fit({{X}}, {{y}})


```

> Use them in scripts templates like this

```
import numpy as np
{{ imports() }}

# Load data from CSV file using NumPy
data = np.loadtxt("data.csv", delimiter=",")

# Split the data into features (X) and labels (y)
features = data[:, :-1]
labels = data[:, -1]

# Train a classifier
{{ splinter("train", "model.train.classification", X="features", y="labels", model="clf") }}

# Test the trained classifier
score = clf.score(features, labels)
print("Accuracy: {:.2f}%".format(score * 100))

```

> Generate random scripts with them

```
from src.optibot.core.optibot import OptiBot

bot = OptiBot()
bot.preload_splinters_from_path("./templates/splinters/*")
bot.preload_templates_from_path("./templates/scripts/*")
bot.compile()

for x in range(10):
    subject = list(bot.generate_script())

    with open(f"subject_{x + 1}.py", "w") as fp:
        fp.write(bot.render("simple.jinja", subject))

```