Skip to content

Instantly share code, notes, and snippets.

View tddschn's full-sized avatar
🌴
On vacation

Teddy Xinyuan Chen tddschn

🌴
On vacation
View GitHub Profile
# << a short tour of questdb-cli >>
# querying the public demo instance, print the data in psql table format
$ qdb-cli --port 443 --host https://demo.questdb.io exec --psql -q 'trades limit 20'
+----------+--------+----------+------------+-----------------------------+
| symbol | side | price | amount | timestamp |
|----------+--------+----------+------------+-----------------------------|
| ETH-USD | sell | 2615.54 | 0.00044 | 2022-03-08T18:03:57.609765Z |
| BTC-USD | sell | 39270 | 0.001 | 2022-03-08T18:03:57.710419Z |
#!/usr/bin/env python3
"""
Author: Teddy Xinyuan Chen
Date: 2020-08-17
"""
from functools import cache
from pathlib import Path
from subprocess import run
import re