Skip to content

Instantly share code, notes, and snippets.

View Fredericco72's full-sized avatar

Fred Fredericco72

View GitHub Profile
@Fredericco72
Fredericco72 / manual-token
Last active February 5, 2019 21:42
Run Jupyter
jupyter notebook --NotebookApp.token='any-string-you-like'
@Fredericco72
Fredericco72 / colors.py
Created April 28, 2021 09:01
Helper formatting functions for Python PPTX shapes
from pptx.dml.color import RGBColor
LIGHT_RED = RGBColor(252, 219, 202)
RED = RGBColor(228, 35, 18)
DARK_RED = RGBColor(160, 0, 0)
LIGHT_AMBER = RGBColor(255, 246, 217)
AMBER = RGBColor(255, 192, 0)
LIGHT_GREEN = RGBColor(225, 238, 217)
GREEN = RGBColor(0, 176, 80)
DARK_GREEN = RGBColor(116, 154, 91)
@Fredericco72
Fredericco72 / fetch-prefect-secret.py
Created February 19, 2025 11:21
How to see the value of a secret stored in a Prefect Block
"""
This requires you to first log into Prefect via `prefect cloud login` or similar
"""
from prefect.blocks.system import Secret
block = Secret.load("my-block-name")
print(block.get())