Skip to content

Instantly share code, notes, and snippets.

Ian Huston ihuston

Block or report user

Report or block ihuston

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ihuston
ihuston / app.py
Created Mar 6, 2017
Minimal Pandas + Conda CF app
View app.py
from io import StringIO
import requests
import pandas as pd
r = requests.get("https://www.plants.usda.gov/java/downloadData?fileName=plantlst.txt&static=true").text
df = pd.read_csv(StringIO(r))
print(df)
while True:
pass
exit(0)
@ihuston
ihuston / Spyre app on Cloud Foundry
Last active Feb 25, 2017
Example PyData app on Cloud Foundry using Spyre (https://github.com/adamhajari/spyre) and the Python conda buildpack (https://github.com/ihuston/python-conda-buildpack)
View Spyre app on Cloud Foundry
## PyData stack on Cloud Foundry
The current Python buildpack uses `pip` to install dependencies. Anyone who has tried to install NumPy or SciPy using `pip` knows that the process can be lengthy and painful often requiring manual intervention to correct library paths and install Fortran compilers.
Fortunately [Continuum Analytics'](http://continuum.io/) [conda package manager](conda.pydata.org) was created to solve these problems by packaging and distributing the standard tools of the Python data stack in compiled binaries.
I wanted to build web apps on Cloud Foundry using the PyData stack so with help from [a colleague](https://github.com/nebhale) I have written a [Cloud Foundry buildpack](https://github.com/ihuston/python-conda-buildpack) which uses both conda and pip to install required packages.
You can specify packages to be installed by `conda` in the `conda_requirements.txt` file and these will be installed first, followed by packages in the `requirements.txt` which will be installed as usual by `pi
@ihuston
ihuston / Flask on CF.md
Last active Jan 12, 2020
Simple Flask application for Cloud Foundry
View Flask on CF.md

Simple Python Flask app on Cloud Foundry

This is a (very) simple Flask application that shows how the built-in Python buildpack detection on Cloud Foundry works.

To push to Cloud Foundry, log in and then use

$ cf push myapp-name

Python on Cloud Foundry

You can’t perform that action at this time.