Instantly share code, notes, and snippets.

Steve Holden holdenweb

View GitHub Profile
@holdenweb
holdenweb / docs.txt
Created Aug 31, 2018 — forked from k4ml/docs.txt
Python client for Webfaction API
View docs.txt
# API Reference¶
The WebFaction [XML-RPC](http://en.wikipedia.org/wiki/XML-RPC) API provides
methods to make many account tasks scriptable. This documentation is a
complete reference to all of the possible API methods.
Please note that XML-RPC parameters are positional (order matters), and many
parameters are required. Parameters may only be omitted if omitted parameters
have default values and follow all other parameters to which you have supplied
a value.
@holdenweb
holdenweb / docs.txt
Last active Aug 31, 2018 — forked from k4ml/docs.txt
Python client for Webfaction API
View docs.txt
# API Reference¶
The WebFaction [XML-RPC](http://en.wikipedia.org/wiki/XML-RPC) API provides
methods to make many account tasks scriptable. This documentation is a
complete reference to all of the possible API methods.
Please note that XML-RPC parameters are positional (order matters), and many
parameters are required. Parameters may only be omitted if omitted parameters
have default values and follow all other parameters to which you have supplied
a value.
View Traitlets3.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@holdenweb
holdenweb / Traitlets2.ipynb
Created Sep 29, 2016
Traits Early Experiments 2
View Traitlets2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@holdenweb
holdenweb / Traitlets.ipynb
Created Sep 29, 2016
Traitlets early experiments
View Traitlets.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View similarity.py
from __future__ import division
import json
import os
import urlparse
from collections import defaultdict
from datetime import datetime
from dateutil.relativedelta import relativedelta
from requests import HTTPError
from requests_oauthlib import OAuth1Session
@holdenweb
holdenweb / Practicing.ipynb
Last active Jan 2, 2016
Practising Python (1)
View Practicing.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View a_better_opml.py
import tweepy
from BeautifulSoup import BeautifulSoup as parser
import urllib
consumer_key=''
consumer_secret=''
access_token=''
access_token_secret=''
@holdenweb
holdenweb / SillyThreading.ipynb
Created Jan 18, 2013
Some code it isn't reasonable to expect to run in a notebook?
View SillyThreading.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@holdenweb
holdenweb / gist:4290995
Last active Oct 14, 2015
A simple line splitting function for comma-separated value files. Created because the Python 2 csv module is not Unicode-safe. This assumes a fixed line of eight fields. It handles string values containing both commas and quotes. The rule is that if a field begins with a quote then it ends with a quote and the value is the string between the quo…
View gist:4290995
def fsplit(line):
line = line.decode("utf-8")
pos = 0
fields = []
for _ in range(8):
if line[pos] == '"':
start = pos
end = line.find('"', pos+1)
while end+1<len(line) and line[end+1] == '"':
pos = end+1