Skip to content

Instantly share code, notes, and snippets.

@KMarkert
KMarkert / g4g-2022-rest-api-demo.ipynb
Last active July 10, 2023 08:41
g4g-2022-rest-api-demo.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mazzma12
mazzma12 / kml_io.py
Last active February 22, 2024 17:01
IO / Read and write KML file with geopandas and fiona driver
import fiona
import geopandas as gpd
# Enable fiona driver
gpd.io.file.fiona.drvsupport.supported_drivers['KML'] = 'rw'
# Read file
df = gpd.read_file(path, driver='KML')
# Write file
@blink1073
blink1073 / avro_ser_deser.py
Last active August 7, 2021 11:16
Avro Serializer/Deserializer with Numpy Support
from ast import literal_eval
from avro.io import DatumReader, DatumWriter, BinaryEncoder, BinaryDecoder
from avro.schema import Names, SchemaFromJSONData
import yaml
import numpy as np
class BinaryDatumWriter(object):
\documentclass[10pt]{article}
\usepackage{labels}
\usepackage{url}
\newcommand{\brk}{$\cdot$ }
%\LabelGridtrue % Enable this to
\LabelCols=2% Number of columns of labels per page
\LabelRows=6% Number of rows of labels per page
\begin{document}
\numberoflabels=12
@migurski
migurski / merge-geojsons.py
Created September 21, 2012 03:43
Merge multiple GeoJSON files into one
from json import load, JSONEncoder
from optparse import OptionParser
from re import compile
float_pat = compile(r'^-?\d+\.\d+(e-?\d+)?$')
charfloat_pat = compile(r'^[\[,\,]-?\d+\.\d+(e-?\d+)?$')
parser = OptionParser(usage="""%prog [options]
Group multiple GeoJSON files into one output file.