Skip to content

Instantly share code, notes, and snippets.

View timlinux's full-sized avatar

Tim Sutton timlinux

View GitHub Profile
-rw-r--r-- 1 jef users 17M Nov 28 2010 /var/www/downloads/qgis-1.6.0.tar.bz2
-rw-r--r-- 1 timlinux users 23M Jun 7 2011 /var/www/downloads/qgis-1.7.0.tar.bz2
-rw-r--r-- 1 timlinux users 24M Sep 23 2011 /var/www/downloads/qgis-1.7.1.tar.bz2
-rw-r--r-- 1 macho users 25M Nov 13 2011 /var/www/downloads/qgis-1.7.2.tar.bz2
-rw-r--r-- 1 macho users 25M Dec 10 2011 /var/www/downloads/qgis-1.7.3.tar.bz2
-rw-r--r-- 1 macho users 25M Feb 22 2012 /var/www/downloads/qgis-1.7.4.tar.bz2
-rw-r--r-- 1 timlinux users 29M Jun 12 2012 /var/www/downloads/qgis-1.8.0.tar.bz2
-rw-r--r-- 1 timlinux users 33M Sep 8 19:27 /var/www/downloads/qgis-2.0.0.tar.bz2
@timlinux
timlinux / qgis-contributor-history.json
Created September 18, 2013 14:31
Contributor history file for QGIS. Add your entry to the file below by copy and pasting one of the existing entries. Your position (can be generalised to nearest city of country). Please test on http://geojson.io/ before saving your changes to this GIST.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Running from build directory!
- source directory: /home/timlinux/dev/cpp/QGIS
- output directory of the build: /home/timlinux/dev/cpp/QGIS/build-master/output
Synchronizing CRS database with GDAL/PROJ definitions.
Loaded 465/466 from /usr/local/share/gdal/gcs.csv
Loaded 3790/3831 from /usr/local/share/gdal/pcs.csv
Loaded 147/148 from /usr/local/share/gdal/vertcs.csv
Loaded 61/62 from /usr/local/share/gdal/compdcs.csv
Loaded 129/130 from /usr/local/share/gdal/geoccs.csv
Loading epsg.wkt
@timlinux
timlinux / gist:6775530
Created October 1, 2013 08:40
ScoreKeeper class for training
# coding=utf-8
"""Tracker for game scores."""
class DifficultyTypeError(Exception):
"""Error for when incorrect difficulty is given."""
pass
class ScoreKeeper():
# coding=utf-8
"""Tests for the Session class."""
from unittest import TestCase
from score_keeper import Session
class TestSession(TestCase):
"""Tests for session class."""
def __init__(self, *args, **kwargs):
@timlinux
timlinux / gist:6776314
Created October 1, 2013 10:06
game2.py
# coding=utf-8
"""A simple guessing game."""
from random import random
class InvalidChoiceError(Exception):
"""An error instance for bad choices."""
pass
# coding=utf-8
"""Simple UI in Qt4."""
import sys
from random import random
from PyQt4 import Qt
from PyQt4.QtGui import QDialog
from PyQt4.Qt import pyqtSlot
from game_base import Ui_GameBase
@timlinux
timlinux / gist:6809050
Created October 3, 2013 12:28
Form python code for QGIS
# coding=utf-8
"""Custom form for QGIS poi layer.
Adapted from http://nathanw.net/2011/09/05/
qgis-tips-custom-feature-forms-with-python-logic/
"""
from PyQt4.QtGui import (
QLabel,
QDialogButtonBox,
Kel_name Total inundated Places of worship inundated Schools inundated Hospitals inundated
RAWA BUAYA 533 No data * No data * No data *
KAMAL MUARA 62 No data * No data * No data *
KAPUK MUARA 48 No data * No data * No data *
SEMPER BARAT 41 No data * No data * No data *
SUKA PURA 40 No data * No data * No data *
RAWABADAK SELATAN 34 No data * No data * No data *
MANGGA DUA SELATAN 31 No data * No data * No data *
PASAR BARU 31 No data * No data * No data *
PEGANGSAAN DUA 30 No data * No data * No data *
An error has occured while executing Python code:
Traceback (most recent call last):
File "/Users/timlinux/.qgis2/python/plugins/inasafe-dev/safe_qgis/widgets/dock.py", line 1349, in aggregate
self.post_process()
File "/Users/timlinux/.qgis2/python/plugins/inasafe-dev/safe_qgis/widgets/dock.py", line 1362, in post_process
self.postprocessor_manager.run()
File "/Users/timlinux/.qgis2/python/plugins/inasafe-dev/safe_qgis/impact_statistics/postprocessor_manager.py", line 343, in run
value.setup(parameters)
File "/Users/timlinux/.qgis2/python/plugins/inasafe-dev/safe/postprocessors/minimum_needs_postprocessor.py", line 61, in setup