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 | |
from __future__ import with_statement | |
import contextlib | |
import logging | |
import os | |
import sys | |
import urllib2 | |
from boto.ec2.connection import EC2Connection |
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 | |
try: | |
import json | |
except ImportError: | |
import simplejson as json | |
import sys | |
from pagerduty import PagerDuty | |
def parse(txt): |
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 jython | |
import os | |
import sys | |
sys.path.extend(["lib/"+x for x in os.listdir("lib") if x.endswith('.jar')]) | |
sys.path.extend(["dist/"+x for x in os.listdir("dist") if x.endswith('.jar')]) | |
import jarray | |
from kafka.api import FetchRequest | |
from kafka.consumer import SimpleConsumer |
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 | |
import smtplib | |
import sys | |
import time | |
from optparse import OptionParser | |
from supervisor import childutils |
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 | |
from __future__ import division | |
import os | |
import sys | |
import time | |
def seconds_to_hms(sec): | |
return "%d:%.2d:%.2d" % (sec // (60*60), sec // 60 % 60, sec % 60) |
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 | |
from __future__ import with_statement | |
import random | |
import re | |
import select | |
import socket | |
import time | |
from optparse import OptionParser |
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 | |
from __future__ import division | |
import socket | |
class LineSocket(object): | |
def connect(self, host, port): | |
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
self.sock.connect((host, port)) |
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 re | |
import sys | |
import subprocess | |
def osascript(script): | |
p = subprocess.Popen("osascript", stdout=subprocess.PIPE, stdin=subprocess.PIPE) | |
stdout = p.communicate(script)[0] | |
if p.returncode != 0: |
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/python | |
# | |
# LICENSE: MIT | |
# | |
# Copyright (C) 2014 Samuel Stauffer | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to | |
# deal in the Software without restriction, including without limitation |
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 sys | |
COLOR_BRIGHT_WHITE = "\033[1;97m" | |
COLOR_BOLD_RED = "\033[1;31m" | |
COLOR_GREEN = "\033[0;32m" | |
COLOR_YELLOW = "\033[0;33m" | |
COLOR_NORMAL = "\033[0m" | |
CHECK_MARK = "\xe2\x9c\x93" |
OlderNewer