Skip to content

Instantly share code, notes, and snippets.

@bmaggard
bmaggard / literal_string.py
Created February 12, 2023 00:40 — forked from paulkernstock/literal_string.py
Literal block scalars with PyYAML's dump
import yaml
from yaml.representer import SafeRepresenter
class LiteralString(str):
pass
def change_style(style, representer):
def new_representer(dumper, data):
scalar = representer(dumper, data)
@bmaggard
bmaggard / get lastrowid with petl.ipynb
Last active May 29, 2021 19:32
getting lastrowid when executing todb()
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am bmaggard on github.
  • I am maggardb (https://keybase.io/maggardb) on keybase.
  • I have a public key ASANJPFD17fy3bJKrfnDhby3ZvrFZcTk7Rsz8KM9dX0V_go

To claim this, I am signing this object: