Skip to content

Instantly share code, notes, and snippets.

@mengyyy
mengyyy / aria2_async_jsonrpc.py
Last active February 14, 2020 12:40
aria2 rpc with aiohttp
import asyncio
import base64
import os
import aiohttp
import stackprinter
from loguru import logger
DEFAULT_KEYS = (
# "bitfield",

Keybase proof

I hereby claim:

  • I am mengyyy on github.
  • I am mengyyy (https://keybase.io/mengyyy) on keybase.
  • I have a public key ASA1i1bRkYbPnJeMmLbt4VZC2x58LBS_sxh8DFdl2GXjfAo

To claim this, I am signing this object:

@mengyyy
mengyyy / main.py
Last active March 13, 2017 07:56 — forked from leandrotoledo/main.py
Webhook using self-signed certificate and Flask (with python-telegram-bot library)
#!/usr/bin/env python
'''Using Webhook and self-signed certificate'''
# This file is an annotated example of a webhook based bot for
# telegram. It does not do anything useful, other than provide a quick
# template for whipping up a testbot. Basically, fill in the CONFIG
# section and run it.
# Dependencies (use pip to install them):
# - python-telegram-bot: https://github.com/leandrotoledo/python-telegram-bot