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
class CustomFlask(Flask): | |
"https://gist.github.com/lost-theory/3925738" | |
jinja_options = Flask.jinja_options.copy() | |
jinja_options.update(dict( | |
block_start_string='%%', | |
block_end_string='%%', | |
variable_start_string='<%', | |
variable_end_string='%>', | |
comment_start_string='<#', | |
comment_end_string='#>', |
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
# Pandas Quickstart # | |
## First off ## | |
Pandas has Series (list of values with index) and DataFrames (collection of Series). | |
- Each Series in a DataFrame is associated with a column name | |
- Each Series within a DataFrame must have the same length | |
## View ## | |
See first *n* rows: `.head(n)` (`n=5` by default): |
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
""" | |
Benchmark script to bench scikit-learn's RandomForestClassifier | |
vs. R's randomForest. | |
It uses rpy2 to call R from python. Timings for randomForest are | |
pessimistic due to a constant overhead by wrapping numpy matrices | |
in R data_frames. The effect of the overhead can be reduced | |
by increasing the number of trees. | |
Note: make sure the LD_LIBRARY_PATH is set for rpy2:: |