Skip to content

Instantly share code, notes, and snippets.

@ginward
ginward / ckpt_xiu_monthly-v4-1.ipynb
Last active March 28, 2020 21:28
ckpt_xiu_monthly v4.1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ginward
ginward / ckpt_xiu_monthly.ipynb
Last active March 17, 2020 19:58
ckpt_xiu_monthly.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ginward
ginward / xiu_monthly-p-crsp-cv-rf-0314.ipynb
Last active March 15, 2020 20:54
Xiu_monthly (P CRSP CV RF 0314).ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ginward
ginward / best_tree.R
Created November 17, 2019 09:36
An update to clu0 best_tree.R script. Added instrumental forest support.
#' Function that takes in a list of samples, with the corresponding Y values, and calculates the r_loss, assuming a regression tree.
#' If a leaf only has one sample, then we return the Y value squared. We choose this value because
#' we don't want to return 0, which will encourage the tree to keep leaves with 1 sample, but we also
#' don't want to return a huge value, which will force the tree to never have leaves with 1 sample, even if
#' the sample is an outlier. But of course we could choose to return something else when there is only
#' one sample in the leaf, if it makes more sense.
#'
#' @param Y The Y values
#' @param samples The samples on which to calculate the r_loss.
#' @param W.orig W values that indicate treatment; used for causal forest.
@ginward
ginward / disable mcafee endpoint protection.md
Created September 16, 2019 14:36 — forked from tegansnyder/disable mcafee endpoint protection.md
Disable McAffee Endpoint Protection OSX

method 1

sudo /usr/local/McAfee/AntiMalware/VSControl stopoas

alternatively

sudo defaults write /Library/Preferences/com.mcafee.ssm.antimalware.plist OAS_Enable -bool False
sudo /usr/local/McAfee/AntiMalware/VSControl stop
sudo /usr/local/McAfee/AntiMalware/VSControl reload
Verifying my Blockstack ID is secured with the address 15GkVnQPNM2cu3uTXcQtchEFTpGVBj7r1x https://explorer.blockstack.org/address/15GkVnQPNM2cu3uTXcQtchEFTpGVBj7r1x
@ginward
ginward / gist:c661e5532cb7bf6986b45676725e38e0
Created November 12, 2017 15:56 — forked from fabiofl/gist:5873100
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;