Discord Bot that leverages the idea of nested containers using podman, runs untrusted user input, executes Quantum Circuits, allows users to refer to the Qiskit Documentation, and provides the ability to search questions on the Quantum Computing StackExchange.

Overview

QiskitBot

A discord bot that allows you to execute Quantum Circuits, look up the IBMQ Qiskit's Documentation, and search questions on the Quantum Computing StackExchange


๐Ÿ’• Qiskit Community

This project is not affiliated with IBM in any way. But I would like to thank Brian Ingmanson (Education Community Manager at IBM) for being so encouraging and supportive towards this little project!

Installation

Using docker-compose:

docker-compose up --build 

Manually from the Dockerfile

docker build -t qiskitbot . 
docker run --privileged -i -t qiskitbot 

On MacOs with deploy.sh

zsh deploy.sh

Disclaimer

Builds might fail on your machine. This is still under testing and there is a lot that needs to be fixed with the way the code is structured. Once everything is smooth, I will add docstrings and comments wherever neccessary. This was just a hobby project, but I do plan on extending it further.

Architecture of the sandbox (running untrusted code)

Goal

Spawn a container per user inside a container launched by docker, providing an isolated environment to run untrusted code. Save the state of the user using CRIU (checkpoint and restore).

Checkpointing and restoring is easy with Podman:

podman container checkpoint 
podman container restore 

As of now this feature is unimplemented, but methods for checkpoint and restore are available in cogs/circuit.py

Nested Containers

One of the main objectives of this project was to experiment with the idea of having containers inside of containers. Instead of mounting the unix socket and the spawning containers (the tradional way):

docker run -v /var/run/docker.sock:/var/run/docker.sock ...

I used podman inside of docker, which is a daemonless container engine used for developing, managing, and running OCI Containers. Podman is used with tools like Buildah and Skopeo, which not only makes managing images and containers easy but in my opinion much more powerful than docker!

Initial Idea - Using NsJail With Podman

To use podman inside a container launched by docker with nsjail you need to use the --privileged flag while running your container. Running a container without this flag works just fine, but the problem arises, when using this flag, as the capabilities of podman and docker don't match. This means you can't run privileged podman containers inside of a docker container as required by NsJail. "CAP_PERFMON","CAP_BPF", "CAP_CHECKPOINT_RESTORE" are not supported by docker. See issue #10282 on containers/podman Eventually after a lot of experimentation, I dropped this idea. (refer to the Dockerfile in the root directory)

Usage

<@Qiskit>asciicircuit \`\`\`  \`\`\`

<@Qiskit>mplcircuit \`\`\`  \`\`\`

<@Qiskit>docs  

<@Qiskit>mplplot  \`\`\`  \`\`\`

<@Qiskit>query 

Owner
Mehul
Mehul
A Powerful Telethon Based Telegram Spam Bot.

Yukki Multi Spam Bot ๐Ÿš€ Deploy on Heroku You can Use these API ID and API HASH while deploying String Session No Requirement of API ID and API HASH Ge

46 Dec 23, 2022
Script to post multiple status(posts) on twitter

Script to post multiple status on twitter (i.e. TWITTER STORM) This program can post upto maximum limit of twitter(around 300 tweets) within seconds.

Sandeep Kumar 4 Sep 09, 2021
Bendford analysis of Ethereum transaction

Bendford analysis of Ethereum transaction The python script script.py extract from already downloaded archive file the ethereum transaction. The value

sleepy ramen 2 Dec 18, 2021
A Python Script to automate searching of available vaccination centers in the city and hence booking

Cowin Vaccine Availability Notifier Cowin Vaccine Availability Notifier takes your City or PIN code as an input and automatically notifies you via ema

Jayesh Padhiar 7 Sep 05, 2021
๐Ÿ‘พ Telegram Smart Group Assistant ๐Ÿค–

DarkHelper ๐ŸŒ– Features โšก๏ธ Smart anti-apam & anti-NFSW message checker Tag Members , Entertain facility , Welcommer ban , unban , mute , unmute , lock

amirali rajabi 38 Dec 18, 2022
Simple discord token generator good for memberboosting your server! Uses Hcaptcha bypass

discord-tokens-generator INFO This is a Simple Discord Token Generator which creates unverified discord accounts These accounts are good for member bo

Avenger 41 Dec 20, 2022
A telegram bot help you to get stylish fonts and text

Stylish Font Bot ๐Ÿฟ This is a telegram bot help you to get stylish fonts and text. Config Vars ๐Ÿค– API_HASH: Get this value from my.telegram.org. API_K

MSTL updates 1 Nov 08, 2021
๐Ÿš€๐Ÿ”ฅไฝฟ็”จPython่ฟžๆŽฅ้˜ฟ้‡Œไบ‘็›˜, ๅฎž็Žฐไบ†ๅฎ˜ๆ–นๅคง้ƒจๅˆ†ๅŠŸ่ƒฝ ๐Ÿ‘๐Ÿ‘

aligo ๐Ÿš€ ๐Ÿ”ฅ ไฝฟ็”จPython่ฟžๆŽฅ้˜ฟ้‡Œไบ‘็›˜, ๅฎž็Žฐไบ†ๅฎ˜ๆ–นๅคง้ƒจๅˆ†ๅŠŸ่ƒฝ ๐Ÿ‘ ๐Ÿ‘ ไธบไบ†ๅฎŒๅ–„ไปฃ็ ๆ็คบ, ๆ–นไพฟๅคงๅฎถไปฃ็ ไนฆๅ†™, aligo ๅผ•ๅ…ฅไบ†ไธ€ไบ› python 3.8 ็š„ๆ–ฐ็‰นๆ€ง, ๆ‰€ไปฅ่ฆๆฑ‚ python = 3.8.* pip install aligo ๆˆ– pip install ali

455 Jan 08, 2023
๐Ÿ’– Telegram - Telethon - UserBot ๐Ÿ’–

ใ€Žแญ™๊ช–แฅ…ฦบแบžรธโ€ ใ€ ๐Ÿ‡ฎ๐Ÿ‡ณ โšก แญ™๊ช–แฅ…ฦบBot Is One Of The Fastest & Smoothest Bot On Telegram Based on Telethon โšก Status Of Bot Telegram ๐Ÿช YouTube ๐Ÿ“บ Dั”ฯโ„“ฮฟฮณ ฯ„ฮฟ ะฝั”ัฮฟฮบฯ… D

Team WarZ 1 Mar 28, 2022
Wrapper for Between - ๋น„ํŠธ์œˆ์„ ์œ„ํ•œ ํŒŒ์ด์ฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ

PyBetween Wrapper for Between - ๋น„ํŠธ์œˆ์„ ์œ„ํ•œ ํŒŒ์ด์ฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ Legal Disclaimer ์˜ค์ง ๊ต์œก์  ๋ชฉ์ ์œผ๋กœ๋งŒ ์‚ฌ์šฉํ• ์ˆ˜ ์žˆ์œผ๋ฉฐ, ๋น„ํŠธ์œˆ์€ VCNC์˜ ์ž์‚ฐ์ž…๋‹ˆ๋‹ค. ์•…์˜์  ๊ณต๊ฒฉ์— ์ด์šฉํ• ์‹œ ์ฒ˜๋ฒŒ ๋ฐ›์„์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์‚ฌ์šฉ์— ๋”ฐ๋ฅธ ์ฑ…์ž„์€ ์‚ฌ์šฉ์ž๊ฐ€

1 Mar 15, 2022
Updater for PGCG (Paradox Game Converters Group) converters written in Python.

Updater Updater for PGCG (Paradox Game Converters Group) converters written in Python. Needs to be put inside an "Updater" directory in the root conve

Paradox Game Converters 2 Jan 10, 2022
Discord bot for the IOTA Wiki

IOTA Wiki Bot Discord bot for the IOTA Wiki Report Bug ยท Request Feature About The Project This is a Discord bot for the IOTA Wiki. It's currently use

IOTA Community 2 Nov 14, 2021
Shred your reddit comment and post history

trasheddit Shred your reddit comment and post history (x89/Shreddit replacement) Usage Simple Example Download trasheddit: git clone https://github.co

Elly 2 Jan 05, 2022
Balanced API library in python.

Balanced Online Marketplace Payments v1.x requires Balanced API 1.1. Use v0.x for Balanced API 1.0. Installation pip install balanced Usage View Bala

Balanced 70 Oct 04, 2022
Twitch Points Miner for multiple accounts with Discord logging

Twitch Points Miner for multiple accounts with Discord logging Creator of the Twitch Miner -- PLEASE NOTE THIS IS PROBABLY BANNABLE -- Made on python

8 Apr 27, 2022
A telegram bot written in Python to fetch random SFW & NSFW anime images

Tsuzumi A telegram bot written in python to fetch both random SFW & NSFW Anime images using nekos.life & waifu.pics API Commands SFW Commands : /

Nisarga Adhikary 3 Oct 12, 2022
A Python library wrapping the iFixit (Dozuki) API.

A Python library wrapping the iFixit API. Status Working, but incomplete. Fully tested and documented. Hacking I highly recommend using virtualenv: [$

James Pearson Hughes 13 May 24, 2021
Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API.

Tg_PHub_Bot Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API. OS Support All linu

TheProgrammerCat 13 Oct 21, 2022
A Telegram Bot to prevent Night Spams

NightModeBot A Telegram Bot to lock group in night to prevent night spam Setps To Use - Put Variables Correctly. - Add Bot to your group and make admi

ReeshuXD 10 Oct 21, 2022