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
| FROM ubuntu | |
| RUN apt-get update | |
| RUN apt-get install -y wget build-essential python python-dev | |
| RUN wget https://bootstrap.pypa.io/get-pip.py | |
| RUN python get-pip.py |
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 double(i): | |
| return i*2 | |
| def increment(i): | |
| if i=='broken': | |
| return None | |
| return i+1 | |
| def flatten(listOfOptions): | |
| return reduce(list.__add__, listOfOptions) |
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
| <html> | |
| <head> | |
| <title>test eventTicks</title> | |
| <script src="js/lib/zepto-1.1.4.js"></script> | |
| <script src="js/lib/bacon-0.7.12.js"></script> | |
| <script> | |
| $(function() { | |
| var ticks = new Bacon.Bus(); | |
| ticks.plug($(".ticker").asEventStream("click", function() { | |
| return {tick: 1}; |
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
| { | |
| "provider": { | |
| "name": "Animal Service" | |
| }, | |
| "consumer": { | |
| "name": "Zoo App" | |
| }, | |
| "interactions": [ | |
| { | |
| "description": "a request for animals", |
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 LazyVariables { | |
| def lazy(variables) { | |
| variables.each { name, init -> | |
| def chars = name.toCharArray() | |
| chars[0] = Character.toUpperCase(chars[0]) | |
| def getter = "get${new String(chars)}" | |
| this.metaClass[getter] = { | |
| def value = init() | |
| this.metaClass[name] = value | |
| this.metaClass[getter] = { value } |
NewerOlder