To install, place datadog.py
in your callback plugins directory. If you don't yet have one, run:
mkdir -p plugins/callback
Then place the following in your ansible.cfg
file:
[defaults]
callback_plugins = ./plugins/callback
from threading import Condition | |
import traceback | |
import time | |
from minecraft.networking.connection import Connection | |
from minecraft.networking.packets import clientbound, serverbound | |
from minecraft.networking.types import ( | |
Position, PositionAndLook, RelativeHand, BlockFace, | |
) |
import json | |
import argparse | |
import numpy as np | |
import matplotlib | |
import matplotlib.pyplot as plt | |
matplotlib.rcParams['text.usetex'] = True | |
# Inspiration came from https://stackoverflow.com/q/3609852/8931942 |
-- 1. Create a new generic password entry in Keychain Access called "WHATEVER_AnyConnect_VPN" (the name in Keychain access must match that in line 39 below) with your password for the Cisco AnyConnect VPN server. | |
-- 2. Modify values of vpnUrl and keychainKey variables | |
-- 3. Open this script in Script Editor (both this and the above are in the Applications->Utilities folder) and "Save as.." an Application (.app) with desired name. | |
-- 4. Open Security & Privacy System Preferences, go to Privacy, Accessibility. | |
-- 5. Enable the above .app so it can access Accessibility | |
-- 6. Copy and paste a nice icon on the generic Applescript icon (I used a copy of the default AnyConnect one) | |
-- 7. Add the new .app to /Users/[yourshortname]/Applications with a shortcut to your Dock | |
-- 8. Enjoy the fast connection with no need to enter password and increased security of not having a sensitive password stored as plain text | |
-- 9. Run script again to close connection |
import collections | |
def dict_merge(dct, merge_dct): | |
""" Recursive dict merge. Inspired by :meth:``dict.update()``, instead of | |
updating only top-level keys, dict_merge recurses down into dicts nested | |
to an arbitrary depth, updating keys. The ``merge_dct`` is merged into | |
``dct``. | |
:param dct: dict onto which the merge is executed | |
:param merge_dct: dct merged into dct |
var _ = require('underscore'); | |
var Backbone = require('backbone'); | |
var cheerio = require('cheerio'); | |
var request = require('request'); | |
Backbone.ajax = function(options) { | |
options.json = true; | |
return request(options, function(error, result) { | |
if (error) { |
# coding: utf-8 | |
import time | |
from collections import OrderedDict | |
class Cache(): | |
""" | |
In process memory cache. Not thread safe. | |
Usage: | |
#!/usr/bin/env python | |
# | |
# Copyright 2012 Patrick Hetu <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
------------------------------- ------------------ Django -------------------- | Browser: GET /udo/contact/2 | === wsgi/fcgi ===> | 1. Asks OS for DJANGO_SETTINGS_MODULE | ------------------------------- | 2. Build Request (from wsgi/fcgi callback) | | 3. Get settings.ROOT_URLCONF module | | 4. Resolve URL/view from request.path | # url(r'^udo/contact/(?P<id>\w+)', view, name='url-identifier') | 5. Apply request middlewares | # settings.MIDDLEWARE_CLASSES
#-*- coding: utf-8 -*- | |
import contextlib | |
from django.db import connection | |
@contextlib.contextmanager | |
def acquire_table_lock(read, write): | |
'''Acquire read & write locks on tables. |