2018-03-12
hard-won Chrome sync knowledgeMeta-meta-update: Now things again don't work the way I said they did. I'm pretty sure Google's hardware has learned of good and evil, and chosen the latter.
Meta-update: now things again work the way I said they did when I wrote this an hour ago. Eye. Roll.
Update: now nothing works the way it did when I wrote this half an hour ago. I dunno. As long as my two machines aren't turning each other's extensions on and off, I'm happy.
Enabling/disabling a Chrome extension syncs or not depending whether you have "sync settings" on, not whether you have "sync extensions" on. Syncing extensions just literally means having them available or not.
Meanwhile, even if you have "sync settings" on, settings for syncing do not sync; they are per-machine.
19:13
Hard-won non-administrator, Sierra Mac, on a Windows fileshare, Chrome user knowledge
Chrome hangs while quitting: Kill the hung processes. Restart Chrome. Sign out of it. Open and close a couple times as the default user. Now will signing back in work? Let's see.
Sierra no longer believes in the right-click workaround to shut down "Are you sure you want to open it?":
defaults write com.apple.LaunchServices LSQuarantine -bool false
and log out and in again.
"Keep in Dock" doesn't work: delete, rename, or move ~/Library/Preference/com.apple.dock.plist and restart. Congratulations, you have a shiny new default dock full of crapware! Now fix all the crap! Also, try putting program in Dock by dragging the actual app icon into it, rather than by starting it and right-clicking your way to "Keep in Dock".
Centrally managed password changes, leaving Apple-specific keychains behind: Applications/Utilities/Keychain\ Access.app and select "login" from the list of keychains. Edit>>"Change Password for Keychain 'login'" and fill out the old and new passwords.
17:14
2018-03-11
log likelihood ratio explained in Perl
sub llr { # could be optimized to save storage, at cost of readability my ($both, $one, $other, $all) = @_; # complete a crosstab w/ marginals my $one_not_other = $one - $both; my $other_not_one = $other - $both; my $not_one = $all - $one; my $not_other = $all - $other; my $neither = ($all + $both) - ($one + $other); # expected counts, from marginals, assuming independence my $exp_both = ($one * $other) / $all; my $exp_one_not_other = ($one * $not_other) / $all; my $exp_other_not_one = ($other * $not_one) / $all; my $exp_neither = ($not_one * $not_other) / $all; # score the difference from independence return 2 * ( $both * log($both/$exp_both) + $one_not_other * log($one_not_other/$exp_one_not_other) + $other_not_one * log($other_not_one/$exp_other_not_one) + $neither * log($neither/$exp_neither) ); } # counts ($both, $one, $other, $all) -> log-likelihood ratio
Depending on your data, it's possible for expected values to be zero, which blows up when you try and divide by them. To be exact, you'll have problems if
$one == 0 or $other == 0 or $one == $all or $other == $all
. A rather ugly fix is to increment all the numerators and denominators before dividing. Maybe you could add some epsilon earlier on, instead.
20:57