Skip to content

Instantly share code, notes, and snippets.

public class ActivityOneTest extends
android.test.ActivityInstrumentationTestCase2<ActivityOne> {
private ActivityOne thisActivity;
private Button bStartActivityTwo;
public ActivityOneTest() {
super("com.rocketeercoders.wotonio.ActivityOne", ActivityOne.class);
}
@kurthaeusler
kurthaeusler / gist:1155207
Created August 18, 2011 21:07
An exercise I came across on reddit.
import random
def convert(number):
return {
0 : "Zero.wav",
1 : "One.wav",
2 : "Two.wav",
3 : "Three.wav",
4 : "Four.wav",
5 : "Five.wav",
@kurthaeusler
kurthaeusler / scrape.py
Created June 11, 2011 08:45
Here is the code I used to convert the Top200 html to OPML
import libxml2, sys
doc = libxml2.parseFile("source.xml")
ctxt = doc.xpathNewContext()
res = ctxt.xpathEval("//@href")
print len(res)
count = 0
twitters = []
feeds = []
@kurthaeusler
kurthaeusler / Top200OPML.xml
Created June 10, 2011 12:37
An OPML version of the "Top 200 Agile Blogs" found at http://agilescout.com/top-agile-blogs-200/
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Top 200</title>
</head>
<body>
<outline xmlUrl="http://martinfowler.com/bliki/bliki.atom"/>
<outline xmlUrl="http://blog.mountaingoatsoftware.com/?feed=rss2"/>
<outline xmlUrl="http://feeds.feedburner.com/noop"/>
<outline xmlUrl="http://alistair.cockburn.us/articles-blog/new/rss"/>
@kurthaeusler
kurthaeusler / TestPythonScript.cs
Created April 19, 2011 08:09
This script runs a python script in IronPython, and saves the various results.
using System;
using System.IO;
using System.Text;
using IronPython.Hosting;
using IronPython.Runtime;
using IronPython.Runtime.Exceptions;
using Microsoft.Scripting;
using Microsoft.Scripting.Hosting;
/* This script runs a python script in IronPython, with a few parameters