- Think of a deletion scheme and create GMail labels accordingly (e.g. I use labels 'todelete/after1week', 'todelete/after1month' and 'todelete/after3months' here)
- set up filters in GMail to flag desired mails with these labels
- create a Google Apps Script with this script (adapt function names, labels and day offsets appropriatedly) and set up triggers as desired
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
# Build tmux session name from current directory | |
SESSION_NAME=$(pwd) | |
# Strip non-alphanumeric characters | |
SESSION_NAME=${SESSION_NAME//[^a-zA-Z0-9]/} | |
# Only keep trailing part | |
SESSION_NAME=Jupyter-${SESSION_NAME: -20} | |
# Command to run inside tmux session |
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
license: mit | |
height: 400 | |
border: no |
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
license: mit | |
height: 500 | |
border: no |
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 logging | |
import os | |
import signal | |
import time | |
log = logging.getLogger(__name__) | |
class SignalCatcher: |
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
license: mit | |
height: 800 | |
border: no |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 math | |
def zequals(x): | |
""" | |
"Zequals" ruthless rounding: just keep one leading digit. | |
examples: | |
123 -> 100 | |
4567 -> 5000 | |
-0.0345 -> -0.03 |
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
license: mit | |
border: no |