semvec/pypi-packages huggingface dataset:
haqc 1.0.3
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
pyxunlei 0.1.8
Docker版本迅雷 API Client
Requires Python: >=3.6,<4.0

# pyxunlei
基于Docker版本的[Xunlei API Client](https://github.com/cnk3x/xunlei)
## 支持版本
仅在3.7.1版本中测试通过

## 使用方法
可以使用pip安装 `pip install pyxunlei -i https://pypi.python.org/simple`
```
from pyxunlei import XunleiClient
#  初始化时支持以下参数:
#  host (str): 域名或IP
#  port (int): 端口号
#  ssl (bool): 是否启动HTTPS
#  device_name (str): 设备名称，当同一个账号下绑定了多个远程迅雷，可指定设备名称，设备名称可在迅雷APP查看
#      例如：群晖-xunlei
#      device_name为空时使用第一个设备.
#  download_root_dir(str): 下载根目录的目录名称，可以在web页面上查看，如不填写则默认选择第一个(一般是迅雷下载)
xunlei_client = XunLeiClient(
        '192.168.2.137', 2345, device_name="群晖-xunlei")

# 获取已完成任务列表
completed_tasks = xunlei_client.completed_tasks()

# 获取未完成任务列表
uncompleted_tasks = xunlei_client.uncompleted_tasks()

# 提交磁力链接
magnetic_link = "磁力链接"
sub_dir = "子目录"  # 为空时则不创建子目录
preprocess_file = xunlei_client.filter_file_by_size  # 指定预处理文件函数，可使用内置的filter_file_by_size过滤掉小于500M以及大于40G的文件
xunlei_client.download_magnetic(magnetic_link, sub_dir, preprocess_file)

# 提交种子链接
torrent_file_path = "your.torrent"  # 种子文件路径
xunlei_client.download_torrent(torrent_file_path, sub_dir, preprocess_file)

```