Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
#!/bin/sh | |
SHORTCUT="[Desktop Entry] | |
Name=Sublime Text 2 | |
Comment=Edit text files | |
Exec=/usr/local/sublime-text-2/sublime_text | |
Icon=/usr/local/sublime-text-2/Icon/128x128/sublime_text.png | |
Terminal=false | |
Type=Application | |
Encoding=UTF-8 | |
Categories=Utility;TextEditor;" |
import logging | |
import math | |
import mimetypes | |
from multiprocessing import Pool | |
import os | |
from boto.s3.connection import S3Connection | |
from filechunkio import FileChunkIO | |
import this | |
# comments are made by using the pound character | |
# ============================================================================= | |
# basic data types / variable assignment in Python 2.x | |
# ============================================================================= | |
this_is_a_string = 'Hello and welcome to developer brown bag' | |
this_is_a_string = "Hello and welcome to developer brown bag..Let's cheer" | |
this_is_a_string = '''Hello and welcome to developer brown bag...Let's cheer "Horray"''' |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
from: http://stackoverflow.com/questions/12033861/cross-platform-interface-for-virtualenv | |
On Windows: | |
using virtualenv as source: | |
pip freeze > requirements.txt | |
Linux: | |
virtualenv --no-site-packages prod_env | |
source prod_env/bin/activate | |
pip install -r requirements.txt |
""" | |
""" | |
import multiprocessing | |
import boto | |
import os | |
import sys | |
import datetime | |
import logging | |
import Queue |
import multiprocessing | |
import os | |
import urllib2 | |
import time | |
import json | |
import random | |
def concurrent_request_worker(url): | |
countries = ['AL', 'AO', 'AM', 'AZ', 'BD', 'BJ', 'BO', 'BT', 'BR', 'BF', 'BU', 'KH', 'CM', 'CV', 'CF', 'TD', 'CO', 'KM', 'CG', 'CD', 'CI', 'DR', 'EC', 'EG', 'ES', 'ER', 'ET', 'GA', 'GE', 'GH', 'GU', 'GN', 'GY', 'HT', 'HN', 'IA', 'ID', 'JM', 'JO', 'KK', 'KE', 'KY', 'LS', 'LB', 'MD', 'MW', 'MV', 'ML', 'MR', 'MX', 'MB', 'MA', 'MZ', 'NM', 'NP', 'NC', 'NI', 'NG', 'PK', 'PY', 'PE', 'PH', 'RO', 'RW', 'ST', 'SN', 'SL', 'ZA', 'LK', 'SD', 'SZ', 'TZ', 'TH', 'TL', 'TG', 'TT', 'TN', 'TR', 'TM', 'UG', 'UA', 'UZ', 'VN', 'YE', 'ZM', 'ZW'] | |
rand_countries = ','.join(random.sample(countries, 20)) |
""" | |
Zonal Statistics | |
Vector-Raster Analysis | |
Copyright 2013 Matthew Perry | |
Usage: | |
zonal_stats.py VECTOR RASTER | |
zonal_stats.py -h | --help | |
zonal_stats.py --version |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Collections.Specialized; | |
using System.Runtime.InteropServices; | |
using ESRI.ArcGIS.esriSystem; | |
using ESRI.ArcGIS.Server; |
using System; | |
using System.Collections.Generic; | |
using ESRI.ArcGIS.DataSourcesRaster; | |
using ESRI.ArcGIS.Geodatabase; | |
using ESRI.ArcGIS.Geometry; | |
internal enum CurveDirection { RIGHT, UP, LEFT, DOWN }; | |
public sealed class BoundingCurve | |
{ |