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
>>> from SOAPpy import WSDL | |
>>> wsdl = 'http://soap.genome.jp/KEGG.wsdl' | |
>>> serv = WSDL.Proxy(wsdl) | |
>>> pathways = serv.list_pathways('map') | |
>>> ps=pathways | |
>>> ps[0] | |
<SOAPpy.Types.structType item at 37525944>: {'definition': 'Glycolysis / Gluconeogenesis - Reference pathway', 'entry_id': 'path:map00010'} | |
>>> ps[0].__dict__ | |
{'_attrs': {}, | |
'_cache': None, |
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
import traceback | |
class WebApp(object): | |
def __init__(self, obj): | |
self.obj = obj | |
def __call__(self, environ, start_response): | |
try: | |
path = filter(bool, environ["PATH_INFO"].split("/")) |
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
# Taken from http://artifex.org/~hblanks/talks/2011/pep20_by_example.html | |
################################### 7 ################################## | |
""" Write out the tests for a factorial function. """ | |
#----------------------------------------------------------------------- | |
def factorial(n): | |
""" | |
Return the factorial of n, an exact integer >= 0. |
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
################################## 15 ################################## | |
def hard(): | |
# Example 1 | |
try: | |
import twisted | |
help(twisted) # (this may not be as hard as I think, though) | |
except: | |
pass |
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
from optparse import OptionParser | |
import os | |
import re | |
import subprocess | |
import sys | |
parser = OptionParser(usage=__doc__.strip()) | |
parser.add_option('-v', dest='verbose', action='store_true', | |
help='Verbose output') |
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
/* | |
* Copyright (C) 2010 Neil Davies | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
/* | |
* Copyright (C) 2010 Neil Davies | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
<supports-screens android:largeScreens="true" android:anyDensity="true" /> |
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
USAGE = """ | |
Usage: %s <action> [<action parameters>] | |
""" % os.path.basename(sys.argv[0]) |
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
<Project DefaultTargets="PrintReservedProperties" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Target Name="PrintReservedProperties"> | |
<Message Text="MSBuildProjectDirectory $(MSBuildProjectDirectory)" /> | |
<Message Text="MSBuildProjectFile $(MSBuildProjectFile)" /> | |
<Message Text="MSBuildProjectExtension $(MSBuildProjectExtension)" /> | |
<Message Text="MSBuildProjectFullPath $(MSBuildProjectFullPath)" /> | |
<Message Text="MSBuildProjectName $(MSBuildProjectName)" /> | |
<Message Text="MSBuildBinPath $(MSBuildBinPath)" /> | |
<Message Text="MSBuildProjectDefaultTargets $(MSBuildProjectDefaultTargets)" /> | |
<Message Text="MSBuildExtensionsPath $(MSBuildExtensionsPath)" /> |
OlderNewer