Skip to content

Instantly share code, notes, and snippets.

@lo5
lo5 / app.py
Created July 9, 2022 00:34
A Nitro app with back button support and state handling
# ===
# About: Back button and state handling demo
# Author: Prithvi Prabhu <prithvi.prabhu@gmail.com>
# License: Apache-2.0
# Source: https://github.com/h2oai/nitro/py/examples
# Keywords: [basic, flask]
#
# Setup:
# FILE requirements.txt EOF
# flask
@lo5
lo5 / history.py
Created July 9, 2022 00:21
A Python dict with undo/redo and transaction support
from typing import List, Optional
class Operation:
def __init__(self, do, undo):
self.do = do
self.undo = undo
class BatchOperation(Operation):
@lo5
lo5 / wave_todo_list.py
Created June 9, 2022 04:32
A simple H2O Wave app that can be run directly with the Nitro CLI
# ===
# About: A canonical to-do list using H2O Wave
# Author: Prithvi Prabhu <prithvi.prabhu@gmail.com>
# License: Apache-2.0
# Source: https://github.com/h2oai/wave/py/examples
# Setup:
# RUN python -m pip install h2o-wave
# START python -m h2o_wave run wave_todo_list.py
# ===