This file contains 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
# This file belongs in the my_target directory. | |
# Start from a base image you like. | |
FROM gcr.io/google-appengine/python | |
# Run ordinary commands to set up the environment the way you like. | |
# Read more about Docker to see what else you can do here. | |
RUN pip install NumPy | |
USER root | |
RUN mkdir -p /var/local | |
COPY startup.sh /var/local |
This file contains 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
// This is `promiseSetTimeout` which is a wrapper around `setTimeout` | |
// `promiseSetTimeout` manually builds out the `then` function to its result | |
// in order to demonstrate how promises work | |
var promiseSetTimeout = function(time) { | |
var result = {}; | |
var callbacks = []; | |
// `then` is a method that will take the callback and store | |
// it to be used later. In a promise-less world, this would | |
// be the callback function inserted in the call to `setTimeout`. |
This file contains 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 TM | |
class DB | |
attr_reader :projects | |
def initialize | |
@projects = {} | |
@project_count = 0 | |
end | |
def create_project(data) |
This file contains 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 TM | |
class DB | |
attr_reader :tasks, :projects | |
def initialize | |
@projects = {} | |
@project_count = 0 | |
end | |
def create_project(data) | |
end |
This file contains 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
// Using NaN instead of null is a clever hack. See checkForWinner for details. | |
var spaces = [ | |
NaN, NaN, NaN, | |
NaN, NaN, NaN, | |
NaN, NaN, NaN | |
]; | |
var player1 = 'veggies'; | |
var player2 = 'junkfood'; |
This file contains 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 Tree | |
def initialize | |
@root = nil | |
end | |
def add_node(value) | |
end | |
def ensure_consistency(node) | |
if node.nil? |