Skip to content

Instantly share code, notes, and snippets.

Avatar

Jim Duran jimdur8n

View GitHub Profile
View seriesTitle.xq
declare function local:seriesTitle($Network as xs:string?,$seriesTitle as xs:string){
if ($Network = "ABC")
then $seriesTitle := "ABC World News Tonight"
else if ($Network = "CBS")
then $seriesTitle := "CBS Evening News"
else if ($Network = "NBC")
then $seriesTitle := "NBC Nightly News"
return $seriesTitle
@jimdur8n
jimdur8n / transcriptParsing
Created Oct 31, 2018
This is the format of my two lists.
View transcriptParsing
startTimes = [0.0, 200.0, 230.0, 270.0, 370.0, 580.0, 680.0, 700.0, 900.0]
transcript = [[3.91, 'And'], [4.08, 'how'], [4.26, 'much'], [4.58, 'longer'], [5.11, 'do'], [5.38, 'we'], [5.58, 'have'], [5.83, 'to'], [5.97, 'endure'], [6.63, 'the'], [6.82, 'burden'], ['', '?'], [7.91, "That's"], ['', ','], [8.18, 'immoral'], [8.81, 'war'], ['', '.'], [10.56, 'And'], [10.99, 'i'], [11.28, 'walked'], [11.73, 'at'], [11.89, 'this'], [12.18, 'great'], [12.63, 'party'], [13.0, 'of'], [13.17, 'ours'], [14.76, 'is'], [15.08, 'not'], [15.44, 'trying'], [16.02, 'to'], [16.11, 'turn'], [16.54, 'the'], [16.69, 'clock'], [17.06, 'back'], [17.44, 'to'], [17.54, 'the'], [17.61, 'nineteen'], [18.29, 'thirty'], [18.75, 'eight'], ['', '.'], [20.41, 'They'], [20.62, 'seek'], [20.96, 'another'], [21.46, 'chamber'], ['', ','], [21.91, 'london'], ['', ','], [22.34, 'goto'], ['', ','], [22.74, 'another'], [23.12, 'immunity'], ['', '.'], [30.22, 'Surrender'], ['', '.'], [33.61, 'A'], [33.65, 'total'], [34.01, 'of'], [34.14, 'people'], [3
View keybase.md

Keybase proof

I hereby claim:

  • I am jimdur8n on github.
  • I am jimdur8n (https://keybase.io/jimdur8n) on keybase.
  • I have a public key ASDSka_78KXYv9D9eYnar5xNiIK8ShV62MhM-UE7Of8olgo

To claim this, I am signing this object:

View xQuery_day5
let $x := 1
let $array := array{0,3,0,-1,-3,999}
let $counter := array{0 to 10}
for $i in $counter
where $i <= $x
return
if ($array($x) != 999)
then
(
$array($x)
@jimdur8n
jimdur8n / ASpace auth python
Created Feb 26, 2018 — forked from zachary-johnson/ASpace auth python
Authenticating portion of ArchivesSpace Python scripts
View ASpace auth python
import json
import requests
import secrets
import time
startTime = time.time()
baseURL = secrets.baseURL
user = secrets.user
password = secrets.password