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
script. | |
document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + | |
':35729/livereload.js?snipver=1"></' + 'script>') |
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
""" | |
I love using colorama to enhance my python print statements, but sometimes want it dependency free. | |
This module is an easy to copy clone of the best parts of colorama. I still use colorama most of | |
time, but on those occasions where I want no dependencies or cannot install it, I go for this. | |
""" | |
from types import SimpleNamespace | |
fore_colors = { | |
'BLACK': '\x1b[30m', |
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
body { | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
align-items: center; | |
height: 100vh; | |
background: rgb(77,31,77); | |
background: linear-gradient(153deg, rgba(77,31,77,1) 0%, rgba(255,79,245,1) 100%); | |
color: #e1e3be; | |
font-size: 3rem; |
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
/*----------------------------------------------------------------------------- | |
| Copyright (c) Jupyter Development Team. | |
| Distributed under the terms of the Modified BSD License. | |
|----------------------------------------------------------------------------*/ | |
/* | |
The following CSS variables define the main, public API for styling JupyterLab. | |
These variables should be used by all plugins wherever possible. In other | |
words, plugins should not define custom colors, sizes, etc unless absolutely | |
necessary. This enables users to change the visual theme of JupyterLab | |
by changing these variables. |
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
# full article https://waylonwalker.com/blog/creating-the-kedro-preflight-hook/ | |
from kedro.hooks import hook_impl | |
from kedro.io.core import DataSetNotFoundError | |
from colorama import Fore | |
import textwrap | |
@hook_impl | |
def before_pipeline_run(run_params, pipeline, catalog): |
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
from kedro.framework.hooks import hook_impl | |
class <hook_name>: | |
def __init__(self): | |
pass | |
@hook_impl | |
def before_pipeline_run(self, run_params, pipeline, catalog): | |
pass |
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
""" Kedro Debug Hook module """ | |
from kedro.framework.hooks import hook_impl | |
class debug_hook: | |
""" Kedro Debug Hook | |
Opens a debugger at any hook-able point of your kedro projects lifecycle. | |
debug_hook is applied by adding it to the pipeline and setting the desired | |
debug points to true. |
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
#!/bin/bash | |
# curl -s -L https://gist.githubusercontent.com/WaylonWalker/0532e9e9f41432d9a375490235286cd6/raw/4bc499518889aa9ad8ee0e410bc44f96a860f1e0/KedroBasics_startup.sh | bash | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get upgrade -yq | |
apt install zsh -y | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended | |
mkdir -p ~/starship | |
wget https://starship.rs/install.sh -O ~/starship/install.sh | |
bash ~/starship/install.sh -y |
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
import re | |
import pyperclip | |
def copy(): | |
with open('C:/Debian/rootfs/home/<user>/.easyclip') as f: | |
easyclip = f.readlines(1) | |
first = re.sub(r"^.*text': '", "", easyclip[0]) | |
last = re.sub(r"'}\n$", "", first) |
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
"""Standard Config. | |
A module to load tooling config from a users project space. | |
One day this may become a package, for now its a gist. | |
Inspired from frustrations that some tools have a tool.ini, .tool.ini, | |
setup.cfg, or pyproject.toml. Some allow for global configs, some don't. Some | |
properly follow the users home directory, others end up in a weird temp | |
directory. Windows home directory is only more confusing. Some will even | |
respect the users `$XDG_HOME` directory. |