This file contains hidden or 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
| ### Query to find all postcodes that reference Glasgow City as their District | |
| ### and return postcode uri, label and geocoding | |
| ### 2014-03-03 | |
| ### Peter Winstanley | |
| PREFIX admingeo: <http://data.ordnancesurvey.co.uk/ontology/admingeo/> | |
| PREFIX foaf: <http://xmlns.com/foaf/0.1/> | |
| PREFIX gaz: <http://data.ordnancesurvey.co.uk/ontology/50kGazetteer/> | |
| PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> | |
| PREFIX geometry: <http://data.ordnancesurvey.co.uk/ontology/geometry/> | |
| PREFIX georss: <http://www.georss.org/georss/> |
This file contains hidden or 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
| from __future__ import print_function | |
| import numpy as np | |
| import pandas as pd | |
| import nltk | |
| import re | |
| import os | |
| import codecs | |
| from sklearn import feature_extraction | |
| import mpld3 |
This file contains hidden or 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 requests | |
| import matplotlib.pyplot as plt | |
| from wordcloud import WordCloud, STOPWORDS | |
| import sys | |
| uris = [ | |
| 'http://www.w3.org/2013/share-psi/wiki/Best_Practices/Cross_Agency_Strategy', | |
| 'http://www.w3.org/2013/share-psi/wiki/Best_Practices/High_Level_Support', |
This file contains hidden or 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
| Option Explicit | |
| Const strLogPath As String = "C:\PathForLogFiles\" | |
| Const crawlStart As String = "J:\StartingDirectoryPath" | |
| ' | |
| Const MaskPP = "*.pp*" | |
| Const MaskXL = "*.xl*" | |
| Const MaskDoc = "*.doc*" | |
This file contains hidden or 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
| let fileCount=1000 | |
| let dirNum=1 | |
| for f in * | |
| do | |
| [ -d $f ] && continue | |
| [ $fileCount -eq 1000 ] && { | |
| dir=$(printf "%03d" $dirNum) | |
| mkdir $dir | |
| let dirNum=$dirNum+1 |
This file contains hidden or 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
| declare function core:get-filename($uri as xs:string) { | |
| fn:tokenize($uri, "/")[last()] | |
| }; |
This file contains hidden or 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
| declare function core:text-to-lines($text) { | |
| let $lines := tokenize($text, '\n') | |
| return $lines | |
| }; |
This file contains hidden or 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
| <xf:submission id="s2" method="get" replace="instance" targetref="instance('list')"> | |
| <xf:resource value="concat('/exist/rest/db/apps/stats21/views/report-view.xquery?t=',substring(string(digest( string( random( true ) ), 'MD5', 'hex' )), 1, 8))"/> | |
| </xf:submission> |
This file contains hidden or 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
| <xf:select1 ref="instance('policeforce')/selectedforce" selection="closed" > | |
| <xf:itemset nodeset="instance('report-transformed')/body//tr[not(td[3] = preceding-sibling::tr/td[3])]"> | |
| <xf:label ref="td[3]" /> | |
| <xf:value ref="td[3]" /> | |
| </xf:itemset> | |
| </xf:select1> |
This file contains hidden or 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 option exist:serialize "method=xhtml media-type=text/xml indent=yes process-xsl-pi=no"; | |
| let $attribute := request:set-attribute("betterform.filter.ignoreResponseBody", "true") | |
| (: look at https://github.com/orbeon/eXist-1.4.x/blob/master/webapp/xforms/tasks/todo-list.xml :) | |
| let $form := <html xmlns="http://www.w3.org/1999/xhtml" | |
| xmlns:ev="http://www.w3.org/2001/xml-events" | |
| xmlns:xforms="http://www.w3.org/2002/xforms" | |
| xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
OlderNewer