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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import with_statement | |
from optparse import OptionParser | |
import os, sys, fnmatch, shutil, datetime | |
def echo_err(parser,msg): | |
parser._help() | |
print("*** " + msg) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<kml xmlns="http://earth.google.com/kml/2.1"> | |
<Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://earth.google.com/kml/2.1 http://code.google.com/apis/kml/schema/kml21.xsd"> | |
<Style id="PolyStyle"> | |
<PolyStyle> | |
<color>77000000</color> | |
<colorMode>random</colorMode> | |
<fill>1</fill> | |
</PolyStyle> | |
</Style> |
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
#!/usr/bin/env python | |
# sample usage: checksites.py eriwen.com nixtutor.com yoursite.org | |
import pickle, os, sys, logging | |
from httplib import HTTPConnection, socket | |
from smtplib import SMTP | |
def email_alert(message, status): | |
fromaddr = '[email protected]' |
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
"""My thoughts on what a skimage version of Matlab's blockproc [1] function could look like. | |
[1] http://www.mathworks.com/help/images/ref/blockproc.html | |
""" | |
def process_windows(arr_in, window_shape, proc_func=None, step_size=(0,0), | |
border_size=(0,0), border_fill_mode='overlap', pad_mode='edge', | |
**kwargs): | |
"""Map image windows for (optional) parallel according to specified | |
windowing rule. |
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
# Using pip is usually more reliable than using easy_install. | |
# Set USEPIP=False only if pip fails for some reason. | |
USEPIP = True | |
packages = [ | |
## Add the packages to be installed here. | |
## Version numbers can be specified. | |
## Example: | |
## 'lxml>=2.0.0', | |
## 'leaf', |
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
# Fluent Interface Definition | |
class sql: | |
class select: | |
def __init__(self, dbcolumn, context=None): | |
self.dbcolumn = dbcolumn | |
self.context = context | |
def select(self, dbcolumn): | |
return self.__class__(dbcolumn,self) | |
# Demo |