Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am cbeach on github.
* I am mcsmash (https://keybase.io/mcsmash) on keybase.
* I have a public key whose fingerprint is 6BDC 1307 9B33 F17A F12A AD38 131B 4072 FABF E75A
To claim this, I am signing this object:
{
"title": "Your Basic Dashboard",
"services": {
"query": {
"list": {
"0": {
"query": "event.name: page_view",
"alias": "",
"color": "#7EB26D",
"id": 0,
@cbeach
cbeach / gist:3454666
Created August 24, 2012 19:21
BEST. UPGRADE. REQUEST. **EVER** !!!!

ARP Networks would like to share what is probably the most awesome upgrade request we have ever received. See below.

Initial request:

"IN THE NAME ODIN THE ALL FATHER, OVERLORD McSMASH, VIKING WARRIOR GOD DEMANDS A SERVICE UPGRADE. 768 MEGA BYTES OF YOUR RAM SHALL APPEASE ME. IN RECOMPENSE I SHALL BESTOW UPON THEE AN EXTRA TEN OF YOUR "DOLLARS" PER LUNAR CYCLE.

MANY ENEMIES HAVE FALLEN BEFOAR MY GREAT HAMMER MJOLNIR. HEED MY DEMAND PUNY I.T. PERSON!"

import time
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
from config import CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
class Listener(StreamListener):
def lineno():
"""Returns the current line number in our program."""
return inspect.currentframe().f_back.f_lineno
class ReRedirectSTDOutToFiledirectSTDOutToFile:
def __init__(self, file_name, mode='w'):
self.output_file = open(file_name, mode)
def __enter__(self):