I hereby claim:
- I am cgranade on github.
- I am cgranade (https://keybase.io/cgranade) on keybase.
- I have a public key whose fingerprint is 7950 2540 D90E 791F A91F 6AFC 7B70 49DA 0677 5403
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:d7454350e8574bbb2d317221e2bcdea00fd12b8579a7168fea3b30a93785dc20" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
// ==UserScript== | |
// @name Link arXiv → SciRate | |
// @namespace http://www.cgranade.com/ | |
// @version 0.1 | |
// @description Adds links to SciRate from arXiv papers. | |
// @match http://arxiv.org/abs/* | |
// @copyright 2015+, You | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js | |
// ==/UserScript== |
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ |
(*Suppose that data is stored in a CSV-like format, with newline-delimted rows of comma-separated fields.*) | |
StringSplit[#, ","]& /@ StringSplit["a,b,c\nd,e,f", "\n"] | |
(*If certain fields are missing, then let's suppose this is represented by an empty string as the contents for that field.*) | |
StringSplit[#, ","]& /@ StringSplit["a,,c\nd,e,f", "\n"] | |
(*This is inconvienent, so let's write a function to parse that as the special values Missing[].*) | |
MarkMissingValues[dataStr_] := Map[ | |
Function[row, StringSplit[row, ","]], | |
StringSplit[dataStr, "\n"] |
\documentclass[aps,pra,twocolumn,superscriptaddress,nofootinbib]{revtex4-1} | |
%============================================================================= | |
% BEGIN UNFORGIVABLE HACKS | |
%============================================================================= | |
\makeatletter | |
\def\@bibdataout@aps{% | |
\immediate\write\@bibdataout{% | |
@CONTROL{% | |
apsrev41Control,author="08",editor="1",pages="0",title="0",year="1"% |
function get_ifaces(component) { | |
// WARNING: This is implemented in a stupid way. | |
var nsis = Components.interfaces.nsISupports; | |
var cc = Components.classes; | |
var clazz = cc[component].createInstance(nsis); | |
var ifaces = Array(); | |
for each (iface in Components.interfaces) { | |
if (clazz instanceof iface) { |