This git filter cleans jupyter notebooks. Props @ahoereth .
*.ipynb filter=clearjupyteroutput
blueprint: | |
name: Send notification to open a window | |
description: >- | |
An automation sends a notification to open a specified window if a) the | |
humidity of the specified sensor exceeds the humidity threshold and b) the | |
temperature is not below the temperature threshold. | |
domain: automation | |
input: | |
window: |
def flatten(x, depth=-1): | |
"""Flattens a list of lists into a single list.""" | |
if depth == 0: | |
return x | |
if isinstance(x, list): | |
result = [] | |
for el in x: | |
if hasattr(el, '__iter__') and not isinstance(el, str): | |
result.extend(flatten(el, depth - 1)) | |
else: |
ZSH theme, further simplied from Minimal Zoo by s3ththompson.
Shows animal emoji followed by a %
sign, denoting the last return value (red for non-zero, green for zero):
🐌 %
🐚 %
🐑 %
🐁 %
#!/usr/bin/env python | |
""" | |
This script converts all *.jp2 files in a directory (IMAGE_PATH) to *.jpg files. | |
It uses IrfanView's command line tools. Specify IRFANVIEW_PATH to make it work. | |
""" | |
import logging | |
import os | |
import subprocess | |
IRFANVIEW_PATH = os.path.join('C:', r'\Program Files', 'IrfanView', 'i_view64.exe') |
I hereby claim:
To claim this, I am signing this object: