Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| County | X | Y | Rate | |
|---|---|---|---|---|
| Alameda | 195 | 500 | 14.4 | |
| Alpine | 318 | 560 | 0.0 | |
| Amador | 265 | 550 | 12.1 | |
| Butte | 220 | 630 | 52.9 | |
| Calaveras | 280 | 530 | 22.6 | |
| Colusa | 195 | 598 | 23.8 | |
| Contra Costa | 192 | 515 | 12.5 | |
| Del Norte | 100 | 790 | 301.5 | |
| El Dorado | 260 | 580 | 32.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| DATE=`date -d "now + 23 hour + 0 min + 0 sec" +%s` | |
| rtcwake -lv -m disk -t $DATE | |
| exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias ..='cd ..' | |
| alias ...='cd ../../../' | |
| alias ....='cd ../../../../' | |
| alias .....='cd ../../../../../;' | |
| alias c='clear' | |
| alias ping='ping -c 5' | |
| alias ports='netstat -tulanp' | |
| alias apt-get="sudo apt-get" | |
| ## pass options to free ## | |
| alias meminfo='free -m -l -t' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # place in .bashrc | |
| function parse_git_branch { | |
| ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
| echo "("${ref#refs/heads/}")" | |
| } | |
| PS1="[\w] \$(parse_git_branch)\n|\# \$ " | |
| PS2="\[\033[1;33m...\[\033[0m\]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function pushdp { | |
| pushd `python -c "import os; import $1; print os.path.dirname($1.__file__)"` | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # you can use something like this if read_html fails to find a table | |
| # if you have bs4 >= 4.2.1, you can skip the lxml stuff, the tables | |
| # are scraped automatically. 4.2.0 won't work. | |
| import pandas as pd | |
| from lxml import html | |
| url = "http://www.uesp.net/wiki/Skyrim:No_Stone_Unturned" | |
| xpath = "//*[@id=\"mw-content-text\"]/table[3]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # this is a translation of orthpoly.ado from Stata 11. Their license likely applies. | |
| def orthpoly(X, deg, weights=None): | |
| """ | |
| Christoffel-Darboux recurrence relation for orthogonal polynomials. | |
| """ | |
| nobs = len(X) | |
| orth_poly = np.ones((nobs, deg+1)) | |
| for i in range(1, deg+1): | |
| t = X*orth_poly[:,i-1]**2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import statsmodels.api as sm | |
| from statsmodels.formula.api import ols | |
| # load some data | |
| dta = sm.datasets.longley.load_pandas() | |
| # make a standardized RHS formula | |
| stand = "standardize(%s)" | |
| std_rhs = ' + '.join([stand]*len(dta.exog_name)) % tuple(dta.exog_name) | |
| print std_rhs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Creates a task interface. | |
| Change to | |
| view = rc[:] | |
| for a direct interface. | |
| """ | |
| from IPython.parallel import Client |