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
| -module(friendfeed). | |
| -export([start/0]). | |
| -import(mochijson2). | |
| start() -> | |
| inets:start(), | |
| build(1000), | |
| inets:stop(). | |
| build(0) -> ok; |
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
| fs = SFS['directory'] | |
| fs.directories # Returns a list of all the file system directories under here | |
| # e.g. ['directory', 'directory/sub1', 'directory/sub1/sub2'] | |
| # Directories are order from root to sub directories | |
| fs.files # Returns array of files in this directory | |
| # e.g ['directory', 'directory/file1', 'directory/sub1/sub2/file2'] | |
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
| # you'd obviously have more settings somewhere | |
| set :scm, :git | |
| set :repository, "[email protected]:defunkt/github.git" | |
| set :branch, "origin/master" | |
| set :migrate_target, :current | |
| set(:latest_release) { fetch(:current_path) } | |
| set(:release_path) { fetch(:current_path) } | |
| set(:current_release) { fetch(:current_path) } |
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
| Three points about building scientific software | |
| I think scientific software projects should fail more. Even good software projects should die off. I say this because the spectrum of scientific software ranges from poor to excellent, and they all hang around being poor to excellent. If everything less than excellent died off we'd all be using excellent tools for our research. If you think I'm being elitist let me ask when was the last time you used Yahoo! to do a web search? Yet how often is outmoded software still used in science? | |
| There should be more commercial software. Because how else does software die off unless people start having to pay for it? x Making people pay for your scientific software will ensure that you make sure it is excellent, and that it stays excellent. Otherwise people to won't paying for it and it will die off. Why should scientists have to, or want to pay for software when there will be free alternatives? Because your time is valuable and £50 spent on a tool that is excellent and k |
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
| print.pdf <- function(figure,name,extra.width=0){ | |
| # Create file name | |
| pdf <- paste("/Users/mike/Desktop/post/",name,".pdf",sep="") | |
| # Convert to pdf | |
| trellis.device("pdf", color=TRUE) | |
| pdf(pdf,onefile=FALSE, paper = "special") | |
| print(figure) | |
| dev.off() |
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
| data(iris) | |
| distance <- dist(1 - cor(iris[-5])) | |
| clustering <- hclust(distance) | |
| plot(clustering) |
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
| s/\[c\]//g | |
| s/-L//g | |
| s/EX_//g | |
| s/(e)//g | |
| s/ /,/g | |
| s/,$//g |
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/local/bin/ruby | |
| # | |
| # Short script for converting yaml file time to csv | |
| # | |
| require 'yaml' | |
| require 'rubygems' | |
| require 'fastercsv' |
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
| \documentclass[12pt,PhD]{muthesis} | |
| \usepackage{verbatim} | |
| \usepackage{graphicx} | |
| \usepackage{url} % typeset URL's reasonably | |
| \usepackage{listings} | |
| \usepackage{phdthesis} | |
| \usepackage{rotating} | |
| \usepackage{subfig} | |
| \usepackage{psfrag} |
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/local/bin/ruby | |
| require 'rubygems' | |
| require 'fastercsv' | |
| layout = Hash.new | |
| FasterCSV.open(ARGV.first, :headers => true).each do |row| | |
| row.headers.each do |header| | |
| layout[header] ||= Hash.new |