Skip to content

Instantly share code, notes, and snippets.

@mculbert
mculbert / _extension.yml
Last active August 8, 2023 03:50
Minimal example for Quarto Custom Lua Writer Template Issue
title: Test Lua Writer
version: 0.0.1
quarto-required: ">=1.3.0"
contributes:
formats:
plain:
writer: tstluawriter.lua
template: template.txt
output-ext: txt
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 7 columns, instead of 1 in line 5.
xpath,Group,Element,Variable,version_start,version_end,description
/IRS990/Form990PartVIISectionA/AverageHoursPerWeek,/IRS990/Form990PartVIISectionA,AverageHoursPerWeek,Hours,2009,2012,"[Form990PartVIISectionA] Section A, at least name required; [AverageHoursPerWeek] Average hours per week"
/IRS990/Form990PartVIISectionA/Former,/IRS990/Form990PartVIISectionA,Former,Former,2009,2012,"[Form990PartVIISectionA] Section A, at least name required; [Former] Former"
/IRS990/Form990PartVIISectionA/HighestCompensatedEmployee,/IRS990/Form990PartVIISectionA,HighestCompensatedEmployee,Highest,2009,2012,"[Form990PartVIISectionA] Section A, at least name required; [HighestCompensatedEmployee] Highest compensated employee"
/IRS990/Form990PartVIISectionA/IndividualTrusteeOrDirector,/IRS990/Form990PartVIISectionA,IndividualTrusteeOrDirector,Director,2009,2012,"[Form990PartVIISectionA] Section A, at least name required; [IndividualTrusteeOrDirector] Individual trustee or director"
/IRS990/Form990PartVIISectionA/InstitutionalTru
@mculbert
mculbert / MSOutlook-copyItemId.vba
Created April 3, 2018 22:46
Copy a link to a Microsoft Outlook mail item
Sub copyItemId()
Dim Clip As DataObject
Set Item = Application.ActiveExplorer.Selection.Item(1)
Set Clip = New DataObject
' via http://thoughtsofmarcus.blogspot.com/2012/01/outlook-2010-macro-to-copy-item-links.html
Clip.SetText "onenote:outlook?Folder=Mail&EntryId=" & Item.EntryID
Clip.PutInClipboard
End Sub
@mculbert
mculbert / dps-aimlines-2017.r
Last active July 25, 2017 22:53
Calculation of aimlines for interim assessment data aligned with a summative assessment
# Early literacy aimline calculations
# Michael J. Culbertson <michael_culbertson@dpsk12.org>
# Developed for Denver Public Schools, 2017
library(dplyr)
load('sample-data.Rdata') # Fictitious sample data
# Variables:
# studentNumber - a unique student identifier
# SGP Conditional Error Study
# Michael J. Culbertson, 2016
# - Bivariate Normal, rho = 0.8, unit variance, mean 0
# - Sample size conditions: 1k, 2.5k, 5k, 7.5k, 10k, 25k, 50k, 75k, 100k
# - Preprocessing: None, 1le, 5le, 10le
# (Preprocess the same dataset multiple times)
# - 1,000 replicates
# - Predict SGP, calc MSE with theoretical SGP on 100x100 grid
# consiting of the 0.5, 1.5, ..., 99.5 quantiles
# of the conditional Normal distribution
@mculbert
mculbert / highlightWords.vba
Created August 5, 2016 22:25
Microsoft Word macro to highlight all instances of a set of words
' Microsoft Word macro to highlight all instances of a set of words
' Adapted from http://stackoverflow.com/questions/9399655/microsoft-word-macro-for-highlighting-multiple-words
Sub highlightWords()
Dim range As range
targetlist = Array("target1", "target2", "target3") ' put list of terms to find here
For Each Target In targetlist
@mculbert
mculbert / README.md
Last active July 30, 2016 00:16
Copy URI for Microsoft Outlook item

This VBA macro code for Microsoft Outlook creates a URI for the currently selected item (mail item, calendar item, task) and places it on the clipboard. The URI can then be used in a hyperlink in Outlook, OneNote, etc. to open the given item.

Note: If you move a mail item to a different folder, the link will break.

To install, open the VBA editor in Outlook by clicking on the Visual Basic button in the Developer ribbon. (The Developer ribbon can be added under File->Options->Customize Ribbon.) If there is not currently a module in

@mculbert
mculbert / .Rprofile
Last active July 15, 2016 14:59
Achievement Gap Explorer, sample implementation in R Shiny
### Achievement Gap Explorer, sample implementation in Shiny
### Michael J. Culbertson, 2016
## For a local turnkey solution that does not require any user interaction with R:
## Create an "Explorer" folder.
## Install a portable copy of R (https://sourceforge.net/projects/rportable/)
## to the "R" sub-folder under "Explorer".
## Put this .Rprofile file in the "Explorer" folder.
## Create a Windows shortcut called "Start" in the "Explorer" folder,
## pointing to: %windir%\system32\cmd.exe /c "R\App\R-Portable\bin\i386\Rgui.exe --no-save"
@mculbert
mculbert / keybase.md
Created July 7, 2016 22:29
Keybase/GitHub Identity Link

Keybase proof

I hereby claim:

  • I am mculbert on github.
  • I am mculbert (https://keybase.io/mculbert) on keybase.
  • I have a public key whose fingerprint is C408 A957 F92F FAD8 EB23 CA95 9B41 907F A373 A6D0

To claim this, I am signing this object: