rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
tool = tool_dict[name]
if not kw: tool = tool_dict[name] else: Debug("Existing tool not used because keywords were given.")
def _Tool(env, tool, toolpath=None, **kw): Debug("eol_scons.Tool(%s,%s)" % (env.Dir('.'), tool)) name = str(tool) if SCons.Util.is_String(tool): name = env.subst(tool) tool = None # The canonical name we use for a tool is all lower case, with # any leading PKG_ stripped off... name = name.strip().replace("PKG_", "", 1).lower() # Is the tool already in our tool dictionary? if tool_dict.has_key(name): Debug("Found tool %s already loaded" % name) tool = tool_dict[name] # Check if this tool is actually an exported tool function, in # which case return the exported function. First check for the # tool under the given name. For historical reasons, we look also # look for the tool with: # o the canonical name # o canonical name converted to upper case, with PKG_ prepended # if not already there if not tool: pkgName = "PKG_" + name.upper() for tname in [name, pkgName]: if global_exports.has_key(tname): tool = global_exports[tname] break if tool: Debug("Found tool %s in global_exports (as %s)" % (name, tname)) # See if there's a file named "tool_<tool>.py" somewhere under the # top directory. If we find one, load it as a SCons script which # should define and export the tool. if not tool: matchList = _findToolFile(env, name) # If we got a match, load it if (len(matchList) > 0): # If we got more than one match, complain... if (len(matchList) > 1): print("Warning: multiple tool files for " + name + ": " + str(matchList) + ", using the first one") # Load the first match toolScript = matchList[0] env.SConscript(toolScript) # After loading the script, make sure the tool appeared # in the global exports list. if global_exports.has_key(name): tool = global_exports[name] else: raise SCons.Errors.StopError, "Tool error: " + \ toolScript + " does not export symbol '" + name + "'" # Still nothing? Go back to default SCons tool behavior... if not tool: Debug("Loading tool: %s" % name) if toolpath is None: toolpath = env.get('toolpath', []) toolpath = map(env._find_toolpath_dir, toolpath) try: tool = apply(SCons.Tool.Tool, (name, toolpath), kw) except: raise SCons.Errors.StopError, "Cannot find required tool: "+ \ name + "\n" + ''.join(traceback.format_stack()) Debug("Tool loaded: %s" % name) tool_dict[name] = tool Debug("CPPPATH before applying %s: %s" % (name, ",".join(env.get('CPPPATH', [])))) Debug("CCFLAGS before applying %s: %s" % (name, ",".join(env.get('CCFLAGS', [])))) tool(env) Debug("CPPPATH after applying %s: %s" % (name, ",".join(env.get('CPPPATH', [])))) Debug("CCFLAGS before applying %s: %s" % (name, ",".join(env.get('CCFLAGS', [])))) return tool
ad3068343f6e0b30b6e61c2512b344201aff1f85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1466/ad3068343f6e0b30b6e61c2512b344201aff1f85/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6364, 12, 3074, 16, 5226, 16, 5226, 803, 33, 7036, 16, 2826, 9987, 4672, 4015, 2932, 30951, 67, 87, 8559, 18, 6364, 9275, 87, 15529, 87, 2225, 738, 261, 3074, 18, 1621, 2668, 1093...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6364, 12, 3074, 16, 5226, 16, 5226, 803, 33, 7036, 16, 2826, 9987, 4672, 4015, 2932, 30951, 67, 87, 8559, 18, 6364, 9275, 87, 15529, 87, 2225, 738, 261, 3074, 18, 1621, 2668, 1093...
exclude_list += find_tests(test_dir, arg)
exclude_list += find_tests(test_dir, exclude)
def run_tests(tests, test_dir, lib_dir): pb = None if not OPTIONS.hide_progress and not OPTIONS.show_cmd: try: from progressbar import ProgressBar pb = ProgressBar('', len(tests), 13) except ImportError: pass failures = [] complete = False try: for i, test in enumerate(tests): ok, out, err = run_test(test, lib_dir) if not ok: failures.append(test.path) if OPTIONS.tinderbox: if ok: print('TEST-PASS | trace-test.py | %s'%test.path) else: lines = [ _ for _ in out.split('\n') + err.split('\n') if _ != '' ] if len(lines) >= 1: msg = lines[-1] else: msg = '' print('TEST-UNEXPECTED-FAIL | trace-test.py | %s: %s'% (test, msg)) n = i + 1 if pb: pb.label = '[%3d|%3d|%3d]'%(n - len(failures), len(failures), n) pb.update(n) complete = True except KeyboardInterrupt: pass if pb: pb.finish() if failures: if OPTIONS.write_failures: try: out = open(OPTIONS.write_failures, 'w') for test in failures: out.write(os.path.relpath(test, test_dir) + '\n') out.close() except IOError: sys.stderr.write("Exception thrown trying to write failure file '%s'\n"% OPTIONS.write_failures) traceback.print_exc() sys.stderr.write('---\n') print('FAILURES:') for test in failures: if OPTIONS.show_failed: print(' ' + subprocess.list2cmdline(get_test_cmd(test, lib_dir))) else: print(' ' + test) else: print('PASSED ALL' + ('' if complete else ' (partial run -- interrupted by user)'))
47fed6158b4e051082b997ba2a2fa84ec9b1ac07 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/47fed6158b4e051082b997ba2a2fa84ec9b1ac07/trace-test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 16341, 12, 16341, 16, 1842, 67, 1214, 16, 2561, 67, 1214, 4672, 6386, 273, 599, 309, 486, 16726, 18, 11248, 67, 8298, 471, 486, 16726, 18, 4500, 67, 4172, 30, 775, 30, 628, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 16341, 12, 16341, 16, 1842, 67, 1214, 16, 2561, 67, 1214, 4672, 6386, 273, 599, 309, 486, 16726, 18, 11248, 67, 8298, 471, 486, 16726, 18, 4500, 67, 4172, 30, 775, 30, 628, ...
request.add_header('Accept-encoding', 'gzip')
def download_image_to_filename(self, artist, album, dest_filename, all_images=False, populate_imagelist=False): # Returns False if no images found imgfound = False if len(artist) == 0 and len(album) == 0: self.downloading_image = False return imgfound try: self.downloading_image = True artist = urllib.quote(artist) album = urllib.quote(album) amazon_key = "12DR2PGAQT303YTEWP02" search_url = "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=" + amazon_key + "&Operation=ItemSearch&SearchIndex=Music&Artist=" + artist + "&ResponseGroup=Images&Keywords=" + album request = urllib2.Request(search_url) request.add_header('Accept-encoding', 'gzip') opener = urllib2.build_opener() f = opener.open(request).read() curr_pos = 200 # Skip header.. # Check if any results were returned; if not, search # again with just the artist name: img_url = f[f.find("<URL>", curr_pos)+len("<URL>"):f.find("</URL>", curr_pos)] if len(img_url) == 0: search_url = "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=" + amazon_key + "&Operation=ItemSearch&SearchIndex=Music&Artist=" + artist + "&ResponseGroup=Images" request = urllib2.Request(search_url) request.add_header('Accept-encoding', 'gzip') opener = urllib2.build_opener() f = opener.open(request).read() img_url = f[f.find("<URL>", curr_pos)+len("<URL>"):f.find("</URL>", curr_pos)] # And if that fails, try one last time with just the album name: if len(img_url) == 0: search_url = "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=" + amazon_key + "&Operation=ItemSearch&SearchIndex=Music&ResponseGroup=Images&Keywords=" + album request = urllib2.Request(search_url) request.add_header('Accept-encoding', 'gzip') opener = urllib2.build_opener() f = opener.open(request).read() img_url = f[f.find("<URL>", curr_pos)+len("<URL>"):f.find("</URL>", curr_pos)] if all_images: curr_img = 1 img_url = " " if len(img_url) == 0: self.downloading_image = False return imgfound while len(img_url) > 0 and curr_pos > 0: img_url = "" curr_pos = f.find("<LargeImage>", curr_pos+10) img_url = f[f.find("<URL>", curr_pos)+len("<URL>"):f.find("</URL>", curr_pos)] if len(img_url) > 0: if self.stop_art_update: self.downloading_image = False return imgfound dest_filename_curr = dest_filename.replace("<imagenum>", str(curr_img)) urllib.urlretrieve(img_url, dest_filename_curr) if populate_imagelist: # This populates self.imagelist for the remote image window if os.path.exists(dest_filename_curr): pix = gtk.gdk.pixbuf_new_from_file(dest_filename_curr) pix = pix.scale_simple(148, 148, gtk.gdk.INTERP_HYPER) pix = self.pixbuf_add_border(pix) if self.stop_art_update: self.downloading_image = False return imgfound self.imagelist.append([curr_img, pix, ""]) del pix self.remotefilelist.append(dest_filename_curr) imgfound = True if curr_img == 1: self.allow_art_search = True self.change_cursor(None) curr_img += 1 # Skip the next LargeImage: curr_pos = f.find("<LargeImage>", curr_pos+10) else: curr_pos = f.find("<LargeImage>", curr_pos+10) img_url = f[f.find("<URL>", curr_pos)+len("<URL>"):f.find("</URL>", curr_pos)] if len(img_url) > 0: urllib.urlretrieve(img_url, dest_filename) imgfound = True except: pass self.downloading_image = False return imgfound
f7e988356c96569ba6d4fa073362352bd5f4777e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/f7e988356c96569ba6d4fa073362352bd5f4777e/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 67, 2730, 67, 869, 67, 3459, 12, 2890, 16, 15469, 16, 14844, 16, 1570, 67, 3459, 16, 777, 67, 7369, 33, 8381, 16, 6490, 67, 15374, 5449, 33, 8381, 4672, 468, 2860, 1083, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 67, 2730, 67, 869, 67, 3459, 12, 2890, 16, 15469, 16, 14844, 16, 1570, 67, 3459, 16, 777, 67, 7369, 33, 8381, 16, 6490, 67, 15374, 5449, 33, 8381, 4672, 468, 2860, 1083, 309, 1...
>
:>
def groebner_basis(self, tailreduce=False, reduced=True, algorithm=None, report=None, use_full_group=False): """ Return a symmetric Groebner basis (type :class:`~sage.structure.sequence.Sequence`) of self.
0e5d6e7d1afde58ee9b2643b8bcba44883be9afc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/0e5d6e7d1afde58ee9b2643b8bcba44883be9afc/symmetric_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 303, 24008, 1224, 67, 23774, 12, 2890, 16, 5798, 12498, 33, 8381, 16, 13162, 33, 5510, 16, 4886, 33, 7036, 16, 2605, 33, 7036, 16, 999, 67, 2854, 67, 1655, 33, 8381, 4672, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 303, 24008, 1224, 67, 23774, 12, 2890, 16, 5798, 12498, 33, 8381, 16, 13162, 33, 5510, 16, 4886, 33, 7036, 16, 2605, 33, 7036, 16, 999, 67, 2854, 67, 1655, 33, 8381, 4672, 3536, ...
if not (tag.startswith("~
if not (tag.startswith("~ or tag in tags):
def __update_song(klass, library, songs, model): print_d("Updating tag model for %d songs" % len(songs)) for song in songs: for tag in song.keys(): if not (tag.startswith("~#") or tag in formats.MACHINE_TAGS): klass.__tags.add(tag) model.append([tag]) print_d("Done updating tag model for %d songs" % len(songs))
84d890cd964bd6631e67aedf378f6cae3c62e8c3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4764/84d890cd964bd6631e67aedf378f6cae3c62e8c3/completion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2725, 67, 816, 75, 12, 22626, 16, 5313, 16, 272, 7260, 16, 938, 4672, 1172, 67, 72, 2932, 17858, 1047, 938, 364, 738, 72, 272, 7260, 6, 738, 562, 12, 816, 564, 3719, 364, 17180...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2725, 67, 816, 75, 12, 22626, 16, 5313, 16, 272, 7260, 16, 938, 4672, 1172, 67, 72, 2932, 17858, 1047, 938, 364, 738, 72, 272, 7260, 6, 738, 562, 12, 816, 564, 3719, 364, 17180...
if type(abf) not in (TupleType,ListType): abf = abf, abf
def _setRange(self, dataSeries): """Set minimum and maximum axis values.
cb9c8bccd0f2cb02c44c49194ae23f96ecd5fc63 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/cb9c8bccd0f2cb02c44c49194ae23f96ecd5fc63/axes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 2655, 12, 2890, 16, 501, 6485, 4672, 3536, 694, 5224, 471, 4207, 2654, 924, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 2655, 12, 2890, 16, 501, 6485, 4672, 3536, 694, 5224, 471, 4207, 2654, 924, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
tooltip = goocanvas.Text(x= rightx + 20, y = righty, font = "Sans 9",
tooltip = goocanvas.Group() tiptext = goocanvas.Text(x= rightx + 20, y = righty, font = "Sans 9",
def _makePads(self): "Creates a Group containing individual pad widgets" #TODO: color code based on caps pgroup = goocanvas.Group() pgroup lefty = 109 righty = 109 leftx = 109 rightx = 191 factory = self.element.get_factory() templist = factory.get_static_pad_templates() #workaround for empty elements #if not padlist: # return pgroup #TODO: clean and optimize this loop for template in templist: #add any not yet existing pads using templates pad = self.element.get_pad(template.name_template) if not pad: pad = gst.pad_new_from_static_template(template, template.name_template) self.element.add_pad(pad)
93da486052dd150c82365a0d2abe5f1fc432a88a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2689/93da486052dd150c82365a0d2abe5f1fc432a88a/gsteditorelement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 14878, 87, 12, 2890, 4672, 315, 2729, 279, 3756, 4191, 7327, 4627, 10965, 6, 468, 6241, 30, 2036, 981, 2511, 603, 15788, 293, 1655, 273, 1960, 504, 304, 4423, 18, 1114, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6540, 14878, 87, 12, 2890, 4672, 315, 2729, 279, 3756, 4191, 7327, 4627, 10965, 6, 468, 6241, 30, 2036, 981, 2511, 603, 15788, 293, 1655, 273, 1960, 504, 304, 4423, 18, 1114, 1435, ...
sage: print B
sage: B
def is_completable(self): """ Returns True if the partial latin square can be completed to a latin square.
494f2bd1cd82ea9dcc25f8e258b7375812aed1c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/494f2bd1cd82ea9dcc25f8e258b7375812aed1c9/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 7806, 429, 12, 2890, 4672, 3536, 2860, 1053, 309, 326, 4702, 30486, 8576, 848, 506, 5951, 358, 279, 30486, 8576, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 7806, 429, 12, 2890, 4672, 3536, 2860, 1053, 309, 326, 4702, 30486, 8576, 848, 506, 5951, 358, 279, 30486, 8576, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.EyeTransform.connect_from(display.head_sensor_1.Matrix)
self.EyeTransform.connect_from(avango.display.head_sensor_1.Matrix)
def evaluate(self): global _display_type if self.related_user == "1" and (self.UserSelector.value == "1" or self.UserSelector.value == ""): self.Window.value = _windows[0] if _display_type == "TwoView": self.EyeTransform.connect_from(display.head_sensor_1.Matrix) else: self.EyeTransform.value = avango.osg.make_trans_mat(_eye_vec)
9cf305e734209ec70199fcbfcc5848060db7d84a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8421/9cf305e734209ec70199fcbfcc5848060db7d84a/_display.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5956, 12, 2890, 4672, 2552, 389, 5417, 67, 723, 309, 365, 18, 9243, 67, 1355, 422, 315, 21, 6, 471, 261, 2890, 18, 1299, 4320, 18, 1132, 422, 315, 21, 6, 578, 365, 18, 1299, 4320, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5956, 12, 2890, 4672, 2552, 389, 5417, 67, 723, 309, 365, 18, 9243, 67, 1355, 422, 315, 21, 6, 471, 261, 2890, 18, 1299, 4320, 18, 1132, 422, 315, 21, 6, 578, 365, 18, 1299, 4320, ...
x = nx y = ny
ix = nix iy = niy
def followContour(siv, geomap, nodeLabel, h): pos = geomap.node(nodeLabel).position() x = round(pos[0]) y = round(pos[1]) poly = [pos] while True: npos, _ = predictorCorrectorStep(siv, pos, h, 1e-6) if not npos: return poly nx = int(npos[0]) ny = int(npos[1]) if nx != x or ny != y: # determine grid intersection diff = npos - pos if nx != x: intersectionX = round(npos[0]) intersectionY = pos[1]+(intersectionX-pos[0])*diff[1]/diff[0] else: intersectionY = round(npos[1]) intersectionX = pos[0]+(intersectionY-pos[1])*diff[0]/diff[1] intersection = Vector2(intersectionX, intersectionY) # connect to crossed Node node = geomap.nearestNode(intersection, 0.01) if node and node.label() == nodeLabel: # and len(poly) < 2: print "coming from node %d to %d, ignoring crossing, poly len: %d" \ % (nodeLabel, node.label(), len(poly)) pass elif node: poly.append(node.position()) print "added", geomap.addEdge(nodeLabel, node.label(), poly) if not node.degree() % 2: return poly = [node.position()] nodeLabel = node.label() else: sys.stderr.write("WARNING: level contour crossing grid at %s without intersection Node!\n" % repr(intersection)) x = nx y = ny poly.append(npos) pos = npos
06f56e130542a1c91cca5aded8b43db966347318 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/06f56e130542a1c91cca5aded8b43db966347318/levelcontours.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2805, 660, 477, 12, 87, 427, 16, 7364, 438, 16, 756, 2224, 16, 366, 4672, 949, 273, 7364, 438, 18, 2159, 12, 2159, 2224, 2934, 3276, 1435, 619, 273, 3643, 12, 917, 63, 20, 5717, 677,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2805, 660, 477, 12, 87, 427, 16, 7364, 438, 16, 756, 2224, 16, 366, 4672, 949, 273, 7364, 438, 18, 2159, 12, 2159, 2224, 2934, 3276, 1435, 619, 273, 3643, 12, 917, 63, 20, 5717, 677,...
times = windows_api.process_times(pid)
times = process_times(pid)
def get_process_cpu_time(pid): """ <Purpose> See process_times <Arguments> See process_times <Exceptions> See process_times <Returns> The amount of CPU time used by the kernel and user in seconds. """ # Get the times times = windows_api.process_times(pid) # Add kernel and user time together... It's in units of 100ns so divide # by 10,000,000 total_time = (times['KernelTime'] + times['UserTime'] ) / 10000000.0 return total_time
5706b0010d7e2585d47f61d4636ebbf842428207 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7263/5706b0010d7e2585d47f61d4636ebbf842428207/windows_api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2567, 67, 11447, 67, 957, 12, 6610, 4672, 3536, 411, 10262, 4150, 34, 2164, 1207, 67, 8293, 225, 411, 4628, 34, 2164, 1207, 67, 8293, 225, 411, 11416, 34, 2164, 1207, 67, 8293...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2567, 67, 11447, 67, 957, 12, 6610, 4672, 3536, 411, 10262, 4150, 34, 2164, 1207, 67, 8293, 225, 411, 4628, 34, 2164, 1207, 67, 8293, 225, 411, 11416, 34, 2164, 1207, 67, 8293...
raise RuntimeError("AudioStream.send_dtmf() may only be called in the ESTABLISHED state")
raise RuntimeError("AudioStream.send_dtmf() cannot be used in %s state" % self.state)
def send_dtmf(self, digit): with self._lock: if self.state != "ESTABLISHED": raise RuntimeError("AudioStream.send_dtmf() may only be called in the ESTABLISHED state") self._audio_transport.send_dtmf(digit)
ccfa66116990f7cfe516778f517971f455ae0db3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/ccfa66116990f7cfe516778f517971f455ae0db3/audiostream.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 7510, 16126, 12, 2890, 16, 8035, 4672, 598, 365, 6315, 739, 30, 309, 365, 18, 2019, 480, 315, 11027, 2090, 13462, 2056, 6877, 1002, 7265, 2932, 12719, 1228, 18, 4661, 67, 7510,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1366, 67, 7510, 16126, 12, 2890, 16, 8035, 4672, 598, 365, 6315, 739, 30, 309, 365, 18, 2019, 480, 315, 11027, 2090, 13462, 2056, 6877, 1002, 7265, 2932, 12719, 1228, 18, 4661, 67, 7510,...
def entry_cb(self, widget):
def _entry_cb(self, widget):
def entry_cb(self, widget): try: address = int(widget.get_text(), 16) except ValueError: ErrorDialog(widget.get_toplevel()).run("invalid address") return self.dump(address)
0e0984f57cbf375cc2813fe0509dc8425a475afc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2811/0e0984f57cbf375cc2813fe0509dc8425a475afc/debugui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4099, 67, 7358, 12, 2890, 16, 3604, 4672, 775, 30, 1758, 273, 509, 12, 6587, 18, 588, 67, 955, 9334, 2872, 13, 1335, 2068, 30, 1068, 6353, 12, 6587, 18, 588, 67, 3669, 2815, 143...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4099, 67, 7358, 12, 2890, 16, 3604, 4672, 775, 30, 1758, 273, 509, 12, 6587, 18, 588, 67, 955, 9334, 2872, 13, 1335, 2068, 30, 1068, 6353, 12, 6587, 18, 588, 67, 3669, 2815, 143...
except (threading.ThreadError, AssertionError, ValueError, SystemError), e:
except _ThreadInterruptionError, e:
def raise_exception(self, exc_type): """ Raise and exception in this thread. NOTE this is executed in the context of the calling thread and blocks until the exception has been delivered to this thread and this thread exists. """ # first, kill off all the descendants for thread in get_descendants(self): while thread.is_alive(): try: _raise_exception_in_thread(_tid(self), exc_type) time.sleep(self.__default_timeout) except (threading.ThreadError, AssertionError, ValueError, SystemError), e: _log.error('Failed to deliver exception %s to thread[%s]: %s' % (exc_type.__name__, str(self.ident), e.message)) break remove_subtree(self) # then kill and wait for the task thread while not self.__exception_event.is_set(): try: _raise_exception_in_thread(_tid(self), exc_type) self.__exception_event.wait(self.__default_timeout) except (threading.ThreadError, AssertionError, ValueError, SystemError), e: _log.error('Failed to deliver exception %s to thread[%s]: %s' % (exc_type.__name__, str(self.ident), e.message)) break
f77917bedf614ae1d5578db0777d40fbf9bec6e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/f77917bedf614ae1d5578db0777d40fbf9bec6e3/thread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1002, 67, 4064, 12, 2890, 16, 3533, 67, 723, 4672, 3536, 20539, 471, 1520, 316, 333, 2650, 18, 225, 5219, 333, 353, 7120, 316, 326, 819, 434, 326, 4440, 2650, 471, 4398, 3180, 326, 152...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1002, 67, 4064, 12, 2890, 16, 3533, 67, 723, 4672, 3536, 20539, 471, 1520, 316, 333, 2650, 18, 225, 5219, 333, 353, 7120, 316, 326, 819, 434, 326, 4440, 2650, 471, 4398, 3180, 326, 152...
assert hasattr(target, 'im_func'), """safeRef target %r has im_self, but no im_func, don't know how to create reference"""%( target,) reference = get_bound_method_weakref( target=target, onDelete=onDelete )
if not hasattr(target, 'im_func'): raise TypeError("safeRef target %r has im_self, but no" " im_func, don't know how to create reference" % (target, )) reference = get_bound_method_weakref(target=target, onDelete=onDelete)
def safeRef(target, onDelete = None): """Return a *safe* weak reference to a callable target target -- the object to be weakly referenced, if it's a bound method reference, will create a BoundMethodWeakref, otherwise creates a simple weakref. onDelete -- if provided, will have a hard reference stored to the callable to be called after the safe reference goes out of scope with the reference object, (either a weakref or a BoundMethodWeakref) as argument. """ if hasattr(target, 'im_self'): if target.im_self is not None: # Turn a bound method into a BoundMethodWeakref instance. # Keep track of these instances for lookup by disconnect(). assert hasattr(target, 'im_func'), """safeRef target %r has im_self, but no im_func, don't know how to create reference"""%( target,) reference = get_bound_method_weakref( target=target, onDelete=onDelete ) return reference if callable(onDelete): return weakref.ref(target, onDelete) else: return weakref.ref( target )
2244a06586e2150f40a14d7742fcc32f947dac81 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3115/2244a06586e2150f40a14d7742fcc32f947dac81/saferef.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4183, 1957, 12, 3299, 16, 20468, 273, 599, 4672, 3536, 990, 279, 380, 4626, 14, 16046, 2114, 358, 279, 4140, 1018, 225, 1018, 1493, 326, 733, 358, 506, 16046, 715, 8042, 16, 309, 518, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4183, 1957, 12, 3299, 16, 20468, 273, 599, 4672, 3536, 990, 279, 380, 4626, 14, 16046, 2114, 358, 279, 4140, 1018, 225, 1018, 1493, 326, 733, 358, 506, 16046, 715, 8042, 16, 309, 518, ...
signal.alarm(MAX_DURATION) vereq(signal.getsignal(signal.SIGHUP), handlerA) vereq(signal.getsignal(signal.SIGUSR1), handlerB) vereq(signal.getsignal(signal.SIGUSR2), signal.SIG_IGN) vereq(signal.getsignal(signal.SIGALRM), signal.default_int_handler)
def test_main(self): self.assertEquals(signal.getsignal(signal.SIGHUP), self.handlerA) self.assertEquals(signal.getsignal(signal.SIGUSR1), self.handlerB) self.assertEquals(signal.getsignal(signal.SIGUSR2), signal.SIG_IGN) self.assertEquals(signal.getsignal(signal.SIGALRM), signal.default_int_handler)
def force_test_exit(): # Sigh, both imports seem necessary to avoid errors. import os fork_pid = os.fork() if fork_pid: # In parent. return fork_pid # In child. import os, time try: # Wait 5 seconds longer than the expected alarm to give enough # time for the normal sequence of events to occur. This is # just a stop-gap to try to prevent the test from hanging. time.sleep(MAX_DURATION + 5) print >> sys.__stdout__, ' child should not have to kill parent' for signame in "SIGHUP", "SIGUSR1", "SIGUSR2", "SIGALRM": os.kill(pid, getattr(signal, signame)) print >> sys.__stdout__, " child sent", signame, "to", pid time.sleep(1) finally: os._exit(0)
0069567647481eda3a28530b4cd8342690dda319 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/0069567647481eda3a28530b4cd8342690dda319/test_signal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2944, 67, 3813, 67, 8593, 13332, 468, 348, 2031, 16, 3937, 10095, 19264, 4573, 358, 4543, 1334, 18, 1930, 1140, 12515, 67, 6610, 273, 1140, 18, 23335, 1435, 309, 12515, 67, 6610, 30, 468...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2944, 67, 3813, 67, 8593, 13332, 468, 348, 2031, 16, 3937, 10095, 19264, 4573, 358, 4543, 1334, 18, 1930, 1140, 12515, 67, 6610, 273, 1140, 18, 23335, 1435, 309, 12515, 67, 6610, 30, 468...
req.headers_out['Set-Cookie'] = 'session=%s; path=%s' % (sesskey, _config.WWW_ROOT_DIR)
if _config.WWW_ROOT_DIR == '': cookiepath = '/' else: cookiepath = _config.WWW_ROOT_DIR req.headers_out['Set-Cookie'] = 'session=%s; path=%s' % (sesskey, cookiepath)
def login(req, username = None, password = None, wid = None): if req.method != 'POST': joheaders.error_page(req, u"Vain POST-pyynnöt ovat sallittuja") return '\n' if username == None or password == None or not jotools.checkuname(unicode(username, 'UTF-8')): joheaders.error_page(req, u"Käyttäjätunnus tai salasana puuttuu tai käyttäjätunnus on väärin") return '\n' pwhash = sha.new(_config.PW_SALT + unicode(password, 'UTF-8')).hexdigest() db = jodb.connect_private() results = db.query(("select uid from appuser where uname = '%s' and pwhash = '%s' " + "and disabled = FALSE") % (username, pwhash)) if results.ntuples() == 0: joheaders.error_page(req, u"Käyttäjätunnus tai salasana on väärin") return '\n' uid = results.getresult()[0][0] # Generate session key sesssha = sha.new() sesssha.update(username) sesssha.update(pwhash) if hasattr(os, 'urandom'): # this is only available in Python >= 2.4 sesssha.update(os.urandom(15)) else: sesssha.update(`time.time()`) sesssha.update(`random.random()`) sesssha.update(`os.times()`) sesskey = sesssha.hexdigest() db.query(("update appuser set session_key = '%s', session_exp = CURRENT_TIMESTAMP + " + "interval '%i seconds' where uid = %i") % (sesskey, _config.SESSION_TIMEOUT, uid)) req.headers_out['Set-Cookie'] = 'session=%s; path=%s' % (sesskey, _config.WWW_ROOT_DIR) if wid == None: wid_n = 0 else: wid_n = jotools.toint(wid) if wid_n == 0: joheaders.redirect_header(req, _config.WWW_ROOT_DIR + u"/") else: joheaders.redirect_header(req, _config.WWW_ROOT_DIR + u"/word/edit?wid=%i" % wid_n) return "</html>"
c79bdb27b22b921072dcb5141c9b3623ebfd6fe1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10971/c79bdb27b22b921072dcb5141c9b3623ebfd6fe1/user.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 12, 3658, 16, 2718, 273, 599, 16, 2201, 273, 599, 16, 15481, 273, 599, 4672, 309, 1111, 18, 2039, 480, 296, 3798, 4278, 525, 83, 2485, 18, 1636, 67, 2433, 12, 3658, 16, 582, 6,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 12, 3658, 16, 2718, 273, 599, 16, 2201, 273, 599, 16, 15481, 273, 599, 4672, 309, 1111, 18, 2039, 480, 296, 3798, 4278, 525, 83, 2485, 18, 1636, 67, 2433, 12, 3658, 16, 582, 6,...
p = process.Process(*([None] * 7))
p = reactor.spawnProcess(protocol.ProcessProtocol(), "/bin/ls")
def testAliasResolution(self): aliases = {} domain = {'': TestDomain(aliases, ['user1', 'user2', 'user3'])} A1 = mail.alias.AliasGroup(['user1', '|process', '/file'], domain, 'alias1') A2 = mail.alias.AliasGroup(['user2', 'user3'], domain, 'alias2') A3 = mail.alias.AddressAlias('alias1', domain, 'alias3') aliases.update({ 'alias1': A1, 'alias2': A2, 'alias3': A3, })
f6ba434241b3eac97766197a2a435a66eefb340c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f6ba434241b3eac97766197a2a435a66eefb340c/test_mail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2936, 11098, 12, 2890, 4672, 6900, 273, 2618, 2461, 273, 13666, 4278, 7766, 3748, 12, 13831, 16, 10228, 1355, 21, 2187, 296, 1355, 22, 2187, 296, 1355, 23, 3546, 16869, 432, 21, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2936, 11098, 12, 2890, 4672, 6900, 273, 2618, 2461, 273, 13666, 4278, 7766, 3748, 12, 13831, 16, 10228, 1355, 21, 2187, 296, 1355, 22, 2187, 296, 1355, 23, 3546, 16869, 432, 21, 27...
enemy=self.enemy if (you.isNull()):
if (self.you.isNull()):
def loop (self): isSig=0 enemy=VS.Unit() if (self.you.isNull()): self.Lose (1) return if (self.arrived==3): enemy=self.enemy if (not self.istarget): curun=VS.getUnit(self.curiter) if (not enemy.isNull()): if (curun==enemy): enemy.setTarget(you) self.curiter+=1 if (you.isNull()): self.Lose(1) return if (enemy.isNull()): self.Win(you,1) return elif (self.arrived==2): if (VS.getSystemFile()==self.adjsys.DestinationSystem()): self.arrived=3 else: VS.ResetTimeCompression() enemy=self.enemy if (you.isNull()): Lose(1) return if (enemy.isNull()): Win(you,1) return elif (self.arrived==1): significant=self.significant if (significant.isNull ()): print "sig null" VS.terminateMission(0) else: if (you.getSignificantDistance(significant)<10000.0): if (self.newship==""): self.newship=faction_ships.getRandomFighter(faction) self.enemy=launch.launch_wave_around_unit("Base",self.faction,self.newship,"default",1+self.difficulty,3000.0,4000.0,self.significant) if (enemy): if (runaway): self.enemy.setTarget(significant) self.enemy.Jump() self.arrived=2 else: self.arrived=3 else: if (self.adjsys.Execute()): self.arrived=1 self.newship=faction_ships.getRandomFighter(faction) localdestination=self.significant.getName() self.adjsys=go_somewhere_significant(self.you,0,500) VS.IOmessage (0,"bounty mission",self.mplay,"You must destroy the %s unit in this system." % (self.newship)) self.obj=VS.addObjective("Destroy the %s unit" % (self.newship)) if (runaway): #ADD OTHER JUMPING IF STATEMENT CODE HERE VS.IOmessage (3,"bounty mission",self.mplay,"He is running towards the jump point. Catch him!") VS.IOmessage (4,"bounty mission",self.mplay,"he is going to %s" % (localdestination)) else: VS.IOmessage (3,"bounty mission",self.mplay,"Scanners are picking up a metallic object!") VS.IOmessage (4,"bounty mission",self.mplay,"Coordinates appear near %s" % (localdestination))
67129aa8b1059f1d5fdb82f847307b112960a727 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2883/67129aa8b1059f1d5fdb82f847307b112960a727/bounty.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 261, 2890, 4672, 353, 8267, 33, 20, 570, 351, 93, 33, 14640, 18, 2802, 1435, 309, 261, 2890, 18, 19940, 18, 291, 2041, 1435, 4672, 365, 18, 1504, 307, 261, 21, 13, 327, 309, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 261, 2890, 4672, 353, 8267, 33, 20, 570, 351, 93, 33, 14640, 18, 2802, 1435, 309, 261, 2890, 18, 19940, 18, 291, 2041, 1435, 4672, 365, 18, 1504, 307, 261, 21, 13, 327, 309, 26...
self.valueOf_ or
def hasContent_(self): if ( self.node or self.edge or self.set or self.valueOf_ or super(AbstractNetwork, self).hasContent_() ): return True else: return False
9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 1350, 67, 12, 2890, 4672, 309, 261, 365, 18, 2159, 578, 365, 18, 7126, 578, 365, 18, 542, 578, 2240, 12, 7469, 3906, 16, 365, 2934, 5332, 1350, 67, 1435, 262, 30, 327, 1053, 469...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 711, 1350, 67, 12, 2890, 4672, 309, 261, 365, 18, 2159, 578, 365, 18, 7126, 578, 365, 18, 542, 578, 2240, 12, 7469, 3906, 16, 365, 2934, 5332, 1350, 67, 1435, 262, 30, 327, 1053, 469...
ncc = H / (np.dot(sig1, sig2))
ncc = H / (np.dot(sig1, sig2))
def optimize_function(x, optfunc_args): """ cost = optimize_function(x, optfunc_args) --- OR --- cost, joint_histogram = optimize_function(x, optfunc_args) computes the alignment between 2 volumes using cross correlation or mutual information metrics. In both the 8 bit joint histogram of the 2 images is computed. The 8 bit scaling is done using an integrated histogram method and is called prior to this. Parameters ---------- x : {nd_array} this is the current (6-dim) array with 3 angles and 3 translations. optfunc_args : {tuple} this is a tuple of 8 elements that is formed in the scipy.optimize powell and cg (conjugate gradient) functions. this is why the elements need to be a tuple. The elements of optfunc_args are: image_F : {dictionary} image_F is the source image to be remapped during the registration. it is a dictionary with the data as an ndarray in the ['data'] component. image_G : {dictionary} image_G is the reference image that image_F gets mapped to. sample_vector : {nd_array} sample in x,y,x. should be (1,1,1) fwhm : {nd_array} Gaussian sigma do_lite : {0, 1} lite of 1 is to jitter both images during resampling. 0 is to not jitter. jittering is for non-aliased volumes. smooth : {0, 1} flag for joint histogram low pass filtering. 0 for no filter, 1 for do filter. method : {'nmi', 'mi', 'ncc', 'ecc', 'mse'} flag for type of registration metric. nmi is normalized mutual information; mi is mutual information; ecc is entropy cross correlation; ncc is normalized cross correlation. mse is mean square error. with mse there is no joint histogram. ret_histo : {0, 1} if 0 return is: cost if 0 return is: cost, joint_histogram Returns ------- cost : {float} the negative of one of the mutual information metrics or negative cross correlation. use negative as the optimization is minimization. --- OR --- (if ret_histo = 1) cost : {float} the negative of one of the mutual information metrics or negative cross correlation. use negative as the optimization is minimization. joint_histogram : {nd_array} the 2D (256x256) joint histogram of the two volumes Examples -------- >>> import numpy as NP >>> import _registration as reg >>> anat_desc = reg.load_anatMRI_desc() >>> image1 = reg.load_volume(anat_desc, imagename='ANAT1_V0001.img') >>> image2 = reg.load_volume(anat_desc, imagename='ANAT1_V0001.img') >>> imdata = reg.build_structs() >>> image1['fwhm'] = reg.build_fwhm(image1['mat'], imdata['step']) >>> image2['fwhm'] = reg.build_fwhm(image2['mat'], imdata['step']) >>> method = 'ncc' >>> lite = 1 >>> smhist = 0 >>> ret_histo = 1 >>> optfunc_args = (image1, image2, imdata['step'], imdata['fwhm'], lite, smhist, method, ret_histo) >>> x = np.zeros(6, dtype=np.float64) >>> return cost, joint_histogram = reg.optimize_function(x, optfunc_args) """ image_F = optfunc_args[0] image_G = optfunc_args[1] sample_vector = optfunc_args[2] fwhm = optfunc_args[3] do_lite = optfunc_args[4] smooth = optfunc_args[5] method = optfunc_args[6] ret_histo = optfunc_args[7] rot_matrix = build_rotate_matrix(x) cost = 0.0 epsilon = 2.2e-16 # image_G is base image # image_F is the to-be-rotated image # rot_matrix is the 4x4 constructed (current angles and translates) transform matrix # sample_vector is the subsample vector for x-y-z F_inv = np.linalg.inv(image_F['mat']) composite = np.dot(F_inv, image_G['mat']) composite = np.dot(composite, rot_matrix) if method == 'mse': # # mean squard error method # (layers, rows, cols) = image_F['data'].shape # allocate the zero image remap_image_F = np.zeros(layers*rows*cols, dtype=np.uint8).reshape(layers, rows, cols) imdata = build_structs() # trilinear interpolation mapping. reg.register_linear_resample(image_F['data'], remap_image_F, composite, imdata['step']) cost = (np.square(image_G['data']-remap_image_F)).mean() return cost else: # # histogram-based methods (nmi, ncc, mi, ecc) # # allocate memory for 2D histogram joint_histogram = np.zeros([256, 256], dtype=np.float64); if do_lite: reg.register_histogram_lite(image_F['data'], image_G['data'], composite, sample_vector, joint_histogram) else: reg.register_histogram(image_F['data'], image_G['data'], composite, sample_vector, joint_histogram) # smooth the histogram if smooth: p = np.ceil(2*fwhm[0]).astype(int) x = np.array(range(-p, p+1)) kernel1 = smooth_kernel(fwhm[0], x) p = np.ceil(2*fwhm[1]).astype(int) x = np.array(range(-p, p+1)) kernel2 = smooth_kernel(fwhm[1], x) output=None # 2D filter in 1D separable stages axis = 0 result = correlate1d(joint_histogram, kernel1, axis, output) axis = 1 joint_histogram = correlate1d(result, kernel1, axis, output) joint_histogram += epsilon # prevent log(0) # normalize the joint histogram joint_histogram /= joint_histogram.sum() # get the marginals marginal_col = joint_histogram.sum(axis=0) marginal_row = joint_histogram.sum(axis=1) if method == 'mi': # mutual information marginal_outer = np.outer(marginal_col, marginal_row) H = joint_histogram * np.log(joint_histogram / marginal_outer) mutual_information = H.sum() cost = -mutual_information elif method == 'ecc': # entropy correlation coefficient marginal_outer = np.outer(marginal_col, marginal_row) H = joint_histogram * np.log(joint_histogram / marginal_outer) mutual_information = H.sum() row_entropy = marginal_row * np.log(marginal_row) col_entropy = marginal_col * np.log(marginal_col) ecc = -2.0*mutual_information/(row_entropy.sum() + col_entropy.sum()) cost = -ecc elif method == 'nmi': # normalized mutual information row_entropy = marginal_row * np.log(marginal_row) col_entropy = marginal_col * np.log(marginal_col) H = joint_histogram * np.log(joint_histogram) nmi = (row_entropy.sum() + col_entropy.sum()) / (H.sum()) cost = -nmi elif method == 'ncc': # cross correlation from the joint histogram r, c = joint_histogram.shape i = np.array(range(1,c+1)) j = np.array(range(1,r+1)) m1 = (marginal_row * i).sum() m2 = (marginal_col * j).sum() sig1 = np.sqrt((marginal_row*(np.square(i-m1))).sum()) sig2 = np.sqrt((marginal_col*(np.square(j-m2))).sum()) [a, b] = np.mgrid[1:c+1, 1:r+1] a = a - m1 b = b - m2 # element multiplies in the joint histogram and grids H = ((joint_histogram * a) * b).sum() ncc = H / (np.dot(sig1, sig2)) cost = -ncc if ret_histo: return cost, joint_histogram else: return cost
a0a06507bdbd3322039b726463a7cc1c63e59774 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/a0a06507bdbd3322039b726463a7cc1c63e59774/_registration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 67, 915, 12, 92, 16, 2153, 644, 67, 1968, 4672, 3536, 6991, 273, 10979, 67, 915, 12, 92, 16, 2153, 644, 67, 1968, 13, 565, 9948, 4869, 9948, 6991, 16, 15916, 67, 22702, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 67, 915, 12, 92, 16, 2153, 644, 67, 1968, 4672, 3536, 6991, 273, 10979, 67, 915, 12, 92, 16, 2153, 644, 67, 1968, 13, 565, 9948, 4869, 9948, 6991, 16, 15916, 67, 22702, 273, 1...
if record_exist_p == -1:
if format == '': format = 'hd' if record_exist_p == -1 and get_output_format_content_type(format) == 'text/html':
def print_record(recID, format='hb', ot='', ln=cdslang, decompress=zlib.decompress, search_pattern=None, uid=None): "Prints record 'recID' formatted accoding to 'format'." _ = gettext_set_language(ln) out = "" # sanity check: record_exist_p = record_exists(recID) if record_exist_p == 0: # doesn't exist return out # New Python BibFormat procedure for formatting # Old procedure follows further below # We must still check some special formats, but these # should disappear when BibFormat improves. if not use_old_bibformat \ and not format.lower().startswith('t') \ and not format.lower().startswith('hm') \ and not str(format[0:3]).isdigit(): if record_exist_p == -1: out += _("The record has been deleted.") else: if format == '': format = 'hd' query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format', so try to call BibFormat on the fly: or use default format: out += call_bibformat(recID, format, ln, search_pattern=search_pattern, uid=uid) # at the end of HTML brief mode, print the "Detailed record" functionality: if format.lower().startswith('hb'): out += websearch_templates.tmpl_print_record_brief_links( ln = ln, recID = recID, weburl = weburl, ) return out # Old PHP BibFormat procedure for formatting # print record opening tags, if needed: if format == "marcxml" or format == "oai_dc": out += " <record>\n" out += " <header>\n" for id in get_fieldvalues(recID,cfg_oai_id_field): out += " <identifier>%s</identifier>\n" % id out += " <datestamp>%s</datestamp>\n" % get_modification_date(recID) out += " </header>\n" out += " <metadata>\n" if format.startswith("xm") or format == "marcxml": # look for detailed format existence: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query, None, 1) if res and record_exist_p==1: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format' -- they are not in "bibfmt" table; so fetch all the data from "bibXXx" tables: if format == "marcxml": out += """ <record xmlns="http://www.loc.gov/MARC21/slim">\n""" out += " <controlfield tag=\"001\">%d</controlfield>\n" % int(recID) elif format.startswith("xm"): out += """ <record>\n""" out += " <controlfield tag=\"001\">%d</controlfield>\n" % int(recID) if record_exist_p == -1: # deleted record, so display only OAI ID and 980: oai_ids = get_fieldvalues(recID, cfg_oaiidtag) if oai_ids: out += "<datafield tag=\"%s\" ind1=\"%s\" ind2=\"%s\"><subfield code=\"%s\">%s</subfield></datafield>\n" % \ (cfg_oaiidtag[0:3], cfg_oaiidtag[3:4], cfg_oaiidtag[4:5], cfg_oaiidtag[5:6], oai_ids[0]) out += "<datafield tag=\"980\" ind1=\"\" ind2=\"\"><subfield code=\"c\">DELETED</subfield></datafield>\n" else: for digit1 in range(0,10): for digit2 in range(0,10): bx = "bib%d%dx" % (digit1, digit2) bibx = "bibrec_bib%d%dx" % (digit1, digit2) query = "SELECT b.tag,b.value,bb.field_number FROM %s AS b, %s AS bb "\ "WHERE bb.id_bibrec='%s' AND b.id=bb.id_bibxxx AND b.tag LIKE '%s%%' "\ "ORDER BY bb.field_number, b.tag ASC" % (bx, bibx, recID, str(digit1)+str(digit2)) res = run_sql(query) field_number_old = -999 field_old = "" for row in res: field, value, field_number = row[0], row[1], row[2] ind1, ind2 = field[3], field[4] if ind1 == "_": ind1 = "" if ind2 == "_": ind2 = "" # print field tag if field_number != field_number_old or field[:-1] != field_old[:-1]: if format.startswith("xm") or format == "marcxml": fieldid = encode_for_xml(field[0:3]) if field_number_old != -999: out += """ </datafield>\n""" out += """ <datafield tag="%s" ind1="%s" ind2="%s">\n""" % \ (encode_for_xml(field[0:3]), encode_for_xml(ind1), encode_for_xml(ind2)) field_number_old = field_number field_old = field # print subfield value if format.startswith("xm") or format == "marcxml": value = encode_for_xml(value) out += """ <subfield code="%s">%s</subfield>\n""" % (encode_for_xml(field[-1:]), value) # all fields/subfields printed in this run, so close the tag: if (format.startswith("xm") or format == "marcxml") and field_number_old != -999: out += """ </datafield>\n""" # we are at the end of printing the record: if format.startswith("xm") or format == "marcxml": out += " </record>\n" elif format == "xd" or format == "oai_dc": # XML Dublin Core format, possibly OAI -- select only some bibXXx fields: out += """ <dc xmlns="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/elements/1.1/ http://www.openarchives.org/OAI/1.1/dc.xsd">\n""" if record_exist_p == -1: out += "" else: for f in get_fieldvalues(recID, "041__a"): out += " <language>%s</language>\n" % f for f in get_fieldvalues(recID, "100__a"): out += " <creator>%s</creator>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "700__a"): out += " <creator>%s</creator>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "245__a"): out += " <title>%s</title>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "65017a"): out += " <subject>%s</subject>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "8564_u"): out += " <identifier>%s</identifier>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "520__a"): out += " <description>%s</description>\n" % encode_for_xml(f) out += " <date>%s</date>\n" % get_creation_date(recID) out += " </dc>\n" elif str(format[0:3]).isdigit(): # user has asked to print some fields only if format == "001": out += "<!--%s-begin-->%s<!--%s-end-->\n" % (format, recID, format) else: vals = get_fieldvalues(recID, format) for val in vals: out += "<!--%s-begin-->%s<!--%s-end-->\n" % (format, val, format) elif format.startswith('t'): ## user directly asked for some tags to be displayed only if record_exist_p == -1: out += get_fieldvalues_alephseq_like(recID, ["001", cfg_oaiidtag, "980"]) else: out += get_fieldvalues_alephseq_like(recID, ot) elif format == "hm": if record_exist_p == -1: out += "<pre>" + cgi.escape(get_fieldvalues_alephseq_like(recID, ["001", cfg_oaiidtag, "980"])) + "</pre>" else: out += "<pre>" + cgi.escape(get_fieldvalues_alephseq_like(recID, ot)) + "</pre>" elif format.startswith("h") and ot: ## user directly asked for some tags to be displayed only if record_exist_p == -1: out += "<pre>" + get_fieldvalues_alephseq_like(recID, ["001", cfg_oaiidtag, "980"]) + "</pre>" else: out += "<pre>" + get_fieldvalues_alephseq_like(recID, ot) + "</pre>" elif format == "hd": # HTML detailed format if record_exist_p == -1: out += _("The record has been deleted.") else: # look for detailed format existence: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query, None, 1) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format', so try to call BibFormat on the fly or use default format: out_record_in_format = call_bibformat(recID, format, ln, search_pattern=search_pattern, uid=uid) if out_record_in_format: out += out_record_in_format else: out += websearch_templates.tmpl_print_record_detailed( ln = ln, recID = recID, weburl = weburl, ) elif format.startswith("hb_") or format.startswith("hd_"): # underscore means that HTML brief/detailed formats should be called on-the-fly; suitable for testing formats if record_exist_p == -1: out += _("The record has been deleted.") else: out += call_bibformat(recID, format, ln, search_pattern=search_pattern, uid=uid) elif format.startswith("hx"): # BibTeX format, called on the fly: if record_exist_p == -1: out += _("The record has been deleted.") else: out += call_bibformat(recID, format, ln, search_pattern=search_pattern, uid=uid) elif format.startswith("hs"): # for citation/download similarity navigation links: if record_exist_p == -1: out += _("The record has been deleted.") else: out += '<a href="%s">' % websearch_templates.build_search_url(recid=recID, ln=ln) # firstly, title: titles = get_fieldvalues(recID, "245__a") if titles: for title in titles: out += "<strong>%s</strong>" % title else: # usual title not found, try conference title: titles = get_fieldvalues(recID, "111__a") if titles: for title in titles: out += "<strong>%s</strong>" % title else: # just print record ID: out += "<strong>%s %d</strong>" % (get_field_i18nname("record ID", ln), recID) out += "</a>" # secondly, authors: authors = get_fieldvalues(recID, "100__a") + get_fieldvalues(recID, "700__a") if authors: out += " - %s" % authors[0] if len(authors) > 1: out += " <em>et al</em>" # thirdly publication info: publinfos = get_fieldvalues(recID, "773__s") if not publinfos: publinfos = get_fieldvalues(recID, "909C4s") if not publinfos: publinfos = get_fieldvalues(recID, "037__a") if not publinfos: publinfos = get_fieldvalues(recID, "088__a") if publinfos: out += " - %s" % publinfos[0] else: # fourthly publication year (if not publication info): years = get_fieldvalues(recID, "773__y") if not years: years = get_fieldvalues(recID, "909C4y") if not years: years = get_fieldvalues(recID, "260__c") if years: out += " (%s)" % years[0] else: # HTML brief format by default if record_exist_p == -1: out += _("The record has been deleted.") else: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format', so try to call BibFormat on the fly: or use default format: if cfg_call_bibformat: out_record_in_format = call_bibformat(recID, format, ln, search_pattern=search_pattern, uid=uid) if out_record_in_format: out += out_record_in_format else: out += websearch_templates.tmpl_print_record_brief( ln = ln, recID = recID, weburl = weburl, ) else: out += websearch_templates.tmpl_print_record_brief( ln = ln, recID = recID, weburl = weburl, ) # at the end of HTML brief mode, print the "Detailed record" functionality: if format == 'hp' or format.startswith("hb_") or format.startswith("hd_"): pass # do nothing for portfolio and on-the-fly formats else: out += websearch_templates.tmpl_print_record_brief_links( ln = ln, recID = recID, weburl = weburl, ) # print record closing tags, if needed: if format == "marcxml" or format == "oai_dc": out += " </metadata>\n" out += " </record>\n" return out
6f556d321de22c9a5d3436cce26407f8f3671473 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/6f556d321de22c9a5d3436cce26407f8f3671473/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 3366, 12, 3927, 734, 16, 740, 2218, 76, 70, 2187, 15835, 2218, 2187, 7211, 33, 4315, 2069, 539, 16, 16824, 33, 94, 2941, 18, 323, 14706, 16, 1623, 67, 4951, 33, 7036, 16, 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, 1172, 67, 3366, 12, 3927, 734, 16, 740, 2218, 76, 70, 2187, 15835, 2218, 2187, 7211, 33, 4315, 2069, 539, 16, 16824, 33, 94, 2941, 18, 323, 14706, 16, 1623, 67, 4951, 33, 7036, 16, 4...
f.close()
if f: f.close()
def copy_scripts (self): """Copy each script listed in 'self.scripts'; if it's marked as a Python script in the Unix way (first line matches 'first_line_re', ie. starts with "\#!" and contains "python"), then adjust the first line to refer to the current Python interpreter as we copy. """ self.mkpath(self.build_dir) outfiles = [] for script in self.scripts: adjust = 0 script = convert_path(script) outfile = os.path.join(self.build_dir, os.path.basename(script)) outfiles.append(outfile)
7de2b65688a97d1c9c023558367f2b278f392aca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/7de2b65688a97d1c9c023558367f2b278f392aca/build_scripts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 12827, 261, 2890, 4672, 3536, 2951, 1517, 2728, 12889, 316, 296, 2890, 18, 12827, 13506, 309, 518, 1807, 9350, 487, 279, 6600, 2728, 316, 326, 9480, 4031, 261, 3645, 980, 1885, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 12827, 261, 2890, 4672, 3536, 2951, 1517, 2728, 12889, 316, 296, 2890, 18, 12827, 13506, 309, 518, 1807, 9350, 487, 279, 6600, 2728, 316, 326, 9480, 4031, 261, 3645, 980, 1885, ...
msg += " -> accepted!"
def have_type(self, typefind, probability, caps): mime_type = caps.to_string() msg = "mime type: %s" % mime_type for t in mime_whitelist: if t in mime_type: msg += " -> accepted!" self.found_type = mime_type log(msg)
379396c6578d6b0d4b61f3821f039f5fb9768a5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/379396c6578d6b0d4b61f3821f039f5fb9768a5f/soundconverter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1240, 67, 723, 12, 2890, 16, 618, 4720, 16, 11331, 16, 15788, 4672, 4892, 67, 723, 273, 15788, 18, 869, 67, 1080, 1435, 1234, 273, 315, 11757, 618, 30, 738, 87, 6, 738, 4892, 67, 723...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1240, 67, 723, 12, 2890, 16, 618, 4720, 16, 11331, 16, 15788, 4672, 4892, 67, 723, 273, 15788, 18, 869, 67, 1080, 1435, 1234, 273, 315, 11757, 618, 30, 738, 87, 6, 738, 4892, 67, 723...
text = self._split_header(text)
text = self._split_header(h, text)
def _write_headers(self, msg): for h, v in msg.items(): # We only write the MIME-Version: header for the outermost # container message. Unfortunately, we can't use same technique # as for the Unix-From above because we don't know when # MIME-Version: will occur. if h.lower() == 'mime-version' and not self.__first: continue # RFC 2822 says that lines SHOULD be no more than maxheaderlen # characters wide, so we're well within our rights to split long # headers. text = '%s: %s' % (h, v) if self.__maxheaderlen > 0 and len(text) > self.__maxheaderlen: text = self._split_header(text) print >> self._fp, text # A blank line always separates headers from body print >> self._fp
9c54d8a782b36e843b35e10a09a65914f90f8757 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9c54d8a782b36e843b35e10a09a65914f90f8757/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 2485, 12, 2890, 16, 1234, 4672, 364, 366, 16, 331, 316, 1234, 18, 3319, 13332, 468, 1660, 1338, 1045, 326, 13195, 17, 1444, 30, 1446, 364, 326, 596, 28055, 468, 1478, 88...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2485, 12, 2890, 16, 1234, 4672, 364, 366, 16, 331, 316, 1234, 18, 3319, 13332, 468, 1660, 1338, 1045, 326, 13195, 17, 1444, 30, 1446, 364, 326, 596, 28055, 468, 1478, 88...
onclick="toggle_private();">hide private</a>]</span>
onclick="toggle_private();">hide&nbsp;private</a>]</span>
def write_url_record(self, out, obj): url = self.url(obj) if url is not None: out("%s\t%s\n" % (obj.canonical_name, url))
df8fdcdaedad9bb890428949f435cf2d4e45e05d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3512/df8fdcdaedad9bb890428949f435cf2d4e45e05d/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 718, 67, 3366, 12, 2890, 16, 596, 16, 1081, 4672, 880, 273, 365, 18, 718, 12, 2603, 13, 309, 880, 353, 486, 599, 30, 596, 27188, 87, 64, 88, 9, 87, 64, 82, 6, 738, 261,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1045, 67, 718, 67, 3366, 12, 2890, 16, 596, 16, 1081, 4672, 880, 273, 365, 18, 718, 12, 2603, 13, 309, 880, 353, 486, 599, 30, 596, 27188, 87, 64, 88, 9, 87, 64, 82, 6, 738, 261,...
self.assertRaises(TemplateError,
self.assertRaises(util.DemocracyUnicodeError,
def testNonUnicode(self): # genRepeatText self.assertRaises(TemplateError, lambda : template_compiler.genRepeatText("out","123"," ",u"boo")) self.assertRaises(TemplateError, lambda : template_compiler.genRepeatText("out","123"," ","Chinese Numbers \x25cb\x4e00\x4e8c\x4e09\x56db\x4e94\x516d\x4e03\x516b\x4e5d")) self.assertEqual(u" out.write(u'Chinese Numbers \\u25cb\\u4e00\\u4e8c\\u4e09\\u56db\\u4e94\\u516d\\u4e03\\u516b\\u4e5d')\n", template_compiler.genRepeatText("out","123"," ",u"Chinese Numbers \u25cb\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d"))
43ec567a4eaeb3ea19a008eff155038031636dde /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12354/43ec567a4eaeb3ea19a008eff155038031636dde/unicodetest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3989, 16532, 12, 2890, 4672, 468, 3157, 16750, 1528, 365, 18, 11231, 12649, 6141, 12, 1367, 18, 15058, 504, 354, 2431, 16532, 668, 16, 3195, 294, 1542, 67, 9576, 18, 4507, 16750, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3989, 16532, 12, 2890, 4672, 468, 3157, 16750, 1528, 365, 18, 11231, 12649, 6141, 12, 1367, 18, 15058, 504, 354, 2431, 16532, 668, 16, 3195, 294, 1542, 67, 9576, 18, 4507, 16750, 1...
gMonitor.addMark("ChecksumMatches%s" % se,(len(migratedFiles)-len(mismatchingFiles))) gMonitor.addMark("TotalChecksumMatches%s" % se,(len(migratedFiles)-len(mismatchingFiles))) gLogger.info('[%s] __updateMigrationAccounting: Attempting to send accounting message...' % se) return gDataStoreClient.commit()
gMonitor.addMark("ChecksumMatches%s" % se,len(matchingFiles)) gMonitor.addMark("TotalChecksumMatches%s" % se,len(matchingFiles)) if allMigrated: gLogger.info('[%s] __updateMigrationAccounting: Attempting to send accounting message...' % se) return gDataStoreClient.commit() return S_OK()
def __updateMigrationAccounting(self,se,migratedFiles,migratingFiles,mismatchingFiles,assumedEndTime,previousMonitorTime): """ Create accounting messages for the overall throughput observed and the total migration time for the files """ gMonitor.addMark("MigratedFiles%s" % se,len(migratedFiles)) gMonitor.addMark("TotalMigratedFiles%s" % se,len(migratedFiles)) lfnFileID = {} for fileID in migratedFiles: sizesToObtain = [] if not migratingFiles[fileID]['Size']: lfn = migratingFiles[fileID]['LFN'] sizesToObtain.append(lfn) lfnFileID[lfn] = fileID if sizesToObtain: res = self.ReplicaManager.getCatalogFileSize(sizesToObtain) if not res['OK']: gLogger.error("[%s] __updateMigrationAccounting: Failed to obtain file sizes" % se) return res for lfn,error in res['Value']['Failed'].items(): gLogger.error("[%s] __updateAccounting: Failed to get file size" % se,"%s %s" % (lfn,error)) migratingFiles[lfnFileID[lfn]]['Size'] = 0 for lfn,size in res['Value']['Successful'].items(): migratingFiles[lfnFileID[lfn]]['Size'] = size totalSize = 0 for fileID in migratedFiles: size = migratingFiles[fileID]['Size'] totalSize += size st = time.strptime(migratingFiles[fileID]['SubmitTime'], "%a %b %d %H:%M:%S %Y") submitTime = datetime(st[0],st[1],st[2],st[3],st[4],st[5],st[6],None) timeDiff = submitTime-assumedEndTime migrationTime = (timeDiff.days * 86400) + (timeDiff.seconds) + (timeDiff.microseconds/1000000.0) gMonitor.addMark("MigrationTime%s" % se,migrationTime) gDataStoreClient.addRegister(self.__initialiseAccountingObject('MigrationTime', se, submitTime, assumedEndTime, size)) gDataStoreClient.addRegister(self.__initialiseAccountingObject('MigrationThroughput', se, previousMonitorTime, assumedEndTime, size)) oDataOperation = self.__initialiseAccountingObject('MigrationSuccess', se, submitTime, assumedEndTime, size) if fileID in mismatchingFiles: oDataOperation.setValueByKey('TransferOK',0) oDataOperation.setValueByKey('FinalStatus','Failed') gDataStoreClient.addRegister(oDataOperation) gMonitor.addMark("TotalMigratedSize%s" % se,totalSize) gMonitor.addMark("ChecksumMismatches%s" % se,len(mismatchingFiles)) gMonitor.addMark("TotalChecksumMismatches%s" % se,len(mismatchingFiles)) gMonitor.addMark("ChecksumMatches%s" % se,(len(migratedFiles)-len(mismatchingFiles))) gMonitor.addMark("TotalChecksumMatches%s" % se,(len(migratedFiles)-len(mismatchingFiles))) gLogger.info('[%s] __updateMigrationAccounting: Attempting to send accounting message...' % se) return gDataStoreClient.commit()
4f91556b86199dede4b08bee27f08eea5a1de278 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/4f91556b86199dede4b08bee27f08eea5a1de278/MigrationMonitoringAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2725, 10224, 3032, 310, 12, 2890, 16, 307, 16, 81, 2757, 690, 2697, 16, 81, 2757, 1776, 2697, 16, 11173, 16271, 2697, 16, 428, 379, 329, 25255, 16, 11515, 7187, 950, 4672, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2725, 10224, 3032, 310, 12, 2890, 16, 307, 16, 81, 2757, 690, 2697, 16, 81, 2757, 1776, 2697, 16, 11173, 16271, 2697, 16, 428, 379, 329, 25255, 16, 11515, 7187, 950, 4672, 3536, ...
ivlad.msg(ivlad.hr) out.print_self('out') ivlad.msg(ivlad.hr) out.hdr.print_self('out.hdr') if out.dat != None: ivlad.msg(ivlad.hr) out.dat.print_self('out.dat')
def main(argv=sys.argv): par = rsf.Par(argv) help = par.bool('help', False) if help: rsfprog.selfdoc() # Show the man page return ivlad.unix_success # Consulting the documentation is not an error # Input parameters delim = par.string('delimiter',',') # Separator between values in input file numtype = par.string('dtype', 'float') # Input type if numtype not in ooio.dtype_avl: raise m8rex.StringParamNotInAcceptableValueList(numtype, ooio.dtype_avl) # Process parameters verb = par.bool('verb', False) # Whether to echo n1, n2, infill/truncation truncate = par.bool('trunc', False) # Truncate or add zeros if nr elems in rows differs # Output parameters o = [ par.float('o1', 0.), # Origin of axis 1 in output (rows in input) par.float('o2', 0.)] # Origin of axis 2 in output (columns in input) d = [ par.float('d1', 1.), # Axis 1 sampling par.float('d2', 1.)] # Axis 2 sampling unit = [ par.string('unit1', 'unknown'), par.string('unit2', 'unknown')] lbl = [ par.string('label1', 'unknown'), par.string('label2', 'unknown')] ##### End reading parameters ##### stdin = csv.reader(sys.stdin, delimiter=delim) # Copy stdin so we can go back through it lines = [] i = 0 nr_cols_cst = True # Whether the nr of values in rows is constant # Find max nr of elements in a row for line in stdin: if line == []: # throw away blank lines continue curline = [float(x) for x in line] if numtype == 'int': curline = [int(x) for x in curline] lines.append(curline) llen = len(curline) i+=1 # We have successfully read line i if i==1: n2 = llen elif llen != n2: nr_cols_cst = False if (llen < n2 and truncate) or (llen > n2 and not truncate): n2 = llen n1 = len(lines) if not nr_cols_cst: # Truncate or append as necessary for i in range(n1): line = lines[i] lines[i] = ivlad.trunc_or_append(n2, line, 0, verb) out = ooio.RSFfile(ooio.stdout, par, ndim=2, intent='out', dtype=numtype) out.set_hdr_info([n2, n1], o, d, unit, lbl) ivlad.msg(ivlad.hr) out.print_self('out') ivlad.msg(ivlad.hr) out.hdr.print_self('out.hdr') if out.dat != None: ivlad.msg(ivlad.hr) out.dat.print_self('out.dat') for line in lines: for val in line: out.write(val) return ivlad.unix_success
afe48c24eb9b96f71ecc04346655edc798431bbd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3143/afe48c24eb9b96f71ecc04346655edc798431bbd/Mcsv2rsf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 9499, 18, 19485, 4672, 225, 779, 273, 3597, 74, 18, 1553, 12, 19485, 13, 225, 2809, 273, 779, 18, 6430, 2668, 5201, 2187, 1083, 13, 309, 2809, 30, 3597, 74, 14654,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 9499, 18, 19485, 4672, 225, 779, 273, 3597, 74, 18, 1553, 12, 19485, 13, 225, 2809, 273, 779, 18, 6430, 2668, 5201, 2187, 1083, 13, 309, 2809, 30, 3597, 74, 14654,...
ByteField("proto", 0) ]
ByteEnumField("proto", 0, {0:"IP",1:"ICMP",6:"TCP", 17:"UDP",47:"GRE"}) ]
def __new__(cls, name, bases, dct): f = dct["fields_desc"] f = [ ByteEnumField("next_payload",None,ISAKMP_payload_type), ByteField("res",0), ShortField("length",None), ] + f dct["fields_desc"] = f return super(ISAKMP_payload_metaclass, cls).__new__(cls, name, bases, dct)
4b24620d1449c11b1d9d58835e5d7fa39c59b20c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/4b24620d1449c11b1d9d58835e5d7fa39c59b20c/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 6429, 16, 508, 16, 8337, 16, 18253, 4672, 284, 273, 18253, 9614, 2821, 67, 5569, 11929, 284, 273, 306, 3506, 3572, 974, 2932, 4285, 67, 7648, 3113, 7036, 16, 5127, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2704, 972, 12, 6429, 16, 508, 16, 8337, 16, 18253, 4672, 284, 273, 18253, 9614, 2821, 67, 5569, 11929, 284, 273, 306, 3506, 3572, 974, 2932, 4285, 67, 7648, 3113, 7036, 16, 5127, ...
if self.environ[name].configure():
if (isinstance(self.environ[name],Variable) and self.environ[name].configure()):
def value(self,name): '''returns the value of the workspace variable *name*. If the variable has no value yet, a prompt is displayed for it.''' if not name in self.environ: raise Error("Trying to read unknown variable " + name + ".\n") if self.environ[name].configure(): self.save() return self.environ[name].value
a32fd692dd1e30de835cd0c6d09d9bec8f3ccf92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1360/a32fd692dd1e30de835cd0c6d09d9bec8f3ccf92/dws.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 460, 12, 2890, 16, 529, 4672, 9163, 6154, 326, 460, 434, 326, 6003, 2190, 380, 529, 11146, 971, 326, 2190, 711, 1158, 460, 4671, 16, 279, 6866, 353, 10453, 364, 518, 1093, 6309, 309, 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, 460, 12, 2890, 16, 529, 4672, 9163, 6154, 326, 460, 434, 326, 6003, 2190, 380, 529, 11146, 971, 326, 2190, 711, 1158, 460, 4671, 16, 279, 6866, 353, 10453, 364, 518, 1093, 6309, 309, 4...
subtitle = """<a name="2">2. Modify access restrictions for collection '%s'</a>&nbsp;&nbsp&nbsp;<small>[<a href="%s/admin/websearch/guide.html
subtitle = """<a name="2">2. Modify access restrictions for collection '%s'</a>&nbsp;&nbsp&nbsp;<small>[<a title="See guide" href="%s/admin/websearch/guide.html
def perform_modifyrestricted(colID, ln=cdslang, rest='', callback='yes', confirm=-1): """modify which apache group is allowed to access the collection. rest - the groupname""" subtitle = '' output = """ <dl> <dt>Restricted to:</dt> <dd>The apache group allowed to access this collection.</dd> </dl> """ col_dict = dict(get_current_name('', ln, get_col_nametypes()[0][0], "collection")) if colID and col_dict.has_key(int(colID)): colID = int(colID) subtitle = """<a name="2">2. Modify access restrictions for collection '%s'</a>&nbsp;&nbsp&nbsp;<small>[<a href="%s/admin/websearch/guide.html#3.2">?</a>]</small>""" % (col_dict[colID], weburl) if confirm == -1: res = run_sql("SELECT restricted FROM collection WHERE id=%s" % colID) rest = res[0][0] if not rest: rest = '' text = """ <span class="adminlabel">Restricted to:</span> <input class="admin_wvar" type="text" name="rest" value="%s" /><br> """ % rest output += createhiddenform(action="modifyrestricted", text=text, button="Modify", colID=colID, ln=ln, confirm=0) if confirm in ["0", 0]: if rest: text = """<b>Change access restrictions for this collection to: '%s'.</b>""" % rest else: text = """<b>Remove any access restrictions for this collection.</b>""" output += createhiddenform(action="modifyrestricted", colID=colID, text=text, rest=rest, button="Confirm", confirm=1) elif confirm in ["1", 1]: res = modify_restricted(colID, rest) if res: text = """<b><span class="info">Changed the access restrictions.</span></b>""" else: text = """<b><span class="info">Sorry, could not change the access restrictions.</span></b>""" output += text try: body = [output, extra] except NameError: body = [output] if callback: return perform_editcollection(colID, ln, "perform_modifyrestricted", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body)
beda71fdc80661821084d0fd30dadb0e7e956b74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/beda71fdc80661821084d0fd30dadb0e7e956b74/websearchadminlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 17042, 29306, 12, 1293, 734, 16, 7211, 33, 4315, 2069, 539, 16, 3127, 2218, 2187, 1348, 2218, 9707, 2187, 6932, 29711, 21, 4672, 3536, 17042, 1492, 12291, 1041, 353, 2935, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3073, 67, 17042, 29306, 12, 1293, 734, 16, 7211, 33, 4315, 2069, 539, 16, 3127, 2218, 2187, 1348, 2218, 9707, 2187, 6932, 29711, 21, 4672, 3536, 17042, 1492, 12291, 1041, 353, 2935, 358, ...
top_widgets[1] = w top.set_focus(1)
footer.widget_list[0] = w footer.set_focus(0) top.set_focus('footer')
def input_enter(w): top_widgets[1] = w top.set_focus(1)
9d0fe6c8e939bacf85e4353fe8017a3af8da7803 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/9d0fe6c8e939bacf85e4353fe8017a3af8da7803/urwid_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 810, 67, 2328, 12, 91, 4672, 1760, 67, 18148, 63, 21, 65, 273, 341, 1760, 18, 542, 67, 13923, 12, 21, 13, 2, 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, 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, 810, 67, 2328, 12, 91, 4672, 1760, 67, 18148, 63, 21, 65, 273, 341, 1760, 18, 542, 67, 13923, 12, 21, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
normalizer = component.getUtility(IIDNormalizer) chooser = INameChooser(self.context) id = chooser.chooseName(normalizer.normalize('email'), aq_base(self.context))
def drop(self, mail): """ drop a mail into this mail box. The mail is a string with the complete email content """ # code unicode to utf-8 if isinstance(mail,unicode): mail = mail.encode( 'utf-8' ) type = 'Email' format = 'text/plain' content_type='text/plain' # generate id normalizer = component.getUtility(IIDNormalizer) chooser = INameChooser(self.context) id = chooser.chooseName(normalizer.normalize('email'), aq_base(self.context))
8da969050080b8af0e3063fab40d7e8e226f77db /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10466/8da969050080b8af0e3063fab40d7e8e226f77db/adapter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3640, 12, 2890, 16, 4791, 4672, 3536, 3640, 279, 4791, 1368, 333, 4791, 3919, 18, 1021, 4791, 353, 279, 533, 598, 326, 3912, 2699, 913, 3536, 225, 468, 981, 5252, 358, 7718, 17, 28, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3640, 12, 2890, 16, 4791, 4672, 3536, 3640, 279, 4791, 1368, 333, 4791, 3919, 18, 1021, 4791, 353, 279, 533, 598, 326, 3912, 2699, 913, 3536, 225, 468, 981, 5252, 358, 7718, 17, 28, 30...
_branch(subpattern, b) else: subpattern.append((SUBPATTERN, (group, p)))
p = _branch(state, b) subpattern.append((SUBPATTERN, (group, p)))
def _parse(source, pattern, flags=()): # parse regular expression pattern into an operator list. subpattern = SubPattern(pattern) this = None while 1: if str(source.next) in ("|", ")"): break # end of subpattern this = source.get() if this is None: break # end of pattern if this and this[0] not in SPECIAL_CHARS: subpattern.append((LITERAL, this)) elif this == "[": # character set set = []
b42c811cba34ab2f6d1db22aed5bc7f0dab153bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b42c811cba34ab2f6d1db22aed5bc7f0dab153bb/sre_parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 12, 3168, 16, 1936, 16, 2943, 33, 1435, 4672, 225, 468, 1109, 6736, 2652, 1936, 1368, 392, 3726, 666, 18, 225, 720, 4951, 273, 2592, 3234, 12, 4951, 13, 225, 333, 273, 599, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2670, 12, 3168, 16, 1936, 16, 2943, 33, 1435, 4672, 225, 468, 1109, 6736, 2652, 1936, 1368, 392, 3726, 666, 18, 225, 720, 4951, 273, 2592, 3234, 12, 4951, 13, 225, 333, 273, 599, ...
date, self.repo.changelog.tip(), hg.nullid) return hg.hex(self.repo.changelog.tip())
date, self.repo.changelog.tip(), nullid) return hex(self.repo.changelog.tip())
def puttags(self, tags): try: old = self.repo.wfile(".hgtags").read() oldlines = old.splitlines(1) oldlines.sort() except: oldlines = []
f10cfed47880318b36165400664328a0784cc1ed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/f10cfed47880318b36165400664328a0784cc1ed/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 4156, 12, 2890, 16, 2342, 4672, 775, 30, 1592, 273, 365, 18, 7422, 18, 91, 768, 2932, 18, 26981, 4156, 20387, 896, 1435, 1592, 3548, 273, 1592, 18, 4939, 3548, 12, 21, 13, 1592, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1378, 4156, 12, 2890, 16, 2342, 4672, 775, 30, 1592, 273, 365, 18, 7422, 18, 91, 768, 2932, 18, 26981, 4156, 20387, 896, 1435, 1592, 3548, 273, 1592, 18, 4939, 3548, 12, 21, 13, 1592, ...
def selectQueryForm(self):
def selectQueryForm(self,**kargs):
def selectQueryForm(self): if self.isLoggedIn: self.br.select_form(name="bug_form")
d5636626499553d56bf0e7421dd1138f7ae0b198 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8887/d5636626499553d56bf0e7421dd1138f7ae0b198/RequestQuery.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 1138, 1204, 12, 2890, 16, 636, 79, 1968, 4672, 309, 365, 18, 291, 29327, 30, 365, 18, 2848, 18, 4025, 67, 687, 12, 529, 1546, 925, 67, 687, 7923, 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, 2027, 1138, 1204, 12, 2890, 16, 636, 79, 1968, 4672, 309, 365, 18, 291, 29327, 30, 365, 18, 2848, 18, 4025, 67, 687, 12, 529, 1546, 925, 67, 687, 7923, 2, -100, -100, -100, -100, -10...
(first_url, first_format) = urls[0] other_urls = urls[1:] if not _add_new_version(bibdoc, first_url, first_format, docname, doctype, newname): continue for (url, format) in other_urls: _add_new_format(bibdoc, url, format, docname, description, doctype, newname)
if urls: (first_url, first_format) = urls[0] other_urls = urls[1:] if not _add_new_version(bibdoc, first_url, first_format, docname, doctype, newname): continue for (url, format) in other_urls: _add_new_format(bibdoc, url, format, docname, description, doctype, newname)
def _add_new_icon(bibdoc, url, restriction): """Adds a new icon to an existing bibdoc, replacing the previous one if it exists. If url is empty, just remove the current icon.""" if not url: bibdoc.deleteIcon() else: try: path = urllib2.urlparse.urlsplit(url)[2] filename = os.path.split(path)[-1] format = filename[len(file_strip_ext(filename)):].lower() tmpurl = download_url(url, format) try: icondoc = bibdoc.addIcon(tmpurl, 'icon-%s' % bibdoc.getDocName()) if restriction and restriction != 'KEEP-OLD-VALUE': icondoc.setStatus(restriction) except StandardError, e: write_message("('%s', '%s') icon not added because '%s'." % (url, format, e), stream=sys.stderr) os.remove(tmpurl) return False except Exception, e: write_message("Error in downloading '%s' because of: %s" % (url, e)) return False return True
60b52cc20f11fdaab9fe93136dbc6f3a259ef0a0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/60b52cc20f11fdaab9fe93136dbc6f3a259ef0a0/bibupload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 2704, 67, 3950, 12, 70, 495, 2434, 16, 880, 16, 9318, 4672, 3536, 3655, 279, 394, 4126, 358, 392, 2062, 25581, 2434, 16, 13993, 326, 2416, 1245, 309, 518, 1704, 18, 971,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2704, 67, 3950, 12, 70, 495, 2434, 16, 880, 16, 9318, 4672, 3536, 3655, 279, 394, 4126, 358, 392, 2062, 25581, 2434, 16, 13993, 326, 2416, 1245, 309, 518, 1704, 18, 971,...
if os.path.islink(prefix):
if os.path.islink(client_root + prefix):
def _RealPrefix(path): """Determine longest directory prefix and whether path contains a symlink. Given an absolute path PATH, figure out the longest prefix of PATH where every component of the prefix is a directory -- not a file or symlink. Args: path: a string starting with '/' Returns: a pair consisting of - the prefix - a bool, which is True iff PATH contained a symlink. """ prefix = "/" parts = path.split('/') while prefix != path: part = parts.pop(0) last_prefix = prefix prefix = os.path.join(prefix, part) if os.path.islink(prefix): return last_prefix, True if not os.path.isdir(prefix): return last_prefix, False return path, False
a92f6458ee0d0ec18eb75f96ad74a1bfd349438f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4521/a92f6458ee0d0ec18eb75f96ad74a1bfd349438f/compiler_defaults.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6955, 2244, 12, 803, 4672, 3536, 8519, 12163, 1867, 1633, 471, 2856, 589, 1914, 279, 10563, 18, 225, 16803, 392, 4967, 589, 7767, 16, 7837, 596, 326, 12163, 1633, 434, 7767, 1625, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6955, 2244, 12, 803, 4672, 3536, 8519, 12163, 1867, 1633, 471, 2856, 589, 1914, 279, 10563, 18, 225, 16803, 392, 4967, 589, 7767, 16, 7837, 596, 326, 12163, 1633, 434, 7767, 1625, 3...
arr = Array('d', range(10), lock=lock) string = Array('c', 20, lock=lock)
arr = self.Array('d', range(10), lock=lock) string = self.Array('c', 20, lock=lock)
def test_sharedctypes(self, lock=False): if c_int is None: return
b1fb74866be359a49ea45563f7f8612bb6e3279c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/b1fb74866be359a49ea45563f7f8612bb6e3279c/test_multiprocessing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11574, 299, 989, 12, 2890, 16, 2176, 33, 8381, 4672, 309, 276, 67, 474, 353, 599, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11574, 299, 989, 12, 2890, 16, 2176, 33, 8381, 4672, 309, 276, 67, 474, 353, 599, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.dummyRunCalls = []
self.calledBack = Deferred()
def setUp(self): # Ick, we need to catch the run event of DummyProcessor, and I can't # think of another way to do it. self.dummyRun = DummyProcessor.run.im_func self.dummyRunCalls = [] def dummyRun(calledOn): self.dummyRunCalls.append(calledOn) DummyProcessor.run = dummyRun
7df717a48fb74ddd3b9ade644fb805020a20e91c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6981/7df717a48fb74ddd3b9ade644fb805020a20e91c/test_processor1to2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 468, 467, 363, 16, 732, 1608, 358, 1044, 326, 1086, 871, 434, 28622, 5164, 16, 471, 467, 848, 1404, 468, 15507, 434, 4042, 4031, 358, 741, 518, 18, 365, 18, 2105...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 4672, 468, 467, 363, 16, 732, 1608, 358, 1044, 326, 1086, 871, 434, 28622, 5164, 16, 471, 467, 848, 1404, 468, 15507, 434, 4042, 4031, 358, 741, 518, 18, 365, 18, 2105...
this = apply(_quickfix.new_SideTimeInForce, args)
this = _quickfix.new_SideTimeInForce(*args)
def __init__(self, *args): this = apply(_quickfix.new_SideTimeInForce, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 8895, 950, 382, 10997, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 8895, 950, 382, 10997, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
check_class_name, args = check_option.split(':', 2) args = args.split(':')
check_class_name, args = check_option.split(':', 1) args = args.split(',')
def load_checks_from_options(self, checks): self.checks = [] for check_option in checks: check_class_name, args = check_option.split(':', 2) args = args.split(':') check_base_class = globals().get(check_class_name) check = check_base_class.create_from_args(*args) self.checks.append(check)
6dfc5c80ce69d01af644d585db3180bedaeb36a9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4596/6dfc5c80ce69d01af644d585db3180bedaeb36a9/goalreport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 12366, 67, 2080, 67, 2116, 12, 2890, 16, 4271, 4672, 365, 18, 12366, 273, 5378, 364, 866, 67, 3482, 316, 4271, 30, 866, 67, 1106, 67, 529, 16, 833, 273, 866, 67, 3482, 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, 1262, 67, 12366, 67, 2080, 67, 2116, 12, 2890, 16, 4271, 4672, 365, 18, 12366, 273, 5378, 364, 866, 67, 3482, 316, 4271, 30, 866, 67, 1106, 67, 529, 16, 833, 273, 866, 67, 3482, 18, ...
wikipedia.output('Page ' + title + ' doesn\'t exist, skipping')
wikipedia.output(u'Page %s doesn\'t exist, skipping' %title)
def checkPage(title, onlyLastDiff = False): if title == logPages[site.language() + '.' + site.family.name]: return wikipedia.output('Checking ' + title + ' for bad word list') page = wikipedia.Page(site, title) try: text = page.get() if onlyLastDiff: oldver = page.getOldVersion(page.previousRevision()) if len(text) > len(oldver): bpos = seekbpos(oldver, text) epos = seekepos(oldver, text, bpos) diff = text[bpos:epos] text = diff except wikipedia.NoPage: wikipedia.output('Page ' + title + ' doesn\'t exist, skipping') return except wikipedia.IsRedirectPage: wikipedia.output('Page ' + title + ' is a redirect, skipping') return report = False wordsIn = [] for badWord in ownWordList: if (' ' + badWord + ' ') in text: wordsIn.append(badWord) report = True if report: logPage = wikipedia.Page(site, logPages[site.language() + '.' + site.family.name]) try: log = logPage.get() except: pass wikipedia.output(title + ' matches the bad word list') log = '* [' + page.permalink()+ ' ' + title + '] - ' + ' '.join(wordsIn) + '\n' + log logPage.put(log, title) else: wikipedia.output(title + ' doesn\'t match any of the bad word list')
72d385dd28940b5f2d9ee8bfd988b9b8b4371b4c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/72d385dd28940b5f2d9ee8bfd988b9b8b4371b4c/censure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 1964, 12, 2649, 16, 1338, 3024, 5938, 273, 1083, 4672, 309, 2077, 422, 613, 5716, 63, 4256, 18, 4923, 1435, 397, 2611, 397, 2834, 18, 9309, 18, 529, 14542, 327, 21137, 18, 2844, 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, 866, 1964, 12, 2649, 16, 1338, 3024, 5938, 273, 1083, 4672, 309, 2077, 422, 613, 5716, 63, 4256, 18, 4923, 1435, 397, 2611, 397, 2834, 18, 9309, 18, 529, 14542, 327, 21137, 18, 2844, 2...
"file": [redirect_filter_factory, True],
"file": [redirect_filter_factory, True],
def stdout(text): sys.stdout.write(text) return ""
dd14c1ac5763faef6a7e03dba8d5ee4b7ded57e3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1390/dd14c1ac5763faef6a7e03dba8d5ee4b7ded57e3/filters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3909, 12, 955, 4672, 2589, 18, 10283, 18, 2626, 12, 955, 13, 327, 1408, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3909, 12, 955, 4672, 2589, 18, 10283, 18, 2626, 12, 955, 13, 327, 1408, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
testtype('u', u'\u263a')
if have_unicode: testtype('u', unicode(r'\u263a', 'unicode-escape'))
def main(): testtype('c', 'c') testtype('u', u'\u263a') for type in (['b', 'h', 'i', 'l', 'f', 'd']): testtype(type, 1) testunicode() testsubclassing() unlink(TESTFN)
8bf46e4e7abdc6e88b1dcd680815b94c9d70184e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8bf46e4e7abdc6e88b1dcd680815b94c9d70184e/test_array.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1842, 723, 2668, 71, 2187, 296, 71, 6134, 309, 1240, 67, 9124, 30, 1842, 723, 2668, 89, 2187, 5252, 12, 86, 8314, 89, 22, 4449, 69, 2187, 296, 9124, 17, 6939, 26112, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 723, 2668, 71, 2187, 296, 71, 6134, 309, 1240, 67, 9124, 30, 1842, 723, 2668, 89, 2187, 5252, 12, 86, 8314, 89, 22, 4449, 69, 2187, 296, 9124, 17, 6939, 26112, 364, ...
(while_stmt NAME (test ...) COLON (suite ...):whilesuite NAME? COLON? (suite ...)?:elsesuite)))""")),
(while_stmt 'while' (test ...) COLON (suite ...):whilesuite 'else'? COLON? (suite ...)?:elsesuite)))""")),
# Function definition: "def f(x): ..."
1fb4c317bfd16a777415b4874c4c8db19e81beff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/1fb4c317bfd16a777415b4874c4c8db19e81beff/docparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 4284, 2379, 30, 315, 536, 284, 12, 92, 4672, 18483, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 4284, 2379, 30, 315, 536, 284, 12, 92, 4672, 18483, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
kcrossings = self.findallkcrossings(self.bgmodel.tresult[:self.fotendindex], self.bgmodel.yresult[:self.fotendindex,2]) kcrossefolds = kcrossings[:,1] if any(kcrossefolds==0): raise ModelError("Some k modes crossed horizon before simulation began and cannot be initialized!") self.fotstart, self.fotstartindex = kcrossefolds, kcrossings[:,0].astype(N.int)
if fixedtstart is None: kcrossings = self.findallkcrossings(self.bgmodel.tresult[:self.fotendindex], self.bgmodel.yresult[:self.fotendindex,2]) kcrossefolds = kcrossings[:,1] if any(kcrossefolds==0): raise ModelError("Some k modes crossed horizon before simulation began and cannot be initialized!") self.fotstart, self.fotstartindex = kcrossefolds, kcrossings[:,0].astype(N.int) else: self.fotstart = fixedtstart["fotstart"] self.fotstartindex = fixedtstart["fotstartindex"] if self.bgmodel.tresult[self.fotstartindex] != self.fotstart: raise ModelError("Need to make sure that fotstartindex points to the same value as fotstart!")
def setfoics(self): """After a bg run has completed, set the initial conditions for the first order run.""" #debug #set_trace() #Check if bg run is completed if self.bgmodel.runcount == 0: raise ModelError("Background system must be run first before setting 1st order ICs!") #Find initial conditions for 1st order model #Find a_end using instantaneous reheating #Need to change to find using splines Hend = self.bgmodel.yresult[self.fotendindex,2] self.a_end = self.finda_end(Hend) self.ainit = self.a_end*N.exp(-self.bgmodel.tresult[self.fotendindex]) #Find epsilon from bg model try: self.bgepsilon except AttributeError: self.bgepsilon = self.bgmodel.getepsilon() #find k crossing indices kcrossings = self.findallkcrossings(self.bgmodel.tresult[:self.fotendindex], self.bgmodel.yresult[:self.fotendindex,2]) kcrossefolds = kcrossings[:,1] #If mode crosses horizon before t=0 then we will not be able to propagate it if any(kcrossefolds==0): raise ModelError("Some k modes crossed horizon before simulation began and cannot be initialized!") #Find new start time from earliest kcrossing self.fotstart, self.fotstartindex = kcrossefolds, kcrossings[:,0].astype(N.int) self.foystart = self.getfoystart() return
7203645d13930e87b688cd0b8af3d32f3550960e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7283/7203645d13930e87b688cd0b8af3d32f3550960e/cosmomodels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 617, 2102, 12, 2890, 4672, 3536, 4436, 279, 7611, 1086, 711, 5951, 16, 444, 326, 2172, 4636, 364, 326, 1122, 1353, 1086, 12123, 468, 4148, 468, 542, 67, 5129, 1435, 225, 468, 1564, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 617, 2102, 12, 2890, 4672, 3536, 4436, 279, 7611, 1086, 711, 5951, 16, 444, 326, 2172, 4636, 364, 326, 1122, 1353, 1086, 12123, 468, 4148, 468, 542, 67, 5129, 1435, 225, 468, 1564, ...
exts.append( Extension('fcntl', ['fcntlmodule.c']) )
libs = [] if (config_h_vars.get('FLOCK_NEEDS_LIBBSD', False)): libs = ['bsd'] exts.append( Extension('fcntl', ['fcntlmodule.c'], libraries=libs) )
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
6a4934609a1f1bebdfadc7a0ff6f11e0f8000e31 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/6a4934609a1f1bebdfadc7a0ff6f11e0f8000e31/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
fname = ascii_filename('img'+str(c)+ext)
fname = ascii_filename('img'+str(c))
def process_images(self, soup, baseurl): diskpath = unicode_path(os.path.join(self.current_dir, 'images')) if not os.path.exists(diskpath): os.mkdir(diskpath) c = 0 for tag in soup.findAll(lambda tag: tag.name.lower()=='img' and tag.has_key('src')): iurl = tag['src'] if callable(self.image_url_processor): iurl = self.image_url_processor(baseurl, iurl) ext = os.path.splitext(iurl)[1] ext = ext[:5] if not urlparse.urlsplit(iurl).scheme: iurl = urlparse.urljoin(baseurl, iurl, False) with self.imagemap_lock: if self.imagemap.has_key(iurl): tag['src'] = self.imagemap[iurl] continue try: data = self.fetch_url(iurl) except Exception: self.log.exception('Could not fetch image %s'% iurl) continue c += 1 fname = ascii_filename('img'+str(c)+ext) if isinstance(fname, unicode): fname = fname.encode('ascii', 'replace') imgpath = os.path.join(diskpath, fname+'.jpg') try: im = Image.open(StringIO(data)).convert('RGBA') with self.imagemap_lock: self.imagemap[iurl] = imgpath with open(imgpath, 'wb') as x: im.save(x, 'JPEG') tag['src'] = imgpath except: traceback.print_exc() continue
d64119484b1c350782fce2e0abe4cf89d7366452 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/d64119484b1c350782fce2e0abe4cf89d7366452/simple.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 7369, 12, 2890, 16, 15418, 16, 25427, 4672, 4234, 803, 273, 5252, 67, 803, 12, 538, 18, 803, 18, 5701, 12, 2890, 18, 2972, 67, 1214, 16, 296, 7369, 26112, 309, 486, 1140, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 7369, 12, 2890, 16, 15418, 16, 25427, 4672, 4234, 803, 273, 5252, 67, 803, 12, 538, 18, 803, 18, 5701, 12, 2890, 18, 2972, 67, 1214, 16, 296, 7369, 26112, 309, 486, 1140, 1...
shared = os.path.join (dir, self.shared_library_filename (lib)) static = os.path.join (dir, self.library_filename (lib))
shared = os.path.join ( dir, self.library_filename (lib, lib_type='shared')) static = os.path.join ( dir, self.library_filename (lib, lib_type='static'))
def find_library_file (self, dirs, lib):
55a894280744b617c8b5124107423e5434421340 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/55a894280744b617c8b5124107423e5434421340/unixccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 12083, 67, 768, 261, 2890, 16, 7717, 16, 2561, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 12083, 67, 768, 261, 2890, 16, 7717, 16, 2561, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self._link(body, headers, include_dirs, libraries, library_dirs, lang)
src, obj, exe = self._link(body, headers, include_dirs, libraries, library_dirs, lang)
def try_run (self, body, headers=None, include_dirs=None, libraries=None, library_dirs=None, lang="c"): """Try to compile, link to an executable, and run a program built from 'body' and 'headers'. Return true on success, false otherwise. """ from distutils.ccompiler import CompileError, LinkError self._check_compiler() try: self._link(body, headers, include_dirs, libraries, library_dirs, lang) self.spawn([exe]) ok = 1 except (CompileError, LinkError, DistutilsExecError): ok = 0
ea8c888cf3b62805c0f6d9a486247eb379e36624 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ea8c888cf3b62805c0f6d9a486247eb379e36624/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 67, 2681, 261, 2890, 16, 1417, 16, 1607, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 16, 3303, 1546, 71, 6, 4672, 3536, 7833, 358,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 775, 67, 2681, 261, 2890, 16, 1417, 16, 1607, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 16, 3303, 1546, 71, 6, 4672, 3536, 7833, 358,...
move_ids = [x.id for x in pick.move_lines if x.state=='confirmed']
move_ids = [x.id for x in pick.move_lines if x.state == 'confirmed']
def action_assign(self, cr, uid, ids, *args): for pick in self.browse(cr, uid, ids): move_ids = [x.id for x in pick.move_lines if x.state=='confirmed'] self.pool.get('stock.move').action_assign(cr, uid, move_ids) return True
369221b47101072e094ad2d02fe2edd2b47690aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/369221b47101072e094ad2d02fe2edd2b47690aa/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 6145, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 364, 6002, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 4672, 3635, 67, 2232, 273, 306, 92, 18, 350...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6145, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 364, 6002, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 4672, 3635, 67, 2232, 273, 306, 92, 18, 350...
def set_clamped(self, first, last):
def _set_clamped(self, first, last):
def set_clamped(self, first, last): "set_clamped(first,last), clamp addresses to valid address range and set them" assert(first < last) if first < 0: last = last-first first = 0 if last > 0xffffff: first = 0xffffff - (last-first) last = 0xffffff self.first = first self.last = last
5c46ebd953f1a4b6b2f257db33484ce37c6b09af /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8501/5c46ebd953f1a4b6b2f257db33484ce37c6b09af/debugui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 830, 931, 329, 12, 2890, 16, 1122, 16, 1142, 4672, 315, 542, 67, 830, 931, 329, 12, 3645, 16, 2722, 3631, 19049, 6138, 358, 923, 1758, 1048, 471, 444, 2182, 6, 1815, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 830, 931, 329, 12, 2890, 16, 1122, 16, 1142, 4672, 315, 542, 67, 830, 931, 329, 12, 3645, 16, 2722, 3631, 19049, 6138, 358, 923, 1758, 1048, 471, 444, 2182, 6, 1815, 12...
str += dom_to_html(see, container)
str += dom_to_html(see, container) + ', '
def _seealso(self, seealso, container): """ @return: The HTML code for a see-also field. """ if not seealso: return '' str = '<dl><dt><b>See also:</b>\n </dt><dd>' for see in seealso: str += dom_to_html(see, container) return str[:-2] + '</dd>\n</dl>\n\n'
4671d48aa56b745139394aeef1eacc61decfec52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/4671d48aa56b745139394aeef1eacc61decfec52/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5946, 31144, 12, 2890, 16, 2621, 31144, 16, 1478, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 2621, 17, 31144, 652, 18, 3536, 309, 486, 2621, 31144, 30, 327, 875, 609, 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, 389, 5946, 31144, 12, 2890, 16, 2621, 31144, 16, 1478, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 2621, 17, 31144, 652, 18, 3536, 309, 486, 2621, 31144, 30, 327, 875, 609, 2...
return self.gitcmd('git rev-parse --branches').read().splitlines()
return self.gitcmd('git rev-parse --branches --remotes').read().splitlines()
def getheads(self): if not self.rev: return self.gitcmd('git rev-parse --branches').read().splitlines() else: fh = self.gitcmd("git rev-parse --verify %s" % self.rev) return [fh.read()[:-1]]
f2833fed1ab4dfe4934544ea16713d9c313d4c55 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/f2833fed1ab4dfe4934544ea16713d9c313d4c55/git.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 20263, 12, 2890, 4672, 309, 486, 365, 18, 9083, 30, 327, 365, 18, 6845, 4172, 2668, 6845, 5588, 17, 2670, 1493, 18078, 1493, 2764, 6366, 16063, 896, 7675, 4939, 3548, 1435, 469, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 20263, 12, 2890, 4672, 309, 486, 365, 18, 9083, 30, 327, 365, 18, 6845, 4172, 2668, 6845, 5588, 17, 2670, 1493, 18078, 1493, 2764, 6366, 16063, 896, 7675, 4939, 3548, 1435, 469, 30,...
self.write(f, arcname)
self.write(f, arcname)
def add_dir(self, path, prefix=''): ''' Add a directory recursively to the zip file with an optional prefix. ''' if prefix: self.writestr(prefix+'/', '', 0700) cwd = os.path.abspath(os.getcwd()) try: os.chdir(path) fp = (prefix + ('/' if prefix else '')).replace('//', '/') for f in os.listdir('.'): arcname = fp + f if os.path.isdir(f): self.add_dir(f, prefix=arcname) else: self.write(f, arcname) finally: os.chdir(cwd)
8bfffc74e2e9204fb08d82466a9875db9b91dddd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/8bfffc74e2e9204fb08d82466a9875db9b91dddd/zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1214, 12, 2890, 16, 589, 16, 1633, 2218, 11, 4672, 9163, 1436, 279, 1867, 8536, 358, 326, 3144, 585, 598, 392, 3129, 1633, 18, 9163, 309, 1633, 30, 365, 18, 13284, 313, 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, 527, 67, 1214, 12, 2890, 16, 589, 16, 1633, 2218, 11, 4672, 9163, 1436, 279, 1867, 8536, 358, 326, 3144, 585, 598, 392, 3129, 1633, 18, 9163, 309, 1633, 30, 365, 18, 13284, 313, 12, ...
if is_current_branch(branch_name):
if __is_current_branch(branch_name):
def print_branch(branch_name): initialized = ' ' current = ' ' protected = ' ' branch = stack.Series(branch_name) if branch.is_initialised(): initialized = 's' if is_current_branch(branch_name): current = '>' if branch.get_protected(): protected = 'p' print '%s %s%s\t%s\t%s' % (current, initialized, protected, branch_name, \ branch.get_description())
fe4f6d5812d62c1d6a5e0aa7536bad2e8a3beb6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/fe4f6d5812d62c1d6a5e0aa7536bad2e8a3beb6b/branch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 7500, 12, 7500, 67, 529, 4672, 6454, 273, 296, 296, 783, 273, 296, 296, 4750, 273, 296, 296, 225, 3803, 273, 2110, 18, 6485, 12, 7500, 67, 529, 13, 225, 309, 3803, 18, 291,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7500, 12, 7500, 67, 529, 4672, 6454, 273, 296, 296, 783, 273, 296, 296, 4750, 273, 296, 296, 225, 3803, 273, 2110, 18, 6485, 12, 7500, 67, 529, 13, 225, 309, 3803, 18, 291,...
doDistribution(releaseMode, workingDir, log, outputDir, buildVersion, buildVersionEscaped, distOption, hardhatScript)
doDistribution(releaseMode, workingDir, log, outputDir, buildVersion, buildVersionEscaped, hardhatScript)
def Start(hardhatScript, workingDir, cvsVintage, buildVersion, clobber, log): global buildenv, changes try: buildenv = hardhatlib.defaults buildenv['root'] = workingDir buildenv['hardhatroot'] = whereAmI hardhatlib.init(buildenv) except hardhatlib.HardHatMissingCompilerError: print "Could not locate compiler. Exiting." sys.exit(1) except hardhatlib.HardHatUnknownPlatformError: print "Unsupported platform, '" + os.name + "'. Exiting." sys.exit(1) except hardhatlib.HardHatRegistryError: print print "Sorry, I am not able to read the windows registry to find" print "the necessary VisualStudio complier settings. Most likely you" print "are running the Cygwin python, which will hopefully be supported" print "soon. Please download a windows version of python from:\n" print "http://www.python.org/download/" print sys.exit(1) except Exception, e: print "Could not initialize hardhat environment. Exiting." print "Exception:", e import traceback traceback.print_exc() sys.exit(1) # make sure workingDir is absolute workingDir = os.path.abspath(workingDir) chanDir = os.path.join(workingDir, mainModule) # test if we've been thruough the loop at least once if clobber == 1: if os.path.exists(chanDir): hardhatutil.rmdirRecursive(chanDir) os.chdir(workingDir) # remove outputDir and create it outputDir = os.path.join(workingDir, "output") if os.path.exists(outputDir): hardhatutil.rmdirRecursive(outputDir) os.mkdir(outputDir) buildVersionEscaped = "\'" + buildVersion + "\'" buildVersionEscaped = buildVersionEscaped.replace(" ", "|") if not os.path.exists(chanDir): # Initialize sources print "Setup source tree..." log.write("- - - - tree setup - - - - - - -\n") outputList = hardhatutil.executeCommandReturnOutputRetry( [cvsProgram, "-q", "checkout", cvsVintage, "chandler"]) hardhatutil.dumpOutputList(outputList, log) os.chdir(chanDir) # build release first, because on Windows, debug needs release libs (temp fix for bug 1468) for releaseMode in ('release', 'debug'): doInstall(releaseMode, workingDir, log) doDistribution(releaseMode, workingDir, log, outputDir, buildVersion, buildVersionEscaped, distOption, hardhatScript) ret = doTests(hardhatScript, releaseMode, workingDir, outputDir, cvsVintage, buildVersion, log) CopyLog(os.path.join(workingDir, logPath), log) if ret != 'success': break changes = "-first-run" else: os.chdir(chanDir) print "Checking CVS for updates" log.write("Checking CVS for updates\n") (makeInstall, makeDistribution) = changesInCVS(chanDir, workingDir, cvsVintage, log, 'Makefile') if makeInstall: log.write("Changes in CVS require install\n") changes = "-changes" for releaseMode in ('debug', 'release'): doInstall(releaseMode, workingDir, log) if makeDistribution: log.write("Changes in CVS require making distributions\n") changes = "-changes" for releaseMode in ('debug', 'release'): doDistribution(releaseMode, workingDir, log, outputDir, buildVersion, buildVersionEscaped, distOption, hardhatScript) if not makeInstall and not makeDistribution: log.write("No changes\n") changes = "-nochanges" # do tests for releaseMode in ('debug', 'release'): ret = doTests(hardhatScript, releaseMode, workingDir, outputDir, cvsVintage, buildVersion, log) if ret != 'success': break return ret + changes
b7d96f6e38cf31b878fa8c3597e8b8b36ca61582 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b7d96f6e38cf31b878fa8c3597e8b8b36ca61582/newchandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3603, 12, 20379, 11304, 3651, 16, 5960, 1621, 16, 276, 6904, 58, 474, 410, 16, 1361, 1444, 16, 30152, 16, 613, 4672, 225, 2552, 1361, 3074, 16, 3478, 225, 775, 30, 1361, 3074, 273, 787...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3603, 12, 20379, 11304, 3651, 16, 5960, 1621, 16, 276, 6904, 58, 474, 410, 16, 1361, 1444, 16, 30152, 16, 613, 4672, 225, 2552, 1361, 3074, 16, 3478, 225, 775, 30, 1361, 3074, 273, 787...
box.pack_start(self.quizInfos['container'],False)
box.pack_start(self.quizInfos['container'], False)
def quiz(self,oldbox): #Defining kana selection parameters. self.kanaEngine.kanaSelectParams( (self.param.val('basic_hiragana'), self.param.val('modified_hiragana'), self.param.val('contracted_hiragana'), self.param.val('basic_katakana'), self.param.val('modified_katakana'), self.param.val('contracted_katakana'), self.param.val('additional_katakana')), (self.param.val('basic_hiragana_portions'), self.param.val('modified_hiragana_portions'), self.param.val('contracted_hiragana_portions'), self.param.val('basic_katakana_portions'), self.param.val('modified_katakana_portions'), self.param.val('contracted_katakana_portions'), self.param.val('additional_katakana_portions')), self.param.val('kana_no_repeat'), self.param.val('rand_answer_sel_range')) #Randomly getting a kana (respecting bellow conditions). self.kana = self.kanaEngine.randomKana()
64cfb9e0b60a3a976c72fa9d5d722987641133b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3073/64cfb9e0b60a3a976c72fa9d5d722987641133b9/gtk_gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16479, 12, 2890, 16, 1673, 2147, 4672, 468, 6443, 310, 417, 13848, 4421, 1472, 18, 365, 18, 79, 13848, 4410, 18, 79, 13848, 3391, 1370, 12, 261, 2890, 18, 891, 18, 1125, 2668, 13240, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16479, 12, 2890, 16, 1673, 2147, 4672, 468, 6443, 310, 417, 13848, 4421, 1472, 18, 365, 18, 79, 13848, 4410, 18, 79, 13848, 3391, 1370, 12, 261, 2890, 18, 891, 18, 1125, 2668, 13240, 6...
import os,sys
import os,sys,copy
# dlltool --dllname python15.dll --def python15.def \
0d0aad695df507bf98088a926c2198f62de27cd2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0d0aad695df507bf98088a926c2198f62de27cd2/cygwinccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 2398, 302, 2906, 6738, 1493, 27670, 529, 5790, 3600, 18, 27670, 1493, 536, 5790, 3600, 18, 536, 521, 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, 468, 2398, 302, 2906, 6738, 1493, 27670, 529, 5790, 3600, 18, 27670, 1493, 536, 5790, 3600, 18, 536, 521, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
output += write_outcome(res)
output = write_outcome(res)
def perform_switchfldscore(colID, id_1, id_2, fmeth, ln=cdslang): """Switch the score of id_1 and id_2 in collection_field_fieldvalue. colID - the current collection id_1/id_2 - the id's to change the score for.""" fld_dict = dict(get_def_name('', "field")) res = switch_fld_score(colID, id_1, id_2) output += write_outcome(res) if fmeth == "soo": return perform_showsortoptions(colID, ln, content=output) elif fmeth == "sew": return perform_showsearchfields(colID, ln, content=output) elif fmeth == "seo": return perform_showsearchoptions(colID, ln, content=output)
31263b92d0781de306d2784945c4ebefc2a5f3ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/31263b92d0781de306d2784945c4ebefc2a5f3ac/websearchadminlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 9610, 19794, 6355, 12, 1293, 734, 16, 612, 67, 21, 16, 612, 67, 22, 16, 10940, 546, 16, 7211, 33, 4315, 2069, 539, 4672, 3536, 10200, 326, 4462, 434, 612, 67, 21, 471, 612,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3073, 67, 9610, 19794, 6355, 12, 1293, 734, 16, 612, 67, 21, 16, 612, 67, 22, 16, 10940, 546, 16, 7211, 33, 4315, 2069, 539, 4672, 3536, 10200, 326, 4462, 434, 612, 67, 21, 471, 612,...
elif module[-4:]=='.py': module=module[:-4]
elif module[-4:]=='.pyc': module=module[:-4]
def manage_edit(self, title, module, function, REQUEST=None): """Change the external method
50430b60e98b50a3cc2dd514f50b5594ac4cdbfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/50430b60e98b50a3cc2dd514f50b5594ac4cdbfc/ExternalMethod.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 4619, 12, 2890, 16, 2077, 16, 1605, 16, 445, 16, 12492, 33, 7036, 4672, 3536, 3043, 326, 3903, 707, 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, 10680, 67, 4619, 12, 2890, 16, 2077, 16, 1605, 16, 445, 16, 12492, 33, 7036, 4672, 3536, 3043, 326, 3903, 707, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
${Function} (
EFIAPI ProcessModuleEntryPointList (
#ifndef _AUTOGENH_${Guid}
c0df5fc3f54d659cf283e68f6c5e03b271e178cb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/914/c0df5fc3f54d659cf283e68f6c5e03b271e178cb/GenC.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 82, 536, 389, 18909, 16652, 44, 67, 18498, 22549, 97, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 82, 536, 389, 18909, 16652, 44, 67, 18498, 22549, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
this = apply(_quickfix.new_OpenCloseSettlFlag, args)
this = _quickfix.new_OpenCloseSettlFlag(*args)
def __init__(self, *args): this = apply(_quickfix.new_OpenCloseSettlFlag, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 3678, 4605, 694, 6172, 4678, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 3678, 4605, 694, 6172, 4678, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, ...
conf.QUEUES = dict((queue, options)
if self.queues: conf.QUEUES = dict((queue, options)
def init_queues(self): conf.QUEUES = dict((queue, options) for queue, options in conf.QUEUES.items() if queue in self.queues)
a085969678d7017df128eefc184f4f06bee4f95e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2024/a085969678d7017df128eefc184f4f06bee4f95e/celeryd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 18924, 12, 2890, 4672, 309, 365, 18, 18924, 30, 2195, 18, 19533, 55, 273, 2065, 12443, 4000, 16, 702, 13, 364, 2389, 16, 702, 316, 2195, 18, 19533, 55, 18, 3319, 1435, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 18924, 12, 2890, 4672, 309, 365, 18, 18924, 30, 2195, 18, 19533, 55, 273, 2065, 12443, 4000, 16, 702, 13, 364, 2389, 16, 702, 316, 2195, 18, 19533, 55, 18, 3319, 1435, 309, ...
parse_configfiles(options.configfiles, options, names)
try: parse_configfiles(options.configfiles, options, names) except KeyboardInterrupt,SystemExit: raise except ValueError, e: print 'Error reading config file: %s' % e return except ConfigParser.ParsingError, e: print 'Error reading config file: %s' % e return
def main(options, names): if options.action == 'text': if options.parse and options.introspect: options.parse = False # Process any config files. if options.configfiles: parse_configfiles(options.configfiles, options, names) # Set up the logger if options.action == 'text': logger = None # no logger for text output. elif options.verbosity > 1: logger = ConsoleLogger(options.verbosity) log.register_logger(logger) else: # Each number is a rough approximation of how long we spend on # that task, used to divide up the unified progress bar. stages = [40, # Building documentation 7, # Merging parsed & introspected information 1, # Linking imported variables 3, # Indexing documentation 30, # Parsing Docstrings 1, # Inheriting documentation 2, # Sorting & Grouping 100] # Generating output if options.parse and not options.introspect: del stages[1] # no merging if options.introspect and not options.parse: del stages[1:3] # no merging or linking logger = UnifiedProgressConsoleLogger(options.verbosity, stages) log.register_logger(logger) # check the output directory. if options.action != 'text': if os.path.exists(options.target): if not os.path.isdir(options.target): return log.error("%s is not a directory" % options.target) # Set the default docformat from epydoc import docstringparser docstringparser.DEFAULT_DOCFORMAT = options.docformat # Set the dot path if options.dotpath: from epydoc import dotgraph dotgraph.DOT_PATH = options.dotpath # Build docs for the named values. from epydoc.docbuilder import build_doc_index docindex = build_doc_index(names, options.introspect, options.parse, add_submodules=(options.action!='text')) if docindex is None: return # docbuilder already logged an error. # Perform the specified action. if options.action == 'html': from epydoc.docwriter.html import HTMLWriter html_writer = HTMLWriter(docindex, **options.__dict__) if options.verbose > 0: log.start_progress('Writing HTML docs to %r' % options.target) else: log.start_progress('Writing HTML docs') html_writer.write(options.target) log.end_progress() elif options.action == 'text': log.start_progress('Writing output') from epydoc.docwriter.plaintext import PlaintextWriter plaintext_writer = PlaintextWriter() s = '' for apidoc in docindex.root: s += plaintext_writer.write(apidoc) log.end_progress() if isinstance(s, unicode): s = s.encode('ascii', 'backslashreplace') print s else: print >>sys.stderr, '\nUnsupported action %s!' % options.action # If we supressed docstring warnings, then let the user know. if logger is not None and logger.supressed_docstring_warning: if logger.supressed_docstring_warning == 1: prefix = '1 markup error was found' else: prefix = ('%d markup errors were found' % logger.supressed_docstring_warning) log.warning("%s while processing docstrings. Use the verbose " "switch (-v) to display markup errors." % prefix) # Basic timing breakdown: if options.verbosity >= 2 and logger is not None: logger.print_times()
2362d7d21bf165205c7254488fa884573ffe8e0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/2362d7d21bf165205c7254488fa884573ffe8e0b/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 1257, 4672, 309, 702, 18, 1128, 422, 296, 955, 4278, 309, 702, 18, 2670, 471, 702, 18, 474, 26170, 30, 702, 18, 2670, 273, 1083, 225, 468, 4389, 1281, 642, 1390, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2116, 16, 1257, 4672, 309, 702, 18, 1128, 422, 296, 955, 4278, 309, 702, 18, 2670, 471, 702, 18, 474, 26170, 30, 702, 18, 2670, 273, 1083, 225, 468, 4389, 1281, 642, 1390, ...
for addon in priority_addons_added: priority_addons_added.remove(addon)
del priority_addons_added[:]
def doWarmup(): # Setting globals for backup variables global mp_freezetime_backup global gg_deathmatch_backup global gg_elimination_backup # Setting backup variables mp_freezetime_backup = int(mp_freezetime) gg_deathmatch_backup = int(gg_deathmatch) gg_elimination_backup = int(gg_elimination) # Added priority addons list for addon in priority_addons_added: priority_addons_added.remove(addon) # Checking for warmup in the priority addons list addPriorityAddon('gg_warmup_round') # Setting mp_freezetime mp_freezetime.set(0) # Checking for warmup deathmatch if (int(gg_warmup_deathmatch) or int(gg_deathmatch)) and \ not int(gg_warmup_elimination): # Making sure elimination is off if int(gg_elimination): es.server.queuecmd('gg_elimination 0') # Enable gg_deathmatch if not int(gg_deathmatch): es.server.queuecmd('gg_deathmatch 1') # Checking for deathmatch in the priority addons list addPriorityAddon('gg_deathmatch') # Checking for warmup elimination elif (int(gg_warmup_elimination) or int(gg_elimination)) and \ not int(gg_warmup_deathmatch): # Making sure deathmatch is off if int(gg_deathmatch): es.server.queuecmd('gg_deathmatch 0') # Enable gg_elimination if not int(gg_elimination): es.server.queuecmd('gg_elimination 1') # Checking for elimination in the priority addons list addPriorityAddon('gg_elimination') # Looking for warmup timer warmupCountDown = repeat.find('gungameWarmupTimer') # Start it up if it exists if warmupCountDown: warmupCountDown.stop() warmupCountDown.start(1, int(gg_warmup_timer) + 3) return # Create a timer warmupCountDown = repeat.create('gungameWarmupTimer', countDown) warmupCountDown.start(1, int(gg_warmup_timer) + 3)
eb81d297978883951c796664ac43a0f476558c03 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4555/eb81d297978883951c796664ac43a0f476558c03/gg_warmup_round.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 59, 4610, 416, 13332, 468, 13274, 10941, 364, 5114, 3152, 2552, 6749, 67, 9156, 94, 2374, 67, 9572, 2552, 29758, 67, 323, 421, 1916, 67, 9572, 2552, 29758, 67, 292, 381, 1735, 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, 741, 59, 4610, 416, 13332, 468, 13274, 10941, 364, 5114, 3152, 2552, 6749, 67, 9156, 94, 2374, 67, 9572, 2552, 29758, 67, 323, 421, 1916, 67, 9572, 2552, 29758, 67, 292, 381, 1735, 67, ...
def object_uri (id):
def object_uri(id):
def object_uri (id): """Returns the full URI for the FluidDB object with the given id.""" return '%s/objects/%s' % (FLUIDDB_PATH, id)
e75848841ac96982524448e932e12fd6ff9cbe0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12637/e75848841ac96982524448e932e12fd6ff9cbe0c/fdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 733, 67, 1650, 12, 350, 4672, 3536, 1356, 326, 1983, 3699, 364, 326, 3857, 1911, 2290, 733, 598, 326, 864, 612, 12123, 327, 1995, 87, 19, 6911, 5258, 87, 11, 738, 261, 19054, 3060, 229...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 733, 67, 1650, 12, 350, 4672, 3536, 1356, 326, 1983, 3699, 364, 326, 3857, 1911, 2290, 733, 598, 326, 864, 612, 12123, 327, 1995, 87, 19, 6911, 5258, 87, 11, 738, 261, 19054, 3060, 229...
"the latest dataset which the image is contained in will be used. If the image is not in a dataset, one will be created."),
"the latest dataset which the image is contained in will be used. If the image is not in a dataset, one will be created.", grouping = "2"),
def setup(): """ Defines the OMERO.scripts parameters and returns the created client object. """ import omero.scripts as scripts client = scripts.client(SCRIPT_NAME, scripts.Long( "Image_ID", optional = False, description = "ID of a valid dataset"), scripts.Long( "Dataset_ID", optional = True, description = "ID of a dataset to which output images should be added. If not provided,"+\
3eaf2e09472808b3b11ff5d84e970de79bc05866 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/3eaf2e09472808b3b11ff5d84e970de79bc05866/Run_Cecog_1.0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13332, 3536, 18003, 281, 326, 28839, 13309, 18, 12827, 1472, 471, 1135, 326, 2522, 1004, 733, 18, 3536, 1930, 8068, 2439, 18, 12827, 487, 8873, 1004, 273, 8873, 18, 2625, 12, 10885, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3875, 13332, 3536, 18003, 281, 326, 28839, 13309, 18, 12827, 1472, 471, 1135, 326, 2522, 1004, 733, 18, 3536, 1930, 8068, 2439, 18, 12827, 487, 8873, 1004, 273, 8873, 18, 2625, 12, 10885, ...
utils.logger.info( 'non recursive query has been optimized on type' )
utils.logger.debug( 'non recursive query has been optimized on type' )
def __findout_range( self, name, decl_type, recursive ): if not self._optimized: utils.logger.info( 'running non optimized query - optimization has not been done' ) decls = self.declarations if recursive: decls = algorithm.make_flatten( self.declarations ) return decls
420149f2642ab48ea7ca588594f35e1e04160a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7398/420149f2642ab48ea7ca588594f35e1e04160a38/scopedef.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4720, 659, 67, 3676, 12, 365, 16, 508, 16, 3496, 67, 723, 16, 5904, 262, 30, 309, 486, 365, 6315, 16689, 1235, 30, 2990, 18, 4901, 18, 1376, 12, 296, 8704, 1661, 15411, 843, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4720, 659, 67, 3676, 12, 365, 16, 508, 16, 3496, 67, 723, 16, 5904, 262, 30, 309, 486, 365, 6315, 16689, 1235, 30, 2990, 18, 4901, 18, 1376, 12, 296, 8704, 1661, 15411, 843, 30...
print >>sys.stderr, "AG INTERNAL ERROR: strange response in Save,", response
def save(self, action): chooser = gtk.FileChooserDialog( _('Save ...'), None, gtk.FILE_CHOOSER_ACTION_SAVE, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_SAVE, gtk.RESPONSE_OK))
b6a9be012c8f1f57e4e92178a9292fa4f9691330 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1380/b6a9be012c8f1f57e4e92178a9292fa4f9691330/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 1301, 4672, 5011, 13164, 273, 22718, 18, 812, 17324, 6353, 12, 389, 2668, 4755, 1372, 19899, 599, 16, 22718, 18, 3776, 67, 22213, 51, 2123, 67, 12249, 67, 25242, 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, 1923, 12, 2890, 16, 1301, 4672, 5011, 13164, 273, 22718, 18, 812, 17324, 6353, 12, 389, 2668, 4755, 1372, 19899, 599, 16, 22718, 18, 3776, 67, 22213, 51, 2123, 67, 12249, 67, 25242, 16, ...
return readwrite.write_dot_hypergraph(self)
return readwrite.dot.write_hypergraph(self)
def write(self, fmt='xml'): """ Write the hypergraph to a string. Depending of the output format, this string can be used by read() to rebuild the graph. @type fmt: string @param fmt: Output format. Possible formats are: 1. 'xml' - XML (default) 2. 'dot' - DOT Language (for GraphViz) 3. 'dotclr' - DOT Language, colored
c4ee1c71cb59fa41d33f43aa92684d3aa9e2acde /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4687/c4ee1c71cb59fa41d33f43aa92684d3aa9e2acde/Hypergraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1325, 2218, 2902, 11, 4672, 3536, 2598, 326, 9512, 4660, 358, 279, 533, 18, 4019, 2846, 434, 326, 876, 740, 16, 333, 533, 848, 506, 1399, 635, 855, 1435, 358, 13419...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1045, 12, 2890, 16, 1325, 2218, 2902, 11, 4672, 3536, 2598, 326, 9512, 4660, 358, 279, 533, 18, 4019, 2846, 434, 326, 876, 740, 16, 333, 533, 848, 506, 1399, 635, 855, 1435, 358, 13419...
value=array_manip.mult_ncerr(val1, err2_1, val2, err2_2)
value = array_manip.mult_ncerr(val1, err2_1, val2, err2_2)
def mult_ncerr(left,right,**kwargs): """ This function multiplies two objects (SOM, SO or tuple[val,val_err2]) and returns the result of the multiplication in an SOM. The function does not handle the case of tuple/tuple. Parameters: ---------- -> left Object on the left of the multiplication sign -> right Object on the right of the multiplication sign -> kwargs is a list of key word arguments that the function accepts: axis=<y or x> This is the axis one wishes to manipulate. If no argument is given the default value is y axis_pos=<number> This is position of the axis in the axis array. If no argument is given, the default value is 0 Returns: ------- <- A SOM or SO containing the results of the multiplication Exceptions: ---------- <- TypeError is raised if the tuple/tuple case is presented to the function <- IndexError is raised if the two SOMs do not contain the same number of spectra <- RunTimeError is raised if the x-axis units of the SOMs do not match <- RunTimeError is raised if the y-axis units of the SOMs do not match <- RunTimeError is raised if the x-axes of the two SOs are not equal """ # import the helper functions import hlr_utils # set up for working through data (result,res_descr)=hlr_utils.empty_result(left,right) (l_descr,r_descr)=hlr_utils.get_descr(left,right) # error check information if (r_descr=="SOM" and l_descr!="SOM") \ or (r_descr=="SO" and l_descr=="number"): left,right = hlr_utils.swap_args(left,right) l_descr,r_descr = hlr_utils.swap_args(l_descr,r_descr) elif r_descr=="SOM" and l_descr=="SOM": hlr_utils.hlr_math_compatible(left,l_descr,right,r_descr) elif l_descr=="number" and r_descr=="number": raise RuntimeError, "tuple, tuple operation is not supported!" else: pass # Check for axis keyword argument try: axis = kwargs["axis"] except KeyError: axis = "y" # Check for axis_pos keyword argument try: axis_pos = kwargs["axis_pos"] except KeyError: axis_pos = 0 result=hlr_utils.copy_som_attr(result,res_descr,left,l_descr,right,r_descr) # iterate through the values import array_manip for i in range(hlr_utils.get_length(left,right)): val1 = hlr_utils.get_value(left,i,l_descr,axis,axis_pos) err2_1 = hlr_utils.get_err2(left,i,l_descr,axis,axis_pos) val2 = hlr_utils.get_value(right,i,r_descr,axis,axis_pos) err2_2 = hlr_utils.get_err2(right,i,r_descr,axis,axis_pos) (descr_1,descr_2)=hlr_utils.get_descr(val1, val2) hlr_utils.hlr_math_compatible(val1, descr_1, val2, descr_2) value=array_manip.mult_ncerr(val1, err2_1, val2, err2_2) map_so = hlr_utils.get_map_so(left,None,i) hlr_utils.result_insert(result,res_descr,value,map_so,axis,axis_pos) return result
e39979325b6fc8a32b6f5159862092edaf952c8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/e39979325b6fc8a32b6f5159862092edaf952c8b/hlr_mult_ncerr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1778, 67, 14202, 370, 12, 4482, 16, 4083, 16, 636, 4333, 4672, 3536, 1220, 445, 3309, 5259, 2795, 2184, 261, 55, 1872, 16, 7460, 578, 3193, 63, 1125, 16, 1125, 67, 370, 22, 5717, 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, 1778, 67, 14202, 370, 12, 4482, 16, 4083, 16, 636, 4333, 4672, 3536, 1220, 445, 3309, 5259, 2795, 2184, 261, 55, 1872, 16, 7460, 578, 3193, 63, 1125, 16, 1125, 67, 370, 22, 5717, 471, ...
buildscript.execute(['git', 'fetch'], 'git', cwd=cwd)
buildscript.execute(['git', 'fetch'], cwd=cwd)
def _update(self, buildscript, copydir=None): cwd = self.get_checkoutdir(copydir) buildscript.execute(['git', 'fetch'], 'git', cwd=cwd)
1a224b0a56aeaf262d7650245ef6abcabae0d850 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4596/1a224b0a56aeaf262d7650245ef6abcabae0d850/git.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 12, 2890, 16, 1361, 4263, 16, 1610, 1214, 33, 7036, 4672, 7239, 273, 365, 18, 588, 67, 17300, 1214, 12, 3530, 1214, 13, 1361, 4263, 18, 8837, 12, 3292, 6845, 2187, 296, 5754...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 12, 2890, 16, 1361, 4263, 16, 1610, 1214, 33, 7036, 4672, 7239, 273, 365, 18, 588, 67, 17300, 1214, 12, 3530, 1214, 13, 1361, 4263, 18, 8837, 12, 3292, 6845, 2187, 296, 5754...
self.target: [('create', act[1])],
self.target: target_obj.create(cursor, user, act[1], context=context),
def set(self, cursor, user, record_id, model, name, values, context=None): ''' Set the values.
106419b26e09241de3ea186345c92bcca81b7d89 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9266/106419b26e09241de3ea186345c92bcca81b7d89/many2many.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 3347, 16, 729, 16, 1409, 67, 350, 16, 938, 16, 508, 16, 924, 16, 819, 33, 7036, 4672, 9163, 1000, 326, 924, 18, 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, 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, 444, 12, 2890, 16, 3347, 16, 729, 16, 1409, 67, 350, 16, 938, 16, 508, 16, 924, 16, 819, 33, 7036, 4672, 9163, 1000, 326, 924, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
ga.put(g_a, buf[ga.zip(llo,lhi)], llo, lhi)
ga.put(g_a, buf[ilo:ihi,jlo:jhi], llo, lhi)
def time_put(g_a, lo, hi, buf, chunk, jump, local): count = 0 rows = hi[0]-lo[0] cols = hi[1]-lo[1] shifti = [rows, 0, rows] shiftj = [0, cols, cols] seconds = time.time() # distance between consecutive patches increased by jump # to destroy locality of reference for ilo in range(lo[0], hi[0]-chunk-jump+1, chunk+jump): ihi = ilo + chunk for jlo in range(lo[1], hi[1]-chunk-jump+1, chunk+jump): jhi = jlo + chunk count += 1 if local: llo = [ilo,jlo] lhi = [ihi,jhi] ga.put(g_a, buf[ga.zip(llo,lhi)], llo, lhi) else: index = count%3 llo = [ilo+shifti[index],jlo+shiftj[index]] lhi = [ihi+shifti[index],jhi+shiftj[index]] ga.put(g_a, buf[ga.zip(llo,lhi)], llo, lhi) seconds = time.time() - seconds return seconds/count
570a2e492405d2460b25b2068fa01defc8c4465e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9416/570a2e492405d2460b25b2068fa01defc8c4465e/perf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 813, 67, 458, 12, 75, 67, 69, 16, 437, 16, 10118, 16, 1681, 16, 2441, 16, 11833, 16, 1191, 4672, 1056, 273, 374, 2595, 273, 10118, 63, 20, 65, 17, 383, 63, 20, 65, 5347, 273, 10118...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 813, 67, 458, 12, 75, 67, 69, 16, 437, 16, 10118, 16, 1681, 16, 2441, 16, 11833, 16, 1191, 4672, 1056, 273, 374, 2595, 273, 10118, 63, 20, 65, 17, 383, 63, 20, 65, 5347, 273, 10118...
self.value = self.addr self.addr = IncEthernetAddr(self.addr, inc)
self.value = NextEthernetAddr.addr NextEthernetAddr.addr = IncEthernetAddr(NextEthernetAddr.addr, inc)
def __init__(self, inc = 1): self.value = self.addr self.addr = IncEthernetAddr(self.addr, inc)
33010e0461a9611e7d585f759cbebb36fcad0279 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7385/33010e0461a9611e7d585f759cbebb36fcad0279/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7290, 273, 404, 4672, 365, 18, 1132, 273, 365, 18, 4793, 365, 18, 4793, 273, 15090, 41, 27281, 3178, 12, 2890, 18, 4793, 16, 7290, 13, 2, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7290, 273, 404, 4672, 365, 18, 1132, 273, 365, 18, 4793, 365, 18, 4793, 273, 15090, 41, 27281, 3178, 12, 2890, 18, 4793, 16, 7290, 13, 2, -100, -100, -...
if (data.find("Calm")!=-1): self.Report.windspeed=0.0 self.Report.winddir=None self.Report.windcomp=None elif (data.find("Variable")!=-1): v,a,speed,r=data.split(" ",3) self.Report.windspeed=(float(speed)*0.44704) self.Report.winddir=None self.Report.windcomp=None
if (data.find("Calm") != -1): self.Report.windspeed = 0.0 self.Report.winddir = None self.Report.windcomp = None elif (data.find("Variable") != -1): speed = data.split(" ", 3)[2] self.Report.windspeed = (float(speed)*0.44704) self.Report.winddir = None self.Report.windcomp = None
def ParseReport(self, MetarReport=None): """Take report with raw info only and return it with in parsed values filled in. Note: This function edits the WeatherReport object you supply!""" if self.Report is None and MetarReport is None: raise EmptyReportException, \ "No report given on init and ParseReport()." elif MetarReport is not None: self.Report=MetarReport
fe1cdcd11658fbbfba6d30dfe37a2f9dfce6a1a8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4602/fe1cdcd11658fbbfba6d30dfe37a2f9dfce6a1a8/pymetar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 4820, 12, 2890, 16, 21604, 297, 4820, 33, 7036, 4672, 3536, 13391, 2605, 598, 1831, 1123, 1338, 471, 327, 518, 598, 316, 2707, 924, 6300, 316, 18, 3609, 30, 1220, 445, 24450, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2884, 4820, 12, 2890, 16, 21604, 297, 4820, 33, 7036, 4672, 3536, 13391, 2605, 598, 1831, 1123, 1338, 471, 327, 518, 598, 316, 2707, 924, 6300, 316, 18, 3609, 30, 1220, 445, 24450, 326, ...
pattern = b"Unable to decode the command from the command line:"
if p.returncode == 1: pattern = b"Unable to decode the command from the command line:" elif p.returncode == 0: pattern = b"'\\xff' " else: raise AssertionError("Unknown exit code: %s, output=%a" % (p.returncode, stdout))
def test_undecodable_code(self): # Raise SkipTest() if sys.executable is not encodable to ascii test.support.workaroundIssue8611()
ebe53a23c9edc8f01fa261f9ea8e358b1ad481a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/ebe53a23c9edc8f01fa261f9ea8e358b1ad481a2/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 318, 323, 1559, 429, 67, 710, 12, 2890, 4672, 468, 20539, 6611, 4709, 1435, 309, 2589, 18, 17751, 353, 486, 17755, 429, 358, 11384, 1842, 18, 13261, 18, 1252, 12716, 12956, 529...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 318, 323, 1559, 429, 67, 710, 12, 2890, 4672, 468, 20539, 6611, 4709, 1435, 309, 2589, 18, 17751, 353, 486, 17755, 429, 358, 11384, 1842, 18, 13261, 18, 1252, 12716, 12956, 529...
try: self.pymw_master.get_result(task) except Exception as e: self.assert_(e[0].count("integer division or modulo by zero")>0)
if sys.version_info[0] < 3: try: self.pymw_master.get_result(task) except Exception as e: self.assert_(e.args[0].count("integer division or modulo by zero")>0) else: try: self.pymw_master.get_result(task) except Exception as e: self.assert_(e.args[0].count("int division or modulo by zero")>0)
def testProgramError(self): """Checking that exceptions from the worker get passed back correctly""" task = self.pymw_master.submit_task(err_worker) try: self.pymw_master.get_result(task) except Exception as e: self.assert_(e[0].count("integer division or modulo by zero")>0)
03dd4368054a01f888e97225480da2054cba3c76 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8868/03dd4368054a01f888e97225480da2054cba3c76/test_cases.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 9459, 668, 12, 2890, 4672, 3536, 14294, 716, 4798, 628, 326, 4322, 336, 2275, 1473, 8783, 8395, 1562, 273, 365, 18, 2074, 81, 91, 67, 7525, 18, 9297, 67, 4146, 12, 370, 67, 10124...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9459, 668, 12, 2890, 4672, 3536, 14294, 716, 4798, 628, 326, 4322, 336, 2275, 1473, 8783, 8395, 1562, 273, 365, 18, 2074, 81, 91, 67, 7525, 18, 9297, 67, 4146, 12, 370, 67, 10124...
def copy_with_permissions(src, dst, be_verbose=0): """copies the file and the permissions, except any setuid or setgid bits""" shutil.copyfile(src,dst)
def copy_permissions(src, dst, be_verbose=0, allow_suid=0):
def copy_with_permissions(src, dst, be_verbose=0): """copies the file and the permissions, except any setuid or setgid bits""" shutil.copyfile(src,dst) sbuf = os.stat(src)
f1e328491e1f9bb836555cc93224ac39ead0dba8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6201/f1e328491e1f9bb836555cc93224ac39ead0dba8/jk_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 9612, 12, 4816, 16, 3046, 16, 506, 67, 11369, 33, 20, 16, 1699, 67, 87, 1911, 33, 20, 4672, 2393, 696, 273, 1140, 18, 5642, 12, 4816, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 9612, 12, 4816, 16, 3046, 16, 506, 67, 11369, 33, 20, 16, 1699, 67, 87, 1911, 33, 20, 4672, 2393, 696, 273, 1140, 18, 5642, 12, 4816, 13, 2, -100, -100, -100, -100, -100, ...
((-2.0, 2.0, 0.0, 0.0, 0.0, 0.0), (2.0, -2.0, 0.0, 0.0, 0.0, 0.0))) assert approx_equal(a.deltas(), (-1.0, 1.0, 0.0, 0.0, 0.0, 0.0)) assert approx_equal(a.rms_deltas(), 0.47140452079103168)
((-2, 2, 0, 16, 12, 24), (2, -2, 0, -16, -12, -24))) assert approx_equal(a.deltas(), (-1, 1, 0, 4, 3, 6)) assert approx_equal(a.rms_deltas(), 3.711842908553348)
def exercise_adp_similarity(): u_cart = ((1,3,2,4,3,6),(2,4,2,6,5,1)) u_iso = (-1,-1) use_u_aniso = (True, True) weight = 1 a = adp_restraints.adp_similarity( u_cart=u_cart, u_iso=u_iso, use_u_aniso=use_u_aniso, weight=weight) assert approx_equal(a.u_cart, u_cart) assert approx_equal(a.u_iso, u_iso) assert approx_equal(a.use_u_aniso, use_u_aniso) assert a.weight == weight assert approx_equal(a.residual(), 68) assert approx_equal(a.gradients(), ((-2.0, -2.0, 0.0, -8.0, -8.0, 20.0), (2.0, 2.0, -0.0, 8.0, 8.0, -20.0))) assert approx_equal(a.deltas(), (-1.0, -1.0, 0.0, -2.0, -2.0, 5.0)) assert approx_equal(a.rms_deltas(), 2.7487370837451071) # u_cart = ((1,3,2,4,3,6),(-1,-1,-1,-1,-1,-1)) u_iso = (-1,2) use_u_aniso = (True, False) a = adp_restraints.adp_similarity( u_cart=u_cart, u_iso=u_iso, use_u_aniso=use_u_aniso, weight=weight) assert approx_equal(a.u_cart, u_cart) assert approx_equal(a.u_iso, u_iso) assert approx_equal(a.use_u_aniso, use_u_aniso) assert a.weight == weight assert approx_equal(a.residual(), 2) assert approx_equal(a.gradients(), ((-2.0, 2.0, 0.0, 0.0, 0.0, 0.0), (2.0, -2.0, 0.0, 0.0, 0.0, 0.0))) assert approx_equal(a.deltas(), (-1.0, 1.0, 0.0, 0.0, 0.0, 0.0)) assert approx_equal(a.rms_deltas(), 0.47140452079103168) # i_seqs_aa = (1,2) # () - () i_seqs_ai = (1,0) # () - o i_seqs_ia = (3,2) # o - () i_seqs_ii = (0,3) # o - o p_aa = adp_restraints.adp_similarity_proxy(i_seqs=i_seqs_aa,weight=weight) p_ai = adp_restraints.adp_similarity_proxy(i_seqs=i_seqs_ai,weight=weight) p_ia = adp_restraints.adp_similarity_proxy(i_seqs=i_seqs_ia,weight=weight) p_ii = adp_restraints.adp_similarity_proxy(i_seqs=i_seqs_ii,weight=weight) assert p_aa.i_seqs == i_seqs_aa assert p_aa.weight == weight u_cart = flex.sym_mat3_double(((-1,-1,-1,-1,-1,-1), (1,2,2,4,3,6), (2,4,2,6,5,1), (-1,-1,-1,-1,-1,-1))) u_iso = flex.double((1,-1,-1,2)) use_u_aniso = flex.bool((False, True,True,False)) for p in (p_aa,p_ai,p_ia,p_ii): a = adp_restraints.adp_similarity(u_cart=u_cart, u_iso=u_iso, use_u_aniso=use_u_aniso, proxy=p) assert approx_equal( a.u_cart, (u_cart[p.i_seqs[0]],u_cart[p.i_seqs[1]])) assert approx_equal(a.weight, weight) # gradients_aniso_cart = flex.sym_mat3_double(u_cart.size(), (0,0,0,0,0,0)) gradients_iso = flex.double(u_cart.size(), 0) proxies = adp_restraints.shared_adp_similarity_proxy([p,p]) residuals = adp_restraints.adp_similarity_residuals( u_cart=u_cart, u_iso=u_iso, use_u_aniso=use_u_aniso, proxies=proxies) assert approx_equal(residuals, (a.residual(),a.residual())) deltas_rms = adp_restraints.adp_similarity_deltas_rms( u_cart=u_cart, u_iso=u_iso, use_u_aniso=use_u_aniso, proxies=proxies) assert approx_equal(deltas_rms, (a.rms_deltas(),a.rms_deltas())) residual_sum = adp_restraints.adp_similarity_residual_sum( u_cart=u_cart, u_iso=u_iso, use_u_aniso=use_u_aniso, proxies=proxies, gradients_aniso_cart=gradients_aniso_cart, gradients_iso=gradients_iso) assert approx_equal(residual_sum, 2 * a.residual()) fd_grads_aniso, fd_grads_iso = finite_difference_gradients( restraint_type=adp_restraints.adp_similarity, proxy=p, u_cart=u_cart, u_iso=u_iso, use_u_aniso=use_u_aniso) for g,e in zip(gradients_aniso_cart, fd_grads_aniso): assert approx_equal(g, matrix.col(e)*2) for g,e in zip(gradients_iso, fd_grads_iso): assert approx_equal(g, e*2) # # check frame invariance of residual # u_cart_1 = matrix.sym(sym_mat3=(0.1,0.2,0.05,0.03,0.02,0.01)) u_cart_2 = matrix.sym(sym_mat3=(0.21,0.32,0.11,0.02,0.02,0.07)) u_cart = (u_cart_1.as_sym_mat3(),u_cart_2.as_sym_mat3()) u_iso = (-1, -1) use_u_aniso = (True, True) a = adp_restraints.adp_similarity( u_cart=u_cart, u_iso=u_iso, use_u_aniso=use_u_aniso, weight=1) expected_residual = a.residual() gen = flex.mersenne_twister() for i in range(20): R = matrix.rec(gen.random_double_r3_rotation_matrix(),(3,3)) u_cart_1_rot = R * u_cart_1 * R.transpose() u_cart_2_rot = R * u_cart_2 * R.transpose() u_cart = (u_cart_1_rot.as_sym_mat3(),u_cart_2_rot.as_sym_mat3()) a = adp_restraints.adp_similarity( u_cart=u_cart, u_iso=u_iso, use_u_aniso=use_u_aniso, weight=1) assert approx_equal(a.residual(), expected_residual)
bf7f58e88e8dbab480846de04eba6b5144b979e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/bf7f58e88e8dbab480846de04eba6b5144b979e7/tst_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 67, 361, 84, 67, 22985, 560, 13332, 582, 67, 11848, 273, 14015, 21, 16, 23, 16, 22, 16, 24, 16, 23, 16, 26, 3631, 12, 22, 16, 24, 16, 22, 16, 26, 16, 25, 16, 21, 3719, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 67, 361, 84, 67, 22985, 560, 13332, 582, 67, 11848, 273, 14015, 21, 16, 23, 16, 22, 16, 24, 16, 23, 16, 26, 3631, 12, 22, 16, 24, 16, 22, 16, 26, 16, 25, 16, 21, 3719, 5...
if int(es.getplayerteam(userid)) > 1: gungamePlayer = gungame.getPlayer(userid) es.server.cmd('es_xdelayed 0.001 es_xgive %s weapon_%s' %(userid, gungamePlayer.get('weapon'))) else: raise UseridError, str(userid) + ' is an invalid userid'
gungamePlayer = gungame.getPlayer(userid) if int(es.getplayerteam(userid)) > 1 and not gungamePlayer.attributes['isdead']: playerWeapon = gungamePlayer.get('weapon') if playerWeapon != 'knife': es.server.cmd('es_xdelayed 0.001 es_xgive %s weapon_%s' %(userid, playerWeapon)) else: raise UseridError, str(userid) + ' is an invalid userid'
def giveWeapon(userid): if es.exists('userid', userid): if int(es.getplayerteam(userid)) > 1: gungamePlayer = gungame.getPlayer(userid) es.server.cmd('es_xdelayed 0.001 es_xgive %s weapon_%s' %(userid, gungamePlayer.get('weapon'))) else: raise UseridError, str(userid) + ' is an invalid userid'
8d56a60d782651e57758854cb317e1af6af3c0e7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4575/8d56a60d782651e57758854cb317e1af6af3c0e7/gungame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8492, 3218, 28629, 12, 8339, 4672, 309, 5001, 18, 1808, 2668, 8339, 2187, 6709, 4672, 31475, 13957, 12148, 273, 31475, 13957, 18, 588, 12148, 12, 8339, 13, 309, 509, 12, 281, 18, 588, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8492, 3218, 28629, 12, 8339, 4672, 309, 5001, 18, 1808, 2668, 8339, 2187, 6709, 4672, 31475, 13957, 12148, 273, 31475, 13957, 18, 588, 12148, 12, 8339, 13, 309, 509, 12, 281, 18, 588, 14...
result = '' name = object.__name__
name = object.__name__
def docmodule(self, object): """Produce text documentation for a given module object.""" result = ''
2c3f3ddf9452a1f3f228e0d8c7abdbeed214a6b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2c3f3ddf9452a1f3f228e0d8c7abdbeed214a6b7/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 2978, 12, 2890, 16, 733, 4672, 3536, 25884, 977, 7323, 364, 279, 864, 1605, 733, 12123, 563, 273, 875, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 2978, 12, 2890, 16, 733, 4672, 3536, 25884, 977, 7323, 364, 279, 864, 1605, 733, 12123, 563, 273, 875, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
delete_b.append(Draw.Button('X', DELETE_B+eventbase, xoff+267, yoff-80-hs*82, CONTROLSIZE, CONTROLSIZE, 'Delete this Hide or Show entry'))
delete_b.append(Draw.Button('X', DELETE_B+eventbase, xoff+267, yoff-80-hs*82, CONTROLSIZE, CONTROLSIZE, 'Delete this entry'))
def gui(): global dataref_m, dataref_b, indices_b, indices_t, vals_b, clear_b, loops_b global hideshow_m, from_b, to_b, up_b, down_b, delete_b, addhs_b global cancel_b, apply_b dataref_m=[] dataref_b=[] indices_b=[] indices_t=[] vals_b=[] clear_b=None loops_b=[] hideshow_m=[] from_b=[] to_b=[] up_b=[] down_b=[] delete_b=[] addhs_b=None cancel_b=None apply_b=None # Default theme text =[ 0, 0, 0, 255] text_hi=[255, 255, 255, 255] header =[165, 165, 165, 255] panel =[255, 255, 255, 40] back =[180, 180, 180, 255] error =[255, 80, 80, 255] # where's the theme value for this? # Actual theme if Blender.Get('version') >= 235: theme=Blender.Window.Theme.Get() if theme: theme=theme[0] space=theme.get('buts') text=theme.get('ui').text text_hi=space.text_hi header=space.header header=[max(header[0]-30, 0), # 30 appears to be hard coded max(header[1]-30, 0), max(header[2]-30, 0), header[3]] panel=space.panel back=space.back size=BGL.Buffer(BGL.GL_FLOAT, 4) BGL.glGetFloatv(BGL.GL_SCISSOR_BOX, size) size=size.list x=int(size[2]) y=int(size[3]) BGL.glEnable(BGL.GL_BLEND) BGL.glBlendFunc(BGL.GL_SRC_ALPHA, BGL.GL_ONE_MINUS_SRC_ALPHA) BGL.glClearColor(float(back[0])/255, float(back[1])/255, float(back[2])/255, 1) BGL.glClear(BGL.GL_COLOR_BUFFER_BIT) for boneno in range(bonecount): eventbase=boneno*EVENTMAX if vertical: xoff=PANELPAD+PANELINDENT yoff=y-(170+(CONTROLSIZE-1)*framecount)*boneno else: xoff=PANELPAD+boneno*(PANELWIDTH+PANELPAD)+PANELINDENT yoff=y BGL.glColor4ub(*header) BGL.glRectd(xoff-PANELINDENT, yoff-PANELTOP, xoff-PANELINDENT+PANELWIDTH, yoff-PANELTOP-PANELHEAD) BGL.glColor4ub(*panel) BGL.glRectd(xoff-PANELINDENT, yoff-PANELTOP-PANELHEAD, xoff-PANELINDENT+PANELWIDTH, yoff-170-(CONTROLSIZE-1)*framecount) txt='parent bone' if boneno: txt='grand'+txt txt='great-'*(boneno-1)+txt txt=txt[0].upper()+txt[1:] BGL.glColor4ub(*text_hi) BGL.glRasterPos2d(xoff, yoff-23) Draw.Text(txt) Draw.Label("Dataref:", xoff-4, yoff-54, 100, CONTROLSIZE) BGL.glColor4ub(*error) # For errors (valid,mbutton,bbutton,ibutton,tbutton)=drawdataref(datarefs, indices, eventbase, boneno, xoff-4, yoff-80) dataref_m.append(mbutton) dataref_b.append(bbutton) indices_b.append(ibutton) indices_t.append(tbutton) vals_b.append([]) if valid: # is a valid or custom dataref Draw.Label("Dataref values:", xoff-4, yoff-132, 150, CONTROLSIZE) for i in range(framecount): Draw.Label("Frame #%d:" % (i+1), xoff-4+CONTROLSIZE, yoff-152-(CONTROLSIZE-1)*i, 100, CONTROLSIZE) if i>1: v9='v9: ' else: v9='' vals_b[-1].append(Draw.Number('', i+VALS_B+eventbase, xoff+104, yoff-152-(CONTROLSIZE-1)*i, 80, CONTROLSIZE, vals[boneno][i], -999999, 999999, v9+'The dataref value that corresponds to the pose in frame %d' % (i+1))) # How do you delete a keyframe in Python? #if boneno==0 and framecount>2: # clear_b=Draw.Button('Delete', CLEAR_B+eventbase, xoff+208, yoff-158-26*i, 80, CONTROLSIZE, 'Clear all poses for all bones from frame %d' % framecount) Draw.Label("Loop:", xoff-4+CONTROLSIZE, yoff-160-(CONTROLSIZE-1)*framecount, 100, CONTROLSIZE) loops_b.append(Draw.Number('', LOOPS_B+eventbase, xoff+104, yoff-160-(CONTROLSIZE-1)*framecount, 80, CONTROLSIZE, loops[boneno], -999999, 999999, 'v9: The animation will loop back to frame 1 when the dataref value exceeds this number. Enter 0 for no loop.')) else: loops_b.append(None) if vertical: xoff=PANELPAD+PANELINDENT yoff=y-(170+(CONTROLSIZE-1)*framecount)*bonecount else: xoff=PANELPAD+bonecount*(PANELWIDTH+PANELPAD)+PANELINDENT yoff=y BGL.glColor4ub(*header) BGL.glRectd(xoff-PANELINDENT, yoff-PANELTOP, xoff-PANELINDENT+PANELWIDTH, yoff-PANELTOP-PANELHEAD) BGL.glColor4ub(*panel) BGL.glRectd(xoff-PANELINDENT, yoff-PANELTOP-PANELHEAD, xoff-PANELINDENT+PANELWIDTH, yoff-64-len(hideshow)*82) BGL.glColor4ub(*text_hi) BGL.glRasterPos2d(xoff, yoff-23) Draw.Text("Hide/Show for all children of %s" % armature.name) for hs in range(len(hideshow)): eventbase=(bonecount+hs)*EVENTMAX BGL.glColor4ub(*panel) BGL.glRectd(xoff-4, yoff-PANELTOP-PANELHEAD-4-hs*82, xoff-13+PANELWIDTH, yoff-PANELTOP-101-hs*82) BGL.glColor4ub(*error) # For errors (valid,mbutton,bbutton,ibutton,tbutton)=drawdataref(hideshow, hideshowindices, eventbase, hs, xoff-4, yoff-54-hs*82) dataref_m.append(mbutton) dataref_b.append(bbutton) indices_b.append(ibutton) indices_t.append(tbutton) if hs: up_b.append(Draw.Button('^', UP_B+eventbase, xoff+217, yoff-80-hs*82, CONTROLSIZE, CONTROLSIZE, 'Move this Hide or Show entry up')) else: up_b.append(None) if hs!=len(hideshow)-1: down_b.append(Draw.Button('v', DOWN_B+eventbase, xoff+237, yoff-80-hs*82, CONTROLSIZE, CONTROLSIZE, 'Move this Hide or Show entry down')) else: down_b.append(None) delete_b.append(Draw.Button('X', DELETE_B+eventbase, xoff+267, yoff-80-hs*82, CONTROLSIZE, CONTROLSIZE, 'Delete this Hide or Show entry')) if valid: # is a valid or custom dataref hideshow_m.append(Draw.Menu('Hide%x0|Show%x1', HIDEORSHOW_M+eventbase, xoff, yoff-106-hs*82, 62, CONTROLSIZE, hideorshow[hs], 'Choose Hide or Show')) Draw.Label("when", xoff+63, yoff-106-hs*82, 60, CONTROLSIZE) from_b.append(Draw.Number('', FROM_B+eventbase, xoff+104, yoff-106-hs*82, 80, CONTROLSIZE, hideshowfrom[hs], -999999, 999999, 'The dataref value above which the animation will be hidden or shown')) Draw.Label("to", xoff+187, yoff-106-hs*82, 60, CONTROLSIZE) to_b.append(Draw.Number('', TO_B+eventbase, xoff+207, yoff-106-hs*82, 80, CONTROLSIZE, hideshowto[hs], -999999, 999999, 'The dataref value below which the animation will be hidden or shown')) else: hideshow_m.append(None) from_b.append(None) to_b.append(None) addhs_b=Draw.Button('Add New', ADD_B+bonecount*EVENTMAX, xoff+217, yoff-54-len(hideshow)*82, 70, CONTROLSIZE, 'Add a new Hide or Show entry') if vertical: xoff=PANELPAD yoff=y-(170+(CONTROLSIZE-1)*framecount)*bonecount -64-len(hideshow)*82 else: xoff=PANELPAD+(bonecount+1)*(PANELWIDTH+PANELPAD) yoff=y apply_b=Draw.Button('Apply', APPLY_B+bonecount*EVENTMAX, xoff, yoff-PANELTOP-CONTROLSIZE*2, 80, CONTROLSIZE*2, 'Apply these settings', apply) if vertical: cancel_b=Draw.Button('Cancel', CANCEL_B+bonecount*EVENTMAX, xoff+80+PANELPAD, yoff-PANELTOP-CONTROLSIZE*2, 80, CONTROLSIZE*2, 'Retain existing settings') else: cancel_b=Draw.Button('Cancel', CANCEL_B+bonecount*EVENTMAX, xoff, yoff-PANELTOP-CONTROLSIZE*4-PANELPAD, 80, CONTROLSIZE*2, 'Retain existing settings')
41ec1c2655a325b4ea4136d5c1ee7cf29022441f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10896/41ec1c2655a325b4ea4136d5c1ee7cf29022441f/XPlaneAnimObject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13238, 13332, 2552, 501, 1734, 67, 81, 16, 501, 1734, 67, 70, 16, 4295, 67, 70, 16, 4295, 67, 88, 16, 5773, 67, 70, 16, 2424, 67, 70, 16, 14075, 67, 70, 2552, 366, 4369, 13606, 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, 13238, 13332, 2552, 501, 1734, 67, 81, 16, 501, 1734, 67, 70, 16, 4295, 67, 70, 16, 4295, 67, 88, 16, 5773, 67, 70, 16, 2424, 67, 70, 16, 14075, 67, 70, 2552, 366, 4369, 13606, 67,...
debug(" domain %s is in user block-list", cookie.domain)
_debug(" domain %s is in user block-list", cookie.domain)
def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request_host(request) domain = cookie.domain if self.strict_domain and (domain.count(".") >= 2): # XXX This should probably be compared with the Konqueror # (kcookiejar.cpp) and Mozilla implementations, but it's a # losing battle. i = domain.rfind(".") j = domain.rfind(".", 0, i) if j == 0: # domain like .foo.bar tld = domain[i+1:] sld = domain[j+1:i] if sld.lower() in ("co", "ac", "com", "edu", "org", "net", "gov", "mil", "int", "aero", "biz", "cat", "coop", "info", "jobs", "mobi", "museum", "name", "pro", "travel", "eu") and len(tld) == 2: # domain like .co.uk debug(" country-code second level domain %s", domain) return False if domain.startswith("."): undotted_domain = domain[1:] else: undotted_domain = domain embedded_dots = (undotted_domain.find(".") >= 0) if not embedded_dots and domain != ".local": debug(" non-local domain %s contains no embedded dot", domain) return False if cookie.version == 0: if (not erhn.endswith(domain) and (not erhn.startswith(".") and not ("."+erhn).endswith(domain))): debug(" effective request-host %s (even with added " "initial dot) does not end end with %s", erhn, domain) return False if (cookie.version > 0 or (self.strict_ns_domain & self.DomainRFC2965Match)): if not domain_match(erhn, domain): debug(" effective request-host %s does not domain-match " "%s", erhn, domain) return False if (cookie.version > 0 or (self.strict_ns_domain & self.DomainStrictNoDots)): host_prefix = req_host[:-len(domain)] if (host_prefix.find(".") >= 0 and not IPV4_RE.search(req_host)): debug(" host prefix %s for domain %s contains a dot", host_prefix, domain) return False return True
15f04d8bbaf4e2b7d0d25228ce9bc84f1e501e81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/15f04d8bbaf4e2b7d0d25228ce9bc84f1e501e81/cookielib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 601, 67, 4308, 12, 2890, 16, 3878, 16, 590, 4672, 309, 365, 18, 291, 67, 23156, 12, 8417, 18, 4308, 4672, 389, 4148, 2932, 282, 2461, 738, 87, 353, 316, 729, 1203, 17, 1098,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 601, 67, 4308, 12, 2890, 16, 3878, 16, 590, 4672, 309, 365, 18, 291, 67, 23156, 12, 8417, 18, 4308, 4672, 389, 4148, 2932, 282, 2461, 738, 87, 353, 316, 729, 1203, 17, 1098,...
not cros_env.BuildStateful(image_file, stateful_file)):
not cros_env.BuildStateful(image_file, image_directory, stateful_file)):
def main(argv): usage = 'usage: %prog [options]' parser = optparse.OptionParser(usage=usage) parser.add_option('--board', dest='board', default=None, help='Board platform type') parser.add_option('--force-mismatch', dest='force_mismatch', default=False, action='store_true', help='Upgrade even if client arch does not match') parser.add_option('--from', dest='src', default=None, help='Source image to install') parser.add_option('--image-name', dest='image_name', default=DEFAULT_IMAGE_NAME, help='Filename within image directory to load') parser.add_option('--port', dest='port', default=8081, type='int', help='TCP port to serve from and tunnel through') parser.add_option('--remote', dest='remote', default=None, help='Remote device-under-test IP address') parser.add_option('--server-only', dest='server_only', default=False, action='store_true', help='Do not start client') parser.add_option('--verbose', dest='verbose', default=False, action='store_true', help='Display running commands') (options, args) = parser.parse_args(argv) cros_env = CrosEnv(verbose=options.verbose) if not options.board: options.board = cros_env.GetDefaultBoard() if not options.src: options.src = cros_env.GetLatestImage(options.board) if options.src is None: parser.error('No --from argument given and no default image found') cros_env.Info('Performing update from %s' % options.src) if not os.path.exists(options.src): parser.error('Path %s does not exist' % options.src) if os.path.isdir(options.src): image_directory = options.src image_file = os.path.join(options.src, options.image_name) if not os.path.exists(image_file): parser.error('Image file %s does not exist' % image_file) else: image_file = options.src image_directory = os.path.dirname(options.src) if options.remote: cros_env.SetRemote(options.remote) rel = cros_env.GetRemoteRelease() if not rel: cros_env.Fatal('Could not retrieve remote lsb-release') board = rel.get('CHROMEOS_RELEASE_BOARD', '(None)') if board != options.board and not options.force_mismatch: cros_env.Error('Board %s does not match expected %s' % (board, options.board)) cros_env.Error('(Use --force-mismatch option to override this)') cros_env.Fatal() elif not options.server_only: parser.error('Either --server-only must be specified or ' '--remote=<client> needs to be given') update_file = os.path.join(image_directory, UPDATE_FILENAME) stateful_file = os.path.join(image_directory, STATEFUL_FILENAME) if (not cros_env.GenerateUpdatePayload(image_file, update_file) or not cros_env.BuildStateful(image_file, stateful_file)): cros_env.Fatal() cros_env.CreateServer(options.port, update_file, stateful_file) exit_status = 1 if options.server_only: child = None else: # Start an "image-to-live" instance that will pull bits from the server child = os.fork() if child: signal.signal(signal.SIGCHLD, ChildFinished(child).SigHandler) else: try: time.sleep(SERVER_STARTUP_WAIT) if cros_env.StartClient(options.port): exit_status = 0 except KeyboardInterrupt: cros_env.Error('Client Exiting on Control-C') except: cros_env.Error('Exception in client code:') traceback.print_exc(file=sys.stdout) cros_env.ssh_cmd.Cleanup() cros_env.Info('Client exiting with status %d' % exit_status) sys.exit(exit_status) try: cros_env.StartServer() except KeyboardInterrupt: cros_env.Info('Server Exiting on Control-C') exit_status = 0 except ChildFinished, e: cros_env.Info('Server Exiting on Client Exit (%d)' % e.status) exit_status = e.status child = None except: cros_env.Error('Exception in server code:') traceback.print_exc(file=sys.stdout) if child: os.kill(child, 15) cros_env.Info('Server exiting with status %d' % exit_status) sys.exit(exit_status)
f7597abb17c8d35c7ee33d2707f30473839092b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/f7597abb17c8d35c7ee33d2707f30473839092b1/cros_image_to_target.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 4084, 273, 296, 9167, 30, 738, 14654, 306, 2116, 3864, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 33, 9167, 13, 2082, 18, 1289, 67, 3482, 2668, 413, 3752, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 4084, 273, 296, 9167, 30, 738, 14654, 306, 2116, 3864, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 33, 9167, 13, 2082, 18, 1289, 67, 3482, 2668, 413, 3752, ...
t = s.split('\n') do_strip = False for I in t: I2 = I.lstrip() if I2.startswith('sage:') or I2.startswith('>>>'): do_strip = True break if not do_strip: return s s = '' for I in t: I2 = I.lstrip() if I2.startswith('sage:'): s += after_first_word(I2).lstrip() + '\n' elif I2.startswith('>>>'): s += after_first_word(I2).lstrip() + '\n' elif I2.startswith('...'): s += after_first_word(I2) + '\n' return s
s = aString.lstrip() is_example = s.startswith('sage:') or s.startswith('>>>') if not is_example: return aString new = '' lines = s.split('\n') for line in lines: line = line.lstrip() if line.startswith('sage:'): new += after_first_word(line).lstrip() + '\n' elif line.startswith('>>>'): new += after_first_word(line).lstrip() + '\n' elif line.startswith('...'): new += after_first_word(line) + '\n' return new
def ignore_prompts_and_output(s): """ Given a string s that defines an input block of code, if any line begins in "sage:" (or ">>>"), strip out all lines that don't begin in either "sage:" (or ">>>") or"...", and remove all "sage:" (or ">>>") and "..." from the beginning of the remaining lines. """ t = s.split('\n') do_strip = False for I in t: I2 = I.lstrip() if I2.startswith('sage:') or I2.startswith('>>>'): do_strip = True break if not do_strip: return s s = '' for I in t: I2 = I.lstrip() if I2.startswith('sage:'): s += after_first_word(I2).lstrip() + '\n' elif I2.startswith('>>>'): s += after_first_word(I2).lstrip() + '\n' elif I2.startswith('...'): s += after_first_word(I2) + '\n' return s
0d41208c4aa3de26adf897544211ec5aa9059e29 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/0d41208c4aa3de26adf897544211ec5aa9059e29/worksheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2305, 67, 17401, 1092, 67, 464, 67, 2844, 12, 87, 4672, 3536, 16803, 279, 533, 272, 716, 11164, 392, 810, 1203, 434, 981, 16, 309, 1281, 980, 17874, 316, 315, 87, 410, 2773, 261, 280, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2305, 67, 17401, 1092, 67, 464, 67, 2844, 12, 87, 4672, 3536, 16803, 279, 533, 272, 716, 11164, 392, 810, 1203, 434, 981, 16, 309, 1281, 980, 17874, 316, 315, 87, 410, 2773, 261, 280, ...
f()
self.f()
def f(): return 1
b40d07afc41f9434816f5c904352a5aa416f9bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b40d07afc41f9434816f5c904352a5aa416f9bf6/test_trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 13332, 327, 404, 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, 284, 13332, 327, 404, 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, -...
self.diskspace_available = None
self.diskspace_available = 0
def __init__(self, diskspace_required): self.diskspace_required = diskspace_required self.diskspace_available = None
14d2841c95105573bc59e87657eb8fb8e2bcb7ef /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/14d2841c95105573bc59e87657eb8fb8e2bcb7ef/Task.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4234, 2981, 67, 4718, 4672, 365, 18, 10863, 2981, 67, 4718, 273, 4234, 2981, 67, 4718, 365, 18, 10863, 2981, 67, 5699, 273, 599, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 4234, 2981, 67, 4718, 4672, 365, 18, 10863, 2981, 67, 4718, 273, 4234, 2981, 67, 4718, 365, 18, 10863, 2981, 67, 5699, 273, 599, 2, -100, -100, -100, -10...
if (self.use_verbatim_for_literal): self.body.append('\\end{verbatim}\n') else:
if not self.use_verbatim_for_literal:
def depart_literal_block(self, node): if (self.use_verbatim_for_literal): self.body.append('\\end{verbatim}\n') else: self.body.append('}\n')
9acf323e7ad29baf4b714ca8032fe57a5894aaa0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/9acf323e7ad29baf4b714ca8032fe57a5894aaa0/latex2e.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 13107, 67, 2629, 12, 2890, 16, 756, 4672, 309, 486, 365, 18, 1202, 67, 16629, 22204, 67, 1884, 67, 13107, 30, 365, 18, 3432, 18, 6923, 2668, 6280, 82, 6134, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 13107, 67, 2629, 12, 2890, 16, 756, 4672, 309, 486, 365, 18, 1202, 67, 16629, 22204, 67, 1884, 67, 13107, 30, 365, 18, 3432, 18, 6923, 2668, 6280, 82, 6134, 2, -100, -100, ...
return gtk.gdk.pixbuf_new_from_file_at_size(self.icon, 24, 24)
try: return gtk.gdk.pixbuf_new_from_file_at_size(self.icon, 24, 24) except gobject.GError, ge: pass
def get_icon(self): if self.icon is not None: # Load it from an absolute filename if os.path.exists(self.icon): return gtk.gdk.pixbuf_new_from_file_at_size(self.icon, 24, 24)
949f8383647a667709539a13a6cd38da536e5fb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12778/949f8383647a667709539a13a6cd38da536e5fb3/desktopfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3950, 12, 2890, 4672, 309, 365, 18, 3950, 353, 486, 599, 30, 468, 4444, 518, 628, 392, 4967, 1544, 309, 1140, 18, 803, 18, 1808, 12, 2890, 18, 3950, 4672, 327, 22718, 18, 75...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3950, 12, 2890, 4672, 309, 365, 18, 3950, 353, 486, 599, 30, 468, 4444, 518, 628, 392, 4967, 1544, 309, 1140, 18, 803, 18, 1808, 12, 2890, 18, 3950, 4672, 327, 22718, 18, 75...
print self.char_data
print self._data
def end_element(self, name): # This is called after the closing tag of an XML element was found # When this is called we know that char_data now truly has all the data # that was between the element start and end tag. # jkleven: 10/1/06 - this function exists because we weren't # parsing strings in config file # with '&amp;' (aka '&') correctly. Now we are. self.char_data = self.char_data.strip() if self.char_data != '': # This was an element with data between an opening and closing tag # ... now that we're guaranteed to have it all, lets add it to the config # print 'Setting option for %s %s ' % (self._node, char_data) if self.cfg: self.cfg.set_option_xml(self._node, self.char_data) else: print self.char_data # reset these because we'll be encountering a new element node # name soon, and our char data will then be useless as well. self._node = '' char_data = ''
778c51514490332bce4336a8d3fe7336378abb0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2861/778c51514490332bce4336a8d3fe7336378abb0d/xmlparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 67, 2956, 12, 2890, 16, 508, 4672, 468, 1220, 353, 2566, 1839, 326, 7647, 1047, 434, 392, 3167, 930, 1703, 1392, 468, 5203, 333, 353, 2566, 732, 5055, 716, 1149, 67, 892, 2037, 43...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 679, 67, 2956, 12, 2890, 16, 508, 4672, 468, 1220, 353, 2566, 1839, 326, 7647, 1047, 434, 392, 3167, 930, 1703, 1392, 468, 5203, 333, 353, 2566, 732, 5055, 716, 1149, 67, 892, 2037, 43...
alias %s 'set file=/tmp/%s.${USER}.$$; %s -s tcsh \!* > ${file}; source ${file}; rm -f ${file}' '''%(name,name,os.path.abspath(sys.argv[0])))
alias %(name)s 'set file=/tmp/%(name)s.${USER}.$$; %(path)s -s tcsh \!* %(defcfg)s > ${file}; source ${file}; rm -f ${file}' '''%cfg) csh.close() return
def gen_scripts(self): 'Generate scripts for user to source' prefix = self.cfg.opts.generate_scripts path = os.path.basename(prefix) if not os.path.exists(path): os.makedirs(path)
a29f9cb995bdf48e03d928383ed97371193cd1b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9874/a29f9cb995bdf48e03d928383ed97371193cd1b3/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 12827, 12, 2890, 4672, 296, 4625, 8873, 364, 729, 358, 1084, 11, 1633, 273, 365, 18, 7066, 18, 4952, 18, 7163, 67, 12827, 589, 273, 1140, 18, 803, 18, 13909, 12, 3239, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 12827, 12, 2890, 4672, 296, 4625, 8873, 364, 729, 358, 1084, 11, 1633, 273, 365, 18, 7066, 18, 4952, 18, 7163, 67, 12827, 589, 273, 1140, 18, 803, 18, 13909, 12, 3239, 13, ...
pass
def __init__(self): DefaultUI.__init__(self, True) pygame.mouse.set_visible(False)
def toggle_notes(self): self.show_notes = not self.show_notes self.repaint_slide()
080c527221f35eb69b8c7a055f5153e7abfa6196 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3598/080c527221f35eb69b8c7a055f5153e7abfa6196/xpressent-remote.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10486, 67, 12903, 12, 2890, 4672, 365, 18, 4500, 67, 12903, 273, 486, 365, 18, 4500, 67, 12903, 365, 18, 14462, 1598, 67, 26371, 1435, 225, 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, 0, 0, 0, 0, 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, 10486, 67, 12903, 12, 2890, 4672, 365, 18, 4500, 67, 12903, 273, 486, 365, 18, 4500, 67, 12903, 365, 18, 14462, 1598, 67, 26371, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -100, ...
dest_vm = kvm_test_utils.migrate(vm, env, mig_timeout, mig_protocol, False)
dest_vm = kvm_test_utils.migrate(vm, env, mig_timeout, mig_protocol, False)
def transfer_test(vm, host_path, guest_path, timeout=120): """ vm.copy_files_to does not raise exception, so we need a wrapper in order to make it to be used by BackgroundTest. """ if not vm.copy_files_to(host_path, guest_path, timeout=timeout): raise error.TestError("Fail to do the file transfer!")
d2841923f3f64438f6a80b6e5228000cb8bcc8e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10349/d2841923f3f64438f6a80b6e5228000cb8bcc8e1/migration_with_file_transfer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7412, 67, 3813, 12, 3489, 16, 1479, 67, 803, 16, 13051, 67, 803, 16, 2021, 33, 22343, 4672, 3536, 4268, 18, 3530, 67, 2354, 67, 869, 1552, 486, 1002, 1520, 16, 1427, 732, 1608, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7412, 67, 3813, 12, 3489, 16, 1479, 67, 803, 16, 13051, 67, 803, 16, 2021, 33, 22343, 4672, 3536, 4268, 18, 3530, 67, 2354, 67, 869, 1552, 486, 1002, 1520, 16, 1427, 732, 1608, 279, ...
pen.setWidthF(pen.widthF()*0.8)
pen.setWidthF(self.areaBorder)
def zoomIn(self): self.scale(1.25, 1.25)
c41c19f5fab1883b753aa5a1bc4dde31f4fb10fc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2085/c41c19f5fab1883b753aa5a1bc4dde31f4fb10fc/ocrwidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7182, 382, 12, 2890, 4672, 365, 18, 5864, 12, 21, 18, 2947, 16, 404, 18, 2947, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7182, 382, 12, 2890, 4672, 365, 18, 5864, 12, 21, 18, 2947, 16, 404, 18, 2947, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return Event("privmsg", "", target, [ result ])
return Event("privmsg", "", target, [ result ])
def handler(self, **args):
d0f1bbac00a761b0016dc9bc88dc6f9f32432278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10749/d0f1bbac00a761b0016dc9bc88dc6f9f32432278/weblookup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1838, 12, 2890, 16, 2826, 1968, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1838, 12, 2890, 16, 2826, 1968, 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, -10...
def getService(self): ser = os.popen("ps -A | grep [h]ci").read().replace("\n","") if ser != "": return 1 else: return 0 def getServiceObex(self): ser = os.popen("ps -A | grep [o]bexftpd").read().replace("\n","") if ser != "": return 1 else: return 0
def getService(self): ser = os.popen("ps -A | grep [h]ci").read().replace("\n","") if ser != "": return 1 else: return 0
96df52ecbc51e86f029c1e5a29cf17a34ae92540 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11428/96df52ecbc51e86f029c1e5a29cf17a34ae92540/shr_bt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6373, 12, 2890, 4672, 703, 273, 1140, 18, 84, 3190, 2932, 1121, 300, 37, 571, 23366, 306, 76, 65, 8450, 20387, 896, 7675, 2079, 31458, 82, 3113, 3660, 13, 309, 703, 480, 1408, 30, 327,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6373, 12, 2890, 4672, 703, 273, 1140, 18, 84, 3190, 2932, 1121, 300, 37, 571, 23366, 306, 76, 65, 8450, 20387, 896, 7675, 2079, 31458, 82, 3113, 3660, 13, 309, 703, 480, 1408, 30, 327,...