NOTE: 534 stars, 106 forks. I love you all. Please contribute tips and edits back to this cheat sheet -- email's [email protected] and you can treat gists like git repositories and send git diffs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def download_url(manager, url, output_path, progress_dialog=None): | |
"""Download file from url. | |
:param manager: A QNetworkAccessManager instance | |
:type manager: QNetworkAccessManager | |
:param url: URL of file | |
:type url: str | |
:param output_path: Output path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Downloader(object): | |
"""The blueprint for downloading file from url.""" | |
def __init__(self, manager, url, output_path, progress_dialog=None): | |
self.manager = manager | |
self.url = url | |
self.output_path = output_path | |
self.progress_dialog = progress_dialog | |
self.reply = None | |
self.output_file = None | |
self.downloaded_file_buffer = QByteArray() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo. | |
REM Make parent of this script location our current directory, | |
REM converting UNC path to drive letter if needed | |
pushd %~dp0 | |
cd .. | |
REM set OSGEO4W_ROOT to short path version | |
for %%i in ("%CD%") do set OSGEO4W_ROOT=%%~fsi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- QGIS version: 2.3.0 Master (20300) | |
-- Found GRASS: /usr/lib/grass64 (6.4.3) | |
-- Found Proj: /usr/lib/libproj.so | |
-- Found GEOS: /usr/lib/libgeos_c.so | |
-- Found GDAL: /usr/lib/libgdal.so (1.10.1) | |
-- Found Expat: /usr/lib/x86_64-linux-gnu/libexpat.so | |
-- Found Spatialindex: /usr/lib/x86_64-linux-gnu/libspatialindex.so | |
-- Found Qwt: /usr/lib/libqwt.so (6.0.0-svn) | |
-- Found Sqlite3: /usr/lib/x86_64-linux-gnu/libsqlite3.so | |
-- Found PostgreSQL: /usr/lib/libpq.so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
category: hazard | |
subcategory: volcano | |
title: ATL_tervalidasi | |
field: KRB | |
value_map: {'low'. ['Kawasan Rawan Bencana III']} | |
unit: volcano_categorical |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_keywords_creation_wizard(self): | |
"""Test how the widgets work.""" | |
expected_category_count = 3 | |
expected_categories = ['exposure', 'hazard', 'aggregation'] | |
chosen_category = 'hazard' | |
expected_subcategory_count = 4 | |
expected_subcategories = ['volcano', 'earthquake', 'flood', 'tsunami'] | |
chosen_subcategory = "tsunami" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#--------- Generic stuff all our Dockerfiles should start with so we get caching ------------ | |
FROM ubuntu:14.04 | |
MAINTAINER Akbar Gumbira<[email protected]> | |
RUN export DEBIAN_FRONTEND=noninteractive | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN dpkg-divert --local --rename --add /sbin/initctl | |
# Use local cached debs from host (saves your bandwidth!) | |
# Change ip below to that of your apt-cacher-ng host |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Grid size = (101 100). | |
Corner coordinates = (114.317624 -6.970125)-(116.842376 -9.469875). | |
Grid cell size = (0.024752 0.024750). | |
Source point count = 10100. | |
Algorithm name: "nearest". | |
--- Time 20130213112454: 7.83622097969 sec | |
Grid size = (121 121). | |
Corner coordinates = (101.417603 -0.939116)-(104.442397 -3.960884). | |
Grid cell size = (0.024793 0.024769). |
OlderNewer