Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomas-quix/8f4b3aee00c0a425eaac2bd9a83ec26d to your computer and use it in GitHub Desktop.
Save tomas-quix/8f4b3aee00c0a425eaac2bd9a83ec26d to your computer and use it in GitHub Desktop.
OSS Announcement
# Callback triggered for each new data frame
def on_parameter_data_handler(df: pd.DataFrame):
# If the braking force applied is more than 50%, we mark HardBraking with True
df["HardBraking"] = df.apply(lambda row: "True" if row.Brake > 0.5 else "False", axis=1)
stream_producer.timeseries.publish(df) # Send data back to the stream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment