Skip to content

Instantly share code, notes, and snippets.

Eric Rouleau xblitz

Block or report user

Report or block xblitz

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

Keybase proof

I hereby claim:

  • I am xblitz on github.
  • I am erouleau ( on keybase.
  • I have a public key ASBw0uRyluT1pnAfn7OqviYAF6ltjFkG0vpObw2-UlTZwwo

To claim this, I am signing this object:

xblitz /
Created Apr 7, 2017
psycopg2 DateRange functions to determine overlapping range and number of days
def daterange_overlap(range1, range2):
"""returns the overlapping DateRange of 2 DateRanges, DateRange(None, None) if no overlap"""
lower = max([range1.lower or, range2.lower or])
upper = min([range1.upper or, range2.upper or])
return DateRange(None if lower == else lower, None if upper == else upper)
def daterange_days(date_range):
return (date_range.upper - date_range.lower).days
xblitz / address_autocomplete.html
Created Mar 10, 2015
Simple Google maps Address/Places autocomplete
View address_autocomplete.html
<!DOCTYPE html>
<title>Place Autocomplete Address Form</title>
<link type="text/css" rel="stylesheet" href=",400,500">
<script src=""></script>
var placeSearch, autocomplete;
var componentForm = {
You can’t perform that action at this time.