Skip to content

Instantly share code, notes, and snippets.

View RevealedSoulEven's full-sized avatar
🥸
Learning myself

Ayush Maurya RevealedSoulEven

🥸
Learning myself
View GitHub Profile
@painor
painor / FastTelethon.py
Last active May 14, 2024 05:32
This will increase the download/upload speed when using telethon
# copied from https://github.com/tulir/mautrix-telegram/blob/master/mautrix_telegram/util/parallel_file_transfer.py
# Copyright (C) 2021 Tulir Asokan
import asyncio
import hashlib
import inspect
import logging
import math
import os
from collections import defaultdict
from typing import Optional, List, AsyncGenerator, Union, Awaitable, DefaultDict, Tuple, BinaryIO