rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
generated background %s"%self.__backgroundDict__["ifoepoch"] except: backgroundPickle=False sys.stderr.write("Error importing the pickle file!\n") if os.access(os.path.split(pickleLocal)[0],os.W_OK): os.path.rename(pickleLocale,pickleLocale+".corrupt") | generated background expected %s got %s"%(\ self.__backgroundDict__["ifoepoch"], ifoEpochList) | def createDQbackground(self,ifoEpochList=list(),pickleLocale=None): """ Two inputs a list of tuples (ifo,epochname) for each instrument. Also a place to save the potential pickle to for quick access later. """ if type(ifoEpochList) != type(list()): raise Exception, \ "Invalid input argument ifoEpochList,%s type(%s)"\ %(ifoEpochList,type(ifoEpochList)) #Make sure epoch exists for reach ifo for ifo,epoch in ifoEpochList: if ifo not in runEpochs.keys(): raise Exception, "Bad ifo specified, %s"%ifo if epoch not in runEpochs[ifo].keys(): raise Exception, "Bad ifo epoch specified, %s:%s"%(ifo,epoch) #If pickle location given try to load that pickle first. backgroundPickle=False if pickleLocale!=None: #If pickle file exists read it if not make sure we can #generate it properly otherwise skip creating background if os.path.isfile(pickleLocale): try: self.__backgroundDict__=cPickle.load(file(pickleLocale,'r')) backgroundPickle=True for (ifo,epoch) in ifoEpochList: if (ifo.upper().strip(),epoch.upper().strip()) \ not in self.__backgroundDict__["ifoepoch"]: raise Exception,\ "Invalid ifo and epoch information in \ | 5800af6be75ac2540e1e98d21cc7afadf15bf2aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/5800af6be75ac2540e1e98d21cc7afadf15bf2aa/fu_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
40,
53,
9342,
12,
2890,
16,
20299,
14638,
682,
33,
1098,
9334,
20847,
3916,
33,
7036,
4672,
3536,
16896,
4540,
279,
666,
434,
10384,
261,
20299,
16,
12015,
529,
13,
364,
1517,
10353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
40,
53,
9342,
12,
2890,
16,
20299,
14638,
682,
33,
1098,
9334,
20847,
3916,
33,
7036,
4672,
3536,
16896,
4540,
279,
666,
434,
10384,
261,
20299,
16,
12015,
529,
13,
364,
1517,
10353... |
value = lfc.lfc_delreplica('',fid,pfn) | value = lfc.lfc_delreplica( '', fid, pfn ) | def __removeReplica(self, pfn): fid = lfc.lfc_fileid() value = lfc.lfc_delreplica('',fid,pfn) if value == 0: return S_OK() elif value == 2: return S_OK() else: return S_ERROR(lfc.sstrerror(lfc.cvar.serrno)) | 6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4479,
14222,
12,
2890,
16,
293,
4293,
4672,
13444,
273,
328,
7142,
18,
80,
7142,
67,
768,
350,
1435,
460,
273,
328,
7142,
18,
80,
7142,
67,
3771,
30065,
12,
10226,
13444,
16,
293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4479,
14222,
12,
2890,
16,
293,
4293,
4672,
13444,
273,
328,
7142,
18,
80,
7142,
67,
768,
350,
1435,
460,
273,
328,
7142,
18,
80,
7142,
67,
3771,
30065,
12,
10226,
13444,
16,
293... |
pass | return _get_delimited(str(reader.cursorBuffer.buffer), reader.cursorBuffer.cursor)[1] | def get_endidx(): # TODO add pass | 24d3df536f1a55ecda3dd9e7f94f30c1a507dddb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6753/24d3df536f1a55ecda3dd9e7f94f30c1a507dddb/readline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
409,
3465,
13332,
468,
2660,
527,
2463,
389,
588,
67,
3771,
1038,
329,
12,
701,
12,
10530,
18,
9216,
1892,
18,
4106,
3631,
2949,
18,
9216,
1892,
18,
9216,
25146,
21,
65,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
409,
3465,
13332,
468,
2660,
527,
2463,
389,
588,
67,
3771,
1038,
329,
12,
701,
12,
10530,
18,
9216,
1892,
18,
4106,
3631,
2949,
18,
9216,
1892,
18,
9216,
25146,
21,
65,
225,
... |
req.args['adspanel.state'] = 'show' | req.args['adspanel.state'] = 'hidden' | def match_request(self, req): if req.path_info == '/adspanel/hide': req.args['adspanel.state'] = 'show' return True if req.path_info == '/adspanel/show': req.args['adspanel.state'] = 'hide' return True return False | 97b888e60c29b0ec7861b28934f7372a5636e183 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5801/97b888e60c29b0ec7861b28934f7372a5636e183/web_ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
845,
67,
2293,
12,
2890,
16,
1111,
4672,
309,
1111,
18,
803,
67,
1376,
422,
1173,
361,
3969,
292,
19,
11248,
4278,
1111,
18,
1968,
3292,
361,
3969,
292,
18,
2019,
3546,
273,
296,
6345,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
845,
67,
2293,
12,
2890,
16,
1111,
4672,
309,
1111,
18,
803,
67,
1376,
422,
1173,
361,
3969,
292,
19,
11248,
4278,
1111,
18,
1968,
3292,
361,
3969,
292,
18,
2019,
3546,
273,
296,
6345,... |
[dump.add_line(' '+line) for line in var_entry.dump()] dump.add_line(' '+var_entry.entry.keys()[0]+': '+var_entry.entry.values()[0]) | if hasattr(var_entry, 'entry'): [dump.add_line(' '+line) for line in var_entry.dump()] dump.add_line( ' ' + var_entry.entry.keys()[0] + ': ' + var_entry.entry.values()[0]) | def dump_info(self, dump=None): """Dump all the PE header information into human readable string.""" if dump is None: dump = Dump() warnings = self.get_warnings() if warnings: dump.add_header('Parsing Warnings') for warning in warnings: dump.add_line(warning) dump.add_newline() dump.add_header('DOS_HEADER') dump.add_lines(self.DOS_HEADER.dump()) dump.add_newline() dump.add_header('NT_HEADERS') dump.add_lines(self.NT_HEADERS.dump()) dump.add_newline() dump.add_header('FILE_HEADER') dump.add_lines(self.FILE_HEADER.dump()) image_flags = self.retrieve_flags(IMAGE_CHARACTERISTICS, 'IMAGE_FILE_') dump.add('Flags: ') flags = [] for flag in image_flags: if getattr(self.FILE_HEADER, flag[0]): flags.append(flag[0]) dump.add_line(', '.join(flags)) dump.add_newline() if hasattr(self, 'OPTIONAL_HEADER') and self.OPTIONAL_HEADER is not None: dump.add_header('OPTIONAL_HEADER') dump.add_lines(self.OPTIONAL_HEADER.dump()) | 03684f4957ce14f974db9a82cf5f19fe7286e28e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4177/03684f4957ce14f974db9a82cf5f19fe7286e28e/pefile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
67,
1376,
12,
2890,
16,
4657,
33,
7036,
4672,
3536,
10628,
777,
326,
16628,
1446,
1779,
1368,
8672,
7471,
533,
12123,
282,
309,
4657,
353,
599,
30,
4657,
273,
18242,
1435,
225,
559... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
67,
1376,
12,
2890,
16,
4657,
33,
7036,
4672,
3536,
10628,
777,
326,
16628,
1446,
1779,
1368,
8672,
7471,
533,
12123,
282,
309,
4657,
353,
599,
30,
4657,
273,
18242,
1435,
225,
559... |
def check_line (l, s, f, t): | def check_line (l, s, f, t, done): | def check_line (l, s, f, t): """ @param l: the line @param s: the string that denotes this line is supposed to change @param f: from port @param t: to port @return: the line, changed if needed """ if l.find(s) >= 0 and l.find(f) >= 0: if f in t and l.find(t) >= 0: # Already have the change... probably return False print l.replace(f, t), done.add(fileinput.filename()) return True return False | dce7f1f19d1028b3574cb5d2e6a136690b00aea1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/dce7f1f19d1028b3574cb5d2e6a136690b00aea1/change_ports.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1369,
261,
80,
16,
272,
16,
284,
16,
268,
16,
2731,
4672,
3536,
632,
891,
328,
30,
326,
980,
632,
891,
272,
30,
326,
533,
716,
5545,
6366,
333,
980,
353,
18405,
358,
2549,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1369,
261,
80,
16,
272,
16,
284,
16,
268,
16,
2731,
4672,
3536,
632,
891,
328,
30,
326,
980,
632,
891,
272,
30,
326,
533,
716,
5545,
6366,
333,
980,
353,
18405,
358,
2549,
... |
if not self.fd: raise portNotOpenError | if self.fd is None: raise portNotOpenError | def getDSR(self): """Read terminal status line: Data Set Ready""" if not self.fd: raise portNotOpenError s = fcntl.ioctl(self.fd, TIOCMGET, TIOCM_zero_str) return struct.unpack('I',s)[0] & TIOCM_DSR != 0 | c6178260b0154cee256732353dc988e9464d50be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2937/c6178260b0154cee256732353dc988e9464d50be/serialposix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2343,
10090,
12,
2890,
4672,
3536,
1994,
8651,
1267,
980,
30,
1910,
1000,
26732,
8395,
309,
365,
18,
8313,
353,
599,
30,
1002,
1756,
1248,
3678,
668,
272,
273,
30894,
18,
1594,
12930,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2343,
10090,
12,
2890,
4672,
3536,
1994,
8651,
1267,
980,
30,
1910,
1000,
26732,
8395,
309,
365,
18,
8313,
353,
599,
30,
1002,
1756,
1248,
3678,
668,
272,
273,
30894,
18,
1594,
12930,
12... |
print "calculating cost to b" | def compare(self, a, b): keyA = repr(a) keyB = repr(b) | bfb9de4fcf1a57a89f60298f41ded554fee9567c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/bfb9de4fcf1a57a89f60298f41ded554fee9567c/Algorithms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
12,
2890,
16,
279,
16,
324,
4672,
498,
37,
273,
8480,
12,
69,
13,
498,
38,
273,
8480,
12,
70,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3400,
12,
2890,
16,
279,
16,
324,
4672,
498,
37,
273,
8480,
12,
69,
13,
498,
38,
273,
8480,
12,
70,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
>>> check(y.isbyteswapped()); | >>> check( bool(y.isbyteswapped()) ); | def _numarray_tests(): ''' >>> from numpy_ext import * >>> x = new_array() >>> y = x.copy() >>> p = _printer() >>> check = p.check >>> exercise_numarray(x, p) >>> check(y.astype()); >>> check(y.argmax()); >>> check(y.argmax(0)); >>> check(y.argmin()); >>> check(y.argmin(0)); >>> check(y.argsort()); >>> check(y.argsort(1)); >>> y.byteswap(); >>> check(y); >>> check(y.diagonal()); >>> check(y.diagonal(1)); >>> check(y.diagonal(0, 1)); >>> check(y.diagonal(0, 1, 0)); >>> check(y.is_c_array()); >>> check(y.isbyteswapped()); >>> check(y.trace()); >>> check(y.trace(1)); >>> check(y.trace(0, 1)); >>> check(y.trace(0, 1, 0)); >>> check(y.new('D')); >>> y.sort(); >>> check(y); >>> check(y.type()); >>> check(y.factory((1.2, 3.4))); >>> check(y.factory((1.2, 3.4), "Double")); >>> check(y.factory((1.2, 3.4), "Double", (1,2,1))); >>> check(y.factory((1.2, 3.4), "Double", (2,1,1), false)); >>> check(y.factory((1.2, 3.4), "Double", (2,), true, true)); >>> p.results [] >>> del p ''' pass | 49d4aac8ec00a0eee4232402a97c1da5cf5560e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9978/49d4aac8ec00a0eee4232402a97c1da5cf5560e8/numpy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2107,
1126,
67,
16341,
13332,
9163,
4080,
628,
3972,
67,
408,
1930,
380,
4080,
619,
273,
394,
67,
1126,
1435,
4080,
677,
273,
619,
18,
3530,
1435,
4080,
293,
273,
389,
30439,
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,
389,
2107,
1126,
67,
16341,
13332,
9163,
4080,
628,
3972,
67,
408,
1930,
380,
4080,
619,
273,
394,
67,
1126,
1435,
4080,
677,
273,
619,
18,
3530,
1435,
4080,
293,
273,
389,
30439,
1435,
... |
path = os.path.join(self.wdir, key.name) | prefix, base = os.path.split(key.name) path = os.path.join(self.wdir, base) | def copy_keys(self): boto.log.info('src=%s' % self.src.name) boto.log.info('dst=%s' % self.dst.name) try: for key in self.src: if not self.replace: exists = self.dst.lookup(key.name) if exists: boto.log.info('key=%s already exists in %s, skipping' % (key.name, self.dst.name)) continue boto.log.info('copying %d bytes from key=%s' % (key.size, key.name)) path = os.path.join(self.wdir, key.name) key.get_contents_to_filename(path) new_key = self.dst.new_key(key.name) new_key.set_contents_from_filename(path) self.copy_key_acl(key, new_key) os.unlink(path) except: boto.log.exception('Error copying key: %s' % key.name) | b18559ffcd77a4fac2ffba09d850ea770070409b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/b18559ffcd77a4fac2ffba09d850ea770070409b/copybot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
2452,
12,
2890,
4672,
17228,
18,
1330,
18,
1376,
2668,
4816,
5095,
87,
11,
738,
365,
18,
4816,
18,
529,
13,
17228,
18,
1330,
18,
1376,
2668,
11057,
5095,
87,
11,
738,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
2452,
12,
2890,
4672,
17228,
18,
1330,
18,
1376,
2668,
4816,
5095,
87,
11,
738,
365,
18,
4816,
18,
529,
13,
17228,
18,
1330,
18,
1376,
2668,
11057,
5095,
87,
11,
738,
365,
... |
"WHERE id = "+str(id) | "WHERE id = "+str(int(id)) | def vfolder_set(id, name, query, parent): cursor = sqmail.db.cursor() q = "UPDATE vfolders SET "\ " name = '"+sqmail.db.escape(name)+"', "\ " query = '"+sqmail.db.escape(query)+"', "\ " parent = "+str(parent)+" "\ "WHERE id = "+str(id) print q cursor.execute(q) | f914c217dfb4ce6bcff05287d1f183216a478290 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3083/f914c217dfb4ce6bcff05287d1f183216a478290/vfolder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
331,
5609,
67,
542,
12,
350,
16,
508,
16,
843,
16,
982,
4672,
3347,
273,
4744,
4408,
18,
1966,
18,
9216,
1435,
1043,
273,
315,
8217,
331,
16064,
7855,
1548,
315,
508,
273,
2119,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
331,
5609,
67,
542,
12,
350,
16,
508,
16,
843,
16,
982,
4672,
3347,
273,
4744,
4408,
18,
1966,
18,
9216,
1435,
1043,
273,
315,
8217,
331,
16064,
7855,
1548,
315,
508,
273,
2119,
15,
... |
if endrec[-4] == -1 or endrec[-4] == 0xffffffff: | if endrec[-4] == 0xffffffff: | def _EndRecData(fpin): """Return data from the "End of Central Directory" record, or None. The data is a list of the nine items in the ZIP "End of central dir" record followed by a tenth item, the file seek offset of this record.""" fpin.seek(-22, 2) # Assume no archive comment. filesize = fpin.tell() + 22 # Get file size data = fpin.read() if data[0:4] == stringEndArchive and data[-2:] == "\000\000": endrec = struct.unpack(structEndArchive, data) endrec = list(endrec) endrec.append("") # Append the archive comment endrec.append(filesize - 22) # Append the record start offset if endrec[-4] == -1 or endrec[-4] == 0xffffffff: return _EndRecData64(fpin, -22, endrec) return endrec # Search the last END_BLOCK bytes of the file for the record signature. # The comment is appended to the ZIP file and has a 16 bit length. # So the comment may be up to 64K long. We limit the search for the # signature to a few Kbytes at the end of the file for efficiency. # also, the signature must not appear in the comment. END_BLOCK = min(filesize, 1024 * 4) fpin.seek(filesize - END_BLOCK, 0) data = fpin.read() start = data.rfind(stringEndArchive) if start >= 0: # Correct signature string was found endrec = struct.unpack(structEndArchive, data[start:start+22]) endrec = list(endrec) comment = data[start+22:] if endrec[7] == len(comment): # Comment length checks out # Append the archive comment and start offset endrec.append(comment) endrec.append(filesize - END_BLOCK + start) if endrec[-4] == -1 or endrec[-4] == 0xffffffff: return _EndRecData64(fpin, - END_BLOCK + start, endrec) return endrec return # Error, return None | bf02e3bb21b2d75cba4ce409a14ae64dbc2dd6d2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/bf02e3bb21b2d75cba4ce409a14ae64dbc2dd6d2/zipfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1638,
5650,
751,
12,
7944,
267,
4672,
3536,
990,
501,
628,
326,
315,
1638,
434,
385,
12839,
8930,
6,
1409,
16,
578,
599,
18,
225,
1021,
501,
353,
279,
666,
434,
326,
290,
558,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1638,
5650,
751,
12,
7944,
267,
4672,
3536,
990,
501,
628,
326,
315,
1638,
434,
385,
12839,
8930,
6,
1409,
16,
578,
599,
18,
225,
1021,
501,
353,
279,
666,
434,
326,
290,
558,
1... |
be returned from a parse action. To use transformString, define a grammar and attach a parse action to it that modifies the returned token list. Invoking transformString() on a target string will then scan for matches, and replace the matched text patterns according to the logic in the parse | be returned from a parse action. To use transformString, define a grammar and attach a parse action to it that modifies the returned token list. Invoking transformString() on a target string will then scan for matches, and replace the matched text patterns according to the logic in the parse | def transformString( self, instring ): """Extension to scanString, to modify matching text with modified tokens that may be returned from a parse action. To use transformString, define a grammar and attach a parse action to it that modifies the returned token list. Invoking transformString() on a target string will then scan for matches, and replace the matched text patterns according to the logic in the parse action. transformString() returns the resulting transformed string.""" out = [] lastE = 0 # force preservation of <TAB>s, to minimize unwanted transformation of string, and to # keep string locs straight between transformString and scanString self.keepTabs = True for t,s,e in self.scanString( instring ): out.append( instring[lastE:s] ) if t: if isinstance(t,ParseResults): out += t.asList() elif isinstance(t,list): out += t else: out.append(t) lastE = e out.append(instring[lastE:]) return "".join(out) | f734f22ba11a967624c3b1351b79174f1d17c2ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3554/f734f22ba11a967624c3b1351b79174f1d17c2ac/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2510,
780,
12,
365,
16,
316,
1080,
262,
30,
3536,
3625,
358,
4135,
780,
16,
358,
5612,
3607,
977,
598,
4358,
2430,
716,
2026,
506,
2106,
628,
279,
1109,
1301,
18,
225,
2974,
999,
2510,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2510,
780,
12,
365,
16,
316,
1080,
262,
30,
3536,
3625,
358,
4135,
780,
16,
358,
5612,
3607,
977,
598,
4358,
2430,
716,
2026,
506,
2106,
628,
279,
1109,
1301,
18,
225,
2974,
999,
2510,... |
url = self.__chooseImagingApiUrl(location) i = ImagingApi(url.encode('utf8')) if i != None: def treatResults(results): | def processResults(results): assert(type(results) == dict) if results: | def getGlobalStatus(self, location): """ get an imaging server status | c0c285223c434c0a4964dd13f878227d63c2576a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/c0c285223c434c0a4964dd13f878227d63c2576a/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20591,
1482,
12,
2890,
16,
2117,
4672,
3536,
336,
392,
709,
5755,
1438,
1267,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
20591,
1482,
12,
2890,
16,
2117,
4672,
3536,
336,
392,
709,
5755,
1438,
1267,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.structures.connect("clicked(QModelIndex)", self.onStructuresClicked) | self.structuresView.connect("clicked(QModelIndex)", self.onStructuresClicked) | def create(self): """create the segmentation helper box""" | 6c86da02a1fe7d7a9785c3f2592f70da96ec7e19 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12580/6c86da02a1fe7d7a9785c3f2592f70da96ec7e19/HelperBox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
4672,
3536,
2640,
326,
25192,
4222,
3919,
8395,
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,
752,
12,
2890,
4672,
3536,
2640,
326,
25192,
4222,
3919,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
except AssertionError: wxLogError('Not a valid colour value') | except AssertionError: wx.LogError('Not a valid colour value') | def OnbgColRet(self, event): try: self.editColTCProp(self.bgColCb, self.bgColBtn, 'back') except AssertionError: wxLogError('Not a valid colour value') | 1e19321bfb8d6ff348cd85bdad3a1a4c2f517fa0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/1e19321bfb8d6ff348cd85bdad3a1a4c2f517fa0/STCStyleEditor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
12370,
914,
7055,
12,
2890,
16,
871,
4672,
775,
30,
365,
18,
4619,
914,
15988,
4658,
12,
2890,
18,
12370,
914,
15237,
16,
365,
18,
12370,
914,
20541,
16,
296,
823,
6134,
1335,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
12370,
914,
7055,
12,
2890,
16,
871,
4672,
775,
30,
365,
18,
4619,
914,
15988,
4658,
12,
2890,
18,
12370,
914,
15237,
16,
365,
18,
12370,
914,
20541,
16,
296,
823,
6134,
1335,
12... |
debt = max(debt - paid, min(0.0, unreconciled - paid)) | debt = max(debt - paid, min(0.0, unreconciled)) | def amount_to_pay(self, cr, uid, ids, name, arg={}, context={}): """ Return amount pending to be paid taking into account payment lines and the reconciliation. Note that the amount to pay can be due to negative supplier refund invoices or customer invoices. """ | 4b674f918880e5b59543679ec40be3709edd90a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/4b674f918880e5b59543679ec40be3709edd90a4/account_move_line.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3844,
67,
869,
67,
10239,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
28793,
819,
12938,
4672,
3536,
2000,
3844,
4634,
358,
506,
30591,
13763,
1368,
2236,
5184,
2362,
471,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3844,
67,
869,
67,
10239,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
28793,
819,
12938,
4672,
3536,
2000,
3844,
4634,
358,
506,
30591,
13763,
1368,
2236,
5184,
2362,
471,... |
self.output_func(text) | params = self.output_params + (text,) self.output_func(*params) | def print_line(text): # Pre-pend prefix and remove trailing whitespace text = self.output_prefix + text.rstrip() # Sanitize text text = text.decode("utf-8", "replace") # Pass it to output_func try: self.output_func(text) except TypeError: pass | 691223a3819b6be5738478dcd5df82e62799f964 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10349/691223a3819b6be5738478dcd5df82e62799f964/kvm_subprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
1369,
12,
955,
4672,
468,
2962,
17,
1302,
1633,
471,
1206,
7341,
7983,
977,
273,
365,
18,
2844,
67,
3239,
397,
977,
18,
86,
6406,
1435,
468,
29568,
977,
977,
273,
977,
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,
1172,
67,
1369,
12,
955,
4672,
468,
2962,
17,
1302,
1633,
471,
1206,
7341,
7983,
977,
273,
365,
18,
2844,
67,
3239,
397,
977,
18,
86,
6406,
1435,
468,
29568,
977,
977,
273,
977,
18,
... |
self.gifes = [None,]*scatterers.size() self._result = [None,]*scatterers.size() | def __init__(self, map_1, xray_structure, fft_map, atom_radius, atom_detail, residue_detail, selection = None, pdb_hierarchy = None): self.xray_structure = xray_structure self.selection = selection self.atom_detail = atom_detail self.residue_detail = residue_detail self.pdb_hierarchy = pdb_hierarchy self.result = [] self.map_1_size = map_1.size() self.map_1_stat = maptbx.statistics(map_1) assert [self.atom_detail, self.residue_detail].count(True) == 1 self.atoms_with_labels = None if(pdb_hierarchy is not None and self.atom_detail): self.atoms_with_labels = list(pdb_hierarchy.atoms_with_labels()) scatterers = self.xray_structure.scatterers() if(self.selection is None): self.selection = flex.bool(scatterers.size(), True) self.gifes = [None,]*scatterers.size() self._result = [None,]*scatterers.size() real_map_unpadded = fft_map.real_map_unpadded() sites_cart = self.xray_structure.sites_cart() if(self.atom_detail): for i_seq, site_cart in enumerate(sites_cart): if(self.selection[i_seq]): sel = maptbx.grid_indices_around_sites( unit_cell = self.xray_structure.unit_cell(), fft_n_real = real_map_unpadded.focus(), fft_m_real = real_map_unpadded.all(), sites_cart = flex.vec3_double([site_cart]), site_radii = flex.double([atom_radius])) self.gifes[i_seq] = sel m1 = map_1.select(sel) ed1 = map_1.eight_point_interpolation(scatterers[i_seq].site) a = None if(self.atoms_with_labels is not None): a = self.atoms_with_labels[i_seq] self._result[i_seq] = group_args(atom = a, m1 = m1, ed1 = ed1) if(self.residue_detail): assert self.pdb_hierarchy is not None residues = self.extract_residues() for residue in residues: sel = maptbx.grid_indices_around_sites( unit_cell = self.xray_structure.unit_cell(), fft_n_real = real_map_unpadded.focus(), fft_m_real = real_map_unpadded.all(), sites_cart = sites_cart.select(residue.selection), site_radii = flex.double(residue.selection.size(), atom_radius)) self.gifes.append(sel) m1 = map_1.select(sel) ed1 = flex.double() for i_seq in residue.selection: ed1.append(map_1.eight_point_interpolation(scatterers[i_seq].site)) self._result.append( group_args(residue = residue, m1 = m1, ed1 = flex.mean(ed1))) del map_1 | 5d9e92a606d04d4ada62c980cd80215573aed00d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/696/5d9e92a606d04d4ada62c980cd80215573aed00d/real_space_correlation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
852,
67,
21,
16,
619,
435,
67,
7627,
16,
15741,
67,
1458,
16,
3179,
67,
11282,
16,
3179,
67,
8992,
16,
14765,
67,
8992,
16,
4421,
273,
599,
16,
10892,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
852,
67,
21,
16,
619,
435,
67,
7627,
16,
15741,
67,
1458,
16,
3179,
67,
11282,
16,
3179,
67,
8992,
16,
14765,
67,
8992,
16,
4421,
273,
599,
16,
10892,
... | |
def Setup(filehash, filesize): | def Setup(filehash, filesha256, filesize): | def Setup(filehash, filesize): PingUpdateResponse.file_hash = filehash PingUpdateResponse.file_size = filesize | 48d7d8bb7f55a8005c5d056eb0da515c337b455c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/48d7d8bb7f55a8005c5d056eb0da515c337b455c/cros_image_to_target.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10939,
12,
768,
2816,
16,
1390,
3395,
5034,
16,
14104,
4672,
18214,
1891,
1064,
18,
768,
67,
2816,
273,
585,
2816,
18214,
1891,
1064,
18,
768,
67,
1467,
273,
14104,
2,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10939,
12,
768,
2816,
16,
1390,
3395,
5034,
16,
14104,
4672,
18214,
1891,
1064,
18,
768,
67,
2816,
273,
585,
2816,
18214,
1891,
1064,
18,
768,
67,
1467,
273,
14104,
2,
-100,
-100,
-100,
... |
def selectionChanged(self, treeView): numpath = treeView.get_cursor()[0] node = self.updateDirCacheNumPath(numpath[1:], treeNode = self.model.rootNode) | def selectionChanged(self, treeView, path, viewColumn): node = self.updateDirCacheNumPath(path[1:], treeNode = self.model.rootNode) | def selectionChanged(self, treeView): numpath = treeView.get_cursor()[0] node = self.updateDirCacheNumPath(numpath[1:], treeNode = self.model.rootNode) if node.leaf: self.session.gotoLocation(node.path) | 073fa3b9523c72c33d79d736a5b8e2d76ec757a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9377/073fa3b9523c72c33d79d736a5b8e2d76ec757a2/ggui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4421,
5033,
12,
2890,
16,
2151,
1767,
16,
589,
16,
1476,
1494,
4672,
756,
273,
365,
18,
2725,
1621,
1649,
2578,
743,
12,
803,
63,
21,
30,
6487,
29733,
273,
365,
18,
2284,
18,
3085,
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,
4421,
5033,
12,
2890,
16,
2151,
1767,
16,
589,
16,
1476,
1494,
4672,
756,
273,
365,
18,
2725,
1621,
1649,
2578,
743,
12,
803,
63,
21,
30,
6487,
29733,
273,
365,
18,
2284,
18,
3085,
9... |
connection.close() | connection.close() | def bootstrapSubscriber(event): """Set up a SchoolBell application as the database root. This is an evil hack that rips out the Zope 3 RootFolder and replaces it with a SchoolBellApplication. """ import transaction from zope.app.appsetup.bootstrap import getInformationFromEvent from schoolbell.app.interfaces import ISchoolBellApplication db, connection, root, root_folder = getInformationFromEvent(event) if not ISchoolBellApplication.providedBy(root_folder): if root_folder is None: print "Installing SchoolBellApplication as the root object" else: print "Root folder already exists. Replacing it with a SchoolBellApplication." installAppInRoot(db, root) transaction.commit() connection.close() | 7bb226ee5a90c66427ab949676f6f4e9c9e3f1ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/7bb226ee5a90c66427ab949676f6f4e9c9e3f1ce/z3schoolbell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7065,
11118,
12,
2575,
4672,
3536,
694,
731,
279,
348,
343,
1371,
38,
1165,
2521,
487,
326,
2063,
1365,
18,
225,
1220,
353,
392,
2113,
330,
11769,
716,
436,
7146,
596,
326,
2285,
1306,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7065,
11118,
12,
2575,
4672,
3536,
694,
731,
279,
348,
343,
1371,
38,
1165,
2521,
487,
326,
2063,
1365,
18,
225,
1220,
353,
392,
2113,
330,
11769,
716,
436,
7146,
596,
326,
2285,
1306,
... |
if dateTime.tzinfo == utc: utcString = "Z" | if tzinfo_eq(dateTime.tzinfo, utc): utcString = "Z" | def dateTimeToString(dateTime, preserveTZ=True): """Convert to UTC if tzinfo is set, unless preserveTZ. Output string.""" if dateTime.tzinfo and not preserveTZ: dateTime = dateTime.astimezone(utc) if dateTime.tzinfo == utc: utcString = "Z" else: utcString = "" year = numToDigits( dateTime.year, 4 ) month = numToDigits( dateTime.month, 2 ) day = numToDigits( dateTime.day, 2 ) hour = numToDigits( dateTime.hour, 2 ) mins = numToDigits( dateTime.minute, 2 ) secs = numToDigits( dateTime.second, 2 ) return year + month + day + "T" + hour + mins + secs + utcString | dc6fa0e6885cfa412c6424b32c5b31ed966aee92 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9169/dc6fa0e6885cfa412c6424b32c5b31ed966aee92/icalendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9296,
5808,
12,
712,
950,
16,
9420,
21647,
33,
5510,
4672,
3536,
2723,
358,
9951,
309,
15732,
353,
444,
16,
3308,
9420,
21647,
18,
225,
3633,
533,
12123,
309,
9296,
18,
12994,
1376,
471,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9296,
5808,
12,
712,
950,
16,
9420,
21647,
33,
5510,
4672,
3536,
2723,
358,
9951,
309,
15732,
353,
444,
16,
3308,
9420,
21647,
18,
225,
3633,
533,
12123,
309,
9296,
18,
12994,
1376,
471,... |
uid = self.indexmanager.index(props, None) | uid = self.indexmanager.index(props) props['uid'] = uid | def create(self, props, filelike, can_move=False): if filelike: uid = self.indexmanager.index(props, None) if isinstance(filelike, basestring): # lets treat it as a filename filelike = open(filelike, "r") filelike.seek(0) path = self._writeContent(uid, filelike, replace=False, can_move=can_move) return self.indexmanager.index(props, path) else: return self.indexmanager.index(props) | 0a7e80f01ac0f96b15d1eeeda3386be40b8a9b7c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9394/0a7e80f01ac0f96b15d1eeeda3386be40b8a9b7c/backingstore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
3458,
16,
661,
292,
2547,
16,
848,
67,
8501,
33,
8381,
4672,
309,
661,
292,
2547,
30,
4555,
273,
365,
18,
1615,
4181,
18,
1615,
12,
9693,
13,
3458,
3292,
1911,
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,
752,
12,
2890,
16,
3458,
16,
661,
292,
2547,
16,
848,
67,
8501,
33,
8381,
4672,
309,
661,
292,
2547,
30,
4555,
273,
365,
18,
1615,
4181,
18,
1615,
12,
9693,
13,
3458,
3292,
1911,
354... |
return os.fstat(data_or_fp.fileno().st_size) | return os.fstat(data_or_fp.fileno()).st_size | def get_content_length(data_or_fp): """Try to get the content length from the given string or file pointer. If the length can't be determined the return value is None. """ try: return len(data_or_fp) except TypeError: try: return os.fstat(data_or_fp.fileno().st_size) except (AttributeError, OSError): pass | 64470e84d6f35ec9657376cdbefb365667bd2034 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12815/64470e84d6f35ec9657376cdbefb365667bd2034/net.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1745,
67,
2469,
12,
892,
67,
280,
67,
7944,
4672,
3536,
7833,
358,
336,
326,
913,
769,
628,
326,
864,
533,
578,
585,
4407,
18,
225,
971,
326,
769,
848,
1404,
506,
11383,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1745,
67,
2469,
12,
892,
67,
280,
67,
7944,
4672,
3536,
7833,
358,
336,
326,
913,
769,
628,
326,
864,
533,
578,
585,
4407,
18,
225,
971,
326,
769,
848,
1404,
506,
11383,
326... |
except: | except ValueError: | def do_clear(self, arg): """Three possibilities, tried in this order: clear -> clear all breaks, ask for confirmation clear file:lineno -> clear all breaks at file:lineno clear bpno bpno ... -> clear breakpoints by number""" if not arg: try: reply = raw_input('Clear all breaks? ') except EOFError: reply = 'no' reply = reply.strip().lower() if reply in ('y', 'yes'): self.clear_all_breaks() return if ':' in arg: # Make sure it works for "clear C:\foo\bar.py:12" i = arg.rfind(':') filename = arg[:i] arg = arg[i+1:] try: lineno = int(arg) except: err = "Invalid line number (%s)" % arg else: err = self.clear_break(filename, lineno) if err: print '***', err return numberlist = arg.split() for i in numberlist: if not (0 <= i < len(bdb.Breakpoint.bpbynumber)): print 'No breakpoint numbered', i continue err = self.clear_bpbynumber(i) if err: print '***', err else: print 'Deleted breakpoint', i | d7c47443e344fd8563ed4632ded41d604c43f436 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d7c47443e344fd8563ed4632ded41d604c43f436/pdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
8507,
12,
2890,
16,
1501,
4672,
3536,
28019,
28550,
16,
12928,
316,
333,
1353,
30,
2424,
317,
2424,
777,
16217,
16,
6827,
364,
14296,
2424,
585,
30,
17782,
317,
2424,
777,
16217... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
8507,
12,
2890,
16,
1501,
4672,
3536,
28019,
28550,
16,
12928,
316,
333,
1353,
30,
2424,
317,
2424,
777,
16217,
16,
6827,
364,
14296,
2424,
585,
30,
17782,
317,
2424,
777,
16217... |
self.fill_table( page, ['end_time', trig.end_time] ) self.fill_table( page, ['end_time_ns', trig.end_time_ns] ) | self.fill_table( page, ['end_time', '%010d' % trig.end_time] ) self.fill_table( page, ['end_time_ns', '%09d' % trig.end_time_ns] ) | def create_table_coinc(self, coinc): """ Creates the first table containing basic properties of the coincidence which is followed up. @param coinc: an CoincInspiral table """ ## create the web-page and add a table page = markup.page() page.h1("Followup trigger #"+str(self.number)) page.add('<table border="2">') | e96cbd4b80d557738ffe6f479cb8d2c70c7aed4e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/e96cbd4b80d557738ffe6f479cb8d2c70c7aed4e/followup_trigger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
2121,
67,
12645,
71,
12,
2890,
16,
13170,
71,
4672,
3536,
10210,
326,
1122,
1014,
4191,
5337,
1790,
434,
326,
13170,
71,
10328,
1492,
353,
10860,
731,
18,
632,
891,
13170,
71,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
2121,
67,
12645,
71,
12,
2890,
16,
13170,
71,
4672,
3536,
10210,
326,
1122,
1014,
4191,
5337,
1790,
434,
326,
13170,
71,
10328,
1492,
353,
10860,
731,
18,
632,
891,
13170,
71,
... |
will be opened. Default value: 'base.google.com'. | will be opened. Default value: 'base.google.com'. | def __init__(self, email=None, password=None, account_type='HOSTED_OR_GOOGLE', service=None, source=None, server=None, additional_headers=None): """Creates an object of type GDataService. | 2fc3c8b5e04f49e7854d86afdf5c528572665ee2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6580/2fc3c8b5e04f49e7854d86afdf5c528572665ee2/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2699,
33,
7036,
16,
2201,
33,
7036,
16,
2236,
67,
723,
2218,
8908,
2056,
67,
916,
67,
16387,
13369,
900,
2187,
1156,
33,
7036,
16,
1084,
33,
7036,
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,
1001,
2738,
972,
12,
2890,
16,
2699,
33,
7036,
16,
2201,
33,
7036,
16,
2236,
67,
723,
2218,
8908,
2056,
67,
916,
67,
16387,
13369,
900,
2187,
1156,
33,
7036,
16,
1084,
33,
7036,
16,
... |
ds = (bins[1] - bins[0]) / 2 | def histstat(trigs=None, slide_trigs=None,ifolist = None, min_val = None, \ max_val = None, nbins = 20, stat=None): """ function to plot a histogram of the snr of coincident events in the zero lag and times slides @param trigs: coincInspiralTable @param slide_trigs: dictionary of time slide triggers @param ifolist: list of ifos @param min_val: minimum of snr to be plotted @param max_val: maximum of snr to be plotted @param nbins: number of bins to use in histogram @param stat: the statistic being used """ internal_min = numpy.inf internal_max = -numpy.inf # filter down to ifolist slide_trig_list = [s["coinc_trigs"] for s in slide_trigs] if ifolist: if trigs: trigs = trigs.coinctype(ifolist) slide_trig_list = [s.coinctype(ifolist) for s in slide_trig_list] # read in zero lag triggers if trigs: snr = trigs.getstat() if len(snr) > 0: internal_max = max(internal_max, snr.max()) internal_min = min(internal_min, snr.min()) # read in slide triggers if slide_trig_list: slide_snr_list = [] for this_slide in slide_trig_list: slide_snr = this_slide.getstat() slide_snr_list.append(slide_snr) if len(slide_snr) > 0: internal_max = max(internal_max, slide_snr.max()) internal_min = min(internal_min, slide_snr.min()) # set up the bin boundaries if not max_val: max_val = internal_max if not min_val: min_val = internal_min if min_val >= max_val: # CHECKME: what should we do without any trigs or slide_trigs? # This is the old behavior. min_val = 5. max_val = 10. if min_val == max_val: # NB: this is numpy.histogram's default behavior for equal max and min min_val -= 0.5 max_val += 0.5 bins = numpy.linspace(min_val, max_val, nbins) # hist of the zero lag: if trigs: [zero_dist,bin,info] = hist(snr,bins) hist_zero = zero_dist # hist of the slides: if slide_trigs: slide_dist = [] hist_slide = [] for slide_snr in slide_snr_list: num_slide, bin = numpy.histogram(slide_snr, bins) hist_slide.append(num_slide) hist_slide = numpy.array(hist_slide) slide_mean = hist_slide.mean(axis=0) slide_std = hist_slide.std(axis=0) if "bitten_l" in stat: xvals=bins else: xvals=bins*bins; clf() hold(True) # plot zero lag if trigs and len(trigs): semilogy(xvals,hist_zero+0.0001,'r^',markerfacecolor="b",\ markersize=12) # plot time slides ds = (bins[1] - bins[0]) / 2 if slide_trigs and len(slide_snr_list): slide_min = [] for i in range( len(slide_mean) ): slide_min.append( max(slide_mean[i] - slide_std[i], 0.0001) ) slide_mean[i] = max(slide_mean[i], 0.0001) semilogy(xvals,asarray(slide_mean), 'r+', markersize=12) tmpx,tmpy = makesteps(bins,slide_min,slide_mean+slide_std) if "bitten_l" in stat: p=fill((tmpx-ds),tmpy, facecolor='y') else: p=fill((tmpx-ds)*(tmpx-ds),tmpy, facecolor='y') setp(p, alpha=0.3) if stat == 'coherent_snr': xlab = 'Coherent SNR$^{2}$' else: xlab = 'Combined Statistic' xlabel(xlab, size='x-large') ylabel('Number of events', size='x-large') title_text = 'Histogram of Number of events vs ' + xlab if ifolist: title_text += ' for ' for ifo in ifolist: title_text += ifo + ' ' title(title_text, size='x-large') | 180216efacc108b9ada27d4ae97c2a8bbd793dee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3592/180216efacc108b9ada27d4ae97c2a8bbd793dee/viz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5356,
5642,
12,
313,
360,
87,
33,
7036,
16,
12701,
67,
313,
360,
87,
33,
7036,
16,
430,
355,
376,
273,
599,
16,
1131,
67,
1125,
273,
599,
16,
521,
943,
67,
1125,
273,
599,
16,
4264... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5356,
5642,
12,
313,
360,
87,
33,
7036,
16,
12701,
67,
313,
360,
87,
33,
7036,
16,
430,
355,
376,
273,
599,
16,
1131,
67,
1125,
273,
599,
16,
521,
943,
67,
1125,
273,
599,
16,
4264... | |
return | return task.cont | def listenerPoll(self, task): if self.qcl.newConnectionAvailable(): rendezvous = PointerToConnection() netAddress = NetAddress() newConnection = PointerToConnection() retVal = self.qcl.getNewConnection(rendezvous, netAddress, newConnection) if not retVal: return | 29c61ac510d52f30c669e6b7375c216a5aa36162 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/29c61ac510d52f30c669e6b7375c216a5aa36162/ServerRepository.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2991,
19085,
12,
2890,
16,
1562,
4672,
309,
365,
18,
85,
830,
18,
2704,
1952,
5268,
13332,
1654,
323,
94,
90,
1481,
273,
7107,
774,
1952,
1435,
2901,
1887,
273,
8503,
1887,
1435,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2991,
19085,
12,
2890,
16,
1562,
4672,
309,
365,
18,
85,
830,
18,
2704,
1952,
5268,
13332,
1654,
323,
94,
90,
1481,
273,
7107,
774,
1952,
1435,
2901,
1887,
273,
8503,
1887,
1435,
394,
... |
def GetPrevHashKey(id, idx): | def GetPrevHashKey(hashid, idx): | def GetPrevHashKey(id, idx): raise DeprecatedIDCError, "Use python pickles instead." | 4f22943d42ee1d5013421d280b3bd776bee83fb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3410/4f22943d42ee1d5013421d280b3bd776bee83fb9/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
9958,
31006,
12,
2816,
350,
16,
2067,
4672,
1002,
9336,
734,
39,
668,
16,
315,
3727,
5790,
6002,
1040,
3560,
1199,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
9958,
31006,
12,
2816,
350,
16,
2067,
4672,
1002,
9336,
734,
39,
668,
16,
315,
3727,
5790,
6002,
1040,
3560,
1199,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
items = l.items | def ll_delitem_nonneg(func, l, index): length = l.length if func is dum_checkidx and (index >= length): raise IndexError newlength = length - 1 j = index items = l.items j1 = j+1 while j < newlength: items[j] = items[j1] j = j1 j1 += 1 ITEM = typeOf(l).TO.ITEM if isinstance(ITEM, Ptr): items[newlength] = nullptr(ITEM.TO) _ll_list_resize_le(l, newlength) | afabe8603c579750f81fa9c16896184dfa4a53b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/afabe8603c579750f81fa9c16896184dfa4a53b8/rlist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6579,
67,
3771,
1726,
67,
5836,
14518,
12,
644,
16,
328,
16,
770,
4672,
769,
273,
328,
18,
2469,
309,
1326,
353,
4569,
67,
1893,
3465,
471,
261,
1615,
1545,
769,
4672,
1002,
10195,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6579,
67,
3771,
1726,
67,
5836,
14518,
12,
644,
16,
328,
16,
770,
4672,
769,
273,
328,
18,
2469,
309,
1326,
353,
4569,
67,
1893,
3465,
471,
261,
1615,
1545,
769,
4672,
1002,
10195,
394... | |
def unlink(self, cursor, user, ids, context=None): self.clear() return super(ir_translation, self).unlink(cusor, user, ids, context=context) | def unlink(self, cursor, user, ids, context=None): self.clear() return super(ir_translation, self).unlink(cusor, user, ids, context=context) | def unlink(self, cursor, user, ids, context=None): self.clear() return super(ir_translation, self).unlink(cusor, user, ids, context=context) | c843f4b9fdfbcf04de0106edf9d98e4fecde68c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/c843f4b9fdfbcf04de0106edf9d98e4fecde68c1/ir_translation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8255,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
819,
33,
7036,
4672,
365,
18,
8507,
1435,
327,
2240,
12,
481,
67,
10173,
16,
365,
2934,
318,
1232,
12,
71,
407,
280,
16,
729,
16,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8255,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
819,
33,
7036,
4672,
365,
18,
8507,
1435,
327,
2240,
12,
481,
67,
10173,
16,
365,
2934,
318,
1232,
12,
71,
407,
280,
16,
729,
16,
3... |
See this URL for a description of the basic authentication scheme: http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-v10-spec-00.txt""" | This function supports Basic authentication only.""" | def http_error_401(self, url, fp, errcode, errmsg, headers, data=None): """Error 401 -- authentication required. See this URL for a description of the basic authentication scheme: http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-v10-spec-00.txt""" if not 'www-authenticate' in headers: URLopener.http_error_default(self, url, fp, errcode, errmsg, headers) stuff = headers['www-authenticate'] import re match = re.match('[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"', stuff) if not match: URLopener.http_error_default(self, url, fp, errcode, errmsg, headers) scheme, realm = match.groups() if scheme.lower() != 'basic': URLopener.http_error_default(self, url, fp, errcode, errmsg, headers) name = 'retry_' + self.type + '_basic_auth' if data is None: return getattr(self,name)(url, realm) else: return getattr(self,name)(url, realm, data) | 1a1f364a04fe29234d39589bc5414308efc90fd4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1a1f364a04fe29234d39589bc5414308efc90fd4/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1062,
67,
1636,
67,
27002,
12,
2890,
16,
880,
16,
4253,
16,
393,
710,
16,
17460,
16,
1607,
16,
501,
33,
7036,
4672,
3536,
668,
14052,
1493,
5107,
1931,
18,
1220,
445,
6146,
7651,
5107,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1062,
67,
1636,
67,
27002,
12,
2890,
16,
880,
16,
4253,
16,
393,
710,
16,
17460,
16,
1607,
16,
501,
33,
7036,
4672,
3536,
668,
14052,
1493,
5107,
1931,
18,
1220,
445,
6146,
7651,
5107,... |
nextTimeService = nextTimeViewer + self.watchDogTime / 2 | def run(self) : if self.watchDogTime == 0 : return False plugin = self.plugin CoInitialize() | 531fa2a5a972f08eda5305028606976138012f04 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/531fa2a5a972f08eda5305028606976138012f04/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
13,
294,
309,
365,
18,
7585,
40,
717,
950,
422,
374,
294,
327,
1083,
1909,
273,
365,
18,
4094,
7695,
7520,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
13,
294,
309,
365,
18,
7585,
40,
717,
950,
422,
374,
294,
327,
1083,
1909,
273,
365,
18,
4094,
7695,
7520,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
INFOLINES=[] def infoline(t): print t INFOLINES.append(t) | def pfxJoin(pfx,*N): R=[] for n in N: R.append(os.path.join(pfx,n)) return R | dcb4863a83dff1a07b67404dd90989089cdc1127 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3878/dcb4863a83dff1a07b67404dd90989089cdc1127/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31592,
4572,
12,
14241,
92,
16,
14,
50,
4672,
534,
33,
8526,
364,
290,
316,
423,
30,
534,
18,
6923,
12,
538,
18,
803,
18,
5701,
12,
14241,
92,
16,
82,
3719,
327,
534,
225,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31592,
4572,
12,
14241,
92,
16,
14,
50,
4672,
534,
33,
8526,
364,
290,
316,
423,
30,
534,
18,
6923,
12,
538,
18,
803,
18,
5701,
12,
14241,
92,
16,
82,
3719,
327,
534,
225,
2,
-100,... | |
this_dir = os.path.dirname(__file__) | this_dir = os.path.dirname(this_file) | def setUp(self): self.bmp_handle = None try: this_file = __file__ except NameError: this_file = sys.argv[0] this_dir = os.path.dirname(__file__) self.bmp_name = os.path.join(os.path.abspath(this_dir), "..", "Demos", "images", "smiley.bmp") self.failUnless(os.path.isfile(self.bmp_name), self.bmp_name) flags = win32con.LR_DEFAULTSIZE | win32con.LR_LOADFROMFILE self.bmp_handle = win32gui.LoadImage(0, self.bmp_name, win32con.IMAGE_BITMAP, 0, 0, flags) self.failUnless(self.bmp_handle, "Failed to get a bitmap handle") | 27a3cf2eb70aab8991463895fae0d61b1850b873 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/677/27a3cf2eb70aab8991463895fae0d61b1850b873/test_clipboard.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
70,
1291,
67,
4110,
273,
599,
775,
30,
333,
67,
768,
273,
1001,
768,
972,
1335,
25473,
30,
333,
67,
768,
273,
2589,
18,
19485,
63,
20,
65,
333,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
70,
1291,
67,
4110,
273,
599,
775,
30,
333,
67,
768,
273,
1001,
768,
972,
1335,
25473,
30,
333,
67,
768,
273,
2589,
18,
19485,
63,
20,
65,
333,
67,
... |
""" | r""" | def encoding(self,S): """ The encoding of the string S in the alphabetic string monoid, obtained by the monoid homomorphism | ca219b0206186a194cdf8e11d2082bec654536f8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/ca219b0206186a194cdf8e11d2082bec654536f8/string_monoid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2688,
12,
2890,
16,
55,
4672,
436,
8395,
1021,
2688,
434,
326,
533,
348,
316,
326,
524,
8133,
7943,
533,
6921,
839,
16,
12700,
635,
326,
6921,
839,
13995,
362,
7657,
6228,
2,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2688,
12,
2890,
16,
55,
4672,
436,
8395,
1021,
2688,
434,
326,
533,
348,
316,
326,
524,
8133,
7943,
533,
6921,
839,
16,
12700,
635,
326,
6921,
839,
13995,
362,
7657,
6228,
2,
-100,
-10... |
''' % (_('Responsibles'), _('(ordered by login)'), _('Full Name'), _('Identifier'), _('UID'), "\n".join(map(user_line, resps))) | ''' % ( _('Responsibles'), _('(ordered by login)'), _('Full Name'), _('Identifier'), _('UID'), "\n".join(map(user_line, resps)) ) | def user_line(login): uid = users.login_to_uid(login) return '''<tr><td>%s</td><td>%s</td><td>%s</td></tr>''' % ( u[uid]['gecos'], login, uid) | eb92fc56664814fed9f428d02ee7bb3f8903a836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/eb92fc56664814fed9f428d02ee7bb3f8903a836/groups.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
729,
67,
1369,
12,
5819,
4672,
4555,
273,
3677,
18,
5819,
67,
869,
67,
1911,
12,
5819,
13,
327,
9163,
32,
313,
4438,
4465,
9822,
87,
1757,
4465,
4438,
4465,
9822,
87,
1757,
4465,
4438,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
729,
67,
1369,
12,
5819,
4672,
4555,
273,
3677,
18,
5819,
67,
869,
67,
1911,
12,
5819,
13,
327,
9163,
32,
313,
4438,
4465,
9822,
87,
1757,
4465,
4438,
4465,
9822,
87,
1757,
4465,
4438,... |
return property(get) | def set(self, value): self._highlight_color = parse_color(value) self._notify_change() return property(get, set) | def get(self): return self._highlight_color | 81de20deaac2b084507ef02f4d0c7d8cef8d3dcf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3683/81de20deaac2b084507ef02f4d0c7d8cef8d3dcf/annotations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
4672,
327,
365,
6315,
15978,
67,
3266,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
4672,
327,
365,
6315,
15978,
67,
3266,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if md.current is None: md.current = self.__activities.pop(0) | if self.__current is None: self.__current = self.__activities.pop(0) | def notify_me(): self.__cv.acquire() self.__cv.notify() self.__cv.release() | c7947691a7d1e74878c1ce8b43802ac05047e694 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2459/c7947691a7d1e74878c1ce8b43802ac05047e694/activity.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5066,
67,
3501,
13332,
365,
16186,
19774,
18,
1077,
1039,
1435,
365,
16186,
19774,
18,
12336,
1435,
365,
16186,
19774,
18,
9340,
1435,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
5066,
67,
3501,
13332,
365,
16186,
19774,
18,
1077,
1039,
1435,
365,
16186,
19774,
18,
12336,
1435,
365,
16186,
19774,
18,
9340,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if type( source ) is str and os.path.isfile( source ): | if type( source ) is str and len(source) != 4 or \ os.path.isfile( source ): | def __init__( self, source=None, pdbCode=None, noxyz=0, skipRes=None, headPatterns=[] ): """ Examples: - PDBModel() creates an empty Model to which coordinates (field xyz) and PDB records (atom profiles) have still to be added. - PDBModel( file_name ) creates a complete model with coordinates and PDB records from file_name (pdb, pdb.gz, or pickled PDBModel) - PDBModel( PDBModel ) creates a copy of the given model - PDBModel( PDBModel, noxyz=1 ) creates a copy without coordinates | 37a2e909091f68966e66444f49a95886e7eb2f95 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/482/37a2e909091f68966e66444f49a95886e7eb2f95/PDBModel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
1084,
33,
7036,
16,
10892,
1085,
33,
7036,
16,
1158,
17177,
33,
20,
16,
2488,
607,
33,
7036,
16,
910,
11268,
33,
8526,
262,
30,
3536,
19830,
30,
300,
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,
1001,
2738,
972,
12,
365,
16,
1084,
33,
7036,
16,
10892,
1085,
33,
7036,
16,
1158,
17177,
33,
20,
16,
2488,
607,
33,
7036,
16,
910,
11268,
33,
8526,
262,
30,
3536,
19830,
30,
300,
21... |
interfaces.append(dispItem, flags, dual) | interfaces.append((dispItem, flags, dual)) | def BuildOleItemsFromType(self, look_name = None): oleItems = {} enumItems = {} aliasItems = {} for i in xrange(self.typelib.GetTypeInfoCount()): info = self.typelib.GetTypeInfo(i) infotype = self.typelib.GetTypeInfoType(i) doc = self.typelib.GetDocumentation(i) attr = info.GetTypeAttr() itemClass = None if infotype == pythoncom.TKIND_ENUM or infotype == pythoncom.TKIND_MODULE: if look_name is not None: continue newItem = EnumerationItem(info, attr, doc) enumItems[newItem.doc[0]] = newItem elif infotype in [pythoncom.TKIND_DISPATCH, pythoncom.TKIND_INTERFACE]: if infotype==pythoncom.TKIND_INTERFACE: # For now we believe this flag. It appears we could also # look down the cImplTypes for IDispatch, but this is simpler. if not attr[11] & pythoncom.TYPEFLAG_FDISPATCHABLE: ### we can't build these self.progress.VerboseProgress("Skipped interface: %s" % doc[0]) continue else: self.progress.VerboseProgress("Dispatchable interface: %s" % doc[0]) else: # A TKIND_DISPATCH if attr[11] & pythoncom.TYPEFLAG_FDUAL: self.progress.VerboseProgress("Dual interface: %s" % doc[0]) else: self.progress.VerboseProgress("Dispatch interface: %s" % doc[0]) # Get to work. if look_name is not None and doc[0]!=look_name: continue if oleItems.has_key(attr[0]): continue # already built by CoClass processing. newItem = DispatchItem(info, attr, doc) oleItems[newItem.clsid] = newItem elif infotype == pythoncom.TKIND_RECORD or infotype == pythoncom.TKIND_UNION: if look_name is not None: continue newItem = RecordItem(info, attr, doc) ### where to put the newItem ?? elif infotype == pythoncom.TKIND_ALIAS: if look_name is not None: continue newItem = AliasItem(info, attr, doc) aliasItems[newItem.doc[0]] = newItem elif infotype == pythoncom.TKIND_COCLASS: # try to find the source and dispinterfaces for the coclass # We no longer generate specific OCX support for the CoClass, as there # may be multiple Dispatch and multiple source interfaces. We cant # predict much in this scenario, so we move the responsibility to # the Python programmer. # (It also keeps win32ui(ole) out of the core generated import dependencies. if look_name is not None and look_name != doc[0]: continue sources = [] interfaces = [] for j in range(attr[8]): flags = info.GetImplTypeFlags(j) refType = info.GetRefTypeInfo(info.GetRefTypeOfImplType(j)) refAttr = refType.GetTypeAttr() dual = refAttr[11] & pythoncom.TYPEFLAG_FDUAL # Ensure the references interfaces have been generated. if oleItems.has_key(refAttr[0]): dispItem = oleItems[refAttr[0]] else: dispItem = DispatchItem(refType, refAttr, refType.GetDocumentation(-1)) oleItems[dispItem.clsid] = dispItem if flags & pythoncom.IMPLTYPEFLAG_FSOURCE: dispItem.bIsSink = 1 sources.append(dispItem, flags, dual) else: interfaces.append(dispItem, flags, dual) | 7f6eba6b3b1a8b7fcf22b723dcb461477f722e08 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/7f6eba6b3b1a8b7fcf22b723dcb461477f722e08/genpy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3998,
51,
298,
3126,
1265,
559,
12,
2890,
16,
2324,
67,
529,
273,
599,
4672,
320,
298,
3126,
273,
2618,
2792,
3126,
273,
2618,
2308,
3126,
273,
2618,
364,
277,
316,
12314,
12,
2890,
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,
3998,
51,
298,
3126,
1265,
559,
12,
2890,
16,
2324,
67,
529,
273,
599,
4672,
320,
298,
3126,
273,
2618,
2792,
3126,
273,
2618,
2308,
3126,
273,
2618,
364,
277,
316,
12314,
12,
2890,
18... |
return "-"[:n<0] + \ str(i)[:-1] + \ "." + frac | str_i = str(i) if str_i =="L": str_i =str_i[:-1] return "-"[:n<0] + str_i + "." + frac | def __str__(self): n, p = self.n, self.p i, f = divmod(abs(n), _tento(p)) if p: frac = str(f)[:-1] frac = "0" * (p - len(frac)) + frac else: frac = "" return "-"[:n<0] + \ str(i)[:-1] + \ "." + frac | 9bc2adbfe062085dff3ae99e12e6c47ca2a53580 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8821/9bc2adbfe062085dff3ae99e12e6c47ca2a53580/FixedPoint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
290,
16,
293,
273,
365,
18,
82,
16,
365,
18,
84,
277,
16,
284,
273,
26105,
12,
5113,
12,
82,
3631,
389,
88,
29565,
12,
84,
3719,
309,
293,
30,
12445... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
290,
16,
293,
273,
365,
18,
82,
16,
365,
18,
84,
277,
16,
284,
273,
26105,
12,
5113,
12,
82,
3631,
389,
88,
29565,
12,
84,
3719,
309,
293,
30,
12445... |
self.sizer.Add(self.scriptlist) | self.sizer.Add(self.scriptlist, 0, wx.EXPAND) | def __init__(self, parent, title, label): parent.TitledPage.__init__(self, parent, title, label) # Check that at least one dataset is selected before proceeding self.Bind(wx.wizard.EVT_WIZARD_PAGE_CHANGING, self.CheckValues) # All checkbox self.checkallbox = wx.CheckBox(self, -1, "All") self.checkallbox.SetValue(True) self.sizer.Add(self.checkallbox) self.checkallbox.Bind(wx.EVT_CHECKBOX, self.CheckAll) # CheckListBox of scripts self.scriptlist = wx.CheckListBox(self, -1) self.sizer.Add(self.scriptlist) # Add dataset button self.addbtn = wx.Button(self, -1, "Add...") self.sizer.Add(self.addbtn) self.addbtn.Bind(wx.EVT_BUTTON, self.AddDataset) | 2d8061a918c1592680368999fb9a00ba730cff07 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12606/2d8061a918c1592680368999fb9a00ba730cff07/ui_pages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
2077,
16,
1433,
4672,
982,
18,
56,
305,
1259,
1964,
16186,
2738,
972,
12,
2890,
16,
982,
16,
2077,
16,
1433,
13,
468,
2073,
716,
622,
4520,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
2077,
16,
1433,
4672,
982,
18,
56,
305,
1259,
1964,
16186,
2738,
972,
12,
2890,
16,
982,
16,
2077,
16,
1433,
13,
468,
2073,
716,
622,
4520,
12... |
extension_attributes=extension_attributes, | extension_attributes=extension_attributes, | def __init__(self, extension_elements=None, extension_attributes=None, text=None): UriEnumElement.__init__(self, 'attendeeStatus', AttendeeStatus.attendee_enum, extension_elements=extension_elements, extension_attributes=extension_attributes, text=text) | 220fb3846b34b52b462236a865acc3580b5bf99c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5609/220fb3846b34b52b462236a865acc3580b5bf99c/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2710,
67,
6274,
33,
7036,
16,
2710,
67,
4350,
33,
7036,
16,
977,
33,
7036,
4672,
10693,
3572,
1046,
16186,
2738,
972,
12,
2890,
16,
296,
10164,
20953,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2710,
67,
6274,
33,
7036,
16,
2710,
67,
4350,
33,
7036,
16,
977,
33,
7036,
4672,
10693,
3572,
1046,
16186,
2738,
972,
12,
2890,
16,
296,
10164,
20953,
14... |
elapsed = (i.series[-1].end - i.series[0].start).seconds print "Image I/O start: %s end: %s elapsed: %ssec" % \ (i.series[0].start, i.series[-1].end, elapsed) elapsed = (i.thumbnailing_start - i.overlays_start).seconds print "Overlays start: %s end: %s elapsed: %ssec" % \ (i.overlays_start, i.thumbnailing_start, elapsed) elapsed = (i.end - i.thumbnailing_start).seconds print "Thumbnailing start: %s end: %s elapsed: %ssec" % \ (i.thumbnailing_start, i.end, elapsed) | if len(i.series) > 0: elapsed = self.elapsed(i.series[0].start, i.series[-1].end) print "Image I/O start: %s end: %s elapsed: %s" % \ (i.series[0].start, i.series[-1].end, elapsed) elapsed = self.elapsed(i.overlays_start, i.thumbnailing_start) print "Overlays start: %s end: %s elapsed: %s" % \ (i.overlays_start, i.thumbnailing_start, elapsed) elapsed = self.elapsed(i.thumbnailing_start, i.end) print "Thumbnailing start: %s end: %s elapsed: %s" % \ (i.thumbnailing_start, i.end, elapsed) | def report(self): """ Prints a simple report to STDOUT stating timings for the overall import and Bio-Formats setId(). """ for import_n, i in enumerate(self.imports): elapsed = (i.end - i.start).seconds print "Import(%s) %d start: %s end: %s elapsed: %ssec" % \ (i.name, import_n, i.start, i.end, elapsed) elapsed = (i.setid_end - i.setid_start).seconds print "setId() start: %s end: %s elapsed: %ssec" % \ (i.setid_start, i.setid_end, elapsed) elapsed = (i.post_process_end - i.post_process_start).seconds print "Post process start: %s end: %s elapsed: %ssec" % \ (i.post_process_start, i.post_process_end, elapsed) elapsed = (i.save_to_db_end - i.save_to_db_start).seconds print "Save to DB start: %s end: %s elapsed: %ssec" % \ (i.save_to_db_start, i.save_to_db_end, elapsed) elapsed = (i.series[-1].end - i.series[0].start).seconds print "Image I/O start: %s end: %s elapsed: %ssec" % \ (i.series[0].start, i.series[-1].end, elapsed) elapsed = (i.thumbnailing_start - i.overlays_start).seconds print "Overlays start: %s end: %s elapsed: %ssec" % \ (i.overlays_start, i.thumbnailing_start, elapsed) elapsed = (i.end - i.thumbnailing_start).seconds print "Thumbnailing start: %s end: %s elapsed: %ssec" % \ (i.thumbnailing_start, i.end, elapsed) | 10aead5f88b89c4a8551d769f251d3017b1eaa34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/10aead5f88b89c4a8551d769f251d3017b1eaa34/importperf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
12,
2890,
4672,
3536,
3038,
87,
279,
4143,
2605,
358,
19331,
610,
310,
1658,
899,
364,
326,
13914,
1930,
471,
21209,
17,
8976,
10446,
7675,
3536,
364,
1930,
67,
82,
16,
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,
2605,
12,
2890,
4672,
3536,
3038,
87,
279,
4143,
2605,
358,
19331,
610,
310,
1658,
899,
364,
326,
13914,
1930,
471,
21209,
17,
8976,
10446,
7675,
3536,
364,
1930,
67,
82,
16,
277,
316,
... |
VS.playSound(self.speech[index], self.player.Position(), (10000,10000,10000)) | VS.playSound(self.speech[index], self.player.Position(), (0,0,0)) | def tutorialComm (self): if (self.practice==0): VS.IOmessage (0,"Oswald","Privateer",self.msgColor+"Glad I can be of help.") VS.IOmessage (5,"Oswald","Privateer",self.msgColor+"In the first place let's have a look at your heads up display (HUD).") VS.IOmessage (10,"Oswald","Privateer",self.msgColor+"Please do not move your ship in order to better focus on my instructions.") VS.IOmessage (15,"Oswald","Privateer",self.msgColor+"In the upper left corner you can see the communication messages.") VS.IOmessage (20,"Oswald","Privateer",self.msgColor+"Each communication message shows the sender, the game time of the sending, and the message itself, like this one.") VS.IOmessage (25,"Oswald","Privateer",self.msgColor+"To scroll the messages back and forth use the #9999FFPage Up"+self.msgColor+" and #9999FFPage Down"+self.msgColor+" keys. Try it out now.") VS.IOmessage (35,"Oswald","Privateer",self.msgColor+"Good.") VS.IOmessage (37,"Oswald","Privateer",self.msgColor+"Now you can send me a message by pressing the #9999FFF1"+self.msgColor+" key.") # set comm animation parameters self.sequence = [[0,1,0],[5,4,0],[10,4,0],[15,4,0],[20,4,0],[25,5,0],[35,1,0],[37,4,0]] # set speech files self.speech = ["com_tutorial_oswald/oswald_comm_01.ogg", "com_tutorial_oswald/oswald_comm_02.ogg", "com_tutorial_oswald/oswald_comm_03.ogg", "com_tutorial_oswald/oswald_comm_04.ogg", "com_tutorial_oswald/oswald_comm_05.ogg", "com_tutorial_oswald/oswald_comm_06.ogg", "com_tutorial_oswald/oswald_comm_07.ogg", "com_tutorial_oswald/oswald_comm_08.ogg"] self.talktime = VS.GetGameTime() self.timer = VS.GetGameTime()+45 self.practice = 1 if (self.practice==1 and VS.GetGameTime()<self.timer and VS.GetGameTime()>=self.anitime): for index in range (len(self.sequence)): if (VS.GetGameTime()-self.talktime>=self.sequence[index][0] and VS.GetGameTime()-self.talktime<=self.sequence[index][0]+self.sequence[index][1]): self.player.commAnimation(self.animations[self.sequence[index][2]][0]) # play each soundfile once if (VS.GetGameTime()-self.talktime<=self.sequence[index][0]+1): VS.playSound(self.speech[index], self.player.Position(), (10000,10000,10000)) self.anitime = VS.GetGameTime()+2 if (self.practice==1 and VS.GetGameTime()>=self.timer): self.practice = 2 if (self.practice==2 and VS.GetGameTime()>self.timer): VS.IOmessage (0,"Oswald","Privateer",self.msgColor+"Usually, messages assigned to keys #9999FFF1"+self.msgColor+" and #9999FFF2"+self.msgColor+" are friendly messages which slightly increase you relation with a faction, while the other keys #9999FFF3"+self.msgColor+" and #9999FFF4"+self.msgColor+" decrease your relationship.") VS.IOmessage (14,"Oswald","Privateer",self.msgColor+"Sometimes it can be very useful to send multiple friendly messages to improve your relation with a hostile faction or taunt an enemy into attacking you instead of a ship you are protecting.") VS.IOmessage (26,"Oswald","Privateer",self.msgColor+"That's about it on the messages display.") # set comm animation parameters self.sequence = [[0,12,0],[14,12,0],[26,2,0]] # set speech files self.speech = ["com_tutorial_oswald/oswald_comm_09.ogg", "com_tutorial_oswald/oswald_comm_10.ogg", "com_tutorial_oswald/oswald_comm_11.ogg"] self.talktime = VS.GetGameTime() self.timer = VS.GetGameTime()+30 self.practice = 3 if (self.practice==3 and VS.GetGameTime()<self.timer and VS.GetGameTime()>=self.anitime): for index in range (len(self.sequence)): if (VS.GetGameTime()-self.talktime>=self.sequence[index][0] and VS.GetGameTime()-self.talktime<=self.sequence[index][0]+self.sequence[index][1]): self.player.commAnimation(self.animations[self.sequence[index][2]][0]) # play each soundfile once if (VS.GetGameTime()-self.talktime<=self.sequence[index][0]+1): VS.playSound(self.speech[index], self.player.Position(), (10000,10000,10000)) self.anitime = VS.GetGameTime()+2 if (self.practice==3 and VS.GetGameTime()>=self.timer): self.practice = 4 if (self.practice==4 and VS.GetGameTime()>self.timer): # make sure to reset the counter for the next practice loops self.practice = 0 self.timer = VS.GetGameTime()+0 self.stage = COMPLETE_TUTORIAL1 self.putSaveValue(self.stage) return 0 | 66c46e79ea501cbc68b49d8dd0a03a57988f1683 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2883/66c46e79ea501cbc68b49d8dd0a03a57988f1683/quest_tutorial.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
22378,
12136,
261,
2890,
4672,
309,
261,
2890,
18,
84,
14266,
1812,
631,
20,
4672,
776,
55,
18,
4294,
2150,
261,
20,
10837,
51,
5328,
287,
72,
15937,
6014,
264,
3113,
2890,
18,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
22378,
12136,
261,
2890,
4672,
309,
261,
2890,
18,
84,
14266,
1812,
631,
20,
4672,
776,
55,
18,
4294,
2150,
261,
20,
10837,
51,
5328,
287,
72,
15937,
6014,
264,
3113,
2890,
18,
35... |
startup = map[string.lower(val)] | startup = map[val.lower()] | def HandleCommandLine(cls, serviceClassString = None, argv = None, customInstallOptions = "", customOptionHandler = None): """Utility function allowing services to process the command line. Allows standard commands such as 'start', 'stop', 'debug', 'install' etc. Install supports 'standard' command line options prefixed with '--', such as --username, --password, etc. In addition, the function allows custom command line options to be handled by the calling function. """ err = 0 if argv is None: argv = sys.argv if len(argv)<=1: usage() serviceName = cls._svc_name_ serviceDisplayName = cls._svc_display_name_ if serviceClassString is None: serviceClassString = GetServiceClassString(cls) # Pull apart the command line import getopt try: opts, args = getopt.getopt(argv[1:], customInstallOptions,["password=","username=","startup=","perfmonini=", "perfmondll=", "interactive", "wait="]) except getopt.error, details: print details usage() userName = None password = None perfMonIni = perfMonDll = None startup = None interactive = None waitSecs = 0 for opt, val in opts: if opt=='--username': userName = val elif opt=='--password': password = val elif opt=='--perfmonini': perfMonIni = val elif opt=='--perfmondll': perfMonDll = val elif opt=='--interactive': interactive = 1 elif opt=='--startup': map = {"manual": win32service.SERVICE_DEMAND_START, "auto" : win32service.SERVICE_AUTO_START, "disabled": win32service.SERVICE_DISABLED} try: startup = map[string.lower(val)] except KeyError: print "'%s' is not a valid startup option" % val elif opt=='--wait': try: waitSecs = int(val) except ValueError: print "--wait must specify an integer number of seconds." usage() arg=args[0] knownArg = 0 # First we process all arguments which pass additional args on if arg=="start": knownArg = 1 print "Starting service %s" % (serviceName) try: StartService(serviceName, args[1:]) if waitSecs: WaitForServiceStatus(serviceName, win32service.SERVICE_RUNNING, waitSecs) except win32service.error, exc: print "Error starting service: %s" % exc.strerror elif arg=="restart": knownArg = 1 print "Restarting service %s" % (serviceName) RestartService(serviceName, args[1:]) if waitSecs: WaitForServiceStatus(serviceName, win32service.SERVICE_RUNNING, waitSecs) elif arg=="debug": knownArg = 1 if not hasattr(sys, "frozen"): # non-frozen services use pythonservice.exe which handles a # -debug option svcArgs = string.join(args[1:]) try: exeName = LocateSpecificServiceExe(serviceName) except win32api.error, exc: if exc[0] == winerror.ERROR_FILE_NOT_FOUND: print "The service does not appear to be installed." print "Please install the service before debugging it." sys.exit(1) raise try: os.system("%s -debug %s %s" % (exeName, serviceName, svcArgs)) # ^C is used to kill the debug service. Sometimes Python also gets # interrupted - ignore it... except KeyboardInterrupt: pass else: # py2exe services don't use pythonservice - so we simulate # debugging here. DebugService(cls, args) if not knownArg and len(args)!=1: usage() # the rest of the cmds don't take addn args if arg=="install": knownArg = 1 try: serviceDeps = cls._svc_deps_ except AttributeError: serviceDeps = None try: exeName = cls._exe_name_ except AttributeError: exeName = None # Default to PythonService.exe try: exeArgs = cls._exe_args_ except AttributeError: exeArgs = None try: description = cls._svc_description_ except AttributeError: description = None print "Installing service %s" % (serviceName,) # Note that we install the service before calling the custom option # handler, so if the custom handler fails, we have an installed service (from NT's POV) # but is unlikely to work, as the Python code controlling it failed. Therefore # we remove the service if the first bit works, but the second doesnt! try: InstallService(serviceClassString, serviceName, serviceDisplayName, serviceDeps = serviceDeps, startType=startup, bRunInteractive=interactive, userName=userName,password=password, exeName=exeName, perfMonIni=perfMonIni,perfMonDll=perfMonDll,exeArgs=exeArgs,description=description) if customOptionHandler: customOptionHandler(*(opts,)) print "Service installed" except win32service.error, exc: if exc.winerror==winerror.ERROR_SERVICE_EXISTS: arg = "update" # Fall through to the "update" param! else: print "Error installing service: %s (%d)" % (exc.strerror, exc.winerror) err = hr except ValueError, msg: # Can be raised by custom option handler. print "Error installing service: %s" % str(msg) err = -1 # xxx - maybe I should remove after _any_ failed install - however, # xxx - it may be useful to help debug to leave the service as it failed. # xxx - We really _must_ remove as per the comments above... # As we failed here, remove the service, so the next installation # attempt works. try: RemoveService(serviceName) except win32api.error: print "Warning - could not remove the partially installed service." if arg == "update": knownArg = 1 try: serviceDeps = cls._svc_deps_ except AttributeError: serviceDeps = None try: exeName = cls._exe_name_ except AttributeError: exeName = None # Default to PythonService.exe try: exeArgs = cls._exe_args_ except AttributeError: exeArgs = None try: description=cls._svc_description_ except AttributeError: description=None print "Changing service configuration" try: ChangeServiceConfig(serviceClassString, serviceName, serviceDeps = serviceDeps, startType=startup, bRunInteractive=interactive, userName=userName,password=password, exeName=exeName, displayName = serviceDisplayName, perfMonIni=perfMonIni,perfMonDll=perfMonDll,exeArgs=exeArgs,description=description) if customOptionHandler: customOptionHandler(*(opts,)) print "Service updated" except win32service.error, exc: print "Error changing service configuration: %s (%d)" % (exc.strerror,exc.winerror) err = hr elif arg=="remove": knownArg = 1 print "Removing service %s" % (serviceName) try: RemoveService(serviceName) print "Service removed" except win32service.error, exc: print "Error removing service: %s (%d)" % (exc.strerror,exc.winerror) err = hr elif arg=="stop": knownArg = 1 print "Stopping service %s" % (serviceName) try: if waitSecs: StopServiceWithDeps(serviceName, waitSecs = waitSecs) else: StopService(serviceName) except win32service.error, exc: print "Error stopping service: %s (%d)" % (exc.strerror,exc.winerror) err = hr if not knownArg: err = -1 print "Unknown command - '%s'" % arg usage() return err | 49ceb192567e4a7c306d6d8751099ed3bc98161d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/677/49ceb192567e4a7c306d6d8751099ed3bc98161d/win32serviceutil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5004,
21391,
12,
6429,
16,
1156,
797,
780,
273,
599,
16,
5261,
273,
599,
16,
1679,
6410,
1320,
273,
23453,
1679,
1895,
1503,
273,
599,
4672,
3536,
6497,
445,
15632,
4028,
358,
1207,
326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5004,
21391,
12,
6429,
16,
1156,
797,
780,
273,
599,
16,
5261,
273,
599,
16,
1679,
6410,
1320,
273,
23453,
1679,
1895,
1503,
273,
599,
4672,
3536,
6497,
445,
15632,
4028,
358,
1207,
326,... |
option = 'A' | option = _A | def svd(a, full_matrices=1, compute_uv=1): """ Singular Value Decomposition. Factors the matrix ``a`` into ``u * np.diag(s) * v``, where ``u`` and ``v`` are unitary (i.e., ``u.H = inv(u)`` and similarly for ``v``) and ``s`` is a 1-D array of ``a``'s singular values. Note that, in the literature, it is common to see this decomposition expressed as (in NumPy notation) ``a = u * np.diag(s) * v.H``, whereas the ``v`` this function returns is such that ``a`` would be reconstructed as above; in other words, "our" ``v`` is the Hermitian (conjugate transpose) of that commonly seen in the literature. Parameters ---------- a : array_like Matrix of shape ``(M, N)`` to decompose. full_matrices : bool, optional If True (default), ``u`` and ``v`` have the shapes ``(M, M)`` and ``(N, N)``, respectively. Otherwise, the shapes are ``(M, K)`` and ``(K, N)``, resp., where ``K = min(M, N)``. compute_uv : bool, optional Whether or not to compute ``u`` and ``v`` in addition to ``s``. True by default. Returns ------- u : ndarray Unitary matrix. The shape of ``U`` is ``(M, M)`` or ``(M, K)`` depending on value of ``full_matrices``. s : ndarray The singular values, sorted so that ``s[i] >= s[i+1]``. ``S`` is a 1-D array of length ``min(M, N)`` v : ndarray Unitary matrix of shape ``(N, N)`` or ``(K, N)``, depending on ``full_matrices``. Raises ------ LinAlgError If SVD computation does not converge. Notes ----- If ``a`` is a matrix object (as opposed to an `ndarray`), then so are all the return values. Examples -------- >>> a = np.random.randn(9, 6) + 1j*np.random.randn(9, 6) >>> U, s, V = np.linalg.svd(a) >>> U.shape, V.shape, s.shape ((9, 9), (6, 6), (6,)) >>> U, s, V = np.linalg.svd(a, full_matrices=False) >>> U.shape, V.shape, s.shape ((9, 6), (6, 6), (6,)) >>> S = np.diag(s) >>> np.allclose(a, np.dot(U, np.dot(S, V))) True >>> s2 = np.linalg.svd(a, compute_uv=False) >>> np.allclose(s, s2) True """ a, wrap = _makearray(a) _assertRank2(a) _assertNonEmpty(a) m, n = a.shape t, result_t = _commonType(a) real_t = _linalgRealType(t) a = _fastCopyAndTranspose(t, a) s = zeros((min(n, m),), real_t) if compute_uv: if full_matrices: nu = m nvt = n option = 'A' else: nu = min(n, m) nvt = min(n, m) option = 'S' u = zeros((nu, m), t) vt = zeros((n, nvt), t) else: option = 'N' nu = 1 nvt = 1 u = empty((1, 1), t) vt = empty((1, 1), t) iwork = zeros((8*min(m, n),), fortran_int) if isComplexType(t): lapack_routine = lapack_lite.zgesdd rwork = zeros((5*min(m, n)*min(m, n) + 5*min(m, n),), real_t) lwork = 1 work = zeros((lwork,), t) results = lapack_routine(option, m, n, a, m, s, u, m, vt, nvt, work, -1, rwork, iwork, 0) lwork = int(abs(work[0])) work = zeros((lwork,), t) results = lapack_routine(option, m, n, a, m, s, u, m, vt, nvt, work, lwork, rwork, iwork, 0) else: lapack_routine = lapack_lite.dgesdd lwork = 1 work = zeros((lwork,), t) results = lapack_routine(option, m, n, a, m, s, u, m, vt, nvt, work, -1, iwork, 0) lwork = int(work[0]) work = zeros((lwork,), t) results = lapack_routine(option, m, n, a, m, s, u, m, vt, nvt, work, lwork, iwork, 0) if results['info'] > 0: raise LinAlgError, 'SVD did not converge' s = s.astype(_realType(result_t)) if compute_uv: u = u.transpose().astype(result_t) vt = vt.transpose().astype(result_t) return wrap(u), s, wrap(vt) else: return s | f8012ce42ee9ce709d2f4044e74e61d5d292b3cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/f8012ce42ee9ce709d2f4044e74e61d5d292b3cd/linalg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25656,
12,
69,
16,
1983,
67,
7373,
12660,
33,
21,
16,
3671,
67,
16303,
33,
21,
4672,
3536,
348,
17830,
1445,
26824,
3276,
18,
225,
29057,
1383,
326,
3148,
12176,
69,
10335,
1368,
12176,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25656,
12,
69,
16,
1983,
67,
7373,
12660,
33,
21,
16,
3671,
67,
16303,
33,
21,
4672,
3536,
348,
17830,
1445,
26824,
3276,
18,
225,
29057,
1383,
326,
3148,
12176,
69,
10335,
1368,
12176,
... |
return None, None | return None, None, None, None, None | def compilesuite(suite, major, minor, language, script, fname, basepackage=None): """Generate code for a single suite""" [name, desc, code, level, version, events, classes, comps, enums] = suite modname = identify(name) if len(modname) > 28: modname = modname[:27] fss, ok = macfs.StandardPutFile('Python output file', modname+'.py') if not ok: return None, None pathname = fss.as_pathname() modname = os.path.splitext(os.path.split(pathname)[1])[0] fp = open(fss.as_pathname(), 'w') fss.SetCreatorType('Pyth', 'TEXT') fp.write('"""Suite %s: %s\n' % (name, desc)) fp.write("Level %d, version %d\n\n" % (level, version)) fp.write("Generated from %s\n"%fname) fp.write("AETE/AEUT resource version %d/%d, language %d, script %d\n" % \ (major, minor, language, script)) fp.write('"""\n\n') fp.write('import aetools\n') fp.write('import MacOS\n\n') fp.write("_code = %s\n\n"% `code`) if basepackage and basepackage._code_to_module.has_key(code): # We are an extension of a baseclass (usually an application extending # Standard_Suite or so). Import everything from our base module fp.write('from %s import *\n'%basepackage._code_to_fullname[code]) basemodule = basepackage._code_to_module[code] else: # We are not an extension. basemodule = None compileclassheader(fp, modname, basemodule) enumsneeded = {} if events: for event in events: compileevent(fp, event, enumsneeded) else: fp.write("\tpass\n\n") objc = ObjectCompiler(fp, basemodule) for cls in classes: objc.compileclass(cls) for cls in classes: objc.fillclasspropsandelems(cls) for comp in comps: objc.compilecomparison(comp) for enum in enums: objc.compileenumeration(enum) for enum in enumsneeded.keys(): objc.checkforenum(enum) objc.dumpindex() return code, modname | b18e37723e6f3e7fe6bae03f14e954721df23eaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b18e37723e6f3e7fe6bae03f14e954721df23eaf/gensuitemodule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1161,
1449,
9519,
12,
30676,
16,
7888,
16,
8439,
16,
2653,
16,
2728,
16,
5299,
16,
1026,
5610,
33,
7036,
4672,
3536,
4625,
981,
364,
279,
2202,
11371,
8395,
306,
529,
16,
3044,
16,
981... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1161,
1449,
9519,
12,
30676,
16,
7888,
16,
8439,
16,
2653,
16,
2728,
16,
5299,
16,
1026,
5610,
33,
7036,
4672,
3536,
4625,
981,
364,
279,
2202,
11371,
8395,
306,
529,
16,
3044,
16,
981... |
self.dealbutton.pack(side=LEFT) self.canvas = Canvas(self.master, background=BACKGROUND, highlightthickness=0, width=NROWS*XSPACING, height=3*YSPACING) self.canvas.pack(fill=BOTH, expand=TRUE) self.deck = Deck(self) | Window(self.canvas, MARGIN, 3*YSPACING + 20, window=self.dealbutton, anchor=SW) x = MARGIN y = MARGIN self.deck = Deck(x, y, self) x = x + XSPACING self.opendeck = OpenStack(x, y, self) | def __init__(self, master): | 90f09405606ca0eb9c7b66595fbe62655a2101df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/90f09405606ca0eb9c7b66595fbe62655a2101df/solitaire.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
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... |
return Py_BuildValue("l", outRef); """ | return Py_BuildValue("O&", EventHandlerRef_New, outRef);""" | # def outputFreeIt(self, name): | 15ea67d1a694a01faf3ea06f840879b7105c1480 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/15ea67d1a694a01faf3ea06f840879b7105c1480/CarbonEvtsupport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
202,
536,
876,
9194,
7193,
12,
2890,
16,
508,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
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,
468,
202,
536,
876,
9194,
7193,
12,
2890,
16,
508,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
dst=inet_atol("192.0.2.2")) / \ | dst=inet_atol("192.0.2.2"), id=5235) / \ | def test_udpv4_raw(self): # Create a packet for raw injection and verify it meets criteria. from pcs import inet_atol from pcs.packets.payload import payload c = ethernet(src="\x01\x02\x03\x04\x05\x06", \ dst="\xff\xff\xff\xff\xff\xff") / \ ipv4(src=inet_atol("192.168.123.17"), \ dst=inet_atol("192.0.2.2")) / \ udp(sport=67, dport=68) / \ payload("foobar\n") | 682827577d960d0398f9b51d90d20e48a1885fe1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5910/682827577d960d0398f9b51d90d20e48a1885fe1/udpv4test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1100,
25224,
24,
67,
1899,
12,
2890,
4672,
468,
1788,
279,
4414,
364,
1831,
10380,
471,
3929,
518,
1791,
2413,
3582,
18,
628,
31353,
1930,
17661,
67,
270,
355,
628,
31353,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1100,
25224,
24,
67,
1899,
12,
2890,
4672,
468,
1788,
279,
4414,
364,
1831,
10380,
471,
3929,
518,
1791,
2413,
3582,
18,
628,
31353,
1930,
17661,
67,
270,
355,
628,
31353,
18,
... |
return ( can_play, can_download, can_transfer, can_cancel, can_delete ) | return (can_play, can_download, can_transfer, can_cancel, can_delete, open_instead_of_play) | def play_or_download(self): if self.wNotebook.get_current_page() > 0: return | d000a1f2dbe6266d03681bd1b3ee0585fab45c05 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12778/d000a1f2dbe6266d03681bd1b3ee0585fab45c05/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6599,
67,
280,
67,
7813,
12,
2890,
4672,
309,
365,
18,
91,
19751,
18,
588,
67,
2972,
67,
2433,
1435,
405,
374,
30,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6599,
67,
280,
67,
7813,
12,
2890,
4672,
309,
365,
18,
91,
19751,
18,
588,
67,
2972,
67,
2433,
1435,
405,
374,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
hardhatutil.rmdirRecursive(os.path.join(dir, subdir)) | hardhatutil.rmdirRecursive(subdir) list2 = os.listdir(buildDir) for fileName in list2: fileName = os.path.join(buildDir, fileName) if os.path.isdir(fileName): continue elif fileName.find('Chandler_') != -1: os.remove(fileName) | def RotateDirectories(dir): """Removes all but the 3 newest subdirectories from the given directory; assumes the directories are named with timestamps (numbers) because it uses normal sorting to determine the order.""" dirs = os.listdir(dir) dirs.sort() for subdir in dirs[:-3]: # print " subdir = ", subdir if os.path.isdir(subdir): hardhatutil.rmdirRecursive(os.path.join(dir, subdir)) | d408e117db6efa17cce01fc2c6e49ab155d30dfd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d408e117db6efa17cce01fc2c6e49ab155d30dfd/tindertest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24280,
13071,
12,
1214,
4672,
3536,
6220,
777,
1496,
326,
890,
19824,
31220,
628,
326,
864,
1867,
31,
13041,
326,
6402,
854,
4141,
598,
11267,
261,
13851,
13,
2724,
518,
4692,
2212,
9602,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24280,
13071,
12,
1214,
4672,
3536,
6220,
777,
1496,
326,
890,
19824,
31220,
628,
326,
864,
1867,
31,
13041,
326,
6402,
854,
4141,
598,
11267,
261,
13851,
13,
2724,
518,
4692,
2212,
9602,
... |
self._file.close() | self._file.close() | def close(self): """Flush and close the mailbox.""" self.flush() if self._locked: self.unlock() self._file.close() | bb876b9c69f80c253621937ad734eafef3086e5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bb876b9c69f80c253621937ad734eafef3086e5f/mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
3536,
8207,
471,
1746,
326,
14187,
12123,
365,
18,
11330,
1435,
309,
365,
6315,
15091,
30,
365,
18,
26226,
1435,
365,
6315,
768,
18,
4412,
1435,
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,
1746,
12,
2890,
4672,
3536,
8207,
471,
1746,
326,
14187,
12123,
365,
18,
11330,
1435,
309,
365,
6315,
15091,
30,
365,
18,
26226,
1435,
365,
6315,
768,
18,
4412,
1435,
2,
-100,
-100,
-100... |
output += '<p>no qualified users, try new search</p>' | output += '<p>no qualified users, try new search.</p>' elif len(users) > MAXSELECTUSERS: output += '<p><strong>%s hits</strong>, to many qualified users, specify more narrow search.</p>' % (len(users), ) | def perform_addroleuser(req, email_user_pattern='', id_user='0', id_role='0', confirm=0): """delete connection between role and user. id_role - id of role to disconnect id_user - id of user to disconnect. """ if not is_adminuser(req): return mustloginpage(req) email_out = acca.acc_getUserEmail(id_user=id_user) name_role = acca.acc_getRoleName(id_role=id_role) title = 'Connect user to roles' subtitle = 'step 1 - search for users' # clean email search string email_user_pattern = cleanstring_email(email_user_pattern) text = ' <span class="adminlabel">1. search pattern </span>\n' text += ' <input class="admin_wvar" type="text" name="email_user_pattern" value="%s" />\n' % (email_user_pattern, ) output = createhiddenform(action='addroleuser', text=text, button='search for users', id_role=id_role) if email_user_pattern: subtitle = 'step 2 - select user' users1 = run_sql("""SELECT id, email FROM user WHERE email RLIKE '%s' ORDER BY id """ % (email_user_pattern, )) users = [] for (id, email) in users1: users.append([id, email, '']) if not users: output += '<p>no qualified users, try new search</p>' else: output += createuserselect(id_user=id_user, action='addroleuser', step=2, users=users, button='select user', email_user_pattern=email_user_pattern) if int(id_user): subtitle = 'step 3 - select role' # roles the user is connected to role_ids = acca.acc_getUserRoles(id_user=id_user) # all the roles all_roles = acca.acc_getAllRoles() # sort the roles in connected and not connected roles con_roles = [] not_roles = [] for (id, name, description) in all_roles: if (id, ) in role_ids: con_roles.append([-id, name, description]) else: not_roles.append([id, name, description]) # create roleselect output += createroleselect(id_role=id_role, action='addroleuser', step=3, roles=not_roles, extraroles=con_roles, button='add this role', email_user_pattern=email_user_pattern, id_user=id_user) if int(id_role) < 0: output += '<p>roles in brackets are already connected to the user, try another one...<p>' elif int(id_role): subtitle = 'step 4 - confirm to add role to user' output += createhiddenform(action='addroleuser', text='add role <strong>%s</strong> to user <strong>%s</strong>?' % (name_role, email_out), email_user_pattern=email_user_pattern, id_user=id_user, id_role=id_role, confirm=1) if confirm: # add role result = acca.acc_addUserRole(id_user=id_user, id_role=id_role) if result and result[2]: subtitle = 'step 5 - confirm role added' output += '<p>confirm: role <strong>%s</strong> added to user <strong>%s</strong>.</p>' % (name_role, email_out) else: subtitle = 'step 5 - role could not be added' output += '<p>sorry, but role could not be added</p>' extra = """ <dl> <dt><a href="addrole">Add new role</a></dt> <dd>go here to add a new role.</dd> """ if int(id_user): extra += """ <dt><a href="deleteuserrole?id_user=%s&reverse=1">Remove roles</a></dt> <dd>disconnect roles from this user.</dd> """ % (id_user, ) extra += """ </dl> """ return index(req=req, title=title, subtitle=subtitle, body=[output, extra], adminarea=5) | 911068548336831a628cc7a6d8a3e449446b6170 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1931/911068548336831a628cc7a6d8a3e449446b6170/webaccessadmin_lib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
1289,
4615,
1355,
12,
3658,
16,
2699,
67,
1355,
67,
4951,
2218,
2187,
612,
67,
1355,
2218,
20,
2187,
612,
67,
4615,
2218,
20,
2187,
6932,
33,
20,
4672,
3536,
3733,
1459,
3086... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1289,
4615,
1355,
12,
3658,
16,
2699,
67,
1355,
67,
4951,
2218,
2187,
612,
67,
1355,
2218,
20,
2187,
612,
67,
4615,
2218,
20,
2187,
6932,
33,
20,
4672,
3536,
3733,
1459,
3086... |
del environ['TZ'] time.tzset() if time.timezone == 0: environ['TZ'] = 'US/Eastern' else: environ['TZ'] = 'UTC' time.tzset() nonlocal = time.localtime(xmas2002) del environ['TZ'] time.tzset() local = time.localtime(xmas2002) self.failIfEqual(local,nonlocal) self.failUnlessEqual(len(time.tzname),2) time.daylight time.timezone time.altzone | def test_tzset(self): if not hasattr(time, "tzset"): return # Can't test this; don't want the test suite to fail | 7f2588c073e80ab9932f69d1c5766aa73f4ae7d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7f2588c073e80ab9932f69d1c5766aa73f4ae7d0/test_time.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12994,
542,
12,
2890,
4672,
309,
486,
3859,
12,
957,
16,
315,
12994,
542,
6,
4672,
327,
468,
4480,
1404,
1842,
333,
31,
2727,
1404,
2545,
326,
1842,
11371,
358,
2321,
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,
1842,
67,
12994,
542,
12,
2890,
4672,
309,
486,
3859,
12,
957,
16,
315,
12994,
542,
6,
4672,
327,
468,
4480,
1404,
1842,
333,
31,
2727,
1404,
2545,
326,
1842,
11371,
358,
2321,
2,
-100... | |
marginalia = ' ' * width | marginalia = '<tt>' + ' ' * width + '</tt>' | def section(self, title, fgcol, bgcol, contents, width=20, prelude='', marginalia=None, gap=' '): """Format a section with a heading.""" if marginalia is None: marginalia = ' ' * width result = ''' | a2ebd065552d2e5c9c6624a04e40faa9148962e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a2ebd065552d2e5c9c6624a04e40faa9148962e9/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2442,
12,
2890,
16,
2077,
16,
10186,
1293,
16,
7611,
1293,
16,
2939,
16,
1835,
33,
3462,
16,
675,
80,
1317,
2218,
2187,
26533,
1155,
33,
7036,
16,
9300,
2218,
10,
10600,
23480,
10600,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2442,
12,
2890,
16,
2077,
16,
10186,
1293,
16,
7611,
1293,
16,
2939,
16,
1835,
33,
3462,
16,
675,
80,
1317,
2218,
2187,
26533,
1155,
33,
7036,
16,
9300,
2218,
10,
10600,
23480,
10600,
... |
class NatCheckClient(Thread): | class NatCheckClient: | def validNatCheckReplyMsg(self, ncr_data): | 698c4e731a473819061b683aa113c7cd992f5d04 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9686/698c4e731a473819061b683aa113c7cd992f5d04/NatCheckMsgHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
923,
23779,
1564,
7817,
3332,
12,
2890,
16,
290,
3353,
67,
892,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
923,
23779,
1564,
7817,
3332,
12,
2890,
16,
290,
3353,
67,
892,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
jmolApplet("100%", "script" + url); | jmolApplet("100%", "script" + url, jmol_count); | def jmol_lib(): s = r""" | 9a929168bf14de1063141b850c02723898958ece /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/9a929168bf14de1063141b850c02723898958ece/js.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
525,
21260,
67,
2941,
13332,
272,
273,
436,
8395,
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,
525,
21260,
67,
2941,
13332,
272,
273,
436,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Yield tuples of the form (RELATION, package_id, id,). | Yield tuples of the form (RELATION, package_id, id, mimetype, schema, url). | def iter_relations(self, package_ids, id=None, id_alt=None): """ Yield tuples of the form (RELATION, package_id, id,). """ assert _DF or not isinstance(package_ids, basestring) | 342ced6909076a9f201646311ba592017d1d5539 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11977/342ced6909076a9f201646311ba592017d1d5539/sqlite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1400,
67,
15018,
12,
2890,
16,
2181,
67,
2232,
16,
612,
33,
7036,
16,
612,
67,
2390,
33,
7036,
4672,
3536,
31666,
10384,
434,
326,
646,
261,
27822,
16,
2181,
67,
350,
16,
612,
16,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1400,
67,
15018,
12,
2890,
16,
2181,
67,
2232,
16,
612,
33,
7036,
16,
612,
67,
2390,
33,
7036,
4672,
3536,
31666,
10384,
434,
326,
646,
261,
27822,
16,
2181,
67,
350,
16,
612,
16,
12... |
opt_dict[opt] = (filename, parser.get(section,opt)) | val = parser.get(section,opt) opt = string.replace(opt, '-', '_') opt_dict[opt] = (filename, val) | def parse_config_files (self, filenames=None): | ceb9e226a638301e68420d7b6728bdc86fd30f0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ceb9e226a638301e68420d7b6728bdc86fd30f0c/dist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
1425,
67,
2354,
261,
2890,
16,
9066,
33,
7036,
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,
... | [
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,
67,
1425,
67,
2354,
261,
2890,
16,
9066,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
heb_maj_tenis_distance=fields.get('heb_maj_tenis_distance', 0),\ heb_maj_nautisme_distance=fields.get('heb_maj_nautisme_distance', 0),\ heb_maj_sky_distance=fields.get('heb_maj_sky_distance', 0),\ heb_maj_rando_distance=fields.get('heb_maj_rando_distance', 0),\ heb_maj_piscine_distance=fields.get('heb_maj_piscine_distance', 0),\ heb_maj_peche_distance=fields.get('heb_maj_peche_distance', 0),\ heb_maj_equitation_distance=fields.get('heb_maj_equitation_distance', 0),\ heb_maj_velo_distance=fields.get('heb_maj_velo_distance', 0),\ heb_maj_vtt_distance=fields.get('heb_maj_vtt_distance', 0),\ heb_maj_ravel_distance=fields.get('heb_maj_ravel_distance', 0),\ | heb_maj_animal=fields.get('heb_maj_animal'),\ heb_maj_tenis_distance=fields.get('heb_maj_tenis_distance'),\ heb_maj_nautisme_distance=fields.get('heb_maj_nautisme_distance'),\ heb_maj_sky_distance=fields.get('heb_maj_sky_distance'),\ heb_maj_rando_distance=fields.get('heb_maj_rando_distance'),\ heb_maj_piscine_distance=fields.get('heb_maj_piscine_distance'),\ heb_maj_peche_distance=fields.get('heb_maj_peche_distance'),\ heb_maj_equitation_distance=fields.get('heb_maj_equitation_distance'),\ heb_maj_velo_distance=fields.get('heb_maj_velo_distance'),\ heb_maj_vtt_distance=fields.get('heb_maj_vtt_distance'),\ heb_maj_ravel_distance=fields.get('heb_maj_ravel_distance'),\ | def insertHebergementMaj(self): """ ajoute les infos de mise à jour de l'hébergement par le proprio table habergement_maj met dans table hebergement le champ heb_maj_info_etat à 'En attente de confirmation' """ fields = self.context.REQUEST chargeFk=fields.get('heb_maj_charge_fk') hebPk=fields.get('heb_maj_hebpk') hebNom=fields.get('heb_maj_nom') wrapper = getSAWrapper('gites_wallons') session = wrapper.session insertHebergementMaj = wrapper.getMapper('hebergement_maj') newEntry = insertHebergementMaj(heb_maj_hebpk=hebPk,\ heb_maj_nom=fields.get('heb_maj_nom'),\ heb_maj_adresse=fields.get('heb_maj_adresse'),\ heb_maj_localite=fields.get('heb_maj_localite'),\ heb_maj_tenis=fields.get('heb_maj_tenis'),\ heb_maj_nautisme=fields.get('heb_maj_nautisme'),\ heb_maj_sky=fields.get('heb_maj_sky'),\ heb_maj_rando=fields.get('heb_maj_rando'),\ heb_maj_piscine=fields.get('heb_maj_piscine'),\ heb_maj_peche=fields.get('heb_maj_peche'),\ heb_maj_equitation=fields.get('heb_maj_equitation'),\ heb_maj_velo=fields.get('heb_maj_velo',),\ heb_maj_vtt=fields.get('heb_maj_vtt'),\ heb_maj_ravel=fields.get('heb_maj_ravel'),\ heb_maj_animal=fields.get('heb_maj_animal'),\ heb_maj_tarif_we_bs=fields.get('heb_maj_tarif_we_bs'),\ heb_maj_tarif_we_ms=fields.get('heb_maj_tarif_we_ms'),\ heb_maj_tarif_we_hs=fields.get('heb_maj_tarif_we_hs'),\ heb_maj_tarif_sem_bs=fields.get('heb_maj_tarif_sem_bs'),\ heb_maj_tarif_sem_ms=fields.get('heb_maj_tarif_sem_ms'),\ heb_maj_tarif_sem_hs=fields.get('heb_maj_tarif_sem_hs'),\ heb_maj_tarif_garantie=fields.get('heb_maj_tarif_garantie'),\ heb_maj_tarif_divers=fields.get('heb_maj_tarif_divers'),\ heb_maj_descriptif_fr=fields.get('heb_maj_descriptif_fr'),\ heb_maj_pointfort_fr=fields.get('heb_maj_pointfort_fr'),\ heb_maj_fumeur=fields.get('heb_maj_fumeur'),\ heb_maj_tenis_distance=fields.get('heb_maj_tenis_distance', 0),\ heb_maj_nautisme_distance=fields.get('heb_maj_nautisme_distance', 0),\ heb_maj_sky_distance=fields.get('heb_maj_sky_distance', 0),\ heb_maj_rando_distance=fields.get('heb_maj_rando_distance', 0),\ heb_maj_piscine_distance=fields.get('heb_maj_piscine_distance', 0),\ heb_maj_peche_distance=fields.get('heb_maj_peche_distance', 0),\ heb_maj_equitation_distance=fields.get('heb_maj_equitation_distance', 0),\ heb_maj_velo_distance=fields.get('heb_maj_velo_distance', 0),\ heb_maj_vtt_distance=fields.get('heb_maj_vtt_distance', 0),\ heb_maj_ravel_distance=fields.get('heb_maj_ravel_distance', 0),\ heb_maj_confort_tv=fields.get('heb_maj_confort_tv'),\ heb_maj_confort_feu_ouvert=fields.get('heb_maj_confort_feu_ouvert'),\ heb_maj_confort_lave_vaiselle=fields.get('heb_maj_confort_lave_vaiselle'),\ heb_maj_confort_micro_onde=fields.get('heb_maj_confort_micro_onde'),\ heb_maj_confort_lave_linge=fields.get('heb_maj_confort_lave_linge'),\ heb_maj_confort_seche_linge=fields.get('heb_maj_confort_seche_linge'),\ heb_maj_confort_congelateur=fields.get('heb_maj_confort_congelateur'),\ heb_maj_confort_internet=fields.get('heb_maj_confort_internet'),\ heb_maj_taxe_sejour=fields.get('heb_maj_taxe_sejour'),\ heb_maj_taxe_montant=fields.get('heb_maj_taxe_montant', 0),\ heb_maj_forfait_montant=fields.get('heb_maj_forfait_montant', 0),\ heb_maj_tarif_we_3n=fields.get('heb_maj_tarif_we_3n'),\ heb_maj_tarif_we_4n=fields.get('heb_maj_tarif_we_4n'),\ heb_maj_tarif_semaine_fin_annee=fields.get('heb_maj_tarif_semaine_fin_annee'),\ heb_maj_lit_1p=fields.get('heb_maj_lit_1p'),\ heb_maj_lit_2p=fields.get('heb_maj_lit_2p'),\ heb_maj_lit_sup=fields.get('heb_maj_lit_sup'),\ heb_maj_lit_enf=fields.get('heb_maj_lit_enf'),\ heb_maj_distribution_fr=fields.get('heb_maj_distribution_fr'),\ heb_maj_commerce=fields.get('heb_maj_commerce'),\ heb_maj_restaurant=fields.get('heb_maj_restaurant'),\ heb_maj_gare=fields.get('heb_maj_gare'),\ heb_maj_gare_distance=fields.get('heb_maj_gare_distance', 0),\ heb_maj_restaurant_distance=fields.get('heb_maj_restaurant_distance', 0),\ heb_maj_commerce_distance=fields.get('heb_maj_commerce_distance', 0),\ heb_maj_tarif_chmbr_avec_dej_1p=fields.get('heb_maj_tarif_chmbr_avec_dej_1p'),\ heb_maj_tarif_chmbr_avec_dej_2p=fields.get('heb_maj_tarif_chmbr_avec_dej_2p'),\ heb_maj_tarif_chmbr_avec_dej_3p=fields.get('heb_maj_tarif_chmbr_avec_dej_3p'),\ heb_maj_tarif_chmbr_sans_dej_1p=fields.get('heb_maj_tarif_chmbr_sans_dej_1p'),\ heb_maj_tarif_chmbr_sans_dej_2p=fields.get('heb_maj_tarif_chmbr_sans_dej_2p'),\ heb_maj_tarif_chmbr_sans_dej_3p=fields.get('heb_maj_tarif_chmbr_sans_dej_3p'),\ heb_maj_tarif_chmbr_table_hote_1p=fields.get('heb_maj_tarif_chmbr_table_hote_1p'),\ heb_maj_tarif_chmbr_table_hote_2p=fields.get('heb_maj_tarif_chmbr_table_hote_2p'),\ heb_maj_tarif_chmbr_table_hote_3p=fields.get('heb_maj_tarif_chmbr_table_hote_3p'),\ heb_maj_tarif_chmbr_autre_1p=fields.get('heb_maj_tarif_chmbr_autre_1p'),\ heb_maj_tarif_chmbr_autre_2p=fields.get('heb_maj_tarif_chmbr_autre_2p'),\ heb_maj_tarif_chmbr_autre_3p=fields.get('heb_maj_tarif_chmbr_autre_3p'),\ heb_maj_charge_fk=chargeFk) session.save(newEntry) session.flush() | 02e3d343a06c32eda283ba034f898a7e18e49a6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10188/02e3d343a06c32eda283ba034f898a7e18e49a6c/hebergement.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
5256,
31317,
820,
49,
4365,
12,
2890,
4672,
3536,
24787,
2571,
18022,
10626,
443,
312,
784,
225,
132,
259,
525,
477,
443,
328,
11,
76,
132,
107,
31317,
820,
779,
884,
2270,
566,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
5256,
31317,
820,
49,
4365,
12,
2890,
4672,
3536,
24787,
2571,
18022,
10626,
443,
312,
784,
225,
132,
259,
525,
477,
443,
328,
11,
76,
132,
107,
31317,
820,
779,
884,
2270,
566,
... |
security.declarePrivate('get_invitation') | security.declareProtected(PERMISSION_INVITE_TO_TALKBACKCONSULTATION, 'get_invitation') | def get_current_invitation(self, REQUEST): return self.get_invitation(REQUEST.SESSION.get('nytb-current-key', None)) | cccafc3ec9d9a156691ce7bf7b7c116389c318d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/cccafc3ec9d9a156691ce7bf7b7c116389c318d4/invitations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2972,
67,
5768,
8773,
12,
2890,
16,
12492,
4672,
327,
365,
18,
588,
67,
5768,
8773,
12,
5519,
18,
7042,
18,
588,
2668,
18538,
18587,
17,
2972,
17,
856,
2187,
599,
3719,
2,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2972,
67,
5768,
8773,
12,
2890,
16,
12492,
4672,
327,
365,
18,
588,
67,
5768,
8773,
12,
5519,
18,
7042,
18,
588,
2668,
18538,
18587,
17,
2972,
17,
856,
2187,
599,
3719,
2,
-... |
self.instance.FindDisk(disk_idx) | instance.FindDisk(disk_idx) | def CheckPrereq(self): """Check prerequisites. | e90225317101f9d3088352270741c7986fc344d0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/e90225317101f9d3088352270741c7986fc344d0/cmdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
2050,
822,
85,
12,
2890,
4672,
3536,
1564,
30328,
16608,
2997,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
2050,
822,
85,
12,
2890,
4672,
3536,
1564,
30328,
16608,
2997,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fontsize = config.OSD_FONTSIZE_BTNS*ptscale | fontsize = config.OSD_FONTSIZE_BTNS | def refresh(self): self.osd.clearscreen(self.osd.COL_WHITE) | c9f2af3b72cff237a7370baec65ce82868f7171b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/c9f2af3b72cff237a7370baec65ce82868f7171b/menu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
12,
2890,
4672,
365,
18,
538,
72,
18,
8507,
9252,
12,
2890,
18,
538,
72,
18,
4935,
67,
16861,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
12,
2890,
4672,
365,
18,
538,
72,
18,
8507,
9252,
12,
2890,
18,
538,
72,
18,
4935,
67,
16861,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
doc = Request(self, 'artist.getTopAlbums', self.api_key, params).execute() | doc = _Request(self, 'artist.getTopAlbums', self.api_key, params).execute() | def getTopAlbums(self): """Returns a list of the top Albums by this artist on Last.fm. """ params = self._getParams() doc = Request(self, 'artist.getTopAlbums', self.api_key, params).execute() if not doc: return None names = self._extract_all(doc, 'name') albums = [] for name in names: albums.append(Album(self.getName(), name, *self.auth_data)) return albums | 903c9b1622fe56617e5099f20abdc69f2090f8e0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9926/903c9b1622fe56617e5099f20abdc69f2090f8e0/pylast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13729,
30330,
87,
12,
2890,
4672,
3536,
1356,
279,
666,
434,
326,
1760,
2262,
10293,
87,
635,
333,
15469,
603,
6825,
18,
25089,
18,
3536,
225,
859,
273,
365,
6315,
588,
1370,
1435,
997,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13729,
30330,
87,
12,
2890,
4672,
3536,
1356,
279,
666,
434,
326,
1760,
2262,
10293,
87,
635,
333,
15469,
603,
6825,
18,
25089,
18,
3536,
225,
859,
273,
365,
6315,
588,
1370,
1435,
997,
... |
people.update(song.listall(["artist","performer","composer"])) self.people = list(people) | for person in song.listall(["artist","performer","composer"]): if person not in people: people[person] = 0 people[person] -= 1 self.genre.update(song.list("genre")) self.people = [(num, person) for (person, num) in people.items()] | def finalize(self): self.tracks = len(self.songs) self.length = sum([song["~#length"] for song in self.songs]) self.__long_length = util.format_time_long(self.length) self.__length = util.format_time(self.length) people = set() for song in self.songs: people.update(song.listall(["artist","performer","composer"])) self.people = list(people) self.people.sort() | 25eda245b60159e26c912498b36bf264d3e87719 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/25eda245b60159e26c912498b36bf264d3e87719/widgets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
12,
2890,
4672,
365,
18,
21499,
273,
562,
12,
2890,
18,
816,
564,
13,
365,
18,
2469,
273,
2142,
3816,
816,
75,
9614,
98,
7,
2469,
11929,
364,
17180,
316,
365,
18,
816,
564,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
12,
2890,
4672,
365,
18,
21499,
273,
562,
12,
2890,
18,
816,
564,
13,
365,
18,
2469,
273,
2142,
3816,
816,
75,
9614,
98,
7,
2469,
11929,
364,
17180,
316,
365,
18,
816,
564,
57... |
This function is an automatic generated pexpect wrapper around the Singular | This function is an automatically generated pexpect wrapper around the Singular | def _sage_doc_(self): """ EXAMPLES:: sage: 'groebner' in singular.groebner._sage_doc_() True """ if not nodes: generate_docstring_dictionary() | a11bd733b420bf5cc9fbf35ee640484f1eaff9f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a11bd733b420bf5cc9fbf35ee640484f1eaff9f4/singular.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
87,
410,
67,
2434,
67,
12,
2890,
4672,
3536,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
296,
25420,
24008,
1224,
11,
316,
10048,
18,
25420,
24008,
1224,
6315,
87,
410,
67,
2434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
87,
410,
67,
2434,
67,
12,
2890,
4672,
3536,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
296,
25420,
24008,
1224,
11,
316,
10048,
18,
25420,
24008,
1224,
6315,
87,
410,
67,
2434,
... |
if name == 'xmlCreateMemoryParserCtxt': print "processing special case" if (f == 'z') and (name in foreign_encoding_args): | if (f == 'z') and (name in foreign_encoding_args) and (num_bufs == 0): | def print_function_wrapper(name, output, export, include): global py_types global unknown_types global functions global skipped_modules try: (desc, ret, args, file) = functions[name] except: print "failed to get function %s infos" return if skipped_modules.has_key(file): return 0 if skip_function(name) == 1: return 0 if name in skip_impl: # Don't delete the function entry in the caller. return 1 c_call = ""; format="" format_args="" c_args="" c_return="" c_convert="" num_bufs=0 for arg in args: # This should be correct if arg[1][0:6] == "const ": arg[1] = arg[1][6:] c_args = c_args + " %s %s;\n" % (arg[1], arg[0]) if py_types.has_key(arg[1]): (f, t, n, c) = py_types[arg[1]] if name == 'xmlCreateMemoryParserCtxt': print "processing special case" if (f == 'z') and (name in foreign_encoding_args): f = 't#' print "changed 'f'" if f != None: format = format + f if t != None: format_args = format_args + ", &pyobj_%s" % (arg[0]) c_args = c_args + " PyObject *pyobj_%s;\n" % (arg[0]) c_convert = c_convert + \ " %s = (%s) Py%s_Get(pyobj_%s);\n" % (arg[0], arg[1], t, arg[0]); else: format_args = format_args + ", &%s" % (arg[0]) if f == 't#': format_args = format_args + ", &py_buffsize%d" % num_bufs c_args = c_args + " int py_buffsize%d;\n" % num_bufs num_bufs = num_bufs + 1 if c_call != "": c_call = c_call + ", "; c_call = c_call + "%s" % (arg[0]) else: if skipped_types.has_key(arg[1]): return 0 if unknown_types.has_key(arg[1]): lst = unknown_types[arg[1]] lst.append(name) else: unknown_types[arg[1]] = [name] return -1 if format != "": format = format + ":%s" % (name) if ret[0] == 'void': if file == "python_accessor": if args[1][1] == "char *" or args[1][1] == "xmlChar *": c_call = "\n if (%s->%s != NULL) xmlFree(%s->%s);\n" % ( args[0][0], args[1][0], args[0][0], args[1][0]) c_call = c_call + " %s->%s = (%s)xmlStrdup((const xmlChar *)%s);\n" % (args[0][0], args[1][0], args[1][1], args[1][0]) else: c_call = "\n %s->%s = %s;\n" % (args[0][0], args[1][0], args[1][0]) else: c_call = "\n %s(%s);\n" % (name, c_call); ret_convert = " Py_INCREF(Py_None);\n return(Py_None);\n" elif py_types.has_key(ret[0]): (f, t, n, c) = py_types[ret[0]] c_return = " %s c_retval;\n" % (ret[0]) if file == "python_accessor" and ret[2] != None: c_call = "\n c_retval = %s->%s;\n" % (args[0][0], ret[2]) else: c_call = "\n c_retval = %s(%s);\n" % (name, c_call); ret_convert = " py_retval = libxml_%sWrap((%s) c_retval);\n" % (n,c) ret_convert = ret_convert + " return(py_retval);\n" elif py_return_types.has_key(ret[0]): (f, t, n, c) = py_return_types[ret[0]] c_return = " %s c_retval;\n" % (ret[0]) c_call = "\n c_retval = %s(%s);\n" % (name, c_call); ret_convert = " py_retval = libxml_%sWrap((%s) c_retval);\n" % (n,c) ret_convert = ret_convert + " return(py_retval);\n" else: if skipped_types.has_key(ret[0]): return 0 if unknown_types.has_key(ret[0]): lst = unknown_types[ret[0]] lst.append(name) else: unknown_types[ret[0]] = [name] return -1 if file == "debugXML": include.write("#ifdef LIBXML_DEBUG_ENABLED\n"); export.write("#ifdef LIBXML_DEBUG_ENABLED\n"); output.write("#ifdef LIBXML_DEBUG_ENABLED\n"); elif file == "HTMLtree" or file == "HTMLparser" or name[0:4] == "html": include.write("#ifdef LIBXML_HTML_ENABLED\n"); export.write("#ifdef LIBXML_HTML_ENABLED\n"); output.write("#ifdef LIBXML_HTML_ENABLED\n"); elif file == "c14n": include.write("#ifdef LIBXML_C14N_ENABLED\n"); export.write("#ifdef LIBXML_C14N_ENABLED\n"); output.write("#ifdef LIBXML_C14N_ENABLED\n"); elif file == "xpathInternals" or file == "xpath": include.write("#ifdef LIBXML_XPATH_ENABLED\n"); export.write("#ifdef LIBXML_XPATH_ENABLED\n"); output.write("#ifdef LIBXML_XPATH_ENABLED\n"); elif file == "xpointer": include.write("#ifdef LIBXML_XPTR_ENABLED\n"); export.write("#ifdef LIBXML_XPTR_ENABLED\n"); output.write("#ifdef LIBXML_XPTR_ENABLED\n"); elif file == "xinclude": include.write("#ifdef LIBXML_XINCLUDE_ENABLED\n"); export.write("#ifdef LIBXML_XINCLUDE_ENABLED\n"); output.write("#ifdef LIBXML_XINCLUDE_ENABLED\n"); elif file == "xmlregexp": include.write("#ifdef LIBXML_REGEXP_ENABLED\n"); export.write("#ifdef LIBXML_REGEXP_ENABLED\n"); output.write("#ifdef LIBXML_REGEXP_ENABLED\n"); elif file == "xmlschemas" or file == "xmlschemastypes" or \ file == "relaxng": include.write("#ifdef LIBXML_SCHEMAS_ENABLED\n"); export.write("#ifdef LIBXML_SCHEMAS_ENABLED\n"); output.write("#ifdef LIBXML_SCHEMAS_ENABLED\n"); include.write("PyObject * ") include.write("libxml_%s(PyObject *self, PyObject *args);\n" % (name)); export.write(" { (char *)\"%s\", libxml_%s, METH_VARARGS, NULL },\n" % (name, name)) if file == "python": # Those have been manually generated if name[0:4] == "html": include.write("#endif /* LIBXML_HTML_ENABLED */\n"); export.write("#endif /* LIBXML_HTML_ENABLED */\n"); output.write("#endif /* LIBXML_HTML_ENABLED */\n"); return 1 if file == "python_accessor" and ret[0] != "void" and ret[2] is None: # Those have been manually generated if name[0:4] == "html": include.write("#endif /* LIBXML_HTML_ENABLED */\n"); export.write("#endif /* LIBXML_HTML_ENABLED */\n"); output.write("#endif /* LIBXML_HTML_ENABLED */\n"); return 1 output.write("PyObject *\n") output.write("libxml_%s(PyObject *self ATTRIBUTE_UNUSED," % (name)) output.write(" PyObject *args") if format == "": output.write(" ATTRIBUTE_UNUSED") output.write(") {\n") if ret[0] != 'void': output.write(" PyObject *py_retval;\n") if c_return != "": output.write(c_return) if c_args != "": output.write(c_args) if format != "": output.write("\n if (!PyArg_ParseTuple(args, (char *)\"%s\"%s))\n" % (format, format_args)) output.write(" return(NULL);\n") if c_convert != "": output.write(c_convert) output.write(c_call) output.write(ret_convert) output.write("}\n\n") if file == "debugXML": include.write("#endif /* LIBXML_DEBUG_ENABLED */\n"); export.write("#endif /* LIBXML_DEBUG_ENABLED */\n"); output.write("#endif /* LIBXML_DEBUG_ENABLED */\n"); elif file == "HTMLtree" or file == "HTMLparser" or name[0:4] == "html": include.write("#endif /* LIBXML_HTML_ENABLED */\n"); export.write("#endif /* LIBXML_HTML_ENABLED */\n"); output.write("#endif /* LIBXML_HTML_ENABLED */\n"); elif file == "c14n": include.write("#endif /* LIBXML_C14N_ENABLED */\n"); export.write("#endif /* LIBXML_C14N_ENABLED */\n"); output.write("#endif /* LIBXML_C14N_ENABLED */\n"); elif file == "xpathInternals" or file == "xpath": include.write("#endif /* LIBXML_XPATH_ENABLED */\n"); export.write("#endif /* LIBXML_XPATH_ENABLED */\n"); output.write("#endif /* LIBXML_XPATH_ENABLED */\n"); elif file == "xpointer": include.write("#endif /* LIBXML_XPTR_ENABLED */\n"); export.write("#endif /* LIBXML_XPTR_ENABLED */\n"); output.write("#endif /* LIBXML_XPTR_ENABLED */\n"); elif file == "xinclude": include.write("#endif /* LIBXML_XINCLUDE_ENABLED */\n"); export.write("#endif /* LIBXML_XINCLUDE_ENABLED */\n"); output.write("#endif /* LIBXML_XINCLUDE_ENABLED */\n"); elif file == "xmlregexp": include.write("#endif /* LIBXML_REGEXP_ENABLED */\n"); export.write("#endif /* LIBXML_REGEXP_ENABLED */\n"); output.write("#endif /* LIBXML_REGEXP_ENABLED */\n"); elif file == "xmlschemas" or file == "xmlschemastypes" or \ file == "relaxng": include.write("#endif /* LIBXML_SCHEMAS_ENABLED */\n"); export.write("#endif /* LIBXML_SCHEMAS_ENABLED */\n"); output.write("#endif /* LIBXML_SCHEMAS_ENABLED */\n"); return 1 | ff349110ccb0b5c6d437848a8b254d93fbaced18 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/ff349110ccb0b5c6d437848a8b254d93fbaced18/generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
915,
67,
8376,
12,
529,
16,
876,
16,
3359,
16,
2341,
4672,
2552,
2395,
67,
2352,
2552,
5917,
67,
2352,
2552,
4186,
2552,
9700,
67,
6400,
225,
775,
30,
261,
5569,
16,
325,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
915,
67,
8376,
12,
529,
16,
876,
16,
3359,
16,
2341,
4672,
2552,
2395,
67,
2352,
2552,
5917,
67,
2352,
2552,
4186,
2552,
9700,
67,
6400,
225,
775,
30,
261,
5569,
16,
325,
1... |
load_extensions(self, [extension]) | self.extensions.update(load_extensions(self, [extension])) | def add_extension(self, extension): """Adds an extension after the environment was created. | ec25a0c3bbbbecdcbd48b113c09164e7961422d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14446/ec25a0c3bbbbecdcbd48b113c09164e7961422d6/environment.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
6447,
12,
2890,
16,
2710,
4672,
3536,
3655,
392,
2710,
1839,
326,
3330,
1703,
2522,
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,
527,
67,
6447,
12,
2890,
16,
2710,
4672,
3536,
3655,
392,
2710,
1839,
326,
3330,
1703,
2522,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if attrname[:1] == "_": | if attrname.startswith("_"): | def __getattr__(self, attrname): if attrname[:1] == "_": raise AttributeError return SingularFunction(self, attrname) | 443d3dbfb0aff68e6fe626ac4f663d9414e4ca30 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/443d3dbfb0aff68e6fe626ac4f663d9414e4ca30/singular.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
1604,
529,
4672,
309,
1604,
529,
18,
17514,
1918,
2932,
9548,
4672,
1002,
6394,
327,
348,
17830,
2083,
12,
2890,
16,
1604,
529,
13,
2,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
1604,
529,
4672,
309,
1604,
529,
18,
17514,
1918,
2932,
9548,
4672,
1002,
6394,
327,
348,
17830,
2083,
12,
2890,
16,
1604,
529,
13,
2,
-100,
-100,
-... |
comDCB = win32file.GetCommState(self.hComPort) | def setRTS(self,level=1): """set terminal status line""" if not self.hComPort: raise portNotOpenError comDCB = win32file.GetCommState(self.hComPort) if level: comDCB.fRtsControl = win32file.RTS_CONTROL_ENABLE; else: comDCB.fRtsControl = win32file.RTS_CONTROL_DISABLE; win32file.SetCommState(self.hComPort, comDCB) | c2bd4e3557ea531de77e4cacaa56070458abea45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/c2bd4e3557ea531de77e4cacaa56070458abea45/serialwin32.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
54,
8047,
12,
2890,
16,
2815,
33,
21,
4672,
3536,
542,
8651,
1267,
980,
8395,
309,
486,
365,
18,
76,
799,
2617,
30,
1002,
1756,
1248,
3678,
668,
309,
1801,
30,
532,
5528,
38,
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,
444,
54,
8047,
12,
2890,
16,
2815,
33,
21,
4672,
3536,
542,
8651,
1267,
980,
8395,
309,
486,
365,
18,
76,
799,
2617,
30,
1002,
1756,
1248,
3678,
668,
309,
1801,
30,
532,
5528,
38,
18... | |
ScalarType = [_types.IntType, _types.FloatType, _types.ComplexType, _types.LongType, _types.BooleanType, _types.StringType, _types.UnicodeType, _types.BufferType] | try: ScalarType = [_types.IntType, _types.FloatType, _types.ComplexType, _types.LongType, _types.BooleanType, _types.StringType, _types.UnicodeType, _types.BufferType] except AttributeError: ScalarType = [int, float, complex, int, bool, bytes, str, memoryview] | def sctype2char(sctype): """ Return the string representation of a scalar dtype. Parameters ---------- sctype : scalar dtype or object If a scalar dtype, the corresponding string character is returned. If an object, `sctype2char` tries to infer its scalar type and then return the corresponding string character. Returns ------- typechar : str The string character corresponding to the scalar type. Raises ------ ValueError If `sctype` is an object for which the type can not be inferred. See Also -------- obj2sctype, issctype, issubsctype, mintypecode Examples -------- >>> for sctype in [np.int32, np.float, np.complex, np.string_, np.ndarray]: ... print np.sctype2char(sctype) l d D S O >>> x = np.array([1., 2-1.j]) >>> np.sctype2char(x) 'D' >>> np.sctype2char(list) 'O' """ sctype = obj2sctype(sctype) if sctype is None: raise ValueError, "unrecognized type" return _sctype2char_dict[sctype] | 686f1b98cdef9562e1e00b4ee4c3957acdbf7c19 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/686f1b98cdef9562e1e00b4ee4c3957acdbf7c19/numerictypes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
12387,
22,
3001,
12,
87,
12387,
4672,
3536,
2000,
326,
533,
4335,
434,
279,
4981,
3182,
18,
225,
7012,
12181,
272,
12387,
294,
4981,
3182,
578,
733,
971,
279,
4981,
3182,
16,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
12387,
22,
3001,
12,
87,
12387,
4672,
3536,
2000,
326,
533,
4335,
434,
279,
4981,
3182,
18,
225,
7012,
12181,
272,
12387,
294,
4981,
3182,
578,
733,
971,
279,
4981,
3182,
16,
326,
... |
if result != test_expectations.PASS: failed_results_by_test[test] = result if result in failed_results_by_type: failed_results_by_type.add(test) else: failed_results_by_type = set([test]) | if (result == test_expectations.PASS or result == test_expectations.CRASH and not include_crashes): continue failed_results_by_test[test] = result if result in failed_results_by_type: failed_results_by_type.add(test) else: failed_results_by_type = set([test]) | def _OnlyFailures(self, results_by_test): """Filters a dict of results and returns only the failures. | 8eb9e118605bb8f15bc8a832a7d49b47f0d4cdf7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/8eb9e118605bb8f15bc8a832a7d49b47f0d4cdf7/run_webkit_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3386,
14479,
12,
2890,
16,
1686,
67,
1637,
67,
3813,
4672,
3536,
5422,
279,
2065,
434,
1686,
471,
1135,
1338,
326,
11720,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3386,
14479,
12,
2890,
16,
1686,
67,
1637,
67,
3813,
4672,
3536,
5422,
279,
2065,
434,
1686,
471,
1135,
1338,
326,
11720,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<cds.TITLE>Blah., A</cds.TITLE> | <cds.TITLE>Phys. Rev. D</cds.TITLE> | def move_tagged_series_into_tagged_title(line): """Moves a marked-up series item into a marked-up title. E.g.: should change <cds.TITLE>Blah</cds.TITLE> <cds.SER>A</cds.SER> into: <cds.TITLE>Blah., A</cds.TITLE> @param line: (string) - the line in which a series tagged item is to be moved into title tags. @return: (string) - the line after the series items have been moved into the title tags. """ ## Seek a marked-up series occurrence in line: m_tagged_series = sre_title_followed_by_series_markup_tags.search(line) while m_tagged_series is not None: ## tagged series found in line - try to remove it and put it into the title: entire_match = m_tagged_series.group(0) ## the entire match (e.g.<cds.TITLE>xxxxx</cds.TITLE <cds.SER>A</cds.SER>) title_match = m_tagged_series.group(2) ## the string matched between <cds.TITLE></cds.TITLE> tags series_match = m_tagged_series.group(3) ## the series information matched between <cds.SER></cds.SER> tags. corrected_title_text = title_match ## If there is no comma in the matched title, add one to the end of it before the series info is ## added. If there is already a comma present, discard the series info (as there is already a series) if corrected_title_text.find(",") == -1: corrected_title_text = corrected_title_text.rstrip() if corrected_title_text[-1] == ".": corrected_title_text += ", %s" % series_match else: corrected_title_text += "., %s" % series_match elif corrected_title_text.rstrip()[-1:] == ",": ## There is a "," at the end of the title, but no series present. ## add it: corrected_title_text = corrected_title_text.rstrip() + " %s" % series_match line = sre.sub("%s" % sre.escape(entire_match), "<cds.TITLE>%s</cds.TITLE>" % corrected_title_text, line, 1) m_tagged_series = sre_title_followed_by_series_markup_tags.search(line) return line | 06e1f6c9bb10ab9175e96f2de6524a05a4a7ba7a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/06e1f6c9bb10ab9175e96f2de6524a05a4a7ba7a/refextract.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
67,
23023,
67,
10222,
67,
18591,
67,
23023,
67,
2649,
12,
1369,
4672,
3536,
19297,
279,
9350,
17,
416,
4166,
761,
1368,
279,
9350,
17,
416,
2077,
18,
512,
18,
75,
29710,
1410,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
67,
23023,
67,
10222,
67,
18591,
67,
23023,
67,
2649,
12,
1369,
4672,
3536,
19297,
279,
9350,
17,
416,
4166,
761,
1368,
279,
9350,
17,
416,
2077,
18,
512,
18,
75,
29710,
1410,
25... |
logging.warning("You passed an uid to login_to_uid(): %d (guess its login is « %s » )." % (login, UsersController.users[login]['login'])) | logging.warning("You passed an uid to login_to_uid():" " %d (guess its login is « %s » )." % ( login, UsersController.users[login]['login'])) | def login_to_uid(login): """ Return the uid of the user 'login' """ try: # use the cache, Luke ! return UsersController.login_cache[login] except KeyError: try: int(login) logging.warning("You passed an uid to login_to_uid(): %d (guess its login is « %s » )." % (login, UsersController.users[login]['login'])) except ValueError: pass raise exceptions.LicornRuntimeException(logging.SYSU_USER_DOESNT_EXIST % login) | 2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3925,
67,
869,
67,
1911,
12,
5819,
4672,
3536,
2000,
326,
4555,
434,
326,
729,
296,
5819,
11,
3536,
775,
30,
468,
999,
326,
1247,
16,
511,
89,
4491,
401,
327,
12109,
2933,
18,
5819,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3925,
67,
869,
67,
1911,
12,
5819,
4672,
3536,
2000,
326,
4555,
434,
326,
729,
296,
5819,
11,
3536,
775,
30,
468,
999,
326,
1247,
16,
511,
89,
4491,
401,
327,
12109,
2933,
18,
5819,
... |
logger = logging.getLogger('zc.zrs.primary') | logger = logging.getLogger('zc.zrs') | def commit(): global now now += 1 transaction.commit() | 9001dd32669f93d4ec155c1248b1456bbdb3f174 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5474/9001dd32669f93d4ec155c1248b1456bbdb3f174/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3294,
13332,
2552,
2037,
2037,
1011,
404,
2492,
18,
7371,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
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,
3294,
13332,
2552,
2037,
2037,
1011,
404,
2492,
18,
7371,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.db_field_map = {} | def load_state(self): """ Loads the state of the datagrid. | 0e2cb566456d1b880933206cd3b3189ad767d11c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6757/0e2cb566456d1b880933206cd3b3189ad767d11c/grids.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
2019,
12,
2890,
4672,
3536,
4444,
87,
326,
919,
434,
326,
1150,
22239,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
2019,
12,
2890,
4672,
3536,
4444,
87,
326,
919,
434,
326,
1150,
22239,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
if not vis_dic: | if vis_dic is _marker: | def isVisible(self, instance, mode='view'): """decide if a field is visible in a given mode -> 'state' visible, hidden, invisible""" # example: visible = { 'edit' :'hidden', 'view' : 'invisible' } vis_dic = getattr(aq_base(self), 'visible', None) state = 'visible' if not vis_dic: return state # ugly hack ... if type(vis_dic) == DictType: state = vis_dic.get(mode, state) return state | 3ed58fcf89d7ce8a1fa17bc1be427669bbd3dbcb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/3ed58fcf89d7ce8a1fa17bc1be427669bbd3dbcb/Widget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20453,
12,
2890,
16,
791,
16,
1965,
2218,
1945,
11,
4672,
3536,
4924,
831,
309,
279,
652,
353,
6021,
316,
279,
864,
1965,
317,
296,
2019,
11,
6021,
16,
5949,
16,
24697,
8395,
468,
3454... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20453,
12,
2890,
16,
791,
16,
1965,
2218,
1945,
11,
4672,
3536,
4924,
831,
309,
279,
652,
353,
6021,
316,
279,
864,
1965,
317,
296,
2019,
11,
6021,
16,
5949,
16,
24697,
8395,
468,
3454... |
_summaryThreshhold = threshold | _summaryThreshold = threshold | def set_printoptions(precision=None, threshold=None, edgeitems=None, linewidth=None, suppress=None): """Set options associated with printing. precision the default number of digits of precision for floating point output (default 8) threshold total number of array elements which trigger summarization rather than full repr. (default 1000) edgeitems number of array items in summary at beginning and end of each dimension. (default 3) linewidth the number of characters per line for the purpose of inserting line breaks. (default 75) suppress Boolean value indicating whether or not suppress printing of small floating point values using scientific notation (default False) """ global _summaryThreshhold, _summaryEdgeItems, _float_output_precision, \ _line_width, _float_output_suppress_small if (linewidth is not None): _line_width = linewidth if (threshold is not None): _summaryThreshhold = threshold if (edgeitems is not None): _summaryEdgeItems = edgeitems if (precision is not None): _float_output_precision = precision if (suppress is not None): _float_output_suppress_small = not not suppress return | 270c4fb03a62f84bf30e8a64918bc595c89e14f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/270c4fb03a62f84bf30e8a64918bc595c89e14f7/arrayprint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
1188,
2116,
12,
14548,
33,
7036,
16,
5573,
33,
7036,
16,
3591,
3319,
33,
7036,
16,
18795,
33,
7036,
16,
12257,
33,
7036,
4672,
3536,
694,
702,
3627,
598,
19171,
18,
225,
6039,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
1188,
2116,
12,
14548,
33,
7036,
16,
5573,
33,
7036,
16,
3591,
3319,
33,
7036,
16,
18795,
33,
7036,
16,
12257,
33,
7036,
4672,
3536,
694,
702,
3627,
598,
19171,
18,
225,
6039,... |
if req.user.has_privilege(BLOG_ADMIN) | if req.user.has_privilege(BLOG_ADMIN): | def add_eric_link(req, navigation_bar): """Called during the admin navigation bar setup. When the options menu is traversed we insert our eric the fish link before the plugins link. The outermost is the configuration editor, the next one the plugins link and then we add our fish link. """ if req.user.has_privilege(BLOG_ADMIN) return for link_id, url, title, children in navigation_bar: if link_id == 'options': children.insert(-3, ('eric_the_fish', url_for('eric_the_fish/config'), _('Eric The Fish'))) | bd3683cc38ae030dbc04abab1fb619a21fee2682 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12815/bd3683cc38ae030dbc04abab1fb619a21fee2682/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
3036,
67,
1232,
12,
3658,
16,
10394,
67,
3215,
4672,
3536,
8185,
4982,
326,
3981,
10394,
4653,
3875,
18,
5203,
326,
702,
3824,
353,
29062,
732,
2243,
3134,
225,
3036,
326,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
3036,
67,
1232,
12,
3658,
16,
10394,
67,
3215,
4672,
3536,
8185,
4982,
326,
3981,
10394,
4653,
3875,
18,
5203,
326,
702,
3824,
353,
29062,
732,
2243,
3134,
225,
3036,
326,
284,
... |
result = self.timeLeftUtil.getTimeLeft() | result = self.timeLeftUtil.getTimeLeft(0.0) | def execute(self): """The JobAgent execution method. """ jobManager = RPCClient('WorkloadManagement/JobManager') if self.jobCount: #Only call timeLeft utility after a job has been picked up self.log.info('Attempting to check CPU time left for filling mode') if self.fillingMode: if self.timeLeftError: self.log.warn(self.timeLeftError) return self.__finish(self.timeLeftError) self.log.info('%s normalized CPU units remaining in slot' %(self.timeLeft)) # Need to update the Configuration so that the new value is published in the next matching request result = self.computingElement.setCPUTimeLeft( cpuTimeLeft=self.timeLeft ) if not result['OK']: return self.__finish(result['Message']) ceJDL = self.computingElement.getJDL() resourceJDL = ceJDL['Value'] else: return self.__finish('Filling Mode is Disabled') | 08afc1aa72c2d9c088b84efd09c46cacb7003405 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/08afc1aa72c2d9c088b84efd09c46cacb7003405/JobAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
3536,
1986,
3956,
3630,
4588,
707,
18,
3536,
1719,
1318,
225,
273,
8295,
1227,
2668,
2421,
945,
10998,
19,
2278,
1318,
6134,
309,
365,
18,
4688,
1380,
30,
468,
3386... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4672,
3536,
1986,
3956,
3630,
4588,
707,
18,
3536,
1719,
1318,
225,
273,
8295,
1227,
2668,
2421,
945,
10998,
19,
2278,
1318,
6134,
309,
365,
18,
4688,
1380,
30,
468,
3386... |
pass | pass | def proxyval(self): ''' Support for new-style classes. | da0826ad3b0eb43fced4ade908a2dffee15e426b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6942/da0826ad3b0eb43fced4ade908a2dffee15e426b/python-gdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2889,
1125,
12,
2890,
4672,
9163,
13619,
364,
394,
17,
4060,
3318,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2889,
1125,
12,
2890,
4672,
9163,
13619,
364,
394,
17,
4060,
3318,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
metadata.bind = 'sqlite:///' | def pre_any(self): global before_any_called before_any_called += 1 | a86386040cf0d103d8140304c5281f7ee220a218 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11921/a86386040cf0d103d8140304c5281f7ee220a218/test_events.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
675,
67,
2273,
12,
2890,
4672,
2552,
1865,
67,
2273,
67,
11777,
1865,
67,
2273,
67,
11777,
1011,
404,
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,
675,
67,
2273,
12,
2890,
4672,
2552,
1865,
67,
2273,
67,
11777,
1865,
67,
2273,
67,
11777,
1011,
404,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
all_attributes = [i for i in t.domain.attributes]+[t.domain.classVar] | all_attributes = [i for i in t.domain.attributes] if t.domain.classVar: all_attributes += [t.domain.classVar] | def _prepare(self, t): # prepares an Orange table so that it doesn't contain continuous # attributes or missing values | 9d6a24c2d7e3629c08d906da9ab0934a3539faeb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/9d6a24c2d7e3629c08d906da9ab0934a3539faeb/orngInteract.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9366,
12,
2890,
16,
268,
4672,
468,
29294,
392,
2965,
726,
1014,
1427,
716,
518,
3302,
1404,
912,
17235,
468,
1677,
578,
3315,
924,
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,
0,
0,
0,
0,
0,
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,
9366,
12,
2890,
16,
268,
4672,
468,
29294,
392,
2965,
726,
1014,
1427,
716,
518,
3302,
1404,
912,
17235,
468,
1677,
578,
3315,
924,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
f.write(self.DATA_FILE_TEMPLATE) | f.write(GtgConfig.DATA_FILE_TEMPLATE) | def main(self): | b72d97f9d91186890054082ae5fb25d744cbe6f4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7036/b72d97f9d91186890054082ae5fb25d744cbe6f4/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
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,
2774,
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,
-... |
r""" Number of labeled mappings from $n$ points to themselves (endofunctions): $n^n$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000312;a Number of labeled mappings from n points to themselves (endofunctions): n^n. sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be an integer >= 0 sage: a(0) 1 sage: a(1) 1 sage: a(9) 387420489 sage: a.list(11) [1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489, 10000000000] AUTHOR: -- Jaap Spies (2007-01-26) """ def __init__(self): | def __init__(self): r""" Number of labeled mappings from $n$ points to themselves (endofunctions): $n^n$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000312;a Number of labeled mappings from n points to themselves (endofunctions): n^n. sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be an integer >= 0 sage: a(0) 1 sage: a(1) 1 sage: a(9) 387420489 sage: a.list(11) [1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489, 10000000000] AUTHOR: -- Jaap Spies (2007-01-26) """ | def _eval(self, n): return Integer(n**(n-2)) | 69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2144,
12,
82,
636,
12,
82,
17,
22,
3719,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2144,
12,
82,
636,
12,
82,
17,
22,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
command+=" --m-low " + minmtotal + " --m-high " + maxmtotal + " --m-dm " +opts.m_dm | command+=" --m-low " + str(2.0*float(mass_dict["min-mass"])) + " --m-high " +\ str(2.0*float(mass_dict["max-mass"])) + " --m-dm " + mass_dict["m-dm"] | def symlinksafe( target, linkname ): """ Creates a link, does not nag about when it already exists """ try: os.symlink( target, linkname ) except OSError, (errno, strerror): if errno==17: print "WARNING: link %s already exist" % (linkname) else: raise | 6ad3c83b17a791224c0765a4003cd99798d403c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/6ad3c83b17a791224c0765a4003cd99798d403c1/upperlimit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10563,
4626,
12,
1018,
16,
1692,
529,
262,
30,
3536,
10210,
279,
1692,
16,
1552,
486,
290,
346,
2973,
1347,
518,
1818,
1704,
3536,
775,
30,
1140,
18,
21278,
12,
1018,
16,
1692,
529,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10563,
4626,
12,
1018,
16,
1692,
529,
262,
30,
3536,
10210,
279,
1692,
16,
1552,
486,
290,
346,
2973,
1347,
518,
1818,
1704,
3536,
775,
30,
1140,
18,
21278,
12,
1018,
16,
1692,
529,
26... |
staticdir = (root == path.join(outdir, '_static')) | staticdir = root.startswith(path.join(outdir, '_static')) | def build_hhx(self, outdir, outname): self.info('dumping stopword list...') f = self.open_file(outdir, outname+'.stp') try: for word in sorted(stopwords): print >>f, word finally: f.close() | 1507169887c3f3965b004b860ddf0911401523a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/1507169887c3f3965b004b860ddf0911401523a7/htmlhelp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
21622,
92,
12,
2890,
16,
15398,
16,
596,
529,
4672,
365,
18,
1376,
2668,
13302,
1382,
2132,
1095,
666,
7821,
13,
284,
273,
365,
18,
3190,
67,
768,
12,
659,
1214,
16,
596,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
21622,
92,
12,
2890,
16,
15398,
16,
596,
529,
4672,
365,
18,
1376,
2668,
13302,
1382,
2132,
1095,
666,
7821,
13,
284,
273,
365,
18,
3190,
67,
768,
12,
659,
1214,
16,
596,
5... |
rel = obj | rel = obj.copy() | def match_release_event(self, obj): rel = ReleaseEvent() if isinstance(obj, ReleaseEvent): rel = obj elif isinstance(obj, Metadata): rel.from_metadata(obj) elif isinstance(obj, File): if obj.metadata: rel.from_metadata(obj.metadata) else: self.log.error("Unsupported type given") return | eb47c08d5f4a9fb1fa16404a8e275d8f8cb800d1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12415/eb47c08d5f4a9fb1fa16404a8e275d8f8cb800d1/album.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
845,
67,
9340,
67,
2575,
12,
2890,
16,
1081,
4672,
1279,
273,
10819,
1133,
1435,
309,
1549,
12,
2603,
16,
10819,
1133,
4672,
1279,
273,
1081,
18,
3530,
1435,
1327,
1549,
12,
2603,
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,
845,
67,
9340,
67,
2575,
12,
2890,
16,
1081,
4672,
1279,
273,
10819,
1133,
1435,
309,
1549,
12,
2603,
16,
10819,
1133,
4672,
1279,
273,
1081,
18,
3530,
1435,
1327,
1549,
12,
2603,
16,
... |
index = 0 | def UpdateProfiles (self, default = _("Default")): self.Context.Read () self.Context.UpdateProfiles () | 3ac61daed7b38b15dd56283f1f62118233306460 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7183/3ac61daed7b38b15dd56283f1f62118233306460/Pages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2315,
12450,
261,
2890,
16,
805,
273,
389,
2932,
1868,
6,
3719,
30,
365,
18,
1042,
18,
1994,
1832,
365,
18,
1042,
18,
1891,
12450,
1832,
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,
2315,
12450,
261,
2890,
16,
805,
273,
389,
2932,
1868,
6,
3719,
30,
365,
18,
1042,
18,
1994,
1832,
365,
18,
1042,
18,
1891,
12450,
1832,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
if entry: | if entry or field == 'definition': | def query(self, target, query): fields = 'affix|class|type|notes|cll|url|components' | 2647341084e94e67706cee529a9cbd53bc3ecc50 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12705/2647341084e94e67706cee529a9cbd53bc3ecc50/irc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
12,
2890,
16,
1018,
16,
843,
4672,
1466,
273,
296,
1727,
904,
96,
1106,
96,
723,
96,
12903,
96,
830,
80,
96,
718,
96,
8119,
11,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
12,
2890,
16,
1018,
16,
843,
4672,
1466,
273,
296,
1727,
904,
96,
1106,
96,
723,
96,
12903,
96,
830,
80,
96,
718,
96,
8119,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
for activity_info in activities_info: activities.append(activity_info) bundle_id = activities[0].bundle_id | if len(activities): bundle_id = activities[0].bundle_id | def __stop_response_cb(self, alert, response_id): if response_id is gtk.RESPONSE_APPLY: logging.debug('Start application with downloaded object') from sugar.activity import activityfactory from sugar import activity activities_info = activity.get_registry().get_activities_for_type( self._mime_type) activities = [] bundle_id = None for activity_info in activities_info: activities.append(activity_info) bundle_id = activities[0].bundle_id if bundle_id is not None: logging.debug('--> Found activity to open mime=%s bundle_id=%s' %(self._mime_type, bundle_id)) activityfactory.create_with_object_id(bundle_id, self._object_id) else: logging.debug('--> Can not open mime=%s'%(self._mime_type)) _activity.remove_alert(alert) | 76d1c7256181ef2dc1cd052f93310e2910d81179 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6905/76d1c7256181ef2dc1cd052f93310e2910d81179/downloadmanager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
5681,
67,
2740,
67,
7358,
12,
2890,
16,
6881,
16,
766,
67,
350,
4672,
309,
766,
67,
350,
353,
22718,
18,
14508,
67,
2203,
23893,
30,
2907,
18,
4148,
2668,
1685,
2521,
598,
13549,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5681,
67,
2740,
67,
7358,
12,
2890,
16,
6881,
16,
766,
67,
350,
4672,
309,
766,
67,
350,
353,
22718,
18,
14508,
67,
2203,
23893,
30,
2907,
18,
4148,
2668,
1685,
2521,
598,
13549,... |
if 'TICKET_CHGPROP' not in req.perm: | if 'TICKET_CHGPROP' not in req.perm(resource): | def _validate_ticket(self, req, ticket): valid = True | 5f981e9e35c9750c2f2d12bcffc4a88288148bbb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2831/5f981e9e35c9750c2f2d12bcffc4a88288148bbb/web_ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5662,
67,
16282,
12,
2890,
16,
1111,
16,
9322,
4672,
923,
273,
1053,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
5662,
67,
16282,
12,
2890,
16,
1111,
16,
9322,
4672,
923,
273,
1053,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
log(2)*a + a*(z - 2)/2 - (a*(z - 2)^2/8) + a*(z - 2)^3/24 | log(2)*a + a*(z - 2)/2 - a*(z - 2)^2/8 + a*(z - 2)^3/24 | def taylor(self, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable v around the point a, containing terms through $(x - a)^n$. | b3ba17c1357de84983fbf0c3d95f1ba232a95810 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/b3ba17c1357de84983fbf0c3d95f1ba232a95810/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
528,
80,
280,
12,
2890,
16,
331,
16,
279,
16,
290,
4672,
3536,
7784,
5708,
365,
316,
279,
15282,
399,
528,
80,
280,
578,
511,
8377,
547,
4166,
316,
326,
2190,
331,
6740,
326,
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
528,
80,
280,
12,
2890,
16,
331,
16,
279,
16,
290,
4672,
3536,
7784,
5708,
365,
316,
279,
15282,
399,
528,
80,
280,
578,
511,
8377,
547,
4166,
316,
326,
2190,
331,
6740,
326,
16... |
theString = '%4s %*s %17s %3s %s' % ( network_id, gap,daemon.FormatSignalForPrinting( | encryption = wireless.GetWirelessProperty(network_id, 'encryption_method') if wireless.GetWirelessProperty(network_id, 'encryption') else 'Unsecured' theString = ' %*s %25s %9s %17s %6s: %s' % ( gap, daemon.FormatSignalForPrinting( | def gen_network_list(): #theList = [urwid.Text(gen_list_header())] #theList = [] # Pick which strength measure to use based on what the daemon says if daemon.GetSignalDisplayType() == 0: strenstr = 'quality' gap = 3 else: strenstr = 'strength' gap = 5 id = 0 wiredL = [] for profile in config.GetWiredProfileList(): #if id == 0: #theList.append(urwid.Text("Wired Network(s):")) #wired.append(urwid.Text(('body',"Wired Network(s):") ) ) theString = '%4s%*s' % (id, 32+len(profile),profile) #### THIS IS wired.blah() in experimental #print config.GetLastUsedWiredNetwork() # Tag if no wireless IP present, and wired one is is_active = wireless.GetWirelessIP() == None and wired.GetWiredIP() != None if is_active: theString = '>'+theString[1:] wiredL.append(urwid.AttrWrap(SelText(theString),'connected','connected focus')) else: wiredL.append(urwid.AttrWrap(SelText(theString),'body','focus')) id+=1 wlessL = [] for network_id in range(0, wireless.GetNumberOfNetworks()): #if network_id == 0: #wireless.append(urwid.Text(('body', "Wireless Network(s):")) ) theString = '%4s %*s %17s %3s %s' % ( network_id, gap,daemon.FormatSignalForPrinting( str(wireless.GetWirelessProperty(network_id, strenstr))), wireless.GetWirelessProperty(network_id, 'bssid'), wireless.GetWirelessProperty(network_id, 'channel'), wireless.GetWirelessProperty(network_id, 'essid')) # This returns -1 if no ID is found, so we I could put this outside of this # loop. I'll do that soon. is_active = wireless.GetPrintableSignalStrength("") != 0 and wireless.GetCurrentNetworkID(wireless.GetIwconfig())==network_id if is_active: theString = '>'+theString[1:] wlessL.append(urwid.AttrWrap(SelText(theString),'connected','connected focus')) else: wlessL.append(urwid.AttrWrap(SelText(theString),'body','focus')) #theList.append(SelText(theString)) return (wiredL,wlessL) | 7f8ca7837eebffd65cc3e4c9fef9e9f26f9e6383 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/353/7f8ca7837eebffd65cc3e4c9fef9e9f26f9e6383/wicd-curses.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
5185,
67,
1098,
13332,
468,
5787,
682,
273,
306,
295,
30902,
18,
1528,
12,
4507,
67,
1098,
67,
3374,
10756,
65,
468,
5787,
682,
273,
5378,
225,
468,
23038,
1492,
21638,
6649,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
5185,
67,
1098,
13332,
468,
5787,
682,
273,
306,
295,
30902,
18,
1528,
12,
4507,
67,
1098,
67,
3374,
10756,
65,
468,
5787,
682,
273,
5378,
225,
468,
23038,
1492,
21638,
6649,
... |
t = threading.Thread(target=f, args=args) t.start() | thread = threading.Thread(target = func, args=args) thread.start() | def wrapper(*args): t = threading.Thread(target=f, args=args) t.start() | 9d492cae068d04dccea7b824cceed2984729452a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7853/9d492cae068d04dccea7b824cceed2984729452a/GUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4053,
30857,
1968,
4672,
268,
273,
17254,
18,
3830,
12,
3299,
33,
74,
16,
833,
33,
1968,
13,
268,
18,
1937,
1435,
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,
4053,
30857,
1968,
4672,
268,
273,
17254,
18,
3830,
12,
3299,
33,
74,
16,
833,
33,
1968,
13,
268,
18,
1937,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.