Skip to content

Instantly share code, notes, and snippets.

View kingtroga's full-sized avatar
🎯
Focusing

Tari Yekorogha kingtroga

🎯
Focusing
View GitHub Profile
import falkordb
from redis.exceptions import ResponseError
client = falkordb.FalkorDB(host="localhost", port=6379)
g = client.select_graph("graphrag")
g.query("""
MERGE (src:Source {sourceId: 'src1'}) SET src.url = 'http://example.com'
MERGE (c:Chunk {chunkId: 'chunk1'}) SET c.text = 'some chunk text'
MERGE (t:Topic {value: 'AI'})
| Column | Aggregation | Meaning |
|----------------|-----------------|----------------------------------------------------------------------------------------------------------|
| `open` | `'first'` | Takes the **first price** in the interval - the opening price of the candle. |
| `high` | `'max'` | Takes the **maximum price** in the interval - the highest price reached. |
| `low` | `'min'` | Takes the **minimum price** in the interval - the lowest price reached. |
| `close` | `'last'` | Takes the **last price** in the interval - the closing price of the candle. |
| `volume` | `'sum'` | Sums all volumes in the interval - the total traded volume during that period. |
Letter Meaning Example
B Business day '1B' → 1 business day
C Custom business day '1C' → 1 custom business day
D Calendar day '1D' → 1 day
W Week '1W' → 1 week (ends on Sunday by default)
M Month end '1M' → last calendar day of the month
SM Semi-month end '1SM' → 15th & end of month
BM Business month end '1BM' → last business day of the month
CBM Custom business month end '1CBM'