I hereby claim:
- I am davemcphee on github.
- I am alexschmitz (https://keybase.io/alexschmitz) on keybase.
- I have a public key ASCFSy_FK0Vakc_q0ebJINUPXL0y7w9A0oKlZy8F6iuVpAo
To claim this, I am signing this object:
#!/bin/sh | |
# curls a prometheus metrics endpoint, and awk's it into OpenTSDB format | |
JMX_URL="http://localhost:7070" | |
curl -s $JMX_URL | awk ' | |
BEGIN { ts=systime() } | |
match($0, /{(.*)}/, a) { |
# attach a callback to notify on SERIAL_READ_UUID reads | |
client.start_notify(SERIAL_READ_UUID, callback_handler) | |
# read the firmware value | |
fw_rev = await client.read_gatt_char(FW_REV_UUID) | |
# write the firmware value back | |
client.write_gatt_char(FW_REV_UUID, fw_rev) | |
# at this point, our callback receives a bytearray[20] in reply |
# low level webdriver functions | |
import os | |
import time | |
from selenium import webdriver | |
from selenium.common.exceptions import StaleElementReferenceException | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait |
I hereby claim:
To claim this, I am signing this object:
### Keybase proof | |
I hereby claim: | |
* I am davemcphee on github. | |
* I am alexschmitz (https://keybase.io/alexschmitz) on keybase. | |
* I have a public key ASCFSy_FK0Vakc_q0ebJINUPXL0y7w9A0oKlZy8F6iuVpAo | |
To claim this, I am signing this object: |
#!/usr/bin/env python | |
from __future__ import division | |
from itertools import compress, starmap | |
from operator import mul | |
M = [[0, 2, 1, 0, 0], [0, 0, 0, 3, 4], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] | |
class Fraction: |
# check if a string contains any substrings from a list | |
our_string: 'alexander graham cracker' | |
our_list: ['alex', 'barry', 'chris'] | |
check_result_bool: '{{ our_list | select("in", our_string) | list | count > 0 }}' | |
# using a dictionary with version keys and selecting the highest appropriate key / options | |
our_version = '6.2.5' | |
version_options_dict: | |
'6.5': [ 'an option for 6.5', 'something else' ] |