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 | |
| """ | |
| Basic app which can be updated directly from a Mercurial repository. | |
| Copyright (C) Sarah Mount, 2011. | |
| This program is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU General Public License | |
| as published by the Free Software Foundation; either version 2 |
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
| {.section SharedStreams} | |
| {.repeated section SharedStreams} | |
| <h3><a href="{Url}">{Name|html}</a></h3> | |
| <p>{Description|html}</p> | |
| {.end} | |
| {.or} | |
| <p>No users have shared data streams with you, why not <a href="/newstream">create one</a> of your own!</p> | |
| {.end} |
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
| #!/bin/bash | |
| # | |
| # Simple script to generate statistics from a Mercurial branch. | |
| # | |
| # Sarah Mount s.mount@wlv.ac.uk | |
| # | |
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
| # | |
| # Minimal Makefile which compiles multiple C files into individual executables. | |
| # | |
| # | |
| # - Sarah Mount, November 2011 | |
| # | |
| CC=gcc | |
| RM=rm |
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 | |
| """ | |
| 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 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 -*- | |
| """ | |
| 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 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
| 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 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 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 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 | |
| # | |
| # 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 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
| 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? |