rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
try: self.wikilog = codecs.open(arg[9:], 'a', 'utf-8') except IOError: self.wikilog = codecs.open(arg[9:], 'w', 'utf-8') | self.wikilogfile = arg[9:] | def __init__(self): for arg in wikipedia.handleArgs(): if arg.startswith('-from'): if arg.startswith('-from:'): self.apfrom = arg[6:] else: self.apfrom = wikipedia.input(u'Which page to start from: ') elif arg.startswith('-reqsize:'): self.aplimit = int(arg[9:]) elif arg == '-links': self.links = True elif arg == '-linksonly': self.links = True self.titles = False elif arg == '-replace': self.replace = True elif arg.startswith('-limit:'): self.stopAfter = int(arg[7:]) elif arg == '-verbose': self.verbose = True elif arg == '-autonomous': self.autonomous = True elif arg.startswith('-ns:'): self.namespaces.append( int(arg[4:]) ) elif arg.startswith('-wikilog:'): try: self.wikilog = codecs.open(arg[9:], 'a', 'utf-8') except IOError: self.wikilog = codecs.open(arg[9:], 'w', 'utf-8') else: wikipedia.output(u'Unknown argument %s.' % arg) wikipedia.showHelp() sys.exit() | ab9d478f34cfd6a362913f5c362599b2477e5c5e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/ab9d478f34cfd6a362913f5c362599b2477e5c5e/casechecker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
225,
364,
1501,
316,
21137,
18,
4110,
2615,
13332,
309,
1501,
18,
17514,
1918,
2668,
17,
2080,
11,
4672,
309,
1501,
18,
17514,
1918,
2668,
17,
2080,
2497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4672,
225,
364,
1501,
316,
21137,
18,
4110,
2615,
13332,
309,
1501,
18,
17514,
1918,
2668,
17,
2080,
11,
4672,
309,
1501,
18,
17514,
1918,
2668,
17,
2080,
2497... |
self.socket = TcpServerSocket(host='localhost', port=10024) | self.socket = TcpServerSocket(host='127.0.0.1', port=10024) | def __init__(self): | d90a852a57ffc9071f7ec455786675a802936251 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1504/d90a852a57ffc9071f7ec455786675a802936251/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
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,
-1... |
r, w, e = select.select([self.child_fd], [], [], 0) | try: r, w, e = select.select([self.child_fd], [], [], 0) except select.error, e: if e[0] != errno.EINTR: raise | def read_nonblocking (self, size = 1, timeout = -1): """This reads at most size characters from the child application. It includes a timeout. If the read does not complete within the timeout period then a TIMEOUT exception is raised. If the end of file is read then an EOF exception will be raised. If a log file was set using setlog() then all data will also be written to the log file. | 8732a05a200ead2cf317385136b05a78fa67c9a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9386/8732a05a200ead2cf317385136b05a78fa67c9a7/pexpect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
5836,
18926,
261,
2890,
16,
963,
273,
404,
16,
2021,
273,
300,
21,
4672,
3536,
2503,
6838,
622,
4486,
963,
3949,
628,
326,
1151,
2521,
18,
2597,
6104,
279,
2021,
18,
971,
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,
855,
67,
5836,
18926,
261,
2890,
16,
963,
273,
404,
16,
2021,
273,
300,
21,
4672,
3536,
2503,
6838,
622,
4486,
963,
3949,
628,
326,
1151,
2521,
18,
2597,
6104,
279,
2021,
18,
971,
326,... |
else | else: | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 324) else quickfix.StringField.__init__(self, 324, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
890,
3247,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
2738,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
890,
3247,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
2738,... |
assert "Content-Type: application/octet-stream" in meta['headers'] assert "Content-Length: %d" % len(data) in meta['headers'] | assert ("Content-Type", "application/octet-stream") in meta['headers'] assert ("Content-Length", len(data)) in meta['headers'] | def test_put_cache_minimal(self): """Test if put_cache() works""" request = self.request key = 'nooneknowsit' data = "dontcare" cache.put(request, key, data) url = cache.url(request, key) | 05b0e285b1c029b47f61a84e4eafc3dc8031fe62 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/05b0e285b1c029b47f61a84e4eafc3dc8031fe62/test_cache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
458,
67,
2493,
67,
1154,
2840,
12,
2890,
4672,
3536,
4709,
309,
1378,
67,
2493,
1435,
6330,
8395,
590,
273,
365,
18,
2293,
498,
273,
296,
2135,
476,
79,
3338,
25404,
11,
501,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
458,
67,
2493,
67,
1154,
2840,
12,
2890,
4672,
3536,
4709,
309,
1378,
67,
2493,
1435,
6330,
8395,
590,
273,
365,
18,
2293,
498,
273,
296,
2135,
476,
79,
3338,
25404,
11,
501,... |
print "TEST-PASS | %s | all tests passed" % test | print "TEST-PASS | %s | test passed" % test | def processLeakLog(leakLogFile): """Process the leak log.""" # For the time being, don't warn (nor "info") if the log file is not there. (Bug 469523) if not os.path.exists(leakLogFile): return None | cf60cf6b4ae0c36d22a30404921b677f5e48a587 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/cf60cf6b4ae0c36d22a30404921b677f5e48a587/runxpcshelltests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
1682,
581,
1343,
12,
298,
581,
19103,
4672,
3536,
2227,
326,
20891,
613,
12123,
468,
2457,
326,
813,
3832,
16,
2727,
1404,
1894,
261,
29561,
315,
1376,
7923,
309,
326,
613,
585,
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,
1207,
1682,
581,
1343,
12,
298,
581,
19103,
4672,
3536,
2227,
326,
20891,
613,
12123,
468,
2457,
326,
813,
3832,
16,
2727,
1404,
1894,
261,
29561,
315,
1376,
7923,
309,
326,
613,
585,
35... |
elif client_clock <= self.last_modified: | elif client_clock >= int(self.last_modified): | def __call__(self, environ, start_response): headers = self.headers[:] if self.expires is not None: replace_header(headers,'expires', formatdate(time.time()+self.expires)) | 60714441369b53b6db6a83ae4c92c7f9eb281fc0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/60714441369b53b6db6a83ae4c92c7f9eb281fc0/fileapp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
5473,
16,
787,
67,
2740,
4672,
1607,
273,
365,
18,
2485,
10531,
65,
309,
365,
18,
12431,
353,
486,
599,
30,
1453,
67,
3374,
12,
2485,
11189,
12431,
2187,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
5473,
16,
787,
67,
2740,
4672,
1607,
273,
365,
18,
2485,
10531,
65,
309,
365,
18,
12431,
353,
486,
599,
30,
1453,
67,
3374,
12,
2485,
11189,
12431,
2187,... |
if parent and parent.layout(): | if parent and parent.layout() is not None: | def __init__(self, parent = None): self.canvas = QGraphicsScene(0, 0, 1000, colorButtonSize) QGraphicsView.__init__(self, self.canvas, parent) self.ensureVisible(0,0,1,1) self.color1 = None self.color2 = None self.rgbColors = [] self.passThroughColors = None | ff163078abb06bed64d4fe6349c8cafcb4ccbac7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/ff163078abb06bed64d4fe6349c8cafcb4ccbac7/OWColorPalette.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
273,
599,
4672,
365,
18,
15424,
273,
2238,
17558,
14370,
12,
20,
16,
374,
16,
4336,
16,
2036,
3616,
1225,
13,
2238,
17558,
1767,
16186,
2738,
972,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
273,
599,
4672,
365,
18,
15424,
273,
2238,
17558,
14370,
12,
20,
16,
374,
16,
4336,
16,
2036,
3616,
1225,
13,
2238,
17558,
1767,
16186,
2738,
972,
1... |
if skip: continue | if skip: continue | def get_search_urls(self, protocol='any', results_per_type=10, host_only=False, filetypes=['any'], search_mode=default_search_mode): ''' construct a list of urls based on the wordlist, filetypes and protocol. ''' plog('INFO', 'Searching google for relevant sites...') urllist = Set([]) for filetype in filetypes: type_urls = Set([]) while len(type_urls) < results_per_type: query = random.choice(self.wordlist) if filetype != 'any': query += " "+search_mode["filetype"]+filetype if protocol != 'any' and search_mode["inurl"]: query += " "+search_mode["inurl"]+protocol # this isn't too reliable, but we'll re-filter results later #query += '&num=' + `g_results_per_page` # search google for relevant pages # note: google only accepts requests from idenitified browsers host = search_mode["host"] params = urllib.urlencode({search_mode["query"] : query}) search_path = '/search' + '?' + params search_url = "http://"+host+search_path plog("INFO", "Search url: "+search_url) try: if search_mode["useragent"]: (code, resp_headers, new_cookies, mime_type, content) = http_request(search_url, search_cookies) else: headers = filter(lambda h: h[0] != "User-Agent", copy.copy(firefox_headers)) (code, resp_headers, new_cookies, mime_type, content) = http_request(search_url, search_cookies, headers) except socket.gaierror: plog('ERROR', 'Scraping of http://'+host+search_path+" failed") traceback.print_exc() return list(urllist) except: plog('ERROR', 'Scraping of http://'+host+search_path+" failed") traceback.print_exc() # Bloody hack just to run some tests overnight return [protocol+"://www.eff.org", protocol+"://www.fastmail.fm", protocol+"://www.torproject.org", protocol+"://secure.wikileaks.org/"] links = SoupStrainer('a') try: soup = TheChosenSoup(content, parseOnlyThese=links) except Exception: plog('ERROR', 'Soup-scraping of http://'+host+search_path+" failed") traceback.print_exc() print "Content is: "+str(content) return [protocol+"://www.eff.org", protocol+"://www.fastmail.fm", protocol+"://www.torproject.org", protocol+"://secure.wikileaks.org/"] # get the links and do some additional filtering for link in soup.findAll('a'): skip = True for a in link.attrs: if a[0] == "class" and search_mode["class"] in a[1]: skip = False break if skip: continue if link.has_key(search_mode['realtgt']): url = link[search_mode['realtgt']] else: url = link['href'] if protocol == 'any': prot_list = None else: prot_list = [protocol] if filetype == 'any': file_list = None else: file_list = filetypes | 66eda46415e31c1e17a158bdfb92fc82dc56f58c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3762/66eda46415e31c1e17a158bdfb92fc82dc56f58c/soat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3072,
67,
10518,
12,
2890,
16,
1771,
2218,
2273,
2187,
1686,
67,
457,
67,
723,
33,
2163,
16,
1479,
67,
3700,
33,
8381,
16,
661,
15180,
33,
3292,
2273,
17337,
1623,
67,
3188,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3072,
67,
10518,
12,
2890,
16,
1771,
2218,
2273,
2187,
1686,
67,
457,
67,
723,
33,
2163,
16,
1479,
67,
3700,
33,
8381,
16,
661,
15180,
33,
3292,
2273,
17337,
1623,
67,
3188,
... |
tls_params.append(tls(T=T,L=L,S=S,origin=origin,selection_string=sel_str)) | new_c = "" for i,c in enumerate(sel_str): try: cl = sel_str[i-1] except: cl = c if(c=="-" and cl.isdigit()): c = ":" new_c += c sel_str = new_c tls_params.append(tls( t=T,l=L,s=S,origin=origin,selection_string=sel_str.lower())) if(tls_present and len(tls_params)==0): format_err(msg="TLS matrices are present in PDB file but cannot be extracted.", file_name = file_name) return [] chain_ids_new_u = [c.upper() for c in chain_ids] chain_ids_new_l = [c.lower() for c in chain_ids] if(len(tls_params)>0): if(chain_ids_new_u!=chain_ids and chain_ids_new_l!=chain_ids): format_err(msg="Mixed chain ids detected.", file_name = file_name) print chain_ids return [] | def extract_tls_parameters(remark_3_records, file_name = ""): | 750096ae523db6b885cc59e3cbd10e2c8a7b6c55 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/696/750096ae523db6b885cc59e3cbd10e2c8a7b6c55/remark_3_interpretation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
17116,
67,
3977,
12,
2764,
1313,
67,
23,
67,
7094,
16,
585,
67,
529,
273,
1408,
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,
... | [
1,
1,
1,
1,
1,
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,
2608,
67,
17116,
67,
3977,
12,
2764,
1313,
67,
23,
67,
7094,
16,
585,
67,
529,
273,
1408,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
assert(order == ['first','second','third',default_dir()]) | assert(order == ['first','second','third',catalog.default_dir()]) | def check_build_search_order1(self): """ MODULE in search path should be replaced by module_dir. """ q = catalog.catalog(['first','MODULE','third']) q.set_module_directory('second') order = q.build_search_order() assert(order == ['first','second','third',default_dir()]) | fb838538d73bb3cc154ab6ad47c96d1bb9f12f0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/fb838538d73bb3cc154ab6ad47c96d1bb9f12f0d/test_catalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
3510,
67,
3072,
67,
1019,
21,
12,
2890,
4672,
3536,
14057,
316,
1623,
589,
1410,
506,
8089,
635,
1605,
67,
1214,
18,
3536,
1043,
273,
6222,
18,
7199,
12,
3292,
3645,
17023,
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,
866,
67,
3510,
67,
3072,
67,
1019,
21,
12,
2890,
4672,
3536,
14057,
316,
1623,
589,
1410,
506,
8089,
635,
1605,
67,
1214,
18,
3536,
1043,
273,
6222,
18,
7199,
12,
3292,
3645,
17023,
12... |
k = 1 | k = self._k | def gen(self,a0,a1,d): """ """ x, y = ZZ(a0), ZZ(a1) k = 1 yield x while True: k = k+1 x, y = y, k*y+(k-d)*x yield x | 7b02e5455d5d52d6dcc7f2314cdd56803031a1c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b02e5455d5d52d6dcc7f2314cdd56803031a1c6/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
12,
2890,
16,
69,
20,
16,
69,
21,
16,
72,
4672,
3536,
225,
3536,
619,
16,
677,
273,
2285,
62,
12,
69,
20,
3631,
2285,
62,
12,
69,
21,
13,
417,
273,
365,
6315,
79,
2824,
619... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
69,
20,
16,
69,
21,
16,
72,
4672,
3536,
225,
3536,
619,
16,
677,
273,
2285,
62,
12,
69,
20,
3631,
2285,
62,
12,
69,
21,
13,
417,
273,
365,
6315,
79,
2824,
619... |
</td></tr>''' % { 'more': create_html_link(self.build_search_url(p='cocitedwith:%d' % row['recid'], ln=ln), | </td></tr>''' % { 'more': create_html_link(self.build_search_url(p='cocitedwith:%d' % recID, ln=ln), | def tmpl_detailed_record_statistics(self, recID, ln, citinglist, citationhistory, cociting, downloadsimilarity, downloadhistory, viewsimilarity): """Returns the statistics page of a record | 712d62b0159c5a6e8ad0f202024d70e554c31010 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2139/712d62b0159c5a6e8ad0f202024d70e554c31010/websearch_templates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
72,
6372,
67,
3366,
67,
14438,
12,
2890,
16,
1950,
734,
16,
7211,
16,
276,
305,
310,
1098,
16,
21145,
8189,
16,
276,
504,
305,
310,
16,
4224,
22985,
560,
16,
4224,
8189,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
72,
6372,
67,
3366,
67,
14438,
12,
2890,
16,
1950,
734,
16,
7211,
16,
276,
305,
310,
1098,
16,
21145,
8189,
16,
276,
504,
305,
310,
16,
4224,
22985,
560,
16,
4224,
8189,
1... |
for path, kind, chg, bpath, brev in changeset.get_changes(): files.append(chg == Changeset.DELETE and bpath or path) | for cpath, kind, chg, bpath, brev in changeset.get_changes(): files.append(chg == Changeset.DELETE and bpath or cpath) | def make_log_href(path, **args): link_rev = rev if rev == str(repos.youngest_rev): link_rev = None params = {'rev': link_rev, 'mode': mode, 'limit': limit} params.update(args) if verbose: params['verbose'] = verbose return req.href.log(path, **params) | 4eff46fef8d0761b92294464ce2db1858353a8c1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/4eff46fef8d0761b92294464ce2db1858353a8c1/log.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
1330,
67,
7547,
12,
803,
16,
2826,
1968,
4672,
1692,
67,
9083,
273,
5588,
309,
5588,
422,
609,
12,
15564,
18,
93,
465,
17592,
67,
9083,
4672,
1692,
67,
9083,
273,
599,
859,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
1330,
67,
7547,
12,
803,
16,
2826,
1968,
4672,
1692,
67,
9083,
273,
5588,
309,
5588,
422,
609,
12,
15564,
18,
93,
465,
17592,
67,
9083,
4672,
1692,
67,
9083,
273,
599,
859,
... |
with self._lock: | with phil: | def value(self): """ Deprecated alias for dataset[...] and dataset[()] """ with self._lock: arr = self[...] #if arr.shape == (): # return numpy.asscalar(arr) return arr | b1a598a2d723040490bcce9fa07057de259dfbab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10380/b1a598a2d723040490bcce9fa07057de259dfbab/highlevel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
460,
12,
2890,
4672,
3536,
225,
9336,
2308,
364,
3709,
63,
2777,
65,
471,
3709,
63,
1435,
65,
3536,
598,
1844,
330,
30,
2454,
273,
365,
63,
2777,
65,
468,
430,
2454,
18,
4867,
422,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
460,
12,
2890,
4672,
3536,
225,
9336,
2308,
364,
3709,
63,
2777,
65,
471,
3709,
63,
1435,
65,
3536,
598,
1844,
330,
30,
2454,
273,
365,
63,
2777,
65,
468,
430,
2454,
18,
4867,
422,
1... |
" non-zero with this error:\n%s" % stderr) | " non-zero with this error:\n%s" % stderr.decode('utf8')) | def test_wait_when_sigchild_ignored(self): # NOTE: sigchild_ignore.py may not be an effective test on all OSes. sigchild_ignore = support.findfile("sigchild_ignore.py", subdir="subprocessdata") p = subprocess.Popen([sys.executable, sigchild_ignore], stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = p.communicate() self.assertEqual(0, p.returncode, "sigchild_ignore.py exited" " non-zero with this error:\n%s" % stderr) | 773d7dffb1fa20fa1a434e326d66515d3bfd43fb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/773d7dffb1fa20fa1a434e326d66515d3bfd43fb/test_subprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7048,
67,
13723,
67,
7340,
3624,
67,
24055,
12,
2890,
4672,
468,
5219,
30,
3553,
3624,
67,
6185,
18,
2074,
2026,
486,
506,
392,
11448,
1842,
603,
777,
5932,
281,
18,
3553,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7048,
67,
13723,
67,
7340,
3624,
67,
24055,
12,
2890,
4672,
468,
5219,
30,
3553,
3624,
67,
6185,
18,
2074,
2026,
486,
506,
392,
11448,
1842,
603,
777,
5932,
281,
18,
3553,
36... |
return filename, f.f_lineno, co.co_name | rv = (filename, f.f_lineno, co.co_name) break return rv | def findCaller(self): """ Find the stack frame of the caller so that we can note the source file name, line number and function name. """ f = currentframe().f_back while 1: co = f.f_code filename = os.path.normcase(co.co_filename) if filename == _srcfile: f = f.f_back continue return filename, f.f_lineno, co.co_name | 7892b019547b7a367f20cb81f983d537d5156106 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7892b019547b7a367f20cb81f983d537d5156106/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
11095,
12,
2890,
4672,
3536,
4163,
326,
2110,
2623,
434,
326,
4894,
1427,
716,
732,
848,
4721,
326,
1084,
585,
508,
16,
980,
1300,
471,
445,
508,
18,
3536,
284,
273,
783,
3789,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
11095,
12,
2890,
4672,
3536,
4163,
326,
2110,
2623,
434,
326,
4894,
1427,
716,
732,
848,
4721,
326,
1084,
585,
508,
16,
980,
1300,
471,
445,
508,
18,
3536,
284,
273,
783,
3789,
7... |
or md['EXIF_ExifVersion'] != '021' \ or md['EXIF_XResolution'] != '(96)' \ or md['EXIF_GPSLatitudeRef'] != 'N': | or md['EXIF_ExifVersion'] != '0210' \ or md['EXIF_XResolution'] != '(96)': | def jpeg_2(): ds = gdal.Open( 'data/albania.jpg' ) md = ds.GetMetadata() try: if md['EXIF_GPSLatitudeRef'] != 'N' \ or md['EXIF_GPSLatitude'] != '(41) (1) (22.91)' \ or md['EXIF_PixelXDimension'] != '361' \ or md['EXIF_GPSVersionID'] != '0x2 00 00 00' \ or md['EXIF_ExifVersion'] != '021' \ or md['EXIF_XResolution'] != '(96)' \ or md['EXIF_GPSLatitudeRef'] != 'N': print md gdaltest.post_reason( 'Exif metadata wrong.' ) return 'fail' except: print md gdaltest.post_reason( 'Exit metadata apparently missing.' ) return 'fail' if ds.GetRasterBand(3).GetRasterColorInterpretation() != gdal.GCI_BlueBand: gdaltest.post_reason( 'Did not get expected color interpretation.' ) return 'fail' return 'success' | 9945dc36ee5967c53788b8c55efd934ca81bd229 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10289/9945dc36ee5967c53788b8c55efd934ca81bd229/jpeg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29726,
67,
22,
13332,
225,
3780,
273,
15551,
287,
18,
3678,
12,
296,
892,
19,
287,
21515,
1155,
18,
14362,
11,
262,
225,
3481,
273,
3780,
18,
967,
2277,
1435,
225,
775,
30,
309,
3481,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29726,
67,
22,
13332,
225,
3780,
273,
15551,
287,
18,
3678,
12,
296,
892,
19,
287,
21515,
1155,
18,
14362,
11,
262,
225,
3481,
273,
3780,
18,
967,
2277,
1435,
225,
775,
30,
309,
3481,
... |
for bone in paths.keys(): node = paths[bone][i] center = node.center () | for bone in paths[i].data.keys(): node = paths[i].data[bone] center = node.center | def build_order(asf): order = ['root'] pos = 0 while pos < len(order): for group in asf.hierarchy: if len(group) and group[0] == order[pos]: order.extend(group[1:]) pos += 1 return order | 07d9044de24812334fbc0e0919fbef89c45b6f19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/07d9044de24812334fbc0e0919fbef89c45b6f19/shuffle-interpolate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
1019,
12,
345,
74,
4672,
1353,
273,
10228,
3085,
3546,
949,
273,
374,
1323,
949,
411,
562,
12,
1019,
4672,
364,
1041,
316,
487,
74,
18,
17937,
30,
309,
562,
12,
1655,
13,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
1019,
12,
345,
74,
4672,
1353,
273,
10228,
3085,
3546,
949,
273,
374,
1323,
949,
411,
562,
12,
1019,
4672,
364,
1041,
316,
487,
74,
18,
17937,
30,
309,
562,
12,
1655,
13,
4... |
self._w, 'tag', 'add', tagName, index1, index2) | (self._w, 'tag', 'add', tagName, index1) + args) | def tag_add(self, tagName, index1, index2=None): self.tk.call( self._w, 'tag', 'add', tagName, index1, index2) | c1843f3bbb5450d2def17739c7229b57e4a05b34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c1843f3bbb5450d2def17739c7229b57e4a05b34/Tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1047,
67,
1289,
12,
2890,
16,
7196,
16,
770,
21,
16,
770,
22,
33,
7036,
4672,
365,
18,
16099,
18,
1991,
12,
365,
6315,
91,
16,
296,
2692,
2187,
296,
1289,
2187,
7196,
16,
770,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1047,
67,
1289,
12,
2890,
16,
7196,
16,
770,
21,
16,
770,
22,
33,
7036,
4672,
365,
18,
16099,
18,
1991,
12,
365,
6315,
91,
16,
296,
2692,
2187,
296,
1289,
2187,
7196,
16,
770,
21,
... |
if libpath.startswith('.'+os.sep): libpath = libpath[2:] | libpath = os.path.normpath(libpath) | def runResources(self): generator = self | ddf55abe9954cfa7ced0dff048792d7e006b3dde /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/ddf55abe9954cfa7ced0dff048792d7e006b3dde/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3805,
12,
2890,
4672,
4456,
273,
365,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3805,
12,
2890,
4672,
4456,
273,
365,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if base.localAvatar.getAutoRun(): forward = 1 reverse = 0 | if 'localAvatar' in __builtins__: if base.localAvatar.getAutoRun(): forward = 1 reverse = 0 | def handleAvatarControls(self, task): """ Check on the arrow keys and update the avatar. """ # get the button states: run = inputState.isSet("run") forward = inputState.isSet("forward") reverse = inputState.isSet("reverse") turnLeft = inputState.isSet("turnLeft") turnRight = inputState.isSet("turnRight") slideLeft = inputState.isSet("slideLeft") slideRight = inputState.isSet("slideRight") jump = inputState.isSet("jump") | a9259e89649fe02473f55e36a9ff51283def7065 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/a9259e89649fe02473f55e36a9ff51283def7065/GravityWalker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
23999,
16795,
12,
2890,
16,
1562,
4672,
3536,
2073,
603,
326,
12274,
1311,
471,
1089,
326,
16910,
18,
3536,
468,
336,
326,
3568,
5493,
30,
1086,
273,
810,
1119,
18,
291,
694,
2932,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
23999,
16795,
12,
2890,
16,
1562,
4672,
3536,
2073,
603,
326,
12274,
1311,
471,
1089,
326,
16910,
18,
3536,
468,
336,
326,
3568,
5493,
30,
1086,
273,
810,
1119,
18,
291,
694,
2932,... |
self.lbClasses = QListBox(self.copt) self.lbClasses.setSelectionMode(QListBox.Multi) self.connect(self.lbClasses, SIGNAL("selectionChanged()"), self.updateTableOutcomes) | self.lbcls = OWGUI.listBox(self.copt, self, "selectedClasses", "classes", callback=[self.updateTableOutcomes, self.checksendpredictions], selectionMode=QListBox.Multi) self.lbcls.setFixedHeight(50) OWGUI.spin(self.copt, self, "precision", 1, 6, label="No. of decimals: ", orientation=0, callback=self.updateTableOutcomes) | def __init__(self, parent=None, signalManager = None): OWWidget.__init__(self, parent, signalManager, "Predictions") | 63e34d56e155a4f1aba288f36a71868771294735 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/63e34d56e155a4f1aba288f36a71868771294735/OWPredictions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
33,
7036,
16,
4277,
1318,
273,
599,
4672,
18233,
4609,
16186,
2738,
972,
12,
2890,
16,
982,
16,
4277,
1318,
16,
315,
20766,
87,
7923,
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,
1001,
2738,
972,
12,
2890,
16,
982,
33,
7036,
16,
4277,
1318,
273,
599,
4672,
18233,
4609,
16186,
2738,
972,
12,
2890,
16,
982,
16,
4277,
1318,
16,
315,
20766,
87,
7923,
2,
-100,
-100,... |
AUTHORS: - Golam Mortuza Hossain (2009-06-15) | def _limit_latex_(self, f, x, a): r""" Return latex expression for limit of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _limit_latex_ sage: var('x,a') (x, a) sage: f = function('f',x) sage: _limit_latex_(0, f, x, a) '\\lim_{x \\to a}\\, f\\left(x\\right)' sage: latex(limit(f, x=oo)) \lim_{x \to +\infty}\, f\left(x\right) AUTHORS: - Golam Mortuza Hossain (2009-06-15) """ return "\\lim_{%s \\to %s}\\, %s"%(latex(x), latex(a), latex(f)) | 69bbc1058e5250d6317046d2a42d4f009d3c2a0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/69bbc1058e5250d6317046d2a42d4f009d3c2a0c/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3595,
67,
26264,
67,
12,
2890,
16,
284,
16,
619,
16,
279,
4672,
436,
8395,
2000,
25079,
2652,
364,
1800,
434,
279,
16754,
445,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3595,
67,
26264,
67,
12,
2890,
16,
284,
16,
619,
16,
279,
4672,
436,
8395,
2000,
25079,
2652,
364,
1800,
434,
279,
16754,
445,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,... | |
citation_list[rec_id[0]].append(recid) | if not recid in citation_list[rec_id[0]]: citation_list[rec_id[0]].append(recid) result[rec_id[0]] += 1 | def ref_analyzer(citation_informations, initialresult, initial_citationlist, initial_referencelist,config, updated_rec_list ): """Analyze the citation informations and calculate the citation weight and cited by list dictionary. """ function = "" try: function = config.get("rank_method", "function") except: print "critical error. cfg section [rank_method] has no attr function" raise "config error" pubrefntag = "" try: pubrefntag = config.get(function, "reference_via_report_number") except: print "critical error. cfg section "+function+" has no attr reference_via_report_number" raise "cfg error" pubreftag = "" try: pubreftag = config.get(function, "reference_via_pubinfo") except: print "critical error. cfg section "+function+" has no attr reference_via_pubinfo" raise "cfg error" #pubrefntag is prob 999C5r, pubreftag 999C5s if task_get_task_param('verbose') >= 9: write_message("pubrefntag "+pubrefntag) write_message("pubreftag "+pubreftag) citation_list = initial_citationlist reference_list = initial_referencelist result = initialresult d_reports_numbers = citation_informations[0] d_references_report_numbers = citation_informations[1] d_references_s = citation_informations[2] #of type: {77: ['Nucl. Phys. B 72 (1974) 461','blah blah'], 93: ['..'], ..} d_records_s = citation_informations[3] t1 = os.times()[4] write_message("Phase 1: d_references_report_numbers") #d_references_report_numbers: e.g 8 -> ([astro-ph/9889],[hep-ph/768]) #meaning: rec 8 contains these in bibliography done = 0 numrecs = len(d_references_report_numbers) for recid, refnumbers in d_references_report_numbers.iteritems(): if (done % 1000 == 0): mesg = "d_references_report_numbers done "+str(done)+" of "+str(numrecs) write_message(mesg) task_update_progress(mesg) #write to db! insert_into_cit_db(reference_list, "reversedict") insert_into_cit_db(citation_list, "citationdict") #it's ok to sleep too, we got something done task_sleep_now_if_required() done = done+1 for refnumber in refnumbers: if refnumber: p = refnumber f = 'reportnumber' #sanitise p p.replace("\n",'') #search for "hep-th/5644654 or such" in existing records rec_id = get_recids_matching_query(p, f) if rec_id and rec_id[0]: write_citer_cited(recid, rec_id[0]) remove_from_missing(p) if not result.has_key(rec_id[0]): result[rec_id[0]] = 0 result[rec_id[0]] += 1 # Citation list should have rec_id[0] but check anyway if not citation_list.has_key(rec_id[0]): citation_list[rec_id[0]] = [] citation_list[rec_id[0]].append(recid) if not reference_list.has_key(recid): reference_list[recid] = [] reference_list[recid].append(rec_id[0]) else: #the reference we wanted was not found among our records. #put the reference in the "missing".. however, it will look #bad.. gfhgf/1254312, so get the corresponding 999C5s (full ref) too #This should really be done in the next loop d_references_s #but the 999C5s fields are not yet normalized #rectext = print_record(recid, format='hm', ot=pubreftag[:-1]) rectext = "" # print_record() call disabled to speed things up lines = rectext.split("\n") rpart = p #to be used.. for l in lines: if (l.find(p) > 0): #the gfhgf/1254312 was found.. get the s-part of it st = l.find('$s') if (st > 0): end = l.find('$', st) if (end == st): end = len(l) rpart = l[st+2:end] insert_into_missing(recid, rpart) mesg = "d_references_report_numbers done fully" write_message(mesg) task_update_progress(mesg) t2 = os.times()[4] #try to find references based on 999C5s, like Phys.Rev.Lett. 53 (1986) 2285 write_message("Phase 2: d_references_s") done = 0 numrecs = len(d_references_s) for recid, refss in d_references_s.iteritems(): if (done % 1000 == 0): mesg = "d_references_s done "+str(done)+" of "+str(numrecs) write_message(mesg) task_update_progress(mesg) #write to db! insert_into_cit_db(reference_list, "reversedict") insert_into_cit_db(citation_list, "citationdict") task_sleep_now_if_required() done = done+1 for refs in refss: if refs: p = refs #remove the latter page number if it is like 67-74 matches = re.compile("(.*)(-\d+$)").findall(p) if matches and matches[0]: p = matches[0][0] rec_id=None try: rec_id = list(search_unit(p, 'journal')) except: rec_id=None write_message("These match searching "+p+" in journal: "+str(rec_id), verbose=9) if rec_id and rec_id[0]: #the refered publication is in our collection, remove #from missing remove_from_missing(p) else: #it was not found so add in missing insert_into_missing(recid, p) #check citation and reference for this.. if rec_id and rec_id[0]: #the above should always hold if not citation_list.has_key(rec_id[0]): citation_list[rec_id[0]] = [] if not recid in citation_list[rec_id[0]]: citation_list[rec_id[0]].append(recid) #append actual list if not result.has_key(rec_id[0]): result[rec_id[0]] = 0 result[rec_id[0]] += 1 #add count for this.. #update reference_list accordingly if not reference_list.has_key(recid): reference_list[recid] = [] reference_list[recid].append(rec_id[0]) mesg = "d_references_s done fully" write_message(mesg) task_update_progress(mesg) t3 = os.times()[4] done = 0 numrecs = len(d_reports_numbers) write_message("Phase 3: d_reports_numbers") #search for stuff like CERN-TH-4859/87 in list of refs for rec_id, recnumbers in d_reports_numbers.iteritems(): if (done % 1000 == 0): mesg = "d_report_numbers done "+str(done)+" of "+str(numrecs) write_message(mesg) task_update_progress(mesg) done = done+1 for recnumber in recnumbers: if recnumber: p = recnumber recid_list = [] try: recid_list = get_recids_matching_query(p, pubrefntag) except: recid_list = [] if recid_list: for recid in recid_list: if not citation_list.has_key(rec_id): citation_list[rec_id] = [] if not recid in citation_list[rec_id]: if not result.has_key(rec_id): result[rec_id] = 0 result[rec_id] += 1 citation_list[rec_id].append(recid) if not reference_list.has_key(recid): reference_list[recid] = [] if not rec_id in reference_list[recid]: reference_list[recid].append(rec_id) mesg = "d_report_numbers done fully" write_message(mesg) task_update_progress(mesg) #find this record's pubinfo in other records' bibliography write_message("Phase 4: d_records_s") done = 0 numrecs = len(d_records_s) t4 = os.times()[4] for recid, recs in d_records_s.iteritems(): if (done % 1000 == 0): mesg = "d_records_s done "+str(done)+" of "+str(numrecs) write_message(mesg) task_update_progress(mesg) done = done+1 p = recs.replace("\"","") #search the publication string like Phys. Lett., B 482 (2000) 417 in 999C5s rec_ids = list(search_unit(f=pubreftag, p=p, m='a')) write_message("These records match "+p+" in "+pubreftag+" : "+str(rec_ids), verbose=9) if rec_ids: for rec_id in rec_ids: if not citation_list.has_key(recid): citation_list[recid] = [] result[recid] = 0 if not reference_list.has_key(rec_id): reference_list[rec_id] = [] if not rec_id in citation_list[recid]: if not result.has_key(recid): result[recid] = 0 result[recid] += 1 citation_list[recid].append(rec_id) if not recid in reference_list[rec_id]: reference_list[rec_id].append(recid) mesg = "d_records_s done fully" write_message(mesg) task_update_progress(mesg) write_message("Phase 5: reverse lists") #remove empty lists in citation and reference keys = citation_list.keys() for k in keys: if not citation_list[k]: del citation_list[k] keys = reference_list.keys() for k in keys: if not reference_list[k]: del reference_list[k] write_message("Phase 6: self-citations") selfdic = {} #get the initial self citation dict initial_self_dict = get_cit_dict("selfcitdict") selfdic = initial_self_dict #add new records to selfdic acit = task_get_option("author-citations") if not acit: print "Self cite processing disabled. Use -A option to enable it." else: write_message("self cite and author citations enabled") selfdic = get_self_citations(updated_rec_list, citation_list, initial_self_dict, config) #selfdic consists of #key k -> list of values [v1,v2,..] #where k is a record with author A and k cites v1,v2.. and A appears in v1,v2.. #create a reverse "x cited by y" self cit dict selfcitedbydic = {} for k in selfdic.keys(): vlist = selfdic[k] for v in vlist: if selfcitedbydic.has_key(v): tmplist = selfcitedbydic[v] tmplist.append(k) else: tmplist = [k] selfcitedbydic[v] = tmplist write_message("Getting author citations") #get author citations for records in updated_rec_list initial_author_dict = get_initial_author_dict() authorcitdic = initial_author_dict acit = task_get_option("author-citations") if not acit: print "Author cites disabled. Use -A option to enable it." else: write_message("author citations enabled") authorcitdic = get_author_citations(updated_rec_list, citation_list, initial_author_dict, config) if task_get_task_param('verbose') >= 3: #print only X first to prevent flood tmpdict = {} tmp = citation_list.keys()[0:10] for t in tmp: tmpdict[t] = citation_list[t] write_message("citation_list (x is cited by y): "+str(tmpdict)) write_message("size: "+str(len(citation_list.keys()))) tmp = reference_list.keys()[0:10] tmpdict = {} for t in tmp: tmpdict[t] = reference_list[t] write_message("reference_list (x cites y): "+str(tmpdict)) write_message("size: "+str(len(reference_list.keys()))) tmp = selfcitedbydic.keys()[0:10] tmpdict = {} for t in tmp: tmpdict[t] = selfcitedbydic[t] write_message("selfcitedbydic (x is cited by y and one \ of the authors of x same as y's): "+str(tmpdict)) write_message("size: "+str(len(selfcitedbydic.keys()))) tmp = selfdic.keys()[0:100] tmpdict = {} for t in tmp: tmpdict[t] = selfdic[t] write_message("selfdic (x cites y and one of the authors \ of x same as y's): "+str(tmpdict)) write_message("size: "+str(len(selfdic.keys()))) tmp = authorcitdic.keys()[0:10] tmpdict = {} for t in tmp: tmpdict[t] = authorcitdic[t] write_message("authorcitdic (author is cited in recs): "+str(tmpdict)) write_message("size: "+str(len(authorcitdic.keys()))) insert_cit_ref_list_intodb(citation_list, reference_list, selfcitedbydic, selfdic, authorcitdic) t5 = os.times()[4] write_message("Execution time for analyzing the citation information generating the dictionary:") write_message("... checking ref number: %.2f sec" % (t2-t1)) write_message("... checking ref ypvt: %.2f sec" % (t3-t2)) write_message("... checking rec number: %.2f sec" % (t4-t3)) write_message("... checking rec ypvt: %.2f sec" % (t5-t4)) write_message("... total time of ref_analyze: %.2f sec" % (t5-t1)) return result | b7cd3379e99d4ead45f1aed7ee5876ece80bb33f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/b7cd3379e99d4ead45f1aed7ee5876ece80bb33f/bibrank_citation_indexer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1278,
67,
13647,
12,
71,
8773,
67,
267,
687,
1012,
16,
2172,
2088,
16,
2172,
67,
71,
8773,
1098,
16,
2172,
67,
266,
586,
1331,
5449,
16,
1425,
16,
3526,
67,
3927,
67,
1098,
262,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1278,
67,
13647,
12,
71,
8773,
67,
267,
687,
1012,
16,
2172,
2088,
16,
2172,
67,
71,
8773,
1098,
16,
2172,
67,
266,
586,
1331,
5449,
16,
1425,
16,
3526,
67,
3927,
67,
1098,
262,
30,
... |
print 'Usage: %s <CURRENT_USERS_FILE> <NEW_USERS_FILE>'%(sys.argv[0]) | print 'Usage: %s <CURRENT_USERS_FILE> <NEW_USERS_FILE> <CURRENT SYNCING ZONE>'%(sys.argv[0]) | def createUser (u,currentDomains,currentZones): if u['Zone'] not in currentZones: return 0 if u['Domain'] in ignoreDomains: return 0 if u['Domain'] not in currentDomains: res = createDomain(u['Domain']) if res != 0: sys.stderr.write('Error creating Domain %s.'%(u['Domain'])) sys.exit(-1) if u['Type'] == 'group': return 0 else: print("Singestuser %s %s %s %s '' '' '' ENCRPYT1 '' %s"%(u['Name'], random.randrange(1,1000000000), u['Domain'], u['Type'], u['Zone'])) res = os.system("Singestuser %s %s %s %s '' '' '' ENCRPYT1 '' %s"%(u['Name'], random.randrange(1,1000000000), u['Domain'], u['Type'], u['Zone'])) return res | 16baca4a4abcb814c097a6b731ff56af1132d477 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1913/16baca4a4abcb814c097a6b731ff56af1132d477/ZoneUserSync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22992,
261,
89,
16,
2972,
15531,
16,
2972,
13600,
4672,
309,
582,
3292,
4226,
3546,
486,
316,
783,
13600,
30,
327,
374,
309,
582,
3292,
3748,
3546,
316,
2305,
15531,
30,
327,
374,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22992,
261,
89,
16,
2972,
15531,
16,
2972,
13600,
4672,
309,
582,
3292,
4226,
3546,
486,
316,
783,
13600,
30,
327,
374,
309,
582,
3292,
3748,
3546,
316,
2305,
15531,
30,
327,
374,
309,
... |
def checkDeferNode(assembled, node): deferNode = None if assembled == "qx.Class.define" or assembled == "qx.Bootstrap.define" or assembled == "qx.List.define": if node.hasParentContext("call/operand"): deferNode = treeutil.selectNode(node, "../../params/2/keyvalue[@key='defer']/value/function/body/block") return deferNode def reduceAssembled(assembled, node): assembledId = '' if assembled in self._classesObj: assembledId = assembled elif "." in assembled: for entryId in self._classesObj: if assembled.startswith(entryId) and re.match(r'%s\b' % entryId, assembled): if len(entryId) > len(assembledId): assembledId = entryId return assembledId def reduceAssembled1(assembled, node): def tryKnownClasses(assembled): result = '' for entryId in self._classesObj.keys() + ["this"]: if assembled.startswith(entryId) and re.match(r'%s\b' % entryId, assembled): if len(entryId) > len(assembledId): result = entryId return result def tryReduceClassname(assembled, node): result = '' if (node.hasParentContext("instantiation/*/*/operand")): result = assembled elif (node.hasParentContext("keyvalue/*") and node.parent.parent.get('key') == 'extend'): result = assembled elif (node.hasParentContext("call/operand")): result = assembled[:assembled.rindex('.')] return result if assembled in self._classesObj: assembledId = assembled elif "." in assembled: assembledId = tryKnownClasses(assembled) if not assembledId: assembledId = tryReduceClassname(assembled, node) if not assembledId: assembledId = assembled return assembledId def isUnknownClass(assembled, node, fileId): if (node.hasParentContext("instantiation/*/*/operand") or (node.hasParentContext("keyvalue/*") and node.parent.parent.get('key') == 'extend')): if (assembled in lang.BUILTIN + ['clazz'] or re.match(r'this\b', assembled)): return False elif self._isScopedVar(assembled, node, fileId): return False else: return True return False def addId(assembledId, runtime, loadtime, lineno): if inFunction: target = runtime else: target = loadtime if not assembledId in (x.name for x in target): target.append(DependencyItem(assembledId, lineno)) if (not inFunction and self.context['jobconf'].get("dependencies/follow-static-initializers", False) and node.hasParentContext("call/operand") ): deps = self.getMethodDeps(assembledId, assembled, variants) loadtime.extend([x for x in deps if x not in loadtime]) return def followCallDeps(assembledId): if (assembledId and assembledId in self._classesObj and assembledId != fileId and self.context['jobconf'].get("dependencies/follow-static-initializers", False) and node.hasParentContext("call/operand") ): return True return False def splitClassAttribute(assembledId, assembled): if assembledId == assembled: clazzId = assembledId attribute = u'' else: clazzId = assembledId attribute = assembled[ len(assembledId) +1 :] return clazzId, attribute | def checkDeferNode(assembled, node): deferNode = None if assembled == "qx.Class.define" or assembled == "qx.Bootstrap.define" or assembled == "qx.List.define": if node.hasParentContext("call/operand"): deferNode = treeutil.selectNode(node, "../../params/2/keyvalue[@key='defer']/value/function/body/block") return deferNode | 4822df2d2f0a22ca7f1cd219c29ab6560c20fca0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/4822df2d2f0a22ca7f1cd219c29ab6560c20fca0/Class.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
758,
586,
907,
12,
345,
5747,
1259,
16,
756,
4672,
2220,
907,
273,
599,
309,
20489,
1259,
422,
315,
85,
92,
18,
797,
18,
11255,
6,
578,
20489,
1259,
422,
315,
85,
92,
18,
10445,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
758,
586,
907,
12,
345,
5747,
1259,
16,
756,
4672,
2220,
907,
273,
599,
309,
20489,
1259,
422,
315,
85,
92,
18,
797,
18,
11255,
6,
578,
20489,
1259,
422,
315,
85,
92,
18,
10445,... | |
'Mismatch: inline interpreted text start-string and' ' role with phrase-reference end-string at line %s.' % lineno) text = unescape(string[matchstart:matchend], 1) rawsource = unescape(string[matchstart:matchend], 1) prb = self.problematic(text, rawsource, msg) return (string[:matchstart], [prb], string[matchend:], [msg]) return self.phrase_ref( string[:matchstart], string[matchend:][endmatch.end():], text, rawsource) | 'Mismatch: both interpreted text role %s and ' 'reference suffix at line %s.' % (position, lineno)) text = unescape(string[rolestart:textend], 1) prb = self.problematic(text, text, msg) return string[:rolestart], [prb], string[textend:], [msg] return self.phrase_ref(string[:matchstart], string[textend:], rawsource, text) | def interpreted_or_phrase_ref(self, match, lineno): pattern = self.patterns.interpreted_or_phrase_ref string = match.string matchstart = match.start('backquote') matchend = match.end('backquote') rolestart = match.start('role') role = match.group('role') position = '' if role: role = role[1:-1] position = 'prefix' elif self.quoted_start(match): return (string[:matchend], [], string[matchend:], []) endmatch = pattern.search(string[matchend:]) if endmatch and endmatch.start(1): # 1 or more chars escaped = endmatch.string[:endmatch.start(1)] text = unescape(escaped, 0) rawsource = unescape( string[match.start():matchend+endmatch.end()], 1) if rawsource[-1:] == '_': if role: msg = self.reporter.warning( 'Mismatch: inline interpreted text start-string and' ' role with phrase-reference end-string at line %s.' % lineno) text = unescape(string[matchstart:matchend], 1) rawsource = unescape(string[matchstart:matchend], 1) prb = self.problematic(text, rawsource, msg) return (string[:matchstart], [prb], string[matchend:], [msg]) return self.phrase_ref( string[:matchstart], string[matchend:][endmatch.end():], text, rawsource) else: return self.interpreted( string[:rolestart], string[matchend:][endmatch.end():], endmatch, role, position, lineno, escaped, rawsource, text) msg = self.reporter.warning( 'Inline interpreted text or phrase reference start-string ' 'without end-string at line %s.' % lineno) text = unescape(string[matchstart:matchend], 1) rawsource = unescape(string[matchstart:matchend], 1) prb = self.problematic(text, rawsource, msg) return string[:matchstart], [prb], string[matchend:], [msg] | 018a79821ccb1056404d43dbe32e444d1a0e03c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/018a79821ccb1056404d43dbe32e444d1a0e03c1/states.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19898,
67,
280,
67,
9429,
67,
1734,
12,
2890,
16,
845,
16,
7586,
4672,
1936,
273,
365,
18,
13317,
18,
24713,
329,
67,
280,
67,
9429,
67,
1734,
533,
273,
845,
18,
1080,
845,
1937,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19898,
67,
280,
67,
9429,
67,
1734,
12,
2890,
16,
845,
16,
7586,
4672,
1936,
273,
365,
18,
13317,
18,
24713,
329,
67,
280,
67,
9429,
67,
1734,
533,
273,
845,
18,
1080,
845,
1937,
273... |
if collide.rect2circle(obs.rect, ((self.pos),constants.SHOTRADIUS)): | if collide.poly2circle(obs.shape, ((self.pos),constants.SHOTRADIUS)): | def check_collisions(self): for obs in self.team.map.obstacles: if collide.rect2circle(obs.rect, ((self.pos),constants.SHOTRADIUS)): return self.kill() for tank in self.team.map.tanks(): if collide.circle2circle((tank.pos, constants.TANKRADIUS), (self.pos, constants.SHOTRADIUS)): if tank.team == self.team and not config.config['friendly_fire']: continue tank.kill() return self.kill() if self.pos[0]<-config.config.world.size[0]/2 or\ self.pos[1]<-config.config.world.size[1]/2 or\ self.pos[0]>config.config.world.size[0]/2 or \ self.pos[1]>config.config.world.size[1]/2: return self.kill() | f9d08849ea2b12ce747919633143f99bda800fc8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9601/f9d08849ea2b12ce747919633143f99bda800fc8/game.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
12910,
12682,
12,
2890,
4672,
364,
7160,
316,
365,
18,
10035,
18,
1458,
18,
947,
334,
69,
9558,
30,
309,
645,
8130,
18,
16353,
22,
18970,
12,
10992,
18,
4867,
16,
14015,
2890,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12910,
12682,
12,
2890,
4672,
364,
7160,
316,
365,
18,
10035,
18,
1458,
18,
947,
334,
69,
9558,
30,
309,
645,
8130,
18,
16353,
22,
18970,
12,
10992,
18,
4867,
16,
14015,
2890,... |
""" | def test_listener_client(self): for family in self.connection.families: l = self.connection.Listener(family=family) p = self.Process(target=self._test, args=(l.address,)) p.set_daemon(True) p.start() conn = l.accept() self.assertEqual(conn.recv(), 'hello') p.join() l.close() | 7ffdea61c76ef65324bcf6693816c053f0588f56 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/7ffdea61c76ef65324bcf6693816c053f0588f56/test_multiprocessing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12757,
67,
2625,
12,
2890,
4672,
364,
6755,
316,
365,
18,
4071,
18,
74,
14319,
30,
328,
273,
365,
18,
4071,
18,
2223,
12,
9309,
33,
9309,
13,
293,
273,
365,
18,
2227,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12757,
67,
2625,
12,
2890,
4672,
364,
6755,
316,
365,
18,
4071,
18,
74,
14319,
30,
328,
273,
365,
18,
4071,
18,
2223,
12,
9309,
33,
9309,
13,
293,
273,
365,
18,
2227,
12,
... | |
gLogger.error(errStr,"%s %s" % (diracSE,sourcePfn)) | gLogger.error( errStr, "%s %s" % ( diracSE, sourcePfn ) ) | def __resolveBestReplicas(self,sourceSE,lfnReplicas,catalogueSize): ########################################################### # Determine the best replicas (remove banned sources, invalid storage elements and file with the wrong size) configStr = '/Resources/StorageElements/BannedSource' bannedSources = gConfig.getValue(configStr,[]) gLogger.info("ReplicaManager.__resolveBestReplicas: Obtained current banned sources.") replicaPreference = [] for diracSE,pfn in lfnReplicas.items(): if sourceSE and diracSE != sourceSE: gLogger.info("ReplicaManager.__resolveBestReplicas: %s replica not requested." % diracSE) elif diracSE in bannedSources: gLogger.info("ReplicaManager.__resolveBestReplicas: %s is currently banned as a source." % diracSE) else: gLogger.info("ReplicaManager.__resolveBestReplicas: %s is available for use." % diracSE) storageElement = StorageElement(diracSE) res = storageElement.isValid() if not res['OK']: errStr = "ReplicaManager.__resolveBestReplicas: The storage element is not currently valid." gLogger.error(errStr,"%s %s" % (diracSE,res['Message'])) else: if storageElement.getRemoteProtocols()['Value']: gLogger.verbose("ReplicaManager.__resolveBestReplicas: Attempting to get source pfns for remote protocols.") res = storageElement.getPfnForProtocol(pfn,self.thirdPartyProtocols) if res['OK']: sourcePfn = res['Value'] gLogger.verbose("ReplicaManager.__resolveBestReplicas: Attempting to get source file size.") res = storageElement.getFileSize(sourcePfn) if res['OK']: if res['Value']['Successful'].has_key(sourcePfn): sourceFileSize = res['Value']['Successful'][sourcePfn] gLogger.info("ReplicaManager.__resolveBestReplicas: Source file size determined to be %s." % sourceFileSize) if catalogueSize == sourceFileSize: fileTuple = (diracSE,sourcePfn) replicaPreference.append(fileTuple) else: errStr = "ReplicaManager.__resolveBestReplicas: Catalogue size and physical file size mismatch." gLogger.error(errStr,"%s %s" % (diracSE,sourcePfn)) else: errStr = "ReplicaManager.__resolveBestReplicas: Failed to get physical file size." gLogger.error(errStr,"%s %s: %s" % (sourcePfn,diracSE,res['Value']['Failed'][sourcePfn])) else: errStr = "ReplicaManager.__resolveBestReplicas: Completely failed to get physical file size." gLogger.error(errStr,"%s %s: %s" % (sourcePfn,diracSE,res['Message'])) else: errStr = "ReplicaManager.__resolveBestReplicas: Failed to get PFN for replication for StorageElement." gLogger.error(errStr,"%s %s" % (diracSE,res['Message'])) else: errStr = "ReplicaManager.__resolveBestReplicas: Source Storage Element has no remote protocols." gLogger.info(errStr,diracSE) if not replicaPreference: errStr = "ReplicaManager.__resolveBestReplicas: Failed to find any valid source Storage Elements." gLogger.error(errStr) return S_ERROR(errStr) else: return S_OK(replicaPreference) | 9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
10828,
14173,
17248,
12,
2890,
16,
3168,
1090,
16,
80,
4293,
17248,
16,
7199,
344,
1225,
4672,
19709,
5516,
3228,
1189,
468,
10229,
326,
3796,
21545,
261,
4479,
324,
10041,
5550,
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,
10828,
14173,
17248,
12,
2890,
16,
3168,
1090,
16,
80,
4293,
17248,
16,
7199,
344,
1225,
4672,
19709,
5516,
3228,
1189,
468,
10229,
326,
3796,
21545,
261,
4479,
324,
10041,
5550,
16,... |
ssc = sslverify.KeyPair.generate().selfSignedCert(1,**sslopt) | serialNumber = int(opts['serialNumber']) ssc = sslverify.KeyPair.generate().selfSignedCert(serialNumber,**sslopt) | def createSSLCertificate(opts): sslopt = {} for x, y in (('country','C'), ('state', 'ST'), ('city', 'L'), ('organization', 'O'), ('unit', 'OU'), ('hostname', 'CN'), ('email','emailAddress')): sslopt[y] = opts[x] ssc = sslverify.KeyPair.generate().selfSignedCert(1,**sslopt) file(opts['filename'], 'w').write(ssc.dumpPEM()) print 'Wrote SSL certificate:' print ssc.inspect() return ssc | 24e8d1cd703eb32e4c41b7e4a72de5d6bed855ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8962/24e8d1cd703eb32e4c41b7e4a72de5d6bed855ef/certcreate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
6745,
4719,
12,
4952,
4672,
5202,
383,
337,
273,
2618,
364,
619,
16,
677,
316,
261,
2668,
9082,
17023,
39,
19899,
7707,
2019,
2187,
296,
882,
19899,
7707,
14240,
2187,
296,
48,
1989... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6745,
4719,
12,
4952,
4672,
5202,
383,
337,
273,
2618,
364,
619,
16,
677,
316,
261,
2668,
9082,
17023,
39,
19899,
7707,
2019,
2187,
296,
882,
19899,
7707,
14240,
2187,
296,
48,
1989... |
tmpdir += os.sep | tmpdir += os.sep | def execute(self, context): scene = context.scene gks = scene.gamekit if gks.gk_runtime_exec_path[0:2] == "./": pwd = os.path.dirname(bpy.app.binary_path) execpath = pwd + '/' + gks.gk_runtime_exec_path else: execpath = bpy.path.abspath(gks.gk_runtime_exec_path) tmpdir = bpy.context.user_preferences.filepaths.temporary_directory if not tmpdir.endswith(os.sep): tmpdir += os.sep gamefile = tmpdir + "gamekit_tmp.blend" cfgfile = tmpdir + "gamekit_startup.cfg" cmdline = execpath + " -c " + cfgfile + " " + gamefile workingdir = bpy.path.abspath(gks.gk_runtime_working_dir) if not workingdir.endswith(os.sep): workingdir += os.sep args = shlex.split(cmdline.replace(os.sep, '/')) | 6c1d98357932247f98b0d304a2f0db2c7f4d31e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6607/6c1d98357932247f98b0d304a2f0db2c7f4d31e6/operators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
819,
4672,
9065,
273,
819,
18,
23694,
314,
7904,
273,
9065,
18,
13957,
8691,
225,
309,
314,
7904,
18,
75,
79,
67,
9448,
67,
4177,
67,
803,
63,
20,
30,
22,
65,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
819,
4672,
9065,
273,
819,
18,
23694,
314,
7904,
273,
9065,
18,
13957,
8691,
225,
309,
314,
7904,
18,
75,
79,
67,
9448,
67,
4177,
67,
803,
63,
20,
30,
22,
65,
4... |
msg += "\n%s" % self.context.currentRecord.srcline | msg += "\n%s" % self.context.srcline | def info(self, text, source=True): msg = "" if source: msg = "%s, line %d (%d), " % (self.context.currentRecord.srcfile, self.context.currentRecord.linenum, self.context.global_linenum) msg += "%s" % (text) if source: msg += "\n%s" % self.context.currentRecord.srcline if self.context.verbose: print msg self.log(3, msg) | f729bf293a24574bf4c73fe4fdd36424549e0262 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/f729bf293a24574bf4c73fe4fdd36424549e0262/assembler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1123,
12,
2890,
16,
977,
16,
1084,
33,
5510,
4672,
1234,
273,
1408,
309,
1084,
30,
1234,
273,
2213,
87,
16,
980,
738,
72,
6142,
72,
3631,
315,
738,
261,
2890,
18,
2472,
18,
2972,
211... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1123,
12,
2890,
16,
977,
16,
1084,
33,
5510,
4672,
1234,
273,
1408,
309,
1084,
30,
1234,
273,
2213,
87,
16,
980,
738,
72,
6142,
72,
3631,
315,
738,
261,
2890,
18,
2472,
18,
2972,
211... |
pa = (0.785,0.005) | pa = (0.785, 0.005) | def init_scatt_wavevector_to_scalar_Q(initk,scattk,**kwargs): """ This function takes an initial wavevector and a scattered wavevector as a tuple and a SOM, a tuple and a SO or two tuples and calculates the quantity scalar_Q units of 1/Angstroms. The SOM principle axis must be in units of 1/Angstroms. The SOs and tuple(s) is(are) assumed to be in units of 1/Angstroms. The polar angle must be provided if one of the initial arguments is not a SOM. If a SOM is passed, by providing the polar angle at the function call time, the polar angle carried in the SOM instrument will be overridden. Parameters: ---------- -> initk is a SOM, SO or tuple of the initial wavevector -> scattk is a SOM, SO or tuple of the scattered wavevector -> kwargs is a list of key word arguments that the function accepts: polar= a tuple or list of tuples containing the polar angle and its associated error^2 units= a string containing the expected units for this function. The default for this function is 1/Angstroms Return: ------ <- A SOM, SO or tuple calculated for scalar_Q Exceptions: ---------- <- TypeError is raised if the SOM-SOM operation is attempted <- TypeError is raised if the SOM-SO operation is attempted <- TypeError is raised if the SO-SOM operation is attempted <- TypeError is raised if the SO-SO operation is attempted <- RuntimeError is raised if the SOM x-axis units are not 1/Angstroms <- RuntimeError is raised if a SOM is not passed and no polar angle is provided <- RuntimeError is raised if no instrument is provided in a SOM """ # import the helper functions import hlr_utils # set up for working through data (result,res_descr)=hlr_utils.empty_result(initk,scattk) (i_descr,s_descr)=hlr_utils.get_descr(initk,scattk) # error checking for types if i_descr == "SOM" and s_descr == "SOM": raise TypeError, "SOM-SOM operation not supported" elif i_descr == "SOM" and s_descr == "SO": raise TypeError, "SOM-SO operation not supported" elif i_descr == "SO" and s_descr == "SOM": raise TypeError, "SO-SOM operation not supported" elif i_descr == "SO" and s_descr == "SO": raise TypeError, "SO-SO operation not supported" else: pass # Setup keyword arguments try: polar = kwargs["polar"] except KeyError: polar = None try: units = kwargs["units"] except KeyError: units = "1/Angstroms" result=hlr_utils.copy_som_attr(result,res_descr,initk,i_descr, scattk,s_descr) if res_descr == "SOM": index = hlr_utils.hlr_1D_units(result, units) result = hlr_utils.hlr_force_units(result, units, index) result.setAxisLabel(index, "scalar wavevector transfer") result.setYUnits("Counts/A-1") result.setYLabel("Intensity") else: pass if polar == None: if i_descr == "SOM": try: initk.attr_list.instrument.get_primary() inst = initk.attr_list.instrument except RuntimeError: raise RuntimeError, "A detector was not provided!" elif s_descr == "SOM": try: scattk.attr_list.instrument.get_primary() inst = scattk.attr_list.instrument except RuntimeError: raise RuntimeError, "A detector was not provided!" else: raise RuntimeError, "If no SOM is provided, then polar "\ +"information must be given." else: (p_descr,e_descr) = hlr_utils.get_descr(polar) # iterate through the values import axis_manip for i in range(hlr_utils.get_length(initk,scattk)): val1 = hlr_utils.get_value(initk,i,i_descr,"x") err2_1 = hlr_utils.get_err2(initk,i,i_descr,"x") val2 = hlr_utils.get_value(scattk,i,s_descr,"x") err2_2 = hlr_utils.get_err2(scattk,i,s_descr,"x") map_so = hlr_utils.get_map_so(initk,scattk,i) if polar == None: (angle,angle_err2) = hlr_utils.get_parameter("polar",map_so,inst) else: angle = hlr_utils.get_value(polar,i,p_descr) angle_err2 = hlr_utils.get_err2(polar,i,p_descr) value=axis_manip.init_scatt_wavevector_to_scalar_Q(val1, err2_1, val2, err2_2, angle, angle_err2) hlr_utils.result_insert(result,res_descr,value,map_so,"x") return result | dcfad031d5f907a400d4659737e261c4d7fdc434 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/dcfad031d5f907a400d4659737e261c4d7fdc434/hlr_init_scatt_wavevector_to_scalar_Q.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
1017,
4558,
67,
17838,
7737,
67,
869,
67,
8748,
67,
53,
12,
2738,
79,
16,
1017,
4558,
79,
16,
636,
4333,
4672,
3536,
1220,
445,
5530,
392,
2172,
10794,
7737,
471,
279,
14644,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
1017,
4558,
67,
17838,
7737,
67,
869,
67,
8748,
67,
53,
12,
2738,
79,
16,
1017,
4558,
79,
16,
636,
4333,
4672,
3536,
1220,
445,
5530,
392,
2172,
10794,
7737,
471,
279,
14644,... |
mydat[1]=os.path.normpath(myroot+mydat[1][1:]) | mydat[1]=os.path.normpath(root+mydat[1][1:]) | def unmerge(myroot,category,pkgname): if myroot=="": myroot="/" if os.path.isdir(os.path.normpath(myroot+"var/db/pkg/"+category+"/"+pkgname)): if myroot=="/": print "Unmerging",pkgname+"..." else: print "Unmerging",pkgname,"from",myroot+"..." print else: print pkgname,"not installed" return try: contents=open(os.path.normpath(myroot+"var/db/pkg/"+category+"/"+pkgname+"/CONTENTS")) except: print "Error -- could not open CONTENTS file for", pkgname+". Aborting." return pkgfiles={} for line in contents.readlines(): mydat=string.split(line) # we do this so we can remove from non-root filesystems # (use the ROOT var to allow maintenance on other partitions) mydat[1]=os.path.normpath(myroot+mydat[1][1:]) if mydat[0]=="obj": #format: type, mtime, md5sum pkgfiles[mydat[1]]=[mydat[0], mydat[3], mydat[2]] elif mydat[0]=="dir": #format: type pkgfiles[mydat[1]]=[mydat[0] ] elif mydat[0]=="sym": #format: type, mtime, dest pkgfiles[mydat[1]]=[mydat[0], mydat[4], mydat[3]] elif mydat[0]=="dev": #format: type pkgfiles[mydat[1]]=[mydat[0] ] elif mydat[0]=="fif": #format: type pkgfiles[mydat[1]]=[mydat[0]] else: print "Error -- CONTENTS file for", pkgname, "is corrupt." print ">>> "+line return # we don't want to automatically remove the ebuild file listed # in the CONTENTS file. We'll do after everything else has # completed successfully. myebuildfile=os.path.normpath(myroot+"var/db/pkg/"+category+"/"+pkgname+"/"+pkgname+".ebuild") if pkgfiles.has_key(myebuildfile): del pkgfiles[myebuildfile] mykeys=pkgfiles.keys() mykeys.sort() mykeys.reverse() #prerm script pkgscript("prerm",myebuildfile) for obj in mykeys: obj=os.path.normpath(obj) if not os.path.islink(obj): #we skip this if we're dealing with a symlink #because os.path.exists() will operate on the #link target rather than the link itself. if not os.path.exists(obj): print "--- !found", pkgfiles[obj][0], obj continue if (pkgfiles[obj][0] not in ("dir","fif","dev")) and (getmtime(obj) != pkgfiles[obj][1]): print "--- !mtime", pkgfiles[obj][0], obj continue if pkgfiles[obj][0]=="dir": if not os.path.isdir(obj): print "--- !dir ","dir", obj continue if os.listdir(obj): print "--- !empty","dir", obj continue os.rmdir(obj) print "<<< ","dir",obj elif pkgfiles[obj][0]=="sym": if not os.path.islink(obj): print "--- !sym ","sym", obj continue mydest=os.readlink(obj) if os.path.exists(os.path.normpath(myroot+mydest)): if mydest != pkgfiles[obj][2]: print "--- !destn","sym", obj continue os.unlink(obj) print "<<< ","sym",obj elif pkgfiles[obj][0]=="obj": if not os.path.isfile(obj): print "--- !obj ","obj", obj continue mymd5=md5(obj) if mymd5 != string.upper(pkgfiles[obj][2]): print "--- !md5 ","obj", obj continue os.unlink(obj) print "<<< ","obj",obj elif pkgfiles[obj][0]=="fif": if not isfifo(obj): print "--- !fif ","fif", obj continue os.unlink(obj) print "<<< ","fif",obj elif pkgfiles[obj][0]=="dev": if not isdev(obj): print "--- !dev ","dev", obj continue os.unlink(obj) print "<<< ","dev",obj #postrm script pkgscript("postrm",myebuildfile) #recursive cleanup for thing in os.listdir(myroot+"var/db/pkg/"+category+"/"+pkgname): os.unlink(myroot+"var/db/pkg/"+category+"/"+pkgname+"/"+thing) os.rmdir(myroot+"var/db/pkg/"+category+"/"+pkgname) print if myroot=="/": print pkgname,"unmerged." else: print pkgname,"unmerged from",myroot+"." | 01f4a9c4d0b331efdfed1bd9585e56e10c758791 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9957/01f4a9c4d0b331efdfed1bd9585e56e10c758791/portage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
2702,
12,
4811,
3085,
16,
4743,
16,
10657,
529,
4672,
309,
3399,
3085,
631,
3660,
30,
3399,
3085,
1546,
4898,
309,
1140,
18,
803,
18,
291,
1214,
12,
538,
18,
803,
18,
7959,
803,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
2702,
12,
4811,
3085,
16,
4743,
16,
10657,
529,
4672,
309,
3399,
3085,
631,
3660,
30,
3399,
3085,
1546,
4898,
309,
1140,
18,
803,
18,
291,
1214,
12,
538,
18,
803,
18,
7959,
803,
... |
"Topic :: Terminals :: Terminal Emulators/X Terminals", | def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() | 72dae027710c277d85b9ac6a91530af387144d89 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10366/72dae027710c277d85b9ac6a91530af387144d89/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
12749,
4672,
327,
1696,
12,
538,
18,
803,
18,
5701,
12,
538,
18,
803,
18,
12287,
12,
972,
768,
972,
3631,
5299,
13,
2934,
896,
1435,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
12749,
4672,
327,
1696,
12,
538,
18,
803,
18,
5701,
12,
538,
18,
803,
18,
12287,
12,
972,
768,
972,
3631,
5299,
13,
2934,
896,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-1... | |
return '' | return '' | def getImageTile(self, **kwargs): """Get image tile url, relative to plone site.""" if self.hasImage(): imgtileurl = self.getImage().absolute_url(1) + '_tile' portal_url = getToolByName(self, 'portal_url').getPortalObject().absolute_url(1) imgtileurl = imgtileurl.replace(portal_url, '') return imgtileurl return '' | 01261c4a24bda3c515863dbf157e85fa90ae49ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8623/01261c4a24bda3c515863dbf157e85fa90ae49ad/Classified.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10567,
9337,
12,
2890,
16,
2826,
4333,
4672,
3536,
967,
1316,
4769,
880,
16,
3632,
358,
886,
476,
2834,
12123,
309,
365,
18,
5332,
2040,
13332,
3774,
15368,
718,
273,
365,
18,
588,
2040,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10567,
9337,
12,
2890,
16,
2826,
4333,
4672,
3536,
967,
1316,
4769,
880,
16,
3632,
358,
886,
476,
2834,
12123,
309,
365,
18,
5332,
2040,
13332,
3774,
15368,
718,
273,
365,
18,
588,
2040,... |
line="" | bufs = [] readsize = 100 | def readline(self): | b16a3b84509f6f66f60bb3c7521b2bee70ac1b1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b16a3b84509f6f66f60bb3c7521b2bee70ac1b1c/gzip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12023,
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,
12023,
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,
... |
if not hasattr(self, '_uid_attr'): self._uid_attr = self._login_attr if getattr(self, '_logger', None) is not None: del self._logger | def __setstate__(self, v): """ __setstate__ is called whenever the instance is loaded from the ZODB, like when Zope is restarted. """ # Call inherited __setstate__ methods if they exist LDAPUserFolder.inheritedAttribute('__setstate__')(self, v) | 8cd09c75fef8fcb1a27b2991d329e9c7c7baab7a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1858/8cd09c75fef8fcb1a27b2991d329e9c7c7baab7a/LDAPUserFolder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
2019,
972,
12,
2890,
16,
331,
4672,
3536,
1001,
542,
2019,
972,
353,
2566,
17334,
326,
791,
353,
4203,
628,
326,
2285,
19786,
16,
3007,
1347,
2285,
1306,
353,
28893,
18,
3536,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
2019,
972,
12,
2890,
16,
331,
4672,
3536,
1001,
542,
2019,
972,
353,
2566,
17334,
326,
791,
353,
4203,
628,
326,
2285,
19786,
16,
3007,
1347,
2285,
1306,
353,
28893,
18,
3536,... | |
"cx, rv, wrapper, vp);\n") | "cx, rv, vp);\n") | def pfail(msg): raise UserError( member.iface.name + '.' + member.name + ": " "parameter " + param.name + ": " + msg) | 85ee3e89273f0ac0b9295128759b8ada04a837bb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/85ee3e89273f0ac0b9295128759b8ada04a837bb/qsgen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
6870,
12,
3576,
4672,
1002,
2177,
668,
12,
3140,
18,
31479,
18,
529,
397,
2611,
397,
3140,
18,
529,
397,
6398,
315,
315,
6775,
315,
397,
579,
18,
529,
397,
6398,
315,
397,
1234,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
6870,
12,
3576,
4672,
1002,
2177,
668,
12,
3140,
18,
31479,
18,
529,
397,
2611,
397,
3140,
18,
529,
397,
6398,
315,
315,
6775,
315,
397,
579,
18,
529,
397,
6398,
315,
397,
1234,
... |
self.socket.close() | self.server_close() | def process_request(self, request, client_address): """Fork a new subprocess to process the request.""" self.collect_children() pid = os.fork() if pid: # Parent process if self.active_children is None: self.active_children = [] self.active_children.append(pid) return else: # Child process. # This must never return, hence os._exit()! try: self.socket.close() self.finish_request(request, client_address) os._exit(0) except: try: self.handle_error(request, client_address) finally: os._exit(1) | dd4c61dbf554aa00cd0e32e94620607dcc47f870 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/dd4c61dbf554aa00cd0e32e94620607dcc47f870/SocketServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
590,
16,
1004,
67,
2867,
4672,
3536,
22662,
279,
394,
6652,
358,
1207,
326,
590,
12123,
365,
18,
14676,
67,
5906,
1435,
4231,
273,
1140,
18,
23335,
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,
1207,
67,
2293,
12,
2890,
16,
590,
16,
1004,
67,
2867,
4672,
3536,
22662,
279,
394,
6652,
358,
1207,
326,
590,
12123,
365,
18,
14676,
67,
5906,
1435,
4231,
273,
1140,
18,
23335,
1435,
... |
file = open (settings_filepath, "w") keys = self.Settings.__dict__.keys() keys.sort() for k in keys: if not k.startswith('__'): value = getattr(self.Settings, k) print >> file, "%s = %s" % (k, repr(value)) | try: file = open (settings_filepath, "w") except IOError, message: print message else: keys = self.Settings.__dict__.keys() keys.sort() for k in keys: if not k.startswith('__'): value = getattr(self.Settings, k) print >> file, "%s = %s" % (k, repr(value)) | def SaveSettings (self): """ Save user settings to the home directory. """ | 89afe87da04cc547696c102942dff598c0340a94 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12653/89afe87da04cc547696c102942dff598c0340a94/pykdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7074,
2628,
261,
2890,
4672,
3536,
7074,
729,
1947,
358,
326,
6382,
1867,
18,
3536,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
7074,
2628,
261,
2890,
4672,
3536,
7074,
729,
1947,
358,
326,
6382,
1867,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
def _computeLabelPath(labelPath, oldLabel, newLabel): if not labelPath: return labelPath if oldLabel not in labelPath: return labelPath oldLabelIdx = labelPath.index(oldLabel) if newLabel in labelPath: newLabelIdx = labelPath.index(newLabel) if oldLabelIdx > newLabelIdx: del labelPath[oldLabelIdx] | def _computeLabelPath(name, labelPathMap): newLabelPath = [] for label, newLabels in labelPathMap: if len(newLabels) > 1: raise CloneError("Multiple clone targets for label %s" " - cannot build labelPath for %s" % (label, name)) elif newLabels: newLabel = newLabels.pop() | def _computeLabelPath(labelPath, oldLabel, newLabel): if not labelPath: return labelPath if oldLabel not in labelPath: return labelPath oldLabelIdx = labelPath.index(oldLabel) if newLabel in labelPath: newLabelIdx = labelPath.index(newLabel) if oldLabelIdx > newLabelIdx: del labelPath[oldLabelIdx] else: labelPath[oldLabelIdx] = newLabel del labelPath[newLabelIdx] else: labelPath[oldLabelIdx] = newLabel return labelPath | 48090a0a611c5a2a32181ce3ce6d2db11fdc4a5e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/48090a0a611c5a2a32181ce3ce6d2db11fdc4a5e/clone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9200,
2224,
743,
12,
529,
16,
1433,
743,
863,
4672,
394,
2224,
743,
273,
5378,
364,
1433,
16,
394,
5888,
316,
1433,
743,
863,
30,
309,
562,
12,
2704,
5888,
13,
405,
404,
30,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9200,
2224,
743,
12,
529,
16,
1433,
743,
863,
4672,
394,
2224,
743,
273,
5378,
364,
1433,
16,
394,
5888,
316,
1433,
743,
863,
30,
309,
562,
12,
2704,
5888,
13,
405,
404,
30,
100... |
""" | If a polynomial is univariate, the appropriate univariate factorization code is called. sage: R.<z> = PolynomialRing(CC,1) sage: f = z^4 - 6*z + 3 sage: f.factor() (z - 1.60443920904349) * (z - 0.511399619393097) * (z + 1.05791941421830 - 1.59281852704435*I) * (z + 1.05791941421830 + 1.59281852704435*I) """ | def factor(self): r""" Compute the irreducible factorization of this polynomial. | 9336fa26d8dd5021d98056108b28bc4c875657e6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/9336fa26d8dd5021d98056108b28bc4c875657e6/multi_polynomial_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5578,
12,
2890,
4672,
436,
8395,
8155,
326,
9482,
1118,
5286,
1523,
5578,
1588,
434,
333,
16991,
18,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
5578,
12,
2890,
4672,
436,
8395,
8155,
326,
9482,
1118,
5286,
1523,
5578,
1588,
434,
333,
16991,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
wikipedia.output(u'Can\'t get page %s : %s' % (ref.url, e)) | wikipedia.output(u'Can\'t retrieve page %s : %s' % (ref.url, e)) | def run(self): """ Runs the Bot """ wikipedia.setAction(wikipedia.translate(self.site, msg)) try: deadLinks = codecs.open(listof404pages, 'r', 'latin_1').read() except IOError: wikipedia.output('You need to download http://www.twoevils.org/files/wikipedia/404-links.txt.gz and to ungzip it in the same directory') raise socket.setdefaulttimeout(30) editedpages = 0 for page in self.generator: try: # Load the page's text from the wiki new_text = page.get() if not page.canBeEdited(): wikipedia.output(u"You can't edit page %s" % page.aslink()) continue except wikipedia.NoPage: wikipedia.output(u'Page %s not found' % page.aslink()) continue except wikipedia.IsRedirectPage: wikipedia.output(u'Page %s is a redirect' % page.aslink()) continue | 2dc49c34700a4ecf1ea7053669ffc5904385eb84 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/2dc49c34700a4ecf1ea7053669ffc5904385eb84/reflinks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
1939,
87,
326,
15039,
3536,
21137,
18,
542,
1803,
12,
11999,
13744,
18,
13929,
12,
2890,
18,
4256,
16,
1234,
3719,
775,
30,
8363,
7100,
273,
17437,
18,
3190,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
1939,
87,
326,
15039,
3536,
21137,
18,
542,
1803,
12,
11999,
13744,
18,
13929,
12,
2890,
18,
4256,
16,
1234,
3719,
775,
30,
8363,
7100,
273,
17437,
18,
3190,
... |
msg['From'] = smtp_server.from_email | msg['From'] = context.get('email_from', smtp_server.from_email) | def createReport(cr, uid, report, ids): files = [] for id in ids: try: service = netsvc.LocalService(report) (result, format) = service.create(cr, uid, [id], {}, {}) report_file = '/tmp/reports'+ str(id) + '.pdf' fp = open(report_file,'wb+') fp.write(result); fp.close(); files += [report_file] except Exception,e: continue return files | b99277b7db8543299de71bfb135bdfaac65bd942 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/b99277b7db8543299de71bfb135bdfaac65bd942/smtpclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
4820,
12,
3353,
16,
4555,
16,
2605,
16,
3258,
4672,
1390,
273,
5378,
364,
612,
316,
3258,
30,
775,
30,
1156,
273,
21954,
4227,
18,
25635,
12,
6006,
13,
261,
2088,
16,
740,
13,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
4820,
12,
3353,
16,
4555,
16,
2605,
16,
3258,
4672,
1390,
273,
5378,
364,
612,
316,
3258,
30,
775,
30,
1156,
273,
21954,
4227,
18,
25635,
12,
6006,
13,
261,
2088,
16,
740,
13,
2... |
for elem in tree.findall('//currencies/currency'): | for elem in tree.findall('.//currencies/currency'): | def main(): parser = OptionParser(usage='%prog path/to/cldr') options, args = parser.parse_args() if len(args) != 1: parser.error('incorrect number of arguments') srcdir = args[0] destdir = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), '..', 'babel') sup = parse(os.path.join(srcdir, 'supplemental', 'supplementalData.xml')) # Import global data from the supplemental files global_data = {} territory_zones = global_data.setdefault('territory_zones', {}) zone_aliases = global_data.setdefault('zone_aliases', {}) zone_territories = global_data.setdefault('zone_territories', {}) for elem in sup.findall('//timezoneData/zoneFormatting/zoneItem'): tzid = elem.attrib['type'] territory_zones.setdefault(elem.attrib['territory'], []).append(tzid) zone_territories[tzid] = elem.attrib['territory'] if 'aliases' in elem.attrib: for alias in elem.attrib['aliases'].split(): zone_aliases[alias] = tzid # Import Metazone mapping meta_zones = global_data.setdefault('meta_zones', {}) tzsup = parse(os.path.join(srcdir, 'supplemental', 'metazoneInfo.xml')) for elem in tzsup.findall('//timezone'): for child in elem.findall('usesMetazone'): if 'to' not in child.attrib: # FIXME: support old mappings meta_zones[elem.attrib['type']] = child.attrib['mzone'] outfile = open(os.path.join(destdir, 'global.dat'), 'wb') try: pickle.dump(global_data, outfile, 2) finally: outfile.close() # build a territory containment mapping for inheritance regions = {} for elem in sup.findall('//territoryContainment/group'): regions[elem.attrib['type']] = elem.attrib['contains'].split() # Resolve territory containment territory_containment = {} region_items = regions.items() region_items.sort() for group, territory_list in region_items: for territory in territory_list: containers = territory_containment.setdefault(territory, set([])) if group in territory_containment: containers |= territory_containment[group] containers.add(group) # prepare the per-locale plural rules definitions plural_rules = {} prsup = parse(os.path.join(srcdir, 'supplemental', 'plurals.xml')) for elem in prsup.findall('//plurals/pluralRules'): rules = [] for rule in elem.findall('pluralRule'): rules.append((rule.attrib['count'], unicode(rule.text))) pr = PluralRule(rules) for locale in elem.attrib['locales'].split(): plural_rules[locale] = pr filenames = os.listdir(os.path.join(srcdir, 'main')) filenames.remove('root.xml') filenames.sort(lambda a,b: len(a)-len(b)) filenames.insert(0, 'root.xml') for filename in filenames: stem, ext = os.path.splitext(filename) if ext != '.xml': continue print>>sys.stderr, 'Processing input file %r' % filename tree = parse(os.path.join(srcdir, 'main', filename)) data = {} language = None elem = tree.find('//identity/language') if elem is not None: language = elem.attrib['type'] print>>sys.stderr, ' Language: %r' % language territory = None elem = tree.find('//identity/territory') if elem is not None: territory = elem.attrib['type'] else: territory = '001' # world print>>sys.stderr, ' Territory: %r' % territory regions = territory_containment.get(territory, []) print>>sys.stderr, ' Regions: %r' % regions # plural rules locale_id = '_'.join(filter(None, [ language, territory != '001' and territory or None ])) if locale_id in plural_rules: data['plural_form'] = plural_rules[locale_id] # <localeDisplayNames> territories = data.setdefault('territories', {}) for elem in tree.findall('//territories/territory'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib['type'] in territories: continue territories[elem.attrib['type']] = _text(elem) languages = data.setdefault('languages', {}) for elem in tree.findall('//languages/language'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib['type'] in languages: continue languages[elem.attrib['type']] = _text(elem) variants = data.setdefault('variants', {}) for elem in tree.findall('//variants/variant'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib['type'] in variants: continue variants[elem.attrib['type']] = _text(elem) scripts = data.setdefault('scripts', {}) for elem in tree.findall('//scripts/script'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib['type'] in scripts: continue scripts[elem.attrib['type']] = _text(elem) # <dates> week_data = data.setdefault('week_data', {}) supelem = sup.find('//weekData') for elem in supelem.findall('minDays'): territories = elem.attrib['territories'].split() if territory in territories or any([r in territories for r in regions]): week_data['min_days'] = int(elem.attrib['count']) for elem in supelem.findall('firstDay'): territories = elem.attrib['territories'].split() if territory in territories or any([r in territories for r in regions]): week_data['first_day'] = weekdays[elem.attrib['day']] for elem in supelem.findall('weekendStart'): territories = elem.attrib['territories'].split() if territory in territories or any([r in territories for r in regions]): week_data['weekend_start'] = weekdays[elem.attrib['day']] for elem in supelem.findall('weekendEnd'): territories = elem.attrib['territories'].split() if territory in territories or any([r in territories for r in regions]): week_data['weekend_end'] = weekdays[elem.attrib['day']] zone_formats = data.setdefault('zone_formats', {}) for elem in tree.findall('//timeZoneNames/gmtFormat'): if 'draft' not in elem.attrib and 'alt' not in elem.attrib: zone_formats['gmt'] = unicode(elem.text).replace('{0}', '%s') break for elem in tree.findall('//timeZoneNames/regionFormat'): if 'draft' not in elem.attrib and 'alt' not in elem.attrib: zone_formats['region'] = unicode(elem.text).replace('{0}', '%s') break for elem in tree.findall('//timeZoneNames/fallbackFormat'): if 'draft' not in elem.attrib and 'alt' not in elem.attrib: zone_formats['fallback'] = unicode(elem.text) \ .replace('{0}', '%(0)s').replace('{1}', '%(1)s') break time_zones = data.setdefault('time_zones', {}) for elem in tree.findall('//timeZoneNames/zone'): info = {} city = elem.findtext('exemplarCity') if city: info['city'] = unicode(city) for child in elem.findall('long/*'): info.setdefault('long', {})[child.tag] = unicode(child.text) for child in elem.findall('short/*'): info.setdefault('short', {})[child.tag] = unicode(child.text) time_zones[elem.attrib['type']] = info meta_zones = data.setdefault('meta_zones', {}) for elem in tree.findall('//timeZoneNames/metazone'): info = {} city = elem.findtext('exemplarCity') if city: info['city'] = unicode(city) for child in elem.findall('long/*'): info.setdefault('long', {})[child.tag] = unicode(child.text) for child in elem.findall('short/*'): info.setdefault('short', {})[child.tag] = unicode(child.text) info['common'] = elem.findtext('commonlyUsed') == 'true' meta_zones[elem.attrib['type']] = info for calendar in tree.findall('//calendars/calendar'): if calendar.attrib['type'] != 'gregorian': # TODO: support other calendar types continue months = data.setdefault('months', {}) for ctxt in calendar.findall('months/monthContext'): ctxt_type = ctxt.attrib['type'] ctxts = months.setdefault(ctxt_type, {}) for width in ctxt.findall('monthWidth'): width_type = width.attrib['type'] widths = ctxts.setdefault(width_type, {}) for elem in width.getiterator(): if elem.tag == 'month': if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and int(elem.attrib['type']) in widths: continue widths[int(elem.attrib.get('type'))] = unicode(elem.text) elif elem.tag == 'alias': ctxts[width_type] = Alias( _translate_alias(['months', ctxt_type, width_type], elem.attrib['path']) ) days = data.setdefault('days', {}) for ctxt in calendar.findall('days/dayContext'): ctxt_type = ctxt.attrib['type'] ctxts = days.setdefault(ctxt_type, {}) for width in ctxt.findall('dayWidth'): width_type = width.attrib['type'] widths = ctxts.setdefault(width_type, {}) for elem in width.getiterator(): if elem.tag == 'day': dtype = weekdays[elem.attrib['type']] if ('draft' in elem.attrib or 'alt' not in elem.attrib) \ and dtype in widths: continue widths[dtype] = unicode(elem.text) elif elem.tag == 'alias': ctxts[width_type] = Alias( _translate_alias(['days', ctxt_type, width_type], elem.attrib['path']) ) quarters = data.setdefault('quarters', {}) for ctxt in calendar.findall('quarters/quarterContext'): ctxt_type = ctxt.attrib['type'] ctxts = quarters.setdefault(ctxt.attrib['type'], {}) for width in ctxt.findall('quarterWidth'): width_type = width.attrib['type'] widths = ctxts.setdefault(width_type, {}) for elem in width.getiterator(): if elem.tag == 'quarter': if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and int(elem.attrib['type']) in widths: continue widths[int(elem.attrib['type'])] = unicode(elem.text) elif elem.tag == 'alias': ctxts[width_type] = Alias( _translate_alias(['quarters', ctxt_type, width_type], elem.attrib['path']) ) eras = data.setdefault('eras', {}) for width in calendar.findall('eras/*'): width_type = NAME_MAP[width.tag] widths = eras.setdefault(width_type, {}) for elem in width.getiterator(): if elem.tag == 'era': if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and int(elem.attrib['type']) in widths: continue widths[int(elem.attrib.get('type'))] = unicode(elem.text) elif elem.tag == 'alias': eras[width_type] = Alias( _translate_alias(['eras', width_type], elem.attrib['path']) ) # AM/PM periods = data.setdefault('periods', {}) for elem in calendar.findall('am'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.tag in periods: continue periods[elem.tag] = unicode(elem.text) for elem in calendar.findall('pm'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.tag in periods: continue periods[elem.tag] = unicode(elem.text) date_formats = data.setdefault('date_formats', {}) for format in calendar.findall('dateFormats'): for elem in format.getiterator(): if elem.tag == 'dateFormatLength': if 'draft' in elem.attrib and \ elem.attrib.get('type') in date_formats: continue try: date_formats[elem.attrib.get('type')] = \ dates.parse_pattern(unicode(elem.findtext('dateFormat/pattern'))) except ValueError, e: print>>sys.stderr, 'ERROR: %s' % e elif elem.tag == 'alias': date_formats = Alias(_translate_alias( ['date_formats'], elem.attrib['path']) ) time_formats = data.setdefault('time_formats', {}) for format in calendar.findall('timeFormats'): for elem in format.getiterator(): if elem.tag == 'timeFormatLength': if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib.get('type') in time_formats: continue try: time_formats[elem.attrib.get('type')] = \ dates.parse_pattern(unicode(elem.findtext('timeFormat/pattern'))) except ValueError, e: print>>sys.stderr, 'ERROR: %s' % e elif elem.tag == 'alias': time_formats = Alias(_translate_alias( ['time_formats'], elem.attrib['path']) ) datetime_formats = data.setdefault('datetime_formats', {}) for format in calendar.findall('dateTimeFormats'): for elem in format.getiterator(): if elem.tag == 'dateTimeFormatLength': if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib.get('type') in datetime_formats: continue try: datetime_formats[elem.attrib.get('type')] = \ unicode(elem.findtext('dateTimeFormat/pattern')) except ValueError, e: print>>sys.stderr, 'ERROR: %s' % e elif elem.tag == 'alias': datetime_formats = Alias(_translate_alias( ['datetime_formats'], elem.attrib['path']) ) # <numbers> number_symbols = data.setdefault('number_symbols', {}) for elem in tree.findall('//numbers/symbols/*'): if ('draft' in elem.attrib or 'alt' in elem.attrib): continue number_symbols[elem.tag] = unicode(elem.text) decimal_formats = data.setdefault('decimal_formats', {}) for elem in tree.findall('//decimalFormats/decimalFormatLength'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib.get('type') in decimal_formats: continue pattern = unicode(elem.findtext('decimalFormat/pattern')) decimal_formats[elem.attrib.get('type')] = numbers.parse_pattern(pattern) scientific_formats = data.setdefault('scientific_formats', {}) for elem in tree.findall('//scientificFormats/scientificFormatLength'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib.get('type') in scientific_formats: continue pattern = unicode(elem.findtext('scientificFormat/pattern')) scientific_formats[elem.attrib.get('type')] = numbers.parse_pattern(pattern) currency_formats = data.setdefault('currency_formats', {}) for elem in tree.findall('//currencyFormats/currencyFormatLength'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib.get('type') in currency_formats: continue pattern = unicode(elem.findtext('currencyFormat/pattern')) currency_formats[elem.attrib.get('type')] = numbers.parse_pattern(pattern) percent_formats = data.setdefault('percent_formats', {}) for elem in tree.findall('//percentFormats/percentFormatLength'): if ('draft' in elem.attrib or 'alt' in elem.attrib) \ and elem.attrib.get('type') in percent_formats: continue pattern = unicode(elem.findtext('percentFormat/pattern')) percent_formats[elem.attrib.get('type')] = numbers.parse_pattern(pattern) currency_names = data.setdefault('currency_names', {}) currency_symbols = data.setdefault('currency_symbols', {}) for elem in tree.findall('//currencies/currency'): code = elem.attrib['type'] # TODO: support plural rules for currency name selection for name in elem.findall('displayName'): if ('draft' in name.attrib or 'count' in name.attrib) \ and code in currency_names: continue currency_names[code] = unicode(name.text) # TODO: support choice patterns for currency symbol selection symbol = elem.find('symbol') if symbol is not None and 'draft' not in symbol.attrib \ and 'choice' not in symbol.attrib: currency_symbols[code] = unicode(symbol.text) # <units> unit_patterns = data.setdefault('unit_patterns', {}) for elem in tree.findall('//units/unit'): unit_type = elem.attrib['type'] unit_pattern = unit_patterns.setdefault(unit_type, {}) for pattern in elem.findall('unitPattern'): unit_patterns[unit_type][pattern.attrib['count']] = \ unicode(pattern.text) outfile = open(os.path.join(destdir, 'localedata', stem + '.dat'), 'wb') try: pickle.dump(data, outfile, 2) finally: outfile.close() | f6a446f4ec90556809110a0a1cf043584a1e7e50 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8909/f6a446f4ec90556809110a0a1cf043584a1e7e50/import_cldr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2082,
273,
18862,
12,
9167,
28713,
14654,
589,
19,
869,
19,
830,
3069,
6134,
702,
16,
833,
273,
2082,
18,
2670,
67,
1968,
1435,
309,
562,
12,
1968,
13,
480,
404,
30,
2082,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2082,
273,
18862,
12,
9167,
28713,
14654,
589,
19,
869,
19,
830,
3069,
6134,
702,
16,
833,
273,
2082,
18,
2670,
67,
1968,
1435,
309,
562,
12,
1968,
13,
480,
404,
30,
2082,... |
decoder = bin.get_by_name ("stw_decodebin") encoder = bin.get_by_name ("stw_wavenc") | decoder = bin.get_by_name("stw_decodebin") encoder = bin.get_by_name("stw_wavenc") | def source_to_wav(source, sink): """ Converts a given source element to wav format and sends it to sink element. To convert a media file to a wav using gst-launch: source ! decodebin ! audioconvert ! audioscale !$_WAV_PCM_PARSE ! wavenc """ bin = gst.parse_launch ( "decodebin name=stw_decodebin !" "audioconvert ! " + _WAV_PCM_PARSE + " ! wavenc name=stw_wavenc" ) oper = GstOperation(sink, bin) decoder = bin.get_by_name ("stw_decodebin") encoder = bin.get_by_name ("stw_wavenc") oper.bin.add (source) oper.bin.add (sink) source.link (decoder) encoder.link (sink) return oper | 016aec4a85d3438c0d49f1f8b2012e23eb7805ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2207/016aec4a85d3438c0d49f1f8b2012e23eb7805ec/audio.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1084,
67,
869,
67,
24801,
12,
3168,
16,
9049,
4672,
3536,
20377,
279,
864,
1084,
930,
358,
19342,
740,
471,
9573,
518,
358,
9049,
930,
18,
225,
2974,
1765,
279,
3539,
585,
358,
279,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1084,
67,
869,
67,
24801,
12,
3168,
16,
9049,
4672,
3536,
20377,
279,
864,
1084,
930,
358,
19342,
740,
471,
9573,
518,
358,
9049,
930,
18,
225,
2974,
1765,
279,
3539,
585,
358,
279,
19... |
myCoH.reSchedule(myC.getNextConnectionDelay(), True) | def parseHaltError(reason, myCommandOnHostID): # something goes really wrong: immediately give up (myCoH, myC, myT) = gatherCoHStuff(myCommandOnHostID) logger = logging.getLogger() logger.warn("command_on_host #%s: halt failed, unattented reason: %s" % (myCommandOnHostID, reason)) myCoH.reSchedule(myC.getNextConnectionDelay(), True) updateHistory(myCommandOnHostID, 'halt_failed', 255, '', reason.getErrorMessage()) myCoH.switchToHaltFailed(myC.getNextConnectionDelay()) # FIXME: should return a failure (but which one ?) return None | 63988b85f9381f0696378eae9c2406356f5c47c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5988/63988b85f9381f0696378eae9c2406356f5c47c9/scheduling.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
27034,
668,
12,
10579,
16,
3399,
2189,
1398,
2594,
734,
4672,
468,
5943,
13998,
8654,
7194,
30,
7636,
8492,
731,
261,
4811,
4249,
44,
16,
3399,
39,
16,
3399,
56,
13,
273,
11090,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
27034,
668,
12,
10579,
16,
3399,
2189,
1398,
2594,
734,
4672,
468,
5943,
13998,
8654,
7194,
30,
7636,
8492,
731,
261,
4811,
4249,
44,
16,
3399,
39,
16,
3399,
56,
13,
273,
11090,
... | |
traceback.print_exc(file=sys.stdout) sys.stdout.flush() | traceback.print_exc(file=sys.stderr) sys.stderr.flush() | def runtest_inner(test, verbose, quiet, testdir=None, huntrleaks=False, debug=False): support.unload(test) testdir = findtestdir(testdir) if verbose: capture_stdout = None else: capture_stdout = io.StringIO() test_time = 0.0 refleak = False # True if the test leaked references. try: if test.startswith('test.'): abstest = test else: # Always import it from the test package abstest = 'test.' + test with saved_test_environment(test, verbose, quiet) as environment: start_time = time.time() the_package = __import__(abstest, globals(), locals(), []) the_module = getattr(the_package, test) # Old tests run to completion simply as a side-effect of # being imported. For tests based on unittest or doctest, # explicitly invoke their test_main() function (if it exists). indirect_test = getattr(the_module, "test_main", None) if indirect_test is not None: indirect_test() if huntrleaks: refleak = dash_R(the_module, test, indirect_test, huntrleaks) test_time = time.time() - start_time except support.ResourceDenied as msg: if not quiet: print(test, "skipped --", msg) sys.stdout.flush() return RESOURCE_DENIED, test_time except unittest.SkipTest as msg: if not quiet: print(test, "skipped --", msg) sys.stdout.flush() return SKIPPED, test_time except KeyboardInterrupt: raise except support.TestFailed as msg: print("test", test, "failed --", msg) sys.stdout.flush() return FAILED, test_time except: type, value = sys.exc_info()[:2] print("test", test, "crashed --", str(type) + ":", value) sys.stdout.flush() if verbose or debug: traceback.print_exc(file=sys.stdout) sys.stdout.flush() return FAILED, test_time else: if refleak: return FAILED, test_time if environment.changed: return ENV_CHANGED, test_time return PASSED, test_time | 4db9acbae659de1c1b3239fd2447701d106bc0fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/4db9acbae659de1c1b3239fd2447701d106bc0fd/regrtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3813,
67,
7872,
12,
3813,
16,
3988,
16,
10902,
16,
1842,
1214,
33,
7036,
16,
366,
318,
313,
298,
581,
87,
33,
8381,
16,
1198,
33,
8381,
4672,
2865,
18,
318,
945,
12,
3813,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3813,
67,
7872,
12,
3813,
16,
3988,
16,
10902,
16,
1842,
1214,
33,
7036,
16,
366,
318,
313,
298,
581,
87,
33,
8381,
16,
1198,
33,
8381,
4672,
2865,
18,
318,
945,
12,
3813,
13,
... |
14 5 LOAD_CONST 1 (1) | %-4d 5 LOAD_CONST 1 (1) | def _f(a): print a return 1 | ea8672abcf4ec0c7de0b66afa28b40283f23f621 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/ea8672abcf4ec0c7de0b66afa28b40283f23f621/test_dis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
74,
12,
69,
4672,
1172,
279,
327,
404,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
389,
74,
12,
69,
4672,
1172,
279,
327,
404,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
6 | 1 | def is_power_of_two(n): r""" This function returns True if and only if $n$ is a power of 2 INPUT: n -- integer OUTPUT: True -- if n is a power of 2 False -- if not EXAMPLES: sage: from sage.databases.sloane_functions import is_power_of_two sage: is_power_of_two(1024) True sage: is_power_of_two(1) True sage: is_power_of_two(24) False sage: is_power_of_two(0) False sage: is_power_of_two(-4) False AUTHOR: -- Jaap Spies (2006-12-09) """ # modification of is2pow(n) from the Programming Guide while n > 0 and n%2 == 0: n = n >> 1 return n == 1 | 6234db563ec4990fb462898e2401076f062d364a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/6234db563ec4990fb462898e2401076f062d364a/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
12238,
67,
792,
67,
15415,
12,
82,
4672,
436,
8395,
1220,
445,
1135,
1053,
309,
471,
1338,
309,
271,
82,
8,
353,
279,
7212,
434,
576,
225,
12943,
30,
290,
1493,
3571,
225,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
12238,
67,
792,
67,
15415,
12,
82,
4672,
436,
8395,
1220,
445,
1135,
1053,
309,
471,
1338,
309,
271,
82,
8,
353,
279,
7212,
434,
576,
225,
12943,
30,
290,
1493,
3571,
225,
1... |
*kern* -- if 0, no alias, then each frame is filtered, if an array, use this as a kernel to convolve each frame with; see aliased_pix_iter for default kernel | **kwargs -- to be passed to fseq.as3darray() | def cwtmap(fseq, tranges, frange, nfreqs = 32, wavelet = pycwt.Morlet(), func = np.mean, normL = None, verbose = True, **kwargs): """ Wavelet-based 'functional' map of the frame sequence Arguments ---------- *extent* is the window of the form (start-time, stop-time, low-frequency, high-frequency) *nfreqs* -- how many different frequencies in the given range (default 16) *wavelet* -- wavelet object (default pycwt.Morlet()) *func* -- function to apply to the wavelet spectrogram within the window of interest. Default, np.mean *normL* -- length of normalizing part (baseline) of the time series *kern* -- if 0, no alias, then each frame is filtered, if an array, use this as a kernel to convolve each frame with; see aliased_pix_iter for default kernel """ tick = time.clock() L = fseq.length() shape = fseq.shape(kwargs.has_key('sliceobj') and kwargs['sliceobj'] or None) total = shape[0]*shape[1] k = 0 pix_iter = None normL = ifnot(normL, L) if not isseq(tranges[0]): tranges = (tranges,) pix_iter = pix_iter(**kwargs) if len(frange) == 2: # a low-high pair freqs = np.linspace(frange[0], frange[1], num=nfreqs) else: freqs= np.array(frange.copy()) tstarts = map(lambda x: int(x[0]/fseq.dt), tranges) tstops = map(lambda x: int(x[1]/fseq.dt), tranges) out = np.ones((len(tranges),)+shape, np.float64) for s,i,j in pix_iter: s = (s-np.mean(s[:normL]))/np.std(s[:normL]) cwt = pycwt.cwt_f(s, freqs, 1./fseq.dt, wavelet, 'zpd') eds = pycwt.eds(cwt) for tk, tr in enumerate(tranges): out[tk,i,j] = func(eds[:,tstarts[tk]:tstops[tk]]) k+= 1 if verbose: sys.stderr.write("\rpixel %05d of %05d"%(k,total)) if verbose: sys.stderr.write("\n Finished in %3.2f s\n"%(time.clock()-tick)) return out | 272f87825b11e98efd01405e3f05bafc10f54631 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6360/272f87825b11e98efd01405e3f05bafc10f54631/fnmap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
6046,
1458,
12,
74,
5436,
16,
433,
2054,
16,
284,
3676,
16,
290,
10212,
87,
273,
3847,
16,
19342,
808,
273,
2395,
71,
6046,
18,
49,
280,
1810,
9334,
1326,
273,
1130,
18,
7079,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
6046,
1458,
12,
74,
5436,
16,
433,
2054,
16,
284,
3676,
16,
290,
10212,
87,
273,
3847,
16,
19342,
808,
273,
2395,
71,
6046,
18,
49,
280,
1810,
9334,
1326,
273,
1130,
18,
7079,
1... |
st.st_atime = fattr[11][1] st.st_mtime = fattr[12][1] st.st_ctime = fattr[13][1] | st.st_atime = fattr[11][0] st.st_mtime = fattr[12][0] st.st_ctime = fattr[13][0] | def getattr(self, path): try: handle, fattr = self.gethandle(path) except NFSError as e: no = e.errno() raise IOError(no, os.strerror(no), path) st = NFSStat() st.st_mode, st.st_nlink, st.st_uid, st.st_gid, st.st_size \ = fattr[1:6] st.st_atime = fattr[11][1] st.st_mtime = fattr[12][1] st.st_ctime = fattr[13][1] return st | 4db5b7fd7ca538c87d43196cf868b6e7d6c04ad1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12550/4db5b7fd7ca538c87d43196cf868b6e7d6c04ad1/nfsfuse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3869,
12,
2890,
16,
589,
4672,
775,
30,
1640,
16,
284,
1747,
273,
365,
18,
75,
546,
464,
298,
12,
803,
13,
1335,
31924,
668,
487,
425,
30,
1158,
273,
425,
18,
19088,
1435,
1002,
8340... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3869,
12,
2890,
16,
589,
4672,
775,
30,
1640,
16,
284,
1747,
273,
365,
18,
75,
546,
464,
298,
12,
803,
13,
1335,
31924,
668,
487,
425,
30,
1158,
273,
425,
18,
19088,
1435,
1002,
8340... |
self.db.indexer.add_text((self.classname, newid, 'content'), content, mime_type) | def create(self, **propvalues): ''' Snarf the "content" propvalue and store in a file ''' # we need to fire the auditors now, or the content property won't # be in propvalues for the auditors to play with self.fireAuditors('create', None, propvalues) | a8acbbb5a688b3fe6b2804f57ef870262e75beda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a8acbbb5a688b3fe6b2804f57ef870262e75beda/back_anydbm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
2826,
5986,
2372,
4672,
9163,
18961,
297,
74,
326,
315,
1745,
6,
2270,
1132,
471,
1707,
316,
279,
585,
9163,
468,
732,
1608,
358,
4452,
326,
8215,
1383,
2037,
16,
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,
752,
12,
2890,
16,
2826,
5986,
2372,
4672,
9163,
18961,
297,
74,
326,
315,
1745,
6,
2270,
1132,
471,
1707,
316,
279,
585,
9163,
468,
732,
1608,
358,
4452,
326,
8215,
1383,
2037,
16,
57... | |
handler = httphandler() | handlers = [httphandler()] | def __init__(self, ui, path): self.path = path self.caps = None scheme, netloc, urlpath, query, frag = urlparse.urlsplit(path) if query or frag: raise util.Abort(_('unsupported URL component: "%s"') % (query or frag)) if not urlpath: urlpath = '/' host, port, user, passwd = netlocsplit(netloc) | 40b8d085910ef31f3695e0a6c465057eb9a66e6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/40b8d085910ef31f3695e0a6c465057eb9a66e6b/httprepo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5915,
16,
589,
4672,
365,
18,
803,
273,
589,
365,
18,
22984,
273,
599,
4355,
16,
17345,
16,
880,
803,
16,
843,
16,
10111,
273,
15185,
18,
718,
4939,
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,
5915,
16,
589,
4672,
365,
18,
803,
273,
589,
365,
18,
22984,
273,
599,
4355,
16,
17345,
16,
880,
803,
16,
843,
16,
10111,
273,
15185,
18,
718,
4939,
12... |
l.ll_items()[index] = newitem | l.ll_setitem_fast(index, newitem) | def ll_setitem(func, l, index, newitem): length = l.ll_length() if index < 0: index += length if func is dum_checkidx and (index < 0 or index >= length): raise IndexError l.ll_items()[index] = newitem | 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,
542,
1726,
12,
644,
16,
328,
16,
770,
16,
394,
1726,
4672,
769,
273,
328,
18,
2906,
67,
2469,
1435,
309,
770,
411,
374,
30,
770,
1011,
769,
309,
1326,
353,
4569,
67,
1893,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
542,
1726,
12,
644,
16,
328,
16,
770,
16,
394,
1726,
4672,
769,
273,
328,
18,
2906,
67,
2469,
1435,
309,
770,
411,
374,
30,
770,
1011,
769,
309,
1326,
353,
4569,
67,
1893,
... |
logging.debug("Notify JobState.finished: %s" % self.reportfilename) self.notifyJobState(self.reportfilename) | def checkJobs(self): """ _checkJobs_ | 5bdb1c349ce5e41178ed44ac6e68520081a9399e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/5bdb1c349ce5e41178ed44ac6e68520081a9399e/TrackingComponent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
7276,
12,
2890,
4672,
3536,
389,
1893,
7276,
67,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
866,
7276,
12,
2890,
4672,
3536,
389,
1893,
7276,
67,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
links = [] | def getLinksFromOb(self, ob, properties=None): """Return a list of links contained in the properties of ob. | e5f5a5bed885725353a5666f8b2897ed3eed58d1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/e5f5a5bed885725353a5666f8b2897ed3eed58d1/LinkChecker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
7100,
1265,
10516,
12,
2890,
16,
3768,
16,
1790,
33,
7036,
4672,
3536,
990,
279,
666,
434,
4716,
7542,
316,
326,
1790,
434,
3768,
18,
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,
336,
7100,
1265,
10516,
12,
2890,
16,
3768,
16,
1790,
33,
7036,
4672,
3536,
990,
279,
666,
434,
4716,
7542,
316,
326,
1790,
434,
3768,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
self.assertEqual(metadata.get('imageMin'), 0.) self.assertAlmostEqual(metadata.get('imageSigma'), 23.54591, 5) self.assertEqual(metadata.get('imageMax'), 81.0) | self.assertEqual(metadata.get('imageMin'), 2.) self.assertAlmostEqual(metadata.get('imageSigma'), 22.93223, 5) self.assertEqual(metadata.get('imageMax'), 79.0) | def testCcdSdqa(self): nsat = 0 exposure = afwImage.ExposureF(afwImage.MaskedImageF(self.mi, self.dbox)) ipIsr.calculateSdqaCcdRatings(exposure) metadata = exposure.getMetadata() self.assertEqual(metadata.get('imageClipMean4Sig3Pass'), 40.5) self.assertEqual(metadata.get('imageMedian'), 40.5) self.assertEqual(metadata.get('imageMin'), 0.) self.assertAlmostEqual(metadata.get('imageSigma'), 23.54591, 5) self.assertEqual(metadata.get('imageMax'), 81.0) self.assertEqual(metadata.get('nSaturatePix'), 10) self.assertEqual(metadata.get('nBadCalibPix'), 10) | 8dcd043082e2f89caee30e87399fb2a4023e17fa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6526/8dcd043082e2f89caee30e87399fb2a4023e17fa/testSdqa.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
39,
4315,
55,
72,
7588,
12,
2890,
4672,
3153,
270,
273,
374,
14620,
273,
10073,
91,
2040,
18,
424,
11291,
42,
12,
1727,
91,
2040,
18,
5796,
329,
2040,
42,
12,
2890,
18,
9197,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
39,
4315,
55,
72,
7588,
12,
2890,
4672,
3153,
270,
273,
374,
14620,
273,
10073,
91,
2040,
18,
424,
11291,
42,
12,
1727,
91,
2040,
18,
5796,
329,
2040,
42,
12,
2890,
18,
9197,
1... |
Data: Version: 1 (0x0) Serial Number: 02:ad:66:7e:4e:45:fe:5e:57:6f:3c:98:19:5e:dd:c0 Signature Algorithm: md2WithRSAEncryption Issuer: C=US, O=RSA Data Security, Inc., OU=Secure Server Certification Authority Validity Not Before: Nov 9 00:00:00 1994 GMT Not After : Jan 7 23:59:59 2010 GMT Subject: C=US, O=RSA Data Security, Inc., OU=Secure Server Certification Authority Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (1000 bit) Modulus (1000 bit): 00:92:ce:7a:c1:ae:83:3e:5a:aa:89:83:57:ac:25: 01:76:0c:ad:ae:8e:2c:37:ce:eb:35:78:64:54:03: e5:84:40:51:c9:bf:8f:08:e2:8a:82:08:d2:16:86: 37:55:e9:b1:21:02:ad:76:68:81:9a:05:a2:4b:c9: 4b:25:66:22:56:6c:88:07:8f:f7:81:59:6d:84:07: 65:70:13:71:76:3e:9b:77:4c:e3:50:89:56:98:48: b9:1d:a7:29:1a:13:2e:4a:11:59:9c:1e:15:d5:49: 54:2c:73:3a:69:82:b1:97:39:9c:6d:70:67:48:e5: dd:2d:d6:c8:1e:7b Exponent: 65537 (0x10001) | Data: Version: 1 (0x0) Serial Number: 02:ad:66:7e:4e:45:fe:5e:57:6f:3c:98:19:5e:dd:c0 | def exactlyOneSidebarCollectionNamed(name): """ Look for a sidebar collection with name, otherwise return False """ entries = [] sidebarWidget = app_ns().sidebar.widget for i in range(sidebarWidget.GetNumberRows()): collection = sidebarWidget.GetTable().GetValue(i,0)[0] if collection.displayName == name: entries.append(collection) if len(entries) == 0: logger.ReportFailure("Certificate Store not in sidebar") if len(entries) > 1: logger.ReportFailure("More than one Certificate Store not in sidebar") | 7f0c39ce7bb82ede3c725b7832fb6b61ad715f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/7f0c39ce7bb82ede3c725b7832fb6b61ad715f34/TestCertstoreView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8950,
3335,
8895,
3215,
2532,
7604,
12,
529,
4672,
3536,
10176,
364,
279,
23364,
1849,
598,
508,
16,
3541,
327,
1083,
3536,
3222,
273,
5378,
23364,
4609,
273,
595,
67,
2387,
7675,
26417,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8950,
3335,
8895,
3215,
2532,
7604,
12,
529,
4672,
3536,
10176,
364,
279,
23364,
1849,
598,
508,
16,
3541,
327,
1083,
3536,
3222,
273,
5378,
23364,
4609,
273,
595,
67,
2387,
7675,
26417,
... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 22) else quickfix.StringField.__init__(self, 22, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
11201,
13,
469,
9549,
904,
18,
780,
974,
16186,
2738,
972,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
11201,
13,
469,
9549,
904,
18,
780,
974,
16186,
2738,
972,
... |
todel = xitem del x[2][xitem] | todel.append(xitem) for xitem in todel[::-1]: del x[2][xitem] | def _where_calc(self, args): qu1, qu2 = [], [] for x in args: table=self if len(x) > 3: table=x[3] if x[1] != 'in': | d34b0bf034a51e712382513f8b8e70820088f163 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12853/d34b0bf034a51e712382513f8b8e70820088f163/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6051,
67,
12448,
12,
2890,
16,
833,
4672,
719,
21,
16,
719,
22,
273,
5378,
16,
5378,
364,
619,
316,
833,
30,
1014,
33,
2890,
309,
562,
12,
92,
13,
405,
890,
30,
1014,
33,
92,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6051,
67,
12448,
12,
2890,
16,
833,
4672,
719,
21,
16,
719,
22,
273,
5378,
16,
5378,
364,
619,
316,
833,
30,
1014,
33,
2890,
309,
562,
12,
92,
13,
405,
890,
30,
1014,
33,
92,
... |
""" Should set signal handlers according to `signal_map` """ | """ Should set signal handlers according to `signal_map`. """ | def test_sets_signal_handlers_from_signal_map(self): """ Should set signal handlers according to `signal_map` """ instance = self.test_instance instance.signal_map = object() expect_signal_handler_map = self.test_signal_handler_map expect_mock_output = """\ ... Called daemon.daemon.set_signal_handlers( %(expect_signal_handler_map)r) ... """ % vars() instance.open() self.failUnlessMockCheckerMatch(expect_mock_output) | 33a5bfc655a6417210c5c80d9f942714bf596533 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4939/33a5bfc655a6417210c5c80d9f942714bf596533/test_daemon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4424,
67,
10420,
67,
11046,
67,
2080,
67,
10420,
67,
1458,
12,
2890,
4672,
3536,
9363,
444,
4277,
4919,
4888,
358,
1375,
10420,
67,
1458,
8338,
3536,
791,
273,
365,
18,
3813,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4424,
67,
10420,
67,
11046,
67,
2080,
67,
10420,
67,
1458,
12,
2890,
4672,
3536,
9363,
444,
4277,
4919,
4888,
358,
1375,
10420,
67,
1458,
8338,
3536,
791,
273,
365,
18,
3813,
... |
for catch in node.catches: result += "catch(%s)%s" % (catch.varName, compress(catch.block)) | for catch in node: if catch.type == "catch": result += "catch(%s)%s" % (catch.varName, compress(catch.block)) | def __try(node): result = "try%s" % compress(node.tryBlock) for catch in node.catches: result += "catch(%s)%s" % (catch.varName, compress(catch.block)) if hasattr(node, "finallyBlock"): result += "finally%s" % compress(node.finallyBlock) return result | 1cd8b892269ec5a9f3e051827be97a22a8784c19 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/1cd8b892269ec5a9f3e051827be97a22a8784c19/Compressor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
698,
12,
2159,
4672,
563,
273,
315,
698,
9,
87,
6,
738,
8099,
12,
2159,
18,
698,
1768,
13,
225,
364,
1044,
316,
756,
30,
309,
1044,
18,
723,
422,
315,
14683,
6877,
563,
1011,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
698,
12,
2159,
4672,
563,
273,
315,
698,
9,
87,
6,
738,
8099,
12,
2159,
18,
698,
1768,
13,
225,
364,
1044,
316,
756,
30,
309,
1044,
18,
723,
422,
315,
14683,
6877,
563,
1011,
... |
def __init__(self, path=None, debug=0, excludes = [], replace_paths = []): | def __init__(self, path=None, debug=0, excludes = []): | def __init__(self, path=None, debug=0, excludes = [], replace_paths = []): if path is None: path = sys.path self.path = path self.modules = {} self.badmodules = {} self.debug = debug self.indent = 0 self.excludes = excludes self.replace_paths = replace_paths self.processed_paths = [] # Used in debugging only | d8c3466dfb0ae0eb2105137bf301bbd7bbd5637c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1361/d8c3466dfb0ae0eb2105137bf301bbd7bbd5637c/modulefinder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
589,
33,
7036,
16,
1198,
33,
20,
16,
13644,
273,
5378,
4672,
309,
589,
353,
599,
30,
589,
273,
2589,
18,
803,
365,
18,
803,
273,
589,
365,
18,
6400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
589,
33,
7036,
16,
1198,
33,
20,
16,
13644,
273,
5378,
4672,
309,
589,
353,
599,
30,
589,
273,
2589,
18,
803,
365,
18,
803,
273,
589,
365,
18,
6400,
... |
self.DebugStr('pManager '+ __version__ +': Warning: Skipping unknown section "'+sect+'" in configfile "'+self.sConfigFileName+'"') self.DebugStr('pManager '+ __version__ +': Info -- finished parsing config file.') | self.DebugStr('pManager '+ __version__ +': Warning: Skipping unknown section "'+sect+'" in configfile "'+self.sConfigFileName+'"', 0) self.DebugStr('pManager '+ __version__ +': Info -- finished parsing config file.', 0) | def SetConfig(self): """Reads configfile and calls for each entry in each section interface.SetParam. | 0cac88e865d618b23e0bbc34f2a374cdf6fb3cbb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2853/0cac88e865d618b23e0bbc34f2a374cdf6fb3cbb/pManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
809,
12,
2890,
4672,
3536,
7483,
642,
768,
471,
4097,
364,
1517,
1241,
316,
1517,
2442,
1560,
18,
694,
786,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
809,
12,
2890,
4672,
3536,
7483,
642,
768,
471,
4097,
364,
1517,
1241,
316,
1517,
2442,
1560,
18,
694,
786,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
param = lsctables.ProcessParams() param.program = process.program param.process_id = process.process_id param.param = str(name) param.type = str(type) param.value = str(value) paramtable.append(param) | row = lsctables.ProcessParams() row.program = process.program row.process_id = process.process_id row.param = str(name) row.type = str(type) row.value = str(value) paramtable.append(row) | def append_process_params(doc, process, params): """ doc is an XML document tree, process is the row in the process table for which these are the parameters, and params is a list of (name, type, value) tuples one for each parameter. """ paramtable = table.get_table(doc, lsctables.ProcessParamsTable.tableName) for name, type, value in params: param = lsctables.ProcessParams() param.program = process.program param.process_id = process.process_id param.param = str(name) param.type = str(type) param.value = str(value) paramtable.append(param) return process | b226b356b9c02643f49fabe43db49a2ad60f70a0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/b226b356b9c02643f49fabe43db49a2ad60f70a0/llwapp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
67,
2567,
67,
2010,
12,
2434,
16,
1207,
16,
859,
4672,
3536,
997,
353,
392,
3167,
1668,
2151,
16,
1207,
353,
326,
1027,
316,
326,
1207,
1014,
364,
1492,
4259,
854,
326,
1472,
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,
714,
67,
2567,
67,
2010,
12,
2434,
16,
1207,
16,
859,
4672,
3536,
997,
353,
392,
3167,
1668,
2151,
16,
1207,
353,
326,
1027,
316,
326,
1207,
1014,
364,
1492,
4259,
854,
326,
1472,
16,
... |
def _normalize_id(self, id): """Normalize the account identifier. Args: id: An acctount identifier Returns: A normalized account identifier, if possible. """ if id.startswith('acct://'): return id[7:] elif id.startswith('acct:'): return id[5:] return id | def lookup(self, id): """Look up a webfinger resource by (email-like) id. | 5f420d059590af8a2f5d4ad22c4edc765a63074e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4291/5f420d059590af8a2f5d4ad22c4edc765a63074e/webfinger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3689,
12,
2890,
16,
612,
4672,
3536,
9794,
731,
279,
3311,
74,
6658,
1058,
635,
261,
3652,
17,
5625,
13,
612,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3689,
12,
2890,
16,
612,
4672,
3536,
9794,
731,
279,
3311,
74,
6658,
1058,
635,
261,
3652,
17,
5625,
13,
612,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
penVector = (self.width-1, (self.height-1) * (1-channel)) | penVector = (self.width-1, int((self.height-1) * (1-channel))) | def graphChannels(self): """Graph the current values of each channel. Called each time the graph is scrolled and/or the channel values are changed. """ for i in range(len(self.channels)): channel = self.channels[i] if channel is not None: # Calculate a current pen position, always at the right side of the graph penVector = (self.width-1, (self.height-1) * (1-channel)) | 0163d41599928b66297506472e64a668c7e95288 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/0163d41599928b66297506472e64a668c7e95288/adc_graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2667,
10585,
12,
2890,
4672,
3536,
4137,
326,
783,
924,
434,
1517,
1904,
18,
11782,
1517,
813,
326,
2667,
353,
888,
25054,
471,
19,
280,
326,
1904,
924,
854,
3550,
18,
3536,
364,
277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2667,
10585,
12,
2890,
4672,
3536,
4137,
326,
783,
924,
434,
1517,
1904,
18,
11782,
1517,
813,
326,
2667,
353,
888,
25054,
471,
19,
280,
326,
1904,
924,
854,
3550,
18,
3536,
364,
277,
... |
def check_header_charsets(self, msg_charset=None): """Check From and Subject for encoded-words | def decode_headers(self): """MIME-decode headers. | def check_header_charsets(self, msg_charset=None): """Check From and Subject for encoded-words | 4616e826ade7dba7eafa7e61bb5fa387d722335c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/4616e826ade7dba7eafa7e61bb5fa387d722335c/HyperArch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
3374,
67,
3001,
4424,
12,
2890,
16,
1234,
67,
9999,
33,
7036,
4672,
3536,
1564,
6338,
471,
9912,
364,
3749,
17,
3753,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
3374,
67,
3001,
4424,
12,
2890,
16,
1234,
67,
9999,
33,
7036,
4672,
3536,
1564,
6338,
471,
9912,
364,
3749,
17,
3753,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
(?P<citationlabel>%s) | (?P<citationlabel> %(simplename)s) | def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages. | 018a79821ccb1056404d43dbe32e444d1a0e03c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/018a79821ccb1056404d43dbe32e444d1a0e03c1/states.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
977,
16,
7586,
16,
11063,
16,
982,
4672,
3536,
2000,
576,
6035,
30,
2199,
261,
955,
471,
6370,
2186,
3631,
471,
2619,
67,
6833,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
977,
16,
7586,
16,
11063,
16,
982,
4672,
3536,
2000,
576,
6035,
30,
2199,
261,
955,
471,
6370,
2186,
3631,
471,
2619,
67,
6833,
18,
2,
-100,
-100,
-100,
-100,
-100,... |
pfn = filename | def publish(self,attributes = {}, filelist = []): """ Adds a lfn <-> pfn mapping. After checking for existance of previous mapping, and calculating md5s and any file format specific checksums? """ # authentication stuff #blah # import use specified attributes self.attr = attributes # dumb importation at the moment # attempt to publish each specified file for filename in filelist: # see if the physical file exists? filename = os.path.abspath(filename) if not os.path.isfile(filename): # print error and _skip_ files which do not exist (or are not files) print >>sys.stderr, "Filename %s does not exist. Skipping." % filename continue lfn = os.path.basename(filename) pfn = filename # see if it already exists in database (respect --replace???) # Check also for LDR version, for the S4/S5 LDR, no metadatadeletion # will be supported. #metaexists = self.metadata.exists(lfn) ## DEBUG metaexists = 0 ## END DEBUG #if metaexists: # pass if not metaexists: # fill in appropriate fields self.attr['size']['Value'] = os.path.getsize(filename) # calc md5sum, and other checksums # switch on fileType?, perform data format specific checksums? self.attr['md5']['Value'] = self.computeMD5(filename) # perform any other consistancy checks #blah # enter metadata into database self.addmetadata(lfn) # create lfn, pfn pair in LRC.... #if self.rli_lfn_exists(lfn): # self.lrc_add(lfn,pfn) print "Will create lfn<->pfn mapping for\n%s <-> %s" % (lfn,pfn) #else: # self.lrc_create_lfn(lfn,pfn) | 08e4c95267b2490d8ad400cc6c685442327a1a9a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/08e4c95267b2490d8ad400cc6c685442327a1a9a/LSCfileAdd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3808,
12,
2890,
16,
4350,
273,
10615,
26204,
273,
5378,
4672,
3536,
15605,
279,
328,
4293,
411,
2122,
293,
4293,
2874,
18,
7360,
6728,
364,
1005,
1359,
434,
2416,
2874,
16,
471,
21046,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3808,
12,
2890,
16,
4350,
273,
10615,
26204,
273,
5378,
4672,
3536,
15605,
279,
328,
4293,
411,
2122,
293,
4293,
2874,
18,
7360,
6728,
364,
1005,
1359,
434,
2416,
2874,
16,
471,
21046,
3... | |
try: tmpsFound.extend([Page(self.site(), tmp['title'], defaultNamespace=tmp['ns']) for tmp in data['query']['pages'][pageid].values()[0] ]) except TypeError: pass | for tmp in data['query']['pages'][pageid].values()[0]: count += 1 try: tmpsFound.append(Page(self.site(), tmp['title'], defaultNamespace=tmp['ns']) ) except TypeError: pass if count >= tllimit: break | def getTemplates(self, tllimit = 5000): #action=query&prop=templates&titles=Main Page """ Returns the templates that are used in the page given by API. | 98f57c5b23ef654624e081ccb43603f207620ad2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/98f57c5b23ef654624e081ccb43603f207620ad2/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
8218,
12,
2890,
16,
268,
2906,
1038,
273,
20190,
4672,
468,
1128,
33,
2271,
10,
5986,
33,
8502,
10,
17643,
33,
6376,
3460,
3536,
2860,
326,
5539,
716,
854,
1399,
316,
326,
1363,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8218,
12,
2890,
16,
268,
2906,
1038,
273,
20190,
4672,
468,
1128,
33,
2271,
10,
5986,
33,
8502,
10,
17643,
33,
6376,
3460,
3536,
2860,
326,
5539,
716,
854,
1399,
316,
326,
1363,
8... |
def zoom(self): | def zoom(self, widget=None): | def zoom(self): """Zoom ourself to fill the window""" self.emit('zoom') | 88b25ed8b0f0557f7c8688a79ca799de2a750b99 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1032/88b25ed8b0f0557f7c8688a79ca799de2a750b99/terminal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7182,
12,
2890,
16,
3604,
33,
7036,
4672,
3536,
11497,
3134,
2890,
358,
3636,
326,
2742,
8395,
365,
18,
18356,
2668,
14932,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7182,
12,
2890,
16,
3604,
33,
7036,
4672,
3536,
11497,
3134,
2890,
358,
3636,
326,
2742,
8395,
365,
18,
18356,
2668,
14932,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
timeout += connect_timeout | timeout = connect_timeout | def clush_main(args): """Main clush script function""" # Default values nodeset_base, nodeset_exclude = NodeSet(), NodeSet() # # Argument management # usage = "%prog [options] command" parser = optparse.OptionParser(usage, version="%%prog %s" % version) parser.disable_interspersed_args() # Node selections optgrp = optparse.OptionGroup(parser, "Selecting target nodes") optgrp.add_option("-w", action="store", dest="nodes", help="nodes where to run the command") optgrp.add_option("-x", action="store", dest="exclude", help="exclude nodes from the node list") optgrp.add_option("-a", "--all", action="store_true", dest="nodes_all", help="run command on all nodes") optgrp.add_option("-g", "--group", action="store", dest="group", help="run command on a group of nodes") parser.add_option_group(optgrp) # Output behaviour optgrp = optparse.OptionGroup(parser, "Output behaviour") optgrp.add_option("-q", "--quiet", action="store_true", dest="quiet", help="be quiet, print essential output only") optgrp.add_option("-v", "--verbose", action="store_true", dest="verbose", help="be verbose, print informative messages") optgrp.add_option("-d", "--debug", action="store_true", dest="debug", help="output more messages for debugging purpose") optgrp.add_option("-N", action="store_false", dest="label", default=True, help="disable labeling of command line") optgrp.add_option("-S", action="store_true", dest="maxrc", help="return the largest of command return codes") optgrp.add_option("-b", "--dshbak", action="store_true", dest="gather", help="display results in a dshbak-like way") parser.add_option_group(optgrp) # Copy optgrp = optparse.OptionGroup(parser, "File copying") optgrp.add_option("-c", "--copy", action="store", dest="source_path", help="copy local file or directory to the nodes") optgrp.add_option("--dest", action="store", dest="dest_path", help="destination file or directory on the nodes") parser.add_option_group(optgrp) # Ssh options optgrp = optparse.OptionGroup(parser, "Ssh options") optgrp.add_option("-l", "--user", action="store", dest="user", help="execute remote command as user") optgrp.add_option("-f", "--fanout", action="store", dest="fanout", help="use a specified fanout", type="int") optgrp.add_option("-t", "--connect_timeout", action="store", dest="connect_timeout", help="limit time to connect to a node" ,type="int") optgrp.add_option("-u", "--command_timeout", action="store", dest="command_timeout", help="limit time for command to run on the node", type="int") parser.add_option_group(optgrp) (options, args) = parser.parse_args() # # Load config file # config = ClushConfig(options) # Apply command line overrides if options.quiet: config.set_main("verbosity", VERB_QUIET) if options.verbose: config.set_main("verbosity", VERB_VERB) if options.debug: config.set_main("verbosity", VERB_DEBUG) if options.fanout: config.set_main("fanout", options.fanout) if options.user: self.set_main("ssh_user", options.user) if options.connect_timeout: self.set_main("connect_timeout", options.connect_timeout) if options.command_timeout: self.set_main("command_timeout", options.command_timeout) # # Compute the nodeset # nodeset_base = NodeSet(options.nodes) nodeset_exclude = NodeSet(options.exclude) # Do we have nodes group? task = task_self() task.set_info("debug", config.get_verbosity() > 1) if options.nodes_all: command = config.get_nodes_all_command() task.shell(command, key="all") if options.group: command = config.get_nodes_group_command(options.group) task.shell(command, key="group") # Run needed external commands task.resume() for buf, keys in task.iter_buffers(): for line in buf.splitlines(): config.verbose_print(VERB_DEBUG, "Nodes from option %s: %s" % (','.join(keys), buf)) nodeset_base.add(line) # Do we have an exclude list? (-x ...) nodeset_base.difference_update(nodeset_exclude) if len(nodeset_base) < 1: parser.error('No node to run on.') config.verbose_print(VERB_DEBUG, "Final NodeSet is %s" % nodeset_base) # # Task management # stdin_isatty = sys.stdin.isatty() if stdin_isatty: # Standard input is a terminal and we want to perform some user # interactions in the main thread (using blocking calls), so # we run cluster commands in a new ClusterShell Task (a new # thread is created). task = Task() signal.signal(signal.SIGHUP, signal_handler) task.set_info("USER_handle_SIGHUP", True) else: # Perform everything in main thread. task.set_info("USER_handle_SIGHUP", False) timeout = 0 task.set_info("debug", config.get_verbosity() >= VERB_DEBUG) task.set_info("fanout", config.get_fanout() * 2) ssh_user = config.get_ssh_user() if ssh_user: task.set_info("ssh_user", ssh_user) ssh_path = config.get_ssh_path() if ssh_path: task.set_info("ssh_path", ssh_path) ssh_options = config.get_ssh_options() if ssh_options: task.set_info("ssh_options", ssh_options) connect_timeout = config.get_connect_timeout() task.set_info("connect_timeout", connect_timeout) timeout += connect_timeout command_timeout = config.get_command_timeout() task.set_info("command_timeout", command_timeout) if connect_timeout < 1e-3 or command_timeout < 1e-3: timeout = 0 else: timeout += command_timeout # Configure custom task related status task.set_info("USER_interactive", len(args) == 0 and not options.source_path) task.set_info("USER_running", False) if options.source_path and not options.dest_path: options.dest_path = options.source_path if options.source_path: if not options.dest_path: options.dest_path = options.source_path op = "copy source=%s dest=%s" % (options.source_path, options.dest_path) else: op = "command=\"%s\"" % ' '.join(args) config.verbose_print(VERB_VERB, "clush: nodeset=%s fanout=%d [timeout conn=%d " \ "cmd=%d] %s" % (nodeset_base, task.info("fanout")/2, task.info("connect_timeout"), task.info("command_timeout"), op)) if not task.info("USER_interactive"): if options.source_path: if not options.dest_path: options.dest_path = options.source_path run_copy(task, options.source_path, options.dest_path, nodeset_base, 0) else: run_command(task, ' '.join(args), nodeset_base, options.gather, timeout, options.label, config.get_verbosity()) if stdin_isatty: ttyloop(task, nodeset_base, options.gather, timeout, options.label, config.get_verbosity()) elif task.info("USER_interactive"): print >>sys.stderr, "ERROR: interactive mode requires a tty" os._exit(1) # return the command retcode if options.maxrc: os._exit(task.max_retcode()) # return clush retcode else: os._exit(0) | 9ef4e2bbb97afd906e67808e3f42d84669e30a93 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11479/9ef4e2bbb97afd906e67808e3f42d84669e30a93/clush.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
927,
1218,
67,
5254,
12,
1968,
4672,
3536,
6376,
927,
1218,
2728,
445,
8395,
225,
468,
2989,
924,
2199,
278,
67,
1969,
16,
2199,
278,
67,
10157,
273,
2029,
694,
9334,
2029,
694,
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,
927,
1218,
67,
5254,
12,
1968,
4672,
3536,
6376,
927,
1218,
2728,
445,
8395,
225,
468,
2989,
924,
2199,
278,
67,
1969,
16,
2199,
278,
67,
10157,
273,
2029,
694,
9334,
2029,
694,
1435,
... |
detail_html = '' msg = detail.get('message','') | detail_html = '' | def check_quality(uri, user, pwd, dbname, modules): uid = login(uri, dbname, user, pwd) if uid: conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object') qualityresult = {} final = {} test_detail = {} for module in modules: quality_result = execute(conn,'execute', dbname, uid, pwd,'module.quality.check','check_quality',module) detail_html = '' msg = detail.get('message','') html = '''<html><html><html><html><body><a name="TOP"></a>''' html +="<h1> Module : %s </h1>"%(quality_result['name']) html += "<h2> Final score : %s</h2>"%(quality_result['final_score']) html += "<div id='tabs'>" html += "<ul>" for x,y,detail in quality_result['check_detail_ids']: test = detail.get('name') score = round(float(detail.get('score',0)),2) html += "<li><a href=\"#%s\">%s</a></li>"%(test.replace(' ','-'),test) detail_html +="<div id=\"%s\"><h3>%s (Score : %s)</h3>%s</div>"%(test.replace(' ','-'),test,score,detail.get('detail')) test_detail[test] = (score,msg,detail.get('detail','')) html += "</ul>%s</body></html></html></html></html></html>"%(detail_html) html += "</div>" final[quality_result['name']] = (quality_result['final_score'],html,test_detail) fp = open('quality_log.pck','wb') pck_obj = pickle.dump(final,fp) fp.close() print "LOG PATH%s"%(os.path.realpath('quality_log.pck')) return final else: print 'Login Failed...' clean() sys.exit(1) | 66cf96bfdd3b1f7de225a57da23add858c4257af /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/66cf96bfdd3b1f7de225a57da23add858c4257af/base_quality_interrogation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
16495,
12,
1650,
16,
729,
16,
14720,
16,
18448,
16,
4381,
4672,
4555,
273,
3925,
12,
1650,
16,
18448,
16,
729,
16,
14720,
13,
309,
4555,
30,
1487,
273,
2025,
13832,
830,
495,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16495,
12,
1650,
16,
729,
16,
14720,
16,
18448,
16,
4381,
4672,
4555,
273,
3925,
12,
1650,
16,
18448,
16,
729,
16,
14720,
13,
309,
4555,
30,
1487,
273,
2025,
13832,
830,
495,
... |
@handler def handler(self, event): event.input = event.message event.oldinput = event.message_raw event.withpunc = event.message_raw self.processor.Process(event) | @handler def handler(self, event): event.input = event.message event.oldinput = event.message_raw event.withpunc = event.message_raw self.processor.Process(event) | def __init__(self, name): Processor.__init__(self, name) | c10e547dc2ed6388cfbf4a1c18f9bf87cc98de7c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12048/c10e547dc2ed6388cfbf4a1c18f9bf87cc98de7c/knab.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
4672,
15476,
16186,
2738,
972,
12,
2890,
16,
508,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
508,
4672,
15476,
16186,
2738,
972,
12,
2890,
16,
508,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.verbose_logger.log(logginglevels.DEBUG_4, "unable to find newer package for %s" %(confpkg.name,)) | self.verbose_logger.log(logginglevels.DEBUG_4, "unable to find newer package for %s" %(confpkg,)) | def _processConflict(self, po, conflict): """processes a Conflict dep from the resolveDeps() method""" CheckDeps = 0 conflicts = 0 errormsgs = [] | 96c4e680bb57aed9d76204d59ba85b7eca6dcde8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/96c4e680bb57aed9d76204d59ba85b7eca6dcde8/depsolve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2567,
10732,
12,
2890,
16,
8275,
16,
7546,
4672,
3536,
18675,
279,
23460,
5993,
628,
326,
2245,
14430,
1435,
707,
8395,
225,
2073,
14430,
273,
374,
14450,
273,
374,
393,
535,
87,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2567,
10732,
12,
2890,
16,
8275,
16,
7546,
4672,
3536,
18675,
279,
23460,
5993,
628,
326,
2245,
14430,
1435,
707,
8395,
225,
2073,
14430,
273,
374,
14450,
273,
374,
393,
535,
87,
56... |
if (src_rorp and dest_rorp and src_rorp == dest_rorp and | if (Globals.backup_reader is not Globals.backup_writer): num_rorps_seen += 1 if (num_rorps_seen > flush_threshold): num_rorps_seen = 0 yield iterfile.MiscIterFlushRepeat if not (src_rorp and dest_rorp and src_rorp == dest_rorp and | def get_sigs(cls, dest_base_rpath): """Yield signatures of any changed destination files | a520333141a2d93e1a0bb28f9193bbfc992a6c65 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6202/a520333141a2d93e1a0bb28f9193bbfc992a6c65/backup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
7340,
87,
12,
6429,
16,
1570,
67,
1969,
67,
86,
803,
4672,
3536,
16348,
14862,
434,
1281,
3550,
2929,
1390,
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,
336,
67,
7340,
87,
12,
6429,
16,
1570,
67,
1969,
67,
86,
803,
4672,
3536,
16348,
14862,
434,
1281,
3550,
2929,
1390,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
val = [] | val = [0] * len(lables) | def radar(self, **kw): item_ids = kw.get('ids') item_ids = item_ids and eval(str(item_ids)) parent_name = kw.get('factor_name') parent_name = parent_name.replace('@', '&') proxy_factor = rpc.RPCProxy('comparison.factor') child_name = [] child_ids = [] if parent_name == 'Summary': list = proxy_factor.search([('parent_id', '=', False)]) ch_ids = proxy_factor.read(list, ['name']) for ch in ch_ids: cname = {} cname['name'] = ch['name'][:18] child_ids += [ch['id']] child_name += [cname] else : if '/' in parent_name: parent_name = parent_name.rsplit('/')[1] parent_list = proxy_factor.search([('name', '=', parent_name)]) child_ids = proxy_factor.read(parent_list, ['child_ids']) child_ids = child_ids[0].get('child_ids') child_list = proxy_factor.read(child_ids, ['name']) for ch in child_list: cname = {} cname['name'] = ch['name'][:18] child_name += [cname] elem = [] elements = {} elements["elements"] = [] #Required elements["title"] = {} #Optional elements["radar_axis"] = {} #Required elements["tooltip"] = {"mouse": 2, "stroke": 1, "colour": "#000000", "background": "#ffffff"} #Depend On Choice elements["bg_colour"] = "#ffffff" #Optional ChartColors = ['#c4a000', '#ce5c00', '#8f5902', '#4e9a06', '#204a87', '#5c3566', '#a40000', '#babdb6', '#2e3436']; proxy_item = rpc.RPCProxy('comparison.item') item_name = proxy_item.read(item_ids, ['name']) proxy_res = rpc.RPCProxy('comparison.factor.result') rids = proxy_res.search([('factor_id', 'in', child_ids)]) factor_res = proxy_res.read(rids) value = [] for item in item_name: val = [] for factor in factor_res: if factor.get('item_id')[1] == item['name']: val += [factor.get('result')/10.0] value += [val] for n, j in enumerate(item_name): if n%2==0: elem.append({'type': 'line_hollow', "values": value[n], "halo_size": 2, "width": 1, "dot-size": 2, "colour": ChartColors[n], "text": str(j['name']), "font-size": 12, "loop": True}) else: elem.append({"type": "line_dot", "values": value[n], "halo_size": 2, "width": 1, "dot-size": 2, "colour": ChartColors[n], "text": str(j['name']), "font-size": 12, "loop": True}) elements["elements"] = elem elements["title"] = {"text": parent_name, "style": "{font-size: 15px; color: #50284A; text-align: left; font-weight: bold;}"} elements["radar_axis"] = { "max":10, "colour": "#DAD5E0", "grid-colour":"#DAD5E0", "labels": { "labels": [], "colour": "#9F819F" }, "spoke-labels": { "labels": [ch['name'] for ch in child_name], "colour": "#5c3566" } } | 868aae40e45a82ef8abdb9c67b4ef2e4169eebb5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/868aae40e45a82ef8abdb9c67b4ef2e4169eebb5/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6719,
297,
12,
2890,
16,
2826,
9987,
4672,
225,
761,
67,
2232,
273,
5323,
18,
588,
2668,
2232,
6134,
761,
67,
2232,
273,
761,
67,
2232,
471,
5302,
12,
701,
12,
1726,
67,
2232,
3719,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6719,
297,
12,
2890,
16,
2826,
9987,
4672,
225,
761,
67,
2232,
273,
5323,
18,
588,
2668,
2232,
6134,
761,
67,
2232,
273,
761,
67,
2232,
471,
5302,
12,
701,
12,
1726,
67,
2232,
3719,
... |
for selectionStart,selectionEnd in contents.getSelectionRanges(): | for rowStart,rowEnd in self.SelectedRowRanges(): | def UpdateSelection(self, columns): """ Update the grid's selection based on the collection's selection. | 1331e5142b681fe4c817533479865e8bae695c30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/1331e5142b681fe4c817533479865e8bae695c30/Table.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2315,
6233,
12,
2890,
16,
2168,
4672,
3536,
2315,
326,
3068,
1807,
4421,
2511,
603,
326,
1849,
1807,
4421,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2315,
6233,
12,
2890,
16,
2168,
4672,
3536,
2315,
326,
3068,
1807,
4421,
2511,
603,
326,
1849,
1807,
4421,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def serverParamsTest (certfile, protocol, certreqs, cacertsfile, client_certfile, client_protocol=None, indata="FOO\n", ciphers=None, chatty=True, connectionchatty=False, wrap_accepting_socket=False): | def server_params_test(certfile, protocol, certreqs, cacertsfile, client_certfile, client_protocol=None, indata="FOO\n", ciphers=None, chatty=True, connectionchatty=False, wrap_accepting_socket=False): """ Launch a server, connect a client to it and try various reads and writes. """ | def serverParamsTest (certfile, protocol, certreqs, cacertsfile, client_certfile, client_protocol=None, indata="FOO\n", ciphers=None, chatty=True, connectionchatty=False, wrap_accepting_socket=False): | f08683542eada763321715f558eac5b2baec28e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/f08683542eada763321715f558eac5b2baec28e9/test_ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1438,
1370,
4709,
261,
7593,
768,
16,
1771,
16,
3320,
25782,
16,
276,
1077,
1051,
87,
768,
16,
1004,
67,
7593,
768,
16,
1004,
67,
8373,
33,
7036,
16,
316,
892,
1546,
3313,
51,
64,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1438,
1370,
4709,
261,
7593,
768,
16,
1771,
16,
3320,
25782,
16,
276,
1077,
1051,
87,
768,
16,
1004,
67,
7593,
768,
16,
1004,
67,
8373,
33,
7036,
16,
316,
892,
1546,
3313,
51,
64,
82... |
os.write(f, "exec %s -c 'import sys; sys.exit(47)'\n" % | os.write(f, "exec '%s' -c 'import sys; sys.exit(47)'\n" % | def test_args_string(self): # args is a string f, fname = self.mkstemp() os.write(f, "#!/bin/sh\n") os.write(f, "exec %s -c 'import sys; sys.exit(47)'\n" % sys.executable) os.close(f) os.chmod(fname, 0700) p = subprocess.Popen(fname) p.wait() os.remove(fname) self.assertEqual(p.returncode, 47) | af8a68733fe2e24384e7105745c504243ab8db29 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/af8a68733fe2e24384e7105745c504243ab8db29/test_subprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1968,
67,
1080,
12,
2890,
4672,
468,
833,
353,
279,
533,
284,
16,
5299,
273,
365,
18,
24816,
19781,
84,
1435,
1140,
18,
2626,
12,
74,
16,
6619,
5,
19,
4757,
19,
674,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1968,
67,
1080,
12,
2890,
4672,
468,
833,
353,
279,
533,
284,
16,
5299,
273,
365,
18,
24816,
19781,
84,
1435,
1140,
18,
2626,
12,
74,
16,
6619,
5,
19,
4757,
19,
674,
64,
... |
print("[" + vessel['location'] + "] Setting user keys.") | print("[" + vessel['nodelocation'] + "] Setting user keys.") | def set_keys(vessel, identity): """ The first argument will be a vesseldict rather than a vesselhandle because we passed the result of get_vessels_on_nodes to run_parallelized. """ if vessel['vesselname'] != VESSELNAME_TO_SET_USER_KEYS_ON: msg = "[" + vessel['location'] + "] Skipping: vesselname is not: " + VESSELNAME_TO_SET_USER_KEYS_ON print(msg) raise Exception(msg) if vessel['userkeys'] != USERKEY_LIST: print("[" + vessel['location'] + "] Setting user keys.") try: experimentlib.set_vessel_users(vessel['handle'], identity, USERKEY_LIST) except Exception, e: msg = "[" + vessel['location'] + "] Failure: " + str(e) print(msg) import traceback traceback.print_exc() raise Exception(msg) else: print("[" + vessel['location'] + "] Success.") else: print("[" + vessel['location'] + "] Already had correct user keys.") | 909ceb23072292a38c4a8b135d95be2331a3d09a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7276/909ceb23072292a38c4a8b135d95be2331a3d09a/set_user_keys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
2452,
12,
90,
403,
292,
16,
4215,
4672,
3536,
1021,
1122,
1237,
903,
506,
279,
331,
403,
488,
933,
9178,
2353,
279,
331,
403,
292,
4110,
2724,
732,
2275,
326,
563,
434,
336,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2452,
12,
90,
403,
292,
16,
4215,
4672,
3536,
1021,
1122,
1237,
903,
506,
279,
331,
403,
488,
933,
9178,
2353,
279,
331,
403,
292,
4110,
2724,
732,
2275,
326,
563,
434,
336,
... |
tmp = value.translate(_knLocalToDigits) | tmp = value.translate(localToDigits) | def dh_knYearConverter( value ): if type(value) is int: # Encode an integer value into a textual form. return unicode(value).translate(_knDigitsToLocal) else: # First make sure there are no real digits in the string tmp = value.translate(_knDigitsToLocal) # Test if tmp == value: tmp = value.translate(_knLocalToDigits) # Convert return dh_noConv( tmp, u'%d' ) else: raise ValueError("string contains regular digits") | 32e5f5c1a30bc02fc3075b9c456f10fafab05a66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/32e5f5c1a30bc02fc3075b9c456f10fafab05a66/date.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11007,
67,
21112,
5593,
5072,
12,
460,
262,
30,
309,
618,
12,
1132,
13,
353,
509,
30,
468,
6240,
392,
3571,
460,
1368,
279,
25774,
646,
18,
327,
5252,
12,
1132,
2934,
13929,
24899,
211... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11007,
67,
21112,
5593,
5072,
12,
460,
262,
30,
309,
618,
12,
1132,
13,
353,
509,
30,
468,
6240,
392,
3571,
460,
1368,
279,
25774,
646,
18,
327,
5252,
12,
1132,
2934,
13929,
24899,
211... |
wx.CallAfter(self.detailsFrame.Refresh) | def OnDoubleClick(evt): if evt.ControlDown(): #with CTRL RunEmailClient() else: #without CTRL if self.detailsFrame: wx.CallAfter(self.detailsFrame.Refresh) BringWindowToTop(self.detailsFrame.GetHandle()) else: self.detailsFrame = DetailsFrame(parent = self) wx.CallAfter( self.detailsFrame.ShowDetailsFrame, position = self.detFramePosition, size = self.detFrameSize ) | 12fb689db69b2ce866902fbcc1bb19e0622932ba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8076/12fb689db69b2ce866902fbcc1bb19e0622932ba/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
5265,
6563,
12,
73,
11734,
4672,
309,
6324,
18,
3367,
4164,
13332,
468,
1918,
31568,
48,
1939,
4134,
1227,
1435,
469,
30,
1171,
468,
13299,
31568,
48,
309,
365,
18,
6395,
3219,
30,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
5265,
6563,
12,
73,
11734,
4672,
309,
6324,
18,
3367,
4164,
13332,
468,
1918,
31568,
48,
1939,
4134,
1227,
1435,
469,
30,
1171,
468,
13299,
31568,
48,
309,
365,
18,
6395,
3219,
30,... | |
def test_uint32(self): class X(Structure): _fields_ = [("a", c_uint32, 32)] x = X() x.a = 10 self.failUnlessEqual(x.a, 10) def test_uint64(self): class X(Structure): _fields_ = [("a", c_uint64, 64)] x = X() x.a = 10 self.failUnlessEqual(x.a, 10) | def test_uint32(self): class X(Structure): _fields_ = [("a", c_uint32, 32)] x = X() x.a = 10 self.failUnlessEqual(x.a, 10) | 22ecb32fb1cab85c921d0f2bc70300dc0eaf3a94 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/22ecb32fb1cab85c921d0f2bc70300dc0eaf3a94/test_bitfields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11890,
1578,
12,
2890,
4672,
667,
1139,
12,
6999,
4672,
389,
2821,
67,
273,
306,
2932,
69,
3113,
276,
67,
11890,
1578,
16,
3847,
25887,
619,
273,
1139,
1435,
619,
18,
69,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11890,
1578,
12,
2890,
4672,
667,
1139,
12,
6999,
4672,
389,
2821,
67,
273,
306,
2932,
69,
3113,
276,
67,
11890,
1578,
16,
3847,
25887,
619,
273,
1139,
1435,
619,
18,
69,
273... | |
this = apply(_quickfix.new_PegDifference, args) | this = _quickfix.new_PegDifference(*args) | def __init__(self, *args): this = apply(_quickfix.new_PegDifference, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
52,
1332,
16220,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
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,
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,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
52,
1332,
16220,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
3... |
''' | """ | def setViewProjection(self, projection): # Added by Mark 050918. '''Set projection, where 0 = Perspective and 1 = Orthographic. It does not set the prefs db value itself, since we don\'t want all user changes to projection to be stored in the prefs db, only the ones done from the Preferences dialog. ''' | 9dc95351096c9deab5f64e3e704bde7a93f95b49 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/9dc95351096c9deab5f64e3e704bde7a93f95b49/GLPane.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19923,
14789,
12,
2890,
16,
8106,
4672,
468,
25808,
635,
6622,
374,
5995,
2643,
18,
9163,
694,
8106,
16,
1625,
374,
273,
453,
414,
16772,
471,
404,
273,
2965,
451,
16983,
18,
225,
2597,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19923,
14789,
12,
2890,
16,
8106,
4672,
468,
25808,
635,
6622,
374,
5995,
2643,
18,
9163,
694,
8106,
16,
1625,
374,
273,
453,
414,
16772,
471,
404,
273,
2965,
451,
16983,
18,
225,
2597,
... |
if (self.path.find("/cache/must-revalidate") != 0): | if not self._ShouldHandleRequest("/cache/must-revalidate"): | def CacheMustRevalidateHandler(self): """This request handler yields a page with the title set to the current system time, and does not allow caching.""" | fd57e3fda1b173b113442291fc77ddf1659615e2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5060/fd57e3fda1b173b113442291fc77ddf1659615e2/testserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4379,
10136,
426,
5662,
1503,
12,
2890,
4672,
3536,
2503,
590,
1838,
16932,
279,
1363,
598,
326,
2077,
444,
358,
326,
783,
2619,
813,
16,
471,
1552,
486,
1699,
11393,
12123,
2,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4379,
10136,
426,
5662,
1503,
12,
2890,
4672,
3536,
2503,
590,
1838,
16932,
279,
1363,
598,
326,
2077,
444,
358,
326,
783,
2619,
813,
16,
471,
1552,
486,
1699,
11393,
12123,
2,
-100,
-10... |
self.filter = self.data.filter_new() types = (filter_types and filter_types or coltypes) self.filter.set_modify_func( types, filter_router, filters) | def __init__(self, treeview, coltypes, colnames, values=[], filters=None, filter_types=None, callbacks={}, sortable=False, sort_on=-1): """ @type treeview: gtk.Treeview @param treeview: The treeview widget to use @type coltypes: list @param coltypes: Contains the "type" of each column (i.e. str or int) @type colnames: list @param colnames: Contains the name string for each column @type sortable: boolean @param sortable: whether the columns can be sorted @type sort_on: int @param sort_on: the column number to initially sort by @type values: list @param values: Contains the data to be inserted into the table @type filters: list @param filters: A list of dicts used to define how a column should be filtered Note for filters: Each dict consists of a callback function and user data like so: { "callback": self.file_filter, "user_data": { "column": 0, //tells the callback what column to filter "base_dir": "/home/workingcopy" } } @type filter_types: list @param filter_types: Contains the filtered "type" of each column. @type callbacks: dict @param callbacks: A dict of callbacks to be used. Some are for signal handling while others are useful for other things. """ self.treeview = treeview self.selected_rows = [] | b739251f097bafc215e75946259a33a01b833335 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/b739251f097bafc215e75946259a33a01b833335/widget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2151,
1945,
16,
645,
2352,
16,
645,
1973,
16,
924,
22850,
6487,
3415,
33,
7036,
16,
1034,
67,
2352,
33,
7036,
16,
6689,
28793,
18092,
33,
8381,
16,
1524,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2151,
1945,
16,
645,
2352,
16,
645,
1973,
16,
924,
22850,
6487,
3415,
33,
7036,
16,
1034,
67,
2352,
33,
7036,
16,
6689,
28793,
18092,
33,
8381,
16,
1524,... | |
gl_func_name = func.GetGLFunctionName() if gl_func_name.startswith("gl"): gl_func_name = gl_func_name[2:] else: gl_func_name = func.name | gl_func_name = func.GetGLTestFunctionName() | def WriteInvalidUnitTest(self, func, file, test, extra = {}): """Writes a invalid unit test.""" arg_index = 0 for arg in func.GetOriginalArgs(): num_invalid_values = arg.GetNumInvalidValues() for value_index in range(0, num_invalid_values): arg_strings = [] parse_result = "kNoError" count = 0 for arg in func.GetOriginalArgs(): if count == arg_index: (arg_string, parse_result) = arg.GetInvalidArg(count, value_index) else: arg_string = arg.GetValidArg(count, 0) arg_strings.append(arg_string) count += 1 gl_arg_strings = [] count = 0 for arg in func.GetOriginalArgs(): gl_arg_strings.append("_") count += 1 gl_func_name = func.GetGLFunctionName() if gl_func_name.startswith("gl"): gl_func_name = gl_func_name[2:] else: gl_func_name = func.name | a93bb846c70d2491171bd7211d24f6f0fa56e853 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/a93bb846c70d2491171bd7211d24f6f0fa56e853/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
1941,
2802,
4709,
12,
2890,
16,
1326,
16,
585,
16,
1842,
16,
2870,
273,
2618,
4672,
3536,
8368,
279,
2057,
2836,
1842,
12123,
1501,
67,
1615,
273,
374,
364,
1501,
316,
1326,
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,
2598,
1941,
2802,
4709,
12,
2890,
16,
1326,
16,
585,
16,
1842,
16,
2870,
273,
2618,
4672,
3536,
8368,
279,
2057,
2836,
1842,
12123,
1501,
67,
1615,
273,
374,
364,
1501,
316,
1326,
18,
... |
'unsigned': set(('char', 'int', 'long')), 'signed': set(('char', 'int', 'long')), 'short': set(('int', 'short')), | 'unsigned': set(('char', 'short', 'int', 'long')), 'signed': set(('char', 'short', 'int', 'long')), 'short': set(('int',)), | def __unicode__(self): buf = self.get_modifiers() buf.append(unicode(self.name)) return u' '.join(buf) | 13ebda2b76ba37e7684445bb23a00d233a33d6a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/13ebda2b76ba37e7684445bb23a00d233a33d6a0/cpp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9124,
972,
12,
2890,
4672,
1681,
273,
365,
18,
588,
67,
15432,
1435,
1681,
18,
6923,
12,
9124,
12,
2890,
18,
529,
3719,
327,
582,
11,
2418,
5701,
12,
4385,
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,
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,
1001,
9124,
972,
12,
2890,
4672,
1681,
273,
365,
18,
588,
67,
15432,
1435,
1681,
18,
6923,
12,
9124,
12,
2890,
18,
529,
3719,
327,
582,
11,
2418,
5701,
12,
4385,
13,
2,
-100,
-100,
-... |
def requestPage(url, site=None): """Simulate an HTTP request given a Site object and the URL to request. Returns a string with the response, via a Deferred. """ if site is None: site = getSingleton("Site") io = StringIOWithoutClosing() wrapper = protocol.FileWrapper(io) result = defer.Deferred() def storeResult(): result.callback(io.getvalue()) wrapper.getHost = lambda: address.IPv4Address('TCP', 'localhost', 1234) wrapper.loseConnection = storeResult channel = site.buildProtocol(None) channel.makeConnection(wrapper) channel.dataReceived("GET %s HTTP/1.0\r\n\r\n" % url) return result def touchProjectPages(): """Request all project web pages. This is here for debugging a memory leak related to message filtering or formatting. """ from LibCIA.Stats.Target import StatsTarget result = defer.Deferred() StatsTarget("project").catalog().addCallback(_touchProjectPages, result) def _touchProjectPages(catalog, result): projects = [target.path.split("/")[-1] for target in catalog] result.callback([requestPage("/stats/project/%s" % project) for project in projects]) | def requestPage(url, site=None): """Simulate an HTTP request given a Site object and the URL to request. Returns a string with the response, via a Deferred. """ if site is None: site = getSingleton("Site") io = StringIOWithoutClosing() wrapper = protocol.FileWrapper(io) result = defer.Deferred() def storeResult(): result.callback(io.getvalue()) wrapper.getHost = lambda: address.IPv4Address('TCP', 'localhost', 1234) wrapper.loseConnection = storeResult # Use HTTP 1.0 currently since persistence is disabled channel = site.buildProtocol(None) channel.makeConnection(wrapper) channel.dataReceived("GET %s HTTP/1.0\r\n\r\n" % url) return result | aab80f71a23f68dfefae3c59a64af536f33c6cef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/aab80f71a23f68dfefae3c59a64af536f33c6cef/Debug.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
1964,
12,
718,
16,
2834,
33,
7036,
4672,
3536,
7993,
6243,
392,
2239,
590,
864,
279,
9063,
733,
471,
326,
1976,
358,
590,
18,
2860,
279,
533,
598,
326,
766,
16,
3970,
279,
12816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
1964,
12,
718,
16,
2834,
33,
7036,
4672,
3536,
7993,
6243,
392,
2239,
590,
864,
279,
9063,
733,
471,
326,
1976,
358,
590,
18,
2860,
279,
533,
598,
326,
766,
16,
3970,
279,
12816,
... | |
cmp_run_conv_nnet2_classif(23485, 108, 7, 5, n_iter=4, | cmp_run_conv_nnet2_classif(23485, 108, 7, 5, n_train=4, | def test_lenet_108(): # NORB cmp_run_conv_nnet2_classif(23485, 108, 7, 5, n_iter=4, ignore_error=ignore_error, gpu_only=gpu_only, cpu_only=cpu_only, verbose=verbose, check_isfinite=True, version=version, float_atol=7e-2) | 096c375fd2a3d51b589713ec856194dfefacf58c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/096c375fd2a3d51b589713ec856194dfefacf58c/test_nnet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1897,
278,
67,
21770,
13332,
468,
423,
916,
38,
9411,
67,
2681,
67,
4896,
67,
82,
2758,
22,
67,
1106,
430,
12,
17959,
7140,
16,
23515,
16,
2371,
16,
1381,
16,
290,
67,
9754... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1897,
278,
67,
21770,
13332,
468,
423,
916,
38,
9411,
67,
2681,
67,
4896,
67,
82,
2758,
22,
67,
1106,
430,
12,
17959,
7140,
16,
23515,
16,
2371,
16,
1381,
16,
290,
67,
9754... |
For infinite periodic words (resp. for finite words of type `u^i u[0:j]`), the reduced Rauzy graph of order `n` (resp. for `n` smaller or equal to `(i-1)|u|+j`) is the directed graph whose unique vertex is the prefix `p` of length `n` of self and which has an only edge which is a loop on `p` labelled by `w[n+1:|w|] p` where `w` is the unique return word to `p`. In other cases, it is the directed graph defined as followed. Let `G_n` be the Rauzy graph of order `n` of self. The vertices are the vertices of `G_n` that are either special or not prolongable to the right of to the left. For each couple (`u`, `v`) of such vertices and each directed path in `G_n` from `u` to `v` that contains no other vertices that are special, there is an edge from `u` to `v` in the reduced Rauzy graph of order `n` whose label is the label of the path in `G_n`. NOTE: In the case of infinite recurrent non periodic words, this definition correspond to the following one that can be found in [1] and [2] where a simple path is a path that begins with a special factor, ends with a special factor and contains no other vertices that are special: The reduced Rauzy graph of factors of length `n` is obtained from `G_n` by replacing each simple path `P=v_1 v_2 ... v_{\ell}` with an edge `v_1 v_{\ell}` whose label is the concatenation of the labels of the edges of `P`. INPUT: - ``n`` - integer OUTPUT: Digraph | For infinite periodic words (resp. for finite words of type `u^i u[0:j]`), the reduced Rauzy graph of order `n` (resp. for `n` smaller or equal to `(i-1)|u|+j`) is the directed graph whose unique vertex is the prefix `p` of length `n` of self and which has an only edge which is a loop on `p` labelled by `w[n+1:|w|] p` where `w` is the unique return word to `p`. In other cases, it is the directed graph defined as followed. Let `G_n` be the Rauzy graph of order `n` of self. The vertices are the vertices of `G_n` that are either special or not prolongable to the right or to the left. For each couple (`u`, `v`) of such vertices and each directed path in `G_n` from `u` to `v` that contains no other vertices that are special, there is an edge from `u` to `v` in the reduced Rauzy graph of order `n` whose label is the label of the path in `G_n`. .. NOTE:: In the case of infinite recurrent non periodic words, this definition correspond to the following one that can be found in [1] and [2] where a simple path is a path that begins with a special factor, ends with a special factor and contains no other vertices that are special: The reduced Rauzy graph of factors of length `n` is obtained from `G_n` by replacing each simple path `P=v_1 v_2 ... v_{\ell}` with an edge `v_1 v_{\ell}` whose label is the concatenation of the labels of the edges of `P`. | def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | 1e309a0b696b2b5ea5293939102925384078f62f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1e309a0b696b2b5ea5293939102925384078f62f/word.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13162,
67,
354,
89,
21832,
67,
4660,
12,
2890,
16,
290,
4672,
436,
8395,
2860,
326,
13162,
534,
8377,
21832,
2667,
434,
1353,
1375,
82,
68,
434,
365,
18,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
13162,
67,
354,
89,
21832,
67,
4660,
12,
2890,
16,
290,
4672,
436,
8395,
2860,
326,
13162,
534,
8377,
21832,
2667,
434,
1353,
1375,
82,
68,
434,
365,
18,
2,
-100,
-100,
-100,
-100,
-10... |
def __read_timeseries(self): | print "Done." def __read_timeseries(self,override): | def __read_timeseries(self): ''' Read time_series.dat file and write corresponding data Should only be called by __init__''' if self.__creating: fdat=file(self.datadir+'time_series.dat','r') columns=fdat.readline().replace("-"," ").strip("#\n").split() nbcol=len(columns) self.data.create_dataset('time_series_names',data=columns) self.data.create_dataset('time_series',(1,nbcol),dtype=self.precision,maxshape=(None,nbcol)) line=map(float,fdat.readline().strip().split()) while len(line)==nbcol: append(self.data['time_series'],line) line=fdat.readline() if line.startswith('#'): line=fdat.readline() # would be cleaner with a while loop, but I assumed that you never have two successive comment lines if self.precision=='d': line=map(N.float64,line.strip().split()) else: line=map(N.float32,line.strip().split()) fdat.close() | bf1a599ad9cde581f4679533ab3c54c55f5e9732 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1377/bf1a599ad9cde581f4679533ab3c54c55f5e9732/hdf5.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1172,
315,
7387,
1199,
1652,
1001,
896,
67,
28494,
12,
2890,
16,
10601,
4672,
9163,
2720,
813,
67,
10222,
18,
3404,
585,
471,
1045,
4656,
501,
9363,
1338,
506,
2566,
635,
1001,
2738,
972,
2641... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1172,
315,
7387,
1199,
1652,
1001,
896,
67,
28494,
12,
2890,
16,
10601,
4672,
9163,
2720,
813,
67,
10222,
18,
3404,
585,
471,
1045,
4656,
501,
9363,
1338,
506,
2566,
635,
1001,
2738,
972,
2641... |
LOG.warn('Duplicate Product name', 'After loading Product %s from %s,\n' 'I skipped the one in %s.\n' % ( | LOG.warn('Duplicate Product name: ' 'After loading Product %s from %s, ' 'I skipped the one in %s.' % ( | def import_products(): # Try to import each product, checking for and catching errors. done={} products = get_products() debug_mode = App.config.getConfiguration().debug_mode for priority, product_name, index, product_dir in products: if done.has_key(product_name): LOG.warn('Duplicate Product name', 'After loading Product %s from %s,\n' 'I skipped the one in %s.\n' % ( `product_name`, `done[product_name]`, `product_dir`) ) continue done[product_name]=product_dir import_product(product_dir, product_name, raise_exc=debug_mode) return done.keys() | a8f61347f0979dfa0e61440947f76538c538fbda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a8f61347f0979dfa0e61440947f76538c538fbda/Application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
18736,
13332,
468,
6161,
358,
1930,
1517,
3017,
16,
6728,
364,
471,
1044,
310,
1334,
18,
2731,
12938,
225,
10406,
273,
336,
67,
18736,
1435,
1198,
67,
3188,
273,
4677,
18,
1425... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
18736,
13332,
468,
6161,
358,
1930,
1517,
3017,
16,
6728,
364,
471,
1044,
310,
1334,
18,
2731,
12938,
225,
10406,
273,
336,
67,
18736,
1435,
1198,
67,
3188,
273,
4677,
18,
1425... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.