Skip to content

Instantly share code, notes, and snippets.

View Dehde's full-sized avatar

Robin Dehde Dehde

  • Motius GmbH
  • Munich, Germany
View GitHub Profile
@mhweber
mhweber / explode.py
Created July 25, 2016 17:45 — forked from debboutr/explode.py
Explode MultiPolygon geometry into individual Polygon geometries in a shapefile using GeoPandas and Shapely
import geopands as gpd
from shapely.geometry.polygon import Polygon
from shapely.geometry.multipolygon import MultiPolygon
def explode(indata):
indf = gpd.GeoDataFrame.from_file(indata)
outdf = gpd.GeoDataFrame(columns=indf.columns)
for idx, row in indf.iterrows():
if type(row.geometry) == Polygon:
outdf = outdf.append(row,ignore_index=True)
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 9, 2024 06:43
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname