Skip to content

Instantly share code, notes, and snippets.

View terrycojones's full-sized avatar

Terry Jones terrycojones

View GitHub Profile
$ python describejson.py < ~/fluidinfo/other/kevinrose.json
1 dict with 3 keys. Values:
1 <type 'int'>
1 dict with 4 keys. Values:
1 list of length 17993. Items:
17993 dict with 5 keys. Values:
1 <type 'unicode'>
1 <type 'int'>
1 list of length 0.
1 <type 'unicode'>
relevant:
flashy glamorisations
also hasty formalising
also flashy amortising
half simian's astrology
analysis from goliaths
stylish anagram folios
small soothsaying fair
go flashy rationalisms
flashy rationals gismo
{
"description": "Welcome to Findings Browse and share fascinating writing from anywhere. Sign in with Twitter to start your collection!",
"provider_name": "Findings",
"provider_url": "http://labs.findings.com",
"thumbnail_height": 500,
"thumbnail_url": "http://a0.twimg.com/profile_images/1769514792/image1327099968.png",
"thumbnail_width": 400,
"title": "Findings (beta)",
"type": "link",
"url": "http://labs.findings.com",
282 buffers open, in 26 distinct modes
120 python ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
50 dired ++++++++++++++++++++++++++++++++++++++++++++++++++
31 fundamental +++++++++++++++++++++++++++++++
31 js2 +++++++++++++++++++++++++++++++
10 html ++++++++++
6 dcl ++++++
4 help ++++
4 text ++++
(if (and
(boundp 'i-use-js2-mode)
i-use-js2-mode)
(progn
(require 'js-comint)
(setq-default js2-basic-offset 4)
(setq
js2-enter-indents-newline t
js2-consistent-level-indent-inner-bracket-p t
js2-pretty-multiline-decl-indentation-p t
[Tuesday 17 April 2012] [16:43:03] <terrycojones> esteve: trying with https://gist.github.com/d7a502481c5e37385044 (committed)
[Tuesday 17 April 2012] [16:43:18] <esteve> terrycojones: cool
[Tuesday 17 April 2012] [16:50:22] <terrycojones> esteve: trying to get you a paste of the output.
[Tuesday 17 April 2012] [16:50:29] <esteve> terrycojones: ok
[Tuesday 17 April 2012] [16:50:33] <terrycojones> esteve: it didn't fail. quite a few warnings etc.
[Tuesday 17 April 2012] [16:50:45] <terrycojones> but my browser is showing all pages as blank :-(
Start-Date: 2012-04-17 16:44:19
Install: s3cmd (0.9.9.91-1)
End-Date: 2012-04-17 16:44:23
Start-Date: 2012-04-17 16:44:27
Install: haproxy (1.3.22-1)
End-Date: 2012-04-17 16:44:33
Start-Date: 2012-04-17 16:44:48
Install: python-django (1.1.1-2ubuntu1.4)
from json import loads
from oauth2 import Client, Consumer, Token
from urllib import urlencode
class TumblrError(Exception):
"""Hold information about an error from the Tumblr API.
@param url: The C{str} URL that the API call used.
@param status: The C{int} HTTP status returned in the error.
# In the following line, url = http://api.tumblr.com/v2/user/info/
req = oauth.Request(method='POST', url=url, parameters=params)
## Sign the request.
signature_method = oauth.SignatureMethod_HMAC_SHA1()
req.sign_request(signature_method, self.consumer, self.token)
resp, content = self.client.request(req.to_url(), 'POST', headers=self.headers)
[2012-03-24 01:28] <terrycojones> exarkun: thanks for fielding the question in stackoverflow related to txRDQ. i'm trying to figure out what's going wrong.
[2012-03-24 01:30] <terrycojones> exarkun: i've been putting in print stmts for about 30 mins and everything seems fine, but trial for some reason is printing [ERROR].
[2012-03-24 01:32] <idnar> terrycojones: the usual cause of an [ERROR] when there's apparently no exception being raised is that an exception was *logged* and not flushed
[2012-03-24 01:32] <idnar> (at least, in my experience)
[2012-03-24 01:32] <idnar> (I have absolutely no context here though, so that's just a wild guess)
[2012-03-24 01:33] <terrycojones> idnar: that sounds plausible / in line with exarkun's ticket suggestion, thanks. you just caused me to go read what exarkun wrote a bit more closely :-)
[2012-03-24 01:54] <terrycojones> idnar: well, i still don't see what the error is. idnar context is at http://stackoverflow.com/questions/9728781/testing-a-failing-job-in-resizabledisp