I hereby claim:
- I am reaaz on github.
- I am reaaz (https://keybase.io/reaaz) on keybase.
- I have a public key ASDqHuw1sEhqc8jNPT4zORlFg3qcLXT-JIevAOh1yHZ_3Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
SELECT | |
tmp.ipAddress, | |
-- Calculate how many connections are being held by this IP address. | |
COUNT( * ) AS ipAddressCount, | |
-- For each connection, the TIME column represent how many SECONDS it has been in | |
-- its current state. Running some aggregates will give us a fuzzy picture of what | |
-- the connections from this IP address is doing. | |
FLOOR( AVG( tmp.time ) ) AS timeAVG, |
# http://www.gelens.org/2009/09/13/twisted-connectionpool-revisited/ | |
from twisted.enterprise import adbapi | |
from twisted.python import log | |
import MySQLdb | |
class ReconnectingConnectionPool(adbapi.ConnectionPool): | |
"""Reconnecting adbapi connection pool for MySQL. | |
This class improves on the solution posted at |
openssl s_client -connect some-secure-domain.com:443 -showcerts | grep "^ " |
import os | |
import subprocess | |
def exec_with_output(command, command_dir, output_dir, output_filename): | |
"""Run command and write output to file | |
Args: | |
command: string, shell command to execute. | |
command_dir: string, directory to execute command from. | |
output_dir: string, directory to write output in. | |
output_filename: string, directory to write output in. | |
""" |
#!/usr/bin/python | |
# Small Python/AppleScript to play the Google Doodle Basketball game | |
# at http://www.google.com/doodles/basketball-2012 | |
# Current high score is 36. I'm sure that can be improved with better delay | |
# management. | |
# Directions: load the game in your browser, hit play, and exec the script. |