python

Sam Rose's picture

Google Wave Robots: Python Tutorial - Google Wave API - Google Code

The easiest way to understand how extensions work in Wave is to build a Wave robot. Robots are applications that interact with a Wave through the Wave protocol (HTTP interface). Currently, we only support robots hosted with Google App Engine. In the future, we will support any client architecture that implements the Wave protocol.

Sam Rose's picture

Online Monoculture and the End of the Niche - Whimsley

Received in an email from Michel

Online merchants such as Amazon, iTunes and Netflix may stock more items than your local book, CD, or video store, but they are no friend to "niche culture". Internet sharing mechanisms such as YouTube and Google PageRank, which distil the clicks of millions of people into recommendations, may also be promoting an online monoculture. Even word of mouth recommendations such as blogging links may exert a homogenizing pressure and lead to an online culture that is less democratic and less equitable, than offline culture.

Sam Rose's picture

floss | Social Synergy

If you check http://socialsynergyweb.org/network/category/blog-categories/floss you'll see documentation of infrastructure that I set up on dev server.

We now have mongrel clsuters running, and Imagemagik and rmagick working correctly, plus documentation of how to do it.

Sam Rose's picture

Mercurial: The Definitive Guide

This is the definitive guide to using mercurial.

Sam Rose's picture

Overview — Sphinx v0.6.1 documentation

Sphinx is a tool that makes it easy to create intelligent and beautiful documentation, written by Georg Brandl and licensed under the BSD license.

It was originally created to translate the new Python documentation, and it has excellent support for the documentation of Python projects, but other documents can be written with it too. Of course, this site is also created from reStructuredText sources using Sphinx!

It is still under constant development, and the following features are already present, work fine and can be seen “in action” in the Python docs:

Sam Rose's picture

Pinax

Quote: Pinax is an open-source platform built on the Django Web Framework.

By integrating numerous reusable Django apps to take care of the things that many sites have in common, it lets you focus on what makes your site different.

Sam writes:

I am checking this out now, could be useful and timesaving

Sam Rose's picture

Cookbook/CoupledSpringMassSystem -

An example of modeling spring mass with Python. This library could be very useful for general physical engineering and research/design.

Sam Rose's picture

A2 Parking Python Script

import os, sys, re
import wsgiref.handlers
 
from google.appengine.ext.webapp import template
from google.appengine.ext import webapp
from google.appengine.api import urlfetch
 
BASE_URL = "http://a2parking.appspot.com/"
PARKING_API_URL = \
    "http://www.a2dda.org/parking__transportation/available_parking_spots/"
 
PARKING_LOCATIONS_RE = re.compile(">[\s\w\.:]+</td>[\r\n\s]*<td>[\s\w\.]+<",
    re.MULTILINE)
 
def xml_response(handler, page, templatevalues=None):
    """
    Renders an XML response using a provided template page and values
    """

Sam Rose's picture

Serving WSGI ApplicationsWerkezeug

There are many ways to serve a WSGI application. While you’re developing it, you usually don’t want to have a full-blown webserver like Apache up and running, but instead a simple standalone one. Because of that Werkzeug comes with a builtin development server.

The easiest way is creating a small start-myproject.py file that runs the application using the builtin server:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
 
from werkzeug import run_simple
from myproject import make_app
 
app = make_app(...)
run_simple('localhost', 8080, app, use_reloader=True)

Sam Rose's picture

Embedding Python In Apache2 With mod_python (Debian Etch) | HowtoForge - Linux Howtos and Tutorials

This tutorial shows how to install and use mod_python on a Debian Etch server with Apache2. mod_python is an Apache module that embeds the Python interpreter within the server. It allows you to write web-based applications in Python that will run many times faster than traditional CGI and will have access to advanced features such as ability to retain database connections and other data between hits and access to Apache internals.

I do not issue any guarantee that this will work for you!

Syndicate content