Skip to content

Instantly share code, notes, and snippets.

@wragge
wragge / similar-years.md
Last active May 4, 2017 03:20
Which years are similar to others (according to TF-IDF)?

1970

* 1971                                     0.999590684514
* 1969                                     0.999531189763
* 1972                                     0.99943879755
* 1968                                     0.99938776453
* 1967                                     0.999269072854
* 1973                                     0.998769846893
* 1974                                     0.998373370334
  • 1975 0.998230585413
@wragge
wragge / recordsearch_show_redactions.user.js
Last active June 22, 2017 02:38
Inserts information about redactions into RecordSearch entries for the ASIO record series A6119
// ==UserScript==
// @name RecordSearch -- Redactions
// @namespace http://timsherratt.org/recordsearch-redactions
// @description Access is not always accessible. This userscript enriches the National Archives of Australia's database by inserting information about redactions in ASIO files.
// @version 0.2
// @date 2017-06-22
// @creator Tim Sherratt
// @include https://recordsearch.naa.gov.au/SearchNRetrieve/Interface/ListingReports/ItemsListing.aspx*
// @include https://recordsearch.naa.gov.au/SearchNRetrieve/Interface/DetailsReports/ItemDetail.aspx*
// @grant GM_xmlhttpRequest
@wragge
wragge / speak.py
Last active August 31, 2017 11:25
Python script for MacOS that speaks interjections from Historic Hansard. The interjections, voice, speaking rate, volume, and delay are all set randomly.
import subprocess
from pymongo import MongoClient
import time
import random
import argparse
from credentials import MONGO_URL
HOUSES = {
'hofreps': 'House of Representatives',

Keybase proof

I hereby claim:

  • I am wragge on github.
  • I am wragge (https://keybase.io/wragge) on keybase.
  • I have a public key ASD92biquvI-sNM0M9TNP2jaS3vQn_1NQPAUU0YK2Dm-Wwo

To claim this, I am signing this object:

@wragge
wragge / trove_copy_permalink.user.js
Last active November 7, 2017 23:35
Userscript to add a handy button to Trove works and versions to save permalink to clipboard.
@wragge
wragge / slnsw-ms-catalogue-links.user.js
Created January 26, 2018 04:24
Userscript to change url of searches in SLNSW Pictures & Manuscripts catalogue to something easily shareable.

Getting the text content of articles from the Australian Womens Weekly

The TroveHarvester makes it easy to download articles in bulk from Trove's digitised newspapers. Using the --text option you can also save the fulltext content of every article.

However, this doesn't work for the Australian Womens' Weekly as the full text is not available through the Trove API. Fortunately, the article text can be downloaded from the web interface.

The one-line script below uses wget, so make sure you have it installed before you go any further. (You can install it with Homebrew if you're using a Mac.)

Instructions

@wragge
wragge / archway-harvest-demo.csv
Last active June 10, 2018 14:01
Example of records harvested from Archway -- search for series '8333' and keyword 'Chinese'
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 15 columns, instead of 12. in line 6.
Access status,Accession,Agency,Alternative no.,Box/Item,Date,Former archives ref,Item ID,Part,Record group,Record no.,Record type,Sep,Series,Title
OPEN ACCESS,,ACGO,,2254 /,no date - no date,IA1,R14991199,,IA1,105/45,Text,,8333,Local Bodies - Chinese sick and wounded fund - Granted by Local Bodies (R14991199)
OPEN ACCESS,,ACGO,,2282 /,no date - no date,IA1,R14992099,,IA1,113/35,Text,,8333,Museum - Chinese curios - Gift from Rewi Alley to Christchurch Museum (R14992099)
RESTRICTED ACCESS,,ACGO,,2821 /,no date - no date,IA1,R19964568,1,IA1,116/2/18,Text,,8333,Chinese citizens naturalised in New Zealand - Lists of (R19964568)
RESTRICTED ACCESS,,ACGO,,2821 /,no date - no date,IA1,R19964569,2,IA1,116/2/18,Text,,8333,Chinese citizens naturalised in New Zealand - Lists of (R19964569)
RESTRICTED ACCESS,,ACGO,,2821 /,no date - no date,IA1,R19964570,3,IA1,116/2/18,Text,,8333,Chinese citizens naturalised in New Zealand - Lists of (R19964570)
RESTRICTED ACCESS,,ACGO,,2821 /,no date - no date,IA1,R19964571,4,IA1,116/2/18,
@wragge
wragge / infrastructure-post.md
Last active June 14, 2018 12:28
Text of a Facebook post in the Australian Historical Association group, 14 June 2018.

Posted to Australian Historical Association Facebook group, 14 June 2018

Recent government decisions about research infrastructure funding are, of course, disappointing for the humanities — particularly those of us who have working in the digital realm. But we need to remember that at it’s heart infrastructure is people, and there is much we can do now — right now, starting today — to support and develop capacity for digital research in the humanities. For example:

  • Ensure that people get appropriate recognition for digital projects in hiring and promotion processes. The Modern Language Assoc and the American Historical Assoc have both developed guidelines around this — it would be great to see this addressed in Australia.

  • Find ways to reward and encourage openness in the sharing of skills, tools, resources, data, and code. I have learnt so much through the generosity of others in the DH community, but we nee

@wragge
wragge / bulletin_issues.csv
Last active June 22, 2018 06:33
Issues of the Bulletin available in Trove
id label volume number date pages
nla.obj-124654480 1 1880-01-31 8
nla.obj-188284455 2 1880-02-07 8
nla.obj-188537163 3 1880-02-14 8
nla.obj-125527104 4 1880-02-21 8
nla.obj-201081027 5 1880-02-28 8
nla.obj-125534622 6 1880-03-06 8
nla.obj-201334002 7 1880-03-13 8
nla.obj-125535846 8 1880-03-20 8
nla.obj-201347662 9 1880-03-27 8