ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Add PATH to ~/.bash_profile and ~/.zshrc
export PATH=/usr/local/bin:$PATH
Here's a summary of how to implement a gradient function manually in Stan 2.10 in order to override autodiff. I wanted to do this because my run-times were long, and I knew I could save some time by hard-coding my gradient function. That being said, autodiff is great, and is almost always fast enough.
Two reasons to do this:
| #!/bin/bash | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |
| import requests | |
| def doi2bib(doi): | |
| """ | |
| Return a bibTeX string of metadata for a given DOI. | |
| """ | |
| url = "http://dx.doi.org/" + doi | |
| headers = {"accept": "application/x-bibtex"} |
| pdftk original.pdf output uncompressed.pdf uncompress | |
| LANG=C sed -n '/^\/Annots/!p' uncompressed.pdf > stripped.pdf | |
| pdftk stripped.pdf output final.pdf compress |