Skip to content

Instantly share code, notes, and snippets.

View butlermh's full-sized avatar

Mark H. Butler butlermh

  • Santa Clara, United States
View GitHub Profile
<?xml version="1.0"?>
<!--
*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@butlermh
butlermh / pairprogramming
Last active August 29, 2015 14:01
Pair programming versus solo programming for SAAS Part 1
For the SAAS course part 1 we are being asked to do pair programming for all assignments.
A portion of the mark is attributed to submitting a video of ourselves performing pair
programming. Therefore I am submitting this document in lieu of a pair-programming video.
I did do pair programming on HWK 0, with Jay A Student. Unfortunately we were unable to
record the session successfully - getting Google hangouts to work was difficult and it
seemed to be necessary to make the hangout public i.e. "on the air" in some way in order
to record it. At the time this did not seem possible. The behavior of hangouts seemed
pretty flaky. However we did do the work together. There were some pluses and minuses
from this:
@butlermh
butlermh / gist:10692489
Created April 15, 2014 00:32
Problems compiling Sonar-Scala plugin
mark@mark-Aspire-5750G:~/qf-workspace2/sonar-scala$ mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Sonar Scala Plugin 0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.scalariform:scalariform_2.10:jar:0.1.5-SNAPSHOT is missing, no dependency information available
[INFO]
[INFO] --- buildnumber-maven-plugin:1.2:create (default) @ sonar-scala-plugin ---
[INFO] Checking for local modifications: skipped.
@butlermh
butlermh / multiModule.sbt
Created January 28, 2014 16:53
Example sbt build file for multi-module project
import sbt._
import Keys._
import sbtassembly.Plugin._
import AssemblyKeys._
import sbt.Package.ManifestAttributes
import sbt.Logger
import com.typesafe.sbt.SbtAtmos.{Atmos, atmosSettings, AtmosKeys}
object HelloSbtBuild extends Build {
@butlermh
butlermh / fft01.m
Created January 6, 2014 22:28
Matlab / Octave scripts from Coursera' Computational Methods for Data Analysis week 1
% clear everything
clear all; close all; clc;
%create a gaussian
L=20
n=128;
x2=linspace(-L/2,L/2,n+1);
x=x2(1:n);
@butlermh
butlermh / gist:7704077
Created November 29, 2013 10:41
Python script to convert Apple forum data set http://sifaka.cs.uiuc.edu/~wang296/Data/index.html to GML so it can be imported into Gephi.
import glob
import os
import networkx as nx
from unidecode import unidecode
from dateutil.parser import parse
''' This file requires the networkx and unidecode packages to be installed e.g.
easy_install networkx
easy_install unidecode'''
@butlermh
butlermh / gist:7260966
Last active December 27, 2015 03:39
Using YUI to display data.taipei.gov.tw dataset
<!DOCTYPE html>
<title>Displaying a remote JSON DataSource in a DataTable</title>
<body class="yui3-skin-sam">
<div id="datatable"></div>
<script src="http://yui.yahooapis.com/3.5.0/build/yui/yui-min.js"></script>
<script>
YUI().use('datatable', 'datasource-get', 'datasource-io', 'datasource-jsonschema', function (Y) {
var src = new Y.DataSource.Get({
source: 'http://data.taipei.gov.tw/opendata/apply/json/NzRBNTc0NDUtMjMxMi00RTk1LTkxMjgtNzgzMzU5MEQzRDc3'
});
@butlermh
butlermh / MinimalTest.java
Last active December 17, 2015 01:39
A minimal test case that shows the problem I am encountered parsing quoted strings with regex expressions in Parboiled.
import static org.junit.Assert.*;
import static org.parboiled.support.ParseTreeUtils.printNodeTree;
import org.junit.Test;
import org.parboiled.BaseParser;
import org.parboiled.Parboiled;
import org.parboiled.Rule;
import org.parboiled.annotations.BuildParseTree;
import org.parboiled.buffers.IndentDedentInputBuffer;
import org.parboiled.errors.ErrorUtils;
@butlermh
butlermh / romeBOMTest.java
Created January 30, 2013 12:38
Using Apache Commons IO to fix BOM problems when using the Rome RSS parser library
package rss;
import org.xml.sax.InputSource;
import java.io.*;
import java.net.*;
import com.sun.syndication.io.*;
import org.apache.commons.io.IOUtils;