As configured in my dotfiles.
start new:
tmux
start new with session name:
| """Lin, Ni & Lu (2023) §4.2 E-value sensitivity for a matched RMST difference. | |
| Propensity-score matching balances *measured* covariates. An unmeasured | |
| confounder ``U`` can still bias the matched ATT. The E-value answers a | |
| single question: | |
| "How strong would U's association with treatment *and* U's association | |
| with the outcome each have to be, on a risk-ratio / mean-ratio scale, | |
| for that confounder to fully explain away the observed effect?" |
| import os | |
| from setuptools import find_packages, setup | |
| ## setup.py | |
| def main(): | |
| def read(fname): | |
| with open(os.path.join(os.path.dirname(__file__), fname)) as _in: | |
| return _in.read() | |
| setup( |
| class Database(object): | |
| def _print(self): | |
| print('Database class') | |
| class Local(object): | |
| def _print(self): | |
| print('Local class') | |
| class BaseThing(object): | |
| def __init__(self): |
| class MutableClass(): | |
| def __init__(self): | |
| self.thing = [] # mutable | |
| self.nonething = None | |
| def fn(self, new): | |
| self.thing.append(new) | |
| self.nonething = new | |
| m, m2 = MutableClass(), MutableClass() |
| # https://docs.python.org/3/library/unittest.mock.html | |
| from unittest.mock import MagicMock, Mock | |
| from nose.tools import assert_equal, raises, assert_true, assert_raises | |
| class A(): | |
| def __init__(self): | |
| self.item = 'item' | |
| def return_item(self, thing = None): | |
| if not thing: |
As configured in my dotfiles.
start new:
tmux
start new with session name: