Skip to content

Instantly share code, notes, and snippets.

@hellovertex
hellovertex / __indicators.py
Last active April 26, 2023 15:14
Faust App that redirects websocket traffic via Kafka broker + fin indicators
import pandas as pd
import numpy as np
# acronyms will be changed to lowercase for get-method calls in order to conform with pep-style
indicators = [
'ABANDS', # Acceleration Bands
'AD', # Accumulation/Distribution
'ADX', # Average Directional Movement
'AMA', # Adaptive Moving Average
'APO', # Absolute Price Oscillator
'AR', # Aroon
import pandas as pd
import numpy as np
# acronyms will be changed to lowercase for get-method calls in order to conform with pep-style
indicators = [
'ABANDS', # Acceleration Bands
'AD', # Accumulation/Distribution
'ADX', # Average Directional Movement
'AMA', # Adaptive Moving Average
'APO', # Absolute Price Oscillator
'AR', # Aroon
@hellovertex
hellovertex / consumer_db.py
Created April 26, 2021 15:00
Faust App that redirects websocket traffic via Kafka topic
"""
1. Launch Kafka:
- $KAFKA_HOME/bin/zookeeper-server-start.sh $KAFKA_HOME/config/zookeeper.properties
- $KAFKA_HOME/bin/kafka-server-start.sh $KAFKA_HOME/config/server.properties
run via faust -A <filename> worker -l info
2. Faust library:
faust.App.agent: - main processing actor in Faust App
"""