Skip to content

Instantly share code, notes, and snippets.

View allesklarbeidir's full-sized avatar

Sebastian Jerratsch allesklarbeidir

  • Göttingen, Germany
View GitHub Profile
@vincentsarago
vincentsarago / Sentinel2_to_cog_price.md
Created May 2, 2019 20:52
How much will it cost to convert all the Sentinel-2 JPEG2000 to COG ?

Let's see how much it will cost to translate all the Sentinel-2 JPEG2000 to COGs using AWS Lambda https://github.com/developmentseed/sentinel-2-cog (Note at this scale AWS Lambda might not be the cheapest option).

How many S2 scenes do we have on AWS?

$ curl https://sat-api.developmentseed.org/collections/sentinel-2-l1c/items | jq -r '.meta.found'
5 633 438

Lambda config

@jwilson8767
jwilson8767 / sjoin.py
Created February 19, 2019 19:05
Geopandas concurrent sjoin
from concurrent.futures import as_completed, ProcessPoolExecutor
import geopandas as gpd
import pandas as pd
import numpy as np
from collections.abc import Sequence
from shapely import prepared
def sjoin(left_df, right_df, op='intersects', how='inner', lsuffix='left', rsuffix='right', fail_crs_mismatch: bool = True, fail_missing_geometries: bool = False) -> gpd.GeoDataFrame:
"""Spatial join of two GeoDataFrames. GeoPandas sjoin with concurrency (split naively using df slicing).

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
@keithmorris
keithmorris / drive-format-ubuntu.md
Last active May 1, 2024 12:39
Partition, format, and mount a drive on Ubuntu
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE