rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
return NULL | return NULL; | def _write_enumifc_cpp(f, interface): enumtype = interface.name[5:] if is_interface_enum(enumtype): # Assume an interface. enum_interface = "I" + enumtype[:-1] converter = "PyObject *ob = PyCom_PyObjectFromIUnknown(rgVar[i], IID_%(enum_interface)s, FALSE);" % locals() arraydeclare = "%(enum_interface)s **rgVar = new %(enum_interface)s *[celt];" % locals() else: # Enum of a simple structure converter = "PyObject *ob = PyCom_PyObjectFrom%(enumtype)s(&rgVar[i]);" % locals() arraydeclare = "%(enumtype)s *rgVar = new %(enumtype)s[celt];" % locals() f.write(\ | a8ce44879ed57fbec305b7d4dca01ed342b87514 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/a8ce44879ed57fbec305b7d4dca01ed342b87514/makegwenum.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
67,
7924,
430,
71,
67,
4057,
84,
12,
74,
16,
1560,
4672,
2792,
723,
273,
1560,
18,
529,
63,
25,
26894,
309,
353,
67,
5831,
67,
7924,
12,
7924,
723,
4672,
468,
15983,
392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7924,
430,
71,
67,
4057,
84,
12,
74,
16,
1560,
4672,
2792,
723,
273,
1560,
18,
529,
63,
25,
26894,
309,
353,
67,
5831,
67,
7924,
12,
7924,
723,
4672,
468,
15983,
392,
... |
eRFmod.getInstance().setFunction(value) | eRFmod.getInstance().setFunction(not value) | def setFunction(self, value): eRFmod.getInstance().setFunction(value) | 071089dadf70e673b4558dc77b85f596b750b4a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/071089dadf70e673b4558dc77b85f596b750b4a5/RFmod.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
2083,
12,
2890,
16,
460,
4672,
425,
12918,
1711,
18,
588,
1442,
7675,
542,
2083,
12,
1132,
13,
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,
444,
2083,
12,
2890,
16,
460,
4672,
425,
12918,
1711,
18,
588,
1442,
7675,
542,
2083,
12,
1132,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
pieces.append(str(value)) | pieces.append(str(int(value))) | def app_mod__String_ANY(format, values): pieces = [] start = 0 state = 0 i = 0 index = -1 len_format = len(format) while i < len_format: c = format[i] if state == 0: # just copy constant-pieces of the format if c=='%': pieces.append(format[start:i]) state = 1 else: if c=='%': pieces.append('%') else: if c == '(': # read name j = format.find(')', i+1) if j == -1: raise ValueError, "incomplete format string" if index != -1: raise TypeError, "format string mismatch" name = format[i+1:j] value = values[name] index = -2 i = j+1 c = format[i] else: index += 1 if index < 0: raise TypeError, "format string mismatch" elif index == 0 and not isinstance(values, tuple): values = tuple([values]) value = values[index] if c=='s': pieces.append(str(value)) elif c=='d': pieces.append(str(value)) elif c=='x': pieces.append(hex(int(value))) elif c=='r': pieces.append(repr(value)) else: raise ValueError, "unsupported format character '%s' (%x) at index %d" % ( c, ord(c), i) state = 0 start = i+1 i += 1 if state == 1: raise ValueError, "incomplete format" if index >= 0 and index < len(values) - 1: raise TypeError, 'not all arguments converted during string formatting' pieces.append(format[start:]) return ''.join(pieces) | 025967f218df9e57aab5d0f475ebabe7e91e6ac3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/025967f218df9e57aab5d0f475ebabe7e91e6ac3/stringobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
595,
67,
1711,
972,
780,
67,
15409,
12,
2139,
16,
924,
4672,
10167,
273,
5378,
787,
273,
374,
919,
273,
374,
277,
273,
374,
770,
273,
300,
21,
562,
67,
2139,
273,
562,
12,
2139,
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,
595,
67,
1711,
972,
780,
67,
15409,
12,
2139,
16,
924,
4672,
10167,
273,
5378,
787,
273,
374,
919,
273,
374,
277,
273,
374,
770,
273,
300,
21,
562,
67,
2139,
273,
562,
12,
2139,
13,
... |
fp = MyURLopener().open(url).fp | fp = urllib2.urlopen(url).fp | def appendURL(self, url, included=0): """Append packages from the database with the given URL. Only the first database should specify included=0, so the global information (maintainer, description) get stored.""" if url in self._urllist: return self._urllist.append(url) fp = MyURLopener().open(url).fp dict = plistlib.Plist.fromFile(fp) # Test here for Pimp version, etc if not included: self._version = dict.get('Version', '0.1') if self._version != PIMP_VERSION: sys.stderr.write("Warning: database version %s does not match %s\n" % (self._version, PIMP_VERSION)) self._maintainer = dict.get('Maintainer', '') self._description = dict.get('Description', '') self._appendPackages(dict['Packages']) others = dict.get('Include', []) for url in others: self.appendURL(url, included=1) | 1e67606c8bd1b00548b7c6c5fe923aa5eba2dc4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1e67606c8bd1b00548b7c6c5fe923aa5eba2dc4d/pimp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
1785,
12,
2890,
16,
880,
16,
5849,
33,
20,
4672,
3536,
5736,
5907,
628,
326,
2063,
598,
326,
864,
1976,
18,
5098,
326,
1122,
2063,
1410,
4800,
5849,
33,
20,
16,
1427,
326,
2552,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1785,
12,
2890,
16,
880,
16,
5849,
33,
20,
4672,
3536,
5736,
5907,
628,
326,
2063,
598,
326,
864,
1976,
18,
5098,
326,
1122,
2063,
1410,
4800,
5849,
33,
20,
16,
1427,
326,
2552,
... |
self.button.set_relief(gtk.RELIEF_NONE) | def update_button(self): """Update the state of our close button""" if not self.config['close_button_on_tab']: if self.button: self.button.remove(self.icon) self.remove(self.button) del(self.button) del(self.icon) self.button = None self.icon = None return | 246f3194e104040e58d2d320d848d6de8c3a0804 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1032/246f3194e104040e58d2d320d848d6de8c3a0804/notebook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
5391,
12,
2890,
4672,
3536,
1891,
326,
919,
434,
3134,
1746,
3568,
8395,
309,
486,
365,
18,
1425,
3292,
4412,
67,
5391,
67,
265,
67,
7032,
3546,
30,
309,
365,
18,
5391,
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,
1089,
67,
5391,
12,
2890,
4672,
3536,
1891,
326,
919,
434,
3134,
1746,
3568,
8395,
309,
486,
365,
18,
1425,
3292,
4412,
67,
5391,
67,
265,
67,
7032,
3546,
30,
309,
365,
18,
5391,
30,
... | |
Homology with coefficients in Finite Field of size 7 of Jacobian of the modular curve associated to the congruence subgroup Gamma0(389) | Homology with coefficients in Finite Field of size 7 of Abelian variety J0(389) of dimension 32 | def homology(self, base_ring=ZZ): """ Return the homology of this modular abelian variety. | 231a556974015ed454b20c5783447e82495d8183 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/231a556974015ed454b20c5783447e82495d8183/abvar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13995,
4676,
12,
2890,
16,
1026,
67,
8022,
33,
27096,
4672,
3536,
2000,
326,
13995,
4676,
434,
333,
681,
2490,
1223,
292,
2779,
1394,
14369,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
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,
13995,
4676,
12,
2890,
16,
1026,
67,
8022,
33,
27096,
4672,
3536,
2000,
326,
13995,
4676,
434,
333,
681,
2490,
1223,
292,
2779,
1394,
14369,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if not re.match("^(\s*[-\w]+\s*:\s*[^:;]*(;|$))*$", style): return '' | if not re.match("^(\s*[-\w]+\s*:[^:;]*(;|$))*$", style): return '' | def sanitize_css(self, style): # disallow urls style=re.compile('url\s*\(\s*[^\s)]+?\s*\)\s*').sub(' ',style) | aa0be985f2b3a3bb2e32aa2e78196cf2369835cf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10463/aa0be985f2b3a3bb2e32aa2e78196cf2369835cf/sanitizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8881,
67,
5212,
12,
2890,
16,
2154,
4672,
468,
29176,
6903,
2154,
33,
266,
18,
11100,
2668,
718,
64,
87,
12174,
4713,
87,
14,
15441,
87,
13,
3737,
10936,
87,
12174,
5153,
87,
4035,
293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8881,
67,
5212,
12,
2890,
16,
2154,
4672,
468,
29176,
6903,
2154,
33,
266,
18,
11100,
2668,
718,
64,
87,
12174,
4713,
87,
14,
15441,
87,
13,
3737,
10936,
87,
12174,
5153,
87,
4035,
293... |
if os.path.isdir(line): return line raise NameError('extracting tarball produced no dir') | topdir = line.split('/')[0] if os.path.isdir(topdir): if dir: assert(dir == topdir) else: dir = topdir if dir: return dir else: raise NameError('extracting tarball produced no dir') | def extract_tarball(tarball): """Returns the first extracted directory by the tarball.""" extracted = cat_file_to_cmd(tarball, 'tar xvf - 2>/dev/null', return_output=True).splitlines() for line in extracted: line = re.sub(r'^./', '', line) if not line or line == '.': continue if os.path.isdir(line): return line raise NameError('extracting tarball produced no dir') | e06397b3624b9e24f07493bcda5e9a6855500207 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/e06397b3624b9e24f07493bcda5e9a6855500207/autotest_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
88,
23846,
12,
88,
23846,
4672,
3536,
1356,
326,
1122,
9438,
1867,
635,
326,
29441,
12123,
9438,
273,
6573,
67,
768,
67,
869,
67,
4172,
12,
88,
23846,
16,
296,
11718,
619,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
88,
23846,
12,
88,
23846,
4672,
3536,
1356,
326,
1122,
9438,
1867,
635,
326,
29441,
12123,
9438,
273,
6573,
67,
768,
67,
869,
67,
4172,
12,
88,
23846,
16,
296,
11718,
619,
90... |
return (isinstance(x, int) or isinstance(x, float)) | return ((isinstance(x, int) or isinstance(x,np.int32)) or isinstance(x, float)) | def valid_int_or_float(x): return (isinstance(x, int) or isinstance(x, float)) | 5994d5699cb1c57ad5418bab36a0086aed09164b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/5994d5699cb1c57ad5418bab36a0086aed09164b/validate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
923,
67,
474,
67,
280,
67,
5659,
12,
92,
4672,
327,
14015,
291,
1336,
12,
92,
16,
509,
13,
578,
1549,
12,
92,
16,
6782,
18,
474,
1578,
3719,
578,
1549,
12,
92,
16,
1431,
3719,
225,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
923,
67,
474,
67,
280,
67,
5659,
12,
92,
4672,
327,
14015,
291,
1336,
12,
92,
16,
509,
13,
578,
1549,
12,
92,
16,
6782,
18,
474,
1578,
3719,
578,
1549,
12,
92,
16,
1431,
3719,
225,... |
print(REFLECTION_COMMAND_NAME + REFL_GET_UNKNOWN_SUB_COMMAND_NAME + name + '\n' + self._id + '\n' + END_COMMAND_PART) | def __getattr__(self, name): print(REFLECTION_COMMAND_NAME + REFL_GET_UNKNOWN_SUB_COMMAND_NAME + name + '\n' + self._id + '\n' + END_COMMAND_PART) answer = self._gateway_client.send_command(REFLECTION_COMMAND_NAME + REFL_GET_UNKNOWN_SUB_COMMAND_NAME + name + '\n' + self._id + '\n' + END_COMMAND_PART) if answer == SUCCESS_PACKAGE: return JavaPackage(name, self._gateway_client, jvm_id = self._id) elif answer.startswith(SUCCESS_CLASS): return JavaClass(answer[CLASS_FQN_START:], self._gateway_client) else: raise Py4JError('%s does not exist in the JVM' % name) | 0b1eb04940627e8c1c31a08b55a432ba1573929f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14200/0b1eb04940627e8c1c31a08b55a432ba1573929f/java_gateway.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
508,
4672,
5803,
273,
365,
6315,
11127,
67,
2625,
18,
4661,
67,
3076,
12,
10771,
15445,
67,
19104,
67,
1985,
397,
2438,
19054,
67,
3264,
67,
14737,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
588,
1747,
972,
12,
2890,
16,
508,
4672,
5803,
273,
365,
6315,
11127,
67,
2625,
18,
4661,
67,
3076,
12,
10771,
15445,
67,
19104,
67,
1985,
397,
2438,
19054,
67,
3264,
67,
14737,
... | |
btnHeight = 28 | btnHeight = self.buttons[0].height() | def placeInField(self): """place the dialog at bottom or to the right depending on space. #TODO: We still have some magic numbers here""" field = self.client.game.field cwi = field.centralWidget() view = field.centralView geometry = self.geometry() btnHeight = 28 vertical = view.width() > view.height() * 1.2 if vertical: h = (len(self.buttons) + 1) * btnHeight * 1.2 w = (cwi.width() - cwi.height() ) / 2 geometry.setX(cwi.width() - w) geometry.setY(cwi.height()/2 - h/2) else: handBoard = self.client.game.myself.handBoard if not handBoard: # we are in the progress of logging out return hbLeftTop = view.mapFromScene(handBoard.mapToScene(handBoard.rect().topLeft())) hbRightBottom = view.mapFromScene(handBoard.mapToScene(handBoard.rect().bottomRight())) w = hbRightBottom.x() - hbLeftTop.x() h = btnHeight geometry.setY(cwi.height() - h) geometry.setX(hbLeftTop.x()) spacer1 = QSpacerItem(20, 20, QSizePolicy.Expanding, QSizePolicy.Expanding) spacer2 = QSpacerItem(20, 20, QSizePolicy.Expanding, QSizePolicy.Expanding) self.layout.addItem(spacer1, 0, 0) for idx, btn in enumerate(self.buttons + [self.progressBar]): self.layout.addWidget(btn, idx+1 if vertical else 0, idx+1 if not vertical else 0) idx = len(self.buttons) + 2 self.layout.addItem(spacer2, idx if vertical else 0, idx if not vertical else 0) | 565cf116a0e6175a21a7dd392538ce237dee61f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1679/565cf116a0e6175a21a7dd392538ce237dee61f1/humanclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3166,
382,
974,
12,
2890,
4672,
3536,
964,
326,
6176,
622,
5469,
578,
358,
326,
2145,
8353,
603,
3476,
18,
468,
6241,
30,
1660,
4859,
1240,
2690,
8146,
5600,
2674,
8395,
652,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3166,
382,
974,
12,
2890,
4672,
3536,
964,
326,
6176,
622,
5469,
578,
358,
326,
2145,
8353,
603,
3476,
18,
468,
6241,
30,
1660,
4859,
1240,
2690,
8146,
5600,
2674,
8395,
652,
273,
365,
... |
self._zoneData = None | def generate(self): """ Inheritors should put functions that require self.zoneId or other networked info in this function. """ assert self.notify.debugStateCall(self) self._zoneData = None | 5972918101481ab5e3a28f11a55aff3894427470 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/5972918101481ab5e3a28f11a55aff3894427470/DistributedObjectAI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
2890,
4672,
3536,
25953,
1383,
1410,
1378,
4186,
716,
2583,
365,
18,
3486,
548,
578,
1308,
2483,
329,
1123,
316,
333,
445,
18,
3536,
1815,
365,
18,
12336,
18,
4148,
1119,
1477,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2103,
12,
2890,
4672,
3536,
25953,
1383,
1410,
1378,
4186,
716,
2583,
365,
18,
3486,
548,
578,
1308,
2483,
329,
1123,
316,
333,
445,
18,
3536,
1815,
365,
18,
12336,
18,
4148,
1119,
1477,... | |
standard_deviation_info = { } for key in loggraph.keys(): if 'standard deviation v. Intensity' in key: dataset = key.split(',')[-1].strip() standard_deviation_info[dataset] = transpose_loggraph( loggraph[key]) for dataset in standard_deviation_info.keys(): info = standard_deviation_info[dataset] for j in range(len(info['1_Range'])): n_full = int(info['5_Number'][j]) I_full = float(info['4_Irms'][j]) s_full = float(info['7_SigmaFull'][j]) n_partial = int(info['9_Number'][j]) I_partial = float(info['8_Irms'][j]) s_partial = float(info['11_SigmaPartial'][j]) n_tot = n_full + n_partial if n_tot: i_tot = ((n_full * I_full) + (n_partial * I_partial)) / n_tot s_tot = ((n_full * s_full) + (n_partial * s_partial)) / n_tot else: i_tot = 0.0 s_tot = 1.0 | def _scale(self): '''Perform all of the operations required to deliver the scaled data.''' | b7da06082d217f104acf96fc8397a0725d697ba5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3290/b7da06082d217f104acf96fc8397a0725d697ba5/CCP4ScalerImplementation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5864,
12,
2890,
4672,
9163,
4990,
777,
434,
326,
5295,
1931,
358,
11795,
326,
12304,
501,
1093,
6309,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
5864,
12,
2890,
4672,
9163,
4990,
777,
434,
326,
5295,
1931,
358,
11795,
326,
12304,
501,
1093,
6309,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
span = len(texture) / (max_z - min_z) | span = (len(texture)-1) / (max_z - min_z) | def g(xx,yy): return float(f.subs({x:xx, y:yy})) | d6d7ba37b33446e1ec287ba5cc3538d73957271d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/d6d7ba37b33446e1ec287ba5cc3538d73957271d/plot3d.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
314,
12,
5279,
16,
6795,
4672,
327,
1431,
12,
74,
18,
22284,
12590,
92,
30,
5279,
16,
677,
30,
6795,
31700,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
314,
12,
5279,
16,
6795,
4672,
327,
1431,
12,
74,
18,
22284,
12590,
92,
30,
5279,
16,
677,
30,
6795,
31700,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
def item_by_name(self,name): | def items_by_name(self,name): | def item_by_name(self,name): if not name: raise ValueError,"name is None" name=to_utf8(name) if not name.contains('"'): expr='r:item[@name="%s"]' % name elif not name.contains("'"): expr="r:item[@name='%s']" % name else: raise RosterError,"Unsupported roster item name format" l=self.xpath_ctxt.xpathEval(expr) if not l: raise KeyError,name ret=[] for i in l: ret.append(RosterItem(self,i)) return ret | c5c9bc0fda36b704982068c3cb9177aefedd9b10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/c5c9bc0fda36b704982068c3cb9177aefedd9b10/roster.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1516,
67,
1637,
67,
529,
12,
2890,
16,
529,
4672,
309,
486,
508,
30,
1002,
2068,
10837,
529,
353,
599,
6,
508,
33,
869,
67,
3158,
28,
12,
529,
13,
309,
486,
508,
18,
12298,
2668,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1516,
67,
1637,
67,
529,
12,
2890,
16,
529,
4672,
309,
486,
508,
30,
1002,
2068,
10837,
529,
353,
599,
6,
508,
33,
869,
67,
3158,
28,
12,
529,
13,
309,
486,
508,
18,
12298,
2668,
5... |
raise ValueError('Debug %s no longer found (maybe it has expired?)' % debugcount) | raise ValueError( 'Debug %s no longer found (maybe it has expired?)' % debugcount) | def replacement(self, **form): try: if 'debugcount' not in form: raise ValueError('You must provide a debugcount parameter') debugcount = form.pop('debugcount') try: debugcount = int(debugcount) except ValueError: raise ValueError('Bad value for debugcount') if debugcount not in self.debug_infos: raise ValueError('Debug %s no longer found (maybe it has expired?)' % debugcount) debug_info = self.debug_infos[debugcount] return func(self, debug_info=debug_info, **form) except ValueError, e: form['headers']['status'] = '500 Server Error' return '<html>There was an error: %s</html>' % e | d0441ff28d999e1ade91f96ba9f46dc821fc0f2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11400/d0441ff28d999e1ade91f96ba9f46dc821fc0f2d/middleware.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6060,
12,
2890,
16,
2826,
687,
4672,
775,
30,
309,
296,
4148,
1883,
11,
486,
316,
646,
30,
1002,
2068,
2668,
6225,
1297,
5615,
279,
1198,
1883,
1569,
6134,
1198,
1883,
273,
646,
18,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6060,
12,
2890,
16,
2826,
687,
4672,
775,
30,
309,
296,
4148,
1883,
11,
486,
316,
646,
30,
1002,
2068,
2668,
6225,
1297,
5615,
279,
1198,
1883,
1569,
6134,
1198,
1883,
273,
646,
18,
51... |
if not intDate.isdigit(): if intDate == "": return else: self.errorMsgs.append("WARNING: during conversion of an integer to date format this string was passed: %s which is not all numbers" % intDate) intDate = 0 td = timedelta(days=int(intDate)) isodate = date(1900,01,01) + td isodatetime = str(isodate)+'T00:00:00' if self.debug == True: print 'Incoming Date is: %s and converted Date is: %s' % (intDate, isodatetime) return isodatetime | if not intDate.isdigit(): if intDate == "": return else: self.errorMsgs.append("WARNING: during conversion of an integer to date format this string was passed: %s which is not all numbers" % intDate) intDate = 0 td = timedelta(days=int(intDate)) isodate = date(1900,01,01) + td isodatetime = str(isodate)+'T00:00:00' if self.debug == True: print 'Incoming Date is: %s and converted Date is: %s' % (intDate, isodatetime) return isodatetime | def convertIntegerToDateTime(self, intDate): | 47d2884a8b5be4efadf798bbb2e71a3d5e993c3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9116/47d2884a8b5be4efadf798bbb2e71a3d5e993c3e/svcpointxml_406_writer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
4522,
774,
5096,
12,
2890,
16,
509,
1626,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
4522,
774,
5096,
12,
2890,
16,
509,
1626,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self._p_changed=True | self._p_changed = True | def _BTreeContainer__len(self): import logging log = logging.getLogger('zope.app.container.btree') l=Length() ol = super(BTreeContainer, self).__len__() if ol>0: l.change(ol) self._p_changed=True log.info("Storing length of %r" % self) return l | 3dd2cccf99eff581396b96ad54ad5ef636646a18 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9826/3dd2cccf99eff581396b96ad54ad5ef636646a18/btree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
38,
2471,
2170,
972,
1897,
12,
2890,
4672,
1930,
2907,
613,
273,
2907,
18,
588,
3328,
2668,
94,
1306,
18,
2910,
18,
3782,
18,
70,
3413,
6134,
328,
33,
1782,
1435,
8793,
273,
2240,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
38,
2471,
2170,
972,
1897,
12,
2890,
4672,
1930,
2907,
613,
273,
2907,
18,
588,
3328,
2668,
94,
1306,
18,
2910,
18,
3782,
18,
70,
3413,
6134,
328,
33,
1782,
1435,
8793,
273,
2240,... |
'list': LIST_LIT, 'List': LIST_LIT, '[]': LIST_LIT, | 'list': LIST_LIT, 'List': LIST_LIT, '[]': LIST_LIT, | def hasItemStartingWith(p_seq, p_start): for item in p_seq: if isinstance(item, STR_TYPES) and item.startswith(p_start): return True return False | f30d9d36024702597d77a49a54ce0e27a74969d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12157/f30d9d36024702597d77a49a54ce0e27a74969d8/generator3.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
1180,
11715,
1190,
12,
84,
67,
5436,
16,
293,
67,
1937,
4672,
364,
761,
316,
293,
67,
5436,
30,
309,
1549,
12,
1726,
16,
7128,
67,
10564,
13,
471,
761,
18,
17514,
1918,
12,
84,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
711,
1180,
11715,
1190,
12,
84,
67,
5436,
16,
293,
67,
1937,
4672,
364,
761,
316,
293,
67,
5436,
30,
309,
1549,
12,
1726,
16,
7128,
67,
10564,
13,
471,
761,
18,
17514,
1918,
12,
84,
... |
default_section = parse_option_section(config, config.items('general'), 5) | try: default_section = parse_option_section(config, config.items('general'), 5) except NoSectionError: default_section = [] pass | def parse_color_section(conf, sname): """Parse the config section sname for colors configuration """ pass | 53857c70b2b578db91748d22dc22884ee89b0a37 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12355/53857c70b2b578db91748d22dc22884ee89b0a37/base_quality_interrogation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
3266,
67,
3464,
12,
3923,
16,
272,
529,
4672,
3536,
3201,
326,
642,
2442,
272,
529,
364,
5740,
1664,
3536,
1342,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
3266,
67,
3464,
12,
3923,
16,
272,
529,
4672,
3536,
3201,
326,
642,
2442,
272,
529,
364,
5740,
1664,
3536,
1342,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
wtd = wtd - len(decdata) | wtd = totalwtd - len(decdata) | def read(self, wtd): | 685e16d7d64a75a3703f25888d3f192ad5c25f70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/685e16d7d64a75a3703f25888d3f192ad5c25f70/binhex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
341,
4465,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
341,
4465,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.old_write = self.request.write self.request.write = self.rst_write | self.original_write, self.request.write = self.request.write, self.capture_wiki_formatting | def __init__(self, document, formatter, request, parser, writer): html4css1.HTMLTranslator.__init__(self, document) self.formatter = formatter self.request = request # We supply our own request.write so that the html is added to the # html4css1 body list instead of printed to stdout by the default # MoinTranslator writer. TODO: Confirm this is really what we're doing. self.old_write = self.request.write self.request.write = self.rst_write self.wikiparser = parser self.wikiparser.request = request self.wikiparser.request.write = self.rst_write # When we use MoinMoin to interpret a MoinMoin refuri we want to strip # the paragraph tags to keep the correct formatting. This is used in # rst_write where by default we don't need to strip anything which is # why it is initialized to 0. self.strip_paragraph = 0 self.writer = writer # MoinMoin likes to start the initial headers at level 3 and the title # gets level 2, so to comply with their style's we do so here also. # TODO: Could this be fixed by passing this value in settings_overrides? self.initial_header_level = 3 # Temporary place for wiki returned markup. This will be filled when # replacing the default writer with the capture_wiki_formatting # function (see visit_image for an example). self.wiki_text = '' | b1e8c31c1276da7b2b2d7f198bb518e5ce112c66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/b1e8c31c1276da7b2b2d7f198bb518e5ce112c66/rst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1668,
16,
4453,
16,
590,
16,
2082,
16,
2633,
4672,
1729,
24,
5212,
21,
18,
4870,
12233,
16186,
2738,
972,
12,
2890,
16,
1668,
13,
365,
18,
12354,
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,
1001,
2738,
972,
12,
2890,
16,
1668,
16,
4453,
16,
590,
16,
2082,
16,
2633,
4672,
1729,
24,
5212,
21,
18,
4870,
12233,
16186,
2738,
972,
12,
2890,
16,
1668,
13,
365,
18,
12354,
273,
... |
logger.info(u"Simulation: Copy a Channel Icon (%s) for directory (%s)." % (filepath, dirpath)) | logger.info(u"Simulation: Copy a Channel Icon (%s) for directory (%s)." % (video[u'channel_icon'], dirpath)) | def main(): """Support mirobridge from the command line returns True """ global localhostname, simulation, verbose, storagegroups, ffmpeg, channel_id, channel_num global flat, download_sleeptime, channel_watch_only, channel_mythvideo_only, channel_new_watch_copy global vid_graphics_dirs, storagegroups, imagemagick, statistics, requirements_are_met global graphic_suffix, graphic_path_suffix, graphic_name_suffix global mythcommflag_recordings, mythcommflag_videos parser = OptionParser(usage=u"%prog usage: mirobridge -huevstdociVHSCWM [parameters]\n") parser.add_option( "-e", "--examples", action="store_true", default=False, dest="examples", help=u"Display examples for executing the jamu script") parser.add_option( "-v", "--version", action="store_true", default=False, dest="version", help=u"Display version and author information") parser.add_option( "-s", "--simulation", action="store_true", default=False, dest="simulation", help=u"Simulation (dry run), no files are copied, symlinks created or MythTV data bases altered. If option (-n) is NOT specified Miro auto downloads WILL take place. See option (-n) help for details.") parser.add_option( "-t", "--testenv", action="store_true", default=False, dest="testenv", help=u"Test that the local environment can run all mirobridge functionality") parser.add_option( "-n", "--no_autodownload", action="store_true", default=False, dest="no_autodownload", help=u"Do not perform Miro Channel updates, video expiry and auto-downloadings. Default is to perform all perform all Channel maintenance features.") parser.add_option( "-o", "--nosubdirs", action="store_true", default=False, dest="nosubdirs", help=u"Organise MythVideo's Miro directory WITHOUT Miro channel subdirectories. The default is to have Channel subdirectories.") parser.add_option( "-c", "--channel", metavar="CHANNEL_ID:CHANNEL_NUM", default="", dest="channel", help=u'Specifies the channel id that is used for Miros unplayed recordings. Enter as "xxxx:yyy". Default is 9999:999. Be warned that once you change the default channel_id "9999" you must always use this option!') #parser.add_option( "-i", "--import", metavar="CONFIGFILE", default="", dest="import", # help=u'Import Miro exported configuration file and or channel changes.') parser.add_option( "-V", "--verbose", action="store_true", default=False, dest="verbose", help=u"Display verbose messages when processing") parser.add_option( "-H", "--hostname", metavar="HOSTNAME", default="", dest="hostname", help=u"MythTV Backend hostname mirobridge is to up date") parser.add_option( "-S", "--sleeptime", metavar="SLEEP_DELAY_SECONDS", default="", dest="sleeptime", help=u"The amount of seconds to wait for an auto download to start.\nThe default is 60 seconds, but this may need to be adjusted for slower Internet connections.") parser.add_option( "-C", "--addchannel", metavar="ICONFILE_PATH", default="OFF", dest="addchannel", help=u'Add a Miro Channel record to MythTV. This gets rid of the "#9999 #9999" on the Watch Recordings screen and replaces it with the usual\nthe channel number and channel name.\nThe default if not overridden by the (-c) option is channel number 999.\nIf a filename and path is supplied it will be set as the channels icon. Make sure your override channel number is NOT one of your current MythTV channel numbers.\nThis option is typically only used once as there can only be one Miro channel record at a time.') parser.add_option( "-N", "--new_watch_copy", action="store_true", default=False, dest="new_watch_copy", help=u'For ALL Miro Channels: Use the "Watch Recording" screen to watch new Miro downloads then once watched copy the videos, icons, screen shot and metadata to MythVideo. Once coping is complete delete the video from Miro.\nThis option overrides any "mirobridge.conf" settings.') parser.add_option( "-W", "--watch_only", action="store_true", default=False, dest="watch_only", help=u'For ALL Miro Channels: Only use "Watch Recording" never move any Miro videos to MythVideo.\nThis option overrides any "mirobridge.conf" settings.') parser.add_option( "-M", "--mythvideo_only", action="store_true", default=False, dest="mythvideo_only", help=u'For ALL Miro Channel videos: Copy newly downloaded Miro videos to MythVideo and removed from Miro. These Miro videos never appear in the MythTV "Watch Recording" screen.\nThis option overrides any "mirobridge.conf" settings.') opts, args = parser.parse_args() if opts.examples: # Display example information sys.stdout.write(examples_txt+'\n') sys.exit(True) if opts.version: # Display program information sys.stdout.write(u"\nTitle: (%s); Version: description(%s); Author: (%s)\n%s\n" % ( __title__, __version__, __author__, __purpose__ )) sys.exit(True) if opts.testenv: test_environment = True else: test_environment = False # Verify that Miro is not currently running if isMiroRunning(): sys.exit(False) # Verify that only None or one of the mutually exclusive (-W), (-M) and (-N) options is being used x = 0 if opts.new_watch_copy: x+=1 if opts.watch_only: x+=1 if opts.mythvideo_only: x+=1 if x > 1: logger.critical(u"The (-W), (-M) and (-N) options are mutually exclusive, so only one can be specified at a time.") sys.exit(False) # Set option related global variables simulation = opts.simulation verbose = opts.verbose if opts.hostname: # Override localhostname if the user specified an hostname localhostname = opts.hostname # Validate settings # Make sure mirobridge is to update a real MythTV backend if not mythdb.getSetting(u'BackendServerIP', hostname = localhostname): logger.critical(u"The MythTV backend (%s) is not a MythTV backend." % localhostname) if test_environment: requirements_are_met = False else: sys.exit(False) ## Video base directory and current version and revision numbers base_video_dir = config.get(prefs.MOVIES_DIRECTORY) miro_version_rev = u"%s r%s" % (config.get(prefs.APP_VERSION), config.get(prefs.APP_REVISION_NUM)) displayMessage(u"Miro Version (%s)" % (miro_version_rev)) displayMessage(u"Base Miro Video Directory (%s)" % (base_video_dir,)) logger.info(u'') # Verify Miro version sufficent and Video file configuration correct. if not os.path.isdir(base_video_dir): logger.critical(u"The Miro Videos directory (%s) does not exist." % str(base_video_dir)) if test_environment: requirements_are_met = False else: sys.exit(False) if config.get(prefs.APP_VERSION) < u"2.0.3": logger.critical(u"The installed version of Miro (%s) is too old. It must be at least v2.0.3 or higher." % config.get(prefs.APP_VERSION)) if test_environment: requirements_are_met = False else: sys.exit(False) # Get storage groups if getStorageGroups() == False: logger.critical(u"Retrieving storage groups from the MythTV data base failed") if test_environment: requirements_are_met = False else: sys.exit(False) elif not u'default' in storagegroups.keys(): logger.critical(u"There must be a 'Default' storage group") if test_environment: requirements_are_met = False else: sys.exit(False) if opts.channel: channel = opts.channel.split(u':') if len(channel) != 2: logger.critical(u"The Channel (%s) must be in the format xxx:yyy with x an y all numeric." % str(opts.channel)) if test_environment: requirements_are_met = False else: sys.exit(False) elif not _can_int(channel[0]) or not _can_int(channel[1]): logger.critical(u"The Channel_id (%s) and Channel_num (%s) must be numeric." % (channel[0], channel[1])) if test_environment: requirements_are_met = False else: sys.exit(False) else: channel_id = int(channel[0]) channel_num = int(channel[1]) if opts.sleeptime: if not _can_int(opts.sleeptime): logger.critical(u"Auto-dewnload sleep time (%s) must be numeric." % str(opts.sleeptime)) if test_environment: requirements_are_met = False else: sys.exit(False) else: download_sleeptime = float(opts.sleeptime) getMythtvDirectories() # Initialize all the Video and graphics directory dictionary if opts.nosubdirs: # Did the user want a flat MythVideo "Miro" directory structure? flat = True # Get the values in the mirobridge.conf configuration file setUseroptions() if opts.watch_only: # ALL Miro videos will only be viewed in the MythTV "Watch Recordings" screen channel_watch_only = [u'all'] if opts.mythvideo_only: # ALL Miro videos will be copied to MythVideo and removed from Miro channel_mythvideo_only = {u'all': vid_graphics_dirs[u'mythvideo']+u'Miro/'} # Once watched ALL Miro videos will be copied to MythVideo and removed from Miro if opts.new_watch_copy: channel_new_watch_copy = {u'all': vid_graphics_dirs[u'mythvideo']+u'Miro/'} # Verify that "Mythvideo Only" and "New-Watch-Copy" channels do not clash if len(channel_mythvideo_only) and len(channel_new_watch_copy): for key in channel_mythvideo_only.keys(): if key in channel_new_watch_copy.keys(): logger.critical(u'The Miro Channel (%s) cannot be used as both a "Mythvideo Only" and "New-Watch-Copy" channel.' % key) if test_environment: requirements_are_met = False else: sys.exit(False) # Verify that ImageMagick is installed ret = useImageMagick(u"convert -version") if ret < 0 or ret > 1: logger.critical(u"ImageMagick must be installed, graphics cannot be resized or converted to the required graphics format (e.g. jpg and or png)") if test_environment: requirements_are_met = False else: sys.exit(False) # Verify that mythcommflag is installed mythcommflagpath = getlocationMythcommflag() if mythcommflagpath: mythcommflag_recordings = mythcommflag_recordings % mythcommflagpath mythcommflag_videos = mythcommflag_videos % mythcommflagpath else: logger.critical(u"mythcommflag must be installed so that Miro video seek tables can be built.") if test_environment: requirements_are_met = False else: sys.exit(False) if opts.testenv: # All tests passed getVideoDetails(u"") # Test that ffmpeg is available if ffmpeg and requirements_are_met: logger.info(u"The environment test passed !\n\n") sys.exit(True) else: logger.critical(u"The environment test FAILED. See previously displayed error messages!") sys.exit(False) if opts.addchannel != u'OFF': # Add a Miro Channel record - Should only be done once createChannelRecord(opts.addchannel, channel_id, channel_num) logger.info(u"The Miro Channel record has been successfully created !\n\n") sys.exit(True) ########################################### # Mainlogic for all Miro and MythTV bridge ########################################### # # Start the Miro Front and Backend - This allows mirobridge to execute actions on the Miro backend # displayMessage(u"Starting Miro Frontend and Backend") startup.initialize(config.get(prefs.THEME_NAME)) app.cli_events = EventHandler() app.cli_events.connect_to_signals() startup.startup() app.cli_events.startup_event.wait() if app.cli_events.startup_failure: logger.critical(u"Starting Miro Frontend and Backend failed: (%s)" % app.cli_events.startup_failure[0]) print_text(app.cli_events.startup_failure[1]) app.controller.shutdown() time.sleep(5) # Let the shutdown processing complete sys.exit(False) app.cli_interpreter = MiroInterpreter() if opts.verbose: app.cli_interpreter.verbose = True else: app.cli_interpreter.verbose = False app.cli_interpreter.simulation = opts.simulation app.cli_interpreter.videofiles = [] app.cli_interpreter.downloading = False app.cli_interpreter.icon_cache_dir = config.get(prefs.ICON_CACHE_DIRECTORY) app.cli_interpreter.imagemagick = imagemagick app.cli_interpreter.statistics = statistics if config.get(prefs.APP_VERSION) < u"2.5.0": app.renderer = app.cli_interpreter else: app.movie_data_program_info = app.cli_interpreter.movie_data_program_info # # Optionally Update Miro feeds and # download any "autodownloadable" videos which are pending # if not opts.no_autodownload: if opts.verbose: app.cli_interpreter.verbose = False app.cli_interpreter.do_mythtv_getunwatched(u'') before_download = len(app.cli_interpreter.videofiles) if opts.verbose: app.cli_interpreter.verbose = True app.cli_interpreter.do_mythtv_update_autodownload(u'') time.sleep(download_sleeptime) firsttime = True while True: app.cli_interpreter.do_mythtv_check_downloading(u'') if app.cli_interpreter.downloading: time.sleep(30) firsttime = False continue elif firsttime: time.sleep(download_sleeptime) firsttime = False continue else: break if opts.verbose: app.cli_interpreter.verbose = False app.cli_interpreter.do_mythtv_getunwatched(u'') after_download = len(app.cli_interpreter.videofiles) statistics[u'Miros_videos_downloaded'] = after_download - before_download if opts.verbose: app.cli_interpreter.verbose = True # Deal with orphaned oldrecorded records. # These records indicate that the MythTV user deleted the video from the Watched Recordings screen # or from MythVideo # These video items must also be deleted from Miro videostodelete = getOldrecordedOrphans() if len(videostodelete): displayMessage(u"Starting Miro delete of videos deleted in the MythTV Watched Recordings screen.") for video in videostodelete: # Completely remove the video and item information from Miro app.cli_interpreter.do_mythtv_item_remove([video[u'title'], video[u'subtitle']]) # # Collect the set of played Miro video files # app.cli_interpreter.videofiles = getPlayedMiroVideos() # # Updated the played status of items # if app.cli_interpreter.videofiles: displayMessage(u"Starting Miro update of watched MythTV videos") app.cli_interpreter.do_mythtv_updatewatched(u'') # # Get the unwatched videos details from Miro # app.cli_interpreter.do_mythtv_getunwatched(u'') unwatched = app.cli_interpreter.videofiles # # Get the watched videos details from Miro # app.cli_interpreter.do_mythtv_getwatched(u'') watched = app.cli_interpreter.videofiles # # Remove any duplicate Miro videoes from the unwatched or watched list of Miro videos # This means that Miro has duplicates due to a Miro/Channel website issue # These videos should not be added to the MythTV Watch Recordings screen # unwatched_copy = [] for item in unwatched: unwatched_copy.append(item) for item in unwatched_copy: # Check for a duplicate against already watched Miro videos for x in watched: if item[u'channelTitle'] == x[u'channelTitle'] and item[u'title'] == x[u'title']: try: unwatched.remove(item) # Completely remove this duplicate video and item information from Miro app.cli_interpreter.do_mythtv_item_remove(item[u'videoFilename']) displayMessage(u"Skipped adding a duplicate Miro video to the MythTV Watch Recordings screen (%s - %s) which is already in MythVideo.\nSometimes a Miro channel has the same video downloaded multiple times.\nThis is a Miro/Channel web site issue and often rectifies itself overtime." % (item[u'channelTitle'], item[u'title'])) except ValueError: pass duplicates = [] for item in unwatched_copy: dup_flag = 0 for x in unwatched: # Check for a duplicate against un-watched Miro videos if item[u'channelTitle'] == x[u'channelTitle'] and item[u'title'] == x[u'title']: dup_flag+=1 if dup_flag > 1: for x in duplicates: if item[u'channelTitle'] == x[u'channelTitle'] and item[u'title'] == x[u'title']: break else: duplicates.append(item) for duplicate in duplicates: try: unwatched.remove(duplicate) # Completely remove this duplicate video and item information from Miro app.cli_interpreter.do_mythtv_item_remove(duplicate[u'videoFilename']) displayMessage(u"Skipped adding a Miro video to the MythTV Watch Recordings screen (%s - %s) as there are duplicate 'new' video items.\nSometimes a Miro channel has the same video downloaded multiple times.\nThis is a Miro/Channel web site issue and often rectifies itself overtime." % (duplicate[u'channelTitle'], duplicate[u'title'])) except ValueError: pass # # Deal with any Channel videos that are to be copied and removed from Miro # copy_items = [] # Copy unwatched and watched Miro videos (all or only selected Channels) if u'all' in channel_mythvideo_only: for array in [watched, unwatched]: for item in array: copy_items.append(item) elif len(channel_mythvideo_only): for array in [watched, unwatched]: for video in array: if filter(is_not_punct_char, video[u'channelTitle'].lower()) in channel_mythvideo_only.keys(): copy_items.append(video) # Copy ONLY watched Miro videos (all or only selected Channels) if u'all' in channel_new_watch_copy: for video in watched: copy_items.append(video) elif len(channel_new_watch_copy): for video in watched: if filter(is_not_punct_char, video[u'channelTitle'].lower()) in channel_new_watch_copy.keys(): copy_items.append(video) channels_to_copy = {} for key in channel_mythvideo_only.keys(): channels_to_copy[key] = channel_mythvideo_only[key] for key in channel_new_watch_copy.keys(): channels_to_copy[key] = channel_new_watch_copy[key] for video in copy_items: dir_key = filter(is_not_punct_char, video[u'channelTitle'].lower()) # Create the subdirectories to copy the video into directory_coverart = False if not os.path.isdir(channels_to_copy[dir_key]): if simulation: logger.info(u"Simulation: Creating the MythVideo directory (%s)." % (channels_to_copy[dir_key])) else: os.makedirs(channels_to_copy[dir_key]) directory_coverart = True # If the directory was just created it needs coverart else: if video[u'channel_icon']: ext = getExtention(video[u'channel_icon']) if not os.path.isfile(u"%s%s.%s" % (channels_to_copy[dir_key], video[u'channelTitle'].lower(), ext)): directory_coverart = True # If the directory was just created it needs coverart elif video[u'item_icon']: ext = getExtention(video[u'item_icon']) if not os.path.isfile(u"%s%s - %s.%s" % (channels_to_copy[dir_key], video[u'channelTitle'].lower(), video[u'title'].lower(), ext)): directory_coverart = True # If the directory was just created it needs coverart # Copy the Channel icon located in the posters/coverart directory if directory_coverart and video[u'channel_icon']: ext = getExtention(video[u'channel_icon']) tmp_path = channels_to_copy[dir_key][:-1] foldername = tmp_path[tmp_path.rindex(u'/')+1:] dirpath = u"%s%s" % (channels_to_copy[dir_key], u'folder.jpg') dirpath2 = u"%s%s" % (channels_to_copy[dir_key], u'folder.png') if os.path.isfile(dirpath) or os.path.isfile(dirpath2): # See if a folder cover already exists pass else: if simulation: logger.info(u"Simulation: Copy a Channel Icon (%s) for directory (%s)." % (filepath, dirpath)) else: try: # Miro Channel icon copy for the new subdirectory useImageMagick(u'convert "%s" "%s"' % (video[u'channel_icon'], dirpath)) except: logger.critical(u"Copy a Channel Icon (%s) for directory (%s) failed." % (video[u'channel_icon'], dirpath)) # Gracefully close the Miro database and shutdown the Miro Front and Back ends app.controller.shutdown() time.sleep(5) # Let the shutdown processing complete sys.exit(False) # Copy the Miro video file save_video_filename = video[u'videoFilename'] # This filename is needed later for deleting in Miro ext = getExtention(video[u'videoFilename']) if ext.lower() == u'm4v': ext = u'mpg' filepath = u"%s%s - %s.%s" % (channels_to_copy[dir_key], video[u'channelTitle'], video[u'title'], ext) if simulation: logger.info(u"Simulation: Copying the Miro video (%s) to the MythVideo directory (%s)." % (video[u'videoFilename'], filepath)) else: try: # Miro video copied into a MythVideo directory shutil.copy2(video[u'videoFilename'], filepath) statistics[u'Miros_MythVideos_copied']+=1 if u'mythvideo' in storagegroups.keys(): video[u'videoFilename'] = filepath.replace(storagegroups[u'mythvideo'], u'') else: video[u'videoFilename'] = filepath except: logger.critical(u"Copying the Miro video (%s) to the MythVideo directory (%s).\n This maybe a permissions error (mirobridge.py does not have permission to write to the directory)." % (video[u'videoFilename'], filepath)) # Gracefully close the Miro database and shutdown the Miro Front and Back ends app.controller.shutdown() time.sleep(5) # Let the shutdown processing complete sys.exit(False) # Copy the Channel or item's icon if video[u'channel_icon'] and not video[u'channelTitle'].lower() in channel_icon_override: pass else: if video[u'item_icon']: video[u'channel_icon'] = video[u'item_icon'] if video[u'channel_icon']: ext = getExtention(video[u'channel_icon']) if video[u'channelTitle'].lower() in channel_icon_override: filepath = u"%s%s - %s%s.%s" % (vid_graphics_dirs[u'posterdir'], video[u'channelTitle'], video[u'title'], graphic_suffix[u'posterdir'], ext) else: filepath = u"%s%s%s.%s" % (vid_graphics_dirs[u'posterdir'], video[u'channelTitle'], graphic_suffix[u'posterdir'], ext) # There may already be a Channel icon available or it is a symlink which needs to be replaced if not os.path.isfile(filepath) or os.path.islink(filepath): if simulation: logger.info(u"Simulation: Copying the Channel Icon (%s) to the poster directory (%s)." % (video[u'channel_icon'], filepath)) else: try: # Miro Channel icon copied into a MythVideo directory try: # Remove any old symlink file os.remove(filepath) except OSError: pass shutil.copy2(video[u'channel_icon'], filepath) if u'posterdir' in storagegroups.keys(): video[u'channel_icon'] = filepath.replace(storagegroups[u'posterdir'], u'') else: video[u'channel_icon'] = filepath except: logger.critical(u"Copying the Channel Icon (%s) to the poster directory (%s).\n This maybe a permissions error (mirobridge.py does not have permission to write to the directory)." % (video[u'channel_icon'], filepath)) # Gracefully close the Miro database and shutdown the Miro Front and Back ends app.controller.shutdown() time.sleep(5) # Let the shutdown processing complete sys.exit(False) else: if u'posterdir' in storagegroups.keys(): video[u'channel_icon'] = filepath.replace(storagegroups[u'posterdir'], u'') else: video[u'channel_icon'] = filepath # There may already be a Screenshot available or it is a symlink which needs to be replaced if video[u'screenshot']: ext = getExtention(video[u'screenshot']) filepath = u"%s%s - %s%s.%s" % (vid_graphics_dirs[u'episodeimagedir'], video[u'channelTitle'], video[u'title'], graphic_suffix[u'episodeimagedir'], ext) else: filepath = u'' if not os.path.isfile(filepath) or os.path.islink(filepath): if video[u'screenshot']: if simulation: logger.info(u"Simulation: Copying the Screenshot (%s) to the Screenshot directory (%s)." % (video[u'screenshot'], filepath)) else: try: # Miro Channel icon copied into a MythVideo directory try: # Remove any old symlink file os.remove(filepath) except OSError: pass shutil.copy2(video[u'screenshot'], filepath) displayMessage(u"Copied Miro screenshot file (%s) to MythVideo (%s)" % (video[u'screenshot'], filepath)) if u'episodeimagedir' in storagegroups.keys(): video[u'screenshot'] = filepath.replace(storagegroups[u'episodeimagedir'], u'') else: video[u'screenshot'] = filepath except: logger.critical(u"Copying the Screenshot (%s) to the Screenshot directory (%s).\n This maybe a permissions error (mirobridge.py does not have permission to write to the directory)." % (video[u'screenshot'], filepath)) # Gracefully close the Miro database and shutdown the Miro Front and Back ends app.controller.shutdown() time.sleep(5) # Let the shutdown processing complete sys.exit(False) elif video[u'screenshot']: if u'episodeimagedir' in storagegroups.keys(): video[u'screenshot'] = filepath.replace(storagegroups[u'episodeimagedir'], u'') else: video[u'screenshot'] = filepath video[u'copied'] = True # Mark this video item as being copied # Completely remove the video and item information from Miro app.cli_interpreter.do_mythtv_item_remove(save_video_filename) # Gracefully close the Miro database and shutdown the Miro Front and Back ends app.controller.shutdown() time.sleep(5) # Let the shutdown processing complete # # Add and delete MythTV (Watch Recordings) Miro recorded records # Add and remove symlinks for Miro video files # # Check if the user does not want any channels Added to the "Watch Recordings" screen if channel_mythvideo_only.has_key(u'all'): for video in unwatched: watched.append(video) unwatched = [] else: if len(channel_mythvideo_only): unwatched_copy = [] for video in unwatched: if not filter(is_not_punct_char, video[u'channelTitle'].lower()) in channel_mythvideo_only.keys(): unwatched_copy.append(video) else: watched.append(video) unwatched = unwatched_copy statistics[u'Total_unwatched'] = len(unwatched) if not len(unwatched): displayMessage(u"There are no Miro unwatched video items to add as MythTV Recorded videos.") if not updateMythRecorded(unwatched): logger.critical(u"Updating MythTV Recording with Miro video files failed." % str(base_video_dir)) sys.exit(False) # # Add and delete MythVideo records for played Miro Videos # Add and delete symbolic links to Miro Videos and subdirectories # Add and delete symbolic links to coverart/Miro icons and Miro screenshots/fanart # if len(channel_watch_only): # If the user does not want any channels moved to MythVideo exit if channel_watch_only[0].lower() == u'all': printStatistics() return True if not len(watched): displayMessage(u"There are no Miro watched items to add to MythVideo") if not updateMythVideo(watched): logger.critical(u"Updating MythVideo with Miro video files failed.") sys.exit(False) printStatistics() return True | cefa7947527c8e9e2184befa6fb1cdca04096461 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/cefa7947527c8e9e2184befa6fb1cdca04096461/mirobridge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
6289,
312,
11373,
18337,
628,
326,
1296,
980,
1135,
1053,
3536,
2552,
1191,
10358,
16,
14754,
16,
3988,
16,
2502,
4650,
16,
6875,
19951,
16,
1904,
67,
350,
16,
1904,
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,
2774,
13332,
3536,
6289,
312,
11373,
18337,
628,
326,
1296,
980,
1135,
1053,
3536,
2552,
1191,
10358,
16,
14754,
16,
3988,
16,
2502,
4650,
16,
6875,
19951,
16,
1904,
67,
350,
16,
1904,
6... |
print "warning: getItemIndexForItemID: item not found!" | self.notify.warning("getItemIndexForItemID: item not found!") | def getItemIndexForItemID(self, itemID): assert self.notify.debugStateCall(self) #for i in range(len(self["items"])): # print "buttontext[", i,"]", self["items"][i]["text"] | ab72021e6e446bc987e77c9879c3bafc181565d7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/ab72021e6e446bc987e77c9879c3bafc181565d7/DirectScrolledList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8143,
1016,
1290,
1180,
734,
12,
2890,
16,
761,
734,
4672,
1815,
365,
18,
12336,
18,
4148,
1119,
1477,
12,
2890,
13,
468,
1884,
277,
316,
1048,
12,
1897,
12,
2890,
9614,
3319,
11929,
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,
8143,
1016,
1290,
1180,
734,
12,
2890,
16,
761,
734,
4672,
1815,
365,
18,
12336,
18,
4148,
1119,
1477,
12,
2890,
13,
468,
1884,
277,
316,
1048,
12,
1897,
12,
2890,
9614,
3319,
11929,
3... |
Player.setResolution(0, 640, 480, 24) | def test(self): Player.loadFile("tracking.avg") Player.setFramerate(60) | 32c6d30b38b70a4a13cdb2c0fe854dd158aeaa21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7300/32c6d30b38b70a4a13cdb2c0fe854dd158aeaa21/TestTracking.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
2890,
4672,
19185,
18,
945,
812,
2932,
6440,
18,
14141,
7923,
19185,
18,
542,
42,
1940,
12600,
12,
4848,
13,
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,
1842,
12,
2890,
4672,
19185,
18,
945,
812,
2932,
6440,
18,
14141,
7923,
19185,
18,
542,
42,
1940,
12600,
12,
4848,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
"state_vec_minor": "int_4s", "insertion_time": "int_4s" | "state_vec_minor": "int_4s" | def set_band(self, band): self.central_freq = (band[0] + band[1])/2.0 self.bandwidth = band.duration() | c723e949bb20546b085e262ee944f5eebe05ac57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/c723e949bb20546b085e262ee944f5eebe05ac57/lsctables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
12752,
12,
2890,
16,
8937,
4672,
365,
18,
71,
12839,
67,
10212,
273,
261,
12752,
63,
20,
65,
397,
8937,
63,
21,
5717,
19,
22,
18,
20,
365,
18,
29750,
273,
8937,
18,
8760,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
67,
12752,
12,
2890,
16,
8937,
4672,
365,
18,
71,
12839,
67,
10212,
273,
261,
12752,
63,
20,
65,
397,
8937,
63,
21,
5717,
19,
22,
18,
20,
365,
18,
29750,
273,
8937,
18,
8760,
... |
QApplication.style().drawControl(QStyle.CE_ItemViewItem, option, painter) | if hasattr(QStyle.CE_ItemViewItem): QApplication.style().drawControl(QStyle.CE_ItemViewItem, option, painter) | def paint(self, painter, option, index): style = QApplication.style() painter.save() QApplication.style().drawControl(QStyle.CE_ItemViewItem, option, painter) highlight = getattr(index.model(), 'highlight_row', -1) == index.row() mode = QIcon.Active if highlight else QIcon.Normal pixmap = QIcon(index.model().data(index, Qt.DecorationRole)).pixmap(self.pixmap.size()) pixmap = style.generatedIconPixmap(mode, pixmap, option) text = index.model().data(index, Qt.DisplayRole).toString() irect, trect = self.rects(option) style.drawItemPixmap(painter, irect, Qt.AlignHCenter|Qt.AlignTop, pixmap) font = QFont(option.font) font.setBold(highlight) painter.setFont(font) style.drawItemText(painter, trect, Qt.AlignHCenter|Qt.AlignBottom, option.palette, True, text) painter.restore() | cf3bb47fc33e908c8ff1f9b1ee728085afc37dea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/cf3bb47fc33e908c8ff1f9b1ee728085afc37dea/widgets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12574,
12,
2890,
16,
21295,
16,
1456,
16,
770,
4672,
2154,
273,
2238,
3208,
18,
4060,
1435,
21295,
18,
5688,
1435,
309,
3859,
12,
53,
2885,
18,
1441,
67,
1180,
1767,
1180,
4672,
2238,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12574,
12,
2890,
16,
21295,
16,
1456,
16,
770,
4672,
2154,
273,
2238,
3208,
18,
4060,
1435,
21295,
18,
5688,
1435,
309,
3859,
12,
53,
2885,
18,
1441,
67,
1180,
1767,
1180,
4672,
2238,
... |
"""Return a (type, label, description, annotations) tuple | """Return a (type, label, description) tuple | def get_annotation_type(): """Return a (type, label, description, annotations) tuple that defines the type of annotation and provides human readable names. The `type` element should be unique to the annotator. The `label` element is used as column heading for the table, while `description` is used as a display name to let the user toggle the appearance of the annotation type. """ | 5bc04f023757f36a375d6a1a3b6766a65fe1447f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/5bc04f023757f36a375d6a1a3b6766a65fe1447f/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
11495,
67,
723,
13332,
3536,
990,
279,
261,
723,
16,
1433,
16,
2477,
13,
3193,
716,
11164,
326,
618,
434,
3204,
471,
8121,
8672,
7471,
1257,
18,
1021,
1375,
723,
68,
930,
1410... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11495,
67,
723,
13332,
3536,
990,
279,
261,
723,
16,
1433,
16,
2477,
13,
3193,
716,
11164,
326,
618,
434,
3204,
471,
8121,
8672,
7471,
1257,
18,
1021,
1375,
723,
68,
930,
1410... |
class CWCmdLineTests(WCmdLineTests): | class CWCmdLineTests(BaseTest, WCmdLineTests): | def test_improper_input(self): # Uses the private _setoption() function to test the parsing # of command-line warning arguments with test_support.catch_warning(self.module): self.assertRaises(self.module._OptionError, self.module._setoption, '1:2:3:4:5:6') self.assertRaises(self.module._OptionError, self.module._setoption, 'bogus::Warning') self.assertRaises(self.module._OptionError, self.module._setoption, 'ignore:2::4:-5') self.module._setoption('error::Warning::0') self.assertRaises(UserWarning, self.module.warn, 'convert to error') | 667bb4f236cb73ea6230bebc4c86dd495522bac7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/667bb4f236cb73ea6230bebc4c86dd495522bac7/test_warnings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
381,
22754,
67,
2630,
12,
2890,
4672,
468,
14854,
326,
3238,
389,
542,
3482,
1435,
445,
358,
1842,
326,
5811,
468,
434,
1296,
17,
1369,
3436,
1775,
598,
1842,
67,
13261,
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,
1842,
67,
381,
22754,
67,
2630,
12,
2890,
4672,
468,
14854,
326,
3238,
389,
542,
3482,
1435,
445,
358,
1842,
326,
5811,
468,
434,
1296,
17,
1369,
3436,
1775,
598,
1842,
67,
13261,
18,
... |
print "DBG> addEntity:", repr(name), repr(result) | def addEntity(name): """Convert a unicode name into ascii name with entities""" import htmlentitydefs result = '' for c in name: if ord(c) < 128: result += str(c) else: for k, v in htmlentitydefs.entitydefs.iteritems(): if (len(v) == 1 and ord(c) == ord(v)) or v == '&#%d;'%ord(c): result += '&%s;' % k break else: raise NoSuchEntity("Cannot locate entity for character %s"%repr(c)) print "DBG> addEntity:", repr(name), repr(result) return result | f0baaa6839c6e1ebee76a315015d5deda2f4bfeb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/f0baaa6839c6e1ebee76a315015d5deda2f4bfeb/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
1943,
12,
529,
4672,
3536,
2723,
279,
5252,
508,
1368,
11384,
508,
598,
5140,
8395,
1930,
1729,
1096,
12537,
563,
273,
875,
364,
276,
316,
508,
30,
309,
4642,
12,
71,
13,
411,
803... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
1943,
12,
529,
4672,
3536,
2723,
279,
5252,
508,
1368,
11384,
508,
598,
5140,
8395,
1930,
1729,
1096,
12537,
563,
273,
875,
364,
276,
316,
508,
30,
309,
4642,
12,
71,
13,
411,
803... | |
if tax.group.code in partner_obj._columns: | if tax.group.code in partner_obj._columns \ and partner[tax.group.code]: | def on_change_product(self, cursor, user, ids, vals, context=None): product_obj = self.pool.get('product.product') partner_obj = self.pool.get('partner.partner') account_obj = self.pool.get('account.account') uom_obj = self.pool.get('product.uom') company_obj = self.pool.get('company.company') currency_obj = self.pool.get('currency.currency') if context is None: context = {} if not vals.get('product'): return {} res = {} | 10e552200a7e0446f3ab7f2616111e37c0e19e8e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9267/10e552200a7e0446f3ab7f2616111e37c0e19e8e/invoice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
3427,
67,
5896,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
5773,
16,
819,
33,
7036,
4672,
3017,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
5896,
18,
5896,
6134,
19170,
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,
603,
67,
3427,
67,
5896,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
5773,
16,
819,
33,
7036,
4672,
3017,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
5896,
18,
5896,
6134,
19170,
67,... |
return [str(x).strip() for x in finalChannelList] | return ["XX:"+str(x).strip() for x in finalChannelList] | def __filenameToChannelList__(self,filenameList=[]): """ This method attempts to construct a set of simplified channel names based of a list of image filenames. """ #Parsed filename channel list specialChannelList=[ "ISI-OMC_DISPPF_H1_IN1_DAQ",\ "PEM-LVEA2_V2",\ "OMC-ASC_POS_X_IN1_DAQ",\ "OMC-ASC_POS_Y_IN1_DAQ",\ "OMC-QPD3_SUM_IN1_DAQ",\ "OMC-QPD1_SUM_IN1_DAQ",\ "OMC-QPD2_SUM_IN1_DAQ",\ "OMC-QPD4_SUM_IN1_DAQ"\ ] fileBasenames=[os.path.basename(x) for x in filenameList] startREG=re.compile('_[H,V,L][0,1,2][:,-,_]') stopREG=re.compile('_(?=[0-9,a-z])') channelNames=[[x,re.split(stopREG,re.split(startREG,x).pop().strip())[0].strip()]\ for x in filenameList] #Correct badly parsed names finalChannelList=list() for myURL,myName in channelNames: for specialName in specialChannelList: if myURL.__contains__(specialName): finalChannelList.append(specialName) else: finalChannelList.append(myName) return [str(x).strip() for x in finalChannelList] | 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,
1001,
3459,
774,
2909,
682,
972,
12,
2890,
16,
3459,
682,
33,
8526,
4672,
3536,
1220,
707,
7531,
358,
4872,
279,
444,
434,
20482,
1904,
1257,
2511,
434,
279,
666,
434,
1316,
9066,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3459,
774,
2909,
682,
972,
12,
2890,
16,
3459,
682,
33,
8526,
4672,
3536,
1220,
707,
7531,
358,
4872,
279,
444,
434,
20482,
1904,
1257,
2511,
434,
279,
666,
434,
1316,
9066,
18,
... |
def params(self): """Uses cascading dict to pull from the params Return a key value from the parameters, they are checked in the following order: POST, GET, URL If a key is not found in the first dict, the next is checked. As with dict.get, None will be returned if the key is not found in all three. Additional methods supported: getall(key) Returns a list keyed by parameter location of all the values by that key in that parameter location getone(key) Return one value (like __getitem__) but an error if more than one key exists. (Or the other way around?) The object returned by .get and .post is a dictionary of this style as well. .urlvars is a plain dict (?) Should this decode input to unicode on some level? """ pass | def params(): doc = """\ MultiDict of keys from POST, GET, URL dicts Return a key value from the parameters, they are checked in the following order: POST, GET, URL Additional methods supported: getlist(key) Returns a list keyed by parameter location of all the values by that key in that parameter location""" def fget(self): pms = MultiDict() pms.update(self.post) pms.update(self.get) return pms fget = LazyCache(fget) return locals() params = property(**params()) | def params(self): """Uses cascading dict to pull from the params Return a key value from the parameters, they are checked in the following order: POST, GET, URL If a key is not found in the first dict, the next is checked. As with dict.get, None will be returned if the key is not found in all three. Additional methods supported: getall(key) Returns a list keyed by parameter location of all the values by that key in that parameter location getone(key) Return one value (like __getitem__) but an error if more than one key exists. (Or the other way around?) The object returned by .get and .post is a dictionary of this style as well. .urlvars is a plain dict (?) Should this decode input to unicode on some level? """ pass | 4fd9932a087ec55b1a3083cfe4feca1b77cf7e00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/4fd9932a087ec55b1a3083cfe4feca1b77cf7e00/request.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
859,
13332,
997,
273,
3536,
64,
5991,
5014,
434,
1311,
628,
5485,
16,
4978,
16,
1976,
15838,
225,
2000,
279,
498,
460,
628,
326,
1472,
16,
2898,
854,
5950,
316,
326,
3751,
1353,
30,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
859,
13332,
997,
273,
3536,
64,
5991,
5014,
434,
1311,
628,
5485,
16,
4978,
16,
1976,
15838,
225,
2000,
279,
498,
460,
628,
326,
1472,
16,
2898,
854,
5950,
316,
326,
3751,
1353,
30,
54... |
raise SMTPServerDisconnected | raise SMTPServerDisconnected("Server not connected") | def ehlo(self, name=''): """ SMTP 'ehlo' command. Hostname to send for this command defaults to the FQDN of the local host. """ name=string.strip(name) if len(name)==0: name=socket.gethostbyaddr(socket.gethostname())[0] self.putcmd("ehlo",name) (code,msg)=self.getreply() # According to RFC1869 some (badly written) # MTA's will disconnect on an ehlo. Toss an exception if # that happens -ddm if code == -1 and len(msg) == 0: raise SMTPServerDisconnected self.ehlo_resp=msg if code<>250: return code self.does_esmtp=1 #parse the ehlo responce -ddm resp=string.split(self.ehlo_resp,'\n') del resp[0] for each in resp: m=re.match(r'(?P<feature>[A-Za-z0-9][A-Za-z0-9\-]*)',each) if m: feature=string.lower(m.group("feature")) params=string.strip(m.string[m.end("feature"):]) self.esmtp_features[feature]=params return code | 40233ea70a1e66e172e8524f3458fff8bd148b4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/40233ea70a1e66e172e8524f3458fff8bd148b4c/smtplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20124,
383,
12,
2890,
16,
508,
2218,
11,
4672,
3536,
18102,
296,
73,
76,
383,
11,
1296,
18,
17423,
358,
1366,
364,
333,
1296,
3467,
358,
326,
23127,
8609,
434,
326,
1191,
1479,
18,
353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20124,
383,
12,
2890,
16,
508,
2218,
11,
4672,
3536,
18102,
296,
73,
76,
383,
11,
1296,
18,
17423,
358,
1366,
364,
333,
1296,
3467,
358,
326,
23127,
8609,
434,
326,
1191,
1479,
18,
353... |
def _rescale(self, exp, rounding = None, context=None, watchexp = 1): | def _rescale(self, exp, rounding=None, context=None, watchexp=1): | def _rescale(self, exp, rounding = None, context=None, watchexp = 1): """Rescales so that the exponent is exp. | 7154a51f157717174dff89f44508046f6876db74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7154a51f157717174dff89f44508046f6876db74/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
455,
1869,
12,
2890,
16,
1329,
16,
13885,
33,
7036,
16,
819,
33,
7036,
16,
4267,
2749,
33,
21,
4672,
3536,
607,
21177,
1427,
716,
326,
9100,
353,
1329,
18,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
455,
1869,
12,
2890,
16,
1329,
16,
13885,
33,
7036,
16,
819,
33,
7036,
16,
4267,
2749,
33,
21,
4672,
3536,
607,
21177,
1427,
716,
326,
9100,
353,
1329,
18,
2,
-100,
-100,
-100,
... |
def _on_state_changed(self, bus, message, seconds): | def _set_current_time_actual(self, bus, message, seconds): | def _on_state_changed(self, bus, message, seconds): if self.playbin.get_state(0)[1] in (gst.STATE_PAUSED, gst.STATE_PLAYING): self._seek(seconds) self.bus.disconnect(self._on_state_changed_id) | 408cbef61fa2e462355ba48311f7bbb6475c06f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/408cbef61fa2e462355ba48311f7bbb6475c06f6/gstreamerrenderer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
2972,
67,
957,
67,
18672,
12,
2890,
16,
5766,
16,
883,
16,
3974,
4672,
309,
365,
18,
1601,
4757,
18,
588,
67,
2019,
12,
20,
25146,
21,
65,
316,
261,
75,
334,
18,
7998... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
2972,
67,
957,
67,
18672,
12,
2890,
16,
5766,
16,
883,
16,
3974,
4672,
309,
365,
18,
1601,
4757,
18,
588,
67,
2019,
12,
20,
25146,
21,
65,
316,
261,
75,
334,
18,
7998... |
os.removedirs( TestAsync.TEST_CACHE_DIR ) | rmtree( TestAsync.TEST_CACHE_DIR ) | def _delCacheDir(): if exists( TestAsync.TEST_CACHE_DIR ): os.removedirs( TestAsync.TEST_CACHE_DIR ) | 2e68b4f55de930e2096d70a0121b96e294b00407 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6604/2e68b4f55de930e2096d70a0121b96e294b00407/async.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3771,
29582,
13332,
309,
1704,
12,
7766,
2771,
18,
16961,
67,
8495,
67,
4537,
262,
30,
1140,
18,
14923,
10539,
12,
7766,
2771,
18,
16961,
67,
8495,
67,
4537,
262,
2,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3771,
29582,
13332,
309,
1704,
12,
7766,
2771,
18,
16961,
67,
8495,
67,
4537,
262,
30,
1140,
18,
14923,
10539,
12,
7766,
2771,
18,
16961,
67,
8495,
67,
4537,
262,
2,
-100,
-100,
-... |
self.assertEqual(os.read(d, 1024), "strawberry") | self.assertEqual(remove_stderr_debug_decorations(os.read(d, 1024)), "strawberry") | def test_stderr_filedes(self): # stderr is set to open file descriptor tf = tempfile.TemporaryFile() d = tf.fileno() p = subprocess.Popen([sys.executable, "-c", 'import sys; sys.stderr.write("strawberry")'], stderr=d) p.wait() os.lseek(d, 0, 0) self.assertEqual(os.read(d, 1024), "strawberry") | 7ebb9fcf9e437f932409de74d92a511fbe5eeb6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7ebb9fcf9e437f932409de74d92a511fbe5eeb6c/test_subprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11241,
67,
768,
5489,
12,
2890,
4672,
468,
4514,
353,
444,
358,
1696,
585,
4950,
3253,
273,
13275,
18,
23808,
1435,
302,
273,
3253,
18,
7540,
5764,
1435,
293,
273,
6652,
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,
1842,
67,
11241,
67,
768,
5489,
12,
2890,
4672,
468,
4514,
353,
444,
358,
1696,
585,
4950,
3253,
273,
13275,
18,
23808,
1435,
302,
273,
3253,
18,
7540,
5764,
1435,
293,
273,
6652,
18,
... |
setup_requires=['setuptools_bzr'], | def bzr_revision(): bzr = Popen(('bzr', 'tags', '--sort', 'time'), stdout=PIPE) output, error = bzr.communicate() code = bzr.wait() if code != 0: raise Exception(u'Error running bzr tags') lines = output.splitlines() if len(lines) == 0: tag = '0.0.0' revision = '0' else: tag, revision = lines[-1].split() bzr = Popen(('bzr', 'log', '--line', '-r', '-1'), stdout=PIPE) output, error = bzr.communicate() code = bzr.wait() if code != 0: raise Exception(u"Error running bzr log") latest = output.split(':')[0] versionstring = latest == revision and tag or '%s-bzr%s' % (tag, latest) f = open('ibid/.version', 'w') f.write(versionstring) f.close() return versionstring | 7f161652685bdb3c30616782398c3d006a3856e9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12048/7f161652685bdb3c30616782398c3d006a3856e9/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24788,
86,
67,
13057,
13332,
24788,
86,
273,
14339,
12,
2668,
25292,
86,
2187,
296,
4156,
2187,
3534,
3804,
2187,
296,
957,
19899,
3909,
33,
27602,
13,
876,
16,
555,
273,
24788,
86,
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,
24788,
86,
67,
13057,
13332,
24788,
86,
273,
14339,
12,
2668,
25292,
86,
2187,
296,
4156,
2187,
3534,
3804,
2187,
296,
957,
19899,
3909,
33,
27602,
13,
876,
16,
555,
273,
24788,
86,
18,
... | |
self.buyfromplanet(bestcommodity,curplanet) | numbought,price = self.buyfromplanet(bestcommodity,curplanet) | def dotrade(self,report,prices): """ >>> buildinstrumentalities() >>> Planet.objects.all().delete() >>> u = User(username="buildinstrumentalities") >>> u.save() >>> r = Manifest(people=5000, food=1000) >>> r.save() >>> s = Sector(key=125123,x=100,y=100) >>> s.save() >>> p = Planet(resources=r, society=1,owner=u, sector=s, ... x=626, y=617, r=.1, color=0x1234, name="Planet X") >>> p.save() >>> pl = Player(user=u, capital=p, color=112233) >>> pl.lastactivity = datetime.datetime.now() >>> pl.save() >>> r2 = Manifest(people=5000, food=1000) >>> r2.save() >>> p2 = Planet(resources=r2, society=10,owner=u, sector=s, ... x=627, y=616, r=.1, color=0x1234, name="Planet Y") >>> p2.save() >>> r3 = Manifest(quatloos=10) >>> r3.save() >>> f = Fleet(trade_manifest=r3, merchantmen=1, owner=u, sector=s,x=p.x,y=p.y) >>> f.source=p2 >>> f.destination=p >>> f.homeport=p >>> f.save() >>> report = [] >>> f.dotrade(report,{}) >>> pprint(report) [' Trading at Planet X (1) out of money, restocking.', ' Trading at Planet X (1) bought 25 steel', ' Trading at Planet X (1) leftover quatloos = 10', ' Trading at Planet X (1) new destination = 2'] >>> f.trade_manifest.quatloos 10 """ dontbuy = ['id','people'] replinestart = " Trading at " + self.destination.name + " ("+str(self.destination.id)+") " if self.trade_manifest is None: report.append(replinestart+"can't trade without trade goods.") return if self.destination.resources is None: report.append(replinestart+"planet doesn't support trade.") return # sell whatever is in the hold m = self.trade_manifest curplanet = self.destination | d076e384f6a4d5a0265b0bfaf2c8fdc7347f9ca3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2020/d076e384f6a4d5a0265b0bfaf2c8fdc7347f9ca3/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
20077,
12,
2890,
16,
6006,
16,
683,
1242,
4672,
3536,
4080,
1361,
22818,
287,
1961,
1435,
4080,
12540,
278,
18,
6911,
18,
454,
7675,
3733,
1435,
4080,
582,
273,
2177,
12,
5053,
1546... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20077,
12,
2890,
16,
6006,
16,
683,
1242,
4672,
3536,
4080,
1361,
22818,
287,
1961,
1435,
4080,
12540,
278,
18,
6911,
18,
454,
7675,
3733,
1435,
4080,
582,
273,
2177,
12,
5053,
1546... |
logging.info('memcache miss for %r', email) | logging.debug('memcache miss for %r', email) | def show_user(email, arg=None, autoescape=None): """Render a link to the user's dashboard, with text being the nickname.""" if isinstance(email, users.User): email = email.email() if not arg: user = users.get_current_user() if user is not None and email == user.email(): return 'me' try: ret = memcache.get('show_user:%s' % email) except KeyError: ret = None if ret is None: logging.info('memcache miss for %r', email) nick = nickname(email, True) account = models.Account.get_account_for_email(email) if account: if len(models.Account.get_accounts_for_nickname(account.nickname)) > 1: # The nickname is not unique, fallback to email as key. user_key = email else: user_key = nick # Cache for a longer time, this is likely to remain valid. cache_timeout = 300 else: user_key = nick # Cache likely to become invalid due to user sign up. cache_timeout = 30 memcache.add('show_user:%s' % email, ret, cache_timeout) ret = ('<a href="/user/%(key)s" onMouseOver="M_showUserInfoPopup(this)">' '%(key)s</a>' % {'key': user_key}) return django.utils.safestring.mark_safe(ret) | 07d8c6d2253a02822ea45e2cf17fac798cd6f65f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/476/07d8c6d2253a02822ea45e2cf17fac798cd6f65f/library.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
1355,
12,
3652,
16,
1501,
33,
7036,
16,
3656,
6939,
33,
7036,
4672,
3536,
3420,
279,
1692,
358,
326,
729,
1807,
11825,
16,
598,
977,
3832,
326,
19570,
12123,
309,
1549,
12,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
1355,
12,
3652,
16,
1501,
33,
7036,
16,
3656,
6939,
33,
7036,
4672,
3536,
3420,
279,
1692,
358,
326,
729,
1807,
11825,
16,
598,
977,
3832,
326,
19570,
12123,
309,
1549,
12,
3... |
return map(lambda dom: fixup_sxpr(dom.sxpr(not full)), domains) | ret = [] for dom in domains: try: ret.append(fixup_sxpr(dom.sxpr(not full))) except: log.warn("Failed to query SXPR for domain %s" % str(dom)) pass return ret | def domains_with_state(detail, state, full): if detail: domains = XendDomain.instance().list_sorted(state) return map(lambda dom: fixup_sxpr(dom.sxpr(not full)), domains) else: return XendDomain.instance().list_names(state) | 4c56c6adf154b889004a83e98fa76be1a2d0a2c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6195/4c56c6adf154b889004a83e98fa76be1a2d0a2c1/XMLRPCServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10128,
67,
1918,
67,
2019,
12,
8992,
16,
919,
16,
1983,
4672,
309,
7664,
30,
10128,
273,
1139,
409,
3748,
18,
1336,
7675,
1098,
67,
10350,
12,
2019,
13,
325,
273,
5378,
364,
4092,
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,
10128,
67,
1918,
67,
2019,
12,
8992,
16,
919,
16,
1983,
4672,
309,
7664,
30,
10128,
273,
1139,
409,
3748,
18,
1336,
7675,
1098,
67,
10350,
12,
2019,
13,
325,
273,
5378,
364,
4092,
316,... |
Probablity and Statistics Tables and Formulae. Chapman & Hall: New | Probability and Statistics Tables and Formulae. Chapman & Hall: New | def cmedian(a, numbins=1000): # fixme: numpy.median() always seems to be a better choice. # A better version of this function would take already-histogrammed data # and compute the median from that. # fixme: the wording of the docstring is a bit wonky. """Returns the computed median value of an array. All of the values in the input array are used. The input array is first histogrammed using numbins bins. The bin containing the median is selected by searching for the halfway point in the cumulative histogram. The median value is then computed by linearly interpolating across that bin. Parameters ---------- a : array numbins : int The number of bins used to histogram the data. More bins give greater accuracy to the approximation of the median. Returns ------- A floating point value approximating the median. References ---------- [CRCProbStat2000]_ Section 2.2.6 .. [CRCProbStat2000] Zwillinger, D. and Kokoska, S. (2000). CRC Standard Probablity and Statistics Tables and Formulae. Chapman & Hall: New York. 2000. """ a = np.ravel(a) n = float(len(a)) # We will emulate the (fixed!) bounds selection scheme used by # scipy.stats.histogram(), but use numpy.histogram() since it is faster. amin = a.min() amax = a.max() estbinwidth = (amax - amin)/float(numbins - 1) binsize = (amax - amin + estbinwidth) / float(numbins) (hist, bins) = np.histogram(a, numbins, range=(amin-binsize*0.5, amax+binsize*0.5)) binsize = bins[1] - bins[0] cumhist = np.cumsum(hist) # make cumulative histogram cfbin = np.searchsorted(cumhist, n/2.0) LRL = bins[cfbin] # get lower read limit of that bin if cfbin == 0: cfbelow = 0.0 else: cfbelow = cumhist[cfbin-1] # cum. freq. below bin freq = hist[cfbin] # frequency IN the 50%ile bin median = LRL + ((n/2.0-cfbelow)/float(freq))*binsize # MEDIAN return median | d03be56073480c044df36c5a42d3e8f24c1327c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12971/d03be56073480c044df36c5a42d3e8f24c1327c4/stats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
22410,
12,
69,
16,
818,
11862,
33,
18088,
4672,
468,
2917,
3501,
30,
3972,
18,
22410,
1435,
3712,
12001,
358,
506,
279,
7844,
6023,
18,
468,
432,
7844,
1177,
434,
333,
445,
4102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
22410,
12,
69,
16,
818,
11862,
33,
18088,
4672,
468,
2917,
3501,
30,
3972,
18,
22410,
1435,
3712,
12001,
358,
506,
279,
7844,
6023,
18,
468,
432,
7844,
1177,
434,
333,
445,
4102,
... |
'xcode2': ('Xcode 2.5', 42), 'xcode3': ('Xcode 3.1', 45), | 'xcode': ('Xcode 3.1', 45), | def __init__(self): pass | f13a25eb728845b9b18a74155bc48727e4b868ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7302/f13a25eb728845b9b18a74155bc48727e4b868ea/xcode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
path = _absnorm(path) | if os.sep == '\\' and len(path) == 2 and path[1] == ':': path = path + '\\' else: path = os.path.abspath(path) | def normpath(path, normcase=True): """Returns path in normalized and absolute format. On case-insensitive file systems the path is also casenormalized (if normcase is True). """ path = _absnorm(path) if normcase and _CASE_INSENSITIVE_FILESYSTEM: path = path.lower() if os.sep == '\\' and len(path) == 2 and path[1] == ':': path += '\\' return path | ed4fcd5912c21774bec5d1d9347b8e53eec1719d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6988/ed4fcd5912c21774bec5d1d9347b8e53eec1719d/normalizing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20446,
12,
803,
16,
4651,
3593,
33,
5510,
4672,
3536,
1356,
589,
316,
5640,
471,
4967,
740,
18,
225,
2755,
648,
17,
31940,
585,
14908,
326,
589,
353,
2546,
8697,
275,
1687,
1235,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20446,
12,
803,
16,
4651,
3593,
33,
5510,
4672,
3536,
1356,
589,
316,
5640,
471,
4967,
740,
18,
225,
2755,
648,
17,
31940,
585,
14908,
326,
589,
353,
2546,
8697,
275,
1687,
1235,
261,
... |
model.repo.new_revision() | def setup_class(self): model.Session.add(model.Package(name=u'testpkgag')) model.Session.add(model.Group(name=u'testgroupag')) model.Session.add(model.User(name=u'ag_member')) model.Session.add(model.User(name=u'ag_admin')) model.Session.add(model.User(name=u'ag_notmember')) model.Session.add(model.AuthorizationGroup(name=u'authz_group')) model.repo.new_revision() model.repo.commit_and_remove() | 3fe313605cffafb75728092750d4b59085625a17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/265/3fe313605cffafb75728092750d4b59085625a17/test_authz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
1106,
12,
2890,
4672,
938,
18,
2157,
18,
1289,
12,
2284,
18,
2261,
12,
529,
33,
89,
1404,
395,
10657,
346,
26112,
938,
18,
2157,
18,
1289,
12,
2284,
18,
1114,
12,
529,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
1106,
12,
2890,
4672,
938,
18,
2157,
18,
1289,
12,
2284,
18,
2261,
12,
529,
33,
89,
1404,
395,
10657,
346,
26112,
938,
18,
2157,
18,
1289,
12,
2284,
18,
1114,
12,
529,
33,
... | |
axFiltTyp = fig.add_axes([0.20, 0.02, 0.15, 0.15],frameon=False,axisbg='lightgrey') | axFiltTyp = fig.add_axes([0.40, 0.02, 0.15, 0.15],frameon=False,axisbg='lightgrey') | def addFiltButtons(): global axFilt global check global axFiltTyp global radio #add filter buttons axFilt = fig.add_axes([0.02, 0.02, 0.15, 0.15],frameon=False,axisbg='lightgrey') check = CheckButtons(axFilt, ('Filter','Zero-Phase'),(False,True)) check.on_clicked(funcFilt) axFiltTyp = fig.add_axes([0.20, 0.02, 0.15, 0.15],frameon=False,axisbg='lightgrey') radio = RadioButtons(axFiltTyp, ('Bandpass', 'Bandstop', 'Lowpass', 'Highpass'),activecolor='k') radio.on_clicked(funcFiltTyp) | 115e488abb7386db7c7e069de50d3d91372d0711 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/115e488abb7386db7c7e069de50d3d91372d0711/pickingGUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
42,
4526,
14388,
13332,
2552,
1740,
42,
4526,
2552,
866,
2552,
1740,
42,
4526,
18488,
2552,
13512,
468,
1289,
1034,
9502,
1740,
42,
4526,
273,
4291,
18,
1289,
67,
10855,
3816,
20,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
42,
4526,
14388,
13332,
2552,
1740,
42,
4526,
2552,
866,
2552,
1740,
42,
4526,
18488,
2552,
13512,
468,
1289,
1034,
9502,
1740,
42,
4526,
273,
4291,
18,
1289,
67,
10855,
3816,
20,
1... |
if cnt >= MAXCOUNT: break if count and count > cnt: break | if cnt+1 > MAXCOUNT: break if count and cnt+1 > count: break | def recurringSequenceICal(recurconf): """ Sequence of datetime objects from dateutil's recurrence rules """ start = recurconf.start recrule = recurconf.recrule dst = recurconf.dst until = recurconf.until count = recurconf.count # TODO: that's catched anyways when comparing both vars. Maybe leave out. if until: try: # start.tzinfo xnor until.tzinfo. both present or missing assert(not(start.tzinfo ^ until.tzinfo)) except: raise TypeError, u'Timezones for both until and start have to be' \ + u'present or missing' if isinstance(recrule, rrule.rrule): rset = rrule.rruleset() rset.rrule(recrule) elif isinstance(recrule, rrule.rruleset): rset = recrule elif isinstance(recrule, str): # RFC2445 string # forceset: always return a rruleset # dtstart: optional used when no dtstart is in rfc2445 string # recurconf.start is used which may be an event's endDate rset = rrule.rrulestr(recrule, dtstart=start, forceset=True # compatible=True ) rset.rdate(start) # RCF2445: Always include start date ### Timezone normalizing and returning before = None tznaive = not start.tzinfo and True or False for cnt, date in enumerate(rset): # Limit number of recurrences otherwise calculations take too long if cnt >= MAXCOUNT: break if count and count > cnt: break if until and date > until: break # For very first occurence which is the starting date, the timezone # should be correct and timezone normalizing not needed # For timezone naive dates there is also no need for normalizing if before and not tznaive: delta = date - before date = recurrence_normalize(date, delta, dst) yield date before = date return | a2c4012888f1b523f608b2a64ea982f58972aae7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14312/a2c4012888f1b523f608b2a64ea982f58972aae7/recurring.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26043,
4021,
2871,
287,
12,
266,
1397,
3923,
4672,
3536,
8370,
434,
3314,
2184,
628,
1509,
1367,
1807,
25939,
2931,
3536,
787,
273,
8112,
3923,
18,
1937,
1950,
5345,
273,
8112,
3923,
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,
26043,
4021,
2871,
287,
12,
266,
1397,
3923,
4672,
3536,
8370,
434,
3314,
2184,
628,
1509,
1367,
1807,
25939,
2931,
3536,
787,
273,
8112,
3923,
18,
1937,
1950,
5345,
273,
8112,
3923,
18,
... |
@return: The DOM representation of an epytext description of this parameter's type. @rtype: L{xml.dom.minidom.Element} | @return: A description of this parameter's type. @rtype: L{markup.ParsedDocstring} | def type(self): """ @return: The DOM representation of an epytext description of this parameter's type. @rtype: L{xml.dom.minidom.Element} """ return self._type | 7140f1248773f589eaa5826bd2b3d64a09ab01f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7140f1248773f589eaa5826bd2b3d64a09ab01f2/objdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
618,
12,
2890,
4672,
3536,
632,
2463,
30,
432,
2477,
434,
333,
1569,
1807,
618,
18,
632,
86,
723,
30,
511,
95,
15056,
18,
11257,
1759,
1080,
97,
3536,
327,
365,
6315,
723,
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,
618,
12,
2890,
4672,
3536,
632,
2463,
30,
432,
2477,
434,
333,
1569,
1807,
618,
18,
632,
86,
723,
30,
511,
95,
15056,
18,
11257,
1759,
1080,
97,
3536,
327,
365,
6315,
723,
225,
2,
-1... |
result = self.__setInitialJobParameters(classAdJob,jobID) | result = self.__setInitialJobParameters( classAdJob, jobID ) | def insertNewJobIntoDB(self, JDL, owner, ownerDN, ownerGroup, diracSetup ): """ Insert the initial JDL into the Job database, Do initial JDL crosscheck, Set Initial job Attributes and Status """ | 99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
1908,
2278,
5952,
2290,
12,
2890,
16,
804,
8914,
16,
3410,
16,
3410,
8609,
16,
3410,
1114,
16,
4314,
8836,
7365,
262,
30,
3536,
8040,
326,
2172,
804,
8914,
1368,
326,
3956,
2063,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2243,
1908,
2278,
5952,
2290,
12,
2890,
16,
804,
8914,
16,
3410,
16,
3410,
8609,
16,
3410,
1114,
16,
4314,
8836,
7365,
262,
30,
3536,
8040,
326,
2172,
804,
8914,
1368,
326,
3956,
2063,
... |
ftp_folder += name | ftp_folder += name | def extract_xiso(self): self.extracted_filename = None | d86f2bb533a4557e131960eae5ef599347d8bf24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2692/d86f2bb533a4557e131960eae5ef599347d8bf24/gxiso.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
5674,
83,
12,
2890,
4672,
365,
18,
8004,
329,
67,
3459,
273,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2608,
67,
5674,
83,
12,
2890,
4672,
365,
18,
8004,
329,
67,
3459,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
util.spinWhile(lambda: not p.done, timeout=30) | return p.done | def execute(self, args, p, preargs=''): if runtime.platformType == 'win32': raise unittest.SkipTest, "can't run cmdline client on win32" port = self.server.getHost().port cmd = ('-p %i -l testuser ' '--known-hosts kh_test ' '--user-authentications publickey ' '--host-key-algorithms ssh-rsa ' '-a -I ' '-K direct ' '-i dsa_test ' '-v ') % port + preargs + \ ' 127.0.0.1 ' + args cmds = _makeArgs(cmd.split()) log.msg(str(cmds)) | 17023a52397552f518943441de5271088ecb7cbb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/17023a52397552f518943441de5271088ecb7cbb/test_conch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
833,
16,
293,
16,
675,
1968,
2218,
11,
4672,
309,
3099,
18,
9898,
559,
422,
296,
8082,
1578,
4278,
1002,
2836,
3813,
18,
6368,
4709,
16,
315,
4169,
1404,
1086,
2287... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
833,
16,
293,
16,
675,
1968,
2218,
11,
4672,
309,
3099,
18,
9898,
559,
422,
296,
8082,
1578,
4278,
1002,
2836,
3813,
18,
6368,
4709,
16,
315,
4169,
1404,
1086,
2287... |
z = roots(b) p = roots(a) | z = MLab.roots(b) p = MLab.roots(a) | def tf2zpk(b,a): b = (b+0.0) / a[0] a = (a+0.0) / a[0] k = b[0] b /= b[0] z = roots(b) p = roots(a) return z, p, k | 78dbcc11384c4361dd850305b138d97d4c6ff715 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/78dbcc11384c4361dd850305b138d97d4c6ff715/filter_design.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3253,
22,
94,
5465,
12,
70,
16,
69,
4672,
324,
273,
261,
70,
15,
20,
18,
20,
13,
342,
279,
63,
20,
65,
279,
273,
261,
69,
15,
20,
18,
20,
13,
342,
279,
63,
20,
65,
417,
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,
3253,
22,
94,
5465,
12,
70,
16,
69,
4672,
324,
273,
261,
70,
15,
20,
18,
20,
13,
342,
279,
63,
20,
65,
279,
273,
261,
69,
15,
20,
18,
20,
13,
342,
279,
63,
20,
65,
417,
273,
... |
{'date_end': camp.date_start) | {'date_end': camp.date_start}) | def write(self, cr, uid, ids, vals, context=None): value = super(dm_campaign, self).write(cr, uid, ids, vals, context) for camp in self.browse(cr, uid, ids): if camp.project_id : self.pool.get('project.project').write(cr, uid, [camp.project_id.id], {'date_end': camp.date_start) return value | b0cd61491141daeb023235ac9db879edb5d8ac3f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/b0cd61491141daeb023235ac9db879edb5d8ac3f/dm_retro_planning.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
5773,
16,
819,
33,
7036,
4672,
460,
273,
2240,
12,
10956,
67,
14608,
16,
365,
2934,
2626,
12,
3353,
16,
4555,
16,
3258,
16,
5773,
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,
1045,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
5773,
16,
819,
33,
7036,
4672,
460,
273,
2240,
12,
10956,
67,
14608,
16,
365,
2934,
2626,
12,
3353,
16,
4555,
16,
3258,
16,
5773,
16... |
print (Y1-Y2).max() | if verbose > 2: print (Y1-Y2).max() | def test_cdist_rogerstanimoto_random(self): "Tests cdist(X, 'rogerstanimoto') on random data." eps = 1e-07 # Get the data: the input matrix and the right output. X1 = eo['cdist-X1'] < 0.5 X2 = eo['cdist-X2'] < 0.5 Y1 = cdist(X1, X2, 'rogerstanimoto') Y2 = cdist(X1, X2, 'test_rogerstanimoto') print (Y1-Y2).max() self.failUnless(within_tol(Y1, Y2, eps)) | c3d85c07ed380f445f851652c8c4ee87f0b2dc45 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5882/c3d85c07ed380f445f851652c8c4ee87f0b2dc45/test_distance.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4315,
376,
67,
303,
693,
541,
381,
6302,
67,
9188,
12,
2890,
4672,
315,
14650,
276,
4413,
12,
60,
16,
296,
303,
693,
541,
381,
6302,
6134,
603,
2744,
501,
1199,
7785,
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,
1842,
67,
4315,
376,
67,
303,
693,
541,
381,
6302,
67,
9188,
12,
2890,
4672,
315,
14650,
276,
4413,
12,
60,
16,
296,
303,
693,
541,
381,
6302,
6134,
603,
2744,
501,
1199,
7785,
273,
... |
locals()[am.function_name] = lambda *args,**kargs: am(*args,**kargs).run() | locals()[am.function_name] = lambda am=am,*args,**kargs: am(*args,**kargs).run() | def sniff(self): sniff(iface=self.iface, **self.optsniff) | 169173d8d520c8276a26e4f39b10569a18e3928a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/169173d8d520c8276a26e4f39b10569a18e3928a/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26974,
12,
2890,
4672,
26974,
12,
31479,
33,
2890,
18,
31479,
16,
2826,
2890,
18,
4952,
82,
3048,
13,
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,
26974,
12,
2890,
4672,
26974,
12,
31479,
33,
2890,
18,
31479,
16,
2826,
2890,
18,
4952,
82,
3048,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
def __init__(self, ns, css, memory, font_delta=0): | def __init__(self, ns, css, memory, dpi, font_delta=0): | def __init__(self, ns, css, memory, font_delta=0): src = ns.string if hasattr(ns, 'string') else ns src = re.sub(r'\s{2,}', ' ', src) # Remove multiple spaces for pat, repl in Span.rules: src = pat.sub(repl, src) if not src: raise ConversionError('No point in adding an empty string to a Span') if 'font-style' in css.keys(): fs = css.pop('font-style') if fs.lower() == 'italic': src = Italic(src) attrs = Span.translate_attrs(css, font_delta=font_delta, memory=memory) if 'fontsize' in attrs.keys(): attrs['baselineskip'] = int(attrs['fontsize']) + 20 _Span.__init__(self, text=src, **attrs) | dd3c14b0f1676aa7cd8ca8e54b190acd43418506 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/dd3c14b0f1676aa7cd8ca8e54b190acd43418506/convert_from.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3153,
16,
3747,
16,
3778,
16,
16361,
16,
3512,
67,
9878,
33,
20,
4672,
1705,
273,
3153,
18,
1080,
309,
3859,
12,
2387,
16,
296,
1080,
6134,
469,
3153,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3153,
16,
3747,
16,
3778,
16,
16361,
16,
3512,
67,
9878,
33,
20,
4672,
1705,
273,
3153,
18,
1080,
309,
3859,
12,
2387,
16,
296,
1080,
6134,
469,
3153,
... |
title = _('For&ward'), | title = _(u'For&ward'), | def makeVisibleHourMenuItems(parcel): """ Create the 'Visible Hours' submenu. Should look like: Automatic --------- 5 hours 6 hours | 043a08a77771b31713425ec3f48a9c0186570e1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/043a08a77771b31713425ec3f48a9c0186570e1d/menus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
6207,
13433,
4599,
3126,
12,
1065,
2183,
4672,
3536,
1788,
326,
296,
6207,
670,
4390,
11,
27539,
18,
9363,
2324,
3007,
30,
225,
11809,
4941,
300,
788,
1381,
7507,
1666,
7507,
2,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
6207,
13433,
4599,
3126,
12,
1065,
2183,
4672,
3536,
1788,
326,
296,
6207,
670,
4390,
11,
27539,
18,
9363,
2324,
3007,
30,
225,
11809,
4941,
300,
788,
1381,
7507,
1666,
7507,
2,
-1... |
to_be_deleted.remove(self.user) | if self.user in to_be_deleted: to_be_deleted.remove(self.user) | def coteachers(self, request, tl, one, two, module, extra, prog): if not request.POST.has_key('clsid'): return self.goToCore(tl) # just fails. | b9b68d500c6ac5727be3665a9df8cb18350b41ec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12041/b9b68d500c6ac5727be3665a9df8cb18350b41ec/teacherclassregmodule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
1168,
497,
414,
12,
2890,
16,
590,
16,
8332,
16,
1245,
16,
2795,
16,
1605,
16,
2870,
16,
11243,
4672,
309,
486,
590,
18,
3798,
18,
5332,
67,
856,
2668,
6429,
350,
11,
4672,
327,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
1168,
497,
414,
12,
2890,
16,
590,
16,
8332,
16,
1245,
16,
2795,
16,
1605,
16,
2870,
16,
11243,
4672,
309,
486,
590,
18,
3798,
18,
5332,
67,
856,
2668,
6429,
350,
11,
4672,
327,... |
self.tk.call(self._w, 'enable', name) | self.tk.call(self._w, 'enable', name) | def enable(self, name): | 22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4237,
12,
2890,
16,
508,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4237,
12,
2890,
16,
508,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
'common': u'Category', | def __init__(self): family.Family.__init__(self) self.name = 'uncyclopedia' | 5291e54d99c50e05679c62b06fbab03ab3f57e0d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/5291e54d99c50e05679c62b06fbab03ab3f57e0d/uncyclopedia_family.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
551,
93,
7550,
1845,
1155,
11,
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,
0,
0,
0,
0,
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,
4672,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
551,
93,
7550,
1845,
1155,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
s = self.__brre.sub("<br>", s) | s = self.__unaryre.sub("<\\1 />", s) | def strip(self, s): if "<" not in s: return (s.strip(), []) | 5781e29b6c0527bebe1b662804dbabf41f688a7f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/5781e29b6c0527bebe1b662804dbabf41f688a7f/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2569,
12,
2890,
16,
272,
4672,
309,
18165,
486,
316,
272,
30,
327,
261,
87,
18,
6406,
9334,
5378,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2569,
12,
2890,
16,
272,
4672,
309,
18165,
486,
316,
272,
30,
327,
261,
87,
18,
6406,
9334,
5378,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
for i in range(0, l_line, 74): new_lines.append(self[i:i+74]) | start = 0 end = 74 while True: if end > l_line: end = l_line else: while True: char_value = ord(self[end]) if char_value < 128 or char_value >= 192: break else: end -= 1 new_lines.append(self[start:end]) if end == l_line: break start = end end = start + 74 | def __str__(self): "Long content lines are folded so they are less than 75 characters wide" l_line = len(self) new_lines = [] for i in range(0, l_line, 74): new_lines.append(self[i:i+74]) return '\r\n '.join(new_lines) | b6de7c9ff917950bae417fcd5b1d7b0df2c74de1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12413/b6de7c9ff917950bae417fcd5b1d7b0df2c74de1/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
315,
3708,
913,
2362,
854,
28420,
785,
1427,
2898,
854,
5242,
2353,
18821,
3949,
14812,
6,
328,
67,
1369,
273,
562,
12,
2890,
13,
394,
67,
3548,
273,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
315,
3708,
913,
2362,
854,
28420,
785,
1427,
2898,
854,
5242,
2353,
18821,
3949,
14812,
6,
328,
67,
1369,
273,
562,
12,
2890,
13,
394,
67,
3548,
273,
53... |
'http://www.rpath.com/permanent/pd.xsd') | 'http://www.rpath.com/permanent/rpd-1.0.xsd') | def _setNameSpace(self): setattr(self.xmlobj.__class__, 'xmlns', 'http://www.rpath.com/permanent/pd.xsd') | 58266d7c5f53aecc81194b272044c5669196bd12 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7634/58266d7c5f53aecc81194b272044c5669196bd12/api1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
26857,
12,
2890,
4672,
9241,
12,
2890,
18,
92,
81,
383,
441,
16186,
1106,
972,
16,
296,
16741,
2187,
296,
2505,
2207,
5591,
18,
86,
803,
18,
832,
19,
457,
4728,
319,
19,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
26857,
12,
2890,
4672,
9241,
12,
2890,
18,
92,
81,
383,
441,
16186,
1106,
972,
16,
296,
16741,
2187,
296,
2505,
2207,
5591,
18,
86,
803,
18,
832,
19,
457,
4728,
319,
19,
22... |
assert(c['last'] == self.model.data(model.index(start-1, 0, c['parent']))) assert(c['next'] == self.model.data(model.index(start, 0, c['parent']))) | assert(c['last'] == self.model.data(self.model.index(start-1, 0, c['parent']))) assert(c['next'] == self.model.data(self.model.index(start, 0, c['parent']))) | def rowsRemoved(self, parent, start, end): """ Confirm that what was said was going to happen actually did """ c = remove.pop() assert(c['parent'] == parent) assert(c['oldSize'] - (end - start + 1) == self.model.rowCount(parent)) assert(c['last'] == self.model.data(model.index(start-1, 0, c['parent']))) assert(c['next'] == self.model.data(model.index(start, 0, c['parent']))) | 3b230a0f9fc904f5b200938f5ac2a5cde2f9f027 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1679/3b230a0f9fc904f5b200938f5ac2a5cde2f9f027/modeltest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2595,
10026,
12,
2890,
16,
982,
16,
787,
16,
679,
4672,
3536,
17580,
716,
4121,
1703,
7864,
350,
1703,
8554,
358,
5865,
6013,
5061,
3536,
276,
273,
1206,
18,
5120,
1435,
1815,
12,
71,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2595,
10026,
12,
2890,
16,
982,
16,
787,
16,
679,
4672,
3536,
17580,
716,
4121,
1703,
7864,
350,
1703,
8554,
358,
5865,
6013,
5061,
3536,
276,
273,
1206,
18,
5120,
1435,
1815,
12,
71,
... |
self.assertEqual(created_entry.category[0].label, 'spreadsheet') | self.assertEqual(created_entry.category[0].label, 'viewed') self.assertEqual(created_entry.category[1].label, 'spreadsheet') | def testCreateAndDeleteEmptySpreadsheet(self): self.new_entry.title = gdata.atom.Title(text=self.TITLE) self.new_entry.category[0].term = gdata.docs.service.SPREADSHEET_KIND_TERM self.new_entry.category[0].label = 'spreadsheet' created_entry = self.doclist.Post(self.new_entry, '/feeds/documents/private/full') self.doclist.Delete(created_entry.GetEditLink().href) self.assertEqual(created_entry.title.text, self.TITLE) self.assertEqual(created_entry.category[0].label, 'spreadsheet') | 76de6e666a2dc6ba3f703b89b870266619bcabd4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10620/76de6e666a2dc6ba3f703b89b870266619bcabd4/service_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1684,
1876,
2613,
1921,
28719,
8118,
12,
2890,
4672,
365,
18,
2704,
67,
4099,
18,
2649,
273,
314,
892,
18,
7466,
18,
4247,
12,
955,
33,
2890,
18,
14123,
13,
365,
18,
2704,
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,
1842,
1684,
1876,
2613,
1921,
28719,
8118,
12,
2890,
4672,
365,
18,
2704,
67,
4099,
18,
2649,
273,
314,
892,
18,
7466,
18,
4247,
12,
955,
33,
2890,
18,
14123,
13,
365,
18,
2704,
67,
... |
c = self.__class__() c.__dict__ = self.__dict__.copy() c.__dict__.update(kwds) return c | D = dict([kv for kv in self.cKwds]) D.update(kwds) return self.__class__(**D) | def clone(self,**kwds): '''copy then change values in kwds''' c = self.__class__() c.__dict__ = self.__dict__.copy() c.__dict__.update(kwds) return c | 6a2e850ba3a34223546d20cb25563b53251c96a1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3878/6a2e850ba3a34223546d20cb25563b53251c96a1/colors.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3236,
12,
2890,
16,
636,
25577,
4672,
9163,
3530,
1508,
2549,
924,
316,
17149,
26418,
276,
273,
365,
16186,
1106,
972,
1435,
276,
16186,
1576,
972,
273,
365,
16186,
1576,
25648,
3530,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3236,
12,
2890,
16,
636,
25577,
4672,
9163,
3530,
1508,
2549,
924,
316,
17149,
26418,
276,
273,
365,
16186,
1106,
972,
1435,
276,
16186,
1576,
972,
273,
365,
16186,
1576,
25648,
3530,
1435... |
for pkg in set(k.split("/")[0] for k in self.sources['testing'][src]['binaries']): | for pkg in sorted([x.split("/")[0] for x in self.sources['testing'][src]['binaries'] if x.endswith("/"+arch)]): | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 8ba92ccadbccf77c9f6caed00cf5cbb298dc57be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/8ba92ccadbccf77c9f6caed00cf5cbb298dc57be/britney.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1410,
67,
15097,
67,
4816,
991,
12,
2890,
16,
1705,
16,
6637,
16,
11371,
4672,
468,
4158,
82,
13297,
333,
6637,
35,
1084,
67,
88,
273,
365,
18,
10141,
3292,
3813,
310,
3546,
63,
4816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1410,
67,
15097,
67,
4816,
991,
12,
2890,
16,
1705,
16,
6637,
16,
11371,
4672,
468,
4158,
82,
13297,
333,
6637,
35,
1084,
67,
88,
273,
365,
18,
10141,
3292,
3813,
310,
3546,
63,
4816,
... |
"Unsupported compression method %d for file %s" % \ | "Unsupported compression method %d for file %s" % \ | def read(self, name): "Return file bytes (as a string) for name" if self.mode not in ("r", "a"): raise RuntimeError, 'read() requires mode "r" or "a"' if not self.fp: raise RuntimeError, \ "Attempt to read ZIP archive that was already closed" zinfo = self.getinfo(name) filepos = self.fp.tell() self.fp.seek(zinfo.file_offset, 0) bytes = self.fp.read(zinfo.compress_size) self.fp.seek(filepos, 0) if zinfo.compress_type == ZIP_STORED: pass elif zinfo.compress_type == ZIP_DEFLATED: if not zlib: raise RuntimeError, \ "De-compression requires the (missing) zlib module" # zlib compress/decompress code by Jeremy Hylton of CNRI dc = zlib.decompressobj(-15) bytes = dc.decompress(bytes) # need to feed in unused pad byte so that zlib won't choke ex = dc.decompress('Z') + dc.flush() if ex: bytes = bytes + ex else: raise BadZipfile, \ "Unsupported compression method %d for file %s" % \ (zinfo.compress_type, name) crc = binascii.crc32(bytes) if crc != zinfo.CRC: raise BadZipfile, "Bad CRC-32 for file %s" % name return bytes | 5db246d1fa8e8fe89d544cdb26bc15af558e15a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5db246d1fa8e8fe89d544cdb26bc15af558e15a1/zipfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
508,
4672,
315,
990,
585,
1731,
261,
345,
279,
533,
13,
364,
508,
6,
309,
365,
18,
3188,
486,
316,
7566,
86,
3113,
315,
69,
6,
4672,
1002,
7265,
16,
296,
896,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
508,
4672,
315,
990,
585,
1731,
261,
345,
279,
533,
13,
364,
508,
6,
309,
365,
18,
3188,
486,
316,
7566,
86,
3113,
315,
69,
6,
4672,
1002,
7265,
16,
296,
896,
14... |
if jobRange == 'all' or job['id'] in parseRange( jobRange ): self.bossLiteSession.getRunningInstance( job, { 'schedulerAttributes' : jobAttributes } ) | self.bossLiteSession.getRunningInstance( job, { 'schedulerAttributes' : jobAttributes } ) | def submit( self, task, jobRange='all', requirements='', jobAttributes=None ): """ works for Task objects just create running instances and submit to the scheduler in case of first submission archive existing submission an create a new entry for the next submission (i.e. duplicate the entry with an incremented submission number) """ | a810af940922c9ca84d06a6b8adffa73fdaa14eb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8886/a810af940922c9ca84d06a6b8adffa73fdaa14eb/BossLiteAPISched.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4879,
12,
365,
16,
1562,
16,
1719,
2655,
2218,
454,
2187,
8433,
2218,
2187,
1719,
2498,
33,
7036,
262,
30,
3536,
6330,
364,
3837,
2184,
225,
2537,
752,
3549,
3884,
471,
4879,
358,
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,
4879,
12,
365,
16,
1562,
16,
1719,
2655,
2218,
454,
2187,
8433,
2218,
2187,
1719,
2498,
33,
7036,
262,
30,
3536,
6330,
364,
3837,
2184,
225,
2537,
752,
3549,
3884,
471,
4879,
358,
326,
... |
if __debug__: | if __debug__ and repositoryCheck: | def commit(view): try: view.commit() except VersionConflictError, e: logger.exception(e) | cd3ea0e39cfc1d42c3ba70eec0f33bda2996a242 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/cd3ea0e39cfc1d42c3ba70eec0f33bda2996a242/Application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3294,
12,
1945,
4672,
775,
30,
1476,
18,
7371,
1435,
1335,
4049,
10732,
668,
16,
425,
30,
1194,
18,
4064,
12,
73,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3294,
12,
1945,
4672,
775,
30,
1476,
18,
7371,
1435,
1335,
4049,
10732,
668,
16,
425,
30,
1194,
18,
4064,
12,
73,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
table:style-name="table-default.cell-A1"> | table:style-name="table-default.cell-A4"> | def test_table_header3(self): html = """<html xmlns="http://www.w3.org/1999/xhtml"> <table> <thead> <tr> <th>Cell1</th> <th>Cell2</th> </tr> </thead> <tr> <td>Cell3</td> <td>Cell4</td> </tr> </table> </html> """ odt = xhtml2odt(html) # remove namespaces odt = re.sub('(xmlns:[a-z0-9=:".-]+\s+)*', '', str(odt)) # remove comments odt = re.sub('(<!--[a-z0-9=-]+-->)*', '', odt) print odt assert re.search(r""" <table:table \s+ table:style-name="table-default"> \s* <table:table-column \s+ table:number-columns-repeated="2"/> \s* <table:table-header-rows> \s* <table:table-row> \s* | 9cd87a34e72c7238b1b710177511eae4bd213897 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7063/9cd87a34e72c7238b1b710177511eae4bd213897/test_tables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2121,
67,
3374,
23,
12,
2890,
4672,
1729,
273,
3536,
32,
2620,
12302,
1546,
2505,
2207,
5591,
18,
91,
23,
18,
3341,
19,
21,
11984,
19,
26341,
6441,
411,
2121,
34,
411,
24604,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2121,
67,
3374,
23,
12,
2890,
4672,
1729,
273,
3536,
32,
2620,
12302,
1546,
2505,
2207,
5591,
18,
91,
23,
18,
3341,
19,
21,
11984,
19,
26341,
6441,
411,
2121,
34,
411,
24604,... |
context['active_id'], | context['template_id'], | def _default_model(self, cursor, user, context=None): """ Returns the default value for model field @param cursor: Database Cursor @param user: ID of current user @param context: Open ERP Context """ return self.pool.get('email.template').read( cursor, user, context['active_id'], ['object_name'], context)['object_name'] | cd97a6597003594b6958e306479584b11a7550bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cd97a6597003594b6958e306479584b11a7550bd/email_template.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1886,
67,
2284,
12,
2890,
16,
3347,
16,
729,
16,
819,
33,
7036,
4672,
3536,
2860,
326,
805,
460,
364,
938,
652,
632,
891,
3347,
30,
5130,
13949,
632,
891,
729,
30,
1599,
434,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1886,
67,
2284,
12,
2890,
16,
3347,
16,
729,
16,
819,
33,
7036,
4672,
3536,
2860,
326,
805,
460,
364,
938,
652,
632,
891,
3347,
30,
5130,
13949,
632,
891,
729,
30,
1599,
434,
78... |
[(1, 1, 1, 1, 1, 1, 1), (5, 1, -1, 2, -1, 0, 0), (5, 1, 2, -1, -1, 0, 0), (8, 0, -1, -1, 0, zeta5^3 + zeta5^2 + 1, -zeta5^3 - zeta5^2), (8, 0, -1, -1, 0, -zeta5^3 - zeta5^2, zeta5^3 + zeta5^2 + 1), (9, 1, 0, 0, 1, -1, -1), (10, -2, 1, 1, 0, 0, 0)] | [(1, 1, 1, 1, 1, 1, 1), (5, 1, 2, -1, -1, 0, 0), (5, 1, -1, 2, -1, 0, 0), (8, 0, -1, -1, 0, zeta5^3 + zeta5^2 + 1, -zeta5^3 - zeta5^2), (8, 0, -1, -1, 0, -zeta5^3 - zeta5^2, zeta5^3 + zeta5^2 + 1), (9, 1, 0, 0, 1, -1, -1), (10, -2, 1, 1, 0, 0, 0)] | def character_table(self): r""" Returns the matrix of values of the irreducible characters of a permutation group $G$ at the conjugacy classes of $G$. The columns represent the the conjugacy classes of $G$ and the rows represent the different irreducible characters in the ordering given by GAP. | eb4a3d25f4a3089f0f04f1faf9903b68e5cfc0db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/eb4a3d25f4a3089f0f04f1faf9903b68e5cfc0db/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3351,
67,
2121,
12,
2890,
4672,
436,
8395,
2860,
326,
3148,
434,
924,
434,
326,
9482,
1118,
5286,
1523,
3949,
434,
279,
17440,
1041,
271,
43,
8,
622,
326,
10550,
637,
3505,
3318,
434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3351,
67,
2121,
12,
2890,
4672,
436,
8395,
2860,
326,
3148,
434,
924,
434,
326,
9482,
1118,
5286,
1523,
3949,
434,
279,
17440,
1041,
271,
43,
8,
622,
326,
10550,
637,
3505,
3318,
434,
... |
return self.request.RESPONSE.redirect(uri) | return self.request.RESPONSE.redirect(uri, 301) | def __call__(self): a = time.time() if len(self.traverse_subpath) == 1: postId = self.traverse_subpath[0] newPostId = self.messageQuery.post_id_from_legacy_id(postId) if newPostId: postId = newPostId post = self.messageQuery.post(postId) if post: group_metadata = get_group_metadata_by_id(self.context, post['group_id']) if group_metadata: uri = '/groups/%s/messages/post/%s' % (post['group_id'], postId) else: uri = '/post-not-found?id=%s' % postId else: # Cannot find post uri = '/post-not-found?id=%s' % postId else: # Post ID not specified uri = '/post-no-id' | 4e4c12f1d6786fdf83b12ef8639c0151b9605fdf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6250/4e4c12f1d6786fdf83b12ef8639c0151b9605fdf/view.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
4672,
279,
273,
813,
18,
957,
1435,
309,
562,
12,
2890,
18,
2033,
2476,
67,
1717,
803,
13,
422,
404,
30,
1603,
548,
273,
365,
18,
2033,
2476,
67,
1717,
803... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1991,
972,
12,
2890,
4672,
279,
273,
813,
18,
957,
1435,
309,
562,
12,
2890,
18,
2033,
2476,
67,
1717,
803,
13,
422,
404,
30,
1603,
548,
273,
365,
18,
2033,
2476,
67,
1717,
803... |
os.kill(os.getpid(), 15) | py.process.kill(os.getpid()) | def test_crash(): os.kill(os.getpid(), 15) | 58e7b7fbc3096466a01b1d31c6379463ceea8e6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5461/58e7b7fbc3096466a01b1d31c6379463ceea8e6d/test_dsession.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3353,
961,
13332,
1140,
18,
16418,
12,
538,
18,
588,
6610,
9334,
4711,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3353,
961,
13332,
1140,
18,
16418,
12,
538,
18,
588,
6610,
9334,
4711,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
checkViewer('an HTML previewer', ['firefox', 'mozilla file://$$p$$i', 'netscape'], | checkViewer('an HTML previewer', ['xdg-open', 'firefox', 'mozilla file://$$p$$i', 'netscape'], | def checkFormatEntries(dtl_tools): ''' Check all formats (\Format entries) ''' checkViewer('a Tgif viewer and editor', ['tgif'], rc_entry = [r'\Format tgif obj Tgif "" "%%" "%%" "vector"']) # checkViewer('a FIG viewer and editor', ['xfig'], rc_entry = [r'\Format fig fig FIG "" "%%" "%%" "vector"']) # checkViewer('a Grace viewer and editor', ['xmgrace'], rc_entry = [r'\Format agr agr Grace "" "%%" "%%" "vector"']) # checkViewer('a FEN viewer and editor', ['xboard -lpf $$i -mode EditPosition'], rc_entry = [r'\Format fen fen FEN "" "%%" "%%" ""']) # path, iv = checkViewer('a raster image viewer', ['xv', 'kview', 'gimp-remote', 'gimp']) path, ie = checkViewer('a raster image editor', ['gimp-remote', 'gimp']) addToRC(r'''\Format bmp bmp BMP "" "%s" "%s" "" | b716ccd1a0f454f33b10214b6de221249c43bcbb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7514/b716ccd1a0f454f33b10214b6de221249c43bcbb/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
1630,
5400,
12,
72,
6172,
67,
6642,
4672,
9163,
2073,
777,
6449,
17938,
1630,
3222,
13,
9163,
866,
18415,
2668,
69,
399,
13905,
14157,
471,
4858,
2187,
10228,
88,
13905,
17337,
4519,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1630,
5400,
12,
72,
6172,
67,
6642,
4672,
9163,
2073,
777,
6449,
17938,
1630,
3222,
13,
9163,
866,
18415,
2668,
69,
399,
13905,
14157,
471,
4858,
2187,
10228,
88,
13905,
17337,
4519,
... |
publish(n, "hgweb", p, int(repo.ui.config("web", "port", 8000))) | publish(n, "hgweb", p, int(u.config("web", "port", 8000))) | def run(self): print os.environ for r, p in self.repos: u = ui.ui(parentui=self.parentui) u.readconfig(os.path.join(path, '.hg', 'hgrc')) n = os.path.basename(r) publish(n, "hgweb", p, int(repo.ui.config("web", "port", 8000))) return super(hgwebdirzc, self).run() | d8d5b4010f2ffe2aebc8dc6346ca63d3b8f33c46 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/d8d5b4010f2ffe2aebc8dc6346ca63d3b8f33c46/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1172,
1140,
18,
28684,
364,
436,
16,
293,
316,
365,
18,
15564,
30,
582,
273,
5915,
18,
4881,
12,
2938,
4881,
33,
2890,
18,
2938,
4881,
13,
582,
18,
896,
1425,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1172,
1140,
18,
28684,
364,
436,
16,
293,
316,
365,
18,
15564,
30,
582,
273,
5915,
18,
4881,
12,
2938,
4881,
33,
2890,
18,
2938,
4881,
13,
582,
18,
896,
1425,
1... |
print "%2i: %7.3f %7.3f %7.3f"%(i,2*donations[spin][i], 2*bdonations[spin][i], \ 2*repulsions[spin][i]) | def calculate(self, fragments, cupdate=0.05): """Perform a charge decomposition analysis.""" super(CDA, self).calculate(fragments, cupdate) #at this point, there should be a mocoeffs and fooverlaps in analogy to a parser | f12a3ce003c2e2d04b378af20fa5b4deb05fc542 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8167/f12a3ce003c2e2d04b378af20fa5b4deb05fc542/cda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
12,
2890,
16,
14656,
16,
276,
2725,
33,
20,
18,
6260,
4672,
3536,
4990,
279,
13765,
26288,
6285,
12123,
225,
2240,
12,
39,
9793,
16,
365,
2934,
11162,
12,
29528,
16,
276,
2725,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
12,
2890,
16,
14656,
16,
276,
2725,
33,
20,
18,
6260,
4672,
3536,
4990,
279,
13765,
26288,
6285,
12123,
225,
2240,
12,
39,
9793,
16,
365,
2934,
11162,
12,
29528,
16,
276,
2725,
1... | |
add_dir_to_list(self.compiler.library_dirs, sysconfig.get_config_var("LIBDIR")) add_dir_to_list(self.compiler.include_dirs, sysconfig.get_config_var("INCLUDEDIR")) | if os.path.normpath(sys.prefix) != '/usr': add_dir_to_list(self.compiler.library_dirs, sysconfig.get_config_var("LIBDIR")) add_dir_to_list(self.compiler.include_dirs, sysconfig.get_config_var("INCLUDEDIR")) | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 90b8e4d40cc8ec3aed05d5bc6a5afc981e7ebc0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/90b8e4d40cc8ec3aed05d5bc6a5afc981e7ebc0c/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... |
[s1, s2] = string.splitfields(testSymbol, '/') | def isCurrent(symbol, species = 1): ok = 0 results = db.sql('select symbol, _Marker_Status_key from MRK_Marker ' + \ 'where _Species_key = %d ' % (species) + \ 'and symbol = "%s"' % (symbol), 'auto') for r in results: if r['symbol'] == symbol and r['_Marker_Status_key'] in [-2,1,3]: ok = 1 return ok | 6bf7dac4b6bb2870b265f5fee854fae3744ce725 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/340/6bf7dac4b6bb2870b265f5fee854fae3744ce725/MRK_NomenTransgene.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25694,
12,
7175,
16,
12891,
273,
404,
4672,
225,
1529,
273,
374,
1686,
273,
1319,
18,
4669,
2668,
4025,
3273,
16,
389,
7078,
67,
1482,
67,
856,
628,
490,
54,
47,
67,
7078,
296,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25694,
12,
7175,
16,
12891,
273,
404,
4672,
225,
1529,
273,
374,
1686,
273,
1319,
18,
4669,
2668,
4025,
3273,
16,
389,
7078,
67,
1482,
67,
856,
628,
490,
54,
47,
67,
7078,
296,
397,
... | |
ns = fsm.something.pop() ns = ns + fsm.input_symbol fsm.something.append (ns) | ns = fsm.something.pop() ns = ns + fsm.input_symbol fsm.something.append (ns) | def BuildNumber (fsm): ns = fsm.something.pop() ns = ns + fsm.input_symbol fsm.something.append (ns) | cfa572ed6a74538df062e539442271b2ff84abec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9386/cfa572ed6a74538df062e539442271b2ff84abec/ansi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3998,
1854,
261,
2556,
81,
4672,
3153,
273,
26957,
18,
30289,
18,
5120,
1435,
3153,
273,
3153,
397,
26957,
18,
2630,
67,
7175,
26957,
18,
30289,
18,
6923,
261,
2387,
13,
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,
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,
3998,
1854,
261,
2556,
81,
4672,
3153,
273,
26957,
18,
30289,
18,
5120,
1435,
3153,
273,
3153,
397,
26957,
18,
2630,
67,
7175,
26957,
18,
30289,
18,
6923,
261,
2387,
13,
2,
-100,
-100,
... |
def make_burca_fragment(dag, parents, tag): parents = list(parents) nodes = set() while parents: parent = parents.pop() input_cache = parent.get_output_cache() seg = make_cache_entry(input_cache, None, None).segment | def make_burca_fragment(dag, parents, tag, verbose = False): input_cache = [cache_entry for parent in parents for cache_entry in parent.get_output_cache()] input_cache.sort(lambda a, b: cmp(a.segment, b.segment)) nodes = [] while input_cache: | def make_burca_fragment(dag, parents, tag): parents = list(parents) nodes = set() while parents: parent = parents.pop() input_cache = parent.get_output_cache() seg = make_cache_entry(input_cache, None, None).segment node = BurcaNode(burcajob) node.set_name("ligolw_burca_%s_%d_%d" % (tag, int(seg[0]), int(abs(seg)))) node.add_parent(parent) node.add_input_cache(input_cache) node.add_macro("macrocomment", tag) dag.add_node(node) nodes.add(node) return nodes | 5621db30516ff1164ca38c3a7e83b7fd2294de15 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/5621db30516ff1164ca38c3a7e83b7fd2294de15/power.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
70,
295,
5353,
67,
11956,
12,
30204,
16,
6298,
16,
1047,
16,
3988,
273,
1083,
4672,
810,
67,
2493,
273,
306,
2493,
67,
4099,
364,
982,
316,
6298,
364,
1247,
67,
4099,
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,
1221,
67,
70,
295,
5353,
67,
11956,
12,
30204,
16,
6298,
16,
1047,
16,
3988,
273,
1083,
4672,
810,
67,
2493,
273,
306,
2493,
67,
4099,
364,
982,
316,
6298,
364,
1247,
67,
4099,
316,
... |
self.private_dbh.execute("select id,offset,link_type,ts_sec,length from pcap") | self.private_dbh.execute("select id,offset,link_type,ts_sec,length from pcap where id>%r" % int(self.size)) | def __init__(self, case, fd, inode, dbh=None): """ This is a top level File driver for opening pcap files. | fdefe4380c3e3a4f50aef95bda366ff7f1a9a496 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5568/fdefe4380c3e3a4f50aef95bda366ff7f1a9a496/PCAPFS.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
648,
16,
5194,
16,
17870,
16,
1319,
76,
33,
7036,
4672,
3536,
1220,
353,
279,
1760,
1801,
1387,
3419,
364,
10890,
293,
5909,
1390,
18,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
648,
16,
5194,
16,
17870,
16,
1319,
76,
33,
7036,
4672,
3536,
1220,
353,
279,
1760,
1801,
1387,
3419,
364,
10890,
293,
5909,
1390,
18,
2,
-100,
-100,
-10... |
class peak_cluster_analysis: | class peak_cluster_analysis(object): | def __init__(self, peak_list_index, grid_index, grid_height, site, height): self.peak_list_index = peak_list_index self.grid_index = grid_index self.grid_height = grid_height self.site = site self.height = height | ed78df3c3e87d1956280dc63a4d5c3c611ebdd97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/ed78df3c3e87d1956280dc63a4d5c3c611ebdd97/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
11148,
67,
1098,
67,
1615,
16,
3068,
67,
1615,
16,
3068,
67,
4210,
16,
2834,
16,
2072,
4672,
365,
18,
10244,
67,
1098,
67,
1615,
273,
11148,
67,
1098,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
11148,
67,
1098,
67,
1615,
16,
3068,
67,
1615,
16,
3068,
67,
4210,
16,
2834,
16,
2072,
4672,
365,
18,
10244,
67,
1098,
67,
1615,
273,
11148,
67,
1098,
... |
enabled_bugzilla_instances = [] | enabled_bugzilla_instances = [subclass for subclass in mysite.customs.bugtrackers.bugzilla.generate_bugzilla_tracker_classes()] | def find_and_update_enabled_bugzilla_instances(self): enabled_bugzilla_instances = [] | 74718b4c4698cf4452457afc3ffcf58f18dae2c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/74718b4c4698cf4452457afc3ffcf58f18dae2c3/customs_daily_tasks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
464,
67,
2725,
67,
5745,
67,
925,
15990,
67,
10162,
12,
2890,
4672,
3696,
67,
925,
15990,
67,
10162,
273,
5378,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
464,
67,
2725,
67,
5745,
67,
925,
15990,
67,
10162,
12,
2890,
4672,
3696,
67,
925,
15990,
67,
10162,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
index(context.dbPathname(),context.environ['topSrc']) | index(context.dbPathname(),context.environ['topSrc'].value) | def pubIndex(args): '''index Generate an index database out of specification files ''' index(context.dbPathname(),context.environ['topSrc']) if not os.path.exists(context.localDbPathname()): shutil.copy(context.dbPathname(),context.localDbPathname()) | 62a36cd9b24c3511f700f6a16cf7d789b9742e0c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1360/62a36cd9b24c3511f700f6a16cf7d789b9742e0c/dws.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5634,
1016,
12,
1968,
4672,
9163,
1615,
565,
6654,
392,
770,
2063,
596,
434,
7490,
1390,
9163,
770,
12,
2472,
18,
1966,
743,
529,
9334,
2472,
18,
28684,
3292,
3669,
7740,
29489,
1132,
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,
5634,
1016,
12,
1968,
4672,
9163,
1615,
565,
6654,
392,
770,
2063,
596,
434,
7490,
1390,
9163,
770,
12,
2472,
18,
1966,
743,
529,
9334,
2472,
18,
28684,
3292,
3669,
7740,
29489,
1132,
13... |
self.__singular = singular.ring("real", _vars, order=order) | precision = self.base_ring().precision() digits = sage.misc.functional.ceil((2*precision - 2)/7.0) self.__singular = singular.ring("(real,%d,0)"%digits, _vars, order=order) | def _singular_init_(self, singular=singular_default): """ Return a newly created Singular ring matching this ring. """ if not self._can_convert_to_singular(): raise TypeError, "no conversion of %s to a Singular ring defined"%self if self.ngens()==1: _vars = str(self.gen()) order = 'lp' else: _vars = str(self.gens()) order = self.term_order().singular_str() if is_RealField(self.base_ring()): # TODO: here we would convert the SAGE bit precision to a format # Singular understands, and would call # self.__singular = singular.ring("(real,<PREC>", _vars ) self.__singular = singular.ring("real", _vars, order=order) | 73d04e6a6a3a189b4546507ef107a2660edf9f9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/73d04e6a6a3a189b4546507ef107a2660edf9f9d/polynomial_singular_interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
17835,
67,
2738,
67,
12,
2890,
16,
10048,
33,
17835,
67,
1886,
4672,
3536,
2000,
279,
10894,
2522,
348,
17830,
9221,
3607,
333,
9221,
18,
3536,
309,
486,
365,
6315,
4169,
67,
6283,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17835,
67,
2738,
67,
12,
2890,
16,
10048,
33,
17835,
67,
1886,
4672,
3536,
2000,
279,
10894,
2522,
348,
17830,
9221,
3607,
333,
9221,
18,
3536,
309,
486,
365,
6315,
4169,
67,
6283,
... |
print Item | def CreateCFileContent(BaseName, UniObjectClass): # # Init array length # TotalLength = EFI_HII_ARRAY_SIZE_LENGTH Str = '' Offset = 0 # # Create lines for each language's strings # for IndexI in range(len(UniObjectClass.LanguageDef)): Language = UniObjectClass.LanguageDef[IndexI][0] LangPrintName = UniObjectClass.LanguageDef[IndexI][1] print len(UniObjectClass.OrderedStringList[UniObjectClass.LanguageDef[IndexI][0]]) StrStringValue = '' ArrayLength = 0 NumberOfUseOhterLangDef = 0 Index = 0 for IndexJ in range(1, len(UniObjectClass.OrderedStringList[UniObjectClass.LanguageDef[IndexI][0]])): print IndexJ Item = UniObjectClass.FindByToken(IndexJ, Language) print Item #Item = UniObjectClass.OrderedStringList[UniObjectClass.LanguageDef[IndexI][0]][IndexJ] #for Item in UniObjectClass.OrderedStringList[Language]: Name = Item.StringName Value = Item.StringValueByteList Referenced = Item.Referenced Token = Item.Token Length = Item.Length UseOtherLangDef = Item.UseOtherLangDef if UseOtherLangDef != '' and Referenced: NumberOfUseOhterLangDef = NumberOfUseOhterLangDef + 1 Index = Index + 1 else: if NumberOfUseOhterLangDef > 0: StrStringValue = WriteLine(StrStringValue, CreateArrayItem([StringSkipType, DecToHexStr(NumberOfUseOhterLangDef, 2), EFI_HII_SIBT_END])) NumberOfUseOhterLangDef = 0 ArrayLength = ArrayLength + 3 if Referenced and Item.Token > 0: Index = Index + 1 StrStringValue = WriteLine(StrStringValue, "// %s: %s:%s" % (DecToHexStr(Index, 4), Name, DecToHexStr(Token, 4))) StrStringValue = Write(StrStringValue, CreateCFileStringValue(Value)) Offset = Offset + Length ArrayLength = ArrayLength + Item.Length + 1 # 1 is for the length of string type # # EFI_HII_PACKAGE_HEADER # Str = WriteLine(Str, '// PACKAGE HEADER\n') Offset = EFI_HII_STRING_PACKAGE_HDR_LENGTH + len(Language) + 1 ArrayLength = Offset + ArrayLength + 1 TotalLength = TotalLength + ArrayLength List = DecToHexList(ArrayLength, 6) + \ [StringPackageType] + \ DecToHexList(Offset) + \ DecToHexList(Offset) + \ DecToHexList(EFI_HII_LANGUAGE_WINDOW, EFI_HII_LANGUAGE_WINDOW_LENGTH * 2) * EFI_HII_LANGUAGE_WINDOW_NUMBER + \ DecToHexList(EFI_STRING_ID, 4) + \ AscToHexList(Language) + \ DecToHexList(0, 2) Str = WriteLine(Str, CreateArrayItem(List, 16) + '\n') # # PACKAGE DATA # Str = WriteLine(Str, '// PACKAGE DATA\n') Str = Write(Str, StrStringValue) # # Add an EFI_HII_SIBT_END at last # Str = WriteLine(Str, ' ' + EFI_HII_SIBT_END + ",") # # Create line for string variable name # "unsigned char $(BaseName)Strings[] = {" # AllStr = WriteLine('', CHAR_ARRAY_DEFIN + ' ' + BaseName + COMMON_FILE_NAME + '[] = {\n' ) # # Create whole array length # AllStr = WriteLine(AllStr, '// STRING ARRAY LENGTH\n') AllStr = WriteLine(AllStr, CreateArrayItem(DecToHexList(TotalLength))) # # Join package data # AllStr = Write(AllStr, Str) return AllStr | 976f7c1ee0821a1166b84fa71c7b247587f98e3e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/914/976f7c1ee0821a1166b84fa71c7b247587f98e3e/StrGather.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
39,
25391,
12,
29907,
16,
1351,
77,
921,
797,
4672,
468,
468,
4378,
526,
769,
468,
10710,
1782,
273,
512,
1653,
67,
44,
6954,
67,
8552,
67,
4574,
67,
7096,
3978,
273,
875,
9874,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
39,
25391,
12,
29907,
16,
1351,
77,
921,
797,
4672,
468,
468,
4378,
526,
769,
468,
10710,
1782,
273,
512,
1653,
67,
44,
6954,
67,
8552,
67,
4574,
67,
7096,
3978,
273,
875,
9874,
... | |
self.volume = self.parent.deckadj.get_value() | self.volume1 = self.parent.deckadj.get_value() self.volume2 = self.parent.deck2adj.get_value() | def start_player(self, mute_f): self.nomute = not self.parent.mic_opener.any_mic_selected and self.parent.mixermode == self.parent.PRIVATE_PHONE if self.entry.get_text() == "": selection = self.treeview.get_selection() model, iter = selection.get_selected() if iter != None: self.entry.set_text(str(model.get_value(iter, 0))) else: self.stop.clicked() playlist = self.get_playlist_from_entry() if playlist is not None: self.playing = True if self.nomute == False: self.volume = self.parent.deckadj.get_value() if mute_f: self.interludevolume = self.interadj.get_value() self.interadj.set_value(100.0) self.parent.deckadj.set_value(100.0) self.parent.deck2adj.set_value(100.0) else: self.interludevolume = -1 self.parent.deckadj.set_value(30.0) self.parent.deck2adj.set_value(30.0) self.parent.deckadj.value_changed() string_to_send = "LOOP=0\nPLPL=%s\nACTN=playmanyjingles\nend\n" % self.pack_playlistlist(playlist) self.parent.mixer_write(string_to_send, True) while 1: line = self.parent.mixer_read() if line.startswith("context_id="): self.player_cid = int(line[11:-1]) break if line == "": self.player_cid = -1 break if self.player_cid == -1: self.playing = False print "player startup was unsuccessful for files", playlist return False print "player context id is %d\n" % self.player_cid self.entry.set_sensitive(False) return True else: self.playing = False return False | a9d8325d570ae47ee1cc7faeb14a61ba574b6f52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7615/a9d8325d570ae47ee1cc7faeb14a61ba574b6f52/IDJCjingles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
67,
14872,
12,
2890,
16,
312,
624,
67,
74,
4672,
365,
18,
12306,
624,
273,
486,
365,
18,
2938,
18,
27593,
67,
25098,
18,
2273,
67,
27593,
67,
8109,
471,
365,
18,
2938,
18,
14860... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
67,
14872,
12,
2890,
16,
312,
624,
67,
74,
4672,
365,
18,
12306,
624,
273,
486,
365,
18,
2938,
18,
27593,
67,
25098,
18,
2273,
67,
27593,
67,
8109,
471,
365,
18,
2938,
18,
14860... |
target_ts = step | target_ts = first_ts + step | def run_for (self, n): | 9a1420e7010990207286c456b9b64a6693004fb5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12310/9a1420e7010990207286c456b9b64a6693004fb5/Timeline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
1884,
261,
2890,
16,
290,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
1884,
261,
2890,
16,
290,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
func = getattr(self, 'coll_' + datasetType) | func = getattr(self, 'query_' + datasetType) | def queryMetadata(self, datasetType, key, format, dataId): """Return possible values for keys given a partial data id.""" | 440386d8546ae03f5d07b5fe1b1f308aec999ad5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6540/440386d8546ae03f5d07b5fe1b1f308aec999ad5/mapper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
2277,
12,
2890,
16,
3709,
559,
16,
498,
16,
740,
16,
501,
548,
4672,
3536,
990,
3323,
924,
364,
1311,
864,
279,
4702,
501,
612,
12123,
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,
843,
2277,
12,
2890,
16,
3709,
559,
16,
498,
16,
740,
16,
501,
548,
4672,
3536,
990,
3323,
924,
364,
1311,
864,
279,
4702,
501,
612,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
port = int(params[1]) | try: port = int(params[1]) except (IndexError,ValueError): port = 6667 try: remote_server = params[2] except IndexError: pass | def text_command(self,cmdstring,window): if not cmdstring: raise "Empty command" | 3aca0ae7796ad2f58975b1db764bc6526a744333 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/3aca0ae7796ad2f58975b1db764bc6526a744333/wxserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
977,
67,
3076,
12,
2890,
16,
4172,
1080,
16,
5668,
4672,
309,
486,
1797,
1080,
30,
1002,
315,
1921,
1296,
6,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
977,
67,
3076,
12,
2890,
16,
4172,
1080,
16,
5668,
4672,
309,
486,
1797,
1080,
30,
1002,
315,
1921,
1296,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
info.append(so.axis[i].val[:]) | if self.__data_set_type__ == "density" or \ self.__data_set_type__ == "coordinate": x = list(so.axis[i].val[:]) else: x = list(so.axis[i].val[:-1]) info.append(x) | def toXY(self, **kwargs): """ This method returns the data encapsulated in the L{SOM.SO}s as a set of lists. The positioning of the information goes as follows: I{[(x1_1, sx1_1, x2_1, sx2_1, ... , y_1, sy_1), (x1_2, sx1_2, x2_2, sx2_2, ... , y_2, sy_2) ...]}. The variances are controlled by keywords and do not appear in the returned tuples by default. For multidimensional data, the y and sy arrays have the size of the multiplication of the individual axis sizes (axis size - 1 for histogram data). If variances are requested but are not filled in the respective L{SOM.SO}s, the I{None} type will be placed in the appropriate location within the tuple. | d1348c9309d3ea9d670ef558289163a6387f979e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/762/d1348c9309d3ea9d670ef558289163a6387f979e/som.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
8546,
12,
2890,
16,
2826,
4333,
4672,
3536,
1220,
707,
1135,
326,
501,
22106,
11799,
316,
326,
511,
95,
55,
1872,
18,
3584,
97,
87,
487,
279,
444,
434,
6035,
18,
1021,
1754,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8546,
12,
2890,
16,
2826,
4333,
4672,
3536,
1220,
707,
1135,
326,
501,
22106,
11799,
316,
326,
511,
95,
55,
1872,
18,
3584,
97,
87,
487,
279,
444,
434,
6035,
18,
1021,
1754,
310,
... |
WHERE u_rel.uid = %s) OR g.global)""", (model_name, uid), | WHERE u_rel.uid = %s) OR g.global) ORDER BY group_id""", (model_name, uid), | def _compute_domain(self, cr, uid, model_name, mode="read"): if mode not in self._MODES: raise ValueError('Invalid mode: %r' % (mode,)) group_rule = {} global_rules = [] | 65b0532819da3241475c4413dd488cdff4c0736e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/65b0532819da3241475c4413dd488cdff4c0736e/ir_rule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9200,
67,
4308,
12,
2890,
16,
4422,
16,
4555,
16,
938,
67,
529,
16,
1965,
1546,
896,
6,
4672,
309,
1965,
486,
316,
365,
6315,
7038,
55,
30,
1002,
2068,
2668,
1941,
1965,
30,
738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9200,
67,
4308,
12,
2890,
16,
4422,
16,
4555,
16,
938,
67,
529,
16,
1965,
1546,
896,
6,
4672,
309,
1965,
486,
316,
365,
6315,
7038,
55,
30,
1002,
2068,
2668,
1941,
1965,
30,
738... |
pass | bucket = Bucket(self.workdir) paths = bucket.getAllSourcePaths() self.assertTrue( isinstance(paths, types.GeneratorType)) paths = list(paths) self.assertEqual(paths, []) bucket.storeResult( self.src_path1, self.result_path1, suffix='foo') paths = list(bucket.getAllSourcePaths()) self.assertTrue(paths[0].endswith('source_1')) self.assertEqual(len(paths), 1) bucket.storeResult( self.src_path2, self.result_path2, suffix='bar') paths = list(bucket.getAllSourcePaths()) self.assertEqual(len(paths), 2) return | def test_get_all_source_paths(self): pass | 180894710457a58ae75ac76542689d0a2a7c33cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9162/180894710457a58ae75ac76542689d0a2a7c33cb/test_cachemanager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
454,
67,
3168,
67,
4481,
12,
2890,
4672,
2783,
273,
7408,
12,
2890,
18,
1252,
1214,
13,
2953,
273,
2783,
18,
588,
1595,
1830,
4466,
1435,
365,
18,
11231,
5510,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
454,
67,
3168,
67,
4481,
12,
2890,
4672,
2783,
273,
7408,
12,
2890,
18,
1252,
1214,
13,
2953,
273,
2783,
18,
588,
1595,
1830,
4466,
1435,
365,
18,
11231,
5510,
12,
... |
weight, pkg2 = w, p | (weight, pkg2) = (w, p) | def breakUp(self, order): hard_requirements = [] for pkg in self.pkgs: for (p, req) in self.relations[pkg].pre.iteritems(): if req: hard_requirements.append((pkg, p)) # pick requirement to delete weights = {} # calculate minimal distance to a pre req for (pkg, nextpkg) in hard_requirements: # dijkstra edge = [nextpkg] weights[nextpkg] = 0 while edge: node = edge.pop() weight = weights[node] + 1 for (next_node, ishard) in self.relations[node].pre.iteritems(): if ishard: continue w = weights.get(next_node, None) if w is not None and w < weight: continue weights[next_node] = weight edge.append(next_node) edge.sort() edge.reverse() if weights: # get pkg with largest minimal distance weight = -1 for (p, w) in weights.iteritems(): if w > weight: weight, pkg2 = w, p # get the predesessor with largest minimal distance weight = -1 for p in self.relations[pkg2].post: w = weights[p] if w > weight: weight, pkg1 = w, p else: # search the relation that will most likely set a pkg free: # relations that are the last post (pre) of the start (end) pkg # are good, if there are lots of pre/post at the side # where the relation is the last it is even better # to make less relations better we use the negative values weight = None for p1 in self.pkgs: pre = len(self.relations[p1].pre) post = len(self.relations[p1].post) for p2 in self.relations[p1].pre.iterkeys(): pre2 = len(self.relations[p2].pre) post2 = len(self.relations[p2].post) if pre < post2: # start is more interesting w = (-pre, post, -post2, pre) elif pre > post2: # end is more interesting w = (-post2, pre2, -pre, post2) else: # == both same, add the numbers of per and post w = (-pre, post+pre2) if w > weight: # python handles comparison of tuples from left to # right (like strings) weight = w pkg1, pkg2 = p1, p2 if self.relations[pkg1].pre[pkg2]: print "Breaking pre requirement for %s: %s" % (pkg1.getNEVRA(), pkg2.getNEVRA()) # remove this requirement self.relations.removeRelation(pkg1, pkg2) # rebuild components components = ConnectedComponentsDetector(self.relations).detect(self.pkgs) for component in components: self.removeSubComponent(component) self.pkgs[component] = component # collect nodes self.processLeafNodes(order) | e88bd7c78ae123c185f17919515d68d29510e836 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/e88bd7c78ae123c185f17919515d68d29510e836/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
898,
1211,
12,
2890,
16,
1353,
4672,
7877,
67,
16175,
273,
5378,
364,
3475,
316,
365,
18,
25376,
30,
364,
261,
84,
16,
1111,
13,
316,
365,
18,
15018,
63,
10657,
8009,
1484,
18,
2165,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
898,
1211,
12,
2890,
16,
1353,
4672,
7877,
67,
16175,
273,
5378,
364,
3475,
316,
365,
18,
25376,
30,
364,
261,
84,
16,
1111,
13,
316,
365,
18,
15018,
63,
10657,
8009,
1484,
18,
2165,
... |
f.seek(0, 0) f.write(MAGIC) | def writePyc(code, path): f = open(path, "wb") f.write("\0" * 8) # don't bother about a time stamp marshal.dump(code, f) f.seek(0, 0) f.write(MAGIC) f.close() | 678abc68f61ae57565c4683c846e9cb003cf9e86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/678abc68f61ae57565c4683c846e9cb003cf9e86/bundlebuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
9413,
71,
12,
710,
16,
589,
4672,
284,
273,
1696,
12,
803,
16,
315,
9464,
7923,
284,
18,
2626,
31458,
20,
6,
380,
1725,
13,
225,
468,
2727,
1404,
23440,
2973,
279,
813,
14429,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
9413,
71,
12,
710,
16,
589,
4672,
284,
273,
1696,
12,
803,
16,
315,
9464,
7923,
284,
18,
2626,
31458,
20,
6,
380,
1725,
13,
225,
468,
2727,
1404,
23440,
2973,
279,
813,
14429,
... | |
rev = node_history[0][1] | p, rev, chg = node_history[0] | def history(limit): prevpath = path ranges = list(revranges.pairs) ranges.reverse() for (a,b) in ranges: while b >= a: rev = repos.normalize_rev(b) node = get_existing_node(req, repos, prevpath, rev) node_history = list(node.get_history(2)) rev = node_history[0][1] if rev < a: break yield node_history[0] prevpath = node_history[-1][0] # follow copy b = rev-1 | 5dc45d18ddeeee8cc92809e7de3f1e02ac35fd75 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/5dc45d18ddeeee8cc92809e7de3f1e02ac35fd75/log.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4927,
12,
3595,
4672,
2807,
803,
273,
589,
7322,
273,
666,
12,
9083,
14530,
18,
11545,
13,
7322,
18,
9845,
1435,
364,
261,
69,
16,
70,
13,
316,
7322,
30,
1323,
324,
1545,
279,
30,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4927,
12,
3595,
4672,
2807,
803,
273,
589,
7322,
273,
666,
12,
9083,
14530,
18,
11545,
13,
7322,
18,
9845,
1435,
364,
261,
69,
16,
70,
13,
316,
7322,
30,
1323,
324,
1545,
279,
30,
55... |
yield pywikibot.Link.langlinkUnsafe(linkdata['lang'], | yield pywikibot.Link.langlinkUnsafe(linkdata['lang'], | def pagelanglinks(self, page, step=None, total=None): """Iterate all interlanguage links on page, yielding Link objects.""" lltitle = page.title(withSection=False) llquery = self._generator(api.PropertyGenerator, type_arg="langlinks", titles=lltitle.encode(self.encoding()), step=step, total=total) for pageitem in llquery: if pageitem['title'] != lltitle: raise Error( u"getlanglinks: Query on %s returned data on '%s'" % (page, pageitem['title'])) if 'langlinks' not in pageitem: continue for linkdata in pageitem['langlinks']: yield pywikibot.Link.langlinkUnsafe(linkdata['lang'], linkdata['*'], source=self) | 9a9de80656aca57d0501a21fe285308dca618c5b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9005/9a9de80656aca57d0501a21fe285308dca618c5b/site.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4262,
292,
539,
7135,
12,
2890,
16,
1363,
16,
2235,
33,
7036,
16,
2078,
33,
7036,
4672,
3536,
14916,
777,
1554,
4923,
4716,
603,
1363,
16,
31009,
4048,
2184,
12123,
6579,
2649,
273,
1363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4262,
292,
539,
7135,
12,
2890,
16,
1363,
16,
2235,
33,
7036,
16,
2078,
33,
7036,
4672,
3536,
14916,
777,
1554,
4923,
4716,
603,
1363,
16,
31009,
4048,
2184,
12123,
6579,
2649,
273,
1363... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.