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
package main | |
import ( | |
"os" | |
"archive/tar" | |
"log" | |
"io" | |
"compress/gzip" | |
) |
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
# Set of basic statistics operations | |
# | |
import math | |
def median(items): | |
""" | |
Return median | |
if number of items is odd, return average of 2 middles. |
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
// When writing an application, we want to stick to the details that are specific | |
// to our application domain. We don't want to write generic code that deals with | |
// contemporary issues, such as "what type of client would like to connect to us today?" | |
package bank | |
// The Account interface represents our application's protocol. | |
// We'd like to never have to write the generic transport protocol code. | |
type Account interface{ | |
HowFarInTheHoleAmI() Farthings | |
} |