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
{%for item in items%} | |
{% if forloop.first or forloop.counter0|divisibleby:3 %} | |
<div class = "row"> | |
{%endif%} | |
{# We need to add a new Bootstrap row every after every third item item#} | |
<div class = "span4"> | |
<h3><a href ="">{{title}}</a></h3> | |
<span>Posted on {{created_on}} </span> | |
</div> |
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
""" | |
Summary Level Definitions | |
Defined as: | |
SUMLEV: (Geographies, Hierarchy(when avail)) | |
""" | |
SUMLEV = { | |
'010':('United States', 'United States'), | |
'020':('Region'), | |
'030':('Division'), | |
'040':('State','State'), |
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
// a simple addition function | |
function add_these(num1, num2){ | |
$result = $num1 + $num2; | |
return $result; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>Testing Pie Chart</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.1.3"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.1.3"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.1.3"></script> | |
<style type="text/css"> |
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 gettext | |
import os | |
from gettext import gettext as _ | |
gettext.textdomain('html5test') | |
from gi.repository import Gtk, WebKit # pylint: disable=E0611 | |
import logging | |
logger = logging.getLogger('html5test') | |
from html5test_lib import Window |
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
class ScruffySpider(BaseSpider): | |
name = "scruffy" | |
allowed_domains = ['constantcontact.com'] | |
start_urls = [ | |
'http://www.constantcontact.com/index.jsp' | |
] | |
domain_pattern = re.compile('constantcontact\.com') | |
mailto_pattern = re.compile('mailto\:') |
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
declare -A FIPS | |
declare -A STNAME | |
FIPS[AK]=02; STNAME[AK]=Alaska | |
FIPS[AL]=01; STNAME[AL]=Alabama | |
FIPS[AR]=05; STNAME[AR]=Arkansas | |
FIPS[AS]=60; STNAME[AS]=American Samoa | |
FIPS[AZ]=04; STNAME[AZ]=Arizona | |
FIPS[CA]=06; STNAME[CA]=California | |
FIPS[CO]=08; STNAME[CO]=Colorado | |
FIPS[CT]=09; STNAME[CT]=Connecticut |
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
Give a list like so... | |
Lets call it list.txt | |
jquery|http://code.jquery.com/jquery-1.8.3.min.js | |
modernizr|http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js | |
pydocs|http://docs.python.org/2/archives/python-2.7.3-docs-html.zip | |
djangodocs|https://www.djangoproject.com/m/docs/django-docs-1.4-en.zip | |
leaflet|http://cdn.leafletjs.com/leaflet-0.5/leaflet.js | |
leafletdocs|http://leafletjs.com/reference.html |
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
SCRIPTPATH=$(cd "$(dirname "$0")"; pwd) | |
echo SCRIPTPATH |
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
sudo add-apt-repository ppa:ubuntugis | |
sudo apt-get update | |
sudo apt-get install postgis postgresql-9.1-postgis | |
# youll need this /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql | |
# and this /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql | |
# now create a spatially enabled template db | |
The first step in creating a PostGIS database is to create a simple PostgreSQL database. |
OlderNewer