Skip to content

Instantly share code, notes, and snippets.

View thisismattmiller's full-sized avatar
😑
...

Matt Miller thisismattmiller

😑
...
View GitHub Profile
@thisismattmiller
thisismattmiller / app.js
Created February 22, 2012 06:17
Node Express app.js for visualMOA.org
/**
* This is the Express app.js file.
*/
/**
* Module dependencies.
*/
var express = require('express'),
routes = require('./routes'),
underscore = require('underscore');
@thisismattmiller
thisismattmiller / gist:1882090
Created February 22, 2012 06:21
Client for visualMOA.org
vmoa = {
searchMainTerm: null, //the inital search term
searchSecondTerm: null, //the refined search term
searchSecondType: null, //the refined part of speach of that search term
searchThirdYear: null, //the year selected from the n-Gram
searchThirdTerm: null, //the connected term selected from the ngram page (like the top 10 word)
searchThirdType: null, //the part of speach of the seelcted connected word
@thisismattmiller
thisismattmiller / gist:1882244
Created February 22, 2012 06:27
Script to parse visualMOA.org SGML files using NLTK
#!/usr/bin/env python
import optparse
import sys
from lxml import etree
import time
import nltk
from pymongo import Connection
import os
import hashlib
@thisismattmiller
thisismattmiller / gist:7e1ba42724f88411ed2f
Last active August 29, 2015 14:16
Python script for querying our MMS MongoDB data
from pymongo import MongoClient
from bson.code import Code
import json, re
def query():
database = "mms"
collection = "mods"
{
"collection_id": 4591,
"container": [
{
"type": "box",
"value": "12"
},
{
"type": "folder",
"value": "11"
{
"container": [
{
"type": "box",
"value": "12"
},
{
"type": "folder",
"value": "11"
}
{
"d_id": 1234,
"d_type": "",
"uuid": "",
"collection_name": "",
"collection_uuid": "",
"container_name": "",
"container_uuid": "",
"seq_total": 12,
"sib_seq": 1,
@thisismattmiller
thisismattmiller / gist:1fd05958f5adc3a5b766
Created April 28, 2015 15:26
Sierra Catalog API Dump
{
"author": "New York Public Library. Emmet Collection.",
"bibLevel": {
"code": "m",
"value": "MONOGRAPH"
},
"catalogDate": "2000-11-03",
"country": "New York (State)",
"createdDate": "2008-12-16T03:52:01Z",
"deleted": false,
{
"d_id": 3015063,
"d_type": "Item",
"id": 3212468,
"solr_doc_hash": {
"collection_name": "Billy Rose Theatre Collection photograph file",
"collection_uuid": "2589a880-c52c-012f-2cb4-58d385a7bc34",
"container_name": "Lina Abarbanell",
"container_uuid": "29a24350-c52c-012f-73d9-58d385a7bc34",
"desc_md_status": "approved",
{
"viafId": "27066713",
"nameType": "Personal",
"primaryTopic": "http://viaf.org/viaf/27066713",
"recordLength": 5785,
"birthDate": "1922-03-12",
"deathDate": "1969-10-21",
"dateType": "lived",
"mainHeadingsData": [
{