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 Debug.Trace | |
-- Problem 0 | |
helloWorld :: [Char] | |
helloWorld = "Hello World" | |
-- Problem 1 | |
myLast :: [a] -> a | |
myLast = head . reverse |
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
# Usage: | |
# (irb)> { "some" => [{"keys" => "with", "some" => ["values"]}]}.flarp | |
# => {"some.0.keys"=>"with", "some.0.some.0"=>"values"} | |
class Hash | |
def flarp(h = {}, prefix = nil) | |
each do |k, v| | |
new_k = [prefix, k].compact.join(".") | |
if v.is_a?(Array) || v.is_a?(Hash) |
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 Hash | |
def flarp(h = {}, prefix = nil) | |
each do |k, v| | |
new_k = [prefix, k].compact.join(".") | |
if v.is_a?(Array) || v.is_a?(Hash) | |
v.flarp(h, new_k) | |
else | |
h[new_k] = v | |
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
// go-race | |
// width: `tput cols` | |
// height: `tput lines` | |
// Our generated maze needs to be just less than 1/2 the size of our | |
// terminal size, so we can have room to print walls. | |
// | |
// Each cell is an integer. Each wall on the cell (N, E, S, W) are | |
// represented by a bit. If a wall exists only on the north side, |
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
def enqueue_for_migrant_work(okey, root, source) | |
queue_name = "migrant_worker_$$$ENVIRONMENTNAME$$$" | |
payload = { | |
'processor' => 'SetRootAndSourceProjectIdsProcessor', | |
'okey' => okey, | |
'root' => root, | |
'source' => source, | |
} |
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
filetype off | |
"call pathogen#helptags() | |
call pathogen#runtime_append_all_bundles() | |
" first clear any existing autocommands: | |
autocmd! | |
set nocompatible | |
" http://items.sjbach.com/319/configuring-vim-right |
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
var gia = (function (obj){ | |
var stateEV=[["Alabama","AL",9,"SR"],["Alaska","AK",3,"SR"],["Arizona","AZ",11,"SR"],["Arkansas","AR",6,"SR"],["California","CA",55,"SO"],["Colorado","CO",9,"T"],["Connecticut","CT",7,"LO"],["Delaware","DE",3,"SO"],["Dist. of Columbia","DC",3,"SO"],["Florida","FL",29,"T"],["Georgia","GA",16,"SR"],["Hawaii","HI",4,"SO"],["Idaho","ID",4,"SR"],["Illinois","IL",20,"SO"],["Indiana","IN",11,"SR"],["Iowa","IA",6,"T"],["Kansas","KS",6,"SR"],["Kentucky","KY",8,"SR"],["Louisiana","LA",8,"SR"],["Maine","ME",4,"SO"],["Maryland","MD",10,"SO"],["Massachusetts","MA",11,"SO"],["Michigan","MI",16,"LO"],["Minnesota","MN",10,"SO"],["Mississippi","MS",6,"SR"],["Missouri","MO",10,"LR"],["Montana","MT",3,"SR"],["Nebraska","NE",5,"SR"],["Nevada","NV",6,"T"],["New Hampshire","NH",4,"T"],["New Jersey","NJ",14,"SO"],["New Mexico","NM",5,"SO"],["New York","NY",29,"SO"],["North Carolina","NC",15,"T"],["North Dakota","ND",3,"SR"],["Ohio","OH",18,"T"],["Oklahoma","OK",7,"SR"],["Oregon","OR",7,"SO"],["Pennsylvan |
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
var margin = {top: 1, right: 1, bottom: 6, left: 1}, | |
width = 960 - margin.left - margin.right, | |
height = 500 - margin.top - margin.bottom; | |
var formatNumber = d3.format(",.0f"), | |
format = function(d) { return formatNumber(d) + " TWh"; }, | |
color = d3.scale.category20(); |
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
require 'formula' | |
class Mysql < Formula | |
homepage 'http://dev.mysql.com/doc/refman/5.6/en/' | |
url 'http://downloads.mysql.com/archives/mysql-5.6/mysql-5.6.10.tar.gz' | |
version '5.6.10' | |
sha1 'f37979eafc241a0ebeac9548cb3f4113074271b7' | |
bottle do | |
sha1 'e07b9a207364b6e020fc96f49116b58d33d0eb78' => :mountain_lion |
NewerOlder