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
" Next and Last {{{ | |
" Motion for "next/last object". "Last" here means "previous", not "final". | |
" Unfortunately the "p" motion was already taken for paragraphs. | |
" | |
" Next acts on the next object of the given type in the current line, last acts | |
" on the previous object of the given type in the current line. | |
" | |
" Currently only works for (, [, {, b, r, B, ', and ". | |
" |
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
#!/usr/bin/env python | |
""" | |
enable_offline.py - symlink files in your PIP_DOWNLOAD_CACHE so that | |
``pip install --find-links`` picks them up. | |
Inspired by http://tartley.com/?p=1423 | |
Usage | |
----- |
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
# https://twitter.com/hynek/status/1076048147074478080 | |
from boltons.iterutils import remap | |
DATA = {"a": {"b": 1, "c": {"d": 2}}} | |
OUT = ["a.b", "a.c.d"] | |
def get_leaf_paths(root, with_val=False): |