rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
... | *... | def test_bootstrap_py(): """Make sure the bootstrap script actually works | 87b10ccbd2499d03415849b53cc5832d51ee4d75 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11359/87b10ccbd2499d03415849b53cc5832d51ee4d75/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12722,
67,
2074,
13332,
3536,
6464,
3071,
326,
7065,
2728,
6013,
6330,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12722,
67,
2074,
13332,
3536,
6464,
3071,
326,
7065,
2728,
6013,
6330,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if not auth_code: | if (auth_code != 'false'): | def delete(req, ln=cdslang, comid=""): """ Delete a comment by giving its comment id @param ln: language @param comid: comment id """ ln = wash_language(ln) _ = gettext_set_language(ln) navtrail_previous_links = getnavtrail() navtrail_previous_links += ' > <a class="navtrail" href="%s/admin/webcomment/webcommentadmin.py/">' % weburl navtrail_previous_links += _("Comment Management") + '</a>' try: uid = getUid(req) except Error, e: return error_page(req) (auth_code, auth_msg) = check_user(uid,'cfgwebcomment') if not auth_code: (body, errors, warnings) = perform_request_delete(ln=ln, comID=comid) return page(title=_("Delete Comment"), body=body, uid=uid, language=ln, navtrail = navtrail_previous_links, req = req, errors = errors, warnings = warnings, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth_msg, navtrail=navtrail_previous_links) | 0702bc430b0f8b307f914c5b86b94bfd67690604 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3302/0702bc430b0f8b307f914c5b86b94bfd67690604/webcommentadmin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
3658,
16,
7211,
33,
4315,
2069,
539,
16,
532,
350,
1546,
6,
4672,
3536,
2504,
279,
2879,
635,
21057,
2097,
2879,
612,
632,
891,
7211,
30,
2653,
632,
891,
532,
350,
30,
2879,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
3658,
16,
7211,
33,
4315,
2069,
539,
16,
532,
350,
1546,
6,
4672,
3536,
2504,
279,
2879,
635,
21057,
2097,
2879,
612,
632,
891,
7211,
30,
2653,
632,
891,
532,
350,
30,
2879,
... |
self.starttag(node, 'table', CLASS="table", border=None)) | self.starttag(node, 'table', CLASS="table", border="1")) | def visit_table(self, node): self.body.append( # "border=None" is a boolean attribute; # it means "standard border", not "no border": self.starttag(node, 'table', CLASS="table", border=None)) | 9427d7ea6328c3b5a2e26b7e61cb5b5c9a28d94d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/9427d7ea6328c3b5a2e26b7e61cb5b5c9a28d94d/html4css1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2121,
12,
2890,
16,
756,
4672,
365,
18,
3432,
18,
6923,
12,
468,
315,
8815,
33,
7036,
6,
353,
279,
1250,
1566,
31,
468,
518,
4696,
315,
10005,
5795,
3113,
486,
315,
2135,
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,
3757,
67,
2121,
12,
2890,
16,
756,
4672,
365,
18,
3432,
18,
6923,
12,
468,
315,
8815,
33,
7036,
6,
353,
279,
1250,
1566,
31,
468,
518,
4696,
315,
10005,
5795,
3113,
486,
315,
2135,
5... |
sage: print back_circulant(3).vals_in_col(0) | sage: back_circulant(3).vals_in_col(0) | def vals_in_col(self, c): """ Returns a dictionary with key e if and only if column c of self has the symbol e. | 494f2bd1cd82ea9dcc25f8e258b7375812aed1c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/494f2bd1cd82ea9dcc25f8e258b7375812aed1c9/latin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5773,
67,
267,
67,
1293,
12,
2890,
16,
276,
4672,
3536,
2860,
279,
3880,
598,
498,
425,
309,
471,
1338,
309,
1057,
276,
434,
365,
711,
326,
3273,
425,
18,
2,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5773,
67,
267,
67,
1293,
12,
2890,
16,
276,
4672,
3536,
2860,
279,
3880,
598,
498,
425,
309,
471,
1338,
309,
1057,
276,
434,
365,
711,
326,
3273,
425,
18,
2,
-100,
-100,
-100,
-100,
... |
StyledTextCtrls.wxStyledTextCtrl.__init__(self, parent, wId, | wx.stc.StyledTextCtrl.__init__(self, parent, wId, | def __init__(self, parent, wId): StyledTextCtrls.wxStyledTextCtrl.__init__(self, parent, wId, style = wx.CLIP_CHILDREN | wx.SUNKEN_BORDER) StyledTextCtrls.CallTipCodeHelpSTCMix.__init__(self) StyledTextCtrls.AutoCompleteCodeHelpSTCMix.__init__(self) StyledTextCtrls.PythonStyledTextCtrlMix.__init__(self, wId, ()) | 30ce10ee16242f65036bfc53e36cab371f86e611 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/30ce10ee16242f65036bfc53e36cab371f86e611/ShellEditor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
341,
548,
4672,
7075,
18,
334,
71,
18,
24273,
1259,
1528,
12418,
16186,
2738,
972,
12,
2890,
16,
982,
16,
341,
548,
16,
2154,
273,
7075,
18,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
982,
16,
341,
548,
4672,
7075,
18,
334,
71,
18,
24273,
1259,
1528,
12418,
16186,
2738,
972,
12,
2890,
16,
982,
16,
341,
548,
16,
2154,
273,
7075,
18,
7... |
def fl_get_menu(ob): """ fl_get_menu(ob) -> num. """ retval = _fl_get_menu(ob) | def fl_get_menu(pObject): """ fl_get_menu(pObject) -> num. """ retval = _fl_get_menu(pObject) | def fl_get_menu(ob): """ fl_get_menu(ob) -> num. """ retval = _fl_get_menu(ob) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
588,
67,
5414,
12,
84,
921,
4672,
3536,
1183,
67,
588,
67,
5414,
12,
84,
921,
13,
317,
818,
18,
3536,
225,
5221,
273,
389,
2242,
67,
588,
67,
5414,
12,
84,
921,
13,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
588,
67,
5414,
12,
84,
921,
4672,
3536,
1183,
67,
588,
67,
5414,
12,
84,
921,
13,
317,
818,
18,
3536,
225,
5221,
273,
389,
2242,
67,
588,
67,
5414,
12,
84,
921,
13,
327,
... |
print "setting", I | def invariants(self): """ Return elementary invariants of this abelian group, by which we mean a nondecreasing (immutable) sequence of integers $n_i$, $1 \leq i \leq k$, with $n_i$ dividing $n_{i+1}$, and such that this group is abstractly isomorphic to $\ZZ/n_1\ZZ \times\cdots\times \ZZ/n_k\ZZ.$ | 08ab428bd98e9e9d753e6c1c65a1b3b2aa7404a2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/08ab428bd98e9e9d753e6c1c65a1b3b2aa7404a2/finite_subgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
316,
15886,
12,
2890,
4672,
3536,
2000,
930,
814,
316,
15886,
434,
333,
1223,
292,
2779,
1041,
16,
635,
1492,
732,
3722,
279,
1661,
323,
1793,
11730,
261,
381,
5146,
13,
3102,
434,
12321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
316,
15886,
12,
2890,
4672,
3536,
2000,
930,
814,
316,
15886,
434,
333,
1223,
292,
2779,
1041,
16,
635,
1492,
732,
3722,
279,
1661,
323,
1793,
11730,
261,
381,
5146,
13,
3102,
434,
12321... | |
_gdal.OGR_F_DumpReadable( self._o, None ) | _gdal.OGR_F_DumpReadable( self._o, 'NULL' ) | def DumpReadable(self): _gdal.OGR_F_DumpReadable( self._o, None ) | 98835bdb30c18977ae47a2c5d2a38e1402e8c715 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10290/98835bdb30c18977ae47a2c5d2a38e1402e8c715/ogr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18242,
14151,
12,
2890,
4672,
389,
19016,
287,
18,
51,
6997,
67,
42,
67,
10628,
14151,
12,
365,
6315,
83,
16,
296,
8560,
11,
262,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
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,
18242,
14151,
12,
2890,
4672,
389,
19016,
287,
18,
51,
6997,
67,
42,
67,
10628,
14151,
12,
365,
6315,
83,
16,
296,
8560,
11,
262,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ITEM = typeOf(l).TO.items.TO.OF | ITEM = typeOf(l).TO.ITEM | def ll_delitem_nonneg(func, l, index): length = l.length if func is dum_checkidx and (index >= length): raise IndexError newlength = length - 1 j = index items = l.items j1 = j+1 while j < newlength: items[j] = items[j1] j = j1 j1 += 1 ITEM = typeOf(l).TO.items.TO.OF if isinstance(ITEM, Ptr): items[newlength] = nullptr(ITEM.TO) _ll_list_resize_le(l, newlength) | c601898b0c04941a1818490999279671f1d0052b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/c601898b0c04941a1818490999279671f1d0052b/rlist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6579,
67,
3771,
1726,
67,
5836,
14518,
12,
644,
16,
328,
16,
770,
4672,
769,
273,
328,
18,
2469,
309,
1326,
353,
4569,
67,
1893,
3465,
471,
261,
1615,
1545,
769,
4672,
1002,
10195,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6579,
67,
3771,
1726,
67,
5836,
14518,
12,
644,
16,
328,
16,
770,
4672,
769,
273,
328,
18,
2469,
309,
1326,
353,
4569,
67,
1893,
3465,
471,
261,
1615,
1545,
769,
4672,
1002,
10195,
394... |
elif hasattr(cf, '__iter__'): cf = iter(cf) | elif hasattr(slope, '__iter__'): cf = iter(slope) | sage: def cf(): | b3fbc1cf28b1612f234458261a8411d34f117fd9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/b3fbc1cf28b1612f234458261a8411d34f117fd9/word_generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
272,
410,
30,
1652,
6080,
13332,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
272,
410,
30,
1652,
6080,
13332,
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,
-1... |
sumarray=Numeric.zeros(self.pointcount, self.atype) | sumarray=Numeric.zeros(len(x), self.atype) | def function(self, p, x): if self.firstpass: #first call from hessian_fit is meaningless, all coefficients zero, save time return 0.0 | 4d44ea8ac114ba81a7fea75d025f5d3b975b2f1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6028/4d44ea8ac114ba81a7fea75d025f5d3b975b2f1e/fitting_toolkit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
445,
12,
2890,
16,
293,
16,
619,
4672,
309,
365,
18,
3645,
5466,
30,
468,
3645,
745,
628,
366,
20529,
67,
7216,
353,
12256,
2656,
16,
777,
14229,
3634,
16,
1923,
813,
327,
374,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
445,
12,
2890,
16,
293,
16,
619,
4672,
309,
365,
18,
3645,
5466,
30,
468,
3645,
745,
628,
366,
20529,
67,
7216,
353,
12256,
2656,
16,
777,
14229,
3634,
16,
1923,
813,
327,
374,
18,
2... |
result[test[1]] = False | result[test[1]] = 0 | cont += configString('/* #undef %s */' % lib[1], desc = description) | f3016d70d952f295e30601e06998d95d2867a6ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/f3016d70d952f295e30601e06998d95d2867a6ea/scons_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
466,
1011,
642,
780,
2668,
20308,
468,
318,
536,
738,
87,
1195,
11,
738,
2561,
63,
21,
6487,
3044,
273,
2477,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
466,
1011,
642,
780,
2668,
20308,
468,
318,
536,
738,
87,
1195,
11,
738,
2561,
63,
21,
6487,
3044,
273,
2477,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
return page_not_authorized(req, "../", text="You are not authorized to view this collection.", navmenuid='search') | cookie = mail_cookie_create_authorize_action(VIEWRESTRCOLL, {'collection' : coll}) target = CFG_SITE_SECURE_URL + '/youraccount/login' + \ make_canonical_urlargd({'action' : cookie, 'ln' : argd['ln'], 'referer' : req.unparsed_uri}, {}) return redirect_to_url(req, target) | def authenticate(self, req, form): """Restricted search results pages.""" | 19aa8278e54f656b5935dcde0aca0276789f8fe4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/19aa8278e54f656b5935dcde0aca0276789f8fe4/websearch_webinterface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8929,
12,
2890,
16,
1111,
16,
646,
4672,
3536,
18784,
1623,
1686,
4689,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8929,
12,
2890,
16,
1111,
16,
646,
4672,
3536,
18784,
1623,
1686,
4689,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
D(land_log_message ("Listening on host %s port %d (%s).\n", host, port, land_net_get_address (self, 0))) | D(land_log_message("Listening on host %s port %d (%s).\n", host, port, land_net_get_address(self, 0))) | #ifdef WINDOWS | 592872e308788b926d7358eb0ec411e83ee451d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/930/592872e308788b926d7358eb0ec411e83ee451d0/net.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
430,
536,
24482,
22973,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
430,
536,
24482,
22973,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if type(addlargs["grp"])==StringType: | if type(addlargs["grp"])==types.StringType: | def __init__(self,spec,addlargs): self.required_values=["version_stamp","target","subarch","rel_type","rel_version","snapshot","source_subpath"] self.valid_values=self.required_values[:] if not addlargs.has_key("grp"): raise CatalystError,"Required value \"grp\" not specified in spec." self.required_values.extend(["grp","grp/use"]) if type(addlargs["grp"])==StringType: addlargs["grp"]=[addlargs["grp"]] for x in addlargs["grp"]: self.required_values.append("grp/"+x+"/packages") self.required_values.append("grp/"+x+"/type") generic_stage_target.__init__(self,spec,addlargs) | 3e014d7a0dc23580f6ad006eaae7aae345a1909f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/3e014d7a0dc23580f6ad006eaae7aae345a1909f/targets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2793,
16,
1289,
80,
1968,
4672,
365,
18,
4718,
67,
2372,
33,
9614,
1589,
67,
14317,
15937,
3299,
15937,
1717,
991,
15937,
2878,
67,
723,
15937,
2878,
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,
1001,
2738,
972,
12,
2890,
16,
2793,
16,
1289,
80,
1968,
4672,
365,
18,
4718,
67,
2372,
33,
9614,
1589,
67,
14317,
15937,
3299,
15937,
1717,
991,
15937,
2878,
67,
723,
15937,
2878,
67,
... |
self.putline("%s = %s(%s)" % (result.pseudoname, opsymbol, ", ".join([argnames])) | self.putline("%s = %s(%s)" % (result.pseudoname, opsymbol, ", ".join([argnames]))) | def createCodeFromBasicBlock(self, block): if self.blockids.has_key(block): self.putline('cinline "goto Label%s;"' % self.blockids[block]) return | a78b87017921f3ba99980893f072caa81d1cef18 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/a78b87017921f3ba99980893f072caa81d1cef18/genpyrex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
1085,
1265,
8252,
1768,
12,
2890,
16,
1203,
4672,
309,
365,
18,
2629,
2232,
18,
5332,
67,
856,
12,
2629,
4672,
365,
18,
458,
1369,
2668,
71,
10047,
315,
75,
6302,
5287,
9,
87,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
1085,
1265,
8252,
1768,
12,
2890,
16,
1203,
4672,
309,
365,
18,
2629,
2232,
18,
5332,
67,
856,
12,
2629,
4672,
365,
18,
458,
1369,
2668,
71,
10047,
315,
75,
6302,
5287,
9,
87,
4... |
node.recurse(walk) | for child in node.children: walk(child) | def walk(node): if node.isLeaf(): leaves.append(node) node.recurse(walk) | 63306f43e399499c60857865afba8c546fb1ef11 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8482/63306f43e399499c60857865afba8c546fb1ef11/treelib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5442,
12,
2159,
4672,
309,
756,
18,
291,
9858,
13332,
15559,
18,
6923,
12,
2159,
13,
756,
18,
29362,
12,
11348,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5442,
12,
2159,
4672,
309,
756,
18,
291,
9858,
13332,
15559,
18,
6923,
12,
2159,
13,
756,
18,
29362,
12,
11348,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
raise dtella.Reject | raise Reject | def gotSyncTopic(self, src_ipp, ack_key, topic): | 8cdfc22c2b13a13391c4a0ab0cafff0e071e6da2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4752/8cdfc22c2b13a13391c4a0ab0cafff0e071e6da2/dtella.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2363,
4047,
6657,
12,
2890,
16,
1705,
67,
15491,
16,
8479,
67,
856,
16,
3958,
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... | [
1,
1,
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,
2363,
4047,
6657,
12,
2890,
16,
1705,
67,
15491,
16,
8479,
67,
856,
16,
3958,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
out_event_queue.put(FileMovedEvent(last_renamed_from_filename, filename, handler=self.event_handler))) | out_event_queue.put(FileMovedEvent(last_renamed_from_filename, filename, handler=self.event_handler)) | def queue_events(self, num_bytes, out_event_queue): with self._lock: # queue events last_renamed_from_filename = "" for action, filename in FILE_NOTIFY_INFORMATION(self.event_buffer.raw, num_bytes): filename = absolute_path(os.path.join(self.path, filename)) | 3cfa412b87a1363bffe3cc43ec3b85be2b9d60ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14346/3cfa412b87a1363bffe3cc43ec3b85be2b9d60ce/win32ioc_observer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2389,
67,
5989,
12,
2890,
16,
818,
67,
3890,
16,
596,
67,
2575,
67,
4000,
4672,
598,
365,
6315,
739,
30,
468,
2389,
2641,
1142,
67,
1187,
2808,
67,
2080,
67,
3459,
273,
1408,
364,
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,
2389,
67,
5989,
12,
2890,
16,
818,
67,
3890,
16,
596,
67,
2575,
67,
4000,
4672,
598,
365,
6315,
739,
30,
468,
2389,
2641,
1142,
67,
1187,
2808,
67,
2080,
67,
3459,
273,
1408,
364,
13... |
try: base64.decodestring("") except binascii_error: pass else: self.fail("expected a binascii.Error on null decode request") | test_support.verify(base64.decodestring('') == '') | def test_decode_string(self): """Testing decode string""" test_support.verify(base64.decodestring("d3d3LnB5dGhvbi5vcmc=\n") == "www.python.org", reason="www.python.org decodestring failed") test_support.verify(base64.decodestring("YQ==\n") == "a", reason="a decodestring failed") test_support.verify(base64.decodestring("YWI=\n") == "ab", reason="ab decodestring failed") test_support.verify(base64.decodestring("YWJj\n") == "abc", reason="abc decodestring failed") test_support.verify(base64.decodestring( "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0\nNTY3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==\n") == "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#0^&*();:<>,. []{}", reason = "long decodestring failed") try: base64.decodestring("") except binascii_error: pass else: self.fail("expected a binascii.Error on null decode request") | 254ba4b2c07805f1fcb4e669a80150671850d7d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/254ba4b2c07805f1fcb4e669a80150671850d7d3/test_base64.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3922,
67,
1080,
12,
2890,
4672,
3536,
22218,
2495,
533,
8395,
1842,
67,
13261,
18,
8705,
12,
1969,
1105,
18,
4924,
1145,
371,
2932,
72,
23,
72,
23,
13780,
38,
25,
72,
43,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3922,
67,
1080,
12,
2890,
4672,
3536,
22218,
2495,
533,
8395,
1842,
67,
13261,
18,
8705,
12,
1969,
1105,
18,
4924,
1145,
371,
2932,
72,
23,
72,
23,
13780,
38,
25,
72,
43,
7... |
''' | """ | .. describe:: def callback(exitcode, ...) | 70a19c9cd26bf74dc8392c855299f399d5bdc820 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11722/70a19c9cd26bf74dc8392c855299f399d5bdc820/process.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
6116,
6401,
2866,
1652,
1348,
12,
8593,
710,
16,
1372,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
6116,
6401,
2866,
1652,
1348,
12,
8593,
710,
16,
1372,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
src = src.in_scene self.out_scene = src self.duration = duration | envelope = scene.Scene() envelope.add(src, name='src') self.out_scene = envelope self.duration = duration | def __init__(self, dst, duration=1.25, src=None): '''Initializes the transition | e9db2a10a9fd0eb8d66dd5bddc87668f7079b22c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7473/e9db2a10a9fd0eb8d66dd5bddc87668f7079b22c/transitions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3046,
16,
3734,
33,
21,
18,
2947,
16,
1705,
33,
7036,
4672,
9163,
9685,
326,
6007,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
3046,
16,
3734,
33,
21,
18,
2947,
16,
1705,
33,
7036,
4672,
9163,
9685,
326,
6007,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
temp_control_file_dir = tempfile.mkdtmp() | temp_control_file_dir = tempfile.mkdtemp() | def run(self, cleanup=False, install_before=False, install_after=False, collect_crashdumps=True, namespace={}): # use a copy so changes don't affect the original dictionary namespace = namespace.copy() machines = self.machines | 0a2d5bd86e39fca9ce2194d72211cd83d90c6384 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/0a2d5bd86e39fca9ce2194d72211cd83d90c6384/server_job.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
6686,
33,
8381,
16,
3799,
67,
5771,
33,
8381,
16,
3799,
67,
5205,
33,
8381,
16,
3274,
67,
3353,
961,
13302,
1121,
33,
5510,
16,
1981,
12938,
4672,
468,
999,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
6686,
33,
8381,
16,
3799,
67,
5771,
33,
8381,
16,
3799,
67,
5205,
33,
8381,
16,
3274,
67,
3353,
961,
13302,
1121,
33,
5510,
16,
1981,
12938,
4672,
468,
999,
279,
... |
assert False | if self.parser.elementInScope("tr", True): self.clearStackToTableRowContext() self.parser.openElements.pop() self.parser.switchInsertionMode("inTableBody") else: self.parser.parseError() | def endTagTr(self, name="tr"): # XXX lots of checks assert False | 86288d0aa90cb2973b7839f1fbebba40fe5b89ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/86288d0aa90cb2973b7839f1fbebba40fe5b89ca/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
1070,
12,
2890,
16,
508,
1546,
313,
6,
4672,
468,
11329,
328,
6968,
434,
4271,
1815,
1083,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
1070,
12,
2890,
16,
508,
1546,
313,
6,
4672,
468,
11329,
328,
6968,
434,
4271,
1815,
1083,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
9 | 9 | def round_robin(n): r""" Computes a round-robin coloring of the complete graph on `n` vertices. A round-robin coloring of the complete graph `G` on `2n` vertices (`V = [0, \dots, 2n - 1]`) is a proper coloring of its edges such that the edges with color `i` are all the `(i + j, i - j)` plus the edge `(2n - 1, i)`. If `n` is odd, one obtain a round-robin coloring of the complete graph through the round-robin coloring of the graph with `n + 1` vertices. INPUT: - ``n`` -- the number of vertices in the complete graph. OUTPUT: - A ``CompleteGraph`` with labelled edges such that the label of each edge is its color. EXAMPLES:: sage: from sage.graphs.graph_coloring import round_robin sage: round_robin(3).edges() [(0, 1, 2), (0, 2, 1), (1, 2, 0)] :: sage: round_robin(4).edges() [(0, 1, 2), (0, 2, 1), (0, 3, 0), (1, 2, 0), (1, 3, 1), (2, 3, 2)] For higher orders, the coloring is still proper and uses the expected number of colors. :: sage: g = round_robin(9) sage: sum([Set([e[2] for e in g.edges_incident(v)]).cardinality() for v in g]) == 2*g.size() True sage: Set([e[2] for e in g.edge_iterator()]).cardinality() 9 :: sage: g = round_robin(10) sage: sum([Set([e[2] for e in g.edges_incident(v)]).cardinality() for v in g]) == 2*g.size() True sage: Set([e[2] for e in g.edge_iterator()]).cardinality() 9 """ if n <= 1: raise ValueError("There must be at least two vertices in the graph.") mod = lambda x, y: x - y*(x // y) if n % 2 == 0: g = GraphGenerators().CompleteGraph(n) for i in xrange(n - 1): g.set_edge_label(n - 1, i, i) for j in xrange(1, (n - 1) // 2 + 1): g.set_edge_label(mod(i - j, n - 1), mod(i + j, n - 1), i) return g else: g = round_robin(n + 1) g.delete_vertex(n) return g | a468d77074137cba0ddfb241121c56cde855518e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/a468d77074137cba0ddfb241121c56cde855518e/graph_coloring.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3643,
67,
303,
4757,
12,
82,
4672,
436,
8395,
14169,
281,
279,
3643,
17,
303,
4757,
2036,
310,
434,
326,
3912,
2667,
603,
1375,
82,
68,
6928,
18,
225,
432,
3643,
17,
303,
4757,
2036,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3643,
67,
303,
4757,
12,
82,
4672,
436,
8395,
14169,
281,
279,
3643,
17,
303,
4757,
2036,
310,
434,
326,
3912,
2667,
603,
1375,
82,
68,
6928,
18,
225,
432,
3643,
17,
303,
4757,
2036,
... |
u'<div class="metatable">' + | macro.formatter.div(1, **divfmt) + | def construct_table(macro, pagelist, metakeys, legend='', checkAccess=True, styles=dict()): request = macro.request request.page.formatter = request.formatter _ = request.getText row = 0 # Start table request.write(macro.formatter.linebreak() + u'<div class="metatable">' + macro.formatter.table(1, attrs={'tableclass': 'metatable'})) if metakeys: # Give a class to headers to make it customisable request.write(macro.formatter.table_row(1, {'rowclass': 'meta_header'})) # Upper left cell is empty or has the desired legend t_cell(macro, [legend]) for key in metakeys: style = styles.get(key, dict()) # Styles can modify key naming name = style.get('gwikiname', '').strip('"') # We don't want stuff like bullet lists in out header headerstyle = dict() for st in style: if not st.startswith('gwiki'): headerstyle[st] = style[st] if name: t_cell(macro, [name], style=headerstyle) else: t_cell(macro, [key], style=headerstyle) if metakeys: request.write(macro.formatter.table_row(0)) tmp_page = request.page for page in pagelist: if '-gwikirevision-' in page: metas = get_metas(request, page, metakeys, checkAccess=checkAccess) page, revision = page.split('-gwikirevision-') else: metas = get_metas(request, page, metakeys, checkAccess=checkAccess) revision = '' pageobj = Page(request, page) request.page = pageobj request.formatter.page = pageobj row = row + 1 if row % 2: request.write(macro.formatter.table_row(1, {'rowclass': 'metatable-odd-row'})) else: request.write(macro.formatter.table_row(1, {'rowclass': 'metatable-even-row'})) t_cell(macro, [page], head=1, rev=revision) for key in metakeys: style = styles.get(key, dict()) t_cell(macro, metas[key], style=style) request.write(macro.formatter.table_row(0)) request.page = tmp_page request.formatter.page = tmp_page request.write(macro.formatter.table(0)) request.write(u'</div>') | cd210add6979036e485ea932397438a0c098b245 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/cd210add6979036e485ea932397438a0c098b245/MetaTable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4872,
67,
2121,
12,
26448,
16,
4262,
5449,
16,
5100,
581,
402,
87,
16,
7241,
2218,
2187,
28484,
33,
5510,
16,
5687,
33,
1576,
1435,
4672,
590,
273,
11522,
18,
2293,
590,
18,
2433,
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,
4872,
67,
2121,
12,
26448,
16,
4262,
5449,
16,
5100,
581,
402,
87,
16,
7241,
2218,
2187,
28484,
33,
5510,
16,
5687,
33,
1576,
1435,
4672,
590,
273,
11522,
18,
2293,
590,
18,
2433,
18,
... |
self.__exceptionCallback = oExceptionCallback or self.__showException | self.__exceptionCallback = oExceptionCallback | def __init__( self, oCallable, args = None, kwargs = None, sTJId = None, oCallback = None, oExceptionCallback = None ): self.__jobFunction = oCallable self.__jobArgs = args or [] self.__jobKwArgs = kwargs or {} self.__tjID = sTJId self.__resultCallback = oCallback self.__exceptionCallback = oExceptionCallback or self.__showException self.__done = False self.__exceptionRaised = False | eda7f55ac4a6bd7d60039140a2cbb6c2c8d1b5b0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/eda7f55ac4a6bd7d60039140a2cbb6c2c8d1b5b0/ThreadPool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
320,
11452,
16,
833,
273,
599,
16,
1205,
273,
599,
16,
272,
56,
46,
548,
273,
599,
16,
320,
2428,
273,
599,
16,
320,
503,
2428,
273,
599,
262,
30,
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,
1001,
2738,
972,
12,
365,
16,
320,
11452,
16,
833,
273,
599,
16,
1205,
273,
599,
16,
272,
56,
46,
548,
273,
599,
16,
320,
2428,
273,
599,
16,
320,
503,
2428,
273,
599,
262,
30,
365... |
self.energy.write('%20.10f Ry\n' % at.energy/RYDBERG) | e = at.energy if self.rydberg: e /= RYDBERG self.energy.write('%20.10f Ry\n' % e) | def write(self, at): | c678eb69f4e3322139aeed2586b2b437a89e282f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/c678eb69f4e3322139aeed2586b2b437a89e282f/sio2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
622,
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,
1045,
12,
2890,
16,
622,
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... |
self.logger.verbose( '_connect:', self._connected ) | self.logger.debug( '_connect:', self._connected ) | def _connect( self ): """ open connection to MySQL DB and put Connection into Queue set connected flag to True and return S_OK return S_ERROR upon failure """ self.logger.verbose( '_connect:', self._connected ) if self._connected: return S_OK() | dbbfc2e9691b79636765e7ead3e5df27861504bc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/dbbfc2e9691b79636765e7ead3e5df27861504bc/MySQL.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3612,
12,
365,
262,
30,
3536,
1696,
1459,
358,
13485,
2383,
471,
1378,
4050,
1368,
7530,
444,
5840,
2982,
358,
1053,
471,
327,
348,
67,
3141,
327,
348,
67,
3589,
12318,
5166,
3536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3612,
12,
365,
262,
30,
3536,
1696,
1459,
358,
13485,
2383,
471,
1378,
4050,
1368,
7530,
444,
5840,
2982,
358,
1053,
471,
327,
348,
67,
3141,
327,
348,
67,
3589,
12318,
5166,
3536,
... |
entriesbygid = {} | def test_values(self): entries = grp.getgrall() entriesbyname = {} entriesbygid = {} | 004b7da367c3f8c8345a7897a0587b23d8642f2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/004b7da367c3f8c8345a7897a0587b23d8642f2e/test_grp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2372,
12,
2890,
4672,
3222,
273,
14295,
18,
588,
3197,
454,
1435,
3222,
1637,
529,
273,
2618,
3222,
1637,
15780,
273,
2618,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
2372,
12,
2890,
4672,
3222,
273,
14295,
18,
588,
3197,
454,
1435,
3222,
1637,
529,
273,
2618,
3222,
1637,
15780,
273,
2618,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
yield line | yield unicode(line,"utf-8") | def lines_of_file(file): for line in open(file).readlines(): if line[-1]=="\n": line = line[:-1] if line=="": continue yield line | 7a6df687d14212e107087a8c1627db9258327ad2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5934/7a6df687d14212e107087a8c1627db9258327ad2/fstutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2362,
67,
792,
67,
768,
12,
768,
4672,
364,
980,
316,
1696,
12,
768,
2934,
896,
3548,
13332,
309,
980,
18919,
21,
65,
631,
12691,
82,
6877,
980,
273,
980,
10531,
17,
21,
65,
309,
980... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2362,
67,
792,
67,
768,
12,
768,
4672,
364,
980,
316,
1696,
12,
768,
2934,
896,
3548,
13332,
309,
980,
18919,
21,
65,
631,
12691,
82,
6877,
980,
273,
980,
10531,
17,
21,
65,
309,
980... |
ET.SubElement(root, 'dc:creator').text = self.creator | ET.SubElement(root, qname('creator',DC_NS)).text = self.creator | def toElement(self,**kwargs): | e9c4345533fd24eede4febe6e6cd4c5c3b16e15c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11626/e9c4345533fd24eede4febe6e6cd4c5c3b16e15c/DIDLLite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
1046,
12,
2890,
16,
636,
4333,
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,
358,
1046,
12,
2890,
16,
636,
4333,
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,... |
prop=' <ns0:%s>%s</ns0:%s>' % (name, value, name) result.append(propstat % (nsdef, prop, '200 OK')) else: prop=' <ns0:%s/>' % name result.append(propstat % (nsdef, prop,'404 Not Found')) return join(result, '\n') def odav__propstat(self, url, allprop, vals, iscol, join=string.join): result=[] propstat='<d:propstat>\n' \ '<d:prop%s>\n' \ '%s\n' \ '</d:prop>\n' \ '<d:status>HTTP/1.1 %s</d:status>\n' \ '</d:/propstat>' if not allprop and not vals: if hasattr(aq_base(self), 'propertyMap'): for md in self.propertyMap(): prop='<z:%s/>' % md['id'] result.append(propstat % ('', prop, '200 OK')) elif allprop: if hasattr(aq_base(self), 'propertyMap'): for md in self.propertyMap(): name, type=md['id'], md.get('type', 'string') value=getattr(self, name) if type=='tokens': value=join(value, ' ') elif type=='lines': value=join(value, '\n') else: value=str(value) prop='<z:%s>%s</z:%s>' % (name, value, name) result.append(propstat % ('', prop, '200 OK')) else: prop_mgr=hasattr(aq_base(self), 'propertyMap') for name, ns in vals: if ns==zpns: if not prop_mgr or not self.hasProperty(name): prop='<z:%s/>' % name result.append(propstat % ('',prop,'404 Not Found')) else: value=getattr(self, name) type=self.getPropertyType(name) | def dav__propstat(self, allprop, vals, join=string.join): # The dav__propstat method returns a chunk of xml containing # one or more propstat elements indicating property names, # values, errors and status codes. This is called by some # of the WebDAV support machinery. If a property set does # not support WebDAV, just override this method to return # an empty string. propstat='<d:propstat%s>\n' \ ' <d:prop>\n' \ '%s\n' \ ' </d:prop>\n' \ ' <d:status>HTTP/1.1 %s</d:status>\n' \ '</d:propstat>\n' result=[] if not self.propertyMap(): return '' if not allprop and not vals: # propname request for name in self.propertyIds(): result.append(' <ns0:%s/>' % name) result=join(result, '\n') nsdef=' xmlns:ns0="%s"' % self.xml_namespace() return propstat % (nsdef, result, '200 OK') elif allprop: for name, value in self.propertyItems(): prop=' <ns0:%s>%s</ns0:%s>' % (name, value, name) result.append(prop) result=join(result, '\n') nsdef=' xmlns:ns0="%s"' % self.xml_namespace() return propstat % (nsdef, result, '200 OK') else: xml_ns=self.xml_namespace() propdict=self.propdict() nsdef=' xmlns:ns0="%s"' % self.xml_namespace() for name, ns in vals: if ns==xml_ns: if propdict.has_key(name): value=self.getProperty(name) prop=' <ns0:%s>%s</ns0:%s>' % (name, value, name) result.append(propstat % (nsdef, prop, '200 OK')) else: prop=' <ns0:%s/>' % name result.append(propstat % (nsdef, prop,'404 Not Found')) return join(result, '\n') | 62ae26da026a782b337b19b00b172786a89e5123 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/62ae26da026a782b337b19b00b172786a89e5123/PropertySheets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
302,
842,
972,
5986,
5642,
12,
2890,
16,
777,
5986,
16,
5773,
16,
1233,
33,
1080,
18,
5701,
4672,
468,
1021,
302,
842,
972,
5986,
5642,
707,
1135,
279,
2441,
434,
2025,
4191,
468,
1245... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
302,
842,
972,
5986,
5642,
12,
2890,
16,
777,
5986,
16,
5773,
16,
1233,
33,
1080,
18,
5701,
4672,
468,
1021,
302,
842,
972,
5986,
5642,
707,
1135,
279,
2441,
434,
2025,
4191,
468,
1245... | |
EXAMPLE: | EXAMPLE:: | def maximal_difference_probability_absolute(self): """ Return the difference probability of the difference with the highest probability in absolute terms, i.e. how often it occurs in total. | dd81b4a97db8b232434d8623d237dba45e418834 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/dd81b4a97db8b232434d8623d237dba45e418834/sbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
943,
2840,
67,
23444,
67,
22390,
67,
12547,
12,
2890,
4672,
3536,
2000,
326,
7114,
11331,
434,
326,
7114,
598,
326,
9742,
11331,
316,
4967,
6548,
16,
277,
18,
73,
18,
3661,
16337,
518,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
943,
2840,
67,
23444,
67,
22390,
67,
12547,
12,
2890,
4672,
3536,
2000,
326,
7114,
11331,
434,
326,
7114,
598,
326,
9742,
11331,
316,
4967,
6548,
16,
277,
18,
73,
18,
3661,
16337,
518,
... |
output = range(7) for i in range(7): output[i] = "" | def shlomif_main(args): print_ts = 0 if (args[1] == "-t"): print_ts = 1 args.pop(0) game_num = long(args[1]) if (len(args) >= 3): which_game = args[2] else: which_game = "freecell" game_chooser = WhichGame(which_game, print_ts) game_class = game_chooser.lookup() cards = game_chooser.deal(game_num) if game_class == "der_katz": if (which_game == "die_schlange"): print "Foundations: H-A S-A D-A C-A H-A S-A D-A C-A" board = Board(9) col_idx = 0 for card in cards: if card.is_king(): col_idx = col_idx + 1 if not ((which_game == "die_schlange") and (card.rank == 1)): board.add(col_idx, card) board.output() elif game_class == "freecell": is_fc = (which_game in ('forecell', 'eight_off')) board = Board(8, with_freecells=is_fc) if is_fc: for i in range(52): if (i < 48): board.add(i%8, cards[i]) else: board.add_freecell(cards[i]) if which_game == "eight_off": board.add_freecell(empty_card()) else: for i in range(52): board.add(i%8, cards[i]) board.output(); elif game_class == "seahaven": board = Board(10, with_freecells=True) board.add_freecell(empty_card()) for i in range(52): if (i < 50): board.add(i%10, cards[i]) else: board.add_freecell(cards[i]) board.output() elif game_class == "bakers_dozen": i, n = 0, 13 kings = [] cards.reverse() for c in cards: if c.is_king(): kings.append(i) i = i + 1 for i in kings: j = i % n while j < i: if not cards[j].is_king(): cards[i], cards[j] = cards[j], cards[i] break j = j + n board = Board(13) for i in range(52): board.add(i%13, cards[i]) board.output() elif game_class == "gypsy": output = range(8); for i in range(8): output[i] = "" for i in range(24): output[i%8] = output[i%8] + cards[i].to_s() if (i < 16): output[i%8] = output[i%8] + " " talon = "Talon:" for i in range(24,8*13): talon = talon + " " + cards[i].to_s() print talon for i in range(8): print output[i] elif game_class == "klondike": #o = "" #for i in cards: # o = o + " " + i.to_s() #print o output = range(7); for i in range(7): output[i] = "" card_num = 0 for r in range(1,7): for s in range(7-r): output[s] = output[s] + cards[card_num].to_s() card_num = card_num + 1 for s in range(7): output[s] = output[s] + cards[card_num].to_s() card_num = card_num + 1 talon = "Talon: " while card_num < 52: talon = talon + cards[card_num].to_s() card_num = card_num + 1 print talon if (not (which_game == "small_harp")): output.reverse(); for i in output: print i elif game_class == "simple_simon": card_num = 0 board = Board(10) num_cards = 9 while num_cards >= 3: for s in range(num_cards): board.add(s, cards[card_num]) card_num = card_num + 1 num_cards = num_cards - 1 for s in range(10): board.add(s, cards[card_num]) card_num = card_num + 1 board.output() elif game_class == "yukon": card_num = 0 output = range(7) for i in range(7): output[i] = "" for i in range(1, 7): for j in range(i, 7): output[j] = output[j] + cards[card_num].to_s() card_num = card_num + 1 for i in range(4): for j in range(1,7): output[j] = output[j] + cards[card_num].to_s() card_num = card_num + 1 for i in range(7): output[i] = output[i] + cards[card_num].to_s() card_num = card_num + 1 for i in output: print i elif game_class == "beleaguered_castle": if (which_game == "beleaguered_castle") or (which_game == "citadel"): new_cards = [] for c in cards: if (c & 0x0F != 1): new_cards.append(c) cards = new_cards; output = range(8) for i in range(8): output[i] = "" card_num = 0 if (which_game == "beleaguered_castle") or (which_game == "citadel"): foundations = [1,1,1,1] else: foundations = [0,0,0,0] for i in range(6): for s in range(8): if (which_game == "citadel"): if (foundations[cards[card_num] >> 4]+1 == (cards[card_num] & 0x0F)): foundations[cards[card_num] >> 4] = foundations[cards[card_num] >> 4] + 1; card_num = card_num + 1 continue output[s] = output[s] + cards[card_num].to_s() card_num = card_num + 1 if (card_num == len(cards)): break if (which_game == "streets_and_alleys"): for s in range(4): output[s] = output[s] + " " + cards[card_num].to_s() card_num = card_num + 1 f_str = "Foundations:" for f in [2,0,3,1]: if (foundations[f] != 0): f_str = f_str + " " + get_card_suit(f) + "-" + get_card_num(foundations[f]) if (f_str != "Foundations:"): print f_str for i in output: print i elif game_class == "fan": board = Board(18) for i in range(52-1): board.add(i%17, cards[i]) board.add(17, cards[i+1]) board.output() else: print "Unknown game type " + which_game + "\n" | e826473f5ec949b65209ec2182ff4051c0b52947 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2756/e826473f5ec949b65209ec2182ff4051c0b52947/make_pysol_freecell_board.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
699,
80,
362,
430,
67,
5254,
12,
1968,
4672,
1172,
67,
3428,
273,
374,
309,
261,
1968,
63,
21,
65,
422,
3701,
88,
6,
4672,
1172,
67,
3428,
273,
404,
833,
18,
5120,
12,
20,
13,
7920... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
699,
80,
362,
430,
67,
5254,
12,
1968,
4672,
1172,
67,
3428,
273,
374,
309,
261,
1968,
63,
21,
65,
422,
3701,
88,
6,
4672,
1172,
67,
3428,
273,
404,
833,
18,
5120,
12,
20,
13,
7920... | |
sure, you have a backup of your project The complete output of the | sure, you have a backup of your project. The complete output of the | def main(): parser = optparse.OptionParser( "usage: %prog [options]", option_class=optparseext.ExtendAction ) parser.add_option( "-m", "--from-makefile", dest="makefile", metavar="MAKEFILE", help="Makefile of the skeleton project to migrate (optional)" ) parser.add_option( "--from-version", dest="from_version", metavar="VERSION", default="", help="qooxdoo version used for the project e.g. '0.6.3'" ) parser.add_option( "-i", "--input", dest="file", metavar="FILE.js", help="Migrate just one JavaScript file. Writes the generated file to STDOUT." ) # options from generator.py parser.add_option( "--class-path", action="extend", dest="classPath", metavar="DIRECTORY", type="string", default=[], help="Define a class path." ) parser.add_option( "-v", "--verbose", action="store_true", dest="verbose", default=False, help="Verbose output mode." ) parser.add_option( "--class-encoding", action="extend", dest="classEncoding", metavar="ENCODING", type="string", default=[], help="Define the encoding for a class path." ) # Options for pretty printing compiler.addCommandLineOptions(parser) (options, args) = parser.parse_args() if options.from_version == "": if options.makefile: print """ | 882199cfd5fb95191f29222bd539a1c03c3f03b3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/882199cfd5fb95191f29222bd539a1c03c3f03b3/migrator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
225,
2082,
273,
2153,
2670,
18,
1895,
2678,
12,
315,
9167,
30,
738,
14654,
306,
2116,
65,
3113,
1456,
67,
1106,
33,
3838,
2670,
408,
18,
16675,
1803,
262,
225,
2082,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
225,
2082,
273,
2153,
2670,
18,
1895,
2678,
12,
315,
9167,
30,
738,
14654,
306,
2116,
65,
3113,
1456,
67,
1106,
33,
3838,
2670,
408,
18,
16675,
1803,
262,
225,
2082,
18,
1... |
debugger_prefix += [ valgrind_args ] | debugger_prefix.append(OPTIONS.valgrind_args) | def run_tests(tests, results): """Run the given tests, sending raw results to the given results accumulator.""" pb = None if not OPTIONS.hide_progress: try: from progressbar import ProgressBar pb = ProgressBar('', len(tests), 16) except ImportError: pass results.pb = pb test_list = [ TestTask(test) for test in tests ] pipeline = Source(test_list, results, False) results.finished = pipeline.start(OPTIONS.worker_count) if pb: pb.finish() if not OPTIONS.tinderbox: results.list() | 4f41e7cabe1e545cb521adcbd70e60dddbfea30a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/4f41e7cabe1e545cb521adcbd70e60dddbfea30a/jstests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
16341,
12,
16341,
16,
1686,
4672,
3536,
1997,
326,
864,
7434,
16,
5431,
1831,
1686,
358,
326,
864,
1686,
13514,
12123,
6386,
273,
599,
309,
486,
16726,
18,
11248,
67,
8298,
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,
1086,
67,
16341,
12,
16341,
16,
1686,
4672,
3536,
1997,
326,
864,
7434,
16,
5431,
1831,
1686,
358,
326,
864,
1686,
13514,
12123,
6386,
273,
599,
309,
486,
16726,
18,
11248,
67,
8298,
30,... |
str += ' </tr>\n </table>\n </td>\n' str += ' <td>\n' str += ' <table border="0" cellpadding="0" cellspacing="0">\n' str += ' <tr valign="top">\n' str += ' <th class="navbar">' | str += I+'<td width="100%"></td>\n' str += I+'<th class="navbar">' | def _navbar(self, where=None, top=0): """ @return: The HTML code for a navigation bar on the given type of page. The navigation bar typically looks like:: [ Package Module Class Tree Index Help ] @rtype: C{string} @param where: An identifier indicating what page we're creating a navigation bar for. This is either a UID (for an object documentation page); or one of the strings C{'tree'}, C{'index'}, and C{'help'}. @type where: C{UID} or C{string} @param top: Whether this is the navigation bar at the top of the page. @type top: C{boolean} """ str = self._start_of('Navbar') str += '<table class="navbar" border="0" width="100%"' str += ' cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">\n' str += ' <tr>\n' str += ' <td width="100%">\n' str += ' <table border="0" cellpadding="0" cellspacing="0">\n' str += ' <tr valign="top">\n' | de8498c8efa790d4615edc664395ae04afd746a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/de8498c8efa790d4615edc664395ae04afd746a1/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11589,
3215,
12,
2890,
16,
1625,
33,
7036,
16,
1760,
33,
20,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
279,
10394,
4653,
603,
326,
864,
618,
434,
1363,
18,
225,
1021,
10394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11589,
3215,
12,
2890,
16,
1625,
33,
7036,
16,
1760,
33,
20,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
279,
10394,
4653,
603,
326,
864,
618,
434,
1363,
18,
225,
1021,
10394... |
if response.getheader("Content-Encoding", "") == "gzip": stream = GzipDecodedResponse(response) | if hasattr(response, 'getheader'): if response.getheader("Content-Encoding", "") == "gzip": stream = GzipDecodedResponse(response) else: stream = response | def parse_response(self, response): # read response data from httpresponse, and parse it if response.getheader("Content-Encoding", "") == "gzip": stream = GzipDecodedResponse(response) else: stream = response | f34445f7bd30d3fe1fb9c5a5a87f10225a6372a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/f34445f7bd30d3fe1fb9c5a5a87f10225a6372a3/client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2740,
12,
2890,
16,
766,
4672,
468,
855,
766,
501,
628,
1062,
2740,
16,
471,
1109,
518,
225,
309,
3859,
12,
2740,
16,
296,
75,
546,
18105,
11,
4672,
309,
766,
18,
75,
546,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2740,
12,
2890,
16,
766,
4672,
468,
855,
766,
501,
628,
1062,
2740,
16,
471,
1109,
518,
225,
309,
3859,
12,
2740,
16,
296,
75,
546,
18105,
11,
4672,
309,
766,
18,
75,
546,
... |
if circ.built: | if circ.built and not circ.closed: | def attach_ping(self, stream): plog("DEBUG", "New ping request") # Get info from the Queue # TODO: check if empty ping_info = self.ping_circs.get() # Extract ping-infos circ_id = ping_info[0] hop = ping_info[1] # Set circ to stream stream.circ = circ_id try: circs_lock.acquire() # Get the circuit, TODO: Handle circs that do not exist anymore! if circ_id in self.circuits: circ = self.circuits[circ_id] if circ.built: self.c.attach_stream(stream.strm_id, circ.circ_id, hop) # Measure here or move to before attaching? self.start_times[circ_id] = time.time() stream.pending_circ = circ # Only one possible here circ.pending_streams.append(stream) else: plog("WARN", "Circuit not built") else: plog("WARN", "Circuit does not exist") circs_lock.release() except TorCtl.ErrorReply, e: plog("WARN", "Error attaching stream: " + str(e.args)) | 5c07e1b6d34f16556018f8177a0bd4db44e9e733 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3762/5c07e1b6d34f16556018f8177a0bd4db44e9e733/op-addon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3306,
67,
1382,
12,
2890,
16,
1407,
4672,
293,
1330,
2932,
9394,
3113,
315,
1908,
10087,
590,
7923,
468,
968,
1123,
628,
326,
7530,
468,
2660,
30,
866,
309,
1008,
10087,
67,
1376,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3306,
67,
1382,
12,
2890,
16,
1407,
4672,
293,
1330,
2932,
9394,
3113,
315,
1908,
10087,
590,
7923,
468,
968,
1123,
628,
326,
7530,
468,
2660,
30,
866,
309,
1008,
10087,
67,
1376,
273,
... |
url, data, web_response = ohloh_url2data(url, 'result/analysis') | data, web_response = ohloh_url2data(url, 'result/analysis') | def get_latest_project_analysis_id(self, project_name): """ Retrieve from Ohloh.net the latest project analysis id for a given project.""" # {{{ url = 'https://www.ohloh.net/p/%s/analyses/latest.xml?' % urllib.quote( project_name) url, data, web_response = ohloh_url2data(url, 'result/analysis') return int(data['id']) # }}} | b59d458cd897dbc72d6d2574b975f73b40c0009a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11976/b59d458cd897dbc72d6d2574b975f73b40c0009a/ohloh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
13550,
67,
4406,
67,
12746,
67,
350,
12,
2890,
16,
1984,
67,
529,
4672,
3536,
10708,
628,
531,
76,
383,
76,
18,
2758,
326,
4891,
1984,
6285,
612,
364,
279,
864,
1984,
12123,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13550,
67,
4406,
67,
12746,
67,
350,
12,
2890,
16,
1984,
67,
529,
4672,
3536,
10708,
628,
531,
76,
383,
76,
18,
2758,
326,
4891,
1984,
6285,
612,
364,
279,
864,
1984,
12123,
... |
def checkSetMinor(self): | def test_checkSetMinor(self): | def checkSetMinor(self): au = MIMEAudio(self._audiodata, 'fish') self.assertEqual(im.get_type(), 'audio/fish') | 904c1d02e084eedcc12cee56bfca3579d050abf2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/904c1d02e084eedcc12cee56bfca3579d050abf2/test_email.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1893,
694,
19549,
12,
2890,
4672,
20309,
273,
13195,
12719,
12,
2890,
6315,
24901,
2386,
396,
16,
296,
22905,
6134,
365,
18,
11231,
5812,
12,
381,
18,
588,
67,
723,
9334,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1893,
694,
19549,
12,
2890,
4672,
20309,
273,
13195,
12719,
12,
2890,
6315,
24901,
2386,
396,
16,
296,
22905,
6134,
365,
18,
11231,
5812,
12,
381,
18,
588,
67,
723,
9334,
296,
... |
from sage.combinat.composition import Compositions for i in itertools.count(): for c in Compositions(i, length=self.size_of_alphabet()): for m in self.iter_morphisms(c, codomain=codomain): yield m if not isinstance(l, list): | from sage.combinat.integer_list import IntegerListsLex compositions = IntegerListsLex(itertools.count(), \ length=n, min_part = max(0,min_length)) else: | def iter_morphisms(self, l=None, codomain=None): r""" Returns an iterator over all non erasing morphisms or over all morphisms `\varphi` such that `|\varphi| = l` when ``l`` is given. | e3481015e87ea68f3611f2348ae5c8955e98e96a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/e3481015e87ea68f3611f2348ae5c8955e98e96a/words.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1400,
67,
81,
7657,
23749,
12,
2890,
16,
328,
33,
7036,
16,
11012,
1530,
33,
7036,
4672,
436,
8395,
2860,
392,
2775,
1879,
777,
1661,
6445,
11730,
14354,
23749,
578,
1879,
777,
14354,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1400,
67,
81,
7657,
23749,
12,
2890,
16,
328,
33,
7036,
16,
11012,
1530,
33,
7036,
4672,
436,
8395,
2860,
392,
2775,
1879,
777,
1661,
6445,
11730,
14354,
23749,
578,
1879,
777,
14354,
23... |
if properties['samlPasswordUri'] == None: properties['samlPasswordUri'] = '' | if properties['changePasswordUri'] == None: properties['changePasswordUri'] = '' | def UpdateSSOSettings(self, enableSSO=None, samlSignonUri=None, samlLogoutUri=None, changePasswordUri=None, ssoWhitelist=None, useDomainSpecificIssuer=None): """Update SSO Settings. | 61f724252631c404b4614b31975ab484ca6648fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5609/61f724252631c404b4614b31975ab484ca6648fd/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2315,
1260,
51,
2628,
12,
2890,
16,
4237,
1260,
51,
33,
7036,
16,
22835,
2766,
265,
3006,
33,
7036,
16,
22835,
19456,
3006,
33,
7036,
16,
2549,
3913,
3006,
33,
7036,
16,
27250,
18927,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2315,
1260,
51,
2628,
12,
2890,
16,
4237,
1260,
51,
33,
7036,
16,
22835,
2766,
265,
3006,
33,
7036,
16,
22835,
19456,
3006,
33,
7036,
16,
2549,
3913,
3006,
33,
7036,
16,
27250,
18927,
... |
""" expected_regex = \ r"""^<document source="test data"> | """, """\ <document source="test data"> | def test_parser(self): if self.run_in_debugger: pdb.set_trace() document = DocutilsTestSupport.utils.new_document( 'test data', self.settings) # Remove any additions made by "role" directives: DocutilsTestSupport.roles._roles = {} self.parser.parse(self.input, document) output = document.pformat() self.assert_(re.match(self.expected_regex, output), "Real output:\n" + output + "\nExpected output:\n" + self.expected_regex) | fd1a049d8e9e6f111406d36ad8ccb4cbaf9c558e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/fd1a049d8e9e6f111406d36ad8ccb4cbaf9c558e/test_include.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4288,
12,
2890,
4672,
309,
365,
18,
2681,
67,
267,
67,
4148,
693,
30,
10892,
18,
542,
67,
5129,
1435,
1668,
273,
3521,
5471,
4709,
6289,
18,
5471,
18,
2704,
67,
5457,
12,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4288,
12,
2890,
4672,
309,
365,
18,
2681,
67,
267,
67,
4148,
693,
30,
10892,
18,
542,
67,
5129,
1435,
1668,
273,
3521,
5471,
4709,
6289,
18,
5471,
18,
2704,
67,
5457,
12,
2... |
permanent = flickr.get_token(frob) | try: permanent = flickr.get_token(frob) except: return error_page(self, session, "The authentication token was out of date. Please try again.") | def get(self): session = get_session() | 483f8044c0c1f14f447b9a414f4588fc3b21d737 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11110/483f8044c0c1f14f447b9a414f4588fc3b21d737/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
4672,
1339,
273,
336,
67,
3184,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
4672,
1339,
273,
336,
67,
3184,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
"Your description cannot be broken into nice lines!" | "Your description cannot be broken into nice lines!:\n%s" \ % repr(text) | def _split_multi_line(self, text, max_len): "Returns a list of strings.""" #TODO - Do the line spliting while preserving white space? text = text.strip() if len(text) < max_len: return [text] | 8ae4991c15902857c0e03c05b85d6f63166bd2d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/8ae4991c15902857c0e03c05b85d6f63166bd2d2/InsdcIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4939,
67,
7027,
67,
1369,
12,
2890,
16,
977,
16,
943,
67,
1897,
4672,
315,
1356,
279,
666,
434,
2064,
12123,
468,
6241,
300,
2256,
326,
980,
1416,
310,
1323,
27995,
9578,
3476,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4939,
67,
7027,
67,
1369,
12,
2890,
16,
977,
16,
943,
67,
1897,
4672,
315,
1356,
279,
666,
434,
2064,
12123,
468,
6241,
300,
2256,
326,
980,
1416,
310,
1323,
27995,
9578,
3476,
35... |
if nxest is None: nxest=kx+sqrt(m/2) if nyest is None: nyest=ky+sqrt(m/2) | if nxest is None: nxest=int(kx+sqrt(m/2)) if nyest is None: nyest=int(ky+sqrt(m/2)) | def bisplrep(x,y,z,w=None,xb=None,xe=None,yb=None,ye=None,kx=3,ky=3,task=0, s=None,eps=1e-16,tx=None,ty=None,full_output=0, nxest=None,nyest=None,quiet=1): """ Find a bivariate B-spline representation of a surface. Given a set of data points (x[i], y[i], z[i]) representing a surface z=f(x,y), compute a B-spline representation of the surface. Based on the routine SURFIT from FITPACK. Parameters ---------- x, y, z : ndarray Rank-1 arrays of data points. w : ndarray, optional Rank-1 array of weights. By default ``w=np.ones(len(x))``. xb, xe : float, optional End points of approximation interval in `x`. By default ``xb = x.min(), xe=x.max()``. yb, ye : float, optional End points of approximation interval in `y`. By default ``yb=y.min(), ye = y.max()``. kx, ky : int, optional The degrees of the spline (1 <= kx, ky <= 5). Third order (kx=ky=3) is recommended. task : int, optional If task=0, find knots in x and y and coefficients for a given smoothing factor, s. If task=1, find knots and coefficients for another value of the smoothing factor, s. bisplrep must have been previously called with task=0 or task=1. If task=-1, find coefficients for a given set of knots tx, ty. s : float, optional A non-negative smoothing factor. If weights correspond to the inverse of the standard-deviation of the errors in z, then a good s-value should be found in the range ``(m-sqrt(2*m),m+sqrt(2*m))`` where m=len(x). eps : float, optional A threshold for determining the effective rank of an over-determined linear system of equations (0 < eps < 1). `eps` is not likely to need changing. tx, ty : ndarray, optional Rank-1 arrays of the knots of the spline for task=-1 full_output : int, optional Non-zero to return optional outputs. nxest, nyest : int, optional Over-estimates of the total number of knots. If None then ``nxest = max(kx+sqrt(m/2),2*kx+3)``, ``nyest = max(ky+sqrt(m/2),2*ky+3)``. quiet : int, optional Non-zero to suppress printing of messages. Returns ------- tck : array_like A list [tx, ty, c, kx, ky] containing the knots (tx, ty) and coefficients (c) of the bivariate B-spline representation of the surface along with the degree of the spline. fp : ndarray The weighted sum of squared residuals of the spline approximation. ier : int An integer flag about splrep success. Success is indicated if ier<=0. If ier in [1,2,3] an error occurred but was not raised. Otherwise an error is raised. msg : str A message corresponding to the integer flag, ier. See Also -------- splprep, splrep, splint, sproot, splev UnivariateSpline, BivariateSpline Notes ----- See `bisplev` to evaluate the value of the B-spline given its tck representation. References ---------- .. [1] Dierckx P.:An algorithm for surface fitting with spline functions Ima J. Numer. Anal. 1 (1981) 267-283. .. [2] Dierckx P.:An algorithm for surface fitting with spline functions report tw50, Dept. Computer Science,K.U.Leuven, 1980. .. [3] Dierckx P.:Curve and surface fitting with splines, Monographs on Numerical Analysis, Oxford University Press, 1993. """ x,y,z=map(myasarray,[x,y,z]) x,y,z=map(ravel,[x,y,z]) # ensure 1-d arrays. m=len(x) if not (m==len(y)==len(z)): raise TypeError('len(x)==len(y)==len(z) must hold.') if w is None: w=ones(m,float) else: w=myasarray(w) if not len(w) == m: raise TypeError('len(w)=%d is not equal to m=%d' % (len(w), m)) if xb is None: xb=x.min() if xe is None: xe=x.max() if yb is None: yb=y.min() if ye is None: ye=y.max() if not (-1<=task<=1): raise TypeError('task must be -1, 0 or 1') if s is None: s=m-sqrt(2*m) if tx is None and task==-1: raise TypeError('Knots_x must be given for task=-1') if tx is not None: _surfit_cache['tx']=myasarray(tx) nx=len(_surfit_cache['tx']) if ty is None and task==-1: raise TypeError('Knots_y must be given for task=-1') if ty is not None: _surfit_cache['ty']=myasarray(ty) ny=len(_surfit_cache['ty']) if task==-1 and nx<2*kx+2: raise TypeError('There must be at least 2*kx+2 knots_x for task=-1') if task==-1 and ny<2*ky+2: raise TypeError('There must be at least 2*ky+2 knots_x for task=-1') if not ((1<=kx<=5) and (1<=ky<=5)): raise TypeError('Given degree of the spline (kx,ky=%d,%d) is not supported. (1<=k<=5)' % (kx,ky)) if m<(kx+1)*(ky+1): raise TypeError('m >= (kx+1)(ky+1) must hold') if nxest is None: nxest=kx+sqrt(m/2) if nyest is None: nyest=ky+sqrt(m/2) nxest,nyest=max(nxest,2*kx+3),max(nyest,2*ky+3) if task>=0 and s==0: nxest=int(kx+sqrt(3*m)) nyest=int(ky+sqrt(3*m)) if task==-1: _surfit_cache['tx']=myasarray(tx) _surfit_cache['ty']=myasarray(ty) tx,ty=_surfit_cache['tx'],_surfit_cache['ty'] wrk=_surfit_cache['wrk'] iwrk=_surfit_cache['iwrk'] u,v,km,ne=nxest-kx-1,nyest-ky-1,max(kx,ky)+1,max(nxest,nyest) bx,by=kx*v+ky+1,ky*u+kx+1 b1,b2=bx,bx+v-ky if bx>by: b1,b2=by,by+u-kx try: lwrk1=int32(u*v*(2+b1+b2)+2*(u+v+km*(m+ne)+ne-kx-ky)+b2+1) lwrk2=int32(u*v*(b2+1)+b2) except OverflowError: raise OverflowError("Too many data points to interpolate") tx,ty,c,o = _fitpack._surfit(x,y,z,w,xb,xe,yb,ye,kx,ky,task,s,eps, tx,ty,nxest,nyest,wrk,lwrk1,lwrk2) _curfit_cache['tx']=tx _curfit_cache['ty']=ty _curfit_cache['wrk']=o['wrk'] ier,fp=o['ier'],o['fp'] tck=[tx,ty,c,kx,ky] ierm=min(11,max(-3,ier)) if ierm<=0 and not quiet: print _iermess2[ierm][0] print "\tkx,ky=%d,%d nx,ny=%d,%d m=%d fp=%f s=%f"%(kx,ky,len(tx), len(ty),m,fp,s) if ierm>0 and not full_output: if ier in [1,2,3,4,5]: print "Warning: "+_iermess2[ierm][0] print "\tkx,ky=%d,%d nx,ny=%d,%d m=%d fp=%f s=%f"%(kx,ky,len(tx), len(ty),m,fp,s) else: try: raise _iermess2[ierm][1](_iermess2[ierm][0]) except KeyError: raise _iermess2['unknown'][1](_iermess2['unknown'][0]) if full_output: try: return tck,fp,ier,_iermess2[ierm][0] except KeyError: return tck,fp,ier,_iermess2['unknown'][0] else: return tck | e2fb0d81ad14e4c847daa45d7505dd70021927cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12971/e2fb0d81ad14e4c847daa45d7505dd70021927cb/fitpack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17771,
412,
14462,
12,
92,
16,
93,
16,
94,
16,
91,
33,
7036,
16,
6114,
33,
7036,
16,
6554,
33,
7036,
16,
93,
70,
33,
7036,
16,
20513,
33,
7036,
16,
79,
92,
33,
23,
16,
18465,
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,
17771,
412,
14462,
12,
92,
16,
93,
16,
94,
16,
91,
33,
7036,
16,
6114,
33,
7036,
16,
6554,
33,
7036,
16,
93,
70,
33,
7036,
16,
20513,
33,
7036,
16,
79,
92,
33,
23,
16,
18465,
33,... |
testing distribution; this happen if the source package is not | testing distribution; this happens if the source package is not | def should_remove_source(self, pkg): """Check if a source package should be removed from testing This method checks if a source package should be removed from the testing distribution; this happen if the source package is not present in the unstable distribution anymore. | 644caa3f3125e8104b46e0ef2774fdb1917b2f5c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2784/644caa3f3125e8104b46e0ef2774fdb1917b2f5c/britney.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1410,
67,
4479,
67,
3168,
12,
2890,
16,
3475,
4672,
3536,
1564,
309,
279,
1084,
2181,
1410,
506,
3723,
628,
7769,
225,
1220,
707,
4271,
309,
279,
1084,
2181,
1410,
506,
3723,
628,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1410,
67,
4479,
67,
3168,
12,
2890,
16,
3475,
4672,
3536,
1564,
309,
279,
1084,
2181,
1410,
506,
3723,
628,
7769,
225,
1220,
707,
4271,
309,
279,
1084,
2181,
1410,
506,
3723,
628,
326,
... |
return (_center(a, colwidth) + ' ' * spacing + _center(b, colwidth) + ' ' * spacing + _center(c, colwidth)) | return (a.center(colwidth) + ' ' * spacing + b.center(colwidth) + ' ' * spacing + c.center(colwidth)) | def format3cstring(a, b, c, colwidth=_colwidth, spacing=_spacing): """Returns a string formatted from 3 strings, centered within 3 columns.""" return (_center(a, colwidth) + ' ' * spacing + _center(b, colwidth) + ' ' * spacing + _center(c, colwidth)) | f5024853b80e29cb655731eeffba0ac48be6b5bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f5024853b80e29cb655731eeffba0ac48be6b5bb/calendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
23,
71,
1080,
12,
69,
16,
324,
16,
276,
16,
645,
2819,
33,
67,
1293,
2819,
16,
13259,
33,
67,
14080,
4672,
3536,
1356,
279,
533,
4955,
628,
890,
2064,
16,
25340,
3470,
890,
2168... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
23,
71,
1080,
12,
69,
16,
324,
16,
276,
16,
645,
2819,
33,
67,
1293,
2819,
16,
13259,
33,
67,
14080,
4672,
3536,
1356,
279,
533,
4955,
628,
890,
2064,
16,
25340,
3470,
890,
2168... |
print "<ol>" | elif (inBodyText == 2): print"</pre>" inBodyText = 0 elif (inBodyText == 3): print"</table>" inBodyText = 0 if not (div == 1 and lineLevel == 1): print "<ol>" | def processLine(linein): global level, formatMode, slides, hideComments, inBodyText, styleSheet, inlineStyle, div if (lstrip(linein) == ""): return linein = beautifyLine(linein) lineLevel = getLineLevel(linein) if ((hideComments == 0) or (lineLevel != (find(linein,"[")+1))): if (lineLevel > level): # increasing depth while (lineLevel > level): if (formatMode == "indent"): if (inBodyText == 1): print"</p>" inBodyText = 0 print "<ol>" else: sys.exit("Error! Unknown formatMode type") level = level + 1 elif (lineLevel < level): # decreasing depth while (lineLevel < level): if (inBodyText == 1): print"</p>" inBodyText = 0 elif (inBodyText == 2): print"</pre>" inBodyText = 0 elif (inBodyText == 3): print"</table>" inBodyText = 0 print "</ol>" level = level - 1 if (div == 1 and level == 1): print'</div>' else: print # same depth if (slides == 0): if (lineLevel == find(linein," ") +1 ) or \ (lineLevel == find(linein,":") +1 ): if (inBodyText == 0): handleBodyText(linein,lineLevel) elif (colonStrip(rstrip(lstrip(linein))) == ""): print "</p>" handleBodyText(linein,lineLevel) else: print colonStrip(rstrip(lstrip(linein))), elif (lineLevel == find(linein,";") +1 ): if (inBodyText == 0): handlePreformattedText(linein,lineLevel) elif (semicolonStrip(rstrip(lstrip(linein))) == ""): print "</pre>" handlePreformattedText(linein,lineLevel) else: print semicolonStrip(rstrip(lstrip(linein))), elif (lineLevel == find(linein,"|") +1 ): if (inBodyText == 0): handleTable(linein,lineLevel) elif (pipeStrip(rstrip(lstrip(linein))) == ""): print "</table>" handleTtable(linein,lineLevel) else: print handleTableRow(linein,lineLevel), else: if (inBodyText == 1): print"</p>" inBodyText = 0 elif (inBodyText == 2): print"</pre>" inBodyText = 0 elif (inBodyText == 3): print"</table>" inBodyText = 0 if (div == 1 and lineLevel == 1): print divName(linein) print "<li", if (styleSheet != ""): if (lineLevel == find(linein,"- ") +1 ): print " class=\"LB" + str(lineLevel) + "\"", print ">" + lstrip(rstrip(dashStrip(lstrip(linein)))), elif (lineLevel == find(linein,"+ ") +1 ): print " class=\"LN" + str(lineLevel) + "\"", print ">" + lstrip(rstrip(plusStrip(lstrip(linein)))), else: print " class=\"L" + str(lineLevel) + "\"", print ">" + rstrip(lstrip(linein)), else: if (lineLevel == 1): if (linein[0] == " "): if (inBodyText == 0): handleBodyText(linein,lineLevel) else: print rstrip(lstrip(linein)), else: print "<address>" print rstrip(lstrip(linein)), print "</address>\n" else: if (lineLevel == find(linein," ") +1 ) or \ (lineLevel == find(linein,":") +1 ): if (inBodyText == 0): handleBodyText(linein,lineLevel) else: print rstrip(lstrip(linein)), else: if (inBodyText == 1): print"</p>" inBodyText = 0 print "<li", if (styleSheet != ""): print " class=\"LI.L" + str(lineLevel) + "\"", print ">" + rstrip(lstrip(linein)), | fc16136abe0e486a37c93cf3944efd4ef14901d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6154/fc16136abe0e486a37c93cf3944efd4ef14901d9/otl2html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
1670,
12,
1369,
267,
4672,
2552,
1801,
16,
740,
2309,
16,
30119,
16,
6853,
9051,
16,
316,
2250,
1528,
16,
2154,
8229,
16,
6370,
2885,
16,
3739,
309,
261,
80,
6406,
12,
1369,
267,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
1670,
12,
1369,
267,
4672,
2552,
1801,
16,
740,
2309,
16,
30119,
16,
6853,
9051,
16,
316,
2250,
1528,
16,
2154,
8229,
16,
6370,
2885,
16,
3739,
309,
261,
80,
6406,
12,
1369,
267,... |
print "Matches: \r\t\t", item["matches"] | print "Match: \r\t\t", item["match"] | def get_tailor_items(self): """xccdf_policy.get_tailor_items() -- Get all items that can be tailored by tool. Function will return all values that can be tailored by specified XCCDF Policy's Profile | 42039f4dcb756f1ff6b36557d1dfd0bd677b62c8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7521/42039f4dcb756f1ff6b36557d1dfd0bd677b62c8/openscap_api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
13101,
280,
67,
3319,
12,
2890,
4672,
3536,
92,
952,
2180,
67,
5086,
18,
588,
67,
13101,
280,
67,
3319,
1435,
1493,
968,
777,
1516,
716,
848,
506,
5798,
7653,
635,
5226,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
13101,
280,
67,
3319,
12,
2890,
4672,
3536,
92,
952,
2180,
67,
5086,
18,
588,
67,
13101,
280,
67,
3319,
1435,
1493,
968,
777,
1516,
716,
848,
506,
5798,
7653,
635,
5226,
18,
... |
stdin = stdin.strip() | if stdin != None: stdin = stdin.strip() | def getout(prog, arg=None, stdin=None, verb=False, raiseIfNoneOut=False): '''Replacement for commands.getoutput. Arguments: - prog. Executable to be run. STRING. The only non-optional argument. - arg. List of strings with program arguments, or just a string - stdin. Filename STRING. - verb: whether to display command before executing it. BOOL Returned value: stdout of command, with stripped newlines''' assert type(prog) == str assert type(verb) == bool stdin = stdin.strip() def cat_cmd(cmdlist, stdin): cmd = ' '.join(cmdlist) if stdin != None: cmd += ' <' + stdin return cmd if which(prog) == None: raise m8rex.MissingProgram(prog) # Build the [prog, args] list cmdlist = [prog] if arg != None: if type(arg) == str: arg = arg.split() assert type(arg) == list cmdlist += arg # Build command string for printing or Python < 2.4 if verb or not have_subprocess: cmd = cat_cmd(cmdlist, stdin) msg(cmd, verb) if have_subprocess: if stdin == None: finp = None else: if os.path.isfile(stdin): finp = open(stdin,'r') else: raise m8rex.NotAValidFile(stdin) try: s = subprocess.Popen(cmdlist,stdin=finp,stdout=subprocess.PIPE) output = s.communicate()[0] except: raise m8rex.FailedExtCall(cat_cmd(cmdlist, stdin)) else: # no subprocess module present try: output = commands.getoutput(cmd) except: raise m8rex.FailedExtCall(cmd) if output == None: if raiseIfNoneOut: raise m8rex.NoReturnFromExtProgram(prog) else: output = output.rstrip('\n') return output | a8b4488653e135b2b709193eb4a27e5e1d909557 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3143/a8b4488653e135b2b709193eb4a27e5e1d909557/ivlad.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
659,
12,
14654,
16,
1501,
33,
7036,
16,
8801,
33,
7036,
16,
6405,
33,
8381,
16,
1002,
2047,
7036,
1182,
33,
8381,
4672,
9163,
15201,
364,
4364,
18,
588,
2844,
18,
13599,
30,
300,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
659,
12,
14654,
16,
1501,
33,
7036,
16,
8801,
33,
7036,
16,
6405,
33,
8381,
16,
1002,
2047,
7036,
1182,
33,
8381,
4672,
9163,
15201,
364,
4364,
18,
588,
2844,
18,
13599,
30,
300,
... |
pattern = re.compile(os.sep + pattern + "$") | pattern = re.compile(pattern) | def mark_matching_resources(self, pattern, fn, n): "Mark all definitions matching a specified pattern with a reference." pattern = pattern.replace("+", r"\+") try: pattern = re.compile(os.sep + pattern + "$") except sre_constants.error: print >>sys.stderr, "wmlscope: confused by %s" % pattern return None key = None for trial in self.fileref: if pattern.search(trial) and self.visible_from(trial, fn, n): key = trial self.fileref[key].append(fn, n) return key | 95517b8fe31be0caa427dedb2cf659a112815934 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9355/95517b8fe31be0caa427dedb2cf659a112815934/wmltools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2267,
67,
16271,
67,
4683,
12,
2890,
16,
1936,
16,
2295,
16,
290,
4672,
315,
3882,
777,
6377,
3607,
279,
1269,
1936,
598,
279,
2114,
1199,
1936,
273,
1936,
18,
2079,
2932,
15,
3113,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2267,
67,
16271,
67,
4683,
12,
2890,
16,
1936,
16,
2295,
16,
290,
4672,
315,
3882,
777,
6377,
3607,
279,
1269,
1936,
598,
279,
2114,
1199,
1936,
273,
1936,
18,
2079,
2932,
15,
3113,
43... |
for axis,z,subplot in mgr.subplots: subplot.draw_artist(axis) fig.canvas.blit(subplot.bbox) | plt.draw() | def iterate(t=100): mgr = plt.get_current_fig_manager() for i in range(t): rotate() run(t=.5,dt=.5) update() for axis,z,subplot in mgr.subplots: subplot.draw_artist(axis) fig.canvas.blit(subplot.bbox) | dfd287767284194c917219d69e6cd763483b3b46 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12213/dfd287767284194c917219d69e6cd763483b3b46/covert-attention.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7401,
12,
88,
33,
6625,
4672,
13333,
273,
5451,
18,
588,
67,
2972,
67,
470,
67,
4181,
1435,
364,
277,
316,
1048,
12,
88,
4672,
8534,
1435,
1086,
12,
88,
33,
18,
25,
16,
7510,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7401,
12,
88,
33,
6625,
4672,
13333,
273,
5451,
18,
588,
67,
2972,
67,
470,
67,
4181,
1435,
364,
277,
316,
1048,
12,
88,
4672,
8534,
1435,
1086,
12,
88,
33,
18,
25,
16,
7510,
33,
1... |
""" used to request a switchboard server to use for conversations. @return: A Deferred, the callback for which will be called when the server responds with the switchboard information. The callback argument will be a tuple with 3 elements: the host of the switchboard server, the port and a key used for logging in. | """ Used to request a switchboard server to use for conversations. @return: A Deferred, the callback for which will be called when the server responds with the switchboard information. The callback argument will be a tuple with 3 elements: the host of the switchboard server, the port and a key used for logging in. | def requestSwitchboardServer(self): """ used to request a switchboard server to use for conversations. | 9b2b7163e441396d9e5e7f46775cd7809b4655be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b2b7163e441396d9e5e7f46775cd7809b4655be/msn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
10200,
3752,
2081,
12,
2890,
4672,
3536,
1399,
358,
590,
279,
1620,
3752,
1438,
358,
999,
364,
356,
20494,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
10200,
3752,
2081,
12,
2890,
4672,
3536,
1399,
358,
590,
279,
1620,
3752,
1438,
358,
999,
364,
356,
20494,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
line = "* %s %s" % (msg.user, text[4:]) | line = "* %s %s" % (user, text[4:]) | def SayChatRoom(self, msg, text): login = self.frame.np.config.sections["server"]["login"] if msg.user == login: tag = self.tag_local elif text.upper().find(login.upper()) > -1: tag = self.tag_hilite | fd20397adf4210e784d561ad8a1e5f6f52f0ee77 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8738/fd20397adf4210e784d561ad8a1e5f6f52f0ee77/chatrooms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
348,
528,
14163,
13646,
12,
2890,
16,
1234,
16,
977,
4672,
3925,
273,
365,
18,
3789,
18,
6782,
18,
1425,
18,
11657,
9614,
3567,
6,
6362,
6,
5819,
11929,
309,
1234,
18,
1355,
422,
3925,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
348,
528,
14163,
13646,
12,
2890,
16,
1234,
16,
977,
4672,
3925,
273,
365,
18,
3789,
18,
6782,
18,
1425,
18,
11657,
9614,
3567,
6,
6362,
6,
5819,
11929,
309,
1234,
18,
1355,
422,
3925,... |
self._disk_mounted('/Volumes/%s' % volume) | self._disk_mounted(volume) | def start_tracking(self): self.stream = FSEventStreamCreate(kCFAllocatorDefault, self.streamCallback, None, ['/Volumes/'], kFSEventStreamEventIdSinceNow, STREAM_INTERVAL, kFSEventStreamCreateFlagNoDefer | kFSEventStreamCreateFlagIgnoreSelf) FSEventStreamScheduleWithRunLoop(self.stream, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode) assert FSEventStreamStart(self.stream) | 85078857728527b1a2741978ecdd71f1be23fd6b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/85078857728527b1a2741978ecdd71f1be23fd6b/devicetracker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
67,
6440,
12,
2890,
4672,
365,
18,
3256,
273,
478,
1090,
616,
1228,
1684,
12,
79,
8955,
21156,
1868,
16,
365,
18,
3256,
2428,
16,
599,
16,
10228,
19,
14903,
2473,
6487,
417,
42,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6440,
12,
2890,
4672,
365,
18,
3256,
273,
478,
1090,
616,
1228,
1684,
12,
79,
8955,
21156,
1868,
16,
365,
18,
3256,
2428,
16,
599,
16,
10228,
19,
14903,
2473,
6487,
417,
42,
... |
gLogger.info( "Found control file %s for agent" % ( stopAgentFile, agentName ) ) | gLogger.info( "Found control file %s for agent %s" % ( stopAgentFile, agentName ) ) | def __checkControlDir( self ): for agentName in self.__agentModules: if not self.__agentModules[ agentName ][ 'running' ]: continue agent = self.__agentModules[ agentName ][ 'instance' ] stopAgentFile = os.path.join( agent.am_getOption( 'ControlDirectory' ), 'stop_agent' ) | 4671a90a590da0b4d07c731c31d1d722a4513f78 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/4671a90a590da0b4d07c731c31d1d722a4513f78/AgentReactor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1893,
3367,
1621,
12,
365,
262,
30,
364,
4040,
461,
316,
365,
16186,
5629,
7782,
30,
309,
486,
365,
16186,
5629,
7782,
63,
4040,
461,
308,
63,
296,
8704,
11,
308,
30,
1324,
4040,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1893,
3367,
1621,
12,
365,
262,
30,
364,
4040,
461,
316,
365,
16186,
5629,
7782,
30,
309,
486,
365,
16186,
5629,
7782,
63,
4040,
461,
308,
63,
296,
8704,
11,
308,
30,
1324,
4040,... |
self.cmapname = cmapname | def __init__(self, tree, token, match): PostProcessor.__init__(self, tree, token, match) try: # Recupero el programa, por defecto "dot". self.program = self.program.lower() except AttributeError: self.program = 'dot' try: # Recupero la lista de formatos, por defecto ("png",) self.formats = set(x.strip() for x in self.formats.lower().split()) except AttributeError: self.formats = set("png",) # # Dividimos la expresion en expresion propiamente dicha, y posible # destino para el cmapx # expr = self.expr.split("->") self.backup_expr = expr.pop(0).strip() self.expr = compile(self.backup_expr, '<string>', 'eval') cmapname = expr[0].strip() if expr else "" if cmapname.isalnum(): self.cmapname = cmapname self.formats.add("cmapx") | 499b47de140dab7f0118dd7c7f94e100bbec7e63 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3871/499b47de140dab7f0118dd7c7f94e100bbec7e63/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2151,
16,
1147,
16,
845,
4672,
5616,
5164,
16186,
2738,
972,
12,
2890,
16,
2151,
16,
1147,
16,
845,
13,
775,
30,
468,
7776,
416,
2439,
415,
5402,
69,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2151,
16,
1147,
16,
845,
4672,
5616,
5164,
16186,
2738,
972,
12,
2890,
16,
2151,
16,
1147,
16,
845,
13,
775,
30,
468,
7776,
416,
2439,
415,
5402,
69,
1... | |
("HAVE_PYTHON", '1', '1'), ("PYTHON_FRAMEWORK", 'UNDEF', 'UNDEF'), ("COMPILE_IN_DEFAULT_FONT", '1', '1'), ("HAVE_MAYA", '1', '1'), ("MAYA_PRE_5_0", 'UNDEF', 'UNDEF'), ("HAVE_SOFTIMAGE", 'UNDEF', 'UNDEF'), ("SSL_097", 'UNDEF', 'UNDEF'), ("REPORT_OPENSSL_ERRORS", '1', '1'), ("HAVE_GL", '1', '1'), ("HAVE_MESA", 'UNDEF', 'UNDEF'), ("MESA_MGL", 'UNDEF', 'UNDEF'), ("HAVE_SGIGL", 'UNDEF', 'UNDEF'), ("HAVE_GLX", 'UNDEF', '1'), ("HAVE_WGL", '1', 'UNDEF'), ("HAVE_DX", '1', 'UNDEF'), ("HAVE_CHROMIUM", 'UNDEF', 'UNDEF'), ("HAVE_THREADS", 'UNDEF', 'UNDEF'), ("HAVE_AUDIO", '1', '1'), ("NOTIFY_DEBUG", 'UNDEF', 'UNDEF'), ("DO_PSTATS", 'UNDEF', 'UNDEF'), ("DO_COLLISION_RECORDING", 'UNDEF', 'UNDEF'), ("TRACK_IN_INTERPRETER", 'UNDEF', 'UNDEF'), ("DO_MEMORY_USAGE", 'UNDEF', 'UNDEF'), ("DO_PIPELINING", 'UNDEF', 'UNDEF'), ("EXPORT_TEMPLATES", 'yes', 'yes'), ("LINK_IN_GL", 'UNDEF', 'UNDEF'), ("LINK_IN_PHYSICS", 'UNDEF', 'UNDEF'), ("DEFAULT_PATHSEP", '";"', '":"'), ("DEFAULT_PRC_DIR", '"<auto>"', '"<auto>"'), ("PRC_DIR_ENVVARS", '"PANDA_PRC_DIR"', '"PANDA_PRC_DIR"'), ("PRC_PATH_ENVVARS", '"PANDA_PRC_PATH"', '"PANDA_PRC_PATH"'), ("PRC_PATTERNS", '"*.prc"', '"*.prc"'), ("PRC_EXECUTABLE_PATTERNS", '""', '""'), ("PRC_EXECUTABLE_ARGS_ENVVAR", '"PANDA_PRC_XARGS"', '"PANDA_PRC_XARGS"'), ("PRC_PUBLIC_KEYS_FILENAME", '""', '""'), ("PRC_RESPECT_TRUST_LEVEL", 'UNDEF', 'UNDEF'), ("PRC_SAVE_DESCRIPTIONS", '1', '1'), ("WORDS_BIGENDIAN", 'UNDEF', 'UNDEF'), ("HAVE_NAMESPACE", '1', '1'), ("HAVE_OPEN_MASK", 'UNDEF', 'UNDEF'), ("HAVE_WCHAR_T", '1', '1'), ("HAVE_WSTRING", '1', '1'), ("HAVE_TYPENAME", '1', '1'), ("SIMPLE_STRUCT_POINTERS", '1', 'UNDEF'), ("HAVE_DINKUM", 'UNDEF', 'UNDEF'), ("HAVE_STL_HASH", 'UNDEF', 'UNDEF'), ("HAVE_GETTIMEOFDAY", 'UNDEF', '1'), ("GETTIMEOFDAY_ONE_PARAM", 'UNDEF', 'UNDEF'), ("HAVE_GETOPT", 'UNDEF', '1'), ("HAVE_GETOPT_LONG_ONLY", 'UNDEF', '1'), ("HAVE_GETOPT_H", 'UNDEF', '1'), ("IOCTL_TERMINAL_WIDTH", 'UNDEF', '1'), ("HAVE_STREAMSIZE", '1', '1'), ("HAVE_IOS_TYPEDEFS", '1', '1'), ("HAVE_IOS_BINARY", '1', '1'), ("STATIC_INIT_GETENV", '1', 'UNDEF'), ("HAVE_PROC_SELF_EXE", 'UNDEF', '1'), ("HAVE_PROC_SELF_MAPS", 'UNDEF', '1'), ("HAVE_PROC_SELF_ENVIRON", 'UNDEF', '1'), ("HAVE_PROC_SELF_CMDLINE", 'UNDEF', '1'), ("HAVE_GLOBAL_ARGV", '1', 'UNDEF'), ("PROTOTYPE_GLOBAL_ARGV", 'UNDEF', 'UNDEF'), ("GLOBAL_ARGV", '__argv', 'UNDEF'), ("GLOBAL_ARGC", '__argc', 'UNDEF'), ("HAVE_IO_H", '1', 'UNDEF'), ("HAVE_IOSTREAM", '1', '1'), ("HAVE_MALLOC_H", '1', '1'), ("HAVE_SYS_MALLOC_H", 'UNDEF', 'UNDEF'), ("HAVE_ALLOCA_H", 'UNDEF', '1'), ("HAVE_LOCALE_H", 'UNDEF', '1'), ("HAVE_MINMAX_H", '1', 'UNDEF'), ("HAVE_SSTREAM", '1', '1'), ("HAVE_NEW", '1', '1'), ("HAVE_SYS_TYPES_H", '1', '1'), ("HAVE_SYS_TIME_H", 'UNDEF', '1'), ("HAVE_UNISTD_H", 'UNDEF', '1'), ("HAVE_UTIME_H", 'UNDEF', '1'), ("HAVE_GLOB_H", 'UNDEF', '1'), ("HAVE_DIRENT_H", 'UNDEF', '1'), ("HAVE_SYS_SOUNDCARD_H", 'UNDEF', '1'), ("HAVE_RTTI", '1', '1'), ("GLOBAL_OPERATOR_NEW_EXCEPTIONS", 'UNDEF', '1'), ("OLD_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'), ("GNU_STYLE_ALLOCATOR", 'UNDEF', '1'), ("VC6_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'), ("MODERN_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'), ("NO_STYLE_ALLOCATOR", '1', 'UNDEF'), ("HAVE_ZLIB", 'UNDEF', 'UNDEF'), ("HAVE_PNG", 'UNDEF', 'UNDEF'), ("HAVE_JPEG", 'UNDEF', 'UNDEF'), ("HAVE_TIFF", 'UNDEF', 'UNDEF'), ("HAVE_VRPN", 'UNDEF', 'UNDEF'), ("HAVE_FMOD", 'UNDEF', 'UNDEF'), ("HAVE_NVIDIACG", 'UNDEF', 'UNDEF'), ("HAVE_NSPR", 'UNDEF', 'UNDEF'), ("HAVE_FREETYPE", 'UNDEF', 'UNDEF'), ("HAVE_FFTW", 'UNDEF', 'UNDEF'), ("HAVE_MILES", 'UNDEF', 'UNDEF'), ("HAVE_SSL", 'UNDEF', 'UNDEF'), ("HAVE_NET", 'UNDEF', 'UNDEF'), ] | ("HAVE_PYTHON", '1', '1'), ("PYTHON_FRAMEWORK", 'UNDEF', 'UNDEF'), ("COMPILE_IN_DEFAULT_FONT", '1', '1'), ("HAVE_MAYA", '1', '1'), ("MAYA_PRE_5_0", 'UNDEF', 'UNDEF'), ("HAVE_SOFTIMAGE", 'UNDEF', 'UNDEF'), ("SSL_097", 'UNDEF', 'UNDEF'), ("REPORT_OPENSSL_ERRORS", '1', '1'), ("HAVE_GL", '1', '1'), ("HAVE_MESA", 'UNDEF', 'UNDEF'), ("MESA_MGL", 'UNDEF', 'UNDEF'), ("HAVE_SGIGL", 'UNDEF', 'UNDEF'), ("HAVE_GLX", 'UNDEF', '1'), ("HAVE_WGL", '1', 'UNDEF'), ("HAVE_DX", '1', 'UNDEF'), ("HAVE_CHROMIUM", 'UNDEF', 'UNDEF'), ("HAVE_THREADS", 'UNDEF', 'UNDEF'), ("HAVE_AUDIO", '1', '1'), ("NOTIFY_DEBUG", 'UNDEF', 'UNDEF'), ("DO_PSTATS", 'UNDEF', 'UNDEF'), ("DO_COLLISION_RECORDING", 'UNDEF', 'UNDEF'), ("TRACK_IN_INTERPRETER", 'UNDEF', 'UNDEF'), ("DO_MEMORY_USAGE", 'UNDEF', 'UNDEF'), ("DO_PIPELINING", 'UNDEF', 'UNDEF'), ("EXPORT_TEMPLATES", 'yes', 'yes'), ("LINK_IN_GL", 'UNDEF', 'UNDEF'), ("LINK_IN_PHYSICS", 'UNDEF', 'UNDEF'), ("DEFAULT_PATHSEP", '";"', '":"'), ("DEFAULT_PRC_DIR", '"<auto>"', '"<auto>"'), ("PRC_DIR_ENVVARS", '"PANDA_PRC_DIR"', '"PANDA_PRC_DIR"'), ("PRC_PATH_ENVVARS", '"PANDA_PRC_PATH"', '"PANDA_PRC_PATH"'), ("PRC_PATTERNS", '"*.prc"', '"*.prc"'), ("PRC_EXECUTABLE_PATTERNS", '""', '""'), ("PRC_EXECUTABLE_ARGS_ENVVAR", '"PANDA_PRC_XARGS"', '"PANDA_PRC_XARGS"'), ("PRC_PUBLIC_KEYS_FILENAME", '""', '""'), ("PRC_RESPECT_TRUST_LEVEL", 'UNDEF', 'UNDEF'), ("PRC_SAVE_DESCRIPTIONS", '1', '1'), ("WORDS_BIGENDIAN", 'UNDEF', 'UNDEF'), ("HAVE_NAMESPACE", '1', '1'), ("HAVE_OPEN_MASK", 'UNDEF', 'UNDEF'), ("HAVE_WCHAR_T", '1', '1'), ("HAVE_WSTRING", '1', '1'), ("HAVE_TYPENAME", '1', '1'), ("SIMPLE_STRUCT_POINTERS", '1', 'UNDEF'), ("HAVE_DINKUM", 'UNDEF', 'UNDEF'), ("HAVE_STL_HASH", 'UNDEF', 'UNDEF'), ("HAVE_GETTIMEOFDAY", 'UNDEF', '1'), ("GETTIMEOFDAY_ONE_PARAM", 'UNDEF', 'UNDEF'), ("HAVE_GETOPT", 'UNDEF', '1'), ("HAVE_GETOPT_LONG_ONLY", 'UNDEF', '1'), ("HAVE_GETOPT_H", 'UNDEF', '1'), ("IOCTL_TERMINAL_WIDTH", 'UNDEF', '1'), ("HAVE_STREAMSIZE", '1', '1'), ("HAVE_IOS_TYPEDEFS", '1', '1'), ("HAVE_IOS_BINARY", '1', '1'), ("STATIC_INIT_GETENV", '1', 'UNDEF'), ("HAVE_PROC_SELF_EXE", 'UNDEF', '1'), ("HAVE_PROC_SELF_MAPS", 'UNDEF', '1'), ("HAVE_PROC_SELF_ENVIRON", 'UNDEF', '1'), ("HAVE_PROC_SELF_CMDLINE", 'UNDEF', '1'), ("HAVE_GLOBAL_ARGV", '1', 'UNDEF'), ("PROTOTYPE_GLOBAL_ARGV", 'UNDEF', 'UNDEF'), ("GLOBAL_ARGV", '__argv', 'UNDEF'), ("GLOBAL_ARGC", '__argc', 'UNDEF'), ("HAVE_IO_H", '1', 'UNDEF'), ("HAVE_IOSTREAM", '1', '1'), ("HAVE_MALLOC_H", '1', '1'), ("HAVE_SYS_MALLOC_H", 'UNDEF', 'UNDEF'), ("HAVE_ALLOCA_H", 'UNDEF', '1'), ("HAVE_LOCALE_H", 'UNDEF', '1'), ("HAVE_MINMAX_H", '1', 'UNDEF'), ("HAVE_SSTREAM", '1', '1'), ("HAVE_NEW", '1', '1'), ("HAVE_SYS_TYPES_H", '1', '1'), ("HAVE_SYS_TIME_H", 'UNDEF', '1'), ("HAVE_UNISTD_H", 'UNDEF', '1'), ("HAVE_UTIME_H", 'UNDEF', '1'), ("HAVE_GLOB_H", 'UNDEF', '1'), ("HAVE_DIRENT_H", 'UNDEF', '1'), ("HAVE_SYS_SOUNDCARD_H", 'UNDEF', '1'), ("HAVE_RTTI", '1', '1'), ("GLOBAL_OPERATOR_NEW_EXCEPTIONS", 'UNDEF', '1'), ("OLD_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'), ("GNU_STYLE_ALLOCATOR", 'UNDEF', '1'), ("VC6_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'), ("MODERN_STYLE_ALLOCATOR", 'UNDEF', 'UNDEF'), ("NO_STYLE_ALLOCATOR", '1', 'UNDEF'), ("HAVE_ZLIB", 'UNDEF', 'UNDEF'), ("HAVE_PNG", 'UNDEF', 'UNDEF'), ("HAVE_JPEG", 'UNDEF', 'UNDEF'), ("HAVE_TIFF", 'UNDEF', 'UNDEF'), ("HAVE_VRPN", 'UNDEF', 'UNDEF'), ("HAVE_FMOD", 'UNDEF', 'UNDEF'), ("HAVE_NVIDIACG", 'UNDEF', 'UNDEF'), ("HAVE_NSPR", 'UNDEF', 'UNDEF'), ("HAVE_FREETYPE", 'UNDEF', 'UNDEF'), ("HAVE_FFTW", 'UNDEF', 'UNDEF'), ("HAVE_MILES", 'UNDEF', 'UNDEF'), ("HAVE_SSL", 'UNDEF', 'UNDEF'), ("HAVE_NET", 'UNDEF', 'UNDEF'), ] | def WriteFile(wfile,data): try: dsthandle = open(wfile, "wb") dsthandle.write(data) dsthandle.close() except: sys.exit("Cannot write "+wfile) | aa9700942409f59dfc63d4542d0bad0a01230726 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/aa9700942409f59dfc63d4542d0bad0a01230726/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24155,
12,
91,
768,
16,
892,
4672,
775,
30,
3046,
4110,
273,
1696,
12,
91,
768,
16,
315,
9464,
7923,
3046,
4110,
18,
2626,
12,
892,
13,
3046,
4110,
18,
4412,
1435,
1335,
30,
2589,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24155,
12,
91,
768,
16,
892,
4672,
775,
30,
3046,
4110,
273,
1696,
12,
91,
768,
16,
315,
9464,
7923,
3046,
4110,
18,
2626,
12,
892,
13,
3046,
4110,
18,
4412,
1435,
1335,
30,
2589,
18... |
try: (revision, revision_time) = build.revision_details() except data.MissingRevisionInfo: revision = None | def _render_build_html(self, myself, build): try: (revision, revision_time) = build.revision_details() except data.MissingRevisionInfo: revision = None warnings = build.err_count() yield "<tr>" yield "<td><span class='tree'>" + self.tree_link(myself, build.tree) +"</span>/" + build.compiler + "</td>" yield "<td>" + revision_link(myself, revision, build.tree) + "</td>" yield "<td><div class='age'>" + self.red_age(build.age) + "</div></td>" yield "<td><div class='status'>%s</div></td>" % build_status_html(myself, build) yield "<td>%s</td>" % warnings yield "</tr>" | 57e649ec91a94a0daf46b878bbdd2da454d45163 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7314/57e649ec91a94a0daf46b878bbdd2da454d45163/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5902,
67,
3510,
67,
2620,
12,
2890,
16,
3399,
2890,
16,
1361,
4672,
5599,
273,
1361,
18,
370,
67,
1883,
1435,
2824,
3532,
313,
2984,
2824,
3532,
4465,
4438,
3969,
667,
2218,
3413,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5902,
67,
3510,
67,
2620,
12,
2890,
16,
3399,
2890,
16,
1361,
4672,
5599,
273,
1361,
18,
370,
67,
1883,
1435,
2824,
3532,
313,
2984,
2824,
3532,
4465,
4438,
3969,
667,
2218,
3413,
... | |
Primitive class for the Arc graphics type. See arc? for information | Primitive class for the Arc graphics type. See ``arc?`` for information | def is_cyclic_ordered(x1,x2,x3): return ( (x1 < x2 and x2 < x3) or (x2 < x3 and x3 < x1) or (x3 < x1 and x1 < x2)) | bed58b99f8c23018e8265e5b477cdddbd2364e39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/bed58b99f8c23018e8265e5b477cdddbd2364e39/arc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2431,
18964,
67,
9885,
12,
92,
21,
16,
92,
22,
16,
92,
23,
4672,
327,
261,
261,
92,
21,
411,
619,
22,
471,
619,
22,
411,
619,
23,
13,
578,
261,
92,
22,
411,
619,
23,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2431,
18964,
67,
9885,
12,
92,
21,
16,
92,
22,
16,
92,
23,
4672,
327,
261,
261,
92,
21,
411,
619,
22,
471,
619,
22,
411,
619,
23,
13,
578,
261,
92,
22,
411,
619,
23,
4... |
glColor3f(s_atom0.molecule.color[0], s_atom0.molecule.color[1], s_atom0.molecule.color[2]) | glColor3f(color0[0], color0[1], color0[2]) | def get_screen_position_of_strand_atom(strand_atom): """ For a given strand atom, find its on-screen position. """ axis_atom = strand_atom.axis_neighbor() if axis_atom: mol = axis_atom.molecule axis_atoms = mol.ladder.axis_rail.baseatoms n_bases = len(axis_atoms) pos = axis_atoms.index(axis_atom) atom0 = axis_atom if pos<n_bases-1: atom1 = axis_atoms[pos+1] dpos = atom1.posn()-atom0.posn() else: atom1 = axis_atoms[pos-1] atom2 = axis_atoms[pos] dpos = atom2.posn()-atom1.posn() last_dpos = dpos dvec = norm(cross(dpos,glpane.out)) pos0 = axis_atom.posn()#-mol.center pos1 = pos0+7.0*dvec pos2 = pos0-7.0*dvec if mol.ladder.strand_rails[0].baseatoms[pos]==strand_atom: return pos1 elif mol.ladder.strand_rails[1].baseatoms[pos]==strand_atom: return pos2 | cbc143d808cf827d03bc69ee526e2fca8459d46d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/cbc143d808cf827d03bc69ee526e2fca8459d46d/DnaCylinderChunks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9252,
67,
3276,
67,
792,
67,
701,
464,
67,
7466,
12,
701,
464,
67,
7466,
4672,
3536,
2457,
279,
864,
16706,
3179,
16,
1104,
2097,
603,
17,
9252,
1754,
18,
3536,
2654,
67,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9252,
67,
3276,
67,
792,
67,
701,
464,
67,
7466,
12,
701,
464,
67,
7466,
4672,
3536,
2457,
279,
864,
16706,
3179,
16,
1104,
2097,
603,
17,
9252,
1754,
18,
3536,
2654,
67,
74... |
fileName = os.path.join( dirToSyncTo, ".dab.%s" % bundleID ) | fileName = os.path.join( dirToSyncTo, ".dab.%s" % bundleID ) | def __setHash( self, bundleID, dirToSyncTo, hash ): try: fileName = os.path.join( dirToSyncTo, ".dab.%s" % bundleID ) fd = open( fileName, "wb" ) fd.write( hash ) fd.close() except Exception, e: self.log.error( "Could not save hash after synchronization", "%s: %s" % ( fileName, str(e) ) ) | 3827d25d1403dbdef3adeebd2feb01bcabc15b21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/3827d25d1403dbdef3adeebd2feb01bcabc15b21/BundleDeliveryClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
2310,
12,
365,
16,
3440,
734,
16,
1577,
774,
4047,
774,
16,
1651,
262,
30,
775,
30,
3968,
273,
1140,
18,
803,
18,
5701,
12,
1577,
774,
4047,
774,
16,
3552,
72,
378,
7866,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
542,
2310,
12,
365,
16,
3440,
734,
16,
1577,
774,
4047,
774,
16,
1651,
262,
30,
775,
30,
3968,
273,
1140,
18,
803,
18,
5701,
12,
1577,
774,
4047,
774,
16,
3552,
72,
378,
7866,
... |
def seek(self, pos, mode = 0): | def seek(self, pos, whence = 0): | def seek(self, pos, mode = 0): """Seek to specified position into the chunk. Default position is 0 (start of chunk). If the file is not seekable, this will result in an error. | 4189f986fb2e64e2e0dddd0a9c4435c7892c94b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/4189f986fb2e64e2e0dddd0a9c4435c7892c94b6/chunk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6520,
12,
2890,
16,
949,
16,
23692,
273,
374,
4672,
3536,
16134,
358,
1269,
1754,
1368,
326,
2441,
18,
2989,
1754,
353,
374,
261,
1937,
434,
2441,
2934,
971,
326,
585,
353,
486,
6520,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6520,
12,
2890,
16,
949,
16,
23692,
273,
374,
4672,
3536,
16134,
358,
1269,
1754,
1368,
326,
2441,
18,
2989,
1754,
353,
374,
261,
1937,
434,
2441,
2934,
971,
326,
585,
353,
486,
6520,
... |
....... | ------- | def filter_image_3D(imageRaw, fwhm, ftype=2): """ image_F_xyz = filter_image_3D(imageRaw, fwhm, ftype=2): does 3D separable digital filtering using scipy.ndimage.correlate1d Parameters .......... imageRaw : {nd_array} the unfiltered 3D volume image fwhm : {int} used for kernel width ktype: {1, 2}, optional kernel type. 1 is Gauss convoled with spline, 2 is Gauss Returns ....... image_F_xyz : {nd_array} 3D filtered volume image Examples ........ >>> import _registration as reg >>> image1, image2, imdata = reg.demo_MRI_volume_align() >>> ftype = 1 >>> image_Filter_xyz = filter_image_3D(image1['data'], image1['fwhm'], ftype) >>> image1['data'] = image_Filter_xyz """ p = N.ceil(2*fwhm[0]).astype(int) x = N.array(range(-p, p+1)) kernel_x = smooth_kernel(fwhm[0], x, ktype=ftype) p = N.ceil(2*fwhm[1]).astype(int) x = N.array(range(-p, p+1)) kernel_y = smooth_kernel(fwhm[1], x, ktype=ftype) p = N.ceil(2*fwhm[2]).astype(int) x = N.array(range(-p, p+1)) kernel_z = smooth_kernel(fwhm[2], x, ktype=ftype) output=None # 3D filter in 3 1D separable stages axis = 0 image_F_x = NDI.correlate1d(imageRaw, kernel_x, axis, output) axis = 1 image_F_xy = NDI.correlate1d(image_F_x, kernel_y, axis, output) axis = 2 image_F_xyz = NDI.correlate1d(image_F_xy, kernel_z, axis, output) return image_F_xyz | de681f926e982b0212f2f58bf637917926737f89 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/de681f926e982b0212f2f58bf637917926737f89/_registration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
67,
2730,
67,
23,
40,
12,
2730,
4809,
16,
284,
3350,
81,
16,
21219,
33,
22,
4672,
3536,
1316,
67,
42,
67,
17177,
273,
1034,
67,
2730,
67,
23,
40,
12,
2730,
4809,
16,
284,
335... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
67,
2730,
67,
23,
40,
12,
2730,
4809,
16,
284,
3350,
81,
16,
21219,
33,
22,
4672,
3536,
1316,
67,
42,
67,
17177,
273,
1034,
67,
2730,
67,
23,
40,
12,
2730,
4809,
16,
284,
335... |
response = simplejson.dumps(json) | response = jsonify(json) | def get_view_units(request, units_queryset, limit=0): """ @return: An object in JSON notation that contains the source and target texts for units that will be displayed before and after editing unit. If asked by using the 'meta' and 'pager' parameters, metadata and pager information will be calculated and returned too. """ current_unit = None json = {} if not limit: limit = request.profile.get_unit_rows() step_queryset = get_step_query(request, units_queryset) # Return metadata it has been explicitely requested if request.GET.get('meta', False): tp = request.translation_project json["meta"] = {"source_lang": tp.project.source_language.code, "source_dir": tp.project.source_language.get_direction(), "target_lang": tp.language.code, "target_dir": tp.language.get_direction()} # Maybe we are trying to load directly a specific unit, so we have # to calculate its page number uid = request.GET.get('uid', None) if uid: current_unit = step_queryset.get(id=uid) preceding = _get_index_in_qs(step_queryset, current_unit) page = preceding / limit + 1 else: # Try to get a given page number, otherwise assume it's the first one page = int(request.GET.get('page', 1)) pager = paginate(request, step_queryset, items=limit, page=page) # Return paging information if requested to do so if request.GET.get('pager', False): json["pager"] = _build_pager_dict(pager) if not current_unit: current_unit = pager.object_list[0] json["uid"] = current_unit.id json["units"] = _build_units_list(pager.object_list) response = simplejson.dumps(json) return HttpResponse(response, mimetype="application/json") | af8870802a0b16f33536558129447cc14b242231 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11388/af8870802a0b16f33536558129447cc14b242231/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1945,
67,
7705,
12,
2293,
16,
4971,
67,
21729,
16,
1800,
33,
20,
4672,
3536,
632,
2463,
30,
1922,
733,
316,
1796,
12155,
716,
1914,
326,
1084,
471,
1018,
15219,
364,
4971,
716... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1945,
67,
7705,
12,
2293,
16,
4971,
67,
21729,
16,
1800,
33,
20,
4672,
3536,
632,
2463,
30,
1922,
733,
316,
1796,
12155,
716,
1914,
326,
1084,
471,
1018,
15219,
364,
4971,
716... |
EXAMPLES: | EXAMPLES:: | def content(self, k): """ Returns the content of ``k`` in a standard tableau. That is, if ``k`` appears in row `r` and column `c` of the tableau then we return `c-r`. | 39332a822384e80d5a41f4b173f63bd5dabedc71 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/39332a822384e80d5a41f4b173f63bd5dabedc71/tableau.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
913,
12,
2890,
16,
417,
4672,
3536,
2860,
326,
913,
434,
12176,
79,
10335,
316,
279,
4529,
1014,
8377,
18,
12466,
353,
16,
309,
12176,
79,
10335,
14606,
316,
1027,
1375,
86,
68,
471,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
913,
12,
2890,
16,
417,
4672,
3536,
2860,
326,
913,
434,
12176,
79,
10335,
316,
279,
4529,
1014,
8377,
18,
12466,
353,
16,
309,
12176,
79,
10335,
14606,
316,
1027,
1375,
86,
68,
471,
1... |
InstallRoot = os.environ.get("CM3_INSTALL") or os.path.dirname(os.path.dirname(SearchPath("cm3") or "")) | CM3 = getenv("CM3") or ExeName("cm3") Cm3FullPath = SearchPath(CM3) InstallRoot = os.environ.get("CM3_INSTALL") or os.path.dirname(os.path.dirname(Cm3FullPath)) | def SearchPath(name, paths = getenv("PATH")): #Given a search path, find file if (name.find("/") != -1) or (name.find("\\") != -1): if os.path.isfile(name): return name if paths == "": return None if os.name == "nt": # support for $PATHEXT might be nice if name.find(".") == -1: name += ".exe" for path in paths.split(os.path.pathsep): candidate = os.path.join(path, name) if os.path.isfile(candidate): return os.path.abspath(candidate) | bb4fd71f5ac0d1e0ae676ce51b321616d754e726 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9328/bb4fd71f5ac0d1e0ae676ce51b321616d754e726/pylib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5167,
743,
12,
529,
16,
2953,
273,
11740,
2932,
4211,
6,
3719,
30,
468,
6083,
279,
1623,
589,
16,
1104,
585,
309,
261,
529,
18,
4720,
2932,
4898,
13,
480,
300,
21,
13,
578,
261,
529,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5167,
743,
12,
529,
16,
2953,
273,
11740,
2932,
4211,
6,
3719,
30,
468,
6083,
279,
1623,
589,
16,
1104,
585,
309,
261,
529,
18,
4720,
2932,
4898,
13,
480,
300,
21,
13,
578,
261,
529,... |
commentLabel.set_line_wrap (TRUE) | commentLabel.set_line_wrap (True) | def __init__ (self, title, callback, name, data): gtk.Dialog.__init__ (self, title, mainWindow, gtk.DIALOG_DESTROY_WITH_PARENT|gtk.DIALOG_MODAL, (gtk.STOCK_OK, gtk.RESPONSE_OK, gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)) self.callback = callback self.data = data self.connect ("response", self.responseSignal) table = gtk.Table(2, 2) commentLabel = gtk.Label (_( "Enter the name of the application below. This serves just a " "descriptivion for you. Don't forget to set the executable " "afterwards.")) commentLabel.set_line_wrap (TRUE) commentLabel.show() table.attach (commentLabel, 0, 2, 0, 1, gtk.EXPAND|gtk.FILL, gtk.EXPAND, 10, 5) label = gtk.Label (_("Application Name")) label.show() table.attach (label, 0, 1, 1, 2, 0, gtk.EXPAND, 10, 5) self.entry = gtk.Entry() self.entry.set_text (name) self.entry.select_region (0, len(name)) self.entry.connect ("activate", self.activateSignal) self.entry.show() table.attach (self.entry, 1, 2, 1, 2, gtk.EXPAND|gtk.FILL, gtk.EXPAND, 10, 5) table.show() self.vbox.pack_start (table, TRUE, TRUE, 5) self.show() self.entry.grab_focus() | ab8126074d7036807d1d842171687cc01617a181 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/ab8126074d7036807d1d842171687cc01617a181/driconf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
2077,
16,
1348,
16,
508,
16,
501,
4672,
22718,
18,
6353,
16186,
2738,
972,
261,
2890,
16,
2077,
16,
2774,
3829,
16,
22718,
18,
2565,
18683,
67,
1639,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
261,
2890,
16,
2077,
16,
1348,
16,
508,
16,
501,
4672,
22718,
18,
6353,
16186,
2738,
972,
261,
2890,
16,
2077,
16,
2774,
3829,
16,
22718,
18,
2565,
18683,
67,
1639,
25... |
def vim_bufferchange(self, index, filename): | def vim_bufferchange(self, cwd, filename): | def vim_bufferchange(self, index, filename): #for fcall, args in self.__bufferevents: # fcall(*args) #self.__bufferevents = [] #self.manager.emit_event('file-opened', filename=filename) if os.path.abspath(filename) != filename: filename = os.path.join(self.__cw.get_cwd(self.__srv), filename) self.log.debug('vim buffer change "%s"', filename) if filename != self.__currentfile: self.__currentfile = filename self.boss.call_command('buffermanager', 'open_file', filename=filename) | 155882c80f5c4377b93de9ea8190a61f2a9eed93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/155882c80f5c4377b93de9ea8190a61f2a9eed93/vimedit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18727,
67,
4106,
3427,
12,
2890,
16,
7239,
16,
1544,
4672,
468,
1884,
284,
1991,
16,
833,
316,
365,
16186,
4106,
5989,
30,
468,
565,
284,
1991,
30857,
1968,
13,
468,
2890,
16186,
4106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18727,
67,
4106,
3427,
12,
2890,
16,
7239,
16,
1544,
4672,
468,
1884,
284,
1991,
16,
833,
316,
365,
16186,
4106,
5989,
30,
468,
565,
284,
1991,
30857,
1968,
13,
468,
2890,
16186,
4106,
... |
crota=xmp.get_property_float(ns, "Spatial.Rotation") | crota=float(xmp.get_property(ns, "Spatial.Rotation")) | def main(): # Program options management parser = OptionParser(usage="%prog imageFile [options]", version="0.1", description="This tool generates multi-resolution astronomical images from large image for display by Stellarium/VirGO. The passed image is split in small tiles and the corresponding index JSON files are generated. Everything is output in the current directory.", formatter=IndentedHelpFormatter(max_help_position=33, width=80)) parser.add_option("-f", "--fitsheader", dest="fitsHeader", help="use the FITS header from FILE to get WCS info", metavar="FILE") parser.add_option("-g", "--gzipcompress", dest="gzipCompress", action="store_true", default=False, help="compress the produced JSON index using gzip") parser.add_option("-t", "--tilesize", dest="tileSize", type="int", default=256, help="output image tiles size in pixel (default: %default)", metavar="SIZE") parser.add_option("-i", "--onlyindex", dest="makeImageTiles", action="store_false", default=True, help="output only the JSON index") parser.add_option("-l", "--maxLevPerIndex", dest="maxLevelPerIndex", default=3, type="int", help="put up to MAX levels per index file (default: %default)", metavar="MAX") parser.add_option("-b", "--maxBrightness", dest="maxBrightness", default=13., type="float", help="the surface brightness of a white pixel of the image in V mag/arcmin^2 (default: %default)", metavar="MAG") parser.add_option("-a", "--alphaBlend", dest="alphaBlend", action="store_true", default=False, help="activate alpha blending for this image") parser.add_option("--imgInfoShort", dest="imgInfoShort", type="string", help="the short name of the image", metavar="STR") parser.add_option("--imgInfoFull", dest="imgInfoFull", type="string", help="the full name of the image", metavar="STR") parser.add_option("--imgInfoUrl", dest="imgInfoUrl", type="string", help="the info URL about the image", metavar="STR") parser.add_option("--imgCreditsShort", dest="imgCreditsShort", type="string", help="the short name of the image creator", metavar="STR") parser.add_option("--imgCreditsFull", dest="imgCreditsFull", type="string", help="the full name of the image creator", metavar="STR") parser.add_option("--imgCreditsInfoUrl", dest="imgCreditsInfoUrl", type="string", help="the info URL about the image creator", metavar="STR") parser.add_option("--srvCreditsShort", dest="serverCreditsShort", type="string", help="the short name of the hosting server", metavar="STR") parser.add_option("--srvCreditsFull", dest="serverCreditsFull", type="string", help="the full name of the hosting server", metavar="STR") parser.add_option("--srvCreditsInfoUrl", dest="serverCreditsInfoUrl", type="string", help="the info URL about the hosting server", metavar="STR") (options, args) = parser.parse_args() # Need at least an image file as input if len(args) < 1: print "Usage: "+os.path.basename(sys.argv[0])+" imageFile [options]" exit(0) imgFile = sys.argv[1] # We now have valid arguments if options.fitsHeader!=None: # Try to read the provided FITS header file to extract the WCS wcs = astWCS.WCS(options.fitsHeader) else: # Else try to generate the WCS from the xmp informations contained in the file header import libxmp print "Try to import WCS info from the XMP headers in the image" libxmp.XMPFiles.initialize() xmpfile = libxmp.XMPFiles() xmpfile.open_file(imgFile, libxmp.consts.XMP_OPEN_READ) xmp = xmpfile.get_xmp() ns = 'http://www.communicatingastronomy.org/avm/1.0/' nxpix=int(xmp.get_array_item(ns, 'Spatial.ReferenceDimension', 1).keys()[0]) nypix=int(xmp.get_array_item(ns, 'Spatial.ReferenceDimension', 2).keys()[0]) ctype1='RA---TAN' ctype2='DEC--TAN' crpix1=float(xmp.get_array_item(ns, 'Spatial.ReferencePixel', 1).keys()[0]) crpix2=float(xmp.get_array_item(ns, 'Spatial.ReferencePixel', 2).keys()[0]) crval1=float(xmp.get_array_item(ns, 'Spatial.ReferenceValue', 1).keys()[0]) crval2=float(xmp.get_array_item(ns, 'Spatial.ReferenceValue', 2).keys()[0]) cdelt1=float(xmp.get_array_item(ns, 'Spatial.Scale', 1).keys()[0]) cdelt2=float(xmp.get_array_item(ns, 'Spatial.Scale', 2).keys()[0]) crota=xmp.get_property_float(ns, "Spatial.Rotation") equinox=xmp.get_property(ns, "Spatial.Equinox") if equinox=='J2000': equinox=2000 elif equinox=='B1950': equinox=1950 else: equinox=float(equinox) epoch=0. coordFrameCstr=xmp.get_property(ns, "Spatial.CoordinateFrame") header = astWCS.pyfits.Header() header.update('SIMPLE', 'T') header.update('BITPIX', 8) header.update('NAXIS', 2) header.update('NAXIS1', nxpix) header.update('NAXIS2', nypix) header.update('CDELT1', cdelt1) header.update('CDELT2', cdelt2) header.update('CTYPE1', 'RA---TAN') header.update('CTYPE2', 'DEC--TAN') header.update('CRVAL1', crval1) header.update('CRVAL2', crval2) header.update('CRPIX1', crpix1) header.update('CRPIX2', crpix2) header.update('CROTA', crota) header.update('EQUINOX', equinox) wcs = astWCS.WCS(header, mode='pyfits') im = Image.open(imgFile) nbTileX = (im.size[0]+options.tileSize)//options.tileSize nbTileY = (im.size[1]+options.tileSize)//options.tileSize nbLevels = int(math.log(max(nbTileX, nbTileY))/math.log(2)+1) print "Will tesselate image (",im.size[0],"x",im.size[1],") in", nbTileX,'x',nbTileY,'tiles on', nbLevels, 'levels' # Create the master level 0 tile, which recursively creates the subtiles masterTile = createTile(0, nbLevels, 0, 0, wcs, im, options.makeImageTiles, options.tileSize) # Add some top-level informations masterTile.maxBrightness = options.maxBrightness masterTile.alphaBlend = options.alphaBlend masterTile.imageInfo.short = options.imgInfoShort masterTile.imageInfo.full = options.imgInfoFull masterTile.imageInfo.infoUrl = options.imgInfoUrl masterTile.imageCredits.short = options.imgCreditsShort masterTile.imageCredits.full = options.imgCreditsFull masterTile.imageCredits.infoUrl = options.imgCreditsInfoUrl masterTile.serverCredits.short = options.serverCreditsShort masterTile.serverCredits.full = options.serverCreditsFull masterTile.serverCredits.infoUrl = options.serverCreditsInfoUrl # masterTile contains the whole tree, just need to output it as desired masterTile.outputJSON(qCompress=options.gzipCompress, maxLevelPerFile=options.maxLevelPerIndex) | 4e63493f987152d2aad8497d945a4fcb1b075869 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7604/4e63493f987152d2aad8497d945a4fcb1b075869/genSkyTiles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
13586,
702,
11803,
2082,
273,
18862,
12,
9167,
11613,
14654,
31146,
306,
2116,
65,
3113,
1177,
1546,
20,
18,
21,
3113,
2477,
1546,
2503,
5226,
6026,
3309,
17,
19182,
487,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
468,
13586,
702,
11803,
2082,
273,
18862,
12,
9167,
11613,
14654,
31146,
306,
2116,
65,
3113,
1177,
1546,
20,
18,
21,
3113,
2477,
1546,
2503,
5226,
6026,
3309,
17,
19182,
487,... |
element = self.instrument.effects[buttonpos] | element = self.instrument.effects[self.effectpos] | def OnEffectSetting(self, button): """Show specific effects settings""" """TODO: Make this modal or as part of the effects window""" | b79ea8085f8e369d9547435e95bc71cf7aca0f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/b79ea8085f8e369d9547435e95bc71cf7aca0f33/InstrumentEffectsDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
12477,
5568,
12,
2890,
16,
3568,
4672,
3536,
5706,
2923,
16605,
1947,
8395,
225,
3536,
6241,
30,
4344,
333,
13010,
578,
487,
1087,
434,
326,
16605,
2742,
8395,
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,
0,
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,
2755,
12477,
5568,
12,
2890,
16,
3568,
4672,
3536,
5706,
2923,
16605,
1947,
8395,
225,
3536,
6241,
30,
4344,
333,
13010,
578,
487,
1087,
434,
326,
16605,
2742,
8395,
2,
-100,
-100,
-100,
... |
MPQCESPTipText = "Enables/disables MPQC Electrostatics Potential Plane Plugin" | MPQCESPTipText = "Enables/disables MPQC Electrostatics "\ "Potential Plane Plugin" | def create_whats_this_descriptions_for_NanoHive_dialog(w): "Create What's This descriptions for the Nano-Hive dialog widgets." # MPQC Electrostatics Potential Plane MPQCESPText = "<u><b>MPQC Electrostatics Potential Plane</b></u><br>"\ "Enables the <i>MPQC Electrostatics Potential Plane</i> plugin. "\ "</p>" w.MPQC_ESP_checkbox.setWhatsThis(MPQCESPText ) MPQCESPTipText = "Enables/disables MPQC Electrostatics Potential Plane Plugin" w.MPQC_ESP_checkbox.setToolTip(MPQCESPTipText) | 596540c24ceb3b478e904a42e26d7d5dd8809d95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/596540c24ceb3b478e904a42e26d7d5dd8809d95/whatsthis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
3350,
2323,
67,
2211,
67,
30288,
67,
1884,
67,
16112,
44,
688,
67,
12730,
12,
91,
4672,
315,
1684,
18734,
1807,
1220,
15550,
364,
326,
23294,
83,
17,
44,
688,
6176,
10965,
119... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
3350,
2323,
67,
2211,
67,
30288,
67,
1884,
67,
16112,
44,
688,
67,
12730,
12,
91,
4672,
315,
1684,
18734,
1807,
1220,
15550,
364,
326,
23294,
83,
17,
44,
688,
6176,
10965,
119... |
def find_tag(self, **critereon): return self._find_criteron(self.tags, critereon) def find_category(self, **critereon): return self._find_criteron(self.categories, critereon) def find_author(self, **critereon): return self._find_criteron(self.authors, critereon) def find_post(self, **critereon): return self._find_criteron(self.posts, critereon) def _find_criteron(self, sequence, d): | def find_tag(self, **criterion): return self._find_criterion(self.tags, criterion) def find_category(self, **criterion): return self._find_criterion(self.categories, criterion) def find_author(self, **criterion): return self._find_criterion(self.authors, criterion) def find_post(self, **criterion): return self._find_criterion(self.posts, criterion) def _find_criterion(self, sequence, d): | def find_tag(self, **critereon): return self._find_criteron(self.tags, critereon) | 64d3f8622710919adc4bc1ad660a8b669a250d72 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12815/64d3f8622710919adc4bc1ad660a8b669a250d72/feed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
2692,
12,
2890,
16,
2826,
27826,
822,
265,
4672,
327,
365,
6315,
4720,
67,
71,
1091,
265,
12,
2890,
18,
4156,
16,
7921,
822,
265,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
2692,
12,
2890,
16,
2826,
27826,
822,
265,
4672,
327,
365,
6315,
4720,
67,
71,
1091,
265,
12,
2890,
18,
4156,
16,
7921,
822,
265,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return time.localtime(time.time() + EPOC) | return time.localtime() | def get_localtime(): """Returns the local time""" return time.localtime(time.time() + EPOC) | 1285b22de88708ce5991435d4f1c8ccde4079659 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4738/1285b22de88708ce5991435d4f1c8ccde4079659/notebook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3729,
957,
13332,
3536,
1356,
326,
1191,
813,
8395,
327,
813,
18,
3729,
957,
1435,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3729,
957,
13332,
3536,
1356,
326,
1191,
813,
8395,
327,
813,
18,
3729,
957,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if include not in result['includes']: | if include not in result['includes'] and include not in external_inc: | def search_file(name): "function searching a f90/95 file if it contains module information and/or uses modules and/or includes files" n = os.path.basename(name) result = {} result['name'] = string.replace(n,'.','_') result['realname'] = n result['modname'] = [] result['includes'] = [] result['uses'] = [] result['prog'] = 0 result['process'] = 1 # open file file = open(name,'r') # parsing file for l in file.readlines(): l = string.lower(l) # searching for comments and stripping them pos = string.find(l,'!') if pos is not -1: l = l[:pos] # finding use statement pos = string.find(l,'use') if pos is not -1: pos = pos+len('use') pos2 = string.find(l,',') if pos2==-1: module = string.strip(l[pos:]) else: module = string.strip(l[pos:pos2]) if module not in result['uses'] and module not in external_mod: result['uses'].append(module) continue # finding include statements pos = string.find(l,'include') if pos is not -1: pos = pos+len('include') include = string.strip(l[pos:]) if string.find(include,'<') is not -1: continue include = string.replace(include,'\"','') include = string.replace(include,'\'','') if include not in result['includes']: result['includes'].append(include) continue # finding module statement pos = string.find(l,'end module') if pos is not -1: pos = pos + len('end module') result['modname'].append(string.strip(l[pos:])) continue if string.find(l,'end program') is not -1: result['prog'] = 1 file.close() return result | f0ecc5855f5ec5610932fb4efaa5c52b504373e0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2666/f0ecc5855f5ec5610932fb4efaa5c52b504373e0/f90_dependencies.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
768,
12,
529,
4672,
315,
915,
15300,
279,
284,
9349,
19,
8778,
585,
309,
518,
1914,
1605,
1779,
471,
19,
280,
4692,
4381,
471,
19,
280,
6104,
1390,
6,
225,
290,
273,
1140,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
768,
12,
529,
4672,
315,
915,
15300,
279,
284,
9349,
19,
8778,
585,
309,
518,
1914,
1605,
1779,
471,
19,
280,
4692,
4381,
471,
19,
280,
6104,
1390,
6,
225,
290,
273,
1140,
... |
proxy_url = atom.url.parse_url(proxy) | proxy_url = atom.url.parse_url(proxy_netloc) | def _prepare_connection(self, url, headers): proxy_auth = _get_proxy_auth(url.protocol) if url.protocol == 'https': # destination is https proxy = os.environ.get('https_proxy') if proxy: # Set any proxy auth headers if proxy_auth: proxy_auth = 'Proxy-authorization: %s' % proxy_auth # Construct the proxy connect command. port = url.port if not port: port = '443' proxy_connect = 'CONNECT %s:%s HTTP/1.0\r\n' % (url.host, port) # Set the user agent to send to the proxy if headers and 'User-Agent' in headers: user_agent = 'User-Agent: %s\r\n' % (headers['User-Agent']) else: user_agent = '' proxy_pieces = '%s%s%s\r\n' % (proxy_connect, proxy_auth, user_agent) # Find the proxy host and port. proxy_url = atom.url.parse_url(proxy) if not proxy_url.port: proxy_url.port = '80' # Connect to the proxy server, very simple recv and error checking p_sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM) p_sock.connect((proxy_url.host, int(proxy_url.port))) p_sock.sendall(proxy_pieces) response = '' | 11f531b223a4a1d050d708ce7833bb657986433f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10620/11f531b223a4a1d050d708ce7833bb657986433f/http.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9366,
67,
4071,
12,
2890,
16,
880,
16,
1607,
4672,
2889,
67,
1944,
273,
389,
588,
67,
5656,
67,
1944,
12,
718,
18,
8373,
13,
309,
880,
18,
8373,
422,
296,
4528,
4278,
468,
2929,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9366,
67,
4071,
12,
2890,
16,
880,
16,
1607,
4672,
2889,
67,
1944,
273,
389,
588,
67,
5656,
67,
1944,
12,
718,
18,
8373,
13,
309,
880,
18,
8373,
422,
296,
4528,
4278,
468,
2929,... |
self.setOutput() | self.setOutput() | def onDataInput(self, data): self.data = data | 19c1c8d59670665669ae3d1fbadeb833a37971a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/19c1c8d59670665669ae3d1fbadeb833a37971a4/OWDataDomain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
751,
1210,
12,
2890,
16,
501,
4672,
365,
18,
892,
273,
501,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
751,
1210,
12,
2890,
16,
501,
4672,
365,
18,
892,
273,
501,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self._create_cp(event.x, event.y, tags=('cp', 'realcp')) self._canvas_moving_cp = False self.canvas.delete('fakecp') | self.canvas.coords(self._canvas_moving_cp, event.x-4, event.y-4, event.x+4, event.y+4) self.canvas.itemconfigure(self._canvas_moving_cp, fill=" self.canvas.dtag(self._canvas_moving_cp, 'fakecp') self.canvas.addtag_withtag('realcp', self._canvas_moving_cp) self._canvas_moving_cp = -1 | def canvas_move_cp_cb(self, event): if self._canvas_moving_cp: # Place control point. self._create_cp(event.x, event.y, tags=('cp', 'realcp')) self._canvas_moving_cp = False # remove temporary self.canvas.delete('fakecp') else: # Start moving control point. closest = self.canvas.find_closest(event.x, event.y)[0] tags = self.canvas.gettags(closest) if 'realcp' not in tags: return self._canvas_moving_cp = True coords = self.canvas.coords(closest) self.canvas.delete(closest) | b842f0369a510e3e4abb3ffef3dc4cca9d34d72c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13663/b842f0369a510e3e4abb3ffef3dc4cca9d34d72c/uitk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5953,
67,
8501,
67,
4057,
67,
7358,
12,
2890,
16,
871,
4672,
309,
365,
6315,
15424,
67,
81,
13767,
67,
4057,
30,
468,
13022,
3325,
1634,
18,
365,
6315,
2640,
67,
4057,
12,
2575,
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,
5953,
67,
8501,
67,
4057,
67,
7358,
12,
2890,
16,
871,
4672,
309,
365,
6315,
15424,
67,
81,
13767,
67,
4057,
30,
468,
13022,
3325,
1634,
18,
365,
6315,
2640,
67,
4057,
12,
2575,
18,
... |
profilers = self.job.profilers if not profilers.only(): results.append(utils.system_output(cmd + ' run', retain_output=True)) if profilers.present(): profilers.start(self) results.append("Profiling run ...") results.append(utils.system_output(cmd + ' run', retain_output=True)) profilers.stop(self) profilers.report(self) | def execute_pgsql(self, build, num_threads, max_time, read_only, args): bin = os.path.join(self.autodir, 'deps/pgsql/pgsql/bin') data = os.path.join(self.autodir, 'deps/pgsql/pgsql/data') log = os.path.join(self.debugdir, 'pgsql.log') | f77f62b5c384c1668d8abec35a7be24366c464bf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/f77f62b5c384c1668d8abec35a7be24366c464bf/sysbench.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
67,
84,
30175,
12,
2890,
16,
1361,
16,
818,
67,
12495,
16,
943,
67,
957,
16,
855,
67,
3700,
16,
833,
4672,
4158,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
5854,
369,
481,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
84,
30175,
12,
2890,
16,
1361,
16,
818,
67,
12495,
16,
943,
67,
957,
16,
855,
67,
3700,
16,
833,
4672,
4158,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
5854,
369,
481,
1... | |
UserDict.UserDict.__init__(self, *args, **kw) | def __init__(self, *args, **kw): UserDict.UserDict.__init__(self, *args, **kw) def remove(wr, selfref=ref(self)): self = selfref() if self is not None: del self.data[wr.key] self._remove = remove | 30adf634c34c1ab95e26847f58166fe0d7158961 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/30adf634c34c1ab95e26847f58166fe0d7158961/weakref.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
9987,
4672,
1652,
1206,
12,
91,
86,
16,
365,
1734,
33,
1734,
12,
2890,
3719,
30,
365,
273,
365,
1734,
1435,
309,
365,
353,
486,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
9987,
4672,
1652,
1206,
12,
91,
86,
16,
365,
1734,
33,
1734,
12,
2890,
3719,
30,
365,
273,
365,
1734,
1435,
309,
365,
353,
486,
59... | |
config.add_section('pyscript', dict((k, v) for k, t, v in PythonCodePage.config)) | config.add_section('pycode', dict((k, v) for k, t, v in PythonCodePage.config)) | def draw(self): self.batch.draw() | 21dcde23f0fbc2dfa9514792116a5467237205f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/541/21dcde23f0fbc2dfa9514792116a5467237205f0/python_code.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
4672,
365,
18,
5303,
18,
9446,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
4672,
365,
18,
5303,
18,
9446,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
cmd += [ params ] | cmd += [params] | def runSingleUnitTest(options, mode, test, params=None): cmd = [ options.runpython[mode], test ] if options.verbose: cmd.append('-v') if params is not None: cmd += [ params ] if options.params: cmd += [ options.params ] if options.verbose: log(' '.join(cmd)) if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=600) return result | 64e3ec7e167097dc0b4afb4eadc40bc6adec660f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/64e3ec7e167097dc0b4afb4eadc40bc6adec660f/rt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
5281,
2802,
4709,
12,
2116,
16,
1965,
16,
1842,
16,
859,
33,
7036,
4672,
1797,
273,
306,
702,
18,
2681,
8103,
63,
3188,
6487,
1842,
308,
225,
309,
702,
18,
11369,
30,
1797,
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,
1086,
5281,
2802,
4709,
12,
2116,
16,
1965,
16,
1842,
16,
859,
33,
7036,
4672,
1797,
273,
306,
702,
18,
2681,
8103,
63,
3188,
6487,
1842,
308,
225,
309,
702,
18,
11369,
30,
1797,
18,
... |
sage: b.flow(('00',1),('00',2)) | sage: b.flow(('00',1),('00',2)) | def flow(self, x, y, value_only=True, integer=False, use_edge_labels=True, vertex_bound=False, solver=None, verbose=0): r""" Returns a maximum flow in the graph from ``x`` to ``y`` represented by an optimal valuation of the edges. For more information, see the `Wikipedia article on maximum flow <http://en.wikipedia.org/wiki/Max_flow>`_. | 08b3ef8c500132f63d2dfd7371451a85a1a6987d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/08b3ef8c500132f63d2dfd7371451a85a1a6987d/generic_graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4693,
12,
2890,
16,
619,
16,
677,
16,
460,
67,
3700,
33,
5510,
16,
3571,
33,
8381,
16,
999,
67,
7126,
67,
5336,
33,
5510,
16,
5253,
67,
3653,
33,
8381,
16,
12776,
33,
7036,
16,
398... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4693,
12,
2890,
16,
619,
16,
677,
16,
460,
67,
3700,
33,
5510,
16,
3571,
33,
8381,
16,
999,
67,
7126,
67,
5336,
33,
5510,
16,
5253,
67,
3653,
33,
8381,
16,
12776,
33,
7036,
16,
398... |
(self._directed and s != None and t != None and len(self.shortest_path(s,t) == 0))): | (self._directed and (s is not None) and (t is not None) and len(self.shortest_path(s, t) == 0))): | def longest_path(self, s = None, t = None, weighted = False, algorithm = "MILP", solver = None, verbose = 0): r""" Returns a longest path of ``self``. | 1ce3f98f3b3a6c76baa509a4ebc0110ea7853d74 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1ce3f98f3b3a6c76baa509a4ebc0110ea7853d74/generic_graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12163,
67,
803,
12,
2890,
16,
272,
273,
599,
16,
268,
273,
599,
16,
13747,
273,
1083,
16,
4886,
273,
315,
49,
2627,
52,
3113,
12776,
273,
599,
16,
3988,
273,
374,
4672,
436,
8395,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12163,
67,
803,
12,
2890,
16,
272,
273,
599,
16,
268,
273,
599,
16,
13747,
273,
1083,
16,
4886,
273,
315,
49,
2627,
52,
3113,
12776,
273,
599,
16,
3988,
273,
374,
4672,
436,
8395,
28... |
o2m_op = 'not in' self.__exp[i] = ('id', o2m_op, self.__execute_recursive_in(cr, field._fields_id, field_obj._table, 'id', ids2, operator, field._type)) if call_null: o2m_op = 'not in' if operator in ['not like','not ilike','not in','<>','!=']: o2m_op = 'in' self.__exp[i] = ('id', o2m_op, self.__execute_recursive_in(cr, field._fields_id, field_obj._table, 'id', [], operator, field._type) or [0]) | o2m_op = 'in' self.__exp[i] = ('id', o2m_op, self.__execute_recursive_in(cr, field._fields_id, field_obj._table, 'id', [], operator, field._type) or [0]) | def rg(ids, table, parent): if not ids: return [] ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context) return ids + rg(ids2, table, parent) | 360d52e45b2342607c15854194ed146dc085f05a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/360d52e45b2342607c15854194ed146dc085f05a/expression.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14524,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
3258,
22,
273,
1014,
18,
3072,
12,
3353,
16,
4555,
16,
306,
12,
2938,
16,
296,
267,
2187,
3258,
13,
6487,
819... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14524,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
3258,
22,
273,
1014,
18,
3072,
12,
3353,
16,
4555,
16,
306,
12,
2938,
16,
296,
267,
2187,
3258,
13,
6487,
819... |
self.grub_password_label = xml.get_widget("grub_password_label") | self.grub_options_label = xml.get_widget("grub_options_label") | def __init__(self, xml, notebook, ksdata): self.ksdata = ksdata self.notebook = notebook self.bootloader_vbox = xml.get_widget("bootloader_vbox") self.bootloader_label = xml.get_widget("bootloader_label") self.install_bootloader_radio = xml.get_widget("install_bootloader_radio") self.upgrade_bootloader_radio = xml.get_widget("upgrade_bootloader_radio") self.no_bootloader_radio = xml.get_widget("no_bootloader_radio") self.mbr_radiobutton = xml.get_widget("mbr_radiobutton") self.firstsector_radiobutton = xml.get_widget("firstsector_radiobutton") self.parameters_label = xml.get_widget("parameters_label") self.parameters_entry = xml.get_widget("parameters_entry") self.linear_checkbutton = xml.get_widget("linear_checkbutton") self.lba32_checkbutton = xml.get_widget("lba32_checkbutton") self.grub_password_label = xml.get_widget("grub_password_label") self.grub_password_checkbutton = xml.get_widget("grub_password_checkbutton") self.grub_password_hbox = xml.get_widget("grub_password_hbox") self.grub_password_entry = xml.get_widget("grub_password_entry") self.grub_password_confirm = xml.get_widget("grub_password_confirm") self.grub_password_encrypt_checkbutton = xml.get_widget("grub_password_encrypt_checkbutton") | b37774c9acfa1ca84ba35a7991930d25fda1410e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5376/b37774c9acfa1ca84ba35a7991930d25fda1410e/bootloader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2025,
16,
14718,
16,
11654,
892,
4672,
365,
18,
7904,
892,
273,
11654,
892,
365,
18,
24422,
273,
14718,
365,
18,
7137,
6714,
67,
90,
2147,
273,
2025,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2025,
16,
14718,
16,
11654,
892,
4672,
365,
18,
7904,
892,
273,
11654,
892,
365,
18,
24422,
273,
14718,
365,
18,
7137,
6714,
67,
90,
2147,
273,
2025,
18,... |
class TestStringMethods(BaseLocalizedTest): locale_type = locale.LC_CTYPE def test_isspace(self): self.assertEqual('\x20'.isspace(), True) if sys.platform == 'sunos5': | if sys.platform != 'sunos5': class TestStringMethods(BaseLocalizedTest): locale_type = locale.LC_CTYPE def test_isspace(self): self.assertEqual('\x20'.isspace(), True) | def test_grouping_and_padding(self): self._test_format("%9.2f", 12345.67, grouping=True, out=' 12345.67') | 457345dfa118dbc1f02910c18fee84b95e9eadec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/457345dfa118dbc1f02910c18fee84b95e9eadec/test_locale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
25592,
67,
464,
67,
9598,
12,
2890,
4672,
365,
6315,
3813,
67,
2139,
27188,
29,
18,
22,
74,
3113,
2593,
25574,
18,
9599,
16,
12116,
33,
5510,
16,
596,
2218,
2593,
25574,
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,
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,
25592,
67,
464,
67,
9598,
12,
2890,
4672,
365,
6315,
3813,
67,
2139,
27188,
29,
18,
22,
74,
3113,
2593,
25574,
18,
9599,
16,
12116,
33,
5510,
16,
596,
2218,
2593,
25574,
18,
... |
self.xyz = None if rnAmber: self.renameAmberRes( self.ref ) self.ref = None self.box = 0 | self.xyz = None self.box = None | def __init__( self, frst, rnAmber=0 ): """ @param frst: input restart file @type frst: str @param rnAmber: rename Amber to standard residues (HIE, HID, HIP, CYX) @type rnAmber: 1|0 """ self.frst = T.absfile( frst ) self.crd = open( self.frst ) | 6561fff7ef3f1bdce874a4f2653fa69f6a6cb913 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/6561fff7ef3f1bdce874a4f2653fa69f6a6cb913/AmberRstParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
3812,
334,
16,
20594,
9864,
744,
33,
20,
262,
30,
3536,
632,
891,
3812,
334,
30,
810,
7870,
585,
632,
723,
225,
3812,
334,
30,
609,
632,
891,
20594,
986... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
365,
16,
3812,
334,
16,
20594,
9864,
744,
33,
20,
262,
30,
3536,
632,
891,
3812,
334,
30,
810,
7870,
585,
632,
723,
225,
3812,
334,
30,
609,
632,
891,
20594,
986... |
wfname, spec.payload.jobType) | wfname, spec.parameters['WorkflowType']) | def newWorkflow(self, workflowSpec): """ _newWorkflow_ | ed296cff3f0853c51e450078e609126729ad24e0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/ed296cff3f0853c51e450078e609126729ad24e0/JobCreatorComponent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
8484,
12,
2890,
16,
6095,
1990,
4672,
3536,
389,
2704,
8484,
67,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
8484,
12,
2890,
16,
6095,
1990,
4672,
3536,
389,
2704,
8484,
67,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self._jmim.jmi_ode_df(self._jmi, J.JMI_DER_CPPAD, J.JMI_DER_DENSE_ROW_MAJOR, J.JMI_DER_X, mask, jac) | self._m.jmimodel.jmi_ode_df(pyjmi.JMI_DER_CPPAD, pyjmi.JMI_DER_DENSE_ROW_MAJOR, pyjmi.JMI_DER_X, mask, jac) | def evalJacX(self): """ Evaluate the jacobian of the function F w.r.t. states x. """ jac = N.array([0] * self.getRealModelSize()**2, dtype=c_jmi_real_t) mask = N.array([1] * self.getRealModelSize()**2, dtype=N.int32) self._jmim.jmi_ode_df(self._jmi, J.JMI_DER_CPPAD, J.JMI_DER_DENSE_ROW_MAJOR, J.JMI_DER_X, mask, jac) n = self.getRealModelSize() jac = jac.reshape( (n,n) ) return jac | 733964346bd705d3e3fa78795693f8a99289c936 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/733964346bd705d3e3fa78795693f8a99289c936/shooting.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
46,
1077,
60,
12,
2890,
4672,
3536,
18176,
326,
20138,
26968,
434,
326,
445,
478,
341,
18,
86,
18,
88,
18,
5493,
619,
18,
3536,
20138,
225,
273,
423,
18,
1126,
3816,
20,
65,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
46,
1077,
60,
12,
2890,
4672,
3536,
18176,
326,
20138,
26968,
434,
326,
445,
478,
341,
18,
86,
18,
88,
18,
5493,
619,
18,
3536,
20138,
225,
273,
423,
18,
1126,
3816,
20,
65,
38... |
result.addError(self,self.__exc_info()) | result.addError(self,sys.exc_info()) | def __call__(self, result=None): if result is None: result = self.defaultTestResult() result.startTest(self) testMethod = getattr(self, self.__testMethodName) try: try: self.setUp() except: result.addError(self,self.__exc_info()) return | e4122e065a122f30bf476ece570458641085b660 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e4122e065a122f30bf476ece570458641085b660/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
563,
33,
7036,
4672,
309,
563,
353,
599,
30,
563,
273,
365,
18,
1886,
4709,
1253,
1435,
563,
18,
1937,
4709,
12,
2890,
13,
1842,
1305,
273,
3869,
12,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
563,
33,
7036,
4672,
309,
563,
353,
599,
30,
563,
273,
365,
18,
1886,
4709,
1253,
1435,
563,
18,
1937,
4709,
12,
2890,
13,
1842,
1305,
273,
3869,
12,
2... |
@param default: The default value for parameters; or C{None} for variables. @type default: C{string} or C{None} | @param value: For variables: - C{None} if the variable's value is unknown - The UID of the variable's value, if it is a module, class, function, method, or type. - A string representation of the variable's value, otherwise. For parameters: - C{None} if the parameter has no default value. - A string representation of the parameter's default value, otherwise. @type value: C{string} or L{UID} or C{None} | def __init__(self, name, descr=None, type=None, default=None): """ Construct the documentation for a variable or parameter. | d3395d508175517a8a8289ffc33bd81b4ee231c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/d3395d508175517a8a8289ffc33bd81b4ee231c2/objdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
18426,
33,
7036,
16,
618,
33,
7036,
16,
805,
33,
7036,
4672,
3536,
14291,
326,
7323,
364,
279,
2190,
578,
1569,
18,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
18426,
33,
7036,
16,
618,
33,
7036,
16,
805,
33,
7036,
4672,
3536,
14291,
326,
7323,
364,
279,
2190,
578,
1569,
18,
2,
-100,
-100,
-100,
-100,
... |
base = base + ', opaque="%s"' % opaque | base += ', opaque="%s"' % opaque | def get_authorization(self, req, chal): try: realm = chal['realm'] nonce = chal['nonce'] qop = chal.get('qop') algorithm = chal.get('algorithm', 'MD5') # mod_digest doesn't send an opaque, even though it isn't # supposed to be optional opaque = chal.get('opaque', None) except KeyError: return None | bfa1d5817e0123624ee4d85ca075e5c84453f7c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bfa1d5817e0123624ee4d85ca075e5c84453f7c6/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
12218,
12,
2890,
16,
1111,
16,
462,
287,
4672,
775,
30,
11319,
273,
462,
287,
3292,
24056,
3546,
7448,
273,
462,
287,
3292,
12824,
3546,
1043,
556,
273,
462,
287,
18,
588,
266... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12218,
12,
2890,
16,
1111,
16,
462,
287,
4672,
775,
30,
11319,
273,
462,
287,
3292,
24056,
3546,
7448,
273,
462,
287,
3292,
12824,
3546,
1043,
556,
273,
462,
287,
18,
588,
266... |
s = StringIO('\x01\x00') | s = StringIO(asbytes('\x01\x00')) | def test_bad_header(): # header of length less than 2 should fail s = StringIO() assert_raises(ValueError, format.read_array_header_1_0, s) s = StringIO('1') assert_raises(ValueError, format.read_array_header_1_0, s) # header shorter than indicated size should fail s = StringIO('\x01\x00') assert_raises(ValueError, format.read_array_header_1_0, s) # headers without the exact keys required should fail d = {"shape":(1,2), "descr":"x"} s = StringIO() format.write_array_header_1_0(s,d) assert_raises(ValueError, format.read_array_header_1_0, s) d = {"shape":(1,2), "fortran_order":False, "descr":"x", "extrakey":-1} s = StringIO() format.write_array_header_1_0(s,d) assert_raises(ValueError, format.read_array_header_1_0, s) | 0e9a08cd2f5faa2b17dc6d62d4d0014386842628 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/0e9a08cd2f5faa2b17dc6d62d4d0014386842628/test_format.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
8759,
67,
3374,
13332,
468,
1446,
434,
769,
5242,
2353,
576,
1410,
2321,
272,
273,
15777,
1435,
1815,
67,
354,
6141,
12,
23610,
16,
740,
18,
896,
67,
1126,
67,
3374,
67,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
8759,
67,
3374,
13332,
468,
1446,
434,
769,
5242,
2353,
576,
1410,
2321,
272,
273,
15777,
1435,
1815,
67,
354,
6141,
12,
23610,
16,
740,
18,
896,
67,
1126,
67,
3374,
67,
21,
... |
model = self.getModel() editor = model.editor | editor = self.editor | def execFinish(self, runner): model = self.getModel() editor = model.editor if editor.erroutFrm: if editor.palette.IsShown(): editor.palette.restore() editor.restore() | c6ff19c8f2d6a75c40eeaabe3f64776c31d4e58b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/c6ff19c8f2d6a75c40eeaabe3f64776c31d4e58b/PythonControllers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1196,
11641,
12,
2890,
16,
8419,
4672,
4858,
273,
365,
18,
9177,
309,
4858,
18,
264,
7028,
7167,
81,
30,
309,
4858,
18,
26474,
18,
2520,
27042,
13332,
4858,
18,
26474,
18,
13991,
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,
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,
1196,
11641,
12,
2890,
16,
8419,
4672,
4858,
273,
365,
18,
9177,
309,
4858,
18,
264,
7028,
7167,
81,
30,
309,
4858,
18,
26474,
18,
2520,
27042,
13332,
4858,
18,
26474,
18,
13991,
1435,
... |
if num==0 or num==3: return self.default_kana_list[0] elif num==1 or num==4: return self.default_kana_list[1] elif num==2 or num==5: return self.default_kana_list[2] else: return self.default_kana_list[3] | return self.default_kana_list[num] | def getASet(self,num): """Return a set from its number.""" if num==0 or num==3: return self.default_kana_list[0] elif num==1 or num==4: return self.default_kana_list[1] elif num==2 or num==5: return self.default_kana_list[2] else: return self.default_kana_list[3] | c27c8b61f6112e41595f79c68840dbe0652c40c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3073/c27c8b61f6112e41595f79c68840dbe0652c40c4/kanaengine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4506,
694,
12,
2890,
16,
2107,
4672,
3536,
990,
279,
444,
628,
2097,
1300,
12123,
309,
818,
631,
20,
578,
818,
631,
23,
30,
327,
365,
18,
1886,
67,
79,
13848,
67,
1098,
63,
20,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4506,
694,
12,
2890,
16,
2107,
4672,
3536,
990,
279,
444,
628,
2097,
1300,
12123,
309,
818,
631,
20,
578,
818,
631,
23,
30,
327,
365,
18,
1886,
67,
79,
13848,
67,
1098,
63,
20,
65,
... |
only the first and one other position. | only in the first and one other position. | def NStarGraph(self,n): r''' Returns the n-star graph. The vertices of the n-star graph are the set of permutations on n symbols. There is an edge between two vertices if their labels differ only the first and one other position. INPUT:: - ``n`` EXAMPLES:: sage: g = graphs.NStarGraph(4) sage: g.plot() # long time REFERENCES: - S.B. Akers, D. Horel and B. Krishnamurthy, The star graph: An attractive alternative to the previous n-cube. In: Proc. Internat. Conf. on Parallel Processing (1987), pp. 393--400. AUTHORS: - Michael Yurko (2009-09-01) | aa71796c41743b21cf5dd66d16cf6af9c8e363ee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/aa71796c41743b21cf5dd66d16cf6af9c8e363ee/graph_generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
423,
18379,
4137,
12,
2890,
16,
82,
4672,
436,
26418,
2860,
326,
290,
17,
10983,
2667,
18,
225,
1021,
6928,
434,
326,
290,
17,
10983,
2667,
854,
326,
444,
434,
26468,
603,
290,
7963,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
423,
18379,
4137,
12,
2890,
16,
82,
4672,
436,
26418,
2860,
326,
290,
17,
10983,
2667,
18,
225,
1021,
6928,
434,
326,
290,
17,
10983,
2667,
854,
326,
444,
434,
26468,
603,
290,
7963,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.