most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
let blacklists = ["*://example.com/stuff/*", "*://mail.google.com/*", "http://localhost:*/notebooks/*"] |
class MixinOne(object): | |
def print_name(self): | |
print("{} is using MixinOne.".format(self.name)) | |
class MixinTwo(object): | |
def print_name(self): | |
print("{} is using MixinTwo.".format(self.name)) |
# Specify antibiotic characteristics | |
# Sepsis3 valid | |
# dosing interval (period) - assume less than 24 hourly unless otherwise specified | |
# rank as per Braykov NP, Morgan DJ, Schweizer ML, Uslan DZ, Kelesidis T, Weisenberg SA, et al. Assessment of empirical antibiotic therapy optimisation in six hospitals: an observational cohort study. Lancet Infect Dis. 2014;14: 1220–1227. doi:10.1016/S1473-3099(14)70952-1 | |
NIHR_HIC_ICU_0414: | |
Classification3: Aminoglycosides | |
dataItem: Amikacin | |
sepsis3_abx: TRUE | |
rank_abx: 4 | |
period_abx: ~ |
# ================================== | |
# = Define generic study variables = | |
# ================================== | |
find_NHIC("shortName", "dead") | |
# Mortality | |
gen_mortality(wdt, "mort.icu", "NIHR_HIC_ICU_0097") | |
table(unique(wdt[,.(id,mort.icu)])$mort.icu) | |
gen_mortality(wdt, "mort.hosp", "NIHR_HIC_ICU_0095") |
# # apply response after field specification allows two possibilities | |
# # apply: drop_entry - just replace field with NA | |
# # apply: drop_episode - drop entire episode | |
# # range checks for continuous data *must* use traffic light terms | |
# # - red | |
# # - amber | |
# # - green | |
# # also concept of nodata check which will drop episode if data is missing | |
# # e.g. for something crucial like date of birth (age) | |
# # nodata: |
- | |
fname: icnarc_score | |
sqltype: tinyint | |
varlab: ICNARC acute physiology score | |
derived: True | |
derived_missing_ok: True | |
primaryfields: | |
- hrate | |
- bpsys | |
- temperature |
# coding: utf-8 | |
# Load up the citation text file as per this link | |
# | |
# http://onlinelibrary.wiley.com/cochranelibrary/search/advanced?hiddenFields.strategySortBy=last-modified-date;desc&hiddenFields.showStrategies=true&hiddenFields.containerId=12670271652807976185&hiddenFields.originalContainerId=15960432450033216107&hiddenFields.etag=8064622093550521747 | |
# | |
# And saved here as `citation-export.txt` | |
# Test example | |
testData = """ |
# Check all have same length | |
list.of.lists.2df <- function(l) { | |
' | |
Convert a list of lists to a data.frame | |
via http://stackoverflow.com/a/4227504/992999 | |
' | |
# Check that all nested lists are of the same lenght | |
library(assertthat) | |
assert_that(sum(sapply(l, function(x) length(x)!=length(l[[1]])))==0) | |
d <- data.frame(t(sapply(l, c))) |