-
Open terminal: Look for terminal in the menu
-
Check the date
date
- Create a folder called 'code'
| # easy_install fabric | |
| # | |
| # Usage: | |
| # fab geonode | |
| from fabric.api import env, sudo, run, cd | |
| def setup(): | |
| sudo('apt-get -y update') | |
| sudo('apt-get -y dist-upgrade') | |
| sudo('add-apt-repository "deb http://archive.canonical.com/ lucid partner"') |
| # easy_install boto | |
| # You will also need: | |
| # - A .pem keyfile generated using the Amazon web interface to create new instances | |
| # - The secret and access keys created from the | |
| # The only pre-reqs are having created a keypair (.pem file) | |
| # via the amazon web interface and knowing the AWS key and secret | |
| # | |
| # Usage: | |
| # export AWS_ACCESS_KEY_ID='blahblah' | |
| # export AWS_SECRET_ACCESS_KEY='blebleble' |
| import os | |
| import datetime | |
| from collections import defaultdict | |
| from operator import itemgetter | |
| from pprint import pprint as pp | |
| from git import Repo | |
| from unidecode import unidecode |
| import os | |
| import geonode | |
| DEBUG = TEMPLATE_DEBUG = False | |
| MINIFIED_RESOURCES = True | |
| SERVE_MEDIA=False | |
| SITENAME = 'GeoNode' | |
| SITEURL = 'http://geonode.gov.vc/' |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.6/mapbox.js'></script> | |
| <link href='http://api.tiles.mapbox.com/mapbox.js/v0.6.6/mapbox.css' rel='stylesheet' /> | |
| <style> | |
| body { margin:0; padding:0; } | |
| #map { position:absolute; top:0; bottom:0; width:100%; } | |
| </style> | |
| </head> |
| <Map srs="+proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"> | |
| <Style name="color relief style"> | |
| <Rule> | |
| <RasterSymbolizer mode="normal" /> | |
| </Rule> | |
| </Style> | |
| <Style name="hillshade style"> | |
| <Rule> | |
| <RasterSymbolizer opacity="0.6" mode="multiply" /> |
Open terminal: Look for terminal in the menu
Check the date
date
| import os | |
| import sys | |
| import requests | |
| import time | |
| from lxml import etree | |
| if __name__ == '__main__': | |
| csw_url = 'https://catalog.data.gov/csw-all' | |
| folder_name = 'data_gov' | |
| max_records = 125000 |
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <style> | |
| h1 { | |
| position: absolute; | |
| top: 500px; | |
| font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
| font-size: 18px; | |
| text-align: center; |