Skip to content

Instantly share code, notes, and snippets.

View glenbot's full-sized avatar

Glen Zangirolami glenbot

View GitHub Profile
@glenbot
glenbot / start_package
Created August 19, 2014 18:59
Utility to help bootstrap python packages
#!/bin/bash
# A shell utility to help bootstrap python packages
# Author: Glen Zangirolami
# https://github.com/glenbot
set -o nounset
set -o errexit
# Check for dependencies
function check_dependencies() {
local GIT_INSTALLED=$(which git)
@glenbot
glenbot / debug.txt
Last active May 2, 2017 20:53
Debug output packer bug
2017/05/02 15:39:47 [INFO] Packer version: 1.0.0
2017/05/02 15:39:47 Packer Target OS/Arch: darwin amd64
2017/05/02 15:39:47 Built with Go Version: go1.8
2017/05/02 15:39:47 [DEBUG] Discovered plugin: amazon-chroot = <redacted>/bin/packer-builder-amazon-chroot
2017/05/02 15:39:47 [DEBUG] Discovered plugin: amazon-ebs = <redacted>/bin/packer-builder-amazon-ebs
2017/05/02 15:39:47 [DEBUG] Discovered plugin: amazon-instance = <redacted>/bin/packer-builder-amazon-instance
2017/05/02 15:39:47 [DEBUG] Discovered plugin: digitalocean = <redacted>/bin/packer-builder-digitalocean
2017/05/02 15:39:47 [DEBUG] Discovered plugin: docker = <redacted>/bin/packer-builder-docker
2017/05/02 15:39:47 [DEBUG] Discovered plugin: file = <redacted>/bin/packer-builder-file
2017/05/02 15:39:47 [DEBUG] Discovered plugin: googlecompute = <redacted>/bin/packer-builder-googlecompute
@glenbot
glenbot / ACSL2018CompressedLists.py
Created September 7, 2018 03:46
ACSL 2018 Compressed Lists Problem
#!/usr/bin/env python
"""
http://www.acsl.org/17-18/allstar/2.%20Compressed%20Lists.pdf
"""
import fileinput
from collections import Counter
def compress_list(_list, frequency, out=None):
if out is None:
@glenbot
glenbot / ACSL2018CompressedTrees.py
Created September 21, 2018 04:04
ACSL 2018 Compressed Trees Problem
#!/usr/bin/env python
import fileinput
from collections import Counter
def compress_list(_list, tree=None):
"""Compress the list"""
if tree is None:
tree = []