-
Clone the Riemann Git repository (clones into directory
riemann
):
$ git clone https://github.com/aphyr/riemann.git
-
Checkout the last stable version (0.2.2 in our case):
$ cd riemann
$ git checkout tags/0.2.2
-
Add Carmine dependency to
riemann/project.clj
:
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
/* | |
Go text template example. | |
References: | |
- https://golang.org/pkg/text/template/ | |
- http://stackoverflow.com/questions/13765797/the-best-way-to-get-a-string-from-a-writer-in-go | |
- http://andlabs.lostsig.com/blog/2014/05/26/8/the-go-templates-post | |
- https://jan.newmarch.name/go/template/chapter-template.html | |
- http://nathanleclaire.com/blog/2014/07/19/demystifying-golangs-io-dot-reader-and-io-dot-writer-interfaces/ | |
*/ |
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
http://www.jedelman.com/1/post/2014/02/common-programmable-abstraction-layer.html | |
http://www.jedelman.com/1/post/2014/02/the-power-of-a-programmable-abstraction-layer.htm |
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 c(object): | |
def __init__(self, a, b): | |
self.a = a | |
self.b = b | |
def update(self, update_dict): | |
self.__dict__.update(update_dict) | |
c = c(1, 2) | |
c.a |
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 InvalidStateException(Exception): | |
pass | |
class MissingStateMachineConfigurationException(Exception): | |
pass | |
from types import DictionaryType | |
class StateMachine(object): |