This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""A simple script to generate ADF + HTML code for a pretty e-mail report in case of an activity failure. | |
Every e-mail + fail activity has to be separate. Per each pair of activities, uncomment one line in the | |
ACTIVITIES constant to generate an increasingly populated report. | |
E-mail subject should be: | |
@concat('The pipeline ', pipeline().pipelineName, ' has failed.') | |
""" | |
import html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# /// script | |
# dependencies = [ | |
# "extra-streamlit-components", | |
# "firebase-admin", | |
# "requests", | |
# "streamlit", | |
# "pyJWT", | |
# "email-validator", | |
# ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Time functions using a decorator.""" | |
import time | |
from collections.abc import Callable | |
from functools import wraps | |
def time_function[**P, R](func: Callable[[P], R]) -> Callable[[P], R]: | |
""" | |
Time functions using a decorator. |