Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:sumo="http://reliant.teknowledge.com/DAML/SUMO.owl#"
xmlns:milo="http://reliant.teknowledge.com/DAML/Mid-level-ontology.owl"
xmlns="http://www.owl-ontologies.com/unnamed.owl#"
xml:base="http://www.owl-ontologies.com/unnamed.owl">
@JaimieMurdock
JaimieMurdock / LDA Model Comparison.ipynb
Last active February 6, 2019 21:29
LDA Model Comparison Experiment
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JaimieMurdock
JaimieMurdock / Query Sampling Demo.ipynb
Created January 28, 2019 20:10
Query Sampling with InPhO Topic Explorer
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JaimieMurdock
JaimieMurdock / README.md
Last active May 14, 2018 21:06
Vonnegut Topic Explorer

Vonnegut Topic Explorer Demo

This script should download and install the InPhO Topic Explorer and HTRC Workset Toolkit, then train a Topic Explorer instance on the Kurt Vonnegut collection at the HathiTrust Digital Library.

Many thanks to Tassie Gnaidy for presenting on "Vonnegut, Bradbury, and the HathiTrust, Oh My!" at the Granfalloon: A Kurt Vonnegut Convergence, which inspired me to look up a Vonnegut collection and train a demo.

Instructions

  1. Install Anaconda Python (either Python 2.7 or 3.6. 3.6 recommended and tested)
  2. Download vonengut.sh below.
  3. Open a terminal.
  4. Type bash, followed by a space.
@JaimieMurdock
JaimieMurdock / README.md
Last active January 31, 2018 20:24
Starting Python Resources

Intro to Python

Assumes a start with Python 3.6. Python 2.7 is end of life in 2020, so new projects should avoid it.

Important PEPs

PEPs (Python Enhancement Proposals) are how new features are added to the language and are very useful for learning why things are the way they are.

Some also offer style guidance.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import csv
import wikipedia
from wikipedia.exceptions import PageError, DisambiguationError, RedirectError
from requests.exceptions import ConnectionError
import sys
import time
ISIS_URL = "http://data.isiscb.org/isis/authority/{}/"
names = dict()
@JaimieMurdock
JaimieMurdock / quote_args.py
Created July 27, 2016 21:14
Helper function for quoting command line arguments.
import platform
## Platform-independent command escape
## see http://stackoverflow.com/a/29597408
if platform.system() == 'windows':
from subprocess import list2cmdline
quote_args = list2cmdline
else:
# POSIX
from pipes import quote
{ "@graph": [
{ "@id": "http://htrc.hathitrust.org/wsid/1616876109a",
"@type" : [ "http://wcsa.htrc.illinois.edu/Workset" ] ,
"http://purl.org/dc/terms/created" : [ { "@value" : "2013-05-01" } ] ,
"http://purl.org/dc/terms/extent" : [ 5 ] ,
"http://www.europeana.eu/schemas/edm/gathers" : [ { "@id": "http://hdl.handle.net/2027/wu.89054391917"} ,
{ "@id": "http://hdl.handle.net/2027/njp.32101067492643"} ,
{ "@id": "http://hdl.handle.net/2027/hvd.hnr43u"} ,
{ "@id": "http://hdl.handle.net/2027/osu.32435014276414"} ,
{ "@id": "http://hdl.handle.net/2027/wu.89107614968"} ] ,
from tkinter import *
import random
root = Tk()
colors = ['navy', 'slate blue', 'lime green',
'purple', 'firebrick', 'salmon',
'slate gray']
# Exit button