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
<# | |
Requires Stanford NER, Java 1.8+ | |
formats = slashTags, inlineXML, xml, tsv, tabbedEntities | |
#> | |
param( | |
[Parameter(Mandatory=$true,Position=0)] | |
[string]$file, | |
[Parameter(Mandatory=$true,Position=1)] |
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
<# | |
parse tsv | |
Categories: person, location, organization, misc, money, percent, date, time (depending on classifier used to produce the tsv) | |
Outfile: Results written to console if outfile not provided. If all categories, outfile is used as a filename template. | |
#> | |
param( | |
[Parameter(Mandatory=$true,Position=0)] |
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
<# | |
create-jetty-service.ps1 | |
This script needs to be run once, to create the service. | |
Service name is mandatory. | |
Requires nssm.exe (Non-Sucking Service Manager https://nssm.cc). | |
The script assumes it is located in the Solr 5.x \bin folder with solr.cmd. | |
N.B. This operation requires elevated permissions. Either run script from Admin version of PS console, or allow to run when it asks. | |
-- Peter Tyrrell |
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
andi.highlightTerms = []; | |
andi.highlight = function (el, terms) { | |
if (terms === null || terms.length === 0) return; | |
var term = terms.join('|'); | |
var regex = new RegExp('\\b('+term+')\\b', 'gi'); | |
if (el.innerHTML.match(regex) !== null) { | |
el.innerHTML = el.innerHTML.replace(regex, '<b>$1</b>'); | |
el.classList === true ? el.classList.add('highlighted') : el.className += ' ' + 'highlighted'; | |
} |
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-16"?> | |
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
<RegistrationInfo> | |
<Date>2015-08-05T09:01:28.0362962</Date> | |
<Author>ANDORNOT\peter-admin</Author> | |
<Description>Run if Application Event Id 1000, or Event Id 1309 (Unhandled exception). Wait 30-60s. Do not run if task already running.</Description> | |
</RegistrationInfo> | |
<Triggers> | |
<EventTrigger> | |
<Enabled>true</Enabled> |
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
USE [name-of-db] | |
go | |
declare @cols AS NVARCHAR(MAX) | |
, @query AS NVARCHAR(MAX) | |
, @dechunkedRecords AS NVARCHAR(MAX) | |
, @where AS NVARCHAR(MAX); | |
set @where = '' | |
/*set @where = 'where _RecordID in ( |
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
<# | |
Backs up Inmagic textbases, both SQL Server db and relevant textbase files. | |
Peter Tyrrell, Andornot, www.andornot.com | |
sqlps dependency | |
If module sqlps does not exist, install from: | |
Microsoft SQL Server 2016 Feature Pack (https://www.microsoft.com/en-us/download/details.aspx?id=52676) | |
- SQLSysClrTypes.msi | |
- SharedManagementObjects.msi | |
- PowershellTools.msi |
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
<# | |
Picks up zip files in a given folder and extracts the contents to a destination folder. | |
Peter Tyrrell, Andornot | |
#> | |
param( | |
[Parameter(Mandatory=$true,Position=0)] | |
[string]$in, | |
[Parameter(Mandatory=$false,Position=1)] | |
[string]$out = ".", |
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
<# | |
Purges illegal XML characters from XML files in provided folder (and its subfolders). | |
Encodes out file as UTF8 without BOM. | |
Peter Tyrrell, Andornot | |
#> | |
param ( | |
[string]$indir | |
) |
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
<# | |
Generates a CREATE/INSERT script for a given SQL Server db table (e.g. Localizations) | |
Peter Tyrrell, Andornot, www.andornot.com | |
sqlps dependency | |
If module sqlps does not exist, install from: | |
Microsoft SQL Server 2016 Feature Pack (https://www.microsoft.com/en-us/download/details.aspx?id=52676) | |
- SQLSysClrTypes.msi | |
- SharedManagementObjects.msi | |
- PowershellTools.msi |