Skip to content

Instantly share code, notes, and snippets.

View nicksloan's full-sized avatar

Nick Sloan nicksloan

View GitHub Profile
@nicksloan
nicksloan / _modules:boto_fk.py
Created October 9, 2015 03:33 — forked from scoates/_modules:boto_fk.py
Salt: Auto-assign public IPs in VPC subnets
# -*- coding: utf-8 -*-
'''
TODO
'''
# keep lint from choking on _get_conn and _cache_id
#pylint: disable=E0602
# Import Python libs
from __future__ import absolute_import
include:
# for backports
- apt
openssh6.6:
pkg.installed:
# backports; this number *will* change
- pkgs:
- openssh-server: 1:6.6p1-4~bpo70+1
- openssh-client: 1:6.6p1-4~bpo70+1
import random
data = list()
for i in range(10000):
data.append(random.randint(0, 2**32))
bits_set = {0: 0}
for i in range(256):
bits_set[i] = (i & 1) + bits_set[i / 2]