rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
import textwrap return '\n'.join(textwrap.wrap(t, replace_whitespace=0, width=cols, break_long_words=0, | import textwrap t = t.replace('\r\n', '\n').replace('\r', '\n') wrapper = textwrap.TextWrapper(cols, replace_whitespace=0, break_long_words=0, | def wrap(t, cols=75, initial_indent='', subsequent_indent=''): try: import textwrap return '\n'.join(textwrap.wrap(t, replace_whitespace=0, width=cols, break_long_words=0, initial_indent=initial_indent, subsequent_indent=subsequent_indent)) except ImportError: return t | fdbf7afefbe36b1cdaf1e43e2261a635f45aa26b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/fdbf7afefbe36b1cdaf1e43e2261a635f45aa26b/Notify.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2193,
12,
88,
16,
5347,
33,
5877,
16,
2172,
67,
9355,
2218,
2187,
10815,
67,
9355,
2218,
11,
4672,
775,
30,
1930,
30271,
268,
273,
268,
18,
2079,
2668,
64,
86,
64,
82,
2187,
2337,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2193,
12,
88,
16,
5347,
33,
5877,
16,
2172,
67,
9355,
2218,
2187,
10815,
67,
9355,
2218,
11,
4672,
775,
30,
1930,
30271,
268,
273,
268,
18,
2079,
2668,
64,
86,
64,
82,
2187,
2337,
82... |
"setStringValue:", aMessage, YES) | "setStringValue:", unicode(aMessage), 0) | def setStatusTextFieldMessage_(self, aMessage): """ Sets the contents of the statusTextField to aMessage and forces the field's contents to be redisplayed. """ if not aMessage: aMessage = "Displaying information about " +`len(self._methodList)` +" methods." +`self._working` self.statusTextField.performSelectorOnMainThread_withObject_waitUntilDone_( "setStringValue:", aMessage, YES) | 27149324dca76b2e96f0b7cbac2ca9d089589c8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2688/27149324dca76b2e96f0b7cbac2ca9d089589c8d/EYETestWindowControllerClass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9433,
16157,
1079,
67,
12,
2890,
16,
279,
1079,
4672,
3536,
11511,
326,
2939,
434,
326,
1267,
16157,
358,
279,
1079,
471,
26376,
326,
652,
1807,
2939,
358,
506,
5813,
1601,
329,
18,
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,
9433,
16157,
1079,
67,
12,
2890,
16,
279,
1079,
4672,
3536,
11511,
326,
2939,
434,
326,
1267,
16157,
358,
279,
1079,
471,
26376,
326,
652,
1807,
2939,
358,
506,
5813,
1601,
329,
18,
3536... |
def createFields(self): yield UInt32(self, "size", text_handler=humanFilesize) | def createFields(self): yield UInt32(self, "size") | def createFields(self): yield UInt32(self, "size", text_handler=humanFilesize) yield String(self, "name", 22, charset="ASCII", strip=" \0") yield UInt8(self, "type") yield UInt16(self, "samples") num = self["samples"].value self.info("Instrument '%s' has %i samples" % (self["name"].display, self["samples"].value)) # ValueError: generator already executing if num == 1: yield InstrumentSecondHeader(self, "second_header") yield SampleHeader(self, "sample_header") size = self["sample_header/length"].value if size > 0: yield RawBytes(self, "sample_data", size, r"Deltas") if num > 1: yield InstrumentSecondHeader(self, "second_header") | 32eb327dd751f772fadb6fe53c1fa9fa0b69fb14 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/32eb327dd751f772fadb6fe53c1fa9fa0b69fb14/xm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1377,
1652,
752,
2314,
12,
2890,
4672,
2824,
29810,
1578,
12,
2890,
16,
315,
1467,
7923,
2824,
514,
12,
2890,
16,
315,
529,
3113,
11201,
16,
4856,
1546,
13756,
3113,
2569,
1546,
521,
20,
7923,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1377,
1652,
752,
2314,
12,
2890,
4672,
2824,
29810,
1578,
12,
2890,
16,
315,
1467,
7923,
2824,
514,
12,
2890,
16,
315,
529,
3113,
11201,
16,
4856,
1546,
13756,
3113,
2569,
1546,
521,
20,
7923,... |
def browserow(self, widget, path, column=0): | def browse_row(self, widget, path, column=0): | def browserow(self, widget, path, column=0): if path is None: # Default to last item in selection: model, selected = self.browser_selection.get_selected_rows() if len(selected) >=1: path = (len(selected)-1,) else: path = (0,) value = self.browserdata.get_value(self.browserdata.get_iter(path), 1) if value == "..": self.parent_dir(None) else: if self.view == self.VIEW_ARTIST: if value == "/": self.view_artist_level = 1 else: self.view_artist_level = self.view_artist_level + 1 self.browse(None, value) | ef335bb5758783289bea4a5b77282ae0c87d687a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/ef335bb5758783289bea4a5b77282ae0c87d687a/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21670,
67,
492,
12,
2890,
16,
3604,
16,
589,
16,
1057,
33,
20,
4672,
309,
589,
353,
599,
30,
468,
2989,
358,
1142,
761,
316,
4421,
30,
938,
16,
3170,
273,
365,
18,
11213,
67,
10705,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21670,
67,
492,
12,
2890,
16,
3604,
16,
589,
16,
1057,
33,
20,
4672,
309,
589,
353,
599,
30,
468,
2989,
358,
1142,
761,
316,
4421,
30,
938,
16,
3170,
273,
365,
18,
11213,
67,
10705,
... |
if image_width-size > image_height-size: image_height = int(size/float(image_width)*image_height) image_width = size else: image_width = int(size/float(image_height)*image_width) image_height = size crop_pixbuf = pixbuf.scale_simple(image_width, image_height, gtk.gdk.INTERP_HYPER) return crop_pixbuf | image_ydiff = int((image_height-image_width)/2) image_height = image_width new_pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, True, 8, image_width, image_height) new_pixbuf.fill(0x00000000) pixbuf.copy_area(image_xdiff, image_ydiff, image_width, image_height, new_pixbuf, 0, 0) del pixbuf return new_pixbuf def get_pad_pixbuf(pixbuf, width, height): image_width = pixbuf.get_width() image_height = pixbuf.get_height() x_pos = int((width - image_width)/2) y_pos = int((height - image_height)/2) new_pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, True, 8, width, height) new_pixbuf.fill(0xffff00) pixbuf.copy_area(0, 0, image_width, image_height, new_pixbuf, x_pos, y_pos) del pixbuf return new_pixbuf | def get_pixbuf_of_size(pixbuf, size, crop = False): image_width = pixbuf.get_width() image_height = pixbuf.get_height() image_xdiff = 0 image_ydiff = 0 if crop: if image_width-size > image_height-size: image_xdiff = int((image_width-image_height)/2) image_width = image_height else: image_ydiff = int((image_height-image_width)/2) image_height = image_width new_pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, True, 8, image_width, image_height) new_pixbuf.fill(0x00000000) pixbuf.copy_area(image_xdiff, image_ydiff, image_width, image_height, new_pixbuf, 0, 0) crop_pixbuf = new_pixbuf.scale_simple(size, size, gtk.gdk.INTERP_HYPER) else: if image_width-size > image_height-size: image_height = int(size/float(image_width)*image_height) image_width = size else: image_width = int(size/float(image_height)*image_width) image_height = size crop_pixbuf = pixbuf.scale_simple(image_width, image_height, gtk.gdk.INTERP_HYPER) return crop_pixbuf | d146007907c6581d8d80f2f60d1a7f1efdee1728 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/d146007907c6581d8d80f2f60d1a7f1efdee1728/arkadas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14861,
4385,
67,
792,
67,
1467,
12,
14861,
4385,
16,
963,
16,
7987,
273,
1083,
4672,
1316,
67,
2819,
273,
11871,
4385,
18,
588,
67,
2819,
1435,
1316,
67,
4210,
273,
11871,
438... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14861,
4385,
67,
792,
67,
1467,
12,
14861,
4385,
16,
963,
16,
7987,
273,
1083,
4672,
1316,
67,
2819,
273,
11871,
4385,
18,
588,
67,
2819,
1435,
1316,
67,
4210,
273,
11871,
438... |
include_dirs = ['Modules/expat'] | include_dirs = [expatinc] | 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') | 30396e728c0ba40e35d00586080c421de9240334 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30396e728c0ba40e35d00586080c421de9240334/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,
... |
w_result = space.wrap(result[0] != '\x00') | x = rffi.cast(lltype.Signed, result[0]) w_result = space.wrap(x != 0) | def PyMember_GetOne(space, obj, w_member): addr = rffi.cast(ADDR, obj) addr += w_member.c_offset member_type = rffi.cast(lltype.Signed, w_member.c_type) for converter in integer_converters: typ, lltyp, _ = converter if typ == member_type: result = rffi.cast(rffi.CArrayPtr(lltyp), addr) if lltyp is rffi.FLOAT: w_result = space.wrap(lltype.cast_primitive(lltype.Float, result[0])) elif typ == T_BOOL: w_result = space.wrap(result[0] != '\x00') else: w_result = space.wrap(result[0]) return w_result if member_type == T_STRING: result = rffi.cast(rffi.CCHARPP, addr) if result[0]: w_result = PyString_FromString(space, result[0]) else: w_result = space.w_None elif member_type == T_STRING_INPLACE: result = rffi.cast(rffi.CCHARP, addr) w_result = PyString_FromString(space, result) elif member_type == T_CHAR: result = rffi.cast(rffi.CCHARP, addr) w_result = space.wrap(result[0]) elif member_type == T_OBJECT: obj_ptr = rffi.cast(PyObjectP, addr) if obj_ptr[0]: w_result = from_ref(space, obj_ptr[0]) else: w_result = space.w_None elif member_type == T_OBJECT_EX: obj_ptr = rffi.cast(PyObjectP, addr) if obj_ptr[0]: w_result = from_ref(space, obj_ptr[0]) else: w_name = space.wrap(rffi.charp2str(w_member.c_name)) raise OperationError(space.w_AttributeError, w_name) else: raise OperationError(space.w_SystemError, space.wrap("bad memberdescr type")) return w_result | d082314d74dd20d159be5322250d97006c626dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/d082314d74dd20d159be5322250d97006c626dea/structmember.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4707,
4419,
67,
967,
3335,
12,
2981,
16,
1081,
16,
341,
67,
5990,
4672,
3091,
273,
436,
1403,
77,
18,
4155,
12,
14142,
16,
1081,
13,
3091,
1011,
341,
67,
5990,
18,
71,
67,
3348,
225,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4707,
4419,
67,
967,
3335,
12,
2981,
16,
1081,
16,
341,
67,
5990,
4672,
3091,
273,
436,
1403,
77,
18,
4155,
12,
14142,
16,
1081,
13,
3091,
1011,
341,
67,
5990,
18,
71,
67,
3348,
225,... |
self.remove_img() | self.remove_img(True) | def fdisk_query(self, answer): if answer == True: self["statusbar"].text = _("Partitioning USB stick...") self["job_progressbar"].range = 1000 self["job_progressbar"].value = 100 self["job_progresslabel"].text = "5.00%" self.taskstring = "" self.container.appClosed.get().append(self.fdisk_finished) self.container.execute("fdisk " + self.stickdevice + "/disc") self.container.write("d\nn\np\n1\n\n\nt\n6\nw\n") self.delayTimer = eTimer() self.delayTimer.callback.append(self.progress_increment) self.delayTimer.start(105, False) else: self.remove_img() | 086e88ff090a0604aedd92e75ce5169d693c4e77 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/086e88ff090a0604aedd92e75ce5169d693c4e77/downloader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
10863,
67,
2271,
12,
2890,
16,
5803,
4672,
309,
5803,
422,
1053,
30,
365,
9614,
2327,
3215,
6,
8009,
955,
273,
389,
2932,
7003,
310,
11836,
38,
25608,
7070,
13,
365,
9614,
4688,
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,
284,
10863,
67,
2271,
12,
2890,
16,
5803,
4672,
309,
5803,
422,
1053,
30,
365,
9614,
2327,
3215,
6,
8009,
955,
273,
389,
2932,
7003,
310,
11836,
38,
25608,
7070,
13,
365,
9614,
4688,
6... |
self.disableAnnounceAndDelete() | self.disable() self.delete() self._destroyDO() | def releaseDelayDelete(self, token): name = self._token2delayDeleteName.pop(token) assert self.notify.debug("releasing delayDelete '%s'" % name) if len(self._token2delayDeleteName) == 0: assert self.notify.debug( "delayDelete count for doId %s now 0" % (self.doId)) self.cr._removeDelayDeletedDO(self) if self.deleteImminent: assert self.notify.debug( "delayDelete count for doId %s -- deleteImminent" % (self.doId)) self.disableAnnounceAndDelete() | 64d6756654620768c3307654be0844b2bc8a7a0e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7242/64d6756654620768c3307654be0844b2bc8a7a0e/DistributedObject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3992,
6763,
2613,
12,
2890,
16,
1147,
4672,
508,
273,
365,
6315,
2316,
22,
10790,
2613,
461,
18,
5120,
12,
2316,
13,
1815,
365,
18,
12336,
18,
4148,
2932,
16599,
11730,
4624,
2613,
1995,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3992,
6763,
2613,
12,
2890,
16,
1147,
4672,
508,
273,
365,
6315,
2316,
22,
10790,
2613,
461,
18,
5120,
12,
2316,
13,
1815,
365,
18,
12336,
18,
4148,
2932,
16599,
11730,
4624,
2613,
1995,... |
if action.prune != 1: | if (result.vertices.has_key(action.parent) and action.prune != 1): | def getVersionGraph(self): """getVersionGraph() -> Graph Returns the version graph """ result = Graph() result.add_vertex(0) | c612d10998adb96f5455d9aea5f525a335452256 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6341/c612d10998adb96f5455d9aea5f525a335452256/vistrail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8343,
4137,
12,
2890,
4672,
3536,
588,
1444,
4137,
1435,
317,
5601,
2860,
326,
1177,
2667,
225,
3536,
563,
273,
5601,
1435,
563,
18,
1289,
67,
15281,
12,
20,
13,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8343,
4137,
12,
2890,
4672,
3536,
588,
1444,
4137,
1435,
317,
5601,
2860,
326,
1177,
2667,
225,
3536,
563,
273,
5601,
1435,
563,
18,
1289,
67,
15281,
12,
20,
13,
2,
-100,
-100,
-100,
-... |
n.change = n.new_bw - n.ns_bw[chosen_bw_idx] | n.change = n.new_bw - n.desc_bw[chosen_bw_idx] | def main(argv): TorUtil.read_config(argv[1]+"/scanner.1/bwauthority.cfg") TorUtil.loglevel = "NOTICE" s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((TorUtil.control_host,TorUtil.control_port)) c = TorCtl.Connection(s) c.debug(file(argv[1]+"/aggregate-control.log", "w", buffering=0)) c.authenticate_cookie(file(argv[1]+"/tor/control_auth_cookie", "r")) ns_list = c.get_network_status() for n in ns_list: if n.bandwidth == None: n.bandwidth = -1 ns_list.sort(lambda x, y: y.bandwidth - x.bandwidth) for n in ns_list: if n.bandwidth == -1: n.bandwidth = None got_ns_bw = False max_rank = len(ns_list) # FIXME: This is poor form.. We should subclass the Networkstatus class # instead of just adding members for i in xrange(max_rank): n = ns_list[i] n.list_rank = i if n.bandwidth == None: plog("NOTICE", "Your Tor is not providing NS w bandwidths for "+n.idhex) else: got_ns_bw = True n.measured = False prev_consensus["$"+n.idhex] = n if not got_ns_bw: # Sometimes the consensus lacks a descriptor. In that case, # it will skip outputting plog("ERROR", "Your Tor is not providing NS w bandwidths!") sys.exit(0) # Take the most recent timestamp from each scanner # and use the oldest for the timestamp of the result. # That way we can ensure all the scanners continue running. scanner_timestamps = [] for da in argv[1:-1]: # First, create a list of the most recent files in the # scan dirs that are recent enough for root, dirs, f in os.walk(da): for ds in dirs: if re.match("^scanner.[\d+]$", ds): newest_timestamp = 0 for sr, sd, files in os.walk(da+"/"+ds+"/scan-data"): for f in files: if re.search("^bws-[\S]+-done-", f): fp = file(sr+"/"+f, "r") slicenum = sr+"/"+fp.readline() timestamp = float(fp.readline()) fp.close() # old measurements are probably # better than no measurements. We may not # measure hibernating routers for days. # This filter is just to remove REALLY old files if time.time() - timestamp > MAX_AGE: plog("INFO", "Skipping old file "+f) continue if timestamp > newest_timestamp: newest_timestamp = timestamp bw_files.append((slicenum, timestamp, sr+"/"+f)) # FIXME: Can we kill this? if slicenum not in timestamps or \ timestamps[slicenum] < timestamp: timestamps[slicenum] = timestamp scanner_timestamps.append(newest_timestamp) # Need to only use most recent slice-file for each node.. for (s,t,f) in bw_files: fp = file(f, "r") fp.readline() # slicenum fp.readline() # timestamp for l in fp.readlines(): try: line = Line(l,s,t) if line.idhex not in nodes: n = Node() nodes[line.idhex] = n else: n = nodes[line.idhex] n.add_line(line) except ValueError,e: plog("NOTICE", "Conversion error "+str(e)+" at "+l) fp.close() if len(nodes) == 0: plog("NOTICE", "No scan results yet.") sys.exit(1) pre_strm_avg = sum(map(lambda n: n.avg_strm_bw(), nodes.itervalues()))/ \ float(len(nodes)) pre_filt_avg = sum(map(lambda n: n.avg_filt_bw(), nodes.itervalues()))/ \ float(len(nodes)) plog("INFO", "Network pre_strm_avg: "+str(pre_strm_avg)) plog("INFO", "Network pre_filt_avg: "+str(pre_filt_avg)) for n in nodes.itervalues(): n.choose_strm_bw(pre_strm_avg) n.choose_filt_bw(pre_filt_avg) plog("DEBUG", "Node "+n.nick+" chose sbw: "+\ str(n.strm_bw[n.chosen_sbw])+" fbw: "+\ str(n.filt_bw[n.chosen_fbw])) true_strm_avg = sum(map(lambda n: n.strm_bw[n.chosen_sbw], nodes.itervalues()))/float(len(nodes)) true_filt_avg = sum(map(lambda n: n.filt_bw[n.chosen_fbw], nodes.itervalues()))/float(len(nodes)) plog("INFO", "Network true_strm_avg: "+str(true_strm_avg)) plog("INFO", "Network true_filt_avg: "+str(true_filt_avg)) tot_net_bw = 0 for n in nodes.itervalues(): n.fbw_ratio = n.filt_bw[n.chosen_fbw]/true_filt_avg n.sbw_ratio = n.strm_bw[n.chosen_sbw]/true_strm_avg chosen_bw_idx = 0 if n.sbw_ratio > n.fbw_ratio: n.ratio = n.sbw_ratio chosen_bw_idx = n.chosen_sbw else: n.ratio = n.fbw_ratio chosen_bw_idx = n.chosen_fbw n.chosen_time = n.timestamps[chosen_bw_idx] # Use the consensus value at the time of measurement from the # Node class use_bw = BETA*n.ns_bw[chosen_bw_idx]+(1.0-BETA)*n.desc_bw[chosen_bw_idx] n.new_bw = use_bw*((ALPHA + n.ratio)/(ALPHA + 1.0)) n.change = n.new_bw - n.ns_bw[chosen_bw_idx] if n.idhex in prev_consensus: if prev_consensus[n.idhex].bandwidth != None: prev_consensus[n.idhex].measured = True tot_net_bw += n.new_bw if "Authority" in prev_consensus[n.idhex].flags: plog("INFO", "Skipping voting for authority "+n.nick) n.ignore = True # Go through the list and cap them to NODE_CAP for n in nodes.itervalues(): if n.new_bw > tot_net_bw*NODE_CAP: plog("NOTICE", "Clipping extremely fast node "+n.idhex+"="+n.nick+ " at "+str(100*NODE_CAP)+"% of network capacity (" +str(n.new_bw)+"->"+str(int(tot_net_bw*NODE_CAP))+")") n.new_bw = int(tot_net_bw*NODE_CAP) # WTF is going on here? oldest_timestamp = min(map(lambda n: n.chosen_time, filter(lambda n: n.idhex in prev_consensus, nodes.itervalues()))) plog("INFO", "Oldest measured node: "+time.ctime(oldest_timestamp)) missed_nodes = 0.0 for n in prev_consensus.itervalues(): if not n.measured: if "Fast" in n.flags and "Running" in n.flags: try: r = c.get_router(n) except TorCtl.ErrorReply: r = None if r and not r.down and r.bw > 0: #if time.mktime(r.published.utctimetuple()) - r.uptime \ # < oldest_timestamp: missed_nodes += 1.0 # We still tend to miss about 80 nodes even with these # checks.. Possibly going in and out of hibernation? plog("INFO", "Didn't measure "+n.idhex+"="+n.nickname+" at "+str(round((100.0*n.list_rank)/max_rank,1))+" "+str(n.bandwidth)) measured_pct = round(100.0*len(nodes)/(len(nodes)+missed_nodes),1) if measured_pct < MIN_REPORT: plog("NOTICE", "Did not measure "+str(MIN_REPORT)+"% of nodes yet ("+str(measured_pct)+"%)") sys.exit(1) plog("NOTICE", "Measured "+str(measured_pct)+"% of all tor nodes.") n_print = nodes.values() n_print.sort(lambda x,y: int(y.change) - int(x.change)) out = file(argv[-1], "w") out.write(str(int(round(min(scanner_timestamps),0)))+"\n") for n in n_print: if not n.ignore: out.write("node_id="+n.idhex+" bw="+str(base10_round(n.new_bw))+" diff="+str(int(round(n.change/1000.0,0)))+ " nick="+n.nick+ " measured_at="+str(int(n.chosen_time))+"\n") out.close() | 3796ff0c6e67f29fedac9ecbf5e472cca690a1d5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3762/3796ff0c6e67f29fedac9ecbf5e472cca690a1d5/aggregate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
4672,
23763,
1304,
18,
896,
67,
1425,
12,
19485,
63,
21,
3737,
6,
19,
26842,
18,
21,
19,
70,
91,
24763,
18,
7066,
7923,
23763,
1304,
18,
28189,
273,
315,
20559,
6,
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,
2774,
12,
19485,
4672,
23763,
1304,
18,
896,
67,
1425,
12,
19485,
63,
21,
3737,
6,
19,
26842,
18,
21,
19,
70,
91,
24763,
18,
7066,
7923,
23763,
1304,
18,
28189,
273,
315,
20559,
6,
2... |
if InternalParameters.autoPlay: lastServer = localName idx = self.cbServer.findText(lastServer) if idx >= 0: self.cbServer.setCurrentIndex(idx) | def __init__(self): """self.servers is a list of tuples containing server and last playername""" QDialog.__init__(self, None) self.setWindowTitle(m18n('Login') + ' - Kajongg') self.setupUi() | 203399968035613ebd10924e82c95b54b2dcf181 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1679/203399968035613ebd10924e82c95b54b2dcf181/humanclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
3536,
2890,
18,
14247,
353,
279,
666,
434,
10384,
4191,
1438,
471,
1142,
7291,
529,
8395,
2238,
6353,
16186,
2738,
972,
12,
2890,
16,
599,
13,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
3536,
2890,
18,
14247,
353,
279,
666,
434,
10384,
4191,
1438,
471,
1142,
7291,
529,
8395,
2238,
6353,
16186,
2738,
972,
12,
2890,
16,
599,
13,
365,
18,
... | |
loglink = "%s/log.%s" % (t, func) logfile = "%s/log.%s.%s" % (t, func, str(os.getpid())) | def exec_func(func, d, dirs = None): """Execute an BB 'function'""" body = data.getVar(func, d) if not body: bb.warn("Function %s doesn't exist" % func) return flags = data.getVarFlags(func, d) for item in ['deps', 'check', 'interactive', 'python', 'cleandirs', 'dirs', 'lockfiles', 'fakeroot', 'task']: if not item in flags: flags[item] = None ispython = flags['python'] cleandirs = flags['cleandirs'] if cleandirs: for cdir in data.expand(cleandirs, d).split(): os.system("rm -rf %s" % cdir) if dirs is None: dirs = flags['dirs'] if dirs: dirs = data.expand(dirs, d).split() if dirs: for adir in dirs: bb.utils.mkdirhier(adir) adir = dirs[-1] else: adir = data.getVar('B', d, 1) # Save current directory try: prevdir = os.getcwd() except OSError: prevdir = data.getVar('TOPDIR', d, True) # Setup logfiles t = data.getVar('T', d, 1) if not t: raise SystemExit("T variable not set, unable to build") bb.utils.mkdirhier(t) loglink = "%s/log.%s" % (t, func) logfile = "%s/log.%s.%s" % (t, func, str(os.getpid())) runfile = "%s/run.%s.%s" % (t, func, str(os.getpid())) # Even though the log file has not yet been opened, lets create the link if loglink: try: os.remove(loglink) except OSError as e: pass try: os.symlink(logfile, loglink) except OSError as e: pass # Change to correct directory (if specified) if adir and os.access(adir, os.F_OK): os.chdir(adir) # Handle logfiles si = file('/dev/null', 'r') try: if bb.msg.debug_level['default'] > 0 and not ispython: so = os.popen("tee \"%s\"" % logfile, "w") else: so = file(logfile, 'w') except OSError as e: bb.msg.error(bb.msg.domain.Build, "opening log file: %s" % e) pass se = so # Dup the existing fds so we dont lose them osi = [os.dup(sys.stdin.fileno()), sys.stdin.fileno()] oso = [os.dup(sys.stdout.fileno()), sys.stdout.fileno()] ose = [os.dup(sys.stderr.fileno()), sys.stderr.fileno()] # Replace those fds with our own os.dup2(si.fileno(), osi[1]) os.dup2(so.fileno(), oso[1]) os.dup2(se.fileno(), ose[1]) # Since we've remapped stdout and stderr, its safe for log messages to be printed there now # exec_func can nest so we have to save state origstdout = bb.event.useStdout bb.event.useStdout = True locks = [] lockfiles = flags['lockfiles'] if lockfiles: for lock in data.expand(lockfiles, d).split(): locks.append(bb.utils.lockfile(lock)) try: # Run the function if ispython: exec_func_python(func, d, runfile, logfile) else: exec_func_shell(func, d, runfile, logfile, flags) # Restore original directory try: os.chdir(prevdir) except: pass finally: # Unlock any lockfiles for lock in locks: bb.utils.unlockfile(lock) sys.stdout.flush() sys.stderr.flush() bb.event.useStdout = origstdout # Restore the backup fds os.dup2(osi[0], osi[1]) os.dup2(oso[0], oso[1]) os.dup2(ose[0], ose[1]) # Close our logs si.close() so.close() se.close() if os.path.exists(logfile) and os.path.getsize(logfile) == 0: bb.msg.debug(2, bb.msg.domain.Build, "Zero size logfile %s, removing" % logfile) os.remove(logfile) try: os.remove(loglink) except OSError as e: pass # Close the backup fds os.close(osi[0]) os.close(oso[0]) os.close(ose[0]) | d14f9bf6c470907d77654a35b4b55f30bdc182ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/d14f9bf6c470907d77654a35b4b55f30bdc182ff/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1196,
67,
644,
12,
644,
16,
302,
16,
7717,
273,
599,
4672,
3536,
5289,
392,
21752,
296,
915,
11,
8395,
225,
1417,
273,
501,
18,
588,
1537,
12,
644,
16,
302,
13,
309,
486,
1417,
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,
1196,
67,
644,
12,
644,
16,
302,
16,
7717,
273,
599,
4672,
3536,
5289,
392,
21752,
296,
915,
11,
8395,
225,
1417,
273,
501,
18,
588,
1537,
12,
644,
16,
302,
13,
309,
486,
1417,
30,
... | |
An interactive slider control, which can be used in conjunction | An interactive range slider control, which can be used in conjunction | def __init__(self, vmin, vmax=None, step_size=1, default=None, label=None, display_value=True): r""" An interactive slider control, which can be used in conjunction with the interact command. | 5dee6800360a6857d894611450cab0a310ea04a5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5dee6800360a6857d894611450cab0a310ea04a5/interact.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
17501,
16,
17831,
33,
7036,
16,
2235,
67,
1467,
33,
21,
16,
805,
33,
7036,
16,
1433,
33,
7036,
16,
2562,
67,
1132,
33,
5510,
4672,
436,
8395,
1922,
126... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
17501,
16,
17831,
33,
7036,
16,
2235,
67,
1467,
33,
21,
16,
805,
33,
7036,
16,
1433,
33,
7036,
16,
2562,
67,
1132,
33,
5510,
4672,
436,
8395,
1922,
126... |
(filename, traceback.format_exc())) | (templatehelper.toUni(filename), traceback.format_exc())) | def delete(self): try: filename = self.status['filename'] except KeyError: return try: if os.path.isfile(filename): os.remove (filename) elif os.path.isdir(filename): shutil.rmtree (filename) except: logging.warn("Error deleting downloaded file: %s\n%s" % (filename, traceback.format_exc())) | a4bf6dccded7cffcfd18afb48fc493179cda96b0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12354/a4bf6dccded7cffcfd18afb48fc493179cda96b0/downloader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
4672,
775,
30,
1544,
273,
365,
18,
2327,
3292,
3459,
3546,
1335,
4999,
30,
327,
775,
30,
309,
1140,
18,
803,
18,
291,
768,
12,
3459,
4672,
1140,
18,
4479,
261,
3459,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1430,
12,
2890,
4672,
775,
30,
1544,
273,
365,
18,
2327,
3292,
3459,
3546,
1335,
4999,
30,
327,
775,
30,
309,
1140,
18,
803,
18,
291,
768,
12,
3459,
4672,
1140,
18,
4479,
261,
3459,
... |
''', '') | ''' return_error = error_template('', error_message, '') | def handle_exception(exc_info, error_stream, html=True, debug_mode=False, error_email=None, error_log=None, show_exceptions_in_wsgi_errors=False, error_email_from='errors@localhost', smtp_server='localhost', error_subject_prefix='', error_message=None, ): """ For exception handling outside of a web context Use like:: import sys import paste import paste.error_middleware try: do stuff except: paste.error_middleware.exception_handler( sys.exc_info(), paste.CONFIG, sys.stderr, html=False) If you want to report, but not fully catch the exception, call ``raise`` after ``exception_handler``, which (when given no argument) will reraise the exception. """ reported = False exc_data = collector.collect_exception(*exc_info) extra_data = '' if error_email: rep = reporter.EmailReporter( to_addresses=error_email, from_address=error_email_from, smtp_server=smtp_server, subject_prefix=error_subject_prefix) rep_err = send_report(rep, exc_data, html=html) if rep_err: extra_data += rep_err else: reported = True if error_log: rep = reporter.LogReporter( filename=error_log) rep_err = send_report(rep, exc_data, html=html) if rep_err: extra_data += rep_err else: reported = True if show_exceptions_in_wsgi_errors: rep = reporter.FileReporter( file=error_stream) rep_err = send_report(rep, exc_data, html=html) if rep_err: extra_data += rep_err else: reported = True else: error_stream.write('Error - %s: %s\n' % ( exc_data.exception_type, exc_data.exception_value)) if html: if debug_mode: error_html = formatter.format_html( exc_data, include_hidden_frames=True, include_reusable=False) head_html = formatter.error_css + formatter.hide_display_js return_error = error_template( head_html, error_html, extra_data) extra_data = '' reported = True else: return_error = error_template( error_message or ''' An error occurred. See the error logs for more information. (Turn debug on to display exception reports here) ''', '') else: return_error = None if not reported and error_stream: err_report = formatter.format_text(exc_data, show_hidden_frames=True) err_report += '\n' + '-'*60 + '\n' error_stream.write(err_report) if extra_data: error_stream.write(extra_data) return return_error | eb2983924feafcde2d6b938ec544eeb87f514d6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/eb2983924feafcde2d6b938ec544eeb87f514d6c/errormiddleware.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
4064,
12,
10075,
67,
1376,
16,
555,
67,
3256,
16,
1729,
33,
5510,
16,
1198,
67,
3188,
33,
8381,
16,
555,
67,
3652,
33,
7036,
16,
555,
67,
1330,
33,
7036,
16,
2405,
67,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
4064,
12,
10075,
67,
1376,
16,
555,
67,
3256,
16,
1729,
33,
5510,
16,
1198,
67,
3188,
33,
8381,
16,
555,
67,
3652,
33,
7036,
16,
555,
67,
1330,
33,
7036,
16,
2405,
67,
11... |
(objects, output_dir, libraries, library_dirs) = \ self._fix_link_args (objects, output_dir, takes_libs=1, libraries=libraries, library_dirs=library_dirs) | (objects, output_dir) = self._fix_object_args (objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) | def link_executable (self, objects, output_progname, output_dir=None, libraries=None, library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None): (objects, output_dir, libraries, library_dirs) = \ self._fix_link_args (objects, output_dir, takes_libs=1, libraries=libraries, library_dirs=library_dirs) | e21dabe2e0f93aef55bf6a5352527f4874a31489 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e21dabe2e0f93aef55bf6a5352527f4874a31489/unixccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1692,
67,
17751,
261,
2890,
16,
2184,
16,
876,
67,
14654,
529,
16,
876,
67,
1214,
33,
7036,
16,
14732,
33,
7036,
16,
5313,
67,
8291,
33,
7036,
16,
1198,
33,
20,
16,
2870,
67,
1484,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1692,
67,
17751,
261,
2890,
16,
2184,
16,
876,
67,
14654,
529,
16,
876,
67,
1214,
33,
7036,
16,
14732,
33,
7036,
16,
5313,
67,
8291,
33,
7036,
16,
1198,
33,
20,
16,
2870,
67,
1484,
... |
base = dictmatrix() ext = dictmatrix() | base = dok_matrix() ext = dok_matrix() | def split(self, cols_or_rows, columns=1): # similar to take but returns two array, the extracted # columns plus the resulting array # assumes cols_or_rows is sorted base = dictmatrix() ext = dictmatrix() indx = int((columns == 1)) N = len(cols_or_rows) if indx: for key in self.keys(): num = searchsorted(cols_or_rows,key[1]) if cols_or_rows[num]==key[1]: newkey = (key[0],num) ext[newkey] = self[key] else: newkey = (key[0],key[1]-num) base[newkey] = self[key] else: for key in self.keys(): num = searchsorted(cols_or_rows,key[0]) if cols_or_rows[num]==key[0]: newkey = (num,key[1]) ext[newkey] = self[key] else: newkey = (key[0]-num,key[1]) base[newkey] = self[key] return base, ext | b14552c4a5780327bf9ca40b82d78bbf0d40722e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/b14552c4a5780327bf9ca40b82d78bbf0d40722e/Sparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
12,
2890,
16,
5347,
67,
280,
67,
3870,
16,
2168,
33,
21,
4672,
468,
7281,
358,
4862,
1496,
1135,
2795,
526,
16,
326,
9438,
468,
225,
2168,
8737,
326,
8156,
526,
468,
225,
13041,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1416,
12,
2890,
16,
5347,
67,
280,
67,
3870,
16,
2168,
33,
21,
4672,
468,
7281,
358,
4862,
1496,
1135,
2795,
526,
16,
326,
9438,
468,
225,
2168,
8737,
326,
8156,
526,
468,
225,
13041,
... |
self._backup_database("pre80") if util.chatter: logging.info("converting pre 2.1 database") convert20database.convert(self.cursor) self._set_version(80) | current_version = self._get_variable(VERSION_KEY) if current_version >= 80: if util.chatter: logging.info("deleting dtv_objects table") self.cursor.execute("DROP TABLE dtv_objects") else: self._backup_database("pre80") if util.chatter: logging.info("converting pre 2.1 database") convert20database.convert(self.cursor) self._set_version(80) | def _upgrade_20_database(self): self.cursor.execute("SELECT COUNT(*) FROM sqlite_master " "WHERE type='table' and name = 'dtv_objects'") if self.cursor.fetchone()[0] > 0: self._backup_database("pre80") | 6100349c70454a648c74d7d2dd7a0f64ca7bcf5b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/6100349c70454a648c74d7d2dd7a0f64ca7bcf5b/storedatabase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
15097,
67,
3462,
67,
6231,
12,
2890,
4672,
365,
18,
9216,
18,
8837,
2932,
4803,
12666,
24099,
4571,
16184,
67,
7525,
315,
315,
12299,
618,
2218,
2121,
11,
471,
508,
273,
296,
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,
389,
15097,
67,
3462,
67,
6231,
12,
2890,
4672,
365,
18,
9216,
18,
8837,
2932,
4803,
12666,
24099,
4571,
16184,
67,
7525,
315,
315,
12299,
618,
2218,
2121,
11,
471,
508,
273,
296,
7510,
... |
ui = PaiUI(args, config, ncolumns=options.ncolumns, rtl=options.rtl, progress_dlg=progress) run_in_gui_thread(ui.show) | sources = [os.path.realpath(p) for p in args if os.path.exists(p)] def _load(): filelist = FileList(sources, IMAGE_EXTENSIONS, progress.queue) run_in_gui_thread(_finished, filelist) @assert_gui_thread def _finished(filelist): progress.close() ui = PaiUI(sources, filelist, config, ncolumns=options.ncolumns, rtl=options.rtl) ui.show() threading.Thread(target=_load).start() | def start(args, options, config): progress = ProgressDialog("Starting PAI...") ui = PaiUI(args, config, ncolumns=options.ncolumns, rtl=options.rtl, progress_dlg=progress) run_in_gui_thread(ui.show) | 21d971c0b7dc42bbb9b614603d85894f1a3bbef1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6493/21d971c0b7dc42bbb9b614603d85894f1a3bbef1/pai.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
1968,
16,
702,
16,
642,
4672,
4007,
273,
10980,
6353,
2932,
11715,
15662,
45,
7070,
13,
225,
5550,
273,
306,
538,
18,
803,
18,
7688,
803,
12,
84,
13,
364,
293,
316,
833,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
1968,
16,
702,
16,
642,
4672,
4007,
273,
10980,
6353,
2932,
11715,
15662,
45,
7070,
13,
225,
5550,
273,
306,
538,
18,
803,
18,
7688,
803,
12,
84,
13,
364,
293,
316,
833,
309... |
result = get_pydoc_html(pydoc_mod) | result, doc_loc = get_pydoc_html(pydoc_mod) | def test_html_doc(self): result = get_pydoc_html(pydoc_mod) mod_file = inspect.getabsfile(pydoc_mod) expected_html = expected_html_pattern % (mod_file, mod_file) if result != expected_html: print_diffs(expected_html, result) self.fail("outputs are not equal, see diff above") | a6fc4064d089da3415d48c6f288d58764628c361 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/a6fc4064d089da3415d48c6f288d58764628c361/test_pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2620,
67,
2434,
12,
2890,
4672,
563,
16,
997,
67,
1829,
273,
336,
67,
2074,
2434,
67,
2620,
12,
2074,
2434,
67,
1711,
13,
681,
67,
768,
273,
5334,
18,
588,
5113,
768,
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,
1842,
67,
2620,
67,
2434,
12,
2890,
4672,
563,
16,
997,
67,
1829,
273,
336,
67,
2074,
2434,
67,
2620,
12,
2074,
2434,
67,
1711,
13,
681,
67,
768,
273,
5334,
18,
588,
5113,
768,
12,
... |
self._snapshot = (dec_flags, input_chunk, len(decoded)) | self._snapshot = (dec_flags, input_chunk) | def seek(self, cookie, whence=0): if not self._seekable: raise IOError("underlying stream is not seekable") if whence == 1: # seek relative to current position if cookie != 0: raise IOError("can't do nonzero cur-relative seeks") # Seeking to the current position should attempt to # sync the underlying buffer with the current position. whence = 0 cookie = self.tell() if whence == 2: # seek relative to end of file if cookie != 0: raise IOError("can't do nonzero end-relative seeks") self.flush() position = self.buffer.seek(0, 2) self._decoded_text = "" self._snapshot = None if self._decoder: self._decoder.reset() return position if whence != 0: raise ValueError("invalid whence (%r, should be 0, 1 or 2)" % (whence,)) if cookie < 0: raise ValueError("negative seek position %r" % (cookie,)) self.flush() | dbe28e573e5c1227777db9dd630fac7732b81374 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/dbe28e573e5c1227777db9dd630fac7732b81374/io.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6520,
12,
2890,
16,
3878,
16,
23692,
33,
20,
4672,
309,
486,
365,
6315,
16508,
429,
30,
1002,
8340,
2932,
9341,
6291,
1407,
353,
486,
6520,
429,
7923,
309,
23692,
422,
404,
30,
468,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6520,
12,
2890,
16,
3878,
16,
23692,
33,
20,
4672,
309,
486,
365,
6315,
16508,
429,
30,
1002,
8340,
2932,
9341,
6291,
1407,
353,
486,
6520,
429,
7923,
309,
23692,
422,
404,
30,
468,
65... |
l += "<" | l += "<" | def colorize(self,dico,style=None): file = open(self.path + "/" + self.name + ".gfs") out = open(self.path + "/" + self.name + ".gfs.html", 'w') path = "../" * (self.path.count("/") + 3) + "reference/" out.write("<html><head><title>\n" + self.name + ".gfs") | 25721c81e5bffc18effe773473152807a6e53f10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1949/25721c81e5bffc18effe773473152807a6e53f10/gfs2tex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21077,
12,
2890,
16,
72,
10764,
16,
4060,
33,
7036,
4672,
585,
273,
1696,
12,
2890,
18,
803,
397,
4016,
397,
365,
18,
529,
397,
3552,
75,
2556,
7923,
596,
273,
1696,
12,
2890,
18,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21077,
12,
2890,
16,
72,
10764,
16,
4060,
33,
7036,
4672,
585,
273,
1696,
12,
2890,
18,
803,
397,
4016,
397,
365,
18,
529,
397,
3552,
75,
2556,
7923,
596,
273,
1696,
12,
2890,
18,
80... |
mirror_dir = os.path.join(self.config.dvcs_mirror_dir, self.get_module_basename() + '.git') | mirror_dir = get_git_mirror_directory(self.config.dvcs_mirror_dir, self.checkoutdir, self.unmirrored_module) | def update_dvcs_mirror(self, buildscript): if not self.config.dvcs_mirror_dir: return if self.config.nonetwork: return | c15d7b3b56e5b4c4b56c8d42a080a985c845f01d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4596/c15d7b3b56e5b4c4b56c8d42a080a985c845f01d/git.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
15679,
2143,
67,
27197,
12,
2890,
16,
1361,
4263,
4672,
309,
486,
365,
18,
1425,
18,
15679,
2143,
67,
27197,
67,
1214,
30,
327,
309,
365,
18,
1425,
18,
5836,
1572,
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,
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,
1089,
67,
15679,
2143,
67,
27197,
12,
2890,
16,
1361,
4263,
4672,
309,
486,
365,
18,
1425,
18,
15679,
2143,
67,
27197,
67,
1214,
30,
327,
309,
365,
18,
1425,
18,
5836,
1572,
30,
327,
... |
print formatstr % (classifier.continuizedDomain.attributes[i].name, classifier.beta[i+1], classifier.beta_se[i+1], classifier.wald_Z[i+1], abs(classifier.P[i+1]), exp(classifier.beta[i+1])) | print formatstr % (classifier.continuizedDomain.attributes[i].name, classifier.beta[i+1], classifier.beta_se[i+1], classifier.wald_Z[i+1], abs(classifier.P[i+1]), math.exp(classifier.beta[i+1])) | def printOUT(classifier): # print out class values print print "class attribute = " + classifier.domain.classVar.name print "class values = " + str(classifier.domain.classVar.values) print # get the longest attribute name longest=0 for at in classifier.continuizedDomain.attributes: if len(at.name)>longest: longest=len(at.name); # print out the head formatstr = "%"+str(longest)+"s %10s %10s %10s %10s %10s" print formatstr % ("Attribute", "beta", "st. error", "wald Z", "P", "OR=exp(beta)") print formatstr = "%"+str(longest)+"s %10.2f %10.2f %10.2f %10.2f" print formatstr % ("Intercept", classifier.beta[0], classifier.beta_se[0], classifier.wald_Z[0], classifier.P[0]) formatstr = "%"+str(longest)+"s %10.2f %10.2f %10.2f %10.2f %10.2f" for i in range(len(classifier.continuizedDomain.attributes)): print formatstr % (classifier.continuizedDomain.attributes[i].name, classifier.beta[i+1], classifier.beta_se[i+1], classifier.wald_Z[i+1], abs(classifier.P[i+1]), exp(classifier.beta[i+1])) | 0e4f76dd13d5f45584af852f0427ed96b8901487 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/0e4f76dd13d5f45584af852f0427ed96b8901487/orngLR.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
5069,
12,
1106,
1251,
4672,
468,
1172,
596,
667,
924,
1172,
1172,
315,
1106,
1566,
273,
315,
397,
14622,
18,
4308,
18,
1106,
1537,
18,
529,
1172,
315,
1106,
924,
273,
315,
397,
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,
1172,
5069,
12,
1106,
1251,
4672,
468,
1172,
596,
667,
924,
1172,
1172,
315,
1106,
1566,
273,
315,
397,
14622,
18,
4308,
18,
1106,
1537,
18,
529,
1172,
315,
1106,
924,
273,
315,
397,
6... |
bp = bdb.Breakpoint.bpbynumber[int(i)] | try: i = int(i) except ValueError: print 'Breakpoint index %r is not a number' % i continue if not (0 <= i < len(bdb.Breakpoint.bpbynumber)): print 'No breakpoint numbered', i continue bp = bdb.Breakpoint.bpbynumber[i] | def do_disable(self, arg): args = arg.split() for i in args: bp = bdb.Breakpoint.bpbynumber[int(i)] if bp: bp.disable() | b1f8bab6542635cd32dfbebde3839f86819548ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b1f8bab6542635cd32dfbebde3839f86819548ab/pdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
8394,
12,
2890,
16,
1501,
4672,
833,
273,
1501,
18,
4939,
1435,
364,
277,
316,
833,
30,
775,
30,
277,
273,
509,
12,
77,
13,
1335,
2068,
30,
1172,
296,
20552,
770,
738,
86,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
8394,
12,
2890,
16,
1501,
4672,
833,
273,
1501,
18,
4939,
1435,
364,
277,
316,
833,
30,
775,
30,
277,
273,
509,
12,
77,
13,
1335,
2068,
30,
1172,
296,
20552,
770,
738,
86,
... |
printError(0, "%s: Unknow rpm package architecture %s" % (pkg.source, pkg["arch"])) | printError("%s: Unknow rpm package architecture %s" % (pkg.source, pkg["arch"])) | def filterArchList(list, arch=None): # stage 1: filter packages which are not in compat arch if arch != None and arch != "noarch": error = 0 for pkg in list: pkg = list[i] if pkg["arch"] not in possible_archs: error = 1 printError(0, "%s: Unknow rpm package architecture %s" % (pkg.source, pkg["arch"])) if pkg["arch"] != arch and pkg["arch"] not in arch_compats[arch]: error = 1 printError(0, "%s: Architecture not compatible with machine %s" % (pkg.source, arch)) if error != 0: return -1 # stage 2: filert duplicates: order by name.arch hash = { } i = 0 while i < len(list): pkg = list[i] key = "%s.%s" % (pkg["name"], pkg["arch"]) if not hash.has_key(key): hash[key] = pkg i += 1 else: r = hash[key] ret = pkgCompare(r, pkg) if ret < 0: printWarning(0, "%s was already added, replacing with %s" % \ (r.getNEVRA(), pkg.getNEVRA())) hash[key] = pkg list.remove(r) elif ret == 0: printWarning(0, "%s was already added" % \ pkg.getNEVRA()) list.remove(pkg) else: i += 1 del hash # stage 3: filter duplicates: order by name hash = { } i = 0 while i < len(list): pkg = list[i] removed = 0 if not hash.has_key(pkg["name"]): hash[pkg["name"]] = [ ] hash[pkg["name"]].append(pkg) else: j = 0 while hash[pkg["name"]] and j < len(hash[pkg["name"]]) and \ removed == 0: r = hash[pkg["name"]][j] if pkg["arch"] != r["arch"] and \ buildarchtranslate[pkg["arch"]] != \ buildarchtranslate[r["arch"]]: j += 1 elif r["arch"] in arch_compats[pkg["arch"]]: printWarning(0, "%s was already added, replacing with %s" % \ (r.getNEVRA(), pkg.getNEVRA())) hash[pkg["name"]].remove(r) hash[pkg["name"]].append(pkg) list.remove(r) removed = 1 elif pkg["arch"] == r["arch"]: printWarning(0, "%s was already added" % \ pkg.getNEVRA()) list.remove(pkg) removed = 1 else: j += 1 if removed == 0: hash[pkg["name"]].append(pkg) if removed == 0: i += 1 del hash return 1 | 09db47e95c8e38720cba62816e23ee2235a3c637 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/09db47e95c8e38720cba62816e23ee2235a3c637/functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
12269,
682,
12,
1098,
16,
6637,
33,
7036,
4672,
468,
6009,
404,
30,
1034,
5907,
1492,
854,
486,
316,
4796,
6637,
309,
6637,
480,
599,
471,
6637,
480,
315,
2135,
991,
6877,
555,
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,
1034,
12269,
682,
12,
1098,
16,
6637,
33,
7036,
4672,
468,
6009,
404,
30,
1034,
5907,
1492,
854,
486,
316,
4796,
6637,
309,
6637,
480,
599,
471,
6637,
480,
315,
2135,
991,
6877,
555,
2... |
matchExpr = Group( FollowedBy(lastExpr + opExpr) + lastExpr + OneOrMore( opExpr ) ) | matchExpr = FollowedBy(lastExpr + opExpr) + Group( lastExpr + OneOrMore( opExpr ) ) | def operatorPrecedence( baseExpr, opList ): """Helper method for constructing grammars of expressions made up of operators working in a precedence hierarchy. Operators may be unary or binary, left- or right-associative. Parse actions can also be attached to operator expressions. Parameters: - baseExpr - expression representing the most basic element for the nested - opList - list of tuples, one for each operator precedence level in the expression grammar; each tuple is of the form (opExpr, numTerms, rightLeftAssoc, parseAction), where: - opExpr is the pyparsing expression for the operator; may also be a string, which will be converted to a Literal - numTerms is the number of terms for this operator (must be 1 or 2) - rightLeftAssoc is the indicator whether the operator is right or left associative, using the pyparsing-defined constants opAssoc.RIGHT and opAssoc.LEFT. - parseAction is the parse action to be associated with expressions matching this operator expression (the parse action tuple member may be omitted) """ ret = Forward() lastExpr = baseExpr | ( Suppress('(') + ret + Suppress(')') ) for i,operDef in enumerate(opList): opExpr,arity,rightLeftAssoc,pa = (operDef + (None,))[:4] thisExpr = Forward()#.setName("expr%d" % i) if rightLeftAssoc == opAssoc.LEFT: if arity == 1: matchExpr = Group( FollowedBy(lastExpr + opExpr) + lastExpr + OneOrMore( opExpr ) ) elif arity == 2: matchExpr = Group( FollowedBy(lastExpr + opExpr + lastExpr) + lastExpr + OneOrMore( opExpr + lastExpr ) ) else: raise ValueError, "operator must be unary (1) or binary (2)" elif rightLeftAssoc == opAssoc.RIGHT: if arity == 1: # try to avoid LR with this extra test if not isinstance(opExpr, Optional): opExpr = Optional(opExpr) matchExpr = FollowedBy(opExpr.expr + thisExpr) + Group( opExpr + thisExpr ) elif arity == 2: matchExpr = Group( FollowedBy(lastExpr + opExpr + thisExpr) + lastExpr + OneOrMore( opExpr + thisExpr ) ) else: raise ValueError, "operator must be unary (1) or binary (2)" else: raise ValueError, "operator must indicate right or left associativity" if pa: matchExpr.setParseAction( pa ) thisExpr << ( matchExpr | lastExpr ) lastExpr = thisExpr ret << lastExpr return ret | 963e26a9e74b3f47c686af73d9c00f2f71392bf6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12364/963e26a9e74b3f47c686af73d9c00f2f71392bf6/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3726,
1386,
24092,
12,
1026,
4742,
16,
27571,
262,
30,
3536,
2276,
707,
364,
27389,
6473,
87,
434,
8041,
7165,
731,
434,
12213,
5960,
316,
279,
14172,
9360,
18,
225,
7692,
3062,
2026,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3726,
1386,
24092,
12,
1026,
4742,
16,
27571,
262,
30,
3536,
2276,
707,
364,
27389,
6473,
87,
434,
8041,
7165,
731,
434,
12213,
5960,
316,
279,
14172,
9360,
18,
225,
7692,
3062,
2026,
50... |
p = document.body[i+2].find("islongtable") | p = document.body[i + 2].find("islongtable") | def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_token(document.body, "</cell>", i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") i = j continue # don't set a box for longtables, only delete tabularvalignment # the alignment is 2 lines below \\begin_inset Tabular p = document.body[i+2].find("islongtable") if p > -1: q = document.body[i+2].find("tabularvalignment") if q > -1: document.body[i+2] = document.body[i+2][:q-1] document.body[i+2] = document.body[i+2] + '>' i = i + 1 # when no longtable if p == -1: tabularvalignment = 'c' # which valignment is specified? m = document.body[i+2].find('tabularvalignment="top"') if m > -1: tabularvalignment = 't' m = document.body[i+2].find('tabularvalignment="bottom"') if m > -1: tabularvalignment = 'b' # delete tabularvalignment q = document.body[i+2].find("tabularvalignment") if q > -1: document.body[i+2] = document.body[i+2][:q-1] document.body[i+2] = document.body[i+2] + '>' # don't add a box when centered if tabularvalignment == 'c': i = j continue subst = ['\\end_layout', '\\end_inset'] document.body[j:j] = subst # just inserts those lines subst = ['\\begin_inset Box Frameless', 'position "' + tabularvalignment +'"', 'hor_pos "c"', 'has_inner_box 1', 'inner_pos "c"', 'use_parbox 0', # we don't know the width, assume 50% 'width "50col%"', 'special "none"', 'height "1in"', 'height_special "totalheight"', 'status open', '', '\\begin_layout Plain Layout'] document.body[i:i] = subst # this just inserts the array at i i += len(subst) + 2 # adjust i to save a few cycles | bcd8b9a1f1241c461beb5db1d5a69424a9a25950 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7514/bcd8b9a1f1241c461beb5db1d5a69424a9a25950/lyx_2_0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15226,
67,
7032,
2490,
1125,
724,
12,
5457,
4672,
315,
868,
1097,
326,
28342,
1244,
724,
1456,
315,
277,
273,
374,
1323,
1053,
30,
277,
273,
1104,
67,
2316,
12,
5457,
18,
3432,
16,
842... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15226,
67,
7032,
2490,
1125,
724,
12,
5457,
4672,
315,
868,
1097,
326,
28342,
1244,
724,
1456,
315,
277,
273,
374,
1323,
1053,
30,
277,
273,
1104,
67,
2316,
12,
5457,
18,
3432,
16,
842... |
sage: ecm.factor((2^197 + 1)/3) | sage: ecm.factor((2^197 + 1)/3) | def get_last_params(self): """ Returns the parameters (including the curve) of the last ecm run. In the case that the number was factored successfully, this will return the parameters that yielded the factorization. INPUT: none OUTPUT: The parameters for the most recent factorization. EXAMPLES: sage: ecm.factor((2^197 + 1)/3) [197002597249, 1348959352853811313, 251951573867253012259144010843] sage: ecm.get_last_params() # random output {'poly': 'x^1', 'sigma': '1785694449', 'B1': '8885', 'B2': '1002846'} """ return self.last_params | d0b459e5a57c91eabccd257b526321e159fcbc64 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/d0b459e5a57c91eabccd257b526321e159fcbc64/ecm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2722,
67,
2010,
12,
2890,
4672,
3536,
2860,
326,
1472,
261,
31348,
326,
8882,
13,
434,
326,
1142,
6557,
81,
1086,
18,
657,
326,
648,
716,
326,
1300,
1703,
5410,
7653,
4985,
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,
336,
67,
2722,
67,
2010,
12,
2890,
4672,
3536,
2860,
326,
1472,
261,
31348,
326,
8882,
13,
434,
326,
1142,
6557,
81,
1086,
18,
657,
326,
648,
716,
326,
1300,
1703,
5410,
7653,
4985,
16... |
conv = inches *1.0 / dpi | conv = inches *1.0 / _dpi | def subplot(Numy,Numx,win=0,pw=None,ph=None,hsep=100,vsep=100,color='black',frame=0,fontsize=8,font=None,dpi=100,ticks=1): # Use gist.plsys to change coordinate systems # all inputs (except fontsize) given as pixels, gist wants # things in normalized device # coordinate. Window is brought up with center of window at # center of 8.5 x 11 inch page: in landscape mode (5.25, 4.25) # or at position (4.25,6.75) for portrait mode msg = 1 if pw is None: pw = Numx*300 msg = 0 if ph is None: ph = Numy*300 msg = 0 maxwidth=int(os.environ.get('XPLT_MAXWIDTH')) maxheight=int(os.environ.get('XPLT_MAXHEIGHT')) printit = 0 if ph > maxheight: ph = maxheight printit = 1 if pw > maxwidth: pw = maxwidth printit = 1 if dpi != 100: dpi = 75 fontsize = 12 conv = inches *1.0 / dpi # multiply by this factor to convert pixels to # NDC # Use landscape mode unless requested height is large land = 1 maxw = 11*dpi maxh = 8.5*dpi if ph > (8.5*dpi) and pw < (8.5*dpi): land = 0 maxh = 11*dpi maxw = 8.5*dpi if ph > maxh: ph = maxh printit=1 if pw > maxw: pw = maxw printit=1 if printit and msg: message = "Warning: Requested height and width too large.\n" message +="Changing to %d x %d" % (pw,ph) print message # Now we've got a suitable height and width if land: cntr = array([5.5,4.25])*dpi # landscape else: cntr = array([4.25,6.75])*dpi # portrait Yspace = ph/float(Numy)*conv Xspace = pw/float(Numx)*conv hsep = hsep * conv vsep = vsep * conv ytop = (cntr[1]+ph/2.0)*conv xleft = (cntr[0]-pw/2.0)*conv if type(color) is types.StringType: color = _colornum[color] systems=[] ind = -1 for nY in range(Numy): ystart = ytop - (nY+1)*Yspace for nX in range(Numx): xstart = xleft + nX*Xspace systems.append({}) systems[-1]['viewport'] = [xstart+hsep/2.0,xstart+Xspace-hsep/2.0,ystart+vsep/2.0,ystart+Yspace-vsep/2.0] if font is not None or fontsize is not None: _chng_font(systems[-1],font,fontsize) if color != -3 or frame != 0: _add_color(systems[-1],color,frame=frame) if ticks != 1: _remove_ticks(systems[-1]) _current_style='/tmp/subplot%s.gs' % win fid = open(_current_style,'w') fid.write(write_style.style2string(systems,landscape=land)) fid.close() gist.winkill(win) gist.window(win,style=_current_style,width=int(pw),height=int(ph),dpi=100) | 52cc5149afc80e6ec63ff8f313429740b6845b1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/52cc5149afc80e6ec63ff8f313429740b6845b1a/Mplot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19826,
12,
2578,
93,
16,
2578,
92,
16,
8082,
33,
20,
16,
14921,
33,
7036,
16,
844,
33,
7036,
16,
76,
10814,
33,
6625,
16,
90,
10814,
33,
6625,
16,
3266,
2218,
11223,
2187,
3789,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19826,
12,
2578,
93,
16,
2578,
92,
16,
8082,
33,
20,
16,
14921,
33,
7036,
16,
844,
33,
7036,
16,
76,
10814,
33,
6625,
16,
90,
10814,
33,
6625,
16,
3266,
2218,
11223,
2187,
3789,
33,
... |
sys.stderr.write("WARNING: %s can not be found - standard extensions may not be found" % mapFileName) | sys.stderr.write("WARNING: %s can not be found - standard extensions may not be found\n" % defaultMapName) | def checkextensions(unknown, extra_inis, prefix): # Create a table of frozen extensions defaultMapName = os.path.join( os.path.split(sys.argv[0])[0], "extensions_win32.ini") if not os.path.isfile(defaultMapName): sys.stderr.write("WARNING: %s can not be found - standard extensions may not be found" % mapFileName) else: # must go on end, so other inis can override. extra_inis.append(defaultMapName) ret = [] for mod in unknown: for ini in extra_inis: | dbbf956351e4ff4e4a209068c2dbcfb929a1ad19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dbbf956351e4ff4e4a209068c2dbcfb929a1ad19/checkextensions_win32.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
9489,
12,
8172,
16,
2870,
67,
267,
291,
16,
1633,
4672,
468,
1788,
279,
1014,
434,
12810,
4418,
225,
805,
863,
461,
273,
1140,
18,
803,
18,
5701,
12,
1140,
18,
803,
18,
4939,
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,
866,
9489,
12,
8172,
16,
2870,
67,
267,
291,
16,
1633,
4672,
468,
1788,
279,
1014,
434,
12810,
4418,
225,
805,
863,
461,
273,
1140,
18,
803,
18,
5701,
12,
1140,
18,
803,
18,
4939,
12... |
self._displayMessage("No (%s) for [%s]" % (key, program['title'])) | if not mirodetails: filename = program['title'] else: filename = mirodetails[u'moviename'] self._displayMessage("No (%s) for [%s]" % (key, filename)) if mirodetails: self.updateMiroVideo(program) | def _downloadScheduledRecordedGraphics(self): '''Get Scheduled and Recorded programs and get their graphics if not already downloaded return (nothing is returned) ''' # Initialize reporting stats total_progs_checked = 0 total_posters_found = 0 total_banners_found = 0 total_fanart_found = 0 total_posters_downloaded = 0 total_banners_downloaded = 0 total_fanart_downloaded = 0 | da58d67ff802989f12b584ed8dfcff2d3581d752 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/da58d67ff802989f12b584ed8dfcff2d3581d752/jamu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7813,
10660,
426,
3850,
785,
17558,
12,
2890,
4672,
9163,
967,
17286,
471,
868,
3850,
785,
25038,
471,
336,
3675,
17313,
309,
486,
1818,
13549,
327,
261,
30874,
353,
2106,
13,
9163,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7813,
10660,
426,
3850,
785,
17558,
12,
2890,
4672,
9163,
967,
17286,
471,
868,
3850,
785,
25038,
471,
336,
3675,
17313,
309,
486,
1818,
13549,
327,
261,
30874,
353,
2106,
13,
9163,
... |
LIBS_GUI = ['core', 'html', 'gl'] | LIBS_GUI = ['core', 'adv', 'html', 'gl'] | def mk_wxid(id): """Creates wxWindows library identifier from bakefile target ID that follows this convention: DLLs end with 'dll', static libraries end with 'lib'. If withPrefix=1, then _wxid is returned instead of wxid.""" if id.endswith('dll') or id.endswith('lib'): wxid = id[:-3] else: wxid = id return wxid | 13cb46e0b6fe6d404c6e28bec1744a5fc30356b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/13cb46e0b6fe6d404c6e28bec1744a5fc30356b9/wxwin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
67,
91,
6212,
12,
350,
4672,
3536,
2729,
7075,
10399,
5313,
2756,
628,
324,
911,
768,
1018,
1599,
716,
13040,
333,
15797,
30,
463,
4503,
87,
679,
598,
296,
27670,
2187,
760,
14732,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5028,
67,
91,
6212,
12,
350,
4672,
3536,
2729,
7075,
10399,
5313,
2756,
628,
324,
911,
768,
1018,
1599,
716,
13040,
333,
15797,
30,
463,
4503,
87,
679,
598,
296,
27670,
2187,
760,
14732,... |
raise IOError, "bad operation for mode %r" % self._mode | raise IOError("bad operation for mode %r" % self._mode) | def _check(self, mode=None): """Check if TarFile is still open, and if the operation's mode corresponds to TarFile's mode. """ if self.closed: raise IOError, "%s is closed" % self.__class__.__name__ if mode is not None and self._mode not in mode: raise IOError, "bad operation for mode %r" % self._mode | e4751e3cdc8c271f24e46a6155f255b6e33da158 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e4751e3cdc8c271f24e46a6155f255b6e33da158/tarfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
12,
2890,
16,
1965,
33,
7036,
4672,
3536,
1564,
309,
20334,
812,
353,
4859,
1696,
16,
471,
309,
326,
1674,
1807,
1965,
13955,
358,
20334,
812,
1807,
1965,
18,
3536,
309,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
12,
2890,
16,
1965,
33,
7036,
4672,
3536,
1564,
309,
20334,
812,
353,
4859,
1696,
16,
471,
309,
326,
1674,
1807,
1965,
13955,
358,
20334,
812,
1807,
1965,
18,
3536,
309,
365,
... |
self.tab('\t<param name="Name" value="%s">\n' % self.saved_get()) self.tab('\t</OBJECT>\n') | title = cgi.escape(self.saved_get(), True) path = self.path + '/' + self.hrefstack.pop() if len(self.hrefstack) == 0: self.tab(object_sitemap % (title, path)) | def anchor_end(self): if self.proc: self.tab('\t<param name="Name" value="%s">\n' % self.saved_get()) self.tab('\t</OBJECT>\n') | 454540774618c35374ecd0042ab689692040c425 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/454540774618c35374ecd0042ab689692040c425/prechm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6984,
67,
409,
12,
2890,
4672,
309,
365,
18,
9381,
30,
365,
18,
7032,
2668,
64,
88,
32,
891,
508,
1546,
461,
6,
460,
11613,
87,
6,
5333,
82,
11,
738,
365,
18,
14077,
67,
588,
10756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6984,
67,
409,
12,
2890,
4672,
309,
365,
18,
9381,
30,
365,
18,
7032,
2668,
64,
88,
32,
891,
508,
1546,
461,
6,
460,
11613,
87,
6,
5333,
82,
11,
738,
365,
18,
14077,
67,
588,
10756... |
dsquared = [] | triggers_within_epsilon = coincInspiralTable() | def improvedMetricHistogram(self, candidate): """ Return distance squared between candidate and coincident triggers using the following metric | de2e9d5312290205808cffee242913dd495127b5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3592/de2e9d5312290205808cffee242913dd495127b5/CoincInspiralUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13069,
2155,
5396,
12874,
12,
2890,
16,
5500,
4672,
3536,
2000,
3888,
21778,
3086,
5500,
471,
13170,
71,
6392,
11752,
1450,
326,
3751,
3999,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
13069,
2155,
5396,
12874,
12,
2890,
16,
5500,
4672,
3536,
2000,
3888,
21778,
3086,
5500,
471,
13170,
71,
6392,
11752,
1450,
326,
3751,
3999,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.parser.parseError(_("Unexpected start tag token (" + name +\ ") in the frameset phase.")) | self.parser.parseError(_(u"Unexpected start tag token (" + name +\ u") in the frameset phase. Ignored")) | def startTagOther(self, name, attributes): self.parser.parseError(_("Unexpected start tag token (" + name +\ ") in the frameset phase.")) | 1f8d4e2171f1f6a5e857b84c62ee3e00dcf40348 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4487/1f8d4e2171f1f6a5e857b84c62ee3e00dcf40348/html5parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
1805,
8290,
12,
2890,
16,
508,
16,
1677,
4672,
365,
18,
4288,
18,
2670,
668,
24899,
2932,
7762,
787,
1047,
1147,
7566,
397,
508,
397,
64,
9369,
316,
326,
7793,
278,
6855,
1199,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
1805,
8290,
12,
2890,
16,
508,
16,
1677,
4672,
365,
18,
4288,
18,
2670,
668,
24899,
2932,
7762,
787,
1047,
1147,
7566,
397,
508,
397,
64,
9369,
316,
326,
7793,
278,
6855,
1199,
37... |
return urllib2.urlopen(urllib2.Request(url, data, headers)) | return self.opener.open(urllib2.Request(url, data, headers)) | def fetch(self, url, data = None, headers = {}): if len(self.fost): signed, signed_headers = 'X-FOST-Headers', [] for header, value in self.fost['headers'].items(): signed += ' ' + header signed_headers.append(value) headers[ header ] = value utcnow = unicode(datetime.datetime.utcnow()) document = '%s %s\n%s\n%s\n%s' % ( "POST" if data else "GET", url_filespec_encode(urlparse.urlsplit(url).path), utcnow, '\n'.join([signed] + signed_headers), urlparse.urlsplit(url).query ) headers['X-FOST-Timestamp'] = utcnow headers['X-FOST-Headers'] = signed headers['Authorization'] = "FOST %s:%s" % (self.fost['key'], sha1_hmac(self.fost['secret'], document)) #print document return urllib2.urlopen(urllib2.Request(url, data, headers)) | 57b90803c7a1b878c8c1d128cb81b086d6f0bb74 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7956/57b90803c7a1b878c8c1d128cb81b086d6f0bb74/useragent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
12,
2890,
16,
880,
16,
501,
273,
599,
16,
1607,
273,
2618,
4672,
309,
562,
12,
2890,
18,
617,
334,
4672,
6726,
16,
6726,
67,
2485,
273,
296,
60,
17,
3313,
882,
17,
3121,
2187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2158,
12,
2890,
16,
880,
16,
501,
273,
599,
16,
1607,
273,
2618,
4672,
309,
562,
12,
2890,
18,
617,
334,
4672,
6726,
16,
6726,
67,
2485,
273,
296,
60,
17,
3313,
882,
17,
3121,
2187,
... |
if lexists(root_dpath): if not isdir(root_dpath): | if not isdir(root_dpath): if exists(root_dpath): | def __str__(self): return "OVERLAY ERROR @ %s: %s" % (self.path, self.exc) | d69d52789f715a949ef532bd57c7267144f78e74 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10616/d69d52789f715a949ef532bd57c7267144f78e74/restore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
327,
315,
12959,
7868,
5475,
632,
738,
87,
30,
738,
87,
6,
738,
261,
2890,
18,
803,
16,
365,
18,
10075,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
327,
315,
12959,
7868,
5475,
632,
738,
87,
30,
738,
87,
6,
738,
261,
2890,
18,
803,
16,
365,
18,
10075,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.selenium.click("//input[@value='Add new role']") | self.selenium.click("//input[@value='Add']") | def test_add_role(self): self.selenium.open("/portal/admin_roles_html", True) self.selenium.type("//input[@id='input-role']", "SOMErOLE") self.selenium.click("//input[@value='Add new role']") self.selenium.wait_for_page_to_load("3000") assert self.selenium.is_text_present('SOMErOLE') self.selenium.open("/portal/admin_editrole_html?role=SOMErOLE", True) assert self.selenium.is_text_present('Edit permissions for SOMErOLE') | 71892d2930a489d2b970517fd8ea8b5c56e114e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/71892d2930a489d2b970517fd8ea8b5c56e114e6/test_user_management.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1289,
67,
4615,
12,
2890,
4672,
365,
18,
1786,
17327,
18,
3190,
2932,
19,
24386,
19,
3666,
67,
7774,
67,
2620,
3113,
1053,
13,
365,
18,
1786,
17327,
18,
723,
2932,
759,
2630,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1289,
67,
4615,
12,
2890,
4672,
365,
18,
1786,
17327,
18,
3190,
2932,
19,
24386,
19,
3666,
67,
7774,
67,
2620,
3113,
1053,
13,
365,
18,
1786,
17327,
18,
723,
2932,
759,
2630,... |
def refreshGUI(self, signal = ('set', None), **arguments): updatedAttribute = signal[1] if updatedAttribute is None or updatedAttribute == 'color': if self.visibles.haveEqualAttr('color'): red, green, blue = self.visibles[0].color() self._colorPicker.SetColour(wx.Color(red * 255, green * 255, blue * 255, 255)) self._colorPicker.SetLabel(gettext('')) else: self._colorPicker.SetColour(wx.NamedColour('GRAY')) self._colorPicker.SetLabel(gettext('Multiple values')) if updatedAttribute is None or updatedAttribute == 'opacity': if self.visibles.haveEqualAttr('opacity'): self._opacitySlider.SetLabel('') self._opacitySlider.SetValue(self.visibles[0].opacity() * 100.0) else: self._opacitySlider.SetLabel(gettext('Multiple values')) self._opacitySlider.SetValue(100) if updatedAttribute is None or updatedAttribute == 'shape': shapeClass = type(self.visibles[0].shape()) equalClasses = True for visible in self.visibles[1:]: if type(visible) != shapeClass: equalClasses = False if equalClasses: for index in range(0, self._shapeChoice.GetCount()): if self._shapeChoice.GetClientData(index) == shapeClass: self._shapeChoice.SetSelection(index) break else: if self._multipleShapesId == wx.NOT_FOUND: self._multipleShapesId = self._shapeChoice.Append(gettext('Multiple values'), None) self._shapeChoice.SetSelection(self._multipleShapesId) if updatedAttribute is None or updatedAttribute == 'texture': if self.visibles.haveEqualAttr('texture'): for index in range(0, self._textureChoice.GetCount()): if self._textureChoice.GetClientData(index) == self.visibles[0].texture(): self._textureChoice.SetSelection(index) break else: if self._multipleTexturesId == wx.NOT_FOUND: self._multipleTexturesId = self._textureChoice.Append(gettext('Multiple values'), None) self._textureChoice.SetSelection(self._multipleTexturesId) if updatedAttribute is None or updatedAttribute == 'weight': if self.visibles.haveEqualAttr('weight'): self._weightSlider.SetLabel('') if self.visibles[0].weight() >= 1.0: self._weightSlider.SetValue((self.visibles[0].weight() - 1.0) * 50.0 / 9.0 + 50.0) | def refreshGUI(self, signal = ('set', None)): if any(self.visibles): updatedAttribute = signal[1] if updatedAttribute is None or updatedAttribute == 'color': if self.visibles.haveEqualAttr('color'): red, green, blue = self.visibles[0].color() self._colorPicker.SetColour(wx.Color(red * 255, green * 255, blue * 255, 255)) self._colorPicker.SetLabel(gettext('')) | def refreshGUI(self, signal = ('set', None), **arguments): updatedAttribute = signal[1] if updatedAttribute is None or updatedAttribute == 'color': if self.visibles.haveEqualAttr('color'): red, green, blue = self.visibles[0].color() self._colorPicker.SetColour(wx.Color(red * 255, green * 255, blue * 255, 255)) self._colorPicker.SetLabel(gettext('')) else: self._colorPicker.SetColour(wx.NamedColour('GRAY')) # TODO: be clever and pick the average color? self._colorPicker.SetLabel(gettext('Multiple values')) if updatedAttribute is None or updatedAttribute == 'opacity': if self.visibles.haveEqualAttr('opacity'): self._opacitySlider.SetLabel('') self._opacitySlider.SetValue(self.visibles[0].opacity() * 100.0) else: self._opacitySlider.SetLabel(gettext('Multiple values')) self._opacitySlider.SetValue(100) if updatedAttribute is None or updatedAttribute == 'shape': shapeClass = type(self.visibles[0].shape()) equalClasses = True for visible in self.visibles[1:]: if type(visible) != shapeClass: equalClasses = False if equalClasses: for index in range(0, self._shapeChoice.GetCount()): if self._shapeChoice.GetClientData(index) == shapeClass: self._shapeChoice.SetSelection(index) break else: if self._multipleShapesId == wx.NOT_FOUND: self._multipleShapesId = self._shapeChoice.Append(gettext('Multiple values'), None) self._shapeChoice.SetSelection(self._multipleShapesId) if updatedAttribute is None or updatedAttribute == 'texture': if self.visibles.haveEqualAttr('texture'): for index in range(0, self._textureChoice.GetCount()): if self._textureChoice.GetClientData(index) == self.visibles[0].texture(): self._textureChoice.SetSelection(index) break else: if self._multipleTexturesId == wx.NOT_FOUND: self._multipleTexturesId = self._textureChoice.Append(gettext('Multiple values'), None) self._textureChoice.SetSelection(self._multipleTexturesId) if updatedAttribute is None or updatedAttribute == 'weight': if self.visibles.haveEqualAttr('weight'): self._weightSlider.SetLabel('') if self.visibles[0].weight() >= 1.0: self._weightSlider.SetValue((self.visibles[0].weight() - 1.0) * 50.0 / 9.0 + 50.0) else: self._weightSlider.SetValue(50.0 - (1.0 - self.visibles[0].weight()) * 10.0 * 50.0 / 9.0) else: self._weightSlider.SetLabel(gettext('Multiple values')) self._weightSlider.SetValue(50) self._window.Layout() | 8eb0d1e612a9d0e870bd8001c6413413ad805b2d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6368/8eb0d1e612a9d0e870bd8001c6413413ad805b2d/AppearanceInspector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
43,
5370,
12,
2890,
16,
4277,
273,
7707,
542,
2187,
599,
3631,
2826,
7099,
4672,
3526,
1499,
273,
4277,
63,
21,
65,
225,
309,
3526,
1499,
353,
599,
578,
3526,
1499,
422,
296,
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,
4460,
43,
5370,
12,
2890,
16,
4277,
273,
7707,
542,
2187,
599,
3631,
2826,
7099,
4672,
3526,
1499,
273,
4277,
63,
21,
65,
225,
309,
3526,
1499,
353,
599,
578,
3526,
1499,
422,
296,
326... |
"/../rdiff-backup -v3 --no-compare-inode " | "/../rdiff-backup -v9 --no-compare-inode " | def reset_schema(self): self.rb_schema = (SourceDir + "/../rdiff-backup -v3 --no-compare-inode " "--remote-schema './chdir-wrapper2 %s' ") | 3e5358078ea14b5db8cca92a7648aca1c711ce3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6202/3e5358078ea14b5db8cca92a7648aca1c711ce3d/finaltest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
67,
4821,
12,
2890,
4672,
365,
18,
6731,
67,
4821,
273,
261,
1830,
1621,
397,
2206,
6216,
86,
5413,
17,
9572,
300,
90,
29,
1493,
2135,
17,
9877,
17,
267,
390,
315,
5238,
7222,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
67,
4821,
12,
2890,
4672,
365,
18,
6731,
67,
4821,
273,
261,
1830,
1621,
397,
2206,
6216,
86,
5413,
17,
9572,
300,
90,
29,
1493,
2135,
17,
9877,
17,
267,
390,
315,
5238,
7222,
... |
with support.check_warnings(): | with warnings.catch_warnings(): warnings.simplefilter('ignore', BytesWarning) | def test_unquoting(self): # Make sure unquoting of all ASCII values works escape_list = [] for num in range(128): given = hexescape(chr(num)) expect = chr(num) result = urllib.parse.unquote(given) self.assertEqual(expect, result, "using unquote(): %r != %r" % (expect, result)) result = urllib.parse.unquote_plus(given) self.assertEqual(expect, result, "using unquote_plus(): %r != %r" % (expect, result)) escape_list.append(given) escape_string = ''.join(escape_list) del escape_list result = urllib.parse.unquote(escape_string) self.assertEqual(result.count('%'), 1, "using unquote(): not all characters escaped: " "%s" % result) self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, None) self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, ()) with support.check_warnings(): self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, b'') | 99e472e84dbec06b54c1e72fe04abd510c847e03 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/99e472e84dbec06b54c1e72fe04abd510c847e03/test_urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
318,
9270,
310,
12,
2890,
4672,
468,
4344,
3071,
640,
9270,
310,
434,
777,
11768,
924,
6330,
4114,
67,
1098,
273,
5378,
364,
818,
316,
1048,
12,
10392,
4672,
864,
273,
3827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
318,
9270,
310,
12,
2890,
4672,
468,
4344,
3071,
640,
9270,
310,
434,
777,
11768,
924,
6330,
4114,
67,
1098,
273,
5378,
364,
818,
316,
1048,
12,
10392,
4672,
864,
273,
3827,
... |
headers = self.getHeaderNoCheck() | headers = self.getHeader() if refreshing: self.oauth_token_secret = "" headers["Authorization"] += ',oauth_session_handle="%s"' % self.access_token['oauth_session_handle'] print headers | def updateTokenAccess(self): """Sign all keys to get a new token and token secret, must redo after oauth_expires_in second """ headers = self.getHeaderNoCheck() req = urllib2.Request(self.oauth_server, None, headers) try: o = urllib2.urlopen(req) resp = o.read() self.access_token = dict([el.split("=") for el in resp.split("&")]) print "Access token", self.access_token self.last_token_update = time.time() self.updateToken(self.access_token['oauth_token'], self.access_token['oauth_token_secret']) return True except urllib2.HTTPError, e: self._handleHttpError(e) return False | 057b1c58037210d914f183cca7c24775558fe983 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2802/057b1c58037210d914f183cca7c24775558fe983/gtym.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
1345,
1862,
12,
2890,
4672,
3536,
2766,
777,
1311,
358,
336,
279,
394,
1147,
471,
1147,
4001,
16,
1297,
24524,
1839,
6924,
67,
12431,
67,
267,
2205,
3536,
1607,
273,
365,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
1345,
1862,
12,
2890,
4672,
3536,
2766,
777,
1311,
358,
336,
279,
394,
1147,
471,
1147,
4001,
16,
1297,
24524,
1839,
6924,
67,
12431,
67,
267,
2205,
3536,
1607,
273,
365,
18,
588,
... |
input = file(largeBinary, 'r') | input = file(largeBinary, 'rb') | def testBZ2Compressed(self): khepburn = self.rep.find('//CineGuide/KHepburn') self.assert_(khepburn is not None) | 092405b37ca3958ac2dc9e1f7d69f5c325481cf7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/092405b37ca3958ac2dc9e1f7d69f5c325481cf7/TestBinary.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
38,
62,
22,
16841,
12,
2890,
4672,
417,
580,
5733,
321,
273,
365,
18,
14462,
18,
4720,
2668,
759,
39,
558,
17424,
19,
47,
44,
881,
70,
321,
6134,
365,
18,
11231,
67,
12,
79,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
38,
62,
22,
16841,
12,
2890,
4672,
417,
580,
5733,
321,
273,
365,
18,
14462,
18,
4720,
2668,
759,
39,
558,
17424,
19,
47,
44,
881,
70,
321,
6134,
365,
18,
11231,
67,
12,
79,
... |
return self.templates | return self.categories | def getCategories(self, force=False): """Gets all list of all the categories on the page force - load the list even if we already loaded it before """ if self.categories and not force: return self.templates if self.pageid == 0 and not self.title: self.setPageInfo() if not self.exists: raise NoPage params = { 'action': 'query', 'prop': 'categories', 'cllimit': self.site.limit, } if self.pageid: params['pageids'] = self.pageid else: params['titles'] = self.title req = api.APIRequest(self.site, params) response = req.query() self.categories = [] if isinstance(response, list): for part in response: self.categories.extend(self.__extractToList(part, 'categories')) else: self.categories = self.__extractToList(response, 'categories') return self.categories | 1f7b960f4fb9a908223c0d57963c3239a9e961f0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10544/1f7b960f4fb9a908223c0d57963c3239a9e961f0/page.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1927,
4030,
12,
2890,
16,
2944,
33,
8381,
4672,
3536,
3002,
777,
666,
434,
777,
326,
6477,
603,
326,
1363,
225,
2944,
300,
1262,
326,
666,
5456,
309,
732,
1818,
4203,
518,
1865,
225,
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,
1927,
4030,
12,
2890,
16,
2944,
33,
8381,
4672,
3536,
3002,
777,
666,
434,
777,
326,
6477,
603,
326,
1363,
225,
2944,
300,
1262,
326,
666,
5456,
309,
732,
1818,
4203,
518,
1865,
225,
3... |
image_list = page.image_glob(base_name+'_playground_rho_*.png') | image_list = page.image_glob(base_name+'4_playground_rho_*.png') | def parse_command_line(): parser = OptionParser(version = "%prog CVS $Id$", usage = "%prog [options] [file ...]", description = "%prog computes mass/mass upperlimit") parser.add_option("--webserver", help = "Set the webserver path. Required. Example https://ldas-jobs.ligo.caltech.edu/~channa/highmass_months_23-24_summary_page") parser.add_option("--open-box", action = "store_true", help = "Produce open box page") parser.add_option("--output-name-tag", default = "", metavar = "name", help = "Set the basename for image search") opts, filenames = parser.parse_args() if not opts.webserver: print >>sys.stderr, "must specify a webserver" sys.exit(1) return opts, filenames | b77ba7aef5872e14b48ee71299ce0ae987743808 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/b77ba7aef5872e14b48ee71299ce0ae987743808/make_summary_page.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
3076,
67,
1369,
13332,
2082,
273,
18862,
12,
1589,
273,
2213,
14654,
385,
14640,
271,
548,
8,
3113,
4084,
273,
2213,
14654,
306,
2116,
65,
306,
768,
1372,
65,
3113,
2477,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
3076,
67,
1369,
13332,
2082,
273,
18862,
12,
1589,
273,
2213,
14654,
385,
14640,
271,
548,
8,
3113,
4084,
273,
2213,
14654,
306,
2116,
65,
306,
768,
1372,
65,
3113,
2477,
273,
... |
'name': _("%s Mail Form") % template_obj.name, | 'name': template_obj.name, | def create_action(self, cr, uid, ids, context): vals = {} template_obj = self.browse(cr, uid, ids)[0] src_obj = template_obj.object_name.model vals['ref_ir_act_window'] = self.pool.get('ir.actions.act_window').create(cr, uid, { 'name': _("%s Mail Form") % template_obj.name, 'type': 'ir.actions.act_window', 'res_model': 'email_template.send.wizard', 'src_model': src_obj, 'view_type': 'form', 'context': "{'src_model':'%s','template_id':'%d','src_rec_id':active_id,'src_rec_ids':active_ids}" % (src_obj, template_obj.id), 'view_mode':'form,tree', 'view_id': self.pool.get('ir.ui.view').search(cr, uid, [('name', '=', 'email_template.send.wizard.form')], context=context)[0], 'target': 'new', 'auto_refresh':1 }, context) vals['ref_ir_value'] = self.pool.get('ir.values').create(cr, uid, { 'name': _('Send Mail (%s)') % template_obj.name, 'model': src_obj, 'key2': 'client_action_multi', 'value': "ir.actions.act_window," + str(vals['ref_ir_act_window']), 'object': True, }, context) self.write(cr, uid, ids, { 'ref_ir_act_window': vals['ref_ir_act_window'], 'ref_ir_value': vals['ref_ir_value'], }, context) return True | 3ea3c8107e5e5e70fd9c893a0ad21e8f9019655c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3ea3c8107e5e5e70fd9c893a0ad21e8f9019655c/email_template.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
1128,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
4672,
5773,
273,
2618,
1542,
67,
2603,
273,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
25146,
20,
65,
1705,
67,
260... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
1128,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
4672,
5773,
273,
2618,
1542,
67,
2603,
273,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
25146,
20,
65,
1705,
67,
260... |
self.o.assy.unpickparts() self.selected_chunk = None | self.unpick_selected_chunk() | def init_gui(self): self.o.setCursor(self.w.MoveSelectCursor) # load default cursor for MODIFY mode self.w.toolsFuseChunksAction.setOn(1) # toggle on the Fuse Chunks icon self.w.fuseChunksDashboard.show() # show the Fuse Chunks dashboard self.w.connect(self.w.makeBondsPB,SIGNAL("clicked()"),self.make_bonds) self.w.connect(self.w.toleranceSL,SIGNAL("valueChanged(int)"),self.tolerance_changed) # If only one chunk is selected when coming in, make it the selected_chunk. # If more than one chunk is selected, unselect them all. if len(self.o.assy.selmols) == 1: self.setup_selected_chunk() else: self.o.assy.unpickparts() self.selected_chunk = None | bbb7e6efcf31d9718acda8efdc5aea1e1aab6aa9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/bbb7e6efcf31d9718acda8efdc5aea1e1aab6aa9/fusechunksMode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
20292,
12,
2890,
4672,
365,
18,
83,
18,
542,
6688,
12,
2890,
18,
91,
18,
7607,
3391,
6688,
13,
468,
1262,
805,
3347,
364,
8663,
12096,
1965,
365,
18,
91,
18,
6642,
42,
1202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
67,
20292,
12,
2890,
4672,
365,
18,
83,
18,
542,
6688,
12,
2890,
18,
91,
18,
7607,
3391,
6688,
13,
468,
1262,
805,
3347,
364,
8663,
12096,
1965,
365,
18,
91,
18,
6642,
42,
1202... |
query2 = """SELECT g.id, g.name FROM usergroup g, user_usergroup ug | query2 = """SELECT g.id, g.name FROM usergroup g, user_usergroup ug | def get_groupnames_like(uid, pattern): """Get groupnames like pattern. Will return only groups that user is allowed to see """ groups = {} if pattern: query1 = "SELECT id, name FROM usergroup WHERE name RLIKE '%s' AND join_policy like 'V%%'" pattern = escape_string(pattern) res = run_sql(query1 % pattern) # The line belows inserts into groups dictionary every tuple the database returned, # assuming field0=key and field1=value map(lambda x: groups.setdefault(x[0], x[1]), res) query2 = """SELECT g.id, g.name FROM usergroup g, user_usergroup ug WHERE g.id=ug.id_usergroup AND ug.id_user=%i AND g.name RLIKE '%s'""" res = run_sql(query2 % (uid, pattern)) map(lambda x: groups.setdefault(x[0], x[1]), res) return groups | 13dadf0fcb63f21c72c3528156245972761c7633 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2876/13dadf0fcb63f21c72c3528156245972761c7633/webmessage_dblayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1655,
1973,
67,
5625,
12,
1911,
16,
1936,
4672,
3536,
967,
1041,
1973,
3007,
1936,
18,
9980,
327,
1338,
3252,
716,
729,
353,
2935,
358,
2621,
3536,
3252,
273,
2618,
309,
1936,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1655,
1973,
67,
5625,
12,
1911,
16,
1936,
4672,
3536,
967,
1041,
1973,
3007,
1936,
18,
9980,
327,
1338,
3252,
716,
729,
353,
2935,
358,
2621,
3536,
3252,
273,
2618,
309,
1936,
... |
self.normalized_calc_f.normalizer_for_miller_array | self.normalized_obs_f.normalizer_for_miller_array | def __init__(self, miller_obs, miller_calc, r_free_flags, width=None, number=100, auto_kernel=True, n_points=20, n_terms=13): self.n_terms=n_terms self.miller_obs = miller_obs.map_to_asu() self.miller_calc = abs(miller_calc.map_to_asu()) self.r_free_flags = r_free_flags.map_to_asu() | 8f777ca692bd3035a09e63f2cf7afa68a631acc4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/8f777ca692bd3035a09e63f2cf7afa68a631acc4/sigmaa_estimation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
312,
24462,
67,
10992,
16,
312,
24462,
67,
12448,
16,
436,
67,
9156,
67,
7133,
16,
1835,
33,
7036,
16,
1300,
33,
6625,
16,
3656,
67,
8111,
33,
5510,
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,
1001,
2738,
972,
12,
2890,
16,
312,
24462,
67,
10992,
16,
312,
24462,
67,
12448,
16,
436,
67,
9156,
67,
7133,
16,
1835,
33,
7036,
16,
1300,
33,
6625,
16,
3656,
67,
8111,
33,
5510,
16... |
log("Whole Values: " + ",".join([str(v) for v in wholeValues])) | log("Whole Values, " + ",".join([str(v) for v in wholeValues])) | def makeFrapFigure(session, commandArgs): gateway = session.createGateway() roiService = session.getRoiService() queryService = session.getQueryService() updateService = session.getUpdateService() rawFileStore = session.createRawFileStore() rawPixelStore = session.createRawPixelsStore() renderingEngine = session.createRenderingEngine() imageId = commandArgs["imageId"] theC = 0 if "theC" in commandArgs: theC = commandArgs["theC"] image = gateway.getImage(imageId) imageName = image.getName().getValue() query_string = "select p from Pixels p join fetch p.image i join fetch p.pixelsType pt where i.id='%d'" % imageId pixels = queryService.findByQuery(query_string, None) #pixels = image.getPrimaryPixels() pixelsId = pixels.getId().getValue() #sizeX = pixels.getSizeX().getValue() #sizeY = pixels.getSizeY().getValue() #sizeZ = pixels.getSizeZ().getValue() #sizeC = pixels.getSizeC().getValue() #sizeT = pixels.getSizeT().getValue() bypassOriginalFile = True rawPixelStore.setPixelsId(pixelsId, bypassOriginalFile) roiLabels = ["FRAP", "Base", "Whole"] roiMap = getEllipses(roiService, imageId, roiLabels) for l in roiLabels: if l not in roiMap.keys(): print "ROI: '%s' not found. Cannot calculate FRAP" % l return frapROI = roiMap["FRAP"] baseROI = roiMap["Base"] wholeROI = roiMap["Whole"] # make a list of the t indexes that have all 3 of the Shapes we need. tIndexes = [] for t in frapROI.keys(): if t in baseROI.keys() and t in wholeROI.keys(): tIndexes.append(t) tIndexes.sort() log("T Indexes, " + ",".join([str(t) for t in tIndexes])) # get the actual plane times. timeMap = figUtil.getTimes(queryService, pixelsId, tIndexes, theZ=0, theC=0) timeList = [] for t in tIndexes: if t in timeMap: timeList.append(timeMap[t]) else: # handles images which don't have PlaneInfo timeMap[t] = t timeList.append(t) log("Plane times (secs), " + ",".join([str(t) for t in timeList])) frapValues = [] baseValues = [] wholeValues = [] frapBleach = None theZ = 0 for t in tIndexes: shapes = [frapROI[t], baseROI[t], wholeROI[t]] theZ = frapROI[t][4] # get theZ from the FRAP ROI # get a list of the average values of pixels in the three shapes. averages = analyseEllipses(shapes, pixels, rawPixelStore, theC, t, theZ) if frapBleach == None: frapBleach = averages[0] else: frapBleach = min(frapBleach, averages[0]) frapValues.append(averages[0]) baseValues.append(averages[1]) wholeValues.append(averages[2]) log("FRAP Values, " + ",".join([str(v) for v in frapValues])) log("Base Values, " + ",".join([str(v) for v in baseValues])) log("Whole Values: " + ",".join([str(v) for v in wholeValues])) # find the time of the bleach event (lowest intensity ) tBleach = frapValues.index(frapBleach) log("Pre-bleach frames, %d" % tBleach) frapPre = average(frapValues[:tBleach]) - average(baseValues[:tBleach]) wholePre = average(wholeValues[:tBleach]) - average(baseValues[:tBleach]) wholePost = average(wholeValues[tBleach:]) - average(baseValues[tBleach:]) fullRange = frapPre - frapBleach gapRatio = float(wholePost) / float(wholePre) frapNormCorr = [] for i in range(len(tIndexes)): frapNormCorr.append( (wholePre / float(wholeValues[i] - baseValues[i])) * (float(frapValues[i] - baseValues[i]) / frapPre) ) log("FRAP Corrected, " + str(frapNormCorr)) # work out the range of recovery (bleach -> plateau) and the time to reach half of this after bleach. frapBleachNormCorr = frapNormCorr[tBleach] plateauNormCorr = average(frapNormCorr[-5:]) plateauMinusBleachNormCorr = plateauNormCorr - frapBleachNormCorr mobileFraction = plateauMinusBleachNormCorr / float(1 - frapBleachNormCorr) immobileFraction = 1 - mobileFraction halfMaxNormCorr = plateauMinusBleachNormCorr /2 + frapBleachNormCorr log("Corrected Bleach Intensity, %f" % frapBleachNormCorr) log("Corrected Plateau Intensity, %f" % plateauNormCorr) log("Plateau - Bleach, %f" % plateauMinusBleachNormCorr) log("Mobile Fraction, %f" % mobileFraction) log("Immobile Fraction, %f" % immobileFraction) log("Half Recovered Intensity, %f" % halfMaxNormCorr) # Define the T-half for this FRAP. In place of fitting an exact curve to the # data, find the two time-points that the half Max of recovery sits between # and find the T-half using a linear approximation between these two points. # The T-half is this solved for halfMaxNormCorr - timestamp(tBleach) th = None for t in range(tBleach, len(tIndexes)): if halfMaxNormCorr < frapNormCorr[t]: th = tIndexes[t] break y1 = frapNormCorr[th-1] y2 = frapNormCorr[th] x1 = timeMap[th-1] x2 = timeMap[th] m1 = (y2-y1)/(x2-x1); #Gradient of the line c1 = y1-m1*x1; #Y-intercept tHalf = (halfMaxNormCorr-c1)/m1 - timeMap[tBleach] log("T-Half, %f seconds" % tHalf) figLegend = "\n".join(logLines) print figLegend # make PIL image of the last frame before FRAP spacer = 5 frames = [] frames.append(getPlaneImage(renderingEngine, pixelsId, theZ, tBleach-1, frapROI[tBleach-1])) frames.append(getPlaneImage(renderingEngine, pixelsId, theZ, tBleach, frapROI[tBleach])) frames.append(getPlaneImage(renderingEngine, pixelsId, theZ, tIndexes[-1], frapROI[tIndexes[-1]])) figW = len(frames) * frames[0].size[0] + (len(frames)-1) * spacer figH = frames[0].size[1] frapCanvas = pilImage.new("RGB", (figW, figH), (255,255,255)) x = 0 for img in frames: imgUtil.pasteImage(img, frapCanvas, x, 0) x += spacer + img.size[0] frapCanvas.show() frapCanvas = imgUtil.resizeImage(frapCanvas, 400, figH) frapCanvas.save("frapImage.jpg") format = JPEG output = "frapImage.jpg" # if reportLab has imported... if reportLab: # we are going to export a PDF, not a JPEG format = PDF output = "FRAP.pdf" # create a plot of the FRAP data figHeight = 450 figWidth = 400 drawing = Drawing(figWidth, figHeight) lp = LinePlot() lp.x = 50 lp.y = 50 lp.height = 300 lp.width = 300 lp.data = [zip(timeList, frapNormCorr)] lp.lines[0].strokeColor = colors.red lp.lines[0].symbol = makeMarker('Circle') drawing.add(lp) drawing.add(String(200,25, 'Time (seconds)', fontSize=12, textAnchor="middle")) drawing.add(String(200,figHeight-25, imageName, fontSize=12, textAnchor="middle")) drawing.add(String(200,figHeight-50, 'T(1/2) = %f' % tHalf, fontSize=12, textAnchor="middle")) # create an A4 canvas to make the pdf figure figCanvas = canvas.Canvas(output, pagesize=A4) pasteX = 100 pasteY = 75 # add the FRAP image figCanvas.drawImage("frapImage.jpg", pasteX, pasteY) # add the FRAP data plot renderPDF.draw(drawing, figCanvas, pasteX, 300, showBoundary=True) figCanvas.save() fileId = scriptUtil.uploadAndAttachFile(queryService, updateService, rawFileStore, image, output, format, figLegend) return fileId | 566dc854fdc857cddb1a005f0466810727d27024 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/566dc854fdc857cddb1a005f0466810727d27024/frapFigure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
42,
1266,
42,
15906,
12,
3184,
16,
1296,
2615,
4672,
225,
6878,
273,
1339,
18,
2640,
5197,
1435,
25017,
1179,
273,
1339,
18,
588,
54,
11359,
1179,
1435,
843,
1179,
273,
1339,
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,
1221,
42,
1266,
42,
15906,
12,
3184,
16,
1296,
2615,
4672,
225,
6878,
273,
1339,
18,
2640,
5197,
1435,
25017,
1179,
273,
1339,
18,
588,
54,
11359,
1179,
1435,
843,
1179,
273,
1339,
18,
... |
conclusions.add(where, GPS.lat, f.newLiteral("%f" % lat)) conclusions.add(where, GPS.longitude, f.newLiteral("%f" % long)) | conclusions.add(where, GPS.lat, lat) conclusions.add(where, GPS.long, long) | def compareByTime(a, b): if a[0] < b[0]: return -1 if a[0] > b[0]: return +1 return 0 | 7597d55bb6bcd391d706b19da6d10d0f9996952f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/7597d55bb6bcd391d706b19da6d10d0f9996952f/day.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
858,
950,
12,
69,
16,
324,
4672,
309,
279,
63,
20,
65,
411,
324,
63,
20,
14542,
327,
300,
21,
309,
279,
63,
20,
65,
405,
324,
63,
20,
14542,
327,
397,
21,
327,
374,
282,
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,
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,
3400,
858,
950,
12,
69,
16,
324,
4672,
309,
279,
63,
20,
65,
411,
324,
63,
20,
14542,
327,
300,
21,
309,
279,
63,
20,
65,
405,
324,
63,
20,
14542,
327,
397,
21,
327,
374,
282,
2,... |
profilers = self.job.profilers if not profilers.only(): for i in range(iterations): output = utils.system_output('%s/src/current/iozone %s' % (self.srcdir, args)) self.__format_results(output) if profilers.present(): profilers.start(self) output = utils.system_output('%s/src/current/iozone %s' % (self.srcdir, args)) self.__format_results(output) profilers.stop(self) profilers.report(self) | output = utils.system_output('%s/src/current/iozone %s' % (self.srcdir, args)) self.__format_results(output) | def execute(self, dir = None, iterations=1, args = None): self.keyval = open(os.path.join(self.resultsdir, 'keyval'), 'w') if not dir: dir = self.tmpdir os.chdir(dir) if not args: args = '-a' profilers = self.job.profilers if not profilers.only(): for i in range(iterations): output = utils.system_output('%s/src/current/iozone %s' % (self.srcdir, args)) self.__format_results(output) | 548562c1efd77e9f77ad94c8f542db3581385dc3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10349/548562c1efd77e9f77ad94c8f542db3581385dc3/iozone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
1577,
273,
599,
16,
11316,
33,
21,
16,
833,
273,
599,
4672,
365,
18,
856,
1125,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
2890,
18,
4717,
1214,
16,
296,
856,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
1577,
273,
599,
16,
11316,
33,
21,
16,
833,
273,
599,
4672,
365,
18,
856,
1125,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
2890,
18,
4717,
1214,
16,
296,
856,
1... |
cf_norm.upper(), | s_norm, | def Play(self, mode, tuner_channel=None, channel_change=0): | d1a3b23ba3f0716b6c3098e7625d8846fa8a07e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/d1a3b23ba3f0716b6c3098e7625d8846fa8a07e0/tvtime.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19592,
12,
2890,
16,
1965,
16,
268,
29640,
67,
4327,
33,
7036,
16,
1904,
67,
3427,
33,
20,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19592,
12,
2890,
16,
1965,
16,
268,
29640,
67,
4327,
33,
7036,
16,
1904,
67,
3427,
33,
20,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for coll in argd['c'] + [argd['cc']] + list(involved_collections): | for coll in involved_collections: | def __call__(self, req, form): """ Perform a search. """ argd = wash_search_urlargd(form) | 5145f1c433f5f54df24be0d09f4d4f34c86cebd4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/5145f1c433f5f54df24be0d09f4d4f34c86cebd4/websearch_webinterface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1111,
16,
646,
4672,
3536,
11217,
279,
1623,
18,
3536,
1501,
72,
273,
341,
961,
67,
3072,
67,
718,
3175,
72,
12,
687,
13,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1111,
16,
646,
4672,
3536,
11217,
279,
1623,
18,
3536,
1501,
72,
273,
341,
961,
67,
3072,
67,
718,
3175,
72,
12,
687,
13,
2,
-100,
-100,
-100,
-100,
-1... |
before the adaptive refinement code considers it significant. See the documentation for plot() for more information. | before the adaptive refinement code considers it significant. See the documentation further below for more information, starting at "the algorithm used to insert". | def plot(funcs, *args, **kwds): r""" Use plot by writing ``plot(X, ...)`` where `X` is a Sage object (or list of Sage objects) that either is callable and returns numbers that can be coerced to floats, or has a plot method that returns a ``GraphicPrimitive`` object. Type ``plot.options`` for a dictionary of the default options for plots. You can change this to change the defaults for all future plots. Use ``plot.reset()`` to reset to the default options. PLOT OPTIONS: - ``plot_points`` - (default: 5) the minimal number of plot points. - ``adaptive_recursion`` - (default: 5) how many levels of recursion to go before giving up when doing adaptive refinement. Setting this to 0 disables adaptive refinement. - ``adaptive_tolerance`` - (default: 0.01) how large a difference should be before the adaptive refinement code considers it significant. See the documentation for plot() for more information. - ``xmin`` - starting x value - ``xmax`` - ending x value - ``color`` - an rgb-tuple (r,g,b) with each of r,g,b between 0 and 1, or a color name as a string (e.g., 'purple'), or an HTML color such as '#aaff0b'. APPEARANCE OPTIONS: The following options affect the appearance of the line through the points on the graph of `X` (these are the same as for the line function): INPUT: - ``alpha`` - How transparent the line is - ``thickness`` - How thick the line is - ``rgbcolor`` - The color as an rgb tuple - ``hue`` - The color given as a hue Any MATPLOTLIB line option may also be passed in. E.g., - ``linestyle`` - The style of the line, which is one of '--' (dashed), '-.' (dash dot), '-' (solid), 'steps', ':' (dotted) - ``marker`` - "'0' (tickleft), '1' (tickright), '2' (tickup), '3' (tickdown), '' (nothing), ' ' (nothing), '+' (plus), ',' (pixel), '.' (point), '1' (tri_down), '3' (tri_left), '2' (tri_up), '4' (tri_right), '<' (triangle_left), '>' (triangle_right), 'None' (nothing), 'D' (diamond), 'H' (hexagon2), '_' (hline), '\^' (triangle_up), 'd' (thin_diamond), 'h' (hexagon1), 'o' (circle), 'p' (pentagon), 's' (square), 'v' (triangle_down), 'x' (x), '|' (vline)" - ``markersize`` - the size of the marker in points - ``markeredgecolor`` - the markerfacecolor can be any color arg - ``markeredgewidth`` - the size of the marker edge in points FILLING OPTIONS: INPUT: - ``fill`` - (Default: None) One of: - "axis" or True: Fill the area between the function and the x-axis. - "min": Fill the area between the function and its minimal value. - "max": Fill the area between the function and its maximal value. - a number c: Fill the area between the function and the horizontal line y = c. - a function g: Fill the area between the function that is plotted and g. - a dictonary d (only if a list of functions are plotted): The keys of the dictionary should be integers. The value of d[i] specifies the fill options for the i-th function in the list. If d[i] == [j]: Fill the area between the i-th and the j-th function in the list. - ``fillcolor`` - (default: 'automatic') The color of the fill. Either 'automatic' or a color. - ``fillalpha`` - (default: 0.5) How transparent the fill is. A number between 0 and 1. Note that this function does NOT simply sample equally spaced points between xmin and xmax. Instead it computes equally spaced points and add small perturbations to them. This reduces the possibility of, e.g., sampling sin only at multiples of `2\pi`, which would yield a very misleading graph. EXAMPLES: We plot the sin function:: sage: P = plot(sin, (0,10)); print P Graphics object consisting of 1 graphics primitive sage: len(P) # number of graphics primitives 1 sage: len(P[0]) # how many points were computed (random) 225 sage: P # render :: sage: P = plot(sin, (0,10), plot_points=10); print P Graphics object consisting of 1 graphics primitive sage: len(P[0]) # random output 32 sage: P # render We plot with randomize=False, which makes the initial sample points evenly spaced (hence always the same). Adaptive plotting might insert other points, however, unless adaptive_recursion=0. :: sage: p=plot(1, (x,0,3), plot_points=4, randomize=False, adaptive_recursion=0) sage: list(p[0]) [(0.0, 1.0), (1.0, 1.0), (2.0, 1.0), (3.0, 1.0)] Some colored functions:: sage: plot(sin, 0, 10, rgbcolor='#ff00ff') sage: plot(sin, 0, 10, rgbcolor='purple') We plot several functions together by passing a list of functions as input:: sage: plot([sin(n*x) for n in [1..4]], (0, pi)) The function `\sin(1/x)` wiggles wildly near `0`. Sage adapts to this and plots extra points near the origin. :: sage: plot(sin(1/x), (x, -1, 1)) Note that the independent variable may be omitted if there is no ambiguity:: sage: plot(sin(1/x), (-1, 1)) The algorithm used to insert extra points is actually pretty simple. On the picture drawn by the lines below:: sage: p = plot(x^2, (-0.5, 1.4)) + line([(0,0), (1,1)], rgbcolor='green') sage: p += line([(0.5, 0.5), (0.5, 0.5^2)], rgbcolor='purple') sage: p += point(((0, 0), (0.5, 0.5), (0.5, 0.5^2), (1, 1)), rgbcolor='red', pointsize=20) sage: p += text('A', (-0.05, 0.1), rgbcolor='red') sage: p += text('B', (1.01, 1.1), rgbcolor='red') sage: p += text('C', (0.48, 0.57), rgbcolor='red') sage: p += text('D', (0.53, 0.18), rgbcolor='red') sage: p.show(axes=False, xmin=-0.5, xmax=1.4, ymin=0, ymax=2) You have the function (in blue) and its approximation (in green) passing through the points A and B. The algorithm finds the midpoint C of AB and computes the distance between C and D. The point D is added to the curve if it exceeds the (nonzero) adaptive_tolerance threshold. If D is added to the curve, then the algorithm is applied recursively to the points A and D, and D and B. It is repeated adaptive_recursion times (10, by default). The actual sample points are slightly randomized, so the above plots may look slightly different each time you draw them. We draw the graph of an elliptic curve as the union of graphs of 2 functions. :: sage: def h1(x): return abs(sqrt(x^3 - 1)) sage: def h2(x): return -abs(sqrt(x^3 - 1)) sage: P = plot([h1, h2], 1,4) sage: P # show the result We can also directly plot the elliptic curve:: sage: E = EllipticCurve([0,-1]) sage: plot(E, (1, 4), rgbcolor=hue(0.6)) We can change the line style to one of '--' (dashed), '-.' (dash dot), '-' (solid), 'steps', ':' (dotted):: sage: plot(sin(x), 0, 10, linestyle='-.') Sage currently ignores points that cannot be evaluated :: sage: set_verbose(-1) sage: plot(-x*log(x), (x,0,1)) # this works fine since the failed endpoint is just skipped. sage: set_verbose(0) This prints out a warning and plots where it can (we turn off the warning by setting the verbose mode temporarily to -1.) :: sage: set_verbose(-1) sage: plot(x^(1/3), (x,-1,1)) sage: set_verbose(0) To plot the negative real cube root, use something like the following:: sage: plot(lambda x : RR(x).nth_root(3), (x,-1, 1)) The basic options for filling a plot:: sage: p1 = plot(sin(x), -pi, pi, fill = 'axis') sage: p2 = plot(sin(x), -pi, pi, fill = 'min') sage: p3 = plot(sin(x), -pi, pi, fill = 'max') sage: p4 = plot(sin(x), -pi, pi, fill = 0.5) sage: graphics_array([[p1, p2], [p3, p4]]).show(frame=True, axes=False) sage: plot([sin(x), cos(2*x)*sin(4*x)], -pi, pi, fill = {0: 1}, fillcolor = 'red', fillalpha = 1) A example about the growth of prime numbers:: sage: plot(1.13*log(x), 1, 100, fill = lambda x: nth_prime(x)/floor(x), fillcolor = 'red') Fill the area between a function and its asymptote:: sage: f = (2*x^3+2*x-1)/((x-2)*(x+1)) sage: plot([f, 2*x+2], -7,7, fill = {0: [1]}, fillcolor='#ccc').show(ymin=-20, ymax=20) sage: def b(n): return lambda x: bessel_J(n, x) sage: plot([b(n) for n in [1..5]], 0, 20, fill = 'axis') sage: def b(n): return lambda x: bessel_J(n, x) + 0.5*(n-1) sage: plot([b(c) for c in [1..5]], 0, 40, fill = dict([(i, i+1) for i in [0..3]])) TESTS: We do not randomize the endpoints:: sage: p = plot(x, (x,-1,1)) sage: p[0].xdata[0] == -1 True sage: p[0].xdata[-1] == 1 True We check to make sure that the x/y min/max data get set correctly when there are multiple functions. :: sage: d = plot([sin(x), cos(x)], 100, 120).get_minmax_data() sage: d['xmin'] 100.0 sage: d['xmax'] 120.0 We check various combinations of tuples and functions, ending with tests that lambda functions work properly with explicit variable declaration, without a tuple. :: sage: p = plot(lambda x: x,(x,-1,1)) sage: p = plot(lambda x: x,-1,1) sage: p = plot(x,x,-1,1) sage: p = plot(x,-1,1) sage: p = plot(x^2,x,-1,1) sage: p = plot(x^2,xmin=-1,xmax=2) sage: p = plot(lambda x: x,x,-1,1) sage: p = plot(lambda x: x^2,x,-1,1) sage: p = plot(lambda x: 1/x,x,-1,1) sage: f(x) = sin(x+3)-.1*x^3 sage: p = plot(lambda x: f(x),x,-1,1) We check to handle cases where the function gets evaluated at a point which causes an 'inf' or '-inf' result to be produced. :: sage: p = plot(1/x, 0, 1) sage: p = plot(-1/x, 0, 1) Bad options now give better errors:: sage: P = plot(sin(1/x), (x,-1,3), foo=10) Traceback (most recent call last): ... RuntimeError: Error in line(): option 'foo' not valid. """ original_opts = kwds.pop('__original_opts', {}) do_show = kwds.pop('show',False) if hasattr(funcs, 'plot'): G = funcs.plot(*args, **original_opts) # if we are using the generic plotting method else: n = len(args) # if there are no extra args, try to get xmin,xmax from # keyword arguments or pick some silly default if n == 0: xmin = kwds.pop('xmin', -1) xmax = kwds.pop('xmax', 1) G = _plot(funcs, (xmin, xmax), **kwds) # if there is one extra arg, then it had better be a tuple elif n == 1: G = _plot(funcs, *args, **kwds) elif n == 2: # if there are two extra args, then pull them out and pass them as a tuple xmin = args[0] xmax = args[1] args = args[2:] G = _plot(funcs, (xmin, xmax), *args, **kwds) elif n == 3: # if there are three extra args, then pull them out and pass them as a tuple var = args[0] xmin = args[1] xmax = args[2] args = args[3:] G = _plot(funcs, (var, xmin, xmax), *args, **kwds) elif ('xmin' in kwds) or ('xmax' in kwds): xmin = kwds.pop('xmin', -1) xmax = kwds.pop('xmax', 1) G = _plot(funcs, (xmin, xmax), *args, **kwds) pass else: sage.misc.misc.verbose("there were %s extra arguments (besides %s)" % (n, funcs), level=0) if do_show: G.show() return G | 53bc30b3387bfc0f18049d2b64fd1492c7912453 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/53bc30b3387bfc0f18049d2b64fd1492c7912453/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
12,
17728,
16,
380,
1968,
16,
2826,
25577,
4672,
436,
8395,
2672,
3207,
635,
7410,
225,
12176,
4032,
12,
60,
16,
1372,
13,
10335,
225,
1625,
1375,
60,
68,
353,
279,
348,
410,
733... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
12,
17728,
16,
380,
1968,
16,
2826,
25577,
4672,
436,
8395,
2672,
3207,
635,
7410,
225,
12176,
4032,
12,
60,
16,
1372,
13,
10335,
225,
1625,
1375,
60,
68,
353,
279,
348,
410,
733... |
for field, values in self._fields_map.items(): if tag in field.tags: if arg is not None: warnings.append(tag+' did not expect an argument') return if not field.multivalue and len(values) > 0: warnings.append(tag+ ' redefined') del values[:] values.append(descr) | if tag == 'sort': if arg is not None: warnings.append(tag+' did not expect an argument') | def _process_field(self, tag, arg, descr, warnings): """ This method should be overridden, and called as the default case. """ for field, values in self._fields_map.items(): if tag in field.tags: if arg is not None: warnings.append(tag+' did not expect an argument') return if not field.multivalue and len(values) > 0: warnings.append(tag+ ' redefined') del values[:] values.append(descr) return | 1bdcaa661906ee198f52b061b725c621ba0ae305 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/1bdcaa661906ee198f52b061b725c621ba0ae305/objdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2567,
67,
1518,
12,
2890,
16,
1047,
16,
1501,
16,
18426,
16,
5599,
4672,
3536,
1220,
707,
1410,
506,
11000,
16,
471,
2566,
487,
326,
805,
648,
18,
3536,
309,
1047,
422,
296,
3804,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2567,
67,
1518,
12,
2890,
16,
1047,
16,
1501,
16,
18426,
16,
5599,
4672,
3536,
1220,
707,
1410,
506,
11000,
16,
471,
2566,
487,
326,
805,
648,
18,
3536,
309,
1047,
422,
296,
3804,... |
style=wxSUNKEN_BORDER|wxLC_SINGLE_SEL) | style=wxSUNKEN_BORDER|wxLC_LIST|wxLC_SINGLE_SEL) | def submenu(title, *items, **kw): description = kw.get('description', '') id = kw.get('id', None) if not id: id = wxNewId() submenu, title = menu(title, items) return ('AppendMenu', id, title, submenu, description) | 8bfcb893526ff90ecb1436418450327bd4196777 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/8bfcb893526ff90ecb1436418450327bd4196777/wxclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
27539,
12,
2649,
16,
380,
3319,
16,
2826,
9987,
4672,
2477,
273,
5323,
18,
588,
2668,
3384,
2187,
28707,
612,
273,
5323,
18,
588,
2668,
350,
2187,
599,
13,
309,
486,
612,
30,
612,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
27539,
12,
2649,
16,
380,
3319,
16,
2826,
9987,
4672,
2477,
273,
5323,
18,
588,
2668,
3384,
2187,
28707,
612,
273,
5323,
18,
588,
2668,
350,
2187,
599,
13,
309,
486,
612,
30,
612,
273,... |
if self.counter == self.limit: self.relevent.reset() if self.counter == 1: self.acqevent.send() | if self._acquire_waiters and self.counter > 0: api.get_hub().schedule_call(0, self._do_acquire) return True | def release(self): # This logic handles the self.limit is None case because None != any integer. while self.counter == self.limit: self.relevent.wait() self.counter += 1 if self.counter == self.limit: self.relevent.reset() if self.counter == 1: # If self.counter was 0 before we incremented it, then wake up # anybody who was waiting self.acqevent.send() | 961419045b357378af67f700b41d9403d322b26b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10078/961419045b357378af67f700b41d9403d322b26b/coros.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3992,
12,
2890,
4672,
468,
1220,
4058,
7372,
326,
365,
18,
3595,
353,
599,
648,
2724,
599,
480,
1281,
3571,
18,
1323,
365,
18,
7476,
422,
365,
18,
3595,
30,
365,
18,
16599,
616,
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,
3992,
12,
2890,
4672,
468,
1220,
4058,
7372,
326,
365,
18,
3595,
353,
599,
648,
2724,
599,
480,
1281,
3571,
18,
1323,
365,
18,
7476,
422,
365,
18,
3595,
30,
365,
18,
16599,
616,
18,
... |
elif (args[0] == "commit") or (args[0] == "ci") | elif (args[0] == "commit") or (args[0] == "ci"): | def sourceCommand(cfg, args, argSet, profile=False, callback = None): if not callback: callback = CheckinCallback() if not args: return usage() elif (args[0] == "add"): if len(args) < 2: return usage() checkin.addFiles(args[1:]) elif (args[0] == "checkout") or (args[0] == "co"): if argSet.has_key("dir"): dir = argSet['dir'] del argSet['dir'] else: dir = None if argSet or (len(args) != 2): return usage() repos = NetworkRepositoryClient(cfg.repositoryMap) args = [repos, cfg, dir, args[1], callback] checkin.checkout(*args) elif (args[0] == "branch" or args[0] == "shadow"): extraArgs = { 'makeShadow' : (args[0] == "shadow") } extraArgs['sourceTroves'] = argSet.has_key('sources') if extraArgs['sourceTroves']: del argSet['sources'] if argSet: return usage() if len(args) != 3: return usage() repos = NetworkRepositoryClient(cfg.repositoryMap) args = [repos, cfg, ] + args[1:] branch.branch(*args, **extraArgs) elif (args[0] == "commit") or (args[0] == "ci") # mimic cvs's shortcuts level = log.getVerbosity() log.setVerbosity(log.INFO) message = argSet.get("message", None) sourceCheck = True if message is not None: del argSet['message'] if argSet or len(args) != 1: return usage() repos = NetworkRepositoryClient(cfg.repositoryMap) checkin.commit(repos, cfg, message, callback=callback) log.setVerbosity(level) elif (args[0] == "config"): if argSet: return usage() if (len(args) >= 2): return usage() else: cfg.display() elif (args[0] == "clone"): if argSet: return usage() if len(args) != 3: return usage() import clone clone.CloneTrove(cfg, args[1], args[2]) elif (args[0] == "diff"): if argSet or not args or len(args) > 2: return usage() repos = NetworkRepositoryClient(cfg.repositoryMap) args[0] = repos checkin.diff(*args) elif (args[0] == "annotate"): if argSet or len(args) != 2: return usage() repos = NetworkRepositoryClient(cfg.repositoryMap) args[0] = repos checkin.annotate(*args) elif (args[0] == "log"): if argSet or len(args) > 2: return usage() repos = NetworkRepositoryClient(cfg.repositoryMap) args[0] = repos checkin.showLog(*args) elif (args[0] == "rdiff"): if argSet or len(args) != 4: return usage() repos = NetworkRepositoryClient(cfg.repositoryMap) checkin.rdiff(repos, cfg.buildLabel, *args[1:]) elif (args[0] == "remove"): if len(args) < 2: return usage() for f in args[1:]: checkin.removeFile(f) elif (args[0] == "rename"): if len(args) != 3: return usage() checkin.renameFile(args[1], args[2]) elif (args[0] == "sign"): if len(args) <2: return usage() if argSet.has_key('quiet'): cfg.quiet = True del argSet['quiet'] signtrove.signTroves(cfg, args[1:]) elif (args[0] == "newpkg"): if argSet.has_key("dir"): dir = argSet['dir'] del argSet['dir'] else: dir = None if len(args) != 2 or argSet: return usage() try: repos = NetworkRepositoryClient(cfg.repositoryMap) except repository.repository.OpenError: repos = None checkin.newTrove(repos, cfg, args[1], dir = dir) elif (args[0] == "merge"): if argSet or not args or len(args) > 1: return usage() repos = NetworkRepositoryClient(cfg.repositoryMap) checkin.merge(repos) elif (args[0] == "update") or (args[0] == "up"): if argSet or not args or len(args) > 2: return usage() repos = NetworkRepositoryClient(cfg.repositoryMap) args[0] = repos kwargs = {'callback': callback} checkin.updateSrc(*args, **kwargs) elif (args[0] == "cook"): level = log.getVerbosity() log.setVerbosity(log.DEBUG) macros = {} prep = 0 resume = None buildBranch = None if argSet.has_key('flavor'): buildFlavor = deps.deps.parseFlavor(argSet['flavor']) cfg.buildFlavor = deps.deps.overrideFlavor(cfg.buildFlavor, buildFlavor) del argSet['flavor'] if argSet.has_key('macro'): for macro in argSet['macro']: cfg.configLine('macros.' + macro) del argSet['macro'] if argSet.has_key('prep'): del argSet['prep'] prep = 1 if argSet.has_key('no-deps'): del argSet['no-deps'] ignoreDeps = True else: ignoreDeps = False if argSet.has_key('quiet'): cfg.quiet = True del argSet['quiet'] if argSet.has_key('no-clean'): del argSet['no-clean'] cfg.noClean = True else: cfg.noClean = False if argSet.has_key('resume'): resume = argSet['resume'] del argSet['resume'] if argSet.has_key('unknown-flags'): unknownFlags = argSet['unknown-flags'] del argSet['unknown-flags'] else: unknownFlags = False if argSet.has_key('debug-exceptions'): del argSet['debug-exceptions'] cfg.debugRecipeExceptions = True if argSet.has_key('macros'): argSet['macros'] f = open(argSet['macros']) # XXX sick hack macroSrc = "macros =" + f.read() exec macroSrc del f del argSet['macros'] if argSet: return usage() cook.cookCommand(cfg, args[1:], prep, macros, resume=resume, allowUnknownFlags=unknownFlags, ignoreDeps=ignoreDeps, profile=profile) log.setVerbosity(level) elif (args[0] == "describe"): level = log.getVerbosity() log.setVerbosity(log.INFO) xmlSource = args[1] state = checkin.SourceStateFromFile("CONARY") troveName = state.getName() troveBranch = state.getVersion().branch() log.info("describing trove %s with %s", troveName, xmlSource) xmlFile = open(xmlSource) xml = xmlFile.read() repos = NetworkRepositoryClient(cfg.repositoryMap) repos.updateMetadataFromXML(troveName, troveBranch, xml) log.setVerbosity(level) elif (args[0] == "usage"): return usage(rc = 0) else: return usage() return 0 | 687864c12e0d2cd69a55fb7150b737800a1e85c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/687864c12e0d2cd69a55fb7150b737800a1e85c0/cvc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1084,
2189,
12,
7066,
16,
833,
16,
1501,
694,
16,
3042,
33,
8381,
16,
1348,
273,
599,
4672,
309,
486,
1348,
30,
1348,
273,
2073,
267,
2428,
1435,
225,
309,
486,
833,
30,
327,
4084,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1084,
2189,
12,
7066,
16,
833,
16,
1501,
694,
16,
3042,
33,
8381,
16,
1348,
273,
599,
4672,
309,
486,
1348,
30,
1348,
273,
2073,
267,
2428,
1435,
225,
309,
486,
833,
30,
327,
4084,
1... |
if ascii==32 and ((config.conf["keyboard"]["speakTypedCharacters"] and not config.conf["keyboard"]["speakTypedWords"]) or (config.conf["keyboard"]["speakTypedCharacters"] and config.conf["keyboard"]["speakTypedWords"] and (len(word)==0))): speech.speakSymbol(chr(ascii)) | def speakKey(keyPress,ascii): global word if ((keyPress[0] is None) or (keyPress[0]==frozenset(['Shift'])) or (keyPress[0]==frozenset(['Control','Alt']))) and (ascii in range(33,255)): if isTypingProtected(): char="*" else: char=chr(ascii) if config.conf["keyboard"]["speakTypedCharacters"]: speech.speakSymbol(char) if config.conf["keyboard"]["speakTypedWords"] and (((keyPress[1]>=ord('a')) and (ascii<=ord('z'))) or ((ascii>=ord('A')) and (ascii<=ord('Z')))): word+=char elif config.conf["keyboard"]["speakTypedWords"] and (len(word)>=1): speech.speakText(word) word="" else: if config.conf["keyboard"]["speakCommandKeys"]: keyList=[] if (keyPress[0] is not None) and (len(keyPress[0])>0): keyList+=keyPress[0] if ascii in range(33,128): keyList.append(chr(ascii)) else: keyList.append(keyPress[1]) label="+".join(keyList) speech.speakMessage(keyList) if config.conf["keyboard"]["speakTypedWords"] and (len(word)>=1): speech.speakMessage(word) word="" if ascii==32 and ((config.conf["keyboard"]["speakTypedCharacters"] and not config.conf["keyboard"]["speakTypedWords"]) or (config.conf["keyboard"]["speakTypedCharacters"] and config.conf["keyboard"]["speakTypedWords"] and (len(word)==0))): speech.speakSymbol(chr(ascii)) | de8c7aac7e80eacb2f20dee295bd37b202465b6c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/de8c7aac7e80eacb2f20dee295bd37b202465b6c/keyboardHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
10244,
653,
12,
856,
11840,
16,
9184,
4672,
2552,
2076,
309,
14015,
856,
11840,
63,
20,
65,
353,
599,
13,
578,
261,
856,
11840,
63,
20,
65,
631,
28138,
542,
12,
3292,
10544,
3546,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
272,
10244,
653,
12,
856,
11840,
16,
9184,
4672,
2552,
2076,
309,
14015,
856,
11840,
63,
20,
65,
353,
599,
13,
578,
261,
856,
11840,
63,
20,
65,
631,
28138,
542,
12,
3292,
10544,
3546,... | |
t_start = startOfInterval(t, t_length) print timestamp_to_string(t), t_length, timestamp_to_string(t_start) assert(time.localtime(t_start) == (2009, 11, 1, 0, 0, 0, 6, 305, 1)) | t_test = time.mktime((2009, 11, 1, 1, 22, 05, 0, 0, 0)) t_ans = time.mktime((2009, 11, 1, 0, 00, 00, 0, 0, 0)) t_start = startOfInterval(t_test, t_length) print timestamp_to_string(t_test), t_length, timestamp_to_string(t_start) assert(t_start == t_ans) t_length = 5 * 60 t_test = time.mktime((2009, 11, 1, 1, 22, 05, 0, 0, 1)) t_ans = time.mktime((2009, 11, 1, 1, 20, 00, 0, 0, 1)) t_start = startOfInterval(t_test, t_length) print timestamp_to_string(t_test), t_length, timestamp_to_string(t_start) assert(t_start == t_ans) t_length = 5 * 60 t_test = time.mktime((2009, 11, 1, 1, 22, 05, 0, 0, 0)) t_ans = time.mktime((2009, 11, 1, 1, 20, 00, 0, 0, 0)) t_start = startOfInterval(t_test, t_length) print timestamp_to_string(t_test), t_length, timestamp_to_string(t_start) assert(t_start == t_ans) t_length = 60 * 60 t_test = time.mktime((2009, 11, 1, 1, 22, 05, 0, 0, 0)) t_ans = time.mktime((2009, 11, 1, 1, 00, 00, 0, 0, 0)) t_start = startOfInterval(t_test, t_length) print timestamp_to_string(t_test), t_length, timestamp_to_string(t_start) assert(t_start == t_ans) | def _get_object(module_class, *args, **kwargs): """Given a path to a class, instantiates an instance of the class with the given args and returns it.""" # Split the path into its parts parts = module_class.split('.') # Strip off the classname: module = '.'.join(parts[:-1]) # Import the top level module mod = __import__(module) # Then recursively work down from the top level module to the class name: for part in parts[1:]: mod = getattr(mod, part) # Instance 'mod' will now be a class. Instantiate an instance and return it: obj = mod(*args, **kwargs) return obj | 19b04500cd89d5b1697673f832aae81e1515f674 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1013/19b04500cd89d5b1697673f832aae81e1515f674/weeutil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1612,
12,
2978,
67,
1106,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
6083,
279,
589,
358,
279,
667,
16,
5934,
16020,
392,
791,
434,
326,
667,
598,
326,
864,
833,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1612,
12,
2978,
67,
1106,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
6083,
279,
589,
358,
279,
667,
16,
5934,
16020,
392,
791,
434,
326,
667,
598,
326,
864,
833,
471,
1... |
self.do_zoom(self.scale.get_value() - 1, True) | self.do_zoom(self.scale.get_value() - 1, True, self.myPointer) | def menu_item_response(self, w, strName): if strName.startswith("Zoom Out"): self.do_zoom(self.scale.get_value() + 1, True) elif strName.startswith("Zoom In"): self.do_zoom(self.scale.get_value() - 1, True) elif strName.startswith("Center map"): self.do_zoom(self.scale.get_value(), True) elif strName.startswith("Reset"): self.do_zoom(MAP_MAX_ZOOM_LEVEL) elif strName.startswith("Batch Download"): self.download_clicked(w) else: self.menu_tools(strName) | e69ef850fb40babae3c4edc4e559bf43d18bb9a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5373/e69ef850fb40babae3c4edc4e559bf43d18bb9a8/maps.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3824,
67,
1726,
67,
2740,
12,
2890,
16,
341,
16,
27840,
4672,
309,
27840,
18,
17514,
1918,
2932,
11497,
2976,
6,
4672,
365,
18,
2896,
67,
14932,
12,
2890,
18,
5864,
18,
588,
67,
1132,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3824,
67,
1726,
67,
2740,
12,
2890,
16,
341,
16,
27840,
4672,
309,
27840,
18,
17514,
1918,
2932,
11497,
2976,
6,
4672,
365,
18,
2896,
67,
14932,
12,
2890,
18,
5864,
18,
588,
67,
1132,
... |
return space.call_method(w_u, "join", w_list) | return space.call_method(w_u, "join", space.newlist(list_w)) | def str_join__String_ANY(space, w_self, w_list): list_w = space.listview(w_list) str_w = space.str_w if list_w: self = w_self._value listlen = 0 reslen = 0 l = [None] * len(list_w) for i in range(len(list_w)): w_s = list_w[i] if not space.is_true(space.isinstance(w_s, space.w_str)): if space.is_true(space.isinstance(w_s, space.w_unicode)): w_u = space.call_function(space.w_unicode, w_self) return space.call_method(w_u, "join", w_list) raise OperationError( space.w_TypeError, space.wrap("sequence item %d: expected string, %s " "found" % (i, space.type(w_s).getname(space, '?')))) l[i] = space.str_w(w_s) return space.wrap(self.join(l)) else: return W_StringObject.EMPTY | 8a2fa2c37a817055dcb0fa0f46d62429803f0bfe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/8a2fa2c37a817055dcb0fa0f46d62429803f0bfe/stringobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
609,
67,
5701,
972,
780,
67,
15409,
12,
2981,
16,
341,
67,
2890,
16,
341,
67,
1098,
4672,
666,
67,
91,
273,
3476,
18,
1098,
1945,
12,
91,
67,
1098,
13,
609,
67,
91,
273,
3476,
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,
609,
67,
5701,
972,
780,
67,
15409,
12,
2981,
16,
341,
67,
2890,
16,
341,
67,
1098,
4672,
666,
67,
91,
273,
3476,
18,
1098,
1945,
12,
91,
67,
1098,
13,
609,
67,
91,
273,
3476,
18,
... |
print '-'+v['partner_bvr']+'-' | def _create_dta(self,cr,uid,data,context): # cree des gt836 v={} v['uid'] = str(uid) v['creation_date']= time.strftime('%y%m%d') log='' dta='' pool = pooler.get_pool(cr.dbname) bank= pool.get('res.partner.bank').browse(cr,uid,[data['form']['bank']])[0] if not bank: return {'note':'No bank account for the company.'} v['comp_bank_name']= bank.name or False v['comp_bank_clearing'] = bank.bank_clearing or False # clearing v['comp_bank_code'] = bank.bank_code or False # swift or BIC if not v['comp_bank_clearing']: return {'note':'You must provide a Clearing Number for your bank account.'} user = pool.get('res.users').browse(cr,uid,[uid])[0] company= user.company_id co_addr= company.partner_id.address[0] v['comp_country'] = co_addr.country_id and co_addr.country_id.name or '' v['comp_street'] = co_addr.street or '' v['comp_zip'] = co_addr.zip v['comp_city'] = co_addr.city v['comp_name'] = co_addr.name v['comp_dta'] = ''#FIXME v['comp_bank_number'] = bank.number or '' if not v['comp_bank_number'] : return {'note':'No account number for the company bank account.'} v['comp_bank_iban'] = bank.iban or '' if not v['comp_bank_iban'] : return {'note':'No iban number for the company bank account.'} inv_obj = pool.get('account.invoice') dta_line_obj = pool.get('account.dta.line') seq= 1 amount_tot = 0 th_amount_tot= 0 dta_id=data['form']['dta_id'] if not dta_id : return {'note':'No dta line'} # write the bank account for the dta object pool.get('account.dta').write(cr,uid,[dta_id],{'bank':data['form']['bank']}) dta_line_ids= [] for line in data['form']['dta_line_ids']: if line[1]!=0 and line[2] and line[2]['partner_id']: dta_line_ids.append(line[1]) th_amount_tot += line[2]['amount_to_pay'] dta_line_obj.write(cr, uid, [line[1]] , line[2] ) # creation of a bank statement : TODO ajouter le partner bk_st_id = pool.get('account.bank.statement').create(cr,uid,{ 'journal_id':data['form']['journal'], 'balance_start':0, 'balance_end_real':0, 'state':'draft', }) for dtal in dta_line_obj.browse(cr,uid,dta_line_ids): i = dtal.name #dta_line.name is the invoice id invoice_number = i.number or '??' if not i.partner_bank_id: log= log +'\nNo partner bank defined. (invoice '+ invoice_number +')' continue v['sequence'] = str(seq).rjust(5,'0') v['amount_to_pay']= str(dtal.amount_to_pay).replace('.',',') v['invoice_number'] = invoice_number or '' v['invoice_currency'] = i.currency_id.code or '' if not v['invoice_currency'] : log= log +'\nPartner bank account not well defined. (invoice '+ invoice_number +')' continue v['partner_bank_name'] = i.partner_bank_id.bank_name or False v['partner_bank_clearing'] = i.partner_bank_id.bank_clearing or False if not v['partner_bank_name'] : log= log +'\nPartner bank account not well defined. (invoice '+ invoice_number +')' continue v['partner_bank_iban']= i.partner_bank_id.iban or False v['partner_bank_number']= i.partner_bank_id.number or False v['partner_bvr']= i.partner_bank_id.bvr_number or '' if v['partner_bvr']: print '-'+v['partner_bvr']+'-' v['partner_bvr']= v['partner_bvr'].replace('-','') if len(v['partner_bvr']) < 9: v['partner_bvr']= v['partner_bvr'][:2]+ '0'*(9-len(v['partner_bvr'])) +v['partner_bvr'][2:] print v['partner_bvr'] v['partner_bank_city']= i.partner_bank_id.city or False v['partner_bank_street']= i.partner_bank_id.street or '' v['partner_bank_zip']= i.partner_bank_id.zip or '' v['partner_bank_country']= i.partner_bank_id.country_id and i.partner_bank_id.country_id.name or '' v['partner_bank_code']= i.partner_bank_id.bank_code or False v['invoice_reference']= i.reference v['partner_name'] = i.partner_id and i.partner_id.name or '' if i.partner_id and i.partner_id.address and i.partner_id.address[0]: v['partner_street'] = i.partner_id.address[0].street v['partner_city']= i.partner_id.address[0].city v['partner_zip']= i.partner_id.address[0].zip v['partner_country']= i.partner_id.address[0].country_id and i.partner_id.address[0].country_id.name or '' else: v['partner_street'] ='' v['partner_city']= '' v['partner_zip']= '' v['partner_country']= '' log= log +'\nNo address for the invoice partner. (invoice '+ invoice_number+')' date_value = dtal.cashdisc_date or dtal.due_date if date_value : date_value = mx.DateTime.strptime( date_value,'%Y-%m-%d') or mx.DateTime.now() v['date_value'] = date_value.strftime("%y%m%d") else: v['date_value'] = "000000" # si compte iban -> iban (836) # si payment structure -> bvr (826) # si non -> (827) elec_pay = i.partner_bank_id.type_id.elec_pay if not elec_pay : log= log +'\nBank type does not support DTA. (invoice '+ invoice_number +')' continue if elec_pay == 'iban': record_type = record_gt836 if not v['partner_bank_iban']: log= log +'\nNo iban number for the partner bank. (invoice '+ invoice_number +')' continue if v['partner_bank_code'] : v['option_id_bank']= 'A' v['partner_bank_ident']= v['partner_bank_code'] elif v['partner_bank_city']: v['option_id_bank']= 'D' v['partner_bank_ident']= v['partner_bank_name'] +' '+v['partner_bank_street']\ +' '+v['partner_bank_zip']+' '+v['partner_bank_city']\ +' '+v['partner_bank_country'] else: log= log +'\nYou must provide the bank city or the bank code. (invoice '+ invoice_number +')' continue elif elec_pay == 'bvrbank' or elec_pay == 'bvrpost': if not v['invoice_reference']: log= log +'\nYou must provide an invoice reference. (invoice '+ invoice_number +')' if not v['partner_bvr']: log= log +'\nYou must provide a BVR reference number in the partner bank. (invoice '+ invoice_number +')' continue record_type = record_gt826 v['partner_bvr'] = '/C/'+v['partner_bvr'] elif elec_pay == 'bvbank': if not v['partner_bank_number'] : if v['partner_bank_iban'] : v['partner_bank_number']= v['partner_bank_iban'] else: log= log +'\nYou must provide a bank number in the partner bank. (invoice '+ invoice_number +')' continue if not v['partner_bank_clearing']: log= log +'\nPartner bank must have a Clearing Number for a BV Bank operation. (invoice '+ invoice_number +')' continue v['partner_bank_number'] = '/C/'+v['partner_bank_number'] record_type = record_gt827 elif elec_pay == 'bvpost': if not v['partner_bank_number']: log= log +'\nYou must provide a post number in the partner bank. (invoice '+ invoice_number +')' continue v['partner_bank_clearing']= '' v['partner_bank_number'] = '/C/'+v['partner_bank_number'] record_type = record_gt827 else: log= log +'\nBank type not supported. (invoice '+ invoice_number +')' continue try: dta_line = record_type(v).generate() except Exception,e : log= log +'\nERROR:'+ str(e)+'(invoice '+ invoice_number+')' dta_line_obj.write(cr,uid,[dtal.id],{'state':'cancel'}) raise continue #logging log = log + "Invoice : %s, Amount paid : %d %s, Value date : %s, State : Paid."%\ (invoice_number,dtal.amount_to_pay,v['invoice_currency'],date_value and date_value.strftime("%Y-%m-%d") or 'Empty date') pool.get('account.bank.statement.line').create(cr,uid,{ 'name':i.number, 'date':date_value, 'amount':dtal.amount_to_pay, 'type':{'out_invoice':'customer','in_invoice':'supplier','out_refund':'customer','in_refund':'supplier'}[i.type], 'partner_id':i.partner_id.id, 'account_id':i.account_id.id, 'statement_id': bk_st_id, 'invoice_id': i.id, }) dta = dta + dta_line amount_tot += dtal.amount_to_pay inv_obj.write(cr,uid,[i.id],{'dta_state':'paid'}) dta_line_obj.write(cr,uid,[dtal.id],{'state':'done'}) seq += 1 # bank statement updated with the total amount : pool.get('account.bank.statement').write(cr,uid,[bk_st_id],{'balance_end_real': amount_tot}) # segment total v['amount_total'] = str(amount_tot).replace('.',',') try: if dta : dta = dta + record_gt890(v).generate() except Exception,e : log= log +'\n'+ str(e) + 'CORRUPTED FILE !\n' raise log = log + "\n--\nSummary :\nTotal amount paid : %.2f\nTotal amount expected : %.2f"%(amount_tot,th_amount_tot) pool.get('account.dta').write(cr,uid,[dta_id],{'note':log,'name':b64encode(dta or "")}) return {'note':log, 'dta': b64encode(dta)} | 6a7c815ad435701fa16c87253fc864e5ce882af6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/6a7c815ad435701fa16c87253fc864e5ce882af6/dta_wizard.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
67,
72,
2351,
12,
2890,
16,
3353,
16,
1911,
16,
892,
16,
2472,
4672,
225,
468,
276,
992,
2832,
9879,
28,
5718,
331,
12938,
331,
3292,
1911,
3546,
273,
609,
12,
1911,
13,
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,
2640,
67,
72,
2351,
12,
2890,
16,
3353,
16,
1911,
16,
892,
16,
2472,
4672,
225,
468,
276,
992,
2832,
9879,
28,
5718,
331,
12938,
331,
3292,
1911,
3546,
273,
609,
12,
1911,
13,
3... | |
(rate). Return the numpy.array result. | (rate). | def filter(self, cyclic = False): """ Convolve the binned counts with the window to smooth them, then divide each bin by its size to convert to a density (rate). Return the numpy.array result. """ filter_array(self.array, self.filterdata, cyclic = cyclic) self.to_density() | 28f60cf7d8a94f46a5db93d12c8a26d0d7958d60 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/28f60cf7d8a94f46a5db93d12c8a26d0d7958d60/rate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
12,
2890,
16,
30383,
273,
1083,
4672,
3536,
18263,
5390,
326,
4158,
11748,
6880,
598,
326,
2742,
358,
11957,
2182,
16,
1508,
12326,
1517,
4158,
635,
2097,
963,
358,
1765,
358,
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,
1034,
12,
2890,
16,
30383,
273,
1083,
4672,
3536,
18263,
5390,
326,
4158,
11748,
6880,
598,
326,
2742,
358,
11957,
2182,
16,
1508,
12326,
1517,
4158,
635,
2097,
963,
358,
1765,
358,
279,
... |
__dynamic__ = 1 | __dynamic__ = 1 | def mysetattr(self, name, value): if name == "spam": raise AttributeError return object.__setattr__(self, name, value) | 9479174c90f03a075db9a923423b21776350dabe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9479174c90f03a075db9a923423b21776350dabe/test_descr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
542,
1747,
12,
2890,
16,
508,
16,
460,
4672,
309,
508,
422,
315,
1752,
301,
6877,
1002,
6394,
327,
733,
16186,
542,
1747,
972,
12,
2890,
16,
508,
16,
460,
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,
3399,
542,
1747,
12,
2890,
16,
508,
16,
460,
4672,
309,
508,
422,
315,
1752,
301,
6877,
1002,
6394,
327,
733,
16186,
542,
1747,
972,
12,
2890,
16,
508,
16,
460,
13,
2,
-100,
-100,
-1... |
def __init__(self, baseurl, basedir): | def __init__(self, baseurl, tmpdir=None): | def __init__(self, baseurl, basedir): """ @param baseurl: base URL or tuple containing several base URLs @type baseurl: str or (str,) """ if isinstance(baseurl, unicode): baseurl = baseurl.encode('ascii') elif isinstance(baseurl, tuple): baseurl = tuple([bu.encode('ascii') for bu in baseurl if isinstance(bu, unicode)]) self.baseurl = baseurl self.basedir = basedir | 2e2e0c65e72dd4ba00812393df172f789e8b919b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12391/2e2e0c65e72dd4ba00812393df172f789e8b919b/netdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
25427,
16,
20213,
33,
7036,
4672,
3536,
632,
891,
25427,
30,
1026,
1976,
578,
3193,
4191,
11392,
1026,
10414,
632,
723,
25427,
30,
609,
578,
261,
701,
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,
1001,
2738,
972,
12,
2890,
16,
25427,
16,
20213,
33,
7036,
4672,
3536,
632,
891,
25427,
30,
1026,
1976,
578,
3193,
4191,
11392,
1026,
10414,
632,
723,
25427,
30,
609,
578,
261,
701,
16,
... |
print "\033[33m" | print("\033[33m", end='') | def yellow(self): print "\033[33m" | fc50e2444a71cd15a13d345a1f9359c0ceb01f43 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8290/fc50e2444a71cd15a13d345a1f9359c0ceb01f43/UnixConsoleHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20614,
12,
2890,
4672,
1172,
1548,
15265,
63,
3707,
81,
6,
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,
1652,
20614,
12,
2890,
4672,
1172,
1548,
15265,
63,
3707,
81,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
map('<home>', wdg.move(right=0, absolute=True)) map('<end>', wdg.move(right=-1, absolute=True)) | map('<home>', '<C-A>', wdg.move(right=0, absolute=True)) map('<end>', '<C-E>', wdg.move(right=-1, absolute=True)) | def ctrl_c(arg): try: item = arg.fm.loader.queue[0] except: arg.fm.notify("Type Q or :quit<Enter> to exit Ranger") else: arg.fm.notify("Aborting: " + item.get_description()) arg.fm.loader.remove(index=0) | c512259aec5a7abdbcec48a3c20cb2a0982c4d65 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5729/c512259aec5a7abdbcec48a3c20cb2a0982c4d65/keys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6414,
67,
71,
12,
3175,
4672,
775,
30,
761,
273,
1501,
18,
25089,
18,
6714,
18,
4000,
63,
20,
65,
1335,
30,
1501,
18,
25089,
18,
12336,
2932,
559,
2238,
578,
294,
27176,
32,
10237,
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,
6414,
67,
71,
12,
3175,
4672,
775,
30,
761,
273,
1501,
18,
25089,
18,
6714,
18,
4000,
63,
20,
65,
1335,
30,
1501,
18,
25089,
18,
12336,
2932,
559,
2238,
578,
294,
27176,
32,
10237,
3... |
return rvdeclared | return | def writeArgumentUnboxing(f, i, name, type, haveCcx, optional, rvdeclared): # f - file to write to # i - int or None - Indicates the source jsval. If i is an int, the source # jsval is argv[i]; otherwise it is *vp. But if Python i >= C++ argc, # which can only happen if optional is True, the argument is missing; # use JSVAL_NULL as the source jsval instead. # name - str - name of the native C++ variable to create. # type - xpidl.{Interface,Native,Builtin} - IDL type of argument # optional - bool - True if the parameter is optional. # rvdeclared - bool - False if no |nsresult rv| has been declared earlier. isSetter = (i is None) if isSetter: argPtr = "vp" argVal = "*vp" elif optional: argPtr = '! /* TODO - optional parameter of this type not supported */' argVal = "(%d < argc ? argv[%d] : JSVAL_NULL)" % (i, i) else: argVal = "argv[%d]" % i argPtr = "&" + argVal params = { 'name': name, 'argVal': argVal, 'argPtr': argPtr } typeName = getBuiltinOrNativeTypeName(type) if typeName is not None: template = argumentUnboxingTemplates.get(typeName) if template is not None: if optional and ("${argPtr}" in template): warn("Optional parameters of type %s are not supported." % type.name) f.write(substitute(template, params)) return rvdeclared # else fall through; the type isn't supported yet. elif isInterfaceType(type): if type.name == 'nsIVariant': # Totally custom. assert haveCcx template = ( " nsCOMPtr<nsIVariant> ${name}(already_AddRefed<nsIVariant>(" "XPCVariant::newVariant(ccx, ${argVal})));\n" " if (!${name})\n" " return JS_FALSE;\n") f.write(substitute(template, params)) return rvdeclared elif type.name == 'nsIAtom': # Should have special atomizing behavior. Fall through. pass else: if not rvdeclared: f.write(" nsresult rv;\n"); f.write(" nsCOMPtr<%s> %s;\n" % (type.name, name)) f.write(" rv = xpc_qsUnwrapArg<%s>(" "cx, %s, getter_AddRefs(%s));\n" % (type.name, argVal, name)) f.write(" if (NS_FAILED(rv)) {\n") if isSetter: f.write(" xpc_qsThrowBadSetterValue(" "cx, rv, JSVAL_TO_OBJECT(*tvr.addr()), id);\n") elif haveCcx: f.write(" xpc_qsThrowBadArgWithCcx(ccx, rv, %d);\n" % i) else: f.write(" xpc_qsThrowBadArg(cx, rv, vp, %d);\n" % i) f.write(" return JS_FALSE;\n" " }\n") return True warn("Unable to unbox argument of type %s" % type.name) if i is None: src = '*vp' else: src = 'argv[%d]' % i f.write(" !; // TODO - Unbox argument %s = %s\n" % (name, src)) return rvdeclared | 6f558ca9eddc5be4f0e7a99f5054cd7d74be2155 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/6f558ca9eddc5be4f0e7a99f5054cd7d74be2155/qsgen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
1379,
984,
2147,
310,
12,
74,
16,
277,
16,
508,
16,
618,
16,
1240,
39,
71,
92,
16,
3129,
16,
5633,
16571,
4672,
468,
284,
300,
585,
358,
1045,
358,
468,
277,
300,
509,
578,
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,
1045,
1379,
984,
2147,
310,
12,
74,
16,
277,
16,
508,
16,
618,
16,
1240,
39,
71,
92,
16,
3129,
16,
5633,
16571,
4672,
468,
284,
300,
585,
358,
1045,
358,
468,
277,
300,
509,
578,
5... |
command=self.Help,takefocus=FALSE) | command=self.Help,takefocus=FALSE, padx=6,pady=3) | def CreateWidgets(self): self.tabPages = TabPageSet(self, pageNames=['Fonts/Tabs','Highlighting','Keys','General']) self.tabPages.ChangePage()#activates default (first) page frameActionButtons = Frame(self) #action buttons self.buttonHelp = Button(frameActionButtons,text='Help', command=self.Help,takefocus=FALSE) self.buttonOk = Button(frameActionButtons,text='Ok', command=self.Ok,takefocus=FALSE) self.buttonApply = Button(frameActionButtons,text='Apply', command=self.Apply,takefocus=FALSE) self.buttonCancel = Button(frameActionButtons,text='Cancel', command=self.Cancel,takefocus=FALSE) self.CreatePageFontTab() self.CreatePageHighlight() self.CreatePageKeys() self.CreatePageGeneral() self.buttonHelp.pack(side=RIGHT,padx=5,pady=5) self.buttonOk.pack(side=LEFT,padx=5,pady=5) self.buttonApply.pack(side=LEFT,padx=5,pady=5) self.buttonCancel.pack(side=LEFT,padx=5,pady=5) frameActionButtons.pack(side=BOTTOM) self.tabPages.pack(side=TOP,expand=TRUE,fill=BOTH) | ed15565253c2cb817c68ed89e22c7a6c7707ab66 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/ed15565253c2cb817c68ed89e22c7a6c7707ab66/configDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
16166,
12,
2890,
4672,
365,
18,
7032,
5716,
273,
9483,
1964,
694,
12,
2890,
16,
1363,
1557,
33,
3292,
5711,
87,
19,
17348,
17023,
16205,
310,
17023,
2396,
17023,
12580,
19486,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
16166,
12,
2890,
4672,
365,
18,
7032,
5716,
273,
9483,
1964,
694,
12,
2890,
16,
1363,
1557,
33,
3292,
5711,
87,
19,
17348,
17023,
16205,
310,
17023,
2396,
17023,
12580,
19486,
365,
... |
"""normalize reduces its operand to its simplest form. | """normalize reduces an operand to its simplest form. | def normalize(self, a): """normalize reduces its operand to its simplest form. | 7668379fdb08b387cb5d4fdf6978fec3901fa44a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7668379fdb08b387cb5d4fdf6978fec3901fa44a/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3883,
12,
2890,
16,
279,
4672,
3536,
12237,
30568,
2097,
9886,
358,
2097,
9330,
395,
646,
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,
... | [
1,
1,
1,
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,
3883,
12,
2890,
16,
279,
4672,
3536,
12237,
30568,
2097,
9886,
358,
2097,
9330,
395,
646,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
"""Set current lighting parameters as specified | """ Set current lighting parameters as specified | def setLighting(self, lights, _guard_ = 6574833, gl_update = True): """Set current lighting parameters as specified (using the format as described in the getLighting method docstring). This does not save them in the preferences file; for that see the saveLighting method. If option gl_update is False, then don't do a gl_update, let caller do that if they want to. """ assert _guard_ == 6574833 # don't permit optional args to be specified positionally!! try: # check, standardize, and copy what the caller gave us for lights res = [] lights = list(lights) assert len(lights) == 3 for c,a,d,s,x,y,z,e in lights: # check values, give them standard types r = float(c[0]) g = float(c[1]) b = float(c[2]) a = float(a) d = float(d) s = float(s) x = float(x) y = float(y) z = float(z) assert 0.0 <= r <= 1.0 assert 0.0 <= g <= 1.0 assert 0.0 <= b <= 1.0 assert 0.0 <= a <= 1.0 assert 0.0 <= d <= 1.0 assert 0.0 <= s <= 1.0 assert e in [0,1,True,False] e = not not e res.append( ((r,g,b),a,d,s,x,y,z,e) ) lights = res except: print_compact_traceback("erroneous lights %r (ignored): " % lights) return self._lights = lights # set a flag so we'll set up the new lighting in the next paintGL call self.need_setup_lighting = True #e maybe arrange to later save the lighting in prefs... don't know if this belongs here # update GLPane unless caller wanted to do that itself if gl_update: self.gl_update() return | 9dc95351096c9deab5f64e3e704bde7a93f95b49 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/9dc95351096c9deab5f64e3e704bde7a93f95b49/GLPane.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
12128,
310,
12,
2890,
16,
26269,
16,
389,
24594,
67,
273,
15892,
5608,
28,
3707,
16,
5118,
67,
2725,
273,
1053,
4672,
3536,
1000,
783,
9052,
310,
1472,
487,
1269,
261,
9940,
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,
444,
12128,
310,
12,
2890,
16,
26269,
16,
389,
24594,
67,
273,
15892,
5608,
28,
3707,
16,
5118,
67,
2725,
273,
1053,
4672,
3536,
1000,
783,
9052,
310,
1472,
487,
1269,
261,
9940,
326,
... |
self.terminate() | self._obj.terminate() | def terminate(self): if self.state in ["NULL", "TERMINATED"]: return with self.linked_notifications(['SCSessionDidFail', 'SCSessionDidEnd']) as q: if self.state != 'TERMINATING': self.terminate() while True: notification = q.wait() if notification.name == 'SCSessionDidFail': raise SessionError(notification.data.reason) elif notification.name == 'SCSessionDidEnd': return notification | 0b148e0dd4835ff2aa72a6826ac4a63f2f39097d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/0b148e0dd4835ff2aa72a6826ac4a63f2f39097d/session2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10850,
12,
2890,
4672,
309,
365,
18,
2019,
316,
8247,
8560,
3113,
315,
29516,
6344,
11929,
30,
327,
598,
365,
18,
17738,
67,
15286,
12,
3292,
2312,
2157,
18250,
3754,
2187,
296,
2312,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10850,
12,
2890,
4672,
309,
365,
18,
2019,
316,
8247,
8560,
3113,
315,
29516,
6344,
11929,
30,
327,
598,
365,
18,
17738,
67,
15286,
12,
3292,
2312,
2157,
18250,
3754,
2187,
296,
2312,
21... |
new.dtype.char = new.data.dtype.char | new.dtype = new.data.dtype | def __rmul__(self, other): # other * self if isscalar(other) or (isdense(other) and rank(other)==0): new = self.copy() new.data = other * new.data new.dtype.char = new.data.dtype.char new.ftype = _transtabl[new.dtype.char] return new else: other = asarray(other) return self.transpose().dot(other.transpose()).transpose() | 755141cd47edbf647cfcd8d09fd47ede3320459c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/755141cd47edbf647cfcd8d09fd47ede3320459c/sparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
8864,
332,
972,
12,
2890,
16,
1308,
4672,
225,
468,
1308,
380,
365,
309,
3385,
3473,
12,
3011,
13,
578,
261,
291,
25942,
12,
3011,
13,
471,
6171,
12,
3011,
13,
631,
20,
4672,
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,
1001,
8864,
332,
972,
12,
2890,
16,
1308,
4672,
225,
468,
1308,
380,
365,
309,
3385,
3473,
12,
3011,
13,
578,
261,
291,
25942,
12,
3011,
13,
471,
6171,
12,
3011,
13,
631,
20,
4672,
3... |
translated_strings = CollectTranslatedStrings() | branding = '' if (argv > 2): branding = argv[2] translated_strings = CollectTranslatedStrings(branding) | def main(argv): translated_strings = CollectTranslatedStrings() kFilebase = os.path.join(argv[1], 'installer_util_strings') WriteRCFile(translated_strings, kFilebase) WriteHeaderFile(translated_strings, kFilebase) | d55a76d023d7e2813170f7d04b554611861749ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/d55a76d023d7e2813170f7d04b554611861749ab/create_string_rc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
4672,
15272,
310,
273,
875,
309,
261,
19485,
405,
576,
4672,
15272,
310,
273,
5261,
63,
22,
65,
9955,
67,
10219,
273,
9302,
20421,
7957,
12,
20523,
310,
13,
417,
812,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15272,
310,
273,
875,
309,
261,
19485,
405,
576,
4672,
15272,
310,
273,
5261,
63,
22,
65,
9955,
67,
10219,
273,
9302,
20421,
7957,
12,
20523,
310,
13,
417,
812,
... |
triagem_form_list = [g.formulario for g in gf] | triagem_form_list = [Formulario.objects.get(pk=g['formulario']) for g in gf.values('formulario').distinct()] | def homepage_view(request): import_str = "from forms.models import tipoFormulario, Formulario, Grupo, Grupo_Formulario, UserProfile" exec import_str if request.user.is_authenticated(): us_favorite = None groups = Grupo.objects.filter(membros=request.user) try: us_favorite = request.user.get_profile().unidadesaude_favorita if not us_favorite: #User did not belong to a group # Check whether now he belongs to one and set a favorite US groups = Grupo.objects.filter(membros=request.user) if groups.count(): us_favorite= groups[0].unidadesaude profile = request.user.get_profile() profile.unidadesaude_favorita = us_favorite profile.save() except UserProfile.DoesNotExist: #Profile was not created yet if groups.count(): us_favorite= groups[0].unidadesaude if us_favorite: profile = UserProfile(unidadesaude_favorita= us_favorite, user=request.user) else: profile = UserProfile(user=request.user) profile.save() ft = tipoFormulario.objects.get(nome='Triagem') temp = Formulario.objects.filter(tipo=ft) # Remove forms that the user does not have permission if groups.count(): gf = Grupo_Formulario.objects.filter(grupo__in=groups).filter(formulario__in = temp).filter(permissao='T') triagem_form_list = [g.formulario for g in gf] else: #User does not belong to any group, so do not access any form triagem_form_list = Formulario.objects.none() del temp url = settings.SITE_ROOT return render_to_response('homepage_template.html', locals(), RequestContext(request, {})) | f71c1b5caf604d4552dfcaeda6db26ccd48e3148 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11601/f71c1b5caf604d4552dfcaeda6db26ccd48e3148/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30815,
67,
1945,
12,
2293,
4672,
1930,
67,
701,
273,
315,
2080,
10138,
18,
7665,
1930,
25196,
1204,
2490,
1594,
16,
2748,
2490,
1594,
16,
611,
86,
416,
83,
16,
611,
86,
416,
83,
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,
30815,
67,
1945,
12,
2293,
4672,
1930,
67,
701,
273,
315,
2080,
10138,
18,
7665,
1930,
25196,
1204,
2490,
1594,
16,
2748,
2490,
1594,
16,
611,
86,
416,
83,
16,
611,
86,
416,
83,
67,
... |
EXAMPLES: | EXAMPLES:: | def __getinitargs__(self): r""" A simple __getinitargs__ method, used for testing explain_pickle. | 03555b4381371de7688c2f08f833898ba9658b7b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/03555b4381371de7688c2f08f833898ba9658b7b/explain_pickle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
2738,
1968,
972,
12,
2890,
4672,
436,
8395,
432,
4143,
1001,
588,
2738,
1968,
972,
707,
16,
1399,
364,
7769,
19765,
67,
20847,
18,
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,
1001,
588,
2738,
1968,
972,
12,
2890,
4672,
436,
8395,
432,
4143,
1001,
588,
2738,
1968,
972,
707,
16,
1399,
364,
7769,
19765,
67,
20847,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
def _deleteConsecutiveDuplicatePoints(self, points): size = len(points) dups = [] for i in xrange(size): idx = i + 1 if idx < size and points[i] == points[idx]: dups.append(i) dups.reverse() [points.pop(i) for i in dups] return dups def _deleteItemsRelatingToDuplicatePoints(self, items, dups): [items.pop(i) for i in dups] | def _deleteConsecutiveDuplicatePoints(self, parts): for part in parts: points = part.get('points') pSize = len(points) measures = part.get('measures') dups = [] for i in xrange(pSize): idx = i + 1 if idx < pSize and points[i] == points[idx]: dups.append(i) dups.reverse() badPoints = [points.pop(i) for i in dups] if measures: badMeasures = [measures.pop(i) for i in dups] | def _deleteConsecutiveDuplicatePoints(self, points): size = len(points) dups = [] | 21d08cb05ff682765ee80c7919f1985ba6ea48ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1821/21d08cb05ff682765ee80c7919f1985ba6ea48ed/shapefile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3733,
442,
15655,
11826,
5636,
12,
2890,
16,
3143,
4672,
963,
273,
562,
12,
4139,
13,
9417,
87,
273,
5378,
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,
389,
3733,
442,
15655,
11826,
5636,
12,
2890,
16,
3143,
4672,
963,
273,
562,
12,
4139,
13,
9417,
87,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
def pattern_e_changed(self, e): self.pattern = e.get_text() | def pattern_changed(self, entry): self.pattern = entry.get_text() | def pattern_e_changed(self, e): self.pattern = e.get_text() config.set('plugins', self.c_pattern, self.pattern) | 24a5de3faaf31e123f1b96a3a84045348d8831fd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4764/24a5de3faaf31e123f1b96a3a84045348d8831fd/gajim_status.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1936,
67,
6703,
12,
2890,
16,
1241,
4672,
365,
18,
4951,
273,
1241,
18,
588,
67,
955,
1435,
642,
18,
542,
2668,
8057,
2187,
365,
18,
71,
67,
4951,
16,
365,
18,
4951,
13,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1936,
67,
6703,
12,
2890,
16,
1241,
4672,
365,
18,
4951,
273,
1241,
18,
588,
67,
955,
1435,
642,
18,
542,
2668,
8057,
2187,
365,
18,
71,
67,
4951,
16,
365,
18,
4951,
13,
2,
-100,
-... |
Returns a new Column with the given dtypechar with the number | Returns a new Column with the given typecode with the number | def new_column(self, dtypechar=None, **kwargs): """ Returns a new Column with the given dtypechar with the number of rows that this Table requires, i.e. a Column with a one-dimensional array of the length table.rows, with the `dtypechar` and only zeros. If no dtypechar is given, then the dtypechar of the first existing column is used, or if there is no column yet, 'd'. Any keyword argument is passed on to the Column constructor. """ if dtypechar is None: if self.dtypechars is not None: dtypechar = self.dtypechars[0] else: dtypechar = 'd' | d323a0e51c5bfbfe6a5d20c4a492829533562316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2510/d323a0e51c5bfbfe6a5d20c4a492829533562316/table.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
67,
2827,
12,
2890,
16,
3182,
3001,
33,
7036,
16,
2826,
4333,
4672,
3536,
2860,
279,
394,
4753,
598,
326,
864,
618,
710,
598,
326,
1300,
434,
2595,
716,
333,
3555,
4991,
16,
277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
394,
67,
2827,
12,
2890,
16,
3182,
3001,
33,
7036,
16,
2826,
4333,
4672,
3536,
2860,
279,
394,
4753,
598,
326,
864,
618,
710,
598,
326,
1300,
434,
2595,
716,
333,
3555,
4991,
16,
277,
... |
class NonMultipartComposer(Composer): '''Non Multipart messages composer''' messageClass = email.MIMEText.MIMEText | def compose(self, body, Subject, **kwargs): '''Takes message body and headers as named params, replace "-" with "_" in headers names. Returns email.Message.Message object''' if self.charset: # subject is an internationalized header, should be quoted from email.Header import Header Subject = Header(Subject, self.charset) message = self.messageClass(body, _charset=self.charset) else: message = self.messageClass(body) | b1c9b7f37338915f1e0b475520c1f108e559d644 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1871/b1c9b7f37338915f1e0b475520c1f108e559d644/qMail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11458,
12,
2890,
16,
1417,
16,
9912,
16,
2826,
4333,
4672,
9163,
11524,
883,
1417,
471,
1607,
487,
4141,
859,
16,
1453,
7514,
598,
8802,
316,
1607,
1257,
18,
2860,
2699,
18,
1079,
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,
11458,
12,
2890,
16,
1417,
16,
9912,
16,
2826,
4333,
4672,
9163,
11524,
883,
1417,
471,
1607,
487,
4141,
859,
16,
1453,
7514,
598,
8802,
316,
1607,
1257,
18,
2860,
2699,
18,
1079,
18,
... | |
print "DTV: bad HTML in %s" % self.baseurl | print "DTV: bad HTML in description for %s" % self.baseurl | def endElementNS(self, name, qname): uri = name[0] tag = name[1] if tag.lower() == 'description': lg = HTMLLinkGrabber() try: html = xhtmlify(unescape(self.descHTML),addTopTags=True) if not self.charset is None: html = fixHTMLHeader(html,self.charset) self.links[:0] = lg.getLinks(html,self.baseurl) except HTMLParseError: # Don't bother with bad HTML print "DTV: bad HTML in %s" % self.baseurl self.inDescription = False elif tag.lower() == 'link': self.links.append((self.theLink,None,None)) self.inLink = False elif tag.lower() == 'item': self.inItem == False elif tag.lower() == 'title' and not self.inItem: self.inTitle = False | 73b1da8a282b6068184307954a409488fd019cf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/73b1da8a282b6068184307954a409488fd019cf4/feed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14840,
3156,
12,
2890,
16,
508,
16,
12621,
4672,
2003,
273,
508,
63,
20,
65,
1047,
273,
508,
63,
21,
65,
309,
1047,
18,
8167,
1435,
422,
296,
3384,
4278,
15266,
273,
3982,
2098,
14571,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14840,
3156,
12,
2890,
16,
508,
16,
12621,
4672,
2003,
273,
508,
63,
20,
65,
1047,
273,
508,
63,
21,
65,
309,
1047,
18,
8167,
1435,
422,
296,
3384,
4278,
15266,
273,
3982,
2098,
14571,... |
voxels = { } for atm in atoms.values(): x, y, z = map(float, atm.posn()) idx = (int(x / maxLen), int(y / maxLen), int(z / maxLen)) try: voxels[idx].append(atm) except KeyError: voxels[idx] = [ atm ] for atm in atoms.values(): x, y, z = map(float, atm.posn()) x1 = int(x / maxLen) y1 = int(y / maxLen) z1 = int(z / maxLen) xmin, xmax = x - maxLen, x + maxLen ymin, ymax = y - maxLen, y + maxLen zmin, zmax = z - maxLen, z + maxLen def closeEnough(atm2): if atm2 == atm or bonds.bonded(atm, atm2): return False x, y, z = map(float, atm2.posn()) if x < xmin or x > xmax: return False if y < ymin or y > ymax: return False if z < zmin or z > zmax: return False diff = atm.posn() - atm2.posn() return dot(diff, diff) < maxLenSq lst = [ ] for x2 in range(x1-1, x1+2): for y2 in range(y1-1, y1+2): for z2 in range(z1-1, z1+2): idx = (x2, y2, z2) try: lst += voxels[idx] except KeyError: pass for atm2 in filter(closeEnough, lst): bonds.bond_atoms(atm, atm2, bonds.V_GRAPHITE) | LENGTH_TWEAK = Chirality.BONDLENGTH | def buildChunk(self): from Numeric import dot length = self.length xyz = self.chirality.xyz atoms = self.mol.atoms mlimits = self.chirality.mlimits maxLen = 1.2 * Chirality.BONDLENGTH maxLenSq = maxLen ** 2 # populate the tube with some extra carbons on the ends # so that we can trim them later self.chirality.populate(self.mol, length + 4 * maxLen) | 3f2159e96bd896e455c6e70b11f69c375002f863 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/3f2159e96bd896e455c6e70b11f69c375002f863/NanotubeGenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
5579,
12,
2890,
4672,
628,
16980,
1930,
3928,
769,
273,
365,
18,
2469,
14779,
273,
365,
18,
343,
481,
7919,
18,
17177,
9006,
273,
365,
18,
21260,
18,
14937,
312,
14270,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
5579,
12,
2890,
4672,
628,
16980,
1930,
3928,
769,
273,
365,
18,
2469,
14779,
273,
365,
18,
343,
481,
7919,
18,
17177,
9006,
273,
365,
18,
21260,
18,
14937,
312,
14270,
273,
365,
... |
flight_kmz = re.sub(".log",".kmz", flight_log_name) | flight_kmz = re.sub("\.log",".kmz", flight_log_name) | def create_kmz(flight_log_dir,flight_log_name): flight_log = os.path.join(flight_log_dir, flight_log_name) match = re.match(".[tT][xX][tT]$",flight_log_name) # match a .txt file if match : #flight telelemetry file must end in .txt or .TXT for this to work flight_pos = re.sub(".[tT][xX][tT]$",".kml", flight_log_name) match = re.match(".log$",flight_log_name) # match a .txt file if match : flight_pos = re.sub(".log",".kml", flight_log_name) else : flight_pos = re.sub("$",".kml", flight_log_name) flight_pos_kml = os.path.join(flight_log_dir, flight_pos) f = open(flight_log, 'r') f_pos = open(flight_pos_kml, 'w') roll = 0 # only used with ardustation roll pitch = 0 # only used with ardustation pitch line_no = 0 log_book = flight_log_book() for line in f : line_no += 1 log = telemetry() # Make a new empty log entry log_format = log.parse(line,line_no) if log_format == "Error" :# we had an error print "Error parsing telemetry line ",line_no continue # Go get the next line elif log_format == "F1" or log_format == "F2" or \ log_format == "ARDUSTATION!!!": # We have a normal telemetry line if debug : print "lat",log.latitude,"lon",log.longitude,"alt",log.altitude, \ "wp", log.waypointIndex, "rmat1", log.rmat1 if (log.latitude == 0 or log.longitude == 0 or log.altitude ==0 ): if debug: print "lat or long or alt is 0; ignoring line", line_no continue # Get next line of telemetry - can happen at boot time on plane else : # We have a good log entry - put it in the logbook. if log_format == "ARDUSTATION!!!" : log_book.ardustation_pos = "Recorded" log.roll = roll # add the last roll parsed from Ardustation +++ log.pitch = pitch # add the last pitch parsed from Ardustation +++ log_book.entries.append(log) elif log_format == "F4" : # We have a type of options.h line log_book.roll_stabilization = log.roll_stabilization log_book.pitch_stabilization = log.pitch_stabilization log_book.yaw_stabilization_rudder = log.yaw_stabilization_rudder log_book.yaw_stabilization_aileron = log.yaw_stabilization_aileron log_book.aileron_navigation = log.aileron_navigation log_book.rudder_navigation = log.rudder_navigation log_book.use_altitudehold = log.use_altitudehold log_book.racing_mode = log.racing_mode log_book.F4 = "Recorded" elif log_format == "F5" : # We have a type of options.h line log_book.yawkp_aileron = log.yawkp_aileron log_book.yawkd_aileron = log.yawkd_aileron log_book.rollkp = log.rollkp log_book.rollkd = log.rollkd log_book.aileron_boost = log.aileron_boost log_book.F5 = "Recorded" elif log_format == "F6" : # We have a type of options.h line log_book.pitchgain = log.pitchgain log_book.pitchkd = log.pitchkd log_book.rudder_elev_mix = log.rudder_elev_mix log_book.roll_elev_mix = log.roll_elev_mix log_book.elevator_boost = log.elevator_boost log_book.F6 = "Recorded" elif log_format == "F7" : # We have a type of options.h line log_book.yawkp_rudder = log.yawkp_rudder log_book.yawkd_rudder = log.yawkd_rudder log_book.rudder_boost = log.rudder_boost log_book.rtl_pitch_down = log.rtl_pitch_down log_book.F7 = "Recorded" elif log_format == "F8" : # We have a type of options.h line log_book.heightmax = log.heightmax log_book.heightmin = log.heightmin log_book.minimumthrottle = log.minimumthrottle log_book.maximumthrottle = log.maximumthrottle log_book.pitchatminthrottle = log.pitchatminthrottle log_book.pitchatmaxthrottle = log.pitchatmaxthrottle log_book.pitchatzerothrottle = log.pitchatzerothrottle log_book.F8 = "Recorded" elif log_format == "ARDUSTATION+++" : # Intermediate Ardustation line roll = log.roll pitch = log.pitch else : print "Parsed a line format - ,", log_format, \ "but don't know what to do with it." initial_points = 10 # no. log entries to find origin at start flight_origin = origin() flight_origin.average(initial_points,log_book) calculate_headings_pitch_roll(log_book) write_document_preamble(log_book,f_pos) write_flight_path(log_book,flight_origin,f_pos) write_flight_vectors(log_book,flight_origin,f_pos) write_document_postamble(log_book,f_pos) # create_simulated_dead_reckoning(log_book) # simulate new code for plane # to do dead reckoning. # write_simulated_paths(f_sim,log_book) # still to be written # Close up the open files f.close() f_pos.close() # Make up the KML files into KMZ file match = re.match(".[tT][xX][tT]$",flight_log_name) # match a .txt file if match : #flight telelemetry file must end in .txt or .TXT for this to work flight_kmz = re.sub(".[tT][xX][tT]$",".kmz", flight_log_name) match = re.match(".log$",line) # match a .txt file if match : flight_kmz = re.sub(".log",".kmz", flight_log_name) else : flight_kmz = re.sub("$",".kmz", flight_log_name) flight_kmz = re.sub(".[tT][xX][tT]$",".kmz", flight_log_name) flight_pos_kmz = os.path.join(flight_log_dir,flight_kmz) # Try to find a models directory nearby to add to zip files.... model_dir = [] model_dir.append(os.path.join(flight_log_dir,"models")) model_dir.append(os.path.join(os.getcwd(), "models")) if (os.access(os.path.join(model_dir[1],"waypoint.dae"),os.F_OK)) and \ (os.access(os.path.join(model_dir[1],"block_plane.dae"),os.F_OK)) and \ (os.access(os.path.join(model_dir[1],"arrow.dae"),os.F_OK)): dir_index = 1 else: print "Program currently needs the models directory (part of the Tools/uav_log_to_kml download)" print "to be placed, with it's internal file contents, in the directory containing" print "your flight telemetry. i.e. in the same directory as ", flight_log_name print "Exiting Program" exit(0) # We exit the program. Note that we did leave a kml file around waypoint_model = os.path.join("models","waypoint.dae") block_plane_model = os.path.join("models","block_plane.dae") arrow_model = os.path.join("models","arrow.dae") kmzfile = ZipFile(flight_pos_kmz, "w",ZIP_DEFLATED) # "a" to append, "r" to read kmzfile.write(flight_pos_kml) kmzfile.write(waypoint_model) kmzfile.write(block_plane_model) kmzfile.write(arrow_model) kmzfile.close() # Remove the temporary kml files, now we have the kmz file os.remove(flight_pos_kml) # Calculate Average wind speed - Experimental - not accurate # as really not enough points to sample from level flight - atleast # for the DIY Drones.com T3 Course. But left here for future analysis, # for example if we have air speed or a climb / dive performance model. # calc_average_wind_speed(log_book) # Create a graph of altitude ### write out a csv file enabling analysis in Excel or OpenOffice flight_csv = re.sub(".[tT][xX][tT]$",".csv", flight_log_name) flight_cos_csv = os.path.join(flight_log_dir, flight_csv) f_csv = open(flight_cos_csv, 'w') print >> f_csv, "Time (secs), Status, Lat, Lon,Waypoint, Altitude, COG, SOG, CPU, SVS, VDOP, HDOP" for entry in log_book.entries : print >> f_csv, entry.tm / 1000.0, ",", entry.status, "," , \ entry.latitude / 10000000.0, ",",entry.longitude / 10000000.0,",", \ entry.waypointIndex, ",", entry.altitude / 100.0 , "," , \ entry.cog / 100.0 , "," , entry.sog / 100.0,",", entry.cpu,",", entry.svs, \ ",", entry.vdop, ",", entry.hdop f_csv.close() | 4cd822d33017003c99c3ee2bf0389dc420115397 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1364/4cd822d33017003c99c3ee2bf0389dc420115397/uav_log_to_kml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
18353,
94,
12,
19131,
67,
1330,
67,
1214,
16,
19131,
67,
1330,
67,
529,
4672,
25187,
67,
1330,
273,
1140,
18,
803,
18,
5701,
12,
19131,
67,
1330,
67,
1214,
16,
25187,
67,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
18353,
94,
12,
19131,
67,
1330,
67,
1214,
16,
19131,
67,
1330,
67,
529,
4672,
25187,
67,
1330,
273,
1140,
18,
803,
18,
5701,
12,
19131,
67,
1330,
67,
1214,
16,
25187,
67,
13... |
size = event.GetSize() | size = self.GetClientSize() | def OnSize(self, event): if not Globals.wxApplication.insideSynchronizeFramework: size = event.GetSize() widthMinusLastColumn = 0 assert self.GetColumnCount() > 0, "We're assuming that there is at least one column" for column in xrange (self.GetColumnCount() - 1): widthMinusLastColumn += self.GetColumnWidth (column) lastColumnWidth = size.width - widthMinusLastColumn if lastColumnWidth > 0: self.SetColumnWidth (self.GetColumnCount() - 1, lastColumnWidth) event.Skip() | 03068acfde8af5329914f2e5b11494bc3e58c080 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/03068acfde8af5329914f2e5b11494bc3e58c080/ControlBlocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
1225,
12,
2890,
16,
871,
4672,
309,
486,
18901,
1031,
18,
27226,
3208,
18,
28091,
19298,
554,
13701,
30,
963,
273,
365,
18,
967,
1227,
1225,
1435,
1835,
18434,
3024,
1494,
273,
374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2755,
1225,
12,
2890,
16,
871,
4672,
309,
486,
18901,
1031,
18,
27226,
3208,
18,
28091,
19298,
554,
13701,
30,
963,
273,
365,
18,
967,
1227,
1225,
1435,
1835,
18434,
3024,
1494,
273,
374... |
if self.s: | if not self.s: | def delete( self ): """Process a del""" if self.s: return | f99c5d964af15137a06c1d351a45ec1fb0c85bee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6932/f99c5d964af15137a06c1d351a45ec1fb0c85bee/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
365,
262,
30,
3536,
2227,
279,
1464,
8395,
309,
486,
365,
18,
87,
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,
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,
1430,
12,
365,
262,
30,
3536,
2227,
279,
1464,
8395,
309,
486,
365,
18,
87,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return KeysView(self) | return list(self) | def keys(self): return KeysView(self) | 3cb32c7f8cfe99bcfd3ef64776c34ee70e1049c8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/3cb32c7f8cfe99bcfd3ef64776c34ee70e1049c8/_abcoll.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1311,
12,
2890,
4672,
327,
11432,
1767,
12,
2890,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1311,
12,
2890,
4672,
327,
11432,
1767,
12,
2890,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
f = open('out.txt', 'a') print >>f, self.headers | def do_mock_request(self): assert len(requests_responses) > 0, 'got unexpected request (%s)' % self.path req, resp = requests_responses.pop(0) if req.get('require_basic_auth', False): f = open('out.txt', 'a') print >>f, self.headers if 'Authorization' not in self.headers: requests_responses.insert(0, (req, resp)) # push back self.send_response(401) self.send_header('WWW-Authenticate', 'Basic realm="Secure Area"') self.end_headers() self.wfile.write('no access') return if not query_eq(req['path'], self.path): print 'got request ', self.path print 'excpected request', req['path'] assert False, 'got unexpected request (see stdout)' if 'req_assert_function' in req: assert req['req_assert_function'](self) self.start_response(resp) self.wfile.write(resp['body']) if not requests_responses: self.server.shutdown = True return | deee79f6a6e4b123f318c87cfac12f080433834f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11249/deee79f6a6e4b123f318c87cfac12f080433834f/http.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
22851,
67,
2293,
12,
2890,
4672,
1815,
562,
12,
11420,
67,
11822,
13,
405,
374,
16,
296,
13212,
9733,
590,
6142,
87,
2506,
738,
365,
18,
803,
1111,
16,
1718,
273,
3285,
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,
67,
22851,
67,
2293,
12,
2890,
4672,
1815,
562,
12,
11420,
67,
11822,
13,
405,
374,
16,
296,
13212,
9733,
590,
6142,
87,
2506,
738,
365,
18,
803,
1111,
16,
1718,
273,
3285,
67,
... | |
gtk.CALENDAR_SHOW_WEEK_NUMBERS) | gtk.CALENDAR_SHOW_WEEK_NUMBERS | \ gtk.CALENDAR_WEEK_START_MONDAY) | def cal_open(self, widget): if self.readonly: message(_('This widget is readonly!'), self._window) return True | ef8bccce103d53901c40ef12b5ee26e02e95e3e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/ef8bccce103d53901c40ef12b5ee26e02e95e3e3/calendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1443,
67,
3190,
12,
2890,
16,
3604,
4672,
309,
365,
18,
16365,
30,
883,
24899,
2668,
2503,
3604,
353,
17102,
5124,
3631,
365,
6315,
5668,
13,
327,
1053,
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,
0,
0,
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,
1443,
67,
3190,
12,
2890,
16,
3604,
4672,
309,
365,
18,
16365,
30,
883,
24899,
2668,
2503,
3604,
353,
17102,
5124,
3631,
365,
6315,
5668,
13,
327,
1053,
2,
-100,
-100,
-100,
-100,
-100,
... |
has_cte = is_qp = 0 | has_cte = is_qp = is_base64 = 0 | def mimify_part(ifile, ofile, is_mime): '''Convert an 8bit part of a MIME mail message to quoted-printable.''' has_cte = is_qp = 0 multipart = None must_quote_body = must_quote_header = has_iso_chars = 0 header = [] header_end = '' message = [] message_end = '' # read header hfile = HeaderFile(ifile) while 1: line = hfile.readline() if not line: break if not must_quote_header and iso_char.search(line) >= 0: must_quote_header = 1 if mv.match(line) >= 0: is_mime = 1 if cte.match(line) >= 0: has_cte = 1 if qp.match(line) >= 0: is_qp = 1 if mp.match(line) >= 0: multipart = '--' + mp.group(1) if he.match(line) >= 0: header_end = line break header.append(line) # read body while 1: line = ifile.readline() if not line: break if multipart: if line == multipart + '--\n': message_end = line break if line == multipart + '\n': message_end = line break if is_qp: while line[-2:] == '=\n': line = line[:-2] newline = ifile.readline() if newline[:len(QUOTE)] == QUOTE: newline = newline[len(QUOTE):] line = line + newline line = mime_decode(line) message.append(line) if not has_iso_chars: if iso_char.search(line) >= 0: has_iso_chars = must_quote_body = 1 if not must_quote_body: if len(line) > MAXLEN: must_quote_body = 1 # convert and output header and body for line in header: if must_quote_header: line = mime_encode_header(line) if chrset.match(line) >= 0: if has_iso_chars: # change us-ascii into iso-8859-1 if string.lower(chrset.group(2)) == 'us-ascii': line = chrset.group(1) + \ CHARSET + chrset.group(3) else: # change iso-8859-* into us-ascii line = chrset.group(1) + 'us-ascii' + chrset.group(3) if has_cte and cte.match(line) >= 0: line = 'Content-Transfer-Encoding: ' if must_quote_body: line = line + 'quoted-printable\n' else: line = line + '7bit\n' ofile.write(line) if (must_quote_header or must_quote_body) and not is_mime: ofile.write('Mime-Version: 1.0\n') ofile.write('Content-Type: text/plain; ') if has_iso_chars: ofile.write('charset="%s"\n' % CHARSET) else: ofile.write('charset="us-ascii"\n') if must_quote_body and not has_cte: ofile.write('Content-Transfer-Encoding: quoted-printable\n') ofile.write(header_end) for line in message: if must_quote_body: line = mime_encode(line, 0) ofile.write(line) ofile.write(message_end) line = message_end while multipart: if line == multipart + '--\n': return if line == multipart + '\n': nifile = File(ifile, multipart) mimify_part(nifile, ofile, 1) line = nifile.peek ofile.write(line) continue | 2b85cde0d17a1e1c8a5152e25a229e8ed8c1151c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2b85cde0d17a1e1c8a5152e25a229e8ed8c1151c/mimify.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20369,
1164,
67,
2680,
12,
430,
398,
16,
434,
398,
16,
353,
67,
11757,
4672,
9163,
2723,
392,
1725,
3682,
1087,
434,
279,
13195,
4791,
883,
358,
9298,
17,
1188,
429,
1093,
6309,
711,
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,
20369,
1164,
67,
2680,
12,
430,
398,
16,
434,
398,
16,
353,
67,
11757,
4672,
9163,
2723,
392,
1725,
3682,
1087,
434,
279,
13195,
4791,
883,
358,
9298,
17,
1188,
429,
1093,
6309,
711,
6... |
def get_path(self, dir, name): | def get_path(self, directory, name): | def get_path(self, dir, name): if name.endswith(".fr.po"): name = name[:-6] if name.endswith(".po"): name = name[:-3] return self.getprefix() + "/" + name | a56e45efe3e36af770832bdc39b7ca99be6f3d8f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3042/a56e45efe3e36af770832bdc39b7ca99be6f3d8f/import_step1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
803,
12,
2890,
16,
1867,
16,
508,
4672,
309,
508,
18,
5839,
1918,
2932,
18,
4840,
18,
1631,
6,
4672,
508,
273,
508,
10531,
17,
26,
65,
309,
508,
18,
5839,
1918,
2932,
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,
336,
67,
803,
12,
2890,
16,
1867,
16,
508,
4672,
309,
508,
18,
5839,
1918,
2932,
18,
4840,
18,
1631,
6,
4672,
508,
273,
508,
10531,
17,
26,
65,
309,
508,
18,
5839,
1918,
2932,
18,
... |
self.sock = socket(AF_UNIX, SOCK_DGRAM) | self.sock = socket(self.family, SOCK_DGRAM) | def initSender(self): if self.dgram: self.sock = socket(AF_UNIX, SOCK_DGRAM) else: self.sock = socket(AF_UNIX, SOCK_STREAM) self.sock.connect(self.sock_name) | 10490933e2cd4ae3a5c5e15264d3839a229b0c46 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1177/10490933e2cd4ae3a5c5e15264d3839a229b0c46/func_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12021,
12,
2890,
4672,
309,
365,
18,
72,
3295,
30,
365,
18,
15031,
273,
2987,
12,
2890,
18,
9309,
16,
20834,
67,
40,
15370,
13,
469,
30,
365,
18,
15031,
273,
2987,
12,
6799,
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,
1208,
12021,
12,
2890,
4672,
309,
365,
18,
72,
3295,
30,
365,
18,
15031,
273,
2987,
12,
2890,
18,
9309,
16,
20834,
67,
40,
15370,
13,
469,
30,
365,
18,
15031,
273,
2987,
12,
6799,
67... |
if len(params) == 15: if params[14].startswith(':'): params[14] = params[14][1:] | if len(params) == 1 and not params[0]: params = [] | def handle_read(self): """Called when there is data to be read.""" data = self.recv(512) if not data: self.close() return # print '[<<<]\t', data self.dataIn += data | ef22f2fb2890e3c858ad258b5766b50b3f6d335f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2194/ef22f2fb2890e3c858ad258b5766b50b3f6d335f/protocol.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
896,
12,
2890,
4672,
3536,
8185,
1347,
1915,
353,
501,
358,
506,
855,
12123,
501,
273,
365,
18,
18334,
12,
13757,
13,
309,
486,
501,
30,
365,
18,
4412,
1435,
327,
468,
282,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
67,
896,
12,
2890,
4672,
3536,
8185,
1347,
1915,
353,
501,
358,
506,
855,
12123,
501,
273,
365,
18,
18334,
12,
13757,
13,
309,
486,
501,
30,
365,
18,
4412,
1435,
327,
468,
282,
... |
... >>> x/2 | ... >>> x//2 | >>> def f(x): | 2e37168d4a7fbe884be268555d251a33a676b5ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2e37168d4a7fbe884be268555d251a33a676b5ee/test_doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4080,
1652,
284,
12,
92,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4080,
1652,
284,
12,
92,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
or (self.regex.__class__ == RegexString and 1 < len(regex.text)): | or (self.regex.__class__ == RegexString and 1 < len(self.regex.text)): | def _str(self, **kw): text = str(self.regex) if self.regex.__class__ == RegexAnd \ or (self.regex.__class__ == RegexString and 1 < len(regex.text)): text = "(%s)" % text if self.min == 0 and self.max == 1: return "%s?" % text if self.min == self.max: return "%s{%u}" % (text, self.min) if self.max is None: if self.min == 0: return "%s*" % text elif self.min == 1: return "%s+" % text else: return "%s{%u,}" % (text, self.min) return "%s{%u,%u}" % (text, self.min, self.max) | 76d544519e3fbcdd35df053e3054fbce8a2ce9c3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/76d544519e3fbcdd35df053e3054fbce8a2ce9c3/regex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
701,
12,
2890,
16,
2826,
9987,
4672,
977,
273,
609,
12,
2890,
18,
7584,
13,
309,
365,
18,
7584,
16186,
1106,
972,
422,
15078,
1876,
521,
578,
261,
2890,
18,
7584,
16186,
1106,
972... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
701,
12,
2890,
16,
2826,
9987,
4672,
977,
273,
609,
12,
2890,
18,
7584,
13,
309,
365,
18,
7584,
16186,
1106,
972,
422,
15078,
1876,
521,
578,
261,
2890,
18,
7584,
16186,
1106,
972... |
self.strip_paragraph = 1 | def visit_reference(self, node): target = None # These are the special link schemes that MoinMoin supports. We let # MoinMoin handle these types. moin_link_schemes = ['wiki:', 'attachment:', 'inline:', 'drawing:'] # Do I need to lstrip? TODO: Find this out. Doesn't look like I need to # since I don't when assigning target. if 'refuri' in node.attributes: refuri = node['refuri'] if [i for i in moin_link_schemes if refuri.lstrip().startswith(i)]: target = refuri # What is this? TODO: Figure this out and comment elif ('name' in node.attributes and fully_normalize_name(node['name']) == refuri): target = ':%s:' % (node['name']) # The node should have a whitespace normalized name if the docutlis # restructured text parser would normally fully normalize the name. elif ':' not in refuri: target = ':%s:' % (refuri) if target: self.strip_paragraph = 1 # inline is special. We're not doing a link really, we need # moinmoin to actually insert the attachment. if target.startswith('inline:'): self.wikiparser.raw = target self.wikiparser.format(self.formatter) else: # Sometimes a newline will creep in to the node's text. This # throws the moinmoin regex so a link will not get processed. node_text = node.astext().replace('\n', ' ') self.wikiparser.raw = '[%s %s]' % (target, node_text) self.wikiparser.format(self.formatter) self.strip_paragraph = 0 raise docutils.nodes.SkipNode return html4css1.HTMLTranslator.visit_reference(self, node) | 531c379099d2b78f3c83756e295ecd3e6990f0ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/531c379099d2b78f3c83756e295ecd3e6990f0ec/rst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
6180,
12,
2890,
16,
756,
4672,
1018,
273,
599,
225,
468,
8646,
854,
326,
4582,
1692,
20436,
716,
490,
885,
49,
885,
6146,
18,
1660,
2231,
468,
490,
885,
49,
885,
1640,
4259,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
67,
6180,
12,
2890,
16,
756,
4672,
1018,
273,
599,
225,
468,
8646,
854,
326,
4582,
1692,
20436,
716,
490,
885,
49,
885,
6146,
18,
1660,
2231,
468,
490,
885,
49,
885,
1640,
4259,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.