View gist:7c82a1edd6d2989a7d5a1cac97557d2a
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
pull_request_rules: | |
# If a a pull request has this label, try to update it | |
- name: update on label | |
conditions: | |
- label=needs-update | |
actions: | |
update: | |
# If a PR is up-to-date, make sure it does not have the `needs-update` label | |
- name: clear update label |
View ccijob.zsh
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
function ccijob | |
{ | |
# Tempfile must be in the repository | |
local tmpfile="$(mktemp .circleci/config.processed.XXXXXX)" | |
circleci config process .circleci/config.yml > "$tmpfile" | |
if [ $? = 0 ] | |
then | |
circleci local execute --config "$tmpfile" --job "$1" | |
fi | |
rm "$tmpfile" |
View mergify.yml
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
conditions: | |
- branch=master | |
- "#approved-reviews-by>=2" | |
actions: | |
merge: | |
method: rebase |
View slots-are-fun.py
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 A(object): | |
pass | |
class B(object): | |
__slots__ = ('foobar',) | |
def __init__(self): | |
self.x = 123 | |
class C(A): |
View filter.py
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
import operator | |
class InvalidFilter(Exception): | |
pass | |
class Filter(object): | |
binary_operators = { | |
u"=": operator.eq, |
View micro-metricd.py
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
# -*- encoding: utf-8 -*- | |
import cProfile | |
import random | |
import uuid | |
import daiquiri | |
import numpy | |
from gnocchi.cli import metricd | |
from gnocchi import incoming |
View gnocchi-metric-delete.py
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
#!/usr/bin/env python | |
import os | |
from concurrent.futures import thread | |
from gnocchiclient import client | |
from keystoneauth1 import identity | |
from keystoneauth1 import session | |
auth = identity.Password(auth_url=os.getenv("OS_AUTH_URL"), |
View emacs-revert-9344612d3cd164317170b6189ec43175757e4231.diff
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
--- emacs/src/macfont.m.orig 2017-06-20 11:18:58.000000000 +0200 | |
+++ emacs/src/macfont.m 2017-06-20 11:19:26.000000000 +0200 | |
@@ -2373,9 +2373,9 @@ | |
!= (spacing >= FONT_SPACING_MONO))) | |
continue; | |
- /* Don't use a color bitmap font until it is supported on | |
- free platforms. */ | |
- if (sym_traits & kCTFontTraitColorGlyphs) | |
+ /* Don't use a color bitmap font unless its family is |
View ceph-fill-omap.py
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
import cradox as rados | |
POOL_NAME = "gnocchi-test" | |
CONFFILE = "" | |
USERNAME = "" | |
OBJECT_NAME = "myomapobject" | |
ITER = 100 | |
# options['keyring'] = conf.ceph_keyring | |
# options['key'] = conf.ceph_secret |
View gist:6c53a9877cad50352fff31aecbd29410
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
➔ gnocchi metric create -a high | |
+------------------------------------+-------------------------------------------------------------------+ | |
| Field | Value | | |
+------------------------------------+-------------------------------------------------------------------+ | |
| archive_policy/aggregation_methods | std, count, 95pct, min, max, sum, median, mean | | |
| archive_policy/back_window | 0 | | |
| archive_policy/definition | - points: 3600, granularity: 0:00:01, timespan: 1:00:00 | | |
| | - points: 10080, granularity: 0:01:00, timespan: 7 days, 0:00:00 | | |
| | - points: 8760, granularity: 1:00:00, timespan: 365 days, 0:00:00 | | |
| archive_policy/name | high | |
NewerOlder