Skip to content

Instantly share code, notes, and snippets.

@cbeddow
cbeddow / mapillary_sequence_download.py
Last active January 18, 2022 21:28
Download Mapillary sequence lines as geojson
import mercantile, mapbox_vector_tile, requests, json
from vt2geojson.tools import vt_bytes_to_geojson
# define an empty geojson as output
output= { "type": "FeatureCollection", "features": [] }
# vector tile endpoints -- change this in the API request to reference the correct endpoint
tile_coverage = 'mly1_public'
# tile layer depends which vector tile endpoints:
@fgianoli
fgianoli / lizmap.md
Last active November 14, 2022 17:17
Installazione Lizmap

Installazione Lizmap

sudo su

install apache2

apt install apache2

ensure to have PHP installed and all required extensions:

@nguyenkims
nguyenkims / log.py
Last active February 13, 2024 07:59
Basic example on how setup a Python logger
import logging
import sys
from logging.handlers import TimedRotatingFileHandler
FORMATTER = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
LOG_FILE = "my_app.log"
def get_console_handler():
console_handler = logging.StreamHandler(sys.stdout)
console_handler.setFormatter(FORMATTER)