As configured in my dotfiles.
start new:
tmux
start new with session name:
| #!/usr/local/bin/python | |
| from __future__ import with_statement | |
| import sys | |
| import MySQLdb | |
| class Log2DB(object): | |
| """hadoop log result into database""" | |
| def __init__(self): | |
| self.DB_USER='root' | |
| self.DB_PASS='' |
| #!/bin/bash | |
| # | |
| # Prints out how many seconds ago this EC2 instance was started | |
| # | |
| # It uses Last-Modified header returned by EC2 metadata web service, which as far | |
| # as I know is not documented, and hence I assume there is no guarantee | |
| # that Last-Modified will be always set correctly. | |
| # | |
| # Use at your own risk. | |
| # |
| var safariDebug = ( navigator.platform.indexOf("iPhone") < 0 && navigator.platform.indexOf("iPod") < 0 && navigator.platform.indexOf("iPad") < 0 ); | |
| if(safariDebug) | |
| { | |
| PhoneGap.run_command = function() | |
| { | |
| if (!PhoneGap.available || !PhoneGap.queue.ready) | |
| return; |
| # more info: http://webmining.olariu.org/ubervu-hackaton-relationship-tagcloud | |
| from nltk import pos_tag, word_tokenize | |
| import en # Nodebox English Linguistics library | |
| import urllib, urllib2, re | |
| import json | |
| from time import time | |
| def fetch_url(url, get=None, post=None): | |
| user_agent = 'Andrei Olariu\'s Web Mining for Dummies' |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| <script type="text/ng-template" id="one.html"> | |
| <div>This is first template</div> | |
| </script> | |
| <script type="text/ng-template" id="two.html"> | |
| <div>This is second template</div> | |
| </script> |
| # An example of how to use AWS SNS with Python's boto | |
| # By Stuart Myles @smyles | |
| # http://aws.amazon.com/sns/ | |
| # https://github.com/boto/boto | |
| # | |
| # Inspired by parts of the Ruby SWF SNS tutorial http://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-sns-tutorial-implementing-activities-poller.html | |
| # And the Python SNS code in http://blog.coredumped.org/2010/04/amazon-announces-simple-notification.html and http://awsadvent.tumblr.com/post/37531769345/simple-notification-service-sns | |
| import boto.sns as sns | |
| import json |