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
@app.route('/run') | |
def run_testy(): | |
old = os.getcwd() | |
os.chdir("..") | |
cmd = "../runtesty.py --db_admin_user=XXXXXX --db_admin_pass=XXXXXX --db_admin_root=http://XXXXXXX.cloudant.com -i api/test_api.py".split() | |
return Response(run(["pwd"]), mimetype="text/plain") |
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
In [3]: t = test_api.TestCloudantApi() | |
--------------------------------------------------------------------------- | |
ValueError Traceback (most recent call last) | |
<ipython-input-3-a2575e99e1d9> in <module>() | |
----> 1 t = test_api.TestCloudantApi() | |
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.pyc in __init__(self, methodName) | |
189 except AttributeError: | |
190 raise ValueError("no such test method in %s: %s" % | |
--> 191 (self.__class__, methodName)) |
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
. | |
├── README.md | |
├── buildbot | |
│ └── master.cfg | |
├── conftest.py | |
├── docs | |
│ ├── buildbot.md | |
│ ├── releng_qa_planning.md | |
│ ├── test-cluster-spinup-using-clusty.md | |
│ ├── test_envvars.md |
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
(defun copy-from-osx () | |
(shell-command-to-string "pbpaste")) | |
(defun paste-to-osx (text &optional push) | |
(let ((process-connection-type nil)) | |
(let ((proc (start-process "pbcopy" "*Messages*" "pbcopy"))) | |
(process-send-string proc text) | |
(process-send-eof proc)))) | |
(setq interprogram-cut-function 'paste-to-osx) |
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
014-05-29_20:41:27.43370 WARN [2014-05-29 20:41:27,429] Thread-41 - riemann.core - instrumentation service caught | |
2014-05-29_20:41:27.43375 java.util.concurrent.RejectedExecutionException | |
2014-05-29_20:41:27.43376 at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1992) | |
... |
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
(ns your.namespace | |
(:require [riemann.transport :as rtransport] | |
[riemann.transport.udp :as rudp] | |
[interval-metrics.core :as metrics] | |
[clojure.tools.logging :as log]) | |
(:import (java.nio ByteBuffer ByteOrder) | |
(org.jboss.netty.buffer ChannelBufferInputStream) | |
(org.jboss.netty.handler.codec.oneone OneToOneDecoder) | |
(org.jboss.netty.handler.execution ExecutionHandler | |
MemoryAwareThreadPoolExecutor))) |
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
user> (faust.parser/rep "(if (= 1 1) 42 'not-this)") | |
"42" |
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
:dependencies [[org.clojure/clojure "1.5.0"] | |
[riemann "0.2.5"] | |
[pepinito "0.0.3-SNAPSHOT"] | |
[garlic-storm "0.1.5-SNAPSHOT"]] |
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
;; relevant config section | |
:internal-graphite | |
[ | |
{:services [["127.0.0.1", "1", 24001], ["127.0.0.1", "2", 24002]] | |
:replicas 100 | |
:protocol :pickle | |
:batchsize 1000 | |
:claim-timeout 5 | |
:resource-pool-size 1 | |
:block-start true} |
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
(by [:service] | |
(fixed-time-window 60 | |
(fn [events] | |
(let [sum (apply + (map :metric events)) | |
sum-event (assoc (first events) :metric sum | |
:service "new.service.name")] | |
;; do something with the sum here | |
)))) |