This file contains 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
"""Create a fractal using chaos game.""" | |
import argparse | |
import os | |
import random | |
from collections import namedtuple | |
# Matplotlib made me do this | |
import matplotlib | |
matplotlib.use(os.environ.get('MPL_BACKEND', 'WXAgg')) |
This file contains 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
"""Repro case for GetFID/GetFeature bug.""" | |
from osgeo import ogr | |
# some features in increasing size order | |
WKT1 = 'POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))' | |
WKT2 = 'POLYGON ((2 0, 2 2, 4 2, 4 0, 2 0))' | |
WKT3 = 'POLYGON ((5 0, 5 5, 10 5, 10 0, 5 0))' | |
WKT4 = 'POLYGON ((12 0, 12 8, 20 8, 20 0, 12 0))' |
This file contains 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
"""Adds a border to image files ready for uploading to Instagram.""" | |
import os | |
import sys | |
from PIL import Image, ImageDraw | |
# output image and border sizes in pixels | |
WIDTH = HEIGHT = 3000 | |
BORDER = 0 |
This file contains 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
[alias] | |
diffd = diff --diff-filter=d | |
diffn = diff --name-status | |
[push] | |
default = simple | |
# linux only | |
[credential] | |
helper = cache --timeout=999999 | |
[core] |
This file contains 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
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer! | |
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ " | |
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty! | |
# ~/code/web:beta_directory$ git checkout master | |
# Switched to branch "master" | |
# ~/code/web:master$ git checkout beta_directory | |
# Switched to branch "beta_directory" |
This file contains 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
# ---------------------------------------------------------------------------- | |
# Name: My tool | |
# Purpose: TODO | |
# | |
# Author: Jon Morris | |
# | |
# Created: 2017 | |
# Copyright: MY COMPANY 2017 | |
# Licence: ArcGIS for Desktop Advanced | |
# ---------------------------------------------------------------------------- |
This file contains 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
# ---------------------------------------------------------------------------- | |
# Name: My tool | |
# Purpose: TODO | |
# | |
# Author: Jon Morris | |
# | |
# Created: 2017 | |
# Copyright: MY COMPANY 2017 | |
# Licence: ArcGIS for Desktop Advanced | |
# ---------------------------------------------------------------------------- |
This file contains 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
""" | |
Name: ioutils.py | |
Purpose: Utilities module for file read/write/delete/etc. | |
Author: jpm | |
Created: 17/03/2016 | |
Copyright: (c) jpm 2016 | |
Licence: GPL v3. See http://www.gnu.org/licenses/ | |
""" |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Name: get_test_coverage.py | |
Purpose: Analyze C# project to check each class has at least one unit test | |
Author: jpm | |
Created: 18/09/2015 | |
Copyright: (c) jpm 2015 | |
Licence: GPL v3. See http://www.gnu.org/licenses/ |
NewerOlder