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
var Queue = function() { | |
var reqs = [], | |
dfds = []; | |
function run() { | |
var next = reqs.shift(); | |
if (next) { | |
$.ajax(next); | |
} | |
} |
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"?> | |
<xsl:stylesheet version="2.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:marc="http://www.loc.gov/MARC21/slim" | |
xmlns:fn="http://libraries.mit.edu/xslt/functions"> | |
<xsl:template match="/"> | |
<add> | |
<xsl:apply-templates select="marc:collection/marc:record" /> |
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
/** | |
* This module allows you to inject test stubs into the module loading process | |
* during jasmine unit testing. | |
*/ | |
define(["underscore"], function(_) { | |
var uid = 0; | |
function defineMock(mockid, mock) { | |
define(mockid, function() { |
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
#!/usr/bin/env python | |
######################## | |
# | |
# @TODO: Location field in current Solr index has both libRecord and mapRecord - | |
# should there be both or just libRecord? | |
# | |
######################## | |
from lxml import etree | |
import sys |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
import fileinput | |
import sys | |
import json | |
import apachelog | |
parser = apachelog.parser(apachelog.formats['extended']) |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
import json | |
import sys | |
from datetime import timedelta, datetime | |
from random import randint, choice | |
countries = ('US', 'GB', 'FR', 'DE',) | |
dlc = ('CSAIL', 'DUSP', 'Lincoln Lab',) |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
import fileinput | |
import json | |
from datetime import datetime | |
import time | |
from pymongo import MongoClient | |
def get_collection(conn=None): |
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"?> | |
<config> | |
<luceneMatchVersion>4.5</luceneMatchVersion> | |
<dataDir>${solr.data.dir:}</dataDir> | |
<directoryFactory name="DirectoryFactory" | |
class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}" /> |
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
#!/usr/bin/env bash | |
#### | |
# ./dedup FROM TO | |
# | |
# move duplicate emails from FROM to TO | |
#### | |
duplicates=$(grep --no-filename -rE "^To:\s[[:alpha:]]+" $1 | sort | uniq -c | \ |
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
# -*- coding: utf-8 -*- | |
""" | |
>>> root = etree.Element('foo') | |
>>> el = get_path('bar/baz', root).text = 'foobaz' | |
>>> etree.tostring(root) | |
'<foo><bar><baz>foobaz</baz></bar></foo>' | |
>>> get_path('bar/gaz', root).text = 'foogaz' | |
>>> etree.tostring(root) | |
'<foo><bar><baz>foobaz</baz><gaz>foogaz</gaz></bar></foo>' | |
""" |
OlderNewer