- 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
$ sdiff -t tile0000-remake.tiff.txt tile0000-remake-stitch.tiff.txt | |
Driver: GTiff/GeoTIFF Driver: GTiff/GeoTIFF | |
Files: tile0000-remake.tiff | Files: tile0000-remake-stitch.tiff | |
Size is 1827, 1024 | Size is 1827, 880 | |
Coordinate System is: Coordinate System is: | |
PROJCRS["WGS 84 / UTM zone 31N", PROJCRS["WGS 84 / UTM zone 31N", | |
BASEGEOGCRS["WGS 84", BASEGEOGCRS["WGS 84", | |
DATUM["World Geodetic System 1984", DATUM["World Geodetic System 1984", | |
ELLIPSOID["WGS 84",6378137,298.257223563, ELLIPSOID["WGS 84",6378137,298.257223563, | |
LENGTHUNIT["metre",1]]], LENGTHUNIT["metre",1]]], |
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 |
jq is a command line tool to process JSON documents with loads of features.
If you just want quick (re-)indentation, use one of these Python powered poor man's alternatives:
python -c "import json,sys;json.dump(json.load(sys.stdin),sys.stdout,indent=2)" < data.json
python -c "import json,sys,pprint;pprint.pprint(json.load(sys.stdin))" < data.json
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 typing import Union | |
class IgnoreOrder: | |
""" | |
pytest helper to test equality of lists/tuples ignoring item order | |
E.g., these asserts pass: | |
>>> assert [1, 2, 3, 3] == IgnoreOrder([3, 1, 2, 3]) | |
>>> assert {"foo": [1, 2, 3]} == {"foo": IgnoreOrder([3, 2, 1])} |
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
class dict_item: | |
""" | |
Create an attribute in a custom dict subclass that accesses | |
the dict value keyed by the attribute's name: | |
>>> class UserInfo(dict): | |
>>> name = dict_item() | |
>>> age = dict_item() | |
>>> user = UserInfo(name="John") | |
>>> print(user.name) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.