Skip to content

Instantly share code, notes, and snippets.

@rdrey
rdrey / fix_dict_methods.py
Created May 7, 2020 13:00
Python lib2to3/libfuturize fixer for dict methods
"""Fixer for some dict methods.
Imports these compat methods from `future.utils`
d.iterkeys() -> iterkeys(d)
d.iteritems() -> iteritems(d)
d.itervalues() -> itervalues(d)
d.viewkeys() -> viewkeys(d)
d.viewitems() -> viewitems(d)

Keybase proof

I hereby claim:

  • I am rdrey on github.
  • I am rdrey (https://keybase.io/rdrey) on keybase.
  • I have a public key ASC4xpoDI5_5jisQcCuwISntRgGxDnnW6V_6RaIMllpGRwo

To claim this, I am signing this object:

@rdrey
rdrey / postgresql-debugger-install-ubuntu
Last active May 21, 2021 09:51 — forked from jhngrant/postgresql-debugger-install-ubuntu
Installing the PL/pgSQL Debugger Extension (pldbgapi) for pgAdmin III on PostgreSQL 9.4 and Ubuntu 14.10
# PostgreSQL can be on a remote server but you'll need root privileges in Linux and superuser in PostgreSQL.
# First install build tools
sudo su
# you can also use apt
aptitude install build-essential
aptitude install postgresql-server-dev-9.4
aptitude install libkrb5-dev # I had a dependency on kerberos, you might not