Skip to content

Instantly share code, notes, and snippets.

View kaz-yos's full-sized avatar
πŸ’­
I may be slow to respond.

Kazuki Yoshida kaz-yos

πŸ’­
I may be slow to respond.
View GitHub Profile
@kaz-yos
kaz-yos / emacs-lisp-macro.el
Created October 27, 2018 10:01
Emacs Lisp Macro Talk by Ruy Ley-Wild on Sep 18, 2018 at Boston Emacs Meetup
;; 2018 Sep 18
;; Emacs Meetup
;; Extensible MACroS
;; by Ruy Ley-Wild
(inert ;; programming vs metaprogramming
input data -program-> output data
42 -double-> 84
library(openxlsx)
### tableone export helpers
### Turn tableone output matrix into tidyverse data_frame
tableone_mat_to_data_frame <- function(mat) {
bind_cols(data_frame(Variable = rownames(mat)),
as_data_frame(mat))
}

Table of Contents for Appendix in VanderWeele 2015

A.1. EXPLANATION AND MECHANISM –459

A.2. MEDIATION: INTRODUCTION AND REGRESSION-BASED APPROACHES –461

A.2.1. Definitions and Identification –461

A.2.2. Regression Methods for Direct and Indirect Effects –465

A.2.3. Equivalence of the Product and Difference Methods for a Continuous Outcome and for a Rare Binary Outcome –476

A.2.4. The Product Method as a Valid Test of the Presence of Any Mediated Effect –477

A.3. SENSITIVITY ANALYSIS FOR MEDIATION –478

A.3.1. Sensitivity Analysis for Unmeasured Confounding for Total Effects on the Difference Scale –478

@kaz-yos
kaz-yos / emacs-debugger-mode-help.txt
Created March 4, 2020 10:24
Extract from M-x describe-mode for debugger-mode
Debugger mode defined in β€˜debug.el’:
Mode for backtrace buffers, selected in debugger.
A line starts with β€˜*’ if exiting that frame will call the debugger.
Type b or u to set or remove the β€˜*’.
When in debugger due to frame being exited,
use the r command to override the value
being returned from that frame.

Emacs 28 native-comp experiment

  • Reinstall regular gcc without libgccjit
# https:/stackoverflow.com/questions/9369519/reset-homebrew-formula/
# Revert to original gcc.rb
brew update-reset
# Check languages for the absence of jit
brew edit gcc
# Reinstall regular gcc
brew reinstall gcc
#!/bin/bash
# Original from http://xenodium.com/trying-out-gccemacs-on-macos/index.html
set -o nounset
set -o errexit
# Configures Emacs for building native comp support
# http://akrl.sdf.org/gccemacs.html