Skip to content

Instantly share code, notes, and snippets.

View kr-stn's full-sized avatar

Kersten kr-stn

View GitHub Profile
@kr-stn
kr-stn / GTiff_compression_benchmark.py
Last active July 20, 2023 13:02
Benchmark filesize and read/ write times for various GeoTiff compression algorithms
__author__ = 'kersten.clauss'
"""Benchmark different GeoTiff compression algorithms.
Usage: GTiff_compression_benchmark.py some_geo.tif
Requires the GDAL tools to be present and executable from the command line of your system.
This script will take a GeoTiff as input and create copies with different compression algorithms from it.
It measures the filesize, compression and decompression times and returns them as a table.
#!/usr/bin/env python
__author__ = 'kersten.clauss'
__date__ = '28.03.2015'
"""script to create a vector/polygon from Hansens 30m global tree cover dataset
(http://earthenginepartners.appspot.com/science-2013-global-forest/download_v1.1.html)
Each tile will be downloaded, filtered to >75% tree cover for 2013 and merged into a global vector datset. The format of
the vector dataset is SpatiaLite/SQLite. It is advised to use the resampling to 250m option otherwise the resulting
@kr-stn
kr-stn / random-QML.py
Created October 25, 2016 13:57
Generate 5000 randomly colored QML styles for display of segmentation results.
import random
for value in range(5000):
print("<item alpha=\"255\" value=\"{}\" label=\"{}\" color=\"#{}\"/>".format(value, value, hex(random.randint(0, 16777215))[2:].upper()))
@kr-stn
kr-stn / jupyter_notebook_server.sh
Last active November 17, 2016 16:40
AWS autostart script to install miniconda and setup a passwort protected notebook server
#!/bin/bash
CERT_DIR="/home/ubuntu/certificate"
CONF_DIR="/home/ubuntu/.jupyter"
KEY="sha1:ca85a365c80b:0aee2a4846aadd78bec18ee21cf83cb77198b7a4"
# install latest miniconda version
cd "/home/ubuntu/"
su ubuntu -c "wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh"
su ubuntu -c "bash Miniconda3-latest-Linux-x86_64.sh -b -p /home/ubuntu/miniconda3"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kr-stn
kr-stn / CONTRIBUTE.rst
Last active June 9, 2017 07:57
contributing draft

Welcome to the sentinelsat open source project. We invite anyone to participate by contributing code, reporting bugs, fixing bugs, writing documentation and tutorials and discussing the future of this project.

Issue Conventions

Please search existing issues, open and closed, before creating a new one.

Providing a Short, Self Contained, Correct (Compilable), Example (SSCCE) demonstrating the issue is encouraged.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kr-stn
kr-stn / Wahrscheinlichkeit-von-fallender-Rakete-getroffen-zu-werden.ipynb
Last active January 2, 2018 14:36
Wie wahrscheinlich ist es in Berlin-Friedrichshain von einer fallenden Rakete getroffen zu werden?
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kr-stn
kr-stn / sentinelsat_order_by_bug.ipynb
Created June 2, 2018 11:28
Sentinelsat Issue #200 - order_by bug
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.