python-3.6.1

"""
Explanation: Continuing from the previous blog post, this notebook will explain how to deploy a Bokeh server on Heroku, allowing the world to access the brilliant data visualizations that you've developed using Bokeh. Note- this tutorial was written in May 2017. If you're reading at a much later date, you may need to update the Python and package versions below (and it's possible that Heroku may not support these versions anymore).
The example from this post can be found running here.
To begin, install the Heroku CLI using the instructions found here. The documentation is very helpful, as well.
Open a terminal on your computer and login to Heroku using the command:
heroku login
To create a new Heroku app, use the command:
heroku create appname
Where the appname is the name of your new app. Keep note of what appname you choose, because you'll be using it later in this example for the "--host" parameter.
Now, let's prepare the files and folder structure that will be pushed to Heroku. You'll need "linear_example.py" from the previous post, which can be downloaded $HERE. Make sure it's named exactly "linear_example.py", or the following steps will not work.
We need to define a "runtime.txt" file, which specifies to Heroku which version of Python we want to run. This file must be named exactly "runtime.txt", case sensitive. It should contain the following line:
End of explanation
"""


bokeh==0.12.4
Jinja2==2.9.5
MarkupSafe==0.23
numpy==1.12.0
pandas==0.19.2
PyYAML==3.12
requests==2.13.0
scikit-learn==0.18.1
scipy==0.18.1
tornado==4.4.2

"""
Explanation: Next, the Python modules which are required to run the Bokeh server must be specified in a file called "requirements.txt", again case sensitive. These will mainly include any imports in the "linear_example.py" code, but I like to specify any dependencies of the imports as well to ensure that the specific version I request is loaded. The release number of the module to load can be specified by "==", or ">=" if "at least" that version is required.
Note that these are likely not the latest release number of these modules, but these are the versions that this particular example was tested on.
End of explanation
"""


web: bokeh serve --port=$PORT --num-procs=0 --host=linregex.herokuapp.com --address=0.0.0.0 --use-xheaders linear_example.py

"""
Explanation: Finally, a file called "Procfile" tells Heroku how to run our files as a web application. It's essential that the "P" in "Procfile" be capitalized, and that the file does not have an extension. These are two common errors when defining a Procfile.
Our Procfile will contain the following code:
End of explanation
"""


