This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
""" | |
Install deps: | |
$ pip install workflow | |
$ pip install celery[redis] | |
Run worker to listen to jobs: | |
$ cd path/to/this/file/ | |
$ celery -A workflow_sample worker --loglevel=info |
This file contains 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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"> | |
<responseDate>2015-01-29T13:44:13Z</responseDate> | |
<request verb="ListRecords" metadataPrefix="pos-ext_dc" set="conference:LATTICE 2013"> | |
http://pos.sissa.it/cgi-bin/oai/oai-script-spires-extended.cgi | |
</request> | |
<ListRecords> | |
<record> | |
<header> | |
<identifier>oai:pos.sissa.it:LATTICE 2013/001</identifier> |
This file contains 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
from invenio.invenio_connector import InvenioConnector | |
# 1. Connect to INSPIRE testing node | |
inspire = InvenioConnector(url="http://inspireheptest.cern.ch") | |
# 2. Do a search which returns a list of ids with the phrase "ellis" | |
res = inspire.search(p="ellis", of="intbitset") | |
# We asked for an intbitset, which is a comes over the wire as | |
# binary format - which means we convert it back to a proper intbitset |
This file contains 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
def attempt_record_match(recid): | |
""" Tries to find out if the record is already in Inspire """ | |
return perform_request_search(p="035:CDS and 035:%s" % (recid,), of="id") | |
for record in records: | |
# Step 1: Attempt to match the record to those already in Inspire | |
try: | |
recid = record['001'][0][3] | |
res = attempt_record_match(recid) |
This file contains 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
cd ~/src | |
git clone lxplus.cern.ch:/afs/cern.ch/project/inspire/repo/inspire-scripts.git | |
cd inspire-scripts | |
fab test makeinstall:myopsbranch,myinspirebranch -k |
This file contains 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
ssh inspirevm06 | |
cd /path/to/inspire/sources | |
git checkout master | |
git pull origin master | |
sudo -u apache make reset-test-ui | |
sudo service httpd restart |
This file has been truncated, but you can view the full file.
This file contains 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
Collect static from blueprints | |
apple-touch-icon-72-precomposed.png is already present! | |
apple-touch-icon-144-precomposed.png is already present! | |
favicon.ico is already present! | |
apple-touch-icon-57-precomposed.png is already present! | |
apple-touch-icon-114-precomposed.png is already present! | |
css/mejs-invenio.css is already present! | |
css/base.css is already present! | |
css/bootstrap-tagsinput.css is already present! | |
css/token-input-facebook.css is already present! |
This file contains 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
# original XML at http://www.w3.org/Math/characters/unicode.xml | |
# XSL for conversion: https://gist.github.com/798546 | |
unicode_to_latex = { | |
u"\u0020": "\\space ", | |
u"\u0023": "\\#", | |
u"\u0024": "\\textdollar ", | |
u"\u0025": "\\%", | |
u"\u0026": "\\&", |