Skip to content

Instantly share code, notes, and snippets.

View alexanderankin's full-sized avatar

David Ankin alexanderankin

View GitHub Profile
#!/usr/bin/env python27
# 1:18 - 2:53
import pprint
pp = pprint.PrettyPrinter(indent=4)
# pp.pprint(stuff)
def pprint(stuff):
pp.pprint(stuff)
1st number:
(T(1) * floor(shleeble(0) / 5)) - (shleeble(2)) + shleeble(-1) * sheeble(floor(0))
(T(1) * floor(shleeble(0) / 5)) - (1 ) + shleeble(-1) * sheeble(floor(0))
2nd number:
(T(2) * floor(shleeble(1) / 5)) - (shleeble(3)) + shleeble(0) * sheeble(1)
(T(2) * floor(0 / 5)) - (6 ) + shleeble(0) * 0
(T(2) * 0 ) - (6 )
-6???
@alexanderankin
alexanderankin / db_utility.py
Last active November 1, 2017 17:38
database backup script
import argparse
import os
import random
import subprocess
program_name = "Database Migration Utility"
script_dir = os.path.dirname(os.path.realpath(__file__))
parser = argparse.ArgumentParser(prog=program_name)
q_help = 'Do not print output of shell commands'
@alexanderankin
alexanderankin / fwd-phone.js
Created April 25, 2018 13:26
For anything you are allowed to automate texts for. Just replace my phone number
var http = require('http');
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var MessagingResponse = require('twilio').twiml.MessagingResponse;
@alexanderankin
alexanderankin / README.md
Last active November 4, 2018 09:20
Zip Code Chloropleth

Chloropleth Maker

Update Log

  • Tue Oct 23 21:31:26 2018 +0000 First working version, basic instructions.
  • Sun Nov 4 03:11:43 2018 -0500 Correct "Full" Zip-codes into ZCTAs, restore on-click popup functionality.
  • Sun Nov 4 04:13:42 2018 -0500 Make Map expandable, give zoom option.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexanderankin
alexanderankin / Pennsylvania Electoral Map Masterlist.md
Last active February 10, 2020 03:45
Pennsylvania Electoral Map Masterlist
@alexanderankin
alexanderankin / Leaflet.js + Yarn: Getting Started.md
Last active May 11, 2019 05:54
How to get started with "frontend `import`" Leaflet project

Getting Started

  1. create-react-app my-map-project && cd my-map-project
  2. yarn add leaflet
  3. function move () { mv src/App.js src/App.js.old; }
  4. move
  5. cat <(echo "") src/App.js.old > src/App.js && move
  6. cat <(echo "import 'leaflet/dist/leaflet.css';") src/App.js.old > src/App.js && move
  7. cat <(echo "import L from 'leaflet';") src/App.js.old > src/App.js
  8. yarn start
@alexanderankin
alexanderankin / TODO.md
Last active January 11, 2019 11:17
Browse Regions for Comparison by Census Attributes between years.

should probably figure out how to detect clicks on geojson layer

should probably figure out how to center map on searched up layer from searchable select field.