Skip to content

Instantly share code, notes, and snippets.

View fbroussais's full-sized avatar

François B. fbroussais

View GitHub Profile
@fbroussais
fbroussais / team_dashboard.html
Created March 15, 2020 01:06 — forked from evidanary/team_dashboard.html
Simple Javascript that cycles through multiple webpages. This can be displayed on a TV.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>Dashboard Example</title>
<style type="text/css">
body, html { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; }
iframe { border: none; width: 100%; height: 100%; display: none; }
iframe.active { display: block;}
</style>
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
@fbroussais
fbroussais / OSM_ways_2_polygons.py
Created October 29, 2018 16:24 — forked from jorgehatccrma/OSM_ways_2_polygons.py
Using OSM's Overpass QL it is fairly trivial to retrieve the boundary of an administrative region (e.g. country). These boundaries can be land or maritime. The problem is that these boundaries are returned as a set of `ways` (i.e. linestrings). Some ways are closed (the first and last point coincide) while others are not, and need to be strung t…
# -*- coding: utf-8 -*-
import logging
from collections import defaultdict
import overpy
from shapely.geometry.polygon import Polygon
from shapely.geometry.multipolygon import MultiPolygon
def ways2poly(ways):