rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
"""returns Iwquality struct with average quality information
""" Returns an Iwquality object with average quality information.
def getQualityAvg(self): """returns Iwquality struct with average quality information
05b40a3d0b9e46299ea3a7ddfd32be4a1e2ba258 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3159/05b40a3d0b9e46299ea3a7ddfd32be4a1e2ba258/iwlibs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 14846, 22823, 12, 2890, 4672, 3536, 6154, 467, 91, 16495, 1958, 598, 8164, 9312, 1779, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 14846, 22823, 12, 2890, 4672, 3536, 6154, 467, 91, 16495, 1958, 598, 8164, 9312, 1779, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def collapsePartsByOrder(parts, packages): def getCollapseGroupsOrdered(): collapsGroups = {}
def collapsePartsByOrder(self, parts, packages): def getCollapseGroupsOrdered(parts, packages): collapseGroups = {}
def collapsePartsByOrder(parts, packages):
c92a3153627a6f6e14175f817d5482f3e7d44879 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/c92a3153627a6f6e14175f817d5482f3e7d44879/PartBuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13627, 4305, 858, 2448, 12, 6019, 16, 5907, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13627, 4305, 858, 2448, 12, 6019, 16, 5907, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.set_stdout_file('logs/splitbank-$(macrochannelname)-$(macrogpsstarttime)-$(macrogpsendtime)-$(cluster)-$(process).out') self.set_stderr_file('logs/splitbank-$(macrochannelname)-$(macrogpsstarttime)-$(macrogpsendtime)-$(cluster)-$(process).err')
self.set_stdout_file('logs/splitbank-$(macrobankfile)-$(cluster)-$(process).out') self.set_stderr_file('logs/splitbank-$(macrobankfile)-$(cluster)-$(process).err')
def __init__(self,cp): """ cp = ConfigParser object from which options are read. """ self.__executable = cp.get('condor','splitbank') self.__universe = cp.get('condor','universe') pipeline.CondorDAGJob.__init__(self,self.__universe,self.__executable) pipeline.AnalysisJob.__init__(self,cp)
e8b7370cf4707af61ce23ccbf39edeb6a7b77659 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/e8b7370cf4707af61ce23ccbf39edeb6a7b77659/inspiral.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4057, 4672, 3536, 3283, 273, 25076, 733, 628, 1492, 702, 854, 855, 18, 3536, 365, 16186, 17751, 273, 3283, 18, 588, 2668, 10013, 280, 17023, 4939, 10546, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4057, 4672, 3536, 3283, 273, 25076, 733, 628, 1492, 702, 854, 855, 18, 3536, 365, 16186, 17751, 273, 3283, 18, 588, 2668, 10013, 280, 17023, 4939, 10546, 6...
(r'^\s*(any|all)\(', "any/all not available in Python 2.4"),
(r'(?<!def)\s+(any|all)\(', "any/all not available in Python 2.4"),
def rephere(m): t = re.sub(r"\S", "x", m.group(2)) return m.group(1) + t
9351703d8ac9deedd9f4218a1e2feccac1a50111 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/9351703d8ac9deedd9f4218a1e2feccac1a50111/check-code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 9346, 12, 81, 4672, 268, 273, 283, 18, 1717, 12, 86, 12691, 55, 3113, 315, 92, 3113, 312, 18, 1655, 12, 22, 3719, 327, 312, 18, 1655, 12, 21, 13, 397, 268, 282, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 9346, 12, 81, 4672, 268, 273, 283, 18, 1717, 12, 86, 12691, 55, 3113, 315, 92, 3113, 312, 18, 1655, 12, 22, 3719, 327, 312, 18, 1655, 12, 21, 13, 397, 268, 282, 2, -100, -100,...
self.config['g_series'] = sanitiseFileName(cfile['inetref'])+self.graphic_suffix[rel_type]+'.%(ext)s'
self.config['g_series'] = self.sanitiseFileName(cfile['inetref'])+self.graphic_suffix[rel_type]+'.%(ext)s'
def _getSecondarySourceGraphics(self, cfile, graphic_type, watched=False): '''Download from secondary source such as movieposter.com return None return full qualified path and filename of downloaded graphic ''' if not len(self.config['myth_secondary_sources']): return None
d7120a7dc6b48c0861502d071fe4f1897fab913e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/d7120a7dc6b48c0861502d071fe4f1897fab913e/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 14893, 1830, 17558, 12, 2890, 16, 276, 768, 16, 19548, 67, 723, 16, 23135, 33, 8381, 4672, 9163, 7109, 628, 9946, 1084, 4123, 487, 7344, 522, 881, 29811, 18, 832, 327, 599, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 14893, 1830, 17558, 12, 2890, 16, 276, 768, 16, 19548, 67, 723, 16, 23135, 33, 8381, 4672, 9163, 7109, 628, 9946, 1084, 4123, 487, 7344, 522, 881, 29811, 18, 832, 327, 599, 3...
filenode = hex(mf[f]), file = f))
filenode = hex(mf.get(f, nullid)), file = f))
def changeset(self, nodeid): n = bin(nodeid) cl = self.repo.changelog changes = cl.read(n) p1, p2 = cl.parents(n) p1rev, p2rev = cl.rev(p1), cl.rev(p2) t = float(changes[2].split(' ')[0]) files = [] mf = self.repo.manifest.read(changes[0]) for f in changes[3]: files.append(self.t("filenodelink", filenode = hex(mf[f]), file = f))
39c15cc08929913b09606a78a9db96d9c81e85a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/39c15cc08929913b09606a78a9db96d9c81e85a1/hgweb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22463, 12, 2890, 16, 756, 350, 4672, 290, 273, 4158, 12, 2159, 350, 13, 927, 273, 365, 18, 7422, 18, 24083, 12970, 3478, 273, 927, 18, 896, 12, 82, 13, 293, 21, 16, 293, 22, 273, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22463, 12, 2890, 16, 756, 350, 4672, 290, 273, 4158, 12, 2159, 350, 13, 927, 273, 365, 18, 7422, 18, 24083, 12970, 3478, 273, 927, 18, 896, 12, 82, 13, 293, 21, 16, 293, 22, 273, 9...
class NoEOFStringIO(StringIO.StringIO):
class NoEOFStringIO(io.BytesIO):
def makefile(self, mode, bufsize=None): if mode != 'r' and mode != 'rb': raise httplib.UnimplementedFileMode() return self.fileclass(self.text)
8fff7924a4217dc73de2042168a0eda7243e26d7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/8fff7924a4217dc73de2042168a0eda7243e26d7/test_httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 768, 12, 2890, 16, 1965, 16, 1681, 1467, 33, 7036, 4672, 309, 1965, 480, 296, 86, 11, 471, 1965, 480, 296, 6731, 4278, 1002, 15851, 6673, 18, 984, 21099, 812, 2309, 1435, 327, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 768, 12, 2890, 16, 1965, 16, 1681, 1467, 33, 7036, 4672, 309, 1965, 480, 296, 86, 11, 471, 1965, 480, 296, 6731, 4278, 1002, 15851, 6673, 18, 984, 21099, 812, 2309, 1435, 327, 36...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.CharField.__init__(self, 514) else quickfix.CharField.__init__(self, 514, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 3461, 13, 469, 9549, 904, 18, 2156, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 3461, 13, 469, 9549, 904, 18, 2156, 974, 16186, 2738, ...
def createJoinTables(cls, ifNotExists=False):
def createJoinTables(cls, ifNotExists=False, connection=None): conn = connection or cls._connection
def createJoinTables(cls, ifNotExists=False): for join in cls._getJoinsToCreate(): if ifNotExists and \ cls._connection.tableExists(join.intermediateTable): continue cls._connection._SO_createJoinTable(join)
037450d58325667d5fa7c8539afdd8393fe0bff2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6718/037450d58325667d5fa7c8539afdd8393fe0bff2/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 4572, 6905, 12, 6429, 16, 309, 29210, 33, 8381, 16, 1459, 33, 7036, 4672, 1487, 273, 1459, 578, 2028, 6315, 4071, 364, 1233, 316, 2028, 6315, 588, 4572, 11634, 1684, 13332, 309, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 4572, 6905, 12, 6429, 16, 309, 29210, 33, 8381, 16, 1459, 33, 7036, 4672, 1487, 273, 1459, 578, 2028, 6315, 4071, 364, 1233, 316, 2028, 6315, 588, 4572, 11634, 1684, 13332, 309, 309...
sys.stdout.write(bold("Done\n"))
sys.stdout.write(bold(green("Done\n")))
def main(): # Options for qmake DEFINES = "" CONFIG = "" # Setup command line parser parser = OptionParser(version="%prog 0.2") parser.add_option("--dsp", action="store_true", dest="dsp", help="also Generate Visual Studio project files") parser.add_option("--nocolor", action="store_true", dest="nocolor", help="disable color output support on this script") parser.add_option("--python-includes", dest="py_incpath", help="Python include directory") parser.add_option("--python-libraries", dest="py_libpath", help="Python library path") parser.add_option("--qt-directory", dest="qt_dir", help="Base directory of Qt") parser.add_option("--static", action="store_true", dest="staticlink", help="Build wokfpack using static libraries") parser.add_option("--enable-debug", action="store_true", dest="enable_debug", help="Enables basic debugging support.") parser.add_option("--enable-aidebug", action="store_true", dest="enable_aidebug", help="Enabled debugging of NPC AI.") parser.add_option("--enable-mysql", action="store_true", dest="enable_mysql", help="Enables MySQL support.") parser.add_option("--disable-translation", action="store_true", dest="disable_translation", help="Disable non-English language support.") (options, args) = parser.parse_args() if options.nocolor or sys.platform == "win32": nocolor() checkPython(options, True, not (sys.platform == "darwin") ) if options.enable_mysql: CONFIG += "mysql " DEFINES += "MYSQL_DRIVER " checkMySQL(options) checkQt() if options.disable_translation: DEFINES += "QT_NO_TRANSLATION " # Create config.pri global py_libpath global py_libfile global py_incpath global qt_qmake global mysql_libpath global mysql_libfile global mysql_incpath config = file("config.pri", "w") config.write("# WARNING: This file was automatically generated by configure.py\n") config.write("# any changes to this file will be lost!\n") # Build Python LIBS and Includes if sys.platform == "darwin": # MacPython is build as a Framework, not a library :/ PY_LIBDIR = distutils.sysconfig.get_config_vars("LINKFORSHARED")[0] PY_LIBDIR += " -flat_namespace" else: PY_LIBDIR = buildLibLine( py_libpath, py_libfile ) config.write("PY_LIBDIR = %s\n" % PY_LIBDIR) config.write("PY_INCDIR = %s\n" % py_incpath ) # Build MySQL Libs and Includes MySQL_LIBDIR = buildLibLine( mysql_libpath, mysql_libfile ) config.write("MySQL_INCDIR = %s\n" % mysql_incpath ) config.write("MySQL_LIBDIR = %s\n" % MySQL_LIBDIR ) # if --debug if options.enable_debug: DEFINES += "_DEBUG " CONFIG += "debug warn_on " else: CONFIG += "release warn_off " # if --aidebug if options.enable_aidebug: DEFINES += "_AIDEBUG " config.write("DEFINES += %s\n" % DEFINES) config.write("CONFIG += %s\n" % CONFIG) config.write("LIBS += $$PY_LIBDIR $$MySQL_LIBDIR \n") config.write("INCLUDEPATH += $$PY_INCDIR $$MySQL_INCDIR \n") config.close() sys.stdout.write(green("Generating makefile...")) sys.stdout.flush() os.spawnv(os.P_WAIT, qt_qmake, [qt_qmake, "wolfpack.pro"]) if options.dsp: sys.stdout.write("Generating Visual Studio project files...\n") os.spawnv(os.P_WAIT, qt_qmake, [qt_qmake, "wolfpack.pro", "-t vcapp"]) sys.stdout.write(bold("Done\n")) sys.stdout.write(bold("Configure finished. Please run 'make' now.\n"))
d941256082445e4067ba7bbfd19725f6d2fd0a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d941256082445e4067ba7bbfd19725f6d2fd0a35/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 5087, 364, 1043, 6540, 25957, 3740, 55, 273, 1408, 9128, 273, 1408, 225, 468, 10939, 1296, 980, 2082, 2082, 273, 18862, 12, 1589, 11613, 14654, 374, 18, 22, 7923, 2082, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 5087, 364, 1043, 6540, 25957, 3740, 55, 273, 1408, 9128, 273, 1408, 225, 468, 10939, 1296, 980, 2082, 2082, 273, 18862, 12, 1589, 11613, 14654, 374, 18, 22, 7923, 2082, ...
try: return md.AUTHENTICATED_USER.hasRole(value, roles) except AttributeError: return 0
try: if md.AUTHENTICATED_USER.hasRole(value, roles): return 1 except AttributeError: pass for r in self._proxy_roles: if r in roles: return 1 return 0
def validate(self, inst, parent, name, value, md):
277a97227ea7a5bb49ae2a683280bfad439765c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/277a97227ea7a5bb49ae2a683280bfad439765c8/Document.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 16, 1804, 16, 982, 16, 508, 16, 460, 16, 3481, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 16, 1804, 16, 982, 16, 508, 16, 460, 16, 3481, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
env = app.environment genfiles = [env.doc2path(x) for x in env.found_docs]
env = app.builder.env genfiles = [x + ext for x in env.found_docs if os.path.isfile(env.doc2path(x))]
def process_generate_options(app): genfiles = app.config.autosummary_generate if genfiles and not hasattr(genfiles, '__len__'): env = app.environment genfiles = [env.doc2path(x) for x in env.found_docs] if not genfiles: return from sphinx.ext.autosummary.generate import generate_autosummary_docs ext = app.config.source_suffix genfiles = [genfile + (not genfile.endswith(ext) and ext or '') for genfile in genfiles] generate_autosummary_docs(genfiles, builder=app.builder, warn=app.warn, info=app.info, suffix=ext, base_path=app.srcdir)
c41ca61c67a955faf3f9c038196af280dff581dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7032/c41ca61c67a955faf3f9c038196af280dff581dc/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 7163, 67, 2116, 12, 2910, 4672, 3157, 2354, 273, 595, 18, 1425, 18, 21996, 27804, 67, 7163, 225, 309, 3157, 2354, 471, 486, 3859, 12, 4507, 2354, 16, 4940, 1897, 7250, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 7163, 67, 2116, 12, 2910, 4672, 3157, 2354, 273, 595, 18, 1425, 18, 21996, 27804, 67, 7163, 225, 309, 3157, 2354, 471, 486, 3859, 12, 4507, 2354, 16, 4940, 1897, 7250, 4672, ...
class Library: def __init__(self, repository = None, libraryDir = None, restrictions = None): if not (libraryDir and repository): raise RuntimeError, "Repository and library directory must be defined!" self.repository = repository self.dir = libraryDir self.path = os.path.join(self.repository.dir, self.dir) self.versions = self.getVersions(restrictions) def getVersions(self, restrictions): versions = {} libraryPath = os.path.join(self.repository.dir, self.dir) for root, dirs, files in os.walk(libraryPath, topdown=True): for name in dirs[:]: console.indent() if name[0] == ".": dirs.remove(name) console.outdent() continue if root != libraryPath: parent = root[len(self.path)+1:] name = os.path.join(parent, name) if self.isValidVersion(name, libraryPath, restrictions): console.info("Processing library version %s" %name) try: libVersion = LibraryVersion(self, name) versions[name] = libVersion except Exception, e: console.warn("%s version %s not added: %s" %(self.dir,name,e.message)) console.outdent() return versions def isValidVersion(self, versionName, libraryPath, restrictions): if not restrictions: return True if "versions" in restrictions: if len(restrictions["versions"]) > 0 and (not "*" in restrictions["versions"]): if versionName not in restrictions["versions"]: return False if "qooxdoo-versions" in restrictions: if len(restrictions["qooxdoo-versions"]) > 0 and (not "*" in restrictions["qooxdoo-versions"]): manifestPath = os.path.join(libraryPath, versionName, "Manifest.json") try: versionManifest = getDataFromJsonFile(manifestPath) except Exception: return False compatibleWith = versionManifest["info"]["qooxdoo-versions"] foundCompatible = False for qxVersion in restrictions["qooxdoo-versions"]: if qxVersion in compatibleWith: foundCompatible = True if not foundCompatible: return False return True
def getDataFromJsonFile(path): try: jsonFile = codecs.open(path, "r", "UTF-8") except: raise RuntimeError, "File %s not found" %jsonFile data = jsonFile.read() jsonFile.close() try: return demjson.decode(data, allow_comments=True) except Exception, e: raise RuntimeError, "Couldn't parse JSON from file %s" %jsonFile
def getDemoData(self, library, version, variant): demoDict = { "name": version + "-" + variant + ".html", "nr": variant.capitalize(), "tags": [library], "title": library + " " + version + " " + variant } qooxdooVersions = self.libraries[library].versions[version].getManifest()["info"]["qooxdoo-versions"] for ver in qooxdooVersions: demoDict["tags"].append("qxVersion_" + ver)
9092db6ab87a7dcb194af7c0699d62c81f6fa8f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/9092db6ab87a7dcb194af7c0699d62c81f6fa8f0/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2343, 351, 83, 751, 12, 2890, 16, 5313, 16, 1177, 16, 5437, 4672, 21477, 5014, 273, 288, 315, 529, 6877, 1177, 397, 7514, 397, 5437, 397, 3552, 2620, 3113, 315, 11611, 6877, 5437, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2343, 351, 83, 751, 12, 2890, 16, 5313, 16, 1177, 16, 5437, 4672, 21477, 5014, 273, 288, 315, 529, 6877, 1177, 397, 7514, 397, 5437, 397, 3552, 2620, 3113, 315, 11611, 6877, 5437, 18, ...
blocks[-1][side]['lines'].append(line)
block[side]['lines'].append(line)
def htmlify(match): div, mod = divmod(len(match.group(0)), 2) return div * '&nbsp; ' + mod * '&nbsp;'
c2c7df59886426764bece3408d511302a1797ec3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/c2c7df59886426764bece3408d511302a1797ec3/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 1164, 12, 1916, 4672, 3739, 16, 681, 273, 26105, 12, 1897, 12, 1916, 18, 1655, 12, 20, 13, 3631, 576, 13, 327, 3739, 380, 5183, 10600, 31, 296, 397, 681, 380, 5183, 10600, 4359, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 1164, 12, 1916, 4672, 3739, 16, 681, 273, 26105, 12, 1897, 12, 1916, 18, 1655, 12, 20, 13, 3631, 576, 13, 327, 3739, 380, 5183, 10600, 31, 296, 397, 681, 380, 5183, 10600, 4359, ...
if not self.__set_submit_option__():
submit_opt = self.__set_submit_option__() if not submit_opt:
def submit(self,jdlpath,ce=None): '''Submit a JDL file to LCG'''
b539a73c73d4945301e6c2635eafd6fab1a0dda4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/b539a73c73d4945301e6c2635eafd6fab1a0dda4/Grid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 12, 2890, 16, 78, 5761, 803, 16, 311, 33, 7036, 4672, 9163, 11620, 279, 804, 8914, 585, 358, 511, 20585, 26418, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 12, 2890, 16, 78, 5761, 803, 16, 311, 33, 7036, 4672, 9163, 11620, 279, 804, 8914, 585, 358, 511, 20585, 26418, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
from Products.CMFDefault.Portal import PortalGenerator as _pg _setupDefaultSkins = _pg.setupDefaultSkins
from Products.CMFDefault.Portal import PortalGenerator as _PortalGenerator _setupDefaultSkins = _PortalGenerator.setupDefaultSkins
def _setupCMFSite(app, id=portal_name, quiet=0): '''Creates a CMF site.''' if not hasattr(aq_base(app), id): _optimize() _start = time.time() if not quiet: ZopeTestCase._print('Adding CMF Site ... ') # Add user and log in app.acl_users._doAddUser(portal_owner, '', ['Manager'], []) user = app.acl_users.getUserById(portal_owner).__of__(app.acl_users) newSecurityManager(None, user) # Add CMF site factory = app.manage_addProduct['CMFDefault'] factory.manage_addCMFSite(id, '', create_userfolder=1) # Log out and commit noSecurityManager() get_transaction().commit() if not quiet: ZopeTestCase._print('done (%.3fs)\n' % (time.time()-_start,))
c1a76f0a0f4f896f03a158575649e52298cf88fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11945/c1a76f0a0f4f896f03a158575649e52298cf88fd/CMFTestCase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 9611, 4931, 1137, 12, 2910, 16, 612, 33, 24386, 67, 529, 16, 10902, 33, 20, 4672, 9163, 2729, 279, 385, 13542, 2834, 1093, 6309, 309, 486, 3859, 12, 69, 85, 67, 1969, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 9611, 4931, 1137, 12, 2910, 16, 612, 33, 24386, 67, 529, 16, 10902, 33, 20, 4672, 9163, 2729, 279, 385, 13542, 2834, 1093, 6309, 309, 486, 3859, 12, 69, 85, 67, 1969, 12, ...
print("Writing new config to file: " + configFilePath)
self.log("Writing new config to file: " + configFilePath)
def editConfigJson(self, configFilePath=None, newConfig=None): import demjson if not configFilePath or not newConfig: raise Exception("Missing parameter for editJobConfig!") self.log("Editing config file " + configFilePath) configFile = codecs.open(configFilePath, 'r', 'utf-8') configJson = configFile.read() configFile.close()
3290b6027c4c1df43b6d6bdcab7b29f7919472b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/3290b6027c4c1df43b6d6bdcab7b29f7919472b1/qxtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 809, 3185, 12, 2890, 16, 642, 5598, 33, 7036, 16, 21032, 33, 7036, 4672, 1930, 9626, 1977, 225, 309, 486, 642, 5598, 578, 486, 21032, 30, 1002, 1185, 2932, 4841, 1569, 364, 3874, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 809, 3185, 12, 2890, 16, 642, 5598, 33, 7036, 16, 21032, 33, 7036, 4672, 1930, 9626, 1977, 225, 309, 486, 642, 5598, 578, 486, 21032, 30, 1002, 1185, 2932, 4841, 1569, 364, 3874, ...
NotifyUIAsync (_("No messages present to download"), self.__printInfo)
else: self._setDone() self.__disconnect() NotifyUIAsync(_("No messages present to download"), self.__printInfo)
def __checkForNewMessages(self, msgs):
cd0d773c52b7eb7870b5e37e0d7c668e7d25477c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/cd0d773c52b7eb7870b5e37e0d7c668e7d25477c/imap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1893, 1290, 1908, 5058, 12, 2890, 16, 8733, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1893, 1290, 1908, 5058, 12, 2890, 16, 8733, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
sage: for i in xrange(20): ... g = digraphs.RandomDirectedGNP(15,.3) ... for u,v in g.edges(labels = False): ... g.set_edge_label(u,v,random())
sage: for i in range(20): ... g = digraphs.RandomDirectedGNP(15, 0.3) ... for u, v in g.edges(labels=False): ... g.set_edge_label(u, v, random())
def longest_path(self, s = None, t = None, weighted = False, algorithm = "MILP", solver = None, verbose = 0): r""" Returns a longest path of ``self``.
851087dd5fd3776eb2db10b18fb5402a16a5dd17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/851087dd5fd3776eb2db10b18fb5402a16a5dd17/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 273, 599, 16, 268, 273, 599, 16, 13747, 273, 1083, 16, 4886, 273, 315, 49, 2627, 52, 3113, 12776, 273, 599, 16, 3988, 273, 374, 4672, 436, 8395, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 273, 599, 16, 268, 273, 599, 16, 13747, 273, 1083, 16, 4886, 273, 315, 49, 2627, 52, 3113, 12776, 273, 599, 16, 3988, 273, 374, 4672, 436, 8395, 28...
for lfn,reason in res['Value']['Failed'].items(): gLogger.error("Failed to remove file found in the catalog","%s %s" % (lfn,reason))
for lfn, reason in res['Value']['Failed'].items(): gLogger.error( "Failed to remove file found in the catalog", "%s %s" % ( lfn, reason ) )
def __cleanDirectory(self,dir): res = self.__verifyOperationPermission(dir) if not res['OK']: return res if not res['Value']: errStr = "ReplicaManager.__cleanDirectory: Write access not permitted for this credential." gLogger.error(errStr,dir) return S_ERROR(errStr) res = self.__getCatalogDirectoryContents([dir]) if not res['OK']: return res filesFound = res['Value'].keys() if filesFound: gLogger.info("Attempting to remove %d files from the catalog and storage" % len(filesFound)) res = self.removeFile(filesFound) if not res['OK']: return res for lfn,reason in res['Value']['Failed'].items(): gLogger.error("Failed to remove file found in the catalog","%s %s" % (lfn,reason)) if res['Value']['Failed']: return S_ERROR("Failed to remove all files found in the catalog") storageElements = gConfig.getValue('Resources/StorageElementGroups/Tier1_MC_M-DST',[]) # Have to add some additional storage elements because: # 1: CNAF has to use two different SE types # 2: CNAF has to use different namespace for different rentention storageElements.extend(['CNAF_MC-DST','CNAF-RAW']) failed = False for storageElement in sortList(storageElements): res = self.__removeStorageDirectory(dir,storageElement) if not res['OK']: failed = True if failed: return S_ERROR("Failed to clean storage directory at all SEs") return S_OK()
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6200, 2853, 12, 2890, 16, 1214, 4672, 400, 273, 365, 16186, 8705, 2988, 5041, 12, 1214, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 309, 486, 400, 3292, 620, 3546, 30, 393...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6200, 2853, 12, 2890, 16, 1214, 4672, 400, 273, 365, 16186, 8705, 2988, 5041, 12, 1214, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 309, 486, 400, 3292, 620, 3546, 30, 393...
def test_compare_bytes_to_bytearray(self): self.assertEqual(b"abc" == bytes(b"abc"), True) self.assertEqual(b"ab" != bytes(b"abc"), True) self.assertEqual(b"ab" <= bytes(b"abc"), True) self.assertEqual(b"ab" < bytes(b"abc"), True) self.assertEqual(b"abc" >= bytes(b"ab"), True) self.assertEqual(b"abc" > bytes(b"ab"), True) self.assertEqual(b"abc" != bytes(b"abc"), False) self.assertEqual(b"ab" == bytes(b"abc"), False) self.assertEqual(b"ab" > bytes(b"abc"), False) self.assertEqual(b"ab" >= bytes(b"abc"), False) self.assertEqual(b"abc" < bytes(b"ab"), False) self.assertEqual(b"abc" <= bytes(b"ab"), False) self.assertEqual(bytes(b"abc") == b"abc", True) self.assertEqual(bytes(b"ab") != b"abc", True) self.assertEqual(bytes(b"ab") <= b"abc", True) self.assertEqual(bytes(b"ab") < b"abc", True) self.assertEqual(bytes(b"abc") >= b"ab", True) self.assertEqual(bytes(b"abc") > b"ab", True) self.assertEqual(bytes(b"abc") != b"abc", False) self.assertEqual(bytes(b"ab") == b"abc", False) self.assertEqual(bytes(b"ab") > b"abc", False) self.assertEqual(bytes(b"ab") >= b"abc", False) self.assertEqual(bytes(b"abc") < b"ab", False) self.assertEqual(bytes(b"abc") <= b"ab", False)
def test_compare_bytes_to_bytearray(self): self.assertEqual(b"abc" == bytes(b"abc"), True) self.assertEqual(b"ab" != bytes(b"abc"), True) self.assertEqual(b"ab" <= bytes(b"abc"), True) self.assertEqual(b"ab" < bytes(b"abc"), True) self.assertEqual(b"abc" >= bytes(b"ab"), True) self.assertEqual(b"abc" > bytes(b"ab"), True)
8e1c00cf398f63360436a121ac5e130e511a0386 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/8e1c00cf398f63360436a121ac5e130e511a0386/test_bytes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9877, 67, 3890, 67, 869, 67, 7229, 1126, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 70, 6, 18947, 6, 422, 1731, 12, 70, 6, 18947, 6, 3631, 1053, 13, 365, 18, 11231, 5812, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9877, 67, 3890, 67, 869, 67, 7229, 1126, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 70, 6, 18947, 6, 422, 1731, 12, 70, 6, 18947, 6, 3631, 1053, 13, 365, 18, 11231, 5812, ...
{-1/8,0}
{7/8,1}
def modular_symbol(self, x, check=True): """ Create a modular symbol in this space.
6c6345fcf2bdf2e61a273dbb7cb0dbb2b06393e5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/6c6345fcf2bdf2e61a273dbb7cb0dbb2b06393e5/ambient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 681, 2490, 67, 7175, 12, 2890, 16, 619, 16, 866, 33, 5510, 4672, 3536, 1788, 279, 681, 2490, 3273, 316, 333, 3476, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 681, 2490, 67, 7175, 12, 2890, 16, 619, 16, 866, 33, 5510, 4672, 3536, 1788, 279, 681, 2490, 3273, 316, 333, 3476, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
for id, lst in self.reglist[-1].iteritems(): for stacked, obj in lst: stacked._pop_object(obj)
for stacked, obj in self.reglist[-1].itervalues(): stacked._pop_object(obj)
def cleanup(self): """Remove all objects from all StackedObjectProxy instances that were tracked at this Registry context""" for id, lst in self.reglist[-1].iteritems(): for stacked, obj in lst: stacked._pop_object(obj) self.reglist.pop()
f01e989604815010524f92917346dcc62dbe591f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11400/f01e989604815010524f92917346dcc62dbe591f/registry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6686, 12, 2890, 4672, 3536, 3288, 777, 2184, 628, 777, 7283, 23016, 3886, 3884, 716, 4591, 15200, 622, 333, 5438, 819, 8395, 364, 25776, 16, 1081, 316, 365, 18, 1574, 1098, 18919, 21, 80...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6686, 12, 2890, 4672, 3536, 3288, 777, 2184, 628, 777, 7283, 23016, 3886, 3884, 716, 4591, 15200, 622, 333, 5438, 819, 8395, 364, 25776, 16, 1081, 316, 365, 18, 1574, 1098, 18919, 21, 80...
ispython = regexp.compile('^[a-zA-Z0-9_]+\.py$').match
ispythonprog = regex.compile('^[a-zA-Z0-9_]+\.py$') def ispython(name): return ispythonprog.match(name) >= 0
def main(): bad = 0 if not sys.argv[1:]: # No arguments err('usage: classfix file-or-directory ...\n') sys.exit(2) for arg in sys.argv[1:]: if path.isdir(arg): if recursedown(arg): bad = 1 elif path.islink(arg): err(arg + ': will not process symbolic links\n') bad = 1 else: if fix(arg): bad = 1 sys.exit(bad)
11e7f62dbc21d4f7f18994f4cccbe158544ea85b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/11e7f62dbc21d4f7f18994f4cccbe158544ea85b/classfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 5570, 273, 374, 309, 486, 2589, 18, 19485, 63, 21, 30, 14542, 468, 2631, 1775, 393, 2668, 9167, 30, 667, 904, 585, 17, 280, 17, 5149, 1372, 64, 82, 6134, 2589, 18, 8593, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 5570, 273, 374, 309, 486, 2589, 18, 19485, 63, 21, 30, 14542, 468, 2631, 1775, 393, 2668, 9167, 30, 667, 904, 585, 17, 280, 17, 5149, 1372, 64, 82, 6134, 2589, 18, 8593, ...
found = False for loc in localeSet: if loc.lower().startswith("en"): found = True break
def setLocaleSet(self, localeSet=None, fallback=True): """ Resets the c{I18nManager locale set c{List}.
c9efc6d061529bd9cd11f7029c50fd2b6b69b7d9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9228/c9efc6d061529bd9cd11f7029c50fd2b6b69b7d9/i18nmanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19848, 694, 12, 2890, 16, 2573, 694, 33, 7036, 16, 5922, 33, 5510, 4672, 3536, 1124, 2413, 326, 276, 95, 45, 2643, 82, 1318, 2573, 444, 276, 95, 682, 5496, 2, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19848, 694, 12, 2890, 16, 2573, 694, 33, 7036, 16, 5922, 33, 5510, 4672, 3536, 1124, 2413, 326, 276, 95, 45, 2643, 82, 1318, 2573, 444, 276, 95, 682, 5496, 2, -100, -100, -100, -100, ...
d_model, d_path = dselect.get_selected_rows()
d_model, d_path = dselect.get_selected_rows()
def refresh_closed(self): #We build the closed tasks pane dselect = self.taskdone_tview.get_selection() d_path = None if dselect: d_model, d_path = dselect.get_selected_rows() #pylint: disable-msg=W0612 #We empty the pane self.taskdone_ts.clear() #We rebuild it tag_list, notag_only = self.get_selected_tags() closed_tasks = self.req.get_closed_tasks_list(tags=tag_list,\ notag_only=notag_only) for tid in closed_tasks: t = self.req.get_task(tid) title_str = saxutils.escape(t.get_title()) closeddate = t.get_closed_date() closeddate_str = closeddate tags = t.get_tags() if self.priv["bg_color_enable"] and t.has_tags(): my_color = colors.background_color(t.get_tags()) else: my_color = None if t.get_status() == "Dismiss": title_str = "<span color=\"#AAAAAA\">%s</span>" % title_str closeddate_str = "<span color=\"#AAAAAA\">%s</span>" % closeddate self.taskdone_ts.append(None, [tid, t.get_color(), title_str, closeddate, closeddate_str, my_color, tags]) closed_selection = self.taskdone_tview.get_selection() if d_path: for i in d_path: closed_selection.select_path(i) self.taskdone_ts.set_sort_column_id(self.CTASKS_MODEL_DDATE, gtk.SORT_DESCENDING)
451ea29e3924785bc6c6b8648aa6459b292a0db4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/451ea29e3924785bc6c6b8648aa6459b292a0db4/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 12204, 12, 2890, 4672, 468, 3218, 1361, 326, 4375, 4592, 13618, 302, 4025, 273, 365, 18, 4146, 8734, 67, 88, 1945, 18, 588, 67, 10705, 1435, 302, 67, 803, 273, 599, 309, 302,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 12204, 12, 2890, 4672, 468, 3218, 1361, 326, 4375, 4592, 13618, 302, 4025, 273, 365, 18, 4146, 8734, 67, 88, 1945, 18, 588, 67, 10705, 1435, 302, 67, 803, 273, 599, 309, 302,...
template = '@' + `os.getpid()` + '.'
_pid = os.getpid() template = '@' + `_pid` + '.'
def gettempprefix(): global template if template == None: if os.name == 'posix': template = '@' + `os.getpid()` + '.' elif os.name == 'nt': template = '~' + `os.getpid()` + '-' elif os.name == 'mac': template = 'Python-Tmp-' else: template = 'tmp' # XXX might choose a better one return template
b0e5718643f807af590e16ebb8d3eb401a327ca3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b0e5718643f807af590e16ebb8d3eb401a327ca3/tempfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5814, 3239, 13332, 2552, 1542, 309, 1542, 422, 599, 30, 309, 1140, 18, 529, 422, 296, 24463, 4278, 389, 6610, 273, 1140, 18, 588, 6610, 1435, 1542, 273, 9175, 397, 1375, 67, 6610, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5814, 3239, 13332, 2552, 1542, 309, 1542, 422, 599, 30, 309, 1140, 18, 529, 422, 296, 24463, 4278, 389, 6610, 273, 1140, 18, 588, 6610, 1435, 1542, 273, 9175, 397, 1375, 67, 6610, ...
return self.evaluateString (expr[7:].lstrip())
res = self.evaluateString (expr[7:].lstrip())
def evaluate (self, expr, originalAtts = None): # Returns a ContextVariable self.log.debug ("Evaluating %s" % expr) if (originalAtts is not None): # Call from outside self.globals['attrs'] = ContextVariable(originalAtts) # Supports path, exists, nocall, not, and string expr = expr.strip () if expr.startswith ('path:'): return self.evaluatePath (expr[5:].lstrip ()) elif expr.startswith ('exists:'): return self.evaluateExists (expr[7:].lstrip()) elif expr.startswith ('nocall:'): return self.evaluateNoCall (expr[7:].lstrip()) elif expr.startswith ('not:'): return self.evaluateNot (expr[4:].lstrip()) elif expr.startswith ('string:'): return self.evaluateString (expr[7:].lstrip()) elif expr.startswith ('python:'): return self.evaluatePython (expr[7:].lstrip()) else: # Not specified - so it's a path return self.evaluatePath (expr)
0edb6e3f2306e15c10eb82adbad02c9b014afe28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/0edb6e3f2306e15c10eb82adbad02c9b014afe28/simpleTALES.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5956, 261, 2890, 16, 3065, 16, 2282, 3075, 87, 273, 599, 4672, 468, 2860, 279, 1772, 3092, 365, 18, 1330, 18, 4148, 7566, 6644, 1776, 738, 87, 6, 738, 3065, 13, 309, 261, 8830, 3075, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5956, 261, 2890, 16, 3065, 16, 2282, 3075, 87, 273, 599, 4672, 468, 2860, 279, 1772, 3092, 365, 18, 1330, 18, 4148, 7566, 6644, 1776, 738, 87, 6, 738, 3065, 13, 309, 261, 8830, 3075, ...
def __init__(self, schema, name=None, default=None):
def __init__(self, schema=None, name=None, default=None):
def __init__(self, schema, name=None, default=None): Field.__init__(self, name=name, default=default or {}) self.schema = schema
cc40f8fc42d360f0debe34dbb89af624c7a99d12 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9373/cc40f8fc42d360f0debe34dbb89af624c7a99d12/schema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1963, 33, 7036, 16, 508, 33, 7036, 16, 805, 33, 7036, 4672, 2286, 16186, 2738, 972, 12, 2890, 16, 508, 33, 529, 16, 805, 33, 1886, 578, 2618, 13, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1963, 33, 7036, 16, 508, 33, 7036, 16, 805, 33, 7036, 4672, 2286, 16186, 2738, 972, 12, 2890, 16, 508, 33, 529, 16, 805, 33, 1886, 578, 2618, 13, 365, ...
seFiles[se].append(lfnFilesIDs[lfn]) for se,files in seFiles.items(): res = self.__deleteFileReplicas(files,se=se,connection=connection)
seFiles[se].append( lfnFilesIDs[lfn] ) for se, files in seFiles.items(): res = self.__deleteFileReplicas( files, se = se, connection = connection )
def removeReplica(self,replicaTuples,connection=False): """ Remove replica pfn of lfn. """ gLogger.info("TransformationDB.removeReplica: Attempting to remove %s replicas." % len(replicaTuples)) successful = {} failed = {} lfns = [] for lfn,pfn,se in replicaTuples: lfns.append(lfn) connection = self.__getConnection(connection) res = self.__getFileIDsForLfns(lfns,connection=connection) if not res['OK']: return res fileIDs,lfnFilesIDs = res['Value'] for lfn in lfns: if not lfnFilesIDs.has_key(lfn): successful[lfn] = 'File did not exist' seFiles = {} if fileIDs: for lfn,pfn,se in replicaTuples: if not seFiles.has_key(se): seFiles[se] = [] seFiles[se].append(lfnFilesIDs[lfn]) for se,files in seFiles.items(): res = self.__deleteFileReplicas(files,se=se,connection=connection) if not res['OK']: for fileID in files: failed[fileIDs[fileID]] = res['Message'] else: for fileID in files: successful[fileIDs[fileID]] = True res = self.__getFileReplicas(fileIDs.keys(),allStatus=True,connection=connection) if not res['OK']: gLogger.warn("Failed to remove single replica files") else: noReplicas = [] fileReplicas = res['Value'] for fileID in fileIDs.keys(): if not fileID in fileReplicas.keys(): noReplicas.append(fileIDs[fileID]) if noReplicas: self.removeFile(noReplicas) resDict = {'Successful':successful,'Failed':failed} return S_OK(resDict)
9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 14222, 12, 2890, 16, 30065, 25813, 16, 4071, 33, 8381, 4672, 3536, 3581, 12335, 293, 4293, 434, 328, 4293, 18, 3536, 314, 3328, 18, 1376, 2932, 15292, 2290, 18, 4479, 14222, 30, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 14222, 12, 2890, 16, 30065, 25813, 16, 4071, 33, 8381, 4672, 3536, 3581, 12335, 293, 4293, 434, 328, 4293, 18, 3536, 314, 3328, 18, 1376, 2932, 15292, 2290, 18, 4479, 14222, 30, 12...
0, 0, count, count, pos2 - pos1, -1, 0)
0, 0, count, count, pos2 - pos1, 0xffffffffL, 0)
def close(self): """Close the file, and for mode "w" and "a" write the ending records.""" if self.fp is None: return
42282b10b46702cb6d8edce0152e597e44fb6834 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/42282b10b46702cb6d8edce0152e597e44fb6834/zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 4605, 326, 585, 16, 471, 364, 1965, 315, 91, 6, 471, 315, 69, 6, 1045, 326, 11463, 3853, 12123, 309, 365, 18, 7944, 353, 599, 30, 327, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 4605, 326, 585, 16, 471, 364, 1965, 315, 91, 6, 471, 315, 69, 6, 1045, 326, 11463, 3853, 12123, 309, 365, 18, 7944, 353, 599, 30, 327, 2, -100, -100, -100...
exe = gitexe() if os.path.exists(exe): log.info('git appears to already have been installed to %s'%exe)
if os.path.exists(instpath): log.info('git appears to already have been installed to %s'%instpath)
def build(): 'Build git in previously unpacked git.srcdir().' log.info('building git') fs.goto(srcdir()) from command import cmd,make if not os.path.exists('config.status'): log.info('configuring git') cmd('./configure --prefix=%s'%prefix()) if os.path.exists('git'): log.info('git appears to already have been built') else: make() exe = gitexe() if os.path.exists(exe): log.info('git appears to already have been installed to %s'%exe) else: make('install') return exe
e99fe92acfa5dd595731fe3920f78ae1efc1dfab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9874/e99fe92acfa5dd595731fe3920f78ae1efc1dfab/git.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 13332, 296, 3116, 5071, 316, 7243, 24195, 5071, 18, 4816, 1214, 1435, 1093, 613, 18, 1376, 2668, 3510, 310, 5071, 6134, 225, 2662, 18, 75, 6302, 12, 4816, 1214, 10756, 225, 628, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 13332, 296, 3116, 5071, 316, 7243, 24195, 5071, 18, 4816, 1214, 1435, 1093, 613, 18, 1376, 2668, 3510, 310, 5071, 6134, 225, 2662, 18, 75, 6302, 12, 4816, 1214, 10756, 225, 628, 12...
spo[item] = prefixes[prnot[0]] + prnot[1]
if prnot[0] not in prefixes: raise Exception, "Prefix %s not defined" % prnot[0] else: spo[item] = prefixes[prnot[0]] + prnot[1]
def parseTTL(uri, content, model, debug): # Missing stuff: translated literals, blank nodes if debug: print "Parsing: %s" % uri prefixes = {} spo_stack = [] spo = ["", "", ""] item = 0 anoncnt = 1 for x in calfpytools.scan_ttl_string(content): if x[0] == '': continue if x[0] == 'prefix': spo[0] = "@prefix" item = 1 continue elif (x[0] == '.' and spo_stack == []) or x[0] == ';' or x[0] == ',': if item == 3: if spo[0] == "@prefix": prefixes[spo[1][:-1]] = spo[2] else: model.addTriple(spo[0], spo[1], spo[2]) if x[0] == '.': item = 0 elif x[0] == ';': item = 1 elif x[0] == ',': item = 2 else: if x[0] == '.': item = 0 elif item != 0: raise Exception, uri+": Unexpected " + x[0] elif x[0] == "prnot" and item < 3: prnot = x[1].split(":") if item != 0 and spo[0] == "@prefix": spo[item] = x[1] elif prnot[0] == "_": spo[item] = uri + "#" + prnot[1] else: spo[item] = prefixes[prnot[0]] + prnot[1] item += 1 elif (x[0] == 'URI' or x[0] == "string" or x[0] == "number" or (x[0] == "symbol" and x[1] == "a" and item == 1)) and (item < 3): if x[0] == "URI" and x[1] == "": x = ("URI", uri) elif x[0] == "URI" and x[1].find(":") == -1 and x[1] != "" and x[1][0] != "/": # This is quite silly x = ("URI", os.path.dirname(uri) + "/" + x[1]) spo[item] = x[1] item += 1 elif x[0] == '[': if item != 2: raise Exception, "Incorrect use of [" uri2 = uri + "$anon$" + str(anoncnt) spo[2] = uri2 spo_stack.append(spo) spo = [uri2, "", ""] item = 1 anoncnt += 1 elif x[0] == ']' or x[0] == ')': if item == 3: model.addTriple(spo[0], spo[1], spo[2]) item = 0 spo = spo_stack[-1] spo_stack = spo_stack[:-1] item = 3 elif x[0] == '(': if item != 2: raise Exception, "Incorrect use of (" uri2 = uri + "$anon$" + str(anoncnt) spo[2] = uri2 spo_stack.append(spo) spo = [uri2, "", ""] item = 2 anoncnt += 1 else: print uri + ": Unexpected: " + repr(x)
4d864786dadaa4fb319025308b2524da6b8cf89c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7250/4d864786dadaa4fb319025308b2524da6b8cf89c/lv2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 11409, 12, 1650, 16, 913, 16, 938, 16, 1198, 4672, 468, 10230, 10769, 30, 9955, 18228, 16, 7052, 2199, 309, 1198, 30, 1172, 315, 13963, 30, 738, 87, 6, 738, 2003, 9419, 273, 2618...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 11409, 12, 1650, 16, 913, 16, 938, 16, 1198, 4672, 468, 10230, 10769, 30, 9955, 18228, 16, 7052, 2199, 309, 1198, 30, 1172, 315, 13963, 30, 738, 87, 6, 738, 2003, 9419, 273, 2618...
import time last_seen = ""
last_seen = "" time_from_epoch = sys.maxint
def SetLastSeen(self, user, online =False): import time
9d0a67e64875162679d8978d852238e3e85bca0e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8738/9d0a67e64875162679d8978d852238e3e85bca0e/userlist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 3024, 15160, 12, 2890, 16, 729, 16, 12365, 273, 8381, 4672, 1930, 813, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 3024, 15160, 12, 2890, 16, 729, 16, 12365, 273, 8381, 4672, 1930, 813, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
opts, args = getopt.getopt(argv, "h:v:r:s:i:o:?",
opts, args = getopt.getopt(argv, "h:v:r:s:i:o:",
def main(argv): longitude = "" latitude = "" radius = "" sides = "" inner = "" offset = 0 try: opts, args = getopt.getopt(argv, "h:v:r:s:i:o:?", ["longitude", "latitude", "radius", "sides", "inner", "offset", "help"]) except getopt.GetoptError: usage(1, "Unknown option!"); for opt, arg in opts: if opt in ("-?", "--help"): usage("", 0); elif opt in ("-h", "--longitude"): longitude = float(arg) elif opt in ("-v", "--latitude"): latitude = float(arg) elif opt in ("-r", "--radius"): radius = float(arg) elif opt in ("-s", "--sides"): sides = int(arg) elif opt in ("-i", "--inner"): inner = float(arg) elif opt in ("-o", "--offset"): offset = float(arg) # validate input if longitude == "" or latitude == "": usage(2, "Must specified both longitude and latitude in degrees\n") if sides == "" or sides < 3: usage(2, "Must give numbers of sides of polygon > 2\n") if radius == "" or radius < 0: usage(2, "Must specify radius > 0\n") # inner is different, it's optional if inner != "" and inner < 0: usage(2, "Inner radius must be positive\n") # # DO IT # if inner != "": # it's a star s = kml_star(longitude, latitude, radius, inner, sides, offset) else: s = kml_regular_polygon(longitude, latitude, radius, sides, offset) print s
eeb0e26c30408f18d35f4d44c407ebf62d073507 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4418/eeb0e26c30408f18d35f4d44c407ebf62d073507/kmlcircle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 9192, 273, 1408, 8904, 273, 1408, 5725, 273, 1408, 22423, 273, 1408, 3443, 273, 1408, 1384, 273, 374, 225, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 9192, 273, 1408, 8904, 273, 1408, 5725, 273, 1408, 22423, 273, 1408, 3443, 273, 1408, 1384, 273, 374, 225, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, ...
except win32api.error:
except _winreg.error:
def find_module(self, name, path): if name in self.excludes: self.msgout(3, "find_module -> Excluded") raise ImportError, name
c0de561d5dd39292a9b842dd2fff8f637eff2de2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c0de561d5dd39292a9b842dd2fff8f637eff2de2/modulefinder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 2978, 12, 2890, 16, 508, 16, 589, 4672, 309, 508, 316, 365, 18, 338, 8993, 30, 365, 18, 3576, 659, 12, 23, 16, 315, 4720, 67, 2978, 317, 1312, 7908, 7923, 1002, 11308, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 2978, 12, 2890, 16, 508, 16, 589, 4672, 309, 508, 316, 365, 18, 338, 8993, 30, 365, 18, 3576, 659, 12, 23, 16, 315, 4720, 67, 2978, 317, 1312, 7908, 7923, 1002, 11308, 16, ...
The criteria is a colon-separated list, where each item in the list has the form [name]=[value]. The following criteria are supported: surname=[name] Match a person with [name] in any part of the surname. name=[name] Match a person with [name] in any part of the given name. birth=[year] Match a person whose birth year is a four-digit [year]. birthrange=[year1-year2] Match a person whose birth year is in the range of years from [year1] to [year2], including both [year1] and [year2]. death=[year] deathrange=[year1-year2] marriage=[year] marriagerange=[year1-year2]
The criteria is a colon-separated list, where each item in the list has the form [name]=[value]. The following criteria are supported: * surname=[name] - Match a person with [name] in any part of the surname. * name=[name] - Match a person with [name] in any part of the given name. * birth=[year] - Match a person whose birth year is a four-digit [year]. * birthrange=[year1-year2] - Match a person whose birth year is in the range of years from [year1] to [year2], including both [year1] and [year2]. * death=[year] * deathrange=[year1-year2] * marriage=[year] * marriagerange=[year1-year2]
def criteria_match(self,criteria): """ Check in this element matches all of the given criteria. The criteria is a colon-separated list, where each item in the
182d463db9f78e1f18c8fcdf27da83160dfcb605 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14621/182d463db9f78e1f18c8fcdf27da83160dfcb605/simplepyged.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3582, 67, 1916, 12, 2890, 16, 9714, 4672, 3536, 2073, 316, 333, 930, 1885, 777, 434, 326, 864, 3582, 18, 1021, 3582, 353, 279, 13336, 17, 24622, 666, 16, 1625, 1517, 761, 316, 326, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3582, 67, 1916, 12, 2890, 16, 9714, 4672, 3536, 2073, 316, 333, 930, 1885, 777, 434, 326, 864, 3582, 18, 1021, 3582, 353, 279, 13336, 17, 24622, 666, 16, 1625, 1517, 761, 316, 326, 2, ...
return [os.path.expanduser(f) for f in config_files.split(os.pathsep) if f.strip()]
return [os.path.expanduser(f) for f in config_files if f.strip()]
def get_standard_config_files(self): """Return list of config files, from environment or standard.""" try: config_files = os.environ['DOCUTILSCONFIG'] except KeyError: config_files = self.standard_config_files return [os.path.expanduser(f) for f in config_files.split(os.pathsep) if f.strip()]
678707378566c832cd59e92abe9b820fd58c2fb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/678707378566c832cd59e92abe9b820fd58c2fb8/frontend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 10005, 67, 1425, 67, 2354, 12, 2890, 4672, 3536, 990, 666, 434, 642, 1390, 16, 628, 3330, 578, 4529, 12123, 775, 30, 642, 67, 2354, 273, 1140, 18, 28684, 3292, 19693, 1693, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 10005, 67, 1425, 67, 2354, 12, 2890, 4672, 3536, 990, 666, 434, 642, 1390, 16, 628, 3330, 578, 4529, 12123, 775, 30, 642, 67, 2354, 273, 1140, 18, 28684, 3292, 19693, 1693, 26...
self.priority = random.randint(0,500)
self.priority = math.ceil( (-1.0 / math.log(.5)) * math.log( -1.0 / (random.uniform(0,1) - 1)))
def __init__( self, start, end, linenum, mincols ): # I don't know how many different randoms, or what type of # distribution is prefered for this kind of thing. I'm not a # computer scientist. self.priority = random.randint(0,500) self.start = start self.end = end self.left = None self.right = None self.lines = [linenum] self.mincols = mincols
c120dc6c0978c787c2e6db1f4558ae8d816dc240 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2104/c120dc6c0978c787c2e6db1f4558ae8d816dc240/find_clusters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 787, 16, 679, 16, 4739, 7924, 16, 1131, 6842, 262, 30, 468, 467, 2727, 1404, 5055, 3661, 4906, 3775, 2744, 87, 16, 578, 4121, 618, 434, 468, 7006, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 787, 16, 679, 16, 4739, 7924, 16, 1131, 6842, 262, 30, 468, 467, 2727, 1404, 5055, 3661, 4906, 3775, 2744, 87, 16, 578, 4121, 618, 434, 468, 7006, 353, ...
data[n] = browse_record(self._cr,
new_data[n] = browse_record(self._cr,
def __getitem__(self, name): if name == 'id': return self._id if name not in self._data[self._id]: # build the list of fields we will fetch
22ef4c16bdb808f224cbef7f9e8efd36dfc86e99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/22ef4c16bdb808f224cbef7f9e8efd36dfc86e99/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 508, 4672, 309, 508, 422, 296, 350, 4278, 327, 365, 6315, 350, 309, 508, 486, 316, 365, 6315, 892, 63, 2890, 6315, 350, 14542, 468, 1361, 326, 666, 434,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 508, 4672, 309, 508, 422, 296, 350, 4278, 327, 365, 6315, 350, 309, 508, 486, 316, 365, 6315, 892, 63, 2890, 6315, 350, 14542, 468, 1361, 326, 666, 434,...
func.WriteDocs(file)
if True: func.WriteDocs(file)
def WriteDocs(self, filename): """Writes the command buffer doc version of the commands""" file = CWriter(filename) for func in self.functions: func.WriteDocs(file) file.Write("\n") file.Close()
ee42ed4a69c7e3b162746340666f981a90cdd8be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ee42ed4a69c7e3b162746340666f981a90cdd8be/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 12656, 12, 2890, 16, 1544, 4672, 3536, 8368, 326, 1296, 1613, 997, 1177, 434, 326, 4364, 8395, 585, 273, 385, 2289, 12, 3459, 13, 364, 1326, 316, 365, 18, 10722, 30, 309, 1053, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 12656, 12, 2890, 16, 1544, 4672, 3536, 8368, 326, 1296, 1613, 997, 1177, 434, 326, 4364, 8395, 585, 273, 385, 2289, 12, 3459, 13, 364, 1326, 316, 365, 18, 10722, 30, 309, 1053, 3...
log.add("\nYou must provide a BVR number " "on the partner bank:" + \
raise wizard.except_wizard('Error', 'You must provide a BVR number\n' 'for the bank account: ' + \
def _create_dta(obj, cr, uid, data, context): v={} v['uid'] = str(uid) v['creation_date']= time.strftime('%y%m%d') log=Log() dta='' pool = pooler.get_pool(cr.dbname) payment_obj = pool.get('payment.order') attachment_obj = pool.get('ir.attachment') payment = payment_obj.browse(cr, uid, data['id'], context=context) if not payment.mode or payment.mode.type.code != 'dta': return {'note':'No payment mode or payment type code invalid.'} bank = payment.mode.bank_id if not bank: return {'note':'No bank account for the company.'} v['comp_bank_name']= bank.bank and bank.bank.name or False v['comp_bank_clearing'] = bank.bank.clearing if not v['comp_bank_clearing']: return {'note': 'You must provide a Clearing Number for your bank account.'} user = pool.get('res.users').browse(cr,uid,[uid])[0] company= user.company_id #XXX dirty code use get_addr co_addr= company.partner_id.address[0] v['comp_country'] = co_addr.country_id and co_addr.country_id.name or '' v['comp_street'] = co_addr.street or '' v['comp_zip'] = co_addr.zip v['comp_city'] = co_addr.city v['comp_name'] = co_addr.name v['comp_dta'] = '' #XXX not mandatory in pratice v['comp_bank_number'] = bank.acc_number or '' v['comp_bank_iban'] = bank.iban or '' if not v['comp_bank_iban'] : return {'note':'No iban number for the company bank account.'} dta_line_obj = pool.get('account.dta.line') res_partner_bank_obj = pool.get('res.partner.bank') seq= 1 amount_tot = 0 amount_currency_tot = 0 for pline in payment.line_ids: if not pline.bank_id: log.add('\nNo partner bank defined. (partner: ' + \ pline.partner_id.name + ', entry:' + \ pline.move_line_id.name + ').') continue if not pline.bank_id.bank: log.add('\nNo bank defined on the bank account. (partner: ' + \ pline.partner_id.name + ', entry:' + \ pline.move_line_id.name + ').') v['sequence'] = str(seq).rjust(5).replace(' ', '0') v['amount_to_pay']= str(pline.amount_currency).replace('.', ',') v['number'] = pline.name v['currency'] = pline.currency.code v['partner_bank_name'] = pline.bank_id.bank and pline.bank_id.bank.name \ or False v['partner_bank_clearing'] = pline.bank_id.bank.clearing or False if not v['partner_bank_name'] : log.add('\nPartner bank account not well defined, please provide a name ' 'for the associated bank (partner: ' + pline.partner_id.name + \ ', bank:' + res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] + ').') continue v['partner_bank_iban']= pline.bank_id.iban or False v['partner_bank_number']= pline.bank_id.acc_number \ and pline.bank_id.acc_number.replace('.','').replace('-','') \ or False v['partner_post_number']= pline.bank_id.post_number \ and pline.bank_id.post_number.replace('.', '').replace('-', '') \ or False v['partner_bvr'] = pline.bank_id.bvr_number or '' if v['partner_bvr']: v['partner_bvr'] = v['partner_bvr'].replace('-','') if len(v['partner_bvr']) < 9: v['partner_bvr'] = v['partner_bvr'][:2] + '0' * \ (9 - len(v['partner_bvr'])) + v['partner_bvr'][2:] if pline.bank_id.bank: v['partner_bank_city'] = pline.bank_id.bank.city or False v['partner_bank_street'] = pline.bank_id.bank.street or '' v['partner_bank_zip'] = pline.bank_id.bank.zip or '' v['partner_bank_country'] = pline.bank_id.bank.country and \ pline.bank_id.bank.country.name or '' v['partner_bank_code'] = pline.bank_id.bank.bic v['reference'] = pline.move_line_id.ref v['partner_name'] = pline.partner_id and pline.partner_id.name or '' if pline.partner_id and pline.partner_id.address \ and pline.partner_id.address[0]: v['partner_street'] = pline.partner_id.address[0].street v['partner_city']= pline.partner_id.address[0].city v['partner_zip']= pline.partner_id.address[0].zip # If iban => country=country code for space reason elec_pay = pline.bank_id.state #Bank type if elec_pay == 'iban': v['partner_country']= pline.partner_id.address[0].country_id \ and pline.partner_id.address[0].country_id.code+'-' \ or '' else: v['partner_country']= pline.partner_id.address[0].country_id \ and pline.partner_id.address[0].country_id.name \ or '' else: v['partner_street'] ='' v['partner_city']= '' v['partner_zip']= '' v['partner_country']= '' log.add('\nNo address for the partner: '+pline.partner_id.name) date_value = mx.DateTime.strptime(pline.value_date, '%Y-%m-%d') \ or mx.DateTime.now() v['date_value'] = date_value.strftime("%y%m%d") # si compte iban -> iban (836) # si payment structure -> bvr (826) # si non -> (827) if elec_pay == 'dta_iban': # If iban => country=country code for space reason v['comp_country'] = co_addr.country_id and co_addr.country_id.code+'-' or '' record_type = record_gt836 if not v['partner_bank_iban']: log.add('\nNo iban number for the partner bank:' + \ res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] + \ ' (partner: ' + pline.partner_id.name + ').') continue if v['partner_bank_code'] : # bank code is swift (BIC address) v['option_id_bank']= 'A' v['partner_bank_ident']= v['partner_bank_code'] elif v['partner_bank_city']: v['option_id_bank']= 'D' v['partner_bank_ident']= v['partner_bank_name'] \ + ' ' + v['partner_bank_street'] \ + ' ' + v['partner_bank_zip'] \ + ' ' + v['partner_bank_city'] \ + ' ' + v['partner_bank_country'] else: log.add("\nYou must provide the bank city " "or the bic code for the partner bank:" + \ res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] + \ ' (partner: ' + pline.partner_id.name + ').') continue elif elec_pay == 'bvrbank' or elec_pay == 'bvrpost': from tools import mod10r if v['reference']: v['reference'] = v['reference'].replace(' ', '').rjust(27).replace(' ', '0') if not v['reference'] \ or mod10r(v['reference'][:-1]) != v['reference']: log.add('\nYou must provide a valid BVR reference number.' ' (payment line ' + pline.name +')') continue if not v['partner_bvr']: log.add("\nYou must provide a BVR number " "on the partner bank:" + \ res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] + \ ' (partner: ' + pline.partner_id.name + ').') continue record_type = record_gt826 elif elec_pay == 'bvbank': if not v['partner_bank_number'] : if v['partner_bank_iban'] : v['partner_bank_number']= v['partner_bank_iban'] else: log.add('\nYou must provide a bank number in the partner bank.' ' (payment line '+ pline.name +')') continue if not v['partner_bank_clearing']: log.add('\nPartner bank must have a Clearing Number' 'for a BV Bank operation. (payment line '+ pline.name +')') continue v['partner_bank_number'] = '/C/'+v['partner_bank_number'] record_type = record_gt827 elif elec_pay == 'bvpost': if not v['partner_post_number']: log.add('\nYou must provide a post number in the partner bank.' ' (payment line '+ pline.name +')') continue v['partner_bank_clearing']= '' v['partner_bank_number'] = '/C/'+v['partner_post_number'] record_type = record_gt827 else: log.add('\nBank type not supported. (partner:'+ pline.partner_id.name + \ ', bank:' + \ res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] + \ ', type:' + elec_pay + ')') continue try: dta_line = record_type(v).generate() except Exception,e : log.add('\nERROR:'+ str(e)+' (payment line '+ pline.name + ')') raise continue #logging log.add('Payment line : %s, Amount paid : %d %s, ' 'Value date : %s, State : Paid.' % \ (pline.name, pline.amount, v['currency'], date_value and \ date_value.strftime("%Y-%m-%d") or 'Empty date'), error=False) dta = dta + dta_line amount_tot += pline.amount amount_currency_tot += pline.amount_currency seq += 1 # segment total v['amount_total'] = str(amount_currency_tot).replace('.',',') v['sequence'] = str(seq).rjust(5).replace(' ','0') try: if dta : dta = dta + record_gt890(v).generate() except Exception,e : log.add('\n'+ str(e) + 'CORRUPTED FILE !\n') raise log.add("\n--\nSummary :\nTotal amount paid : %.2f" \ % (amount_tot,), error=False) if not log.error: dta_data= base64.encodestring(dta) payment_obj.set_done(cr, uid, data['id'], context) attachment_obj.create(cr, uid, { 'name': 'DTA', 'datas': dta_data, 'datas_fname': 'DTA.txt', 'res_model': 'payment.order', 'res_id': data['id'], }, context=context) else: dta_data= False return {'note':log(), 'dta': dta_data}
37f9126996ca14fd28e570694117dd491f10c960 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7339/37f9126996ca14fd28e570694117dd491f10c960/dta_wizard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 72, 2351, 12, 2603, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 331, 12938, 331, 3292, 1911, 3546, 273, 609, 12, 1911, 13, 331, 3292, 17169, 67, 712, 3546, 33, 813, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 72, 2351, 12, 2603, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 331, 12938, 331, 3292, 1911, 3546, 273, 609, 12, 1911, 13, 331, 3292, 17169, 67, 712, 3546, 33, 813, 18...
@param id: structure type ID
@param sid: structure type ID
def GetMemberName(id, member_offset): """ Get name of a member of a structure @param id: structure type ID @param member_offset: member offset. The offset can be any offset in the member. For example, is a member is 4 bytes long and starts at offset 2, then 2,3,4,5 denote the same structure member. @return: None if bad structure type ID is passed or no such member in the structure otherwise returns name of the specified member. """ s = idaapi.get_struc(id) if not s: return None m = idaapi.get_member(s, member_offset) if not m: return None return idaapi.get_member_name(m.id)
76aa24fecdace41c9fc827e500b95cfdf5053272 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4773/76aa24fecdace41c9fc827e500b95cfdf5053272/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4419, 461, 12, 350, 16, 3140, 67, 3348, 4672, 3536, 968, 508, 434, 279, 3140, 434, 279, 3695, 225, 632, 891, 7348, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 3140, 1384, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4419, 461, 12, 350, 16, 3140, 67, 3348, 4672, 3536, 968, 508, 434, 279, 3140, 434, 279, 3695, 225, 632, 891, 7348, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 3140, 1384, ...
def __init__(self, MetarReport=None):
def __init__(self, MetarReport = None):
def __init__(self, MetarReport=None): """Set attribute Report as specified on instantation.""" self.Report=MetarReport
fe1cdcd11658fbbfba6d30dfe37a2f9dfce6a1a8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4602/fe1cdcd11658fbbfba6d30dfe37a2f9dfce6a1a8/pymetar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 21604, 297, 4820, 273, 599, 4672, 3536, 694, 1566, 8706, 487, 1269, 603, 5934, 367, 12123, 365, 18, 4820, 33, 12244, 297, 4820, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 21604, 297, 4820, 273, 599, 4672, 3536, 694, 1566, 8706, 487, 1269, 603, 5934, 367, 12123, 365, 18, 4820, 33, 12244, 297, 4820, 2, -100, -100, -100, -100, ...
stream.close()
def run(self): q = self.q while True: it = q.get(1) if self.lp == 0: self.logger.write('Error : Station ' + self.short_name + ' have no media to stream !') break media = self.get_next_media() self.counter += 1 q.task_done()
38ef3dbd07a6b67931c27ff788f5dcefbdafba2e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12047/38ef3dbd07a6b67931c27ff788f5dcefbdafba2e/deefuzzer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1043, 273, 365, 18, 85, 1323, 1053, 30, 518, 273, 1043, 18, 588, 12, 21, 13, 309, 365, 18, 9953, 422, 374, 30, 365, 18, 4901, 18, 2626, 2668, 668, 294, 934, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1043, 273, 365, 18, 85, 1323, 1053, 30, 518, 273, 1043, 18, 588, 12, 21, 13, 309, 365, 18, 9953, 422, 374, 30, 365, 18, 4901, 18, 2626, 2668, 668, 294, 934, 3...
"parts" :
"parts" :
def process(options): global verbose global quiet verbose = options.verbose quiet = options.quiet if verbose: quiet = False print ">>> Processing..." if not quiet: print " - Configuration: %s" % options.config print " - Jobs: %s" % ", ".join(options.jobs) # TODO: File parser # - Translate dashed to camelcase # - Translate "true" to Python "True" # Include/Exclude hints # # class/module => # include items with their dependencies # exclude items, also remove items not needed by other modules than the removed ones # # =class/module => # explicit include/exclude of given module or class # config = { "common" : { "classPath" : [ "framework/source/class", "application/apiviewer/source/class", "application/feedreader/source/class", "application/webmail/source/class", "application/showcase/source/class" ], "require" : { "qx.log.Logger" : ["qx.log.appender.Native"] } }, "source" : { "extend" : ["common"], "sourceScript" : "source.js" }, "api-feedreader" : { "extend" : ["common"], "apiScript" : "api-feedreader", "include" : ["feedreader.Application"] }, "build-common" : { "extend" : ["common"] }, "build-all" : { "extend" : ["build-common"], "buildScript" : "build-all" }, "build-core" : { "extend" : ["build-common"], "buildScript" : "build-core", "include" : ["apiviewer.Application"], "exclude" : ["ui_tree","=qx.ui.core.Widget"] }, "build-apiviewer" : { "extend" : ["build-common"], "buildScript" : "build-apiviewer", "include" : ["apiviewer.*","qx.theme.ClassicRoyale"], "buildProcess" : [ "optimize-variables", "optimize-basecalls", "optimize-strings", "optimize-privates" ] }, "build-apiviewer-variants" : { "extend" : ["build-common"], "buildScript" : "build-apiviewer-variants", "include" : ["apiviewer.*","qx.theme.ClassicRoyale"], "variants" : { #"qx.debug" : ["on","off"], "qx.debug" : ["off"], "qx.aspects" : ["off"], #"qx.client" : ["gecko","mshtml","webkit","opera"], "qx.client" : ["gecko","mshtml"] }, "buildProcess" : [ "optimize-variables", "optimize-basecalls", "optimize-strings" ] }, "build-feedreader" : { "extend" : ["build-common"], "buildScript" : "build-feedreader", "include" : ["feedreader.Application"] }, "build-parts-common" : { "extend" : ["build-common"], "optimizeLatency" : 5000 }, "build-app-views" : { "extend" : ["build-parts-common"], "buildScript" : "build-app-views", #"collapseParts" : ["webmail","feedreader","showcase"], "views" : { "apiviewer" : ["apiviewer.Application"], "feedreader" : ["feedreader.Application"], "webmail" : ["webmail.Application"], "showcase" : ["showcase.Application"] } }, "build-comp-views" : { "extend" : ["build-parts-common"], "buildScript" : "build-comp-parts", "parts" : { "tree" : ["ui_tree"], "colorselector" : ["qx.ui.component.ColorSelector"], "window" : ["ui_window"], "toolbar" : ["ui_toolbar", "ui_menu"], "table" : ["ui_table"], "form" : ["ui_form"] } }, "build-feedreader-parts" : { "extend" : ["build-parts-common"], "buildScript" : "build-feedreader-parts", "collapseParts" : ["core"], "parts" : { "core" : ["feedreader.Application","qx.theme.ClassicRoyale"], "table" : ["qx.ui.table.Table", "qx.ui.table.model.Simple", "qx.ui.table.columnmodel.Resize"], "article" : ["feedreader.ArticleView"], "preferences" : ["ui_window"] } }, "build-apiviewer-parts" : { "extend" : ["build-parts-common"], "buildScript" : "build-apiviewer-parts", "variants" : { "qx.debug" : ["off"], "qx.client" : ["gecko","mshtml"] }, "collapseParts" : ["core"], "parts" : { "core" : ["apiviewer.Application","qx.theme.ClassicRoyale"], "viewer" : ["apiviewer.Viewer"], "content" : ["apiviewer.ui.ClassViewer","apiviewer.ui.PackageViewer"] } }, "build-apiviewer-parts-noqx" : { "extend" : ["build-parts-common"], "buildScript" : "build-apiviewer-parts-noqx", "variants" : { "qx.debug" : ["off"], "qx.client" : ["gecko","mshtml"] }, "collapseParts" : ["core"], "include" : ["apiviewer.Application"], "exclude" : ["=qx.*"], "parts" : { "core" : ["apiviewer.Application","qx.theme.ClassicRoyale"], "viewer" : ["apiviewer.Viewer"], "content" : ["apiviewer.ui.ClassViewer","apiviewer.ui.PackageViewer"] } } } resolve(config, options.jobs) for job in options.jobs: execute(job, config[job])
e3364bd2416dfe75fd85aeea0ded427372ef3d08 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/e3364bd2416dfe75fd85aeea0ded427372ef3d08/generator2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2116, 4672, 2552, 3988, 2552, 10902, 225, 3988, 273, 702, 18, 11369, 10902, 273, 702, 18, 20380, 225, 309, 3988, 30, 10902, 273, 1083, 225, 1172, 315, 23012, 19652, 7070, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2116, 4672, 2552, 3988, 2552, 10902, 225, 3988, 273, 702, 18, 11369, 10902, 273, 702, 18, 20380, 225, 309, 3988, 30, 10902, 273, 1083, 225, 1172, 315, 23012, 19652, 7070, 309, ...
class Record(dict):
def chunks(list, size): for i in xrange(0, len(list), size): yield list[i:i+size] class Record(dict):
def sortfields(input): fixed = [fix_fieldname(k) for k in input] output = [] # first add the standard fields, by group for group in fieldorder: for k in fields[group]: if k in fixed or fix_fieldname(k) in fixed: rk = input[fixed.index(k)] output.append(rk) for k in input: if k not in output: output.append(k) return output
c778e75b1091c4353bd2128d8a90f713a34ccb0a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4609/c778e75b1091c4353bd2128d8a90f713a34ccb0a/accdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 2821, 12, 2630, 4672, 5499, 273, 306, 904, 67, 1518, 529, 12, 79, 13, 364, 417, 316, 810, 65, 876, 273, 5378, 225, 468, 1122, 527, 326, 4529, 1466, 16, 635, 1041, 364, 1041, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 2821, 12, 2630, 4672, 5499, 273, 306, 904, 67, 1518, 529, 12, 79, 13, 364, 417, 316, 810, 65, 876, 273, 5378, 225, 468, 1122, 527, 326, 4529, 1466, 16, 635, 1041, 364, 1041, 31...
self.taskdone_ts.set_sort_column_id(self.CTASKS_MODEL_DDATE, gtk.SORT_DESCENDING)
self.taskdone_ts.set_sort_column_id( self.CTASKS_MODEL_DDATE, gtk.SORT_DESCENDING)
def __create_closed_tasks_tview(self):
451ea29e3924785bc6c6b8648aa6459b292a0db4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/451ea29e3924785bc6c6b8648aa6459b292a0db4/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 67, 12204, 67, 9416, 67, 88, 1945, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 67, 12204, 67, 9416, 67, 88, 1945, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.rmsd_combox.setCurrentItem(self.pset.ui.rmdsconv)
self.rmsd_combox.setCurrentItem(self.pset.ui.rmsdconv)
def _setup(self): ''' Setup widgets to initial (default or defined) values. Return True on error. ''' gamess = self.gamessJig # In case we cancel later (not implemented yet) # Init the top widgets (name, psets drop box, comment) self.name_linedit.setText(self.gamessJig.name) self.runtyp_combox.setCurrentItem(self.pset.ui.runtyp) # RUNTYP self.comment_linedit.setText(self.pset.ui.comment) # Electronic Structure Properties section. self.scftyp_btngrp.setButton(self.pset.ui.scftyp) # RHF, UHF, or ROHF self.icharg_spinbox.setValue(self.pset.ui.icharg) # Charge self.multi_combox.setCurrentItem(self.pset.ui.mult) # Multiplicity # Disable RHF if multiplicity is not the first item. if self.pset.ui.mult == 0: self.rhf_radiobtn.setEnabled(1) # Enable RHF else: self.rhf_radiobtn.setEnabled(0) # Disable RHF # System Memory and Usage self.dirscf_checkbox.setChecked(self.pset.ui.dirscf) # DIRSCF self.memory_spinbox.setValue(self.pset.ui.memory) # Memory # Electron Correlation Method and Basis Set ecm = self.pset.ui.ecm self.ecm_btngrp.setButton(self.pset.ui.ecm) # None, DFT or MP2 self.set_ecmethod(self.pset.ui.ecm) # None, DFT or MP2 self.gbasis_combox.setCurrentItem(self.pset.ui.gbasis) # Basis set # Load the combo box with all the valid DFT functions. self._load_dfttyp_combox() self.dfttyp_combox.setCurrentItem(self.pset.ui.dfttyp) # DFT Functional self.gridsize_combox.setCurrentItem(self.pset.ui.gridsize) # Grid Size self.core_electrons_checkbox.setChecked(self.pset.ui.ncore) # Include core electrons # Convergence Criteria self.density_conv_combox.setCurrentItem(self.pset.ui.conv) # Density Convergence self.rmsd_combox.setCurrentItem(self.pset.ui.rmdsconv) # RMSD Convergence self.iterations_spinbox.setValue(self.pset.ui.iterations) # Iterations
621578432efcf860067d789a1b81d9b2afa38698 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/621578432efcf860067d789a1b81d9b2afa38698/GamessProp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 12, 2890, 4672, 9163, 10939, 10965, 358, 2172, 261, 1886, 578, 2553, 13, 924, 18, 2000, 1053, 603, 555, 18, 9163, 23411, 403, 273, 365, 18, 75, 301, 403, 46, 360, 468, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 12, 2890, 4672, 9163, 10939, 10965, 358, 2172, 261, 1886, 578, 2553, 13, 924, 18, 2000, 1053, 603, 555, 18, 9163, 23411, 403, 273, 365, 18, 75, 301, 403, 46, 360, 468, 225, ...
this = apply(_quickfix.new_NoLegAllocs, args)
this = _quickfix.new_NoLegAllocs(*args)
def __init__(self, *args): this = apply(_quickfix.new_NoLegAllocs, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 2279, 8329, 8763, 87, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 2279, 8329, 8763, 87, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
self.oldActivationValue = None
self.oldActivationValue = 0
def __init__(self, activationValue=0, age=0): self.oldActivationValue = None self.activationValue = activationValue self.age = age self.influence = None
4c5558d41c268af2aed5dd7e820d0a0a2f432dfd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13131/4c5558d41c268af2aed5dd7e820d0a0a2f432dfd/ConceptNetwork.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 10027, 620, 33, 20, 16, 9388, 33, 20, 4672, 365, 18, 1673, 14857, 620, 273, 374, 365, 18, 16908, 620, 565, 273, 10027, 620, 365, 18, 410, 7734, 273, 93...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 10027, 620, 33, 20, 16, 9388, 33, 20, 4672, 365, 18, 1673, 14857, 620, 273, 374, 365, 18, 16908, 620, 565, 273, 10027, 620, 365, 18, 410, 7734, 273, 93...
choices=validPixFmt, help="pixel format (one of: %s)" %', '.join(validPixFmt))
choices=validPixFmt, help="pixel format (one of: %s)" %', '.join(validPixFmt))
def checkCamera(): if not(camNode.isAvailable()): Log.trace(Log.APP, "Could not open camera") exit(1)
e22509155a0a9ff1f424dc4a889757a78d0bb6d8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7300/e22509155a0a9ff1f424dc4a889757a78d0bb6d8/avg_showcamera.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 16521, 13332, 309, 486, 12, 20133, 907, 18, 291, 5268, 1435, 4672, 1827, 18, 5129, 12, 1343, 18, 7215, 16, 315, 4445, 486, 1696, 10836, 7923, 2427, 12, 21, 13, 282, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 16521, 13332, 309, 486, 12, 20133, 907, 18, 291, 5268, 1435, 4672, 1827, 18, 5129, 12, 1343, 18, 7215, 16, 315, 4445, 486, 1696, 10836, 7923, 2427, 12, 21, 13, 282, 2, -100, -100,...
s += '<a id="worksheet_title" class="worksheet_title" onClick="rename_worksheet(); return false;" title="Click to rename this worksheet">%s</a>'%(name.replace('<','&lt;'))
s += '<a id="worksheet_title" class="worksheet_title" onClick="rename_worksheet(); return false;" title="Click to rename this worksheet">%s</a>'%(cgi.escape(name))
def html_title(self, username='guest'): name = self.truncated_name()
9a1be1ceb8ead4053f89920bda668bae5f4e42c8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/9a1be1ceb8ead4053f89920bda668bae5f4e42c8/worksheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 67, 2649, 12, 2890, 16, 2718, 2218, 18908, 11, 4672, 508, 273, 365, 18, 23558, 690, 67, 529, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 67, 2649, 12, 2890, 16, 2718, 2218, 18908, 11, 4672, 508, 273, 365, 18, 23558, 690, 67, 529, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
minval = value.fromXmlString(node.templatenode.getAttribute('minInclusive'),{},node.templatenode) if value<minval: if repair==2 or (repair==1 and node.isHidden()): node.setValue(minval) else: validity[node] = False errors.append('variable "%s" is set to %s, which lies below the minimum of %s.' % (node.getText(1),value.toPrettyString(),minval.toPrettyString())) if isinstance(value,util.referencedobject): value.release()
if value is not None: minval = value.fromXmlString(node.templatenode.getAttribute('minInclusive'),{},node.templatenode) if value<minval: if repair==2 or (repair==1 and node.isHidden()): node.setValue(minval) else: validity[node] = False errors.append('variable "%s" is set to %s, which lies below the minimum of %s.' % (node.getText(1),value.toPrettyString(),minval.toPrettyString())) if isinstance(value,util.referencedobject): value.release()
def _validate(self,nodes,usedefault=True,repair=0,callback=None,usehistory=True):
203e2504f39f05e974ced30eb7b98747d9abbc8b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/381/203e2504f39f05e974ced30eb7b98747d9abbc8b/xmlstore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5662, 12, 2890, 16, 4690, 16, 1202, 1886, 33, 5510, 16, 266, 6017, 33, 20, 16, 3394, 33, 7036, 16, 1202, 8189, 33, 5510, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5662, 12, 2890, 16, 4690, 16, 1202, 1886, 33, 5510, 16, 266, 6017, 33, 20, 16, 3394, 33, 7036, 16, 1202, 8189, 33, 5510, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
_err_exit("Cannot run file %s because: %s" % \ (`sys.argv[0]`, err)) elif count: t = Coverage(ignore) try: run(t.trace, 'execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % \ (`sys.argv[0]`, err))
_err_exit("Cannot run file %s because: %s" % (`sys.argv[0]`, err))
def main(argv = None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:msC:", ["help", "version", "trace", "count", "report", "no-report", "file=", "logdir=", "missing", "ignore-module=", "ignore-dir=", "coverdir="]) except getopt.error, msg: print >> sys.stderr, "%s: %s" % (sys.argv[0], msg) print >> sys.stderr, "Try `%s --help' for more information" \ % sys.argv[0] sys.exit(1) trace = 0 count = 0 report = 0 no_report = 0 counts_file = None logdir = "." missing = 0 ignore_modules = [] ignore_dirs = [] coverdir = None summary = 0 for opt, val in opts: if opt == "--help": usage(sys.stdout) sys.exit(0) if opt == "--version": sys.stdout.write("trace 2.0\n") sys.exit(0) if opt == "-t" or opt == "--trace": trace = 1 continue if opt == "-c" or opt == "--count": count = 1 continue if opt == "-r" or opt == "--report": report = 1 continue if opt == "-R" or opt == "--no-report": no_report = 1 continue if opt == "-f" or opt == "--file": counts_file = val continue if opt == "-d" or opt == "--logdir": logdir = val continue if opt == "-m" or opt == "--missing": missing = 1 continue if opt == "-C" or opt == "--coverdir": coverdir = val continue if opt == "-s" or opt == "--summary": summary = 1 continue if opt == "--ignore-module": ignore_modules.append(val) continue if opt == "--ignore-dir": for s in string.split(val, os.pathsep): s = os.path.expandvars(s) # should I also call expanduser? (after all, could use $HOME) s = string.replace(s, "$prefix", os.path.join(sys.prefix, "lib", "python" + sys.version[:3])) s = string.replace(s, "$exec_prefix", os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3])) s = os.path.normpath(s) ignore_dirs.append(s) continue assert 0, "Should never get here" if len(prog_argv) == 0: _err_exit("missing name of file to run") if count + trace + report > 1: _err_exit("can only specify one of --trace, --count or --report") if count + trace + report == 0: _err_exit("must specify one of --trace, --count or --report") if report and counts_file is None: _err_exit("--report requires a --file") if report and no_report: _err_exit("cannot specify both --report and --no-report") if logdir is not None: # warn if the directory doesn't exist, but keep on going # (is this the correct behaviour?) if not os.path.isdir(logdir): sys.stderr.write( "trace: WARNING, --logdir directory %s is not available\n" % `logdir`) sys.argv = prog_argv progname = prog_argv[0] if eval(sys.version[:3])>1.3: sys.path[0] = os.path.split(progname)[0] # ??? # everything is ready ignore = Ignore(ignore_modules, ignore_dirs) if trace: t = Trace(ignore) try: run(t.trace, 'execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % \ (`sys.argv[0]`, err)) elif count: t = Coverage(ignore) try: run(t.trace, 'execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % \ (`sys.argv[0]`, err)) except SystemExit: pass results = t.results() # Add another lookup from the program's file name to its import name # This give the right results, but I'm not sure why ... results.modules[progname] = os.path.splitext(progname)[0] if counts_file: # add in archived data, if available try: old_counts, old_modules = marshal.load(open(counts_file, 'rb')) except IOError: pass else: results.update(CoverageResults(old_counts, old_modules)) if not no_report: create_results_log(results, logdir, missing, summary=summary, coverdir=coverdir) if counts_file: try: marshal.dump( (results.counts, results.modules), open(counts_file, 'wb')) except IOError, err: _err_exit("Cannot save counts file %s because: %s" % \ (`counts_file`, err)) elif report: old_counts, old_modules = marshal.load(open(counts_file, 'rb')) results = CoverageResults(old_counts, old_modules) create_results_log(results, logdir, missing, summary=summary, coverdir=coverdir) else: assert 0, "Should never get here"
dc6ad8d207ed136b6b1c7c8a4e6aa0c126e7bc61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/dc6ad8d207ed136b6b1c7c8a4e6aa0c126e7bc61/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 273, 599, 4672, 1930, 336, 3838, 225, 309, 5261, 353, 599, 30, 5261, 273, 2589, 18, 19485, 775, 30, 1500, 16, 11243, 67, 19485, 273, 336, 3838, 18, 588, 3838, 12, 1948...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 273, 599, 4672, 1930, 336, 3838, 225, 309, 5261, 353, 599, 30, 5261, 273, 2589, 18, 19485, 775, 30, 1500, 16, 11243, 67, 19485, 273, 336, 3838, 18, 588, 3838, 12, 1948...
Return the formal power series in g corresponding to this overconvergent modular form (so the result is F where this modular form
Return the formal power series in `g` corresponding to this overconvergent modular form (so the result is `F` where this modular form
def gexp(self): r""" Return the formal power series in g corresponding to this overconvergent modular form (so the result is F where this modular form is `E_k^\ast \times F(g)`, where `g` is the appropriately normalised parameter of `X_0(p)`).
51aabb4f4c1d25de708da4cd9e8295aeb8a186e7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/51aabb4f4c1d25de708da4cd9e8295aeb8a186e7/genus0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 2749, 12, 2890, 4672, 436, 8395, 2000, 326, 25739, 7212, 4166, 316, 1375, 75, 68, 4656, 358, 333, 1879, 591, 502, 75, 319, 681, 2490, 646, 261, 2048, 326, 563, 353, 1375, 42, 68, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 2749, 12, 2890, 4672, 436, 8395, 2000, 326, 25739, 7212, 4166, 316, 1375, 75, 68, 4656, 358, 333, 1879, 591, 502, 75, 319, 681, 2490, 646, 261, 2048, 326, 563, 353, 1375, 42, 68, ...
dummy.SetAutoLayout(TRUE) dummy.SetSizer(topsizer) m_IndexText = wxTextCtrl(dummy, wxID_HTML_INDEXTEXT, '', wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER) m_IndexButton = wxButton(dummy, wxID_HTML_INDEXBUTTON, "Find") m_IndexButtonAll = wxButton(dummy, wxID_HTML_INDEXBUTTONALL, "Show all") m_IndexCountInfo = wxStaticText(dummy, wxID_HTML_COUNTINFO, '', wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT | wxST_NO_AUTORESIZE) m_IndexList = wxListBox(dummy, wxID_HTML_INDEXLIST, wxDefaultPosition, wxDefaultSize, style=wxLB_SINGLE) m_IndexButton.SetToolTipString("Display all index items that contain given substring. Search is case insensitive.") m_IndexButtonAll.SetToolTipString("Show all items in index") topsizer.Add(m_IndexText, 0, wxEXPAND | wxALL, 10) btsizer = wxBoxSizer(wxHORIZONTAL) btsizer.Add(m_IndexButton, 0, wxRIGHT, 2) btsizer.Add(m_IndexButtonAll) topsizer.Add(btsizer, 0, wxALIGN_RIGHT | wxLEFT | wxRIGHT | wxBOTTOM, 10) topsizer.Add(m_IndexCountInfo, 0, wxEXPAND | wxLEFT | wxRIGHT, 2) topsizer.Add(m_IndexList, 1, wxEXPAND | wxALL, 2) m_NavigNotebook.AddPage(dummy, "Index") m_IndexPage = notebook_page notebook_page += 1
panel.SetAutoLayout(TRUE) panel.SetSizer(topsizer) m_IndexText = wxTextCtrl(panel, wxID_HTML_INDEXTEXT, '', wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER) m_IndexList = wxListBox(panel, wxID_HTML_INDEXLIST, wxDefaultPosition, wxDefaultSize, style=wxLB_SINGLE) topsizer.Add(m_IndexText, 0, wxEXPAND | wxALL) topsizer.Add(m_IndexList, 1, wxEXPAND | wxALL) m_NavigNotebook.AddPage(panel, "Index")
def __init__(self, parent, id, title, style = wxHF_DEFAULT_STYLE): wxFrame.__init__(self,parent,-4, title, style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE)
e8a0e62c076da03b00d6de86211d9c1f32733a01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2448/e8a0e62c076da03b00d6de86211d9c1f32733a01/wxApp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 2077, 16, 2154, 273, 7075, 44, 42, 67, 5280, 67, 15066, 4672, 7075, 3219, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 17, 24, 16, 2077,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 2077, 16, 2154, 273, 7075, 44, 42, 67, 5280, 67, 15066, 4672, 7075, 3219, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 17, 24, 16, 2077,...
del req.args[k]
del req.args[k]
def match_request(self, req): if re.match(r'/newticket/?$', req.path_info) is not None: if req.method != 'POST': for k in req.args.keys(): if not k.startswith('__'): req.args['field_'+k] = req.args[k] del req.args[k] return True match = re.match(r'/ticket/([0-9]+)$', req.path_info) if match: req.args['id'] = match.group(1) return True
d389efdc01ff928464048a3ba104311ae73eb282 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/d389efdc01ff928464048a3ba104311ae73eb282/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 67, 2293, 12, 2890, 16, 1111, 4672, 309, 283, 18, 1916, 12, 86, 11, 19, 2704, 16282, 23239, 8, 2187, 1111, 18, 803, 67, 1376, 13, 353, 486, 599, 30, 309, 1111, 18, 2039, 480, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 67, 2293, 12, 2890, 16, 1111, 4672, 309, 283, 18, 1916, 12, 86, 11, 19, 2704, 16282, 23239, 8, 2187, 1111, 18, 803, 67, 1376, 13, 353, 486, 599, 30, 309, 1111, 18, 2039, 480, ...
plot(getinjpar(injection,5),getinjpar(injection,6),'go',scalex=False,scaley=False)
print 'getinjpar(5),getinjpar(6) = %f,%f\n'%(getinjpar(injection,5),getinjpar(injection,6)) plot([getinjpar(injection,5)],[getinjpar(injection,6)],'go',scalex=False,scaley=False)
def plot2Dkernel(xdat,ydat,Nx,Ny): xax=linspace(min(xdat),max(xdat),Nx) yax=linspace(min(ydat),max(ydat),Ny) x,y=numpy.meshgrid(xax,yax) samp=array([xdat,ydat]) kde=stats.kde.gaussian_kde(samp) grid_coords = numpy.append(x.reshape(-1,1),y.reshape(-1,1),axis=1) z = kde(grid_coords.T) z = z.reshape(Nx,Ny) asp=xax.ptp()/yax.ptp()
0831130907772a52407e021196488edd437a353b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0831130907772a52407e021196488edd437a353b/OddsPostProc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 22, 40, 8111, 12, 92, 3404, 16, 93, 3404, 16, 50, 92, 16, 50, 93, 4672, 619, 651, 33, 80, 15738, 12, 1154, 12, 92, 3404, 3631, 1896, 12, 92, 3404, 3631, 50, 92, 13, 677, 65...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 22, 40, 8111, 12, 92, 3404, 16, 93, 3404, 16, 50, 92, 16, 50, 93, 4672, 619, 651, 33, 80, 15738, 12, 1154, 12, 92, 3404, 3631, 1896, 12, 92, 3404, 3631, 50, 92, 13, 677, 65...
elif 'org.freedesktop.ScreenSaver' in bus.list_names():
elif 'org.freedesktop.ScreenSaver' in bus.list_names() and \ 'org.freedesktop.PowerManagement.Inhibit' in bus.list_names():
def attemptToToggleSleepPrevention(): """This function may fail to peform the toggling, if it cannot find the required bus. In this case, it will return False.""" global sleepPrevented, screenSaverCookie, timer bus = dbus.SessionBus() if sleepPrevented: ssProxy = None if 'org.gnome.ScreenSaver' in bus.list_names(): # For Gnome ssProxy = bus.get_object('org.gnome.ScreenSaver', '/org/gnome/ScreenSaver') elif 'org.freedesktop.ScreenSaver' in bus.list_names(): # For KDE and others ssProxy = bus.get_object('org.freedesktop.ScreenSaver', '/ScreenSaver') else: return False if screenSaverCookie != None: ssProxy.UnInhibit(screenSaverCookie) sleepPrevented = False print "Caffiene is now dormant; powersaving is re-enabled" # If the user clicks on the full coffee-cup to disable sleep prevention, it should also # cancel the timer for timed activation. if timer != None: print "Cancelling the 'timed activation' timer (was set for " + str(timer.interval) + " seconds)" timer.cancel() timer = None else: ssProxy = None if 'org.gnome.ScreenSaver' in bus.list_names(): # For Gnome ssProxy = bus.get_object('org.gnome.ScreenSaver', '/org/gnome/ScreenSaver') elif 'org.freedesktop.ScreenSaver' in bus.list_names(): # For KDE and others ssProxy = bus.get_object('org.freedesktop.ScreenSaver', '/ScreenSaver') else: return False screenSaverCookie = ssProxy.Inhibit("Caffeine", "User has requested that Caffeine disable the screen saver") sleepPrevented = True print "Caffiene is now preventing powersaving modes and screensaver activation" return True
93b043b0885d7cb924ce9a2411133353ead7eb17 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7152/93b043b0885d7cb924ce9a2411133353ead7eb17/caffeine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4395, 774, 17986, 20768, 1386, 11111, 13332, 3536, 2503, 445, 2026, 2321, 358, 2804, 687, 326, 6316, 75, 2456, 16, 309, 518, 2780, 1104, 326, 1931, 5766, 18, 657, 333, 648, 16, 518, 903,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4395, 774, 17986, 20768, 1386, 11111, 13332, 3536, 2503, 445, 2026, 2321, 358, 2804, 687, 326, 6316, 75, 2456, 16, 309, 518, 2780, 1104, 326, 1931, 5766, 18, 657, 333, 648, 16, 518, 903,...
testformat("%*.*f", (10, 2, 1000.0), grouping=1, output=' 1,000.00',
testformat("%*.*f", (10, 2, 1000.0), grouping=1, output=' 1%s000.00' % sep,
def testformat(formatstr, value, grouping = 0, output=None, func=locale.format): if verbose: if output: print "%s %% %s =? %s ..." %\ (repr(formatstr), repr(value), repr(output)), else: print "%s %% %s works? ..." % (repr(formatstr), repr(value)), result = func(formatstr, value, grouping = grouping) if output and result != output: if verbose: print 'no' print "%s %% %s == %s != %s" %\ (repr(formatstr), repr(value), repr(result), repr(output)) else: if verbose: print "yes"
fad65594ba25caada52b334b05f5f3f0994b9206 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fad65594ba25caada52b334b05f5f3f0994b9206/test_locale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2139, 12, 2139, 701, 16, 460, 16, 12116, 273, 374, 16, 876, 33, 7036, 16, 1326, 33, 6339, 18, 2139, 4672, 309, 3988, 30, 309, 876, 30, 1172, 2213, 87, 26510, 738, 87, 273, 35, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2139, 12, 2139, 701, 16, 460, 16, 12116, 273, 374, 16, 876, 33, 7036, 16, 1326, 33, 6339, 18, 2139, 4672, 309, 3988, 30, 309, 876, 30, 1172, 2213, 87, 26510, 738, 87, 273, 35, ...
userDict = eval('{' + t[3] + '}')
user_dict = eval('{' + t[3] + '}')
def p_def_operand_types(self, t): 'def_operand_types : DEF OPERAND_TYPES CODELIT SEMI' try: userDict = eval('{' + t[3] + '}') except Exception, exc: error(t.lexer.lineno, 'error: %s in def operand_types block "%s".' % (exc, t[3])) buildOperandTypeMap(userDict, t.lexer.lineno) t[0] = GenCode() # contributes nothing to the output C++ file
eb4ce01056f92ba971e929d57db047fc5e280a9a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6787/eb4ce01056f92ba971e929d57db047fc5e280a9a/isa_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 536, 67, 4063, 464, 67, 2352, 12, 2890, 16, 268, 4672, 296, 536, 67, 4063, 464, 67, 2352, 294, 25957, 17205, 4307, 67, 10564, 385, 1212, 2247, 1285, 3174, 7492, 11, 775, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 536, 67, 4063, 464, 67, 2352, 12, 2890, 16, 268, 4672, 296, 536, 67, 4063, 464, 67, 2352, 294, 25957, 17205, 4307, 67, 10564, 385, 1212, 2247, 1285, 3174, 7492, 11, 775, 30, ...
assert g.has_origin()
assert not g.is_0_based()
def exercise_flex_grid(): g = flex.grid() assert g.nd() == 0 assert g.size_1d() == 0 assert not g.has_origin() assert g.origin() == () assert g.all() == () assert g.last() == () assert g.last(1) == () assert g.last(0) == () assert g.is_0_based() assert not g.is_padded() assert not g.is_trivial_1d() g = flex.grid((2,3,5)) assert g.nd() == 3 assert g.size_1d() == 30 assert g.origin() == (0,0,0) assert g.all() == (2,3,5) assert g.last() == (2,3,5) assert g.last(1) == (2,3,5) assert g.last(0) == (1,2,4) assert g((0,0,0)) == 0 assert g((1,2,4)) == 29 assert g.is_0_based() assert not g.is_padded() assert not g.is_trivial_1d() assert flex.grid(1).all() == (1,) assert flex.grid(1,2).all() == (1,2,) assert flex.grid(1,2,3).all() == (1,2,3) assert flex.grid(1,2,3,4).all() == (1,2,3,4) assert flex.grid(1,2,3,4,5).all() == (1,2,3,4,5) assert flex.grid(1,2,3,4,5,6).all() == (1,2,3,4,5,6) assert flex.grid().set_focus(1).focus() == (1,) assert flex.grid().set_focus(1,2).focus() == (1,2,) assert flex.grid().set_focus(1,2,3).focus() == (1,2,3) assert flex.grid().set_focus(1,2,3,4).focus() == (1,2,3,4) assert flex.grid().set_focus(1,2,3,4,5).focus() == (1,2,3,4,5) assert flex.grid().set_focus(1,2,3,4,5,6).focus() == (1,2,3,4,5,6) g = flex.grid((1,2,3), (4,6,8)) assert g.nd() == 3 assert g.size_1d() == 60 assert g.has_origin() assert g.origin() == (1,2,3) assert g.all() == (3,4,5) assert g.last() == (4,6,8) assert g.last(1) == (4,6,8) assert g.last(0) == (3,5,7) assert g((1,2,3)) == 0 assert g((3,5,7)) == 59 assert not g.is_valid_index((0,0,0)) assert not g.is_0_based() assert not g.is_padded() assert not g.is_trivial_1d() g = flex.grid((1,2,3), (4,6,8), 0) assert g.nd() == 3 assert g.size_1d() == 120 assert g.origin() == (1,2,3) assert g.all() == (4,5,6) assert g.last() == (5,7,9) assert g.last(1) == (5,7,9) assert g.last(0) == (4,6,8) assert g((1,2,3)) == 0 assert g((4,6,8)) == 119 assert not g.is_valid_index((0,0,0)) assert not g.is_valid_index((5,0,0)) assert not g.is_0_based() assert not g.is_padded() assert not g.is_trivial_1d() assert not g.has_focus() g.set_focus((3,-9,5)) assert g.has_focus() assert g.focus() == (3,-9,5) assert g.focus(False) == (2,-10,4) g.set_focus((3,-9,5), False) assert g.focus() == (4,-8,6) assert not g.is_0_based() assert g.is_padded() assert not g.is_trivial_1d() s = pickle.dumps(g) l = pickle.loads(s) assert g.origin() == l.origin() assert g.all() == l.all() assert g.focus() == l.focus() assert g == l assert not g != l l = flex.grid((1,2,4), (4,6,8), 0).set_focus((3,-9,5)) assert not g == l assert g != l l = flex.grid((1,2,3), (4,7,8), 0).set_focus((3,-9,5)) assert not g == l assert g != l l = flex.grid((1,2,3), (4,6,8), 0).set_focus((4,-9,5)) assert not g == l assert g != l g = flex.grid((1,2,3)) assert g.shift_origin() == g g = flex.grid((1,2,3), (4,6,8)) s = g.shift_origin() assert s.origin() == (0,0,0) assert s.all() == g.all() assert s.focus() == (3,4,5) assert s.focus_size_1d() == g.size_1d() g = flex.grid((1,2,3), (4,6,8)).set_focus((3,5,7)) assert g.focus_size_1d() == 2*3*4 s = g.shift_origin() assert s.origin() == (0,0,0) assert s.all() == g.all() assert s.focus() == (2,3,4)
bbf8bb0a447c23a4aef85ae21b929ee322041ec6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/bbf8bb0a447c23a4aef85ae21b929ee322041ec6/tst_flex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 67, 27592, 67, 5222, 13332, 314, 273, 16600, 18, 5222, 1435, 1815, 314, 18, 4880, 1435, 422, 374, 1815, 314, 18, 1467, 67, 21, 72, 1435, 422, 374, 1815, 486, 314, 18, 5332, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 67, 27592, 67, 5222, 13332, 314, 273, 16600, 18, 5222, 1435, 1815, 314, 18, 4880, 1435, 422, 374, 1815, 314, 18, 1467, 67, 21, 72, 1435, 422, 374, 1815, 486, 314, 18, 5332, 67, ...
'import sys; print sys.path; sys.exit(%r in sys.path)' % usersite])
'import sys; sys.exit(%r in sys.path)' % usersite])
def test_s_option(self): usersite = site.USER_SITE self.assert_(usersite in sys.path) print usersite, sys.path
b03f532fe539fe7ce9bc9e26dbea34608da19291 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/b03f532fe539fe7ce9bc9e26dbea34608da19291/test_site.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 87, 67, 3482, 12, 2890, 4672, 3677, 1137, 273, 2834, 18, 4714, 67, 20609, 365, 18, 11231, 67, 12, 5577, 1137, 316, 2589, 18, 803, 13, 1172, 3677, 1137, 16, 2589, 18, 803, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 87, 67, 3482, 12, 2890, 4672, 3677, 1137, 273, 2834, 18, 4714, 67, 20609, 365, 18, 11231, 67, 12, 5577, 1137, 316, 2589, 18, 803, 13, 1172, 3677, 1137, 16, 2589, 18, 803, 2...
return playlistItemFromItem(obj)
return PlaylistItemFromItem(obj)
def mapToPlaylistItem(obj): return playlistItemFromItem(obj)
185159b0ac3bde69e8e08ff969675209f7ad5432 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/185159b0ac3bde69e8e08ff969675209f7ad5432/app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21178, 30194, 1180, 12, 2603, 4672, 327, 19592, 1098, 1180, 1265, 1180, 12, 2603, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21178, 30194, 1180, 12, 2603, 4672, 327, 19592, 1098, 1180, 1265, 1180, 12, 2603, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
We can change the interpolation type
We can change the interpolation type.
def list_plot3d(v, interpolation_type='default', texture="automatic", point_list=None,**kwds): """ A 3-dimensional plot of a surface defined by the list $v$ of points in 3-dimensional space. INPUT: v -- something that defines a set of points in 3 space, for example: * a matrix * a list of 3-tuples * a list of lists (all of the same length) -- this is treated the same as a matrix. texture -- (default: "automatic"), solid light blue OPTIONAL KEYWORDS: interpolation_type - 'linear', 'nn' (nearest neighbor), 'spline' 'linear' will perform linear interpolation The option 'nn' will interpolate by averaging the value of the nearest neighbors, this produces an interpolating function that is smoother than a linear interpolation, it has one derivative everywhere except at the sample points. The option 'spline' interpolates using a bivariate B-spline. When v is a matrix the default is to use linear interpolation, when v is a list of points the default is nearest neighbor. degree - an integer between 1 and 5, controls the degree of spline used for spline interpolation. For data that is highly oscillatory use higher values point_list - If point_list=True is passed, then if the array is a list of lists of length three, it will be treated as an array of points rather than a 3xn array. num_points - Number of points to sample interpolating function in each direction. By default for an nxn array this is n. **kwds -- all other arguments are passed to the surface function OUTPUT: a 3d plot EXAMPLES: We plot a matrix that illustrates summation modulo $n$. sage: n = 5; list_plot3d(matrix(RDF,n,[(i+j)%n for i in [1..n] for j in [1..n]])) We plot a matrix of values of sin. sage: pi = float(pi) sage: m = matrix(RDF, 6, [sin(i^2 + j^2) for i in [0,pi/5,..,pi] for j in [0,pi/5,..,pi]]) sage: list_plot3d(m, texture='yellow', frame_aspect_ratio=[1,1,1/3]) Though it doesn't change the shap of the graph, increasing num_points can increase the clarity of the graph sage: list_plot3d(m, texture='yellow', frame_aspect_ratio=[1,1,1/3],num_points=40) We can change the interpolation type sage: list_plot3d(m, texture='yellow', interpolation_type='nn',frame_aspect_ratio=[1,1,1/3]) We can make this look better by increasing the number of samples sage: list_plot3d(m, texture='yellow', interpolation_type='nn',frame_aspect_ratio=[1,1,1/3],num_points=40) Lets try a spline sage: list_plot3d(m, texture='yellow', interpolation_type='spline',frame_aspect_ratio=[1,1,1/3]) That spline doesn't capture the oscillation very well, lets try a higher degree spline sage: list_plot3d(m, texture='yellow', interpolation_type='spline', degree=5, frame_aspect_ratio=[1,1,1/3]) We plot a list of lists: sage: show(list_plot3d([[1, 1, 1, 1], [1, 2, 1, 2], [1, 1, 3, 1], [1, 2, 1, 4]])) We plot a list of points: As a first example we can extract the (x,y,z) coordinates from the above example and make a list plot out of it. By default we do linear interpolation. sage: l=[] sage: for i in range(6): ... for j in range(6): ... l.append((float(i*pi/5),float(j*pi/5),m[i,j])) sage: list_plot3d(l,texture='yellow') Note that the points do not have to be regularly sampled. For example sage: l=[] sage: for i in range(-5,5): ... for j in range(-5,5): ... l.append((normalvariate(0,1),normalvariate(0,1),normalvariate(0,1))) sage: list_plot3d(l,interpolation_type='nn',texture='yellow',num_points=100) TESTS: We plot 0, 1, and 2 points: sage: list_plot3d([]) sage: list_plot3d([(2,3,4)]) sage: list_plot3d([(0,0,1), (2,3,4)]) However, if two points with the same x,y coordinates are given and different z coordinates an exception will be raised sage: pts =[(-4/5, -2/5, -2/5), (-4/5, -2/5, 2/5), (-4/5, 2/5, -2/5), (-4/5, 2/5, 2/5), (-2/5, -4/5, -2/5), (-2/5, -4/5, 2/5), (-2/5, -2/5, -4/5), (-2/5, -2/5, 4/5), (-2/5, 2/5, -4/5), (-2/5, 2/5, 4/5), (-2/5, 4/5, -2/5), (-2/5, 4/5, 2/5), (2/5, -4/5, -2/5), (2/5, -4/5, 2/5), (2/5, -2/5, -4/5), (2/5, -2/5, 4/5), (2/5, 2/5, -4/5), (2/5, 2/5, 4/5), (2/5, 4/5, -2/5), (2/5, 4/5, 2/5), (4/5, -2/5, -2/5), (4/5, -2/5, 2/5), (4/5, 2/5, -2/5), (4/5, 2/5, 2/5)] sage: show(list_plot3d(pts, interpolation_type='nn')) Traceback (most recent call last): ... ValueError: Two points with same x,y coordinates and different z coordinates were given. Interpolation cannot handle this. Additionally we need at least 3 points to do the interpolation sage: pts=[(0,0,0)] sage: show(list_plot3d(pts,interpolation_type='nn')) Traceback (most recent call last): ... ValueError: We need at least 3 points to perform the interpolation """ import numpy if texture == "automatic": texture = "lightblue" if is_Matrix(v): if interpolation_type=='default' or interpolation_type=='linear' and not kwds.has_key('num_points'): return list_plot3d_matrix(v, texture=texture, **kwds) else: l=[] for i in xrange(v.nrows()): for j in xrange(v.ncols()): l.append((i,j,v[i,j])) return list_plot3d_tuples(l,interpolation_type,texture,**kwds) if type(v)==numpy.ndarray: return list_plot3d(matrix(v),interpolation_type,texture,**kwds) if isinstance(v, list): if len(v) == 0: # return empty 3d graphic from base import Graphics3d return Graphics3d() elif len(v) == 1: # return a point from shapes2 import point3d return point3d(v[0], **kwds) elif len(v) == 2: # return a line from shapes2 import line3d return line3d(v, **kwds) elif isinstance(v[0],tuple) or point_list==True and len(v[0]) == 3: return list_plot3d_tuples(v,interpolation_type,texture=texture, **kwds) else: return list_plot3d_array_of_arrays(v, interpolation_type,texture, **kwds) raise TypeError, "v must be a matrix or list"
7dc025d17baf8c8697e9ae948760a644ff14103c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/7dc025d17baf8c8697e9ae948760a644ff14103c/list_plot3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 4032, 23, 72, 12, 90, 16, 12851, 67, 723, 2218, 1886, 2187, 11428, 1546, 5854, 4941, 3113, 1634, 67, 1098, 33, 7036, 16, 636, 25577, 4672, 3536, 432, 890, 17, 31236, 3207, 434...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 4032, 23, 72, 12, 90, 16, 12851, 67, 723, 2218, 1886, 2187, 11428, 1546, 5854, 4941, 3113, 1634, 67, 1098, 33, 7036, 16, 636, 25577, 4672, 3536, 432, 890, 17, 31236, 3207, 434...
'amount': fields.float('Amount', required=True, digits=(14,4)),
'amount': fields.float('Amount', required=True, digits=(14,4), help="For Tax Type percent enter % ratio between 0-1."),
def _check_recursion(self, cr, uid, ids): level = 100 while len(ids): cr.execute('select distinct parent_id from account_tax_code where id in ('+','.join(map(str,ids))+')') ids = filter(None, map(lambda x:x[0], cr.fetchall())) if not level: return False level -= 1 return True
d060741945525c65f61a8175e4815fbaec7817a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/d060741945525c65f61a8175e4815fbaec7817a7/account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 31347, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 1801, 273, 2130, 1323, 562, 12, 2232, 4672, 4422, 18, 8837, 2668, 4025, 10217, 982, 67, 350, 628, 2236, 67, 8066, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 31347, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 1801, 273, 2130, 1323, 562, 12, 2232, 4672, 4422, 18, 8837, 2668, 4025, 10217, 982, 67, 350, 628, 2236, 67, 8066, 67...
def nick(self, nick, user="circe", host="circe"): IC.send("USER %s %s %s %s\r\n" % (nick, user,host,user)) IC.send("NICK %s %s\r\n" % (nick, user))
def nick(self, nick, host="circe"): IC.send("USER ident * * :%s\r\n" % (host)) IC.send("NICK %s\r\n" % (nick))
def nick(self, nick, user="circe", host="circe"): IC.send("USER %s %s %s %s\r\n" % (nick, user,host,user)) IC.send("NICK %s %s\r\n" % (nick, user))
3b4c561b77cd099d2ee4760588ad78f057bbb2c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3b4c561b77cd099d2ee4760588ad78f057bbb2c6/circelib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10909, 12, 2890, 16, 10909, 16, 729, 1546, 11614, 311, 3113, 1479, 1546, 11614, 311, 6, 4672, 26899, 18, 4661, 2932, 4714, 738, 87, 738, 87, 738, 87, 738, 87, 64, 86, 64, 82, 6, 738,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10909, 12, 2890, 16, 10909, 16, 729, 1546, 11614, 311, 3113, 1479, 1546, 11614, 311, 6, 4672, 26899, 18, 4661, 2932, 4714, 738, 87, 738, 87, 738, 87, 738, 87, 64, 86, 64, 82, 6, 738,...
log.verbose( "%s not available in local cache %s.%s\n" % ( file, ArgumentOptions.cache_dir, LINE_OVERWRITE_MID ) )
log.verbose( "%s not available in local cache %s.%s\n" % ( file, Str_CacheDir, LINE_OVERWRITE_MID ) )
def run(request, response, func=find_first_match): '''Get items from the request Queue, process them with func(), put the results along with the Thread's name into the response Queue. Stop running when item is None.''' while 1: tuple_item_key = request.get() if tuple_item_key is None: break (key, item) = tuple_item_key (url, file, download_size, checksum) = stripper(item) thread_name = threading.currentThread().getName() if key == 'Update': temp_file = file.split("_") PackageName = temp_file[0] PackageName += " - " + temp_file[len(temp_file) - 1] del temp_file #INFO: We pass None as a filename here because we don't want to do a tree search of # update files. Update files are changed daily and there is no point in doing a search of # them in the cache_dir response.put(func(cache_dir, None) ) #INFO: exit_status here would be False because for updates there's no need to do a # find_first_match # This is more with the above statement where None is passed as the filename exit_status = response.get() if exit_status == False: log.msg("Downloading %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if FetcherInstance.download_from_web(url, file, download_path) == True: log.success("\r%s done.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(zip_update_file, file) != True: log.err("Couldn't archive %s to file %s.%s\n" % (file, zip_update_file, LINE_OVERWRITE_MID) ) sys.exit(1) else: log.verbose("%s added to archive %s.%s\n" % (file, zip_update_file, LINE_OVERWRITE_FULL) ) os.unlink(os.path.join(download_path, file) ) else: errlist.append(file) elif key == 'Upgrade': try: PackageName = file.split("_")[0] except IndexError: log.err("Not getting a package name here is problematic. Better bail out.\n") sys.exit(1) #INFO: For Package version, we don't want to fail try: PackageVersion = file.split("_")[1] except IndexError: PackageVersion = "NA" log.verbose("Weird!! Package version not present. Is it really a deb file?\n") response.put(func(cache_dir, file) ) #INFO: find_first_match() returns False or a file name with absolute path full_file_path = response.get() #INFO: If we find the file in the local cache_dir, we'll execute this block. if full_file_path != False: # We'll first check for its md5 checksum if ArgumentOptions.disable_md5check is False: if FetcherInstance.CheckHashDigest(full_file_path, checksum) is True: log.verbose("md5checksum correct for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if ArgumentOptions.deb_bugs: bug_fetched = 0 log.verbose("Fetching bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if FetchBugReportsDebian.FetchBugsDebian(PackageName) in [1,2]: log.verbose("Fetched bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) bug_fetched = 1 else: log.verbose("Couldn't fetch bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(zip_upgrade_file, full_file_path) is True: log.success("%s copied from local cache directory %s.%s\n" % (PackageName, cache_dir, LINE_OVERWRITE_MID) ) else: log.err("Couldn't add %s to archive %s.%s\n" % (file, zip_upgrade_file, LINE_OVERWRITE_MID) ) sys.exit(1) #INFO: If no zip option enabled, simply copy the downloaded package file # along with the downloaded bug reports. else: try: shutil.copy(full_file_path, download_path) log.success("%s copied from local cache directory %s.%s\n" % (PackageName, cache_dir, LINE_OVERWRITE_MID) ) except shutil.Error: log.verbose("%s already available in %s. Skipping copy!!!%s\n" % (file, download_path, LINE_OVERWRITE_MID) ) if bug_fetched == 1: for x in os.listdir(os.curdir): if (x.startswith(PackageName) and x.endswith(apt_bug_file_format) ): shutil.move(x, download_path) log.verbose("Moved %s file to %s folder.%s\n" % (x, download_path, LINE_OVERWRITE_FULL) ) #INFO: Damn!! The md5chesum didn't match :-( # The file is corrupted and we need to download a new copy from the internet else: log.verbose("%s checksum mismatch. Skipping file.%s\n" % (file, LINE_OVERWRITE_FULL) ) log.msg("Downloading %s - %s %s\n" % (PackageName, log.calcSize(download_size/1024), LINE_OVERWRITE_MID) ) if FetcherInstance.download_from_web(url, file, download_path) == True: log.success("\r%s done.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) #Add to cache_dir if possible if ArgumentOptions.cache_dir and os.access(ArgumentOptions.cache_dir, os.W_OK) == True: try: shutil.copy(file, cache_dir) log.verbose("%s copied to local cache directory %s.%s\n" % (file, ArgumentOptions.cache_dir, LINE_OVERWRITE_MID) ) except shutil.Error: log.verbose("Couldn't copy %s to %s.%s\n" % (file, ArgumentOptions.cache_dir, LINE_OVERWRITE_FULL) ) else: log.verbose("cache_dir %s is not writeable. Skipping copy to it.\n" % (ArgumentOptions.cache_dir) ) #Fetch bug reports if ArgumentOptions.deb_bugs: if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file( zip_upgrade_file, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( download_path, file ) ) #INFO: You're and idiot. # You should NOT disable md5checksum for any files else: if ArgumentOptions.deb_bugs: bug_fetched = 0 if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) bug_fetched = 1 else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) #FIXME: Don't know why this was really required. If this has no changes, delete it. #file = full_file_path.split("/") #file = file[len(file) - 1] #file = download_path + "/" + file if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file( zip_upgrade_file, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( download_path, file ) ) else: # Since zip file option is not enabled let's copy the file to the target folder try: shutil.copy( full_file_path, download_path ) log.success( "%s copied from local cache directory %s.%s\n" % ( file, cache_dir, LINE_OVERWRITE_SMALL ) ) except shutil.Error: log.verbose( "%s already available in dest_dir. Skipping copy!!!%s\n" % ( file, LINE_OVERWRITE_SMALL ) ) # And also the bug reports if bug_fetched == 1: for x in os.listdir( os.curdir ): if ( x.startswith( PackageName ) and x.endswith( apt_bug_file_format ) ): shutil.move( x, download_path ) log.verbose( "Moved %s file to %s folder.%s\n" % ( x, download_path, LINE_OVERWRITE_MID ) ) else: #INFO: This block gets executed if the file is not found in local cache_dir or cache_dir is None # We go ahead and try to download it from the internet log.verbose( "%s not available in local cache %s.%s\n" % ( file, ArgumentOptions.cache_dir, LINE_OVERWRITE_MID ) ) log.msg( "Downloading %s %s - %s %s\n" % ( PackageName, PackageVersion, log.calcSize( download_size / 1024 ), LINE_OVERWRITE_MID ) ) if FetcherInstance.download_from_web( url, file, download_path ) == True: #INFO: This block gets executed if md5checksum is allowed if ArgumentOptions.disable_md5check is False: #INFO: Debian moved to SHA256. So we use that now. Older systems could have md5 log.verbose( "File %s has checksum %s\n" % ( file, checksum ) ) if FetcherInstance.CheckHashDigest( file, checksum ) is True: if ArgumentOptions.cache_dir and os.access( ArgumentOptions.cache_dir, os.W_OK ) == True: try: shutil.copy( file, ArgumentOptions.cache_dir ) log.verbose( "%s copied to local cache directory %s.%s\n" % ( file, ArgumentOptions.cache_dir, LINE_OVERWRITE_MID ) ) except shutil.Error: log.verbose( "%s already available in %s. Skipping copy!!!%s\n" % ( file, ArgumentOptions.cache_dir, LINE_OVERWRITE_MID ) ) else: log.verbose( "cache_dir %s is not writeable. Skipping copy to it.\n" % ( ArgumentOptions.cache_dir ) ) if ArgumentOptions.deb_bugs: if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file( zip_upgrade_file, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( download_path, file ) ) else: #INFO MD5 Checksum is incorrect. log.err( "%s MD5 Checksum mismatch.\n" % ( PackageName ) ) errlist.append( PackageName ) else: if ArgumentOptions.deb_bugs: if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file( zip_upgrade_file, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, zip_upgrade_file, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( download_path, file ) ) log.success( "\r%s %s done.%s\n" % ( PackageName, PackageVersion, LINE_OVERWRITE_FULL ) ) else: errlist.append( PackageName ) else: raise FetchDataKeyError
da63a417a8560a39ca821994468a1533f4c1445a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12499/da63a417a8560a39ca821994468a1533f4c1445a/AptOfflineCoreLib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2293, 16, 766, 16, 1326, 33, 4720, 67, 3645, 67, 1916, 4672, 9163, 967, 1516, 628, 326, 590, 7530, 16, 1207, 2182, 598, 1326, 9334, 1378, 326, 1686, 7563, 598, 326, 4884, 180...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2293, 16, 766, 16, 1326, 33, 4720, 67, 3645, 67, 1916, 4672, 9163, 967, 1516, 628, 326, 590, 7530, 16, 1207, 2182, 598, 1326, 9334, 1378, 326, 1686, 7563, 598, 326, 4884, 180...
prec - precision to which to round. By default, the context decides. rounding - Rounding method. By default, the context decides. folddown - Fold down high elements, by default context._clamp
def _fix(self, prec=None, rounding=None, folddown=None, context=None): """Round if it is necessary to keep self within prec precision.
b277e15abb88b70aabae5a4859ba6920ae8be40f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b277e15abb88b70aabae5a4859ba6920ae8be40f/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 904, 12, 2890, 16, 13382, 33, 7036, 16, 13885, 33, 7036, 16, 28420, 449, 995, 33, 7036, 16, 819, 33, 7036, 4672, 3536, 11066, 309, 518, 353, 4573, 358, 3455, 365, 3470, 13382, 603...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 904, 12, 2890, 16, 13382, 33, 7036, 16, 13885, 33, 7036, 16, 28420, 449, 995, 33, 7036, 16, 819, 33, 7036, 4672, 3536, 11066, 309, 518, 353, 4573, 358, 3455, 365, 3470, 13382, 603...
transformation = _ArbCoordTrans(transformation[0:3], transformation[3]) if isinstance(transformation, _CoordTrans):
if len(transformation)==3: if params is None: raise ValueError, "must specify independent variable names in the ranges when using generic transformation" indep_vars = params elif len(transformation)==4: indep_vars = transformation[3] transformation = transformation[0:3] else: raise ValueError, "unknown transformation type" all_vars = set(sum([list(s.variables()) for s in transformation],[])) dep_var=all_vars - set(indep_vars) if len(dep_var)==1: dep_var = dep_var.pop() transformation = _ArbitraryCoordinates(transformation, dep_var, indep_vars) else: raise ValueError, "unable to determine the function variable in the transform" if isinstance(transformation, _Coordinates):
sage: def _(which_plot=[F, G, H, I, J]):
85811d8c24ec26acc8a960fadc0b24274c01a5a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/85811d8c24ec26acc8a960fadc0b24274c01a5a8/plot3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 389, 12, 12784, 67, 4032, 22850, 42, 16, 611, 16, 670, 16, 467, 16, 804, 65, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 389, 12, 12784, 67, 4032, 22850, 42, 16, 611, 16, 670, 16, 467, 16, 804, 65, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __runCommand( self, cmd ): """Wrapper around shellCall to return S_OK(stdout) or S_ERROR(message) """ result = shellCall( 0, cmd ) if not result['OK']: return result status = result['Value'][0] stdout = result['Value'][1] stderr = result['Value'][2] if status: self.log.warn( 'Status %s while executing %s' % ( status, cmd ) ) self.log.warn( stderr ) return S_ERROR( stdout ) else: return S_OK( stdout )
def getResourceUsage( self ): """Returns a dictionary containing CPUConsumed, CPULimit, WallClockConsumed and WallClockLimit for current slot. All values returned in seconds. """ cmd = 'qstat -f %s' % ( self.jobID ) result = self.__runCommand( cmd ) if not result['OK']: return result
c7c892f960b28a3ca4f732316059af6234c47439 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/c7c892f960b28a3ca4f732316059af6234c47439/PBSTimeLeft.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5070, 5357, 12, 365, 262, 30, 3536, 1356, 279, 3880, 4191, 12154, 20554, 16, 5181, 1506, 1038, 16, 678, 454, 14027, 20554, 471, 678, 454, 14027, 3039, 364, 783, 4694, 18, 225, 4826, 924,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5070, 5357, 12, 365, 262, 30, 3536, 1356, 279, 3880, 4191, 12154, 20554, 16, 5181, 1506, 1038, 16, 678, 454, 14027, 20554, 471, 678, 454, 14027, 3039, 364, 783, 4694, 18, 225, 4826, 924,...
IF(p.thetaMax + p.alpha >= 360.0, c.ra + 360.0 < p.thetaMax + p.alpha, c.ra < p.thetaMax + p.alpha) AND IF(p.thetaMin - p.alpha < 0.0, c.ra - 360.0 >= p.thetaMax - p.alpha, c.ra >= p.thetaMax - p.alpha)
IF(p.raMax + p.alpha >= 360.0, c.ra + 360.0 < p.raMax + p.alpha, c.ra < p.raMax + p.alpha) AND IF(p.raMin - p.alpha < 0.0, c.ra - 360.0 >= p.raMin - p.alpha, c.ra >= p.raMin - p.alpha)
def testChunkTable(chunkPrefix, chunkId, partTable): """Run sanity checks on a chunk table set (the chunk table, and optionally a self and full overlap table). For now, the spherical coordinates of chunk table entries are hardcoded to the "ra" and "decl" columns. """ chunkTable = chunkPrefix + '_' + str(chunkId) selfTable = chunkPrefix + 'SelfOverlap_' + str(chunkId) fullTable = chunkPrefix + 'FullOverlap_' + str(chunkId) if not self.tableExists(selfTable): selfTable = None if not self.tableExists(fullTable): fullTable = None
b17dc6cb2d29e8fde6258f1b2ca496fb40c86370 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6510/b17dc6cb2d29e8fde6258f1b2ca496fb40c86370/loader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5579, 1388, 12, 6551, 2244, 16, 2441, 548, 16, 1087, 1388, 4672, 3536, 1997, 16267, 4271, 603, 279, 2441, 1014, 444, 261, 5787, 2441, 1014, 16, 471, 8771, 279, 365, 471, 1983, 7227...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5579, 1388, 12, 6551, 2244, 16, 2441, 548, 16, 1087, 1388, 4672, 3536, 1997, 16267, 4271, 603, 279, 2441, 1014, 444, 261, 5787, 2441, 1014, 16, 471, 8771, 279, 365, 471, 1983, 7227...
('create_uid', _('Creation User:')),
('create_uid.rec_name', _('Creation User:')),
def sig_logs(self, widget=None): obj_id = self.id_get() if obj_id < 0: self.message_info(_('You have to select one record!')) return False
f597ecaefb0ded6096604870bcb1d898a2597c6e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9151/f597ecaefb0ded6096604870bcb1d898a2597c6e/form.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3553, 67, 10011, 12, 2890, 16, 3604, 33, 7036, 4672, 1081, 67, 350, 273, 365, 18, 350, 67, 588, 1435, 309, 1081, 67, 350, 411, 374, 30, 365, 18, 2150, 67, 1376, 24899, 2668, 6225, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3553, 67, 10011, 12, 2890, 16, 3604, 33, 7036, 4672, 1081, 67, 350, 273, 365, 18, 350, 67, 588, 1435, 309, 1081, 67, 350, 411, 374, 30, 365, 18, 2150, 67, 1376, 24899, 2668, 6225, 12...
"_mapRestartAction", "_levelSlider",
"_mapRestartAction", "_levelSlider", "_estimatedApexFaceCount",
def undo(self): self.protect(not self.protected)
2aedc541f20f95ef13bb24351c4ee389345b41a3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/2aedc541f20f95ef13bb24351c4ee389345b41a3/workspace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15436, 12, 2890, 4672, 365, 18, 11815, 386, 12, 902, 365, 18, 1117, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15436, 12, 2890, 4672, 365, 18, 11815, 386, 12, 902, 365, 18, 1117, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
grinder_handler = logging.handlers.RotatingFileHandler(grinder_file, maxBytes=max_size, backupCount=backups)
grinder_handler = handlers.RotatingFileHandler(grinder_file, maxBytes=max_size, backupCount=backups)
def configure_pulp_grinder_logging(): """ Pull the log file configurations from the global config and/or default config and initialize the top-level logging for both pulp and grinder. """ level_name = config.config.get('logs', 'level').upper() level = getattr(logging, level_name, logging.INFO) max_size = config.config.getint('logs', 'max_size') backups = config.config.getint('logs', 'backups') fmt = '%(asctime)s [%(levelname)s][%(threadName)s] %(funcName)s() @ %(filename)s:%(lineno)d - %(message)s' formatter = logging.Formatter(fmt) pulp_file = config.config.get('logs', 'pulp_file') check_log_file(pulp_file) pulp_logger = logging.getLogger('pulp') pulp_logger.setLevel(level) pulp_handler = logging.handlers.RotatingFileHandler(pulp_file, maxBytes=max_size, backupCount=backups) pulp_handler.setFormatter(formatter) pulp_logger.addHandler(pulp_handler) grinder_file = config.config.get('logs', 'grinder_file') check_log_file(grinder_file) grinder_logger = logging.getLogger('grinder') grinder_logger.setLevel(level) grinder_handler = logging.handlers.RotatingFileHandler(grinder_file, maxBytes=max_size, backupCount=backups) grinder_handler.setFormatter(formatter) grinder_logger.addHandler(grinder_handler)
386fabefdabf923d5629d2e3941433d708c64bf1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/386fabefdabf923d5629d2e3941433d708c64bf1/logs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 67, 84, 14290, 67, 3197, 14055, 67, 11167, 13332, 3536, 14899, 326, 613, 585, 10459, 628, 326, 2552, 642, 471, 19, 280, 805, 642, 471, 4046, 326, 1760, 17, 2815, 2907, 364, 3937, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 67, 84, 14290, 67, 3197, 14055, 67, 11167, 13332, 3536, 14899, 326, 613, 585, 10459, 628, 326, 2552, 642, 471, 19, 280, 805, 642, 471, 4046, 326, 1760, 17, 2815, 2907, 364, 3937, ...
'validator': 'wxDefaultValidator',
def designTimeSource(self, position = 'wxDefaultPosition', size = 'wxDefaultSize'): return {'pos': position, 'size': size, 'choices': '[]', 'style': '0', 'validator': 'wxDefaultValidator', 'name': `self.name`}
bf2d0fc28ac1c46bdc6f0710c24fe8c632cc2553 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/bf2d0fc28ac1c46bdc6f0710c24fe8c632cc2553/ListCompanions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8281, 950, 1830, 12, 2890, 16, 1754, 273, 296, 27226, 1868, 2555, 2187, 963, 273, 296, 27226, 1868, 1225, 11, 4672, 327, 13666, 917, 4278, 1754, 16, 296, 1467, 4278, 963, 16, 296, 11937,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8281, 950, 1830, 12, 2890, 16, 1754, 273, 296, 27226, 1868, 2555, 2187, 963, 273, 296, 27226, 1868, 1225, 11, 4672, 327, 13666, 917, 4278, 1754, 16, 296, 1467, 4278, 963, 16, 296, 11937,...
testdir=None, huntrleaks=False):
testdir=None, huntrleaks=False, debug=False):
def runtest_inner(test, generate, verbose, quiet, testdir=None, huntrleaks=False): test_support.unload(test) if not testdir: testdir = findtestdir() outputdir = os.path.join(testdir, "output") outputfile = os.path.join(outputdir, test) if verbose: cfp = None else: cfp = cStringIO.StringIO() try: save_stdout = sys.stdout try: if cfp: sys.stdout = cfp print(test) # Output file starts with test name if test.startswith('test.'): abstest = test else: # Always import it from the test package abstest = 'test.' + test the_package = __import__(abstest, globals(), locals(), []) the_module = getattr(the_package, test) # Most tests run to completion simply as a side-effect of # being imported. For the benefit of tests that can't run # that way (like test_threaded_import), explicitly invoke # their test_main() function (if it exists). indirect_test = getattr(the_module, "test_main", None) if indirect_test is not None: indirect_test() if huntrleaks: dash_R(the_module, test, indirect_test, huntrleaks) finally: sys.stdout = save_stdout except test_support.ResourceDenied as msg: if not quiet: print(test, "skipped --", msg) sys.stdout.flush() return -2 except (ImportError, test_support.TestSkipped) as msg: if not quiet: print(test, "skipped --", msg) sys.stdout.flush() return -1 except KeyboardInterrupt: raise except test_support.TestFailed as msg: print("test", test, "failed --", msg) sys.stdout.flush() return 0 except: type, value = sys.exc_info()[:2] print("test", test, "crashed --", str(type) + ":", value) sys.stdout.flush() if verbose: traceback.print_exc(file=sys.stdout) sys.stdout.flush() return 0 else: if not cfp: return 1 output = cfp.getvalue() if generate: if output == test + "\n": if os.path.exists(outputfile): # Write it since it already exists (and the contents # may have changed), but let the user know it isn't # needed: print("output file", outputfile, \ "is no longer needed; consider removing it") else: # We don't need it, so don't create it. return 1 fp = open(outputfile, "w") fp.write(output) fp.close() return 1 if os.path.exists(outputfile): fp = open(outputfile, "r") expected = fp.read() fp.close() else: expected = test + "\n" if output == expected or huntrleaks: return 1 print("test", test, "produced unexpected output:") sys.stdout.flush() reportdiff(expected, output) sys.stdout.flush() return 0
ce4a475efb3d9f5e56af3226bd4acda4002c1250 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/ce4a475efb3d9f5e56af3226bd4acda4002c1250/regrtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3813, 67, 7872, 12, 3813, 16, 2103, 16, 3988, 16, 10902, 16, 1842, 1214, 33, 7036, 16, 366, 318, 313, 298, 581, 87, 33, 8381, 16, 1198, 33, 8381, 4672, 1842, 67, 13261, 18, 318...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3813, 67, 7872, 12, 3813, 16, 2103, 16, 3988, 16, 10902, 16, 1842, 1214, 33, 7036, 16, 366, 318, 313, 298, 581, 87, 33, 8381, 16, 1198, 33, 8381, 4672, 1842, 67, 13261, 18, 318...
If False, the frame and axis will be not be shown in the plot.
If False, the frame will be not be shown in the plot. You can still use axis labels.
def visualizeNet(net, coords=None, axes=None, frame=False, nodeShapes=None, defaultNodeShape='o', nodeColors=None, defaultNodeColor=None, nodeEdgeColors=None, defaultNodeEdgeColor='black', edgeColors=None, defaultEdgeColor=None, nodeSizes=None, defaultNodeSize=None, edgeWidths=None, defaultEdgeWidth=None, nodeEdgeWidths=None, defaultNodeEdgeWidth=0.2, nodeLabels=None, labelAllNodes=False, nodePlotOrders=None, defaultNodePlotOrder=1, edgePlotOrders=None, defaultEdgePlotOrder=0): """Visualize a network. Basic parameters ---------------- net : pynet.SymmNet The network to visualize coords : dictionary of tuples {node_ID: (x,y,z)} Coordinates of all nodes. If None, the coordinates will be calculated by Himmeli. axes : pylab.axes object If given, the network will be drawn in this axis. Otherwise a new figure is created for the plot and the figure handle is then returned. frame : bool If False, the frame and axis will be not be shown in the plot. Defining node and edge colors ----------------------------- Colors for nodes and edges are defined similarly. The following explains the procedure for nodes; to control edge coloring simply replace the word 'node' (or 'Node') with the word 'edge' (or 'Edge') in the parameter names. The color of a node is defined with the dictionary `nodeColors`: key is the node index and the value is any valid coloring scheme (see below under 'Coloring schemes'). If a node index is not in `nodeColors`, it is colored according to `defaultNodeColor`. This variable can have the same values as the values in `nodeColors`. Coloring schemes ---------------- A constant color can be defined in any way allowed by pylab. For example 'k', 'black' and (0,0,0) all result in black color. Alternatively the color can be based on the node strength, degree or any node property. In this case the coloring definition is a dictionary. The following examples illustrate the idea: color_scheme = {'by':'weight', 'scale':'log', 'cmap':'winter'} color_scheme = {'by':'degree', 'scale':'lin', 'min':1, 'max':10} color_scheme = {'by':'property:myProperty', 'scale':'log'} The possible keys and their default values are KEY DEFAULT VALUE OTHER POSSIBLE VALUES 'by' 'strength'/'weight' 'degree', 'property:<property_name>' 'scale' 'lin' 'log' 'cmap' 'jet' Any colormap 'min' (Min value in data) Any integer x, 1 <= x <= 'max' 'max' (Max value in data) Any integer x, 'min' <= x Any keys that are omitted are filled in with the default value. Note the syntax for using node properties, where the word 'property' is followed by a semicolon and the property name. Node size --------- The node size is controlled with a syntax similar to that used with colors. Node size is defined by dictionary `nodeSizes`, and if a node is not in it, the default value given by `defaultNodeSize` is used. The value can be a single integer, which gives the node size in pixels. Alternatively the node size can be controlled by node strength, degree or any property: node_size_scheme = {'by':'strength', 'scale':'log', 'min':2, 'max':10} node_size_scheme = {'by':'degree', 'scale':'lin'} node_size_scheme = {'by':'property:myProperty', 'scale':'log'} The possible keys and their default values are KEY DEFAULT VALUE OTHER POSSIBLE VALUES 'by' 'strength' 'degree', 'property:<property_name>' 'scale' 'lin' 'log' 'min' (Min value in data) int; 1 <= x <= 'max' 'max' (Max value in data) int; 'min' <= x 'min_size' 1 int; 1 <= x <= 'max_size' 'max_size' 6 int; 'min_size' <= x Again, keys that are omitted are filled with default values. Edge width ---------- Edge width is defined by dictionary `edgeWidths`, and if an edge is not in it, the default value given by `defaultEdgeWidth` is used. The value can be a single integer, which gives the edge width in pixels. Alternatively the edge width can be controlled by edge weight: edge_width_scheme = {'by':'weight', 'scale':'log', 'min':1, 'max':5} The possible keys and their default values are KEY DEFAULT VALUE OTHER POSSIBLE VALUES 'by' 'weight' 'scale' 'lin' 'log' 'min' (Min value in data) int; 1 <= x <= 'max' 'max' (Max value in data) int; 'min' <= x 'min_size' 0.2 float; 1 <= x <= 'max_width' 'max_size' 2.0 float; 'min_width' <= x Note that the 'by'-key can always be omitted since it has only one possible value. Node labels ----------- Node labels can be given in `nodeLabels` dictionary, where the key is node index and the value is the corresponding labels. If `labelAllNodes` is True, also the nodes not in `nodeLabels` will receive a label. In this case the label is the node index. The values in `nodeLabels` are converted to string with str(). Return ------ fig : pylab.Figure (None if `axes` is given.) Figure object with one axes containing the the plotted network figure. Examples -------- >>> # Construct an example network. >>> from netpython import pynet, visuals >>> net = pynet.SymmNet() >>> net[0][1] = 1.0 >>> net[1][2] = 3.5 >>> net[0][2] = 5.0 >>> # Simplest case: get coordinates from Himmeli, plot into a >>> # new figure and save it to disk >>> fig = visuals.drawNet(net) >>> fig.savefig('myNet.eps') >>> # Draw the figure in the upper left subfigure, with predefined >>> # coordinates. Note that drawNet does not return anything. >>> import pylab >>> coords = {0:(0,0), 1:(4,0), 2:(2,3)} >>> fig = pylab.figure() >>> ax = fig.add_subplot(2,2,1) >>> visuals.drawNet(net, coords=coords, axes=ax) """ # # DEFAULT VALUES. These will be used whenever the user has not # defined a given value for defaultNodeColor etc. # internal_defaultNodeColor = {'by':'strength', 'scale':'lin', 'cmap':'jet'} internal_defaultEdgeColor = {'by':'weight', 'scale':'lin', 'cmap':'jet'} internal_defaultNodeSize = {'by':'strength', 'scale':'lin', 'min_size':2, 'max_size':6} internal_defaultEdgeWidth = {'by':'weight', 'scale':'lin', 'min_size':0.2, 'max_size':2.0} node_label_font_color = 'k' node_label_font_size = 8 edge_margin = 0.05 # The space left on each side of the graph. # # PROCESS INPUT PARAMETERS # if coords is None: coords = Himmeli(net).getCoordinates() fig = None if axes is None: fig = figure() axes = fig.add_subplot(111) nodeShapes = (nodeShapes or {}) nodeColors = (nodeColors or {}) defaultNodeColor = (defaultNodeColor or {}) if isinstance(defaultNodeColor, dict): for k,v in internal_defaultNodeColor.iteritems(): if k not in defaultNodeColor: defaultNodeColor[k] = v nodeEdgeColors = (nodeEdgeColors or {}) edgeColors = (edgeColors or {}) defaultEdgeColor = (defaultEdgeColor or {}) if isinstance(defaultEdgeColor, dict): for k,v in internal_defaultEdgeColor.iteritems(): if k not in defaultEdgeColor: defaultEdgeColor[k] = v nodeSizes = (nodeSizes or {}) if defaultNodeSize is None: defaultNodeSize = {} if isinstance(defaultNodeSize, dict): for k,v in internal_defaultNodeSize.iteritems(): if k not in defaultNodeSize: defaultNodeSize[k] = v edgeWidths = (edgeWidths or {}) if defaultEdgeWidth is None: defaultEdgeWidth = {} if isinstance(defaultEdgeWidth, dict): for k,v in internal_defaultEdgeWidth.iteritems(): if k not in defaultEdgeWidth: defaultEdgeWidth[k] = v nodeEdgeWidths = (nodeEdgeWidths or {}) nodeLabels = (nodeLabels or {}) nodePlotOrders = (nodePlotOrders or {}) edgePlotOrders = (edgePlotOrders or {}) # # AUXILIARY FUNCTIONS # def scaled(scaling_type, value, value_limits, final_limits): def lin_scaling(value, value_limits, final_limits): value_span = value_limits[1] - value_limits[0] final_span = final_limits[1] - final_limits[0] if final_span == 0: return final_limits[0] if value_span == 0: p = 0.5 else: p = float(value - value_limits[0])/value_span return final_limits[0]+p*final_span if value <= value_limits[0]: return final_limits[0] if value >= value_limits[1]: return final_limits[1] if scaling_type == 'log' or scaling_type == 'logarithmic': return lin_scaling(np.log(value), np.log(value_limits), final_limits) else: return lin_scaling( value, value_limits, final_limits) def determine_size(scheme, i, net, values, limits, defaults): if not isinstance(scheme, dict): return scheme else: # Determine what defines the size. Calculate the limits # for this property if not yet done. size_by = scheme.get('by', defaults['by']) if size_by not in limits: property_name = "".join(size_by.split(':')[1:]) np_ = sorted(net.nodeProperty[property_name].values()) limits[size_by] = (np_[0], np_[-1]) if size_by not in values: property_name = "".join(size_by.split(':')[1:]) values[size_by] = net.nodeProperty[property_name][i] scale = scheme.get('scale', defaults['scale']) val_min = scheme.get('min', limits[size_by][0]) val_max = scheme.get('max', limits[size_by][1]) size_min = scheme.get('min_size', defaults['min_size']) size_max = scheme.get('max_size', defaults['max_size']) #print size_by, scale, val_min, val_max, size_min, size_max return scaled(scale, values[size_by], [val_min, val_max], [size_min, size_max]) def determine_color(scheme, i, net, values, limits, defaults): if not isinstance(scheme, dict): return scheme else: color_by = scheme.get('by', defaults['by']) if color_by not in limits: property_name = "".join(color_by.split(':')[1:]) np_ = sorted(net.nodeProperty[property_name].values()) limits[color_by] = (np_[0], np_[-1]) if color_by not in values: property_name = "".join(color_by.split(':')[1:]) values[color_by] = net.nodeProperty[property_name][i] scale = scheme.get('scale', defaults['scale']) cmap = scheme.get('cmap', defaults['cmap']) val_min = scheme.get('min', limits[color_by][0]) val_max = scheme.get('max', limits[color_by][1]) cval = scaled(scale, values[color_by], [val_min, val_max], [0.0,1.0]) cm = setColorMap(cmap) return cm(float(cval)) def draw_edge(axes, xcoords, ycoords, width, color, zorder): axes.plot(xcoords, ycoords, '-', lw=width, color=color, zorder=zorder) def draw_node(axes, x, y, shape, color, size, edgecolor, edgewidth, zorder): axes.plot([x], [y], shape, markerfacecolor=color, markeredgecolor=edgecolor, markeredgewidth=edgewidth, markersize=size, zorder=zorder) # # DRAW EDGES # edges = list(net.edges) if edges: # Sort by edge weight. edges.sort(key=operator.itemgetter(2)) limits = {'weight': (edges[0][2], edges[-1][2])} for i,j,w in edges: values = {'weight': w} # Determine edge width. if (i,j) in edgeWidths: width = determine_size(edgeWidths[(i,j)], (i,j), net, values, limits, defaultEdgeWidth) elif (j,i) in edgeWidths: width = determine_size(edgeWidths[(j,i)], (j,i), net, values, limits, defaultEdgeWidth) else: width = determine_size(defaultEdgeWidth, (i,j), net, values, limits, defaultEdgeWidth) # Determine edge color. if (i,j) in edgeColors: color = determine_color(edgeColors[(i,j)], (i,j), net, values, limits, defaultEdgeColor) elif (j,i) in edgeColors: color = determine_color(edgeColors[(j,i)], (j,i), net, values, limits, defaultEdgeColor) else: color = determine_color(defaultEdgeColor, (j,i), net, values, limits, defaultEdgeColor) if (i,j) in edgePlotOrders: zorder = edgePlotOrders[(i,j)] elif (j,i) in edgePlotOrders: zorder = edgePlotOrders[(j,i)] else: zorder = defaultEdgePlotOrder # FOR DEBUGGING: #print "Edge (%d,%d) : %.1f %s %f" % (i,j,width,str(color),zorder) draw_edge(axes, [coords[i][0], coords[j][0]], [coords[i][1], coords[j][1]], width, color, zorder) # # DRAW NODES # # Find out the minimum and maximum value for strength and degree. strengths = netext.strengths(net) smin, smax = min(strengths.values()), max(strengths.values()) degrees = netext.deg(net) dmin, dmax = min(degrees.values()), max(degrees.values()) limits = {"strength":(smin, smax), "degree":(dmin,dmax)} for nodeIndex in net: values = {"strength": strengths[nodeIndex], "degree": degrees[nodeIndex]} # Determine node shape. shape = nodeShapes.get(nodeIndex, defaultNodeShape) # Determine node size. size = determine_size(nodeSizes.get(nodeIndex, defaultNodeSize), nodeIndex, net, values, limits, defaultNodeSize) # Determine node edge width. edgewidth = determine_size(nodeEdgeWidths.get(nodeIndex, defaultNodeEdgeWidth), nodeIndex, net, values, limits, defaultNodeEdgeWidth) # Determine node color color = determine_color(nodeColors.get(nodeIndex, defaultNodeColor), nodeIndex, net, values, limits, defaultNodeColor) # Determine node edge color edgecolor = determine_color(nodeEdgeColors.get(nodeIndex, defaultNodeEdgeColor), nodeIndex, net, values, limits, defaultNodeEdgeColor) # Determine z-order. zorder = nodePlotOrders.get(nodeIndex, defaultNodePlotOrder) # FOR DEBUGGING: #print "Node %d : %f %s %f %s" % (nodeIndex, size, str(color), edgewidth, str(edgecolor)) draw_node(axes, coords[nodeIndex][0], coords[nodeIndex][1], shape, color, size, edgecolor, edgewidth, zorder) # Add node labels. if nodeIndex in nodeLabels or labelAllNodes: if nodeIndex in nodeLabels: label = str(nodeLabels[nodeIndex]) else: label = str(nodeIndex) nodeLabel_offset = int(np.ceil(float(size)/2))+1 axes.annotate(label, (coords[nodeIndex][0],coords[nodeIndex][1]), textcoords='offset points', xytext=(nodeLabel_offset, nodeLabel_offset), color=node_label_font_color, size=node_label_font_size) # Set axis limits. Without this part the nodes on the edges would # be clipped. x_coords = sorted(map(operator.itemgetter(0), coords.values())) axes.set_xlim(xmin=x_coords[0]-edge_margin*(x_coords[-1]-x_coords[0]), xmax=x_coords[-1]+edge_margin*(x_coords[-1]-x_coords[0])) y_coords = sorted(map(operator.itemgetter(1), coords.values())) axes.set_ylim(ymin=y_coords[0]-edge_margin*(y_coords[-1]-y_coords[0]), ymax=y_coords[-1]+edge_margin*(y_coords[-1]-y_coords[0])) # Remove frame. if not frame: axes.set_axis_off() # Return figure. Note that if `axes` was given as an input # argument, the returned value is None. return fig
6217afcce411864428dba2bf58b78fcb1c40441d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/768/6217afcce411864428dba2bf58b78fcb1c40441d/visuals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11623, 554, 7308, 12, 2758, 16, 6074, 33, 7036, 16, 6515, 33, 7036, 16, 2623, 33, 8381, 16, 756, 30080, 33, 7036, 16, 805, 907, 8500, 2218, 83, 2187, 756, 12570, 33, 7036, 16, 805, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11623, 554, 7308, 12, 2758, 16, 6074, 33, 7036, 16, 6515, 33, 7036, 16, 2623, 33, 8381, 16, 756, 30080, 33, 7036, 16, 805, 907, 8500, 2218, 83, 2187, 756, 12570, 33, 7036, 16, 805, 9...
dr[filename] = ('ERROR', '{0}'.format(reason))
raise ScanError(reason)
def multiscan_file(self, file): """ Scan a file or directory given by filename using multiple threads (faster on SMP machines). Do not stop on error or virus found. Scan with archive support enabled.
bef3518a3bfa5e86c06cb84c8b0244be7487803a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8077/bef3518a3bfa5e86c06cb84c8b0244be7487803a/pyclamd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22945, 4169, 67, 768, 12, 2890, 16, 585, 4672, 3536, 8361, 279, 585, 578, 1867, 864, 635, 1544, 1450, 3229, 7403, 261, 8076, 264, 603, 348, 4566, 15942, 2934, 2256, 486, 2132, 603, 555, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22945, 4169, 67, 768, 12, 2890, 16, 585, 4672, 3536, 8361, 279, 585, 578, 1867, 864, 635, 1544, 1450, 3229, 7403, 261, 8076, 264, 603, 348, 4566, 15942, 2934, 2256, 486, 2132, 603, 555, ...
self.formatter.end_paragraph(0)
self.formatter.end_paragraph(1)
def end_blockquote(self): self.formatter.end_paragraph(0) self.formatter.pop_margin()
ca70a838e955928c5208fa315199c70645f91161 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/ca70a838e955928c5208fa315199c70645f91161/htmllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 67, 2629, 6889, 12, 2890, 4672, 365, 18, 12354, 18, 409, 67, 22445, 12, 21, 13, 365, 18, 12354, 18, 5120, 67, 10107, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 67, 2629, 6889, 12, 2890, 4672, 365, 18, 12354, 18, 409, 67, 22445, 12, 21, 13, 365, 18, 12354, 18, 5120, 67, 10107, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def execute(self, iterations = 1, fstype = 'iso9660'): profilers = self.job.profilers
def run_once(self, fstype = 'iso9660'):
def execute(self, iterations = 1, fstype = 'iso9660'): profilers = self.job.profilers args = fstype + ' 1' if not profilers.only(): for i in range(iterations): utils.system(self.srcdir + '/run_test ' + args)
5af6fa8ccf1e0aa56e8534d33f488830f7eda110 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/5af6fa8ccf1e0aa56e8534d33f488830f7eda110/fsfuzzer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 8243, 12, 2890, 16, 20223, 388, 273, 296, 9699, 10525, 4848, 11, 4672, 833, 273, 20223, 388, 397, 296, 404, 11, 309, 486, 450, 7540, 414, 18, 3700, 13332, 364, 277, 316, 1048...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 8243, 12, 2890, 16, 20223, 388, 273, 296, 9699, 10525, 4848, 11, 4672, 833, 273, 20223, 388, 397, 296, 404, 11, 309, 486, 450, 7540, 414, 18, 3700, 13332, 364, 277, 316, 1048...
'WHERE account_id =ANY(%s) AND unit_amount <> 0.0',(ids2,))
'WHERE account_id IN %s AND unit_amount <> 0.0',(parent_ids,))
def _user(self, cr, uid, ids, name, arg, context=None): res = {} cr.execute('SELECT MAX(id) FROM res_users') max_user = cr.fetchone()[0] for id in ids: ids2 = self.search(cr, uid, [('parent_id', 'child_of', [id])]) if ids2: cr.execute('SELECT DISTINCT("user") FROM account_analytic_analysis_summary_user ' \ 'WHERE account_id =ANY(%s) AND unit_amount <> 0.0',(ids2,)) res[id] = [int((id * max_user) + x[0]) for x in cr.fetchall()] else: res[id] = [] return res
3c18c11c83e2549431192a3a0c1f46403db9d628 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8241/3c18c11c83e2549431192a3a0c1f46403db9d628/account_analytic_analysis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1355, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 33, 7036, 4672, 400, 273, 2618, 4422, 18, 8837, 2668, 4803, 4552, 12, 350, 13, 4571, 400, 67, 5577, 613...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1355, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 33, 7036, 4672, 400, 273, 2618, 4422, 18, 8837, 2668, 4803, 4552, 12, 350, 13, 4571, 400, 67, 5577, 613...
timetables = queryAdapter(ttowner, ITimetables, None)
timetables = queryAdapter(ttowner, ITimetables, default=None)
def getAllTimetables(): app = getSchoolToolApplication(None) all_timetables = [] for ttowner in findObjectsProviding(app, IOwnTimetables): timetables = queryAdapter(ttowner, ITimetables, None) if timetables is not None: all_timetables += timetables.timetables.values() return all_timetables
51674bd9f7d504f4ea0758520dcd6eacbf6eba0d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7127/51674bd9f7d504f4ea0758520dcd6eacbf6eba0d/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5514, 10178, 278, 1538, 13332, 595, 273, 1322, 343, 1371, 6364, 3208, 12, 7036, 13, 777, 67, 8584, 278, 1538, 273, 5378, 364, 3574, 8443, 316, 1104, 4710, 626, 1246, 310, 12, 2910, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5514, 10178, 278, 1538, 13332, 595, 273, 1322, 343, 1371, 6364, 3208, 12, 7036, 13, 777, 67, 8584, 278, 1538, 273, 5378, 364, 3574, 8443, 316, 1104, 4710, 626, 1246, 310, 12, 2910, 16, ...
fail_if_match)
fail_if_match, print_output)
def retry_command(cmd, retries, timeout, sleeptime, stdout_regexp=None, stderr_regexp=None, fail_if_match=False): # Which iteration we're on i = 0 # Current return code rc = False while True: i += 1 rc = run_with_timeout(cmd, timeout, stdout_regexp, stderr_regexp, fail_if_match) if rc: break if retries > 0 and i >= retries: log.info("Number of retries exceeded maximum (%i), giving up.", retries) break if sleeptime: log.info("Sleeping for %i.", sleeptime) time.sleep(sleeptime) return rc
8dface2063bd8f3c552c615d3b3ff1178d8aa2e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6206/8dface2063bd8f3c552c615d3b3ff1178d8aa2e8/retry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3300, 67, 3076, 12, 4172, 16, 9453, 16, 2021, 16, 272, 11182, 10650, 16, 3909, 67, 17745, 33, 7036, 16, 4514, 67, 17745, 33, 7036, 16, 2321, 67, 430, 67, 1916, 33, 8381, 4672, 468, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3300, 67, 3076, 12, 4172, 16, 9453, 16, 2021, 16, 272, 11182, 10650, 16, 3909, 67, 17745, 33, 7036, 16, 4514, 67, 17745, 33, 7036, 16, 2321, 67, 430, 67, 1916, 33, 8381, 4672, 468, 2...
dlg.add_button (gtk.STOCK_OK, gtk.RESPONSE_OK)
dlg.add_button (gtk.STOCK_ADD, gtk.RESPONSE_OK)
def ProfileNameDialog (self): dlg = gtk.Dialog (_("Enter a profile name"), self.Main, gtk.DIALOG_MODAL) dlg.add_button (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) dlg.add_button (gtk.STOCK_OK, gtk.RESPONSE_OK) entry = gtk.Entry () label = gtk.Label (_("Please enter a name for the new profile:")) dlg.vbox.pack_start (label, False, False, 5) dlg.vbox.pack_start (entry, False, False, 5)
10e380f7f49357446aa3996369d9a008a48afe8e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7062/10e380f7f49357446aa3996369d9a008a48afe8e/Pages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11357, 461, 6353, 261, 2890, 4672, 25840, 273, 22718, 18, 6353, 261, 67, 2932, 10237, 279, 3042, 508, 6, 3631, 365, 18, 6376, 16, 22718, 18, 2565, 18683, 67, 6720, 1013, 13, 25840, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11357, 461, 6353, 261, 2890, 4672, 25840, 273, 22718, 18, 6353, 261, 67, 2932, 10237, 279, 3042, 508, 6, 3631, 365, 18, 6376, 16, 22718, 18, 2565, 18683, 67, 6720, 1013, 13, 25840, 18, ...
infos = self._try_twice('get_user_info', username, password)
infos = self._try_twice(funct=AuthCernWrapper.get_user_info, \ params={"user_name":username, "password":password})
def auth_user(self, username, password): """ Check USERNAME and PASSWORD against CERN NICE/CRA database. Return None if authentication failed, email address of the person if authentication succeeded. """
1fb926b1a7b5490214310c7b64958430e3941fe3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1931/1fb926b1a7b5490214310c7b64958430e3941fe3/external_authentication_cern.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1357, 67, 1355, 12, 2890, 16, 2718, 16, 2201, 4672, 3536, 2073, 7443, 1985, 471, 23446, 5314, 385, 654, 50, 423, 11774, 19, 39, 2849, 2063, 18, 2000, 599, 309, 5107, 2535, 16, 2699, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1357, 67, 1355, 12, 2890, 16, 2718, 16, 2201, 4672, 3536, 2073, 7443, 1985, 471, 23446, 5314, 385, 654, 50, 423, 11774, 19, 39, 2849, 2063, 18, 2000, 599, 309, 5107, 2535, 16, 2699, 17...
if cnf is None: return _lst2dict( self.tk.split( self.tk.call(self._w, 'indicator', 'configure', entry))) apply(self.tk.call, (self._w, 'indicator', 'configure', entry) + self._options(cnf, kw))
if cnf is None: return _lst2dict( self.tk.split( self.tk.call(self._w, 'indicator', 'configure', entry))) apply(self.tk.call, (self._w, 'indicator', 'configure', entry) + self._options(cnf, kw))
def indicator_configure(self, entry, cnf={}, **kw):
86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10664, 67, 14895, 12, 2890, 16, 1241, 16, 23118, 28793, 2826, 9987, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10664, 67, 14895, 12, 2890, 16, 1241, 16, 23118, 28793, 2826, 9987, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
return "%s:%d" % (self.allocator.host, self.allocator.port)
return str(self.server)
def render_title(self, context): return "%s:%d" % (self.allocator.host, self.allocator.port)
31fe557d90b0ea11ca0ccc84fa62cfc15351a729 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/31fe557d90b0ea11ca0ccc84fa62cfc15351a729/BotStatus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 2649, 12, 2890, 16, 819, 4672, 327, 2213, 87, 5319, 72, 6, 738, 261, 2890, 18, 9853, 639, 18, 2564, 16, 365, 18, 9853, 639, 18, 655, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 2649, 12, 2890, 16, 819, 4672, 327, 2213, 87, 5319, 72, 6, 738, 261, 2890, 18, 9853, 639, 18, 2564, 16, 365, 18, 9853, 639, 18, 655, 13, 2, -100, -100, -100, -100, -100, ...
mod = self.server_types[server_type]
server_types = {'single': 'flup.server.fcgi_single', 'threaded': 'flup.server.fcgi'} mod = server_types[server_type]
def run_server(self, application, options): server_type = options.server_type
0be839568d456e96389fafa94bc53826e172b444 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/0be839568d456e96389fafa94bc53826e172b444/flup_frontend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3567, 12, 2890, 16, 2521, 16, 702, 4672, 1438, 67, 723, 273, 702, 18, 3567, 67, 723, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3567, 12, 2890, 16, 2521, 16, 702, 4672, 1438, 67, 723, 273, 702, 18, 3567, 67, 723, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if '%40' in user_key or '@' in user_key: email = user_key.replace('%40', '@') request.user_to_show = users.User(email)
user_key = urllib.unquote(user_key) if '@' in user_key: request.user_to_show = users.User(user_key)
def user_key_wrapper(request, user_key, *args, **kwds): if '%40' in user_key or '@' in user_key: email = user_key.replace('%40', '@') request.user_to_show = users.User(email) else: accounts = models.Account.get_accounts_for_nickname(user_key) request.user_to_show = accounts[0].user return func(request, *args, **kwds)
a9cdb20817768f55630f7a05a120236f2457b178 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/476/a9cdb20817768f55630f7a05a120236f2457b178/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 729, 67, 856, 67, 8376, 12, 2293, 16, 729, 67, 856, 16, 380, 1968, 16, 2826, 25577, 4672, 729, 67, 856, 273, 11527, 18, 318, 6889, 12, 1355, 67, 856, 13, 309, 9175, 316, 729, 67, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 729, 67, 856, 67, 8376, 12, 2293, 16, 729, 67, 856, 16, 380, 1968, 16, 2826, 25577, 4672, 729, 67, 856, 273, 11527, 18, 318, 6889, 12, 1355, 67, 856, 13, 309, 9175, 316, 729, 67, 8...
sage: x, y = MPolynomialRing(ZZ,2,'xy').gens()
sage: R.<x, y> = MPolynomialRing(ZZ,2,'xy')
def univariate_polynomial(self, R=None): """ Returns a univariate polynomial associated to this multivariate polynomial.
9eee99dca57a6c587334490ad16b8d49d903a963 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/9eee99dca57a6c587334490ad16b8d49d903a963/multi_polynomial_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 27693, 67, 3915, 13602, 12, 2890, 16, 534, 33, 7036, 4672, 3536, 2860, 279, 640, 27693, 16991, 3627, 358, 333, 1778, 27693, 16991, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 27693, 67, 3915, 13602, 12, 2890, 16, 534, 33, 7036, 4672, 3536, 2860, 279, 640, 27693, 16991, 3627, 358, 333, 1778, 27693, 16991, 18, 2, -100, -100, -100, -100, -100, -100, -100, -...
r""" Large Schroeder numbers. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A006318;a
def __init__(self): r"""
def _eval(self, n): # a(n) = Sum from k=1 to n of k! StirlingS2(n, k) if n == 0: return Integer(1) return sum([arith.factorial(k)*combinat.stirling_number2(n,k) for k in range(1,n+1)])
d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 468, 279, 12, 82, 13, 273, 9352, 628, 417, 33, 21, 358, 290, 434, 417, 5, 934, 481, 2456, 55, 22, 12, 82, 16, 417, 13, 309, 290, 422, 374, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 468, 279, 12, 82, 13, 273, 9352, 628, 417, 33, 21, 358, 290, 434, 417, 5, 934, 481, 2456, 55, 22, 12, 82, 16, 417, 13, 309, 290, 422, 374, 30,...
self.library_dirs.append(os.path.join(sys.exec_prefix, 'PC', 'VC6'))
self.library_dirs.append(os.path.join(sys.exec_prefix, 'PCBuild'))
def finalize_options (self): from distutils import sysconfig
8279170ed2ddffad6f38e3d8ebc29d14cf5d8ae3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8279170ed2ddffad6f38e3d8ebc29d14cf5d8ae3/build_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 261, 2890, 4672, 628, 2411, 5471, 1930, 2589, 1425, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 261, 2890, 4672, 628, 2411, 5471, 1930, 2589, 1425, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.depthEdit.SetValue("1")
def setNumberOfImages(self, n = -1): """ Sets the number of images we're reading """ Logging.info("n=", n, kw = "io") self.imageAmountLbl.SetLabel("%d" % n)#" self.imageAmount = n val = self.depthEdit.GetValue().strip() if not val: self.depthEdit.SetValue("1") val = 1 try: if not self.dataSource.is3DImage(): val = int(val) print "Setting number of timepoints to ", n, "/", val tps = float(n) / val else: tps = n self.timepointEdit.SetValue("%d" % tps) currentTime = self.timeslider.GetValue() self.timeslider.SetRange(1, tps) if currentTime < 1: currentTime = 1 if currentTime > tps: currentTime = tps except: pass
24d61fb7ed3fd0784cc4231099e43bd6ab8eac45 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2877/24d61fb7ed3fd0784cc4231099e43bd6ab8eac45/ImportDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 9226, 8946, 12, 2890, 16, 290, 273, 300, 21, 4672, 3536, 11511, 326, 1300, 434, 4602, 732, 4565, 6453, 3536, 10253, 18, 1376, 2932, 82, 1546, 16, 290, 16, 5323, 273, 315, 1594, 79...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 9226, 8946, 12, 2890, 16, 290, 273, 300, 21, 4672, 3536, 11511, 326, 1300, 434, 4602, 732, 4565, 6453, 3536, 10253, 18, 1376, 2932, 82, 1546, 16, 290, 16, 5323, 273, 315, 1594, 79...
m[:] = 'b'*mapsize
m[:] = b'b'*mapsize
def test_access_parameter(self): # Test for "access" keyword parameter mapsize = 10 open(TESTFN, "wb").write("a"*mapsize) f = open(TESTFN, "rb") m = mmap.mmap(f.fileno(), mapsize, access=mmap.ACCESS_READ) self.assertEqual(m[:], 'a'*mapsize, "Readonly memory map data incorrect.")
3c5b3f3090b6007274572d236a3d5ae5856203ec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/3c5b3f3090b6007274572d236a3d5ae5856203ec/test_mmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3860, 67, 6775, 12, 2890, 4672, 468, 7766, 364, 315, 3860, 6, 4932, 1569, 852, 1467, 273, 1728, 1696, 12, 16961, 19793, 16, 315, 9464, 20387, 2626, 2932, 69, 6, 14, 1458, 146...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3860, 67, 6775, 12, 2890, 4672, 468, 7766, 364, 315, 3860, 6, 4932, 1569, 852, 1467, 273, 1728, 1696, 12, 16961, 19793, 16, 315, 9464, 20387, 2626, 2932, 69, 6, 14, 1458, 146...
'date_current' : fields.date('Date',help='This field allow you to choose the date to use, for forecast matter e.g. The start date is the starting date of the employee contract.')
'date_current' : fields.date('Date',help='This field allow you to choose the date to use, for forecast matter e.g. The start date is the starting date of the employee contract.')
def _compute_diff(self, cr, uid, ids, name, arg, context={}): res={} for id in ids: tmp = self.read(cr, uid, id, ['prev_number','new_number']) old, new = tmp['prev_number'], tmp['new_number'] if not old: old = 0 res[id] = new - old return res
41206a0cdb7049f680aebfb4b94d75566b282cc7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/41206a0cdb7049f680aebfb4b94d75566b282cc7/hr_holidays_evaluation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9200, 67, 5413, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 400, 12938, 364, 612, 316, 3258, 30, 1853, 273, 365, 18, 896, 12, 3353, 16, 4555...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9200, 67, 5413, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 400, 12938, 364, 612, 316, 3258, 30, 1853, 273, 365, 18, 896, 12, 3353, 16, 4555...
if ext: inherited = ext.group(1) base = ext.group(2) if base in BUILTIN: if not deptree.has_key(inherited): deptree[inherited] = [] else: if deptree.has_key(inherited): deptree[inherited].append(base) else: deptree[inherited] = [base]
def getdeps(data, filename, deptree, posttree, packages): thisclass = False superclass = False dc = R_QXDEFINECLASS.search(data) if dc: thisclass = dc.group(1) superclass = dc.group(2) else: # print "Sorry. Don't find any class informations. Trying namespace flag" ns = R_QXNAMESPACE.search(data) if ns: thisclass = ns.group(1) print "DEPS: %s (%s)" % (thisclass, superclass) if not deptree.has_key(filename): deptree[filename] = [] if not posttree.has_key(filename): posttree[filename] = [] for line in data.split("\n"): ext = R_QXEXTEND.search(line) req = R_QXREQUIRE.search(line) pos = R_QXPOST.search(line) pkg = R_QXPACKAGE.search(line) if ext: inherited = ext.group(1) base = ext.group(2) if base in BUILTIN: if not deptree.has_key(inherited): deptree[inherited] = [] else: if deptree.has_key(inherited): deptree[inherited].append(base) else: deptree[inherited] = [base] if req: deptree[filename].append(req.group(1)) if pos: posttree[filename].append(pos.group(1)) if pkg: pkgname = pkg.group(1) if packages.has_key(pkgname): packages[pkgname].append(filename) else: packages[pkgname] = [ filename ]
2d8f9682420a9322f17740fff18434667e5ed5ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5718/2d8f9682420a9322f17740fff18434667e5ed5ed/compile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 14877, 12, 892, 16, 1544, 16, 443, 337, 992, 16, 1603, 3413, 16, 5907, 4672, 333, 1106, 273, 1083, 12098, 273, 1083, 225, 6744, 273, 534, 67, 53, 60, 12904, 3740, 5237, 18, 3072, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 14877, 12, 892, 16, 1544, 16, 443, 337, 992, 16, 1603, 3413, 16, 5907, 4672, 333, 1106, 273, 1083, 12098, 273, 1083, 225, 6744, 273, 534, 67, 53, 60, 12904, 3740, 5237, 18, 3072, ...
def save(self, new_data): self.multilingual_pre_save(new_data) return super(MultilingualAddManipulator, self).save(new_data)
def do_html2python(self, new_data): self.fix_translation_data(new_data) super(MultilingualAddManipulator, self).do_html2python(new_data)
def save(self, new_data): self.multilingual_pre_save(new_data) return super(MultilingualAddManipulator, self).save(new_data)
51aecfc52cbfcb1b93ac8762a80e93a491a56fd1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12035/51aecfc52cbfcb1b93ac8762a80e93a491a56fd1/manipulators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 394, 67, 892, 4672, 365, 18, 5421, 25853, 67, 1484, 67, 5688, 12, 2704, 67, 892, 13, 327, 2240, 12, 5049, 25853, 986, 27587, 16, 365, 2934, 5688, 12, 2704, 67, 89...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 394, 67, 892, 4672, 365, 18, 5421, 25853, 67, 1484, 67, 5688, 12, 2704, 67, 892, 13, 327, 2240, 12, 5049, 25853, 986, 27587, 16, 365, 2934, 5688, 12, 2704, 67, 89...
'new_user': this.new_user
'new_user': this.new_user, 'domain': this.domain, 'access_mode': this.access_mode, 'action_id': this.action_id and this.action_id.id or False
def do_step_2(self, cr, uid, ids, context=None): """ This action to excute step 2 """ if not context: context = {}
ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4119, 67, 22, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 3536, 1220, 1301, 358, 3533, 624, 2235, 576, 225, 3536, 309, 486, 819, 30, 819, 273, 2618, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4119, 67, 22, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 3536, 1220, 1301, 358, 3533, 624, 2235, 576, 225, 3536, 309, 486, 819, 30, 819, 273, 2618, 2, ...