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
sdfsdf |
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
# Hey tripit, tell me what dates I have accommodation booked so I know the trip's covered | |
from pytripit import tripit | |
consumer_key = '---' | |
consumer_secret = '---' | |
authorized_token_key = '---' | |
authorized_token_secret = '---' | |
oauth_credential = tripit.OAuthConsumerCredential(consumer_key, consumer_secret, authorized_token_key, authorized_token_secret) |
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
#!/usr/bin/python | |
# Shell usage example: | |
# f=somefile.rrd | |
# rrdtool dump $f > /tmp/$f.xml && /tmp/deNaN.py /tmp/$f.xml > /tmp/$f.xml.new && mv $f{,.bak} && rrdtool restore /tmp/$f.xml.new $f | |
import fileinput | |
import re | |
lastval = '' |
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
''' | |
Created on 08/07/2012 | |
@author: roger | |
''' | |
import requests | |
from lxml import etree | |
import lxml. html | |
import memcache | |
from twitter.oauth import OAuth |
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
#!/usr/bin/env python | |
# -*- python -*- | |
# | |
# Plugin to track account balances on ingdirect.com.au, using selenium gymnastics to log in | |
# | |
# E.g. | |
# ln -s /usr/share/munin/plugins/ingdirect.py /etc/munin/plugins/ingdirect | |
# | |
# Needs (hint: pip install): | |
# selenium |
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
#!/usr/bin/env python | |
# Simple cgi script to process 2checkout.com's Instant Notification Service | |
# See: https://www.2checkout.com/static/va/documentation/INS/index.html | |
# This script is intended to demonstrate validation of the md5_hash and assumes a Fraud State Changed notification | |
# Disclaimer: YMMV | |
import cgi | |
print "Content-type: text/html" | |
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
#!/home/roger/.virtualenvs/lastfm/bin/python -u | |
""" | |
File: lastmatchwithnums.py | |
Author: Roger Barnes | |
A simple program for using acoustid to fingerprint and look up metadata (esp. play counts) | |
for MP3 files via lastfm. Usage: | |
$ python lastmatchwithnums.py [folder] ... | |
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 web | |
import json | |
urls = ( | |
'/', 'index', | |
'/post', 'post', | |
'/data', 'data', | |
) | |
def add_global_hook(): |