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
"Plot a PNG using matplotlib in a web request, using Flask." | |
# Install dependencies, preferably in a virtualenv: | |
# | |
# pip install flask matplotlib | |
# | |
# Run the development server: | |
# | |
# python app.py | |
# |
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
from flask import Flask, make_response | |
app = Flask(__name__) | |
@app.route("/simple.png") | |
def simple(): | |
import datetime | |
import StringIO | |
import random | |
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas |
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
My latop is having a bad problem. It happens all the time I am using my laptop. See the Picture to | |
have an idea what is wrong with my laptop. | |
Info: | |
OS => Win 8.1 Pro | |
Laptop => Dell E-5500 | |
Ram => 3 GB DDR2 | |
Processor => 2.4 Ghz Core 2 Duo | |
------------------------------------- | |
It only happens if I have installed the graphics drive for my laptop( via windows update or manually). I have Ubuntu 16.04.3 |