Skip to content

Instantly share code, notes, and snippets.

@goldenboy
goldenboy / nominees.py
Created February 27, 2012 21:42 — forked from eyeseast/nominees.py
Aggregate the number of nominees by outcome for each congress since the 107th
#!/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
@rochacbruno
rochacbruno / contenttypes.py
Created January 9, 2012 22:23
Movuca content type
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),
@zodman
zodman / Memory Usage
Created December 9, 2009 16:45
Memory usage
#!/usr/bin/env python
# Try to determine how much RAM is currently being used per program.
# Note per _program_, not per process. So for example this script
# will report RAM used by all httpd process together. In detail it reports:
# sum(private RAM for program processes) + sum(Shared RAM for program processes)
# The shared RAM is problematic to calculate, and this script automatically
# selects the most accurate method available for your kernel.
# Author: [email protected]