rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
cursor.execute(sql, params) | cursor.execute(sql) | def render_macro(self, req, name, content): prefix = limit = None if content: argv = [arg.strip() for arg in content.split(',')] if len(argv) > 0: prefix = argv[0].replace('\'', '\'\'') if len(argv) > 1: limit = int(argv[1]) | a6eaeb4ec1b6beaa8000e1582028131dea193992 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/a6eaeb4ec1b6beaa8000e1582028131dea193992/macros.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
26448,
12,
2890,
16,
1111,
16,
508,
16,
913,
4672,
1633,
273,
1800,
273,
599,
309,
913,
30,
5261,
273,
306,
3175,
18,
6406,
1435,
364,
1501,
316,
913,
18,
4939,
12,
2187,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
26448,
12,
2890,
16,
1111,
16,
508,
16,
913,
4672,
1633,
273,
1800,
273,
599,
309,
913,
30,
5261,
273,
306,
3175,
18,
6406,
1435,
364,
1501,
316,
913,
18,
4939,
12,
2187,
6... |
anchor=NSEW (or subset) - position anchor according to given direction | anchor=NSEW (or subset) - position anchor according to given direction | def place_configure(self, cnf={}, **kw): """Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed. x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account """ for k in ['in_']: if k in kw: kw[k[:-1]] = kw[k] del kw[k] self.tk.call( ('place', 'configure', self._w) + self._options(cnf, kw)) | bf1eb637bd2eee4cec7cf34f530910ae365b22dd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/bf1eb637bd2eee4cec7cf34f530910ae365b22dd/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3166,
67,
14895,
12,
2890,
16,
23118,
28793,
2826,
9987,
4672,
3536,
6029,
279,
3604,
316,
326,
982,
3604,
18,
2672,
487,
702,
30,
316,
33,
7525,
300,
4171,
3632,
358,
1492,
326,
3604,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3166,
67,
14895,
12,
2890,
16,
23118,
28793,
2826,
9987,
4672,
3536,
6029,
279,
3604,
316,
326,
982,
3604,
18,
2672,
487,
702,
30,
316,
33,
7525,
300,
4171,
3632,
358,
1492,
326,
3604,
... |
parent=self, pos=wxPoint(8, 208), size=wxSize(435, 207), | parent=self, pos=wxPoint(8, 224), size=wxSize(469, 191), | def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(true) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize) | aac0471ac41eaa175cbaa05604248123746b2b22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/aac0471ac41eaa175cbaa05604248123746b2b22/STCStyleEditor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
16277,
87,
12,
2890,
16,
846,
496,
4672,
468,
4374,
707,
16,
2727,
1404,
3874,
7075,
6353,
16186,
2738,
972,
12,
2890,
16,
612,
33,
27226,
734,
67,
882,
39,
15066,
10776... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2738,
67,
16277,
87,
12,
2890,
16,
846,
496,
4672,
468,
4374,
707,
16,
2727,
1404,
3874,
7075,
6353,
16186,
2738,
972,
12,
2890,
16,
612,
33,
27226,
734,
67,
882,
39,
15066,
10776... |
self.save() return self.users.exclude(id=client.avatar.id) | return list(self.users.exclude(id=client.avatar.id)) | def dbOps(): if client.avatar in self.users.all(): raise Exception('User already in channel.') ##FIXME: this is bad!!!!!! user will lock up | bb8bcfbf739abbb2062104fd86afb58b6bbb42ad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10390/bb8bcfbf739abbb2062104fd86afb58b6bbb42ad/peerchat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1319,
8132,
13332,
309,
1004,
18,
19660,
316,
365,
18,
5577,
18,
454,
13332,
1002,
1185,
2668,
1299,
1818,
316,
1904,
1093,
13,
7541,
25810,
30,
333,
353,
5570,
23045,
8548,
729,
903,
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,
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,
1319,
8132,
13332,
309,
1004,
18,
19660,
316,
365,
18,
5577,
18,
454,
13332,
1002,
1185,
2668,
1299,
1818,
316,
1904,
1093,
13,
7541,
25810,
30,
333,
353,
5570,
23045,
8548,
729,
903,
21... |
fp = os.popen("ctags -IDL_IMPORT --c-types=%s -f - %s" % (TAG_KINDS, incfiles)) | fp = os.popen("ctags -IDL_IMPORT --c-types=%s -f - %s" % (TAG_KINDS, incfiles)) | def print_undoc_symbols(prefix, docdir, incdir): docs = [] for sect in DOCSECTIONS: for file in glob.glob(os.path.join(docdir, sect, "*.tex")): docs.append(open(file).read()) docs = "\n".join(docs) incfiles = os.path.join(incdir, INCLUDEPATTERN) fp = os.popen("ctags -IDL_IMPORT --c-types=%s -f - %s" % (TAG_KINDS, incfiles)) dict = findnames(fp, prefix) names = dict.keys() names.sort() for name in names: if docs.find(name) == -1: print dict[name], name | dd669a5cc4b7512ba77b0b342fbd1c6aedc93d36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/dd669a5cc4b7512ba77b0b342fbd1c6aedc93d36/undoc_symbols.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
1074,
504,
67,
15536,
12,
3239,
16,
997,
1214,
16,
7290,
1214,
4672,
3270,
273,
5378,
225,
364,
29140,
316,
5467,
39,
19082,
55,
30,
364,
585,
316,
4715,
18,
10581,
12,
538,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
1074,
504,
67,
15536,
12,
3239,
16,
997,
1214,
16,
7290,
1214,
4672,
3270,
273,
5378,
225,
364,
29140,
316,
5467,
39,
19082,
55,
30,
364,
585,
316,
4715,
18,
10581,
12,
538,
... |
title = u'&Check', helpString = u'run check() on the main view'), | title = _(u'&Check'), helpString = _(u'run check() on the main view')), | def makeVisibleHourMenuItems(parcel): """ Create the 'Visible Hours' submenu. Should look like: Automatic --------- 5 hours 6 hours | 043a08a77771b31713425ec3f48a9c0186570e1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/043a08a77771b31713425ec3f48a9c0186570e1d/menus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
6207,
13433,
4599,
3126,
12,
1065,
2183,
4672,
3536,
1788,
326,
296,
6207,
670,
4390,
11,
27539,
18,
9363,
2324,
3007,
30,
225,
11809,
4941,
300,
788,
1381,
7507,
1666,
7507,
2,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
6207,
13433,
4599,
3126,
12,
1065,
2183,
4672,
3536,
1788,
326,
296,
6207,
670,
4390,
11,
27539,
18,
9363,
2324,
3007,
30,
225,
11809,
4941,
300,
788,
1381,
7507,
1666,
7507,
2,
-1... |
if not text[1:5] in ("info", "find"): | if not text[1:5] in my_commands: | def inFilter(self, irc, msg): if msg.command != "PRIVMSG": return msg if not conf.supybot.defaultIgnore(): return msg text = msg.args[1].strip() if len(text) < 6: return msg user = get_user(msg) if user: return msg channel = self.__getChannel(msg.args[0]) if channel: if text[0] not in ('!', '@'): return msg if not text[1:5] in ("info", "find"): return msg | 283652a263ab69ddf4dea37a7a8e0323c2a2eb2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/283652a263ab69ddf4dea37a7a8e0323c2a2eb2b/plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
316,
1586,
12,
2890,
16,
277,
1310,
16,
1234,
4672,
309,
1234,
18,
3076,
480,
315,
7698,
58,
11210,
6877,
327,
1234,
309,
486,
2195,
18,
2859,
93,
4819,
18,
1886,
3777,
13332,
327,
123... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1586,
12,
2890,
16,
277,
1310,
16,
1234,
4672,
309,
1234,
18,
3076,
480,
315,
7698,
58,
11210,
6877,
327,
1234,
309,
486,
2195,
18,
2859,
93,
4819,
18,
1886,
3777,
13332,
327,
123... |
if context and context.has_key('user_prefence') and context['user_prefence']: cmp_ids = [] data_user = self.pool.get('res.users').browse(cr, user, [user], context=context) map(lambda x: cmp_ids.append(x.id), data_user[0].company_ids) return [data_user[0].company_id.id] + cmp_ids return super(res_company, self).search(cr, user, args, offset=offset, limit=limit, order=order, | user_preference = context and context.get('user_preference', False) or False if user_preference: user = self.pool.get('res.users').browse(cr, uid, uid, context=context) cmp_ids = list(set([user.company_id.id] + [cmp.id for cmp in user.company_ids])) return cmp_ids return super(res_company, self).search(cr, uid, args, offset=offset, limit=limit, order=order, | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): if context and context.has_key('user_prefence') and context['user_prefence']: cmp_ids = [] data_user = self.pool.get('res.users').browse(cr, user, [user], context=context) map(lambda x: cmp_ids.append(x.id), data_user[0].company_ids) return [data_user[0].company_id.id] + cmp_ids return super(res_company, self).search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count) | 60f1981def2ffbdfc6ac94e8b0a1cd4dba2161da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/60f1981def2ffbdfc6ac94e8b0a1cd4dba2161da/res_company.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
4422,
16,
729,
16,
833,
16,
1384,
33,
20,
16,
1800,
33,
7036,
16,
1353,
33,
7036,
16,
819,
33,
7036,
16,
1056,
33,
8381,
4672,
225,
729,
67,
19141,
273,
819,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
4422,
16,
729,
16,
833,
16,
1384,
33,
20,
16,
1800,
33,
7036,
16,
1353,
33,
7036,
16,
819,
33,
7036,
16,
1056,
33,
8381,
4672,
225,
729,
67,
19141,
273,
819,
47... |
if makefirst: self.handlers[xmlns][name][typ+ns].insert({'func':handler,'system':system}) | if makefirst: self.handlers[xmlns][name][typ+ns].insert(0,{'func':handler,'system':system}) | def RegisterHandler(self,name,handler,typ='',ns='',xmlns=None, makefirst=0, system=0): """Register user callback as stanzas handler of declared type. Callback must take (if chained, see later) arguments: dispatcher instance (for replying), incomed return of previous handlers. The callback must raise xmpp.NodeProcessed just before return if it want preven callbacks to be called with the same stanza as argument _and_, more importantly library from returning stanza to sender with error set (to be enabled in 0.2 ve Arguments: "name" - name of stanza. F.e. "iq". "handler" - user callback. "typ" - value of stanza's "type" attribute. If not specified any value match "ns" - namespace of child that stanza must contain. "chained" - chain together output of several handlers. "makefirst" - insert handler in the beginning of handlers list instead of adding it to the end. Note that more common handlers (i.e. w/o "typ" and " will be called first nevertheless. "system" - call handler even if NodeProcessed Exception were raised already. """ if not xmlns: xmlns=self._owner.defaultNamespace self.DEBUG('Registering handler %s for "%s" type->%s ns->%s(%s)'%(handler,name,typ,ns,xmlns), 'info') if not typ and not ns: typ='default' if not self.handlers.has_key(xmlns): self.RegisterNamespace(xmlns,'warn') if not self.handlers[xmlns].has_key(name): self.RegisterProtocol(name,Protocol,xmlns,'warn') if not self.handlers[xmlns][name].has_key(typ+ns): self.handlers[xmlns][name][typ+ns]=[] if makefirst: self.handlers[xmlns][name][typ+ns].insert({'func':handler,'system':system}) else: self.handlers[xmlns][name][typ+ns].append({'func':handler,'system':system}) | 146783ae860867eaf0c7419395e37921bccc7c37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7194/146783ae860867eaf0c7419395e37921bccc7c37/dispatcher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5433,
1503,
12,
2890,
16,
529,
16,
4176,
16,
12846,
2218,
2187,
2387,
2218,
2187,
16741,
33,
7036,
16,
1221,
3645,
33,
20,
16,
2619,
33,
20,
4672,
3536,
3996,
729,
1348,
487,
384,
304,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5433,
1503,
12,
2890,
16,
529,
16,
4176,
16,
12846,
2218,
2187,
2387,
2218,
2187,
16741,
33,
7036,
16,
1221,
3645,
33,
20,
16,
2619,
33,
20,
4672,
3536,
3996,
729,
1348,
487,
384,
304,... |
def depsToDotFile(depsLogConf, gr): | def depsToDotFile(classDepsIter, depsLogConf): | def depsToDotFile(depsLogConf, gr): | d1325a630dd674037a9e9c9ee82994269849d10d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/d1325a630dd674037a9e9c9ee82994269849d10d/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8740,
774,
10412,
812,
12,
14877,
1343,
3976,
16,
3821,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8740,
774,
10412,
812,
12,
14877,
1343,
3976,
16,
3821,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
text = wxStaticText(self, -1, | text = wx.StaticText(self, -1, | def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent | 2620b36e036a1d93bf57c97ee2f7cb9a339fd457 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/2620b36e036a1d93bf57c97ee2f7cb9a339fd457/embedded_sample.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
4672,
7075,
5537,
16186,
2738,
972,
12,
2890,
16,
982,
16,
300,
21,
13,
1172,
982,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
4672,
7075,
5537,
16186,
2738,
972,
12,
2890,
16,
982,
16,
300,
21,
13,
1172,
982,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
"""Adds a AlphaHelix object to the Model. | """Adds an AlphaHelix object to the Model. | def add_alpha_helix(self, alpha_helix): """Adds a AlphaHelix object to the Model. """ assert isinstance(alpha_helix, AlphaHelix) self.alpha_helix_list.append(alpha_helix) alpha_helix.model = self | a181eacbeb3c68b8f7caba918a821d3f3e6c50f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/a181eacbeb3c68b8f7caba918a821d3f3e6c50f6/Structure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
5429,
67,
76,
26342,
12,
2890,
16,
4190,
67,
76,
26342,
4672,
3536,
3655,
392,
24277,
44,
26342,
733,
358,
326,
3164,
18,
3536,
1815,
1549,
12,
5429,
67,
76,
26342,
16,
24277,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
5429,
67,
76,
26342,
12,
2890,
16,
4190,
67,
76,
26342,
4672,
3536,
3655,
392,
24277,
44,
26342,
733,
358,
326,
3164,
18,
3536,
1815,
1549,
12,
5429,
67,
76,
26342,
16,
24277,... |
spinWhile(lambda :(not clientF.protocol or not clientF.protocol.closed)) | spinWhile(lambda :(not clientF.protocol or not clientF.protocol.closed)) | def testClosePortInProtocolFactory(self): f = ClosingFactory() port = reactor.listenTCP(0, f, interface="127.0.0.1") self.n = port.getHost().port self.ports.append(port) f.port = port clientF = MyClientFactory() reactor.connectTCP("127.0.0.1", self.n, clientF) | 68998e21ef533677da748f03432912990acb38b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/68998e21ef533677da748f03432912990acb38b1/test_tcp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
4605,
2617,
382,
5752,
1733,
12,
2890,
4672,
284,
273,
385,
10910,
1733,
1435,
1756,
273,
19178,
18,
18085,
13891,
12,
20,
16,
284,
16,
1560,
1546,
14260,
18,
20,
18,
20,
18,
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,
4605,
2617,
382,
5752,
1733,
12,
2890,
4672,
284,
273,
385,
10910,
1733,
1435,
1756,
273,
19178,
18,
18085,
13891,
12,
20,
16,
284,
16,
1560,
1546,
14260,
18,
20,
18,
20,
18,
21,... |
>>> fitness('Hello World!') | >>> ghw = GeneticHelloWorld() >>> ghw.fitness('Hello World!') | def fitness(self, chromo): ''' Fitness of a chromo is the sum of how far each of its charactors is from the target string. | a4c9b05b810dbae47b131b023288ecc601d2bf6a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13225/a4c9b05b810dbae47b131b023288ecc601d2bf6a/genetic-hello-world.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20351,
12,
2890,
16,
8123,
83,
4672,
9163,
478,
9746,
434,
279,
8123,
83,
353,
326,
2142,
434,
3661,
10247,
1517,
434,
2097,
2367,
1383,
353,
628,
326,
1018,
533,
18,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20351,
12,
2890,
16,
8123,
83,
4672,
9163,
478,
9746,
434,
279,
8123,
83,
353,
326,
2142,
434,
3661,
10247,
1517,
434,
2097,
2367,
1383,
353,
628,
326,
1018,
533,
18,
2,
-100,
-100,
-1... |
version = self.bb_cache.getVar('PV', fn, True ) + '-' + self.bb_cache.getVar('PR', fn, True) | version = "%s:%s-%s" % self.status.pkg_pepvpr[fn] | def generateDotGraph( self, pkgs_to_build ): """ Generate a task dependency graph. | a5d55feb6a55940409bd9b6095d399b21b9664ba /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2672/a5d55feb6a55940409bd9b6095d399b21b9664ba/cooker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
10412,
4137,
12,
365,
16,
16922,
67,
869,
67,
3510,
262,
30,
3536,
6654,
279,
1562,
4904,
2667,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
10412,
4137,
12,
365,
16,
16922,
67,
869,
67,
3510,
262,
30,
3536,
6654,
279,
1562,
4904,
2667,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
for i in range(1, len(splitted), 2): splitted[i] = filter(None, split(splitted[i])) for j in range(1, len(splitted[i])): | for i in range(1,len(splitted),2): splitted[i] = filter(None, split(splitted[i])) for j in range(1, len(splitted[i])): | def quotes(s, ws = (string.whitespace,)): # split up quoted regions splitted = regsub.split(s, '[%s]*\"[%s]*' % (ws * 2)) split=string.split if (len(splitted) > 1): if ((len(splitted) % 2) == 0): raise QueryError, "Mismatched quotes" for i in range(1, len(splitted), 2): # split the quoted region into words splitted[i] = filter(None, split(splitted[i])) # put the Proxmity operator in between quoted words for j in range(1, len(splitted[i])): splitted[i][j : j] = [ Near ] splitted = filter(None, splitted) else: # No quotes, so just split the string into words splitted = filter(None, split(s)) return splitted | 4ddbd1b59bf5e901ed147cf779f71eb42cfd362b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4ddbd1b59bf5e901ed147cf779f71eb42cfd362b/TextIndex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10681,
12,
87,
16,
4945,
273,
261,
1080,
18,
18777,
16,
3719,
30,
468,
1416,
731,
9298,
10085,
17687,
273,
17518,
373,
18,
4939,
12,
87,
16,
21848,
87,
5772,
2412,
14451,
87,
65,
4035,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10681,
12,
87,
16,
4945,
273,
261,
1080,
18,
18777,
16,
3719,
30,
468,
1416,
731,
9298,
10085,
17687,
273,
17518,
373,
18,
4939,
12,
87,
16,
21848,
87,
5772,
2412,
14451,
87,
65,
4035,... |
def resolver (): addresses = _peers () if addresses: return Resolver (addresses) raise Exception ('No Resolver Address Available') lookup = resolver () | lookup = Resolver (_peers ()) | def timeouts_stop (self): "close the dispatcher when all requests have timed out" self.handle_close () | 79906933ee4150b4a6dc21c74f2849f7ab831a23 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2577/79906933ee4150b4a6dc21c74f2849f7ab831a23/dns_client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20395,
67,
5681,
261,
2890,
4672,
315,
4412,
326,
7393,
1347,
777,
3285,
1240,
7491,
596,
6,
365,
18,
4110,
67,
4412,
1832,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20395,
67,
5681,
261,
2890,
4672,
315,
4412,
326,
7393,
1347,
777,
3285,
1240,
7491,
596,
6,
365,
18,
4110,
67,
4412,
1832,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
opts, args = getopt.getopt(sys.argv[1:], "h", ["help", "name=", "password="]) | opts, args = getopt.getopt(sys.argv[1:], "h", ["help", "name=", "password=", "debug="]) | def main(): try: opts, args = getopt.getopt(sys.argv[1:], "h", ["help", "name=", "password="]) except getopt.GetoptError: # print help information and exit: usage() sys.exit(2) name = password = None for o, a in opts: if o == "--name": name = a if o == "--password": password = a if o in ["h", "--help"]: usage() sys.exit() http = httplib2.Http(".cache") if name: print "%s: %s" % (name, password) http.add_credentials(name, password) if not args: args = [INTROSPECTION_URI] for target_uri in args: print "Atom Client Tests" print "-----------------" print "" print "Testing the service at <%s>" % target_uri print "Running: ", test = TestIntrospection(target_uri, http) test.run() reports = test.reports print "" print "== Errors ==" print_report(reports, Error) print "== Warnings ==" print_report(reports, Warning) print "== Suggestions ==" print_report(reports, Suggestion) if not reports: print "Success!" | 86e478b94679c8b4c3b0f630c7ba9ea1b84e0223 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5012/86e478b94679c8b4c3b0f630c7ba9ea1b84e0223/appclienttest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
225,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
315,
76,
3113,
8247,
5201,
3113,
315,
529,
1546,
16,
315,
3664,
1546,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
225,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
315,
76,
3113,
8247,
5201,
3113,
315,
529,
1546,
16,
315,
3664,
1546,
... |
del nt try: import win32console except ImportError: sys.stderr.write('Unable to load win32console support; complex passwords can not be input.\n') password_prompt = getpass.getpass else: password_prompt = win32console.getpass else: password_prompt = getpass.getpass self.config['NTLM_AUTH']['PASSWORD'] = password_prompt('Your NT password to be used:') if not self.config['NTLM_AUTH']['PASSWORD']: print 'Sorry. PASSWORD is required, bye.' sys.exit(1) else: self.config['NTLM_AUTH']['USER'] = 'placeholder_username' self.config['NTLM_AUTH']['PASSWORD'] = 'placeholder_password' self.config['NTLM_AUTH']['LM_HASHED_PW'] = ntlm_procs.create_LM_hashed_password(self.config['NTLM_AUTH']['PASSWORD']) self.config['NTLM_AUTH']['NT_HASHED_PW'] = ntlm_procs.create_NT_hashed_password(self.config['NTLM_AUTH']['PASSWORD']) | password_prompt = getpass.getpass self.config['NTLM_AUTH']['PASSWORD'] = password_prompt('Your NT password to be used:') if not self.config['NTLM_AUTH']['PASSWORD']: print 'Sorry. PASSWORD is required, bye.' sys.exit(1) else: self.config['NTLM_AUTH']['USER'] = 'placeholder_username' self.config['NTLM_AUTH']['PASSWORD'] = 'placeholder_password' self.config['NTLM_AUTH']['LM_HASHED_PW'] = ntlm_procs.create_LM_hashed_password(self.config['NTLM_AUTH']['PASSWORD']) self.config['NTLM_AUTH']['NT_HASHED_PW'] = ntlm_procs.create_NT_hashed_password(self.config['NTLM_AUTH']['PASSWORD']) | def __init__(self, config): self.config = config self.MyHost = '' self.ListenPort = self.config['GENERAL']['LISTEN_PORT'] self.sigLock = thread.allocate_lock() # For locking in the sigHandler self.monLock = thread.allocate_lock() # For keeping the monitor thread sane self.watchUpstream = 0 self.monitor = None if not self.config['NTLM_AUTH']['NTLM_TO_BASIC']: if not self.config['NTLM_AUTH']['PASSWORD']: tries = 3 print '------------------------' while tries and (not self.config['NTLM_AUTH']['PASSWORD']): tries = tries - 1 if self.config['NTLM_AUTH']['COMPLEX_PASSWORD_INPUT']: try: import nt except ImportError: # Nothing to be done pass else: del nt # Don't we all wish we could do that? try: import win32console except ImportError: sys.stderr.write('Unable to load win32console support; complex passwords can not be input.\n') password_prompt = getpass.getpass else: password_prompt = win32console.getpass else: password_prompt = getpass.getpass self.config['NTLM_AUTH']['PASSWORD'] = password_prompt('Your NT password to be used:') if not self.config['NTLM_AUTH']['PASSWORD']: print 'Sorry. PASSWORD is required, bye.' sys.exit(1) else: # TODO: migrate this properly so placeholders aren't required self.config['NTLM_AUTH']['USER'] = 'placeholder_username' self.config['NTLM_AUTH']['PASSWORD'] = 'placeholder_password' # hashed passwords calculation self.config['NTLM_AUTH']['LM_HASHED_PW'] = ntlm_procs.create_LM_hashed_password(self.config['NTLM_AUTH']['PASSWORD']) self.config['NTLM_AUTH']['NT_HASHED_PW'] = ntlm_procs.create_NT_hashed_password(self.config['NTLM_AUTH']['PASSWORD']) | d1eba6103203bfd69e4830e4876bc1925d317fcf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2865/d1eba6103203bfd69e4830e4876bc1925d317fcf/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
642,
4672,
365,
18,
1425,
273,
642,
365,
18,
12062,
2594,
273,
875,
365,
18,
14750,
2617,
273,
365,
18,
1425,
3292,
13990,
1013,
21712,
7085,
1157,
67,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
642,
4672,
365,
18,
1425,
273,
642,
365,
18,
12062,
2594,
273,
875,
365,
18,
14750,
2617,
273,
365,
18,
1425,
3292,
13990,
1013,
21712,
7085,
1157,
67,
6... |
Finally let's check that the wrapper's __iter__ proxy falls back | Next let's check that the wrapper's __iter__ proxy falls back | ... def __getslice__(self, start, end): | 08094175317ea81b0b0198071d240857a5de752d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9685/08094175317ea81b0b0198071d240857a5de752d/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
1001,
588,
6665,
972,
12,
2890,
16,
787,
16,
679,
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,
... | [
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,
1372,
377,
1652,
1001,
588,
6665,
972,
12,
2890,
16,
787,
16,
679,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
elif code == 2: | elif code == 2: | def literal(): s = pos[0] e = data.find("\00", s) | cff58537521ede54f019fd3fa82bb710569a895a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9355/cff58537521ede54f019fd3fa82bb710569a895a/campaign_client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7158,
13332,
272,
273,
949,
63,
20,
65,
425,
273,
501,
18,
4720,
31458,
713,
3113,
272,
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,
... | [
1,
1,
1,
1,
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,
7158,
13332,
272,
273,
949,
63,
20,
65,
425,
273,
501,
18,
4720,
31458,
713,
3113,
272,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def __init__(self, start, stop, step): if step == 0: raise ValueError, 'range() called with zero step' self.start = start self.stop = stop self.step = step self.len = max(0, int((self.stop - self.start) / self.step)) | def __init__(self, *a): """ Initialize start, stop, and step values along with calculating the nubmer of values (what __len__ will return) in the range""" self.start, self.stop, self.step = handleargs(a) self.len = max(0, (self.stop - self.start) // self.step) | def range(*a): if len(a) == 1: start, stop, step = 0, a[0], 1 elif len(a) == 2: start, stop = a step = 1 elif len(a) == 3: start, stop, step = a else: raise TypeError, 'range() needs 1-3 arguments' return Range(start, stop, step) | c2b151c66ee9bc6e686400ee93e65e07d1999888 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c2b151c66ee9bc6e686400ee93e65e07d1999888/Range.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1048,
30857,
69,
4672,
309,
562,
12,
69,
13,
422,
404,
30,
787,
16,
2132,
16,
2235,
273,
374,
16,
279,
63,
20,
6487,
404,
1327,
562,
12,
69,
13,
422,
576,
30,
787,
16,
2132,
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,
1048,
30857,
69,
4672,
309,
562,
12,
69,
13,
422,
404,
30,
787,
16,
2132,
16,
2235,
273,
374,
16,
279,
63,
20,
6487,
404,
1327,
562,
12,
69,
13,
422,
576,
30,
787,
16,
2132,
273,
... |
def rename_table(self, table, new_name): | def rename_table(self, table_name, new_name): """ Renames the table table_name to new_name. EXAMPLE: sage: D = SQLDatabase() sage: D.create_table('simon',{'col1':{'sql':'INTEGER'}}) sage: D.show('simon') col1 -------------------- sage: D.rename_table('simon', 'lucy') sage: D.show('simon') Traceback (most recent call last): ... RuntimeError: Failure to fetch data. sage: D.show('lucy') col1 -------------------- """ | def rename_table(self, table, new_name): # Check input: if not self.__skeleton__.has_key(table): raise ValueError("Database has no table %s."%table) if self.__skeleton__.has_key(new_name): raise ValueError("Database already has table %s."%new_name) | 85d02cb25b26fc015382d67ed0b0b5b5529e5568 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/85d02cb25b26fc015382d67ed0b0b5b5529e5568/database.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6472,
67,
2121,
12,
2890,
16,
1014,
67,
529,
16,
394,
67,
529,
4672,
3536,
534,
6809,
326,
1014,
1014,
67,
529,
358,
394,
67,
529,
18,
225,
5675,
21373,
30,
272,
410,
30,
463,
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,
6472,
67,
2121,
12,
2890,
16,
1014,
67,
529,
16,
394,
67,
529,
4672,
3536,
534,
6809,
326,
1014,
1014,
67,
529,
358,
394,
67,
529,
18,
225,
5675,
21373,
30,
272,
410,
30,
463,
273,
... |
raw = self.frameBuffers[frame].buffer[y:y+h,x:x+w].tostring () glViewport (x, y, w, h) | endX = int (x + w) endY = int (y + h) raw = self.frameBuffers[frame].buffer[y:endY,x:endX].tostring () glPixelZoom (zoom, zoom) | def drawRect_ (self, rect): """ Draw the content of the PyOpenGLView instance on screen. We override this method in order to draw on screen using Quartz 2D directly. """ # glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) frame = self.mapping[self.frameNo] if (not self.frameBuffers[frame] or not self.frameBuffers[frame].raw): return # set the context coordinates to that of the visibleRect | 16d89343b43d9b665dffd3bd8c58e4b389903d48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2360/16d89343b43d9b665dffd3bd8c58e4b389903d48/PyOpenGLView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
6120,
67,
261,
2890,
16,
4917,
4672,
3536,
10184,
326,
913,
434,
326,
4707,
3678,
11261,
1767,
791,
603,
5518,
18,
225,
1660,
3849,
333,
707,
316,
1353,
358,
3724,
603,
5518,
1450,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
6120,
67,
261,
2890,
16,
4917,
4672,
3536,
10184,
326,
913,
434,
326,
4707,
3678,
11261,
1767,
791,
603,
5518,
18,
225,
1660,
3849,
333,
707,
316,
1353,
358,
3724,
603,
5518,
1450,... |
""" | """ | def get_pylint_score(filename): """Run pylint and return the code score for FILENAME. If score cannot be detected, print an error and return -999999999. """ (dummy, pipe, dummy) = os.popen3("pylint %s" % filename) pylint_output = pipe.read() pylint_score = -999999999 pylint_score_matched = sre.search(r'Your code has been rated at ([0-9\.\-]+)\/10', pylint_output) if pylint_score_matched: pylint_score = pylint_score_matched.group(1) else: print "ERROR: cannot detect pylint score for %s" % filename return float(pylint_score) | 2a31ade3b7bdd723c16e0609c2db1b5982008949 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/2a31ade3b7bdd723c16e0609c2db1b5982008949/kwalitee.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2074,
5671,
67,
6355,
12,
3459,
4672,
3536,
1997,
7601,
471,
327,
326,
981,
4462,
364,
7527,
1985,
18,
225,
971,
4462,
2780,
506,
8316,
16,
1172,
392,
555,
471,
327,
300,
7991... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2074,
5671,
67,
6355,
12,
3459,
4672,
3536,
1997,
7601,
471,
327,
326,
981,
4462,
364,
7527,
1985,
18,
225,
971,
4462,
2780,
506,
8316,
16,
1172,
392,
555,
471,
327,
300,
7991... |
def get_index_dashboard(context): """ Returns the admin dashboard defined by the user or the default one. """ dashboard_cls = getattr( settings, 'ADMIN_TOOLS_INDEX_DASHBOARD', 'admin_tools.dashboard.dashboards.DefaultIndexDashboard' ) | def _get_dashboard_cls(dashboard_cls): | def get_dashboard(context, location): """ Returns the dashboard that match the given ``location`` (index or app_index). """ if location == 'index': return get_index_dashboard(context) elif location == 'app_index': return get_app_index_dashboard(context) raise ValueError('Invalid dashboard location: "%s"' % location) | f4bb74fd4405cd17ad0e5f78bf921a7f2b30e676 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8993/f4bb74fd4405cd17ad0e5f78bf921a7f2b30e676/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
13479,
12,
2472,
16,
2117,
4672,
3536,
2860,
326,
11825,
716,
845,
326,
864,
12176,
3562,
10335,
261,
1615,
578,
595,
67,
1615,
2934,
3536,
309,
2117,
422,
296,
1615,
4278,
327,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
13479,
12,
2472,
16,
2117,
4672,
3536,
2860,
326,
11825,
716,
845,
326,
864,
12176,
3562,
10335,
261,
1615,
578,
595,
67,
1615,
2934,
3536,
309,
2117,
422,
296,
1615,
4278,
327,... |
cpu_info = 1 | march_flag = 1 | def get_opt(self): import cpuinfo cpu = cpuinfo.cpuinfo() opt = ' -O3 -funroll-loops ' | 188c4df015fb031c9485d3640bc3dfa1b3e779c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/188c4df015fb031c9485d3640bc3dfa1b3e779c1/build_flib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3838,
12,
2890,
4672,
1930,
8326,
1376,
8326,
273,
8326,
1376,
18,
11447,
1376,
1435,
2153,
273,
296,
300,
51,
23,
300,
12125,
2693,
17,
383,
4473,
296,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3838,
12,
2890,
4672,
1930,
8326,
1376,
8326,
273,
8326,
1376,
18,
11447,
1376,
1435,
2153,
273,
296,
300,
51,
23,
300,
12125,
2693,
17,
383,
4473,
296,
2,
-100,
-100,
-100,
-... |
def setParameters(self, imageName): | def setParameters(self, imageName, timestamp, uploader): | def setParameters(self, imageName): """ Function to set parameters, now only image but maybe it can be used for others in "future" """ self.imageName = imageName # Defing the image's Page Object self.image = wikipedia.ImagePage(self.site, u'%s%s' % (self.image_namespace, self.imageName)) | 13ae2b2efc0f23258500db58afe50ac2fd09d224 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/13ae2b2efc0f23258500db58afe50ac2fd09d224/checkimages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22556,
12,
2890,
16,
29842,
16,
2858,
16,
25062,
4672,
3536,
4284,
358,
444,
1472,
16,
2037,
1338,
1316,
1496,
6944,
518,
848,
506,
1399,
364,
10654,
316,
315,
14343,
6,
3536,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22556,
12,
2890,
16,
29842,
16,
2858,
16,
25062,
4672,
3536,
4284,
358,
444,
1472,
16,
2037,
1338,
1316,
1496,
6944,
518,
848,
506,
1399,
364,
10654,
316,
315,
14343,
6,
3536,
365,
18,
... |
old_values_text[field] = self.get_value_text(cr,uid,field,old_values[field],model_object) res =fct_src( db, uid, passwd, object, method, *args) | old_values_text[field] = self.get_value_text(cr, uid, field, old_values[field], model_object) res =fct_src(db, uid, object, method, *args) | def log_fct(self, db, uid, passwd, object, method, fct_src, *args): logged_uids = [] pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() obj=pool.get(object) object_name=obj._name obj_ids= pool.get('ir.model').search(cr, uid,[('model','=',object_name)]) model_object=pool.get('ir.model').browse(cr,uid,obj_ids)[0] if method in ('create'): res_id = fct_src( db, uid, passwd, object, method, *args) cr.commit() new_value=pool.get(model_object.model).read(cr,uid,[res_id],args[0].keys())[0] if 'id' in new_value: del new_value['id'] if not len(logged_uids) or uid in logged_uids: resource_name = pool.get(model_object.model).name_get(cr,uid,[res_id]) resource_name = resource_name and resource_name[0][1] or '' id=pool.get('audittrail.log').create(cr, uid, {"method": method , "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resource_name}) lines=[] for field in new_value: if new_value[field]: line={ 'name':field, 'new_value':new_value[field], 'new_value_text': self.get_value_text(cr,uid,field,new_value[field],model_object) } lines.append(line) self.create_log_line(cr,uid,id,model_object,lines) cr.commit() cr.close() return res_id | d8781cd0f2eee29372e5a54862aa63c732ae3150 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/d8781cd0f2eee29372e5a54862aa63c732ae3150/audittrail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
67,
74,
299,
12,
2890,
16,
1319,
16,
4555,
16,
19093,
16,
733,
16,
707,
16,
28478,
67,
4816,
16,
380,
1968,
4672,
7545,
67,
21428,
273,
5378,
2845,
273,
2845,
264,
18,
588,
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,
613,
67,
74,
299,
12,
2890,
16,
1319,
16,
4555,
16,
19093,
16,
733,
16,
707,
16,
28478,
67,
4816,
16,
380,
1968,
4672,
7545,
67,
21428,
273,
5378,
2845,
273,
2845,
264,
18,
588,
67,
... |
byDefault = None, groupName = None, ref=None): | byDefault = None, groupName = None, ref = None, components = None): | def add(self, name, versionStr = None, flavor = None, source = None, byDefault = None, groupName = None, ref=None): groupNames = self._parseGroupNames(groupName) flavor = self._parseFlavor(flavor) # track this trove in the GroupRecipe so that it can be found # as a group with the rest of the troves. self.toFind.setdefault(ref, set()).add((name, versionStr, flavor)) if ref is not None: self.sources.add(ref) | ebb35f5a98dfff5be41a36d29e2d0b29839f78e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/ebb35f5a98dfff5be41a36d29e2d0b29839f78e7/grouprecipe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
508,
16,
1177,
1585,
273,
599,
16,
19496,
273,
599,
16,
1084,
273,
599,
16,
635,
1868,
273,
599,
16,
11619,
273,
599,
16,
1278,
273,
599,
16,
4085,
273,
599,
4672,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
508,
16,
1177,
1585,
273,
599,
16,
19496,
273,
599,
16,
1084,
273,
599,
16,
635,
1868,
273,
599,
16,
11619,
273,
599,
16,
1278,
273,
599,
16,
4085,
273,
599,
4672,... |
return self.data.has_key(ref(key)) | try: wr = ref(key) except TypeError: return 0 return self.data.has_key(wr) | def has_key(self, key): return self.data.has_key(ref(key)) | 3bae7ddf8e63889b185235f85a6695bc05d59059 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3bae7ddf8e63889b185235f85a6695bc05d59059/weakref.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
856,
12,
2890,
16,
498,
4672,
327,
365,
18,
892,
18,
5332,
67,
856,
12,
1734,
12,
856,
3719,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
711,
67,
856,
12,
2890,
16,
498,
4672,
327,
365,
18,
892,
18,
5332,
67,
856,
12,
1734,
12,
856,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
serviceType="Foo" component=" zope.app.component.tests.service.fooService" /> """ | serviceType="Foo" component="zope.app.component.tests.service.fooService" /> ''' | def testServiceConfigNoType(self): from zope.component.service \ import UndefinedService self.assertRaises( UndefinedService, xmlconfig, StringIO(template % ( """ <service serviceType="Foo" component=" zope.app.component.tests.service.fooService" /> """ ))) | f3220b3768925f7acfef6df62db125eae9ecb495 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9537/f3220b3768925f7acfef6df62db125eae9ecb495/test_servicedirective.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1179,
809,
2279,
559,
12,
2890,
4672,
628,
998,
1306,
18,
4652,
18,
3278,
521,
1930,
22243,
1179,
365,
18,
11231,
12649,
6141,
12,
22243,
1179,
16,
2025,
1425,
16,
15777,
12,
3202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1179,
809,
2279,
559,
12,
2890,
4672,
628,
998,
1306,
18,
4652,
18,
3278,
521,
1930,
22243,
1179,
365,
18,
11231,
12649,
6141,
12,
22243,
1179,
16,
2025,
1425,
16,
15777,
12,
3202,... |
source = l1.ll_items() | def ll_listslice_startonly(RESLIST, l1, start): len1 = l1.ll_length() newlength = len1 - start l = RESLIST.ll_newlist(newlength) newitems = l.ll_items() j = 0 source = l1.ll_items() i = start while i < len1: newitems[j] = source[i] i += 1 j += 1 return l | afabe8603c579750f81fa9c16896184dfa4a53b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/afabe8603c579750f81fa9c16896184dfa4a53b8/rlist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6579,
67,
1098,
6665,
67,
1937,
3700,
12,
7031,
7085,
16,
328,
21,
16,
787,
4672,
562,
21,
273,
328,
21,
18,
2906,
67,
2469,
1435,
394,
2469,
273,
562,
21,
300,
787,
328,
273,
12915,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1098,
6665,
67,
1937,
3700,
12,
7031,
7085,
16,
328,
21,
16,
787,
4672,
562,
21,
273,
328,
21,
18,
2906,
67,
2469,
1435,
394,
2469,
273,
562,
21,
300,
787,
328,
273,
12915,... | |
rv.append(" | def testSerializer(element): rv = [] rv.append("#document") def serializeElement(element, indent=0): if element.tag is DocumentType: rv.append("|%s<!DOCTYPE %s>"%(' '*indent, element.text)) elif element.tag is ElementTree.Comment: rv.append("|%s<!-- %s -->"%(' '*indent, element.text)) else: rv.append("|%s<%s>"%(' '*indent, element.tag)) if hasattr(element, "attrib"): for name, value in element.attrib.iteritems(): rv.append('|%s%s="%s"' % (' '*(indent+2), name, value)) if element.text: rv.append("|%s\"%s\"" %(' '*(indent+2), element.text)) indent += 2 for child in element.getchildren(): serializeElement(child, indent) if element.tail: rv.append("|%s\"%s\"" %(' '*(indent-2), element.tail)) serializeElement(element, 2) return "\n".join(rv) | 1dc8b007b00a166dd513d1e92aedaeded3991fcc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4487/1dc8b007b00a166dd513d1e92aedaeded3991fcc/etree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6306,
12,
2956,
4672,
5633,
273,
5378,
5633,
18,
6923,
2932,
7,
5457,
7923,
1652,
4472,
1046,
12,
2956,
16,
3504,
33,
20,
4672,
309,
930,
18,
2692,
353,
4319,
559,
30,
5633,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6306,
12,
2956,
4672,
5633,
273,
5378,
5633,
18,
6923,
2932,
7,
5457,
7923,
1652,
4472,
1046,
12,
2956,
16,
3504,
33,
20,
4672,
309,
930,
18,
2692,
353,
4319,
559,
30,
5633,
18,
... | |
self.assertRaises(TypeError, lambda: bytes(["0"])) self.assertRaises(TypeError, lambda: bytes([0.0])) self.assertRaises(TypeError, lambda: bytes([None])) self.assertRaises(TypeError, lambda: bytes([C()])) | self.assertRaises(TypeError, bytes, ["0"]) self.assertRaises(TypeError, bytes, [0.0]) self.assertRaises(TypeError, bytes, [None]) self.assertRaises(TypeError, bytes, [C()]) | def test_constructor_type_errors(self): class C: pass self.assertRaises(TypeError, lambda: bytes(["0"])) self.assertRaises(TypeError, lambda: bytes([0.0])) self.assertRaises(TypeError, lambda: bytes([None])) self.assertRaises(TypeError, lambda: bytes([C()])) | f1f6715cfa483cf547ba9cee0a1502db16586506 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/f1f6715cfa483cf547ba9cee0a1502db16586506/test_bytes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12316,
67,
723,
67,
4324,
12,
2890,
4672,
667,
385,
30,
1342,
365,
18,
11231,
12649,
6141,
12,
19030,
16,
3195,
30,
1731,
3816,
6,
20,
11929,
3719,
365,
18,
11231,
12649,
614... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12316,
67,
723,
67,
4324,
12,
2890,
4672,
667,
385,
30,
1342,
365,
18,
11231,
12649,
6141,
12,
19030,
16,
3195,
30,
1731,
3816,
6,
20,
11929,
3719,
365,
18,
11231,
12649,
614... |
load.append(item) | load.append(dep) | def buildShallowDeps(): # Notes: # load time = before class = require # runtime = after class = use | 9fcc2e06b607aced774242b3f05d49061c46732e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/9fcc2e06b607aced774242b3f05d49061c46732e/DependencyLoader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
1555,
5965,
14430,
13332,
468,
29584,
30,
468,
1262,
813,
273,
1865,
667,
273,
2583,
468,
3099,
273,
1839,
667,
273,
999,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
1555,
5965,
14430,
13332,
468,
29584,
30,
468,
1262,
813,
273,
1865,
667,
273,
2583,
468,
3099,
273,
1839,
667,
273,
999,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
f = _open(self._dirfile, 'a') | f = _open(self._dirfile, 'a', self._mode) | def _addkey(self, key, (pos, siz)): self._index[key] = (pos, siz) f = _open(self._dirfile, 'a') f.write("%s, (%s, %s)\n" % (`key`, `pos`, `siz`)) f.close() | 2c8373bc234039fff699df9c28d2cb74efd6a37c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2c8373bc234039fff699df9c28d2cb74efd6a37c/dumbdbm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
856,
12,
2890,
16,
498,
16,
261,
917,
16,
272,
452,
3719,
30,
365,
6315,
1615,
63,
856,
65,
273,
261,
917,
16,
272,
452,
13,
284,
273,
389,
3190,
12,
2890,
6315,
1214,
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,
389,
1289,
856,
12,
2890,
16,
498,
16,
261,
917,
16,
272,
452,
3719,
30,
365,
6315,
1615,
63,
856,
65,
273,
261,
917,
16,
272,
452,
13,
284,
273,
389,
3190,
12,
2890,
6315,
1214,
7... |
documents[title_lbl][letter].append({'uri':subj, 'sortkey':sorttitle, 'title':sorttitle, 'leader':title.replace(sorttitle,'')}) | if letter.isalpha(): pagetitles[letter] = u'Frfattningar som brjar p "%s"' % letter.upper() pagelabels[letter] = letter.upper() documents[title_lbl][letter].append({'uri':subj, 'sortkey':sorttitle, 'title':sorttitle, 'leader':title.replace(sorttitle,'')}) | def _build_indexpages(self, by_pred_obj, by_subj_pred): documents = defaultdict(lambda:defaultdict(list)) pagetitles = {} pagelabels = {} fsnr_pred = Util.ns['rinfo']+'fsNummer' title_pred = Util.ns['dct']+'title' type_pred = Util.ns['rdf']+'type' type_obj = Util.ns['rinfo']+'KonsolideradGrundforfattning' year_lbl = u'Ordnade efter utgivningsr' title_lbl = u'Ordnade efter titel' # construct the 404 page doc = u'''<?xml version="1.0"?> | 790e5f49889d891c35b2d7558f04a08af0d115bf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4027/790e5f49889d891c35b2d7558f04a08af0d115bf/SFS.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3510,
67,
1615,
7267,
12,
2890,
16,
635,
67,
6510,
67,
2603,
16,
635,
67,
1717,
78,
67,
6510,
4672,
7429,
273,
13090,
12,
14661,
30,
1886,
1576,
12,
1098,
3719,
4262,
278,
9398,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3510,
67,
1615,
7267,
12,
2890,
16,
635,
67,
6510,
67,
2603,
16,
635,
67,
1717,
78,
67,
6510,
4672,
7429,
273,
13090,
12,
14661,
30,
1886,
1576,
12,
1098,
3719,
4262,
278,
9398,
... |
UTILS = Utils() UTILS.create_test_table() UTILS.blank_table() UTILS.blank_database() | utils = Utils() print "uncomment the things you want to run, or else nothing will happen" | def blank_database(self): print 'entered the function' self.session self.db_metadata.reflect() self.db_metadata.drop_all() self.db_metadata.create_all(bind=self.pg_db) self.session.commit() print 'all tables dropped' | 13d8d74a60da6aac60ebf6da34db4c701bc16d5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9116/13d8d74a60da6aac60ebf6da34db4c701bc16d5b/postgresutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7052,
67,
6231,
12,
2890,
4672,
1172,
296,
2328,
329,
326,
445,
11,
365,
18,
3184,
225,
365,
18,
1966,
67,
4165,
18,
1734,
1582,
1435,
365,
18,
1966,
67,
4165,
18,
7285,
67,
454,
143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7052,
67,
6231,
12,
2890,
4672,
1172,
296,
2328,
329,
326,
445,
11,
365,
18,
3184,
225,
365,
18,
1966,
67,
4165,
18,
1734,
1582,
1435,
365,
18,
1966,
67,
4165,
18,
7285,
67,
454,
143... |
from errno import ENOENT, ENOTDIR | def _execvpe(file, args, env=None): from errno import ENOENT, ENOTDIR if env is not None: func = execve argrest = (args, env) else: func = execv argrest = (args,) env = environ head, tail = path.split(file) if head: func(file, *argrest) return if 'PATH' in env: envpath = env['PATH'] else: envpath = defpath PATH = envpath.split(pathsep) saved_exc = None saved_tb = None for dir in PATH: fullname = path.join(dir, file) try: func(fullname, *argrest) except error, e: tb = sys.exc_info()[2] if (e.errno != ENOENT and e.errno != ENOTDIR and saved_exc is None): saved_exc = e saved_tb = tb if saved_exc: raise error, saved_exc, saved_tb raise error, e, tb | b130743e97410ba2b6c23d69df80e2ecea9d652b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b130743e97410ba2b6c23d69df80e2ecea9d652b/os.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4177,
90,
347,
12,
768,
16,
833,
16,
1550,
33,
7036,
4672,
309,
1550,
353,
486,
599,
30,
1326,
273,
1196,
537,
1501,
8792,
273,
261,
1968,
16,
1550,
13,
469,
30,
1326,
273,
1196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4177,
90,
347,
12,
768,
16,
833,
16,
1550,
33,
7036,
4672,
309,
1550,
353,
486,
599,
30,
1326,
273,
1196,
537,
1501,
8792,
273,
261,
1968,
16,
1550,
13,
469,
30,
1326,
273,
1196... | |
return "%0.2f" % value | return u'%0.2f' % value | def render(self, context): # FIXME this needs to be documentet and explainded alot better # FIXME store transaction with select related to reduce query count entry = self.entry.resolve(context) value = self.value.resolve(context) | f0e078d297b549bb662c1e54365d71effdb26ff8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12178/f0e078d297b549bb662c1e54365d71effdb26ff8/ufs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
819,
4672,
468,
9852,
333,
4260,
358,
506,
1668,
278,
471,
19765,
785,
524,
352,
7844,
468,
9852,
1707,
2492,
598,
2027,
3746,
358,
5459,
843,
1056,
1241,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
819,
4672,
468,
9852,
333,
4260,
358,
506,
1668,
278,
471,
19765,
785,
524,
352,
7844,
468,
9852,
1707,
2492,
598,
2027,
3746,
358,
5459,
843,
1056,
1241,
273,
365,
... |
c.bookmarkPage("P3_XYZ",fitType="XYZ",top=7*inch,left=3*inch,zoom=0) | c.bookmarkPage("P3_XYZ",fit="XYZ",top=7*inch,left=3*inch,zoom=0) | def test1(self): | f811a1779ad79be84f8ef41d8fa39ca75e2645cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/f811a1779ad79be84f8ef41d8fa39ca75e2645cc/test_pdfgen_links.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
21,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
21,
12,
2890,
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,
-10... |
def hiddenfield(name, size=40, value=None, disabled=False): | def hiddenfield(name, value=None, size=40, disabled=False): | def hiddenfield(name, size=40, value=None, disabled=False): enabled = '' if disabled: enabled = ' disabled="disabled"' if value is None: return '<input type="hidden" name="%s" id="%s" size="%s"%s>' % (name, name, size, enabled) else: return '<input type="hidden" name="%s" id="%s" size="%s" value="%s"%s>' % (name, name, size, value, enabled) | 66989f20b105b1f24e61bae073bec1294e63d294 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12856/66989f20b105b1f24e61bae073bec1294e63d294/helpers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5949,
1518,
12,
529,
16,
460,
33,
7036,
16,
963,
33,
7132,
16,
5673,
33,
8381,
4672,
3696,
273,
875,
309,
5673,
30,
3696,
273,
296,
5673,
1546,
9278,
5187,
309,
460,
353,
599,
30,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5949,
1518,
12,
529,
16,
460,
33,
7036,
16,
963,
33,
7132,
16,
5673,
33,
8381,
4672,
3696,
273,
875,
309,
5673,
30,
3696,
273,
296,
5673,
1546,
9278,
5187,
309,
460,
353,
599,
30,
32... |
" xpc_qsACString ${name}(cx, ${argPtr});\n" | " xpc_qsACString ${name}(cx, ${argVal}, ${argPtr});\n" | def replacement(match): return vals[match.group(1)] | 547c9137fe7f5061409005e05ec145bbf18f5ab6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/547c9137fe7f5061409005e05ec145bbf18f5ab6/qsgen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6060,
12,
1916,
4672,
327,
5773,
63,
1916,
18,
1655,
12,
21,
25887,
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,
6060,
12,
1916,
4672,
327,
5773,
63,
1916,
18,
1655,
12,
21,
25887,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.import_contact(filename, dialog.get_extra_widget().get_active()) | last = self.import_contact(filename, dialog.get_extra_widget().get_active()) if last is not None: self.contactSelection.unselect_all() self.contactSelection.select_iter(last) if dialog.get_extra_widget().get_active(): self.revertButton_clicked() | def openButton_clicked(self, widget): dialog = gtk.FileChooserDialog(title=_("Open Contacts"),action=gtk.FILE_CHOOSER_ACTION_OPEN,buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK)) dialog.set_default_response(gtk.RESPONSE_OK) dialog.set_select_multiple(True) dialog.set_extra_widget(gtk.CheckButton(_("Import to contactlist"))) filter = gtk.FileFilter() filter.set_name(_("vCard Files")) filter.add_mime_type("application/vcard") filter.add_mime_type("text/x-vcard") dialog.add_filter(filter) filter = gtk.FileFilter() filter.set_name(_("All Files")) filter.add_pattern("*") dialog.add_filter(filter) | d146007907c6581d8d80f2f60d1a7f1efdee1728 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/d146007907c6581d8d80f2f60d1a7f1efdee1728/arkadas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
3616,
67,
7475,
329,
12,
2890,
16,
3604,
4672,
6176,
273,
22718,
18,
812,
17324,
6353,
12,
2649,
33,
67,
2932,
3678,
13329,
87,
6,
3631,
1128,
33,
4521,
79,
18,
3776,
67,
22213,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
3616,
67,
7475,
329,
12,
2890,
16,
3604,
4672,
6176,
273,
22718,
18,
812,
17324,
6353,
12,
2649,
33,
67,
2932,
3678,
13329,
87,
6,
3631,
1128,
33,
4521,
79,
18,
3776,
67,
22213,
... |
if section == DEFAULTSECT: sectdict = {} else: | if section != DEFAULTSECT: | def get(self, section, option, raw=0, vars=None): """Get an option value for a given section. | 92ed640936b92665295d98ba8eae84e2874ec357 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/92ed640936b92665295d98ba8eae84e2874ec357/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
2442,
16,
1456,
16,
1831,
33,
20,
16,
4153,
33,
7036,
4672,
3536,
967,
392,
1456,
460,
364,
279,
864,
2442,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
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,
16,
2442,
16,
1456,
16,
1831,
33,
20,
16,
4153,
33,
7036,
4672,
3536,
967,
392,
1456,
460,
364,
279,
864,
2442,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
'tools.digest_auth.realm' : _('Password to access your calibre library. Username is ') + opts.username.strip(), | 'tools.digest_auth.realm' : (_('Password to access your calibre library. Username is ') + opts.username.strip()).encode('ascii', 'replace'), | def __init__(self, db, opts, embedded=False, show_tracebacks=True): self.db = db for item in self.db: item break self.opts = opts cherrypy.config.update({ 'log.screen' : opts.develop, 'engine.autoreload_on' : opts.develop, 'tools.log_headers.on' : opts.develop, 'checker.on' : opts.develop, 'request.show_tracebacks': show_tracebacks, 'server.socket_host' : '0.0.0.0', 'server.socket_port' : opts.port, 'server.socket_timeout' : opts.timeout, #seconds 'server.thread_pool' : opts.thread_pool, # number of threads }) if embedded: cherrypy.config.update({'engine.SIGHUP' : None, 'engine.SIGTERM' : None,}) self.config = {'global': { 'tools.gzip.on' : True, 'tools.gzip.mime_types': ['text/html', 'text/plain', 'text/xml', 'text/javascript', 'text/css'], }} if opts.password: self.config['/'] = { 'tools.digest_auth.on' : True, 'tools.digest_auth.realm' : _('Password to access your calibre library. Username is ') + opts.username.strip(), 'tools.digest_auth.users' : {opts.username.strip():opts.password.strip()}, } self.is_running = False self.exception = None | 6e0b40dac5effa75c6826243e58f5a6f3e1cd5ba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/6e0b40dac5effa75c6826243e58f5a6f3e1cd5ba/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1319,
16,
1500,
16,
7488,
33,
8381,
16,
2405,
67,
21696,
87,
33,
5510,
4672,
365,
18,
1966,
273,
1319,
364,
761,
316,
365,
18,
1966,
30,
761,
898,
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,
2890,
16,
1319,
16,
1500,
16,
7488,
33,
8381,
16,
2405,
67,
21696,
87,
33,
5510,
4672,
365,
18,
1966,
273,
1319,
364,
761,
316,
365,
18,
1966,
30,
761,
898,
365,... |
return removals | Returns: The IE automation object. """ ie = win32com.client.Dispatch("InternetExplorer.Application") ie.visible = 1 win32gui.SetForegroundWindow(ie.HWND) return ie | def CollectRemovals(remove_re, inputs): '''Returns a list of all object files in inputs that match remove_re.''' removals = [] for input in inputs: output = Shell('lib.exe', '/list', input) for line in output: line = line.rstrip() if remove_re.search(line): removals.append(line) return removals | 5c80bacdeec1e58b38000c7c00b6be6a2214b4c2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/5c80bacdeec1e58b38000c7c00b6be6a2214b4c2/cf_cycler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9302,
4579,
1031,
12,
4479,
67,
266,
16,
4540,
4672,
9163,
1356,
279,
666,
434,
777,
733,
1390,
316,
4540,
716,
845,
1206,
67,
266,
1093,
6309,
2797,
1031,
273,
5378,
364,
810,
316,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9302,
4579,
1031,
12,
4479,
67,
266,
16,
4540,
4672,
9163,
1356,
279,
666,
434,
777,
733,
1390,
316,
4540,
716,
845,
1206,
67,
266,
1093,
6309,
2797,
1031,
273,
5378,
364,
810,
316,
45... |
if cl.super: | if hasattr(cl, 'super') and cl.super: | def listclasses(self): dir, file = os.path.split(self.file) name, ext = os.path.splitext(file) if os.path.normcase(ext) != ".py": return [] try: dict = pyclbr.readmodule_ex(name, [dir] + sys.path) except ImportError, msg: return [] items = [] self.classes = {} for key, cl in dict.items(): if cl.module == name: s = key if cl.super: supers = [] for sup in cl.super: if type(sup) is type(''): sname = sup else: sname = sup.name if sup.module != cl.module: sname = "%s.%s" % (sup.module, sname) supers.append(sname) s = s + "(%s)" % ", ".join(supers) items.append((cl.lineno, s)) self.classes[s] = cl items.sort() list = [] for item, s in items: list.append(s) return list | 6550051691d604c728ed56e4acf90dc6535981f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6550051691d604c728ed56e4acf90dc6535981f9/ClassBrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
4701,
12,
2890,
4672,
1577,
16,
585,
273,
1140,
18,
803,
18,
4939,
12,
2890,
18,
768,
13,
508,
16,
1110,
273,
1140,
18,
803,
18,
4939,
408,
12,
768,
13,
309,
1140,
18,
803,
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,
666,
4701,
12,
2890,
4672,
1577,
16,
585,
273,
1140,
18,
803,
18,
4939,
12,
2890,
18,
768,
13,
508,
16,
1110,
273,
1140,
18,
803,
18,
4939,
408,
12,
768,
13,
309,
1140,
18,
803,
18... |
def _register(factory, cls, synonym=True, in_builtin=True): | def _register(factory, cls, in_builtin=True, synonym=True): | def _register(factory, cls, synonym=True, in_builtin=True): """ Register factory as type cls. If builtin is a true value (which is the default), also register the type as a built-in. If synonym is non-empty, also register the type in this very module under its synonym. """ pypy.registertype(factory, cls) if in_builtin: if isinstance(str, in_builtin): typename = in_builtin else: typename = cls.__name__ setattr(__builtin__, typename, cls) if synonym: if isinstance(str, synonym): typename = synonym else: typename = cls.__name__.title() + 'Type' setattr(_types, typename, cls) | 517fbcab873cd86980a33fe509281d732ca83ecc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/517fbcab873cd86980a33fe509281d732ca83ecc/_types.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4861,
12,
6848,
16,
2028,
16,
316,
67,
24553,
33,
5510,
16,
26308,
33,
5510,
4672,
3536,
5433,
3272,
487,
618,
2028,
18,
971,
15273,
353,
279,
638,
460,
261,
12784,
353,
326,
805,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4861,
12,
6848,
16,
2028,
16,
316,
67,
24553,
33,
5510,
16,
26308,
33,
5510,
4672,
3536,
5433,
3272,
487,
618,
2028,
18,
971,
15273,
353,
279,
638,
460,
261,
12784,
353,
326,
805,... |
iter = buffer.get_iter_at_mark(buffer.get_insert()) mark = buffer.create_mark(None, iter) iter.backward_char() with buffer.user_action: start = iter.copy() if buffer.iter_backward_word_start(start): word = start.get_text(iter) self.emit('end-of-word', start, iter, word) if signal == 'end-of-line': self.emit('end-of-line', iter) buffer.place_cursor(buffer.get_iter_at_mark(mark)) self.scroll_mark_onscreen(mark) buffer.delete_mark(mark) | def _insert_and_emit(self, char, signal): # Helper method for emitting end-of-word and end-of-line signals # First insert char, then call the signal and reset the cursor. This # way anything the signal does goes after the insert on the undo stack. # end-of-line implies end-of-word before it assert signal in ('end-of-word', 'end-of-line') buffer = self.get_buffer() | d717425ec286b5fe4cdde8a913785456666fb516 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4103/d717425ec286b5fe4cdde8a913785456666fb516/pageview.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6387,
67,
464,
67,
18356,
12,
2890,
16,
1149,
16,
4277,
4672,
468,
9705,
707,
364,
3626,
1787,
679,
17,
792,
17,
1095,
471,
679,
17,
792,
17,
1369,
11505,
468,
5783,
2243,
1149,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6387,
67,
464,
67,
18356,
12,
2890,
16,
1149,
16,
4277,
4672,
468,
9705,
707,
364,
3626,
1787,
679,
17,
792,
17,
1095,
471,
679,
17,
792,
17,
1369,
11505,
468,
5783,
2243,
1149,
... | |
""" | """) | def write_proxyconf (self): """write proxy configuration""" f = file(proxyconf_file()) f.write("""<?xml version="1.0"?> | d5245fe6916d96fbd7e23dec5cc460cf979205bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/d5245fe6916d96fbd7e23dec5cc460cf979205bc/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
5656,
3923,
261,
2890,
4672,
3536,
2626,
2889,
1664,
3660,
7923,
284,
273,
585,
12,
5656,
3923,
67,
768,
10756,
284,
18,
2626,
2932,
3660,
12880,
2902,
1177,
1546,
21,
18,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
5656,
3923,
261,
2890,
4672,
3536,
2626,
2889,
1664,
3660,
7923,
284,
273,
585,
12,
5656,
3923,
67,
768,
10756,
284,
18,
2626,
2932,
3660,
12880,
2902,
1177,
1546,
21,
18,
20,
... |
body += ' ' + _("Password:") + " %s\n" % ("*" * len(password)) | body += ' ' + _("Password:") + " %s\n" % ("*" * len(str(password))) | def send_account_activated_message(account_email, send_to, password, ln=CFG_SITE_LANG): """Send an email to the address given by send_to about the new activated account.""" _ = gettext_set_language(ln) sub = _("Your account on '%s' has been activated") % CFG_SITE_NAME body = _("Your account earlier created on '%s' has been activated:") \ % CFG_SITE_NAME + '\n\n' body += ' ' + _("Username/Email:") + " %s\n" % account_email body += ' ' + _("Password:") + " %s\n" % ("*" * len(password)) body += "\n---------------------------------" body += "\n%s" % CFG_SITE_NAME return send_email(CFG_SITE_SUPPORT_EMAIL, send_to, sub, body, header='') | 8810b7577517bd09983e6619dbcc9390f71d279b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1931/8810b7577517bd09983e6619dbcc9390f71d279b/webaccessadmin_lib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
4631,
67,
18836,
67,
2150,
12,
4631,
67,
3652,
16,
1366,
67,
869,
16,
2201,
16,
7211,
33,
19727,
67,
20609,
67,
10571,
4672,
3536,
3826,
392,
2699,
358,
326,
1758,
864,
635,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
4631,
67,
18836,
67,
2150,
12,
4631,
67,
3652,
16,
1366,
67,
869,
16,
2201,
16,
7211,
33,
19727,
67,
20609,
67,
10571,
4672,
3536,
3826,
392,
2699,
358,
326,
1758,
864,
635,
... |
f = StringIO(filename) | f = tempfile.TemporaryFile() f.write(archive.read(filename)) f.seek(0) | def import_data(self, metadata, output): | c420e0e495d40dc777b6cb8ec243f73b7d7b1766 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14173/c420e0e495d40dc777b6cb8ec243f73b7d7b1766/postcodes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
892,
12,
2890,
16,
1982,
16,
876,
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,... | [
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,
1930,
67,
892,
12,
2890,
16,
1982,
16,
876,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
config.loadFromFile(self.CONFIG_FILE) | config.loadFromFile(self.CONFIG_FILE, True) | def load(self): try: config.loadFromFile(self.CONFIG_FILE) except IOError, e: print "unable to load config (%s), assuming defaults..." % str(e) | 95e2b1d28f81fbeb01e558286806887c556d7a98 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/95e2b1d28f81fbeb01e558286806887c556d7a98/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
2890,
4672,
775,
30,
642,
18,
945,
13087,
12,
2890,
18,
7203,
67,
3776,
16,
1053,
13,
1335,
8340,
16,
425,
30,
1172,
315,
18828,
358,
1262,
642,
6142,
87,
3631,
15144,
3467,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
2890,
4672,
775,
30,
642,
18,
945,
13087,
12,
2890,
18,
7203,
67,
3776,
16,
1053,
13,
1335,
8340,
16,
425,
30,
1172,
315,
18828,
358,
1262,
642,
6142,
87,
3631,
15144,
3467,
... |
if not hasattr(self, '_notifications'): return | def closeView(self): """ Close this repository view. | 47fbd3eec4a1d033ab75d414d2001f42e847a575 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/47fbd3eec4a1d033ab75d414d2001f42e847a575/RepositoryView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
1767,
12,
2890,
4672,
3536,
3527,
333,
3352,
1476,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
1767,
12,
2890,
4672,
3536,
3527,
333,
3352,
1476,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
GnuCompile = "gcc -g -fPIC " | def Boot(): global BuildLocal BuildLocal += " -boot -keep " Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. GnuCompile = "gcc -g -fPIC " SunCompile = "cc -g -mt -xcode=pic32 -xldscope=symbolic " Compile = { "SOLsun" : SunCompile, "SPARC64_SOLARIS" : SunCompile, }.get(Target) or GnuCompile Compile = Compile + ({ "AMD64_LINUX" : " -m64 -mno-align-double ", "ARM_DARWIN" : " -march=armv6 -mcpu=arm1176jzf-s ", "LINUXLIBC6" : " -m32 -mno-align-double ", "MIPS64_OPENBSD" : " -mabi=64 ", "SOLsun" : " -xarch=v8plus ", "SPARC32_LINUX" : " -m32 -munaligned-doubles ", "SPARC64_LINUX" : " -m64 -munaligned-doubles ", "SPARC64_SOLARIS" : " -xarch=v9 ", }.get(Target) or " ") SunLink = " -lrt -lm -lnsl -lsocket -lpthread " Link = Compile + ({ "ARM_DARWIN" : " ", "AMD64_DARWIN" : " ", "I386_DARWIN" : " ", "PPC_DARWIN" : " ", "PPC64_DARWIN" : " ", # SOLgnu? "SOLsun" : SunLink, "SPARC64_SOLARIS" : SunLink, "PA32_HPUX" : " -lrt -lm ", }.get(Target) or " -lm -lpthread ") # not in Link Compile += " -c " Assemble = ("as " + ({ "AMD64_LINUX" : " --64 ", "ARM_DARWIN" : " -arch armv6 ", "LINUXLIBC6" : " --32 ", "SPARC32_LINUX" : " -32 ", "SPARC64_LINUX" : " -64 ", "SPARC64_LINUX" : " -64 -Av9 ", "SOLsun" : " -s -K PIC -xarch=v8plus ", "SPARC64_SOLARIS" : " -s -K PIC -xarch=v9 ", }.get(Target) or "")) GnuPlatformPrefix = { "ARM_DARWIN" : "arm-apple-darwin8-", }.get(Target) or "" Compile = GnuPlatformPrefix + Compile Link = GnuPlatformPrefix + Link Assemble = GnuPlatformPrefix + Assemble # # squeeze runs of spaces and spaces at end # Compile = re.sub(" +", " ", Compile) Compile = re.sub(" +$", "", Compile) Link = re.sub(" +", " ", Link) Link = re.sub(" +$", "", Link) Assemble = re.sub(" +", " ", Assemble) Assemble = re.sub(" +$", "", Assemble) BootDir = "./cm3-boot-" + Target + "-" + Version P = [ "import-libs", "m3core", "libm3", "sysutils", "m3middle", "m3quake", "m3objfile", "m3linker", "m3back", "m3front", "cm3" ] if Target == "NT386": P += ["mklib"] #DoPackage(["", "realclean"] + P) or sys.exit(1) DoPackage(["", "buildlocal"] + P) or sys.exit(1) try: shutil.rmtree(BootDir) except: pass try: os.mkdir(BootDir) except: pass # # This would probably be a good use of XSL (xml style sheets) # Make = open(os.path.join(BootDir, "make.sh"), "wb") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") UpdateSource = open(os.path.join(BootDir, "updatesource.sh"), "wb") Makefile.write(".SUFFIXES:\nall: cm3\n\n") for a in [UpdateSource, Make]: a.write("#!/bin/sh\n\nset -e\nset -x\n\n") for a in [Makefile]: a.write("# edit up here\n\n") a.write("Assemble=" + Assemble + "\nCompile=" + Compile + "\nLink=" + Link + "\n") a.write("\n\n# no more editing should be needed\n\n") for a in [Make]: a.write("Assemble=\"" + Assemble + "\"\nCompile=\"" + Compile + "\"\nLink=\"" + Link + "\"\n") for q in P: dir = GetPackagePath(q) for a in os.listdir(os.path.join(Root, dir, Config)): if (a.endswith(".ms") or a.endswith(".is") or a.endswith(".s") or a.endswith(".c")): CopyFile(os.path.join(Root, dir, Config, a), BootDir) Makefile.write("Objects += " + a + ".o\n" + a + ".o: " + a + "\n\t") if a.endswith(".c"): Command = "Compile" else: Command = "Assemble" for b in [Make, Makefile]: b.write("${" + Command + "} " + a + " -o " + a + ".o\n") if a.endswith(".h"): CopyFile(os.path.join(Root, dir, Config, a), BootDir) Makefile.write("cm3: $(Objects)\n\t") for a in [Make, Makefile]: a.write("$(Link) -o cm3 *.o\n") Common = "Common" for a in [ # # Add to this list as needed. # Adding more than necessary is ok -- assume the target system has no changes, # so we can replace whatever is there. # "m3-libs/libm3/src/os/POSIX/OSConfigPosix.m3", "m3-libs/libm3/src/random/m3makefile", "m3-libs/m3core/src/m3makefile", "m3-libs/m3core/src/Uwaitpid.quake", "m3-libs/m3core/src/thread.quake", "m3-libs/m3core/src/C/m3makefile", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/" + Common + "/m3makefile", "m3-libs/m3core/src/Csupport/m3makefile", "m3-libs/m3core/src/float/m3makefile", "m3-libs/m3core/src/runtime/m3makefile", "m3-libs/m3core/src/runtime/common/m3makefile", "m3-libs/m3core/src/runtime/common/Compiler.tmpl", "m3-libs/m3core/src/runtime/common/m3text.h", "m3-libs/m3core/src/runtime/common/RTError.h", "m3-libs/m3core/src/runtime/common/RTMachine.i3", "m3-libs/m3core/src/runtime/common/RTProcess.h", "m3-libs/m3core/src/runtime/common/RTSignalC.c", "m3-libs/m3core/src/runtime/common/RTSignalC.h", "m3-libs/m3core/src/runtime/common/RTSignalC.i3", "m3-libs/m3core/src/runtime/common/RTSignal.i3", "m3-libs/m3core/src/runtime/common/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/m3makefile", "m3-libs/m3core/src/runtime/" + Target + "/RTMachine.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTThread.m3", "m3-libs/m3core/src/text/TextLiteral.i3", "m3-libs/m3core/src/thread/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThread.m3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.i3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.c", "m3-libs/m3core/src/time/POSIX/m3makefile", "m3-libs/m3core/src/unix/m3makefile", "m3-libs/m3core/src/unix/linux-32/m3makefile", "m3-libs/m3core/src/unix/linux-64/m3makefile", "m3-libs/m3core/src/unix/freebsd-common/m3makefile", "m3-libs/m3core/src/unix/freebsd-common/Uerror.i3", "m3-libs/m3core/src/unix/freebsd-common/Usysdep.i3", "m3-libs/m3core/src/unix/freebsd-common/Uucontext.i3", "m3-libs/m3core/src/unix/Common/m3makefile", "m3-libs/m3core/src/unix/Common/m3unix.h", "m3-libs/m3core/src/unix/Common/Udir.i3", "m3-libs/m3core/src/unix/Common/UdirC.c", "m3-libs/m3core/src/unix/Common/Usignal.i3", "m3-libs/m3core/src/unix/Common/Ustat.i3", "m3-libs/m3core/src/unix/Common/UstatC.c", "m3-libs/m3core/src/unix/Common/UtimeC.c", "m3-libs/m3core/src/unix/Common/Uucontext.i3", "m3-sys/cminstall/src/config-no-install/SOLgnu", "m3-sys/cminstall/src/config-no-install/SOLsun", "m3-sys/cminstall/src/config-no-install/Solaris.common", "m3-sys/cminstall/src/config-no-install/Unix.common", "m3-sys/cminstall/src/config-no-install/cm3cfg.common", "m3-sys/cminstall/src/config-no-install/" + Target, "m3-sys/m3cc/src/m3makefile", "m3-sys/m3cc/src/gcc/m3cg/parse.c", "m3-sys/m3middle/src/Target.i3", "m3-sys/m3middle/src/Target.m3", "scripts/python/pylib.py", "m3-libs/m3core/src/C/" + Target + "/Csetjmp.i3", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/" + Common + "/Csetjmp.i3", "m3-libs/m3core/src/C/" + Common + "/Csignal.i3", "m3-libs/m3core/src/C/" + Common + "/Cstdio.i3", "m3-libs/m3core/src/C/" + Common + "/Cstring.i3", "m3-libs/m3core/src/C/" + Common + "/m3makefile", ]: source = os.path.join(Root, a) if FileExists(source): name = GetLastPathElement(a) reldir = RemoveLastPathElement(a) destdir = os.path.join(BootDir, reldir) dest = os.path.join(destdir, name) try: os.makedirs(destdir) except: pass CopyFile(source, dest) for b in [UpdateSource, Make]: b.write("mkdir -p /dev2/cm3/" + reldir + "\n") b.write("cp " + a + " /dev2/cm3/" + a + "\n") for a in [UpdateSource, Make, Makefile]: a.close() _MakeArchive(BootDir[2:]) | 4c56a15827eff87f8dcc29982501966f7fa52d97 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9328/4c56a15827eff87f8dcc29982501966f7fa52d97/pylib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26254,
13332,
225,
2552,
3998,
2042,
3998,
2042,
1011,
315,
300,
7137,
300,
10102,
315,
225,
4049,
273,
315,
21,
6,
225,
468,
1220,
1779,
353,
16975,
628,
326,
642,
1390,
18,
468,
399,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26254,
13332,
225,
2552,
3998,
2042,
3998,
2042,
1011,
315,
300,
7137,
300,
10102,
315,
225,
4049,
273,
315,
21,
6,
225,
468,
1220,
1779,
353,
16975,
628,
326,
642,
1390,
18,
468,
399,
... | |
return invoice | return True | def valid_invoice(self): for invoice in self.invoices: if invoice.void == False: return invoice return False | 5575ce2c1c63f2c8f41e3fa40131d05fdd794874 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12856/5575ce2c1c63f2c8f41e3fa40131d05fdd794874/domain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
923,
67,
16119,
12,
2890,
4672,
364,
9179,
316,
365,
18,
5768,
17725,
30,
309,
9179,
18,
6459,
422,
1083,
30,
327,
1053,
327,
1083,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
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,
923,
67,
16119,
12,
2890,
4672,
364,
9179,
316,
365,
18,
5768,
17725,
30,
309,
9179,
18,
6459,
422,
1083,
30,
327,
1053,
327,
1083,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
assert gc.collect() == 1 | if gc.collect() != 1: raise TestFailed | def test_list(): l = [] l.append(l) gc.collect() del l assert gc.collect() == 1 | 419afec2d7b22fe8cf5fdba072bbc63384a4dad6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/419afec2d7b22fe8cf5fdba072bbc63384a4dad6/test_gc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1098,
13332,
328,
273,
5378,
328,
18,
6923,
12,
80,
13,
8859,
18,
14676,
1435,
1464,
328,
309,
8859,
18,
14676,
1435,
480,
404,
30,
1002,
7766,
2925,
225,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1098,
13332,
328,
273,
5378,
328,
18,
6923,
12,
80,
13,
8859,
18,
14676,
1435,
1464,
328,
309,
8859,
18,
14676,
1435,
480,
404,
30,
1002,
7766,
2925,
225,
2,
-100,
-100,
-100... |
return context['table'].reduceColumn(TargetCounterColumn(None, 'forever'), max) > 0 | return context['table'].reduceColumn(self.visibilityColumn, max) > 0 | def isVisible(self, context): # Hide this column if none of the targets have had any messages return context['table'].reduceColumn(TargetCounterColumn(None, 'forever'), max) > 0 | db92a2ea2cdda5a948c00a96b46cef4d30868afd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/db92a2ea2cdda5a948c00a96b46cef4d30868afd/StatsBrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20453,
12,
2890,
16,
819,
4672,
468,
25180,
333,
1057,
309,
6555,
434,
326,
5774,
1240,
9323,
1281,
2743,
327,
819,
3292,
2121,
29489,
12498,
1494,
12,
2326,
4789,
1494,
12,
7036,
16,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20453,
12,
2890,
16,
819,
4672,
468,
25180,
333,
1057,
309,
6555,
434,
326,
5774,
1240,
9323,
1281,
2743,
327,
819,
3292,
2121,
29489,
12498,
1494,
12,
2326,
4789,
1494,
12,
7036,
16,
29... |
address = self.__getaddr('TO:', arg) | address = self.__getaddr('TO:', arg) if arg else None | def smtp_RCPT(self, arg): print >> DEBUGSTREAM, '===> RCPT', arg if not self.__mailfrom: self.push('503 Error: need MAIL command') return address = self.__getaddr('TO:', arg) if not address: self.push('501 Syntax: RCPT TO: <address>') return self.__rcpttos.append(address) print >> DEBUGSTREAM, 'recips:', self.__rcpttos self.push('250 Ok') | 5fc8b802b512ac6fc4e7ad8475c3ef09beff28ac /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/5fc8b802b512ac6fc4e7ad8475c3ef09beff28ac/smtpd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17660,
67,
11529,
1856,
12,
2890,
16,
1501,
4672,
1172,
1671,
6369,
13693,
16,
296,
631,
9207,
24206,
1856,
2187,
1501,
309,
486,
365,
16186,
4408,
2080,
30,
365,
18,
6206,
2668,
3361,
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,
17660,
67,
11529,
1856,
12,
2890,
16,
1501,
4672,
1172,
1671,
6369,
13693,
16,
296,
631,
9207,
24206,
1856,
2187,
1501,
309,
486,
365,
16186,
4408,
2080,
30,
365,
18,
6206,
2668,
3361,
2... |
result.row('\n'.join(sample),bgcolor='lightgray') result.end_table() self.draw_type_selector(result) | result.wizard( names = [ "Step 1: Select Log File", "Step 2: Configure Columns", "Step 3: View test result", "Step 4: Save Preset", "Step 5: End"], callbacks = [ LogFile.get_file, test_csv, test, FlagFramework.Curry(LogFile.save_preset, log=self), LogFile.end ] ) | def form(self,query,result): result.end_table() result.row("Unprocessed text from file",colspan=5) sample = [] count =0 for line in self.read_record(): sample.append(line) count +=1 if count>3: break result.row('\n'.join(sample),bgcolor='lightgray') result.end_table() | 7b33583de9c8c5096f56c9180ce40cd3e51d03ce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5568/7b33583de9c8c5096f56c9180ce40cd3e51d03ce/CSV.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
646,
12,
2890,
16,
2271,
16,
2088,
4672,
563,
18,
409,
67,
2121,
1435,
563,
18,
492,
2932,
984,
11005,
977,
628,
585,
3113,
1293,
3969,
33,
25,
13,
3296,
273,
5378,
1056,
273,
20,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
646,
12,
2890,
16,
2271,
16,
2088,
4672,
563,
18,
409,
67,
2121,
1435,
563,
18,
492,
2932,
984,
11005,
977,
628,
585,
3113,
1293,
3969,
33,
25,
13,
3296,
273,
5378,
1056,
273,
20,
36... |
navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class=navtrail href="%s/admin/bibformat/bibformatadmin.py/format_templates_manage?ln=%s">%s</a>''' % (config.weburl, ln, _("Manage Format Templates"))) | navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class="navtrail" href="%s/admin/bibformat/bibformatadmin.py/format_templates_manage?ln=%s">%s</a>''' % (config.weburl, ln, _("Manage Format Templates"))) | def format_template_show_dependencies(req, bft, ln=config.cdslang): """ Show the dependencies (on elements) of the given format. @param ln language @param bft the filename of the template to show """ ln = wash_language(ln) _ = gettext_set_language(ln) navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class=navtrail href="%s/admin/bibformat/bibformatadmin.py/format_templates_manage?ln=%s">%s</a>''' % (config.weburl, ln, _("Manage Format Templates"))) try: uid = getUid(req) except MySQLdb.Error, e: return error_page(req) (auth_code, auth_msg) = check_user(req, 'cfgbibformat') if not auth_code: format_template = wash_url_argument(bft, 'str') format_name = bibformat_engine.get_format_template_attrs(bft)['name'] return page(title=_("Format Template %s Dependencies" % format_name), body=bibformatadminlib.perform_request_format_template_show_dependencies(bft, ln=ln), uid=uid, language=ln, navtrail = navtrail_previous_links, lastupdated=__lastupdated__, req=req) else: return page_not_authorized(req=req, text=auth_msg) | f08fe81d00d74f462e6a931c4d621a61c821b5b1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/f08fe81d00d74f462e6a931c4d621a61c821b5b1/bibformatadmin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
3202,
67,
4500,
67,
11037,
12,
3658,
16,
324,
1222,
16,
7211,
33,
1425,
18,
4315,
2069,
539,
4672,
3536,
9674,
326,
5030,
261,
265,
2186,
13,
434,
326,
864,
740,
18,
225,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
3202,
67,
4500,
67,
11037,
12,
3658,
16,
324,
1222,
16,
7211,
33,
1425,
18,
4315,
2069,
539,
4672,
3536,
9674,
326,
5030,
261,
265,
2186,
13,
434,
326,
864,
740,
18,
225,
63... |
title = inputfile.next() | def parse(self, fupdate=0.05, cupdate=0.002): """Extract information from the logfile.""" inputfile = open(self.filename, "r") if self.progress: inputfile.seek(0, 2) #go to end of file nstep = inputfile.tell() inputfile.seek(0) self.progress.initialize(nstep) oldstep = 0 | 7ec870eb223db3001163e943c63ec9756821e843 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8167/7ec870eb223db3001163e943c63ec9756821e843/gamessukparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
284,
2725,
33,
20,
18,
6260,
16,
276,
2725,
33,
20,
18,
24908,
4672,
3536,
4976,
1779,
628,
326,
15204,
12123,
810,
768,
273,
1696,
12,
2890,
18,
3459,
16,
315,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
284,
2725,
33,
20,
18,
6260,
16,
276,
2725,
33,
20,
18,
24908,
4672,
3536,
4976,
1779,
628,
326,
15204,
12123,
810,
768,
273,
1696,
12,
2890,
18,
3459,
16,
315,
8... | |
pos = pos + self.pos | pos += self.pos | def seek(self, pos, mode = 0): if self.closed: raise ValueError, "I/O operation on closed file" if self.buflist: self.buf = self.buf + string.joinfields(self.buflist, '') self.buflist = [] if mode == 1: pos = pos + self.pos elif mode == 2: pos = pos + self.len self.pos = max(0, pos) | 15b63f2f47a5f4876a820d2c1a39b891b5b7085b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/15b63f2f47a5f4876a820d2c1a39b891b5b7085b/StringIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6520,
12,
2890,
16,
949,
16,
1965,
273,
374,
4672,
309,
365,
18,
12204,
30,
1002,
2068,
16,
315,
45,
19,
51,
1674,
603,
4375,
585,
6,
309,
365,
18,
4385,
1098,
30,
365,
18,
4385,
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,
6520,
12,
2890,
16,
949,
16,
1965,
273,
374,
4672,
309,
365,
18,
12204,
30,
1002,
2068,
16,
315,
45,
19,
51,
1674,
603,
4375,
585,
6,
309,
365,
18,
4385,
1098,
30,
365,
18,
4385,
2... |
_in -= 1 | self._parent._parent._in -= 1 | def __call__(self, *args, **kwargs) : global _in if not _in : self._parent._parent._PyWrite(" %s.%s(%s)" % (self._parent._name, self._action, apply(buildargs, args, kwargs))) _in += 1 retcode = apply(getattr(self._parent._object, self._action), args, kwargs) _in -= 1 return retcode | eda80a0d360373fab798a678a4eaeffb4f5946e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/eda80a0d360373fab798a678a4eaeffb4f5946e8/pycanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
13,
294,
2552,
389,
267,
309,
486,
389,
267,
294,
365,
6315,
2938,
6315,
2938,
6315,
9413,
3067,
2932,
565,
738,
87,
7866,
87,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
13,
294,
2552,
389,
267,
309,
486,
389,
267,
294,
365,
6315,
2938,
6315,
2938,
6315,
9413,
3067,
2932,
565,
738,
87,
7866,
87,... |
r""" This function returns the $n$-th number of Sloane's sequence A111787 $a(n)=0$ if $n$ is an odd prime or a power of 2. For numbers of the third kind (see A111774) we proceed as follows: suppose $n$ is to be written as sum of $k$ consecutive integers starting with $m$, then $2n = k(2m + k - 1)$. Let $p$ be the smallest odd prime divisor of $n$ then $a(n) = min(p,2n/p)$. See: \url{http://www.jaapspies.nl/mathfiles/problem2005-2C.pdf} INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A111787; a a(n) is the least k >= 3 such that n can be written as sum of k consecutive integers. a(n)=0 if such a k does not exist. sage: a.offset 1 sage: a(1) 0 sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(100) 5 sage: a(256) 0 sage: a(29) 0 sage: a.list(20) [0, 0, 0, 0, 0, 3, 0, 0, 3, 4, 0, 3, 0, 4, 3, 0, 0, 3, 0, 5] sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be a positive integer AUTHOR: - Jaap Spies (2007-01-14) """ def __init__(self): | def __init__(self): r""" This function returns the $n$-th number of Sloane's sequence A111787 $a(n)=0$ if $n$ is an odd prime or a power of 2. For numbers of the third kind (see A111774) we proceed as follows: suppose $n$ is to be written as sum of $k$ consecutive integers starting with $m$, then $2n = k(2m + k - 1)$. Let $p$ be the smallest odd prime divisor of $n$ then $a(n) = min(p,2n/p)$. See: \url{http://www.jaapspies.nl/mathfiles/problem2005-2C.pdf} INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A111787; a a(n) is the least k >= 3 such that n can be written as sum of k consecutive integers. a(n)=0 if such a k does not exist. sage: a.offset 1 sage: a(1) 0 sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(100) 5 sage: a(256) 0 sage: a(29) 0 sage: a.list(20) [0, 0, 0, 0, 0, 3, 0, 0, 3, 4, 0, 3, 0, 4, 3, 0, 0, 3, 0, 5] sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be a positive integer AUTHOR: - Jaap Spies (2007-01-14) """ | def _eval(self, n): if n == 1 or n == 0: return 1 m = 0 for d in [i for i in arith.divisors(n) if i%2]: # d is odd divisor k = min(d, 2*n/d) if k > m: m = k return ZZ(m) | 8b300fed02e947af57b58146f62dccfc715cf0b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/8b300fed02e947af57b58146f62dccfc715cf0b9/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
309,
290,
422,
404,
578,
290,
422,
374,
30,
327,
404,
312,
273,
374,
364,
302,
316,
306,
77,
364,
277,
316,
419,
483,
18,
2892,
291,
1383,
12,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
309,
290,
422,
404,
578,
290,
422,
374,
30,
327,
404,
312,
273,
374,
364,
302,
316,
306,
77,
364,
277,
316,
419,
483,
18,
2892,
291,
1383,
12,
8... |
self._ctype = 'uint32_t' | self._ctype = 'ev_uint32_t' | def __init__(self, type, name, tag): # Init base class Entry.__init__(self, type, name, tag) | 78d4429cef4baac9bcdfc2396ce157016621c416 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/78d4429cef4baac9bcdfc2396ce157016621c416/event_rpcgen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
618,
16,
508,
16,
1047,
4672,
468,
4378,
1026,
667,
3841,
16186,
2738,
972,
12,
2890,
16,
618,
16,
508,
16,
1047,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
618,
16,
508,
16,
1047,
4672,
468,
4378,
1026,
667,
3841,
16186,
2738,
972,
12,
2890,
16,
618,
16,
508,
16,
1047,
13,
2,
-100,
-100,
-100,
-100,
-100,
... |
if lines[i][0] - lines[first][0] > param_collapse_diff: | if abs(lines[i][0] - lines[first][0]) > threshold: | def collapse_lines(lines): coll = [] lines.sort() first = 0 sum_rho = lines[0][0] sum_theta = lines[0][1] for i in range(1, len(lines)): if lines[i][0] - lines[first][0] > param_collapse_diff: coll.append((sum_rho / (i - first), sum_theta / (i - first))) first = i sum_rho = lines[i][0] sum_theta = lines[i][1] else: sum_rho += lines[i][0] sum_theta += lines[i][1] coll.append((sum_rho / (len(lines) - first), sum_theta / (len(lines) - first))) return coll | 1b93b107da0e0efbaf850effa86d8a03bd20218b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12267/1b93b107da0e0efbaf850effa86d8a03bd20218b/imageproc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13627,
67,
3548,
12,
3548,
4672,
4508,
273,
5378,
2362,
18,
3804,
1435,
1122,
273,
374,
2142,
67,
25603,
273,
2362,
63,
20,
6362,
20,
65,
2142,
67,
14482,
273,
2362,
63,
20,
6362,
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,
13627,
67,
3548,
12,
3548,
4672,
4508,
273,
5378,
2362,
18,
3804,
1435,
1122,
273,
374,
2142,
67,
25603,
273,
2362,
63,
20,
6362,
20,
65,
2142,
67,
14482,
273,
2362,
63,
20,
6362,
21,
... |
fp = file('/etc/network/interfaces', 'r') | fp = file('/etc/resolv.conf', 'r') | def loadNetworkConfig(self): try: # parse the interfaces-file fp = file('/etc/network/interfaces', 'r') interfaces = fp.readlines() fp.close() ifaces = {} currif = "" for i in interfaces: split = i.strip().split(' ') if (split[0] == "iface"): currif = split[1] ifaces[currif] = {} if (len(split) == 4 and split[3] == "dhcp"): ifaces[currif]["dhcp"] = "yes" else: ifaces[currif]["dhcp"] = "no" if (currif != ""): if (split[0] == "address"): ifaces[currif]["address"] = map(int, split[1].split('.')) if (split[0] == "netmask"): ifaces[currif]["netmask"] = map(int, split[1].split('.')) if (split[0] == "gateway"): ifaces[currif]["gateway"] = map(int, split[1].split('.')) # parse the resolv.conf-file fp = file('/etc/network/interfaces', 'r') resolv = fp.readlines() fp.close() except: pass try: for i in resolv: split = i.strip().split(' ') if (split[0] == "nameserver"): config.network.nameserver.value = map(int, split[1].split('.')) except: pass try: # set this config if (ifaces.has_key("eth0")): if (ifaces["eth0"]["dhcp"] == "yes"): config.network.dhcp.value = 1 else: config.network.dhcp.value = 0 if (ifaces["eth0"].has_key("address")): config.network.ip.value = ifaces["eth0"]["address"] if (ifaces["eth0"].has_key("netmask")): config.network.netmask.value = ifaces["eth0"]["netmask"] if (ifaces["eth0"].has_key("gateway")): config.network.gateway.value = ifaces["eth0"]["gateway"] except: pass | 17e4d31f3f50abb51fa35bcfdfd04cfc73469d36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/17e4d31f3f50abb51fa35bcfdfd04cfc73469d36/Network.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
3906,
809,
12,
2890,
4672,
775,
30,
468,
1109,
326,
7349,
17,
768,
4253,
273,
585,
2668,
19,
14175,
19,
7818,
90,
18,
3923,
2187,
296,
86,
6134,
7349,
273,
4253,
18,
896,
3548,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
3906,
809,
12,
2890,
4672,
775,
30,
468,
1109,
326,
7349,
17,
768,
4253,
273,
585,
2668,
19,
14175,
19,
7818,
90,
18,
3923,
2187,
296,
86,
6134,
7349,
273,
4253,
18,
896,
3548,
... |
f = open('pykeylogger_installer_script.nsi','w') | f = open('pykeylogger_install_script.nsi','w') | def update_nsis_script_version(self): f = open('pykeylogger_installer_script.nsi','r') try: contents=f.readlines() finally: f.close() f = open('pykeylogger_installer_script.nsi','w') try: for line in contents: line = re.sub('^( *!define PYKEYLOGGER_VERSION ).*', '\\1' + '"' + version.version + '"', line) f.write(line) finally: f.close() | 5401a4bab3ded5aa9169d211f156547636712336 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3638/5401a4bab3ded5aa9169d211f156547636712336/make_all_dist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
2387,
291,
67,
4263,
67,
1589,
12,
2890,
4672,
284,
273,
1696,
2668,
2074,
856,
4901,
67,
20163,
67,
4263,
18,
2387,
77,
17023,
86,
6134,
775,
30,
2939,
33,
74,
18,
896,
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,
1089,
67,
2387,
291,
67,
4263,
67,
1589,
12,
2890,
4672,
284,
273,
1696,
2668,
2074,
856,
4901,
67,
20163,
67,
4263,
18,
2387,
77,
17023,
86,
6134,
775,
30,
2939,
33,
74,
18,
896,
35... |
def GetFirstHashKey(id): | def GetFirstHashKey(hashid): | def GetFirstHashKey(id): raise DeprecatedIDCError, "Use python pickles instead." | 4f22943d42ee1d5013421d280b3bd776bee83fb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3410/4f22943d42ee1d5013421d280b3bd776bee83fb9/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
3759,
31006,
12,
2816,
350,
4672,
1002,
9336,
734,
39,
668,
16,
315,
3727,
5790,
6002,
1040,
3560,
1199,
225,
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,
968,
3759,
31006,
12,
2816,
350,
4672,
1002,
9336,
734,
39,
668,
16,
315,
3727,
5790,
6002,
1040,
3560,
1199,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
%(nsp,etp.getName(), | %(nsp,etp.getName() + '_Def', | self.initdef += '\n%sself._%s = None' % (ID3, etp.getName()) | cecd76e2f9e035fae497760109796b77adf0b0f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/cecd76e2f9e035fae497760109796b77adf0b0f2/wsdl2python.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
365,
18,
2738,
536,
1011,
2337,
82,
9,
1049,
19079,
6315,
9,
87,
273,
599,
11,
738,
261,
734,
23,
16,
3393,
84,
18,
17994,
10756,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
365,
18,
2738,
536,
1011,
2337,
82,
9,
1049,
19079,
6315,
9,
87,
273,
599,
11,
738,
261,
734,
23,
16,
3393,
84,
18,
17994,
10756,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
msg_quit = self.authorizer.get_msg_quit(self.username) | if self.username: msg_quit = self.authorizer.get_msg_quit(self.username) else: msg_quit = inspect.getargspec(self.authorizer.add_user)[3][2] | def ftp_QUIT(self, line): """Quit the current session.""" # From RFC 959: # This command terminates a USER and if file transfer is not # in progress, the server closes the control connection. # If file transfer is in progress, the connection will remain # open for result response and the server will then close it. msg_quit = self.authorizer.get_msg_quit(self.username) if len(msg_quit) <= 75: self.respond("221 %s" %msg_quit) else: self.push("221-%s\r\n" %msg_quit) self.respond("221 ") | 9bc3570607332fd6c5fecea57f6219a544f0f386 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/9bc3570607332fd6c5fecea57f6219a544f0f386/ftpserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
3500,
1285,
12,
2890,
16,
980,
4672,
3536,
25365,
326,
783,
1339,
12123,
468,
6338,
8372,
2468,
6162,
30,
468,
1220,
1296,
30559,
279,
7443,
471,
309,
585,
7412,
353,
486,
468... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
3500,
1285,
12,
2890,
16,
980,
4672,
3536,
25365,
326,
783,
1339,
12123,
468,
6338,
8372,
2468,
6162,
30,
468,
1220,
1296,
30559,
279,
7443,
471,
309,
585,
7412,
353,
486,
468... |
print >> sys.stderr, 'Running ' + cmd['name'] + ' in ' + CWD + ' : ' print >> sys.stderr, binary, args | print >> sys.stderr, 'INFO | runtest.py | Running ' + cmd['name'] + ' in ' + CWD + ' : ' print >> sys.stderr, 'INFO | runtest.py | ', binary, args | def __init__(self, **kwargs): optparse.OptionParser.__init__(self, **kwargs) defaults = {} | ee6cd336430688494ce59f053ebf33a9bf31c66b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11044/ee6cd336430688494ce59f053ebf33a9bf31c66b/runtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
4333,
4672,
2153,
2670,
18,
1895,
2678,
16186,
2738,
972,
12,
2890,
16,
2826,
4333,
13,
3467,
273,
2618,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
4333,
4672,
2153,
2670,
18,
1895,
2678,
16186,
2738,
972,
12,
2890,
16,
2826,
4333,
13,
3467,
273,
2618,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
print test['Message'] DIRAC.exit(2) | print result['Message'] DIRAC.exit( 2 ) | def usage(): Script.showHelp() DIRAC.exit(2) | 3c1211dcd075ca183cd7fdee80d392a374889562 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/3c1211dcd075ca183cd7fdee80d392a374889562/dirac-admin-bdii-site.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
7739,
18,
4500,
6696,
1435,
18544,
2226,
18,
8593,
12,
22,
13,
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,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
7739,
18,
4500,
6696,
1435,
18544,
2226,
18,
8593,
12,
22,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def handle_error(self): | def handle_error(self, request, client_address): | def handle_error(self): print '-'*40 import traceback traceback.print_exc() print '-'*40 | ac01f491ccc6ee76bceb81fbf9587d1008908402 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/ac01f491ccc6ee76bceb81fbf9587d1008908402/SSLServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
1636,
12,
2890,
16,
590,
16,
1004,
67,
2867,
4672,
1172,
4014,
14,
7132,
1930,
10820,
10820,
18,
1188,
67,
10075,
1435,
1172,
4014,
14,
7132,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
1636,
12,
2890,
16,
590,
16,
1004,
67,
2867,
4672,
1172,
4014,
14,
7132,
1930,
10820,
10820,
18,
1188,
67,
10075,
1435,
1172,
4014,
14,
7132,
2,
-100,
-100,
-100,
-100,
-100,
... |
cu.execute('INSERT INTO AuthCache VALUES (?, ?)', sessionId, timeStamp) | for x in range(3): cu = self.db.transaction() try: cu.execute("DELETE FROM AuthCache WHERE sessionId = ?", sessionId) cu.execute("INSERT INTO AuthCache VALUES (?, ?)", sessionId, timeStamp) except (DatabaseLocked, ColumnNotUnique): self.db.rollback() continue except: self.db.rollback() raise else: break else: raise | def cache(self, authItemList): sessionId = self._makeSessionId(authItemList) cu = self.db.cursor() timeStamp = time.time() + CACHE_TIMEOUT cu.execute('INSERT INTO AuthCache VALUES (?, ?)', sessionId, timeStamp) self._deleteOld(cu) self.db.commit() | 6bb799a358a5abb9f727a65567d214ea887d8a9e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8749/6bb799a358a5abb9f727a65567d214ea887d8a9e/authcache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1247,
12,
2890,
16,
1357,
1180,
682,
4672,
10338,
273,
225,
365,
6315,
6540,
18030,
12,
1944,
1180,
682,
13,
15985,
273,
365,
18,
1966,
18,
9216,
1435,
18198,
273,
813,
18,
957,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1247,
12,
2890,
16,
1357,
1180,
682,
4672,
10338,
273,
225,
365,
6315,
6540,
18030,
12,
1944,
1180,
682,
13,
15985,
273,
365,
18,
1966,
18,
9216,
1435,
18198,
273,
813,
18,
957,
1435,
... |
if psarray[0].find("An error occurred in the forwarding block") > -1: | if psarray[0].find("An error occurred in the forwarding block") > -1 or \ psarray[0].find("DB Error: invalid number") > -1: | def extractNodeInformation(self): """ For the mathematician in this object, extract the list of advisor ids, the mathematician name, the mathematician institution, and the year of the mathematician's degree. """ if self.pagestr is None: self.getPage() self.advisors = [] self.descendants = [] | 359dd305c1cb8223726e8230d141ef8221ca0034 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12348/359dd305c1cb8223726e8230d141ef8221ca0034/grab.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
907,
5369,
12,
2890,
4672,
3536,
2457,
326,
4233,
351,
2126,
2779,
316,
333,
733,
16,
2608,
326,
666,
434,
1261,
10227,
3258,
16,
326,
4233,
351,
2126,
2779,
508,
16,
326,
4233,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
907,
5369,
12,
2890,
4672,
3536,
2457,
326,
4233,
351,
2126,
2779,
316,
333,
733,
16,
2608,
326,
666,
434,
1261,
10227,
3258,
16,
326,
4233,
351,
2126,
2779,
508,
16,
326,
4233,
... |
self.ID = '%s.LOGSCAN.%s.%s' % (log.hostname,self.args.file,self.args.regex) | if self.regfile: self.ID = '%s.LOGSCAN.%s.%s' % (log.hostname,self.args.file,self.args.regfile) else: self.ID = '%s.LOGSCAN.%s.%s' % (log.hostname,self.args.file,self.args.regex) | def tokenparser(self, toklist, toktypes, indent): | f2890a955747c53aaaeb3925f11ca406e6ae58ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/f2890a955747c53aaaeb3925f11ca406e6ae58ea/logscanning.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1147,
4288,
12,
2890,
16,
946,
1098,
16,
946,
2352,
16,
3504,
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,
... | [
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,
1147,
4288,
12,
2890,
16,
946,
1098,
16,
946,
2352,
16,
3504,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Just a little instrospection... | Just a little introspection... | def size(self): return (self.width, self.height) | 48fab93fd392f6c2bec14d650f743df6fb09127f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10711/48fab93fd392f6c2bec14d650f743df6fb09127f/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
963,
12,
2890,
4672,
327,
261,
2890,
18,
2819,
16,
365,
18,
4210,
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,
... | [
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,
963,
12,
2890,
4672,
327,
261,
2890,
18,
2819,
16,
365,
18,
4210,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
module = _normalize_module(module) tests = _find_tests(module, "") test = [doc for (tname, doc, dummy, dummy) in tests if tname == name] | module = _normalizeModule(module) tests = _findTests(module, "") test = [doc for (tname, doc, f, l) in tests if tname == name] | def testsource(module, name): """Extract the doctest examples from a docstring. Provide the module (or dotted name of the module) containing the tests to be extracted, and the name (within the module) of the object with the docstring containing the tests to be extracted. The doctest examples are returned as a string containing Python code. The expected output blocks in the examples are converted to Python comments. """ module = _normalize_module(module) tests = _find_tests(module, "") test = [doc for (tname, doc, dummy, dummy) in tests if tname == name] if not test: raise ValueError(name, "not found in tests") test = test[0] examples = [source + _expect(expect) for source, expect, dummy in _extract_examples(test)] return '\n'.join(examples) | a643b658a7cd1d820fd561665402705f0f76b1d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a643b658a7cd1d820fd561665402705f0f76b1d0/doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
3168,
12,
2978,
16,
508,
4672,
3536,
4976,
326,
31263,
395,
10991,
628,
279,
14525,
18,
225,
26569,
326,
1605,
261,
280,
20965,
508,
434,
326,
1605,
13,
4191,
326,
7434,
358,
506,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3168,
12,
2978,
16,
508,
4672,
3536,
4976,
326,
31263,
395,
10991,
628,
279,
14525,
18,
225,
26569,
326,
1605,
261,
280,
20965,
508,
434,
326,
1605,
13,
4191,
326,
7434,
358,
506,
... |
>>> tzinfo = list(walk_ics(path)) | >>> tzinfo = sorted(list(walk_ics(path))) | def doctest_walk_ics(): """Tests for walk_ics. >>> from schooltool.calendar.generate_vcal_dict import walk_ics >>> import schooltool.calendar.tests as tests >>> import os >>> path = os.path.dirname(tests.__file__) >>> tzinfo = list(walk_ics(path)) Timezone 'sample' was not found There are 2 timezone files in the test directory: >>> len(tzinfo) 2 >>> location, tzid, vtimezone = tzinfo[0] One of them is for Amsterdam: >>> location 'Europe/Amsterdam' >>> tzid '/schooltool.org/Olson_20060310_1/Europe/Amsterdam' The proper VTIMEZONE block is extracted from the file: >>> print vtimezone BEGIN:VTIMEZONE TZID:/schooltool.org/Olson_20060310_1/Europe/Amsterdam X-LIC-LOCATION:Europe/Amsterdam BEGIN:DAYLIGHT TZOFFSETFROM:+0100 TZOFFSETTO:+0200 TZNAME:CEST DTSTART:19700329T020000 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU END:DAYLIGHT BEGIN:STANDARD TZOFFSETFROM:+0200 TZOFFSETTO:+0100 TZNAME:CET DTSTART:19701025T030000 RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU END:STANDARD END:VTIMEZONE The other one is for Vilnius: >>> location, tzid, vtimezone = tzinfo[1] >>> location 'Europe/Vilnius' """ | f52b0ea12603bbd52f6408d2de837da5317e5d4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/f52b0ea12603bbd52f6408d2de837da5317e5d4d/test_generate_vcal_dict.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31263,
395,
67,
11348,
67,
2102,
13332,
3536,
14650,
364,
5442,
67,
2102,
18,
225,
4080,
628,
18551,
1371,
6738,
18,
11650,
18,
7163,
67,
90,
771,
67,
1576,
1930,
5442,
67,
2102,
4080,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31263,
395,
67,
11348,
67,
2102,
13332,
3536,
14650,
364,
5442,
67,
2102,
18,
225,
4080,
628,
18551,
1371,
6738,
18,
11650,
18,
7163,
67,
90,
771,
67,
1576,
1930,
5442,
67,
2102,
4080,
... |
imm = int(imm) | imm = hexorint(imm) | def parse_trap(instruc = "", word_buf = ""): if instruc == "" or word_buf == "": print "ERROR: someone accidentally the code in parse_trap" return "-1" instruc = sanitize(instruc) imm = instruc[1] imm = int(imm) if imm > 2**8 or imm < 0: print "ERROR: Immediate value " + str(imm) +" is out of range." print "IMM in TRAP UIMM must be greater than 0 and less than 2**8" return "-1" word_buf += "0000" word_buf += int2bin(imm, 8) return word_buf | 86fe33c50bfd48f675145c6ca70fdef6a839b9d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4891/86fe33c50bfd48f675145c6ca70fdef6a839b9d9/assembler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
27170,
12,
267,
701,
5286,
273,
23453,
2076,
67,
4385,
273,
1408,
4672,
309,
16170,
5286,
422,
1408,
578,
2076,
67,
4385,
422,
1408,
30,
1172,
315,
3589,
30,
18626,
25961,
1230... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
27170,
12,
267,
701,
5286,
273,
23453,
2076,
67,
4385,
273,
1408,
4672,
309,
16170,
5286,
422,
1408,
578,
2076,
67,
4385,
422,
1408,
30,
1172,
315,
3589,
30,
18626,
25961,
1230... |
print "* ",som1[0] print "* ",som1[1] | print "* ", som1[0] print "* ", som1[1] | def subtract_time_indep_bkg(obj,B_list,**kwargs): """ This function takes a SOM or a SO and a list of time-independent background tuples and subtracts the numbers from the appropriate SO in the SOM or the given SO. The list of tuples (could be just one tuple in the case of the SO) is assumed to be in the same order as the SOs in the SOM. Parameters: ---------- -> obj is a SOM or SO from which to subtract the individual Bs from the B_list -> B_list are the time-independent backgrounds to subtract from the SOs in the SOM or a SO Return: ------- <- A SOM or SO with the time-independent backgrounds subtracted Exceptions: ---------- <- IndexError is raised if the B_list object is empty <- TypeError is raised if the first argument is not a SOM or SO <- RuntimeError is raised if the SOM and list are not the same length """ if len(B_list) <= 0: raise IndexError, "List of time-independent background cannot be empty" # List is correct size, go on else: pass # import the helper functions import hlr_utils (o_descr,l_descr)=hlr_utils.get_descr(obj,B_list) if o_descr == "number" or o_descr == "list": raise TypeError, "First argument must be a SOM or a SO!" # Have a SOM or SO, go on else: pass (result,res_descr)=hlr_utils.empty_result(obj) result=hlr_utils.copy_som_attr(result,res_descr,obj,o_descr) import common_lib # iterate through the values for i in range(hlr_utils.get_length(obj)): val1 = hlr_utils.get_value(obj,i,o_descr,"all") val2 = hlr_utils.get_value(B_list,i,l_descr,"all") value = common_lib.sub_ncerr(val1, val2) hlr_utils.result_insert(result,res_descr,value,None,"all") return result | 4d49f1aa94b12824979865b976621cfb89eca2ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/4d49f1aa94b12824979865b976621cfb89eca2ad/hlr_subtract_time_indep_bkg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10418,
67,
957,
67,
267,
15037,
67,
70,
14931,
12,
2603,
16,
38,
67,
1098,
16,
636,
4333,
4672,
3536,
1220,
445,
5530,
279,
348,
1872,
578,
279,
7460,
471,
279,
666,
434,
813,
17,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10418,
67,
957,
67,
267,
15037,
67,
70,
14931,
12,
2603,
16,
38,
67,
1098,
16,
636,
4333,
4672,
3536,
1220,
445,
5530,
279,
348,
1872,
578,
279,
7460,
471,
279,
666,
434,
813,
17,
26... |
class EchoServer (asyncore.dispatcher): class ConnectionHandler (asyncore.dispatcher_with_send): | class EchoServer(asyncore.dispatcher): class ConnectionHandler(asyncore.dispatcher_with_send): | def stop (self): self.active = False | 3945c867d60b1d53299799dd09b6753dcd0a9546 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/3945c867d60b1d53299799dd09b6753dcd0a9546/test_ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
261,
2890,
4672,
365,
18,
3535,
273,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2132,
261,
2890,
4672,
365,
18,
3535,
273,
1083,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
print "S Pick polarity deleted" | msg = "S Pick polarity deleted" appendTextview(self.textviewStdOut, msg) | def delSPol(self): try: del self.dicts[self.stPt]['SPol'] print "S Pick polarity deleted" except: pass | b822b77814749ba0fa0b0a638d2c2e8ccf514f6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/b822b77814749ba0fa0b0a638d2c2e8ccf514f6c/obspyck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
3118,
355,
12,
2890,
4672,
775,
30,
1464,
365,
18,
16287,
63,
2890,
18,
334,
16484,
23962,
3118,
355,
3546,
1234,
273,
315,
55,
23038,
2952,
20498,
4282,
6,
714,
1528,
1945,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
3118,
355,
12,
2890,
4672,
775,
30,
1464,
365,
18,
16287,
63,
2890,
18,
334,
16484,
23962,
3118,
355,
3546,
1234,
273,
315,
55,
23038,
2952,
20498,
4282,
6,
714,
1528,
1945,
12,
... |
start_string_prefix = (r'(?:(?<=^)|(?<=[ \n%s]))' | start_string_prefix = (r'(?:(?<=^)|(?<=[-/: \n%s]))' | def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages. | 7377a37ea1c3a97a7a12e60dc097924c23b0ff7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/7377a37ea1c3a97a7a12e60dc097924c23b0ff7d/states.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
977,
16,
7586,
16,
11063,
16,
982,
4672,
3536,
2000,
576,
6035,
30,
2199,
261,
955,
471,
6370,
2186,
3631,
471,
2619,
67,
6833,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
977,
16,
7586,
16,
11063,
16,
982,
4672,
3536,
2000,
576,
6035,
30,
2199,
261,
955,
471,
6370,
2186,
3631,
471,
2619,
67,
6833,
18,
2,
-100,
-100,
-100,
-100,
-100,... |
def get_time_slides(filename, verbose = False): doc = utils.load_filename(filename, verbose) tisitable = table.get_table(doc, lsctables.TimeSlideTable.tableName) | def get_time_slides(filename, verbose = False, gz = False): """ Load the XML document contained in filename and convert the time slide table therein to a list of dictionaries of instrument/offset pairs. The optional verbose and gz parameters are the same as for the glue.ligolw.utils.load_filename() function. Raises ValueError if the document does not contain exactly 1 time slide table, or if one or more offsets in the table cannot be expressed as LIGOTimeGPS objects. """ tisitable = table.get_table(utils.load_filename(filename, verbose = verbose, gz = gz), lsctables.TimeSlideTable.tableName) | def get_time_slides(filename, verbose = False): doc = utils.load_filename(filename, verbose) tisitable = table.get_table(doc, lsctables.TimeSlideTable.tableName) for row in tisitable: row.offset = LIGOTimeGPS(row.offset) return map(tisitable.get_offset_dict, tisitable.dict.keys()) | 8fda004cc6e19856f81705b8e28bcee6901d49ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/8fda004cc6e19856f81705b8e28bcee6901d49ed/ligolw_cafe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
957,
67,
2069,
4369,
12,
3459,
16,
3988,
273,
1083,
16,
14136,
273,
1083,
4672,
3536,
4444,
326,
3167,
1668,
7542,
316,
1544,
471,
1765,
326,
813,
12701,
1014,
1915,
267,
358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
957,
67,
2069,
4369,
12,
3459,
16,
3988,
273,
1083,
16,
14136,
273,
1083,
4672,
3536,
4444,
326,
3167,
1668,
7542,
316,
1544,
471,
1765,
326,
813,
12701,
1014,
1915,
267,
358,
... |
file.Write("\n") | def WriteGLES2ImplementationImpl(self, filename): """Writes the gles2 helper implementation.""" file = CWriter(filename) self.WriteLicense(file) file.Write("\n") file.Write("// A class to emluate GLES2 over command buffers.\n") file.Write("\n") file.Write( "#include \"gpu/command_buffer/client/gles2_implementation.h\"\n") file.Write("\n") self.WriteNamespaceOpen(file) for func in self.original_functions: func.WriteGLES2ImplementationImpl(file) file.Write("\n") | 8a837bb40249dfd9f0a2736abdab4f64592c99db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/8a837bb40249dfd9f0a2736abdab4f64592c99db/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
43,
11386,
22,
13621,
2828,
12,
2890,
16,
1544,
4672,
3536,
8368,
326,
314,
1040,
22,
4222,
4471,
12123,
585,
273,
385,
2289,
12,
3459,
13,
365,
18,
3067,
13211,
12,
768,
13,
585... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
43,
11386,
22,
13621,
2828,
12,
2890,
16,
1544,
4672,
3536,
8368,
326,
314,
1040,
22,
4222,
4471,
12123,
585,
273,
385,
2289,
12,
3459,
13,
365,
18,
3067,
13211,
12,
768,
13,
585... | |
_push_ns(prefix, uri) | elif uri not in namespaces: prefix = namespaces.get(uri, [prefix])[-1] _push_ns_attr(_make_ns_attr(prefix, uri)) if prefix is not '': _push_ns(prefix, uri) | def _gen_prefix(): val = 0 while 1: val += 1 yield 'ns%d' % val | 5f7e9f898274f7e3fce54013be162ac66ec2b61a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/5f7e9f898274f7e3fce54013be162ac66ec2b61a/output.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4507,
67,
3239,
13332,
1244,
273,
374,
1323,
404,
30,
1244,
1011,
404,
2824,
296,
2387,
9,
72,
11,
738,
1244,
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,
389,
4507,
67,
3239,
13332,
1244,
273,
374,
1323,
404,
30,
1244,
1011,
404,
2824,
296,
2387,
9,
72,
11,
738,
1244,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
test() | unittest.main() | def test(level=10,verbosity=1): all_tests = test_suite(level=level) runner = unittest.TextTestRunner(verbosity=verbosity) runner.run(all_tests) return runner | 983efca0da8abef90cb4ccaa376b0b83d7398225 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13163/983efca0da8abef90cb4ccaa376b0b83d7398225/test_math.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
2815,
33,
2163,
16,
16629,
8807,
33,
21,
4672,
777,
67,
16341,
273,
1842,
67,
30676,
12,
2815,
33,
2815,
13,
8419,
273,
2836,
3813,
18,
1528,
4709,
9709,
12,
16629,
8807,
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,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
2815,
33,
2163,
16,
16629,
8807,
33,
21,
4672,
777,
67,
16341,
273,
1842,
67,
30676,
12,
2815,
33,
2815,
13,
8419,
273,
2836,
3813,
18,
1528,
4709,
9709,
12,
16629,
8807,
33,... |
text = ('HTTP/1.1 200 OK\r\n' 'Set-Cookie: Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"\r\n' 'Set-Cookie: Part_Number="Rocket_Launcher_0001"; Version="1";' ' Path="/acme"\r\n' '\r\n' 'No body\r\n') hdr = ('Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"' ', ' 'Part_Number="Rocket_Launcher_0001"; Version="1"; Path="/acme"') s = FakeSocket(text) r = httplib.HTTPResponse(s, 1) r.begin() cookies = r.getheader("Set-Cookie") if cookies != hdr: raise AssertionError, "multiple headers not combined properly" | for hp in ("www.python.org:abc", "www.python.org:"): try: h = httplib.HTTP(hp) except httplib.InvalidURL: print "InvalidURL raised as expected" else: print "Expect InvalidURL" text = ('HTTP/1.1 200 OK\r\n' 'Set-Cookie: Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"\r\n' 'Set-Cookie: Part_Number="Rocket_Launcher_0001"; Version="1";' ' Path="/acme"\r\n' '\r\n' 'No body\r\n') hdr = ('Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"' ', ' 'Part_Number="Rocket_Launcher_0001"; Version="1"; Path="/acme"') s = FakeSocket(text) r = httplib.HTTPResponse(s, 1) r.begin() cookies = r.getheader("Set-Cookie") if cookies != hdr: raise AssertionError, "multiple headers not combined properly" test() | def makefile(self, mode, bufsize=None): if mode != 'r' and mode != 'rb': raise httplib.UnimplementedFileMode() return StringIO.StringIO(self.text) | 0b86d380404d110ce9923d0ad23bcb1c00dbb6b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0b86d380404d110ce9923d0ad23bcb1c00dbb6b0/test_httplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
768,
12,
2890,
16,
1965,
16,
1681,
1467,
33,
7036,
4672,
309,
1965,
480,
296,
86,
11,
471,
1965,
480,
296,
6731,
4278,
1002,
15851,
6673,
18,
984,
21099,
812,
2309,
1435,
327,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1221,
768,
12,
2890,
16,
1965,
16,
1681,
1467,
33,
7036,
4672,
309,
1965,
480,
296,
86,
11,
471,
1965,
480,
296,
6731,
4278,
1002,
15851,
6673,
18,
984,
21099,
812,
2309,
1435,
327,
15... |
for n in range (3, n_atoms): | for n in range (3, n_atoms): | def _buildResiduum(self, mol, zmatrix, n_atoms, phi, psi, init_pos): """ | bfcd9bbf8883b807c4b4f0c2104f99b7390da40d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/bfcd9bbf8883b807c4b4f0c2104f99b7390da40d/PeptideGenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3510,
607,
350,
89,
379,
12,
2890,
16,
12629,
16,
998,
5667,
16,
290,
67,
14937,
16,
7706,
16,
23921,
16,
1208,
67,
917,
4672,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3510,
607,
350,
89,
379,
12,
2890,
16,
12629,
16,
998,
5667,
16,
290,
67,
14937,
16,
7706,
16,
23921,
16,
1208,
67,
917,
4672,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def exportAttributes(self, outfile, level, namespace_='', name_='LiteralMeta'): super(LiteralMeta, self).exportAttributes(outfile, level, namespace_, name_='LiteralMeta') if self.datatype is not None: | def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='LiteralMeta'): super(LiteralMeta, self).exportAttributes(outfile, level, already_processed, namespace_, name_='LiteralMeta') if self.datatype is not None and 'datatype' not in already_processed: already_processed.append('datatype') | def exportAttributes(self, outfile, level, namespace_='', name_='LiteralMeta'): super(LiteralMeta, self).exportAttributes(outfile, level, namespace_, name_='LiteralMeta') if self.datatype is not None: outfile.write(' datatype=%s' % (quote_attrib(self.datatype), )) if self.content is not None: outfile.write(' content=%s' % (self.gds_format_string(quote_attrib(self.content).encode(ExternalEncoding), input_name='content'), )) outfile.write(' property=%s' % (quote_attrib(self.property), )) | 10f2a4b3101435822c472af9b202a5a0bb496366 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/10f2a4b3101435822c472af9b202a5a0bb496366/_nexml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
2498,
12,
2890,
16,
8756,
16,
1801,
16,
1818,
67,
11005,
16,
1981,
67,
2218,
2187,
508,
67,
2218,
6177,
2781,
11,
4672,
2240,
12,
6177,
2781,
16,
365,
2934,
6530,
2498,
12,
26050... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
2498,
12,
2890,
16,
8756,
16,
1801,
16,
1818,
67,
11005,
16,
1981,
67,
2218,
2187,
508,
67,
2218,
6177,
2781,
11,
4672,
2240,
12,
6177,
2781,
16,
365,
2934,
6530,
2498,
12,
26050... |
TixSubWidget.__init__(self, master, name, destroy_physically) self.subwidget_list['dirlist'] = _dummyScrolledListBox(self, 'dirlist') self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist') self.subwidget_list['filter'] = _dummyComboBox(self, 'filter') self.subwidget_list['selection'] = _dummyComboBox(self, 'selection') | TixSubWidget.__init__(self, master, name, destroy_physically) self.subwidget_list['dirlist'] = _dummyScrolledListBox(self, 'dirlist') self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist') self.subwidget_list['filter'] = _dummyComboBox(self, 'filter') self.subwidget_list['selection'] = _dummyComboBox(self, 'selection') | def __init__(self, master, name, destroy_physically=1): | 22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
16,
508,
16,
5546,
67,
844,
1900,
6478,
33,
21,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
16,
508,
16,
5546,
67,
844,
1900,
6478,
33,
21,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
tst = gdaltest.GDALTest( 'ERS', 'srtm.ers', 1, 244 ) | tst = gdaltest.GDALTest( 'ERS', 'srtm.ers', 1, 64864 ) | def ers_1(): tst = gdaltest.GDALTest( 'ERS', 'srtm.ers', 1, 244 ) return tst.testOpen() | ff9d5c9ea1557925909ccd153bcbc320be46bd8f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10290/ff9d5c9ea1557925909ccd153bcbc320be46bd8f/ers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
225,
414,
67,
21,
13332,
225,
268,
334,
273,
15551,
2390,
395,
18,
27338,
1013,
4709,
12,
296,
11367,
2187,
296,
87,
3797,
81,
18,
414,
2187,
404,
16,
5178,
28,
1105,
262,
327,
268,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
225,
414,
67,
21,
13332,
225,
268,
334,
273,
15551,
2390,
395,
18,
27338,
1013,
4709,
12,
296,
11367,
2187,
296,
87,
3797,
81,
18,
414,
2187,
404,
16,
5178,
28,
1105,
262,
327,
268,
... |
events = client.get_events(cal_user, date=options.date, | dates = get_start_and_end(options.date) events = client.get_events(cal_user, start_date=dates[2], end_date=dates[3], | def _run_delete(client, options, args): cal_user = client.get_calendar_user(options.cal) if not cal_user: print 'No calendar matches "' + options.cal + '"' return events = client.get_events(cal_user, date=options.date, title=options.title, query=options.query, expand_recurrence=False) try: client.delete_events(events, options.date, cal_user) except EventsNotFound: print 'No events found that match your options!' | 23fd3d59a2121c80459f2021852b8a78de699aaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/23fd3d59a2121c80459f2021852b8a78de699aaf/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2681,
67,
3733,
12,
2625,
16,
702,
16,
833,
4672,
1443,
67,
1355,
273,
1004,
18,
588,
67,
11650,
67,
1355,
12,
2116,
18,
771,
13,
309,
486,
1443,
67,
1355,
30,
1172,
296,
2279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2681,
67,
3733,
12,
2625,
16,
702,
16,
833,
4672,
1443,
67,
1355,
273,
1004,
18,
588,
67,
11650,
67,
1355,
12,
2116,
18,
771,
13,
309,
486,
1443,
67,
1355,
30,
1172,
296,
2279,
... |
zinfo = zipfile.ZipInfo('styles.xml') zfile.writestr(zinfo, s1) | zfile.writestr('styles.xml', s1) | def assemble_my_parts(self): """Assemble the `self.parts` dictionary. Extend in subclasses. """ #ipshell('At assemble_parts') writers.Writer.assemble_parts(self) f = tempfile.NamedTemporaryFile() zfile = zipfile.ZipFile(f, 'w', zipfile.ZIP_DEFLATED) zinfo = zipfile.ZipInfo('content.xml') zfile.writestr(zinfo, self.visitor.content_astext()) zfile.writestr('mimetype', MIME_TYPE) s1 = self.create_manifest() zinfo = zipfile.ZipInfo('META-INF/manifest.xml') zfile.writestr(zinfo, s1) s1 = self.create_meta() zinfo = zipfile.ZipInfo('meta.xml') zfile.writestr(zinfo, s1) s1 = self.get_stylesheet() zinfo = zipfile.ZipInfo('styles.xml') zfile.writestr(zinfo, s1) self.store_embedded_files(zfile) zfile.close() f.seek(0) whole = f.read() f.close() self.parts['whole'] = whole self.parts['encoding'] = self.document.settings.output_encoding self.parts['version'] = docutils.__version__ | 277ba1af817dc725b8179dbbf649a815fdff5939 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/277ba1af817dc725b8179dbbf649a815fdff5939/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19540,
67,
4811,
67,
6019,
12,
2890,
4672,
3536,
1463,
10045,
326,
1375,
2890,
18,
6019,
68,
3880,
18,
225,
27686,
316,
15320,
18,
3536,
468,
625,
10304,
2668,
861,
19540,
67,
6019,
6134... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19540,
67,
4811,
67,
6019,
12,
2890,
4672,
3536,
1463,
10045,
326,
1375,
2890,
18,
6019,
68,
3880,
18,
225,
27686,
316,
15320,
18,
3536,
468,
625,
10304,
2668,
861,
19540,
67,
6019,
6134... |
processor.prepareData (sampleOrder) | processor.prepareData(sampleOrder) | def order_sucess(self): pass | 61512a3da045e7727e74347eadb4063ee34eb780 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13656/61512a3da045e7727e74347eadb4063ee34eb780/processor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1353,
67,
26560,
614,
12,
2890,
4672,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
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,
1353,
67,
26560,
614,
12,
2890,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.