rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
def startTagTableOther(name, attributes): | def startTagTableOther(self, name, attributes): | def startTagTableOther(name, attributes): self.endTagTr() # XXX check if it wasn't ignored... innerHTML case ... reprocess # current. see also endTagTable | 2fb2cbabda22a54e217122e4450a295370d06019 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/2fb2cbabda22a54e217122e4450a295370d06019/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
1805,
1388,
8290,
12,
2890,
16,
508,
16,
1677,
4672,
365,
18,
409,
1805,
1070,
1435,
468,
11329,
866,
309,
518,
14487,
1404,
5455,
2777,
14129,
648,
1372,
283,
2567,
468,
783,
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,
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,
1388,
8290,
12,
2890,
16,
508,
16,
1677,
4672,
365,
18,
409,
1805,
1070,
1435,
468,
11329,
866,
309,
518,
14487,
1404,
5455,
2777,
14129,
648,
1372,
283,
2567,
468,
783,
18,
... |
f = feed.Feed(url, False, section) | f = feed.Feed(url, section=section) | def handle_feed(self, feed_dict, parent_folder): """ Feed subscriptions look like: | 258179522157f41d058b8f5df92f17070b037acf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/258179522157f41d058b8f5df92f17070b037acf/subscription.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
7848,
12,
2890,
16,
4746,
67,
1576,
16,
982,
67,
5609,
4672,
3536,
14013,
11912,
2324,
3007,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
7848,
12,
2890,
16,
4746,
67,
1576,
16,
982,
67,
5609,
4672,
3536,
14013,
11912,
2324,
3007,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if hasattr(node, 'members'): | if hasattr(node, 'members'): | def update_items_from_nodes_open_selected(self, node, _guard_ = None, do_setOpen = True, do_invisible_nodes = True): # bruce 050110 temporary; deprecated, only call from above method and not for long! ###@@@ """set the properties in the model tree widget to match those in the tree datastructure #redoc """ assert _guard_ == None # this makes sure we don't supply too many positional arguments! # bruce 050110 made this from the old Node.setProp and Group.setProp methods, # deprecated now (removed asap). # this will pull them into this file; # later worry about making them item-centric not node-centric... # and about fixing them to use methods on items not in tw, so sel works better. # btw what about viewdata members (kids but not members, might not be reached here)? # is it moot? ignore for now. or ask node for all members for this use... ie all possible kids, kids_if_open... # useful in our treemaker too i guess. listview = self item = self.nodeItem(node) assert item if do_setOpen: if node.openable(): ###e needs cleanup: use node_isOpen/isOpenable split from current item_ methods item.setExpandable(True) #bruce 050128 bugfix # BTW, this must be done before the setOpen, # or the openclose icon is drawn closed when there are no children! listview.setOpen(item, node.open) ###@@@ use a new method in place of open... if we even need this... else: item.setExpandable(False) #bruce 050128 bugfix ## old: listview.setSelected(item, node.picked) item.setSelected(node.picked) item.repaint() if hasattr(node, 'members'): # clean this up... won't be enough for PartGroup! ####@@@@ if not do_invisible_nodes: # if the members are not visible now, don't update them now (optim, I guess) if not (node.openable() and getattr(node,'open',False)): return for kid in node.members: ###@@@ for viewdata guys, use kids_if_open self.update_items_from_nodes_open_selected(kid, do_setOpen = do_setOpen) return | b5c407ffafa33a6355d7d3659c52a30efebb47c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/b5c407ffafa33a6355d7d3659c52a30efebb47c9/TreeView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
3319,
67,
2080,
67,
4690,
67,
3190,
67,
8109,
12,
2890,
16,
756,
16,
389,
24594,
67,
273,
599,
16,
741,
67,
542,
3678,
273,
1053,
16,
741,
67,
267,
8613,
67,
4690,
273,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
3319,
67,
2080,
67,
4690,
67,
3190,
67,
8109,
12,
2890,
16,
756,
16,
389,
24594,
67,
273,
599,
16,
741,
67,
542,
3678,
273,
1053,
16,
741,
67,
267,
8613,
67,
4690,
273,
1... |
accessor = self.Schema()[key].getAccessor(self) | accessor = self.Schema()[key].getEditAccessor(self) if not accessor: accessor = self.Schema()[key].getAccessor(self) | def __getitem__(self, key): """play nice with externaleditor again""" if key not in self.Schema().keys() and key[:1] != "_": #XXX 2.2 return getattr(self, key, None) or getattr(aq_parent(aq_inner(self)), key, None) accessor = self.Schema()[key].getAccessor(self) return accessor() | fad3e02180e177b4d2edf539f69e3ea032fad394 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/fad3e02180e177b4d2edf539f69e3ea032fad394/BaseObject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
3536,
1601,
13752,
598,
3903,
9177,
3382,
8395,
309,
498,
486,
316,
365,
18,
3078,
7675,
2452,
1435,
471,
498,
10531,
21,
65,
480,
4192,
6877,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
31571,
972,
12,
2890,
16,
498,
4672,
3536,
1601,
13752,
598,
3903,
9177,
3382,
8395,
309,
498,
486,
316,
365,
18,
3078,
7675,
2452,
1435,
471,
498,
10531,
21,
65,
480,
4192,
6877,
... |
security.declareProtected(manage_zcatalog_entries, 'manage_resetCatalogReport') def manage_resetCatalogReport(self,REQUEST=None, RESPONSE=None, URL1=None): | security.declareProtected(manage_zcatalog_entries, 'manage_resetCatalogReport') def manage_resetCatalogReport(self, REQUEST=None, RESPONSE=None, URL1=None): | def getCatalogReport(self): """ Reports about the duration of queries """ | f5344515583fd7770c1f42ad947776a39da21a14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9658/f5344515583fd7770c1f42ad947776a39da21a14/ZCatalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1927,
4392,
4820,
12,
2890,
4672,
3536,
868,
4363,
2973,
326,
3734,
434,
6218,
3536,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1927,
4392,
4820,
12,
2890,
4672,
3536,
868,
4363,
2973,
326,
3734,
434,
6218,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
places.append(str(place[index])) | places.append(unicode(str(place[index]))) | def savePlacesSettings(self, ggroup, index, label): places = QStringList() for place in self.placesData: #place[0] is of type QUrl if index == 0: places.append(str(place[index].toString())) else: places.append(str(place[index])) ggroup.writeEntry(label, QVariant(places)) | 82391663fda7aa47d096acd3a0194e37c77c0457 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1729/82391663fda7aa47d096acd3a0194e37c77c0457/mainwindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
24791,
2628,
12,
2890,
16,
314,
1655,
16,
770,
16,
1433,
4672,
12576,
273,
2238,
780,
682,
1435,
364,
3166,
316,
365,
18,
11350,
751,
30,
468,
964,
63,
20,
65,
353,
434,
618,
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,
1923,
24791,
2628,
12,
2890,
16,
314,
1655,
16,
770,
16,
1433,
4672,
12576,
273,
2238,
780,
682,
1435,
364,
3166,
316,
365,
18,
11350,
751,
30,
468,
964,
63,
20,
65,
353,
434,
618,
2... |
res.append(MultiContentEntryText(pos=(iconSize, 0), size=(width-140, 20), font = 0, flags = RT_HALIGN_LEFT, text = txt)) res.append(MultiContentEntryText(pos=(0, 20), size=(width-154-lenSize, 17), font=1, flags=RT_HALIGN_LEFT, text=description)) | res.append(MultiContentEntryText(pos=(iconSize, 0), size=(width-140, 20), font = 0, flags = RT_HALIGN_LEFT, text = data.txt)) res.append(MultiContentEntryText(pos=(0, 20), size=(width-154-lenSize, 17), font=1, flags=RT_HALIGN_LEFT, text=data.description)) | def buildMovieListEntry(self, serviceref, info, begin, len): width = self.l.getItemSize().width() pathName = serviceref.getPath() res = [ None ] | 716bef7c11e21da35924da2accdba9404b4d09e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/716bef7c11e21da35924da2accdba9404b4d09e6/MovieList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
16727,
13120,
27899,
12,
2890,
16,
24658,
822,
74,
16,
1123,
16,
2376,
16,
562,
4672,
1835,
273,
365,
18,
80,
18,
588,
1180,
1225,
7675,
2819,
1435,
22943,
273,
24658,
822,
74,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1361,
16727,
13120,
27899,
12,
2890,
16,
24658,
822,
74,
16,
1123,
16,
2376,
16,
562,
4672,
1835,
273,
365,
18,
80,
18,
588,
1180,
1225,
7675,
2819,
1435,
22943,
273,
24658,
822,
74,
1... |
sage: from sage.misc.sageinspect import sage_getsource | sage: from sagenb.misc.sageinspect import sage_getsource | def sage_getsource(obj, is_binary=False): r""" Return the source code associated to obj as a string, or None. INPUT: - ``obj`` - function, etc. - ``is_binary`` - boolean, ignored EXAMPLES:: sage: from sage.misc.sageinspect import sage_getsource sage: sage_getsource(identity_matrix, True)[4:45] 'identity_matrix(ring, n=0, sparse=False):' sage: sage_getsource(identity_matrix, False)[4:45] 'identity_matrix(ring, n=0, sparse=False):' AUTHORS: - William Stein - extensions by Nick Alexander """ #First we should check if the object has a _sage_src_ #method. If it does, we just return the output from #that. This is useful for getting pexpect interface #elements to behave similar to regular Python objects #with respect to introspection. try: return obj._sage_src_() except (AttributeError, TypeError): pass t = sage_getsourcelines(obj, is_binary) if not t: return None (source_lines, lineno) = t return ''.join(source_lines) | 4d25713f8b0421c8ec86dac00f7ab1999549be38 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11792/4d25713f8b0421c8ec86dac00f7ab1999549be38/sageinspect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
410,
67,
588,
3168,
12,
2603,
16,
353,
67,
8578,
33,
8381,
4672,
436,
8395,
2000,
326,
1084,
981,
3627,
358,
1081,
487,
279,
533,
16,
578,
599,
18,
225,
12943,
30,
225,
300,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
410,
67,
588,
3168,
12,
2603,
16,
353,
67,
8578,
33,
8381,
4672,
436,
8395,
2000,
326,
1084,
981,
3627,
358,
1081,
487,
279,
533,
16,
578,
599,
18,
225,
12943,
30,
225,
300,
121... |
def mro(self): | def mro(self, warn_about_bad_bases=False): | def mro(self): if self.is_newstyle_class(): return self._c3_mro() else: return self._dfs_bases([], Set()) | 59fe8dcb7c4051229f6d0724a1dc054232afe359 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/59fe8dcb7c4051229f6d0724a1dc054232afe359/apidoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
312,
303,
12,
2890,
16,
1894,
67,
21071,
67,
8759,
67,
18602,
33,
8381,
4672,
309,
365,
18,
291,
67,
2704,
4060,
67,
1106,
13332,
327,
365,
6315,
71,
23,
67,
81,
303,
1435,
469,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
312,
303,
12,
2890,
16,
1894,
67,
21071,
67,
8759,
67,
18602,
33,
8381,
4672,
309,
365,
18,
291,
67,
2704,
4060,
67,
1106,
13332,
327,
365,
6315,
71,
23,
67,
81,
303,
1435,
469,
30,
... |
return NumberField_extension(self, poly, repr(name)) | return NumberField_extension(self, poly, str(name)) | def extension(self, poly, name=None, names=None): """ Return the relative extension of this field by a given polynomial. | 86adad96c5940efc86c7cc59636fcdba54262ede /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/86adad96c5940efc86c7cc59636fcdba54262ede/number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2710,
12,
2890,
16,
7573,
16,
508,
33,
7036,
16,
1257,
33,
7036,
4672,
3536,
2000,
326,
3632,
2710,
434,
333,
652,
635,
279,
864,
16991,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2710,
12,
2890,
16,
7573,
16,
508,
33,
7036,
16,
1257,
33,
7036,
4672,
3536,
2000,
326,
3632,
2710,
434,
333,
652,
635,
279,
864,
16991,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
title = re.search("'''(.*?)'''",page).group(1) | title = re.search("'''(.*?)'''", contents).group(1) | def findpage(t): try: location = re.search(starttext+"([^\Z]*?)"+endtext,t) if include: page = location.group() else: page = location.group(1) except AttributeError: return try: title = re.search("'''(.*?)'''",page).group(1) except AttributeError: wikipedia.output(u"No title found - skipping a page.") else: pl = wikipedia.Page(mysite,wikipedia.UnicodeToAsciiHtml(title)) wikipedia.output(pl.title()) if pl.exists(): wikipedia.output(u"Page %s already exists, not adding!"%title) else: pl.put(page, comment = commenttext, minorEdit = False) findpage(t[location.end()+1:]) return | 956a51cebb6f0b0d40ba72bd9751eeaf34e18a16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/956a51cebb6f0b0d40ba72bd9751eeaf34e18a16/pagefromfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
2433,
12,
88,
4672,
775,
30,
2117,
273,
283,
18,
3072,
12,
1937,
955,
9078,
19042,
62,
5772,
35,
2225,
15,
409,
955,
16,
88,
13,
309,
2341,
30,
1363,
273,
2117,
18,
1655,
1435,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
2433,
12,
88,
4672,
775,
30,
2117,
273,
283,
18,
3072,
12,
1937,
955,
9078,
19042,
62,
5772,
35,
2225,
15,
409,
955,
16,
88,
13,
309,
2341,
30,
1363,
273,
2117,
18,
1655,
1435,... |
mid = (high - low) / 2 + low | mid = (high - low) // 2 + low | typedef %(type)s npy_check_sizeof_type; | 2b1f27613a28461a3898466dc6386b23a95f5ec5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/2b1f27613a28461a3898466dc6386b23a95f5ec5/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
618,
536,
8975,
723,
13,
87,
1130,
93,
67,
1893,
67,
1467,
792,
67,
723,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
618,
536,
8975,
723,
13,
87,
1130,
93,
67,
1893,
67,
1467,
792,
67,
723,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return code | return (code,msg) | def data(self,msg): """SMTP 'DATA' command -- sends message data to server. Automatically quotes lines beginning with a period per rfc821. """ self.putcmd("data") (code,repl)=self.getreply() if self.debuglevel >0 : print "data:", (code,repl) if code <> 354: return -1 else: self.send(quotedata(msg)) self.send("%s.%s" % (CRLF, CRLF)) (code,msg)=self.getreply() if self.debuglevel >0 : print "data:", (code,msg) return code | 7ce512fd70a64eb7cf9563bb31dd4291a44254dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/7ce512fd70a64eb7cf9563bb31dd4291a44254dd/smtplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
501,
12,
2890,
16,
3576,
4672,
3536,
55,
14636,
296,
4883,
11,
1296,
1493,
9573,
883,
501,
358,
1438,
18,
11809,
20271,
10681,
2362,
8435,
598,
279,
3879,
1534,
16590,
28,
5340,
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,
501,
12,
2890,
16,
3576,
4672,
3536,
55,
14636,
296,
4883,
11,
1296,
1493,
9573,
883,
501,
358,
1438,
18,
11809,
20271,
10681,
2362,
8435,
598,
279,
3879,
1534,
16590,
28,
5340,
18,
3536... |
msg = "Coudln't get portal_types tool from this context" | msg = "Couldn't get portal_types tool from this context" | def get(self, instance, **kwargs): try: return self.storage.get(self.getName(), instance, **kwargs) except AttributeError: # object doesnt exists tt = getToolByName(instance, 'portal_types', None) if tt is None: msg = "Coudln't get portal_types tool from this context" raise AttributeError(msg) type_name = self.portal_type info = tt.getTypeInfo(type_name) if info is None: raise ValueError('No such content type: %s' % type_name) if not hasattr(aq_base(info), 'constructInstance'): raise ValueError('Cannot construct content type: %s' % \ type_name) return info.constructInstance(instance, self.getName(), **kwargs) | 64c71cec849e633ac53e1bcfe44e2c42bf15bd9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/64c71cec849e633ac53e1bcfe44e2c42bf15bd9b/Field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
791,
16,
2826,
4333,
4672,
775,
30,
327,
365,
18,
5697,
18,
588,
12,
2890,
18,
17994,
9334,
791,
16,
2826,
4333,
13,
1335,
6394,
30,
468,
733,
31272,
1704,
3574,
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,
336,
12,
2890,
16,
791,
16,
2826,
4333,
4672,
775,
30,
327,
365,
18,
5697,
18,
588,
12,
2890,
18,
17994,
9334,
791,
16,
2826,
4333,
13,
1335,
6394,
30,
468,
733,
31272,
1704,
3574,
2... |
shutil.copy2(src_path, local_source) | shutil.copyfile(src_path, local_source) | def storeResult(self, src_path, result_path, suffix=None): """Store file in result_path as result for source in src_path. | a0db602cbfb9c7c256086d792e586db4234a1f20 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9162/a0db602cbfb9c7c256086d792e586db4234a1f20/cachemanager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1707,
1253,
12,
2890,
16,
1705,
67,
803,
16,
563,
67,
803,
16,
3758,
33,
7036,
4672,
3536,
2257,
585,
316,
563,
67,
803,
487,
563,
364,
1084,
316,
1705,
67,
803,
18,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1707,
1253,
12,
2890,
16,
1705,
67,
803,
16,
563,
67,
803,
16,
3758,
33,
7036,
4672,
3536,
2257,
585,
316,
563,
67,
803,
487,
563,
364,
1084,
316,
1705,
67,
803,
18,
2,
-100,
-100,
... |
An .osc file | def __init__(self,fileOSM,debug=False,verbose=False,ele="10000"): """ Scans an .osc file and gather informations in lists and dictionaries Args: An .osc file ele: lines elevation used in certain kml (0 to the ground) Resulting instance properties: self.osmData=[] a list to contain them allow (see below) self.osmNodes=[] a list containing nodes data (a dictionary per node with the following keys: idNode, type, latitude, longitude, timestamp, user) self.statsUsers={} a dict. containing data about the selected user. single key = OSM user name value= [a,b,c,d,[[x],[y],[z]]] where: a= total number of nodes from this user b= number of created nodes c= number of modified nodes d= number of deleted nodes [x]= a list of tuples values (lat,long) for the created nodes [y]= a list of tuples values (lat,long) for the modified nodes [z]= a list of tuples values (lat,long) for the deleted nodes self.osmWays=[] a list containing basic data about ways (a dict. per way with the following keys: type, idWay, timestamp, user """ # elevation used in some kml self.linesElevation=ele # Data structure self.osmData=[] # a list to contain them all self.osmNodes=[] # a list to contain data about nodes (python dictionaries) self.osmWays=[] # a list to contain data about ways (python dictionaries) self.statsUsers={} # a dict. to contain data about user's stats self.osmData.append(self.osmNodes) self.osmData.append(self.osmWays) self.osmData.append(self.statsUsers) # feedback parameters self.debug=debug self.verbose=verbose | fe0b9eb053af0b2f2eeec1647fe57a8c599a32aa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1927/fe0b9eb053af0b2f2eeec1647fe57a8c599a32aa/osmaware.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
768,
4618,
49,
16,
4148,
33,
8381,
16,
11369,
33,
8381,
16,
6516,
1546,
23899,
6,
4672,
225,
3536,
2850,
634,
392,
263,
538,
71,
585,
471,
11090,
26978,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
768,
4618,
49,
16,
4148,
33,
8381,
16,
11369,
33,
8381,
16,
6516,
1546,
23899,
6,
4672,
225,
3536,
2850,
634,
392,
263,
538,
71,
585,
471,
11090,
26978,
... | |
def onchange_partner_id(self, cr, uid, ids, type, partner_id, date_invoice=False, payment_term=False, partner_bank_id=False): | def onchange_partner_id(self, cr, uid, ids, type, partner_id, date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): | def onchange_partner_id(self, cr, uid, ids, type, partner_id, date_invoice=False, payment_term=False, partner_bank_id=False): # Copy partner data to invoice, also the new field payment_type result = super(account_invoice, self).onchange_partner_id(cr, uid, ids, type, partner_id, date_invoice, payment_term, partner_bank_id) payment_type = False if partner_id: partner_line = self.pool.get('res.partner').browse(cr, uid, partner_id) if partner_line: if type=='in_invoice' or type=='in_refund': payment_type = partner_line.payment_type_supplier.id else: payment_type = partner_line.payment_type_customer.id if payment_type: result['value']['payment_type'] = payment_type return self.onchange_payment_type(cr, uid, ids, payment_type, partner_id, result) | 5e7f5fe46874a6afd43dc6097ccec8e9823dc6b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/5e7f5fe46874a6afd43dc6097ccec8e9823dc6b2/account_invoice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
3427,
67,
31993,
67,
350,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
618,
16,
19170,
67,
350,
16,
1509,
67,
16119,
33,
8381,
16,
5184,
67,
6408,
33,
8381,
16,
19170,
67,
10546,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
3427,
67,
31993,
67,
350,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
618,
16,
19170,
67,
350,
16,
1509,
67,
16119,
33,
8381,
16,
5184,
67,
6408,
33,
8381,
16,
19170,
67,
10546,... |
newid = struct.pack('ll', random.randint(0, 2147483647) | 0x01010101, random.randint(0, 2147483647) | 0x01010101) | blist = [] for x in xrange(_rowid_str_len): blist.append(random.randint(1,255)) newid = struct.pack('B'*_rowid_str_len, *blist) | def __new_rowid(self, table, txn) : """Create a new unique row identifier""" unique = 0 while not unique: # Generate a random 64-bit row ID string # (note: this code has <56 bits of randomness # but it's plenty for our database id needs!) # The | 0x01010101 is to ensure no null bytes are in the value newid = struct.pack('ll', random.randint(0, 2147483647) | 0x01010101, random.randint(0, 2147483647) | 0x01010101) | 3ef21cb7c61236453b257c30ce08f8f58489e802 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/3ef21cb7c61236453b257c30ce08f8f58489e802/dbtables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2704,
67,
492,
350,
12,
2890,
16,
1014,
16,
7827,
13,
294,
3536,
1684,
279,
394,
3089,
1027,
2756,
8395,
3089,
273,
374,
1323,
486,
3089,
30,
468,
6654,
279,
2744,
5178,
17,
3682... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2704,
67,
492,
350,
12,
2890,
16,
1014,
16,
7827,
13,
294,
3536,
1684,
279,
394,
3089,
1027,
2756,
8395,
3089,
273,
374,
1323,
486,
3089,
30,
468,
6654,
279,
2744,
5178,
17,
3682... |
s.bind(("", psm)) | s.bind((adapter, psm)) | def get_available_psm(): # Ripped from PyBlueZ source for psm in range (0x1001, 0x8000, 2): s = BluetoothSocket(L2CAP) try: s.bind(("", psm)) s.close() return psm except Exception as msg: s.close() raise Exception("No free PSM could be found") | 62d200867b34a605d3d9994c257e62a290da8082 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8028/62d200867b34a605d3d9994c257e62a290da8082/mcap_sock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5699,
67,
1121,
81,
13332,
468,
534,
625,
1845,
628,
4707,
27986,
62,
1084,
225,
364,
4250,
81,
316,
1048,
261,
20,
92,
6625,
21,
16,
374,
92,
26021,
16,
576,
4672,
272,
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,
336,
67,
5699,
67,
1121,
81,
13332,
468,
534,
625,
1845,
628,
4707,
27986,
62,
1084,
225,
364,
4250,
81,
316,
1048,
261,
20,
92,
6625,
21,
16,
374,
92,
26021,
16,
576,
4672,
272,
273... |
if nb_call == 0: | if nb_call == 0: | def print_summary_(fct_name, compile_time, fct_call_time, fct_call, apply_time, op_cimpl, message, outputs_size, n_apply_to_print=15, n_ops_to_print=20, print_apply=True): """ do the actual printing of print_summary and print_diff_summary. | 2ac3c664b014e300edd2c12fc42f3fd49c1c8931 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/2ac3c664b014e300edd2c12fc42f3fd49c1c8931/profilemode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
7687,
67,
12,
74,
299,
67,
529,
16,
4074,
67,
957,
16,
28478,
67,
1991,
67,
957,
16,
28478,
67,
1991,
16,
2230,
67,
957,
16,
1061,
67,
71,
11299,
16,
883,
16,
6729,
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,
1172,
67,
7687,
67,
12,
74,
299,
67,
529,
16,
4074,
67,
957,
16,
28478,
67,
1991,
67,
957,
16,
28478,
67,
1991,
16,
2230,
67,
957,
16,
1061,
67,
71,
11299,
16,
883,
16,
6729,
67,
... |
self.connect(self.acceptButton, QtCore.SIGNAL('clicked()'), self.acceptButtonPress) | def __init__(self, currentChainModel, parent=None): super(StructureEditor, self).__init__(parent) self.currentChainModel = currentChainModel self.atomJustAdded = None self.possibleAtomsList = [] self.previouslySelectedPossibleAtom = None self.undoStack = QtGui.QUndoStack(self) self.currentMatch = None #These go on the left hand side self.undoButton = QtGui.QPushButton('Undo') self.redoButton = QtGui.QPushButton('Redo') self.CAdoubleSpinBox = QtGui.QDoubleSpinBox() self.CAdoubleSpinBox.setValue(3.8) self.CAlabel = QtGui.QLabel('C-Alplha Interval') self.mockSidechainsCheckBox = QtGui.QCheckBox('Mock Sidechains') self.acceptButton = QtGui.QPushButton('Accept') self.removeButton = QtGui.QPushButton('Remove') self.setupUi() self.enableDisable() print 'StructureEditor.parentWidget():', self.parentWidget() self.connect(self.atomicBack1resButton, QtCore.SIGNAL('clicked()'), self.atomPrevButtonPress) self.connect(self.atomicForward1resButton, QtCore.SIGNAL('clicked()'), self.atomNextButtonPress) self.connect(self.acceptButton, QtCore.SIGNAL('clicked()'), self.acceptButtonPress) self.connect(self.atomicPossibilityNumSpinBox, QtCore.SIGNAL('valueChanged(int)'), self.atomChoosePossibleAtom) self.connect(self.atomicForwardRadioButton, QtCore.SIGNAL('toggled(bool)'), self.atomForwardBackwardChange) self.connect(self.undoButton, QtCore.SIGNAL('clicked()'), self.undoStack.undo) self.connect(self.redoButton, QtCore.SIGNAL('clicked()'), self.undoStack.redo) self.connect(self.acceptButton, QtCore.SIGNAL('clicked()'), self.acceptButtonPress) self.connect(self.helixDecreasePositionButton, QtCore.SIGNAL('clicked()'), self.helixDecreaseButtonPress) self.connect(self.helixIncreasePositionButton, QtCore.SIGNAL('clicked()'), self.helixIncreaseButtonPress) self.connect(self.helixFlipButton, QtCore.SIGNAL('clicked()'), self.helixFlipButtonPress) self.connect(self.currentChainModel, QtCore.SIGNAL('selection updated'), self.updateSelectedResidues) self.connect(self.tabWidget, QtCore.SIGNAL('currentChanged(int)'), self.enableDisable) if self.parentWidget().parentWidget().app: self.app = self.parentWidget().parentWidget().app self.connect(self.app.viewers['sse'], QtCore.SIGNAL('elementSelected (int, int, int, int, int, int, QMouseEvent)'), self.updateCurrentMatch) self.connect(self.app.viewers["calpha"], QtCore.SIGNAL("elementSelected (int, int, int, int, int, int, QMouseEvent)"), self.posUpdateValues) self.connect(self.posMoveDict['x'], QtCore.SIGNAL('valueChanged(double)'), self.posMoveCM_x) self.connect(self.posMoveDict['y'], QtCore.SIGNAL('valueChanged(double)'), self.posMoveCM_y) self.connect(self.posMoveDict['z'], QtCore.SIGNAL('valueChanged(double)'), self.posMoveCM_z) self.connect(self.removeButton, QtCore.SIGNAL('clicked()'), self.removeSelectedAtoms) | c49ab6154ff472cf65678f6b837a6882c4e86e40 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/c49ab6154ff472cf65678f6b837a6882c4e86e40/structure_editor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
783,
3893,
1488,
16,
982,
33,
7036,
4672,
2240,
12,
6999,
6946,
16,
365,
2934,
972,
2738,
972,
12,
2938,
13,
225,
365,
18,
2972,
3893,
1488,
273,
783,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
783,
3893,
1488,
16,
982,
33,
7036,
4672,
2240,
12,
6999,
6946,
16,
365,
2934,
972,
2738,
972,
12,
2938,
13,
225,
365,
18,
2972,
3893,
1488,
273,
783,
... | |
indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ | indexDict[sngl.ifo],imageDict[sngl.ifo],thumbDict[sngl.ifo],zValueDict[sngl.ifo]=list(),list(),list(),list() indexDictAQ[sngl.ifo],imageDictAQ[sngl.ifo],thumbDictAQ[sngl.ifo],zValueDictAQ[sngl.ifo]=list(),list(),list(),list() indexDict[sngl.ifo]=fnmatch.filter(filesOmega,\ | def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.exists(wikiFilename) and maxCount < 15: sys.stdout.write("File %s already exists.\n"%\ os.path.split(wikiFilename)[1]) wikiFilename=wikiFilename+".wiki" maxCount=maxCount+1 # #Create the wikipage object etc # wikiPage=wiki(wikiFilename) # # Create top two trigger params tables # cTable=wikiPage.wikiTable(2,9) cTable.data=[ ["Trigger Type", "Rank", "FAR", "SNR", "IFOS(Coinc)", "Instruments(Active)", "Coincidence Time (s)", "Total Mass (mSol)", "Chirp Mass (mSol)" ], ["%s"%(wikiCoinc.type), "%s"%(wikiCoinc.rank), "%s"%(wikiCoinc.far), "%s"%(wikiCoinc.snr), "%s"%(wikiCoinc.ifos), "%s"%(wikiCoinc.instruments), "%s"%(wikiCoinc.time), "%s"%(wikiCoinc.mass), "%s"%(wikiCoinc.mchirp) ] ] pTable=wikiPage.wikiTable(len(wikiCoinc.sngls_in_coinc())+1,7) pTable.data[0]=[ "IFO", "GPS Time(s)", "SNR", "CHISQR", "Mass 1", "Mass 2", "Chirp Mass" ] for row,cSngl in enumerate(wikiCoinc.sngls_in_coinc()): pTable.data[row+1]=[ "%s"%(cSngl.ifo), "%s"%(cSngl.time), "%s"%(cSngl.snr), "%s"%(cSngl.chisqr), "%s"%(cSngl.mass1), "%s"%(cSngl.mass2), "%s"%(cSngl.mchirp) ] #Write the tables into the Wiki object wikiPage.putText("Coincident Trigger Event Information: %s\n"\ %(stfu_pipe.gpsTimeToReadableDate(wikiCoinc.time))) wikiPage.insertTable(cTable) wikiPage.putText("Corresponding Coincident Single IFO Trigger Information\n") wikiPage.insertTable(pTable) #Generate a table of contents to appear after candidate params table wikiPage.tableOfContents(3) #Begin including each checklist item as section with subsections wikiPage.section("Follow-up Checklist") #Put each checklist item wikiPage.subsection("Checklist Summary") wikiPage.subsubsection("Does this candidate pass this checklist?") wikiPage.subsubsection("Answer") wikiPage.subsubsection("Relevant Information and Comments") wikiPage.insertHR() # #First real checklist item wikiPage.subsection("#0 False Alarm Probability") wikiPage.subsubsection("Question") wikiPage.putText("What is the false alarm rate associated with this candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") farTable=wikiPage.wikiTable(2,1) farTable.setTableStyle("background-color: yellow; text-align center;") farTable.data[0][0]="False Alarm Rate" farTable.data[1][0]="%s"%(wikiCoinc.far) wikiPage.insertTable(farTable) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#1 Data Quality Flags") wikiPage.subsubsection("Question") wikiPage.putText("Can the data quality flags coincident with this candidate be safely disregarded?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPath=os.path.split(wikiFilename)[0] dqFileList=wikiFileFinder.get_findFlags() if len(dqFileList) != 1: sys.stdout.write("Warning: DQ flags data product import problem.\n") print "Found %i files."%len(dqFileList) for mf in dqFileList: print mf for myFile in dqFileList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#2 Veto Investigations") wikiPage.subsubsection("Question") wikiPage.putText("Does the candidate survive the veto investigations performed at its time?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") vetoFileList=wikiFileFinder.get_findVetos() if len(vetoFileList) != 1: sys.stdout.write("Warning: Veto flags data product import problem.\n") for myFile in vetoFileList:print myFile for myFile in vetoFileList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#3 IFO Status") wikiPage.subsubsection("Question") wikiPage.putText("Are the interferometers operating normally with a reasonable level of sensitivity around the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") #Add link to Daily Stats if wikiCoinc.time <= endOfS5: statsLink=wikiPage.makeExternalLink("http://blue.ligo-wa.caltech.edu/scirun/S5/DailyStatistics/",\ "S5 Daily Stats Page") else: statsLink="This should be a link to S6 Daily Stats!\n" wikiPage.putText(statsLink) #Link figures of merit #Get link for all members of wikiCoinc wikiPage.putText("Figures of Merit\n") if wikiCoinc.time > endOfS5: fomLinks=dict() elems=0 for wikiSngl in wikiCoinc.sngls: if not(wikiSngl.ifo.upper().rstrip().lstrip() == 'V1'): fomLinks[wikiSngl.ifo]=stfu_pipe.getFOMLinks(wikiCoinc.time,wikiSngl.ifo) elems=elems+len(fomLinks[wikiSngl.ifo]) else: for myLabel,myLink,myThumb in stfu_pipe.getFOMLinks(wikiCoinc.time,wikiSngl.ifo): wikiPage.putText("%s\n"%(wikiPage.makeExternalLink(myLink,myLabel))) cols=4 rows=(elems/3)+1 fTable=wikiPage.wikiTable(rows,cols) fTable.data[0]=["IFO,Shift","FOM1","FOM2","FOM3"] currentIndex=0 for myIFOKey in fomLinks.keys(): for label,link,thumb in fomLinks[myIFOKey]: myRow=currentIndex/int(3)+1 myCol=currentIndex%int(3)+1 fTable.data[myRow][0]=label thumbURL=thumb fTable.data[myRow][myCol]="%s"%(wikiPage.linkedRemoteImage(thumb,link)) currentIndex=currentIndex+1 wikiPage.insertTable(fTable) else: wikiPage.putText("Can not automatically fetch S5 FOM links.") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#4 Candidate Appearance") wikiPage.subsubsection("Question") wikiPage.putText("Do the Qscan figures show what we would expect for a gravitational-wave event?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") imageDict=dict() indexDict=dict() thumbDict=dict() for sngl in wikiCoinc.sngls: frametype,channelName=stfu_pipe.figure_out_type(sngl.time,sngl.ifo,'hoft') indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*/%s/*/%s/*index.html"%(frametype,sngl.time)) imageDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*%s*_%s_16.00_spectrogram_whitened.png"\ %(sngl.time,channelName)) thumbDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*%s*_%s_16.00_spectrogram_whitened?thumb.png"\ %(sngl.time,channelName)) # #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("GW data channel scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >= 1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >= 1 if enoughImage and enoughIndex: wikiPage.insertQscanTable(imageDict,\ thumbDict,\ indexDict) else: sys.stdout.write("Warning: Candidate appearance plot import problem.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#5 Seismic Plots") wikiPage.subsubsection("Question") wikiPage.putText("Is the seismic activity insignificant around the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() # for sngl in wikiCoinc.sngls_in_coinc(): indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*index.html"%(sngl.ifo,sngl.time)) imageDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*SEI*_512.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)) thumbDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*SEI*_512.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)) #Search for corresponding Omega summary.txt file zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if (len(zValueFiles) > 0): for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse only keeping SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Search for analyzeQscan files #/L1-analyseQscan_L1_932797512_687_seis_rds_L1_SEI-ETMX_X_z_scat-unspecified-gpstime.png timeString=str(float(sngl.time)).replace(".","_") zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*_%s_%s_*.txt"%(sngl.ifo,timeString)) indexDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*_%s_%s_*.html"%(sngl.ifo,timeString)) thumbDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*%s-*_%s_*_SEI*_z_scat-unspecified-gpstime_thumb.png"\ %(sngl.ifo,timeString)) imageDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*%s-*_%s_*_SEI*_z_scat-unspecified-gpstime.png"\ %(sngl.ifo,timeString)) #Process zValue ranking file if found for IFO zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) #Reparse keeping SEI channels tmpList=list() for chan in zValueDictAQ[sngl.ifo]: if "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Analyze Qscan Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("Seismic scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: Seismic plots product import problem.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#6 Other environmental causes") wikiPage.subsubsection("Question") wikiPage.putText("Were the environmental disturbances (other than seismic) insignificant at the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() #Select only PEM channels for sngl in wikiCoinc.sngls_in_coinc(): imageDict[sngl.ifo]=list() indexDict[sngl.ifo]=list() thumbDict[sngl.ifo]=list() for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*html"%(sngl.ifo,sngl.time)): indexDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): imageDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): thumbDict[sngl.ifo].append(myFile) #Search for corresponding Omega summary.txt file zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse only keeping PEM and not SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if "PEM" in chan[0] and not "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Select associated analyzeQscans imageDictAQ[sngl.ifo]=list() indexDictAQ[sngl.ifo]=list() thumbDictAQ[sngl.ifo]=list() timeString=str(float(sngl.time)).replace(".","_") for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*html"%(sngl.ifo,timeString)): indexDictAQ[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*txt"%(sngl.ifo,timeString)) zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) for chan in zValueDictAQ[sngl.ifo]: if "PEM" in chan[0] and not "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Analyze Qscan Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime_thumb.png #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime.png for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime.png"%\ (sngl.ifo,timeString)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): imageDictAQ[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime?thumb.png"%\ (sngl.ifo,timeString)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): thumbDictAQ[sngl.ifo].append(myFile) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(imageDict[sngl.ifo]) < 1: wikiPage.putText("PEM scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: PEM plots import trouble.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#7 Auxiliary degree of freedom") wikiPage.subsubsection("Question") wikiPage.putText("Were the auxiliary channel transients coincident with the candidate insignificant?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() #Select only AUX channels for sngl in wikiCoinc.sngls: imageDict[sngl.ifo]=list() indexDict[sngl.ifo]=list() thumbDict[sngl.ifo]=list() for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*html"%(sngl.ifo,sngl.time)): indexDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): imageDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): thumbDict[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse NOT keeping PEM or SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if not "PEM" in chan[0] or not "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Select associated analyzeQscans imageDictAQ[sngl.ifo]=list() indexDictAQ[sngl.ifo]=list() thumbDictAQ[sngl.ifo]=list() timeString=str(float(sngl.time)).replace(".","_") #H1-analyseQscan_H1_931176926_116_rds-unspecified-gpstime.html for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*html"%(sngl.ifo,timeString)): indexDictAQ[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*txt"%(sngl.ifo,timeString)) #Process zValue ranking file if found for IFO zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) #Reparse NOT keeping PEM or SEI channels tmpList=list() for chan in zValueDictAQ[sngl.ifo]: if not "PEM" in chan[0] or not "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime_thumb.png #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime.png for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime.png"%\ (sngl.ifo,timeString)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): imageDictAQ[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime?thumb.png"%\ (sngl.ifo,timeString)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): thumbDictAQ[sngl.ifo].append(myFile) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("Other scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: AUX plots import trouble.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#8 Electronic Log Book") wikiPage.subsubsection("Question") wikiPage.putText("Were the instruments behaving normally according to the comments posted by the sci-mons or the operators in the e-log?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiLinkLHOlog=wikiPage.makeExternalLink(stfu_pipe.getiLogURL(myCoinc.time,"H1"), "Hanford eLog") wikiLinkLLOlog=wikiPage.makeExternalLink(stfu_pipe.getiLogURL(myCoinc.time,"L1"), "Livingston eLog") wikiPage.putText("%s\n\n%s\n\n"%(wikiLinkLHOlog,wikiLinkLLOlog)) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#9 Glitch Report") wikiPage.subsubsection("Question") wikiPage.putText("Were the instruments behaving normally according to the weekly glitch report?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") if int(wikiCoinc.time) >= endOfS5: wikiLinkGlitch=wikiPage.makeExternalLink( "https://www.lsc-group.phys.uwm.edu/twiki/bin/view/DetChar/GlitchStudies", "Glitch Reports for S6" ) else: wikiLinkGlitch=wikiPage.makeExternalLink( "http://www.lsc-group.phys.uwm.edu/glitch/investigations/s5index.html#shift", "Glitch Reports for S5" ) wikiPage.putText("%s\n"%(wikiLinkGlitch)) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#10 Snr versus time") wikiPage.subsubsection("Question") wikiPage.putText("Is this trigger significant in a SNR versus time plot of all triggers in its analysis chunk?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#11 Parameters of the candidate") wikiPage.subsubsection("Question") wikiPage.putText("Does the candidate have a high likelihood of being a gravitational-wave according to its parameters?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Effective Distance Ratio Test\n") effDList=wikiFileFinder.get_effDRatio() if len(effDList) != 1: sys.stdout.write("Warning: Effective Distance Test import problem.\n") for myFile in effDList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#12 Snr and Chisq") wikiPage.subsubsection("Question") wikiPage.putText("Are the SNR and CHISQ time series consistent with our expectations for a gravitational wave?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") # #Put plots SNR and Chi sqr # indexList=fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*.html") thumbList=fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*_snr-*thumb.png") thumbList.extend(fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*_chisq-*thumb.png")) thumbList.sort() indexList=[file2URL.convert(x) for x in indexList] thumbList=[file2URL.convert(x) for x in thumbList] #Two thumb types possible "_thumb.png" or ".thumb.png" imageList=[x.replace("_thumb.png",".png").replace(".thumb.png",".png") for x in thumbList] ifoCount=len(wikiCoinc.sngls) rowLabel={"SNR":1,"CHISQ":2} rowCount=len(rowLabel) colCount=ifoCount if len(indexList) >= 1: snrTable=wikiPage.wikiTable(rowCount+1,colCount+1) for i,sngl in enumerate(wikiCoinc.sngls): myIndex="" for indexFile in indexList: if indexFile.__contains__("_pipe_%s_FOLLOWUP_"%sngl.ifo): myIndex=indexFile if myIndex=="": snrTable.data[0][i+1]=" %s "%sngl.ifo else: snrTable.data[0][i+1]=wikiPage.makeExternalLink(myIndex,sngl.ifo) for col,sngl in enumerate(wikiCoinc.sngls): for row,label in enumerate(rowLabel.keys()): snrTable.data[row+1][0]=label for k,image in enumerate(imageList): if (image.__contains__("_%s-"%label.lower()) \ and image.__contains__("pipe_%s_FOLLOWUP"%sngl.ifo)): snrTable.data[row+1][col+1]=" %s "%(wikiPage.linkedRemoteImage(thumbList[k],thumbList[k])) wikiPage.insertTable(snrTable) else: sys.stdout.write("Warning: SNR and CHISQ plots not found.\n") wikiPage.putText("SNR and CHISQ plots not found.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#13 Template bank veto") wikiPage.subsubsection("Question") wikiPage.putText("Is the bank veto value consistent with our expectations for a gravitational wave?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#14 Coherent studies") wikiPage.subsubsection("Question") wikiPage.putText("Are the triggers found in multiple interferometers coherent with each other?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") indexList=fnmatch.filter(wikiFileFinder.get_plotchiatimeseries(),"*.html") if len(indexList) >= 1: myIndex=file2URL.convert(indexList[0]) wikiPage.putText(wikiPage.makeExternalLink(myIndex,\ "%s Coherence Study Results"%(wikiCoinc.ifos))) thumbList=fnmatch.filter(wikiFileFinder.get_plotchiatimeseries(),\ "PLOT_CHIA_%s_snr-squared*thumb.png"%(wikiCoinc.time)) imageList=[x.replace("_thumb.png",".png").replace(".thumb.png",".png") for x in thumbList] rowCount=len(imageList) colCount=1 cohSnrTimeTable=wikiPage.wikiTable(rowCount+1,colCount) cohSnrTimeTable.data[0][0]="%s Coherent SNR Squared Times Series"%(wikiCoinc.ifos) for i,image in enumerate(imageList): cohSnrTimeTable.data[i+1][0]=wikiPage.linkedRemoteImage(image,thumbList[i]) wikiPage.insertTable(cohSnrTimeTable) else: sys.stdout.write("Warning: Coherent plotting jobs not found.\n") wikiPage.putText("Coherent Studies plots not found.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#15 Segmentation Stability") wikiPage.subsubsection("Question") wikiPage.putText("Is the candidate stable against changes in segmentation?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#16 Calibration Stability") wikiPage.subsubsection("Question") wikiPage.putText("Is the candidate stable against changes in calibration that are consistent with systematic uncertainties?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # | fb84ac33aba836b8fcb61075cfaec34ced2846c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/fb84ac33aba836b8fcb61075cfaec34ced2846c0/makeCheckListWiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
1564,
1098,
12,
13044,
5359,
33,
7036,
16,
13044,
27055,
71,
33,
7036,
16,
13044,
2471,
33,
7036,
16,
768,
22,
1785,
33,
7036,
4672,
3536,
2985,
358,
2911,
279,
866,
1098,
1625,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
1564,
1098,
12,
13044,
5359,
33,
7036,
16,
13044,
27055,
71,
33,
7036,
16,
13044,
2471,
33,
7036,
16,
768,
22,
1785,
33,
7036,
4672,
3536,
2985,
358,
2911,
279,
866,
1098,
1625,
... |
title = _('<h2>Bulletin %s created successfully!</h2>' % issue_string) body = _('<p>Now you can:</p> \ | title = '<h2>Bulletin %s created successfully!</h2>' % issue_string body = '<p>Now you can:</p> \ | def tmpl_webjournal_issue_control_success_msg(language, active_issues, journal_name): """ """ _ = gettext_set_language(language) issue_string = "".join([" - %s" % issue for issue in active_issues]) title = _('<h2>Bulletin %s created successfully!</h2>' % issue_string) body = _('<p>Now you can:</p> \ <p>Return to your journal here: >> \ <a href="%s/journal/?name=%s"> %s </a>\ </p>\ <p>Make additional publications here: >> \ <a href="%s/journal/issue_control?name=%s">Issue Interface</a> \ </p>\ <p>Send an alert email here: >> \ <a href="%s/journal/alert?name=%s"> Send an alert</a> \ </p>') % (weburl, journal_name, journal_name, weburl, journal_name, weburl, journal_name) return title + body | 25e3889e6921bcde05623e951f65cbb8800e1823 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/25e3889e6921bcde05623e951f65cbb8800e1823/webjournal_templates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
1814,
441,
7116,
67,
13882,
67,
7098,
67,
4768,
67,
3576,
12,
4923,
16,
2695,
67,
9618,
16,
13001,
67,
529,
4672,
3536,
3536,
389,
273,
24972,
67,
542,
67,
4923,
12,
4923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
1814,
441,
7116,
67,
13882,
67,
7098,
67,
4768,
67,
3576,
12,
4923,
16,
2695,
67,
9618,
16,
13001,
67,
529,
4672,
3536,
3536,
389,
273,
24972,
67,
542,
67,
4923,
12,
4923,
... |
rating = '?' return rating | return '?' | def rating(self, movie): html = geturl(self.searchurl, referer=self.baseurl, opts={'s': 'tt', 'q': movie}) title = self.title.search(html).group(1) if 'Search' in title: titleurl = [item[1] for item in self.titles.findall(html)][0] titleurl = urljoin(self.baseurl, titleurl) html = geturl(titleurl, referer=self.searchurl) try: rating = self._rating.search(html).group(1) except: rating = '?' return rating | 1ca56c13e6b5caa017780e0feb9296261304b062 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10942/1ca56c13e6b5caa017780e0feb9296261304b062/movie.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13953,
12,
2890,
16,
21360,
4672,
1729,
273,
336,
718,
12,
2890,
18,
3072,
718,
16,
18068,
33,
2890,
18,
1969,
718,
16,
1500,
5899,
11,
87,
4278,
296,
748,
2187,
296,
85,
4278,
21360,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13953,
12,
2890,
16,
21360,
4672,
1729,
273,
336,
718,
12,
2890,
18,
3072,
718,
16,
18068,
33,
2890,
18,
1969,
718,
16,
1500,
5899,
11,
87,
4278,
296,
748,
2187,
296,
85,
4278,
21360,
... |
f = os.path.join(guake_globals.IMAGE_DIR, x) | f = os.path.join(guake.globals.IMAGE_DIR, x) | def pixmapfile(x): f = os.path.join(guake_globals.IMAGE_DIR, x) if not os.path.exists(f): raise IOError('No such file or directory: %s' % f) return os.path.abspath(f) | 13d36c109af00771d651a8d956aad3dba4ea275f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11147/13d36c109af00771d651a8d956aad3dba4ea275f/common.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11871,
1458,
768,
12,
92,
4672,
284,
273,
1140,
18,
803,
18,
5701,
12,
6891,
911,
18,
16227,
18,
13603,
67,
4537,
16,
619,
13,
309,
486,
1140,
18,
803,
18,
1808,
12,
74,
4672,
1002,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11871,
1458,
768,
12,
92,
4672,
284,
273,
1140,
18,
803,
18,
5701,
12,
6891,
911,
18,
16227,
18,
13603,
67,
4537,
16,
619,
13,
309,
486,
1140,
18,
803,
18,
1808,
12,
74,
4672,
1002,
... |
self.assertEquals(v.floatval, x ** y) | assert v.floatval == x ** y | def test_pow_ffn(self): x = 10.0 y = 2.0 f1 = fobj.W_FloatObject(self.space, x) f2 = fobj.W_FloatObject(self.space, y) v = fobj.pow__Float_Float_ANY(self.space, f1, f2, self.space.w_None) self.assertEquals(v.floatval, x ** y) f1 = fobj.W_FloatObject(self.space, -1.23) f2 = fobj.W_FloatObject(self.space, -4.56) self.assertEquals(self.space.w_ValueError, self._unwrap_nonimpl(fobj.pow__Float_Float_ANY, self.space, f1, f2, self.space.w_None)) | 7e5b2986d5f9080beeee6b5d155b4e18f7fbaf8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/7e5b2986d5f9080beeee6b5d155b4e18f7fbaf8f/test_floatobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
23509,
67,
1403,
82,
12,
2890,
4672,
619,
273,
1728,
18,
20,
677,
273,
576,
18,
20,
284,
21,
273,
24705,
18,
59,
67,
4723,
921,
12,
2890,
18,
2981,
16,
619,
13,
284,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23509,
67,
1403,
82,
12,
2890,
4672,
619,
273,
1728,
18,
20,
677,
273,
576,
18,
20,
284,
21,
273,
24705,
18,
59,
67,
4723,
921,
12,
2890,
18,
2981,
16,
619,
13,
284,
22,
... |
pl += [(s, self.findSpot(el, s))] | real = s.singlet_neighbor() if real not in rl: pl += [(s, self.findSpot(el, s))] rl += [real] elif platform.atom_debug: print "fyi (ATOM_DEBUG): depositMode.attach refrained from causing bug232 by bonding twice to %r" % real | def attach(self, el, singlet): if not el.numbonds: return (None, "%s makes no bonds; can't attach one to an open bond" % el.name) spot = self.findSpot(el, singlet) pl = [] mol = singlet.molecule cr = el.rcovalent | 4c0b350b560118bf09fc9631ffead08e7737b6a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/4c0b350b560118bf09fc9631ffead08e7737b6a1/depositMode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3306,
12,
2890,
16,
415,
16,
4864,
1810,
4672,
309,
486,
415,
18,
2107,
70,
4096,
30,
327,
261,
7036,
16,
2213,
87,
7297,
1158,
15692,
31,
848,
1404,
3306,
1245,
358,
392,
1696,
8427,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3306,
12,
2890,
16,
415,
16,
4864,
1810,
4672,
309,
486,
415,
18,
2107,
70,
4096,
30,
327,
261,
7036,
16,
2213,
87,
7297,
1158,
15692,
31,
848,
1404,
3306,
1245,
358,
392,
1696,
8427,
... |
group = randomName(n=nlen) | group = "%s%s" % (prefix,randomName(n = nlen)) | def randomName(n=8): chars = 'abcdefghijklmnopqrstuvwxyz0123456789' return "_%s" % ''.join([chars[rand(0,len(chars))] for i in range(n)]) | 7ce30dac7ae647b16c2f51350812b92c2a4f962b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11796/7ce30dac7ae647b16c2f51350812b92c2a4f962b/Symbol.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2744,
461,
12,
82,
33,
28,
4672,
5230,
273,
296,
28953,
17680,
8302,
16391,
13607,
556,
85,
16114,
30900,
17177,
26684,
11,
327,
4192,
9,
87,
6,
738,
875,
18,
5701,
3816,
7549,
63,
788... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2744,
461,
12,
82,
33,
28,
4672,
5230,
273,
296,
28953,
17680,
8302,
16391,
13607,
556,
85,
16114,
30900,
17177,
26684,
11,
327,
4192,
9,
87,
6,
738,
875,
18,
5701,
3816,
7549,
63,
788... |
{'message' : '', 'args' : ('foo', 'bar')}), | {'message' : '', 'args' : ('foo', 'bar'), 'filename' : None, 'errno' : 'foo', 'strerror' : 'bar'}), | def testAttributes(self): # test that exception attributes are happy | 3171c2d3fc77093826d7252ea0224fa1dfe56920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/3171c2d3fc77093826d7252ea0224fa1dfe56920/test_exceptions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
2498,
12,
2890,
4672,
468,
1842,
716,
1520,
1677,
854,
5622,
2074,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
2498,
12,
2890,
4672,
468,
1842,
716,
1520,
1677,
854,
5622,
2074,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.set(field.getName(), instance, field.default) | self.set(field.getName(), instance, field.getDefault(instance)) | def initializeField(self, instance, field): # Check for already existing field to avoid the reinitialization # (which means overwriting) of an already existing field after a # copy or rename operation base = aq_base (instance) if not base._md.has_key(field.getName()): self.set(field.getName(), instance, field.default) | 5789e353a1591d2efdd3ed4c450434d674334bf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/5789e353a1591d2efdd3ed4c450434d674334bf3/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
974,
12,
2890,
16,
791,
16,
652,
4672,
468,
2073,
364,
1818,
2062,
652,
358,
4543,
225,
326,
283,
6769,
1588,
468,
261,
12784,
4696,
23492,
13,
434,
392,
1818,
2062,
652,
1839,
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,
4046,
974,
12,
2890,
16,
791,
16,
652,
4672,
468,
2073,
364,
1818,
2062,
652,
358,
4543,
225,
326,
283,
6769,
1588,
468,
261,
12784,
4696,
23492,
13,
434,
392,
1818,
2062,
652,
1839,
2... |
g = np.empty(n + self.ndual) if gf is None: g[:n] = self.nlp.grad(x) else: g[:n] = gf.copy() if check_optimal: res, self.optimal = self.AtOptimality(x, z, g=g[:n]) self.dRes = res[0] ; self.cRes = res[2] ; self.pRes = res[4] | def grad(self, x, z, **kwargs): """ Evaluate the gradient of the primal-dual merit function at (x,z). The gradient of the objective function at `x`, if known, can be passed via the keyword argument `g`. See :meth:`PDMerit` for a description of `z`. """ mu = kwargs.get('mu', self.mu) check_optimal = kwargs.get('check_optimal', False) gf = kwargs.get('g', None) | 9a6c4f472b4224b483cf355221f1a3acafaa6be3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13857/9a6c4f472b4224b483cf355221f1a3acafaa6be3/pdmerit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6058,
12,
2890,
16,
619,
16,
998,
16,
2826,
4333,
4672,
3536,
18176,
326,
10292,
434,
326,
846,
2840,
17,
72,
1462,
4045,
305,
445,
622,
261,
92,
16,
94,
2934,
1021,
10292,
434,
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,
6058,
12,
2890,
16,
619,
16,
998,
16,
2826,
4333,
4672,
3536,
18176,
326,
10292,
434,
326,
846,
2840,
17,
72,
1462,
4045,
305,
445,
622,
261,
92,
16,
94,
2934,
1021,
10292,
434,
326,
... | |
self.showSearch = False | def OnCancelDetails(self, button): """ Cancels the username/password editing operation. Parameters: button -- reserved for GTK callbacks. Don't use it explicitly. """ self.loginWindow.destroy() self.showSearch = False | 12f2353016f23f0ee222f19c86d68f25f1879b24 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10033/12f2353016f23f0ee222f19c86d68f25f1879b24/FreesoundSearch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
6691,
3790,
12,
2890,
16,
3568,
4672,
3536,
10347,
87,
326,
2718,
19,
3664,
15755,
1674,
18,
225,
7012,
30,
3568,
1493,
8735,
364,
19688,
47,
6689,
18,
7615,
1404,
999,
518,
8122,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
6691,
3790,
12,
2890,
16,
3568,
4672,
3536,
10347,
87,
326,
2718,
19,
3664,
15755,
1674,
18,
225,
7012,
30,
3568,
1493,
8735,
364,
19688,
47,
6689,
18,
7615,
1404,
999,
518,
8122,
... | |
import hotshot, hotshot.stats | import hotshot import hotshot.stats | def _profiler(req): """ This handler wrap the default handler with a profiler. Profiling data is written into CFG_TMPDIR/invenio-profile-stats-datetime.raw, and is displayed at the bottom of the webpage. To use add profile=1 to your url. To change sorting algorithm you can provide profile=algorithm_name. You can add more than one profile requirement like ?profile=time&profile=cumulative. The list of available algorithm is displayed at the end of the profile. """ args = {} if req.args: args = cgi.parse_qs(req.args) if 'profile' in args: if not isUserSuperAdmin(collect_user_info(req)): return _handler(req) | 00bdd4e15cae5bba82b87f2de4cd2c3f177919b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/00bdd4e15cae5bba82b87f2de4cd2c3f177919b7/webinterface_handler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
23097,
12,
3658,
4672,
3536,
1220,
1838,
2193,
326,
805,
1838,
598,
279,
16583,
18,
1186,
74,
4973,
501,
353,
5941,
1368,
7577,
67,
28259,
4537,
19,
267,
3995,
1594,
17,
5040,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
23097,
12,
3658,
4672,
3536,
1220,
1838,
2193,
326,
805,
1838,
598,
279,
16583,
18,
1186,
74,
4973,
501,
353,
5941,
1368,
7577,
67,
28259,
4537,
19,
267,
3995,
1594,
17,
5040,
17,
... |
while os.path.lexists(path+tmpfilename): | while os.path.exists(path+tmpfilename): | def gettmpfilename(self,path,prefix,ext): tmpfilename=prefix+'-0'+ext tmpcount=0 while os.path.lexists(path+tmpfilename): tmpcount+=1 tmpfilename=prefix+'-'+str(tmpcount)+ext f=open(path+tmpfilename,'wb') # Just create the file f.close() return tmpfilename | a23aab3cca4213a18f7de633eeab28f6386139ab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/a23aab3cca4213a18f7de633eeab28f6386139ab/DamnVid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
5645,
3459,
12,
2890,
16,
803,
16,
3239,
16,
408,
4672,
1853,
3459,
33,
3239,
6797,
17,
20,
11,
15,
408,
1853,
1883,
33,
20,
1323,
1140,
18,
803,
18,
1808,
12,
803,
15,
5645,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5645,
3459,
12,
2890,
16,
803,
16,
3239,
16,
408,
4672,
1853,
3459,
33,
3239,
6797,
17,
20,
11,
15,
408,
1853,
1883,
33,
20,
1323,
1140,
18,
803,
18,
1808,
12,
803,
15,
5645,
... |
from waflib import Options | def build(bld): from waflib import Options tp = Options.options.progtype features = 'c cprogram' if tp == 'shlib': features = 'c cshlib' elif tp == 'stlib': features = 'c cstlib' elif tp == 'objects': features = 'c' source = Options.options.source bld(features=features, source=source) | 1ea73628fb01c9fb303a6b972d12314c5b195c66 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2886/1ea73628fb01c9fb303a6b972d12314c5b195c66/dbdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
12,
70,
1236,
4672,
8071,
273,
5087,
18,
2116,
18,
14654,
723,
4467,
273,
296,
71,
276,
12890,
11,
309,
8071,
422,
296,
674,
2941,
4278,
4467,
273,
296,
71,
276,
674,
2941,
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,
1361,
12,
70,
1236,
4672,
8071,
273,
5087,
18,
2116,
18,
14654,
723,
4467,
273,
296,
71,
276,
12890,
11,
309,
8071,
422,
296,
674,
2941,
4278,
4467,
273,
296,
71,
276,
674,
2941,
11,
... | |
return apply(func, args) | return apply(func, args, kw) | def runcall(self, func, *args): self.set_cmd(`func`) sys.setprofile(self.dispatcher) try: return apply(func, args) finally: sys.setprofile(None) | 7c76e9ea47c5473c749a68d4ceef4f076daffc4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7c76e9ea47c5473c749a68d4ceef4f076daffc4a/profile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
551,
454,
12,
2890,
16,
1326,
16,
380,
1968,
4672,
365,
18,
542,
67,
4172,
12,
68,
644,
24065,
2589,
18,
542,
5040,
12,
2890,
18,
18495,
13,
775,
30,
327,
2230,
12,
644,
16,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
551,
454,
12,
2890,
16,
1326,
16,
380,
1968,
4672,
365,
18,
542,
67,
4172,
12,
68,
644,
24065,
2589,
18,
542,
5040,
12,
2890,
18,
18495,
13,
775,
30,
327,
2230,
12,
644,
16,
8... |
logging.error("Builder name (%s) is not in the results.json file." % | logging.debug("Builder name (%s) is not in the results.json file." % | def _GetJSON(self): """Gets the results for the results.json file.""" failures_for_json = {} for test in self._failures: failures_for_json[test] = ResultAndTime(test, self._all_tests) failures_for_json[test].result = self._GetResultsCharForTest(test) | 51fe99fe634b597a5852185b11b8dae0e9f38004 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/51fe99fe634b597a5852185b11b8dae0e9f38004/json_results_generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
967,
2986,
12,
2890,
4672,
3536,
3002,
326,
1686,
364,
326,
1686,
18,
1977,
585,
12123,
11720,
67,
1884,
67,
1977,
273,
2618,
364,
1842,
316,
365,
6315,
26268,
30,
11720,
67,
1884,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
967,
2986,
12,
2890,
4672,
3536,
3002,
326,
1686,
364,
326,
1686,
18,
1977,
585,
12123,
11720,
67,
1884,
67,
1977,
273,
2618,
364,
1842,
316,
365,
6315,
26268,
30,
11720,
67,
1884,
... |
Either upload a message file: <input type='file' name='file'><br> Or paste the whole message (incuding headers) here:<br> <textarea name='text' rows='3' cols='60'></textarea><br> Is this message <input type='radio' name='which' value='ham'>Ham</input> or <input type='radio' name='which' value='spam' checked>Spam</input>?<br> <input type='submit' value='Train on this message'> </form>""" def __init__(self, clientSocket, bayes): BrighterAsyncChat.__init__(self, clientSocket) | Either upload a message file: <input type='file' name='file' value=''><br> Or paste the whole message (incuding headers) here:<br> <textarea name='text' rows='3' cols='60'></textarea><br> %s </form>""" uploadSumbit = """<input type='submit' name='which' value='%s'>""" train = upload % ('train', (uploadSumbit % "Train as Spam") + " " + \ (uploadSumbit % "Train as Ham")) classify = upload % ('classify', uploadSumbit % "Classify") def __init__(self, clientSocket, bayes, socketMap=asyncore.socket_map): BrighterAsyncChat.__init__(self) BrighterAsyncChat.set_socket(self, clientSocket, socketMap) | def __init__(self, uiPort, bayes): uiArgs = (bayes,) Listener.__init__(self, uiPort, UserInterface, uiArgs) | bb67db5e2dc016a7be764205cf241b78d334ff9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/bb67db5e2dc016a7be764205cf241b78d334ff9b/pop3proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5915,
2617,
16,
324,
528,
281,
4672,
5915,
2615,
273,
261,
70,
528,
281,
16,
13,
10652,
16186,
2738,
972,
12,
2890,
16,
5915,
2617,
16,
21369,
16,
5915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
5915,
2617,
16,
324,
528,
281,
4672,
5915,
2615,
273,
261,
70,
528,
281,
16,
13,
10652,
16186,
2738,
972,
12,
2890,
16,
5915,
2617,
16,
21369,
16,
5915,
... |
'UPDATE %(table)s' ' SET local_id = COALESCE(' ' (SELECT MAX(local_id)' ' FROM %(table)s' ' WHERE local_site_id = %(local_site_id)s) + 1,' ' 1),' ' local_site_id = %(local_site_id)s' ' WHERE %(table)s.id = %(id)s' % { | 'UPDATE %(table)s SET' ' local_id = COALESCE(' ' (SELECT MAX(local_id) from' ' (SELECT local_id FROM %(table)s' ' WHERE local_site_id = %(local_site_id)s) as x' ' ) + 1,' ' 1),' ' local_site_id = %(local_site_id)s' ' WHERE %(table)s.id = %(id)s' % { | def create(self, user, repository, changenum=None, local_site=None): """ Creates a new review request, optionally filling in fields based off a change number. """ if changenum: try: review_request = self.get(changenum=changenum, repository=repository) raise ChangeNumberInUseError(review_request) except ObjectDoesNotExist: pass | b59dea59ecc9dd260fdad4f226f11b2fc674224c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1600/b59dea59ecc9dd260fdad4f226f11b2fc674224c/managers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
729,
16,
3352,
16,
9435,
7924,
33,
7036,
16,
1191,
67,
4256,
33,
7036,
4672,
3536,
10210,
279,
394,
10725,
590,
16,
8771,
25740,
316,
1466,
2511,
3397,
279,
2549,
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,
12,
2890,
16,
729,
16,
3352,
16,
9435,
7924,
33,
7036,
16,
1191,
67,
4256,
33,
7036,
4672,
3536,
10210,
279,
394,
10725,
590,
16,
8771,
25740,
316,
1466,
2511,
3397,
279,
2549,
13... |
elsjke: | else: | def __init__(self, *args, **kwargs): """Initialize a todo object. | 0cb6309c46a3ff25cfe45296590bb702a8ae3017 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14391/0cb6309c46a3ff25cfe45296590bb702a8ae3017/base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
7520,
279,
10621,
733,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
7520,
279,
10621,
733,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
x = weekDay * self.widthCol + (self.widthCol - width) / 2 | columnStart = SEPARATOR_MARGIN + weekDay * self.widthCol x = columnStart + (self.widthCol - width) / 2 | def DrawMonth(self, dc, startDate, y, highlightDate = False): """ draw a single month return the updated value of y """ dc.SetTextForeground(wx.BLACK); | 84c4bc15380f5750da01c23d4be1b1b030ee253e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/84c4bc15380f5750da01c23d4be1b1b030ee253e/minical.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
5445,
12,
2890,
16,
6744,
16,
12572,
16,
677,
16,
8839,
1626,
273,
1083,
4672,
3536,
3724,
279,
2202,
3138,
327,
326,
3526,
460,
434,
677,
3536,
6744,
18,
694,
1528,
23206,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
5445,
12,
2890,
16,
6744,
16,
12572,
16,
677,
16,
8839,
1626,
273,
1083,
4672,
3536,
3724,
279,
2202,
3138,
327,
326,
3526,
460,
434,
677,
3536,
6744,
18,
694,
1528,
23206,
12,
... |
cr.execute('CREATE TABLE "%s" ("%s" INTEGER NOT NULL REFERENCES "%s" ON DELETE CASCADE, "%s" INTEGER NOT NULL REFERENCES "%s" ON DELETE CASCADE) WITH OIDS' % (f._rel, f._id1, self._table, f._id2, ref)) | cr.execute('CREATE TABLE "%s" ("%s" INTEGER NOT NULL REFERENCES "%s" ON DELETE CASCADE, "%s" INTEGER NOT NULL REFERENCES "%s" ON DELETE CASCADE, UNIQUE("%s","%s")) WITH OIDS' % (f._rel, f._id1, self._table, f._id2, ref, f._id1, f._id2)) | def _auto_init(self, cr, context=None): if context is None: context = {} store_compute = False create = False todo_end = [] self._field_create(cr, context=context) if getattr(self, '_auto', True): cr.execute("SELECT relname FROM pg_class WHERE relkind IN ('r','v') AND relname=%s", (self._table,)) if not cr.rowcount: cr.execute('CREATE TABLE "%s" (id SERIAL NOT NULL, PRIMARY KEY(id)) WITHOUT OIDS' % (self._table,)) cr.execute("COMMENT ON TABLE \"%s\" IS '%s'" % (self._table, self._description.replace("'", "''"))) create = True self.__schema.debug("Table '%s': created", self._table) | 456579b198cd0ec544c90c36226308d298ea93fa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/456579b198cd0ec544c90c36226308d298ea93fa/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6079,
67,
2738,
12,
2890,
16,
4422,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
1707,
67,
9200,
273,
1083,
752,
273,
1083,
10621,
67,
409,
273,
5378,
365,
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,
389,
6079,
67,
2738,
12,
2890,
16,
4422,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
1707,
67,
9200,
273,
1083,
752,
273,
1083,
10621,
67,
409,
273,
5378,
365,
6... |
def parseSignature(self, token): signature = [] if token != None and token[0] == "sep" and token[1] == ')': self.signature = [] token = self.token() return token while token != None: token = self.parseType(token) if token != None and token[0] == "name": signature.append((self.type, token[1], None)) token = self.token() elif token != None and token[0] == "sep" and token[1] == ',': token = self.token() continue elif token != None and token[0] == "sep" and token[1] == ')': | def parseSignature(self, token): signature = [] if token != None and token[0] == "sep" and token[1] == ')': self.signature = [] token = self.token() return token while token != None: token = self.parseType(token) if token != None and token[0] == "name": signature.append((self.type, token[1], None)) token = self.token() elif token != None and token[0] == "sep" and token[1] == ',': token = self.token() continue elif token != None and token[0] == "sep" and token[1] == ')': | def parseSignature(self, token): signature = [] | c7d1398e49a7858195b4b8e0b9832ded1fb9f169 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3857/c7d1398e49a7858195b4b8e0b9832ded1fb9f169/apibuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
5374,
12,
2890,
16,
1147,
4672,
3372,
273,
5378,
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,
1109,
5374,
12,
2890,
16,
1147,
4672,
3372,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
basenm = os.path.basename(fnm) cachedfile = os.path.join(cachedir, basenm ) if os.path.exists(cachedfile): if mtime(fnm) > mtime(cachedfile): | cacheindexfn = os.path.join(cachedir, "index.dat") if os.path.exists(cacheindexfn): cache_index = eval(open(cacheindexfn, "r").read()) else: cache_index = {} basenm = os.path.normcase(os.path.basename(fnm)) digest = cacheDigest(fnm) cachedfile = os.path.join(cachedir, basenm) if cache_index.has_key(basenm): if digest != cache_index[basenm]: | def checkCache(fnm, strip, upx): if not strip and not upx: return fnm if strip: strip = 1 else: strip = 0 if upx: upx = 1 else: upx = 0 cachedir = os.path.join(HOMEPATH, 'bincache%d%d' % (strip, upx)) if not os.path.exists(cachedir): os.makedirs(cachedir) basenm = os.path.basename(fnm) cachedfile = os.path.join(cachedir, basenm ) if os.path.exists(cachedfile): if mtime(fnm) > mtime(cachedfile): os.remove(cachedfile) else: return cachedfile if upx: if strip: fnm = checkCache(fnm, 1, 0) cmd = "upx --best -q \"%s\"" % cachedfile else: cmd = "strip \"%s\"" % cachedfile shutil.copy2(fnm, cachedfile) os.chmod(cachedfile, 0755) os.system(cmd) return cachedfile | 4dfbc7c545de1e3afa6c9c68f2ce6bbb634a2769 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11925/4dfbc7c545de1e3afa6c9c68f2ce6bbb634a2769/Build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
1649,
12,
4293,
81,
16,
2569,
16,
731,
92,
4672,
309,
486,
2569,
471,
486,
731,
92,
30,
327,
2295,
81,
309,
2569,
30,
2569,
273,
404,
469,
30,
2569,
273,
374,
309,
731,
92,
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,
866,
1649,
12,
4293,
81,
16,
2569,
16,
731,
92,
4672,
309,
486,
2569,
471,
486,
731,
92,
30,
327,
2295,
81,
309,
2569,
30,
2569,
273,
404,
469,
30,
2569,
273,
374,
309,
731,
92,
30... |
item.type in ( 'audio', 'image' )) and not item.media: | item.type in ( 'audio', 'image','playlist' )) and not item.media: | def actions(self, item): """ create list of possible actions """ items = [] if ((item.type == 'video' and item.mode == 'file') or \ item.type in ( 'audio', 'image' )) and not item.media: self.item = item items.append((self.confirm_delete, _('Delete file'), 'delete')) if item.type == 'video' and hasattr(item, 'fxd_file'): items.append((self.confirm_info_delete, _('Delete info'), 'delete_info')) return items | 0298821919580333414362fc924cf00b41b11c4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/0298821919580333414362fc924cf00b41b11c4f/file_ops.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4209,
12,
2890,
16,
761,
4672,
3536,
752,
666,
434,
3323,
4209,
3536,
1516,
273,
5378,
309,
14015,
1726,
18,
723,
422,
296,
9115,
11,
471,
761,
18,
3188,
422,
296,
768,
6134,
578,
521,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4209,
12,
2890,
16,
761,
4672,
3536,
752,
666,
434,
3323,
4209,
3536,
1516,
273,
5378,
309,
14015,
1726,
18,
723,
422,
296,
9115,
11,
471,
761,
18,
3188,
422,
296,
768,
6134,
578,
521,... |
("dup",2, "DUP", "Duplicate the top stack value"), | ("dup",1, "DUP", "Duplicate the top stack value"), | def emit_opcode( op, ar, va, desc ): global curop decls.append((curop, op, ar, va, desc)) curop += 1 | 90fa114ae2e3b65028a024b297a98bcb9bc8d3a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/929/90fa114ae2e3b65028a024b297a98bcb9bc8d3a5/pel_gen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3626,
67,
556,
710,
12,
1061,
16,
419,
16,
14162,
16,
3044,
262,
30,
2552,
662,
556,
3496,
87,
18,
6923,
12443,
1397,
556,
16,
1061,
16,
419,
16,
14162,
16,
3044,
3719,
662,
556,
101... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3626,
67,
556,
710,
12,
1061,
16,
419,
16,
14162,
16,
3044,
262,
30,
2552,
662,
556,
3496,
87,
18,
6923,
12443,
1397,
556,
16,
1061,
16,
419,
16,
14162,
16,
3044,
3719,
662,
556,
101... |
print iter | def newButton_clicked(self, widget): self.check_if_new() self.check_if_changed() | b8c98d17b15a17c88b10a847f15fc082e5e7a6c7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/b8c98d17b15a17c88b10a847f15fc082e5e7a6c7/arkadas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
3616,
67,
7475,
329,
12,
2890,
16,
3604,
4672,
365,
18,
1893,
67,
430,
67,
2704,
1435,
365,
18,
1893,
67,
430,
67,
6703,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
3616,
67,
7475,
329,
12,
2890,
16,
3604,
4672,
365,
18,
1893,
67,
430,
67,
2704,
1435,
365,
18,
1893,
67,
430,
67,
6703,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
edges[voc][parent] = [ child ] else: edges[voc][parent].append (child) | edges[voc][parent] = [ (edgeType, child) ] else: edges[voc][parent].append ( (edgeType, child) ) | def findVocabularies (self): # edges[vocab] = {parent : [ child 1, child 2, ... child n ]} edges = {} | 4a7303d9450b9421704bf8f984bb762c92631b18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/536/4a7303d9450b9421704bf8f984bb762c92631b18/vocabulary_gatherer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
58,
6780,
2490,
606,
261,
2890,
4672,
468,
5231,
63,
15913,
65,
273,
288,
2938,
294,
306,
1151,
404,
16,
1151,
576,
16,
1372,
1151,
290,
308,
97,
5231,
273,
2618,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
58,
6780,
2490,
606,
261,
2890,
4672,
468,
5231,
63,
15913,
65,
273,
288,
2938,
294,
306,
1151,
404,
16,
1151,
576,
16,
1372,
1151,
290,
308,
97,
5231,
273,
2618,
2,
-100,
-100,
... |
(nUserSub,maxNumSubInCloud)) | (totalUserSub,maxNumSubInAllCloud)) continue if len(allCandidates) == 0: self.putLog("skip since no candidates") | def run(self): try: # check cloud if not self.jobs[0].cloud in ['US','FR']: return self.putLog("start for %s" % self.jobs[0].cloud) # ignore HC and group production if self.jobs[0].processingType in ['hammercloud','gangarobot']: self.putLog("skip due to processingType=%s" % self.jobs[0].processingType) self.putLog("end for %s" % self.jobs[0].cloud) return # ignore HC and group production if not self.jobs[0].workingGroup in ['NULL',None,'']: self.putLog("skip due to workingGroup=%s" % self.jobs[0].workingGroup) self.putLog("end for %s" % self.jobs[0].cloud) return # get input datasets inputDatasets = [] for tmpJob in self.jobs: if tmpJob.prodSourceLabel == 'user': for tmpFile in tmpJob.Files: if tmpFile.type == 'input' and not tmpFile.lfn.endswith('.lib.tgz'): if not tmpFile.dataset in inputDatasets: inputDatasets.append(tmpFile.dataset) # loop over all input datasets for inputDS in inputDatasets: # only mc or data datasets moveFlag = False for projectName in ['mc','data']: if inputDS.startswith(projectName): moveFlag = True if not moveFlag: self.putLog("skip non official dataset %s" % inputDS) continue if re.search('_sub\d+$',inputDS) != None or re.search('_dis\d+$',inputDS) != None: self.putLog("skip dis/sub dataset %s" % inputDS) continue # check type tmpItems = inputDS.split('.') if len(tmpItems) < 5: self.putLog("cannot get type from %s" % inputDS) continue if tmpItems[4] in ngDataTypes: self.putLog("don't move %s : %s" % (tmpItems[4],inputDS)) continue # get candidate sites self.putLog("get candidates for %s" % inputDS) status,sitesMaps = self.getCandidates(inputDS,self.jobs[0].cloud) if not status: self.putLog("failed to get candidates") continue # loop over all datasets for tmpDS,(candSites,sitesComDS,sitesIncomDS,nUserSub,t1HasReplica) in sitesMaps.iteritems(): self.putLog("constituent DS %s" % tmpDS) self.putLog("sites with comp DS %s - incomp %s - candidates %s - nSub %s - T1 %s" % \ (str(sitesComDS),str(sitesIncomDS),str(candSites),nUserSub,t1HasReplica)) # no candidates if candSites == []: self.putLog("skip since no candidates") continue # no replica in the cloud if sitesComDS == [] and not t1HasReplica: self.putLog("no replica in the cloud") continue # check number of replicas maxSitesHaveDS = 1 if not t1HasReplica: maxSitesHaveDS += 1 if len(sitesComDS) >= maxSitesHaveDS: self.putLog("skip since many sites (%s>=%s) have the replica" % (len(sitesComDS),maxSitesHaveDS)) continue # check the number of subscriptions maxNumSubInCloud = 1 if nUserSub >= maxNumSubInCloud: self.putLog("skip since enough subscriptions (%s>=%s) were already made" % \ (nUserSub,maxNumSubInCloud)) continue # run brokerage tmpJob = JobSpec() tmpJob.AtlasRelease = '' self.putLog("run brokerage for %s" % tmpDS) brokerage.broker.schedule([tmpJob],self.taskBuffer,self.siteMapper,True,candSites,True) self.putLog("site -> %s" % tmpJob.computingSite) # make subscription subRet,dq2ID = self.makeSubscription(tmpDS,tmpJob.computingSite) # update database if subRet: self.taskBuffer.addUserSubscription(tmpDS,[dq2ID]) self.putLog("end for %s" % self.jobs[0].cloud) except: errType,errValue = sys.exc_info()[:2] self.putLog("%s %s" % (errType,errValue),'error') | a629e68319bffcc2eb3c4cbb966a1d12e08cd038 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7525/a629e68319bffcc2eb3c4cbb966a1d12e08cd038/DynDataDistributer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
775,
30,
468,
866,
5051,
309,
486,
365,
18,
10088,
63,
20,
8009,
7277,
316,
10228,
3378,
17023,
9981,
3546,
30,
327,
365,
18,
458,
1343,
2932,
1937,
364,
738,
87,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
775,
30,
468,
866,
5051,
309,
486,
365,
18,
10088,
63,
20,
8009,
7277,
316,
10228,
3378,
17023,
9981,
3546,
30,
327,
365,
18,
458,
1343,
2932,
1937,
364,
738,
87,... |
for lang in self.firstSubject().openCodes(): | oc = self.firstSubject().openCodes() if wikipedia.mylang in oc: return wikipedia.mylang for lang in oc: | def maxOpenCode(self): """Return the code of the foreign language that has the most open queries plus the number. If there is nothing left, return None, 0. Only languages that are TODO for the first Subject are returned.""" max = 0 maxlang = None | dac20809f1dfc6a36bd3446b6e86eeeecd7e02fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/dac20809f1dfc6a36bd3446b6e86eeeecd7e02fe/interwiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
943,
3678,
1085,
12,
2890,
4672,
3536,
990,
326,
981,
434,
326,
5523,
2653,
716,
711,
326,
4486,
1696,
6218,
8737,
326,
1300,
18,
971,
1915,
353,
5083,
2002,
16,
327,
599,
16,
374,
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,
943,
3678,
1085,
12,
2890,
4672,
3536,
990,
326,
981,
434,
326,
5523,
2653,
716,
711,
326,
4486,
1696,
6218,
8737,
326,
1300,
18,
971,
1915,
353,
5083,
2002,
16,
327,
599,
16,
374,
18,... |
print js | def get_place(self, place): js = loads(urlopen(self.geo_url % (place, 1)).read()) print js if js['totalResultsCount'] == 0: return None info = js['geonames'][0] return {'name': "%s, %s, %s" % (info['name'], info['adminName1'], info['countryName']), 'lng': radians(info['lng']), 'lat': radians(info['lat'])} | 2455927af5e8d19e6a3fbc0fe954cf15094c0a9f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12048/2455927af5e8d19e6a3fbc0fe954cf15094c0a9f/lookup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
964,
12,
2890,
16,
3166,
4672,
3828,
273,
6277,
12,
295,
18589,
12,
2890,
18,
12376,
67,
718,
738,
261,
964,
16,
404,
13,
2934,
896,
10756,
309,
3828,
3292,
4963,
3447,
1380,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
964,
12,
2890,
16,
3166,
4672,
3828,
273,
6277,
12,
295,
18589,
12,
2890,
18,
12376,
67,
718,
738,
261,
964,
16,
404,
13,
2934,
896,
10756,
309,
3828,
3292,
4963,
3447,
1380,
... | |
size = self.footprint//np.nbytes[np.float] | size = self.footprint//np.nbytes[self.dtype] | def setUp(self): UTConversionDataArrayNumPy.setUp(self) size = self.footprint//np.nbytes[np.float] digits, shape = shapeopt(1000, size//3, ndims=3, ecc=0.3) if self.verbose>=1: print 'digits=%8.3f, shape=%s' % (digits,shape) self.shape = shape + (3,) self.assertAlmostEqual(np.prod(self.shape)*np.nbytes[np.float], \ self.footprint, -4) #10kB | 7b88fdcce5521d473c8d4302f68477e9e7b946f3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5735/7b88fdcce5521d473c8d4302f68477e9e7b946f3/vtk_data.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
4732,
6814,
751,
1076,
2578,
9413,
18,
542,
1211,
12,
2890,
13,
963,
273,
365,
18,
10923,
1188,
759,
6782,
18,
82,
3890,
63,
2890,
18,
8972,
65,
6815,
16,
2179,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
4732,
6814,
751,
1076,
2578,
9413,
18,
542,
1211,
12,
2890,
13,
963,
273,
365,
18,
10923,
1188,
759,
6782,
18,
82,
3890,
63,
2890,
18,
8972,
65,
6815,
16,
2179,
... |
elif obj == self._control: if etype == QtCore.QEvent.DragMove: return True elif etype == QtCore.QEvent.KeyPress: | elif etype == QtCore.QEvent.KeyPress: if obj == self._control: | def eventFilter(self, obj, event): """ Reimplemented to ensure a console-like behavior in the underlying text widget. """ # Re-map keys for all filtered widgets. etype = event.type() if etype == QtCore.QEvent.KeyPress and \ self._control_key_down(event.modifiers()) and \ event.key() in self._ctrl_down_remap: new_event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress, self._ctrl_down_remap[event.key()], QtCore.Qt.NoModifier) QtGui.qApp.sendEvent(obj, new_event) return True | 4a81ff91f3d0e29f82274635146715cff4a62256 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4217/4a81ff91f3d0e29f82274635146715cff4a62256/console_widget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
1586,
12,
2890,
16,
1081,
16,
871,
4672,
3536,
868,
21099,
358,
3387,
279,
2983,
17,
5625,
6885,
316,
326,
6808,
977,
3604,
18,
3536,
468,
868,
17,
1458,
1311,
364,
777,
5105,
109... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
1586,
12,
2890,
16,
1081,
16,
871,
4672,
3536,
868,
21099,
358,
3387,
279,
2983,
17,
5625,
6885,
316,
326,
6808,
977,
3604,
18,
3536,
468,
868,
17,
1458,
1311,
364,
777,
5105,
109... |
self.jigsThermoAction.setIconSet(QIconSet(self.image107)) | self.jigsThermoAction.setIconSet(QIconSet(self.image108)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() | 1fffefaa2964961cbc9adc237e2fedcbaf53df97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/1fffefaa2964961cbc9adc237e2fedcbaf53df97/MainWindowUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
529,
273,
599,
16,
2242,
273,
374,
4672,
2238,
6376,
3829,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
529,
16,
2242,
13,
365,
18,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
529,
273,
599,
16,
2242,
273,
374,
4672,
2238,
6376,
3829,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
529,
16,
2242,
13,
365,
18,
23... |
var = covariance_diagonal[idx] | var = covariance_diagonal[idx+i] | def __init__(self, xray_structure, covariance_matrix=None): crystal_symmetry_as_cif_block.__init__( self, xray_structure.crystal_symmetry()) scatterers = xray_structure.scatterers() uc = xray_structure.unit_cell() if covariance_matrix is not None: param_map = xray_structure.parameter_map() covariance_diagonal = covariance_matrix.matrix_packed_u_diagonal() u_star_to_u_cif_linear_map_pow2 = flex.pow2(flex.double( uc.u_star_to_u_cif_linear_map())) u_star_to_u_iso_linear_form = matrix.row( uc.u_star_to_u_iso_linear_form()) fmt = "%.6f" | 1dbcac30ce7d7697f0c7088a757842b231c4f298 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/1dbcac30ce7d7697f0c7088a757842b231c4f298/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
619,
435,
67,
7627,
16,
17366,
67,
5667,
33,
7036,
4672,
4422,
31365,
67,
8117,
18042,
67,
345,
67,
30674,
67,
2629,
16186,
2738,
972,
12,
365,
16,
619,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
619,
435,
67,
7627,
16,
17366,
67,
5667,
33,
7036,
4672,
4422,
31365,
67,
8117,
18042,
67,
345,
67,
30674,
67,
2629,
16186,
2738,
972,
12,
365,
16,
619,
... |
if re.search('.*RUNLIMIT.*',lines[i]): info = lines[i+1].split() if len(info)>=1: self.wallClockLimit = float(info[0])*60 else: self.log.warn('Problem parsing "%s" for wall clock limit' % lines[i+1]) | if re.search( '.*RUNLIMIT.*', lines[i] ): info = lines[i + 1].split() if len( info ) >= 1: self.wallClockLimit = float( info[0] ) * 60 else: self.log.warn( 'Problem parsing "%s" for wall clock limit' % lines[i + 1] ) if self.cpuRef: cmd = '%s/lshosts -w %s' % ( self.bin, self.cpuRef ) result = self.__runCommand( cmd ) if result['OK']: lines = result['Value'].split( '\n' ) l1 = lines[0].split() l2 = lines[1].split() if len( l1 ) > len( l2 ): self.log.error( cmd ) self.log.error( lines[0] ) self.log.error( lines[1] ) else: for i in range( len( l1 ) ): if l1[i] == 'cpuf': try: self.normRef = float( l2[i] ) self.log.info( 'Reference Normalization taken from Host', '%s: %s' % ( self.cpuRef, self.normRef ) ) except: pass modelMaxNorm = 0 if not self.normRef: cmd = '%s/lsinfo -m' % ( self.bin ) result = self.__runCommand( cmd ) if result['OK']: lines = result['Value'].split( '\n' ) for line in lines[1:]: l = line.split() if len( l ) > 1: try: norm = float( l[1] ) if norm > modelMaxNorm: modelMaxNorm = norm if l[0].find( self.cpuRef ) > -1: self.normRef = norm self.log.info( 'Reference Normalization taken from Host Model', '%s: %s' % ( self.cpuRef, self.normRef ) ) except: pass if not self.normRef: ret = sourceEnv( 10, [os.path.join( os.environ['LSF_ENVDIR'], 'lsf.conf' )] ) if ret['OK']: lsfEnv = ret['outputEnv'] shared = None try: egoShared = os.path.join( lsfEnv['LSF_CONFDIR'], 'ego.shared' ) lsfShared = os.path.join( lsfEnv['LSF_CONFDIR'], 'lsf.shared' ) if os.path.exists( egoShared ): shared = egoShared elif os.path.exists( lsfShared ): shared = lsfShared except: pass if shared: f = open( shared ) hostModelSection = False for l in f.readlines(): if l.find( 'Begin HostModel' ) == 0: hostModelSection = True continue if not hostModelSection: continue if l.find( 'End HostModel' ) == 0: break l = l.strip() if l and l.split()[0] == self.cpuRef: try: self.normRef = float( l.split()[1] ) self.log.info( 'Reference Normalization taken from Configuration File', '(%s) %s: %s' % ( shared, self.cpuRef, self.normRef ) ) except: pass if not self.normRef: if modelMaxNorm: self.normRef = modelMaxNorm self.log.info( 'Reference Normalization taken from Max Model:', self.normRef ) if self.host: cmd = '%s/lshosts -w %s' % ( self.bin, self.host ) result = self.__runCommand( cmd ) if result['OK']: lines = result['Value'].split( '\n' ) l1 = lines[0].split() l2 = lines[1].split() if len( l1 ) > len( l2 ): self.log.error( cmd ) self.log.error( lines[0] ) self.log.error( lines[1] ) else: for i in range( len( l1 ) ): if l1[i] == 'cpuf': try: self.hostNorm = float( l2[i] ) self.log.info( 'Host Normalization', '%s: %s' % ( self.host, self.hostNorm ) ) except: pass if self.hostNorm and self.normRef: self.hostNorm = self.hostNorm / self.normRef self.log.info( 'CPU Normalization', self.hostNorm ) | def __init__(self): """ Standard constructor """ self.log = gLogger.getSubLogger('LSFTimeLeft') self.jobID = None if os.environ.has_key('LSB_JOBID'): self.jobID = os.environ['LSB_JOBID'] self.queue = None if os.environ.has_key('LSB_QUEUE'): self.queue = os.environ['LSB_QUEUE'] self.bin = None if os.environ.has_key('LSF_BINDIR'): self.bin = os.environ['LSF_BINDIR'] self.year = time.strftime('%Y',time.gmtime()) self.log.verbose('LSB_JOBID=%s, LSB_QUEUE=%s, LSF_BINDIR=%s' %(self.jobID,self.queue,self.bin)) | b590345882082ff68315923d410c01c4d6437735 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/b590345882082ff68315923d410c01c4d6437735/LSFTimeLeft.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
3536,
8263,
3885,
3536,
365,
18,
1330,
273,
314,
3328,
18,
588,
1676,
3328,
2668,
3045,
42,
950,
3910,
6134,
365,
18,
4688,
734,
273,
599,
309,
1140,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
3536,
8263,
3885,
3536,
365,
18,
1330,
273,
314,
3328,
18,
588,
1676,
3328,
2668,
3045,
42,
950,
3910,
6134,
365,
18,
4688,
734,
273,
599,
309,
1140,
1... |
gnome20.addmod('bug-buddy', dependencies=['libgnomeui']) | gnome20.addmod('bug-buddy', revision='gnome-2-0', dependencies=['libgnomeui']) | def sfcvsroot(project): return ':pserver:anonymous@cvs.%s.sourceforge.net:/cvsroot/%s' % \ (project, project) | b2d511aeb6ff84145aee6318694d3021ca0539fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4596/b2d511aeb6ff84145aee6318694d3021ca0539fd/moduleinfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
7142,
6904,
3085,
12,
4406,
4672,
327,
4290,
84,
3567,
30,
19070,
36,
71,
6904,
7866,
87,
18,
3168,
1884,
908,
18,
2758,
27824,
71,
6904,
3085,
5258,
87,
11,
738,
521,
261,
4406,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
7142,
6904,
3085,
12,
4406,
4672,
327,
4290,
84,
3567,
30,
19070,
36,
71,
6904,
7866,
87,
18,
3168,
1884,
908,
18,
2758,
27824,
71,
6904,
3085,
5258,
87,
11,
738,
521,
261,
4406,
... |
break | def removeUser(self, user): for cuser in self.users: if(cuser.user == user): self.users.remove(cuser) break user.channels.remove(self) | 8288e122d36aa8eed19c475fbd1510414ee8720a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11670/8288e122d36aa8eed19c475fbd1510414ee8720a/IRC_Server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
1299,
12,
2890,
16,
729,
4672,
364,
276,
1355,
316,
365,
18,
5577,
30,
309,
12,
71,
1355,
18,
1355,
422,
729,
4672,
365,
18,
5577,
18,
4479,
12,
71,
1355,
13,
729,
18,
9114,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
1299,
12,
2890,
16,
729,
4672,
364,
276,
1355,
316,
365,
18,
5577,
30,
309,
12,
71,
1355,
18,
1355,
422,
729,
4672,
365,
18,
5577,
18,
4479,
12,
71,
1355,
13,
729,
18,
9114,
... | |
tmpDQSeg=self.resultList | def fetchInformation(self,triggerTime=None,window=300,version=99): """ This method is responsible for queries to the data server. The results of the query become an internal list that can be converted into an HTML table. The arguments allow you to query with trigger time of interest and to change the window with each call if desired. The version argument will fetch segments with that version or higher. """ if triggerTime==int(-1): os.stdout.write("Specify trigger time please.\n") return else: self.triggerTime = int(triggerTime) try: connection=None serverURL=self.serverURL.strip("ldbd://") connection=segmentdb_utils.setup_database(serverURL) except Exception, errMsg: sys.stderr.write("Error connection to %s\n"\ %(serverURL)) sys.stderr.write("Error Message :\t %s\n"%(str(errMsg))) self.resultList=list() return try: engine=query_engine.LdbdQueryEngine(connection) gpsEnd=int(triggerTime)+int(window) gpsStart=int(triggerTime)-int(window) sqlString=self.dqvQuery%(version,gpsEnd,gpsStart) queryResult=engine.query(sqlString) self.resultList=queryResult except Exception, errMsg: sys.stderr.write("Query failed %s \n"%(self.serverURL)) sys.stdout.write("Error fetching query results at %s.\n"%(triggerTime)) sys.stderr.write("Error message seen: %s\n"%(str(errMsg))) sys.stderr.write("Query Tried: \n %s \n"%(sqlString)) return engine.close() #Coalesce the segments for each DQ flag #Reparse the information tmpDQSeg=self.resultList newDQSeg=list() if tmpDQSeg.__len__() > 0: #Obtain list of all flags uniqSegmentName=list() for ifo,name,version,start,end in tmpDQSeg: if not uniqSegmentName.__contains__((ifo,name,version)): uniqSegmentName.append((ifo,name,version)) #Save textKey for all uniq segments combos for uifo,uname,uversion in uniqSegmentName: segmentIntervals=list() #Extra segments based on uniq textKey for ifo,name,version,start,end in tmpDQSeg: if (uifo,uname,uversion)==(ifo,name,version): segmentIntervals.append((start,end)) segmentIntervals.sort() #Coalesce those segments newStyle=bool(True) if newStyle: newSegmentIntervals=self.__merge__(segmentIntervals) else: newSegmentIntervals=segmentIntervals #Write them to the object which we will return for newStart,newStop in newSegmentIntervals: newDQSeg.append([uifo,uname,uversion,newStart,newStop]) del segmentIntervals #Save the final result self.resultList=newDQSeg.sort() | efe0fcca14f849fa2f59b912ffb2e09a6dbf8e6f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/efe0fcca14f849fa2f59b912ffb2e09a6dbf8e6f/fu_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
5369,
12,
2890,
16,
10668,
950,
33,
7036,
16,
5668,
33,
19249,
16,
1589,
33,
2733,
4672,
3536,
1220,
707,
353,
14549,
364,
6218,
358,
326,
501,
1438,
18,
225,
1021,
1686,
434,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
5369,
12,
2890,
16,
10668,
950,
33,
7036,
16,
5668,
33,
19249,
16,
1589,
33,
2733,
4672,
3536,
1220,
707,
353,
14549,
364,
6218,
358,
326,
501,
1438,
18,
225,
1021,
1686,
434,
32... | |
password = "%s%s" % (Utils.GetRandomSeed(), Utils.GetRandomSeed()) | password = Utils.MakeRandomPassword() | def ProcessSubscribeCmd(self, args, cmd, mail): """Parse subscription request and send confirmation request.""" | 5551c37235c9c603bd7ae608093198c4c4d929f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/5551c37235c9c603bd7ae608093198c4c4d929f5/MailCommandHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4389,
16352,
5931,
12,
2890,
16,
833,
16,
1797,
16,
4791,
4672,
3536,
3201,
4915,
590,
471,
1366,
14296,
590,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4389,
16352,
5931,
12,
2890,
16,
833,
16,
1797,
16,
4791,
4672,
3536,
3201,
4915,
590,
471,
1366,
14296,
590,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
RFC-822 in front of you. | RFC 2822 in front of you. http://www.faqs.org/rfcs/rfc2822.html | def parseaddr(address): """Parse an address into a (realname, mailaddr) tuple.""" a = AddrlistClass(address) list = a.getaddrlist() if not list: return (None, None) else: return list[0] | 52d51c96f28f628bf085945df0f7b389d6cbc349 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/52d51c96f28f628bf085945df0f7b389d6cbc349/rfc822.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
4793,
12,
2867,
4672,
3536,
3201,
392,
1758,
1368,
279,
261,
7688,
529,
16,
4791,
4793,
13,
3193,
12123,
279,
273,
10216,
1098,
797,
12,
2867,
13,
666,
273,
279,
18,
588,
4793,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4793,
12,
2867,
4672,
3536,
3201,
392,
1758,
1368,
279,
261,
7688,
529,
16,
4791,
4793,
13,
3193,
12123,
279,
273,
10216,
1098,
797,
12,
2867,
13,
666,
273,
279,
18,
588,
4793,
1... |
from sage.rings.arith import binomial | def assmus_mattson_designs(self,t,mode=None): r""" Assmus and Mattson Theorem (section 8.4, page 303 of [HP]): Let $A_0, A_1, ..., A_n$ be the weights of the codewords in a binary linear $[n , k, d]$ code $C$, and let $A_0^*, A_1^*, ..., A_n^*$ be the weights of the codewords in its dual $[n, n-k, d^*]$ code $C^*$. Fix a $t$, $0<t<d$, and let $$ s = |{ i | A_i^* \not= 0, 0<i\leq n-t}|. $$ Assume $s\leq d-t$. (1) If $Ai\not= 0$ and $d\leq i\leq n then Ci = { c in C | wt(c) = i}$ holds a simple t-design. | 3a7625918ca06799454663aea3e731edc0d084bf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/3a7625918ca06799454663aea3e731edc0d084bf/linear_code.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1551,
81,
407,
67,
81,
4558,
816,
67,
16934,
87,
12,
2890,
16,
88,
16,
3188,
33,
7036,
4672,
436,
8395,
4725,
81,
407,
471,
490,
4558,
816,
1021,
479,
81,
261,
3464,
1725,
18,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1551,
81,
407,
67,
81,
4558,
816,
67,
16934,
87,
12,
2890,
16,
88,
16,
3188,
33,
7036,
4672,
436,
8395,
4725,
81,
407,
471,
490,
4558,
816,
1021,
479,
81,
261,
3464,
1725,
18,
24,
... | |
setup(name='Products.%s' % NAME, | setup(name='Products.GenericSetup', | def _docs_doc(name): f = open(os.path.join(docs, name)) return f.read() | 5882b57f254b824d457f51d7a2aef318521d29ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3757/5882b57f254b824d457f51d7a2aef318521d29ed/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8532,
67,
2434,
12,
529,
4672,
284,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
8532,
16,
508,
3719,
327,
284,
18,
896,
1435,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8532,
67,
2434,
12,
529,
4672,
284,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
8532,
16,
508,
3719,
327,
284,
18,
896,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
llwapp.append_process_params(doc, process, | ligolw_process.append_process_params(doc, process, | def append_process(doc, **kwargs): process = llwapp.append_process( doc, program = "ligolw_sicluster", version = __version__, cvs_repository = "lscsoft", cvs_entry_time = __date__, comment = kwargs["comment"]) llwapp.append_process_params(doc, process, [("--cluster-window", "lstring", kwargs["cluster_window"])]) if kwargs["snr_threshold"] > 0: llwapp.append_process_params(doc, process, [("--snr-threshold", "lstring", kwargs["snr_threshold"])]) if kwargs["sort_descending_snr"]: llwapp.append_process_params(doc, process, [("--sort-descending-snr", "lstring", " ")]) if kwargs["sort_ascending_snr"]: llwapp.append_process_params(doc, process, [("--sort-ascending-snr", "lstring", " ")]) return process | 3bcc745d1f2add32a760cf47b1a0f3263605c028 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/3bcc745d1f2add32a760cf47b1a0f3263605c028/ligolw_sicluster.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
67,
2567,
12,
2434,
16,
2826,
4333,
4672,
1207,
273,
6579,
91,
2910,
18,
6923,
67,
2567,
12,
997,
16,
5402,
273,
315,
80,
360,
355,
91,
67,
87,
335,
80,
1722,
3113,
1177,
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,
714,
67,
2567,
12,
2434,
16,
2826,
4333,
4672,
1207,
273,
6579,
91,
2910,
18,
6923,
67,
2567,
12,
997,
16,
5402,
273,
315,
80,
360,
355,
91,
67,
87,
335,
80,
1722,
3113,
1177,
273,
... |
CFLAGS=[ | CFLAGS.extend([ | def IfFrameWork(name, packages, extensions, headername=None): """ Return the packages and extensions if the framework exists, or two empty lists if not. """ import os for pth in ('/System/Library/Frameworks', '/Library/Frameworks'): basedir = os.path.join(pth, name) if os.path.exists(basedir): if (headername is None) or os.path.exists(os.path.join(basedir, "Headers", headername)): return packages, extensions return [], [] | f7782f4b08ea29410294f6313dcbcfc42e943368 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/97/f7782f4b08ea29410294f6313dcbcfc42e943368/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
971,
3219,
2421,
12,
529,
16,
5907,
16,
4418,
16,
1446,
529,
33,
7036,
4672,
3536,
2000,
326,
5907,
471,
4418,
309,
326,
8257,
1704,
16,
578,
2795,
1008,
6035,
309,
486,
18,
3536,
1930... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
971,
3219,
2421,
12,
529,
16,
5907,
16,
4418,
16,
1446,
529,
33,
7036,
4672,
3536,
2000,
326,
5907,
471,
4418,
309,
326,
8257,
1704,
16,
578,
2795,
1008,
6035,
309,
486,
18,
3536,
1930... |
else: | else: | def records_updater(record): (bskid, id_owner, id_record, order, date_modification) = record return "(%i,%i,%i,%i,'%s')" % (int(id_record), int(bskid), int(id_owner), int(order), escape_string(date_modification)) | 23370cd5b3382ad593a3d1e4f21772a0aeacc4a8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/23370cd5b3382ad593a3d1e4f21772a0aeacc4a8/webbasket_migration_kit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3853,
67,
25575,
12,
3366,
4672,
261,
2038,
79,
350,
16,
612,
67,
8443,
16,
612,
67,
3366,
16,
1353,
16,
1509,
67,
31064,
13,
273,
1409,
327,
7751,
9,
77,
15529,
77,
15529,
77,
15529... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3853,
67,
25575,
12,
3366,
4672,
261,
2038,
79,
350,
16,
612,
67,
8443,
16,
612,
67,
3366,
16,
1353,
16,
1509,
67,
31064,
13,
273,
1409,
327,
7751,
9,
77,
15529,
77,
15529,
77,
15529... |
task_self = frame.f_globals._task_self if task_self.options["verbose"] >= 9: | if _task_self.options["verbose"] >= 9: | def _task_sig_wakeup(sig, frame): """Signal handler for the 'wakeup' signal sent by BibSched.""" task_self = frame.f_globals._task_self if task_self.options["verbose"] >= 9: write_message("task_sig_wakeup(), got signal %s frame %s" % (sig, frame)) write_message("continuing...") task_self.task_update_status("CONTINUING") | 06b4f181e28a51366c0d7d568814d79f00866948 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/06b4f181e28a51366c0d7d568814d79f00866948/bibtask.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4146,
67,
7340,
67,
91,
911,
416,
12,
7340,
16,
2623,
4672,
3536,
11208,
1838,
364,
326,
296,
91,
911,
416,
11,
4277,
3271,
635,
605,
495,
55,
2049,
12123,
309,
389,
4146,
67,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4146,
67,
7340,
67,
91,
911,
416,
12,
7340,
16,
2623,
4672,
3536,
11208,
1838,
364,
326,
296,
91,
911,
416,
11,
4277,
3271,
635,
605,
495,
55,
2049,
12123,
309,
389,
4146,
67,
2... |
cell_1_right = """<input class="formbutton" type="submit" name="search" value="SEARCH"><input class="formbutton" type="submit" name="search" value="Browse"> """ | cell_1_right = """<input class="formbutton" type="submit" name="action" value="SEARCH"><input class="formbutton" type="submit" name="action" value="Browse"> """ | def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d, action="SEARCH"): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <h1 class="headline">%s</h1> <form action="%s/search.py" method="get"> <input type="hidden" name="cc" value="%s"> <input type="hidden" name="as" value="%s"> """ % (cc, weburl, cc, as) if ot: out += """<input type="hidden" name="ot" value="%s">""" % ot if sp: out += """<input type="hidden" name="sp" value="%s">""" % sp # decide upon leading text: leadingtext = "Search" if action == "Browse": leadingtext = "Browse" ## firstly, print Query box: if as==1: # print Advanced Search form: # define search box elements: cell_1_left = create_matchtype_box('m1', m1) + \ """<input type="text" name="p1" size="%d" value="%s">""" % (cfg_advancedsearch_pattern_box_width, cgi.escape(p1,1)) cell_1_right = create_searchwithin_selection_box('f1', f1) cell_1_moreright = create_andornot_box('op1', op1) cell_2_left = create_matchtype_box('m2', m2) + """<input type="text" name="p2" size="%d" value="%s">""" % (cfg_advancedsearch_pattern_box_width, cgi.escape(p2,1)) cell_2_right = create_searchwithin_selection_box('f2', f2) cell_2_moreright = create_andornot_box('op2', op2) cell_3_left = create_matchtype_box('m3', m3) + """<input type="text" name="p3" size="%d" value="%s">""" % (cfg_advancedsearch_pattern_box_width, cgi.escape(p3,1)) cell_3_right = create_searchwithin_selection_box('f3', f3) cell_3_moreright = """<input class="formbutton" type="submit" name="search" value="SEARCH"><input class="formbutton" type="submit" name="search" value="Browse"> """ cell_4 = """<small><a href="%s/help/search/tips.html">search tips</a> :: <a href="%s/search.py?p=%s&f=%s&cc=%s">simple search</a></small>""" % \ (weburl, weburl, urllib.quote(p1), urllib.quote(f1), urllib.quote(cc)) # print them: out += """ <table class="searchbox"> <thead> <tr> <th colspan="3" class="searchboxheader"> %s for: </th> </tr> </thead> <tbody> <tr valign="bottom"> <td class="searchboxbody">%s</td> <td class="searchboxbody">%s</td> <td class="searchboxbody">%s</td> </tr> <tr valign="bottom"> <td class="searchboxbody">%s</td> <td class="searchboxbody">%s</td> <td class="searchboxbody">%s</td> </tr> <tr valign="bottom"> <td class="searchboxbody">%s</td> <td class="searchboxbody">%s</td> <td class="searchboxbody">%s</td> </tr> <tr valign="bottom"> <td colspan="3" align="right" class="searchboxbody">%s</td> </tr> </tbody> </table> """ % \ (leadingtext, cell_1_left, cell_1_right, cell_1_moreright, \ cell_2_left, cell_2_right, cell_2_moreright, \ cell_3_left, cell_3_right, cell_3_moreright, cell_4) else: # print Simple Search form: cell_1_left = """<input type="text" name="p" size="%d" value="%s">""" % \ (cfg_simplesearch_pattern_box_width, cgi.escape(p, 1)) cell_1_middle = create_searchwithin_selection_box('f', f) cell_1_right = """<input class="formbutton" type="submit" name="search" value="SEARCH"><input class="formbutton" type="submit" name="search" value="Browse"> """ cell_2 = """<small><a href="%s/help/search/tips.html">search tips</a> :: <a href="%s/search.py?p1=%s&f1=%s&as=1&cc=%s">advanced search</a></small>""" %\ (weburl, weburl, urllib.quote(p), urllib.quote(f), urllib.quote(cc)) out += """ <table class="searchbox"> <thead> <tr> <th colspan="3" class="searchboxheader"> %s for: </th> </tr> </thead> <tbody> <tr valign="bottom"> <td class="searchboxbody">%s</td> <td class="searchboxbody">%s</td> <td class="searchboxbody">%s</td> </tr> <tr valign="bottom"> <td colspan="3" align="right" class="searchboxbody">%s</td> </tr> </tbody> </table> """ % (leadingtext, cell_1_left, cell_1_middle, cell_1_right, cell_2) ## secondly, print Collection(s) box: out += """ <table class="searchbox"> <thead> <tr> <th colspan="3" class="searchboxheader"> %s collections: </th> </tr> </thead> <tbody> <tr valign="bottom"> <td valign="top" class="searchboxbody">""" % leadingtext colls_nicely_ordered = [] if cfg_nicely_ordered_collection_list: colls_nicely_ordered = get_nicely_ordered_collection_list() else: colls_nicely_ordered = get_alphabetically_ordered_collection_list() if colls and colls[0] != cdsname: # some collections are defined, so print these first, and only then print 'add another collection' heading: for c in colls: if c: out += """<select name="c"><option value="">*** any collection ***""" for (cx, cx_printable) in colls_nicely_ordered: # print collection: if not cx.startswith("Unnamed collection"): out+= """<option value="%s"%s>%s""" % (cx, is_selected(c, re.sub("^[\s\-]*","",cx)), cx_printable) out += """</select>""" out += """<select name="c"><option value="">*** add another collection ***""" else: # we searched in CDSNAME, so print 'any collection' heading out += """<select name="c"><option value="">*** any collection ***""" for (cx, cx_printable) in colls_nicely_ordered: if not cx.startswith("Unnamed collection"): out += """<option value="%s">%s""" % (cx, cx_printable) out += """ </select> </td> </tr> </tbody> </table>""" ## thirdly, print from/until date boxen, if applicable: if action=="Browse" or (d1y=="" and d1m=="" and d1d=="" and d2y=="" and d2m=="" and d2d==""): pass # do not need it else: cell_6_a = create_inputdate_box("d1", d1y, d1m, d1d) cell_6_b = create_inputdate_box("d2", d2y, d2m, d2d) out += """<table class="searchbox"> <thead> <tr> <th class="searchboxheader"> Added since: </th> <th class="searchboxheader"> until: </th> </tr> </thead> <tbody> <tr valign="bottom"> <td class="searchboxbody">%s</td> <td class="searchboxbody">%s</td> </tr> </tbody> </table>""" % \ (cell_6_a, cell_6_b) ## fourthly, print Display/Sort box: if action != "Browse": cell_1_left = """ <select name="sf"> <option value="">- latest first -""" query = """SELECT DISTINCT(f.code),f.name FROM field AS f, collection_field_fieldvalue AS cff WHERE cff.type='soo' AND cff.id_field=f.id ORDER BY cff.score DESC, f.name ASC""" res = run_sql(query) for code, name in res: # propose found sort options: cell_1_left += """<option value="%s"%s>%s""" % (code, is_selected(sf,code), name) cell_1_left += """</select>""" cell_1_left += """<select name="so"> <option value="a"%s>asc. <option value="d"%s>desc. </select>""" % (is_selected(so,"a"),is_selected(so,"d")) cell_1_right = """ <select name="of">""" query = """SELECT code,name FROM format ORDER BY name ASC""" res = run_sql(query) if res: # propose found formats: for code, name in res: cell_1_right += """<option value="%s"%s>%s""" % (code, is_selected(of,code), name) else: # no formats are found, so propose the default HTML one: cell_1_right += """<option value="hb"%s>HTML brief""" % (is_selected(of,"hb")) # is format made of numbers only? if yes, then propose it too: if of and str(of[0:3]).isdigit(): cell_1_right += """<option value="%s" selected>%s MARC tag""" % (of, of) cell_1_right += """</select>""" ## okay, formats ended cell_1_middle = """ <select name="rg"> <option value="10"%s>10 results <option value="25"%s>25 results <option value="50"%s>50 results <option value="100"%s>100 results <option value="250"%s>250 results <option value="500"%s>500 results </select> <select name="sc"> <option value="0"%s>single list <option value="1"%s>split by collection </select> """ % (is_selected(rg,"10"), is_selected(rg,"25"), is_selected(rg,"50"), \ is_selected(rg,"100"), is_selected(rg,"250"), is_selected(rg,"500"),\ is_selected(sc,"0"), is_selected(sc,"1")) out += """ <table class="searchbox"> <thead> <tr> <th class="searchboxheader"> Sort by: </th> <th class="searchboxheader"> Display results: </th> <th class="searchboxheader"> Output format: </th> </tr> </thead> <tbody> <tr valign="bottom"> <td valign="top" class="searchboxbody">%s</td> <td valign="top" class="searchboxbody">%s</td> <td valign="top" class="searchboxbody">%s</td> </tr> </tbody> </table>""" % (cell_1_left, cell_1_middle, cell_1_right) ## last but not least, print end of search box: out += """</form>""" return out | c8bc8e9e8dcaad50892504a6b2ad935d0e8bb72d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/c8bc8e9e8dcaad50892504a6b2ad935d0e8bb72d/search_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
3072,
67,
2147,
12,
952,
16,
645,
3251,
16,
293,
16,
284,
16,
14524,
16,
9033,
16,
1427,
16,
1694,
16,
434,
16,
15835,
16,
487,
16,
293,
21,
16,
284,
21,
16,
312,
21,
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,
752,
67,
3072,
67,
2147,
12,
952,
16,
645,
3251,
16,
293,
16,
284,
16,
14524,
16,
9033,
16,
1427,
16,
1694,
16,
434,
16,
15835,
16,
487,
16,
293,
21,
16,
284,
21,
16,
312,
21,
16... |
if scheme == "wiki": return self.interwiki(word, pretty_url=1) if scheme in self.attachment_schemas: return self.attachment(word, pretty_url=1) | if scheme == "wiki": return self.interwiki(word, pretty_url=1) if scheme in self.attachment_schemas: return self.attachment(word, pretty_url=1) words = word.split(None, 1) if len(words) == 1: words = words * 2 | def _url_bracket_repl(self, word): """Handle bracketed URLs.""" word = word[1:-1] # strip brackets # Local extended link? [:page name:link text] XXX DEPRECATED if word[0] == ':': words = word[1:].split(':', 1) if len(words) == 1: words = words * 2 target_and_text = 'wiki:Self:"%s" %s' % tuple(words) return self.interwiki(target_and_text, pretty_url=1) | 38b2c33a807a471d736e03c16f4f6f1c36cc5636 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/38b2c33a807a471d736e03c16f4f6f1c36cc5636/text_moin_wiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
718,
67,
21025,
67,
26745,
12,
2890,
16,
2076,
4672,
3536,
3259,
9843,
329,
10414,
12123,
2076,
273,
2076,
63,
21,
30,
17,
21,
65,
468,
2569,
15597,
225,
468,
3566,
7021,
1692,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
718,
67,
21025,
67,
26745,
12,
2890,
16,
2076,
4672,
3536,
3259,
9843,
329,
10414,
12123,
2076,
273,
2076,
63,
21,
30,
17,
21,
65,
468,
2569,
15597,
225,
468,
3566,
7021,
1692,
35... |
page.image_glob('cbc_plotsummary_3_playground_rho_*.png') | image_list = page.image_glob('cbc_plotsummary_3_playground_rho_*.png') | def finish(self): self.file.close() | e994ee1446d54255416ae828b6e19dfbf18f256d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/e994ee1446d54255416ae828b6e19dfbf18f256d/make_summary_page.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4076,
12,
2890,
4672,
365,
18,
768,
18,
4412,
1435,
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,
4076,
12,
2890,
4672,
365,
18,
768,
18,
4412,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if self.isDisabled(irc): | if self.disabled(irc): | def doChanservNotice(self, irc, msg): if self.isDisabled(irc): return s = msg.args[1].lower() channel = None m = self._chanRe.search(s) networkGroup = conf.supybot.networks.get(irc.network) on = 'on %s' % irc.network if m is not None: channel = m.group(1) if 'all bans' in s or 'unbanned from' in s: # All bans removed (freenode) # You have been unbanned from (oftc) irc.sendMsg(networkGroup.channels.join(channel)) elif 'isn\'t registered' in s: self.log.warning('Received "%s isn\'t registered" from ChanServ %', channel, on) elif 'this channel has been registered' in s: self.log.debug('Got "Registered channel" from ChanServ %s.', on) elif 'already opped' in s: # This shouldn't happen, Services.op should refuse to run if # we already have ops. self.log.debug('Got "Already opped" from ChanServ %s.', on) elif 'access level' in s and 'is required' in s: self.log.warning('Got "Access level required" from ChanServ %s.', on) elif 'inviting' in s: self.log.debug('Got "Inviting to channel" from ChanServ %s.', on) else: self.log.warning('Got unexpected notice from ChanServ %s: %r.', on, msg) | 9b9d009c432c37faef369104660e75327304a433 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12790/9b9d009c432c37faef369104660e75327304a433/plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
6255,
23039,
20127,
12,
2890,
16,
277,
1310,
16,
1234,
4672,
309,
365,
18,
9278,
12,
481,
71,
4672,
327,
272,
273,
1234,
18,
1968,
63,
21,
8009,
8167,
1435,
1904,
273,
599,
312,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6255,
23039,
20127,
12,
2890,
16,
277,
1310,
16,
1234,
4672,
309,
365,
18,
9278,
12,
481,
71,
4672,
327,
272,
273,
1234,
18,
1968,
63,
21,
8009,
8167,
1435,
1904,
273,
599,
312,
... |
endDay = datetime(startDay.year, startDay.month, startDay.day + 1) | endDay = startDay + timedelta(days=1) | def wxSynchronizeWidget(self, **hints): # We now want the preview area to always appear. If the calendar is visible, however, we always want the # preview area to describe today, rather than the currently selected day. minical = Block.Block.findBlockByName("MiniCalendar") if isMainCalendarVisible() or not minical: today = datetime.today() startDay = datetime.combine(today, time(0)) endDay = datetime(startDay.year, startDay.month, startDay.day + 1) else: startDay = minical.widget.getSelectedDate() endDay = datetime(startDay.year, startDay.month, startDay.day + 1) | bb2a26ea141e51ada03c64851f6877fea5e9873d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/bb2a26ea141e51ada03c64851f6877fea5e9873d/CalendarBlocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7075,
19298,
554,
4609,
12,
2890,
16,
2826,
24598,
4672,
468,
1660,
2037,
2545,
326,
10143,
5091,
358,
3712,
9788,
18,
225,
971,
326,
5686,
353,
6021,
16,
14025,
16,
732,
3712,
2545,
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,
7075,
19298,
554,
4609,
12,
2890,
16,
2826,
24598,
4672,
468,
1660,
2037,
2545,
326,
10143,
5091,
358,
3712,
9788,
18,
225,
971,
326,
5686,
353,
6021,
16,
14025,
16,
732,
3712,
2545,
326... |
""" Fetch records as objects allowing to use dot notation to browse fields and relations | """Fetch records as objects allowing to use dot notation to browse fields and relations | def browse(self, cr, uid, select, context=None, list_class=None, fields_process=None): """ Fetch records as objects allowing to use dot notation to browse fields and relations | 6d24f90c7b43786999d681eee69c6827df72430a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/6d24f90c7b43786999d681eee69c6827df72430a/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21670,
12,
2890,
16,
4422,
16,
4555,
16,
2027,
16,
819,
33,
7036,
16,
666,
67,
1106,
33,
7036,
16,
1466,
67,
2567,
33,
7036,
4672,
3536,
8065,
3853,
487,
2184,
15632,
358,
999,
3928,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21670,
12,
2890,
16,
4422,
16,
4555,
16,
2027,
16,
819,
33,
7036,
16,
666,
67,
1106,
33,
7036,
16,
1466,
67,
2567,
33,
7036,
4672,
3536,
8065,
3853,
487,
2184,
15632,
358,
999,
3928,
... |
self.selector.setRect(e.scenePos().x(),e.scenePos().y(),0,0) self.selector.startPoint = QtCore.QPointF(e.scenePos().x(),e.scenePos().y()) | pos = self.selector.mapFromScene(e.scenePos()) self.selector.setRect(pos.x(),pos.y(),4,4) self.selector.startPoint = QtCore.QPointF(pos.x(), pos.y()) | def mousePressEvent(self,e): self.selector.setRect(e.scenePos().x(),e.scenePos().y(),0,0) self.selector.startPoint = QtCore.QPointF(e.scenePos().x(),e.scenePos().y()) self.selector.setActive(True) self.selector.setVisible(True) QtGui.QGraphicsScene.mousePressEvent(self,e) | 259ff5736e95ef329503c0cbd1635e83345101e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/259ff5736e95ef329503c0cbd1635e83345101e9/qt4render.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7644,
11840,
1133,
12,
2890,
16,
73,
4672,
949,
273,
365,
18,
9663,
18,
1458,
1265,
14370,
12,
73,
18,
23694,
1616,
10756,
365,
18,
9663,
18,
542,
6120,
12,
917,
18,
92,
9334,
917,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7644,
11840,
1133,
12,
2890,
16,
73,
4672,
949,
273,
365,
18,
9663,
18,
1458,
1265,
14370,
12,
73,
18,
23694,
1616,
10756,
365,
18,
9663,
18,
542,
6120,
12,
917,
18,
92,
9334,
917,
1... |
if req.method == 'POST' and not req.perm.has_permission('TICKET_MODIFY'): | if req.method == 'POST' and 'owner' in req.args and \ not req.perm.has_permission('TICKET_MODIFY'): | def process_request(self, req): req.perm.assert_permission('TICKET_CREATE') | f32f4100f41774d9dd3dd4ef53d14c8e0013f248 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/f32f4100f41774d9dd3dd4ef53d14c8e0013f248/web_ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
1111,
4672,
1111,
18,
12160,
18,
11231,
67,
9827,
2668,
56,
16656,
1584,
67,
9344,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
1111,
4672,
1111,
18,
12160,
18,
11231,
67,
9827,
2668,
56,
16656,
1584,
67,
9344,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
def listRegisteredTypes(self, inProject=None): | def listRegisteredTypes(self, inProject=False): | def listRegisteredTypes(self, inProject=None): """Return the list of sorted types""" | 537b63976d999ae41312d652719da10f66119d42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/537b63976d999ae41312d652719da10f66119d42/ArchetypeTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
10868,
2016,
12,
2890,
16,
316,
4109,
33,
8381,
4672,
3536,
990,
326,
666,
434,
3115,
1953,
8395,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
666,
10868,
2016,
12,
2890,
16,
316,
4109,
33,
8381,
4672,
3536,
990,
326,
666,
434,
3115,
1953,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
or code in (302, 303) and m == "POST"): | or code in (301, 302, 303) and m == "POST"): | def redirect_request(self, req, fp, code, msg, headers, newurl): """Return a Request or None in response to a redirect. | 33e041a54a56f30df481502a86ec2180ae3859a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/33e041a54a56f30df481502a86ec2180ae3859a9/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3136,
67,
2293,
12,
2890,
16,
1111,
16,
4253,
16,
981,
16,
1234,
16,
1607,
16,
394,
718,
4672,
3536,
990,
279,
1567,
578,
599,
316,
766,
358,
279,
3136,
18,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3136,
67,
2293,
12,
2890,
16,
1111,
16,
4253,
16,
981,
16,
1234,
16,
1607,
16,
394,
718,
4672,
3536,
990,
279,
1567,
578,
599,
316,
766,
358,
279,
3136,
18,
2,
-100,
-100,
-100,
-100... |
content = (Combine(OneOrMore(~ignoreExpr + CharsNotIn(opener+closer+ParserElement.DEFAULT_WHITE_CHARS,exact=1)) | content = (Combine(OneOrMore(~ignoreExpr + ~Literal(opener) + ~Literal(closer) + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS,exact=1)) | def nestedExpr(opener="(", closer=")", content=None, ignoreExpr=quotedString): """Helper method for defining nested lists enclosed in opening and closing delimiters ("(" and ")" are the default). Parameters: - opener - opening character for a nested list (default="("); can also be a pyparsing expression - closer - closing character for a nested list (default=")"); can also be a pyparsing expression - content - expression for items within the nested lists (default=None) - ignoreExpr - expression for ignoring opening and closing delimiters (default=quotedString) If an expression is not provided for the content argument, the nested expression will capture all whitespace-delimited content between delimiters as a list of separate values. Use the ignoreExpr argument to define expressions that may contain opening or closing characters that should not be treated as opening or closing characters for nesting, such as quotedString or a comment expression. Specify multiple expressions using an Or or MatchFirst. The default is quotedString, but if no expressions are to be ignored, then pass None for this argument. """ if opener == closer: raise ValueError("opening and closing strings cannot be the same") if content is None: if isinstance(opener,basestring) and isinstance(closer,basestring): if ignoreExpr is not None: content = (Combine(OneOrMore(~ignoreExpr + CharsNotIn(opener+closer+ParserElement.DEFAULT_WHITE_CHARS,exact=1)) ).setParseAction(lambda t:t[0].strip())) else: content = (empty+CharsNotIn(opener+closer+ParserElement.DEFAULT_WHITE_CHARS).setParseAction(lambda t:t[0].strip())) else: raise ValueError("opening and closing arguments must be strings if no content expression is given") ret = Forward() if ignoreExpr is not None: ret << Group( Suppress(opener) + ZeroOrMore( ignoreExpr | ret | content ) + Suppress(closer) ) else: ret << Group( Suppress(opener) + ZeroOrMore( ret | content ) + Suppress(closer) ) return ret | 992498b54f98aa1a842367cd47cd77d086dc47d9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3693/992498b54f98aa1a842367cd47cd77d086dc47d9/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4764,
4742,
12,
25098,
1546,
2932,
16,
13306,
1546,
2225,
16,
913,
33,
7036,
16,
2305,
4742,
33,
15179,
780,
4672,
3536,
2276,
707,
364,
9364,
4764,
6035,
25636,
316,
10890,
471,
7647,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4764,
4742,
12,
25098,
1546,
2932,
16,
13306,
1546,
2225,
16,
913,
33,
7036,
16,
2305,
4742,
33,
15179,
780,
4672,
3536,
2276,
707,
364,
9364,
4764,
6035,
25636,
316,
10890,
471,
7647,
1... |
self._nframes = initlength / (self._nchannels * self._sampwidth) | self._nframes = initlength // (self._nchannels * self._sampwidth) | def _write_header(self, initlength): if self._aifc and self._comptype != 'NONE': self._init_compression() self._file.write('FORM') if not self._nframes: self._nframes = initlength / (self._nchannels * self._sampwidth) self._datalength = self._nframes * self._nchannels * self._sampwidth if self._datalength & 1: self._datalength = self._datalength + 1 if self._aifc: if self._comptype in ('ULAW', 'ALAW'): self._datalength = self._datalength / 2 if self._datalength & 1: self._datalength = self._datalength + 1 elif self._comptype == 'G722': self._datalength = (self._datalength + 3) / 4 if self._datalength & 1: self._datalength = self._datalength + 1 self._form_length_pos = self._file.tell() commlength = self._write_form_length(self._datalength) if self._aifc: self._file.write('AIFC') self._file.write('FVER') _write_long(self._file, 4) _write_long(self._file, self._version) else: self._file.write('AIFF') self._file.write('COMM') _write_long(self._file, commlength) _write_short(self._file, self._nchannels) self._nframes_pos = self._file.tell() _write_long(self._file, self._nframes) _write_short(self._file, self._sampwidth * 8) _write_float(self._file, self._framerate) if self._aifc: self._file.write(self._comptype) _write_string(self._file, self._compname) self._file.write('SSND') self._ssnd_length_pos = self._file.tell() _write_long(self._file, self._datalength + 8) _write_long(self._file, 0) _write_long(self._file, 0) | ac23917f909ac429091f6f96e924fad8fc36d260 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/ac23917f909ac429091f6f96e924fad8fc36d260/aifc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
67,
3374,
12,
2890,
16,
1208,
2469,
4672,
309,
365,
6315,
69,
430,
71,
471,
365,
6315,
832,
27672,
480,
296,
9826,
4278,
365,
6315,
2738,
67,
23766,
1435,
365,
6315,
768,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
67,
3374,
12,
2890,
16,
1208,
2469,
4672,
309,
365,
6315,
69,
430,
71,
471,
365,
6315,
832,
27672,
480,
296,
9826,
4278,
365,
6315,
2738,
67,
23766,
1435,
365,
6315,
768,
18... |
Dlist = [5,8,12,13,17,21,24,28,29] | Dlist = [5,8,12,13,17,21,24,28,29, 33, 37, 40, 41, 44, 53, 56, 57, 60, 61, 65, 69, 73, 76, 77, 85, 88, 89, 92, 93, 97] | def _find_scaling_L_ratio(self): r""" This function is use to set ``_scaling``, the factor used to adjust the scalar multiple of the modular symbol. If `[0]`, the modular symbol evaluated at 0, is non-zero, we can just scale it with respect to the approximation of the L-value. It is known that the quotient is a rational number with small denominator. Otherwise we try to scale using quadratic twists. | cc08e5f448102949495f5379323ef5e18b443617 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/cc08e5f448102949495f5379323ef5e18b443617/ell_modular_symbols.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
67,
24576,
67,
48,
67,
9847,
12,
2890,
4672,
436,
8395,
1220,
445,
353,
999,
358,
444,
12176,
67,
24576,
68,
9191,
326,
5578,
1399,
358,
5765,
326,
4981,
3229,
434,
326,
681... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
67,
24576,
67,
48,
67,
9847,
12,
2890,
4672,
436,
8395,
1220,
445,
353,
999,
358,
444,
12176,
67,
24576,
68,
9191,
326,
5578,
1399,
358,
5765,
326,
4981,
3229,
434,
326,
681... |
logging.notify('Using real prefix %r' % sys.real_prefix) | logger.notify('Using real prefix %r' % sys.real_prefix) | def create_environment(home_dir, site_packages=True, clear=False): """ Creates a new environment in ``home_dir``. If ``site_packages`` is true (the default) then the global ``site-packages/`` directory will be on the path. If ``clear`` is true (default False) then the environment will first be cleared. """ if sys.platform == 'win32': lib_dir = join(home_dir, 'Lib') else: lib_dir = join(home_dir, 'lib', py_version) inc_dir = join(home_dir, 'include', py_version) if sys.platform == 'win32': bin_dir = join(home_dir, 'Scripts') else: bin_dir = join(home_dir, 'bin') if sys.executable.startswith(bin_dir): print 'Please use the *system* python to run this script' return if clear: rmtree(lib_dir) rmtree(inc_dir) ## FIXME: why not delete it? logger.notify('Not deleting %s', bin_dir) if hasattr(sys, 'real_prefix'): logging.notify('Using real prefix %r' % sys.real_prefix) prefix = sys.real_prefix else: prefix = sys.prefix prefix = sys.prefix mkdir(lib_dir) fix_lib64(lib_dir) stdlib_dir = os.path.dirname(os.__file__) for fn in os.listdir(stdlib_dir): if fn != 'site-packages' and os.path.splitext(fn)[0] in REQUIRED_MODULES: copyfile(join(stdlib_dir, fn), join(lib_dir, fn)) mkdir(join(lib_dir, 'site-packages')) writefile(join(lib_dir, 'site.py'), SITE_PY) writefile(join(lib_dir, 'orig-prefix.txt'), prefix) site_packages_filename = join(lib_dir, 'no-global-site-packages.txt') if not site_packages: writefile(site_packages_filename, '') else: if os.path.exists(site_packages_filename): logger.info('Deleting %s' % site_packages_filename) os.unlink(site_packages_filename) stdinc_dir = join(prefix, 'include', py_version) if os.path.exists(stdinc_dir): copyfile(stdinc_dir, inc_dir) else: logger.debug('No include dir %s' % stdinc_dir) if sys.exec_prefix != prefix: if sys.platform == 'win32': exec_dir = join(sys.exec_prefix, 'lib') else: exec_dir = join(sys.exec_prefix, 'lib', py_version) for fn in os.listdir(exec_dir): copyfile(join(exec_dir, fn), join(lib_dir, fn)) mkdir(bin_dir) py_executable = join(bin_dir, os.path.basename(sys.executable)) if 'Python.framework' in prefix: if py_executable.endswith('/Python'): # The name of the python executable is not quite what # we want, rename it. py_executable = os.path.join( os.path.dirname(py_executable), 'python') logger.notify('New python executable in %s', py_executable) if sys.executable != py_executable: ## FIXME: could I just hard link? shutil.copyfile(sys.executable, py_executable) make_exe(py_executable) if 'Python.framework' in prefix: logger.debug('MacOSX Python framework detected') # Create a dummy framework tree frmdir = os.path.join(home_dir, 'lib', 'Python.framework', 'Versions', '%s.%s'%(sys.version_info[0], sys.version_info[1])) mkdir(frmdir) copyfile( os.path.join(prefix, 'Python'), os.path.join(frmdir, 'Python')) # And then change the install_name of the cpied python executable try: call_subprocess( ["install_name_tool", "-change", os.path.join(prefix, 'Python'), '@executable_path/../lib/Python.framework/Versions/%s.%s/Python' % (sys.version_info[0], sys.version_info[1]), py_executable]) except: logger.fatal( "Could not call install_name_tool -- you must have Apple's development tools installed") raise cmd = [py_executable, '-c', 'import sys; print sys.prefix'] logger.info('Testing executable with %s %s "%s"' % tuple(cmd)) proc = subprocess.Popen(cmd, stdout=subprocess.PIPE) proc_stdout, proc_stderr = proc.communicate() proc_stdout = os.path.normcase(os.path.abspath(proc_stdout.strip())) if proc_stdout != os.path.normcase(os.path.abspath(home_dir)): logger.fatal( 'ERROR: The executable %s is not functioning' % py_executable) logger.fatal( 'ERROR: It thinks sys.prefix is %r (should be %r)' % (proc_stdout, os.path.normcase(os.path.abspath(home_dir)))) logger.fatal( 'ERROR: virtualenv is not compatible with this system or executable') sys.exit(100) else: logger.info('Got sys.prefix result: %r' % proc_stdout) pydistutils = os.path.expanduser('~/.pydistutils.cfg') if os.path.exists(pydistutils): logger.notify('Please make sure you remove any previous custom paths from ' 'your %s file.' % pydistutils) install_setuptools(py_executable) install_activate(home_dir, bin_dir) install_distutils(lib_dir) | 5fe324b053c62bc9a2385175bac2fae36b897f5a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12981/5fe324b053c62bc9a2385175bac2fae36b897f5a/virtualenv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
10274,
12,
8712,
67,
1214,
16,
2834,
67,
10308,
33,
5510,
16,
2424,
33,
8381,
4672,
3536,
10210,
279,
394,
3330,
316,
12176,
8712,
67,
1214,
68,
8338,
225,
971,
12176,
4256,
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,
752,
67,
10274,
12,
8712,
67,
1214,
16,
2834,
67,
10308,
33,
5510,
16,
2424,
33,
8381,
4672,
3536,
10210,
279,
394,
3330,
316,
12176,
8712,
67,
1214,
68,
8338,
225,
971,
12176,
4256,
6... |
print"The Config File does not exist or the path defined in the script is incorrect." | print"The Config File "+config_file_name+" does not exist or the path defined in the script is incorrect." | def extract_config_data(config_file): # Collect Data from Config File groups_dict = {} quantities_dict = {} data_dict = {} keyed_groups = {} keyed_quantities = {} keyed_data = {} quantity_counter = 0 data_counter = 0 group_counter = 0 #Create File Object try: fh = file(config_file, 'U') except: print"The Config File does not exist or the path defined in the script is incorrect." #Read file with csv module. data_array = csv.reader(fh) #Convert into List object config_lists = [list(sublist) for sublist in data_array] print str(len(config_lists)) + " lines read from Configuration file\n" #Build Quantity and Data Dictionaries, with values keyed by config column name. for list_item in config_lists: if list_item[0] == 'g': if group_counter < 1: group_header = list_item[2:] else: if group_counter >= 1: for x in range(len(group_header)): keyed_groups[group_header[x]] = list_item[x+2] groups_dict[int(list_item[1])] = keyed_groups keyed_groups = {} group_counter += 1 #print "This is group line #"+str(group_counter)+"." elif list_item[0] == 'q': if quantity_counter < 1: quantity_header = list_item[2:] if quantity_counter >= 1: for x in range(len(quantity_header)): keyed_quantities[quantity_header[x]] = list_item[x+2] #print "List item 1:",int(list_item[1]) quantities_dict[int(list_item[1])] = keyed_quantities keyed_quantities = {} quantity_counter += 1 elif list_item[0] == 'd': if data_counter < quantity_counter: data_counter = quantity_counter - 1 data_header = list_item[1:] if data_counter >= quantity_counter: for x in range(len(data_header)): keyed_data[data_header[x].strip()] = list_item[x+1] data_key_name = keyed_data['Quantity'].strip()+"~"+keyed_data['Group'].strip()+"~"+keyed_data['Dataname'].strip()+"~"+keyed_data['Exp_Col_Name'].strip() print "Key Name:", data_key_name data_dict[data_key_name] = keyed_data #print data_dict[data_key_name] keyed_data = {} data_counter += 1 else: pass #print """No g, d or q, skip row.""" # Return a single list object containing the dictionaries. #print groups_dict #print quantities_dict #print data_dict return [groups_dict,quantities_dict,data_dict] | ad91d4eb3f67d10bfa5d623cd1280d36462603e1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12/ad91d4eb3f67d10bfa5d623cd1280d36462603e1/Validation_Data_Processor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
1425,
67,
892,
12,
1425,
67,
768,
4672,
468,
9302,
1910,
628,
1903,
1387,
3252,
67,
1576,
273,
2618,
10251,
1961,
67,
1576,
273,
2618,
501,
67,
1576,
273,
2618,
17408,
67,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
1425,
67,
892,
12,
1425,
67,
768,
4672,
468,
9302,
1910,
628,
1903,
1387,
3252,
67,
1576,
273,
2618,
10251,
1961,
67,
1576,
273,
2618,
501,
67,
1576,
273,
2618,
17408,
67,
46... |
if name not in obj.changed_attributes: | if (isinstance(schema_item, schema.SchemaSimpleItem) and name not in obj.changed_attributes): | def update_obj(self, obj): """Update a DDBObject on disk.""" | aa6e634acc5f7e7e5f9b990a3ddf83aca46bdfcb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/aa6e634acc5f7e7e5f9b990a3ddf83aca46bdfcb/storedatabase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
2603,
12,
2890,
16,
1081,
4672,
3536,
1891,
279,
463,
2290,
921,
603,
4234,
12123,
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,
1089,
67,
2603,
12,
2890,
16,
1081,
4672,
3536,
1891,
279,
463,
2290,
921,
603,
4234,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
id = self.pool.get('ir.model.data')._update(cr, self.uid, "ir.actions.report.xml", self.module, res, xml_id, mode=self.mode) | id = self.pool.get('ir.model.data')._update(cr, self.uid, "ir.actions.report.xml", self.module, res, xml_id, noupdate=self.isnoupdate(data_node), mode=self.mode) | def _tag_report(self, cr, rec, data_node=None): res = {} for dest,f in (('name','string'),('model','model'),('report_name','name')): res[dest] = rec.getAttribute(f).encode('utf8') assert res[dest], "Attribute %s of report is empty !" % (f,) for field,dest in (('rml','report_rml'),('xml','report_xml'),('xsl','report_xsl'),('attachment','attachment')): if rec.hasAttribute(field): res[dest] = rec.getAttribute(field).encode('utf8') if rec.hasAttribute('auto'): res['auto'] = eval(rec.getAttribute('auto')) if rec.hasAttribute('sxw'): sxw_content = misc.file_open(rec.getAttribute('sxw')).read() res['report_sxw_content'] = sxw_content if rec.hasAttribute('header'): res['header'] = eval(rec.getAttribute('header')) res['multi'] = rec.hasAttribute('multi') and eval(rec.getAttribute('multi')) xml_id = rec.getAttribute('id').encode('utf8') self._test_xml_id(xml_id) | 95e0019e0912c3ddd4bcf859ab4c520571795fbe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/95e0019e0912c3ddd4bcf859ab4c520571795fbe/convert.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2692,
67,
6006,
12,
2890,
16,
4422,
16,
1950,
16,
501,
67,
2159,
33,
7036,
4672,
400,
273,
2618,
364,
1570,
16,
74,
316,
261,
2668,
529,
17023,
1080,
19899,
2668,
2284,
17023,
228... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2692,
67,
6006,
12,
2890,
16,
4422,
16,
1950,
16,
501,
67,
2159,
33,
7036,
4672,
400,
273,
2618,
364,
1570,
16,
74,
316,
261,
2668,
529,
17023,
1080,
19899,
2668,
2284,
17023,
228... |
context['domain_method'] = siteconfig.get("site_domain_method") | context['domain_method'] = domain_method | def send_review_mail(user, review_request, subject, in_reply_to, extra_recipients, template_name, context={}): """ Formats and sends an e-mail out with the current domain and review request being added to the template context. Returns the resulting message ID. """ current_site = Site.objects.get_current() from_email = get_email_address_for_user(user) recipients = set([from_email]) to_field = set() if review_request.submitter.is_active: recipients.add(get_email_address_for_user(review_request.submitter)) for u in review_request.target_people.filter(is_active=True): recipients.add(get_email_address_for_user(u)) to_field.add(get_email_address_for_user(u)) for group in review_request.target_groups.all(): for address in get_email_addresses_for_group(group): recipients.add(address) for profile in review_request.starred_by.all(): if profile.user.is_active: recipients.add(get_email_address_for_user(profile.user)) if extra_recipients: for recipient in extra_recipients: if recipient.is_active: recipients.add(get_email_address_for_user(recipient)) siteconfig = current_site.config.get() context['user'] = user context['domain'] = current_site.domain context['domain_method'] = siteconfig.get("site_domain_method") context['review_request'] = review_request body = render_to_string(template_name, context) # Set the cc field only when the to field (i.e People) are mentioned, # so that to field consists of Reviewers and cc consists of all the # other members of the group if to_field: cc_field = recipients.symmetric_difference(to_field) else: to_field = recipients cc_field = set() message = SpiffyEmailMessage(subject.strip(), body, from_email, list(to_field), list(cc_field), in_reply_to) message.send() return message.message_id | 3a976915f0ff877a1a8b0595c544d6ac6ee6cb20 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1600/3a976915f0ff877a1a8b0595c544d6ac6ee6cb20/email.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
16041,
67,
4408,
12,
1355,
16,
10725,
67,
2293,
16,
3221,
16,
316,
67,
10629,
67,
869,
16,
2870,
67,
27925,
16,
1542,
67,
529,
16,
819,
12938,
4672,
3536,
2748,
2323,
471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
16041,
67,
4408,
12,
1355,
16,
10725,
67,
2293,
16,
3221,
16,
316,
67,
10629,
67,
869,
16,
2870,
67,
27925,
16,
1542,
67,
529,
16,
819,
12938,
4672,
3536,
2748,
2323,
471,
... |
self.failUnlessEqual(3, getargs_H(3.14)) | self.assertRaises(TypeError, getargs_H, 3.14) | def test_H(self): from _testcapi import getargs_H # H returns 'unsigned short', no range checking self.failUnlessEqual(3, getargs_H(3.14)) self.failUnlessEqual(99, getargs_H(Long())) self.failUnlessEqual(99, getargs_H(Int())) | 2eaa053bbac0422f04c5d83e555aac57c3253ce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2eaa053bbac0422f04c5d83e555aac57c3253ce5/test_getargs2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
44,
12,
2890,
4672,
628,
389,
3813,
71,
2425,
1930,
336,
1968,
67,
44,
468,
670,
1135,
296,
22297,
3025,
2187,
1158,
1048,
6728,
365,
18,
11231,
12649,
6141,
12,
19030,
16,
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,
1842,
67,
44,
12,
2890,
4672,
628,
389,
3813,
71,
2425,
1930,
336,
1968,
67,
44,
468,
670,
1135,
296,
22297,
3025,
2187,
1158,
1048,
6728,
365,
18,
11231,
12649,
6141,
12,
19030,
16,
3... |
tableName = self.__getTableName( "bucket", typeName ) | tableName = _getTableName( "bucket", typeName ) | def __selectForCompactBuckets( self, typeName, timeLimit, bucketLength, nextBucketLength, connObj = False ): """ Nasty SQL query to get ideal buckets using grouping by date calculations and adding value contents """ tableName = self.__getTableName( "bucket", typeName ) selectSQL = "SELECT " sqlSelectList = [] for field in self.dbCatalog[ typeName ][ 'keys' ]: sqlSelectList.append( "`%s`.`%s`" % ( tableName, field ) ) for field in self.dbCatalog[ typeName ][ 'values' ]: sqlSelectList.append( "SUM( `%s`.`%s` )" % ( tableName, field ) ) sqlSelectList.append( "SUM( `%s`.`entriesInBucket` )" % ( tableName ) ) sqlSelectList.append( "MIN( `%s`.`startTime` )" % tableName ) sqlSelectList.append( "MAX( `%s`.`startTime` )" % tableName ) selectSQL += ", ".join( sqlSelectList ) selectSQL += " FROM `%s`" % tableName selectSQL += " WHERE `%s`.`startTime` < '%s' AND" % ( tableName, timeLimit ) selectSQL += " `%s`.`bucketLength` = %s" % ( tableName, bucketLength ) #MAGIC bucketing sqlGroupList = [ self.__bucketizeDataField( "`%s`.`startTime`" % tableName, nextBucketLength ) ] for field in self.dbCatalog[ typeName ][ 'keys' ]: sqlGroupList.append( "`%s`.`%s`" % ( tableName, field ) ) selectSQL += " GROUP BY %s" % ", ".join( sqlGroupList ) return self._query( selectSQL, conn = connObj ) | 5644734dd5f9b2176cf1b7afc4f6ab55941c88f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/5644734dd5f9b2176cf1b7afc4f6ab55941c88f0/AccountingDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4025,
1290,
16863,
14517,
12,
365,
16,
8173,
16,
813,
3039,
16,
2783,
1782,
16,
1024,
4103,
1782,
16,
1487,
2675,
273,
1083,
262,
30,
3536,
423,
689,
93,
3063,
843,
358,
336,
233... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4025,
1290,
16863,
14517,
12,
365,
16,
8173,
16,
813,
3039,
16,
2783,
1782,
16,
1024,
4103,
1782,
16,
1487,
2675,
273,
1083,
262,
30,
3536,
423,
689,
93,
3063,
843,
358,
336,
233... |
file = logConf.get('file', "loaddeps.dot") | file = depsLogConf.get('file', "loaddeps.dot") | def depsToDotFile(logConf, gr): if logConf.get('format', None): format = mode = None format = logConf.get('format') if format.find('/')>-1: format, mode = format.split('/',1) # e.g. 'dot/span-tree-only' if format == 'dot': classRoot = logConf.get('root') # get the spanning tree from the root node st, op = gr.breadth_first_search(root=classRoot) # and create a new graph from it gr1 = graph.digraph() st_nodes = set(st.keys() + st.values()) # add nodes # - rather gr.add_nodes(st), go through indiviudal nodes for coloring for cid in st_nodes: if cid == None: # None is introduced in st continue fsize = self._classes[cid]['size'] if fsize > 20000: color = "red" elif fsize > 5000: color = "green" else: color = "blue" gr1.add_node(cid, attrs=[("color", color)]) # add edges # - rather gr.add_spanning_tree(st), go through individual edges for coloring for v in st.iteritems(): if None in v: # drop edges with a None node continue v2, v1 = v if gr.has_edge(v1,v2): gr1.add_edge(v1, v2, attrs=gr.get_edge_attributes(v1, v2)) else: gr1.add_edge(v1, v2, ) if not mode or not mode == "span-tree-only": # add additional dependencies for v1 in st_nodes: # that are not covered by the span tree for v2 in st_nodes: if gr.has_edge(v1, v2): gr1.add_edge(v1, v2, attrs=gr.get_edge_attributes(v1, v2)) # write dot file if dset == "loadtime": file = logConf.get('file', "loaddeps.dot") elif dset == "runtime": file = logConf.get('file', "rundeps.dot") else: file = logConf.get('file', "deps.dot") dot = gr1.write(fmt='dotwt') self._console.info("Writing dependency graph to file: %s" % file) open(file, 'w').write(dot) return | c18752e3a6a20f73f8cace28d0b3ee01558d13f0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/c18752e3a6a20f73f8cace28d0b3ee01558d13f0/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8740,
774,
10412,
812,
12,
1330,
3976,
16,
3821,
4672,
309,
613,
3976,
18,
588,
2668,
2139,
2187,
599,
4672,
740,
273,
1965,
273,
599,
740,
273,
613,
3976,
18,
588,
2668,
2139,
6134,
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,
8740,
774,
10412,
812,
12,
1330,
3976,
16,
3821,
4672,
309,
613,
3976,
18,
588,
2668,
2139,
2187,
599,
4672,
740,
273,
1965,
273,
599,
740,
273,
613,
3976,
18,
588,
2668,
2139,
6134,
3... |
compileclassheader(fp, modname, basemodule) | def compilesuite(suite, major, minor, language, script, fname, basepackage=None): """Generate code for a single suite""" [name, desc, code, level, version, events, classes, comps, enums] = suite modname = identify(name) if len(modname) > 28: modname = modname[:27] fss, ok = macfs.StandardPutFile('Python output file', modname+'.py') if not ok: return None, None pathname = fss.as_pathname() modname = os.path.splitext(os.path.split(pathname)[1])[0] fp = open(fss.as_pathname(), 'w') fss.SetCreatorType('Pyth', 'TEXT') fp.write('"""Suite %s: %s\n' % (name, desc)) fp.write("Level %d, version %d\n\n" % (level, version)) fp.write("Generated from %s\n"%fname) fp.write("AETE/AEUT resource version %d/%d, language %d, script %d\n" % \ (major, minor, language, script)) fp.write('"""\n\n') fp.write('import aetools\n') fp.write('import MacOS\n\n') fp.write("_code = %s\n\n"% `code`) if basepackage and basepackage._code_to_module.has_key(code): # We are an extension of a baseclass (usually an application extending # Standard_Suite or so). Import everything from our base module fp.write('from %s import *\n'%basepackage._code_to_fullname[code]) basemodule = basepackage._code_to_module[code] else: # We are not an extension. basemodule = None compileclassheader(fp, modname, basemodule) enumsneeded = {} if events: for event in events: compileevent(fp, event, enumsneeded) else: fp.write("\tpass\n\n") objc = ObjectCompiler(fp, basemodule) for cls in classes: objc.compileclass(cls) for cls in classes: objc.fillclasspropsandelems(cls) for comp in comps: objc.compilecomparison(comp) for enum in enums: objc.compileenumeration(enum) for enum in enumsneeded.keys(): objc.checkforenum(enum) objc.dumpindex() return code, modname | b18e37723e6f3e7fe6bae03f14e954721df23eaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b18e37723e6f3e7fe6bae03f14e954721df23eaf/gensuitemodule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1161,
1449,
9519,
12,
30676,
16,
7888,
16,
8439,
16,
2653,
16,
2728,
16,
5299,
16,
1026,
5610,
33,
7036,
4672,
3536,
4625,
981,
364,
279,
2202,
11371,
8395,
306,
529,
16,
3044,
16,
981... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1161,
1449,
9519,
12,
30676,
16,
7888,
16,
8439,
16,
2653,
16,
2728,
16,
5299,
16,
1026,
5610,
33,
7036,
4672,
3536,
4625,
981,
364,
279,
2202,
11371,
8395,
306,
529,
16,
3044,
16,
981... | |
if (self.selCmp == compn) or self.vetoSelect: | if self.selCmp == compn or self.vetoSelect: | def selectObject(self, compn, selectInContainment = true): """ Select an object in the inspector by populating the property pages. This method is called from the InspectableObjectCollection derived classes """ | 746f53548fb8bb54a235b1bfa31a4bdb769818e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/746f53548fb8bb54a235b1bfa31a4bdb769818e8/Inspector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2027,
921,
12,
2890,
16,
1161,
82,
16,
2027,
382,
22928,
475,
273,
638,
4672,
3536,
6766,
392,
733,
316,
326,
22700,
635,
3650,
1776,
326,
1272,
4689,
18,
1220,
707,
353,
2566,
628,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2027,
921,
12,
2890,
16,
1161,
82,
16,
2027,
382,
22928,
475,
273,
638,
4672,
3536,
6766,
392,
733,
316,
326,
22700,
635,
3650,
1776,
326,
1272,
4689,
18,
1220,
707,
353,
2566,
628,
32... |
cr.execute("select po.id, max(po.date_approve) from purchase_order as po, purchase_order_line as line where po.id=line.order_id and product_id=%s and partner_id=%s and state='approved' group by po.id", (supinfo.product_id.id, supinfo.name.id,)) | cr.execute("select po.id, max(po.date_approve) from purchase_order as po, purchase_order_line as line where po.id=line.order_id and line.product_id=%s and po.partner_id=%s and po.state='approved' group by po.id", (supinfo.product_id.id, supinfo.name.id,)) | def _last_order(self, cr, uid, ids, name, arg, context): res = {} for supinfo in self.browse(cr, uid, ids): cr.execute("select po.id, max(po.date_approve) from purchase_order as po, purchase_order_line as line where po.id=line.order_id and product_id=%s and partner_id=%s and state='approved' group by po.id", (supinfo.product_id.id, supinfo.name.id,)) record = cr.fetchone() if record: res[supinfo.id] = record[0] else: res[supinfo.id] = False return res | b49782eab6d955597c46b11c401f0cc83638c921 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/b49782eab6d955597c46b11c401f0cc83638c921/product_extended.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2722,
67,
1019,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
4672,
400,
273,
2618,
364,
1169,
1376,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2722,
67,
1019,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
4672,
400,
273,
2618,
364,
1169,
1376,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
467... |
if msg.is_multipart(): descr += msg.get_payload(0).get_payload(decode = True) diff = msg.get_payload(1).get_payload(decode = True) else: diff = msg.get_payload(decode = True) for line in diff.split('\n'): if __end_descr(line): break descr += line + '\n' descr.rstrip() | msg_text = '' for part in msg.walk(): if part.get_content_type() == 'text/plain': msg_text += part.get_payload(decode = True) rem_descr, diff = __split_descr_diff(msg_text) if rem_descr: descr += '\n\n' + rem_descr if not diff: out.warn('Message does not contain any diff') | def __decode_header(header): """Decode a qp-encoded e-mail header as per rfc2047""" try: words_enc = decode_header(header) hobj = make_header(words_enc) except Exception, ex: raise CmdException, 'header decoding error: %s' % str(ex) return unicode(hobj).encode('utf-8') | f21ba53677d2e5820f2dc1774871bf8464729eea /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12366/f21ba53677d2e5820f2dc1774871bf8464729eea/imprt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3922,
67,
3374,
12,
3374,
4672,
3536,
6615,
279,
22859,
17,
10787,
425,
17,
4408,
1446,
487,
1534,
16590,
21573,
27,
8395,
775,
30,
4511,
67,
1331,
273,
2495,
67,
3374,
12,
3374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3922,
67,
3374,
12,
3374,
4672,
3536,
6615,
279,
22859,
17,
10787,
425,
17,
4408,
1446,
487,
1534,
16590,
21573,
27,
8395,
775,
30,
4511,
67,
1331,
273,
2495,
67,
3374,
12,
3374,
... |
return dbus.Array(sorted(l), signature=signature) | return dbus.Array(sorted(_list), signature=signature) | def to_a(_list, signature='u'): """ Returns a :class:`dbus.Array` out of `_list` :param signature: The dbus signature of the array """ return dbus.Array(sorted(l), signature=signature) | 5504b0f3be923a548a71aea74d8ccf487a821f3f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12036/5504b0f3be923a548a71aea74d8ccf487a821f3f/exported.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
69,
24899,
1098,
16,
3372,
2218,
89,
11,
4672,
3536,
2860,
279,
294,
1106,
28288,
1966,
407,
18,
1076,
68,
596,
434,
1375,
67,
1098,
68,
225,
294,
891,
3372,
30,
1021,
21866,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
69,
24899,
1098,
16,
3372,
2218,
89,
11,
4672,
3536,
2860,
279,
294,
1106,
28288,
1966,
407,
18,
1076,
68,
596,
434,
1375,
67,
1098,
68,
225,
294,
891,
3372,
30,
1021,
21866,
... |
MEDIA_CURRENTLY_MOUNTED = 0x80000000L | MEDIA_CURRENTLY_MOUNTED = 0x80000000 | def DEVICE_TYPE_FROM_CTL_CODE(ctrlCode): return (ctrlCode & 0xffff0000L) >> 16 | 4d8d78e7d12aa633dba7cddf190eea9b1ccf177f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/992/4d8d78e7d12aa633dba7cddf190eea9b1ccf177f/winioctlcon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23996,
67,
2399,
67,
11249,
67,
1268,
48,
67,
5572,
12,
16277,
1085,
4672,
327,
261,
16277,
1085,
473,
374,
20431,
2787,
48,
13,
1671,
2872,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
23996,
67,
2399,
67,
11249,
67,
1268,
48,
67,
5572,
12,
16277,
1085,
4672,
327,
261,
16277,
1085,
473,
374,
20431,
2787,
48,
13,
1671,
2872,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
str = self.__rmjunk.sub('', str) | for pattern, replacement in REPLACEMENTS: str = pattern.sub(replacement, str) | def __init__(self, link, str, seqno): self.links = [link] self.seqno = seqno # remove <#\d+#> left in by moving the data out of LaTeX2HTML str = self.__rmjunk.sub('', str) # build up the text self.text = split_entry_text(str) self.key = split_entry_key(str) | 29fa8c6b92ce806f443edea6b99c0a6ff9953de0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/29fa8c6b92ce806f443edea6b99c0a6ff9953de0/buildindex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1692,
16,
609,
16,
30734,
4672,
365,
18,
7135,
273,
306,
1232,
65,
365,
18,
5436,
2135,
273,
30734,
468,
1206,
411,
7,
64,
72,
15,
7,
34,
2002,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1692,
16,
609,
16,
30734,
4672,
365,
18,
7135,
273,
306,
1232,
65,
365,
18,
5436,
2135,
273,
30734,
468,
1206,
411,
7,
64,
72,
15,
7,
34,
2002,
316,
... |
f.close() except IOError: | try: | def get_hashfile_format(self, filename): try: f = open(filename, "r") for format in formats: # search in al our recognized formats regex = format.filename_regex result = regex.search(filename.lower()) if result: # this can be a valid filename, now look inside f.seek(0) if format.detect_file(f): # yes, this is a valid hashfile \o/ f.close() return format f.close() except IOError: pass return None | bbf831aedbd676fd6385faae182b6e52b4dcd5db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2200/bbf831aedbd676fd6385faae182b6e52b4dcd5db/parano.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2816,
768,
67,
2139,
12,
2890,
16,
1544,
4672,
225,
775,
30,
284,
273,
1696,
12,
3459,
16,
315,
86,
7923,
225,
364,
740,
316,
6449,
30,
468,
1623,
316,
524,
3134,
16332,
644... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2816,
768,
67,
2139,
12,
2890,
16,
1544,
4672,
225,
775,
30,
284,
273,
1696,
12,
3459,
16,
315,
86,
7923,
225,
364,
740,
316,
6449,
30,
468,
1623,
316,
524,
3134,
16332,
644... |
task.interval.privInterrupt() | def __removeTask(self): # Kill old task(s), including those from a similarly-named but # different interval. taskName = self.getName() + '-play' oldTasks = taskMgr.getTasksNamed(taskName) for task in oldTasks: if hasattr(task, "interval"): task.interval.privInterrupt() taskMgr.remove(task) | a1aa592ce98a314ebef7c886ca7313f546adefa4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/a1aa592ce98a314ebef7c886ca7313f546adefa4/CInterval-extensions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4479,
2174,
12,
2890,
4672,
468,
20520,
1592,
1562,
12,
87,
3631,
6508,
5348,
628,
279,
7281,
715,
17,
13188,
1496,
468,
3775,
3673,
18,
20172,
273,
365,
18,
17994,
1435,
397,
2400... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4479,
2174,
12,
2890,
4672,
468,
20520,
1592,
1562,
12,
87,
3631,
6508,
5348,
628,
279,
7281,
715,
17,
13188,
1496,
468,
3775,
3673,
18,
20172,
273,
365,
18,
17994,
1435,
397,
2400... | |
return '%s:%s' % (self.site() , self.name() ) | return u'%s:%s' % (self.site() , self.name() ) | def __str__(self): return '%s:%s' % (self.site() , self.name() ) | 427509447a0da1f459408ddf105504fe3afb32a1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/427509447a0da1f459408ddf105504fe3afb32a1/userlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
327,
582,
11,
9,
87,
5319,
87,
11,
738,
261,
2890,
18,
4256,
1435,
269,
365,
18,
529,
1435,
262,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
327,
582,
11,
9,
87,
5319,
87,
11,
738,
261,
2890,
18,
4256,
1435,
269,
365,
18,
529,
1435,
262,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
result={} campaigns = self.browse(cr,uid,ids) | result = {} campaigns = self.browse(cr, uid, ids) | def _quantity_wanted_total(self, cr, uid, ids, name, args, context={}): result={} campaigns = self.browse(cr,uid,ids) for campaign in campaigns: quantity=0 numeric=True for propo in campaign.proposition_ids: if propo.quantity_wanted.isdigit(): quantity += int(propo.quantity_wanted) elif propo.quantity_wanted == "AAA for a Segment": result[campaign.id]='AAA for a Segment' numeric=False break else: result[campaign.id]='Check Segments' numeric=False break if numeric: result[campaign.id]=str(quantity) return result | 7ee897432c7e7d5a5c8e889fc429c3c1b66627fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/7ee897432c7e7d5a5c8e889fc429c3c1b66627fd/dm_campaign.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16172,
67,
25861,
67,
4963,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
833,
16,
819,
12938,
4672,
563,
273,
2618,
8965,
87,
273,
365,
18,
25731,
12,
3353,
16,
4555,
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,
389,
16172,
67,
25861,
67,
4963,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
833,
16,
819,
12938,
4672,
563,
273,
2618,
8965,
87,
273,
365,
18,
25731,
12,
3353,
16,
4555,
16... |
from docutils.parsers.rst.directives import directive | from docutils.parsers.rst import directives | def get_directive(name): from docutils.parsers.rst.directives import directive try: return directive(name, None, None)[0] except AttributeError: return None | d8ad66f3b297640eca8b626c65c016ef30526dd8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8817/d8ad66f3b297640eca8b626c65c016ef30526dd8/numpydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
22347,
12,
529,
4672,
628,
997,
5471,
18,
11104,
18,
16114,
1930,
13877,
775,
30,
327,
8655,
12,
529,
16,
599,
16,
599,
25146,
20,
65,
1335,
6394,
30,
327,
599,
225,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
67,
22347,
12,
529,
4672,
628,
997,
5471,
18,
11104,
18,
16114,
1930,
13877,
775,
30,
327,
8655,
12,
529,
16,
599,
16,
599,
25146,
20,
65,
1335,
6394,
30,
327,
599,
225,
2,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.