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
# read in the json and get the graph of places | |
import json | |
with open('pleiades-places-latest.json', 'r', encoding='utf-8') as f: | |
pj = json.load(f) | |
graph = pj['@graph'] | |
# iterate through the graph and test each place for a TM reference | |
for place in graph: | |
references = place['references'] | |
tm_geoids = [r['accessURI'] for r in references if 'trismegistos' in r['accessURI']] |
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"?> | |
<?oxygen RNGSchema="http://www.stoa.org/epidoc/schema/latest/tei-epidoc.rng" type="xml"?> | |
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:id="m59749"> | |
<teiHeader> | |
<fileDesc> | |
<titleStmt> | |
<!-- NEW: Display name --> | |
<title>name for Display</title> | |
</titleStmt> | |
<publicationStmt> |
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 fiona | |
with fiona.open(countries_fn, 'r') as f: | |
countries = list(f) | |
driver = f.driver | |
crs = f.crs | |
schema = f.schema | |
print( | |
'Read {} country geometries from "{}". ' | |
'driver: {}, crs: {}, schema: {}'.format( | |
len(countries), countries_fn, driver, crs, schema)) |
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 json | |
from shapely.geometry import MultiPoint, MultiPolygon, Point, Polygon, shape | |
with open(args.placefile, 'r') as f: | |
pj = json.load(f) | |
places = [] | |
for i, pd in enumerate(pj['@graph']): | |
try: | |
if i >= limit: | |
break |
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
subprocess.run( | |
[ | |
'saxon', | |
'-s:{0}'.format(filepath), | |
'-xsl:{0}'.format('meta2dc.xsl'), | |
'-o:{0}'.format(os.path.join(out_dir, 'dublin_core.xml')) | |
] | |
) |
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
<xsl:variable | |
name="mixed-collation" | |
select="concat('http://saxon.sf.net/collation?rules=', | |
encode-for-uri('< 0 < 1 < 2 < 3 < 4 < 5 < 6 < 7 < 8 < 9 < a,A < b,B < c,C < d,D < e,E < f,F < g,G < h,H < i,I < j,J < k,K < l,L < m,M < n,N < o,O < p,P < q,Q < r,R < s,S < t,T < u,U < v,V < w,W < x,X < y,Y < z,Z & A = Á & A = Ä & A = Ẵ & A = Ằ & C = Ç & D = Đ & E = É & E = Ễ & O = Ö & a = à & a = á & a = â & a = ä & ae = æ & c = ç & e = è & e = é & e = ê & i = í & i = î & i = ï & n = ñ & o = ó & o = ô & o = ö & o = ø & u = û & u = ü & c = č & e = ē & g = ğ & i = ĭ & i = İ & i = ı & l = ł & n = ń & o = ō & s = ś & s = ş & S = Š & s = š & H = Ḥ & h = ḥ & H = Ḫ & h = ḫ & K = Ḳ & k = ḳ & s = ṣ & T = Ṭ & |
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
08:21:08,125 INFO StreamingUpdateSolrServer:99 - starting runner: org.apache.solr.client.solrj.impl.StreamingUpdateSolrServer$Runner@10d0dd7 | |
08:21:09,961 ERROR StreamingUpdateSolrServer:296 - error | |
java.net.SocketException: Broken pipe | |
at java.net.SocketOutputStream.socketWrite0(Native Method) | |
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109) | |
at java.net.SocketOutputStream.write(SocketOutputStream.java:153) | |
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) | |
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) | |
at org.apache.commons.httpclient.ChunkedOutputStream.flush(ChunkedOutputStream.java:191) | |
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297) |
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
Feb 05, 2015 11:57:28 AM org.apache.solr.core.QuerySenderListener newSearcher | |
INFO: QuerySenderListener sending requests to Searcher@10d8868 main | |
Feb 05, 2015 11:57:28 AM org.apache.solr.common.SolrException log | |
SEVERE: org.apache.solr.common.SolrException: no field name specified in query and no defaultSearchField defined in schema.xml | |
at org.apache.solr.search.SolrQueryParser.checkNullField(SolrQueryParser.java:123) | |
at org.apache.solr.search.SolrQueryParser.getFieldQuery(SolrQueryParser.java:131) | |
at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1421) | |
at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1309) | |
at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1237) | |
at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1226) |
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
root@isaw2:/usr/local/tomcat-solr/logs | |
$ export SOLR_SH=/usr/local/tomcat-solr/bin/catalina.sh | |
root@isaw2:/usr/local/tomcat-solr/logs | |
$ su -s /bin/sh tomcat -c "$SOLR_SH start" | |
Using CATALINA_BASE: /usr/local/tomcat-solr | |
Using CATALINA_HOME: /usr/local/tomcat-solr | |
Using CATALINA_TMPDIR: /usr/local/tomcat-solr/temp | |
Using JRE_HOME: /usr | |
Using CLASSPATH: /usr/local/tomcat-solr/bin/bootstrap.jar:/usr/local/tomcat-solr/bin/tomcat-juli.jar |
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 | |
# -*- coding: utf-8 -*- | |
""" | |
regularize filenames | |
""" | |
import argparse | |
from functools import wraps | |
import logging | |
import os |
NewerOlder