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 shapely.geometry import shape, MultiPolygon | |
# JSON representation of a single Polygon | |
polygon_json = { | |
"type": "Polygon", | |
"coordinates": [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]] | |
} | |
# Convert the JSON representation to a Shapely Polygon | |
polygon = shape(polygon_json) |
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
import argparse | |
from threading import Thread, Event | |
from time import sleep | |
import sys | |
done = Event() | |
def work(work_seconds=1): | |
sleep(1) |