This file contains 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
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/Cobalt");e.getSession().setMode("ace/mode/python");</script> |
This file contains 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
--- swig/hid_wrap.c 2009-01-22 15:57:51.000000000 +0000 | |
+++ swig/hid_wrap2.c 2009-01-27 15:00:29.000000000 +0000 | |
@@ -1987,7 +1987,7 @@ | |
int newmemory = 0; | |
*ptr = SWIG_TypeCast(tc,vptr,&newmemory); | |
if (newmemory == SWIG_CAST_NEW_MEMORY) { | |
- assert(own); | |
+ // assert(own); | |
if (own) | |
*own = *own | SWIG_CAST_NEW_MEMORY; |
This file contains 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
Heilmeyer's Catechism: | |
1. What is the problem, why is it hard? | |
2. How is it solved today? | |
3. What is the new technical idea; why can we succeed now? | |
4. What is the impact if successful? | |
5. How will the program be organized? | |
6. How will intermediate results be generated? | |
7. How will you measure progress? | |
8. What will it cost? |
This file contains 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 | |
# | |
# Parse simple tokens from a string such that it can be recreated. | |
# | |
__author__ = 'Sarah Mount <s.mount@wlv.ac.uk>' | |
__date__ = '12 July 2012' | |
ws = [' ', '\n', '\t'] |
This file contains 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 MyExn(Exception): | |
def __init__(self, value): | |
self.value = value | |
def __str__(self): | |
return "MyExn raised with value " + str(self.value) | |
def example(): | |
try: | |
raise MyExn(0) | |
except MyExn, e: |
This file contains 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
import scala.collection.mutable._ | |
class WorkerBee2 (val iterations : Int, var bins : ArrayBuffer[Int]) extends Runnable { | |
def run() : Unit = { | |
for(i <- 0 until iterations) { | |
for (j <- 0 until bins.length) { | |
// This compiles but misses some iterations: | |
bins.update(j, bins(j) + 1) | |
} |
This file contains 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 -*- | |
""" | |
This script parses the output of the Ubuntu 'sensors' utility. | |
The output of sensors looks like this on my machine: | |
acpitz-virtual-0 | |
Adapter: Virtual device |
This file contains 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 | |
""" | |
Convert Kasabi JSON to CSV. | |
This parser is designed to parse the results of http://kasabi.com/ SPARQL | |
queries and write them out as CSV files for use with a spreadsheet. | |
You can see an example SPARQL query here: |
This file contains 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
# | |
# Minimal Makefile which compiles multiple C files into individual executables. | |
# | |
# | |
# - Sarah Mount, November 2011 | |
# | |
CC=gcc | |
RM=rm |
This file contains 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
#!/bin/bash | |
# | |
# Simple script to generate statistics from a Mercurial branch. | |
# | |
# Sarah Mount s.mount@wlv.ac.uk | |
# | |