semvec/pypi-packages huggingface dataset:
HAQC 0.1.0
A Heuristic Algorithm Framework for Quantum Algorithms
Requires Python: >=3.8,<4.0

# HAQC -- Heuristic Algorithms for Quantum Computing Research Group

![build](https://github.com/vivekkatial/HAQC/actions/workflows/build-container-and-release.yml/badge.svg)

Research group to run optimisation algorithms on Quantum Computers at the University of Melbourne 

## Getting Started

Before getting started, ensure you have Python 3.7+. We use [poetry](https://python-poetry.org/) to manage the python environment (the .gitignore file should already ignore it).

```{shell}
$ poetry install
```

To add a package to your new project:

```{shell}
$ poetry install <package>
```

This will automatically edit your `pyproject.toml` file with the new package you provided.

Next, activate the `poetry` shell:

```{shell}
$ poetry shell
$ python --version
```

This will spawn a new shell subprocess, which can be deactivated by using exit.

## Contributing

### Testing 

For testing, we use `pytest`. To run the tests, just type the command `pytest`, or you can specify a file e.g. `pytest tests/test_graph_generator.py`.

We will use `black` as our code formatter. Simply run `black -S .` to run black over all the files before committing. The `-S` is to skip string normalisation, because we prefer single quotes/don't really care ([flame war, I know](https://github.com/psf/black/issues/118)).

### Before making a PR

In summary, before merging a PR, you should:

```bash
# Make sure all tests pass
cd src
pipenv run python -m pytest tests/*

# Format with black
pipenv run python -m black -S .
```

## MLFlow Tracking

To get the MLFlow tracking functionality to work you will need to setup `awscli` credentials, so MLFlow can properly log artifacts.

If you're keen to do this then please follow the instructions [here](https://wiki-rcs.unimelb.edu.au/display/RCS/AWS+CLI)

You can request the credentials for this experiment from Vivek at vkatial@student.unimelb.edu.au

## Running a test instance

To run a test instance try out the steps below:

```bash
python qaoa_vrp/main.py -f test -T False # -T tracking for MLFlow
```

### Jupyter Notebooks

First ensure that your Python is _not_ aliased in your `.bashrc` or `.zshrc` file.

After this launch your `poetry` by

```{shell}
poetry shell
```

Then do:

```{shell}
python -m ipykernel install --user --name=ENV_NAME
```

Then launch the notebook

```{shell}
jupyter notebook
```

In your notebook, Kernel -> Change Kernel. Your kernel should now be an option.

<img src='images/jupyter-install.png'/>

## Singularity

This project leverages [Singularity](https://github.com/singularityhub/) to ensure the code is reproducible and manage dependencies. 

You can find the recipe for our container in `SingularityFile.def`. There are various apps for each different type of experiment we run,


## CI/CD 

We use Github Actions for CI/CD. Everytime a PR is created, a test build of the singularity container runs. When merging into `main` we do a release of the container.

## Authors
- Vivek Katial
httpxfetch 0.0.2
httpxfetch is a Python wrapper for the JavaScript fetch function, designed to streamline the process of reverse engineering APIs.
Requires Python: >=3.6
Keywords: fetch,httpx,reverse engineering,JavaScript

# httpxfetch

![GitHub](https://img.shields.io/github/license/AdaiasMagdiel/httpxfetch)
![PyPI](https://img.shields.io/pypi/v/httpxfetch)

`httpxfetch` is a Python wrapper for the JavaScript `fetch` function, designed to streamline the process of reverse engineering APIs. The primary goal of this project is to simplify testing and data inspection by allowing users to copy the `fetch` requests generated by browser developer tools, paste them into their Python code, and execute them seamlessly.

## Installation

You can install `httpxfetch` using pip:

```bash
pip install httpxfetch
```

## Quick Start

```python
from httpxfetch import fetch

# Example: Making a GET request
response = fetch('https://api.example.com/data')
print(response.status_code)
print(response.json())
```

## Features

- **Simplified Testing:** Copy and paste `fetch` requests from browser developer tools into your Python code for easy testing and data exploration.

- **Wrapper for HTTPX:** Utilizes the powerful `httpx` library to perform HTTP requests in Python.

- **JSON Handling:** Automatically converts the request body to a JSON string using the `JSON.stringify` equivalent function.

## Usage

```python
from fetch_to_httpx import fetch, JSON

# Example: Making a POST request with JSON payload
url = 'https://api.example.com/data'
options = {
    'method': 'post',
    'headers': {'Content-Type': 'application/json'},
    'body': JSON.stringify({'key': 'value'}),
}

response = fetch(url, options)
print(response.status_code)
print(response.json())
```

## Return Type

The `fetch` function returns an instance of the `httpx.Response` class. All methods available in the `httpx.Response` class can be applied to the result of the `fetch` function.

## Disclaimer

The project intentionally includes some redundant steps, such as converting the `fetch` body to a string before loading it as a dictionary. This is done to minimize the effort required, providing a convenient function to simulate `JSON.stringify` for ease of use.

## Contributing

Contributions are welcome! Feel free to open issues, submit pull requests, or provide suggestions to improve the project.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
backtracker 0.0.7
Backtracking Python package
Keywords: python,backtracker

# BackTracker Class
The BackTracker class is a Python implementation of the backtracking algorithm, designed for solving problems where a sequence of decisions leads to a solution. This generic framework can be adapted to various problems, such as puzzles, crosswords, combinatorial problems, etc.

This is based on [Steven Skiena](https://www3.cs.stonybrook.edu/~algorith/video-lectures/2007/lecture15.pdf).

GitHub Page: https://github.com/ryan-najafi/backtracker


## Features
Generic backtracking implementation.
Customizable for a wide range of problems.
Allows defining problem-specific solution processing, candidate generation, and move making/unmaking.

## Installation
pip install backtracker==0.0.7

## Usage
To use the BackTracker class, you need to define functions for:

Checking if a current state is a solution (is_solution).
Processing a complete solution (process_solution).
Generating candidate moves (get_candidates).
Making a move (make_move).
Unmaking a move (unmake_move).

Here's an example demonstrating how to use the BackTracker class to generate combinations of elements:

```
from backtracker import backtracker as bt

from backtracker import BackTracker

a = []
level = 0

def is_solution(a, k, input):
    return len(a) == len(input)

def process_solution(a, k, input):
    result = []
    for i, item in enumerate(a):
        if item:
            result.append(input[i])
    return ''.join(result)

def get_candidates(a, k, input):
    return [False, True]

def make_move(a, k, input, c):
    a.append(c)

def unmake_move(a, k, input, c):
    a.pop()

input = list('abc')
back_tracker = BackTracker(a=a, level=0, input=input, 
                           is_solution=is_solution, 
                           process_solution=process_solution, 
                           get_candidates=get_candidates, 
                           make_move=make_move, 
                           unmake_move=unmake_move)

for sol in back_tracker.get_next_solution():
    print(sol)
  
```


In this example, the BackTracker class is used to generate all combinations of the elements in the list 'abc'. The is_solution, process_solution, get_candidates, make_move, and unmake_move functions are defined to suit this specific problem.

## Contributing
Contributions to enhance BackTracker are welcome. Please adhere to the standard Python coding guidelines.

## License
This project is open-source and available under the MIT License.
junoplatform 1.4.5
juno AI platform lib
Requires Python: >=3.10

# junoplatform

## Description

This is a library providing service runtime and package management cli

## Quick Start

### install

```bash
pip install junoplatform
```

#### junocli 
##### login first before every other subcommands
```bash
junocli login <-u your_op_user> <-p your_op_password> <api>
```

##### create a project
```bash
junocli create <my_algo_project> <PLANT> <MODULE>
```

##### test run
```bash
junocli run
```

##### package

```
junocli package <plant_name> <ALGO_MODULE_NAME>
```

#### upload, deploy, list & status
sokconfig 1.0.0
A simple config parser for python
Requires Python: >=3.10,<4.0

# sokconfig

Just a simple util for my personal use.
This aims to make it easier to load settings.

## Example

```python
import ast

from sokconfig.settings import Settings
from sokconfig.values import IntValue, ListValue


class Config(Settings):
    a = IntValue(5, min_value=0, max_value=10, post_mutator=lambda x: x + 1)
    b = IntValue(2, min_value=0, max_value=10, extra_validator=lambda x: x % 2 == 0, name="TestValueB")
    c = IntValue(None, pre_mutator=int)
    d = ListValue(None, pre_mutator=ast.literal_eval)
    e = ListValue([], element_type=int)


Config.fill_empty_names()

t = {"a": 1, "TestValueB": 4, "c": "3", "d": "[1,2,3]"}
print(Config.get_values())
Config.set_values(t)
Config.e.append(4)
Config.validate_values()
print(Config.get_values())
```

```
{'a': IntValue(value=6, min_value=0, max_value=10), 'b': IntValue(value=2, min_value=0, max_value=10), 'c': IntValue(value=None, min_value=None, max_value=None), 'd': ListValue(value=None), 'e': ListValue(value=[])}
{'a': IntValue(value=2, min_value=0, max_value=10), 'b': IntValue(value=4, min_value=0, max_value=10), 'c': IntValue(value=3, min_value=None, max_value=None), 'd': ListValue(value=[1, 2, 3]), 'e': ListValue(value=[4])}
```