To create 32-bit anaconda environment on 64-bit install:
set CONDA_FORCE_32BIT=1
conda create -n py35_32 python=3.5
To install mingw64, don't use mingw package (deprecated). Intsead:
| def say_hello_to(name): | |
| print("Hello %s!" % name) |
| Date | Flow | |
|---|---|---|
| 01/01/1990 | 26.42 | |
| 02/01/1990 | 30.94 | |
| 03/01/1990 | 40.23 | |
| 04/01/1990 | 41.95 | |
| 05/01/1990 | 37.42 | |
| 06/01/1990 | 33.85 | |
| 07/01/1990 | 31.49 | |
| 08/01/1990 | 37.31 | |
| 09/01/1990 | 49.15 |
| { | |
| "pywr": { | |
| "metadata": { | |
| "title": "JSON example", | |
| "description": "An example of how models could be stored in JSON." | |
| }, | |
| "scenarios": { | |
| "demand_scenario": "demand_scenario" | |
| }, | |
| "structure": { |
| /* | |
| Simple example of minimum cost flow problem in GLPK | |
| To build and run: | |
| $ gcc -o example -lglpk example.c | |
| $ ./example | |
| ret = 0; sol = 25 | |
| flow = 5 | |
| */ |
| """ | |
| This script demonstrates the use of nested transactions in SQLAlchemy, including | |
| a workaround for an issue with the SQLite backend. | |
| References: | |
| http://docs.sqlalchemy.org/en/latest/orm/session_transaction.html#using-savepoint | |
| http://docs.sqlalchemy.org/en/latest/dialects/sqlite.html#serializable-isolation-savepoints-transactional-ddl | |
| """ | |
| from sqlalchemy import Column, String, Integer |
| """ | |
| This example converts all of the MapInfo layers in a folder into ESRI Shapefiles. | |
| This is complicated a little by the fact that MapInfo geometries are not | |
| homogenous, i.e. you can have different kinds of geometry (LineString, Polygon, ...) | |
| in the same file. This approach assumes that all of the geometries have the same | |
| type as the first feature in the layer. | |
| """ | |
| import os | |
| import fiona |
| import fiona | |
| from shapely.geometry import shape, mapping, LineString, MultiLineString | |
| from copy import deepcopy | |
| def split_segments(geometry, length): | |
| """Split a LineString into segments | |
| Parameters | |
| ---------- | |
| geometry : shapely geometry |
| import concurrent.futures | |
| from pywr.model import Model | |
| from pywr.nodes import Input, Output | |
| def run_model(demand): | |
| model = Model() | |
| i = Input(model, "input", max_flow=15) | |
| o = Output(model, "output", max_flow=demand, cost=-1) | |
| i.connect(o) |
| import os | |
| from flask import Flask, request, redirect, url_for, flash | |
| from werkzeug.utils import secure_filename | |
| import uuid | |
| UPLOAD_FOLDER = os.path.join(os.path.dirname(__file__), "uploads") | |
| app = Flask(__name__) | |
| app.config["UPLOAD_FOLDER"] = UPLOAD_FOLDER |