Get gdal development libraries:
$ sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
$ sudo apt-get update
$ sudo apt-get install libgdal-dev
Create and activate a virtual environment:
// Some info based on: https://learn.microsoft.com/en-us/microsoft-365/compliance/sit-defn-canada-drivers-license-number?view=o365-worldwide | |
const canadaDLNumberPatterns = { | |
Alberta: /\d{6}-\d{3}|\d{5,9}/, | |
"British Columbia": /\d{7}/, | |
Manitoba: /\w{2}-?\w{2}-?\w{2}-?\w\d{3}\w{2}/, | |
"New Brunswick": /\d{5,7}/, | |
"Newfoundland and Labrador": /\w\d{9}/, | |
"Nova Scotia": /\w{5}-?[0123]\d[01]\d{6}/, | |
Ontario: /\w\d{4}-?\d{5}\d[0156]\d[0123]\d/, |
""" | |
poached from: https://raw.githubusercontent.com/klakar/QGIS_resources/master/collections/Geosupportsystem/python/qgis_basemaps.py | |
This script should be run from the Python console inside QGIS. | |
It adds online sources to the QGIS Browser. | |
Each source should contain a list with the folowing items (string type): | |
[sourcetype, title, authconfig, password, referer, url, username, zmax, zmin] | |
You can add or remove sources from the sources section of the code. |
<script id="modal-view-template" type="text/html"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
<h4 class="modal-title" id="myModalLabel">Modal title</h4> | |
</div> | |
<div class="modal-body"> | |
... | |
</div> |
#!/bin/sh | |
# You might want to put this script in crontab, backup day by day. | |
# | |
# $ sudo -u git -H crontab -l | |
# $ 0 0 1 * * /path/to/your/BackupGitlab.sh | |
cd /home/git/gitlab | |
/usr/local/bin/bundle exec rake gitlab:backup:create RAILS_ENV=production |
... | |
url(r'^v1/tiles/(?P<tile_user>([^/]+))/(?P<tile_layer>([^/]+))/(?P<tile_zoom>(\d+))/(?P<tile_column>(\d+))/(?P<tile_row>(\d+))\.(?P<tile_format>([a-z]+))$', TileManager.as_view(), name='tile_manager'), | |
... |
from django.template.loader import get_template | |
from django.template import Context | |
import cStringIO as StringIO | |
import cgi | |
import ho.pisa as pisa | |
def render_to_pdf(template_src, context_dict): | |
template = get_template(template_src) | |
context = Context(context_dict) | |
html = template.render(context) |
/* | |
* L.TileLayer.LocalCache : A tile layer using SQL Storage, if available. | |
*/ | |
L.TileLayer.LocalCache = L.TileLayer.extend({ | |
options: { | |
minZoom: 0, | |
maxZoom: 18, | |
tileSize: 256, | |
subdomains: 'abc', |
from chardet.universaldetector import UniversalDetector | |
import os.path | |
import sys | |
import dbfUtils | |
import sys | |
from osgeo import osr | |
from urllib import urlencode | |
from urllib2 import urlopen | |
import json |