Skip to content

Instantly share code, notes, and snippets.

AlexandraKapp

Block or report user

Report or block AlexandraKapp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View create_polygon_with_boundingbox.R
library(sf)
xmin <- -2.3743
xmax <- 0.5589
ymin <- 37.3397
ymax <- 40.8679
st_polygon(list(rbind(
c(xmin, ymin),
c(xmin, ymax),
@AlexandraKapp
AlexandraKapp / osrm_docker_windows.md
Last active Jan 22, 2020
How to set up your own OSRM backend with Docker on Windows
View osrm_docker_windows.md

How to set up your own OSRM backend with Docker on Windows

The OSRM docker quick start provides a great explanation on how to set up the container: https://hub.docker.com/r/osrm/osrm-backend/

Yet - for Docker on Windows minor changes were necessary for me (otherwise I'd get "File not found" or "Permission" errors).

This is how it worked for me:

1. Pull the image

View git_cmds.md

Useful Git commands

The laziest way to delete all unused branches safely except master:

git checkout master
git branch | xargs git branch -d

Merge master into current feature branch:

View uberspace.md
View jupyter-presentation.md

Create presentations with jupyter notebook

Convert notebook to presentation:

jupyter nbconvert slideshow.ipynb --to slides --post serve
View python_commands.md

Jupyter Lab commands

execute command line in cell with !:

! pip freeze
View berliner_bezirksgrenzen.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View geo_tools.md
View common_pandas_commands.md

merge two dfs on specific key

df.set_index('key').join(df2.set_index('key'))

get datetime from String

pd.to_datetime(df['date'],format='%Y-%m-%d')

get weekday of datetime

You can’t perform that action at this time.