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 Solution: | |
| # @param A : list of integers | |
| # @param B : integer | |
| # @return an integer | |
| def threeSumClosest(self, A, B): | |
| A.sort() | |
| if len(A) == 3: | |
| return sum(A) | |
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
| "ms_availability_west-2": { | |
| "mappings": { | |
| "service_availability": { | |
| "properties": { | |
| "name": { | |
| "type": "keyword" | |
| }, | |
| "region": { | |
| "type": "keyword" | |
| }, |
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
| {"status_code": 200, "project_names": ["all", "openstack.keystone", "openstack.heat", "openstack.cinder", "openstack.glance", "openstack.neutron", "openstack.nova"], "projects": {"all": {"response_time_data": [["2016-11-11T12:00", 0.01966158591159102], ["2016-11-11T04:00", 0.029306551841700258], ["2016-11-11T08:00", 0.009598767567270745], ["2016-11-11T12:00", 0.02080416101962328], ["2016-11-11T04:00", null], ["2016-11-11T08:00", null], ["2016-11-12T12:00", 0.010563352369030731], ["2016-11-12T04:00", 0.010532431568329533], ["2016-11-12T08:00", 0.010604626643665445], ["2016-11-12T12:00", 0.009605689191569884], ["2016-11-12T04:00", null], ["2016-11-12T08:00", null], ["2016-11-13T12:00", 0.010339519584603194], ["2016-11-13T04:00", 0.015291179382863144], ["2016-11-13T08:00", 0.009361118342106541], ["2016-11-13T12:00", 0.009654672917289038], ["2016-11-13T04:00", null], ["2016-11-13T08:00", null], ["2016-11-14T12:00", 0.012262624605662293], ["2016-11-14T04:00", 0.018319304948090576], ["2016-11-14T08:00", 0.013894095 |
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
| ERROR in ./~/css-loader!./~/postcss-loader!./~/less-loader!./~/extract-text-webpack-plugin/loader.js?{"omit":1,"extract":true,"remove":true}!./~/style-loader!./~/css-loader!./~/postcss-loader!./~/less-loader!./src/styles/loading.less | |
| Module build failed: ModuleBuildError: Module build failed: ReferenceError: Promise is not defined | |
| at Object.module.exports (/home/ubuntu/fuel-devops-portal/node_modules/postcss-loader/index.js:51:5) | |
| at DependenciesBlock.onModuleBuildFailed (/home/ubuntu/fuel-devops-portal/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:315:19) | |
| at nextLoader (/home/ubuntu/fuel-devops-portal/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:270:31) | |
| at /home/ubuntu/fuel-devops-portal/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15 | |
| at runSyncOrAsync (/home/ubuntu/fuel-devops-portal/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:173:4) | |
| at nextLoader (/home/ubuntu/fuel-devops-p |
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
| SLA = 5 | |
| FAILED = [] | |
| make_positive(ts): | |
| return [t, 1 for t, v in ts]: | |
| for v in time_series: | |
| if v: | |
| if len(FAILED) <= SLA: | |
| send_to_graphite(make_positive(FAILED) + [v]) |
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
| curl -X GET <ES>/<parsed_log_index>/<parsed_log_type> -d' | |
| { | |
| "aggs": { | |
| "request_per_minute": { | |
| "date_histogram": { | |
| "field": "Timestamp", | |
| "interval": "minute", | |
| "format": "yyyy-MM-dd-hh-mm" | |
| }, | |
| "aggs": { |
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
| { | |
| "took": 28, | |
| "timed_out": false, | |
| "_shards": { | |
| "total": 5, | |
| "successful": 5, | |
| "failed": 0 | |
| }, | |
| "hits": { | |
| "total": 9999, |
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
| curl -X GET <ES_URL>/log*/log/_search?size=5000&from=0 -d ' | |
| { | |
| "query": { | |
| "filtered": { | |
| "filter": { | |
| "range": { | |
| "timestamp": { | |
| "gte" : "now-1d/d" | |
| } | |
| } |
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
| { | |
| "rsyslog-2016.09.20" : { | |
| "mappings" : { | |
| "rsyslog" : { | |
| "properties" : { | |
| "EnvVersion" : { | |
| "type" : "string" | |
| }, | |
| "Hostname" : { | |
| "type" : "string" |
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
| "hooks": [ | |
| { | |
| "name": "example_hook", | |
| "args": { | |
| "cmd": "bash enable_factor_1" | |
| }, | |
| "trigger: { | |
| "name": "event", | |
| "args": { | |
| "unit": "seconds", |