ps -ef
telnet
stats
stats slabs
stats items
stats cachedump SLAB_ID NUM_HOW_MANY
default, prometheus-kube-state-metrics, NetworkPolicy (networking.k8s.io) has changed: | |
# Source: prometheus/templates/kube-state-metrics-networkpolicy.yaml | |
apiVersion: networking.k8s.io/v1 | |
kind: NetworkPolicy | |
metadata: | |
name: prometheus-kube-state-metrics | |
labels: | |
component: "kube-state-metrics" | |
app: prometheus | |
release: prometheus |
--- master.txt 2018-12-02 19:09:21.000000000 +0000 | |
+++ unified_labels.txt 2018-12-02 19:09:40.000000000 +0000 | |
@@ -4,11 +4,11 @@ | |
kind: ConfigMap | |
metadata: | |
labels: | |
- app: prometheus | |
- chart: prometheus-7.4.5 | |
component: "alertmanager" | |
- heritage: Tiller |
""" | |
Tools for drawing Python object reference graphs with graphviz. | |
You can find documentation online at https://mg.pov.lt/objgraph/ | |
Copyright (c) 2008-2017 Marius Gedminas <[email protected]> and contributors | |
Released under the MIT licence. | |
""" | |
# Permission is hereby granted, free of charge, to any person obtaining a |
""" | |
For non inlplace dict setdefault. | |
""" | |
base_dict = {'a': 'a-ORIG', 'b': 'b-ORIG', 'd': 'd-ORIG'} | |
defaults = {'a': 'A', 'b': None, 'c': 0} | |
overrides = defaults | |
# Update by override. Like: | |
# - base_dict.update(overrides) -> new dict BUT `dict.update` is inplace | |
# - base_dict + overrides -> new dict BUT unsupported operand |
from __future__ import print_function | |
import inspect | |
def fn(): | |
return inspect.stack()[1][3] | |
class Example(object): |
ps -ef
telnet
stats
stats slabs
stats items
stats cachedump SLAB_ID NUM_HOW_MANY
Public Request Resoponse Headers
HTTP/1.1 200 OK
Status: 200 OK
Server: GitHub.com
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
def solution(items): | |
if not items: | |
return | |
count = 0 | |
best = None | |
for n in items: | |
if count == 0: | |
best = n |
def solution(items): | |
if not items: | |
return | |
best = None | |
best_count = 0 | |
current_count = 0 | |
last = items[0] | |
for current in items: |
def test_solution(): | |
assert solution([]) == None | |
assert solution([1]) == 1 | |
assert solution([1, 2]) == None | |
assert solution([1, 2, 3]) == None | |
assert solution([1, 2, 1]) == 1 | |
assert solution([1, 2, 1, 2]) == None | |
if __name__ == "__main__": |