$ hookie show -u smlstvnh -r hookie
------------------------------------
### WEBHOOKS ON smlstvnh:hookie ###
------------------------------------
Nothing yet. Let me create one.
def exc_dict():
"""Expects to be called from within an exception handling block as in:
try:
foo()
except Exception:
print exc_dict()
Creates a nice array of dictionaries each of which describes
a part of the traceback:
{ "trigger": ..., | |
"credentials": { | |
"host": [ | |
{ | |
//Used for any host (pooled) | |
"username": "root", | |
"private-key": "----BEGIN ... KEY----", | |
}, | |
{ |
import logging | |
import socket | |
import logging | |
import logging.config | |
import logstash | |
test1 = {"version": 1, | |
"loggers": { | |
"test1": { |
{
"cpu": {
"0": {
"cache_size": " KB",
"cores": 1,
"family": "1",
"mhz": "2594",
"model": "11527",
"model_name": "Intel64 Family 6 Model 45 Stepping 7",
from multiprocessing import pool
import Queue
class CheckableQueue(Queue.Queue):
"""A Checkable Queue that makes room for new values automatically.
Based on the standard FIFO Queue, this class is good for keeping
To take any bunch of printed columns from stdout and turn them into lists of dictionaries...
def parse_block(block, headers=True, delimiter=None):
"""Return a list of items for each row.
If there are headers in the block of text, they will
be parsed out and a list of dicts will be returned.
"""Who owns the fish? | |
Einstein's riddle. | |
""" | |
import collections | |
import itertools | |
import math | |