Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
--- | |
applications: | |
- name: sentiment-compute | |
memory: 2GB | |
disk_quota: 2GB | |
instances: 1 | |
path: . | |
buildpack: python_buildpack | |
command: > | |
jupyter-kernelgateway --KernelGatewayApp.port=$PORT |
This file contains 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
name: jupyter | |
dependencies: | |
- jupyter | |
- pandas==0.18.1 | |
- python=2.7.11 | |
- pip==8.1.2 | |
- requests | |
- scikit-learn | |
- pip: | |
- jupyter_kernel_gateway |
This file contains 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
python-3.5.2 |
This file contains 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
$ cf push |
This file contains 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
$ curl -H "Content-Type: application/json" -X POST -d '{"data":["This app is awesome and in the CLOUD","Steph Curry is a basketball player","i am so mad and angry"]}' sentiment-compute.cfapps.pez.pivotal.io/polarity_compute | |
[ 0.78031286 0.49108975 0.14809403] |
This file contains 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
$ cf scale myApp -i 5 |
This file contains 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 pydot | |
from IPython.display import Image | |
from sklearn.externals.six import StringIO | |
from sklearn.tree import export_graphviz | |
dot_data = StringIO() | |
export_graphviz(cl, out_file=dot_data, | |
feature_names=Xtrain.columns, | |
class_names=['class0','class1'], |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# By default up/down are bound to previous-history | |
# and next-history respectively. The following does the | |
# same but gives the extra functionality where if you | |
# type any text (or more accurately, if there is any text | |
# between the start of the line and the cursor), | |
# the subset of the history starting with that text | |
# is searched (like 4dos for e.g.). | |
# Note to get rid of a line just Ctrl-C | |
"\e[B": history-search-forward | |
"\e[A": history-search-backward |