PyCon 2014 notes
i'm josh - @jrmontag. if you see me, say hi!
Montreal, QC, CAN (2014-04-09 ==> 12)
| # (ubuntu) | |
| # add to end of .bashrc : | |
| export PS1="\$(__git_ps1) "$PS1 | |
| # gives e.g. (when in a repo): | |
| (master) user@host:~$ | |
| # more info: http://stackoverflow.com/questions/15883416/adding-git-branch-on-the-bash-command-prompt |
| # previous experience... | |
| # cell | |
| import pandas as pd | |
| ... | |
| # cell | |
| %pylab inline | |
| # use pd helper, plot() |
| Pelican==3.2 | |
| Markdown==2.3 | |
| ghp-import==0.3 |
| pd.set_option('display.max_columns', 10) # repr shows <=10 cols (scrollable) | |
| pd.set_option("display.max_colwidth", 150) # repr shows <=150 characters in each column (line wraps) | |
| # many more options available: | |
| # http://pandas.pydata.org/pandas-docs/stable/basics.html?highlight=set_option#working-with-package-options |
| Jinja2==2.7.2 | |
| MarkupSafe==0.19 | |
| Pygments==1.6 | |
| backports.ssl-match-hostname==3.4.0.2 | |
| boto==2.27.0 | |
| boto-rsync==0.8.1 | |
| brewer2mpl==1.3.2 | |
| gapi==0.1.4 | |
| ggplot==0.4.7 | |
| gnacs==0.7.5 |
i'm josh - @jrmontag. if you see me, say hi!
Montreal, QC, CAN (2014-04-09 ==> 12)
| import re | |
| s = 'id|tag1|id|tag2|id|tag3|id|tag4' | |
| # nb: escaping | (delimiter) necessary *outside* of character set ( [] ), not inside | |
| print re.findall("[^|]+\|[^|]+", s) | |
| # ['id|tag1', 'id|tag2', 'id|tag3', 'id|tag4'] | |
| n=3 |
requirements.txt files for setting up a new data project stack for Python. First, install virutalenv and virtualenvwrapper, then build new Python virtualenv for data projects.
From a fresh OS X install with homebrew installed:
$ brew intall python
$ brew install python3 # optional