Skip to content

Instantly share code, notes, and snippets.

View dlenwell's full-sized avatar

David Lenwell dlenwell

View GitHub Profile
@dlenwell
dlenwell / heaps.py
Last active September 14, 2021 14:41
MinHeap class.. includes a print heap function that outputs a nice looking tree to the command line
"""
MinHeap object
in a min heap all children are larger than their parents
heap =
- parent node only has two children
- must be complete tree except last level
import subprocess
import re
p = subprocess.Popen(['ipmaddr'], stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
out, err = p.communicate()
prefix_to_delete = ['qv', 'qb', 'ta']
regexp = re.compile(r'^[0-9]')
$ git remote -v
origin git@github.com:dlenwell/nova.git (fetch)
origin git@github.com:dlenwell/nova.git (push)
piston git@github.com:piston/nova.git (fetch)
piston git@github.com:piston/nova.git (push)
$ cd nova/
$ git fetch piston
$ git checkout 99.99/newnewthinlvm
$ git rebase piston/99.99/master
First, rewinding head to replay your work on top of it...
Applying: new new thinlvm patch clean
$