https://realpython.com/blog/python/asynchronous-tasks-with-django-and-celery/
$ pip install celery
$ sudo apt-get install rabbitmq-server
#!/usr/bin/python3 | |
####################################################### | |
# Python rsync Backup script | |
# Sebastian Kraft, 24.06.2013 | |
# | |
####################################################### | |
#----------------------------------------------------- | |
# Config |
https://realpython.com/blog/python/asynchronous-tasks-with-django-and-celery/
$ pip install celery
$ sudo apt-get install rabbitmq-server
# Pass the env-vars to MYCOMMAND | |
eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
# … or ... | |
# Export the vars in .env into your shell: | |
export $(egrep -v '^#' .env | xargs) |
import pygeoif | |
import shapefile | |
from django.db import connection, transaction | |
from zipfile import ZipFile | |
from io import BytesIO | |
def shp_files_sorter(file_name): | |
""" | |
:param file_name: |
Credits go to https://docs.docker.com/registry/recipes/nginx/ and http://mindtrove.info/control-read-write-access-docker-private-registry/
Follow the steps on https://docs.docker.com/registry/recipes/nginx/ with docker-compose.yml and nginx.conf below.
Run the following for admin UI:
docker run \
package main | |
import ( | |
"errors" | |
"flag" | |
"math" | |
"os" | |
"github.com/lukeroth/gdal" | |
geojson "github.com/paulmach/go.geojson" |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<title>Mapbox GL Draw Rectangle</title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.49.0/mapbox-gl.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.49.0/mapbox-gl.css' rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } |