"Clojure running on Raspberry Pi" sounded so cool that I just had to give it a try.
- Download ARM JDK from Oracle and instlal on Raspberry Pi
- Change visudo to contain the following
/* THIS CODE IS NOT FULLY TESTED YET. It still needs to be verified, but it uses the same | |
* algorithm found in Chris_Knoll's script: https://gist.github.com/chrisknoll/c820cc12d833db2e3d1e | |
*/ | |
---TRUNCATE omop.v5drug_era; | |
WITH | |
ctePreDrugTarget(drug_exposure_id, person_id, ingredient_concept_id, drug_exposure_start_date, days_supply, drug_exposure_end_date) AS | |
(-- Normalize DRUG_EXPOSURE_END_DATE to either the existing drug exposure end date, or add days supply, or add 1 day to the start date | |
SELECT |
-------------------------------------------------------------------------------------------------------------- | |
---Adapted to PostgreSQL drug_era from Pure SQL drug_era written by Chris_Knoll: https://gist.github.com/chrisknoll/c820cc12d833db2e3d1e | |
---Upgraded to v5 | |
---Uses STOCKPILE method to populate gap_days field | |
---INTERVAL set to 30 days | |
---Chris Knoll's comments are after two dashes | |
---Taylor Delehanty's comments are after three dashes | |
---proper schema for "<schema>" needs to be replaced in the code | |
---proper schema for "<vocabulary_and_concept_schema>" needs to be replaced in the code |
#!/usr/bin/python | |
# | |
# Usage: packer-config my-template.yaml | packer build - | |
# | |
# Constructs a Packer JSON configuration file from the specified YAML | |
# template file and writes it to STDOUT. | |
# | |
# The YAML template format adds some flexibility and readability by | |
# adding comments and an !include directive, allowing for the | |
# following template syntax: |
// ==UserScript== | |
// @name Trello card title Markdown | |
// @version 0.4.0 | |
// @homepage https://gist.github.com/gorbiz/6062481 | |
// @description Add support for bold and emphasized Markdown in card titles | |
// @match https://trello.com/b/* | |
// @match http://trello.com/b/* | |
// ==/UserScript== | |
function markdownAll() { |
#!/bin/sh | |
# eg. dir=$(canonical $0) | |
canonical() { | |
local d="$(\dirname ${1})" | |
local f="$(\basename ${1})" | |
( | |
\cd ${d} >/dev/null 2>&1 | |
while [ -h "${f}" ] ; do | |
\cd $(\dirname $(\readlink ${f})) >/dev/null 2>&1 |
// derived from http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm | |
function map() { | |
emit(1, // Or put a GROUP BY key here | |
{sum: this.value, // the field you want stats for | |
min: this.value, | |
max: this.value, | |
count:1, | |
diff: 0, // M2,n: sum((val-mean)^2) | |
}); |