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/python2 | |
''' Takes an address as args and prints the county from MelissaData.com | |
Usage: | |
./county.py 1234 Fake Street, Sometown, CA 12345 | |
Works with quotes, too: |
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/python2 \ | |
''' specify a csv file as a command line argument. | |
creates a new csv with addresses replaced with counties. | |
skips users who throw errors and outputs their details to ./err |
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
class MARCRel < RDF::Vocabulary("http://id.loc.gov/vocabulary/relators/") | |
property :act | |
property :adp | |
property :anl | |
property :anm | |
property :ann | |
property :app | |
property :arc | |
property :arr | |
property :acp |
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
## | |
# PREMIS Vocabulary | |
# | |
# @see http://multimedialab.elis.ugent.be/users/samcoppe/ontologies/Premis/premis.owl | |
class PREMIS < Vocabulary("http://multimedialab.elis.ugent.be/users/samcoppe/ontologies/Premis/premis.owl#") | |
# Object Properties | |
property :contentLocation | |
property :creatingApplication | |
property :dependency | |
property :derivationalRelationship |
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 count = 0; | |
var interId = 0; | |
function lotto() { | |
clearInterval(interId); | |
interId = setInterval("choosename()", 80); | |
count = 0; | |
} | |
function choosename(names) { |
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
require 'bagit' | |
module Hybag | |
module Baggable | |
def write_bag(path = '') | |
raise Exception if self.pid == '__DO_NOT_USE__' | |
# delete any existing bags before making a new one | |
self.delete_bag(path) |
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
import solr | |
import json | |
from pyes import ES | |
from progressbar import ProgressBar, Percentage, Bar | |
types = { | |
0:"BITSTREAM", | |
1:"BUNDLE", | |
2:"ITEM", | |
3:"COLLECTION", |
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
(ENV)tjohnson@alonzo:~/src/twarc$ ./twarc.py '@sendgrid' | |
(ENV)tjohnson@alonzo:~/src/twarc$ cat '@sendgrid-20130321132859.json' | utils/times.py | uniq -c | |
4373 2013-03-21 | |
311 2013-03-20 | |
83 2013-03-19 | |
32 2013-03-18 | |
5 2013-03-17 | |
4 2013-03-16 | |
45 2013-03-15 |
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
module Hybag | |
class BagImportError < StandardError | |
end | |
end |
OlderNewer