This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from colorsys import hsv_to_rgb | |
import json | |
import logging | |
log = logging.getLogger('electioncenter.lib.kml') | |
import struct | |
from django.contrib.gis.geos import GEOSGeometry | |
def hsv_to_kml_hex(h, s, v): | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################### | |
# Getting started # | |
################### | |
# Setup a workspace | |
mkdir va_benefits | |
cd va_benefits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/TileMill/bin/carto map.mml > map.xml | |
python render_tiles.py map.xml .tiles/ 42.05 -88 41.6 -87.5 11 16 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import cookielib | |
import json | |
import re | |
import random | |
import unittest | |
import requests | |
from wordpress_xmlrpc import Client, WordPressComment, WordPressPost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if($_POST['varnish_hidden'] == 'Y') { | |
//Process form data | |
$varnish_server1 = (!isset($_POST['varnish_server1'])? '': $_POST['varnish_server1']); | |
update_site_option('varnish_server1', $varnish_server1); | |
$varnish_server2 = (!isset($_POST['varnish_server2'])? '': $_POST['varnish_server2']); | |
update_site_option('varnish_server2', $varnish_server2); | |
$varnish_server3 = (!isset($_POST['varnish_server3'])? '': $_POST['varnish_server3']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
backend app1 { | |
.host = "127.0.0.1"; | |
.port = "8000"; | |
} | |
acl purge { | |
"127.0.0.1"; | |
"::1"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
from fabric.api import * | |
import yaml | |
""" | |
Base configuration | |
""" | |
# Ubuntu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
column | start | length | |
---|---|---|---|
survey_prefix | 0 | 3 | |
area_code | 3 | 5 | |
datatype_code | 8 | 1 | |
size_code | 9 | 1 | |
ownership_code | 10 | 1 | |
naics_industry_code | 11 | 6 | |
year | 17 | 4 | |
aggregation_level | 21 | 2 | |
first_quarter_status_code | 23 | 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APT::Periodic::Enable "1"; | |
APT::Periodic::Update-Package-Lists "1"; | |
APT::Periodic::Download-Upgradeable-Packages "1"; | |
APT::Periodic::AutocleanInterval "5"; | |
APT::Periodic::Unattended-Upgrade "1"; | |
APT::Periodic::RandomSleep "1800"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First order approximation of this image's actual slice size using pixel counts: | |
https://motherjones.com/files/images/komen_expenses_300px.jpg | |
Graphic had numbers painted out and text cropped before processing with stupid.py. | |
Pixel counts, l to r: | |
(255, 162, 194, 255) 1602 | |
(177, 178, 180, 255) 392 |