Skip to content

Instantly share code, notes, and snippets.

View howardhamilton's full-sized avatar
💭
Tap tap tap...is this mic on?

Howard Hamilton howardhamilton

💭
Tap tap tap...is this mic on?
  • Atlanta, GA, USA
View GitHub Profile
@howardhamilton
howardhamilton / commit_transfer.py
Created January 27, 2015 18:05
Transfer git commits from one branch to another (useful for rebasing)
#
# commit_transfer.py
#
# I wrote this script in order to transfer commits between branches in a less painful way. The use
# case is rebasing a working branch on its parent in order to use changes that have been pushed there.
# Yes, a rebase does preserve history, but only if you haven't already pushed the branch to a remote.
# If you have, it's best to create a fresh branch from the parent and transfer the commits there.
#
# My tasks are tracked in JIRA, so I write all of my commits with the following convention:
#
@howardhamilton
howardhamilton / trie.py
Created March 24, 2014 15:01
Create a trie data structure for storing a word dictionary
#
# trie.py
#
# create trie data structure
#
class Node(object):
"""
Node element of trie data structure.
@howardhamilton
howardhamilton / num_line.py
Created March 18, 2014 03:56
Update list of number line intervals with addition of new interval
#!/usr/bin/python
#
# run 'python num_line.py -v' to see doctest results.
# Howard Hamilton
# 17 March 2014
def number_line(L, I):
'''
Update number line intervals with addition of new interval.