Skip to content

Instantly share code, notes, and snippets.

@numberoverzero
numberoverzero / run_scheduled.py
Last active February 16, 2020 07:58
00.async.periodic.rst
import asyncio
import functools
import json
import secrets
import aiohttp
from concurrent.futures import ALL_COMPLETED
@tovin07
tovin07 / asyncio-ping-output-3-hosts
Last active April 21, 2018 00:06
Simple python asyncio fake ping script
(ping-Qi9wEmSd) ➜ ping python ping.py
---> 0.000 s: Ping host #000
---> 0.000 s: Ping host #001
---> 0.000 s: Ping host #002
<--- 0.369 s: Pinged host #000 in 0.363 s
<--- 0.625 s: Pinged host #002 in 0.624 s
<--- 0.826 s: Pinged host #001 in 0.822 s
---> 2.006 s: Ping host #001
<--- 2.917 s: Pinged host #001 in 0.906 s
---> 3.004 s: Ping host #000