rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
return _apply(s.find, args) | return s.find(*args) | def find(s, *args): """find(s, sub [,start [,end]]) -> in Return the lowest index in s where substring sub is found, such that sub is contained within s[start,end]. Optional arguments start and end are interpreted as in slice notation. Return -1 on failure. """ return _apply(s.find, args) | 4e577568f34ac8283d2070929bf3c3090b3e722f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4e577568f34ac8283d2070929bf3c3090b3e722f/string.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
12,
87,
16,
380,
1968,
4672,
3536,
4720,
12,
87,
16,
720,
306,
16,
1937,
306,
16,
409,
65,
5717,
317,
316,
225,
2000,
326,
11981,
770,
316,
272,
1625,
3019,
720,
353,
1392,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
12,
87,
16,
380,
1968,
4672,
3536,
4720,
12,
87,
16,
720,
306,
16,
1937,
306,
16,
409,
65,
5717,
317,
316,
225,
2000,
326,
11981,
770,
316,
272,
1625,
3019,
720,
353,
1392,
16,... |
childIds = [i.getID() for i in selected if i.isDownloaded()] | childIDs = [i.getID() for i in selected if i.isDownloaded()] | def addToNewPlaylist(self): selected = controller.selection.getSelectedItems() childIds = [i.getID() for i in selected if i.isDownloaded()] playlist.createNewPlaylist(childIDs) | 13c920d68b32ab3419331d8792f5d9c5a62d577f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/13c920d68b32ab3419331d8792f5d9c5a62d577f/app.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9604,
1908,
30194,
12,
2890,
4672,
3170,
273,
2596,
18,
10705,
18,
588,
7416,
3126,
1435,
1151,
5103,
273,
306,
77,
18,
588,
734,
1435,
364,
277,
316,
3170,
309,
277,
18,
291,
4164,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9604,
1908,
30194,
12,
2890,
4672,
3170,
273,
2596,
18,
10705,
18,
588,
7416,
3126,
1435,
1151,
5103,
273,
306,
77,
18,
588,
734,
1435,
364,
277,
316,
3170,
309,
277,
18,
291,
4164,
42... |
elif type(t) == types.FunctionType: | elif iscallable(t): | def func(val): if not hasattr(val, '__iter__'): return False if type(t) in [types.ListType, types.TupleType]: for i in val: if not i in t: return False elif type(t) == types.FunctionType: for i in val: if not t(i): return False else: for i in val: if type(i) != t: return False if size is not None: if isinstance(size, (int, long)): return len(val) == size elif hasattr(size, '___iter__') and len(size) == 2: if size[0] is not None and size[1] is not None: return len(val) >= size[0] and len(val) <= size[1] elif size[0] is None: return len(val) <= size[1] else: return len(val) >= size[0] else: raise exceptions.ValueError('Invalid size specification for simuOpt.valueIsList') return True | 0808dd362a5f2dd5d90d950500fd972461718062 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/0808dd362a5f2dd5d90d950500fd972461718062/simuOpt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1326,
12,
1125,
4672,
309,
486,
3859,
12,
1125,
16,
4940,
2165,
7250,
4672,
327,
1083,
309,
618,
12,
88,
13,
316,
306,
2352,
18,
19366,
16,
1953,
18,
9038,
559,
14542,
364,
277,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1326,
12,
1125,
4672,
309,
486,
3859,
12,
1125,
16,
4940,
2165,
7250,
4672,
327,
1083,
309,
618,
12,
88,
13,
316,
306,
2352,
18,
19366,
16,
1953,
18,
9038,
559,
14542,
364,
277,
316,
... |
lb_added.Artist = metadata.authors[0] | def _update_iTunes_metadata(self, metadata, db_added, lb_added, this_book): ''' ''' if DEBUG: self.log.info(" ITUNES._update_iTunes_metadata()") | 4751389672c39516c9628cc4280a92d690e8552b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/4751389672c39516c9628cc4280a92d690e8552b/driver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2725,
67,
77,
56,
27490,
67,
4165,
12,
2890,
16,
1982,
16,
1319,
67,
9665,
16,
7831,
67,
9665,
16,
333,
67,
3618,
4672,
9163,
9163,
309,
6369,
30,
365,
18,
1330,
18,
1376,
2932,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
2725,
67,
77,
56,
27490,
67,
4165,
12,
2890,
16,
1982,
16,
1319,
67,
9665,
16,
7831,
67,
9665,
16,
333,
67,
3618,
4672,
9163,
9163,
309,
6369,
30,
365,
18,
1330,
18,
1376,
2932,... | |
app = wx.PySimpleApp() import queueHandler import gui gui.initialize(app) | def main(): """NVDA's core main loop. | 013fbcd0ed52e16485a9ee3538a2ac37e28ab9cc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/013fbcd0ed52e16485a9ee3538a2ac37e28ab9cc/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
11679,
9793,
1807,
2922,
2774,
2798,
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,
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,
2774,
13332,
3536,
11679,
9793,
1807,
2922,
2774,
2798,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
__send_message_sendmail(smtpserver, msg) | __send_message_sendmail(smtpserver, msg_str) | def __send_message(from_addr, to_addr_list, msg, options): """Message sending dispatcher. """ smtpserver = options.smtp_server or config.get('stgit.smtpserver') if smtpserver.startswith('/'): # Use the sendmail tool __send_message_sendmail(smtpserver, msg) else: # Use the SMTP server (we have host and port information) __send_message_smtp(smtpserver, from_addr, to_addr_list, msg, options) | 9cb369d43b604b8ac24d8aaf23025da531cca473 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12366/9cb369d43b604b8ac24d8aaf23025da531cca473/mail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4661,
67,
2150,
12,
2080,
67,
4793,
16,
358,
67,
4793,
67,
1098,
16,
1234,
16,
702,
4672,
3536,
1079,
5431,
7393,
18,
3536,
17660,
3567,
273,
702,
18,
20278,
67,
3567,
578,
642,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4661,
67,
2150,
12,
2080,
67,
4793,
16,
358,
67,
4793,
67,
1098,
16,
1234,
16,
702,
4672,
3536,
1079,
5431,
7393,
18,
3536,
17660,
3567,
273,
702,
18,
20278,
67,
3567,
578,
642,
... |
elif id == SUBSCRIPTION and len(data) == 5: stime, addr, password, digest, lang = data self.__db[id] = stime, addr, '', password, digest, lang | elif type == SUBSCRIPTION: if len(data) == 4: stime, addr, password, digest = data lang = self.preferred_language data = stime, addr, '', password, digest, lang elif len(data) == 5: stime, addr, password, digest, lang = data data = stime, addr, '', password, digest, lang self.__db[id] = type, data | def __opendb(self): filename = self.__filename() if self.__db is None: assert self.Locked() try: fp = open(filename) self.__db = marshal.load(fp) fp.close() except IOError, e: if e.errno <> errno.ENOENT: raise self.__db = {} except EOFError, e: # The unmarshalling failed, which means the file is corrupt. # Sigh. Start over. syslog('error', 'request.db file corrupt for list %s, blowing it away.', self.internal_name()) self.__db = {} # Migrate pre-2.1a3 held subscription records to include the # fullname data field. type, version = self.__db.get('version', (IGN, None)) if version is None: # No previous revisiont number, must be upgrading to 2.1a3 or # beyond from some unknown earlier version. for id, (type, data) in self.__db.items(): if id == IGN: pass elif id == HELDMSG and len(data) == 5: # tack on a msgdata dictionary self.__db[id] = data + ({},) elif id == SUBSCRIPTION and len(data) == 5: # a fullname field was added stime, addr, password, digest, lang = data self.__db[id] = stime, addr, '', password, digest, lang | f68a8b162368cc9894b421223e4867762ce2dbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/f68a8b162368cc9894b421223e4867762ce2dbf4/ListAdmin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
556,
409,
70,
12,
2890,
4672,
1544,
273,
365,
16186,
3459,
1435,
309,
365,
16186,
1966,
353,
599,
30,
1815,
365,
18,
8966,
1435,
775,
30,
4253,
273,
1696,
12,
3459,
13,
365,
1618... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
556,
409,
70,
12,
2890,
4672,
1544,
273,
365,
16186,
3459,
1435,
309,
365,
16186,
1966,
353,
599,
30,
1815,
365,
18,
8966,
1435,
775,
30,
4253,
273,
1696,
12,
3459,
13,
365,
1618... |
zapfile.write(">%s</block>" % xmlify(replacement)) | zapfile.write("\">%s</block>" % xmlify(replacement)) | def write_block (zapfile, adclass, pattern, replacement=None): #print "%s block %s => %s" % (adclass, `pattern`, `replacement`) d = get_rule_dict(adclass, pattern) zapfile.write("""<block title="%(title)s" desc="%(desc)s" url="%(url)s" """ % d) if replacement is not None: zapfile.write(">%s</block>" % xmlify(replacement)) else: zapfile.write("/>") zapfile.write("\n") | 657f0d0ee0e77459d91104d389ffabd1966868e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/657f0d0ee0e77459d91104d389ffabd1966868e0/adzap2wc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
2629,
261,
94,
438,
768,
16,
1261,
1106,
16,
1936,
16,
6060,
33,
7036,
4672,
468,
1188,
2213,
87,
1203,
738,
87,
516,
738,
87,
6,
738,
261,
361,
1106,
16,
1375,
4951,
9191,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
2629,
261,
94,
438,
768,
16,
1261,
1106,
16,
1936,
16,
6060,
33,
7036,
4672,
468,
1188,
2213,
87,
1203,
738,
87,
516,
738,
87,
6,
738,
261,
361,
1106,
16,
1375,
4951,
9191,... |
if Utils.startswith(string.strip(mod.source[idx]), 'self._init_ctrls('): | line = string.strip(mod.source[idx]) if Utils.startswith(line, 'self._init_ctrls('): | e.g. def __init__(self, parent, myFrameCaption): self.frameCaption = 'Design time frame caption' self.frameCaption = myFrameCaption self._init_ctrls(parent) | 2e9d3fcbdee9554725586a2bb9d0c08869148a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2e9d3fcbdee9554725586a2bb9d0c08869148a5c/wxPythonEditorModels.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
425,
18,
75,
18,
565,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
3399,
3219,
21158,
4672,
365,
18,
3789,
21158,
273,
296,
15478,
813,
2623,
11006,
11,
365,
18,
3789,
21158,
273,
3399,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
425,
18,
75,
18,
565,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
3399,
3219,
21158,
4672,
365,
18,
3789,
21158,
273,
296,
15478,
813,
2623,
11006,
11,
365,
18,
3789,
21158,
273,
3399,
321... |
return ByteCodeTemplate(render, self.root, self.parser, stream) | if 'xmlns' in self.root.attrib: del self.root.attrib['xmlns'] return ByteCodeTemplate(render, stream, self) | def __call__(self, macro=None, params=()): if not isinstance(self.root, Element): raise ValueError( "Must define valid namespace for tag: '%s.'" % self.root.tag) | bc20d5deeff33a4ee1fceef1fe36e55810606835 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9696/bc20d5deeff33a4ee1fceef1fe36e55810606835/translation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
11522,
33,
7036,
16,
859,
33,
1435,
4672,
309,
486,
1549,
12,
2890,
18,
3085,
16,
3010,
4672,
1002,
2068,
12,
315,
10136,
4426,
923,
1981,
364,
1047,
30,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
11522,
33,
7036,
16,
859,
33,
1435,
4672,
309,
486,
1549,
12,
2890,
18,
3085,
16,
3010,
4672,
1002,
2068,
12,
315,
10136,
4426,
923,
1981,
364,
1047,
30,... |
pipe = os.popen(cmd) | with os.popen(cmd) as pipe: for line in pipe: words = line.lower().split() for i in range(len(words)): if words[i] in hw_identifiers: return int( words[get_index(i)].replace(':', ''), 16) | def _find_mac(command, args, hw_identifiers, get_index): import os for dir in ['', '/sbin/', '/usr/sbin']: executable = os.path.join(dir, command) if not os.path.exists(executable): continue try: # LC_ALL to get English output, 2>/dev/null to # prevent output on stderr cmd = 'LC_ALL=C %s %s 2>/dev/null' % (executable, args) pipe = os.popen(cmd) except IOError: continue for line in pipe: words = line.lower().split() for i in range(len(words)): if words[i] in hw_identifiers: return int(words[get_index(i)].replace(':', ''), 16) return None | 932acb9a8a57a559c2376c8e4322f96ee3dd9c86 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/932acb9a8a57a559c2376c8e4322f96ee3dd9c86/uuid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
67,
5821,
12,
3076,
16,
833,
16,
16139,
67,
20218,
16,
336,
67,
1615,
4672,
1930,
1140,
364,
1577,
316,
10228,
2187,
1173,
87,
4757,
19,
2187,
1173,
13640,
19,
87,
4757,
354... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
67,
5821,
12,
3076,
16,
833,
16,
16139,
67,
20218,
16,
336,
67,
1615,
4672,
1930,
1140,
364,
1577,
316,
10228,
2187,
1173,
87,
4757,
19,
2187,
1173,
13640,
19,
87,
4757,
354... |
if gameiter.event.event_text == "NP": | if gameiter.event.event_text != "NP": map(lambda x: x.OnEvent(game, gameiter), acclist) if gameiter.event.first_sub != None: | def ProcessGame(game, acclist): gameiter = CWGameIterator(game) map(lambda x: x.OnBeginGame(game, gameiter), acclist) while gameiter.event != None: if gameiter.event.event_text == "NP": # Note that there exist some Retrosheet files that have subs # that aren't preceded by NP... map(lambda x: x.OnSubstitution(game, gameiter), acclist) gameiter.NextEvent() continue map(lambda x: x.OnEvent(game, gameiter), acclist) gameiter.NextEvent() map(lambda x: x.OnEndGame(game, gameiter), acclist) | efdf67c2861d7d1352e442dde1bc2fb2f5bb81dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10056/efdf67c2861d7d1352e442dde1bc2fb2f5bb81dc/statscan.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4389,
12496,
12,
13957,
16,
1721,
830,
376,
4672,
7920,
2165,
273,
385,
59,
12496,
3198,
12,
13957,
13,
852,
12,
14661,
619,
30,
619,
18,
1398,
8149,
12496,
12,
13957,
16,
7920,
2165,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4389,
12496,
12,
13957,
16,
1721,
830,
376,
4672,
7920,
2165,
273,
385,
59,
12496,
3198,
12,
13957,
13,
852,
12,
14661,
619,
30,
619,
18,
1398,
8149,
12496,
12,
13957,
16,
7920,
2165,
... |
def center_image(self, width, height): if width == 0: width = self.imageview.size_request()[0] if height == 0: height = self.imageview.size_request()[1] while gtk.events_pending(): gtk.main_iteration() x_shift = int((self.available_image_width() - width)/2) | def show_scrollbars_if_needed(self): if self.currimg_width > self.available_image_width(): self.hscroll.show() else: self.hscroll.hide() if self.currimg_height > self.available_image_height(): self.vscroll.show() else: self.vscroll.hide() def center_image(self): x_shift = int((self.available_image_width() - self.currimg_width)/2) | def put_zoom_image_to_window(self): previmg = self.currimg # Always start with the original image to preserve quality! # Calculate image size: finalimg_width = int(self.originalimg.get_width() * self.zoomratio) finalimg_height = int(self.originalimg.get_height() * self.zoomratio) # If self.zoomratio < 1, scale first so that rotating/flipping is performed # on the smaller image for speed improvements if self.zoomratio < 1: # Scale image: if self.originalimg.get_has_alpha() == False: self.currimg = self.originalimg.scale_simple(finalimg_width, finalimg_height, self.zoom_quality) else: colormap = self.imageview.get_colormap() light_grey = colormap.alloc_color('#666666', True, True) dark_grey = colormap.alloc_color('#999999', True, True) self.currimg = self.originalimg.composite_color_simple(finalimg_width, finalimg_height, self.zoom_quality, 255, 8, light_grey.pixel, dark_grey.pixel) # Now check if we need any rotating/flipping if self.orientation == 1: if self.location == 0: self.currimg = self.image_rotate(self.currimg, 270) self.currimg = self.image_flip(self.currimg, False) elif self.location == 1: self.currimg = self.image_rotate(self.currimg, 270) elif self.location == 2: self.currimg = self.image_rotate(self.currimg, 270) self.currimg = self.image_flip(self.currimg, True) elif self.location == 3: self.currimg = self.image_rotate(self.currimg, 90) else: if self.location == 1: self.currimg = self.image_flip(self.currimg, False) elif self.location == 2: self.currimg = self.image_rotate(self.currimg, 180) elif self.location == 3: self.currimg = self.image_flip(self.currimg, True) # If self.zoomratio >= 1, perform any rotating/flipping on the smaller image # (before scaling up) for speed improvements if self.zoomratio >= 1: # Check if we need any rotating/flipping if self.orientation == 1: finalimg_width, finalimg_height = finalimg_height, finalimg_width if self.location == 0: self.currimg = self.image_rotate(self.originalimg, 270) self.currimg = self.image_flip(self.currimg, False) elif self.location == 1: self.currimg = self.image_rotate(self.originalimg, 270) elif self.location == 2: self.currimg = self.image_rotate(self.originalimg, 270) self.currimg = self.image_flip(self.currimg, True) elif self.location == 3: self.currimg = self.image_rotate(self.originalimg, 90) else: if self.location == 0: self.currimg = self.originalimg elif self.location == 1: self.currimg = self.image_flip(self.originalimg, False) elif self.location == 2: self.currimg = self.image_rotate(self.originalimg, 180) elif self.location == 3: self.currimg = self.image_flip(self.originalimg, True) # Scale image: if self.originalimg.get_has_alpha() == False: if self.zoomratio != 1: self.currimg = self.currimg.scale_simple(finalimg_width, finalimg_height, self.zoom_quality) else: colormap = self.imageview.get_colormap() light_grey = colormap.alloc_color('#666666', True, True) dark_grey = colormap.alloc_color('#999999', True, True) self.currimg = self.currimg.composite_color_simple(finalimg_width, finalimg_height, self.zoom_quality, 255, 8, light_grey.pixel, dark_grey.pixel) if finalimg_width > self.available_image_width(): self.hscroll.show() else: self.hscroll.hide() if finalimg_height > self.available_image_height(): self.vscroll.show() else: self.vscroll.hide() self.layout.set_size(finalimg_width, finalimg_height) self.center_image(finalimg_width, finalimg_height) self.imageview.set_from_pixbuf(self.currimg) self.first_image_load = False # Clean up (free memory) because I'm lazy gc.collect() return | 76a2283830945fb2f62193dae50ef08730d10a74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/76a2283830945fb2f62193dae50ef08730d10a74/mirage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
67,
14932,
67,
2730,
67,
869,
67,
5668,
12,
2890,
4672,
2807,
6081,
273,
365,
18,
17016,
6081,
468,
14178,
787,
598,
326,
2282,
1316,
358,
9420,
9312,
5,
468,
9029,
1316,
963,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
67,
14932,
67,
2730,
67,
869,
67,
5668,
12,
2890,
4672,
2807,
6081,
273,
365,
18,
17016,
6081,
468,
14178,
787,
598,
326,
2282,
1316,
358,
9420,
9312,
5,
468,
9029,
1316,
963,
30... |
return ENVIRONMENT_CHANGED, test_time | return ENV_CHANGED, test_time | def runtest_inner(test, verbose, quiet, testdir=None, huntrleaks=False): test_support.unload(test) if not testdir: testdir = findtestdir() if verbose: capture_stdout = None else: capture_stdout = cStringIO.StringIO() test_time = 0.0 refleak = False # True if the test leaked references. try: save_stdout = sys.stdout try: if capture_stdout: sys.stdout = capture_stdout if test.startswith('test.'): abstest = test else: # Always import it from the test package abstest = 'test.' + test with saved_test_environment(test, verbose, quiet) as environment: start_time = time.time() the_package = __import__(abstest, globals(), locals(), []) the_module = getattr(the_package, test) # Old tests run to completion simply as a side-effect of # being imported. For tests based on unittest or doctest, # explicitly invoke their test_main() function (if it exists). indirect_test = getattr(the_module, "test_main", None) if indirect_test is not None: indirect_test() if huntrleaks: refleak = dash_R(the_module, test, indirect_test, huntrleaks) test_time = time.time() - start_time finally: sys.stdout = save_stdout except test_support.ResourceDenied, msg: if not quiet: print test, "skipped --", msg sys.stdout.flush() return RESOURCE_DENIED, test_time except unittest.SkipTest, msg: if not quiet: print test, "skipped --", msg sys.stdout.flush() return SKIPPED, test_time except KeyboardInterrupt: raise except test_support.TestFailed, msg: print "test", test, "failed --", msg sys.stdout.flush() return FAILED, test_time except: type, value = sys.exc_info()[:2] print "test", test, "crashed --", str(type) + ":", value sys.stdout.flush() if verbose: traceback.print_exc(file=sys.stdout) sys.stdout.flush() return FAILED, test_time else: if refleak: return FAILED, test_time if environment.changed: return ENVIRONMENT_CHANGED, test_time # Except in verbose mode, tests should not print anything if verbose or huntrleaks: return PASSED, test_time output = capture_stdout.getvalue() if not output: return PASSED, test_time print "test", test, "produced unexpected output:" print "*" * 70 print output print "*" * 70 sys.stdout.flush() return FAILED, test_time | 85c82169d81c45b0969de66040d7c852f5f141d4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/85c82169d81c45b0969de66040d7c852f5f141d4/regrtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3813,
67,
7872,
12,
3813,
16,
3988,
16,
10902,
16,
1842,
1214,
33,
7036,
16,
366,
318,
313,
298,
581,
87,
33,
8381,
4672,
1842,
67,
13261,
18,
318,
945,
12,
3813,
13,
309,
486,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3813,
67,
7872,
12,
3813,
16,
3988,
16,
10902,
16,
1842,
1214,
33,
7036,
16,
366,
318,
313,
298,
581,
87,
33,
8381,
4672,
1842,
67,
13261,
18,
318,
945,
12,
3813,
13,
309,
486,... |
group theory. Of course, G must be a group of low order. | group theory. Of course, `G` must be a group of low order. EXAMPLES: | def cayley_table(self, names="x"): """ Returns the multiplication table, or Cayley table, of the finite group G in the form of a matrix with symbolic coefficients. This function is useful for learning, teaching, and exploring elementary group theory. Of course, G must be a group of low order. As the last line below illustrates, the ordering used here in the first row is the same as in G.list(). EXAMPLES:: sage: G = PermutationGroup(['(1,2,3)', '(2,3)']) sage: G.cayley_table() [x0 x1 x2 x3 x4 x5] [x1 x0 x3 x2 x5 x4] [x2 x4 x0 x5 x1 x3] [x3 x5 x1 x4 x0 x2] [x4 x2 x5 x0 x3 x1] [x5 x3 x4 x1 x2 x0] sage: G.list()[3]*G.list()[3] == G.list()[4] True sage: G.cayley_table("y") [y0 y1 y2 y3 y4 y5] [y1 y0 y3 y2 y5 y4] [y2 y4 y0 y5 y1 y3] [y3 y5 y1 y4 y0 y2] [y4 y2 y5 y0 y3 y1] [y5 y3 y4 y1 y2 y0] sage: G.cayley_table(names="abcdef") [a b c d e f] [b a d c f e] [c e a f b d] [d f b e a c] [e c f a d b] [f d e b c a] """ G = self n = G.order() phi = G._gap_().RegularActionHomomorphism() gens = phi.Image().GeneratorsOfGroup() N = Integer(gens.Length()) nm = gens.name() gens = [PermutationGroupElement(gap.eval("%s[%s];"%(nm, i))) for i in range(1,N+1)] H = PermutationGroup(gens) nH = H.order() R,vars = PolynomialRing(RationalField(),names,nH).objgens() multiplication_table_G = sum([(H.list()[i]).matrix()*vars[i] for i in range(nH)]) MT = multiplication_table_G.rows() MT.sort() MT.reverse() MS = MatrixSpace(R,n,n) return MS(MT) | 1a05983ebb3835bbd44e7ffd0287f6bbaee2ac36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/1a05983ebb3835bbd44e7ffd0287f6bbaee2ac36/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
528,
30678,
67,
2121,
12,
2890,
16,
1257,
1546,
92,
6,
4672,
3536,
2860,
326,
23066,
1014,
16,
578,
385,
528,
30678,
1014,
16,
434,
326,
25922,
1041,
611,
316,
326,
646,
434,
279,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
528,
30678,
67,
2121,
12,
2890,
16,
1257,
1546,
92,
6,
4672,
3536,
2860,
326,
23066,
1014,
16,
578,
385,
528,
30678,
1014,
16,
434,
326,
25922,
1041,
611,
316,
326,
646,
434,
279,... |
def _examine_raise(self, r, should_be_remote): tc = Failures() tc._examine_raise(r, should_be_remote) | def _examine_raise(self, r, should_be_remote): # delegate to the code in Failures(), above tc = Failures() tc._examine_raise(r, should_be_remote) | 5ebf7776b3da378747b0706368a030e68866a6d7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13646/5ebf7776b3da378747b0706368a030e68866a6d7/test_call.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
338,
301,
558,
67,
11628,
12,
2890,
16,
436,
16,
1410,
67,
2196,
67,
7222,
4672,
468,
7152,
358,
326,
981,
316,
8911,
1823,
9334,
5721,
1715,
273,
8911,
1823,
1435,
1715,
6315,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
338,
301,
558,
67,
11628,
12,
2890,
16,
436,
16,
1410,
67,
2196,
67,
7222,
4672,
468,
7152,
358,
326,
981,
316,
8911,
1823,
9334,
5721,
1715,
273,
8911,
1823,
1435,
1715,
6315,
33... | |
if context.portal_type == 'PlumiVideoFolder': | if context.portal_type == 'Plumi Video Folder': | def __init__(self, context): """It would be much better not to count on the acquisition and old python script, and recode this part. """ | 719bfe5a229a0aa520daebf1dff0d84113ab32af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12334/719bfe5a229a0aa520daebf1dff0d84113ab32af/adapters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
819,
4672,
3536,
7193,
4102,
506,
9816,
7844,
486,
358,
1056,
603,
326,
1721,
22094,
471,
1592,
5790,
2728,
16,
471,
283,
710,
333,
1087,
18,
3536,
2,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
819,
4672,
3536,
7193,
4102,
506,
9816,
7844,
486,
358,
1056,
603,
326,
1721,
22094,
471,
1592,
5790,
2728,
16,
471,
283,
710,
333,
1087,
18,
3536,
2,
-1... |
Biopython will have each sequence on a single line, and each quality string on a single line (which is considered desirable for maximum compatibility). This code is also called if you use the .format("fastq-solexa") method of a SeqRecord. | Biopython will have each sequence on a single line, and each quality string on a single line (which is considered desirable for maximum compatibility). This code is also called if you use the .format("fastq-solexa") method of a SeqRecord. | def write_record(self, record): """Write a single QUAL record to the file.""" assert self._header_written assert not self._footer_written self._record_written = True | e56d79f2d97ef19f21b535c042077c194de886f9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/e56d79f2d97ef19f21b535c042077c194de886f9/QualityIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
3366,
12,
2890,
16,
1409,
4672,
3536,
3067,
279,
2202,
10110,
1013,
1409,
358,
326,
585,
12123,
1815,
365,
6315,
3374,
67,
9748,
1815,
486,
365,
6315,
14723,
67,
9748,
365,
631... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
3366,
12,
2890,
16,
1409,
4672,
3536,
3067,
279,
2202,
10110,
1013,
1409,
358,
326,
585,
12123,
1815,
365,
6315,
3374,
67,
9748,
1815,
486,
365,
6315,
14723,
67,
9748,
365,
631... |
ErrorDialog((_("Failure writing to %s") % base), | ErrorDialog((_("Failure writing to %s") % base), | def calc_url(self): """ Creates a file for use with GoogleEarth and launches GoogleEarth if in system """ home_dir = os.path.expanduser("~") default_filename = 'GrampsPlacesForGoogleEarth' filename = os.path.join(home_dir, default_filename) if not _GOOGLEEARTH_OK: qd2 = QuestionDialog2( _("GoogleEarth not installed!"), (_("Create kmz/kml file ''%s''\n" "in user directory ''%s''?")\ % (default_filename, home_dir)), _("Yes"), _("No")) if not qd2.run(): return base = os.path.dirname(filename) # Check if directory exists if not os.path.exists(os.path.normpath(base)): ErrorDialog((_("Failure writing to %s") % base), _("Directory does not exist")) return | 767a0ae51fb403854e86b60498675cea0c45c60e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1491/767a0ae51fb403854e86b60498675cea0c45c60e/GoogleEarthWriteKML.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
718,
12,
2890,
4672,
3536,
10210,
279,
585,
364,
999,
598,
6124,
41,
27076,
471,
8037,
281,
6124,
41,
27076,
309,
316,
2619,
3536,
6382,
67,
1214,
273,
1140,
18,
803,
18,
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,
7029,
67,
718,
12,
2890,
4672,
3536,
10210,
279,
585,
364,
999,
598,
6124,
41,
27076,
471,
8037,
281,
6124,
41,
27076,
309,
316,
2619,
3536,
6382,
67,
1214,
273,
1140,
18,
803,
18,
123... |
taskMgr.add(self.readerPollUntilEmpty, self.uniqueName("readerPollTask"), priority = self.taskPriority, taskChain = self.taskChain) | self.readerPollTaskObj = taskMgr.add( self.readerPollUntilEmpty, self.uniqueName("readerPollTask"), priority = self.taskPriority, taskChain = self.taskChain) | def startReaderPollTask(self): # Stop any tasks we are running now self.stopReaderPollTask() self.accept(CConnectionRepository.getOverflowEventName(), self.handleReaderOverflow) taskMgr.add(self.readerPollUntilEmpty, self.uniqueName("readerPollTask"), priority = self.taskPriority, taskChain = self.taskChain) | eaa2163cb0dc425fd86de0987e7e6f3bb69e0604 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/eaa2163cb0dc425fd86de0987e7e6f3bb69e0604/ConnectionRepository.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
2514,
19085,
2174,
12,
2890,
4672,
468,
5131,
1281,
4592,
732,
854,
3549,
2037,
365,
18,
5681,
2514,
19085,
2174,
1435,
365,
18,
9436,
12,
39,
1952,
3305,
18,
588,
15526,
24320,
933... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
2514,
19085,
2174,
12,
2890,
4672,
468,
5131,
1281,
4592,
732,
854,
3549,
2037,
365,
18,
5681,
2514,
19085,
2174,
1435,
365,
18,
9436,
12,
39,
1952,
3305,
18,
588,
15526,
24320,
933... |
if wikipedia.Page(site, target).exists(): | if wikipedia.Page(self.importsite, target).exists(): | def Import(self, target, project = 'w', crono = '1', namespace = '', prompt = True): """Import the page from the wiki. Requires administrator status. If prompt is True, asks the user if he wants to delete the page. """ # Fixing the crono value... if crono == True: crono = '1' elif crono == False: crono = '0' elif crono == '0': pass elif crono == '1': pass else: wikipedia.output(u'Crono value set wrongly.') wikipedia.stopme() # Fixing namespace's value. if namespace == '0': namespace == '' answer = 'y' if prompt: answer = wikipedia.inputChoice(u'Do you want to import %s?' % target, ['Yes', 'No'], ['y', 'N'], 'N') if answer in ['y', 'Y']: host = self.site().hostname() address = '/w/index.php?title=%s&action=submit' % self.urlname() # You need to be a sysop for the import. self.site().forceLogin(sysop = True) # Getting the token. token = self.site().getToken(self, sysop = True) # Defing the predata. predata = { 'action' : 'submit', 'source' : 'interwiki', # from what project do you want to import the page? 'interwiki' : project, # What is the page that you want to import? 'frompage' : target, # The entire history... or not? 'interwikiHistory' : crono, # What namespace do you want? 'namespace': '', } if self.site().hostname() in config.authenticate.keys(): predata['Content-type'] = 'application/x-www-form-urlencoded' predata['User-agent'] = useragent data = self.site().urlEncode(predata) response = urllib2.urlopen(urllib2.Request('http://' + self.site().hostname() + address, data)) data = u'' else: response, data = self.site().postForm(address, predata, sysop = True) if data: wikipedia.output(u'Page imported, checking...') if wikipedia.Page(site, target).exists(): wikipedia.output(u'Import success!') return True else: wikipedia.output(u'Import failed!') return False | fe27e687bf0271ca1ae39d0c531af78593d3f6d9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/fe27e687bf0271ca1ae39d0c531af78593d3f6d9/pageimport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6164,
12,
2890,
16,
1018,
16,
1984,
273,
296,
91,
2187,
9998,
83,
273,
296,
21,
2187,
1981,
273,
10226,
6866,
273,
1053,
4672,
3536,
5010,
326,
1363,
628,
326,
9050,
18,
16412,
22330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6164,
12,
2890,
16,
1018,
16,
1984,
273,
296,
91,
2187,
9998,
83,
273,
296,
21,
2187,
1981,
273,
10226,
6866,
273,
1053,
4672,
3536,
5010,
326,
1363,
628,
326,
9050,
18,
16412,
22330,
... |
to the shell (as with os.system()). If 'bufsize' is specified, | to the shell (as with os.system()). If 'bufsize' is specified, | def popen3(cmd, mode="t", bufsize=-1): """Execute the shell command 'cmd' in a sub-process. On UNIX, 'cmd' may be a sequence, in which case arguments will be passed directly to the program without shell intervention (as with os.spawnv()). If 'cmd' is a string it will be passed to the shell (as with os.system()). If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdin, child_stdout, child_stderr) are returned. """ import popen2 stdout, stdin, stderr = popen2.popen3(cmd, bufsize) return stdin, stdout, stderr | a92757e6b27e6c7cb6fa02f29c9b1ad013296881 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6753/a92757e6b27e6c7cb6fa02f29c9b1ad013296881/javaos.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30925,
23,
12,
4172,
16,
1965,
1546,
88,
3113,
1681,
1467,
29711,
21,
4672,
3536,
5289,
326,
5972,
1296,
296,
4172,
11,
316,
279,
720,
17,
2567,
18,
225,
2755,
23160,
16,
296,
4172,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30925,
23,
12,
4172,
16,
1965,
1546,
88,
3113,
1681,
1467,
29711,
21,
4672,
3536,
5289,
326,
5972,
1296,
296,
4172,
11,
316,
279,
720,
17,
2567,
18,
225,
2755,
23160,
16,
296,
4172,
11... |
def __init__(self, dbname, dbuser = '', dbpasswd = ''): | def __init__(self, dbname, dbuser = '', dbpasswd = '', debug = False): | def __init__(self, dbname, dbuser = '', dbpasswd = ''): """ Open a connection to the state segment database. | 0588560df8c27a55b6ad3828804d3f9f58d5e948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/0588560df8c27a55b6ad3828804d3f9f58d5e948/statedb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
18448,
16,
1319,
1355,
273,
10226,
1319,
24002,
273,
10226,
1198,
273,
1083,
4672,
3536,
3502,
279,
1459,
358,
326,
919,
3267,
2063,
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,
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,
18448,
16,
1319,
1355,
273,
10226,
1319,
24002,
273,
10226,
1198,
273,
1083,
4672,
3536,
3502,
279,
1459,
358,
326,
919,
3267,
2063,
18,
2,
-100,
-100,
-10... |
config = type('config', (object,), {'command_char': '!'}) | config = {'command_char': '!'} | def test_privmsg_command_char(self): '''Calling bot.privmsg with custom command char''' # set up command char config _COMMAND_CHAR = ircbot.COMMAND_CHAR | db0c181a6701a891323882a8832849034e187da8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5759/db0c181a6701a891323882a8832849034e187da8/test_events.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11365,
3576,
67,
3076,
67,
3001,
12,
2890,
4672,
9163,
19677,
2512,
18,
11365,
3576,
598,
1679,
1296,
1149,
26418,
468,
444,
731,
1296,
1149,
642,
389,
19104,
67,
7305,
273,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11365,
3576,
67,
3076,
67,
3001,
12,
2890,
4672,
9163,
19677,
2512,
18,
11365,
3576,
598,
1679,
1296,
1149,
26418,
468,
444,
731,
1296,
1149,
642,
389,
19104,
67,
7305,
273,
27... |
while 1: URL = "/w/index.php?title=Special:Log&type=newusers&user=&page=&limit=%d" % limit log = welcomesite.getUrl(URL) wikipedia.output(u"Loading latest " + str(limit) + u" new users from " + (wikipedia.getSite().hostname()) + u"...\n") parsed = parselog(log) for tablita in parsed: username = str(tablita[0]) UNT = wikipedia.Page(welcomesite, talk + username) baduser = False try: int(username) baduser = True except ValueError: pass for word in elenco: if word.lower() in username.lower(): baduser = True if baduser == True: running = True while running: if ask == True: wikipedia.output(u"%s hasn't got a valid nickname, what shall i do?" % username ) answer = wikipedia.input(u"[B]lock or [W]elcome?") for w in block: if w in answer: | try: while 1: if filter_wp == True: elencoaf = [' ano', ' anus', 'anal ', 'babies', 'baldracca', 'balle', 'bastardo', 'bestiali', 'bestiale', 'bastarda', 'b.i.t.c.h.', 'bitch', 'boobie', 'bordello', 'breast', 'cacata', 'cacca', 'cachapera', 'cagata', 'cane', 'cazz', 'cazzo', 'cazzata', 'chiavare', 'chiavata', 'chick', 'christ ', 'cristo', 'clitoride', 'coione', 'cojdioonear', 'cojones', 'cojo', 'coglione', 'coglioni', 'cornuto', 'cula', 'culatone', 'culattone', 'culo', 'deficiente', 'deficente', 'dio', 'die ', 'died ', 'ditalino', 'ejackulate', 'enculer', 'eroticunt', 'fanculo', 'fellatio', 'fica ', 'ficken', 'figa', 'sfiga', 'fottere', 'fotter', 'fottuto', 'fuck', 'f.u.c.k.', "funkyass"] elencogz = ['gay', 'gaysex', 'hentai.com', 'horne', 'horney', 'hot', 'virgin', 'hot', 'hotties', 'idiot', '@alice.it', 'incest', 'jesus', 'gesu', 'gesù', 'kazzo', 'kill', 'leccaculo', 'lesbian', 'lesbica', 'lesbo', 'masturbazione', 'masturbare', 'masturbo', 'merda', 'merdata', 'merdoso', 'mignotta', 'minchia', 'minkia', 'minchione', 'mona', 'nudo', 'nuda', 'nudi', 'oral', 'sex', 'orgasmso', 'porc', 'pompa', 'pompino', 'porno', 'puttana', 'puzza', 'puzzone', "racchia", 'sborone', 'sborrone', 'sborata', 'sborolata', 'sboro', 'scopata', 'scopare', 'scroto', 'scrotum', 'sega', 'sex', 'sesso', 'shit', 'shiz', 's.h.i.t.', 'sadomaso', 'sodomist', 'stronzata', 'stronzo', 'succhiamelo', 'succhiacazzi', 'testicol', 'troia', 'universetoday.net', 'vaffanculo', 'vagina', 'vibrator', "vacca", 'yiddiot', "zoccola"] elenco_others = ['@', ".com", ".sex", ".org", ".uk", ".en", ".it", "admin", "administrator", "amministratore", '@yahoo.com', '@alice.com', "amministratrice", "burocrate", "checkuser", "developer", "http://", "jimbo", 'jimmy wales', 'jymmy wales', 'jymbo wales', 'jimbo waIes', "mediawiki", "on wheals", "on wheal", "on wheel", "on wheels", "planante", "razinger", "sysop", "troll", "vandal", " v.f. ", "v. fighter", "vandal f.", "vandal fighter", 'wales jimmy', "wheels", 'willy wheels', "wales", "www."] badword_page = wikipedia.Page(lang, bad_page) if badword_page.exists(): wikipedia.output(u"\nLoading the bad words list from " + welcomesite.hostname() + u"...") text_bad = badword_page.get() list_loaded = badword_function(text_bad) else: wikipedia.output(u"\t\t>>>WARNING: The bad word page doesn't exist!<<<") list_loaded = list() elencovarie = elenco_others + list_loaded elif filter_wp == False: elencoaf = list() elencogz = list() elencovarie = list() elenco = elencoaf + elencogz + elencovarie if filter_wp == True: whitelist_default = ['emiliano'] whitelist_page = wikipedia.Page(lang, wtlpg) if whitelist_page.exists(): wikipedia.output(u"\nLoading the whitelist from " + welcomesite.hostname() + u"...") text_white = whitelist_page.get() list_white = badword_function(text_white) else: wikipedia.output(u"\t\t>>>WARNING: The whitelist's page doesn't exist!<<<") list_white = list() else: list_white = list() whitelist_default = list() whitelist = list_white + whitelist_default block = ("B", "b", "Blocco", "blocco", "block", "bloc", "Block", "Bloc", 'Report', 'report') say_hi = ("S", "s", "Saluto", "saluto", "Welcome", "welcome", 'w', 'W', 'say hi', 'Say hi', 'Hi', 'hi', 'h', 'hello', 'Hello') URL = "/w/index.php?title=Special:Log&type=newusers&user=&page=&limit=%d" % limit log = welcomesite.getUrl(URL) wikipedia.output(u"Loading latest " + str(limit) + u" new users from " + (welcomesite.hostname()) + u"...\n") parsed = parselog(log) if random == True: try: SignList = DefineSign(welcomesite, SignPage) except wikipedia.NoPage: wikipedia.output(u"The sign's list isn't available... using default sign...") random = False for tablita in parsed: if project == "wikinews": if lang == "it": logg = 'Wikinotizie:Benvenuto log' welcom = "{{subst:benvenuto|%s}}" sign = 'Tooby' elif project == 'wiktionaty': if lang == 'it': logg = 'Wikizionario:Benvenuto log' welcom = '{{Utente:Filnik/Benve|nome={{subst:PAGENAME}}}} %s' if random == True: if number_user + 1> len(SignList): number_user = 0 welcom = welcomer % SignList[number_user] else: welcom = welcomer % sign username = str(tablita[0]) UNT = wikipedia.Page(welcomesite, talk + username) baduser = False try: int(username) baduser = True except ValueError: pass ki = blocked(username, welcomesite) if ki == 'Blocked': baduser = True for word in elenco: if word.lower() in username.lower(): baduser = True for xy in whitelist: if xy.lower() in username.lower(): username.replace(xy, '') for word in elenco: if word.lower() in username.lower(): baduser = True else: baduser = False if baduser == True: running = True while running: if ask == True: wikipedia.output(u"%s hasn't got a valid nickname, what shall i do?" % username ) answer = wikipedia.input(u"[B]lock or [W]elcome?") for w in block: if w in answer: if not UNT.exists(): report(lang, rep_page, username, com, rep_text) running = False else: wikipedia.output(u'The discussion page of the bad-user already exist...') running = False for w in say_hi: if w in answer: baduser = False running = False elif ask == False: wikipedia.output(u"%s is possibly not a wanted username. It will be reported." % username) if not UNT.exists(): | def report(lang, rep_page, username, com, rep): another_page = wikipedia.Page(lang, rep_page) if another_page.exists(): text_get = another_page.get() else: text_get = '' pos = 0 # The talk page includes "_" between the two names, in this way i replace them to " " regex = talk.replace('_', ' ') + username n = re.compile(regex, re.UNICODE) y = n.search(text_get, pos) if y == None: # Adding the log :) rep_text = rep % username another_page.put(text_get + rep_text, comment = com, minorEdit = True) wikipedia.output(u"...Reported...") else: pos = y.end() wikipedia.output(u"The user is already in the report page.") | dfe6e60e902823a8403f731ef0b42749b0157909 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/dfe6e60e902823a8403f731ef0b42749b0157909/welcome.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
12,
4936,
16,
2071,
67,
2433,
16,
2718,
16,
532,
16,
2071,
4672,
4042,
67,
2433,
273,
21137,
18,
1964,
12,
4936,
16,
2071,
67,
2433,
13,
309,
4042,
67,
2433,
18,
1808,
13332,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
12,
4936,
16,
2071,
67,
2433,
16,
2718,
16,
532,
16,
2071,
4672,
4042,
67,
2433,
273,
21137,
18,
1964,
12,
4936,
16,
2071,
67,
2433,
13,
309,
4042,
67,
2433,
18,
1808,
13332,
9... |
if self._top is None: return self._top.destroy() self._top = None | if self._root is None: return for m in sys.modules.keys(): if m not in self._old_modules: del sys.modules[m] self._root.destroy() self._root = None def add_module(self, name, check=0): if check: try: m = import_module(name) except: print >>sys.stderr, "Error importing module: %s" % name self._update_messages() self._root.bell() return self._module_list.insert('end', name) self._module_list.yview('end') | def destroy(self, *e): if self._top is None: return self._top.destroy() self._top = None | 4cf6d74130c32443c10897614b39d1c2c512796c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/4cf6d74130c32443c10897614b39d1c2c512796c/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5546,
12,
2890,
16,
380,
73,
4672,
309,
365,
6315,
3669,
353,
599,
30,
327,
365,
6315,
3669,
18,
11662,
1435,
365,
6315,
3669,
273,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5546,
12,
2890,
16,
380,
73,
4672,
309,
365,
6315,
3669,
353,
599,
30,
327,
365,
6315,
3669,
18,
11662,
1435,
365,
6315,
3669,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def __init__(self, is_total=True): self.is_total = is_total | def gen_indent(indent) : header = "" for i in range(indent): header += " " return header | 2de7dc9c2b01f64ae003edf0798f21745ad80d56 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/600/2de7dc9c2b01f64ae003edf0798f21745ad80d56/process.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
9355,
12,
9355,
13,
294,
1446,
273,
1408,
364,
277,
316,
1048,
12,
9355,
4672,
1446,
1011,
315,
565,
315,
327,
1446,
225,
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,
3157,
67,
9355,
12,
9355,
13,
294,
1446,
273,
1408,
364,
277,
316,
1048,
12,
9355,
4672,
1446,
1011,
315,
565,
315,
327,
1446,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
if elapsed > 5.0: print >> param.log, 'Slow SQL:', elapsed, args, kwargs | if param.debug: if elapsed > 5.0: print >> param.log, 'Slow SQL:', elapsed, args, kwargs print >> param.log, thread.get_ident(), time.time(), 'done' | def execute(self, *args, **kwargs): from pysqlite2 import dbapi2 as sqlite before = time.time() backoff = 0.1 done = False while not done: try: result = self.c.execute(*args, **kwargs) done = True except sqlite.OperationalError, e: print >> param.log, str(e) + ', sleeping for', backoff time.sleep(backoff) backoff = min(backoff * 2, 5.0) elapsed = time.time() - before if elapsed > 5.0: print >> param.log, 'Slow SQL:', elapsed, args, kwargs return result | f6424833c58f7002c124272cb8b55b3abac707fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10695/f6424833c58f7002c124272cb8b55b3abac707fa/singleton.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
628,
293,
5308,
1137,
22,
1930,
1319,
2425,
22,
487,
16184,
1865,
273,
813,
18,
957,
1435,
12260,
273,
374,
18,
21,
2731,
273,
1083... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
628,
293,
5308,
1137,
22,
1930,
1319,
2425,
22,
487,
16184,
1865,
273,
813,
18,
957,
1435,
12260,
273,
374,
18,
21,
2731,
273,
1083... |
chapSecrets.items[client] = ('pptpd', secret, ip) | chapSecrets.items['pptpd'][client] = {'server': 'pptpd', 'client': client, 'secret': secret, 'ip': ip} | def _call(self, client, secret, ip = ''): chapSecrets = ChapSecrets() chapSecrets.items[client] = ('pptpd', secret, ip) chapSecrets.save() return A(None, 'Account successfully added') | 71032fff4d9b51a3855c878834a988ac48a49726 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9377/71032fff4d9b51a3855c878834a988ac48a49726/vpn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1991,
12,
2890,
16,
1004,
16,
4001,
16,
2359,
273,
875,
4672,
462,
438,
20815,
273,
1680,
438,
20815,
1435,
462,
438,
20815,
18,
3319,
3292,
84,
337,
22353,
3546,
63,
2625,
65,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1991,
12,
2890,
16,
1004,
16,
4001,
16,
2359,
273,
875,
4672,
462,
438,
20815,
273,
1680,
438,
20815,
1435,
462,
438,
20815,
18,
3319,
3292,
84,
337,
22353,
3546,
63,
2625,
65,
27... |
try: ignore = posix.fdopen except: raise AttributeError, 'dup() method unavailable' | if not hasattr(posix, 'fdopen'): raise AttributeError, 'dup() method unavailable' | def dup2(self, fd): import posix | 748394e4dcbaa5fb305c797b846c0c7323c09f95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/748394e4dcbaa5fb305c797b846c0c7323c09f95/posixfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9417,
22,
12,
2890,
16,
5194,
4672,
1930,
16366,
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,
9417,
22,
12,
2890,
16,
5194,
4672,
1930,
16366,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return self._operator(*new_ops) | is_constant = all(map(lambda x: isinstance(x, SymbolicConstant), new_ops)) if is_constant: return SymbolicConstant( self._operator(*map(lambda x: x._obj, new_ops)) ) else: return self._operator(*new_ops) | def _recursive_sub(self, kwds): """ EXAMPLES: sage: var('x, y, z, w') (x, y, z, w) sage: f = (x - x) + y^2 - z/z + (w^2-1)/(w+1); f y^2 + (w^2 - 1)/(w + 1) - 1 sage: f(y=10) (w^2 - 1)/(w + 1) + 99 sage: f(w=1,y=10) 99 sage: f(y=w,w=y) (y^2 - 1)/(y + 1) + w^2 - 1 | 8d7518bbb7da3058b8ec2ee8e10caf032d5510eb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/8d7518bbb7da3058b8ec2ee8e10caf032d5510eb/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10543,
67,
1717,
12,
2890,
16,
17149,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
569,
2668,
92,
16,
677,
16,
998,
16,
341,
6134,
261,
92,
16,
677,
16,
998,
16,
341,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10543,
67,
1717,
12,
2890,
16,
17149,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
569,
2668,
92,
16,
677,
16,
998,
16,
341,
6134,
261,
92,
16,
677,
16,
998,
16,
341,
13,
... |
def close(self): | def close(self): | def close(self): | f1d302d15f45741d8b0d5e81b4b0e5a61c6fa580 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f1d302d15f45741d8b0d5e81b4b0e5a61c6fa580/binhex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
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,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
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,
-100,
-... |
cty.POINTER(cty.c_uint)], | cty.POINTER(cty.c_uint)], | def fl_popup_entry_set_subpopup(p1, p2): """ fl_popup_entry_set_subpopup(p1, p2) -> popup """ retval = _fl_popup_entry_set_subpopup(p1, p2) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
16086,
67,
4099,
67,
542,
67,
1717,
16086,
12,
84,
21,
16,
293,
22,
4672,
3536,
1183,
67,
16086,
67,
4099,
67,
542,
67,
1717,
16086,
12,
84,
21,
16,
293,
22,
13,
317,
104... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
16086,
67,
4099,
67,
542,
67,
1717,
16086,
12,
84,
21,
16,
293,
22,
4672,
3536,
1183,
67,
16086,
67,
4099,
67,
542,
67,
1717,
16086,
12,
84,
21,
16,
293,
22,
13,
317,
104... |
if not result[ 'OK' ]: return result result = gAccountingDB.loadPendingRecords() | def initializeDataStoreHandler( serviceInfo ): global gAccountingDB gAccountingDB = AccountingDB() gAccountingDB.autoCompactDB() result = gAccountingDB.markAllPendingRecordsAsNotTaken() if not result[ 'OK' ]: return result result = gAccountingDB.loadPendingRecords() if not result[ 'OK' ]: return result gThreadScheduler.addPeriodicTask( 60, gAccountingDB.loadPendingRecords ) return S_OK() | 40294d2721f6386cbe907e9f1c8ff4f5bf48e045 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/40294d2721f6386cbe907e9f1c8ff4f5bf48e045/DataStoreHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
24977,
1503,
12,
1156,
966,
262,
30,
2552,
314,
3032,
310,
2290,
314,
3032,
310,
2290,
273,
6590,
310,
2290,
1435,
314,
3032,
310,
2290,
18,
6079,
16863,
2290,
1435,
563,
273,
314,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
24977,
1503,
12,
1156,
966,
262,
30,
2552,
314,
3032,
310,
2290,
314,
3032,
310,
2290,
273,
6590,
310,
2290,
1435,
314,
3032,
310,
2290,
18,
6079,
16863,
2290,
1435,
563,
273,
314,... | |
def showMessageBox(self, s): s = str(s).strip() | def updateMessageBox(self, item): self.currentItem = item msg_box = self.msg_box s = str(item.data(32).toString()) | def showMessageBox(self, s): s = str(s).strip() msgs = s.split('\n') if self.msg_box and self.msg_box.isVisible(): self.msg_box.close() msg_box = QtGui.QMessageBox(self.parent()) self.msg_box = msg_box if msgs[0] == "INFO": msg_box.setIcon(QtGui.QMessageBox.Information) msg_box.setWindowTitle("Information") elif msgs[0] == "WARNING": msg_box.setIcon(QtGui.QMessageBox.Warning) msg_box.setWindowTitle("Warning") elif msgs[0] == "CRITICAL": msg_box.setIcon(QtGui.QMessageBox.Critical) msg_box.setWindowTitle("Critical error") msg_box.setText(msgs[3]) text = "Time: %s\n Location: %s\n Message:\n%s" % \ (msgs[1], msgs[2], '\n'.join(msgs[3:])) msg_box.setInformativeText('\n'.join(msgs[4:])) msg_box.setStandardButtons(QtGui.QMessageBox.Ok) msg_box.setDefaultButton(QtGui.QMessageBox.Ok) msg_box.setDetailedText(text) msg_box.show() | 037568dc5960fe0f55f627faf210c87f5ee28788 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/037568dc5960fe0f55f627faf210c87f5ee28788/debug.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
27647,
12,
2890,
16,
761,
4672,
365,
18,
2972,
1180,
273,
761,
1234,
67,
2147,
273,
365,
18,
3576,
67,
2147,
225,
272,
273,
609,
12,
1726,
18,
892,
12,
1578,
2934,
10492,
10756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
27647,
12,
2890,
16,
761,
4672,
365,
18,
2972,
1180,
273,
761,
1234,
67,
2147,
273,
365,
18,
3576,
67,
2147,
225,
272,
273,
609,
12,
1726,
18,
892,
12,
1578,
2934,
10492,
10756,
... |
return aValue * N_A def __convertSpeciesSize( self, aSize, aSpecies ): if ( aSpecies[6] != '' ): for aCompartment in self.Model.CompartmentList: if( aCompartment[0] == aSpecies[2] ): if( aCompartment[2] == 0 or aSpecies[8] == 1 ): print "Error : SpatialSizeUnits must not have a value if spatialDimensions on the compartment has a value of 0, or if the species's value of the units field of the species' compartment" sys.exit(1) return self.__convertSpeciesUnit( aSize, aSpecies[6] ) elif ( self.Model.CompartmentUnit[ aSpecies[2] ] != '' ): return self.__convertSpeciesUnit( aSize, self.Model.CompartmentUnit[ aSpecies[2] ] ) else: return aSize def __convertSpeciesUnit( self, aValue, anUnitID ): convertedValueList = [] for anUnitDefinition in self.Model.UnitDefinitionList: if ( anUnitDefinition[0] == anUnitID ): for anUnit in anUnitDefinition[2]: if( anUnit[0] == "mole" ): tmpValue = ( pow( aValue, anUnit[1] ) * pow( 10, anUnit[2] ) * anUnit[3] + anUnit[4] ) * N_A convertedValueList.append( tmpValue ) elif ( anUnit[0] == "item" or anUnit[0] == "litre" or anUnit[0] == "metre" ): tmpValue = ( pow( aValue, anUnit[1] ) * pow( 10, anUnit[2] ) * anUnit[3] + anUnit[4] ) convertedValueList.append( tmpValue ) else: print "Unit Error : SBML Importer isn't mounted ",anUnit[0]," Unit" sys.exit(1) if ( convertedValueList == [] ): if ( anUnitID == "mole" ): tmpValue = aValue * N_A convertedValueList.append( tmpValue ) else: print "Unit Error : SBML Importer isn't mounted ",anUnit[0]," Unit" sys.exit(1) return convertedValueList[0] | return 0 | def __convertSpeciesValue( self, aValue, aSpecies ): | 5558e00913030ea93e1b91139dd82f86730b4cf9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/5558e00913030ea93e1b91139dd82f86730b4cf9/convertSBML2EML.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
6283,
1990,
606,
620,
12,
365,
16,
24406,
16,
279,
1990,
606,
262,
30,
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,
1001,
6283,
1990,
606,
620,
12,
365,
16,
24406,
16,
279,
1990,
606,
262,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
_fl_set_text_clipping = cfuncproto(so_libforms, "fl_set_text_clipping", None, [FL_Coord, FL_Coord, FL_Coord, FL_Coord], | _fl_set_text_clipping = cfuncproto(so_libforms, "fl_set_text_clipping", None, [FL_Coord, FL_Coord, FL_Coord, FL_Coord], | def fl_unset_clipping(): """ fl_unset_clipping() """ _fl_unset_clipping() | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
18579,
67,
14161,
1382,
13332,
3536,
1183,
67,
18579,
67,
14161,
1382,
1435,
3536,
225,
389,
2242,
67,
18579,
67,
14161,
1382,
1435,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
18579,
67,
14161,
1382,
13332,
3536,
1183,
67,
18579,
67,
14161,
1382,
1435,
3536,
225,
389,
2242,
67,
18579,
67,
14161,
1382,
1435,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
'\g<1>' + _(' at ') + '\g<2>', body) | '\g<1>' + atmark + '\g<2>', body) | def as_text(self): d = self.__dict__.copy() # We need to guarantee a valid From_ line, even if there are # bososities in the headers. if not d.get('fromdate', '').strip(): d['fromdate'] = time.ctime(time.time()) if not d.get('email', '').strip(): d['email'] = 'bogus@does.not.exist.com' if not d.get('datestr', '').strip(): d['datestr'] = time.ctime(time.time()) # headers = ['From %(email)s %(fromdate)s', 'From: %(email)s (%(author)s)', 'Date: %(datestr)s', 'Subject: %(subject)s'] if d['_in_reply_to']: headers.append('In-Reply-To: %(_in_reply_to)s') if d['_references']: headers.append('References: %(_references)s') if d['_message_id']: headers.append('Message-ID: %(_message_id)s') body = EMPTYSTRING.join(self.body) if isinstance(body, types.UnicodeType): body = body.encode(Utils.GetCharSet(self._lang), 'replace') if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS: otrans = i18n.get_translation() try: i18n.set_language(self._lang) body = re.sub(r'([-+,.\w]+)@([-+.\w]+)', '\g<1>' + _(' at ') + '\g<2>', body) finally: i18n.set_translation(otrans) return NL.join(headers) % d + '\n\n' + body + '\n' | 2cba5e1afb047f68a965e126005f0ed670262dce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/2cba5e1afb047f68a965e126005f0ed670262dce/HyperArch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
487,
67,
955,
12,
2890,
4672,
302,
273,
365,
16186,
1576,
25648,
3530,
1435,
468,
1660,
1608,
358,
18779,
279,
923,
6338,
67,
980,
16,
5456,
309,
1915,
854,
468,
23904,
538,
1961,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
487,
67,
955,
12,
2890,
4672,
302,
273,
365,
16186,
1576,
25648,
3530,
1435,
468,
1660,
1608,
358,
18779,
279,
923,
6338,
67,
980,
16,
5456,
309,
1915,
854,
468,
23904,
538,
1961,
316,
... |
old = sysconfig._config_vars.get('VERSION') | old = sysconfig.get_config_vars().get('VERSION') | def test_version_int(self): source = self.mkdtemp() target = self.mkdtemp() expected = self.write_sample_scripts(source) | 139c6b0217feeef3cf1c20a9479eb3ecb13f8923 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/139c6b0217feeef3cf1c20a9479eb3ecb13f8923/test_build_scripts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1589,
67,
474,
12,
2890,
4672,
1084,
273,
365,
18,
24816,
72,
5814,
1435,
1018,
273,
365,
18,
24816,
72,
5814,
1435,
2665,
273,
365,
18,
2626,
67,
6358,
67,
12827,
12,
3168,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1589,
67,
474,
12,
2890,
4672,
1084,
273,
365,
18,
24816,
72,
5814,
1435,
1018,
273,
365,
18,
24816,
72,
5814,
1435,
2665,
273,
365,
18,
2626,
67,
6358,
67,
12827,
12,
3168,
... |
self.stats = Stats(profile) self.stream = self.stats.stream else: self.stats = None self.stream = sys.stdout | self.do_read(profile) | def __init__(self, profile=None): cmd.Cmd.__init__(self) self.prompt = "% " if profile is not None: self.stats = Stats(profile) self.stream = self.stats.stream else: self.stats = None self.stream = sys.stdout | 401c4c60c38ffdcfe94d253cbc3c890a8ec5830d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/401c4c60c38ffdcfe94d253cbc3c890a8ec5830d/pstats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3042,
33,
7036,
4672,
1797,
18,
5931,
16186,
2738,
972,
12,
2890,
13,
365,
18,
13325,
273,
2213,
315,
309,
3042,
353,
486,
599,
30,
365,
18,
5296,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3042,
33,
7036,
4672,
1797,
18,
5931,
16186,
2738,
972,
12,
2890,
13,
365,
18,
13325,
273,
2213,
315,
309,
3042,
353,
486,
599,
30,
365,
18,
5296,
273,
... |
if 0 <= idx < len(commandlist) and type(commandlist) == type(()) and \ | if 0 <= idx < len(commandlist) and type(commandlist[idx]) == type(()) and \ | def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfolder=1, id=ARGV_ID): d = GetNewDialog(id, -1) if not d: print "Can't get DLOG resource with id =", id return | 0bb0a90b200ef40f812b70c2623c7062cd39f3b3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0bb0a90b200ef40f812b70c2623c7062cd39f3b3/EasyDialogs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
4117,
90,
12,
3482,
1098,
33,
7036,
16,
1296,
1098,
33,
7036,
16,
527,
1673,
768,
33,
21,
16,
527,
2704,
768,
33,
21,
16,
527,
5609,
33,
21,
16,
612,
33,
10973,
58,
67,
734,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
4117,
90,
12,
3482,
1098,
33,
7036,
16,
1296,
1098,
33,
7036,
16,
527,
1673,
768,
33,
21,
16,
527,
2704,
768,
33,
21,
16,
527,
5609,
33,
21,
16,
612,
33,
10973,
58,
67,
734,
... |
v[r+1] += 5 | v[r+1] += 5*pow(2,self.num_rods-r-1) | def value(self): """ Return a string representing the value of each rod. """ string = '' v = [] for r in range(self.num_rods+1): # +1 for overflow v.append(0) | dc5d13b1350ad56d01274ef9c8209fa48f609a27 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7608/dc5d13b1350ad56d01274ef9c8209fa48f609a27/abacus_window.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
460,
12,
2890,
4672,
3536,
2000,
279,
533,
5123,
326,
460,
434,
1517,
721,
72,
18,
3536,
533,
273,
875,
331,
273,
5378,
364,
436,
316,
1048,
12,
2890,
18,
2107,
67,
303,
2377,
15,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
460,
12,
2890,
4672,
3536,
2000,
279,
533,
5123,
326,
460,
434,
1517,
721,
72,
18,
3536,
533,
273,
875,
331,
273,
5378,
364,
436,
316,
1048,
12,
2890,
18,
2107,
67,
303,
2377,
15,
21... |
FileThreadingTests) | FileThreadingTests, StdoutTests) | def test_main(): # Historically, these tests have been sloppy about removing TESTFN. # So get rid of it no matter what. try: run_unittest(AutoFileTests, OtherFileTests, FileSubclassTests, FileThreadingTests) finally: if os.path.exists(TESTFN): os.unlink(TESTFN) | 32c1aa7769e5e7e0c1fbcdb13578bf86dd97adf9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/32c1aa7769e5e7e0c1fbcdb13578bf86dd97adf9/test_file.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
468,
13244,
280,
6478,
16,
4259,
7434,
1240,
2118,
30748,
2074,
2973,
9427,
22130,
19793,
18,
468,
6155,
336,
10911,
434,
518,
1158,
15177,
4121,
18,
775,
30,
1086,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5254,
13332,
468,
13244,
280,
6478,
16,
4259,
7434,
1240,
2118,
30748,
2074,
2973,
9427,
22130,
19793,
18,
468,
6155,
336,
10911,
434,
518,
1158,
15177,
4121,
18,
775,
30,
1086,
... |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_modifyindextranslations(idxID, ln=cdslang, sel_type='', trans=[], confirm=-1, callback='yes'): """Modify the translations of a index sel_type - the nametype to modify trans - the translations in the same order as the languages from get_languages()""" output = '' subtitle = '' cdslangs = get_languages() if confirm in ["2", 2] and idxID: finresult = modify_translations(idxID, cdslangs, sel_type, trans, "idxINDEX") idx_dict = dict(get_def_name('', "idxINDEX")) if idxID and idx_dict.has_key(int(idxID)): idxID = int(idxID) subtitle = """<a name="2"></a>2. Modify translations for index.   <small>[<a title="See guide" href="%s/admin/bibindex/guide.html">?</a>]</small>""" % weburl if type(trans) is str: trans = [trans] if sel_type == '': sel_type = get_idx_nametypes()[0][0] header = ['Language', 'Translation'] actions = [] types = get_idx_nametypes() if len(types) > 1: text = """ <span class="adminlabel">Name type</span> <select name="sel_type" class="admin_w200"> """ for (key, value) in types: text += """<option value="%s" %s>%s""" % (key, key == sel_type and 'selected="selected"' or '', value) trans_names = get_name(idxID, ln, key, "field") if trans_names and trans_names[0][0]: text += ": %s" % trans_names[0][0] text += "</option>" text += """</select>""" output += createhiddenform(action="modifyindextranslations#2", text=text, button="Select", idxID=idxID, ln=ln, confirm=0) if confirm in [-1, "-1", 0, "0"]: trans = [] for (key, value) in cdslangs: try: trans_names = get_name(idxID, key, sel_type, "idxINDEX") trans.append(trans_names[0][0]) except StandardError, e: trans.append('') for nr in range(0,len(cdslangs)): actions.append(["%s %s" % (cdslangs[nr][1], (cdslangs[nr][0]==cdslang and '<small>(def)</small>' or ''))]) actions[-1].append('<input type="text" name="trans" size="30" value="%s"/>' % trans[nr]) text = tupletotable(header=header, tuple=actions) output += createhiddenform(action="modifyindextranslations#2", text=text, button="Modify", idxID=idxID, sel_type=sel_type, ln=ln, confirm=2) if sel_type and len(trans): if confirm in ["2", 2]: output += write_outcome(finresult) try: body = [output, extra] except NameError: body = [output] if callback: return perform_editindex(idxID, ln, "perform_modifyindextranslations", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) | 2bfebc745d97514fe63c0e385bb842bede8f697e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/2bfebc745d97514fe63c0e385bb842bede8f697e/bibindexadminlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
17042,
1615,
13457,
12,
3465,
734,
16,
7211,
33,
4315,
2069,
539,
16,
357,
67,
723,
2218,
2187,
906,
22850,
6487,
6932,
29711,
21,
16,
1348,
2218,
9707,
11,
4672,
3536,
11047,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
17042,
1615,
13457,
12,
3465,
734,
16,
7211,
33,
4315,
2069,
539,
16,
357,
67,
723,
2218,
2187,
906,
22850,
6487,
6932,
29711,
21,
16,
1348,
2218,
9707,
11,
4672,
3536,
11047,
... |
return redirect("/{0}/{1}".format(site,id)) | if isjson is None: isjson = "" else: isjson = ".json?html=1" return redirect("/{0}/{1}{2}".format(site,id,isjson)) | def replyer(x): a = x.group()[1:] i = find(Comment.id).filter_by(author=a).order_by(Comment.date).all() if i: reply.append(i[-1][0]) return i and '@<a href="/{0}/{1}/reply?{2}#new">{3}</a>'.\ format(site, id, i[-1][0], a)\ or "@{0}".format(a) | 5dfc9066b0c5f4528900c74be2b95328dbce4fa9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11349/5dfc9066b0c5f4528900c74be2b95328dbce4fa9/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4332,
264,
12,
92,
4672,
279,
273,
619,
18,
1655,
1435,
63,
21,
26894,
277,
273,
1104,
12,
4469,
18,
350,
2934,
2188,
67,
1637,
12,
4161,
33,
69,
2934,
1019,
67,
1637,
12,
4469,
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,
4332,
264,
12,
92,
4672,
279,
273,
619,
18,
1655,
1435,
63,
21,
26894,
277,
273,
1104,
12,
4469,
18,
350,
2934,
2188,
67,
1637,
12,
4161,
33,
69,
2934,
1019,
67,
1637,
12,
4469,
18,
... |
b.pack(side = LEFT) | b.pack(side=LEFT) | def build_toolbar(self): tbar = self.tbar canvas = self.canvas commands = self.commands label = TLabel(tbar, image = "toolbar_left") label.pack(side = LEFT) | 5bd05aab08ecc99debb8be46af1003105e4183ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/5bd05aab08ecc99debb8be46af1003105e4183ab/mainwindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
18849,
12,
2890,
4672,
268,
3215,
273,
365,
18,
88,
3215,
5953,
273,
365,
18,
15424,
4364,
273,
365,
18,
7847,
225,
1433,
273,
399,
2224,
12,
88,
3215,
16,
1316,
273,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1361,
67,
18849,
12,
2890,
4672,
268,
3215,
273,
365,
18,
88,
3215,
5953,
273,
365,
18,
15424,
4364,
273,
365,
18,
7847,
225,
1433,
273,
399,
2224,
12,
88,
3215,
16,
1316,
273,
315,
... |
raise errors.OpExecError("DRBD device %s is degraded!" % name) | raise errors.OpExecError("DRBD device disk/%d is degraded!" % idx) | def _ExecD8Secondary(self, feedback_fn): """Replace the secondary node for drbd8. | d418ebfb87b39874d8ab5c5e0243201049c0b25f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/d418ebfb87b39874d8ab5c5e0243201049c0b25f/cmdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1905,
40,
28,
14893,
12,
2890,
16,
10762,
67,
4293,
4672,
3536,
5729,
326,
9946,
756,
364,
5081,
16410,
28,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1905,
40,
28,
14893,
12,
2890,
16,
10762,
67,
4293,
4672,
3536,
5729,
326,
9946,
756,
364,
5081,
16410,
28,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.difference.pprint() | if hasattr(self, 'difference'): self.difference.pprint() | def fail_test(self, *args, **kw): self.difference.pprint() TestCmd.fail_test(self, *args, **kw) | e76fd2da84ab55a4a79becf854695586db675a7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9981/e76fd2da84ab55a4a79becf854695586db675a7a/BoostBuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2321,
67,
3813,
12,
2890,
16,
380,
1968,
16,
2826,
9987,
4672,
309,
3859,
12,
2890,
16,
296,
23444,
11,
4672,
365,
18,
23444,
18,
84,
1188,
1435,
7766,
5931,
18,
6870,
67,
3813,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2321,
67,
3813,
12,
2890,
16,
380,
1968,
16,
2826,
9987,
4672,
309,
3859,
12,
2890,
16,
296,
23444,
11,
4672,
365,
18,
23444,
18,
84,
1188,
1435,
7766,
5931,
18,
6870,
67,
3813,
12,
... |
MakeVerbose = open(os.path.join(BootDir, "makeverbose.sh"), "wb") | def Boot(): global BuildLocal BuildLocal += " -boot -keep" Version = "1" Compile = ("gcc -gstabs+ " + ({ "SPARC32_LINUX" : "-m32 -munaligned-doubles", "SPARC64_LINUX" : "-m64 -munaligned-doubles", "LINUXLIBC6" : "-m32 -fPIC -mno-align-double", "AMD64_LINUX" : "-m64 -fPIC -mno-align-double" }.get(Target) or "")) Link = (Compile + " " + ({ "PPC32_OPENBSD" : "-lm -lpthread", "SPARC64_OPENBSD" : "-lm -lpthread" }.get(Target) or "")) Assemble = ("as " + ({ "SPARC32_LINUX" : "-32", "SPARC64_LINUX" : "-64", "LINUXLIBC6" : "--32", "AMD64_LINUX" : "--64" }.get(Target) or "")) BootDir = "/cm3-boot-POSIX-" + 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) if os.path.isdir(BootDir): shutil.rmtree(BootDir) os.mkdir(BootDir) # # This would probably be a good use of XSL (xml style sheets) # Make = open(os.path.join(BootDir, "make.sh"), "wb") MakeVerbose = open(os.path.join(BootDir, "makeverbose.sh"), "wb") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") Makefile.write("all: cm3\nAssemble=" + 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(".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"): Make.write(Compile + " -c " + a + "\n") MakeVerbose.write("echo " + Compile + " -c " + a + "\n") MakeVerbose.write(Compile + " -C " + a + "\n") Makefile.write("$(Compile) -c " + a + "\n") else: Make.write(Assemble + " " + a + " -o " + a + ".o\n") MakeVerbose.write("echo " + Assemble + " " + a + " -o " + a + ".o\n") MakeVerbose.write(Assemble + " " + a + " -o " + a + ".o\n") Makefile.write("$(Assemble) " + a + " -o " + a + ".o\n") if a.endswith(".h"): CopyFile(os.path.join(Root, dir, Config, a), BootDir) Makefile.write("cm3: $(Objects)\n\t$(Link) -o cm3 *.o\n") Make.write(Link + " -o cm3 *.o\n") MakeVerbose.write("echo " + Link + " -o cm3 *.o\n") MakeVerbose.write(Link + " -o cm3 *.o\n") Make.close() Makefile.close() MakeVerbose.close() os.chdir("/") _MakeArchive(BootDir[1:]) | e5dd2e590d47712e5f74eb2b94a7ba475d779485 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9328/e5dd2e590d47712e5f74eb2b94a7ba475d779485/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,
6,
225,
4049,
273,
315,
21,
6,
225,
16143,
273,
7566,
75,
952,
300,
75,
334,
5113,
15,
315,
397,
1079... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6,
225,
4049,
273,
315,
21,
6,
225,
16143,
273,
7566,
75,
952,
300,
75,
334,
5113,
15,
315,
397,
1079... | |
sage: sr = mq.SR(2,2,2,4) | sage: sr = mq.SR(2, 2, 2, 4) | def state_array(self, d=None): """ Convert the parameter to a state array. | 26b5b14a2a46b23848ccefac3b41425cf353e86a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/26b5b14a2a46b23848ccefac3b41425cf353e86a/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
919,
67,
1126,
12,
2890,
16,
302,
33,
7036,
4672,
3536,
4037,
326,
1569,
358,
279,
919,
526,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
919,
67,
1126,
12,
2890,
16,
302,
33,
7036,
4672,
3536,
4037,
326,
1569,
358,
279,
919,
526,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (num_header == 2) : values = (site,vo,niceNum(njobs), niceNum(wall), niceNum(njobs-oldnjobs),niceNum(wall-oldwall)) else: values = (site,niceNum(njobs), niceNum(wall), niceNum(njobs-oldnjobs),niceNum(wall-oldwall)) | printedvalues = [] for iheaders in range(0,num_header): printedvalues.append( key[iheaders] ) printedvalues.append( niceNum(njobs) ) printedvalues.append( niceNum(wall) ) printedvalues.append( niceNum(njobs-oldnjobs) ) printedvalues.append( niceNum(wall-oldwall) ) | def GenericRange(what, range_end = datetime.date.today(), range_begin = None, output = "text"): factor = 3600 # Convert number of seconds to number of hours if (not range_begin or range_begin == None): range_begin = range_end + datetime.timedelta(days=-1) if (not range_end or range_end == None): range_end = range_begin + datetime.timedelta(days=+1) timediff = range_end - range_begin if (output != "None") : if (what.title != "") : print what.title % ( DateToString(range_begin,False), DateToString(range_end,False) ) if (what.headline != "") : print what.headline % ( DateToString(range_begin,False), DateToString(range_end,False) ) print what.lines[output] print " ", what.formats[output] % what.headers print what.lines[output] # First get the previous' range-length's information totalwall = 0 totaljobs = 0 oldValues = {} result = [] start = range_begin - timediff end = range_end - timediff lines = what.GetData(start,end) for i in range (0,len(lines)): val = lines[i].split('\t') offset = 0 site = val[0] if what.headers[0] == "VO": # "site" is really "VO": hack to harmonize Panda output if site != "unknown": site = string.lower(site) if site == "atlas": site = "usatlas" key = site vo = "" num_header = what.num_header; offset = num_header - 1; if (len(val)==4) : # Nasty hack to harmonize Panda output if what.headers[1] == "VO": if vo != "unknown": vo = string.lower(val[1]) if vo == "atlas": vo = "usatlas" else: vo = val[1] key = site + " " + vo elif (num_header == 2) : vo = val[1] key = site + " " + vo njobs= string.atoi( val[offset+1] ) wall = string.atof( val[offset+2] ) / factor totalwall = totalwall + wall totaljobs = totaljobs + njobs if (oldValues.has_key(key)): oldValues[key][0] += njobs oldValues[key][1] += wall else: oldValues[key] = [njobs,wall,site,vo] oldValues["total"] = (totaljobs, totalwall, "total","") # Then getting the current information and print it totalwall = 0 totaljobs = 0 start = range_begin end = range_end lines = what.GetData(start,end) num_header = 1; index = 0 printValues = {} for i in range (0,len(lines)): val = lines[i].split('\t') site = val[0] if what.headers[0] == "VO": # "site" is really "VO": hack to harmonize Panda output if site != "unknown": site = string.lower(site) if site == "atlas": site = "usatlas" key = site offset = 0 num_header = what.num_header; offset = num_header - 1; if (len(val)==4) : # Nasty hack to harmonize Panda output if what.headers[1] == "VO": if vo != "unknown": vo = string.lower(val[1]) if vo == "atlas": vo = "usatlas" else: vo = val[1] key = site + " " + vo elif (num_header == 2) : vo = val[1] key = site + " " + vo (oldnjobs,oldwall) = (0,0) if oldValues.has_key(key): (oldnjobs,oldwall,s,v) = oldValues[key] del oldValues[key] njobs= string.atoi( val[offset+1] ) wall = string.atof( val[offset+2] ) / factor totalwall = totalwall + wall totaljobs = totaljobs + njobs if printValues.has_key(key): printValues[key][0] += njobs printValues[key][1] += wall else: printValues[key] = [njobs,wall,oldnjobs,oldwall,site,vo] for key,(oldnjobs,oldwall,site,vo) in oldValues.iteritems(): if (key != "total") : printValues[key] = (0,0,oldnjobs,oldwall,site,vo) if (what.defaultSort): sortedValues = sortedDictValues(printValues) else: sortedValues = sortedDictValuesFunc(printValues,what.Sorting) for key,(njobs,wall,oldnjobs,oldwall,site,vo) in sortedValues: index = index + 1; if (num_header == 2) : values = (site,vo,niceNum(njobs), niceNum(wall), niceNum(njobs-oldnjobs),niceNum(wall-oldwall)) else: values = (site,niceNum(njobs), niceNum(wall), niceNum(njobs-oldnjobs),niceNum(wall-oldwall)) if (output != "None") : print "%3d " %(index), what.formats[output] % values result.append(values) (oldnjobs,oldwall,s,v) = oldValues["total"] if (output != "None") : print what.lines[output] if (num_header == 2) : print " ", what.formats[output] % \ (what.col1, what.col2, niceNum(totaljobs), niceNum(totalwall), niceNum(totaljobs-oldnjobs), niceNum(totalwall-oldwall)) else: print " ", what.formats[output] % \ (what.col1, niceNum(totaljobs), niceNum(totalwall), niceNum(totaljobs-oldnjobs), niceNum(totalwall-oldwall)) print what.lines[output] return result | 840d5408521dcd3fd349c48313ce276b0ab91bb4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/637/840d5408521dcd3fd349c48313ce276b0ab91bb4/PSACCTReport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7928,
2655,
12,
23770,
16,
1048,
67,
409,
273,
3314,
18,
712,
18,
30064,
9334,
1048,
67,
10086,
273,
599,
16,
876,
273,
315,
955,
6,
4672,
5578,
273,
12396,
225,
468,
4037,
1300,
434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7928,
2655,
12,
23770,
16,
1048,
67,
409,
273,
3314,
18,
712,
18,
30064,
9334,
1048,
67,
10086,
273,
599,
16,
876,
273,
315,
955,
6,
4672,
5578,
273,
12396,
225,
468,
4037,
1300,
434,
... |
if self.libs is not None: self.compiler.set_libraries (self.libs) | if self.libraries is not None: self.compiler.set_libraries (self.libraries) | if self.undef is not None: for macro in self.undef: self.compiler.undefine_macro (macro) | 6bcd9d67d86304b3ce600152fbeea3894c7f4a62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6bcd9d67d86304b3ce600152fbeea3894c7f4a62/build_ext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
365,
18,
318,
536,
353,
486,
599,
30,
364,
11522,
316,
365,
18,
318,
536,
30,
365,
18,
9576,
18,
318,
11255,
67,
26448,
261,
26448,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
365,
18,
318,
536,
353,
486,
599,
30,
364,
11522,
316,
365,
18,
318,
536,
30,
365,
18,
9576,
18,
318,
11255,
67,
26448,
261,
26448,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.health = health | self.health = gdata.health.service.HealthService() self.health.ClientLogin(username, password, source='Health Client Unit Tests') | def setUp(self): self.health = health self.profile_list_feed = self.health.GetProfileListFeed() self.profile_id = self.profile_list_feed.entry[0].GetProfileId() | 8ab1743d7f0fdb470742d8a7bc6f55e6cada7c10 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6580/8ab1743d7f0fdb470742d8a7bc6f55e6cada7c10/service_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
13267,
273,
314,
892,
18,
13267,
18,
3278,
18,
7802,
1179,
1435,
365,
18,
13267,
18,
1227,
5358,
12,
5053,
16,
2201,
16,
1084,
2218,
7802,
2445,
8380,
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,
24292,
12,
2890,
4672,
365,
18,
13267,
273,
314,
892,
18,
13267,
18,
3278,
18,
7802,
1179,
1435,
365,
18,
13267,
18,
1227,
5358,
12,
5053,
16,
2201,
16,
1084,
2218,
7802,
2445,
8380,
7... |
if not patchset_id: | if not patchset_id and patchsets: | def _get_patchset_info(request, patchset_id): """ Returns a list of patchsets for the issue. Args: request: Django Request object. patchset_id: The id of the patchset that the caller is interested in. This is the one that we generate delta links to if they're not available. We can't generate for all patchsets because it would take too long on issues with many patchsets. Passing in None is equivalent to doing it for the last patchset. Returns: A 3-tuple of (issue, patchsets, HttpResponse). If HttpResponse is not None, further processing should stop and it should be returned. """ issue = request.issue patchsets = list(issue.patchset_set.order('created')) response = None if not patchset_id: patchset_id = patchsets[-1].key().id() if request.user: drafts = list(models.Comment.gql('WHERE ANCESTOR IS :1 AND draft = TRUE' ' AND author = :2', issue, request.user)) else: drafts = [] comments = list(models.Comment.gql('WHERE ANCESTOR IS :1 AND draft = FALSE', issue)) issue.draft_count = len(drafts) for c in drafts: c.ps_key = c.patch.patchset.key() patchset_id_mapping = {} # Maps from patchset id to its ordering number. for patchset in patchsets: patchset_id_mapping[patchset.key().id()] = len(patchset_id_mapping) + 1 patchset.n_drafts = sum(c.ps_key == patchset.key() for c in drafts) patchset.patches = None patchset.parsed_patches = None if patchset_id == patchset.key().id(): patchset.patches = list(patchset.patch_set.order('filename')) try: attempt = _clean_int(request.GET.get('attempt'), 0, 0) if attempt < 0: response = HttpResponse('Invalid parameter', status=404) break for patch in patchset.patches: pkey = patch.key() patch._num_comments = sum(c.parent_key() == pkey for c in comments) patch._num_drafts = sum(c.parent_key() == pkey for c in drafts) if not patch.delta_calculated: if attempt > 2: # Too many patchsets or files and we're not able to generate the # delta links. Instead of giving a 500, try to render the page # without them. patch.delta = [] else: # Compare each patch to the same file in earlier patchsets to see # if they differ, so that we can generate the delta patch urls. # We do this once and cache it after. It's specifically not done # on upload because we're already doing too much processing there. # NOTE: this function will clear out patchset.data to reduce # memory so don't ever call patchset.put() after calling it. patch.delta = _calculate_delta(patch, patchset_id, patchsets) patch.delta_calculated = True # A multi-entity put would be quicker, but it fails when the # patches have content that is large. App Engine throws # RequestTooLarge. This way, although not as efficient, allows # multiple refreshes on an issue to get things done, as opposed to # an all-or-nothing approach. patch.put() # Reduce memory usage: if this patchset has lots of added/removed # files (i.e. > 100) then we'll get MemoryError when rendering the # response. Each Patch entity is using a lot of memory if the files # are large, since it holds the entire contents. Call num_chunks and # num_drafts first though since they depend on text. patch.num_chunks patch.num_drafts patch.num_lines patch.text = None patch._lines = None patch.parsed_deltas = [] for delta in patch.delta: patch.parsed_deltas.append([patchset_id_mapping[delta], delta]) except DeadlineExceededError: logging.exception('DeadlineExceededError in _get_patchset_info') if attempt > 2: response = HttpResponse('DeadlineExceededError - create a new issue.') else: response = HttpResponseRedirect('%s?attempt=%d' % (request.path, attempt + 1)) break # Reduce memory usage (see above comment). for patchset in patchsets: patchset.parsed_patches = None return issue, patchsets, response | 8b0ad0fb4e0310999c5da569d0daed26127b189d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/476/8b0ad0fb4e0310999c5da569d0daed26127b189d/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
2272,
542,
67,
1376,
12,
2293,
16,
4729,
542,
67,
350,
4672,
3536,
2860,
279,
666,
434,
4729,
4424,
364,
326,
5672,
18,
225,
6634,
30,
590,
30,
18480,
1567,
733,
18,
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,
389,
588,
67,
2272,
542,
67,
1376,
12,
2293,
16,
4729,
542,
67,
350,
4672,
3536,
2860,
279,
666,
434,
4729,
4424,
364,
326,
5672,
18,
225,
6634,
30,
590,
30,
18480,
1567,
733,
18,
47... |
'name': fields.char('Description', size=64, select=1), 'user_id': fields.many2one('res.users', 'User', required=True, select=1), | 'name': fields.char('Description', size=64, select=1, states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}), 'user_id': fields.many2one('res.users', 'User', required=True, select=1, states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}), | def sign_out(self, cr, uid, ids, context): if not self.browse(cr, uid, ids, context)[0].date_current == time.strftime('%Y-%m-%d'): raise osv.except_osv(_('Error !'), _('You can not sign out from an other date than today')) emp_obj = self.pool.get('hr.employee') emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)]) context['sheet_id']=ids[0] success = emp_obj.sign_out(cr, uid, emp_id, context=context) return True | 3199d71f923a95f692c29f379ccabd7ed3665187 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/3199d71f923a95f692c29f379ccabd7ed3665187/hr_timesheet_sheet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1573,
67,
659,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
4672,
309,
486,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
16,
819,
25146,
20,
8009,
712,
67,
2972,
422,
813,
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,
1573,
67,
659,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
4672,
309,
486,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
16,
819,
25146,
20,
8009,
712,
67,
2972,
422,
813,
18,
... |
if self.author == "": self.author = self.email | if self.author == "": self.author = self.email | def __init__(self, message = None, sequence = 0, keepHeaders = []): | 9ba95dd12bdffd75614117b4f4e772e8068f767b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/9ba95dd12bdffd75614117b4f4e772e8068f767b/pipermail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
883,
273,
599,
16,
3102,
273,
374,
16,
3455,
3121,
273,
5378,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
883,
273,
599,
16,
3102,
273,
374,
16,
3455,
3121,
273,
5378,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def template_description(self): f = open(os.path.join(self.template_dir, 'description.txt')) | def template_description(self, dir): f = open(os.path.join(dir, 'description.txt')) | def template_description(self): f = open(os.path.join(self.template_dir, 'description.txt')) content = f.read().strip() f.close() return content | 70b9f24913825d044637f53c0e835174337f6c02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/70b9f24913825d044637f53c0e835174337f6c02/app_setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1542,
67,
3384,
12,
2890,
16,
1577,
4672,
284,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
1214,
16,
296,
3384,
18,
5830,
26112,
913,
273,
284,
18,
896,
7675,
6406,
1435,
284,
18,
441... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1542,
67,
3384,
12,
2890,
16,
1577,
4672,
284,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
1214,
16,
296,
3384,
18,
5830,
26112,
913,
273,
284,
18,
896,
7675,
6406,
1435,
284,
18,
441... |
view = content_replacer.ContentMenuView(self.fpage, req) | view = content_replacer.ContentMenuView(self.folder, req) | def testCutObject(self): req = self.portal.REQUEST self.failIf(req.RESPONSE.cookies.has_key('__cp'), 'has cut cookie') view = content_replacer.ContentMenuView(self.fpage, req) result = view.cutObject() resh = req.RESPONSE.headers self.assertEqual(resh['status'], '200 OK') self.failUnless(req.RESPONSE.cookies.has_key('__cp'), 'no cut cookie') | c01f348b980345a36cd65be7267e7e1998a9d174 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12181/c01f348b980345a36cd65be7267e7e1998a9d174/test_menus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
15812,
921,
12,
2890,
4672,
1111,
273,
365,
18,
24386,
18,
5519,
365,
18,
6870,
2047,
12,
3658,
18,
14508,
18,
16240,
18,
5332,
67,
856,
2668,
972,
4057,
19899,
296,
5332,
6391,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15812,
921,
12,
2890,
4672,
1111,
273,
365,
18,
24386,
18,
5519,
365,
18,
6870,
2047,
12,
3658,
18,
14508,
18,
16240,
18,
5332,
67,
856,
2668,
972,
4057,
19899,
296,
5332,
6391,
... |
parser.add_option("--attach", action="append", metavar="URL", dest="attach", default=defaults.get("attach", []), | parser.add_option("--attach", action="appendResetDefault", metavar="URL", dest="attach", default=defaults.get("attach", []), | def buildParser(self): usage = "%prog [options] [build | list]" description = self.DESCRIPTION version = """%%prog %s | 27e19d3e17a57167ad70990e57f38206b50c1929 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11128/27e19d3e17a57167ad70990e57f38206b50c1929/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
2678,
12,
2890,
4672,
4084,
273,
2213,
14654,
306,
2116,
65,
306,
3510,
571,
666,
4279,
2477,
273,
365,
18,
15911,
1177,
273,
3536,
11438,
14654,
738,
87,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
2678,
12,
2890,
4672,
4084,
273,
2213,
14654,
306,
2116,
65,
306,
3510,
571,
666,
4279,
2477,
273,
365,
18,
15911,
1177,
273,
3536,
11438,
14654,
738,
87,
2,
-100,
-100,
-100,
-100... |
(name,dtype,len,col)=self._read_meta(octf) if not dtype=='sq_string': | meta=self._read_meta(octf) if not meta['dtype']=='sq_string': | def _read_cellarray(self,octf,col,row): """Returns the next cellarray atribute in the octave file | cf7384197e5f6f81fbccf787ed8a8ba4e761f074 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12567/cf7384197e5f6f81fbccf787ed8a8ba4e761f074/h5_octave.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
896,
67,
3855,
1126,
12,
2890,
16,
13410,
74,
16,
1293,
16,
492,
4672,
3536,
1356,
326,
1024,
2484,
1126,
622,
1533,
624,
316,
326,
10844,
836,
585,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
896,
67,
3855,
1126,
12,
2890,
16,
13410,
74,
16,
1293,
16,
492,
4672,
3536,
1356,
326,
1024,
2484,
1126,
622,
1533,
624,
316,
326,
10844,
836,
585,
2,
-100,
-100,
-100,
-100,
-10... |
po_files.append(options.output_file) | po_files.append(options.input_file) | def compile(self, argv): """Subcommand for compiling a message catalog to a MO file. | 473c4f769c5d47350917fda3bd27915b11af15e9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8909/473c4f769c5d47350917fda3bd27915b11af15e9/frontend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4074,
12,
2890,
16,
5261,
4672,
3536,
1676,
3076,
364,
1161,
4973,
279,
883,
6222,
358,
279,
16070,
585,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4074,
12,
2890,
16,
5261,
4672,
3536,
1676,
3076,
364,
1161,
4973,
279,
883,
6222,
358,
279,
16070,
585,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
path=fullpath | path=pathHelper(fullpath) | def isVersionControlled(url): fullpath=urlparse(url).path path=fullpath versioned=True filename=None if not os.path.exists(fullpath): return False if not os.path.isdir(fullpath): lastdash=fullpath.rfind('/') filename=fullpath[lastdash+1:] path=fullpath[:lastdash] try: wt = workingtree.WorkingTree.open(path) if filename is not None: versioned=wt.has_filename(filename) except: versioned=False print fullpath+" versioned? "+str(versioned) return versioned | bef2842cea9e3a9063eecbc84ddb5948dd93bea4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1699/bef2842cea9e3a9063eecbc84ddb5948dd93bea4/kdevbzr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
1444,
3367,
1259,
12,
718,
4672,
15170,
33,
718,
2670,
12,
718,
2934,
803,
589,
33,
803,
2276,
12,
2854,
803,
13,
17083,
33,
5510,
1544,
33,
7036,
309,
486,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
1444,
3367,
1259,
12,
718,
4672,
15170,
33,
718,
2670,
12,
718,
2934,
803,
589,
33,
803,
2276,
12,
2854,
803,
13,
17083,
33,
5510,
1544,
33,
7036,
309,
486,
1140,
18,
803,
18,
1... |
vids+='and "'+dirs[i][f]+'"' | vids+=DV.l('and')+' "'+dirs[i][f]+'"' | def go(self,aborted=False): self.converting=-1 for i in range(len(self.videos)): if self.videos[i] not in self.thisvideo and self.meta[self.videos[i]]['status']!=DV.l('Success!'): self.converting=i break if self.converting!=-1 and not aborted: # Let's go for the actual conversion... self.meta[self.videos[self.converting]]['status']=DV.l('In progress...') self.list.SetStringItem(self.converting,ID_COL_VIDSTAT,DV.l('In progress...')) self.thisbatch=self.thisbatch+1 self.thread=DamnConverter(parent=self) self.thread.start() else: if not self.isclosing: self.SetStatusText(DV.l('DamnVid, waiting for instructions.')) if not aborted: message='Done.' if len(self.resultlist): message=DV.l('Done!')+'\n'+DV.l('All videos have been put into their respective output folders:')+'\n' dirs={} for i in self.resultlist: if not dirs.has_key(i[1]): dirs[i[1]]=[] dirs[i[1]].append(i[0]) self.resultlist=[] for i in dirs.iterkeys(): if len(dirs[i])==1: haveverb='s' vids='"'+dirs[i][0]+'"' else: haveverb='ve' vids='' for f in range(len(dirs[i])): if f==len(dirs[i])-1: vids+='and "'+dirs[i][f]+'"' else: vids+='"'+dirs[i][f]+'", ' message+='\n'+vids+' ha'+haveverb+' been put into '+DamnFriendlyDir(i)+'.' del haveverb,dirs,vids dlg=wx.MessageDialog(self,message,DV.l('Done!'),wx.OK|wx.ICON_INFORMATION) else: dlg=wx.MessageDialog(self,DV.l('Video conversion aborted.'),DV.l('Aborted'),wx.OK|wx.ICON_INFORMATION) dlg.SetIcon(DV.icon) dlg.ShowModal() dlg.Destroy() self.converting=-1 self.stopbutton.Disable() self.gobutton1.Enable() self.gauge1.SetValue(0.0) | bdef31eaa44cfde35914e466f856a3f40d245b38 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/bdef31eaa44cfde35914e466f856a3f40d245b38/DamnVid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1960,
12,
2890,
16,
18623,
329,
33,
8381,
4672,
365,
18,
6283,
310,
29711,
21,
364,
277,
316,
1048,
12,
1897,
12,
2890,
18,
6768,
538,
3719,
30,
309,
365,
18,
6768,
538,
63,
77,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1960,
12,
2890,
16,
18623,
329,
33,
8381,
4672,
365,
18,
6283,
310,
29711,
21,
364,
277,
316,
1048,
12,
1897,
12,
2890,
18,
6768,
538,
3719,
30,
309,
365,
18,
6768,
538,
63,
77,
65,
... |
allowance = 1 | allowance = True | def __init__(self, path, allowance): if path == '' and not allowance: # an empty value means allow all allowance = 1 self.path = urllib.quote(path) self.allowance = allowance | 4f422b7384bdfcdd7c2a55e83aaf89d20e9979d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4f422b7384bdfcdd7c2a55e83aaf89d20e9979d1/robotparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
589,
16,
1699,
1359,
4672,
309,
589,
422,
875,
471,
486,
1699,
1359,
30,
468,
392,
1008,
460,
4696,
1699,
777,
1699,
1359,
273,
1053,
365,
18,
803,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
589,
16,
1699,
1359,
4672,
309,
589,
422,
875,
471,
486,
1699,
1359,
30,
468,
392,
1008,
460,
4696,
1699,
777,
1699,
1359,
273,
1053,
365,
18,
803,
273,
... |
self.assertEqual(m, t.__dict__[meth]) | self.assertEqual(getattr(m, 'im_func', m), t.__dict__[meth]) | def unop_test(self, a, res, expr="len(a)", meth="__len__"): d = {'a': a} self.assertEqual(eval(expr, d), res) t = type(a) m = getattr(t, meth) | 4a0d8c36fabcd955e24a465c9276c005529fa702 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/4a0d8c36fabcd955e24a465c9276c005529fa702/test_descr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
556,
67,
3813,
12,
2890,
16,
279,
16,
400,
16,
3065,
1546,
1897,
12,
69,
2225,
16,
7917,
1546,
972,
1897,
14437,
4672,
302,
273,
13666,
69,
4278,
279,
97,
365,
18,
11231,
5812,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
556,
67,
3813,
12,
2890,
16,
279,
16,
400,
16,
3065,
1546,
1897,
12,
69,
2225,
16,
7917,
1546,
972,
1897,
14437,
4672,
302,
273,
13666,
69,
4278,
279,
97,
365,
18,
11231,
5812,
... |
self.capped = True | self.capped += True | def update(self, runningmaxrate, runningmaxi2rate, usedbytes, usedi2bytes, runningshare, rspec): """ Update byte counts and check if byte thresholds have been exceeded. If exceeded, cap to remaining bytes in limit over remaining time in period. Recalculate every time module runs. """ # Query Node Manager for max rate overrides self.updateSliceAttributes(rspec) | 0c9f6590a6f97823553cc557e25cd6a381cb5adb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6995/0c9f6590a6f97823553cc557e25cd6a381cb5adb/bwmon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
3549,
1896,
5141,
16,
3549,
1896,
77,
22,
5141,
16,
1399,
3890,
16,
1399,
77,
22,
3890,
16,
3549,
14419,
16,
436,
2793,
4672,
3536,
2315,
1160,
6880,
471,
866,
309,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
3549,
1896,
5141,
16,
3549,
1896,
77,
22,
5141,
16,
1399,
3890,
16,
1399,
77,
22,
3890,
16,
3549,
14419,
16,
436,
2793,
4672,
3536,
2315,
1160,
6880,
471,
866,
309,... |
:rtype : The newly created VPC :return : A :class:`boto.vpc.vpc.VPC objectn | :rtype: The newly created VPC :return: A :class:`boto.vpc.vpc.VPC` object | def create_vpc(self, cidr_block): """ Create a new Virtual Private Cloud. | 953eb471ca2be49c4f821f024a3e0a6347048a4f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/953eb471ca2be49c4f821f024a3e0a6347048a4f/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
25843,
12,
2890,
16,
15323,
67,
2629,
4672,
3536,
1788,
279,
394,
7269,
8726,
4396,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
25843,
12,
2890,
16,
15323,
67,
2629,
4672,
3536,
1788,
279,
394,
7269,
8726,
4396,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
cmd_text = 'cd ' + self.workdir + '; ' + command.command | cmd_text = 'cd ' + self.workdir + '; ' if command.errors_to > '': cmd_text += ' rm -f ' + command.errors_to + '; ' cmd_text = cmd_text + command.command | def make(self, name='all'): """ Runs the makefile specified target (defaulting to all) and records errors, results and other status flags against the document. If the document not been mirrored, this routine will not attempt to build it. | 44b0ed1122649054bbe639cf33a5b7189a7f415c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6947/44b0ed1122649054bbe639cf33a5b7189a7f415c/Makefile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
12,
2890,
16,
508,
2218,
454,
11,
4672,
3536,
1939,
87,
326,
1221,
768,
1269,
1018,
261,
1886,
310,
358,
777,
13,
471,
3853,
1334,
16,
1686,
471,
1308,
1267,
2943,
5314,
326,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
12,
2890,
16,
508,
2218,
454,
11,
4672,
3536,
1939,
87,
326,
1221,
768,
1269,
1018,
261,
1886,
310,
358,
777,
13,
471,
3853,
1334,
16,
1686,
471,
1308,
1267,
2943,
5314,
326,
166... |
if name[0] == '.': | if not name[0]: | def nametowidget(self, name): """Return the Tkinter instance of a widget identified by its Tcl name NAME.""" w = self if name[0] == '.': w = w._root() name = name[1:] while name: i = name.find('.') if i >= 0: name, tail = name[:i], name[i+1:] else: tail = '' w = w.children[name] name = tail return w | dc765bdeaa629d3498beebce9903ac93a3197ac4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/dc765bdeaa629d3498beebce9903ac93a3197ac4/Tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15135,
278,
543,
2208,
12,
2890,
16,
508,
4672,
3536,
990,
326,
399,
79,
2761,
791,
434,
279,
3604,
9283,
635,
2097,
399,
830,
508,
6048,
12123,
341,
273,
365,
225,
309,
486,
508,
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,
15135,
278,
543,
2208,
12,
2890,
16,
508,
4672,
3536,
990,
326,
399,
79,
2761,
791,
434,
279,
3604,
9283,
635,
2097,
399,
830,
508,
6048,
12123,
341,
273,
365,
225,
309,
486,
508,
63,
... |
global verbose | def serializeNode(node, opts, rslt, enableBreaks=False, enableVerbose=False): global indent global result global pretty global verbose global breaks global afterLine global afterBreak global afterDoc global afterDivider global afterArea global options result = rslt | 66942a31e30537eb739b144d8b46c3b613b2076a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/66942a31e30537eb739b144d8b46c3b613b2076a/Packer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4472,
907,
12,
2159,
16,
1500,
16,
22841,
16,
4237,
26806,
33,
8381,
16,
4237,
14489,
33,
8381,
4672,
2552,
3504,
2552,
563,
2552,
7517,
2552,
16217,
2552,
1839,
1670,
2552,
1839,
7634,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4472,
907,
12,
2159,
16,
1500,
16,
22841,
16,
4237,
26806,
33,
8381,
16,
4237,
14489,
33,
8381,
4672,
2552,
3504,
2552,
563,
2552,
7517,
2552,
16217,
2552,
1839,
1670,
2552,
1839,
7634,
... | |
if nodelist[2] != ':': | if len(nodelist) == 1 or nodelist[1] != ':': | def com_dictsetmaker(self, nodelist): # dictsetmaker: (test ':' test (',' test ':' value)* [',']) | (test (',' test)* [',']) items = [] if nodelist[2] != ':': # it's a set for i in range(1, len(nodelist), 2): items.append(self.com_node(nodelist[i])) return Set(items, lineno=items[0].lineno) else: # it's a dict for i in range(1, len(nodelist), 4): items.append((self.com_node(nodelist[i]), self.com_node(nodelist[i+2]))) return Dict(items, lineno=items[0][0].lineno) | e9248e006198c5e34d780e204d0ec1b68cd8a3ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e9248e006198c5e34d780e204d0ec1b68cd8a3ce/transformer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
532,
67,
1576,
542,
29261,
12,
2890,
16,
30068,
4672,
468,
2065,
542,
29261,
30,
261,
3813,
3921,
1842,
261,
17023,
1842,
3921,
460,
17653,
306,
2187,
19486,
571,
261,
3813,
261,
17023,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
532,
67,
1576,
542,
29261,
12,
2890,
16,
30068,
4672,
468,
2065,
542,
29261,
30,
261,
3813,
3921,
1842,
261,
17023,
1842,
3921,
460,
17653,
306,
2187,
19486,
571,
261,
3813,
261,
17023,
... |
return mpf(3.5), mpf(2.5) | return mpf(3.5).val, mpf(2.5).val | def __mpcval__(self): return mpf(3.5), mpf(2.5) | 4280fac8c2c83aac55c2eaeedf2e4e7d116d560c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11851/4280fac8c2c83aac55c2eaeedf2e4e7d116d560c/test_convert.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1291,
71,
1125,
972,
12,
2890,
4672,
327,
6749,
74,
12,
23,
18,
25,
3631,
6749,
74,
12,
22,
18,
25,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1291,
71,
1125,
972,
12,
2890,
4672,
327,
6749,
74,
12,
23,
18,
25,
3631,
6749,
74,
12,
22,
18,
25,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
"""INPUT: hwv - a dominant weight in a weight lattice. L - the ambient lattice Produces the dictionary of multiplicities for the irreducible character | """ Returns the dictionary of multiplicities for the irreducible character | def irreducible_character_freudenthal(hwv, L, debug=False): """INPUT: hwv - a dominant weight in a weight lattice. L - the ambient lattice Produces the dictionary of multiplicities for the irreducible character with highest weight lamb. The weight multiplicities are computed by the Freudenthal multiplity formula. The algorithm is based on recursion relation that is stated, for example, in Humphrey's book on Lie Algebras. The multiplicities are invariant under the Weyl group, so to compute them it would be sufficient to compute them for the weights in the positive Weyl chamber. However after some testing it was found to be faster to compute every weight using the recursion, since the use of the Weyl group is expensive in its current implementation. """ rank = L.ct[1] VS = VectorSpace(QQ, L.n) rho = L.rho() mdict = {} current_layer = {tuple(hwv):1} while len(current_layer) > 0: next_layer = {} for mu in current_layer: if not current_layer[mu] == 0: mdict[mu] = current_layer[mu] for alpha in L.simple_roots(): next_layer[tuple(VS(mu)-alpha)] = None if debug: print next_layer for mu in next_layer: vmu = VS(mu) if next_layer[mu] == None: if debug: print " mu:", mu accum = 0 for alpha in L.positive_roots(): i = 1 while tuple(vmu+i*alpha) in mdict: if debug: print " ", vmu+i*alpha, print mdict[tuple(vmu + i*alpha)]*(vmu + i*alpha).inner_product(alpha) accum += mdict[tuple(vmu + i*alpha)]*(vmu + i*alpha).inner_product(alpha) i += 1 if accum == 0: next_layer[mu] = 0 else: next_layer[mu] = QQ(2*accum)/QQ((hwv+rho).inner_product(hwv+rho)-(vmu+rho).inner_product(vmu+rho)) current_layer = next_layer return mdict | da4d6149538661041003f964c0d06f212d52f0f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/da4d6149538661041003f964c0d06f212d52f0f5/weyl_characters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9482,
1118,
5286,
1523,
67,
11560,
67,
74,
266,
1100,
319,
22314,
12,
20701,
90,
16,
511,
16,
1198,
33,
8381,
4672,
3536,
2860,
326,
3880,
434,
3309,
1780,
1961,
364,
326,
9482,
1118,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9482,
1118,
5286,
1523,
67,
11560,
67,
74,
266,
1100,
319,
22314,
12,
20701,
90,
16,
511,
16,
1198,
33,
8381,
4672,
3536,
2860,
326,
3880,
434,
3309,
1780,
1961,
364,
326,
9482,
1118,
... |
post_multipart("%s:%d"%(server,port), "/upload", [], [('file', 'message.dat', data)]) | if train_as is not None: which_text = "Train as %s" % (train_as,) post_multipart("%s:%d" % (server, port), "/train", [("which", which_text), ("text", "")], [("file", "message.dat", data)]) else: post_multipart("%s:%d" % (server,port), "/upload", [], [('file', 'message.dat', data)]) | def main(argv): null = False server = "localhost" port = options["html_ui", "port"] prob = 1.0 try: opts, args = getopt.getopt(argv, "hns:p:r:o:", ["help", "null", "server=", "port=", "prob=", "option="]) except getopt.error: usage(globals(), locals()) sys.exit(1) for opt, arg in opts: if opt in ("-h", "--help"): usage(globals(), locals()) sys.exit(0) elif opt in ("-n", "--null"): null = True elif opt in ("-s", "--server"): server = arg elif opt in ("-p", "--port"): port = int(arg) elif opt in ("-r", "--prob"): n = float(arg) if n < 0.0 or n > 1.0: usage(globals(), locals()) sys.exit(1) prob = n elif opt in ('-o', '--option'): options.set_from_cmdline(arg, sys.stderr) if args: usage(globals(), locals()) sys.exit(1) data = sys.stdin.read() if not null: sys.stdout.write(data) if random.random() < prob: try: post_multipart("%s:%d"%(server,port), "/upload", [], [('file', 'message.dat', data)]) except: # not an error if the server isn't responding pass | 6927bcdb9193e582528d87776752b0b0549e499e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/6927bcdb9193e582528d87776752b0b0549e499e/sb_upload.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
4672,
446,
273,
1083,
1438,
273,
315,
13014,
6,
1756,
273,
702,
9614,
2620,
67,
4881,
3113,
315,
655,
11929,
3137,
273,
404,
18,
20,
225,
775,
30,
1500,
16,
833,
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,
2774,
12,
19485,
4672,
446,
273,
1083,
1438,
273,
315,
13014,
6,
1756,
273,
702,
9614,
2620,
67,
4881,
3113,
315,
655,
11929,
3137,
273,
404,
18,
20,
225,
775,
30,
1500,
16,
833,
273,
... |
restores = self.restores[:] | restores = [ (x[1][0], x[1][1], x[0], x[1][2], x[1][3]) for x in self.restores.iteritems() ] | def restoreFile(fileObj, contents, root, target, journal): if fileObj.hasContents and contents and not \ fileObj.flags.isConfig(): # config file sha1's are verified when they get inserted # into the config file cache d = sha.new() fileObj.restore(contents, root, target, journal=journal, digest = d) assert(d.digest() == fileObj.contents.sha1()) else: fileObj.restore(contents, root, target, journal=journal) | 22f9a9101585ff5ecfc72cfcc17af08af913547a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/22f9a9101585ff5ecfc72cfcc17af08af913547a/update.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
812,
12,
768,
2675,
16,
2939,
16,
1365,
16,
1018,
16,
13001,
4672,
309,
585,
2675,
18,
5332,
6323,
471,
2939,
471,
486,
521,
585,
2675,
18,
7133,
18,
291,
809,
13332,
468,
642,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
812,
12,
768,
2675,
16,
2939,
16,
1365,
16,
1018,
16,
13001,
4672,
309,
585,
2675,
18,
5332,
6323,
471,
2939,
471,
486,
521,
585,
2675,
18,
7133,
18,
291,
809,
13332,
468,
642,
... |
locale.setlocale(locale.LC_ALL, loc) | enc = locale.getpreferredencoding() ln = locale._build_localename((loc, enc)) try: locale.setlocale(locale.LC_ALL, ln) except locale.Error: locale.setlocale(locale.LC_ALL, loc) | def resetlocale(): # locale.resetlocale is bugged with some locales. loc = locale.getdefaultlocale()[0] enc = locale.getpreferredencoding() ln = locale._build_localename((loc, enc)) try: locale.setlocale(locale.LC_ALL, ln) except locale.Error: locale.setlocale(locale.LC_ALL, loc) | e07e477337c76033a9c642cab3d579f0abfece11 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/e07e477337c76033a9c642cab3d579f0abfece11/translate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
6339,
13332,
468,
2573,
18,
6208,
6339,
353,
7934,
2423,
598,
2690,
6922,
18,
1515,
273,
2573,
18,
588,
1886,
6339,
1435,
63,
20,
65,
2446,
273,
2573,
18,
588,
23616,
5999,
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,
2715,
6339,
13332,
468,
2573,
18,
6208,
6339,
353,
7934,
2423,
598,
2690,
6922,
18,
1515,
273,
2573,
18,
588,
1886,
6339,
1435,
63,
20,
65,
2446,
273,
2573,
18,
588,
23616,
5999,
1435,
... |
address = '127.0.0.1' port = 8811 | address = config.get('server', 'address') port = config.getint('server', 'port') | def _create_socket(config): #address = config.get('server', 'address') #port = config.getint('server', 'port') address = '127.0.0.1' port = 8811 socket = gevent.socket.tcp_listener((address, port)) #if config.getbool('server', 'use_ssl'): if False: keyfile = config.get('ssl', 'keyfile') certfile = config.get('ssl', 'certfile') socket = gevent.ssl.SSLSocket(socket, keyfile, certfile) return socket | d5a1dc8be13364c1fc8a604fde88f5ffea0bd7ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/d5a1dc8be13364c1fc8a604fde88f5ffea0bd7ec/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
67,
7814,
12,
1425,
4672,
468,
2867,
273,
642,
18,
588,
2668,
3567,
2187,
296,
2867,
6134,
468,
655,
273,
642,
18,
588,
474,
2668,
3567,
2187,
296,
655,
6134,
1758,
273,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
67,
7814,
12,
1425,
4672,
468,
2867,
273,
642,
18,
588,
2668,
3567,
2187,
296,
2867,
6134,
468,
655,
273,
642,
18,
588,
474,
2668,
3567,
2187,
296,
655,
6134,
1758,
273,
296... |
def __exitfunc(self): | def _exitfunc(self): | def __exitfunc(self): self._Thread__stop() t = _pickSomeNonDaemonThread() if t: if __debug__: self._note("%s: waiting for other threads", self) while t: t.join() t = _pickSomeNonDaemonThread() if __debug__: self._note("%s: exiting", self) self._Thread__delete() | bea1c70144e4de97312e9d04dd4c90e549f79f2e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/bea1c70144e4de97312e9d04dd4c90e549f79f2e/threading.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8593,
644,
12,
2890,
4672,
365,
6315,
3830,
972,
5681,
1435,
268,
273,
389,
11503,
17358,
3989,
12858,
3830,
1435,
309,
268,
30,
309,
1001,
4148,
972,
30,
365,
6315,
7652,
27188,
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,
389,
8593,
644,
12,
2890,
4672,
365,
6315,
3830,
972,
5681,
1435,
268,
273,
389,
11503,
17358,
3989,
12858,
3830,
1435,
309,
268,
30,
309,
1001,
4148,
972,
30,
365,
6315,
7652,
27188,
87... |
xtext = ((x + xstep*i + 180)%360 - 180) if xText in ANGLES else (x + xstep*i) | xtext = ((x + xstep*i + 180)%360 - 180) if xText in ANGLES and x1 <= 180 else (x + xstep*i) | def Plot(self): """ Calculates and renders the plot """ #cache local variables x = self.x y = self.y x1 = self.x1 y1 = self.y1 xbin = self.xbin ybin = self.ybin xText = self.xText yText = self.yText height = self.height width = self.width bg_color = self.background_color hash_color = self.hash_color text_color = self.text_color | cd61e2ba9c8f4b03199719ac515a5b788657caa1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6163/cd61e2ba9c8f4b03199719ac515a5b788657caa1/ConfDistFuncs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15211,
12,
2890,
4672,
3536,
26128,
471,
19567,
326,
3207,
3536,
225,
468,
2493,
1191,
3152,
619,
273,
365,
18,
92,
677,
273,
365,
18,
93,
619,
21,
273,
365,
18,
92,
21,
677,
21,
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,
15211,
12,
2890,
4672,
3536,
26128,
471,
19567,
326,
3207,
3536,
225,
468,
2493,
1191,
3152,
619,
273,
365,
18,
92,
677,
273,
365,
18,
93,
619,
21,
273,
365,
18,
92,
21,
677,
21,
273... |
open(infile, 'w').write(input) infile.close() | tmp = open(infile, 'w') tmp.write(input) tmp.close() | def __init__(self, command, input=None, capturestderr=None): outfile = tempfile.mktemp() command = '( %s ) > %s' % (command, outfile) if input: infile = tempfile.mktemp() open(infile, 'w').write(input) infile.close() command = command + ' <' + infile if capturestderr: errfile = tempfile.mktemp() command = command + ' 2>' + errfile try: self.err = None self.errorlevel = os.system(command) >> 8 outfd = file(outfile, 'r') self.out = outfd.read() outfd.close() if capturestderr: errfd = file(errfile,'r') self.err = errfd.read() errfd.close() finally: if os.path.isfile(outfile): os.remove(outfile) if input and os.path.isfile(infile): os.remove(infile) if capturestderr and os.path.isfile(errfile): os.remove(errfile) | 927a499d63d645d4e7161a531a4bb3e02af9957a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/927a499d63d645d4e7161a531a4bb3e02af9957a/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1296,
16,
810,
33,
7036,
16,
7477,
11241,
33,
7036,
4672,
8756,
273,
13275,
18,
24816,
5814,
1435,
1296,
273,
7747,
738,
87,
262,
405,
738,
87,
11,
738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1296,
16,
810,
33,
7036,
16,
7477,
11241,
33,
7036,
4672,
8756,
273,
13275,
18,
24816,
5814,
1435,
1296,
273,
7747,
738,
87,
262,
405,
738,
87,
11,
738,
... |
imageobj = eps.EpsImage(filename = sysfilename) | imageobj = eps.EpsImage(filename=sysfilename) | def CreateImage(self, sysfilename = None): if not sysfilename: filename, sysfilename=dialogman.getImportBMFilename(initialdir = config.preferences.dir_for_bitmap_import, initialfile = '') | 5bd05aab08ecc99debb8be46af1003105e4183ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/5bd05aab08ecc99debb8be46af1003105e4183ab/mainwindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
2040,
12,
2890,
16,
2589,
3459,
273,
599,
4672,
309,
486,
2589,
3459,
30,
1544,
16,
2589,
3459,
33,
12730,
4728,
18,
588,
5010,
38,
49,
5359,
12,
6769,
1214,
273,
642,
18,
23219,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1788,
2040,
12,
2890,
16,
2589,
3459,
273,
599,
4672,
309,
486,
2589,
3459,
30,
1544,
16,
2589,
3459,
33,
12730,
4728,
18,
588,
5010,
38,
49,
5359,
12,
6769,
1214,
273,
642,
18,
23219,... |
return self.stanza(search=kwargs.get('search', None), sortby=kwargs.get('sortby',None), authorid=kwargs.get('authorid',None), | want_mobile = self.MOBILE_UA.search(ua) is not None if self.opts.develop and not want_mobile: prints('User agent:', ua) if want_opds: return self.stanza(search=kwargs.get('search', None), sortby=kwargs.get('sortby',None), authorid=kwargs.get('authorid',None), | def index(self, **kwargs): 'The / URL' ua = cherrypy.request.headers.get('User-Agent', '').strip() want_opds = \ cherrypy.request.headers.get('Stanza-Device-Name', 919) != 919 or \ cherrypy.request.headers.get('Want-OPDS-Catalog', 919) != 919 or \ ua.startswith('Stanza') return self.stanza(search=kwargs.get('search', None), sortby=kwargs.get('sortby',None), authorid=kwargs.get('authorid',None), tagid=kwargs.get('tagid',None), seriesid=kwargs.get('seriesid',None), offset=kwargs.get('offset', 0)) if want_opds else self.static('index.html') | 8a0aad39f90399dd78d3b444a9805483d92815d1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/8a0aad39f90399dd78d3b444a9805483d92815d1/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2890,
16,
2826,
4333,
4672,
296,
1986,
342,
1976,
11,
10165,
273,
462,
370,
28398,
18,
2293,
18,
2485,
18,
588,
2668,
1299,
17,
3630,
2187,
875,
2934,
6406,
1435,
2545,
67,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2890,
16,
2826,
4333,
4672,
296,
1986,
342,
1976,
11,
10165,
273,
462,
370,
28398,
18,
2293,
18,
2485,
18,
588,
2668,
1299,
17,
3630,
2187,
875,
2934,
6406,
1435,
2545,
67,
55... |
if(log_file_str): | if (log_file_str): | def _get_config(self, config_data): """Get config data from module configuration""" log_file_str = config_data.get('log_file') if(log_file_str): self._log_file = log_file_str severity_str = config_data.get('log_severity') if(severity_str): self._severity = severity_str | 153b6b2c6735f83b37f8d94c65310ce1d7df6263 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6792/153b6b2c6735f83b37f8d94c65310ce1d7df6263/log.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1425,
12,
2890,
16,
642,
67,
892,
4672,
3536,
967,
642,
501,
628,
1605,
1664,
8395,
225,
613,
67,
768,
67,
701,
273,
642,
67,
892,
18,
588,
2668,
1330,
67,
768,
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,
389,
588,
67,
1425,
12,
2890,
16,
642,
67,
892,
4672,
3536,
967,
642,
501,
628,
1605,
1664,
8395,
225,
613,
67,
768,
67,
701,
273,
642,
67,
892,
18,
588,
2668,
1330,
67,
768,
6134,
... |
res_dict['terminal_flag'] = True residues[res_old_id]['terminal_flag'] = True res_dict['chainIndex'] = newID res_dict['L2'] = calc_distance(N,CA) res_dict['L4'] = calc_distance(CA,C) res_dict['L5'] = calc_distance(C,O) res_dict['a3'] = calc_angle(N,CA,C) res_dict['a5'] = calc_angle(CA,C,O) if CB: res_dict['a2'] = calc_angle(N,CA,CB) res_dict['a4'] = calc_angle(CB,CA,C) res_dict['L3'] = calc_distance(CA,CB) res_dict['zeta'] = calc_dihedral(CA, N, C, CB) """ Calculate Bg - bfactor of the 4th atom in Chi1. """ try: atom_name = CHI_MAP[res.resname][0][3] res_dict['bg'] = res[atom_name].get_bfactor() except KeyError: pass """ Other B Averages Bm - Average of bfactors in main chain. Bm - Average of bfactors in side chain. """ main_chain = [] side_chain = [] for a in res.child_list: if a.name in ('N', 'CA', 'C', 'O','OXT'): main_chain.append(a.get_bfactor()) elif a.name in ('H'): continue else: side_chain.append(a.get_bfactor()) if main_chain != []: res_dict['bm'] = sum(main_chain)/len(main_chain) if side_chain != []: res_dict['bs'] = sum(side_chain)/len(side_chain) """ Calculate CHI values. The mappings for per peptide chi's are stored in a separate file and a function is used to calculate the chi based based on the peptide of this residue and the lists of atoms in the chi mappings. """ calc_chi(res, res_dict) if res_dict['chi1']: res_dict['chi'] = res_dict['chi1'] """ Reset for next pass. We save some relationships which span two atoms. """ res_old_id = res_id oldN = N oldCA = CA oldC = C oldO = O | oldN = None oldCA = None oldC = None if residues.has_key(res_id): del residues[res_id] | def parseWithBioPython(file, props, chains=None): """ Parse values from file that can be parsed using BioPython library @return a dict containing the properties that were processed """ chains = props['chains'] decompressedFile = None tmp = './tmp' pdb = './pdb' try: #create tmp workspace if os.path.exists(tmp): ownTempDir = False else: ownTempDir = True os.mkdir(tmp) #prep and open file decompressedFile = uncompress(file, pdb, tmp) if not decompressedFile: print 'ERROR: file not decompressed' else: structure = Bio.PDB.PDBParser().get_structure('pdbname', decompressedFile) # dssp can't do multiple models. if we ever need to, we'll have to # iterate through them dssp = Bio.PDB.DSSP(model=structure[0], pdb_file=decompressedFile, dssp='dsspcmbi') #iterate residues res_old_id = None oldN = None oldCA = None oldC = None for chain in structure[0]: chain_id = chain.get_id() # only process selected chains if chains and not chain_id in chains: print 'Skipping Chain: %s' % chain_id continue # construct structure for saving chain if not chain_id in props['chains']: residues = {} props['chains'][chain_id] = residues print 'PROCESSING CHAIN [%s]' % chain, len(chain) newID = 0 #for res in structure[0].get_residues(): for res in chain: newID += 1 terminal = False hetflag, res_id, icode = res.get_id() """ Exclude water residues Exclude any Residues that are missing _ANY_ of the mainchain atoms. Any atom could be missing """ all_mainchain = res.has_id('N') and res.has_id('CA') and res.has_id('C') and res.has_id('O') if hetflag != ' ' or not all_mainchain: #print 'discard', res_id if oldC: residues[res_old_id]['terminal_flag'] = True newID += 1 oldN = None oldCA = None oldC = None continue """ Create dictionary structure and initialize all values. All Values are required. Values that are not filled in will retain the NO_VALUE value. Store residue properties using OLD_ID as the key to ensure it is unique. We're including residues from all chains in the same dictionary and chainindex may have duplicates. """ try: res_dict = residues[res_id] except KeyError: # residue didn't exist yet res_dict = {} residues[res_id] = res_dict res_dict['oldID'] = res_id if not icode else '%s%s' % (res_id, icode) length_list = ['L1', 'L2', 'L3', 'L4', 'L5', 'L6', 'L7','bg','bs','bm'] angles_list = ['a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7'] dihedral_list = ['psi', 'ome', 'phi', 'zeta','chi1','chi2','chi3','chi4'] initialize_geometry(res_dict, length_list, 'length') initialize_geometry(res_dict, angles_list, 'angle') initialize_geometry(res_dict, dihedral_list, 'angle') """ Get Properties from DSSP and other per residue properties """ chain = res.get_parent().get_id() residue_dssp, secondary_structure, accessibility, relative_accessibility = dssp[(chain, res_id)] res_dict['chain_id'] = chain res_dict['ss'] = secondary_structure res_dict['aa'] = AA3to1[res.resname] res_dict['h_bond_energy'] = 0.00 """ Get Vectors for mainchain atoms and calculate geometric angles, dihedral angles, and lengths between them. """ N = res['N'].get_vector() CA = res['CA'].get_vector() C = res['C'].get_vector() CB = res['CB'].get_vector() if res.has_id('CB') else None O = res['O'].get_vector() if oldC: # determine if there are missing residues by calculating # the distance between the current residue and previous # residue. If the L1 distance is greater than 2.5 it # cannot possibly be the correct order of residues. L1 = calc_distance(oldC,N) if L1 < 2.5: # properties that span residues res_dict['a6'] = calc_angle(oldCA,oldC,N) res_dict['a7'] = calc_angle(oldO,oldC,N) residues[res_old_id]['psi'] = calc_dihedral(oldN,oldCA,oldC,N) residues[res_old_id]['ome'] = calc_dihedral(oldCA,oldC,N,CA) res_dict['a1'] = calc_angle(oldC,N,CA) res_dict['phi'] = calc_dihedral(oldC,N,CA,C) res_dict['L1'] = L1 terminal = False if terminal: # break in the chain, # 1) add terminal flags to both ends of the break so # the break can quickly be found. # 2) skip a number in the new style index. This allows # the break to be visible without checking the # terminal flag newID += 1 res_dict['terminal_flag'] = True residues[res_old_id]['terminal_flag'] = True # newID cannot be set until after we determine if it is terminal res_dict['chainIndex'] = newID res_dict['L2'] = calc_distance(N,CA) res_dict['L4'] = calc_distance(CA,C) res_dict['L5'] = calc_distance(C,O) res_dict['a3'] = calc_angle(N,CA,C) res_dict['a5'] = calc_angle(CA,C,O) if CB: res_dict['a2'] = calc_angle(N,CA,CB) res_dict['a4'] = calc_angle(CB,CA,C) res_dict['L3'] = calc_distance(CA,CB) res_dict['zeta'] = calc_dihedral(CA, N, C, CB) """ Calculate Bg - bfactor of the 4th atom in Chi1. """ try: atom_name = CHI_MAP[res.resname][0][3] res_dict['bg'] = res[atom_name].get_bfactor() except KeyError: # not all residues have chi pass """ Other B Averages Bm - Average of bfactors in main chain. Bm - Average of bfactors in side chain. """ main_chain = [] side_chain = [] for a in res.child_list: if a.name in ('N', 'CA', 'C', 'O','OXT'): main_chain.append(a.get_bfactor()) elif a.name in ('H'): continue else: side_chain.append(a.get_bfactor()) if main_chain != []: res_dict['bm'] = sum(main_chain)/len(main_chain) if side_chain != []: res_dict['bs'] = sum(side_chain)/len(side_chain) """ Calculate CHI values. The mappings for per peptide chi's are stored in a separate file and a function is used to calculate the chi based based on the peptide of this residue and the lists of atoms in the chi mappings. """ calc_chi(res, res_dict) if res_dict['chi1']: res_dict['chi'] = res_dict['chi1'] """ Reset for next pass. We save some relationships which span two atoms. """ res_old_id = res_id oldN = N oldCA = CA oldC = C oldO = O print 'Processed %s residues' % len(residues) finally: #clean up any files in tmp directory no matter what if decompressedFile and os.path.exists(decompressedFile): os.remove(decompressedFile) if ownTempDir and os.path.exists(tmp): os.removedirs(tmp) return props | b600ae9cea682b7a1ec000d1367d9fd15e63f3df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6163/b600ae9cea682b7a1ec000d1367d9fd15e63f3df/ProcessPDBTask.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
1190,
38,
1594,
15774,
12,
768,
16,
3458,
16,
13070,
33,
7036,
4672,
3536,
2884,
924,
628,
585,
716,
848,
506,
2707,
1450,
21209,
15774,
5313,
632,
2463,
279,
2065,
4191,
326,
1790... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1190,
38,
1594,
15774,
12,
768,
16,
3458,
16,
13070,
33,
7036,
4672,
3536,
2884,
924,
628,
585,
716,
848,
506,
2707,
1450,
21209,
15774,
5313,
632,
2463,
279,
2065,
4191,
326,
1790... |
return if (parents == (nullrev, nullrev) or len(cl.heads(cl.node(parents[0]))) > 1 and (parents[1] == nullrev or len(cl.heads(cl.node(parents[1]))) > 1)): | pass elif (parents == (nullrev, nullrev) or len(cl.heads(cl.node(parents[0]))) > 1 and (parents[1] == nullrev or len(cl.heads(cl.node(parents[1]))) > 1)): | def commitfunc(ui, repo, message, match, opts): return repo.commit(match.files(), message, opts['user'], opts['date'], match, force_editor=opts.get('force_editor')) | 2211a41b10172dc69a0810ea6be8b6a48a3cb35d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/2211a41b10172dc69a0810ea6be8b6a48a3cb35d/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3294,
644,
12,
4881,
16,
3538,
16,
883,
16,
845,
16,
1500,
4672,
327,
3538,
18,
7371,
12,
1916,
18,
2354,
9334,
883,
16,
1500,
3292,
1355,
17337,
1500,
3292,
712,
17337,
845,
16,
2944,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3294,
644,
12,
4881,
16,
3538,
16,
883,
16,
845,
16,
1500,
4672,
327,
3538,
18,
7371,
12,
1916,
18,
2354,
9334,
883,
16,
1500,
3292,
1355,
17337,
1500,
3292,
712,
17337,
845,
16,
2944,... |
self.window.add_accel_group(agr) | def init_accelerators(self): agr = gtk.AccelGroup() # Escape and Ctrl-W close the dialog. It's faster to call close # directly, rather than use the close button widget key, modifier = gtk.accelerator_parse('Escape') agr.connect_group(key, modifier, gtk.ACCEL_VISIBLE, self.close) key, modifier = gtk.accelerator_parse('<Control>w') agr.connect_group(key, modifier, gtk.ACCEL_VISIBLE, self.close) # Ctrl-N creates a new task key, modifier = gtk.accelerator_parse('<Control>n') agr.connect_group(key, modifier, gtk.ACCEL_VISIBLE, self.new_task) # Ctrl-Shift-N creates a new subtask insert_subtask = self.wTree.get_widget("insert_subtask") key, mod = gtk.accelerator_parse("<Control><Shift>n") insert_subtask.add_accelerator('clicked', agr, key, mod, gtk.ACCEL_VISIBLE) # Ctrl-D marks task as done mark_as_done_editor = self.wTree.get_widget('mark_as_done_editor') key, mod = gtk.accelerator_parse('<Control>d') mark_as_done_editor.add_accelerator('clicked', agr, key, mod, gtk.ACCEL_VISIBLE) # Ctrl-I marks task as dismissed dismiss_editor = self.wTree.get_widget('dismiss_editor') key, mod = gtk.accelerator_parse('<Control>i') dismiss_editor.add_accelerator('clicked', agr, key, mod, gtk.ACCEL_VISIBLE) self.window.add_accel_group(agr) | 2f76328536e715633b22680f091ddfdc76adc245 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/2f76328536e715633b22680f091ddfdc76adc245/editor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
8981,
22990,
3062,
12,
2890,
4672,
1737,
86,
273,
22718,
18,
18019,
1114,
1435,
225,
468,
18025,
471,
30715,
17,
59,
1746,
326,
6176,
18,
2597,
1807,
12063,
358,
745,
1746,
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,
1208,
67,
8981,
22990,
3062,
12,
2890,
4672,
1737,
86,
273,
22718,
18,
18019,
1114,
1435,
225,
468,
18025,
471,
30715,
17,
59,
1746,
326,
6176,
18,
2597,
1807,
12063,
358,
745,
1746,
468... | |
pass | pass | def setUp(self): self.testDir = os.path.join('.','TEST-JSONDUMP') self.testMoveTo = os.path.join('.','TEST-MOVETO') self.testMoveFrom = os.path.join('.','TEST-MOVEFROM') self.initKwargs = { 0:{}, 1:{'dateName':'DATE','indexName':'INDEX','jsonSuffix':'JS','dumpSuffix':'.DS',}, 2:{'jsonSuffix':'JS','dumpSuffix':'.DS',}, 3:{'dateName':'DATE','indexName':'INDEX',}, } self.data = { '0bba61c5-dfc3-43e7-87e6-8afda3564352': ('2007-10-25-05-04','webhead02','0b/ba/61/c5','2007/10/25/05/00/webhead02_0'), '0bba929f-8721-460c-8e70-a43c95d04ed2': ('2007-10-25-05-04','webhead02','0b/ba/92/9f','2007/10/25/05/00/webhead02_0'), '0b9ff107-8672-4aac-8b75-b2bd825c3d58': ('2008-12-25-05-00','webhead01','0b/9f/f1/07','2008/12/25/05/00/webhead01_0'), '22adfb61-f75b-11dc-b6be-001321b0783d': ('2008-12-25-05-01','webhead01','22/ad/fb/61','2008/12/25/05/00/webhead01_0'), 'b965de73-ae90-a935-1357-03ae102b893f': ('2008-12-25-05-04','webhead01','b9/65/de/73','2008/12/25/05/00/webhead01_0'), '0b781b88-ecbe-4cc4-893f-6bbbfd50e548': ('2008-12-25-05-05','webhead01','0b/78/1b/88','2008/12/25/05/05/webhead01_0'), '0b8344d6-9021-4db9-bf34-a15394f96ff5': ('2008-12-25-05-06','webhead01','0b/83/44/d6','2008/12/25/05/05/webhead01_0'), '0b94199b-b90b-4683-a38a-4114d3fd5253': ('2008-12-26-05-21','webhead01','0b/94/19/9b','2008/12/26/05/20/webhead01_0'), '0b9eedc3-9a79-4ce2-83eb-1559e5234fde': ('2008-12-26-05-24','webhead01','0b/9e/ed/c3','2008/12/26/05/20/webhead01_0'), '0b9fd6da-27e4-46aa-bef3-3deb9ef0d364': ('2008-12-26-05-25','webhead02','0b/9f/d6/da','2008/12/26/05/25/webhead02_0'), '0ba32a30-2476-4724-b825-de1727afa9cb': ('2008-11-25-05-00','webhead02','0b/a3/2a/30','2008/11/25/05/00/webhead02_0'), '0bad640f-5825-4d42-b96e-21b8b1d250df': ('2008-11-25-05-04','webhead02','0b/ad/64/0f','2008/11/25/05/00/webhead02_0'), '0bae7049-bbff-49f2-b408-7e9f41602507': ('2008-11-25-05-05','webhead02','0b/ae/70/49','2008/11/25/05/05/webhead02_0'), '0baf1b4d-dad3-4d35-ae7e-b9dcb217d27f': ('2008-11-25-05-06','webhead02','0b/af/1b/4d','2008/11/25/05/05/webhead02_0'), } self.badUuid = '66666666-6666-6666-6666-666666666666' self.toomany = { '23adfb61-f75b-11dc-b6be-001321b0783d': ('2008-12-25-05-01','webhead01','23/ad/fb/61','2008/12/25/05/00'), '24adfb61-f75b-11dc-b6be-001321b0783d': ('2008-12-25-05-01','webhead01','24/ad/fb/61','2008/12/25/05/00'), '25adfb61-f75b-11dc-b6be-001321b0783d': ('2008-12-25-05-02','webhead01','25/ad/fb/61','2008/12/25/05/00'), '26adfb61-f75b-11dc-b6be-001321b0783d': ('2008-12-25-05-02','webhead01','26/ad/fb/61','2008/12/25/05/00'), '27adfb61-f75b-11dc-b6be-001321b0783d': ('2008-12-25-05-03','webhead01','27/ad/fb/61','2008/12/25/05/00'), } self.evenmore = { '28adfb61-f75b-11dc-b6be-001321b0783d': ('2008-12-25-05-01','webhead01','28/ad/fb/61','2008/12/25/05/00'), '29adfb61-f75b-11dc-b6be-001321b0783d': ('2008-12-25-05-00','webhead01','29/ad/fb/61','2008/12/25/05/00'), } | ed01963605a55c3058bb30a099e58e433cc2eaa4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12383/ed01963605a55c3058bb30a099e58e433cc2eaa4/testJsonDumpStorage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
3813,
1621,
273,
1140,
18,
803,
18,
5701,
2668,
1093,
11189,
16961,
17,
2986,
40,
23942,
6134,
365,
18,
3813,
7607,
774,
273,
1140,
18,
803,
18,
5701,
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,
24292,
12,
2890,
4672,
365,
18,
3813,
1621,
273,
1140,
18,
803,
18,
5701,
2668,
1093,
11189,
16961,
17,
2986,
40,
23942,
6134,
365,
18,
3813,
7607,
774,
273,
1140,
18,
803,
18,
5701,
2... |
'old': {'datestamp': '%Y-%m-%d %H:%M UTC', 'generator': 1, 'no_random': 1, 'python_home': 'http://www.python.org', 'source_link': 1, | 'old': {u'datestamp': u'%Y-%m-%d %H:%M UTC', u'generator': 1, u'no_random': 1, u'python_home': u'http://www.python.org', u'source_link': 1, | def fixpath(path): return os.path.abspath(os.path.join(*(path.split('/')))) | 3a0d1b210e2668b53d2827ef58028d1c74689137 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/3a0d1b210e2668b53d2827ef58028d1c74689137/test_settings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
803,
12,
803,
4672,
327,
1140,
18,
803,
18,
5113,
803,
12,
538,
18,
803,
18,
5701,
12,
21556,
803,
18,
4939,
2668,
2473,
3719,
3719,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
803,
12,
803,
4672,
327,
1140,
18,
803,
18,
5113,
803,
12,
538,
18,
803,
18,
5701,
12,
21556,
803,
18,
4939,
2668,
2473,
3719,
3719,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
'''raise: data and variable name must have compatible sizes''' | '''raise: data and attribute name must have compatible sizes''' | def raise__init__4(self): '''raise: data and variable name must have compatible sizes''' data = self.numData names = ['a','b','c','d'] ArrayStore(data, names) | 45268ff49ddb4f963530947d7202a5e0642e2fda /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2720/45268ff49ddb4f963530947d7202a5e0642e2fda/storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1002,
972,
2738,
972,
24,
12,
2890,
4672,
9163,
11628,
30,
501,
471,
1566,
508,
1297,
1240,
7318,
8453,
26418,
501,
273,
365,
18,
2107,
751,
1257,
273,
10228,
69,
17023,
70,
17023,
71,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1002,
972,
2738,
972,
24,
12,
2890,
4672,
9163,
11628,
30,
501,
471,
1566,
508,
1297,
1240,
7318,
8453,
26418,
501,
273,
365,
18,
2107,
751,
1257,
273,
10228,
69,
17023,
70,
17023,
71,
... |
RR = ischema.ref_constraints TC = ischema.constraints C = ischema.column_constraints.alias('C') R = ischema.column_constraints.alias('R') | RR = self.uupercase_table(ischema.ref_constraints) TC = self.uupercase_table(ischema.constraints) C = self.uupercase_table(ischema.column_constraints).alias('C') R = self.uupercase_table(ischema.column_constraints).alias('R') | def reflecttable(self, connection, table): import sqlalchemy.databases.information_schema as ischema # Get base columns if table.schema is not None: current_schema = table.schema else: current_schema = self.get_default_schema_name() | facbaa3333a5ca24f1cd4d09e5f84b63d3faefe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1074/facbaa3333a5ca24f1cd4d09e5f84b63d3faefe5/mssql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3037,
2121,
12,
2890,
16,
1459,
16,
1014,
4672,
1930,
1847,
24182,
18,
3404,
19684,
18,
13117,
67,
4821,
487,
353,
1243,
225,
468,
968,
1026,
2168,
309,
1014,
18,
4821,
353,
486,
599,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3037,
2121,
12,
2890,
16,
1459,
16,
1014,
4672,
1930,
1847,
24182,
18,
3404,
19684,
18,
13117,
67,
4821,
487,
353,
1243,
225,
468,
968,
1026,
2168,
309,
1014,
18,
4821,
353,
486,
599,
... |
local_sdp.media.append(self._init_audio(audio_rtp)) | local_sdp.media.append(self._init_audio(audio_rtp)) else: local_sdp.media[audio_sdp_index] = self._init_audio(audio_rtp) | def _add_audio_continue(self, audio_rtp, msrp_chat): self._lock.acquire() try: if self.state != "PROPOSING": return local_sdp = self._make_next_sdp(True, self.on_hold_by_local) audio_sdp_index = self._audio_sdp_index if audio_sdp_index == -1: audio_sdp_index = len(local_sdp.media) local_sdp.media.append(self._init_audio(audio_rtp)) if self.on_hold_by_local: local_sdp.media[audio_sdp_index].attributes.append(SDPAttribute("sendonly", "")) if audio_rtp.use_ice: local_sdp.connection.address = self.audio_transport.transport.local_rtp_address self._inv.set_offered_local_sdp(local_sdp) self._inv.send_reinvite() except SIPCoreError, e: self.proposed_audio = False self._cancel_media() self._change_state("ESTABLISHED") self.notification_center.post_notification("SCSessionRejectedStreamProposal", self, TimestampedNotificationData(proposer="local", reason=e.args[0])) finally: self._lock.release() | 77ddd2188747de721405015a1e3ec8f962210f7c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/77ddd2188747de721405015a1e3ec8f962210f7c/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
11509,
67,
17143,
12,
2890,
16,
7447,
67,
3797,
84,
16,
4086,
13832,
67,
10880,
4672,
365,
6315,
739,
18,
1077,
1039,
1435,
775,
30,
309,
365,
18,
2019,
480,
315,
3373,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
11509,
67,
17143,
12,
2890,
16,
7447,
67,
3797,
84,
16,
4086,
13832,
67,
10880,
4672,
365,
6315,
739,
18,
1077,
1039,
1435,
775,
30,
309,
365,
18,
2019,
480,
315,
3373,
... |
elif node.nodeName in ModelGroup.GroupMemberTags(wxs): | elif ModelGroup.IsGroupMemberNode(node): | def __GetTerm (cls, wxs, context, node, scope): ref_attr = NodeAttribute(node, 'ref') if xsd.nodeIsNamed(node, 'group'): # 3.9.2 says use 3.8.2, which is ModelGroup. The group # inside a particle is a groupRef. If there is no group # with that name, this throws an exception as expected. if ref_attr is None: raise SchemaValidationError('group particle without reference') # Named groups can only appear at global scope, so no need # to use context here. group_decl = wxs.lookupGroup(ref_attr) | 25939b2ff98f2edd2f1dc9410de2d46bf5d6cdce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/25939b2ff98f2edd2f1dc9410de2d46bf5d6cdce/structures.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
967,
4065,
261,
6429,
16,
7075,
87,
16,
819,
16,
756,
16,
2146,
4672,
1278,
67,
1747,
273,
2029,
1499,
12,
2159,
16,
296,
1734,
6134,
309,
14802,
18,
2159,
2520,
7604,
12,
2159,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
967,
4065,
261,
6429,
16,
7075,
87,
16,
819,
16,
756,
16,
2146,
4672,
1278,
67,
1747,
273,
2029,
1499,
12,
2159,
16,
296,
1734,
6134,
309,
14802,
18,
2159,
2520,
7604,
12,
2159,
... |
port == arg | port = arg | def getContent(self, host, port, q): start_time = time.ctime(time.time()) if q.find("/search?") == 0: query = q else: query = ("""/search?q=%s&output=xml_no_dtd&client=default_frontend&""" """proxystylesheet=default_frontend&site=default_collection""" % (q)) try: s = """ | 51b3d2cd4410bc63a49153fce8f8e779060f6201 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6393/51b3d2cd4410bc63a49153fce8f8e779060f6201/load.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5154,
12,
2890,
16,
1479,
16,
1756,
16,
1043,
4672,
787,
67,
957,
273,
813,
18,
21261,
12,
957,
18,
957,
10756,
309,
1043,
18,
4720,
2932,
19,
3072,
7225,
13,
422,
374,
30,
843,
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,
5154,
12,
2890,
16,
1479,
16,
1756,
16,
1043,
4672,
787,
67,
957,
273,
813,
18,
21261,
12,
957,
18,
957,
10756,
309,
1043,
18,
4720,
2932,
19,
3072,
7225,
13,
422,
374,
30,
843,
273,... |
coltype = ischema_names.get(coltype, MSString) | extra_1 = match.group(3) extra_2 = match.group(4) coltype = ischema_names.get(col_type, MSString) kw = {} if extra_1 is not None: kw[extra_1] = True if extra_2 is not None: kw[extra_2] = True | def reflecttable(self, connection, table): # to use information_schema: #ischema.reflecttable(self, table, ischema_names, use_mysql=True) c = connection.execute("describe " + table.name, {}) found_table = False while True: row = c.fetchone() if row is None: break #print "row! " + repr(row) if not found_table: tabletype, foreignkeyD = self.moretableinfo(connection, table=table) table.kwargs['mysql_engine'] = tabletype found_table = True | d4cbae66037338ea8f727cdaa6ce47844af2be0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1074/d4cbae66037338ea8f727cdaa6ce47844af2be0c/mysql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3037,
2121,
12,
2890,
16,
1459,
16,
1014,
4672,
468,
358,
999,
1779,
67,
4821,
30,
468,
291,
1243,
18,
1734,
1582,
2121,
12,
2890,
16,
1014,
16,
353,
1243,
67,
1973,
16,
999,
67,
125... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3037,
2121,
12,
2890,
16,
1459,
16,
1014,
4672,
468,
358,
999,
1779,
67,
4821,
30,
468,
291,
1243,
18,
1734,
1582,
2121,
12,
2890,
16,
1014,
16,
353,
1243,
67,
1973,
16,
999,
67,
125... |
self._addParameter(self.workflow,'InputSandbox','JDL',fileList,description) | self._addParameter( self.workflow, 'InputSandbox', 'JDL', fileList, description ) | def setInputSandbox(self,files): """Helper function. | 50b3322668816ba92ea3f9b253d993dc34c53a21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/50b3322668816ba92ea3f9b253d993dc34c53a21/Job.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21687,
17881,
12,
2890,
16,
2354,
4672,
3536,
2276,
445,
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,
21687,
17881,
12,
2890,
16,
2354,
4672,
3536,
2276,
445,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if callback: master.connect(btn, SIGNAL("clicked()"), callback) | if value: cfront, cback, cfunc = connectControl(btn, master, value, None, "toggled(bool)", CallFront_toggleButton(btn), cfunc = callback and FunctionCallback(master, callback, widget=btn)) else: if callback: master.connect(btn, SIGNAL("clicked()"), callback) | def button(widget, master, label, callback = None, disabled=0, tooltip=None, debuggingEnabled = 1, width = None, toggleButton = False, value = ""): btn = QPushButton(label, widget) if width: btn.setFixedWidth(width) btn.setDisabled(disabled) if tooltip: QToolTip.add(btn, tooltip) if toggleButton: btn.setToggleButton(True) if callback: master.connect(btn, SIGNAL("clicked()"), callback) if debuggingEnabled: master._guiElements = getattr(master, "_guiElements", []) + [("button", btn, callback)] return btn | 0eb6f11acef0b90e11c4bafb9e83aa44e09ea65b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/0eb6f11acef0b90e11c4bafb9e83aa44e09ea65b/OWGUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3568,
12,
6587,
16,
4171,
16,
1433,
16,
1348,
273,
599,
16,
5673,
33,
20,
16,
11915,
33,
7036,
16,
10450,
1526,
273,
404,
16,
1835,
273,
599,
16,
10486,
3616,
273,
1083,
16,
460,
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,
3568,
12,
6587,
16,
4171,
16,
1433,
16,
1348,
273,
599,
16,
5673,
33,
20,
16,
11915,
33,
7036,
16,
10450,
1526,
273,
404,
16,
1835,
273,
599,
16,
10486,
3616,
273,
1083,
16,
460,
273... |
result.append(blend(color2, 1 - frac, frac)) | result.append(blend(color2.RGB(), 1 - frac, frac)) | def Sample(self, num): colors = self.colors max = num - 1.0 pos1, color1 = colors[0] pos2, color2 = colors[1] diff = float(pos2 - pos1) cur = 1 result = [] blend = color1.Blend for i in range(num): frac = i / max while frac > pos2: pos1 = pos2; color1 = color2 cur = cur + 1 pos2, color2 = colors[cur] diff = float(pos2 - pos1) blend = color1.Blend frac = (frac - pos1) / diff result.append(blend(color2, 1 - frac, frac)) return result | a64a665d8990fc6eee8a6940f8e3023d7ea545f7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3127/a64a665d8990fc6eee8a6940f8e3023d7ea545f7/gradient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11474,
12,
2890,
16,
818,
4672,
5740,
273,
365,
18,
9724,
943,
273,
818,
300,
404,
18,
20,
949,
21,
16,
2036,
21,
273,
5740,
63,
20,
65,
949,
22,
16,
2036,
22,
273,
5740,
63,
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,
11474,
12,
2890,
16,
818,
4672,
5740,
273,
365,
18,
9724,
943,
273,
818,
300,
404,
18,
20,
949,
21,
16,
2036,
21,
273,
5740,
63,
20,
65,
949,
22,
16,
2036,
22,
273,
5740,
63,
21,
... |
bzurl = config.get('bugzilla.url', 'https://bugzilla.redhat.com/xmlrpc.cgi') self.bzServer = bugzilla.Bugzilla(url=bzurl) | self.bzUrl = config.get('bugzilla.url', 'https://bugzilla.redhat.com/') self.bzQueryUrl = config.get('bugzilla.queryurl', self.bzUrl) self.bzServer = bugzilla.Bugzilla(url=self.bzQueryUrl + '/xmlrpc.cgi') | def __init__(self, appTitle=None): '''Create a Packages Controller. | ad6c182ae46a0123425ae9ead4ddb68cf71b59e7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9953/ad6c182ae46a0123425ae9ead4ddb68cf71b59e7/bugs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
595,
4247,
33,
7036,
4672,
9163,
1684,
279,
7930,
1023,
6629,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
595,
4247,
33,
7036,
4672,
9163,
1684,
279,
7930,
1023,
6629,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return BytesOption.parse(self, optval) | return BytesOption.parse(self, s) | def parse(self, s): """Get a throttle option. | b4b2cbf877c4ba3be6a8507a50e9a97a03c59928 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/b4b2cbf877c4ba3be6a8507a50e9a97a03c59928/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
272,
4672,
3536,
967,
279,
18304,
1456,
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,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
272,
4672,
3536,
967,
279,
18304,
1456,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
conn = urllib2.Request(url=connection, data=request) | print request.encode("utf-8") conn = urllib2.Request(url=connection, data=request.encode("utf-8")) | def _process_request(self, connection, request): """ Post the data and return the XML response """ conn = urllib2.Request(url=connection, data=request) f = urllib2.urlopen(conn) all_results = f.read() return(fromstring(all_results)) | c2f830c0e9bb97cd14eb967332ada876240f1f78 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/171/c2f830c0e9bb97cd14eb967332ada876240f1f78/shipper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2567,
67,
2293,
12,
2890,
16,
1459,
16,
590,
4672,
3536,
5616,
326,
501,
471,
327,
326,
3167,
766,
3536,
1172,
590,
18,
3015,
2932,
3158,
17,
28,
7923,
1487,
273,
11527,
22,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2567,
67,
2293,
12,
2890,
16,
1459,
16,
590,
4672,
3536,
5616,
326,
501,
471,
327,
326,
3167,
766,
3536,
1172,
590,
18,
3015,
2932,
3158,
17,
28,
7923,
1487,
273,
11527,
22,
18,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.