Skip to content

Instantly share code, notes, and snippets.

Andrew W. Hill andrewxhill

Block or report user

Report or block andrewxhill

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
andrewxhill /
Last active May 16, 2018
quick example of using the batch api over python
import sys
import urllib
import urllib2
import json
import requests
# Start a new batch SQL task
def cartoBatchQuery(username, api_key, sql):
r ='' %(username,api_key),

Keybase proof

I hereby claim:

  • I am andrewxhill on github.
  • I am andrewxhill ( on keybase.
  • I have a public key ASCQCpQbOhKgXK6xK9-Xo-2vx_oQgf9v6vW7q6S_ry6FFgo

To claim this, I am signing this object:

andrewxhill / AXH_Vector_Sum.sql
Created Jan 23, 2012
Sum PostgreSQL arrays in place [1,2,3] + [2,3,4] = [3,5,7]
View AXH_Vector_Sum.sql
sfunc = AXH_Vector_Sum,
basetype = int[],
stype = int[],
initcond = '{0}'
DROP FUNCTION IF EXISTS AXH_Vector_Sum(int[], int[]);
RETURNS int[] AS $$
andrewxhill / last_hour.css
Last active Jan 5, 2018
Raincloud CartoCSS
View last_hour.css
/** raincloud visualization */
@markerw: 2;
marker-fill: #0C2C84;
marker-width: 20;
marker-line-color: #FFF;
marker-line-width: 0;
marker-line-opacity: 0;
marker-opacity: 0.3;
View index.html
<!DOCTYPE html>
<title>Animals | CartoDB.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="" />
html, body, #map {
height: 100%;
View beforeMorningCommute.swift
let beforeCommute = SetSDK.Context(
notificationTiming: .upon,
eventAction: .exit,
eventState: .place(type: .home),
timeOfDay: .morning
View subscribeContext.swift
SetSDK.register(context: beforeCommute) { event as
// Send new information or an opportunity that will be valuable
let content = UNMutableNotificationContent()
content.title = "Weather Alert!"
// ...
andrewxhill /
Last active Apr 28, 2017
Steps used to make map of California rivers
View getDestination.swift
class RideFinderViewController: UIViewController {
override func viewDidAppear(_ animated: Bool) {
// this view indicates an intent to go someplace
// Get the user's likely destinations using the SetSDK
// For custom control of starting location, see:
You can’t perform that action at this time.