Skip to content

Instantly share code, notes, and snippets.

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<collection xmlns="http://www.loc.gov/MARC21/slim">
<record>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="9">arXiv</subfield>
<subfield code="a">oai:arXiv.org:1611.05165</subfield>
</datafield>
<datafield tag="037" ind1=" " ind2=" ">
<subfield code="9">arXiv</subfield>
<subfield code="a">arXiv:1611.05165</subfield>
#!/usr/bin/python
##########################################################
## grpbibedit.py
## pulls data down from RT
## 2013-05-11 created by BH
## 2014 adapted by MS
## 2015-06-16 updated by BH
##
## hosted at:
## test: https://tislnx3.slac.stanford.edu/cgi-bin/testgrpbibedit.py
@kaplun
kaplun / merged_records.xml
Created September 27, 2016 11:37
Example of two merged records from Legacy
<collection>
<record>
<controlfield tag="001">1486099</controlfield>
<controlfield tag="005">20160914115512.0</controlfield>
<datafield tag="035" ind1=" " ind2=" ">
<subfield code="9">INSPIRETeX</subfield>
<subfield code="a">Humbert:2016xbp</subfield>
</datafield>
<datafield tag="100" ind1=" " ind2=" ">
<subfield code="a">Humbert, Pascal</subfield>
ERROR: duplicate usage of INSPIRE:INSPIRE-00573420: http://inspirehep.net/record/1052142 (ORIGINAL_BAI:J.J.Salzer.1, recid:1052142, INSPIRE:INSPIRE-00573420, BAI:J.J.SALZER.1) Vs. http://inspirehep.net/record/1259206 (recid:1259206, INSPIRE:INSPIRE-00573420)
ERROR: duplicate usage of INSPIRE:INSPIRE-00572633: http://inspirehep.net/record/1274531 (ORIGINAL_BAI:Fang.Ye.1, ORCID:0000-0001-5285-9931, recid:1274531, INSPIRE:INSPIRE-00572633, BAI:FANG.YE.1) Vs. http://inspirehep.net/record/1484772 (CERN:CERN-773282, recid:1484772, INSPIRE:INSPIRE-00572633)
ERROR: duplicate usage of INSPIRE:INSPIRE-00572641: http://inspirehep.net/record/1273411 (ORIGINAL_BAI:C.Gnendiger.1, recid:1273411, INSPIRE:INSPIRE-00572641, BAI:C.GNENDIGER.1) Vs. http://inspirehep.net/record/1484774 (CERN:CERN-806189, recid:1484774, INSPIRE:INSPIRE-00572641)
ERROR: duplicate usage of INSPIRE:INSPIRE-00573430: http://inspirehep.net/record/1279254 (ORIGINAL_BAI:D.A.Takahashi.1, recid:1279254, INSPIRE:INSPIRE-00573430, BAI:D.A.TAKAHASHI.1) Vs. ht
#!/usr/bin/env python
import requests
import csv
import time
import click
import shelve
from urllib import quote
@kaplun
kaplun / 462477.json
Created August 16, 2016 08:03
Example of impact graph response from inspirehep
{
"inspire_id": "462477",
"title": "Maps of dust IR emission for use in estimation of reddening and CMBR foregrounds",
"citations": [
{
"inspire_id": "1385065",
"title": "The Light Curve of the Macronova Associated With the Long\u2013short Burst GRB 060614",
"citation_count": 0,
"year": "2015"
},
@kaplun
kaplun / snippet_of_marc.xml
Created July 7, 2016 12:01
snippet of marcxml for Mihai
<record><datafield tag="700" ind1=" " ind2=" "><subfield code="a">Ciao</subfield></datafield><datafield tag="700" ind1=" " ind2=" "><subfield code="a">Mihai</subfield><subfield code="a">Mihai</subfield></datafield><datafield tag="700" ind1=" " ind2=" "><subfield code="a">Bivol</subfield></datafield><datafield tag="100" ind1=" " ind2=" "><subfield code="a">Sam</subfield></datafield></record>
@kaplun
kaplun / 0_reuse_code.js
Created July 7, 2016 07:29
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
There are only 'skip'ped commits left to test.
The first bad commit could be any of:
1a37c54216e3ae3256a6321cb49cee13bc1d9993
47cb256ce2c5acaa272d49860a023e980db8763b
648a7d088c42cf59a4610b914aea21f45a9fc6db
b4b12e82e6cc9a3be4698d0abfff5c4288efe8c5
c9bafb85820cb5dce4474bab7b1043d17aca2c45
feb3732d275d556c5f77950e1947686a5a010f71
517928cf1e8c99800f375a98594b237aabc77d54
ef709cd37c143e736c1cde0a327432da34b220ab
14401047 function calls (13647928 primitive calls) in 879.393 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
7523 875.234 0.116 876.720 0.117 bd1xx.py:79(authors)
9993772 0.802 0.000 0.802 0.000 {method 'append' of 'list' objects}
742396/1230 0.517 0.000 0.785 0.001 utils.py:97(strip_empty_values)
1677726 0.320 0.000 0.320 0.000 {isinstance}
22636/11368 0.315 0.000 0.995 0.000 utils.py:141(__new__)