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
xquery version "3.0"; | |
declare namespace tei = "http://www.tei-c.org/ns/1.0"; | |
declare namespace mods = "http://www.loc.gov/mods/v3"; | |
let $tei := fn:doc("db/test/tei.xml") | |
let $fileDesc := $tei/tei:TEI/tei:teiHeader/tei:fileDesc | |
let $title := $fileDesc/tei:titleStmt/tei:title/text() | |
let $name := $fileDesc/tei:titleStmt/tei:author/text() | |
let $language := $fileDesc/tei:sourceDesc/tei:p/string(@xml:lang) | |
let $place := $fileDesc/tei:publicationStmt/tei:pubPlace/text() |
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
xquery version "3.0"; | |
for $day in (1 to 7) | |
return switch ($day) | |
case 1 return "Monday" | |
case 2 return "Tuesday" | |
case 3 return "Wednesday" | |
case 4 return "Thursday" | |
case 5 return "Friday" | |
case 6 return "Saturday" |
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
xquery version "3.0"; | |
declare namespace tei = "http://www.tei-c.org/ns/1.0"; | |
let $doc := | |
<TEI xmlns="http://www.tei-c.org/ns/1.0"> | |
<teiHeader type="text"> | |
<fileDesc> | |
<titleStmt> | |
<title>Testing XPath</title> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>GeoJson Experiments</title> | |
<!-- CSS for MapBox --> | |
<link href='https://api.tiles.mapbox.com/mapbox.js/v1.6.2/mapbox.css' rel='stylesheet' /> | |
<!-- Javascript for MapBox --> | |
<script src='https://api.tiles.mapbox.com/mapbox.js/v1.6.2/mapbox.js'></script> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>GeoJson Experiments</title> | |
<!-- CSS for MapBox --> | |
<link href='https://api.tiles.mapbox.com/mapbox.js/v1.6.2/mapbox.css' rel='stylesheet' /> | |
<!-- Javascript for MapBox --> | |
<script src='https://api.tiles.mapbox.com/mapbox.js/v1.6.2/mapbox.js'></script> |
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
# Uses the 'wordcloud' library to generate a simple wordcloud from a two column CSV file | |
library("wordcloud", lib.loc="/Library/Frameworks/R.framework/Versions/2.15/Resources/library") | |
words <- read.csv(file.choose(), header=FALSE) | |
top <- subset(words, V2 > 100) | |
pal <- brewer.pal(8, "Accent") | |
wordcloud(top$V1, top$V2, colors=pal) |
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
ggplot(shakes, aes(x=Count, y=reorder(Character, Count), colour=Gender)) + geom_point(size=3) + theme_bw() + theme(panel.grid.major.x = element_blank(), panel.grid.minor.x = element_blank(), panel.grid.major.y = element_line(colour="grey60", linetype="dashed")) + ylab("Character") + labs(title="Words Per Speaker in Much Ado about Nothing") |
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
httpclient:post(xs:anyURI("http://access.alchemyapi.com/calls/text/TextGetRankedNamedEntities"), "apikey=[YOURKEYHERE]&text=" || $text, false(), ()) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>GeoJSON Experiments</title> | |
<!-- Javascript for MapBox --> | |
<script src='https://api.tiles.mapbox.com/mapbox.js/v1.6.2/mapbox.js'></script> | |
<!-- CSS for MapBox --> | |
<link href='https://api.tiles.mapbox.com/mapbox.js/v1.6.2/mapbox.css' rel='stylesheet' /> | |
<!-- CDN for JQuery --> |