rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
exclude = ("run.py", "rpc.py", "threading.py", "Queue.py",
exclude = ("run.py", "rpc.py", "threading.py", "queue.py",
def print_exception(): import linecache linecache.checkcache() flush_stdout() efile = sys.stderr typ, val, tb = excinfo = sys.exc_info() sys.last_type, sys.last_value, sys.last_traceback = excinfo tbe = traceback.extract_tb(tb) print('Traceback (most recent call last):', file=efile) exclude = ("run.py", "rpc.py", "threading.py", "Queue.py", "RemoteDebugger.py", "bdb.py") cleanup_traceback(tbe, exclude) traceback.print_list(tbe, file=efile) lines = traceback.format_exception_only(typ, val) for line in lines: print(line, end='', file=efile)
15a51e3c21efec5546ebb3249b48fa8aa591ea76 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/15a51e3c21efec5546ebb3249b48fa8aa591ea76/run.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 4064, 13332, 1930, 4739, 557, 807, 4739, 557, 807, 18, 1893, 2493, 1435, 3663, 67, 10283, 1435, 425, 768, 273, 2589, 18, 11241, 3815, 16, 1244, 16, 8739, 273, 3533, 1376, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1172, 67, 4064, 13332, 1930, 4739, 557, 807, 4739, 557, 807, 18, 1893, 2493, 1435, 3663, 67, 10283, 1435, 425, 768, 273, 2589, 18, 11241, 3815, 16, 1244, 16, 8739, 273, 3533, 1376, 273, ...
'message': message
'message': message, 'mapkey' : MAP_APIKEY,
def post(self): """ Called when a new ride needs to be added to the database. Probably with all of this data it should be done as a form post. Arguments: - `self`: Web Arguments: - max_passengers - num_passengers - driver - start_point_title - start_point_lat - start_point_long - destination_title - destination_lat - destination_long - part_of_day - ToD - contact """
ffeea1d149ec92d56895d942d53c54670de20617 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9768/ffeea1d149ec92d56895d942d53c54670de20617/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 12, 2890, 4672, 3536, 11782, 1347, 279, 394, 436, 831, 4260, 358, 506, 3096, 358, 326, 2063, 18, 14610, 6906, 598, 777, 434, 333, 501, 518, 1410, 506, 2731, 487, 279, 646, 1603, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1603, 12, 2890, 4672, 3536, 11782, 1347, 279, 394, 436, 831, 4260, 358, 506, 3096, 358, 326, 2063, 18, 14610, 6906, 598, 777, 434, 333, 501, 518, 1410, 506, 2731, 487, 279, 646, 1603, ...
querystring = self.key(query) if usekey else query
def search(self, query, usekey=False, threshold=None): """Search the index for items that have similarity to the query.
39f7a6e33ae621db9aac9c718b31cc2533326768 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12095/39f7a6e33ae621db9aac9c718b31cc2533326768/ngram.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 843, 16, 999, 856, 33, 8381, 16, 5573, 33, 7036, 4672, 3536, 2979, 326, 770, 364, 1516, 716, 1240, 16416, 358, 326, 843, 18, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 843, 16, 999, 856, 33, 8381, 16, 5573, 33, 7036, 4672, 3536, 2979, 326, 770, 364, 1516, 716, 1240, 16416, 358, 326, 843, 18, 2, -100, -100, -100, -100, -100, -100, ...
print 'self.can_be_saved()', self.can_be_saved()
def saveTab(self): self.parent.docmanager.SaveDocument(self.document) self.updateTabName() print 'self.can_be_saved()', self.can_be_saved() self.setNotSaved(abs(self.can_be_saved()-1))
c520dd785a6c27f11a0cf15ea42cdd3354d620db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3123/c520dd785a6c27f11a0cf15ea42cdd3354d620db/doctabs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 5661, 12, 2890, 4672, 365, 18, 2938, 18, 2434, 4181, 18, 4755, 2519, 12, 2890, 18, 5457, 13, 365, 18, 2725, 5661, 461, 1435, 365, 18, 542, 1248, 16776, 12, 5113, 12, 2890, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 5661, 12, 2890, 4672, 365, 18, 2938, 18, 2434, 4181, 18, 4755, 2519, 12, 2890, 18, 5457, 13, 365, 18, 2725, 5661, 461, 1435, 365, 18, 542, 1248, 16776, 12, 5113, 12, 2890, 18, ...
'test_singlebond_stretch_Cl_NH2', 'test_singlebond_stretch_Cl_CH3',
'test_singlebond_stretch_HO_PH2', 'test_minimize_0010', 'test_singlebond_stretch_H2P_SiH3', 'test_singlebond_stretch_H2P_AlH2', 'test_singlebond_stretch_HS_CH3', 'test_singlebond_stretch_H2B_PH2',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
3f4a171b835422313ecc0171dd0ab652a7f6a1bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/3f4a171b835422313ecc0171dd0ab652a7f6a1bc/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1930, 3142, 328, 1077, 273, 11311, 8467, 16059, 12, 2890, 18, 1969, 397, 3552, 81, 1291, 7923, 272, 273, 3142, 18, 2930, 10153, 12, 2890, 18, 1969, 397, 3552, 81, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1930, 3142, 328, 1077, 273, 11311, 8467, 16059, 12, 2890, 18, 1969, 397, 3552, 81, 1291, 7923, 272, 273, 3142, 18, 2930, 10153, 12, 2890, 18, 1969, 397, 3552, 81, ...
self.drawChannels(sampler.read())
self.drawChannels(sampler.readAll())
def run(self, sampler): """Run until our window is closed, drawing data from the given sampler""" while 1: for event in pygame.event.get(): if event.type == QUIT: return self.drawChannels(sampler.read()) pygame.display.flip()
1370525d87201f294b56011181608e1a8a176f4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/1370525d87201f294b56011181608e1a8a176f4b/adctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 15349, 4672, 3536, 1997, 3180, 3134, 2742, 353, 4375, 16, 16327, 501, 628, 326, 864, 15349, 8395, 1323, 404, 30, 364, 871, 316, 2395, 13957, 18, 2575, 18, 588, 13332,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16, 15349, 4672, 3536, 1997, 3180, 3134, 2742, 353, 4375, 16, 16327, 501, 628, 326, 864, 15349, 8395, 1323, 404, 30, 364, 871, 316, 2395, 13957, 18, 2575, 18, 588, 13332,...
argc = len(sys.argv) if argc < 2: print "You must provide icu version number." print "Example: ./icu_dat_generator.py 4.4"
VERBOSE = False show_help = False try: opts, args = getopt.getopt(sys.argv[1:], 'hv', ['help', 'verbose']) except getopt.error: PrintHelpAndExit() for opt, arg in opts: if opt in ('-h', '--help'): show_help = True elif opt in ('-v', '--verbose'): VERBOSE = True if len(args) < 1: show_help = True if show_help: PrintHelpAndExit() ICU_VERSION = args[0] if re.search(r'[0-9]+\.[0-9]+', ICU_VERSION) == None: print "'%s' is not a valid icu version number!" % (ICU_VERSION)
def main(): global ANDROID_ROOT # Android project home directory global ICU_VERSION # ICU version number global ICUDATA # e.g. "icudt42l" global ICUDATA_DAT # e.g. "icudt42l.dat" global CLDR_VERSION # CLDR version. The value can be vary upon ICU release. global TMP_DAT_PATH # temp directory to store all resource files and # intermediate dat files. global HELP global VERBOSE argc = len(sys.argv) if argc < 2: print "You must provide icu version number." print "Example: ./icu_dat_generator.py 4.4" sys.exit(1) ICU_VERSION = sys.argv[1] version = GetIcuVersion(ICU_VERSION) if (version == -1): print sys.argv[1] + " is not a valid icu version number!" sys.exit(1) ICUDATA = "icudt" + version + "l" CLDR_VERSION = "1.8" ANDROID_ROOT = os.environ.get("ANDROID_BUILD_TOP") if not ANDROID_ROOT: print "$ANDROID_BUILD_TOP not set! Run 'env_setup.sh'." sys.exit(1) ICUDATA_DAT = ICUDATA + ".dat" HELP = False VERBOSE = False try: opts, args = getopt.getopt(sys.argv[2:], 'hv', ['help', 'verbose']) except getopt.error: print "Invalid option" PrintHelp() sys.exit(1) for opt, arg in opts: if opt in ('-h', '--help'): PrintHelp() sys.exit(1) elif opt in ('-v', '--verbose'): VERBOSE = True # Check for requiered source files. icu_dat_path = os.path.join(ANDROID_ROOT, "external", "icu4c", "stubdata") full_data_filename = os.path.join(icu_dat_path, ICUDATA + "-all.dat") if not os.path.isfile(full_data_filename): print "%s not present." % full_data_filename sys.exit(1) # Create a temporary working directory. TMP_DAT_PATH = os.path.join(ANDROID_ROOT, "external", "icu4c", "tmp") if os.path.exists(TMP_DAT_PATH): shutil.rmtree(TMP_DAT_PATH) os.mkdir(TMP_DAT_PATH) # Extract resource files from icudtxxl-all.dat to TMP_DAT_PATH. ExtractAllResourceToTempDir() datlist = ["us", "us-euro", "default", "us-japan", "zh", "medium", "large"] for dat_subtag in datlist: MakeDat(icu_dat_path, dat_subtag) # Copy icudtxxl.dat to stubdata directory with corresponding subtag. shutil.copyfile(os.path.join(TMP_DAT_PATH, ICUDATA_DAT), os.path.join(icu_dat_path, ICUDATA + "-" + dat_subtag + ".dat")) print "Generate ICU data:" + os.path.join(icu_dat_path, ICUDATA + "-" + dat_subtag + ".dat") # Cleanup temporary working directory and icudtxxl.dat shutil.rmtree(TMP_DAT_PATH) os.remove(os.path.join(icu_dat_path, ICUDATA_DAT))
89f309f809ddaba6a3ba4a31a8ee74cfa5e85be3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10672/89f309f809ddaba6a3ba4a31a8ee74cfa5e85be3/icu_dat_generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 4116, 1457, 734, 67, 9185, 225, 468, 15288, 1984, 6382, 1867, 2552, 28009, 67, 5757, 282, 468, 28009, 1177, 1300, 2552, 28009, 4883, 4202, 468, 425, 18, 75, 18, 315, 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, 2774, 13332, 2552, 4116, 1457, 734, 67, 9185, 225, 468, 15288, 1984, 6382, 1867, 2552, 28009, 67, 5757, 282, 468, 28009, 1177, 1300, 2552, 28009, 4883, 4202, 468, 425, 18, 75, 18, 315, 3...
return "%s &= %s; %s" % (dest.codegen(), src.codegen(), self._resultFlags(dest))
return "%s &= %s; %s fl.o=fl.c=0;" % ( dest.codegen(), src.codegen(), self._resultFlags(dest))
def codegen_and(self, dest, src): return "%s &= %s; %s" % (dest.codegen(), src.codegen(), self._resultFlags(dest))
d289fc0da7ef31ed20fcdea2153e5f6bfa664b71 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6757/d289fc0da7ef31ed20fcdea2153e5f6bfa664b71/sbt86.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23198, 67, 464, 12, 2890, 16, 1570, 16, 1705, 4672, 327, 2213, 87, 12058, 738, 87, 31, 738, 87, 6, 738, 261, 10488, 18, 710, 4507, 9334, 1705, 18, 710, 4507, 9334, 365, 6315, 2088, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23198, 67, 464, 12, 2890, 16, 1570, 16, 1705, 4672, 327, 2213, 87, 12058, 738, 87, 31, 738, 87, 6, 738, 261, 10488, 18, 710, 4507, 9334, 1705, 18, 710, 4507, 9334, 365, 6315, 2088, 5...
doc += '<!--\n' doc += '%s/%s not found or has no metalink\n' % (directory, file) doc += '-->\n'
if message is not None: doc += '<!--\n' doc += message + '\n' doc += '-->\n'
def metalink_failuredoc(directory, file): doc = '' doc += '<?xml version="1.0" encoding="utf-8"?>\n' doc += '<!--\n' doc += '%s/%s not found or has no metalink\n' % (directory, file) doc += '-->\n' return doc
2f698c8027b88597bbdef9712dee43e6e9d48e18 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13031/2f698c8027b88597bbdef9712dee43e6e9d48e18/mirrorlist_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5100, 16194, 67, 12251, 2434, 12, 5149, 16, 585, 4672, 997, 273, 875, 997, 1011, 16617, 2902, 1177, 1546, 21, 18, 20, 6, 2688, 1546, 3158, 17, 28, 6, 35, 5333, 82, 11, 309, 883, 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, 5100, 16194, 67, 12251, 2434, 12, 5149, 16, 585, 4672, 997, 273, 875, 997, 1011, 16617, 2902, 1177, 1546, 21, 18, 20, 6, 2688, 1546, 3158, 17, 28, 6, 35, 5333, 82, 11, 309, 883, 353,...
,"aggressor_fg" : aggressor_flightgroup ,"aggressor_type":aggressor_type ,"defender_fg" : defender_flightgroup ,"defender_type": defender_type
,"aggressorFG" : aggressor_flightgroup ,"aggressorFGtype":aggressor_type ,"defenderFG" : defender_flightgroup ,"defenderFGtype": defender_type
def makeDynamicNews (type_event,stage_event,aggressor,defender,success ,scale_event,system,keyword,aggressor_flightgroup,aggressor_type, defender_flightgroup, defender_type):
85d723b48341deebe923269e6b44a6ed8bd18b4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2883/85d723b48341deebe923269e6b44a6ed8bd18b4c/dynamic_news.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 9791, 17948, 202, 12, 723, 67, 2575, 16, 12869, 67, 2575, 16, 346, 2329, 280, 16, 536, 2345, 16, 4768, 269, 5864, 67, 2575, 16, 4299, 16, 11041, 16, 346, 2329, 280, 67, 19131, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1221, 9791, 17948, 202, 12, 723, 67, 2575, 16, 12869, 67, 2575, 16, 346, 2329, 280, 16, 536, 2345, 16, 4768, 269, 5864, 67, 2575, 16, 4299, 16, 11041, 16, 346, 2329, 280, 67, 19131, ...
This is similar to getallmatchingheaders, but it returns only the first matching header (and its continuation lines).
This is similar to getallmatchingheaders, but it returns only the first matching header (and its continuation lines).
def getfirstmatchingheader(self, name): """Get the first header line matching name.
9ec58aaef2d0124bd42e30e6029fe8a7bdb906e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ec58aaef2d0124bd42e30e6029fe8a7bdb906e7/rfc822.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3645, 16271, 3374, 12, 2890, 16, 508, 4672, 3536, 967, 326, 1122, 1446, 980, 3607, 508, 18, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3645, 16271, 3374, 12, 2890, 16, 508, 4672, 3536, 967, 326, 1122, 1446, 980, 3607, 508, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
from docutils.parsers.rst.directives.misc import Include as BaseInclude
def run(self): node = addnodes.only() node.document = self.state.document node.line = self.lineno node['expr'] = self.arguments[0] self.state.nested_parse(self.content, self.content_offset, node, match_titles=1) return [node]
9420229ca8123a8bd19265022f694fa7aeb14bbc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/9420229ca8123a8bd19265022f694fa7aeb14bbc/other.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 756, 273, 527, 4690, 18, 3700, 1435, 756, 18, 5457, 273, 365, 18, 2019, 18, 5457, 756, 18, 1369, 273, 365, 18, 17782, 756, 3292, 8638, 3546, 273, 365, 18, 7099, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 756, 273, 527, 4690, 18, 3700, 1435, 756, 18, 5457, 273, 365, 18, 2019, 18, 5457, 756, 18, 1369, 273, 365, 18, 17782, 756, 3292, 8638, 3546, 273, 365, 18, 7099, ...
logger.debug("removing segment_definer row for key %s"
ligomd.table['segment_definer']['stream'].pop(row_idx) logger.debug("removed segment_definer row for key %s"
uniq_def = (row[run_col],row[ifos_col],row[name_col],row[vers_col])
7a2ab3694e834d974558409a5d3f61863f4de6ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/7a2ab3694e834d974558409a5d3f61863f4de6ee/LDBDServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 10748, 67, 536, 273, 261, 492, 63, 2681, 67, 1293, 6487, 492, 63, 430, 538, 67, 1293, 6487, 492, 63, 529, 67, 1293, 6487, 492, 63, 2496, 67, 1293, 5717, 2, 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, 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, 10748, 67, 536, 273, 261, 492, 63, 2681, 67, 1293, 6487, 492, 63, 430, 538, 67, 1293, 6487, 492, 63, 529, 67, 1293, 6487, 492, 63, 2496, 67, 1293, 5717, 2, -100, -100, -100, -100, -100, -1...
Set.intersection_update( self, other)
super(OrderedSet, self).intersection_update(other)
def intersection_update(self, other): Set.intersection_update( self, other) self._list = [ a for a in self._list if a in other] return self
ffd0e0e1817762bad71cd2a8dc38e2f702880632 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1074/ffd0e0e1817762bad71cd2a8dc38e2f702880632/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7619, 67, 2725, 12, 2890, 16, 1308, 4672, 2240, 12, 16756, 694, 16, 365, 2934, 30231, 67, 2725, 12, 3011, 13, 365, 6315, 1098, 273, 306, 279, 364, 279, 316, 365, 6315, 1098, 309, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7619, 67, 2725, 12, 2890, 16, 1308, 4672, 2240, 12, 16756, 694, 16, 365, 2934, 30231, 67, 2725, 12, 3011, 13, 365, 6315, 1098, 273, 306, 279, 364, 279, 316, 365, 6315, 1098, 309, 279, ...
print "*********************** Interest Sets **************" for i in DoInterestManager._interests.keys(): print "Interest ID:%s, Description=%s Scope=%s Event=%s Mode=%s"%( i, DoInterestManager._interests[i][0], DoInterestManager._interests[i][1], DoInterestManager._interests[i][2], DoInterestManager._interests[i][3]) print "****************************************************"
if self.notify.getDebug(): print "*********************** Interest Sets **************" for i in DoInterestManager._interests.keys(): print "Interest ID:%s, Description=%s Scope=%s Event=%s Mode=%s"%( i, DoInterestManager._interests[i][0], DoInterestManager._interests[i][1], DoInterestManager._interests[i][2], DoInterestManager._interests[i][3]) print "****************************************************"
def printInterests(self): if not WantInterestPrintout: return 1 """ Part of the new otp-server code. """ print "*********************** Interest Sets **************" for i in DoInterestManager._interests.keys(): print "Interest ID:%s, Description=%s Scope=%s Event=%s Mode=%s"%( i, DoInterestManager._interests[i][0], DoInterestManager._interests[i][1], DoInterestManager._interests[i][2], DoInterestManager._interests[i][3]) print "****************************************************" return 1 # for assert()
b04c601d20ca46868f158da62f404cb3b7cf78a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/b04c601d20ca46868f158da62f404cb3b7cf78a8/DoInterestManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 2465, 25563, 12, 2890, 4672, 309, 486, 678, 970, 29281, 5108, 659, 30, 327, 404, 3536, 6393, 434, 326, 394, 28625, 17, 3567, 981, 18, 3536, 309, 365, 18, 12336, 18, 588, 2829, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1172, 2465, 25563, 12, 2890, 4672, 309, 486, 678, 970, 29281, 5108, 659, 30, 327, 404, 3536, 6393, 434, 326, 394, 28625, 17, 3567, 981, 18, 3536, 309, 365, 18, 12336, 18, 588, 2829, 13...
subdivisions[0], subdivisions[0],
subdivisions[0], subdivisions[0],
def refine_func(vertices, area): return area > max_area
592adeeb615eb5497b4dae9329f92c603720e638 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12869/592adeeb615eb5497b4dae9329f92c603720e638/geometry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30446, 67, 644, 12, 17476, 16, 5091, 4672, 327, 5091, 405, 943, 67, 5036, 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, 30446, 67, 644, 12, 17476, 16, 5091, 4672, 327, 5091, 405, 943, 67, 5036, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
sess.ouput_page.user_msg(_('Probes could be -1 or > 0'), STATUS_ERR,
sess.output_page.user_msg(_('Probes could be -1 or > 0'), STATUS_ERR,
def execute_audit(self, sess, inp_dict): target = inp_dict['target'] probes = inp_dict['probes']
078a843f73a630920741f8926baecfedb6ce7004 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11468/078a843f73a630920741f8926baecfedb6ce7004/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 67, 17413, 12, 2890, 16, 8451, 16, 12789, 67, 1576, 4672, 1018, 273, 12789, 67, 1576, 3292, 3299, 3546, 3137, 281, 273, 12789, 67, 1576, 3292, 7748, 281, 3546, 2, 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, 1836, 67, 17413, 12, 2890, 16, 8451, 16, 12789, 67, 1576, 4672, 1018, 273, 12789, 67, 1576, 3292, 3299, 3546, 3137, 281, 273, 12789, 67, 1576, 3292, 7748, 281, 3546, 2, -100, -100, -100,...
line = wx.StaticLine(self, wx.ID_ANY, size=(1,-1), style=wx.LI_HORIZONTAL) sizer.Add(line, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL, 5)
sizer.Add(wx.StaticLine(self), 0, wx.EXPAND, 5)
def __init__(self, *a, **kw): self._maze = kw['maze'] del kw['maze'] wx.Dialog.__init__(self, *a, **kw)
706ec845784be22e3473d535d3584cecd76d0ba8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10214/706ec845784be22e3473d535d3584cecd76d0ba8/maze.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 69, 16, 2826, 9987, 4672, 365, 6315, 81, 1561, 73, 273, 5323, 3292, 81, 1561, 73, 3546, 1464, 5323, 3292, 81, 1561, 73, 3546, 7075, 18, 6353, 16186,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 69, 16, 2826, 9987, 4672, 365, 6315, 81, 1561, 73, 273, 5323, 3292, 81, 1561, 73, 3546, 1464, 5323, 3292, 81, 1561, 73, 3546, 7075, 18, 6353, 16186,...
id = id[3:] file = os.path.join(dirs[width], id + '.png')
icon_name = id[3:] file = os.path.join(dirs[width], icon_name + '.png')
def generate_icons(self): res = self.file.xpath_eval("/svg:svg" "/svg:g[@inkscape:groupmode='layer' and " " @id='Rectangles']" "/svg:rect") re_default_rect_id = re.compile(r'rect[0-9]+') inkscape = Inkscape(self.file.filename)
ac4bd16ec0a2b06104680c761635ce919b00bd6b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5072/ac4bd16ec0a2b06104680c761635ce919b00bd6b/render.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 14516, 12, 2890, 4672, 400, 273, 365, 18, 768, 18, 18644, 67, 8622, 2932, 19, 11451, 30, 11451, 6, 2206, 11451, 30, 75, 14782, 754, 12476, 30, 1655, 3188, 2218, 6363, 11, 471...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2103, 67, 14516, 12, 2890, 4672, 400, 273, 365, 18, 768, 18, 18644, 67, 8622, 2932, 19, 11451, 30, 11451, 6, 2206, 11451, 30, 75, 14782, 754, 12476, 30, 1655, 3188, 2218, 6363, 11, 471...
'-D="prefix:%s"' % prefix,
def RunJSDocToolkit(js_files, output_dir, prefix): """Executes the JSDocToolkit.""" list_filename = MakePath('../scons-out/docs/obj/doclist.conf') f = open(list_filename, 'w') f.write('{\n_: [\n') for filename in js_files: f.write('"%s",\n' % filename.replace('\\', '/')) f.write(']\n}\n') f.close() Execute([ _java_exe, '-Djsdoc.dir=%s' % MakePath('../third_party/jsdoctoolkit/files'), '-jar', MakePath('../third_party/jsdoctoolkit/files/jsrun.jar'), MakePath('../third_party/jsdoctoolkit/files/app/run.js'), '-D="prefix:%s"' % prefix, '-v', '-t=%s' % MakePath('./jsdoc-toolkit-templates//'), '-d=' + output_dir, '-c=' + list_filename])
46fbd703f3ec3e26379fd393e338b2a0714af138 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/46fbd703f3ec3e26379fd393e338b2a0714af138/build_docs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 6479, 1759, 6364, 8691, 12, 2924, 67, 2354, 16, 876, 67, 1214, 16, 1633, 4672, 3536, 9763, 326, 6756, 1759, 6364, 8691, 12123, 666, 67, 3459, 273, 4344, 743, 2668, 6216, 87, 8559, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1939, 6479, 1759, 6364, 8691, 12, 2924, 67, 2354, 16, 876, 67, 1214, 16, 1633, 4672, 3536, 9763, 326, 6756, 1759, 6364, 8691, 12123, 666, 67, 3459, 273, 4344, 743, 2668, 6216, 87, 8559, ...
data = self.sendCMD(['cd ' + dirname, 'cwd', 'quit'], sleep = 1)
data = self.sendCMD(['cd ' + dirname, 'cwd'])
def dirExists(self, dirname): match = ".*" + dirname + "$" dirre = re.compile(match) data = self.sendCMD(['cd ' + dirname, 'cwd', 'quit'], sleep = 1) if (data == None): return None retVal = self.stripPrompt(data) data = retVal.split('\n') found = False for d in data: if (dirre.match(d)): found = True
02223128cd056cb013609966605554a83eff291d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/02223128cd056cb013609966605554a83eff291d/devicemanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1577, 4002, 12, 2890, 16, 4283, 4672, 845, 273, 3552, 7388, 397, 4283, 397, 24568, 1577, 266, 273, 283, 18, 11100, 12, 1916, 13, 501, 273, 365, 18, 4661, 19473, 12, 3292, 4315, 296, 39...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1577, 4002, 12, 2890, 16, 4283, 4672, 845, 273, 3552, 7388, 397, 4283, 397, 24568, 1577, 266, 273, 283, 18, 11100, 12, 1916, 13, 501, 273, 365, 18, 4661, 19473, 12, 3292, 4315, 296, 39...
try: ar = repr(self.addr) except: ar = 'no self.addr!' return '<__repr__ (self) failed for object at %x (addr=%s)>' % (id(self),ar)
pass try: ar = repr (self.addr) except AttributeError: ar = 'no self.addr!' return '<__repr__() failed for %s instance at %x (addr=%s)>' % \ (self.__class__.__name__, id (self), ar)
def __repr__ (self): try: status = [] if self.accepting and self.addr: status.append ('listening') elif self.connected: status.append ('connected') if self.addr: status.append ('%s:%d' % self.addr) return '<%s %s at %x>' % ( self.__class__.__name__, ' '.join (status), id(self) ) except: try: ar = repr(self.addr) except: ar = 'no self.addr!'
4511088ee1cc3c244a7aeaa7e4a72e1059ef38fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/4511088ee1cc3c244a7aeaa7e4a72e1059ef38fc/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 261, 2890, 4672, 775, 30, 1267, 273, 5378, 309, 365, 18, 9436, 310, 471, 365, 18, 4793, 30, 1267, 18, 6923, 7707, 18085, 310, 6134, 1327, 365, 18, 8537, 30, 1267, 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, 1001, 12715, 972, 261, 2890, 4672, 775, 30, 1267, 273, 5378, 309, 365, 18, 9436, 310, 471, 365, 18, 4793, 30, 1267, 18, 6923, 7707, 18085, 310, 6134, 1327, 365, 18, 8537, 30, 1267, 18,...
ttickers =[]
def InputCommands(self, line): try: if line[:1] != "/" or line[:2] == '//' or line[:4] == '/me ': if self.mucous.Spl["title"]: self.InputText(line) return #if line[:1] == "/" and line[:4] != "/me " and line[:2] != '//': c = line.split(" ", 1) command = c[0] if len(c) == 2: args = c[1] else: args = ""
26dbe1a474ca1eb4be6cd3829894f4165ccedfca /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8737/26dbe1a474ca1eb4be6cd3829894f4165ccedfca/MucousInput.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2741, 9127, 12, 2890, 16, 980, 4672, 775, 30, 309, 980, 10531, 21, 65, 480, 4016, 578, 980, 10531, 22, 65, 422, 19696, 578, 980, 10531, 24, 65, 422, 1173, 3501, 4290, 309, 365, 18, 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, 2741, 9127, 12, 2890, 16, 980, 4672, 775, 30, 309, 980, 10531, 21, 65, 480, 4016, 578, 980, 10531, 22, 65, 422, 19696, 578, 980, 10531, 24, 65, 422, 1173, 3501, 4290, 309, 365, 18, 8...
svg, boxes = drawGraph(
svg, bins = drawGraph(
def renderToPNG(request): import cairo if request.method == 'POST': # If the form has been submitted form = PlotForm(request.POST) # A form bound to the POST data if form.is_valid(): # All validation rules pass data = form.cleaned_data svg, boxes = drawGraph( data['x'], data['y'], data['x1'], data['y1'], data['attribute'], data['xProperty'], data['yProperty'], data['reference'], data['residue'], data['xBin'], data['yBin']) else: form = PlotForm() # An unbound form svg,boxes = drawGraph() width = 500 height = 500 response = HttpResponse(mimetype="image/png") response['Content-Disposition'] = 'attachment; filename="plot.png"' surface = cairo.ImageSurface (cairo.FORMAT_ARGB32, width, height) ctx = cairo.Context (surface) for rec in svg.rects: rect(rec, ctx) for action in svg.lines: line(action, ctx) surface.write_to_png(response) return response
ae7b5044f6598967bf2329294cb36e9a4c957da8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6163/ae7b5044f6598967bf2329294cb36e9a4c957da8/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 774, 23092, 12, 2293, 4672, 1930, 14503, 225, 309, 590, 18, 2039, 422, 296, 3798, 4278, 468, 971, 326, 646, 711, 2118, 9638, 646, 273, 15211, 1204, 12, 2293, 18, 3798, 13, 468, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1743, 774, 23092, 12, 2293, 4672, 1930, 14503, 225, 309, 590, 18, 2039, 422, 296, 3798, 4278, 468, 971, 326, 646, 711, 2118, 9638, 646, 273, 15211, 1204, 12, 2293, 18, 3798, 13, 468, 4...
if not os.path.isdir( local ): unpack_tarball( local, regression_root ) else: if b != 'boost': log( 'Renaming "%s" into "%s"' % ( local, boost_root ) ) os.rename( local, boost_root )
unpack_tarball( local, regression_root )
def regression( tag , local , runner , platform , user , comment , toolsets , bjam_options , bjam_toolset , pjl_toolset , incremental , monitored , timeout , mail = None , proxy = None , ftp_proxy = None , debug_level = 0 , args = [] ): try: mail_subject = 'Boost regression for %s on %s ' % ( tag, string.split(socket.gethostname(), '.')[0] ) start_time = time.localtime() if mail: log( 'Sending start notification to "%s"' % mail ) utils.send_mail( mail, mail_subject + ' started at %s.' % format_time( start_time ) ) if local is not None: log( 'Using local file "%s"' % local ) b = os.path.basename( local ) tag = b[ 0: b.find( '.' ) ] log( 'Tag: "%s"' % tag ) if not os.path.isdir( local ): unpack_tarball( local, regression_root ) else: if b != 'boost': log( 'Renaming "%s" into "%s"' % ( local, boost_root ) ) os.rename( local, boost_root ) else: if incremental: update_source( user, tag, proxy, [] ) else: cleanup( [] ) get_source( user, tag, proxy, [] ) setup( comment, toolsets, bjam_toolset, pjl_toolset, monitored, proxy, [] ) test( toolsets, bjam_options, monitored, timeout, [] ) collect_logs( tag, runner, platform, user, comment, incremental, [] ) upload_logs( tag, runner, user, ftp_proxy, debug_level ) update_itself() if mail: log( 'Sending report to "%s"' % mail ) end_time = time.localtime() utils.send_mail( mail , mail_subject + ' completed successfully at %s.' % format_time( end_time ) ) except: if mail: log( 'Sending report to "%s"' % mail ) msg = regression_log + [ '' ] + apply( traceback.format_exception, sys.exc_info() ) end_time = time.localtime() utils.send_mail( mail , mail_subject + ' failed at %s.' % format_time( end_time ) , '\n'.join( msg ) ) raise
cb3bf0e2aaf71156423e0967a9e6571cb015a2e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7959/cb3bf0e2aaf71156423e0967a9e6571cb015a2e5/regression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23215, 12, 1047, 269, 1191, 269, 8419, 269, 4072, 269, 729, 269, 2879, 269, 5226, 4424, 269, 324, 78, 301, 67, 2116, 269, 324, 78, 301, 67, 6738, 542, 269, 293, 78, 80, 67, 6738, 542...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23215, 12, 1047, 269, 1191, 269, 8419, 269, 4072, 269, 729, 269, 2879, 269, 5226, 4424, 269, 324, 78, 301, 67, 2116, 269, 324, 78, 301, 67, 6738, 542, 269, 293, 78, 80, 67, 6738, 542...
self.wfile.write('ERR: %s: %s\n' % (e.__class__, e.message) )
self.wfile.write('ERR 550 %s: %s\n' % (e.__class__, e.message) )
def handle(self): """The protocol:
1a05a1b9f78a5aa3d8397c7ea22705164c4038f6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9481/1a05a1b9f78a5aa3d8397c7ea22705164c4038f6/pyunoserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 4672, 3536, 1986, 1771, 30, 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, 0, 0,...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 4672, 3536, 1986, 1771, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def isLink(self, path):
def isLink(self, link):
def isLink(self, path): if type(link) == types.StringType: links = [link] elif type(link) == types.ListType: links = link else: return S_ERROR('LFCClient.isLink: Must supply a link list of link') failed = {} successful = {} # If we have less than three lfns to query a session doesn't make sense if len(links) > 2: self.__openSession() for link in links: fullLink = '%s%s' % (self.prefix,linkName) fstat = lfc.lfc_filestat() value = lfc.lfc_lstat(linkName,fstat) if value == 0: if S_ISLNK(fstat.filemode): successful[link] = True else: successful[link] = False else: errno = lfc.cvar.serrno failed[link] = lfc.sstrerror(errno) if self.session: self.__closeSession() resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict)
24878006a97fc6c0a40ff01095f00d930f79b1e6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/24878006a97fc6c0a40ff01095f00d930f79b1e6/LcgFileCatalogClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 2098, 12, 2890, 16, 1692, 4672, 309, 618, 12, 1232, 13, 422, 1953, 18, 780, 559, 30, 4716, 273, 306, 1232, 65, 1327, 618, 12, 1232, 13, 422, 1953, 18, 19366, 30, 4716, 273, 1692...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 353, 2098, 12, 2890, 16, 1692, 4672, 309, 618, 12, 1232, 13, 422, 1953, 18, 780, 559, 30, 4716, 273, 306, 1232, 65, 1327, 618, 12, 1232, 13, 422, 1953, 18, 19366, 30, 4716, 273, 1692...
return value
return b''.join(value)
def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left value = b""
bec1e84e67cccc1adf2ec6bf3eafa5f7bb15eaf8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/bec1e84e67cccc1adf2ec6bf3eafa5f7bb15eaf8/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 324, 3660, 2, 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, 1, 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, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 324, 3660, 2, -100, -100, -100, ...
shouldEnable = not Sharing.isShared (item)
renotify = Sharing.isShared (item)
def synchronizeItemDetail (self, item): # if the button should be visible, enable/disable if item is not None and self.shouldShow (item): if isinstance (item, ItemCollection.ItemCollection): # collection: label should read "Notify" label = "Notify" # disable this button if the collection is already shared try: shouldEnable = not Sharing.isShared (item) except AttributeError: shouldEnable = True else: if not shouldEnable: label = "Shared" # disable the button if no sharees try: sharees = item.sharees except AttributeError: sharees = [] shouldEnable = shouldEnable and len (sharees) > 0 else: # not a collection, so it's probably Mail label = "Send" shouldEnable = True try: dateSent = item.dateSent except AttributeError: dateSent = None if dateSent is not None: label = "Sent" shouldEnable = False self.widget.Enable (shouldEnable) self.widget.SetLabel (label) return super (SendShareButton, self).synchronizeItemDetail (item)
259b280b1e87e44c7d14d995a41f9c0098723889 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/259b280b1e87e44c7d14d995a41f9c0098723889/Detail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16978, 1180, 6109, 261, 2890, 16, 761, 4672, 468, 309, 326, 3568, 1410, 506, 6021, 16, 4237, 19, 8394, 309, 761, 353, 486, 599, 471, 365, 18, 13139, 5706, 261, 1726, 4672, 309, 1549, 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, 16978, 1180, 6109, 261, 2890, 16, 761, 4672, 468, 309, 326, 3568, 1410, 506, 6021, 16, 4237, 19, 8394, 309, 761, 353, 486, 599, 471, 365, 18, 13139, 5706, 261, 1726, 4672, 309, 1549, 2...
random_seed=None, use_mp=None, verbose3=False):
random_seed=None, use_mp=None, verbose3=False, forever=False):
def main(tests=None, testdir=None, verbose=0, quiet=False, exclude=False, single=False, randomize=False, fromfile=None, findleaks=False, use_resources=None, trace=False, coverdir='coverage', runleaks=False, huntrleaks=False, verbose2=False, print_slow=False, random_seed=None, use_mp=None, verbose3=False): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdir -- the directory in which to look for tests (optional) Users other than the Python test suite will certainly want to specify testdir; if it's omitted, the directory containing the Python test suite is searched for. If the tests argument is omitted, the tests listed on the command-line will be used. If that's empty, too, then all *.py files beginning with test_ will be used. The other default arguments (verbose, quiet, exclude, single, randomize, findleaks, use_resources, trace, coverdir, print_slow and random_seed) allow programmers calling main() directly to set the values that would normally be set by flags on the command line. """ test_support.record_original_stdout(sys.stdout) try: opts, args = getopt.getopt(sys.argv[1:], 'hvgqxsSrf:lu:t:TD:NLR:wWM:j:', ['help', 'verbose', 'verbose2', 'verbose3', 'quiet', 'exclude', 'single', 'slow', 'random', 'fromfile', 'findleaks', 'use=', 'threshold=', 'trace', 'coverdir=', 'nocoverdir', 'runleaks', 'huntrleaks=', 'memlimit=', 'randseed=', 'multiprocess=', 'slaveargs=']) except getopt.error, msg: usage(2, msg) # Defaults if random_seed is None: random_seed = random.randrange(10000000) if use_resources is None: use_resources = [] for o, a in opts: if o in ('-h', '--help'): usage(0) elif o in ('-v', '--verbose'): verbose += 1 elif o in ('-w', '--verbose2'): verbose2 = True elif o in ('-W', '--verbose3'): verbose3 = True elif o in ('-q', '--quiet'): quiet = True; verbose = 0 elif o in ('-x', '--exclude'): exclude = True elif o in ('-s', '--single'): single = True elif o in ('-S', '--slow'): print_slow = True elif o in ('-r', '--randomize'): randomize = True elif o == '--randseed': random_seed = int(a) elif o in ('-f', '--fromfile'): fromfile = a elif o in ('-l', '--findleaks'): findleaks = True elif o in ('-L', '--runleaks'): runleaks = True elif o in ('-t', '--threshold'): import gc gc.set_threshold(int(a)) elif o in ('-T', '--coverage'): trace = True elif o in ('-D', '--coverdir'): coverdir = os.path.join(os.getcwd(), a) elif o in ('-N', '--nocoverdir'): coverdir = None elif o in ('-R', '--huntrleaks'): huntrleaks = a.split(':') if len(huntrleaks) != 3: print a, huntrleaks usage(2, '-R takes three colon-separated arguments') if len(huntrleaks[0]) == 0: huntrleaks[0] = 5 else: huntrleaks[0] = int(huntrleaks[0]) if len(huntrleaks[1]) == 0: huntrleaks[1] = 4 else: huntrleaks[1] = int(huntrleaks[1]) if len(huntrleaks[2]) == 0: huntrleaks[2] = "reflog.txt" elif o in ('-M', '--memlimit'): test_support.set_memlimit(a) elif o in ('-u', '--use'): u = [x.lower() for x in a.split(',')] for r in u: if r == 'all': use_resources[:] = RESOURCE_NAMES continue remove = False if r[0] == '-': remove = True r = r[1:] if r not in RESOURCE_NAMES: usage(1, 'Invalid -u/--use option: ' + a) if remove: if r in use_resources: use_resources.remove(r) elif r not in use_resources: use_resources.append(r) elif o in ('-j', '--multiprocess'): use_mp = int(a) elif o == '--slaveargs': args, kwargs = json.loads(a) try: result = runtest(*args, **kwargs) except BaseException, e: result = INTERRUPTED, e.__class__.__name__ print # Force a newline (just in case) print json.dumps(result) sys.exit(0) if single and fromfile: usage(2, "-s and -f don't go together!") if use_mp and trace: usage(2, "-T and -j don't go together!") if use_mp and findleaks: usage(2, "-l and -j don't go together!") good = [] bad = [] skipped = [] resource_denieds = [] environment_changed = [] if findleaks: try: import gc except ImportError: print 'No GC available, disabling findleaks.' findleaks = False else: # Uncomment the line below to report garbage that is not # freeable by reference counting alone. By default only # garbage that is not collectable by the GC is reported. #gc.set_debug(gc.DEBUG_SAVEALL) found_garbage = [] if single: from tempfile import gettempdir filename = os.path.join(gettempdir(), 'pynexttest') try: fp = open(filename, 'r') next = fp.read().strip() tests = [next] fp.close() except IOError: pass if fromfile: tests = [] fp = open(fromfile) for line in fp: guts = line.split() # assuming no test has whitespace in its name if guts and not guts[0].startswith('#'): tests.extend(guts) fp.close() # Strip .py extensions. if args: args = map(removepy, args) if tests: tests = map(removepy, tests) stdtests = STDTESTS[:] nottests = NOTTESTS[:] if exclude: for arg in args: if arg in stdtests: stdtests.remove(arg) nottests[:0] = args args = [] tests = tests or args or findtests(testdir, stdtests, nottests) if single: tests = tests[:1] if randomize: random.seed(random_seed) print "Using random seed", random_seed random.shuffle(tests) if trace: import trace tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix], trace=False, count=True) test_times = [] test_support.use_resources = use_resources save_modules = sys.modules.keys() def accumulate_result(test, result): ok, test_time = result test_times.append((test_time, test)) if ok == PASSED: good.append(test) elif ok == FAILED: bad.append(test) elif ok == ENV_CHANGED: bad.append(test) environment_changed.append(test) elif ok == SKIPPED: skipped.append(test) elif ok == RESOURCE_DENIED: skipped.append(test) resource_denieds.append(test) if use_mp: from threading import Thread from Queue import Queue, Empty from subprocess import Popen, PIPE, STDOUT from collections import deque debug_output_pat = re.compile(r"\[\d+ refs\]$") pending = deque() output = Queue() for test in tests: args_tuple = ( (test, verbose, quiet, testdir), dict(huntrleaks=huntrleaks, use_resources=use_resources) ) pending.append((test, args_tuple)) def work(): # A worker thread. try: while True: try: test, args_tuple = pending.popleft() except IndexError: output.put((None, None, None, None)) return # -E is needed by some tests, e.g. test_import popen = Popen([sys.executable, '-E', '-m', 'test.regrtest', '--slaveargs', json.dumps(args_tuple)], stdout=PIPE, stderr=PIPE, universal_newlines=True, close_fds=True) stdout, stderr = popen.communicate() # Strip last refcount output line if it exists, since it # comes from the shutdown of the interpreter in the subcommand. stderr = debug_output_pat.sub("", stderr) stdout, _, result = stdout.strip().rpartition("\n") result = json.loads(result) if not quiet: stdout = test+'\n'+stdout output.put((test, stdout.rstrip(), stderr.rstrip(), result)) except BaseException: output.put((None, None, None, None)) raise workers = [Thread(target=work) for i in range(use_mp)] for worker in workers: worker.start() finished = 0 while finished < use_mp: test, stdout, stderr, result = output.get() if test is None: finished += 1 continue if stdout: print stdout if stderr: print >>sys.stderr, stderr if result[0] == INTERRUPTED: assert result[1] == 'KeyboardInterrupt' pending.clear() raise KeyboardInterrupt # What else? accumulate_result(test, result) for worker in workers: worker.join() else: for test in tests: if not quiet: print test sys.stdout.flush() if trace: # If we're tracing code coverage, then we don't exit with status # if on a false return value from main. tracer.runctx('runtest(test, verbose, quiet, testdir)', globals=globals(), locals=vars()) else: try: result = runtest(test, verbose, quiet, testdir, huntrleaks) accumulate_result(test, result) if verbose3 and result[0] == FAILED: print "Re-running test %r in verbose mode" % test runtest(test, True, quiet, testdir, huntrleaks) except KeyboardInterrupt: # print a newline separate from the ^C print break except: raise if findleaks: gc.collect() if gc.garbage: print "Warning: test created", len(gc.garbage), print "uncollectable object(s)." # move the uncollectable objects somewhere so we don't see # them again found_garbage.extend(gc.garbage) del gc.garbage[:] # Unload the newly imported modules (best effort finalization) for module in sys.modules.keys(): if module not in save_modules and module.startswith("test."): test_support.unload(module) # The lists won't be sorted if running with -r good.sort() bad.sort() skipped.sort() environment_changed.sort() if good and not quiet: if not bad and not skipped and len(good) > 1: print "All", print count(len(good), "test"), "OK." if print_slow: test_times.sort(reverse=True) print "10 slowest tests:" for time, test in test_times[:10]: print "%s: %.1fs" % (test, time) if bad: bad = set(bad) - set(environment_changed) if bad: print count(len(bad), "test"), "failed:" printlist(bad) if environment_changed: print "{} altered the execution environment:".format( count(len(environment_changed), "test")) printlist(environment_changed) if skipped and not quiet: print count(len(skipped), "test"), "skipped:" printlist(skipped) e = _ExpectedSkips() plat = sys.platform if e.isvalid(): surprise = set(skipped) - e.getexpected() - set(resource_denieds) if surprise: print count(len(surprise), "skip"), \ "unexpected on", plat + ":" printlist(surprise) else: print "Those skips are all expected on", plat + "." else: print "Ask someone to teach regrtest.py about which tests are" print "expected to get skipped on", plat + "." if verbose2 and bad: print "Re-running failed tests in verbose mode" for test in bad: print "Re-running test %r in verbose mode" % test sys.stdout.flush() try: test_support.verbose = True ok = runtest(test, True, quiet, testdir, huntrleaks) except KeyboardInterrupt: # print a newline separate from the ^C print break except: raise if single: alltests = findtests(testdir, stdtests, nottests) for i in range(len(alltests)): if tests[0] == alltests[i]: if i == len(alltests) - 1: os.unlink(filename) else: fp = open(filename, 'w') fp.write(alltests[i+1] + '\n') fp.close() break else: os.unlink(filename) if trace: r = tracer.results() r.write_results(show_missing=True, summary=True, coverdir=coverdir) if runleaks: os.system("leaks %d" % os.getpid()) sys.exit(len(bad) > 0)
105f0d7e51a424a7529837f5f84b9f0110141e58 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/105f0d7e51a424a7529837f5f84b9f0110141e58/regrtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 16341, 33, 7036, 16, 1842, 1214, 33, 7036, 16, 3988, 33, 20, 16, 10902, 33, 8381, 16, 4433, 33, 8381, 16, 2202, 33, 8381, 16, 2744, 554, 33, 8381, 16, 628, 768, 33, 7036, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16341, 33, 7036, 16, 1842, 1214, 33, 7036, 16, 3988, 33, 20, 16, 10902, 33, 8381, 16, 4433, 33, 8381, 16, 2202, 33, 8381, 16, 2744, 554, 33, 8381, 16, 628, 768, 33, 7036, ...
feed.Feed.get_directory_feed().update()
messages.UpdateFeed(feed.Feed.get_directory_feed().id).send_to_backend()
def handle_change_movies_directory(self, message): old_path = config.get(prefs.MOVIES_DIRECTORY) config.set(prefs.MOVIES_DIRECTORY, message.path) if message.migrate: self._migrate(old_path, message.path) feed.Feed.get_directory_feed().update()
3fa984486bfba3729c40ff24b0ae0af108c75b8f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/3fa984486bfba3729c40ff24b0ae0af108c75b8f/messagehandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 3427, 67, 8683, 29028, 67, 5149, 12, 2890, 16, 883, 4672, 1592, 67, 803, 273, 642, 18, 588, 12, 1484, 2556, 18, 5980, 4136, 3991, 67, 17229, 13, 642, 18, 542, 12, 1484, 255...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1640, 67, 3427, 67, 8683, 29028, 67, 5149, 12, 2890, 16, 883, 4672, 1592, 67, 803, 273, 642, 18, 588, 12, 1484, 2556, 18, 5980, 4136, 3991, 67, 17229, 13, 642, 18, 542, 12, 1484, 255...
rows = self.api.db.selectall("SELECT is_blacklisted from keys" \ " WHERE key = '%s'" % key) if rows: raise PLCInvalidArgument, "Key is blacklisted"
def validate_key(self, key):
6a15f46cfce003d21ee8ba0bee213df66250e60e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/6a15f46cfce003d21ee8ba0bee213df66250e60e/Keys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 856, 12, 2890, 16, 498, 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, 0, 0, 0...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 856, 12, 2890, 16, 498, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
m=Variable(v)*m
m=Monomial(Variable(v))*m
def used_vars_set(l): m=Monomial() s=set() for p in l: s.update(Polynomial(p).vars()) for v in reversed(list(s)): m=Variable(v)*m return m
fcaec7806ee160fcce960e6df003edfa8c0d6c94 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2046/fcaec7806ee160fcce960e6df003edfa8c0d6c94/statistics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1399, 67, 4699, 67, 542, 12, 80, 4672, 312, 33, 49, 4708, 649, 1435, 272, 33, 542, 1435, 364, 293, 316, 328, 30, 272, 18, 2725, 12, 5850, 13602, 12, 84, 2934, 4699, 10756, 364, 331, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1399, 67, 4699, 67, 542, 12, 80, 4672, 312, 33, 49, 4708, 649, 1435, 272, 33, 542, 1435, 364, 293, 316, 328, 30, 272, 18, 2725, 12, 5850, 13602, 12, 84, 2934, 4699, 10756, 364, 331, ...
r=self.dom.selection.createRange().duplicate() r.expand("textedit") text=r.text if text: return text[start:end] else: return ""
r=self.getDomRange(start,end) return r.text
def text_getText(self,start=None,end=None): if not hasattr(self,'dom'): return "\0" start=start if isinstance(start,int) else 0 end=end if isinstance(end,int) else self.text_characterCount #audio.speakMessage("get text: %s, %s"%(start,end)) r=self.dom.selection.createRange().duplicate() r.expand("textedit") text=r.text if text: return text[start:end] else: return ""
90a084c222e7b3326427ec737459e1a5cf85337f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/90a084c222e7b3326427ec737459e1a5cf85337f/MSHTML.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 977, 67, 588, 1528, 12, 2890, 16, 1937, 33, 7036, 16, 409, 33, 7036, 4672, 309, 486, 3859, 12, 2890, 11189, 9859, 11, 4672, 327, 1548, 20, 6, 787, 33, 1937, 309, 1549, 12, 1937, 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, 977, 67, 588, 1528, 12, 2890, 16, 1937, 33, 7036, 16, 409, 33, 7036, 4672, 309, 486, 3859, 12, 2890, 11189, 9859, 11, 4672, 327, 1548, 20, 6, 787, 33, 1937, 309, 1549, 12, 1937, 16, ...
dcctype = data[0].upper() if dcctype in ('RESUME', 'ACCEPT'): handler = getattr(self, 'dcc_SEND_' + dcctype, None) data.pop() handler(user, channel, data) return
def dcc_SEND(self, user, channel, data): # Use splitQuoted for those who send files with spaces in the names. data = text.splitQuoted(data) if len(data) < 3: raise IRCBadMessage, "malformed DCC SEND request: %r" % (data,)
405f675c0888e3a2152daa3543f83dc794ec7c0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/405f675c0888e3a2152daa3543f83dc794ec7c0b/irc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 302, 952, 67, 21675, 12, 2890, 16, 729, 16, 1904, 16, 501, 4672, 468, 2672, 1416, 15919, 364, 5348, 10354, 1366, 1390, 598, 7292, 316, 326, 1257, 18, 501, 273, 977, 18, 4939, 15919, 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, 302, 952, 67, 21675, 12, 2890, 16, 729, 16, 1904, 16, 501, 4672, 468, 2672, 1416, 15919, 364, 5348, 10354, 1366, 1390, 598, 7292, 316, 326, 1257, 18, 501, 273, 977, 18, 4939, 15919, 12...
'project_id': (p.sale_id and p.sale_id.project_id.id) or False,
def action_invoice_create(self, cr, uid, ids, journal_id=False, group=False, type='out_invoice', context={}): res={} pgroup = {} get_ids = lambda y: map(lambda x: x.id, y or []) sales = {} for p in self.browse(cr,uid,ids, context): if p.invoice_state<>'2binvoiced': continue a = p.address_id.partner_id.property_account_receivable[0] if p.address_id.partner_id and p.address_id.partner_id.property_payment_term: pay_term = p.address_id.partner_id.property_payment_term[0] else: pay_term = False
9ec96273418d6a3b43b5985f1fba755aca007e6e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/9ec96273418d6a3b43b5985f1fba755aca007e6e/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 16119, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 13001, 67, 350, 33, 8381, 16, 1041, 33, 8381, 16, 618, 2218, 659, 67, 16119, 2187, 819, 12938, 4672, 400, 12938, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1301, 67, 16119, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 13001, 67, 350, 33, 8381, 16, 1041, 33, 8381, 16, 618, 2218, 659, 67, 16119, 2187, 819, 12938, 4672, 400, 12938, ...
self._writer.whole_element('th', name, {'class': row_status})
self._writer.element('th', name, {'class': row_status})
def _write_start_of_s_or_t_row(self, name, value): row_status = self._get_row_status(value) self._writer.whole_element('th', name, {'class': row_status})
9cdb508010da4366326649ba4d0a07a65263ab66 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7408/9cdb508010da4366326649ba4d0a07a65263ab66/robotdiff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 1937, 67, 792, 67, 87, 67, 280, 67, 88, 67, 492, 12, 2890, 16, 508, 16, 460, 4672, 1027, 67, 2327, 273, 365, 6315, 588, 67, 492, 67, 2327, 12, 1132, 13, 365, 6315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2626, 67, 1937, 67, 792, 67, 87, 67, 280, 67, 88, 67, 492, 12, 2890, 16, 508, 16, 460, 4672, 1027, 67, 2327, 273, 365, 6315, 588, 67, 492, 67, 2327, 12, 1132, 13, 365, 6315, ...
links = self.getLinksFromOb(ob, properties)
links = self.getLinksFromOb(object_checked, properties)
def processObject(self, properties=[], context=''): """For the object obtained from context with unrestrictedTraverse: - gets all specified properties - parse the content of each property and extract links - save results into a dictionary like {'obj_url':[list_of_links]} """ object_checked = self.unrestrictedTraverse(context, None) if object_checked is None: return {}, 0 links = self.getLinksFromOb(ob, properties) return dict((object_checked.absolute_url(1), links)), len(links)
11f355fee61039545d9022fec18215051d65c387 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/11f355fee61039545d9022fec18215051d65c387/LinkChecker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 921, 12, 2890, 16, 1790, 22850, 6487, 819, 2218, 11, 4672, 3536, 1290, 326, 733, 12700, 628, 819, 598, 640, 29306, 29654, 30, 300, 5571, 777, 1269, 1790, 300, 1109, 326, 913, 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, 1207, 921, 12, 2890, 16, 1790, 22850, 6487, 819, 2218, 11, 4672, 3536, 1290, 326, 733, 12700, 628, 819, 598, 640, 29306, 29654, 30, 300, 5571, 777, 1269, 1790, 300, 1109, 326, 913, 434, ...
summary = description = reading_ins = ""
summary = description = reading_ins = reading_del = ""
def readPkgSummDesc(self, entryname): summary = description = reading_ins = "" if self._pkgdescfile and self._pkgoffsets.has_key(entryname): self._descfile.seek((self._pkgoffsets[entryname] + 1)) summary = self._descfile.readline()[5:-1] description = "" while 1: line = self._descfile.readline() if line.startswith("##--"): break if line.startswith("-Ins"): reading_ins = False continue if line.startswith("+Ins:") or reading_ins == True: reading_ins = True continue if line.startswith("+Des:") or line.startswith("<!--"): continue if not line or line[:-1] == "-Des:": break for wline in wrap(line, 76): description = description + "\n" + wline description = sub('<li>', '* ', description) description = self.stripTags(description) # Wrapping the text added an extra lf as the first char return summary, description[1:]
010589a3c38ed05c5b1da69184609623a64cd829 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/010589a3c38ed05c5b1da69184609623a64cd829/yast2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 11264, 3495, 81, 4217, 12, 2890, 16, 1241, 529, 4672, 4916, 273, 2477, 273, 6453, 67, 2679, 273, 6453, 67, 3771, 273, 1408, 309, 365, 6315, 10657, 5569, 768, 471, 365, 6315, 10657, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 855, 11264, 3495, 81, 4217, 12, 2890, 16, 1241, 529, 4672, 4916, 273, 2477, 273, 6453, 67, 2679, 273, 6453, 67, 3771, 273, 1408, 309, 365, 6315, 10657, 5569, 768, 471, 365, 6315, 10657, ...
type, \
mtype, \
def message_dialog(parent, msg, type = gtk.MESSAGE_ERROR, buttons = gtk.BUTTONS_OK): """Convenience wrapper for gtk.MessageDialog""" dialog = gtk.MessageDialog(parent, \ gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, \ type, \ buttons, \ msg) resp = dialog.run() dialog.destroy() return resp
ad18e832640c57acb960baf22e4861a597c9c775 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7853/ad18e832640c57acb960baf22e4861a597c9c775/GuiBasic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 883, 67, 12730, 12, 2938, 16, 1234, 16, 618, 273, 22718, 18, 8723, 67, 3589, 16, 9502, 273, 22718, 18, 20068, 55, 67, 3141, 4672, 3536, 14700, 4053, 364, 22718, 18, 1079, 6353, 8395, 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, 883, 67, 12730, 12, 2938, 16, 1234, 16, 618, 273, 22718, 18, 8723, 67, 3589, 16, 9502, 273, 22718, 18, 20068, 55, 67, 3141, 4672, 3536, 14700, 4053, 364, 22718, 18, 1079, 6353, 8395, 2...
print " ... problem sending the query : %s" % (args,)
print " ... problem sending the query : %s" % failure.getTraceback()
def sendQueryProblem(self, *args): """Politely displays any problem (bug, unavailability) related to an attempt to send a query. """ print " ... problem sending the query : %s" % (args,)
a551c32508c3dbec03b97e186e50fe9fd85cd482 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2259/a551c32508c3dbec03b97e186e50fe9fd85cd482/p2pquerier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 1138, 13719, 12, 2890, 16, 380, 1968, 4672, 3536, 5850, 25818, 22461, 1281, 6199, 261, 925, 16, 640, 24318, 13, 3746, 358, 392, 4395, 358, 1366, 279, 843, 18, 3536, 1172, 315, 1372...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 1138, 13719, 12, 2890, 16, 380, 1968, 4672, 3536, 5850, 25818, 22461, 1281, 6199, 261, 925, 16, 640, 24318, 13, 3746, 358, 392, 4395, 358, 1366, 279, 843, 18, 3536, 1172, 315, 1372...
self.logger.warning("Error, reception of unexpected SUGGEST message from peer '%s':\n%s != %s" % (str(args.id_), self.jump_near_address.ToString(), args.address.ToString()))
self.logger.warning("Error, reception of unexpected SUGGEST message from peer '%s' at address '%s'" % (str(args.id_), args.address.ToString()))
def peer_SUGGEST(self, args): """ A peer answers a position suggestion in response to a JUMPNEAR message. """ # Instantiate the target peer if self.jump_near_address is None or self.jump_near_address != args.address: self.logger.warning("Error, reception of unexpected SUGGEST message from peer '%s':\n%s != %s" % (str(args.id_), self.jump_near_address.ToString(), args.address.ToString())) return peer = self._Peer(args) self.jump_near_address = None self.jump_near_position = None
1c5ae9cc06814305ac48e199b672abdd078c077c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2522/1c5ae9cc06814305ac48e199b672abdd078c077c/statemachine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4261, 67, 6639, 43, 27332, 12, 2890, 16, 833, 4672, 3536, 432, 4261, 12415, 279, 1754, 19715, 316, 766, 358, 279, 804, 23942, 5407, 985, 883, 18, 3536, 468, 26492, 326, 1018, 4261, 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, 4261, 67, 6639, 43, 27332, 12, 2890, 16, 833, 4672, 3536, 432, 4261, 12415, 279, 1754, 19715, 316, 766, 358, 279, 804, 23942, 5407, 985, 883, 18, 3536, 468, 26492, 326, 1018, 4261, 309, ...
child = popen2.Popen4(cmd)
child = popen2.Popen3(cmd, capturestderr=True)
def runCommand(cmd, force_command=False): if replace_command and not force_command: try: filename = lookupCommand(cmd) except Exception, e: print >> sys.stderr, e return runCommand(cmd, force_command=True) return open(os.path.expandvars("$VDT_LOCATION/test/command_output/%s" \ % filename)) else: child = popen2.Popen4(cmd) exitStatus = child.wait() stdouterr = child.fromchild if exitStatus: raise RuntimeError(stdouterr.readlines()) return stdouterr
4662a1f164dc2d01d7cfc393267effd63adff362 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12088/4662a1f164dc2d01d7cfc393267effd63adff362/gip_testing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31933, 12, 4172, 16, 2944, 67, 3076, 33, 8381, 4672, 309, 1453, 67, 3076, 471, 486, 2944, 67, 3076, 30, 775, 30, 1544, 273, 3689, 2189, 12, 4172, 13, 1335, 1185, 16, 425, 30, 1172, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 31933, 12, 4172, 16, 2944, 67, 3076, 33, 8381, 4672, 309, 1453, 67, 3076, 471, 486, 2944, 67, 3076, 30, 775, 30, 1544, 273, 3689, 2189, 12, 4172, 13, 1335, 1185, 16, 425, 30, 1172, 1...
sys.argv = args[:1]
sys.argv = args
def main(args=sys.argv): from calibre.constants import debug debug() opts, args = option_parser().parse_args(args) if opts.gui: from calibre.gui2.main import main main(['calibre']) elif opts.command: sys.argv = args[:1] exec opts.command elif opts.exec_file: sys.argv = args[:1] base = os.path.dirname(os.path.abspath(opts.exec_file)) sys.path.insert(0, base) g = globals() g['__name__'] = '__main__' execfile(opts.exec_file, g) elif opts.debug_device_driver: debug_device_driver() elif opts.migrate: if len(args) < 3: print 'You must specify the path to library1.db and the path to the new library folder' return 1 migrate(args[1], args[2]) elif opts.add_simple_plugin is not None: add_simple_plugin(opts.add_simple_plugin) elif opts.paths: prints('CALIBRE_RESOURCES_PATH='+sys.resources_location) prints('CALIBRE_EXTENSIONS_PATH='+sys.extensions_location) prints('CALIBRE_PYTHON_PATH='+os.pathsep.join(sys.path)) elif opts.pdfreflow: from calibre.ebooks.pdf.reflow import option_parser as px, run from calibre.utils.logging import default_log opts2, args = px().parse_args(['xxxx', '-vvvv', opts.pdfreflow]) run(opts2, opts.pdfreflow, default_log) elif opts.develop_from is not None: develop_from(opts.develop_from) else: from calibre import ipython ipython() return 0
9ab452eb678c967eb50121f342401024f50205b8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/9ab452eb678c967eb50121f342401024f50205b8/debug.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1968, 33, 9499, 18, 19485, 4672, 628, 26139, 266, 18, 13358, 1930, 1198, 1198, 1435, 1500, 16, 833, 273, 1456, 67, 4288, 7675, 2670, 67, 1968, 12, 1968, 13, 309, 1500, 18, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1968, 33, 9499, 18, 19485, 4672, 628, 26139, 266, 18, 13358, 1930, 1198, 1198, 1435, 1500, 16, 833, 273, 1456, 67, 4288, 7675, 2670, 67, 1968, 12, 1968, 13, 309, 1500, 18, 20...
if ppath.endswith("/"): path = ppath + path else:
if ppath:
def ImportBom(bompath, c): """ Imports package data into our internal package database using a combination of the bom file and data in Apple's package database into our internal package database. """ # If we completely trusted the accuracy of Apple's database, we wouldn't # need the bom files, but in my enviroment at least, the bom files are # a better indicator of what flat packages have actually been installed # on the current machine. We still need to consult Apple's package database # because the bom files are missing metadata about the package. applepkgdb = "/Library/Receipts/db/a.receiptdb" pkgname = os.path.basename(bompath) timestamp = os.stat(bompath).st_mtime owner = 0 pkgid = os.path.splitext(pkgname)[0] vers = "1.0" ppath = "./" #try to get metadata from applepkgdb p = subprocess.Popen(["/usr/sbin/pkgutil", "--pkg-info-plist", pkgid], bufsize=1, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (plist, err) = p.communicate() if plist: pl = FoundationPlist.readPlistFromString(plist) if "install-location" in pl: ppath = pl["install-location"] if "pkg-version" in pl: vers = pl["pkg-version"] if "install-time" in pl: timestamp = pl["install-time"] t = (timestamp, owner, pkgid, vers, ppath, pkgname) c.execute('INSERT INTO pkgs (timestamp, owner, pkgid, vers, ppath, pkgname) values (?, ?, ?, ?, ?, ?)', t) pkgkey = c.lastrowid cmd = ["/usr/bin/lsbom", bompath] p = subprocess.Popen(cmd, shell=False, bufsize=1, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) while True: line = p.stdout.readline().decode('UTF-8') if not line and (p.poll() != None): break item = line.rstrip("\n").split("\t") path = item[0] perms = item[1] uidgid = item[2].split("/") uid = uidgid[0] gid = uidgid[1] if path != ".": # special case for MS Office 2008 installers if ppath == "./tmp/com.microsoft.updater/office_location/": ppath = "./Applications/" #prepend the ppath so the paths match the actual install locations path = path.lstrip("./") if ppath.endswith("/"): path = ppath + path else: path = ppath + "/" + path path = path.lstrip("./") t = (path, ) row = c.execute('SELECT path_key from paths where path = ?', t).fetchone() if not row: c.execute('INSERT INTO paths (path) values (?)', t) pathkey = c.lastrowid else: pathkey = row[0] t = (pkgkey, pathkey, uid, gid, perms) c.execute('INSERT INTO pkgs_paths (pkg_key, path_key, uid, gid, perms) values (?, ?, ?, ?, ?)', t)
96251a968e0781e9c0abf1580bd271f1c0e663d9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6241/96251a968e0781e9c0abf1580bd271f1c0e663d9/removepackages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6164, 38, 362, 12, 70, 362, 803, 16, 276, 4672, 3536, 2221, 4363, 2181, 501, 1368, 3134, 2713, 2181, 2063, 1450, 279, 10702, 434, 326, 28626, 585, 471, 501, 316, 1716, 1802, 1807, 2181, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6164, 38, 362, 12, 70, 362, 803, 16, 276, 4672, 3536, 2221, 4363, 2181, 501, 1368, 3134, 2713, 2181, 2063, 1450, 279, 10702, 434, 326, 28626, 585, 471, 501, 316, 1716, 1802, 1807, 2181, ...
os.mkdir(dst)
os.makedirs(dst) copystat(src, dst)
def copytree(src, dst, symlinks=False): """Recursively copy a directory tree using copy2(). The destination directory must not already exist. If exception(s) occur, an Error is raised with a list of reasons. If the optional symlinks flag is true, symbolic links in the source tree result in symbolic links in the destination tree; if it is false, the contents of the files pointed to by symbolic links are copied. XXX Consider this example code rather than the ultimate tool. """ names = os.listdir(src) os.mkdir(dst) errors = [] for name in names: srcname = os.path.join(src, name) dstname = os.path.join(dst, name) try: if symlinks and os.path.islink(srcname): linkto = os.readlink(srcname) os.symlink(linkto, dstname) elif os.path.isdir(srcname): copytree(srcname, dstname, symlinks) else: copy2(srcname, dstname) # XXX What about devices, sockets etc.? except (IOError, os.error), why: errors.append((srcname, dstname, why)) if errors: raise Error, errors
6e3a48ed54ca45e6e2db8f829e44f8b6e18c7e29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/6e3a48ed54ca45e6e2db8f829e44f8b6e18c7e29/shutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 3413, 12, 4816, 16, 3046, 16, 23146, 33, 8381, 4672, 3536, 12474, 1610, 279, 1867, 2151, 1450, 1610, 22, 7675, 225, 1021, 2929, 1867, 1297, 486, 1818, 1005, 18, 971, 1520, 12, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1610, 3413, 12, 4816, 16, 3046, 16, 23146, 33, 8381, 4672, 3536, 12474, 1610, 279, 1867, 2151, 1450, 1610, 22, 7675, 225, 1021, 2929, 1867, 1297, 486, 1818, 1005, 18, 971, 1520, 12, 87, ...
|(?P<white>(?:(?:\s|\ufeff)(?<!\n))+)
|(?P<white> (?:(?:\s|\ufeff)(?<!\n))+)
def __init__(self, stream): super(Scanner, self).__init__(stream) self.next_start = 0
f88b035e0abeb883d651dd462b67105b5bdee354 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/f88b035e0abeb883d651dd462b67105b5bdee354/Scanner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1407, 4672, 2240, 12, 11338, 16, 365, 2934, 972, 2738, 972, 12, 3256, 13, 365, 18, 4285, 67, 1937, 273, 374, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1407, 4672, 2240, 12, 11338, 16, 365, 2934, 972, 2738, 972, 12, 3256, 13, 365, 18, 4285, 67, 1937, 273, 374, 2, -100, -100, -100, -100, -100, -100, -100,...
text = pywikibot.replaceExcept(text, str(i), u'٠١٢٣٤٥٦٧٨٩'[i], exceptions)
text = pywikibot.replaceExcept(text, str(i), u'٠١٢٣٤٥٦٧٨٩'[i], exceptions)
def fixArabicLetters(self, text): if self.site.lang=='ckb' or self.site.lang=='fa': exceptions = [ 'gallery', 'hyperlink', 'interwiki', # but changes letters inside wikilinks #'link', 'math', 'pre', 'template', 'timeline', 'ref', 'source', 'startspace', 'inputbox', ] # do not change inside file links namespaces = list(self.site.namespace(6, all = True)) pattern = re.compile(u'\[\[(' + '|'.join(namespaces) + '):.+?\..+?\]\]', re.UNICODE) exceptions.append(pattern) text = pywikibot.replaceExcept(text, u',', u'،', exceptions) if self.site.lang=='ckb': text = pywikibot.replaceExcept(text, ur'ه([.،_<\]\s])', ur'ە\1', exceptions) text = pywikibot.replaceExcept(text, u'ه‌', u'ە', exceptions) text = pywikibot.replaceExcept(text, u'ه', u'ھ', exceptions) text = pywikibot.replaceExcept(text, u'ك', u'ک', exceptions) text = pywikibot.replaceExcept(text, ur'[ىي]', u'ی', exceptions) # replace persian digits for i in range(0,10): if self.site.lang=='ckb': text = pywikibot.replaceExcept(text, u'۰۱۲۳۴۵۶۷۸۹'[i], u'٠١٢٣٤٥٦٧٨٩'[i], exceptions) else: text = pywikibot.replaceExcept(text, u'٠١٢٣٤٥٦٧٨٩'[i], u'۰۱۲۳۴۵۶۷۸۹'[i], exceptions) text = pywikibot.replaceExcept(text, u'0123456789'[i], u'۰۱۲۳۴۵۶۷۸۹'[i], exceptions) # do not change digits in class, style and table params pattern = re.compile(u'=".*?"', re.UNICODE) exceptions.append(pattern) # do not change digits inside html-tags pattern = re.compile(u'<[/]*?[^</]+?[/]*?>', re.UNICODE) exceptions.append(pattern) exceptions.append('table') #exclude tables for now for i in range(0,10): if self.site.lang=='ckb': text = pywikibot.replaceExcept(text, str(i), u'٠١٢٣٤٥٦٧٨٩'[i], exceptions) else: text = pywikibot.replaceExcept(text, str(i), u'۰۱۲۳۴۵۶۷۸۹'[i], exceptions) return text
58d3daae8615ef1513350cc21247d413ef111873 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/58d3daae8615ef1513350cc21247d413ef111873/cosmetic_changes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 37, 20727, 335, 24181, 5432, 12, 2890, 16, 977, 4672, 309, 365, 18, 4256, 18, 4936, 18920, 363, 70, 11, 578, 365, 18, 4256, 18, 4936, 18920, 507, 4278, 4798, 273, 306, 296, 21454...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2917, 37, 20727, 335, 24181, 5432, 12, 2890, 16, 977, 4672, 309, 365, 18, 4256, 18, 4936, 18920, 363, 70, 11, 578, 365, 18, 4256, 18, 4936, 18920, 507, 4278, 4798, 273, 306, 296, 21454...
self._debug(NIGHTMARE, "JS: del", `name`, "from", `tag`)
def jsStartElement (self, tag, attrs): """Check popups for onmouseout and onmouseover. Inline extern javascript sources""" changed = 0 self.js_src = None self.js_output = 0 self.js_popup = 0 for name in ('onmouseover', 'onmouseout'): if attrs.has_key(name) and self.jsPopup(attrs, name): self._debug(NIGHTMARE, "JS: del", `name`, "from", `tag`) del attrs[name] changed = 1 if tag=='form': name = attrs.get('name', attrs.get('id')) self.jsForm(name, attrs.get('action', ''), attrs.get('target', '')) elif tag=='script': lang = attrs.get('language', '').lower() url = attrs.get('src', '') scrtype = attrs.get('type', '').lower() is_js = scrtype=='text/javascript' or \ lang.startswith('javascript') or \ not (lang or scrtype) if is_js and url: return self.jsScriptSrc(url, lang) self.buf.append([STARTTAG, tag, attrs])
2235a065dd104f9a4252037ab7cb36681acd5b89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/2235a065dd104f9a4252037ab7cb36681acd5b89/HtmlParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3828, 1685, 1046, 261, 2890, 16, 1047, 16, 3422, 4672, 3536, 1564, 10431, 87, 364, 603, 11697, 659, 471, 603, 11697, 1643, 18, 16355, 18885, 11341, 5550, 8395, 3550, 273, 374, 365, 18, 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, 3828, 1685, 1046, 261, 2890, 16, 1047, 16, 3422, 4672, 3536, 1564, 10431, 87, 364, 603, 11697, 659, 471, 603, 11697, 1643, 18, 16355, 18885, 11341, 5550, 8395, 3550, 273, 374, 365, 18, 2...
return self.tk.call(self._w, 'entrycget', '-' + option)
return self.tk.call(self._w, 'entrycget', index, '-' + option)
def entrycget(self, index, option): return self.tk.call(self._w, 'entrycget', '-' + option)
6b09d018d485cb74cf8a3a10aa38b03b7ddc7d13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6b09d018d485cb74cf8a3a10aa38b03b7ddc7d13/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1241, 71, 588, 12, 2890, 16, 770, 16, 1456, 4672, 327, 365, 18, 16099, 18, 1991, 12, 2890, 6315, 91, 16, 296, 4099, 71, 588, 2187, 4014, 397, 1456, 13, 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, 1241, 71, 588, 12, 2890, 16, 770, 16, 1456, 4672, 327, 365, 18, 16099, 18, 1991, 12, 2890, 6315, 91, 16, 296, 4099, 71, 588, 2187, 4014, 397, 1456, 13, 2, -100, -100, -100, -100, -10...
if ((c & 0x0F) == 13):
if is_card_king(c):
def shlomif_main(args): print_ts = 0 if (args[1] == "-t"): print_ts = 1 args.pop(0) game_num = long(args[1]) if (len(args) >= 3): which_game = args[2] else: which_game = "freecell" if ((which_game == "der_katz") or (which_game == "der_katzenschwantz") or (which_game == "die_schlange") or (which_game == "gypsy")): orig_cards = createCards(2) else: orig_cards = createCards() if game_num <= 32000: r = LCRandom31() r.setSeed(game_num) fcards = [] if (len(orig_cards) == 52): for i in range(13): for j in (0, 39, 26, 13): fcards.append(orig_cards[i + j]) orig_cards = fcards r.shuffle(orig_cards) else: r = LCRandom64() r.setSeed(game_num) r.shuffle(orig_cards) cards = [] for i in range(len(orig_cards)): cards.append(orig_cards[len(orig_cards)-i-1]) if ((which_game == "der_katz") or (which_game == "der_katzenschwantz") or (which_game == "die_schlange")): if (which_game == "die_schlange"): print "Foundations: H-A S-A D-A C-A H-A S-A D-A C-A" output = "" for card in cards: if ((card & 0x0F) == 13): print output output = "" if (not((which_game == "die_schlange") and ((card & 0x0F) == 1))): if (output != ""): output = output + " " output = output + card_to_string(card, 1, print_ts) print output elif ((which_game == "freecell") or (which_game == "forecell") or (which_game == "bakers_game") or (which_game == "ko_bakers_game") or (which_game == "kings_only_bakers_game") or (which_game == "relaxed_freecell") or (which_game == "eight_off")): output = range(9) for i in range(9): output[i] = "" if ((which_game == "forecell") or (which_game == "eight_off")): output[8] = "FC: "; for i in range(52): if (i < 48): output[i%8] = output[i%8] + card_to_string(cards[i], (i>=48-8), print_ts) else: if (which_game == "forecell"): output[8] = output[8] + card_to_string(cards[i], (i == 52), print_ts) else: output[8] = output[8] + card_to_string(cards[i], 0, print_ts) + "-" if (i != 52): output[8] = output[8] + " " else: for i in range(52): output[i%8] = output[i%8] + card_to_string(cards[i], (i>=52-8), print_ts) if ((which_game == "forecell") or (which_game == "eight_off")): print output[8] for i in range(8): print output[i] elif ((which_game == "seahaven_towers") or (which_game == "seahaven") or (which_game == "relaxed_seahaven") or (which_game == "relaxed_seahaven_towers")): output = range(11); for i in range(11): output[i] = "" output[10] = "FC: - " for i in range(52): if (i < 50): output[i%10] = output[i%10] + card_to_string(cards[i], (i>=50-10), print_ts) else: output[10] = output[10] + card_to_string(cards[i], (i == 52-1), print_ts) print output[10] for i in range(10): print output[i] elif (which_game == "bakers_dozen"): i, n = 0, 13 kings = [] for c in cards: if ((c & 0x0F) == 13): kings.append(i) i = i + 1 for i in kings: j = i % n while j < i: if ((cards[j] & 0x0F) != 13): print "Performed Swap" cards[i], cards[j] = cards[j], cards[i] break j = j + n cards.reverse() output = range(13); for i in range(13): output[i] = "" for i in range(52): output[i%13] = output[i%13] + card_to_string(cards[i], (i>=52-13), print_ts) for i in range(13): print output[i] elif (which_game == "gypsy"): output = range(8); for i in range(8): output[i] = "" for i in range(24): output[i%8] = output[i%8] + flip_card(card_to_string(cards[i], 1, print_ts), (i<16)) if (i < 16): output[i%8] = output[i%8] + " " talon = "Talon:" for i in range(24,8*13): talon = talon + " " + card_to_string(cards[i], 1, print_ts) print talon for i in range(8): print output[i] elif ((which_game == "klondike") or (which_game == "klondike_by_threes") or (which_game == "casino_klondike") or (which_game == "small_harp") or (which_game == "thumb_and_pouch") or (which_game == "vegas_klondike") or (which_game == "whitehead")): #o = "" #for i in cards: # o = o + " " + card_to_string(i, 1) #print o output = range(7); for i in range(7): output[i] = "" card_num = 0 for r in range(1,7): for s in range(7-r): output[s] = output[s] + card_to_string(cards[card_num], 0, print_ts, flipped=(which_game != "whitehead")) card_num = card_num + 1 for s in range(7): output[s] = output[s] + card_to_string(cards[card_num], 1, print_ts) card_num = card_num + 1 talon = "Talon: " while card_num < 52: talon = talon + card_to_string(cards[card_num], (card_num == 52-1), print_ts) card_num = card_num + 1 print talon if (not (which_game == "small_harp")): output.reverse(); for i in output: print i elif (which_game == "simple_simon"): card_num = 0 output = range(10) for i in range(10): output[i] = "" num_cards = 9 while num_cards >= 3: for s in range(num_cards): output[s] = output[s] + card_to_string(cards[card_num], 0, print_ts) card_num = card_num + 1 num_cards = num_cards - 1 for s in range(10): output[s] = output[s] + card_to_string(cards[card_num], 1, print_ts) card_num = card_num + 1 for i in output: print i elif (which_game == "yukon"): card_num = 0 output = range(7) for i in range(7): output[i] = "" for i in range(1, 7): for j in range(i, 7): output[j] = output[j] + card_to_string(cards[card_num], 0, print_ts, 1) card_num = card_num + 1 for i in range(4): for j in range(1,7): output[j] = output[j] + card_to_string(cards[card_num], 0, print_ts, 0) card_num = card_num + 1 for i in range(7): output[i] = output[i] + card_to_string(cards[card_num], 1, print_ts, 0) card_num = card_num + 1 for i in output: print i elif ((which_game == "beleaguered_castle") or (which_game == "streets_and_alleys") or (which_game == "citadel")): if (which_game == "beleaguered_castle") or (which_game == "citadel"): new_cards = [] for c in cards: if (c & 0x0F != 1): new_cards.append(c) cards = new_cards; output = range(8) for i in range(8): output[i] = "" card_num = 0 if (which_game == "beleaguered_castle") or (which_game == "citadel"): foundations = [1,1,1,1] else: foundations = [0,0,0,0] for i in range(6): for s in range(8): if (which_game == "citadel"): if (foundations[cards[card_num] >> 4]+1 == (cards[card_num] & 0x0F)): foundations[cards[card_num] >> 4] = foundations[cards[card_num] >> 4] + 1; card_num = card_num + 1 continue output[s] = output[s] + card_to_string(cards[card_num], (i == 6-1), print_ts) card_num = card_num + 1 if (card_num == len(cards)): break if (which_game == "streets_and_alleys"): for s in range(4): output[s] = output[s] + " " + card_to_string(cards[card_num], 1, print_ts) card_num = card_num + 1 f_str = "Foundations:" for f in [2,0,3,1]: if (foundations[f] != 0): f_str = f_str + " " + get_card_suit(f) + "-" + get_card_num(foundations[f], print_ts) if (f_str != "Foundations:"): print f_str for i in output: print i elif (which_game == "fan"): output = [""] * 18 for i in range(52-1): output[i%17] = output[i%17] + card_to_string(cards[i], (i >= 2*17), print_ts) output[17] = output[17] + card_to_string(cards[i+1], 1, print_ts); for i in output: print i else: print "Unknown game type " + which_game + "\n"
521f7a57ecaa5ef04deab5cb2284a7df9fca3227 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2756/521f7a57ecaa5ef04deab5cb2284a7df9fca3227/make_pysol_freecell_board.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 699, 80, 362, 430, 67, 5254, 12, 1968, 4672, 1172, 67, 3428, 273, 374, 309, 261, 1968, 63, 21, 65, 422, 3701, 88, 6, 4672, 1172, 67, 3428, 273, 404, 833, 18, 5120, 12, 20, 13, 7920...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 699, 80, 362, 430, 67, 5254, 12, 1968, 4672, 1172, 67, 3428, 273, 374, 309, 261, 1968, 63, 21, 65, 422, 3701, 88, 6, 4672, 1172, 67, 3428, 273, 404, 833, 18, 5120, 12, 20, 13, 7920...
wxglade_tmp_menu.Append(self.MENU_REGISTER, "Register", "Register as a different user", wx.ITEM_NORMAL)
wxglade_tmp_menu.Append(self.MENU_REGISTER, "Register", "Register as a new user with a SIP server", wx.ITEM_NORMAL)
def __init__(self, *args, **kwds): # begin wxGlade: ShtoomMainFrame.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.advanced = wx.Panel(self, -1) # Menu Bar self.shtoom_frame_menubar = wx.MenuBar() self.SetMenuBar(self.shtoom_frame_menubar) wxglade_tmp_menu = wx.Menu() wxglade_tmp_menu.Append(self.MENU_REGISTER, "Register", "Register as a different user", wx.ITEM_NORMAL) wxglade_tmp_menu.Append(self.MENU_PREFS, "Preferences", "Edit Shtoom preferences", wx.ITEM_NORMAL) wxglade_tmp_menu.Append(self.MENU_EXIT, "Exit", "Exit Shtoom", wx.ITEM_NORMAL) self.shtoom_frame_menubar.Append(wxglade_tmp_menu, "File") wxglade_tmp_menu = wx.Menu() wxglade_tmp_menu.Append(self.MENU_ERRORLOG, "Error Log", "View any error or debug messages", wx.ITEM_NORMAL) self.shtoom_frame_menubar.Append(wxglade_tmp_menu, "View") wxglade_tmp_menu = wx.Menu() wxglade_tmp_menu.Append(self.MENU_HELP_CONTENTS, "Contents", "Give me some help", wx.ITEM_NORMAL) self.shtoom_frame_menubar.Append(wxglade_tmp_menu, "Help") # Menu Bar end self.shtoom_frame_statusbar = self.CreateStatusBar(1, 0) self.label_1 = wx.StaticText(self, -1, "Address:", style=wx.ALIGN_CENTRE) self.combo_address = wx.ComboBox(self, self.COMBO_ADDRESS, choices=[], style=wx.CB_DROPDOWN) self.button_call = wx.Button(self, self.BUTT_CALL, "Call") self.button_lookup = wx.Button(self, self.BUTT_LOOKUP, "Lookup Address") self.button_advanced = wx.Button(self, self.BUTT_ADVANCED, "-") self.button_1 = wx.Button(self.advanced, self.BUTT_1, "1", style=wx.BU_EXACTFIT) self.button_2 = wx.Button(self.advanced, self.BUTT_2, "2", style=wx.BU_EXACTFIT) self.button_3 = wx.Button(self.advanced, self.BUTT_3, "3", style=wx.BU_EXACTFIT) self.button_4 = wx.Button(self.advanced, self.BUTT_4, "4", style=wx.BU_EXACTFIT) self.button_5 = wx.Button(self.advanced, self.BUTT_5, "5", style=wx.BU_EXACTFIT) self.button_6 = wx.Button(self.advanced, self.BUTT_6, "6", style=wx.BU_EXACTFIT) self.button_7 = wx.Button(self.advanced, self.BUTT_7, "7", style=wx.BU_EXACTFIT) self.button_8 = wx.Button(self.advanced, self.BUTT_8, "8", style=wx.BU_EXACTFIT) self.button_9 = wx.Button(self.advanced, self.BUTT_9, "9", style=wx.BU_EXACTFIT) self.button_star = wx.Button(self.advanced, self.BUTT_STAR, "*", style=wx.BU_EXACTFIT) self.button_0 = wx.Button(self.advanced, self.BUTT_0, "0", style=wx.BU_EXACTFIT) self.button_hash = wx.Button(self.advanced, self.BUTT_HASH, "#", style=wx.BU_EXACTFIT) self.bitmap_1 = wx.StaticBitmap(self.advanced, -1, wx.Bitmap("shtoom/ui/gnomeui/shtoom.gif", wx.BITMAP_TYPE_ANY))
445b542dd2731a15c0e3129423052eb2199e816e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1265/445b542dd2731a15c0e3129423052eb2199e816e/wxshtoomframe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 468, 2376, 7075, 21308, 2486, 30, 348, 647, 4252, 6376, 3219, 16186, 2738, 972, 17149, 9614, 4060, 11929, 273, 7075, 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, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 468, 2376, 7075, 21308, 2486, 30, 348, 647, 4252, 6376, 3219, 16186, 2738, 972, 17149, 9614, 4060, 11929, 273, 7075, 18, ...
test.diagnostics()
test.diagnostics(test.default_port()) test.write_diagnostics_results(ret)
def main(): report("Speech Dispatcher configuration tool") configure = Configure() test = Tests() if options.create_user_configuration: configure.create_user_configuration() reply = question("Do you want to continue with basic settings?", True) if reply: configure.configure_basic_settings(type='user') elif options.config_basic_settings_user: configure.configure_basic_settings(type='user') elif options.config_basic_settings_system: configure.configure_basic_settings(type='system') elif options.test_festival: test.test_festival() elif options.test_espeak: test.test_espeak() elif options.test_alsa: test.audio_try_play(type='alsa') elif options.test_pulse: test.audio_try_play(type='pulse') elif options.diagnostics: test.diagnostics() elif options.debug: test.debug_and_report() else: reply = question("Do you want to setup a completely new configuration?", True) if reply: configure.complete_config() else: reply = question("Do you want to run diagnosis of problems?", True) if reply: test.diagnostics() else: report("""Please run this command again and select what you want to do
31bc592ad9b48bd4768e16289bd8a0f7915071e1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7484/31bc592ad9b48bd4768e16289bd8a0f7915071e1/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 2605, 2932, 22334, 16710, 1664, 5226, 7923, 225, 5068, 273, 11758, 1435, 1842, 273, 7766, 87, 1435, 225, 309, 702, 18, 2640, 67, 1355, 67, 7025, 30, 5068, 18, 2640, 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, 2774, 13332, 225, 2605, 2932, 22334, 16710, 1664, 5226, 7923, 225, 5068, 273, 11758, 1435, 1842, 273, 7766, 87, 1435, 225, 309, 702, 18, 2640, 67, 1355, 67, 7025, 30, 5068, 18, 2640, 67,...
match = re.match(r'(^|.*/)(patch-\d+\.\d+\.\d+(-\S+)?(\.(?P<extension>(bz2|gz))))?$', self.input_patch)
match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P<extension>(bz2|gz)))?$', self.input_patch)
def patch(self): if self.input_patch is None: return self.log("Patching source with %s\n" % self.input_patch) match = re.match(r'(^|.*/)(patch-\d+\.\d+\.\d+(-\S+)?(\.(?P<extension>(bz2|gz))))?$', self.input_patch) if not match: raise RuntimeError("Can't identify name of patch") cmdline = [] if match.group('extension') == 'bz2': cmdline.append('bzcat') elif match.group('extension') == 'gz': cmdline.append('zcat') else: cmdline.append('cat') cmdline.append(self.input_patch) cmdline.append('| (cd %s; patch -p1 -f -s -t --no-backup-if-mismatch)' % os.path.join(self.dir, self.orig)) if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]): raise RuntimeError("Can't patch source")
163442e1392f67182ea1f15ec622dd82772641a8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5794/163442e1392f67182ea1f15ec622dd82772641a8/genorig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 12, 2890, 4672, 309, 365, 18, 2630, 67, 2272, 353, 599, 30, 327, 365, 18, 1330, 2932, 7332, 310, 1084, 598, 738, 87, 64, 82, 6, 738, 365, 18, 2630, 67, 2272, 13, 845, 273, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 12, 2890, 4672, 309, 365, 18, 2630, 67, 2272, 353, 599, 30, 327, 365, 18, 1330, 2932, 7332, 310, 1084, 598, 738, 87, 64, 82, 6, 738, 365, 18, 2630, 67, 2272, 13, 845, 273, 28...
except: raise
except: return
def _find_imported_variables(self): """ If possible, read the module's python documentation, and try to figure out which variables were imported. To decide which variables were imported, we use the following heuristic: if a variable isn't defined in the lhs of a top-level statement, then it's probably imported. Note that this isn't 100% effective. E.g., if someone uses C{global}, uses a C{try}/C{except} block, or directly modifies their modules' C{__dict__}, then we'll be fooled. """ # Get the filename of the module. try: filename = self._uid.value().__file__ except: raise if filename[-4:-1].lower() == '.py': filename = filename[:-1] # Parse the module's source code. try: ast = parser.suite(open(filename).read()) except: raise # Construct a list of defined variables. To do this, we search # the parse tree for statements of the form "a=b" or "a=b=c" or # "a,b=c" or "(a,b)=c" or "[a,b]=c". defined_variables = {} for stmt in ast.totuple()[1:]: dict = {} if _ast_match(self._EXPR_STMT_PATTERN, stmt, dict)[0]: expr_stmt = dict['expr_stmt'] for i in range(2, len(expr_stmt)): if expr_stmt[i] == (token.EQUAL, '='): lhs = expr_stmt[i-1] self._find_defined_vars(lhs, defined_variables)
7140f1248773f589eaa5826bd2b3d64a09ab01f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7140f1248773f589eaa5826bd2b3d64a09ab01f2/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 67, 29266, 67, 7528, 12, 2890, 4672, 3536, 971, 3323, 16, 855, 326, 1605, 1807, 5790, 7323, 16, 471, 775, 358, 7837, 596, 1492, 3152, 4591, 9101, 18, 225, 2974, 16288, 1492, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4720, 67, 29266, 67, 7528, 12, 2890, 4672, 3536, 971, 3323, 16, 855, 326, 1605, 1807, 5790, 7323, 16, 471, 775, 358, 7837, 596, 1492, 3152, 4591, 9101, 18, 225, 2974, 16288, 1492, ...
if random.random() > 0.1:
if trandom.random() > 0.1:
def test_LP294788(self): # https://bugs.launchpad.net/bugs/294788 # BTree keeps some deleted objects referenced
4f378e5ca87951659d67123673df32a4c15ec19d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10048/4f378e5ca87951659d67123673df32a4c15ec19d/testBTrees.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 14461, 5540, 9462, 5482, 12, 2890, 4672, 468, 2333, 2207, 19381, 18, 20738, 6982, 18, 2758, 19, 19381, 19, 5540, 9462, 5482, 468, 605, 2471, 20948, 2690, 4282, 2184, 8042, 2, 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, 1842, 67, 14461, 5540, 9462, 5482, 12, 2890, 4672, 468, 2333, 2207, 19381, 18, 20738, 6982, 18, 2758, 19, 19381, 19, 5540, 9462, 5482, 468, 605, 2471, 20948, 2690, 4282, 2184, 8042, 2, -...
cached_statements[absolsute_filename] = statements
cached_statements[absolute_filename] = statements
def get_statements(filename, absolsute_filename, base_name): global cached_statements try: return cached_statements[absolsute_filename] except KeyError: file = open(absolsute_filename, 'r') statements = ast.StatementGroup() lineno = 0 while True: lineno = lineno + 1 s = file.readline() if not s: break s = s.rstrip() feeder(lineno, s, filename, base_name, statements) if __inpython__: # add a blank line to close out any python definition feeder(IN_PYTHON_EOF, "", filename, base_name, statements) if filename.endswith(".bbclass") or filename.endswith(".inc"): cached_statements[absolsute_filename] = statements return statements
c63278bf34072c8236d58d7db3b145bf43f556b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/c63278bf34072c8236d58d7db3b145bf43f556b5/BBHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 18393, 12, 3459, 16, 2417, 3528, 624, 67, 3459, 16, 1026, 67, 529, 4672, 2552, 3472, 67, 18393, 225, 775, 30, 327, 3472, 67, 18393, 63, 5113, 3528, 624, 67, 3459, 65, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 18393, 12, 3459, 16, 2417, 3528, 624, 67, 3459, 16, 1026, 67, 529, 4672, 2552, 3472, 67, 18393, 225, 775, 30, 327, 3472, 67, 18393, 63, 5113, 3528, 624, 67, 3459, 65, 1335, ...
bothighlight = int(round(0.49*size))
bothighlight = int(round(1*size)) out["sysboxheight"] = height
def sysbox(size): canvas = {} # The system box of the computer. height = int(round(3*size)) width = int(round(17*size)) depth = int(round(2*size)) highlight = int(round(1*size)) bothighlight = int(round(0.49*size)) floppystart = int(round(19*size)) # measured in half-pixels floppyend = int(round(29*size)) # measured in half-pixels floppybottom = height - bothighlight floppyrheight = 0.7 * size floppyheight = int(round(floppyrheight)) if floppyheight < 1: floppyheight = 1 floppytop = floppybottom - floppyheight # The front panel is rectangular. for x in range(width): for y in range(height): grey = 3 if x < highlight or y < highlight: grey = grey + 1 if x >= width-highlight or y >= height-bothighlight: grey = grey - 1 if y < highlight and x >= width-highlight: v = (highlight-1-y) - (x-(width-highlight)) if v < 0: grey = grey - 1 elif v > 0: grey = grey + 1 if y >= floppytop and y < floppybottom and \ 2*x+2 > floppystart and 2*x < floppyend: if 2*x >= floppystart and 2*x+2 <= floppyend and \ floppyrheight >= 0.7: grey = 0 else: grey = 2 pixel(x, y, greypix(grey/4.0), canvas) # The side panel is a parallelogram. for x in range(depth): for y in range(height+1): pixel(x+width, y-(x+1), greypix(0.5), canvas) # The top panel is another parallelogram. for x in range(width-1): for y in range(depth): grey = 3 if x >= width-1 - highlight: grey = grey + 1 pixel(x+(y+1), -(y+1), greypix(grey/4.0), canvas) # And draw a border. border(canvas, size, []) return canvas
dcad6105fd2144eeecd41b4d5c9d1d07998cb50a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13182/dcad6105fd2144eeecd41b4d5c9d1d07998cb50a/mkicon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2589, 2147, 12, 1467, 4672, 5953, 273, 2618, 225, 468, 1021, 2619, 3919, 434, 326, 26579, 18, 225, 2072, 273, 509, 12, 2260, 12, 23, 14, 1467, 3719, 1835, 273, 509, 12, 2260, 12, 4033,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2589, 2147, 12, 1467, 4672, 5953, 273, 2618, 225, 468, 1021, 2619, 3919, 434, 326, 26579, 18, 225, 2072, 273, 509, 12, 2260, 12, 23, 14, 1467, 3719, 1835, 273, 509, 12, 2260, 12, 4033,...
filename = self.output_path+'Images/'+ifoName + "-followup_"+stage+"_"+str(self.number) +\ self.opts.suffix+'.png'
filename = self.output_path+'Images/'+ifoName + "-followup_"+stage+\ "_"+str(self.number) +self.opts.suffix if self.tag: filename+='_'+self.tag filename+='.png'
def investigateTrigbank(self, triggerFiles, inj, ifoName, stage, number ): """ Investigate the trigbank @param triggerFiles: List of files containing the trigbank @param inj: The current injection @param ifo: The current IFO @param stage: The name of the stage (FIRST, SECOND) @param number: The consecutive number for this inspiral followup """
97e32f7f2ca5cb3d7f0c99dedfdf52cb1afe6f09 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/97e32f7f2ca5cb3d7f0c99dedfdf52cb1afe6f09/followup_missed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2198, 25999, 340, 1070, 360, 10546, 12, 2890, 16, 3080, 2697, 16, 316, 78, 16, 21479, 461, 16, 225, 6009, 16, 1300, 262, 30, 3536, 5454, 25999, 340, 326, 23142, 10546, 632, 891, 3080, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2198, 25999, 340, 1070, 360, 10546, 12, 2890, 16, 3080, 2697, 16, 316, 78, 16, 21479, 461, 16, 225, 6009, 16, 1300, 262, 30, 3536, 5454, 25999, 340, 326, 23142, 10546, 632, 891, 3080, ...
- ``bool`` - True or False .. note:: We do not consider negatives of prime numbers as prime.
- ``bool`` - ``True`` or ``False``
def is_prime(n, flag=0): r""" Returns True if `x` is prime, and False otherwise. The result is proven correct - *this is NOT a pseudo-primality test!*. INPUT: - ``flag`` - int - ``0`` (default) - use a combination of algorithms. - ``1`` - certify primality using the Pocklington-Lehmer Test. - ``2`` - certify primality using the APRCL test. OUTPUT: - ``bool`` - True or False .. note:: We do not consider negatives of prime numbers as prime. EXAMPLES:: sage: is_prime(389) True sage: is_prime(2000) False sage: is_prime(2) True sage: is_prime(-1) False sage: factor(-6) -1 * 2 * 3 sage: is_prime(1) False sage: is_prime(-2) False IMPLEMENTATION: Calls the PARI isprime function. """ n = ZZ(n) return pari(n).isprime()
bd4a8cfafce1ad06ab866905b52f8bdaee588220 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/bd4a8cfafce1ad06ab866905b52f8bdaee588220/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 16382, 12, 82, 16, 2982, 33, 20, 4672, 436, 8395, 2860, 1053, 309, 1375, 92, 68, 353, 17014, 16, 471, 1083, 3541, 18, 1021, 563, 353, 450, 3995, 3434, 300, 380, 2211, 353, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 353, 67, 16382, 12, 82, 16, 2982, 33, 20, 4672, 436, 8395, 2860, 1053, 309, 1375, 92, 68, 353, 17014, 16, 471, 1083, 3541, 18, 1021, 563, 353, 450, 3995, 3434, 300, 380, 2211, 353, 4...
is desirable to get all of the nodes
is desirable to get all of the nodes that depend on others last.
def topological_traversal(self): """Traverses the graph, yielding nodes in topological order.
bb6d330012ae30f2782a35b19f98339a30256e0b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3401/bb6d330012ae30f2782a35b19f98339a30256e0b/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1760, 18224, 67, 31750, 287, 12, 2890, 4672, 3536, 15844, 281, 326, 2667, 16, 31009, 2199, 316, 1760, 18224, 1353, 18, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1760, 18224, 67, 31750, 287, 12, 2890, 4672, 3536, 15844, 281, 326, 2667, 16, 31009, 2199, 316, 1760, 18224, 1353, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
None, [cty.c_int, cty.c_int],
None, [cty.c_int, cty.c_int],
def fl_setpup_shadow(n, y): """ fl_setpup_shadow(n, y) """ _fl_setpup_shadow(n, y)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 84, 416, 67, 19119, 12, 82, 16, 677, 4672, 3536, 1183, 67, 542, 84, 416, 67, 19119, 12, 82, 16, 677, 13, 3536, 225, 389, 2242, 67, 542, 84, 416, 67, 19119, 12, 82, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1183, 67, 542, 84, 416, 67, 19119, 12, 82, 16, 677, 4672, 3536, 1183, 67, 542, 84, 416, 67, 19119, 12, 82, 16, 677, 13, 3536, 225, 389, 2242, 67, 542, 84, 416, 67, 19119, 12, 82, ...
break
if not result: continue elif isinstance(result, (str, unicode)): return result elif annotations: return self._annotate(result, annotations) else: buf = StringIO() buf.write('<div class="code-block"><pre>') for line in result: buf.write(line.expandtabs(8) + '\n') buf.write('</pre></div>') return buf.getvalue()
def render(self, req, mimetype, content, filename=None, rev=None, annotations=None): """Render an XHTML preview of the given content of the specified MIME type, selecting the most appropriate `IHTMLPreviewRenderer` implementation available for the given MIME type.
1f6e5dbace90bc48298098ac08792651d74bf17e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/1f6e5dbace90bc48298098ac08792651d74bf17e/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1111, 16, 12595, 16, 913, 16, 1544, 33, 7036, 16, 5588, 33, 7036, 16, 5617, 33, 7036, 4672, 3536, 3420, 392, 30551, 10143, 434, 326, 864, 913, 434, 326, 1269, 13195...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1743, 12, 2890, 16, 1111, 16, 12595, 16, 913, 16, 1544, 33, 7036, 16, 5588, 33, 7036, 16, 5617, 33, 7036, 4672, 3536, 3420, 392, 30551, 10143, 434, 326, 864, 913, 434, 326, 1269, 13195...
if Decimal(str(data['balance'])) == Decimal(str(data['transaction_total'])):
if float(mf(Decimal(str(data['balance'])))) == float(mf(Decimal(str(data['transaction_total'])))):
def POST(self, db_name, account_id, _user=None): db_cnx = get_db_cnx(db_name) cur = db_cnx.cursor() query = """ select * from Account left outer join ( select account as id, total(total) as transaction_total from ( select * from FinancialTransaction join ( select total(amount) as total, financial_transaction as id from TransactionItem group by id ) using (id) where status = 4 or status = 5 or status = 0 ) group by id ) using (id) where id = :id;""" data = normalize(cur.execute(query, {'id':account_id}).fetchall(), cur.description) data = data[0] if Decimal(str(data['balance'])) == Decimal(str(data['transaction_total'])): cur.execute("update FinancialTransaction set status = 5 where account = :id and status = 4;", {'id':int(account_id)}) db_cnx.commit() else: print "balance %s != transaction total %s" % (data['balance'], data['transaction_total']) return web.accepted()
c1b405e7b76ee374ecb1e3fca3072ef6e0007414 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14271/c1b405e7b76ee374ecb1e3fca3072ef6e0007414/view.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5485, 12, 2890, 16, 1319, 67, 529, 16, 2236, 67, 350, 16, 389, 1355, 33, 7036, 4672, 1319, 67, 10305, 92, 273, 336, 67, 1966, 67, 10305, 92, 12, 1966, 67, 529, 13, 662, 273, 1319, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5485, 12, 2890, 16, 1319, 67, 529, 16, 2236, 67, 350, 16, 389, 1355, 33, 7036, 4672, 1319, 67, 10305, 92, 273, 336, 67, 1966, 67, 10305, 92, 12, 1966, 67, 529, 13, 662, 273, 1319, ...
for cls in group: self._write_class_summary_line(public, private, cls) _write_if_nonempty(public, private, classes, '</table><br />\n\n') def _write_class_summary_line(self, public, private, link): cname = link.name() cls = link.target() if not self._docmap.has_key(cls): return '' cdoc = self._docmap[cls] csum = self._summary(cdoc, cls) str = '<tr><td width="15%">\n' str += ' <b>'+self._link_to_html(link) str += '</b></td>\n <td>' + csum + '</td></tr>\n' private.write(str) if link.is_public(): public.write(str) def _func_summary(self, functions, cls, groups, heading='Function Summary'): return '' def _write_func_summary(self, public, private, functions, cls, groups, heading='Function Summary'): """ @return: The HTML code for a function summary table. This is used by L{_module_to_html} to list the functions in a module; and by L{_class_to_html} to list member functions. @rtype: C{string} """ if len(functions) == 0: return header = self._table_header(heading, 'summary') _write_if_nonempty(public, private, functions, header) for name, group in groups: if name is not None: header = self._group_header(name) _write_if_nonempty(public, private, group, header) for func in group: str = self._func_summary_line(func, cls) if str: private.write(str) if func.is_public(): public.write(str) if self._inheritance == 'listed' and cls is not None: self._write_inheritance_list(public, private, group, cls) _write_if_nonempty(public, private, functions, '</table><br />\n\n') def _func_summary_line(self, link, cls): func = link.target() fname = link.name() if func.is_module() or func.is_class(): container = func else: container = func.cls() or func.module() inherit = ((func.is_method() or func.is_builtin_method()) and container != cls.uid()) if inherit and self._inheritance == 'listed': return '' if not self._docmap.has_key(func): return '' fdoc = self._docmap[func] while (not fdoc.documented() and fdoc.matches_override() and self._docmap.has_key(fdoc.overrides())): fdoc = self._docmap[fdoc.overrides()] inhfunc = fdoc.uid() rval = fdoc.returns() if rval.type(): rtype = self._docstring_to_html(rval.type(), inhfunc, 8) else: rtype = '&nbsp;' descrstr = self._summary(fdoc, inhfunc) if descrstr != '&nbsp;': fsum = '<br />'+descrstr else: if inherit: fsum = '<br />\n' else: fsum = '' attribs = [] if func.is_classmethod(): attribs.append('Class method') if func.is_staticmethod(): attribs.append('Static method') if inherit and self._inheritance != 'grouped': href = self._uid_to_href(container, container.shortname()) attribs.append('Inherited from %s' % href) if attribs: fsum += ' <i>(' + '; '.join(attribs) + ')</i>\n' str = '<tr><td align="right" valign="top" width="15%">' str += '<font size="-1">'+rtype+'</font></td>\n <td><code>' if fdoc.documented() or inherit: str += self._func_signature(fname, fdoc, 1, 0, 'summary-sig') else: str += '<a name="%s"></a>' % fname str += self._func_signature(fname, fdoc, 0, 0, 'summary-sig') str += '</code>\n' + fsum + '</td></tr>\n' return str def _write_func_details(self, public, private, functions, cls, heading='Function Details'): """ @return: The HTML code for a function details table. This is used by L{_module_to_html} to describe the functions in a module; and by L{_class_to_html} to describe member functions. @rtype: C{string} """ functions = [f for f in functions if self._docmap.has_key(f.target())] if len(functions) == 0: return header = self._table_header(heading, 'details')+'</table>\n' _write_if_nonempty(public, private, functions, header) for function in functions: str = self._func_details_entry(function, cls) if str: private.write(str) if function.target().is_public(): public.write(str) _write_if_nonempty(public, private, functions, '<br />\n\n') def _func_details_entry(self, function, cls): fname = function.name() func = function.target() if func.is_module() or func.is_class(): container = func else: container = func.cls() or func.module() inherit = ((func.is_method() or func.is_builtin_method()) and container != cls.uid()) if inherit: return '' fdoc = self._docmap[func] foverrides = fdoc.overrides() inhdoc = self._docmap.documented_ancestor(func) or fdoc inherit_docs = (inhdoc is not fdoc) if not inhdoc.documented(): return '' str = '\n<a name="'+fname+'"></a>\n' str += '<table width="100%" class="func-details"' str += ' bgcolor=" str += ' <h3>%s\n' % self._func_signature(fname, fdoc) if SPECIAL_METHODS.has_key(fname): str += ' <br /><i>' str += '(%s)</i>\n' % SPECIAL_METHODS[fname] str += ' </h3>\n' fdoc = inhdoc func = inhdoc.uid() fdescr=fdoc.descr() fparam = fdoc.parameter_list()[:] if fdoc.vararg(): fparam.append(fdoc.vararg()) if fdoc.kwarg(): fparam.append(fdoc.kwarg()) freturn = fdoc.returns() fraises = fdoc.raises() f = lambda p:p.descr() or p.type() fparam = filter(f, fparam) if fdescr: str += self._docstring_to_html(fdescr, func, 2) str += ' <dl><dt></dt><dd>\n' if fparam: str += ' <dl><dt><b>Parameters:</b></dt>\n' for param in fparam: pname = param.name() str += ' <dd><code><b>' + pname +'</b></code>' if param.descr(): pdescr = self._docstring_to_html(param.descr(), func, 8) str += ' -\n %s' % pdescr.rstrip() str += '\n' if param.type(): ptype = self._docstring_to_html(param.type(), func, 14) str += ' <br /><i>'+('&nbsp;'*10)+'\n' str += ' '*8+'(type=%s)</i>\n' % ptype.strip() str += ' </dd>\n' str += ' </dl>\n' if freturn.descr() or freturn.type(): str += ' <dl><dt><b>Returns:</b></dt>\n <dd>\n' if freturn.descr(): str += self._docstring_to_html(freturn.descr(), func, 8) if freturn.type(): rtype = self._docstring_to_html(freturn.type(), func,14) str += ' <br /><i>'+('&nbsp;'*10)+'\n' str += ' '*8+'(type=%s)</i>\n' % rtype.strip() elif freturn.type(): str += self._docstring_to_html(freturn.type(), func, 8) str += ' </dd>\n </dl>\n' if fraises: str += ' <dl><dt><b>Raises:</b></dt>\n' for fraise in fraises: str += ' ' str += '<dd><code><b>'+fraise.name()+'</b></code> -\n' str += self._docstring_to_html(fraise.descr(), func, 8) str +' </dd>\n' str += ' </dl>\n' if foverrides: str += ' <dl><dt><b>Overrides:</b></dt>\n' str += ' <dd>'+self._uid_to_href(foverrides) if inherit_docs: str += ' <i>(inherited documentation)</i>\n' str += '</dd>\n </dl>\n' str += self._standard_fields(fdoc) str += ' </dd></dl>\n' str += '</td></tr></table>\n' return str def _func_signature(self, fname, fdoc, link=0, show_defaults=1, css_class="sig"): """ @return: The HTML code for the function signature of the function with the given name and documentation. @param fname: The short name of the function. @type fname: C{string} @param fdoc: The documentation for the function. @type fdoc: L{objdoc.FuncDoc} @param link: Whether to create a link from the function's name to its details description. """ str = '<span class=%s>' % css_class if link: str += self._uid_to_href(fdoc.uid(), fname, css_class+'-name') else: str += '<span class=%s-name>%s</span>' % (css_class, fname) PARAM_JOIN = ',\n'+' '*15 str += '(' str += self._params_to_html(fdoc.parameters(), css_class, show_defaults) if fdoc.vararg(): vararg_name = fdoc.vararg().name() if vararg_name != '...': vararg_name = '*%s' % vararg_name str += ('<span class=%s-vararg>%s</span>%s' % (css_class, vararg_name, PARAM_JOIN)) if fdoc.kwarg(): str += ('<span class=%s-kwarg>**%s</span>%s' % (css_class, fdoc.kwarg().name(), PARAM_JOIN)) if str[-1] != '(': str = str[:-len(PARAM_JOIN)] return str + ')</span>' def _params_to_html(self, parameters, css_class, show_defaults): PARAM_JOIN = ',\n'+' '*15 str = '' for param in parameters: if type(param) in (types.ListType, types.TupleType): sublist = self._params_to_html(param, css_class, show_defaults) str += '(%s), ' % sublist[:-len(PARAM_JOIN)] else: str += ('<span class=%s-arg>%s</span>' % (css_class, param.name())) if show_defaults and param.default() is not None: default = param.default() default = re.sub('&', '&amp;', default) default = re.sub('<', '&lt;', default) default = re.sub('>', '&gt;', default) default = re.sub(' ', '&nbsp;', default) if len(default) > 60: default = default[:57]+'...' str += ('=<span class=%s-default>%s</span>' % (css_class, default)) str += PARAM_JOIN return str def _write_property_summary(self, public, private, properties, container, groups, heading='Property Summary'): if len(properties) == 0: return header = self._table_header(heading, 'summary') _write_if_nonempty(public, private, properties, header) for name, group in groups: if name is not None: header = self._group_header(name) _write_if_nonempty(public, private, group, header) for prop in group: str = self._property_summary_line(prop, container) if str: private.write(str) if prop.is_public(): public.write(str) if self._inheritance == 'listed': self._write_inheritance_list(public, private, group, container) _write_if_nonempty(public, private, properties, '</table><br />\n\n') def _property_summary_line(self, link, container): prop = link.target() pname = link.name() inherit = (container.is_class() and container != prop.cls()) if inherit and self._inheritance == 'listed': return '' if not self._docmap.has_key(prop): return '' pdoc = self._docmap[prop] if pdoc.type(): ptype = self._docstring_to_html(pdoc.type(), prop, 10).strip() else: ptype = '&nbsp;' descrstr = self._summary(pdoc, prop) if descrstr != '&nbsp;': psum = ': '+descrstr else: psum = '' str = '<tr><td align="right" valign="top" ' str += 'width="15%"><font size="-1">'+ptype+'</font></td>\n' str += ' <td><b>%s</b>%s' % (self._link_to_html(link), psum) if (self._inheritance != 'grouped' and inherit): cls = prop.cls() str += (' <i>(Inherited from %s)</i>\n' % self._uid_to_href(cls, cls.shortname())) str += '</td></tr>' return str def _write_property_details(self, *args): return def _property_details(self, properties, container, heading='Property Details'): if len(properties) == 0: return '' str = self._table_header(heading, 'details')+'</table>\n' numprops = 0 for link in properties: prop = link.target() pname = link.name() if container != prop.cls(): continue if not self._docmap.has_key(prop): continue pdoc = self._docmap[prop] numprops += 1 str += '<table width="100%" class="func-details"' str += ' bgcolor=" str += '\n<a name="%s"></a>\n' % pname str += '<h3>'+pname+'</h3>\n' if pdoc.descr(): str += self._docstring_to_html(pdoc.descr(), prop) if pdoc.fget() or pdoc.fset() or pdoc.fdel(): str += '<dl>\n <dt></dt>\n <dd>\n <dl>\n' for (func,name) in [(pdoc.fget(), 'Get'), (pdoc.fset(), 'Set'), (pdoc.fdel(), 'Delete')]: if func: str += ' <dt><b>%s Function:' % name str += '</b></dt>\n <dd>' if self._docmap.has_key(func): fdoc = self._docmap[func] fname = func.name() str += self._func_signature(fname, fdoc, 1, 0, 'summary-sig') else: str += self._uid_to_href(func) str += '\n </dd>\n' str += ' </dl>\n </dd>\n</dl>' str += '</td></tr></table>' if numprops == 0: return '' return str+'<br />' def _write_var_summary(self, public, private, variables, container, groups, heading='Variable Summary'): """ @return: The HTML code for a variable summary table. This is used by L{_module_to_html} to list the variables in a module; and by L{_class_to_html} to list instance variables and class variables. @rtype: C{string} """ if len(variables) == 0: return header = self._table_header(heading, 'summary') _write_if_nonempty(public, private, variables, header) for name, group in groups: if name is not None: header = self._group_header(name) _write_if_nonempty(public, private, group, header)
def _write_class_summary(self, public, private, classes, groups, heading='Class Summary'): """ @return: The HTML code for the class summary table. This is used by L{_module_to_html} to list the classes in a module. @rtype: C{string} """ if len(classes) == 0: return
dad6dd09c82d3878a78d977cc13da79d4420db2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/dad6dd09c82d3878a78d977cc13da79d4420db2b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 1106, 67, 7687, 12, 2890, 16, 1071, 16, 3238, 16, 3318, 16, 3252, 16, 11053, 2218, 797, 17967, 11, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 326, 667, 4916, 1014,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2626, 67, 1106, 67, 7687, 12, 2890, 16, 1071, 16, 3238, 16, 3318, 16, 3252, 16, 11053, 2218, 797, 17967, 11, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 326, 667, 4916, 1014,...
-x^6 - (x^8/2)
-x^6 - x^8/2
def taylor(self, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable v around the point a, containing terms through $(x - a)^n$.
a3e1ab6e3ad7fae21c3295e0c62a4037d937329a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a3e1ab6e3ad7fae21c3295e0c62a4037d937329a/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 528, 80, 280, 12, 2890, 16, 331, 16, 279, 16, 290, 4672, 3536, 7784, 5708, 365, 316, 279, 15282, 399, 528, 80, 280, 578, 511, 8377, 547, 4166, 316, 326, 2190, 331, 6740, 326, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 528, 80, 280, 12, 2890, 16, 331, 16, 279, 16, 290, 4672, 3536, 7784, 5708, 365, 316, 279, 15282, 399, 528, 80, 280, 578, 511, 8377, 547, 4166, 316, 326, 2190, 331, 6740, 326, 16...
dir = os.path.join(dir, self.name) if os.path.isdir(dir): shutil.rmtree(dir) else: os.unlink(dir)
name = os.path.join(dir, self.name) for n in glob.iglob(name): if os.path.isdir(n): shutil.rmtree(n) else: os.unlink(n)
def do(self, dir): dir = os.path.join(dir, self.name) if os.path.isdir(dir): shutil.rmtree(dir) else: os.unlink(dir)
7388443e33391694880fa5b9abd27455ef0d1410 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5794/7388443e33391694880fa5b9abd27455ef0d1410/patches.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 12, 2890, 16, 1577, 4672, 1577, 273, 1140, 18, 803, 18, 5701, 12, 1214, 16, 365, 18, 529, 13, 309, 1140, 18, 803, 18, 291, 1214, 12, 1214, 4672, 11060, 18, 86, 17371, 12, 1214, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 12, 2890, 16, 1577, 4672, 1577, 273, 1140, 18, 803, 18, 5701, 12, 1214, 16, 365, 18, 529, 13, 309, 1140, 18, 803, 18, 291, 1214, 12, 1214, 4672, 11060, 18, 86, 17371, 12, 1214, ...
sql1_join = 'AND host_category_dir.host_category_id = host_category.id '
sql2_filter = "AND directory.name ~ '%s' " % re
def _publiclist_hosts(directory, product=None, re=None): sql1_filter = '' sql_common_select = "SELECT host.id, host.country, host.name, host.bandwidth_int, host.comment, host.internet2, site.org_url, site.name, category.name, host_category_url.url " sql1_from = "FROM category, host_category, host, site, host_category_url, host_category_dir " sql2_from = "FROM category, host_category, host, site, host_category_url " # join conditions sql_common = "WHERE " sql_common += "host_category.category_id = category.id AND " sql_common += "host_category.host_id = host.id AND " sql_common += "host_category_url.host_category_id = host_category.id AND " if product is not None: sql_common += "category.product_id = %s AND " % product.id sql_common += "host.site_id = site.id " # select conditions # up2date, active, not private sql_common += 'AND host.user_active AND site.user_active ' sql_common += 'AND host.admin_active AND site.admin_active ' sql_common += 'AND NOT host.private ' sql_common += 'AND NOT site.private ' sql_common += 'AND NOT host_category_url.private ' sql_common += 'AND category.publiclist ' if re is not None: sql1_filter = "AND host_category_dir.path ~ '%s' " % re sql1_join = 'AND host_category_dir.host_category_id = host_category.id ' sql1_up2date = 'AND host_category_dir.up2date ' sql2_up2date = 'AND host_category.always_up2date ' sql1 = sql_common_select + sql1_from + sql_common + sql1_filter + sql1_join + sql1_up2date sql2 = sql_common_select + sql2_from + sql_common + sql2_up2date sql = "SELECT * FROM ( %s UNION %s ) AS subquery" % (sql1, sql2) result = directory._connection.queryAll(sql) return result
8016e08f3ae31fd62ea9bae9c35ff4df4c620a24 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13031/8016e08f3ae31fd62ea9bae9c35ff4df4c620a24/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 482, 1098, 67, 11588, 12, 5149, 16, 3017, 33, 7036, 16, 283, 33, 7036, 4672, 225, 1847, 21, 67, 2188, 273, 875, 1847, 67, 6054, 67, 4025, 273, 315, 4803, 1479, 18, 350, 16, 1479...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 482, 1098, 67, 11588, 12, 5149, 16, 3017, 33, 7036, 16, 283, 33, 7036, 4672, 225, 1847, 21, 67, 2188, 273, 875, 1847, 67, 6054, 67, 4025, 273, 315, 4803, 1479, 18, 350, 16, 1479...
Used in boolean context, fails if non-true. These all fail:
Used in boolean context, fails if non-true. These all fail::
def run(self, formatter=FancyFormatter): """Run all tests in this collection.
0eb369aa97223d93791dbd2db8302c72d5688702 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14081/0eb369aa97223d93791dbd2db8302c72d5688702/schluck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 4453, 33, 42, 12514, 5074, 4672, 3536, 1997, 777, 7434, 316, 333, 1849, 18, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 12, 2890, 16, 4453, 33, 42, 12514, 5074, 4672, 3536, 1997, 777, 7434, 316, 333, 1849, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.prefixlen - prefixlen_diff < 0. I.e., you have a
self._prefixlen - prefixlen_diff < 0. I.e., you have a
def supernet(self, prefixlen_diff=1): """The supernet containing the current network.
40b07eb447109d6e300602cf20ea2a475f9a4962 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4528/40b07eb447109d6e300602cf20ea2a475f9a4962/ipaddr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2240, 2758, 12, 2890, 16, 1633, 1897, 67, 5413, 33, 21, 4672, 3536, 1986, 2240, 2758, 4191, 326, 783, 2483, 18, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2240, 2758, 12, 2890, 16, 1633, 1897, 67, 5413, 33, 21, 4672, 3536, 1986, 2240, 2758, 4191, 326, 783, 2483, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
elif window[-1]=='T':
elif window.endswith('T'):
def lcc_mult(seq,wsize,start,end): """Return a list called lccsal, the LCC, a complexity measure
3d45bf521c4adc9e7c82272c7e26271842ba064f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7167/3d45bf521c4adc9e7c82272c7e26271842ba064f/lcc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 952, 67, 5421, 12, 5436, 16, 91, 1467, 16, 1937, 16, 409, 4672, 3536, 990, 279, 666, 2566, 328, 952, 21982, 16, 326, 511, 6743, 16, 279, 21610, 6649, 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, 328, 952, 67, 5421, 12, 5436, 16, 91, 1467, 16, 1937, 16, 409, 4672, 3536, 990, 279, 666, 2566, 328, 952, 21982, 16, 326, 511, 6743, 16, 279, 21610, 6649, 2, -100, -100, -100, -100, ...
def index(dir): """Return a list of (module-name, synopsis) pairs for a directory tree.""" results = [] for entry in os.listdir(dir): path = os.path.join(dir, entry) if ispackage(path): results.extend(map( lambda (m, s), pkg=entry: (pkg + '.' + m, s), index(path))) elif os.path.isfile(path) and entry[-3:] == '.py': results.append((entry[:-3], synopsis(path))) return results
def index(dir): """Return a list of (module-name, synopsis) pairs for a directory tree.""" results = [] for entry in os.listdir(dir): path = os.path.join(dir, entry) if ispackage(path): results.extend(map( lambda (m, s), pkg=entry: (pkg + '.' + m, s), index(path))) elif os.path.isfile(path) and entry[-3:] == '.py': results.append((entry[:-3], synopsis(path))) return results
c8867551cbacbd399ba1d7b4ce3738d629629967 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8867551cbacbd399ba1d7b4ce3738d629629967/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 12, 1214, 4672, 3536, 990, 279, 666, 434, 261, 2978, 17, 529, 16, 6194, 29522, 13, 5574, 364, 279, 1867, 2151, 12123, 1686, 273, 5378, 364, 1241, 316, 1140, 18, 1098, 1214, 12, 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, 770, 12, 1214, 4672, 3536, 990, 279, 666, 434, 261, 2978, 17, 529, 16, 6194, 29522, 13, 5574, 364, 279, 1867, 2151, 12123, 1686, 273, 5378, 364, 1241, 316, 1140, 18, 1098, 1214, 12, 12...
return 'Content-Disposition: form-data;' in self.request.raw_post_data
content_type = self.content_type() if content_type is not None: return content_type.lstrip().startswith('multipart') return False
def is_multipart(self): return 'Content-Disposition: form-data;' in self.request.raw_post_data
6559d6a839fa10f9de9cfb123de9b64455526010 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11777/6559d6a839fa10f9de9cfb123de9b64455526010/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 16404, 12, 2890, 4672, 327, 296, 1350, 17, 15087, 30, 646, 17, 892, 4359, 316, 365, 18, 2293, 18, 1899, 67, 2767, 67, 892, 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, 353, 67, 16404, 12, 2890, 4672, 327, 296, 1350, 17, 15087, 30, 646, 17, 892, 4359, 316, 365, 18, 2293, 18, 1899, 67, 2767, 67, 892, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
catalog = Catalog(msgid_bugs_address=options.msgid_bugs_address,
catalog = Catalog(project=options.project, version=options.version, msgid_bugs_address=options.msgid_bugs_address,
def extract(self, argv): """Subcommand for extracting messages from source files and generating a POT file.
a9c45e207bf54bcb76e8c85e6f6d9fd83cdb1329 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8909/a9c45e207bf54bcb76e8c85e6f6d9fd83cdb1329/frontend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 12, 2890, 16, 5261, 4672, 3536, 1676, 3076, 364, 27117, 2743, 628, 1084, 1390, 471, 12516, 279, 453, 1974, 585, 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, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2608, 12, 2890, 16, 5261, 4672, 3536, 1676, 3076, 364, 27117, 2743, 628, 1084, 1390, 471, 12516, 279, 453, 1974, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
datetime = datetime.strptime(self.name, DHM_FORMAT) return datetime.strftime(self.lang_obj.date_format+ " " + self.lang_obj.time_format)
return datetime.strptime(self.name, DHM_FORMAT)\ .strftime("%s %s"%(self.lang_obj.date_format, self.lang_obj.time_format))
def __str__(self): if self.val: if getattr(self,'name', None): datetime = datetime.strptime(self.name, DHM_FORMAT) return datetime.strftime(self.lang_obj.date_format+ " " + self.lang_obj.time_format) return self.val
210ac606ae7f6d18cdaa1481c64d189f0ac6983d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/210ac606ae7f6d18cdaa1481c64d189f0ac6983d/report_sxw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 309, 365, 18, 1125, 30, 309, 3869, 12, 2890, 11189, 529, 2187, 599, 4672, 327, 3314, 18, 701, 10650, 12, 2890, 18, 529, 16, 24141, 49, 67, 7254, 5153, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 701, 972, 12, 2890, 4672, 309, 365, 18, 1125, 30, 309, 3869, 12, 2890, 11189, 529, 2187, 599, 4672, 327, 3314, 18, 701, 10650, 12, 2890, 18, 529, 16, 24141, 49, 67, 7254, 5153, ...
mod = imp.load_module(package, fp, path, desc)
mod = imp.load_module(package, fp, path, desc)
def check_packages(): import sys, time le=30 startstr = "Performing JModelica package check" sys.stdout.write("\n") sys.stdout.write(startstr+" \n") sys.stdout.write("="*len(startstr)) sys.stdout.write("\n\n") sys.stdout.flush() time.sleep(0.25) # check os platform = sys.platform sys.stdout.write("%s %s" %("Platform".ljust(le,'.'),(str(platform)).ljust(le)+"\n\n")) sys.stdout.flush() time.sleep(0.25) #check python version pyversion = sys.version.partition(" ")[0] sys.stdout.write("%s %s" % ("Python version:".ljust(le,'.'),pyversion.ljust(le))) sys.stdout.write("\n\n") sys.stdout.flush() time.sleep(0.25) #check jmodelica version jmversion = jmodelica.__version__ sys.stdout.write("%s %s" % ("JModelica version:".ljust(le,'.'),jmversion.ljust(le))) sys.stdout.write("\n") sys.stdout.flush() time.sleep(0.25) import imp # Test dependencies sys.stdout.write("\n\n") sys.stdout.write("Dependencies: \n\n".rjust(0)) modstr="Package" verstr="Version" sys.stdout.write("%s %s" % (modstr.ljust(le), verstr.ljust(le))) sys.stdout.write("\n") sys.stdout.write("%s %s" % (("-"*len(modstr)).ljust(le), ("-"*len(verstr)).ljust(le))) sys.stdout.write("\n") packages=["numpy", "scipy", "matplotlib", "jpype", "lxml", "nose", "assimulo"] assimulo_path=os.path.join(jmodelica.environ['JMODELICA_HOME'],'Python','assimulo') if platform == "win32": packages.append("pyreadline") error_packages=[] warning_packages=[] fp = None for package in packages: try: vers="--" if package=='assimulo': fp, path, desc = imp.find_module('problem', [assimulo_path]) else: fp, path, desc = imp.find_module(package) mod = imp.load_module(package, fp, path, desc) try: if package == "pyreadline": vers = mod.release.version elif package == "lxml": from lxml import etree vers = etree.__version__ else: vers = mod.__version__ except AttributeError, e: pass sys.stdout.write("%s %s %s" %(package.ljust(le,'.'), vers.ljust(le), "Ok".ljust(le))) except ImportError, e: if package == "nose" or package == "assimulo": sys.stdout.write("%s %s %s" % (package.ljust(le,'.'), vers.ljust(le), "Package missing - Warning issued, see details below".ljust(le))) warning_packages.append(package) else: sys.stdout.write("%s %s %s " % (package.ljust(le,'.'), vers.ljust(le), "Package missing - Error issued, see details below.".ljust(le))) error_packages.append(package) pass finally: if fp: fp.close() sys.stdout.write("\n") sys.stdout.flush() time.sleep(0.25) # Write errors and warnings # are there any errors? if len(error_packages) > 0: sys.stdout.write("\n") errtitle = "Errors" sys.stdout.write("\n") sys.stdout.write(errtitle+" \n") sys.stdout.write("-"*len(errtitle)) sys.stdout.write("\n\n") sys.stdout.write("The packages: \n\n") for er in error_packages: sys.stdout.write(" - "+str(er)) sys.stdout.write("\n") sys.stdout.write("\n") sys.stdout.write("could not be found. It is not possible to run \ the jmodelica package without them.\n") if len(warning_packages) > 0: sys.stdout.write("\n") wartitle = "Warnings" sys.stdout.write("\n") sys.stdout.write(wartitle+" \n") sys.stdout.write("-"*len(wartitle)) sys.stdout.write("\n\n") for w in warning_packages: if w == 'assimulo': sys.stdout.write("** The package assimulo could not be found. \n \ This package is needed to be able to use: \n\n \
cbb3ce216b59cac67ff95e6add4bf5b6789a1141 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7711/cbb3ce216b59cac67ff95e6add4bf5b6789a1141/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 10308, 13332, 1930, 2589, 16, 813, 884, 33, 5082, 787, 701, 273, 315, 4990, 310, 804, 1488, 26433, 2181, 866, 6, 2589, 18, 10283, 18, 2626, 31458, 82, 7923, 2589, 18, 10283, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 866, 67, 10308, 13332, 1930, 2589, 16, 813, 884, 33, 5082, 787, 701, 273, 315, 4990, 310, 804, 1488, 26433, 2181, 866, 6, 2589, 18, 10283, 18, 2626, 31458, 82, 7923, 2589, 18, 10283, 1...
self = numpy.asarray(input_array).view(FortranArray)
self = numpy.asarray(input_array) if isinstance(input_array,tuple) or isinstance(input_array,list): self = self.transpose() self = self.view(FortranArray)
def __new__(cls, input_array=None, doc=None, transpose_on_print=False): """Construct a FortanArray from input_array
5447a65985b27540cf31abe349a10b767f6f417e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/5447a65985b27540cf31abe349a10b767f6f417e/farray.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 6429, 16, 810, 67, 1126, 33, 7036, 16, 997, 33, 7036, 16, 10411, 67, 265, 67, 1188, 33, 8381, 4672, 3536, 7249, 279, 478, 499, 304, 1076, 628, 810, 67, 1126, 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, 1001, 2704, 972, 12, 6429, 16, 810, 67, 1126, 33, 7036, 16, 997, 33, 7036, 16, 10411, 67, 265, 67, 1188, 33, 8381, 4672, 3536, 7249, 279, 478, 499, 304, 1076, 628, 810, 67, 1126, 2, ...
s2 += (1/(2*N.pi**2) * 1/(a*H)**2 * (2*(q**6/k**2) + 2.5*q**4 + 2*(k*q)**2) * phidot * dp1diff * dphi1)
s2 += (1/((a*H)**2) * (2*(q**6/k**2) + 2.5*q**4 + 2*(k*q)**2) * phidot * dp1diff * dphi1) s2 = s2 * (1/(2*N.pi**2))
def slowrollsrcterm(k, q, a, potentials, bgvars, fovars, s2shape): """Return unintegrated slow roll source term.""" #Unpack variables phi, phidot, H = bgvars U, dU, dU2, dU3 = potentials dphi1, dphi1dot, dp1diff, dp1dotdiff = fovars #Initialize result variable for k modes s2 = N.empty(s2shape) #Calculate unintegrated source term #First major term: s2 = (1/(2*N.pi**2) * (1/H**2) * (dU3 + 3*phidot*dU2) * q**2*dp1diff*dphi1) #Second major term: s2 += (1/(2*N.pi**2) * ((1/(a*H) + 0.5)*q**2 - 2*(q**4/k**2)) * dp1dotdiff * dphi1dot) #Third major term: s2 += (1/(2*N.pi**2) * 1/(a*H)**2 * (2*(q**6/k**2) + 2.5*q**4 + 2*(k*q)**2) * phidot * dp1diff * dphi1) return s2
65526a5660a1988f0e9748b5dba12bd61f029b26 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7283/65526a5660a1988f0e9748b5dba12bd61f029b26/sosource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11816, 2693, 11254, 299, 1035, 12, 79, 16, 1043, 16, 279, 16, 8555, 87, 16, 7611, 4699, 16, 18261, 4699, 16, 272, 22, 4867, 4672, 3536, 990, 640, 27423, 690, 11816, 5824, 1084, 2481, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11816, 2693, 11254, 299, 1035, 12, 79, 16, 1043, 16, 279, 16, 8555, 87, 16, 7611, 4699, 16, 18261, 4699, 16, 272, 22, 4867, 4672, 3536, 990, 640, 27423, 690, 11816, 5824, 1084, 2481, 1...
update_dict = orig.update except AttributeError:
self._dict[key] = val + orig except (KeyError, TypeError):
def Prepend(self, **kw): """Prepend values to existing construction variables in an Environment. """ kw = copy_non_reserved_keywords(kw) for key, val in kw.items(): # It would be easier on the eyes to write this using # "continue" statements whenever we finish processing an item, # but Python 1.5.2 apparently doesn't let you use "continue" # within try:-except: blocks, so we have to nest our code. try: orig = self._dict[key] except KeyError: # No existing variable in the environment, so just set # it to the new value. self._dict[key] = val else: try: # Most straightforward: just try to add them # together. This will work in most cases, when the # original and new values are of compatible types. self._dict[key] = val + orig except (KeyError, TypeError): try: # Try to update a dictionary value with another. # If orig isn't a dictionary, it won't have an # update() method; if val isn't a dictionary, # it won't have a keys() method. Either way, # it's an AttributeError. update_dict = orig.update except AttributeError: try: # Check if the added value is a list. add_to_val = val.append except AttributeError: # The added value isn't a list, but the # original is (by process of elimination), # so insert the the new value in the original # (if there's one to insert). if val: orig.insert(0, val) else: # The added value is a list, so append # the original to it (if there's a value # to append). if orig: add_to_val(orig) self._dict[key] = val else: try: update_dict(val) except (AttributeError, TypeError, ValueError): if SCons.Util.is_List(val): for v in val: orig[v] = None else: orig[val] = None self.scanner_map_delete(kw)
6eb6bfc602538556816dd676ea6fd12a6dbd6be1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12817/6eb6bfc602538556816dd676ea6fd12a6dbd6be1/Environment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28466, 12, 2890, 16, 2826, 9987, 4672, 3536, 24882, 924, 358, 2062, 16171, 3152, 316, 392, 7518, 18, 3536, 5323, 273, 1610, 67, 5836, 67, 18898, 67, 11771, 12, 9987, 13, 364, 498, 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, 28466, 12, 2890, 16, 2826, 9987, 4672, 3536, 24882, 924, 358, 2062, 16171, 3152, 316, 392, 7518, 18, 3536, 5323, 273, 1610, 67, 5836, 67, 18898, 67, 11771, 12, 9987, 13, 364, 498, 16, ...
self.name_output_file = job.tag_base + "-" + str(time) + ".tgz"
self.name_output_file = job.tag_base + "-" + repr(time) + ".tgz"
def __init__(self, dag, job, cp, opts, time, ifo, p_nodes=[], type="ht", variety="fg"):
6a0d2205ec2f7140b459b78cf45c546500409709 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6a0d2205ec2f7140b459b78cf45c546500409709/stfu_pipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 22940, 16, 1719, 16, 3283, 16, 1500, 16, 813, 16, 21479, 16, 293, 67, 4690, 22850, 6487, 618, 1546, 647, 3113, 1394, 14369, 1546, 2137, 6, 4672, 2, 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, 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, 22940, 16, 1719, 16, 3283, 16, 1500, 16, 813, 16, 21479, 16, 293, 67, 4690, 22850, 6487, 618, 1546, 647, 3113, 1394, 14369, 1546, 2137, 6, 4672, 2, -100,...
return webjournal_missing_info_box(self.ln,
return webjournal_templates.tmpl_webjournal_missing_info_box(self.ln,
def user_box(self): """ user-friendly message with formatting. """ _ = gettext_set_language(self.ln) return webjournal_missing_info_box(self.ln, _("Select a journal on this server"), _("We couldn't guess which journal you are looking for"), _("You did not provide an argument for a journal name. " "Please select the journal you want to read in the list below."))
71e3916e1f77352af2632a272e01d8bf90b6c8b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/71e3916e1f77352af2632a272e01d8bf90b6c8b9/webjournal_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 729, 67, 2147, 12, 2890, 4672, 3536, 729, 17, 29111, 883, 598, 10407, 18, 3536, 389, 273, 24972, 67, 542, 67, 4923, 12, 2890, 18, 2370, 13, 327, 732, 441, 7116, 67, 8502, 18, 24717, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2147, 12, 2890, 4672, 3536, 729, 17, 29111, 883, 598, 10407, 18, 3536, 389, 273, 24972, 67, 542, 67, 4923, 12, 2890, 18, 2370, 13, 327, 732, 441, 7116, 67, 8502, 18, 24717, ...
self.setRelayonly()
def onEmptyQueue(self): if self.state == connect: debug("connecting to " + self.conf_to + "uri: " + self.conf_uri) self.disconnectMedia() self.mute() self.setRelayonly() self.connectCallee(self.conf_to, self.conf_uri) self.state = connected if (self.conf_duration > 0): self.setTimer(CONF_TIMER, self.conf_duration)
e00be80f91981116a259b5218ee3197b04b7aff7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2213/e00be80f91981116a259b5218ee3197b04b7aff7/conf_auth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 1921, 3183, 12, 2890, 4672, 309, 365, 18, 2019, 422, 3077, 30, 1198, 2932, 3612, 310, 358, 315, 397, 365, 18, 3923, 67, 869, 397, 315, 1650, 30, 315, 397, 365, 18, 3923, 67, 165...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 603, 1921, 3183, 12, 2890, 4672, 309, 365, 18, 2019, 422, 3077, 30, 1198, 2932, 3612, 310, 358, 315, 397, 365, 18, 3923, 67, 869, 397, 315, 1650, 30, 315, 397, 365, 18, 3923, 67, 165...
fromAddr = self.userInfo.user.get_verifiedEmailAddresses()[0]
fromAddr = self.userInfo.user.get_defaultDeliveryEmailAddresses()[0]
def setUpWidgets(self, ignore_request=True): self.adapters = {} if self.userInfo.anonymous: fromAddr = '' else: fromAddr = self.userInfo.user.get_verifiedEmailAddresses()[0] data = { 'fromAddress': fromAddr, 'message': u'', 'sticky': self.topicSticky, } self.widgets = form.setUpWidgets( self.form_fields, self.prefix, self.context, self.request, form=self, data=data, ignore_request=ignore_request) assert self.widgets
3c0489723394a95461d9190f0ff3aea3198aa503 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6274/3c0489723394a95461d9190f0ff3aea3198aa503/topicView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 16166, 12, 2890, 16, 2305, 67, 2293, 33, 5510, 4672, 365, 18, 19195, 414, 273, 2618, 309, 365, 18, 1355, 966, 18, 19070, 30, 628, 3178, 273, 875, 469, 30, 628, 3178, 273, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 16166, 12, 2890, 16, 2305, 67, 2293, 33, 5510, 4672, 365, 18, 19195, 414, 273, 2618, 309, 365, 18, 1355, 966, 18, 19070, 30, 628, 3178, 273, 875, 469, 30, 628, 3178, 273, 365, ...
opcodes = diff2._get_opcodes(['A', 'B', ''], ['A', 'B'],
opcodes = Diff._get_opcodes(['A', 'B', ''], ['A', 'B'],
def test_delete_blank_line(self): opcodes = diff2._get_opcodes(['A', 'B', ''], ['A', 'B'], ignore_blank_lines=0) self.assertEqual(('equal', 0, 2, 0, 2), opcodes.next()) self.assertEqual(('delete', 2, 3, 2, 2), opcodes.next())
f0e6a3afeb9f648f246fa50a5aac86386a0128b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/f0e6a3afeb9f648f246fa50a5aac86386a0128b9/diff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3733, 67, 12111, 67, 1369, 12, 2890, 4672, 1061, 7000, 273, 13008, 6315, 588, 67, 556, 7000, 12, 3292, 37, 2187, 296, 38, 2187, 875, 6487, 10228, 37, 2187, 296, 38, 17337, 23...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3733, 67, 12111, 67, 1369, 12, 2890, 4672, 1061, 7000, 273, 13008, 6315, 588, 67, 556, 7000, 12, 3292, 37, 2187, 296, 38, 2187, 875, 6487, 10228, 37, 2187, 296, 38, 17337, 23...
if DEBUGON: printlog('o2tf.untar: Extraction ended.', logfile, 0, '')
t2 = time.time() printlog('o2tf.untar: Extraction elapsed time = %s' % \ (t2 - t1), logfile, 0, '') if DEBUGON: printlog('o2tf.untar: Extraction ended.', logfile, 0, '')
def untar(DEBUGON, destdir, tarfile, logfile): 'Untar into a destdir, the tarfile, logging the output into a logfile' 'For the moment, it only works with compressed tar files.' if DEBUGON: printlog('o2tf.untar: Started.', logfile, 0, '') import zipfile, os.path dirlog = os.path.dirname(logfile) nodename = str(socket.gethostname()) pid = os.getpid() tarlog = dirlog+'/tar_'+nodename+'_'+str(pid)+'.log' options = 'xvf'
657bfc37c22ea26052b0df161170cb3df469efec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1915/657bfc37c22ea26052b0df161170cb3df469efec/o2tf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 11718, 12, 9394, 673, 16, 1570, 1214, 16, 25857, 16, 15204, 4672, 296, 57, 496, 297, 1368, 279, 1570, 1214, 16, 326, 25857, 16, 2907, 326, 876, 1368, 279, 15204, 11, 296, 1290, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 640, 11718, 12, 9394, 673, 16, 1570, 1214, 16, 25857, 16, 15204, 4672, 296, 57, 496, 297, 1368, 279, 1570, 1214, 16, 326, 25857, 16, 2907, 326, 876, 1368, 279, 15204, 11, 296, 1290, 32...
if valueStr == self.zoomMenuWdg._items[0]:
if strVal == self.zoomMenuWdg._items[0]:
def doZoomMenu(self, *args): """Handle new selection from zoom menu.""" valueStr = self.zoomMenuWdg.getString() valueList = valueStr.split("/") if len(valueList) > 1: zoomFac = float(valueList[0]) / float(valueList[1]) else: zoomFac = int(valueList[0]) self.setZoom(zoomFac) # enable or disable zoom in/out widgets as appropriate if valueStr == self.zoomMenuWdg._items[0]: self.zoomInWdg["state"] = "normal" self.zoomOutWdg["state"] = "disabled" elif valueStr == self.zoomMenuWdg._items[-1]: self.zoomInWdg["state"] = "disabled" self.zoomOutWdg["state"] = "normal" else: self.zoomInWdg["state"] = "normal" self.zoomOutWdg["state"] = "normal"
f6acf1b41d9f8bc361017b632a5be4b62e606910 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6236/f6acf1b41d9f8bc361017b632a5be4b62e606910/GrayImageDispWdg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 11497, 4599, 12, 2890, 16, 380, 1968, 4672, 3536, 3259, 394, 4421, 628, 7182, 3824, 12123, 460, 1585, 273, 365, 18, 14932, 4599, 59, 72, 75, 18, 588, 780, 1435, 460, 682, 273, 460...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 741, 11497, 4599, 12, 2890, 16, 380, 1968, 4672, 3536, 3259, 394, 4421, 628, 7182, 3824, 12123, 460, 1585, 273, 365, 18, 14932, 4599, 59, 72, 75, 18, 588, 780, 1435, 460, 682, 273, 460...
typeobj = val[-1] utypeobj = uval[-1]
def _add_integer_aliases(): _ctypes = ['LONG', 'LONGLONG', 'INT', 'SHORT', 'BYTE'] for ctype in _ctypes: val = typeinfo[ctype] bits = val[2] intname = 'int%d' % bits UIntname = 'UInt%d' % bits Intname = 'Int%d' % bits uval = typeinfo['U'+ctype] if intname not in allTypes.keys(): uintname = 'uint%d' % bits typeobj = val[-1] utypeobj = uval[-1] allTypes[intname] = typeobj allTypes[uintname] = utypeobj typeDict[intname] = typeobj typeDict[uintname] = utypeobj typeDict[Intname] = typeobj typeDict[UIntname] = utypeobj typeNA[Intname] = typeobj typeNA[UIntname] = utypeobj typeNA[typeobj] = Intname typeNA[utypeobj] = UIntname typeNA[val[0]] = Intname typeNA[uval[0]] = UIntname else: typeNA[typeobj] = Intname typeNA[utypeobj] = UIntname typeNA[val[0]] = Intname typeNA[uval[0]] = UIntname
b865aac8749105b59fc8567790d2510cd4f0638f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/b865aac8749105b59fc8567790d2510cd4f0638f/numerictypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 7745, 67, 13831, 13332, 389, 299, 989, 273, 10228, 14639, 2187, 296, 14639, 14639, 2187, 296, 3217, 2187, 296, 15993, 2187, 296, 15377, 3546, 364, 11920, 316, 389, 299, 989,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1289, 67, 7745, 67, 13831, 13332, 389, 299, 989, 273, 10228, 14639, 2187, 296, 14639, 14639, 2187, 296, 3217, 2187, 296, 15993, 2187, 296, 15377, 3546, 364, 11920, 316, 389, 299, 989,...
pkey = getattr(c, '_patch', None)
pkey = models.Comment.patch.get_value_for_datastore(c)
def _get_draft_comments(request, issue, preview=False): """Helper to return objects to put() and a list of draft comments. If preview is True, the list of objects to put() is empty to avoid changes to the datastore. Args: request: Django Request object. issue: Issue instance. preview: Preview flag (default: False). Returns: 2-tuple (put_objects, comments). """ comments = [] tbd = [] # XXX Should request all drafts for this issue once, now we can. for patchset in issue.patchset_set.order('created'): ps_comments = list(models.Comment.gql( 'WHERE ANCESTOR IS :1 AND author = :2 AND draft = TRUE', patchset, request.user)) if ps_comments: patches = dict((p.key(), p) for p in patchset.patch_set) for p in patches.itervalues(): p.patchset = patchset for c in ps_comments: c.draft = False # XXX Using internal knowledge about db package: the key for # reference property foo is stored as _foo. pkey = getattr(c, '_patch', None) if pkey in patches: patch = patches[pkey] c.patch = patch if not preview: tbd.append(ps_comments) ps_comments.sort(key=lambda c: (c.patch.filename, not c.left, c.lineno, c.date)) comments += ps_comments return tbd, comments
ed11488e0b58873ee29c3dcbbd6476f14ee513e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/476/ed11488e0b58873ee29c3dcbbd6476f14ee513e4/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 17153, 67, 9231, 12, 2293, 16, 5672, 16, 10143, 33, 8381, 4672, 3536, 2276, 358, 327, 2184, 358, 1378, 1435, 471, 279, 666, 434, 12246, 5678, 18, 225, 971, 10143, 353, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 17153, 67, 9231, 12, 2293, 16, 5672, 16, 10143, 33, 8381, 4672, 3536, 2276, 358, 327, 2184, 358, 1378, 1435, 471, 279, 666, 434, 12246, 5678, 18, 225, 971, 10143, 353, 10...
bgimage.save(os.path.join(getTempPath(),"details-%s-f%06d.jpg" % (itemnum, framenum)),"JPEG",quality=90)
bgimage.save(os.path.join(getTempPath(),"details-%s-f%06d.jpg" % (itemnum, framenum)),"JPEG",quality=99)
def createDetailsPage(screensize, screendpi, numberofitems): """Creates all the necessary images and files for the details page.""" write( "Creating details pages") #Get the detailspage node (we must only have 1) detailnode=themeDOM.getElementsByTagName("detailspage") if detailnode.length!=1: fatalError("Cannot find detailspage element in theme file") detailnode=detailnode[0] #Get background image filename backgroundfilename = detailnode.attributes["background"].value if backgroundfilename=="": fatalError("Background image is not set in theme file") backgroundfilename = getThemeFile(themeName,backgroundfilename) write( "Background image file is %s" % backgroundfilename) if not doesFileExist(backgroundfilename): fatalError("Background image not found (%s)" % backgroundfilename) #Get menu music menumusic = "menumusic.ac3" if detailnode.hasAttribute("music"): menumusic = detailnode.attributes["music"].value #Get menu length menulength = 15 if detailnode.hasAttribute("length"): menulength = int(detailnode.attributes["length"].value) write("Music is %s, length is %s seconds" % (menumusic, menulength)) #Item counter to indicate current video item itemnum=1 while itemnum <= numberofitems: write( "Creating details page for %s" % itemnum) #make sure the preview folder is empty and present previewfolder = createEmptyPreviewFolder(itemnum) haspreview = False #and then generate the preview if required (px=9999 means not required) previewx, previewy, previeww, previewh, previewmask = generateVideoPreview(itemnum, 1, detailnode, 0, menulength, previewfolder) if previewx != 9999: haspreview = True #instead of loading the background image and drawing on it we now #make a transparent image and draw all items on it. This overlay #image is then added to the required background image when the #preview items are added (the reason for this is it will assist #if the background image is actually a video) overlayimage=Image.new("RGBA",screensize) draw=ImageDraw.Draw(overlayimage) spumuxdom = xml.dom.minidom.parseString('<subpictures><stream><spu force="yes" start="00:00:00.0" highlight="" select="" ></spu></stream></subpictures>') spunode = spumuxdom.documentElement.firstChild.firstChild drawThemeItem(0, 0, itemnum, detailnode, overlayimage, draw, None, None, "", spumuxdom, spunode, numberofitems, 0, "") #Save this details image bgimage=Image.open(backgroundfilename,"r").resize(screensize) bgimage.paste(overlayimage, (0,0), overlayimage) bgimage.save(os.path.join(getTempPath(),"details-%s.jpg" % itemnum),"JPEG", quality=90) if haspreview == True: numframes=secondsToFrames(menulength) #numframes should be the number of preview images that have been created write( "Generating the detail preview images" ) framenum = 0 while framenum < numframes: if previewx != 9999: previewpath = os.path.join(getItemTempPath(itemnum), "preview") previewfile = "preview-i%d-t1-f%d.jpg" % (1, framenum) imagefile = os.path.join(previewpath, previewfile) if doesFileExist(imagefile): picture = Image.open(imagefile, "r").resize((previeww, previewh)) picture = picture.convert("RGBA") imagemaskfile = os.path.join(previewpath, "mask-i%d.png" % 1) if previewmask != None: bgimage.paste(picture, (previewx, previewy), previewmask) else: bgimage.paste(picture, (previewx, previewy)) del picture bgimage.save(os.path.join(getTempPath(),"details-%s-f%06d.jpg" % (itemnum, framenum)),"JPEG",quality=90) framenum+=1 #Release large amounts of memory ASAP ! del draw del bgimage # always use the same aspect ratio as the video aspect_ratio='2' if getAspectRatioOfVideo(itemnum) > aspectRatioThreshold: aspect_ratio='3' #write( spumuxdom.toprettyxml()) WriteXMLToFile (spumuxdom,os.path.join(getTempPath(),"detailsspumux-%s.xml" % itemnum)) write("Encoding Details Page %s" % itemnum) if haspreview == True: encodeMenu(os.path.join(getTempPath(),"details-%s-f%%06d.jpg" % itemnum), os.path.join(getTempPath(),"temp.m2v"), getThemeFile(themeName,menumusic), menulength, os.path.join(getTempPath(),"temp.mpg"), "", os.path.join(getTempPath(),"details-%s.mpg" % itemnum), aspect_ratio) else: encodeMenu(os.path.join(getTempPath(),"details-%s.jpg" % itemnum), os.path.join(getTempPath(),"temp.m2v"), getThemeFile(themeName,menumusic), menulength, os.path.join(getTempPath(),"temp.mpg"), "", os.path.join(getTempPath(),"details-%s.mpg" % itemnum), aspect_ratio) #On to the next item itemnum+=1
c82d8a0c4a33fc669861191621297cdbb83d3d9b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13713/c82d8a0c4a33fc669861191621297cdbb83d3d9b/mythburn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 3790, 1964, 12, 1017, 266, 773, 554, 16, 888, 266, 409, 7259, 16, 1300, 792, 3319, 4672, 3536, 2729, 777, 326, 4573, 4602, 471, 1390, 364, 326, 3189, 1363, 12123, 225, 1045, 12, 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, 752, 3790, 1964, 12, 1017, 266, 773, 554, 16, 888, 266, 409, 7259, 16, 1300, 792, 3319, 4672, 3536, 2729, 777, 326, 4573, 4602, 471, 1390, 364, 326, 3189, 1363, 12123, 225, 1045, 12, 3...
ret = self.__unicode(orig, self.charset)
ret = self.__decode(orig)
def encode(self, orig): """ Encode an string @param orig: original string """ ret = '' try: ret = self.__force_decode(orig) except Exception: ret = self.__unicode(orig, self.charset) return ret
a312cd35820542b9a799600d2e2462b783f1cc99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2232/a312cd35820542b9a799600d2e2462b783f1cc99/charset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2890, 16, 1647, 4672, 3536, 6240, 392, 533, 225, 632, 891, 1647, 30, 2282, 533, 3536, 225, 325, 273, 875, 225, 775, 30, 325, 273, 365, 16186, 5734, 67, 3922, 12, 4949, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2890, 16, 1647, 4672, 3536, 6240, 392, 533, 225, 632, 891, 1647, 30, 2282, 533, 3536, 225, 325, 273, 875, 225, 775, 30, 325, 273, 365, 16186, 5734, 67, 3922, 12, 4949, 13, ...
if self.cache_requests :
if not self.cache_requests :
def flush_requests (self) : if self.cache_requests : return False elif self._server is not None : return self._server.flush_requests()
d50644715af0d89e6e4c88ad2c419a726446bfb5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/696/d50644715af0d89e6e4c88ad2c419a726446bfb5/xmlrpc_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3663, 67, 11420, 261, 2890, 13, 294, 309, 486, 365, 18, 2493, 67, 11420, 294, 327, 1083, 1327, 365, 6315, 3567, 353, 486, 599, 294, 327, 365, 6315, 3567, 18, 11330, 67, 11420, 1435, 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, 3663, 67, 11420, 261, 2890, 13, 294, 309, 486, 365, 18, 2493, 67, 11420, 294, 327, 1083, 1327, 365, 6315, 3567, 353, 486, 599, 294, 327, 365, 6315, 3567, 18, 11330, 67, 11420, 1435, 2,...
ref = args["ref"]()
def handler(self, **args): """ gets the factoid_value field from the database """ import string, database, time from irclib import Event, nm_to_n
e1e6b64160001d2d23ad7d039dc8a4073fa7d332 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10749/e1e6b64160001d2d23ad7d039dc8a4073fa7d332/factoids.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1838, 12, 2890, 16, 2826, 1968, 4672, 3536, 5571, 326, 5410, 839, 67, 1132, 652, 628, 326, 2063, 3536, 1930, 533, 16, 2063, 16, 813, 628, 9482, 830, 495, 1930, 2587, 16, 8442, 67, 869,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1838, 12, 2890, 16, 2826, 1968, 4672, 3536, 5571, 326, 5410, 839, 67, 1132, 652, 628, 326, 2063, 3536, 1930, 533, 16, 2063, 16, 813, 628, 9482, 830, 495, 1930, 2587, 16, 8442, 67, 869,...
from cjson import decode as json_decode
def json_safe (value, walked): t = type (value) if t in JSON_ATOMS: return value # JSON null, boolean, number and string _id = id (value) if _id in walked: return walked.add (_id) if t in JSON_ITERS: return [json_safe (v, walked) for v in value] # JSON array elif t == dict: return dict (( (unicode (k), json_safe (v, walked)) for k, v in value.items () )) # a Python dictionnary is a JSON object return repr (value)
c81917fca9677ed4081f24a7f03f8f2014768a2e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2577/c81917fca9677ed4081f24a7f03f8f2014768a2e/presto.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1163, 67, 4626, 261, 1132, 16, 5442, 329, 4672, 268, 273, 618, 261, 1132, 13, 309, 268, 316, 1796, 67, 28146, 55, 30, 327, 460, 468, 1796, 446, 16, 1250, 16, 1300, 471, 533, 225, 389...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1163, 67, 4626, 261, 1132, 16, 5442, 329, 4672, 268, 273, 618, 261, 1132, 13, 309, 268, 316, 1796, 67, 28146, 55, 30, 327, 460, 468, 1796, 446, 16, 1250, 16, 1300, 471, 533, 225, 389...
_cluster_index = PageTemplateFile('zpt/cluster_index', globals())
_cluster_index = ViewPageTemplateFile('zpt/cluster_index.zpt', globals())
def pin_add(self, latitude, longitude, REQUEST, type=None): """ """ lat, lon = float(latitude), float(longitude) author, session_key = self.get_author_and_session(REQUEST)
a922e36072d7253a4c0585510c2c58807a11552b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/a922e36072d7253a4c0585510c2c58807a11552b/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7092, 67, 1289, 12, 2890, 16, 8904, 16, 9192, 16, 12492, 16, 618, 33, 7036, 4672, 3536, 3536, 2516, 16, 4281, 273, 1431, 12, 16967, 3631, 1431, 12, 16867, 13, 2869, 16, 1339, 67, 856, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7092, 67, 1289, 12, 2890, 16, 8904, 16, 9192, 16, 12492, 16, 618, 33, 7036, 4672, 3536, 3536, 2516, 16, 4281, 273, 1431, 12, 16967, 3631, 1431, 12, 16867, 13, 2869, 16, 1339, 67, 856, ...
return urllib.unquote(generator.get_target_name(sound_file))
return unquote_filename(generator.get_target_name(sound_file))
def generate_filename(self, sound_file, for_display=False): self.gconf.clear_cache() output_type = self.get_string("output-mime-type") output_suffix = { "audio/x-vorbis": ".ogg", "audio/x-flac": ".flac", "audio/x-wav": ".wav", "audio/mpeg": ".mp3", }.get(output_type, None)
09d11eafe5574ef49cea28d423eaecccaff28a68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/09d11eafe5574ef49cea28d423eaecccaff28a68/soundconverter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 3459, 12, 2890, 16, 14190, 67, 768, 16, 364, 67, 5417, 33, 8381, 4672, 365, 18, 75, 3923, 18, 8507, 67, 2493, 1435, 876, 67, 723, 273, 365, 18, 588, 67, 1080, 2932, 2844, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2103, 67, 3459, 12, 2890, 16, 14190, 67, 768, 16, 364, 67, 5417, 33, 8381, 4672, 365, 18, 75, 3923, 18, 8507, 67, 2493, 1435, 876, 67, 723, 273, 365, 18, 588, 67, 1080, 2932, 2844, ...
self.setFilters(ftext)
self.setFilter(ftext)
def __init__(self, title='Choose Files', filters=[], add_all_files_filter=True, parent=None, modal = True, name = '', mode = QFileDialog.ExistingFiles, ): QFileDialog.__init__(self, parent) self.setModal(modal) global file_icon_provider if not file_icon_provider: file_icon_provider = FileIconProvider() if not self.iconProvider() is file_icon_provider: self.setIconProvider(file_icon_provider) settings = QSettings() _dir = settings.value(name, QVariant(os.path.expanduser("~"))).toString() self.setDirectory(_dir) ftext = '' if filters: for filter in filters: text, extensions = filter extensions = ['.'+i if not i.startswith('.') else i for i in extensions] ftext += '%s (%s);;'%(text, ' '.join(extensions)) if add_all_files_filter or not ftext: ftext += 'All files (*)' self.setFilters(ftext) self.setWindowTitle(title)
618cfd9772fa47114243a0b9559ba14117b3c911 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/618cfd9772fa47114243a0b9559ba14117b3c911/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2077, 2218, 24529, 6471, 2187, 3415, 22850, 6487, 527, 67, 454, 67, 2354, 67, 2188, 33, 5510, 16, 982, 33, 7036, 16, 13010, 273, 1053, 16, 508, 273, 1022...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2077, 2218, 24529, 6471, 2187, 3415, 22850, 6487, 527, 67, 454, 67, 2354, 67, 2188, 33, 5510, 16, 982, 33, 7036, 16, 13010, 273, 1053, 16, 508, 273, 1022...
opts, args = getopt.getopt(sys.argv[1:], "hc:vn:g:x:X:", ['help', 'conf=', 'verbose', 'node=', 'group=', 'exclude=', 'exclude-group=', 'unix', 'dry-run'])
opts, args = getopt.getopt(sys.argv[1:], "hc:vn:g:x:X:a", ['help', 'conf=', 'verbose', 'node=', 'group=', 'exclude=', 'exclude-group=', 'aggregate', 'unix', 'dry-run'])
def get_options(): global NODELIST, GROUPLIST, EXCLUDELIST, EXCLUDEGROUPS, REMOTE_CMD, MASTER_OPTS, OPT_AGGREGATE if len(sys.argv) <= 1: usage() sys.exit(1) try: opts, args = getopt.getopt(sys.argv[1:], "hc:vn:g:x:X:", ['help', 'conf=', 'verbose', 'node=', 'group=', 'exclude=', 'exclude-group=', 'unix', 'dry-run']) except getopt.error, (reason): print '%s: %s' % (os.path.basename(sys.argv[0]), reason)
c5c596fa0bf24e3aaadb103b82b30e28f2f1a162 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13401/c5c596fa0bf24e3aaadb103b82b30e28f2f1a162/synctool_ssh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2116, 13332, 2552, 11922, 7085, 16, 13839, 7085, 16, 5675, 14829, 7085, 16, 5675, 14829, 28977, 16, 29530, 67, 19473, 16, 27312, 67, 15620, 55, 16, 16456, 67, 1781, 43, 5937, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2116, 13332, 2552, 11922, 7085, 16, 13839, 7085, 16, 5675, 14829, 7085, 16, 5675, 14829, 28977, 16, 29530, 67, 19473, 16, 27312, 67, 15620, 55, 16, 16456, 67, 1781, 43, 5937, 17...
fp = tools.file_open(opj(modulename, pyfile))
fp = tools.file_open(pyfile)
def mergedict(a, b): a = a.copy() a.update(b) return a
b926a1eb35bab43952874a907b2dcb16f23db4cf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/b926a1eb35bab43952874a907b2dcb16f23db4cf/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5384, 933, 12, 69, 16, 324, 4672, 279, 273, 279, 18, 3530, 1435, 279, 18, 2725, 12, 70, 13, 327, 279, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5384, 933, 12, 69, 16, 324, 4672, 279, 273, 279, 18, 3530, 1435, 279, 18, 2725, 12, 70, 13, 327, 279, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"sdist_gna": SDistGna})
"sdist_gna": SDistGna},)
def run(self):
db0a16bb80b05ae5107db243b42aa230a3f39f41 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12852/db0a16bb80b05ae5107db243b42aa230a3f39f41/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
ref.modelChanged(changed)
retVal.append(ref.modelChanged(changed))
def notify(self, changed=None): """ Notify all views that something was changed on me. Passing a dictionary of {'attribute': 'new value'} in changed will pass this dictionary to the view for increased performance. If you don't want to do this, don't, and just use the traditional MVC paradigm of querying the model for things you're interested in. """ if changed is None: changed = {} for view in self.views: ref = view() if ref is not None: ref.modelChanged(changed) for key, value in self.subviews.items(): if changed.has_key(key): for item in value: ref = item() if ref is not None: ref.modelChanged(changed)
3b2af123838317ef6e2122b9ccd5775201cf3c94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3b2af123838317ef6e2122b9ccd5775201cf3c94/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 12, 2890, 16, 3550, 33, 7036, 4672, 3536, 10918, 777, 7361, 716, 5943, 1703, 3550, 603, 1791, 18, 31741, 279, 3880, 434, 13666, 4589, 4278, 296, 2704, 460, 11, 97, 316, 3550, 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, 5066, 12, 2890, 16, 3550, 33, 7036, 4672, 3536, 10918, 777, 7361, 716, 5943, 1703, 3550, 603, 1791, 18, 31741, 279, 3880, 434, 13666, 4589, 4278, 296, 2704, 460, 11, 97, 316, 3550, 903, ...