Go to terminal and roll back the Qt installation through GitHub
$ brew uninstall qt
$ brew install https://raw.githubusercontent.com/Homebrew/homebrew/8dd3478131b232553f4c0cab197f8443a0a559a6/Library/Formula/qt.rb
from shapely.geometry import Point, LineString, Polygon, GeometryCollection, MultiLineString | |
from shapely.ops import polygonize, unary_union, nearest_points | |
from shapely.wkt import loads as load_wkt | |
def split_polygon_line(polygon, line): | |
"""Split a Polygon with a LineString""" | |
assert(isinstance(polygon, Polygon)) | |
assert(isinstance(line, LineString)) | |
boundary = polygon.boundary | |
union = boundary.union(line) |
#!/bin/bash | |
# | |
# tile_georef.sh | |
# | |
# Grab an mapbox ZYX tile and save as a geotiff with geoferencing | |
# tile_georef.sh 13 4168 3197 mapbox.satellite output.tif | |
# | |
set -u |
Please petition Github to support HTTPS on github pages: https://github.com/contact
Here's what I wrote:
Obviously, a lot of people want HTTPS for github pages:
Until recently, that would be difficult to implement but, as it turns out, the implementation is pretty much complete:
This small subclass of the Pandas sqlalchemy-based SQL support for reading/storing tables uses the Postgres-specific "COPY FROM" method to insert large amounts of data to the database. It is much faster that using INSERT. To acheive this, the table is created in the normal way using sqlalchemy but no data is inserted. Instead the data is saved to a temporary CSV file (using Pandas' mature CSV support) then read back to Postgres using Psychopg2 support for COPY FROM STDIN.
A Rasterio dataset's index()
method gives you the row, col
index of the pixel containing the point x, y
(in the dataset's CRS units).
Define a 1x1 pixel read window starting at that index (see the tiny_window()
function below) and use it to read an ndarray. The one in this case has shape (3, 1, 1)
: 3 bands, 1 row, and 1 column. The values of the 3 bands at the point x, y
for this case are 28, 29, and 27.
import Control.Monad | |
import Control.Concurrent | |
import Data.Int | |
import System.Environment | |
sendSidewards :: Chan Int -> Chan Int -> IO () | |
sendSidewards from to = do | |
n <- readChan from | |
writeChan to n | |
sendSidewards from to |
#!/bin/sh | |
# | |
# Delete Python's compiled *.pyc and __pycache__ files like a pro | |
# https://gist.github.com/jakubroztocil/7892597 | |
# | |
# Usage: | |
# Delele *.pyc and __pycache__ files recursively in the current directory: | |
# $ pyc | |
# | |
# The same, but under /path: |