Skip to content

Instantly share code, notes, and snippets.

View scresante's full-sized avatar

scresante

View GitHub Profile
@scresante
scresante / transformdict.py
Created December 8, 2017 19:32
this is pretty neat
"""Transformdict: a mapping that transforms keys on lookup
This module and ``test_transformdict.py`` were extracted from a
patch contributed to Python by Antoine Pitrou implementing his
PEP 455 -- Adding a key-transforming dictionary to collections.
As of Nov. 14, 2014, the patch was not yet merged to Python 3.5
(which is in pre-alpha). The patch is ``transformdict3.patch``,
part of issue #18986: Add a case-insensitive case-preserving dict.
@scresante
scresante / gist:88486d816dd95e62f8a5
Created November 17, 2015 23:32
global gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
$ git pull origin classify
* branch classify -> FETCH_HEAD
Updating 8e66760..1255dbf
error: The following untracked working tree files would be overwritten by merge:
words
Please move or remove them before you can merge.
Aborting
$ rm words
rm: remove regular file ‘words’? y
$ git pull origin classify