This file contains hidden or 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
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
Aggregate the number of nominees by outcome for each congress since the 107th | |
""" | |
import csv | |
import sys | |
import os |
This file contains hidden or 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
# The following script allows to export a SimpleGeo Storage layer to a CSV | |
# You have to change the credentials and the layer that you want to export | |
# It will generate a CSV file with the name of the layer | |
# | |
# Author: Javier de la Torre ([email protected] @jatorre) | |
#Adapt the following to your SimpleGeo credentials. Get it from the UI. | |
oauth_token="token" | |
oauth_secret="secret" |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
gh_url = 'https://api.github.com' | |
req = urllib2.Request(gh_url) | |
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |
This file contains hidden or 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
from __future__ import with_statement | |
from fabric.api import env, run, settings, hide, local | |
from fabric.decorators import hosts, runs_once | |
import os | |
import pip | |
import sys, xmlrpclib | |
from cStringIO import StringIO | |
from distutils.version import StrictVersion, LooseVersion | |
def _find_current_version(package, index_urls=None): |
This file contains hidden or 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 Product(ContentModel): | |
tablename = "product_data" | |
def set_properties(self): | |
ckeditor = CKEditor() | |
T = current.T | |
self.fields = [ | |
Field("price", "double", notnull=True, default=0), | |
Field("manufacturer", "string", notnull=True), | |
Field("in_stock", "boolean", notnull=True, default=True), |
OlderNewer