Skip to content

Instantly share code, notes, and snippets.

View adjam's full-sized avatar
💭
Setting my GitHub status

Adam Constabaris adjam

💭
Setting my GitHub status
  • NC State University Libraries
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<schema name="example-data-driven-schema" version="1.6">
<uniqueKey>id</uniqueKey>
<fieldType name="date" class="solr.TrieDateField" positionIncrementGap="0" docValues="true" precisionStep="0"/>
<fieldType name="dates" class="solr.TrieDateField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="0"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" docValues="true"/>
<fieldType name="strings" class="solr.StrField" sortMissingLast="true" docValues="true" multiValued="true"/>
<fieldType name="tdate" class="solr.TrieDateField" positionIncrementGap="0" docValues="false" precisionStep="6"/>
<fieldType name="tdates" class="solr.TrieDateField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="6"/>
2016-11-07 12:21:46,417 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0059: Class Path entry jaxb-api.jar in /symphony.war/WEB-INF/lib/jaxb-impl-2.2.1.1.jar does not point to a valid jar for a Class-Path reference.
2016-11-07 12:21:46,418 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0059: Class Path entry activation.jar in /symphony.war/WEB-INF/lib/jaxb-impl-2.2.1.1.jar does not point to a valid jar for a Class-Path reference.
2016-11-07 12:21:46,418 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0059: Class Path entry jsr173_1.0_api.jar in /symphony.war/WEB-INF/lib/jaxb-impl-2.2.1.1.jar does not point to a valid jar for a Class-Path reference.
2016-11-07 12:21:46,418 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0059: Class Path entry jaxb1-impl.jar in /symphony.war/WEB-INF/lib/jaxb-impl-2.2.1.1.jar does not point to a valid jar for a Class-Path reference.
2016-11-07 12:21:46,681 WARN [org.jboss.as.ee] (M
require 'fiber'
module Spofford
class Stage
attr_accessor :source, :name
def initialize(options = {},&block)
@transformer ||= method(:transform)
@filter ||= method(:filter)
@fiber_delegate = Fiber.new do
@adjam
adjam / extract_ice.py
Last active September 21, 2016 20:39
Extract TOCs from Syndetics ICE XML
#!/usr/bin/python
from lxml import etree
import glob
import json
import re
class Cleaner(object):
@adjam
adjam / tosolr.py
Last active September 14, 2016 19:00
Solr Schema "autogeneration" from Endeca Mappings spreadsheet
#!/usr/bin/env python3
import sys
from lxml import objectify, etree
import itertools
from csv import DictReader
# mnemonic for a widely used dictionary key
@adjam
adjam / RecordIterator.java
Created September 8, 2016 19:34
Java decorator for marc4j MarcReader class to allow it to be using as an Iterator or a Java 8 Stream
package edu.example.lib.marc;
import org.marc4j.MarcReader;
import org.marc4j.marc.Record;
import java.util.Iterator;
import java.util.Spliterator;
import java.util.Spliterators;
import java.util.function.Consumer;
import java.util.stream.Stream;
@adjam
adjam / pager.py
Created September 1, 2016 00:48
Example of how to iterate over solr results as if it's just a list of documents
#!/usr/bin/python
from random import randint
class QueryResult(object):
"""Mock representation of a set of matching results to a query"""
def __init__(self,query,max_results):
self.query = query
self.count = randint(1,max_results)
@adjam
adjam / CONTRIBUTING.md
Last active December 8, 2015 17:11
OLE README.md drafts

Contributing to OLE

This project is new to GitHub and our process for pull requests is under development. Please watch this space for updates. In the meantime, if you are interested in collaborating with the OLE project, please contact Heather Beery, the project manager, at hbeery AT iu dot edu

Kuali OLE is distributed under the Educational Community License, version 2.0 (ECL 2.0), and all contributions must be distributable under that license. In order to do this, we require that contributors sign a Contributor License Agreement (CLA), which will need to be submitted to the Kuali Foundation. In addition, the Kuali Foundation requires each institution that employs contributors to sign a Corporate Contributor License Agreement (CCLA). For details, see the [License Agreement Process](http

@adjam
adjam / ole_fix_default_chart.sql
Last active November 6, 2015 15:46
SQL to give default chart of accounts a code that allows it to be edited. Replace 'NC' with a code that makes sense to you.
set foreign_key_checks = 0;
-- assumes 'bootstrap' chart was loaded with '01' as the code; the UI will reject this as invalid, so you need a non-numeric code
-- find/replace all occurrences of 'NC' with alphabetic code that makes sense to you.
update ca_chart_t SET FIN_COA_CD = 'NC' WHERE FIN_COA_CD = '01';
UPDATE ap_neg_pmt_rqst_aprvl_lmt_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ap_pmt_rqst_acct_chg_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ap_pmt_rqst_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ap_sum_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
@adjam
adjam / marc-form-stub.html
Last active October 27, 2015 18:35
HTML and JS snippets for the basis of an HTML-based MARC editor that uses MARC-in-JSON format.
<form id="marcForm">
<div class="leader">
<!-- imagine all that leader stuff in here -->
</div>
<div class="field controlField" id="[ some-autogenerated-id ]">
<label>Tag <input type="text" name="tag" pattern="[0-9]{3}">&nbsp; <input type="text" name="data" />
</div>
<div class="field dataField" id="[some-autogenerated-id]>