This file contains hidden or 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
# Run this as: | |
# | |
# NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-python example.py | |
# | |
# If being run under Heroku, you can skip setting NEW_RELIC_CONFIG_FILE on the | |
# command line as the required environment variable settings added by the | |
# Heroku New Relic addon will be picked up automatically. | |
import time | |
import newrelic.agent |
This file contains hidden or 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 collections | |
import Queue | |
class MaxSizeDict(collections.MutableMapping): | |
def __init__(self, maxsize): | |
self.maxsize = maxsize | |
self.valdict = {} | |
self.keyqueue = Queue.Queue() | |
def __setitem__(self, key, value): |
This file contains hidden or 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
# configuration for osx clipboard support | |
set-option -g default-command "reattach-to-user-namespace -l sh" |