rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
"--midi", "--rs232", | "--midi-in", "--midi-out", "--rs232-in", "--rs232-out", | def loop(self): try: rawline = raw_input(self.prompt) return rawline except EOFError: return "" | b57edc74c494d59f645ae7a3c88c107e1b456736 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8501/b57edc74c494d59f645ae7a3c88c107e1b456736/hatari-console.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2798,
12,
2890,
4672,
775,
30,
1831,
1369,
273,
1831,
67,
2630,
12,
2890,
18,
13325,
13,
327,
1831,
1369,
1335,
6431,
668,
30,
327,
1408,
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,
2798,
12,
2890,
4672,
775,
30,
1831,
1369,
273,
1831,
67,
2630,
12,
2890,
18,
13325,
13,
327,
1831,
1369,
1335,
6431,
668,
30,
327,
1408,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
result = cmp_segs((a.get_start() + a_offset, a.get_end() + a_offset), (b.get_start() + b_offset, b.get_end() + b_offset)) | a_period = a.get_period() a_period = (a_period[0] + a_offset, a_period[1] + a_offset) b_period = b.get_period() b_period = (b_period[0] + b_offset, b_period[1] + b_offset) result = cmp_segs(a_period, b_period) | def CompareSnglBurst(a, b, a_offset = 0.0, b_offset = 0.0): """ Orders a and b by time interval, then by frequency band. Returns 0 if a and b's time-frequency tiles intersect. Offsets can be optionally applied to the times of triggers a and b. """ result = cmp_segs((a.get_start() + a_offset, a.get_end() + a_offset), (b.get_start() + b_offset, b.get_end() + b_offset)) if not result: result = cmp_segs(a.get_band(), b.get_band()) return result | 71febde65116fd8cbfba91eaeb69326fd1dabce4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/71febde65116fd8cbfba91eaeb69326fd1dabce4/SnglBurstUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11051,
55,
3368,
80,
38,
18593,
12,
69,
16,
324,
16,
279,
67,
3348,
273,
374,
18,
20,
16,
324,
67,
3348,
273,
374,
18,
20,
4672,
3536,
2965,
6794,
279,
471,
324,
635,
813,
3673,
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,
11051,
55,
3368,
80,
38,
18593,
12,
69,
16,
324,
16,
279,
67,
3348,
273,
374,
18,
20,
16,
324,
67,
3348,
273,
374,
18,
20,
4672,
3536,
2965,
6794,
279,
471,
324,
635,
813,
3673,
16... |
2 3 4 5 [0,x,2x ,3x ,4x ,5x ] | [0,x,2*x*x,3*x**3,4*x**4,5*x**5] | def __getitem__(self, n): r""" Return the n-th element of this list. | 7b566e19d7cedd37ccc13af681b0189e7c1970ef /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/7b566e19d7cedd37ccc13af681b0189e7c1970ef/axiom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
290,
4672,
436,
8395,
2000,
326,
290,
17,
451,
930,
434,
333,
666,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
290,
4672,
436,
8395,
2000,
326,
290,
17,
451,
930,
434,
333,
666,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
ok = False | if f==order: ok = False | def __init__(self, cr): super(orm, self).__init__(cr) | b9585a34d7a07d60008d6ff7ee0ca4835618cbef /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/b9585a34d7a07d60008d6ff7ee0ca4835618cbef/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4422,
4672,
2240,
12,
535,
16,
365,
2934,
972,
2738,
972,
12,
3353,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
4422,
4672,
2240,
12,
535,
16,
365,
2934,
972,
2738,
972,
12,
3353,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
parse_a(self, 'keymgmt', keyManagement) | parse_a(self, 'keymgmt', km) | def setKeyManagement(self, km): parse_a(self, 'keymgmt', keyManagement) | 33a67ce0314122972fd9588b31efcfc76406437e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1265/33a67ce0314122972fd9588b31efcfc76406437e/sdp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16696,
10998,
12,
2890,
16,
18952,
4672,
1109,
67,
69,
12,
2890,
16,
296,
856,
9319,
2187,
498,
10998,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
16696,
10998,
12,
2890,
16,
18952,
4672,
1109,
67,
69,
12,
2890,
16,
296,
856,
9319,
2187,
498,
10998,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
defaultLocation=DEFAULT_PACKAGEFOLDER) | defaultLocation=DEFAULT_USER_PACKAGEFOLDER) | def compileaete(aete, resinfo, fname): """Generate code for a full aete resource. fname passed for doc purposes""" [version, language, script, suites] = aete major, minor = divmod(version, 256) creatorsignature, dummy = MacOS.GetCreatorAndType(fname) packagename = identify(os.path.splitext(os.path.basename(fname))[0]) if language: packagename = packagename+'_lang%d'%language if script: packagename = packagename+'_script%d'%script if len(packagename) > 27: packagename = packagename[:27] pathname = EasyDialogs.AskFolder(message='Create and select package folder for %s'%packagename, defaultLocation=DEFAULT_PACKAGEFOLDER) if not pathname: return packagename = os.path.split(os.path.normpath(pathname))[1] basepkgname = EasyDialogs.AskFolder(message='Package folder for base suite (usually StdSuites)', defaultLocation=DEFAULT_PACKAGEFOLDER) if basepkgname: dirname, basepkgname = os.path.split(os.path.normpath(basepkgname)) if not dirname in sys.path: sys.path.insert(0, dirname) basepackage = __import__(basepkgname) else: basepackage = None suitelist = [] allprecompinfo = [] allsuites = [] for suite in suites: code, suite, pathname, modname, precompinfo = precompilesuite(suite, basepackage) if not code: continue allprecompinfo = allprecompinfo + precompinfo suiteinfo = suite, pathname, modname suitelist.append((code, modname)) allsuites.append(suiteinfo) for suiteinfo in allsuites: compilesuite(suiteinfo, major, minor, language, script, fname, basepackage, allprecompinfo) initfilename = EasyDialogs.AskFileForSave(message='Package module', savedFileName='__init__.py') if not initfilename: return fp = open(initfilename, 'w') MacOS.SetCreatorAndType(initfilename, 'Pyth', 'TEXT') fp.write('"""\n') fp.write("Package generated from %s\n"%fname) if resinfo: fp.write("Resource %s resid %d %s\n"%(ascii(resinfo[1]), resinfo[0], ascii(resinfo[2]))) fp.write('"""\n') fp.write('import aetools\n') fp.write('Error = aetools.Error\n') for code, modname in suitelist: fp.write("import %s\n" % modname) fp.write("\n\n_code_to_module = {\n") for code, modname in suitelist: fp.write("\t'%s' : %s,\n"%(ascii(code), modname)) fp.write("}\n\n") fp.write("\n\n_code_to_fullname = {\n") for code, modname in suitelist: fp.write("\t'%s' : ('%s.%s', '%s'),\n"%(ascii(code), packagename, modname, modname)) fp.write("}\n\n") for code, modname in suitelist: fp.write("from %s import *\n"%modname) # Generate property dicts and element dicts for all types declared in this module fp.write("def getbaseclasses(v):\n") fp.write("\tif hasattr(v, '_superclassnames') and not hasattr(v, '_propdict'):\n") fp.write("\t\tv._propdict = {}\n") fp.write("\t\tv._elemdict = {}\n") fp.write("\t\tfor superclass in v._superclassnames:\n") | fa1bf1c518528ae8ec9b24ce452edc930ec80a7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fa1bf1c518528ae8ec9b24ce452edc930ec80a7d/gensuitemodule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4074,
69,
12865,
12,
69,
12865,
16,
400,
1376,
16,
5299,
4672,
3536,
4625,
981,
364,
279,
1983,
279,
12865,
1058,
18,
5299,
2275,
364,
997,
13694,
8395,
306,
1589,
16,
2653,
16,
2728,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4074,
69,
12865,
12,
69,
12865,
16,
400,
1376,
16,
5299,
4672,
3536,
4625,
981,
364,
279,
1983,
279,
12865,
1058,
18,
5299,
2275,
364,
997,
13694,
8395,
306,
1589,
16,
2653,
16,
2728,
... |
existing_work[k] = list(v) | existing_subjects = set(existing_work.get(k, [])) existing_work.setdefault(k, []).extend(s for s in v if s not in existing_subjects) | def update_work_with_best_match(akey, w, work_to_edition, do_updates, fh_log): work_updated = [] best = w['best_match']['key'] update = [] subjects_from_existing_works = defaultdict(set) for wkey in w['existing_works'].iterkeys(): if wkey == best: continue existing = get_with_retry(wkey) for k in 'subjects', 'subject_places', 'subject_times', 'subject_people': if existing.get(k): subjects_from_existing_works[k].update(existing[k]) update.append({'type': '/type/redirect', 'location': best, 'key': wkey}) work_updated.append(wkey) for wkey in w['existing_works'].iterkeys(): editions = set(work_to_edition[wkey]) editions.update(e['key'] for e in w['editions']) for ekey in editions: e = get_with_retry(ekey) e['works'] = [{'key': best}] authors = [] for akey in e['authors']: a = get_with_retry(akey) if a['type'] == '/type/redirect': m = re_author_key.match(a['location']) akey = '/authors/' + m.group(1) authors.append({'key': str(akey)}) e['authors'] = authors update.append(e) cur_work = w['best_match'] need_save = fix_up_authors(cur_work, akey, w['editions']) if any(subjects_from_existing_works.values()): need_save = True if need_save or cur_work['title'] != w['title'] \ or ('subtitle' in w and 'subtitle' not in cur_work) \ or ('subjects' in w and 'subjects' not in cur_work): if cur_work['title'] != w['title']: print 'update work title:', best, `cur_work['title']`, '->', `w['title']` existing_work = get_with_retry(best) if existing_work['type'] != '/type/work': pprint(existing_work) assert existing_work['type'] == '/type/work' existing_work['title'] = w['title'] for k, v in subjects_from_existing_works.items(): existing_work[k] = list(v) add_detail_to_work(w, existing_work) print >> fh_log, 'existing:', existing_work print >> fh_log, 'subtitle:', `existing_work['subtitle']` if 'subtitle' in existing_work else 'n/a' update.append(existing_work) work_updated.append(best) if do_updates: try: print >> fh_log, ol.save_many(update, 'merge works') except: for page in update: print page raise return work_updated | e346c1a420ad370bfbadfa6ec7efef8f2e86336a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/e346c1a420ad370bfbadfa6ec7efef8f2e86336a/find_works.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
1252,
67,
1918,
67,
12729,
67,
1916,
12,
581,
402,
16,
341,
16,
1440,
67,
869,
67,
329,
608,
16,
741,
67,
14703,
16,
7625,
67,
1330,
4672,
1440,
67,
7007,
273,
5378,
3796,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
1252,
67,
1918,
67,
12729,
67,
1916,
12,
581,
402,
16,
341,
16,
1440,
67,
869,
67,
329,
608,
16,
741,
67,
14703,
16,
7625,
67,
1330,
4672,
1440,
67,
7007,
273,
5378,
3796,
... |
sql = "CREATE TABLE IF NOT EXISTS `%s` (%s) %s" % (tableBlacklist, ",".join(colsCreateBlacklist+idxBlacklist), ListBW.DB_ENGINE) | sql = "CREATE TABLE IF NOT EXISTS `%s` (%s) %s" % (self.tableBlacklist, ",".join(colsCreateBlacklist+idxBlacklist), ListBW.DB_ENGINE) | def start(self): if self.factory == None: raise ParamError("this module need reference to fatory and database connection pool") | 2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5428/2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae/ListBW.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
309,
365,
18,
6848,
422,
599,
30,
1002,
3014,
668,
2932,
2211,
1605,
1608,
2114,
358,
284,
8452,
471,
2063,
1459,
2845,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
787,
12,
2890,
4672,
309,
365,
18,
6848,
422,
599,
30,
1002,
3014,
668,
2932,
2211,
1605,
1608,
2114,
358,
284,
8452,
471,
2063,
1459,
2845,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if not isinstance(test, (unittest.TestCase, unittest.TestSuite)): | if not isinstance(test, (TestCase, TestSuite)): | def loadTestsFromName(self, name, module=None): """Return a suite of all tests cases given a string specifier. | 1220a987a204ad00894fd3d78946cd866a12fb3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/1220a987a204ad00894fd3d78946cd866a12fb3e/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
14650,
29732,
12,
2890,
16,
508,
16,
1605,
33,
7036,
4672,
3536,
990,
279,
11371,
434,
777,
7434,
6088,
864,
279,
533,
24562,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
14650,
29732,
12,
2890,
16,
508,
16,
1605,
33,
7036,
4672,
3536,
990,
279,
11371,
434,
777,
7434,
6088,
864,
279,
533,
24562,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
pointer = item + offsets[j] | def add_reachable_to_stack2(self, obj, objects, target_addr, source_addr): size_gc_header = self.gcheaderbuilder.size_gc_header gc_info = obj - size_gc_header hdr = llmemory.cast_adr_to_ptr(gc_info, self.HDRPTR) if hdr.typeid & 1: return typeid = hdr.typeid >> 1 offsets = self.offsets_to_gc_pointers(typeid) i = 0 while i < len(offsets): pointer = obj + offsets[i] objects.append(pointer.address[0]) # ------------------------------------------------- # begin difference from collect if pointer.address[0] == target_addr: pointer.address[0] = source_addr # end difference from collect # ------------------------------------------------- i += 1 if self.is_varsize(typeid): offset = self.varsize_offset_to_variable_part( typeid) length = (obj + self.varsize_offset_to_length(typeid)).signed[0] obj += offset offsets = self.varsize_offsets_to_gcpointers_in_var_part(typeid) itemlength = self.varsize_item_sizes(typeid) i = 0 while i < length: item = obj + itemlength * i j = 0 while j < len(offsets): objects.append((item + offsets[j]).address[0]) # ------------------------------------------------- # begin difference from collect pointer = item + offsets[j] if pointer.address[0] == target_addr: pointer.address[0] = source_addr ## end difference from collect # ------------------------------------------------- j += 1 i += 1 | 21591058a5d5e5ea0a2e29862bef780d185bf55d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/21591058a5d5e5ea0a2e29862bef780d185bf55d/gc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
17246,
67,
869,
67,
3772,
22,
12,
2890,
16,
1081,
16,
2184,
16,
1018,
67,
4793,
16,
1084,
67,
4793,
4672,
963,
67,
13241,
67,
3374,
273,
365,
18,
75,
343,
18105,
9574,
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,
527,
67,
17246,
67,
869,
67,
3772,
22,
12,
2890,
16,
1081,
16,
2184,
16,
1018,
67,
4793,
16,
1084,
67,
4793,
4672,
963,
67,
13241,
67,
3374,
273,
365,
18,
75,
343,
18105,
9574,
18,
... | |
return out | return out | def tmpl_print_record_list_for_similarity_boxen(self, title, score_list, ln=cdslang): """Print list of records in the "hs" (HTML Similarity) format for similarity boxes. FIXME: bad symbol names again, e.g. SCORE_LIST is *not* a list of scores. Humph. """ | 950f773715cd42e6f10709d26e0156a6d4133bab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/950f773715cd42e6f10709d26e0156a6d4133bab/websearch_templates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
1188,
67,
3366,
67,
1098,
67,
1884,
67,
22985,
560,
67,
2147,
275,
12,
2890,
16,
2077,
16,
4462,
67,
1098,
16,
7211,
33,
4315,
2069,
539,
4672,
3536,
5108,
666,
434,
3853,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
1188,
67,
3366,
67,
1098,
67,
1884,
67,
22985,
560,
67,
2147,
275,
12,
2890,
16,
2077,
16,
4462,
67,
1098,
16,
7211,
33,
4315,
2069,
539,
4672,
3536,
5108,
666,
434,
3853,
... |
def RoadTest(*args): return _micropolisengine.Micropolis_RoadTest(*args) | def RoadTest(*args): return _micropolisengine.Micropolis_RoadTest(*args) | 5a3df75004255f771cfd4bd56f2f7fda1668c631 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12485/5a3df75004255f771cfd4bd56f2f7fda1668c631/micropolisengine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25097,
4709,
30857,
1968,
4672,
327,
389,
27593,
1764,
355,
291,
8944,
18,
49,
335,
1764,
355,
291,
67,
54,
6189,
4709,
30857,
1968,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
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,
25097,
4709,
30857,
1968,
4672,
327,
389,
27593,
1764,
355,
291,
8944,
18,
49,
335,
1764,
355,
291,
67,
54,
6189,
4709,
30857,
1968,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
""" Takes an svn url and gets the associated revision. """ | """Takes an svn url and gets the associated revision.""" | def getBestMergePath(url, revision): """ Takes an svn url and gets the associated revision. """ command = 'svn log ' + url + " -r "+str(revision) + " -v" svn_info = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.readlines() best_path = None for line in svn_info: match = re.search(r"[\n\r ]+[MADUC][\n\r ]+/.*/src(.*)/.+", line) if match: if (best_path == None): best_path = match.group(1) else: best_path = leastPath(match.group(1),best_path) | 44364270024fa1f0c4c0875635e210722b0d4b26 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6076/44364270024fa1f0c4c0875635e210722b0d4b26/drover.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28782,
6786,
743,
12,
718,
16,
6350,
4672,
3536,
11524,
392,
5893,
82,
880,
471,
5571,
326,
3627,
6350,
12123,
1296,
273,
296,
31505,
613,
296,
397,
880,
397,
315,
300,
86,
13773,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28782,
6786,
743,
12,
718,
16,
6350,
4672,
3536,
11524,
392,
5893,
82,
880,
471,
5571,
326,
3627,
6350,
12123,
1296,
273,
296,
31505,
613,
296,
397,
880,
397,
315,
300,
86,
13773,
701,
... |
log.err("\n\nThe following files failed to be downloaded.\n") | log.msg("\n\n") log.err("The following files failed to be downloaded.\n") | def run(request, response, func=find_first_match): '''Get items from the request Queue, process them with func(), put the results along with the Thread's name into the response Queue. Stop running when item is None.''' while 1: tuple_item_key = request.get() if tuple_item_key is None: break (key, item) = tuple_item_key #INFO: Everything (url, file, download_size, checksum) = stripper(item) thread_name = threading.currentThread().getName() log.verbose("Thread is %s\n" % (thread_name) ) if url.endswith(".deb"): try: PackageName = file.split("_")[0] except IndexError: log.err("Not getting a package name here is problematic. Better bail out.\n") sys.exit(1) #INFO: For Package version, we don't want to fail try: PackageVersion = file.split("_")[1] except IndexError: PackageVersion = "NA" log.verbose("Weird!! Package version not present. Is it really a deb file?\n") response.put(func(Str_CacheDir, file) ) #INFO: find_first_match() returns False or a file name with absolute path full_file_path = response.get() #INFO: If we find the file in the local Str_CacheDir, we'll execute this block. if full_file_path != False: # We'll first check for its md5 checksum if Bool_DisableMD5Check is False: if FetcherInstance.CheckHashDigest(full_file_path, checksum) is True: log.verbose("md5checksum correct for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if Bool_BugReports: bug_fetched = 0 log.verbose("Fetching bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if FetchBugReportsDebian.FetchBugsDebian(PackageName) in [1,2]: log.verbose("Fetched bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) bug_fetched = 1 else: log.verbose("Couldn't fetch bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if Str_BundleFile: if FetcherInstance.compress_the_file(Str_BundleFile, full_file_path) is True: log.success("%s copied from local cache directory %s.%s\n" % (PackageName, Str_CacheDir, LINE_OVERWRITE_MID) ) else: log.err("Couldn't add %s to archive %s.%s\n" % (file, Str_BundleFile, LINE_OVERWRITE_MID) ) sys.exit(1) #INFO: If no zip option enabled, simply copy the downloaded package file # along with the downloaded bug reports. else: try: shutil.copy(full_file_path, Str_DownloadDir) log.success("%s copied from local cache directory %s.%s\n" % (PackageName, Str_CacheDir, LINE_OVERWRITE_MID) ) except shutil.Error: log.verbose("%s already available in %s. Skipping copy!!!%s\n" % (file, Str_DownloadDir, LINE_OVERWRITE_MID) ) if bug_fetched == 1: for x in os.listdir(os.curdir): if (x.startswith(PackageName) and x.endswith(apt_bug_file_format) ): shutil.move(x, Str_DownloadDir) log.verbose("Moved %s file to %s folder.%s\n" % (x, Str_DownloadDir, LINE_OVERWRITE_FULL) ) #INFO: Damn!! The md5chesum didn't match :-( # The file is corrupted and we need to download a new copy from the internet else: log.verbose("%s checksum mismatch. Skipping file.%s\n" % (file, LINE_OVERWRITE_FULL) ) log.msg("Downloading %s - %s %s\n" % (PackageName, log.calcSize(download_size/1024), LINE_OVERWRITE_MID) ) if FetcherInstance.download_from_web(url, file, Str_DownloadDir) == True: log.success("\r%s done.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) #Add to Str_CacheDir if possible if Str_CacheDir and os.access(Str_CacheDir, os.W_OK) == True: try: shutil.copy(file, Str_CacheDir) log.verbose("%s copied to local cache directory %s.%s\n" % (file, Str_CacheDir, LINE_OVERWRITE_MID) ) except shutil.Error: log.verbose("Couldn't copy %s to %s.%s\n" % (file, Str_CacheDir, LINE_OVERWRITE_FULL) ) else: log.verbose("cache_dir %s is not writeable. Skipping copy to it.\n" % (Str_CacheDir) ) #Fetch bug reports if Bool_BugReports: log.verbose("Fetching bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) if Str_BundleFile: if FetcherInstance.compress_the_file( Str_BundleFile, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( Str_DownloadDir, file ) ) #INFO: You're and idiot. # You should NOT disable md5checksum for any files else: if Bool_BugReports: bug_fetched = 0 log.verbose("Fetching bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) bug_fetched = 1 else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) #FIXME: Don't know why this was really required. If this has no changes, delete it. #file = full_file_path.split("/") #file = file[len(file) - 1] #file = download_path + "/" + file if Str_BundleFile: if FetcherInstance.compress_the_file( Str_BundleFile, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( Str_DownloadDir, file ) ) else: # Since zip file option is not enabled let's copy the file to the target folder try: shutil.copy( full_file_path, Str_DownloadDir ) log.success( "%s copied from local cache directory %s.%s\n" % ( file, Str_CacheDir, LINE_OVERWRITE_SMALL ) ) except shutil.Error: log.verbose( "%s already available in dest_dir. Skipping copy!!!%s\n" % ( file, LINE_OVERWRITE_SMALL ) ) # And also the bug reports if bug_fetched == 1: for x in os.listdir( os.curdir ): if ( x.startswith( PackageName ) and x.endswith( apt_bug_file_format ) ): shutil.move( x, Str_DownloadDir ) log.verbose( "Moved %s file to %s folder.%s\n" % ( x, Str_DownloadDir, LINE_OVERWRITE_MID ) ) else: #INFO: This block gets executed if the file is not found in local Str_CacheDir or Str_CacheDir is None # We go ahead and try to download it from the internet log.verbose( "%s not available in local cache %s.%s\n" % ( file, Str_CacheDir, LINE_OVERWRITE_MID ) ) log.msg( "Downloading %s %s - %s %s\n" % ( PackageName, PackageVersion, log.calcSize( download_size / 1024 ), LINE_OVERWRITE_MID ) ) if FetcherInstance.download_from_web( url, file, Str_DownloadDir ) == True: #INFO: This block gets executed if md5checksum is allowed if Bool_DisableMD5Check is False: #INFO: Debian moved to SHA256. So we use that now. Older systems could have md5 log.verbose( "File %s has checksum %s\n" % ( file, checksum ) ) if FetcherInstance.CheckHashDigest( file, checksum ) is True: if Str_CacheDir and os.access( Str_CacheDir, os.W_OK ) == True: try: shutil.copy( file, Str_CacheDir ) log.verbose( "%s copied to local cache directory %s.%s\n" % ( file, Str_CacheDir, LINE_OVERWRITE_MID ) ) except shutil.Error: log.verbose( "%s already available in %s. Skipping copy!!!%s\n" % ( file, Str_CacheDir, LINE_OVERWRITE_MID ) ) else: log.verbose( "Str_CacheDir %s is not writeable. Skipping copy to it.\n" % ( Str_CacheDir ) ) if Bool_BugReports: log.verbose("Fetching bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) if Str_BundleFile: if FetcherInstance.compress_the_file( Str_BundleFile, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( Str_DownloadDir, file ) ) else: #INFO MD5 Checksum is incorrect. log.err( "%s MD5 Checksum mismatch.\n" % ( PackageName ) ) errlist.append( PackageName ) else: if Bool_BugReports: log.verbose("Fetching bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if FetchBugReportsDebian.FetchBugsDebian( PackageName ) in [1, 2]: log.verbose( "Fetched bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) else: log.verbose( "Couldn't fetch bug reports for package %s.%s\n" % ( PackageName, LINE_OVERWRITE_MID ) ) if Str_BundleFile: if FetcherInstance.compress_the_file( Str_BundleFile, file ) != True: log.err( "Couldn't archive %s to file %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) sys.exit( 1 ) else: log.verbose( "%s added to archive %s.%s\n" % ( file, Str_BundleFile, LINE_OVERWRITE_SMALL ) ) os.unlink( os.path.join( Str_DownloadDir, file ) ) log.success( "\r%s %s done.%s\n" % ( PackageName, PackageVersion, LINE_OVERWRITE_FULL ) ) else: errlist.append( PackageName ) elif url.endswith(".bz2") or url.endswith(".gpg") or url.endswith("Release"): #INFO: We are a package update PackageName = url #INFO: We pass None as a filename here because we don't want to do a tree search of # update files. Update files are changed daily and there is no point in doing a search of # them in the Str_CacheDir response.put(func(Str_CacheDir, None) ) #INFO: exit_status here would be False because for updates there's no need to do a # find_first_match # This is more with the above statement where None is passed as the filename exit_status = response.get() if exit_status == False: log.msg("Downloading %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if FetcherInstance.download_from_web(url, file, Str_DownloadDir) == True: log.success("\r%s done.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if Str_BundleFile: if FetcherInstance.compress_the_file(Str_BundleFile, file) != True: log.err("Couldn't archive %s to file %s.%s\n" % (file, Str_BundleFile, LINE_OVERWRITE_MID) ) sys.exit(1) else: log.verbose("%s added to archive %s.%s\n" % (file, Str_BundleFile, LINE_OVERWRITE_FULL) ) os.unlink(os.path.join(Str_DownloadDir, file) ) else: errlist.append(url) else: raise FetchDataKeyError | 906359f9a15830630965e20544de2cfbae02577e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12499/906359f9a15830630965e20544de2cfbae02577e/AptOfflineCoreLib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2293,
16,
766,
16,
1326,
33,
4720,
67,
3645,
67,
1916,
4672,
9163,
967,
1516,
628,
326,
590,
7530,
16,
1207,
2182,
598,
1326,
9334,
1378,
326,
1686,
7563,
598,
326,
4884,
180... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2293,
16,
766,
16,
1326,
33,
4720,
67,
3645,
67,
1916,
4672,
9163,
967,
1516,
628,
326,
590,
7530,
16,
1207,
2182,
598,
1326,
9334,
1378,
326,
1686,
7563,
598,
326,
4884,
180... |
except wikipedia.IsRedirectPage: print "Description page is redirect?!" | except wikipedia.IsRedirectPage: print "Description page is redirect?!" except wikipedia.NoPage: break | def showImageList(self, imagelist): for i in range(len(imagelist)): image = imagelist[i] print "-"*60 wikipedia.output(u"%s. Found image: %s"% (i, image.aslink())) try: # Show the image description page's contents wikipedia.output(image.get(throttle=False)) except wikipedia.NoPage: try: # Maybe the image is on the target site already targetTitle = '%s:%s' % (self.targetSite.image_namespace(), image.title().split(':', 1)[1]) targetImage = wikipedia.Page(self.targetSite, targetTitle) if targetImage.get(throttle=False): wikipedia.output(u"Image is already on %s." % self.targetSite) wikipedia.output(targetImage.get(throttle=False)) else: print "Description empty." except wikipedia.NoPage: print "Description empty." except wikipedia.IsRedirectPage: print "Description page on Wikimedia Commons is redirect?!" except wikipedia.IsRedirectPage: print "Description page is redirect?!" | bf5a0f51dc20e47a8bf5ba67ce293609c23f89c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/bf5a0f51dc20e47a8bf5ba67ce293609c23f89c0/imagetransfer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
2040,
682,
12,
2890,
16,
8902,
5449,
4672,
364,
277,
316,
1048,
12,
1897,
12,
15374,
5449,
3719,
30,
1316,
273,
8902,
5449,
63,
77,
65,
1172,
7514,
14,
4848,
21137,
18,
2844,
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,
2405,
2040,
682,
12,
2890,
16,
8902,
5449,
4672,
364,
277,
316,
1048,
12,
1897,
12,
15374,
5449,
3719,
30,
1316,
273,
8902,
5449,
63,
77,
65,
1172,
7514,
14,
4848,
21137,
18,
2844,
12,... |
raise ValueError, "plot_points must be positive" | raise ValueError, "plot_points must be greater than 1" | def var_and_list_of_values(v, plot_points): """ INPUT: - ``v`` - (v0, v1) or (var, v0, v1); if the former return the range of values between v0 and v1 taking plot_points steps; if var is given, also return var. - ``plot_points`` - integer = 2 (the endpoints) OUTPUT: - ``var`` - a variable or None - ``list`` - a list of floats EXAMPLES:: sage: from sage.plot.plot import var_and_list_of_values sage: var_and_list_of_values((var('theta'), 2, 5), 5) (theta, [2.0, 2.75, 3.5, 4.25, 5.0]) sage: var_and_list_of_values((2, 5), 5) (None, [2.0, 2.75, 3.5, 4.25, 5.0]) sage: var_and_list_of_values((var('theta'), 2, 5), 2) (theta, [2.0, 5.0]) sage: var_and_list_of_values((2, 5), 2) (None, [2.0, 5.0]) """ plot_points = int(plot_points) if plot_points < 2: raise ValueError, "plot_points must be positive" if not isinstance(v, (tuple, list)): raise TypeError, "v must be a tuple or list" if len(v) == 3: var = v[0] a, b = v[1], v[2] elif len(v) == 2: var = None a, b = v else: raise ValueError, "parametric value range must be a list or tuple of length 2 or 3." a = float(a) b = float(b) if plot_points == 2: return var, [a, b] else: step = (b-a)/float(plot_points-1) values = [a + step*i for i in xrange(plot_points)] return var, values | aa6916134b0b3764422bd53e781315007a519805 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/aa6916134b0b3764422bd53e781315007a519805/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
569,
67,
464,
67,
1098,
67,
792,
67,
2372,
12,
90,
16,
3207,
67,
4139,
4672,
3536,
12943,
30,
282,
300,
225,
12176,
90,
10335,
300,
261,
90,
20,
16,
331,
21,
13,
578,
261,
1401,
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,
569,
67,
464,
67,
1098,
67,
792,
67,
2372,
12,
90,
16,
3207,
67,
4139,
4672,
3536,
12943,
30,
282,
300,
225,
12176,
90,
10335,
300,
261,
90,
20,
16,
331,
21,
13,
578,
261,
1401,
16... |
dict = {'__file__': pyfile, '__name__': pyfile} | dict = {'__file__': pyfile} | def rotateLog(signal, frame, logFile=logFile): logFile.rotate() | 13c9dd6d2e55d08c74fe6dabfbf0f3aa9474c5f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/13c9dd6d2e55d08c74fe6dabfbf0f3aa9474c5f7/twistd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8534,
1343,
12,
10420,
16,
2623,
16,
20169,
33,
1330,
812,
4672,
20169,
18,
20342,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8534,
1343,
12,
10420,
16,
2623,
16,
20169,
33,
1330,
812,
4672,
20169,
18,
20342,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
p = htmllib.HTMLParser(formatter.AbstractFormatter(formatter.DumbWriter(outstream))) | p = htmllib.HTMLParser(formatter.AbstractFormatter(formatter.DumbWriter(outstream))) | def get_wall(self): walls = [] connection = web_proxy.urllib2.urlopen("http://m.facebook.com/wall.php") messages = connection.read().split("<hr />") for line in messages: #search wall poster poster = re.search('<a href="/profile.php\?.+refid=.+>(.+)<br /><small>.+</small></div><div>', line) if poster <> None: outstream = StringIO() p = htmllib.HTMLParser(formatter.AbstractFormatter(formatter.DumbWriter(outstream))) p.feed(poster.group(0)) poster = re.sub("(\[.+\])","", outstream.getvalue()).split("\n")[0] outstream.close() #search wall post post = re.search('</small></div><div>(.+)</div>', line) if post <> None: outstream = StringIO() p = htmllib.HTMLParser(formatter.AbstractFormatter(formatter.DumbWriter(outstream))) p.feed(post.group(0)) post = re.sub("(\[.+\])","", outstream.getvalue()).replace("delete", "") outstream.close() if poster <> None and post <> None: walls.extend([FacebookWall(poster.strip(), post.strip().replace("\n"," "))]) return walls | e8169ef5d3a898d3fa46885d245f8bcfad05cd05 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10818/e8169ef5d3a898d3fa46885d245f8bcfad05cd05/watch_sn_facebook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8019,
12,
2890,
4672,
17662,
87,
273,
5378,
1459,
273,
3311,
67,
5656,
18,
718,
2941,
22,
18,
295,
18589,
2932,
2505,
2207,
81,
18,
23130,
18,
832,
19,
8019,
18,
2684,
7923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8019,
12,
2890,
4672,
17662,
87,
273,
5378,
1459,
273,
3311,
67,
5656,
18,
718,
2941,
22,
18,
295,
18589,
2932,
2505,
2207,
81,
18,
23130,
18,
832,
19,
8019,
18,
2684,
7923,
... |
font-family: monospace; | font-family: courier, monospace; font-size:12pt; | def edit_window(self, worksheet): """ Return a window for editing worksheet. | adf3b4b66f738794b64a465078e7e9aaaeb23d9d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/adf3b4b66f738794b64a465078e7e9aaaeb23d9d/notebook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
67,
5668,
12,
2890,
16,
13622,
4672,
3536,
2000,
279,
2742,
364,
15755,
13622,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
67,
5668,
12,
2890,
16,
13622,
4672,
3536,
2000,
279,
2742,
364,
15755,
13622,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
total = len(bugs) | results_summary = "You searched the bug database for '%s'." % language | def fetch_bugs(request): # FIXME: Give bugs some date field language = request.GET.get('language', None) format = request.GET.get('format', None) start = int(request.GET.get('start', 0)) end = int(request.GET.get('end', 10)) bugs = Bug.objects.all() total = len(bugs) if language: bugs = bugs.filter(project__language=language) #if status: # bugs = bugs.filter(project__status=status) bugs = bugs[start:end] if format == 'json': return bugs_to_json_response(bugs, request.GET.get('jsoncallback', 'alert')) else: prev_page_query_str = QueryDict('') prev_page_query_str = prev_page_query_str.copy() next_page_query_str = QueryDict('') next_page_query_str = next_page_query_str.copy() if language: prev_page_query_str['language'] = language next_page_query_str['language'] = language if format: prev_page_query_str['format'] = format next_page_query_str['format'] = format prev_page_query_str['start'] = 2*start - end prev_page_query_str['end'] = end next_page_query_str['start'] = end next_page_query_str['end'] = 2*end - start return render_to_response('search/search.html', {'bunch_of_bugs': bugs, 'start': start, 'end': end, 'prev_page_url': '/search/?' + prev_page_query_str.urlencode(), 'next_page_url': '/search/?' + next_page_query_str.urlencode() }) | 71a6b460c7c7d65e57bc8679abd7e2b98110ac9f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11976/71a6b460c7c7d65e57bc8679abd7e2b98110ac9f/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
67,
19381,
12,
2293,
4672,
468,
9852,
30,
22374,
22398,
2690,
1509,
652,
225,
2653,
273,
590,
18,
3264,
18,
588,
2668,
4923,
2187,
599,
13,
740,
273,
590,
18,
3264,
18,
588,
2668... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
67,
19381,
12,
2293,
4672,
468,
9852,
30,
22374,
22398,
2690,
1509,
652,
225,
2653,
273,
590,
18,
3264,
18,
588,
2668,
4923,
2187,
599,
13,
740,
273,
590,
18,
3264,
18,
588,
2668... |
zope_bind = pt_class.__get__ | def get_and_bind(template, view=None, cls=None): inst = get(template, view, cls) if inst._v_last_read is False: inst.registry.purge() inst.read() return five_bind(inst, view, cls) | ec0d30451acb3170f13940839c4ff34c45887d8e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9585/ec0d30451acb3170f13940839c4ff34c45887d8e/patches.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
464,
67,
4376,
12,
3202,
16,
1476,
33,
7036,
16,
2028,
33,
7036,
4672,
1804,
273,
336,
12,
3202,
16,
1476,
16,
2028,
13,
309,
1804,
6315,
90,
67,
2722,
67,
896,
353,
1083,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
464,
67,
4376,
12,
3202,
16,
1476,
33,
7036,
16,
2028,
33,
7036,
4672,
1804,
273,
336,
12,
3202,
16,
1476,
16,
2028,
13,
309,
1804,
6315,
90,
67,
2722,
67,
896,
353,
1083,
... | |
other = Constant(other) if isinstance(other, Constant) and other.Value == 0: | other = Constant(other) if tests.is_zero(other): | def __sub__(self, other): if not isinstance(other, Expression): other = Constant(other) if isinstance(other, Constant) and other.Value == 0: return self return Sum((self, -other)) | 0aea67b6248de24bf5c20988f84fdf8ba68e066d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12571/0aea67b6248de24bf5c20988f84fdf8ba68e066d/primitives.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1717,
972,
12,
2890,
16,
1308,
4672,
309,
486,
1549,
12,
3011,
16,
5371,
4672,
1308,
273,
10551,
12,
3011,
13,
309,
7434,
18,
291,
67,
7124,
12,
3011,
4672,
327,
365,
327,
9352,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1717,
972,
12,
2890,
16,
1308,
4672,
309,
486,
1549,
12,
3011,
16,
5371,
4672,
1308,
273,
10551,
12,
3011,
13,
309,
7434,
18,
291,
67,
7124,
12,
3011,
4672,
327,
365,
327,
9352,
... |
def OnWarmup(self, action, data, match=None): | def OnWarmup(self, action, data=None, match=None): | def OnWarmup(self, action, data, match=None): self.debug('EVENT: OnWarmup') self.game.rounds = 0 return b3.events.Event(b3.events.EVT_GAME_WARMUP, data) | 7f272d35b3396809749722f9db86ff8ad63074c3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12909/7f272d35b3396809749722f9db86ff8ad63074c3/iourt41.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
59,
4610,
416,
12,
2890,
16,
1301,
16,
501,
33,
7036,
16,
845,
33,
7036,
4672,
365,
18,
4148,
2668,
10454,
30,
2755,
59,
4610,
416,
6134,
365,
18,
13957,
18,
27950,
273,
374,
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,
2755,
59,
4610,
416,
12,
2890,
16,
1301,
16,
501,
33,
7036,
16,
845,
33,
7036,
4672,
365,
18,
4148,
2668,
10454,
30,
2755,
59,
4610,
416,
6134,
365,
18,
13957,
18,
27950,
273,
374,
3... |
darwin_ldflags = ' -mmacosx-version-min=10.5.0 ' | if not (self.osx_target == 'false'): if self.osxflavor == 'leopard': self.osx_target = '10.5' if self.osxflavor == 'snowleopard': self.osx_target = '10.6' if self.force_osx_target: mdt = self.force_osx_target if self.force_osx_target.strip() == 'true': if self.osxflavor == 'snowleopard': mdt = '10.5' if self.osxflavor == 'leopard': mdt = '10.4' os.environ['MACOSX_DEPLOYMENT_TARGET'] = mdt darwin_ldflags += ' -mmacosx-version-min=%s' % self.osx_target | def _set_compilation_flags(self): """Set CFALGS/LDFLAGS.""" self.logger.debug('Setting compilation flags') if self._skip_flags: self.logger.warning('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') self.logger.warning('!!! Build variable settings has been disabled !!!') self.logger.warning('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') return os.environ['CFLAGS'] = ' '.join([os.environ.get('CFLAGS', ''), ' %s' % self.cflags]).strip() os.environ['LDFLAGS'] = ' '.join([os.environ.get('LDFLAGS', '') , ' %s' % self.ldflags]).strip() if self.rpath: os.environ['LD_RUN_PATH'] = appendVar( os.environ.get('LD_RUN_PATH', ''), [s for s in self.rpath\ if s.strip()] + [os.path.join(self.prefix, 'lib')], ':' ) | f110e46add76dae5c5074003648024deef154585 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13386/f110e46add76dae5c5074003648024deef154585/common.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
2919,
6613,
67,
7133,
12,
2890,
4672,
3536,
694,
6123,
1013,
16113,
19,
48,
4577,
6552,
55,
12123,
365,
18,
4901,
18,
4148,
2668,
5568,
8916,
2943,
6134,
309,
365,
6315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
542,
67,
2919,
6613,
67,
7133,
12,
2890,
4672,
3536,
694,
6123,
1013,
16113,
19,
48,
4577,
6552,
55,
12123,
365,
18,
4901,
18,
4148,
2668,
5568,
8916,
2943,
6134,
309,
365,
6315,
... |
_svg_str_to_pixbuf(bar)) | _svg_str_to_pixbuf(_bar)) | def create(self): """ Create and position the sprites that compose the abacus """ | fa60a06795f92967c0f5d82d623ad43d79cdc87b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7608/fa60a06795f92967c0f5d82d623ad43d79cdc87b/abacus_window.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
4672,
3536,
1788,
471,
1754,
326,
1694,
24047,
716,
11458,
326,
1223,
1077,
407,
3536,
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,
752,
12,
2890,
4672,
3536,
1788,
471,
1754,
326,
1694,
24047,
716,
11458,
326,
1223,
1077,
407,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
['--strict'], {'action': 'store_const', 'const': 'info', | ['--strict'], {'action': 'store_const', 'const': 1, | def process(self, opt, value, values, parser): """ Call the validator function on applicable settings and evaluate the 'overrides' option. Extends `optparse.Option.process`. """ result = optparse.Option.process(self, opt, value, values, parser) setting = self.dest if setting: if self.validator: value = getattr(values, setting) try: new_value = self.validator(setting, value, parser) except Exception, error: raise (optparse.OptionValueError( 'Error in option "%s":\n %s: %s' % (opt, error.__class__.__name__, error)), None, sys.exc_info()[2]) setattr(values, setting, new_value) if self.overrides: setattr(values, self.overrides, None) return result | f52d0751fe2530d5077768fb55ae77add684618f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1278/f52d0751fe2530d5077768fb55ae77add684618f/frontend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
2890,
16,
2153,
16,
460,
16,
924,
16,
2082,
4672,
3536,
3049,
326,
4213,
445,
603,
12008,
1947,
471,
5956,
326,
296,
19775,
11,
1456,
18,
6419,
5839,
1375,
3838,
2670,
18,
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,
1207,
12,
2890,
16,
2153,
16,
460,
16,
924,
16,
2082,
4672,
3536,
3049,
326,
4213,
445,
603,
12008,
1947,
471,
5956,
326,
296,
19775,
11,
1456,
18,
6419,
5839,
1375,
3838,
2670,
18,
18... |
n = vcard1.n.value.split(";") f1 = n[0] + " " + n[1] + " " + n[2] if vcard2.version.value == "3.0": f2 = vcard2.n.value.family + " " + vcard2.n.value.given + " " + vcard2.n.value.additional else: n = vcard2.n.value.split(";") f2 = n[0] + " " + n[1] + " " + n[2] return cmp(f1.replace(" "," ").strip(), f2.replace(" "," ").strip()) else: | return 0 except: | def sort_contacts(model, iter1, iter2, data): vcard1 = model[iter1][1] vcard2 = model[iter2][1] if type(vcard1) == vobject.base.Component and type(vcard2) == vobject.base.Component: if vcard1.version.value == "3.0": f1 = vcard1.n.value.family + " " + vcard1.n.value.given + " " + vcard1.n.value.additional else: n = vcard1.n.value.split(";") f1 = n[0] + " " + n[1] + " " + n[2] if vcard2.version.value == "3.0": f2 = vcard2.n.value.family + " " + vcard2.n.value.given + " " + vcard2.n.value.additional else: n = vcard2.n.value.split(";") f2 = n[0] + " " + n[1] + " " + n[2] return cmp(f1.replace(" "," ").strip(), f2.replace(" "," ").strip()) else: return 0 | 337e2628519817abde9df50dbed69c769add8439 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/337e2628519817abde9df50dbed69c769add8439/arkadas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1524,
67,
20777,
12,
2284,
16,
1400,
21,
16,
1400,
22,
16,
501,
4672,
29760,
21,
273,
938,
63,
2165,
21,
6362,
21,
65,
29760,
22,
273,
938,
63,
2165,
22,
6362,
21,
65,
309,
618,
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,
1524,
67,
20777,
12,
2284,
16,
1400,
21,
16,
1400,
22,
16,
501,
4672,
29760,
21,
273,
938,
63,
2165,
21,
6362,
21,
65,
29760,
22,
273,
938,
63,
2165,
22,
6362,
21,
65,
309,
618,
12... |
self.Ho = 1.0 | def initialize(self): self.ITR = None self.f_old = None self.r_old = None self.Ho = 1.0 | 9b3fb2d9cd942323ed386a6fc8e33890cb8882de /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1380/9b3fb2d9cd942323ed386a6fc8e33890cb8882de/lbfgs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
2890,
4672,
365,
18,
1285,
54,
273,
599,
365,
18,
74,
67,
1673,
273,
599,
365,
18,
86,
67,
1673,
273,
599,
365,
18,
44,
83,
273,
404,
18,
20,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4046,
12,
2890,
4672,
365,
18,
1285,
54,
273,
599,
365,
18,
74,
67,
1673,
273,
599,
365,
18,
86,
67,
1673,
273,
599,
365,
18,
44,
83,
273,
404,
18,
20,
2,
-100,
-100,
-100,
-100,
... | |
cr.execute('SELECT view_mode FROM ir_act_window_view WHERE view_id=%d ORDER BY sequence LIMIT 1', (int(a_id),)) | cr.execute('SELECT view_mode FROM ir_act_window_view WHERE act_window_id=%d ORDER BY sequence LIMIT 1', (int(a_id),)) | def _tag_menuitem(self, cr, rec, data_node=None): rec_id = rec.getAttribute("id").encode('ascii') m_l = map(escape, escape_re.split(rec.getAttribute("name").encode('utf8'))) pid = False for idx, menu_elem in enumerate(m_l): if pid: cr.execute('select id from ir_ui_menu where parent_id=%d and name=%s', (pid, menu_elem)) else: cr.execute('select id from ir_ui_menu where parent_id is null and name=%s', (menu_elem,)) res = cr.fetchone() if idx==len(m_l)-1: # we are at the last menu element/level (it's a leaf) values = {'parent_id': pid,'name':menu_elem} | 9cd8f0f46edc6538f8d5828009fef3c1a02439a9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12853/9cd8f0f46edc6538f8d5828009fef3c1a02439a9/convert.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2692,
67,
5414,
1726,
12,
2890,
16,
4422,
16,
1950,
16,
501,
67,
2159,
33,
7036,
4672,
1950,
67,
350,
273,
1950,
18,
588,
1499,
2932,
350,
20387,
3015,
2668,
9184,
6134,
312,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2692,
67,
5414,
1726,
12,
2890,
16,
4422,
16,
1950,
16,
501,
67,
2159,
33,
7036,
4672,
1950,
67,
350,
273,
1950,
18,
588,
1499,
2932,
350,
20387,
3015,
2668,
9184,
6134,
312,
67,
... |
obj._data[attr] = obj._schema.getDefaultValue(attr) | if item._meta["sequence"] == 1: obj._data[attr] = makeGangaListByRef(obj._schema.getDefaultValue(attr)) else: obj._data[attr] = obj._schema.getDefaultValue(attr) | def end_element(name): ###logger.debug('End element: name=%s', name) | 426162e089cd0623b68479cf52f1b02be40c1718 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/426162e089cd0623b68479cf52f1b02be40c1718/VStreamer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
2956,
12,
529,
4672,
11849,
4901,
18,
4148,
2668,
1638,
930,
30,
508,
5095,
87,
2187,
508,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
679,
67,
2956,
12,
529,
4672,
11849,
4901,
18,
4148,
2668,
1638,
930,
30,
508,
5095,
87,
2187,
508,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
concealed = ("<em>(%d private member%s not shown)</em>" | concealed = (_("<em>(%d private member%s not shown)</em>") | def FormatUsers(self, digest): conceal_sub = mm_cfg.ConcealSubscription people = [] | aa0161ff926b932bbc81a4bfaf1b8256bb8966a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/aa0161ff926b932bbc81a4bfaf1b8256bb8966a8/HTMLFormatter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4077,
6588,
12,
2890,
16,
5403,
4672,
356,
311,
287,
67,
1717,
273,
9740,
67,
7066,
18,
442,
311,
287,
6663,
16951,
273,
5378,
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,
4077,
6588,
12,
2890,
16,
5403,
4672,
356,
311,
287,
67,
1717,
273,
9740,
67,
7066,
18,
442,
311,
287,
6663,
16951,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print "oggmux" oggmux = gst.element_factory_make("oggmux", "oggmux") self.add(oggmux) | self.oggmux = gst.element_factory_make("oggmux", "oggmux") self.add(self.oggmux) | def __init__(self, type): Encoder.__init__(self, type) print "oggmux" oggmux = gst.element_factory_make("oggmux", "oggmux") self.add(oggmux) if type & INPUT_TYPE_AUDIO: audioconvert = gst.element_factory_make( "audioconvert", "audioconvert" ) self.add(audioconvert) vorbisenc = gst.element_factory_make("vorbisenc", "vorbisenc") self.add(vorbisenc) queue_audio = gst.element_factory_make( "queue", "queue_audio_enc" ) self.add(queue_audio) gst.element_link_many( audioconvert, vorbisenc, queue_audio, oggmux ) self.audio_pad.set_target(audioconvert.sink_pads().next()) if type & INPUT_TYPE_VIDEO: theoraenc = gst.element_factory_make("theoraenc", "theoraenc") self.add(theoraenc) queue_video = gst.element_factory_make( "queue", "queue_video_enc" ) self.add(queue_video) gst.element_link_many(theoraenc, queue_video, oggmux) self.video_pad.set_target(theoraenc.sink_pads().next()) self.source_pad.set_target(oggmux.src_pads().next()) | 0daf3540bb85f7aafab7c5e2e0a3c08da753a31a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7705/0daf3540bb85f7aafab7c5e2e0a3c08da753a31a/oggtheoravorbisenc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
618,
4672,
13554,
16186,
2738,
972,
12,
2890,
16,
618,
13,
365,
18,
717,
23336,
2616,
273,
314,
334,
18,
2956,
67,
6848,
67,
6540,
2932,
717,
23336,
2616... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
618,
4672,
13554,
16186,
2738,
972,
12,
2890,
16,
618,
13,
365,
18,
717,
23336,
2616,
273,
314,
334,
18,
2956,
67,
6848,
67,
6540,
2932,
717,
23336,
2616... |
except: | except Exception,e: | def command(self,cmd,args): if self.command_aliases.has_key(cmd): cmd=self.command_aliases[cmd] | 0cf08e371f06745e163b47eea0db89901d703fe0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12768/0cf08e371f06745e163b47eea0db89901d703fe0/cmdtable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1296,
12,
2890,
16,
4172,
16,
1968,
4672,
309,
365,
18,
3076,
67,
13831,
18,
5332,
67,
856,
12,
4172,
4672,
1797,
33,
2890,
18,
3076,
67,
13831,
63,
4172,
65,
2,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1296,
12,
2890,
16,
4172,
16,
1968,
4672,
309,
365,
18,
3076,
67,
13831,
18,
5332,
67,
856,
12,
4172,
4672,
1797,
33,
2890,
18,
3076,
67,
13831,
63,
4172,
65,
2,
-100,
-100,
-100,
-1... |
if func: | if func: | def DeleteAll(): """ Delete all segments, instructions, comments, i.e. everything except values of bytes. """ ea = idaapi.cvar.inf.minEA # Brute-force nuke all info from all the heads while ea != BADADDR and ea <= idaapi.cvar.inf.maxEA: idaapi.del_local_name(ea) idaapi.del_global_name(ea) func = idaapi.get_func(ea) if func: idaapi.del_func_cmt(func, False) idaapi.del_func_cmt(func, True) idaapi.del_func(ea) idaapi.del_hidden_area(ea) seg = idaapi.getseg(ea) if seg: idaapi.del_segment_cmt(seg, False) idaapi.del_segment_cmt(seg, True) idaapi.del_segm(ea, idaapi.SEGDEL_KEEP | idaapi.SEGDEL_SILENT) ea = idaapi.next_head(ea, idaapi.cvar.inf.maxEA) | 507ea15b7a89e88e413b47a9fe03b571d956c14a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4773/507ea15b7a89e88e413b47a9fe03b571d956c14a/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2504,
1595,
13332,
3536,
2504,
777,
5155,
16,
12509,
16,
5678,
16,
277,
18,
73,
18,
7756,
1335,
924,
434,
1731,
18,
3536,
24164,
273,
612,
69,
2425,
18,
71,
1401,
18,
10625,
18,
1154,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2504,
1595,
13332,
3536,
2504,
777,
5155,
16,
12509,
16,
5678,
16,
277,
18,
73,
18,
7756,
1335,
924,
434,
1731,
18,
3536,
24164,
273,
612,
69,
2425,
18,
71,
1401,
18,
10625,
18,
1154,
... |
try: return self._assoc[vertex] except: | if hasattr(self, '_assoc') is False: | def get_vertex(self, vertex): """ Retrieve the object associated with a given vertex. | c3afb61f9d1def8f80a547062b5fe32e541084ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/c3afb61f9d1def8f80a547062b5fe32e541084ab/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
15281,
12,
2890,
16,
5253,
4672,
3536,
10708,
326,
733,
3627,
598,
279,
864,
5253,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
15281,
12,
2890,
16,
5253,
4672,
3536,
10708,
326,
733,
3627,
598,
279,
864,
5253,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
note = (object.im_self and ' method of %s instance' + object.im_self.__class__ or ' unbound %s method' % object.im_class.__name__) | inst = object.im_self note = (inst and ' method of %s instance' % classname(inst.__class__, mod) or ' unbound %s method' % classname(imclass, mod)) | def docroutine(self, object, name=None, mod=None, funcs={}, classes={}, methods={}, cl=None): """Produce HTML documentation for a function or method object.""" realname = object.__name__ name = name or realname anchor = (cl and cl.__name__ or '') + '-' + name note = '' skipdocs = 0 if inspect.ismethod(object): if cl: imclass = object.im_class if imclass is not cl: url = '%s.html#%s-%s' % ( imclass.__module__, imclass.__name__, name) note = ' from <a href="%s">%s</a>' % ( url, classname(imclass, mod)) skipdocs = 1 else: note = (object.im_self and ' method of %s instance' + object.im_self.__class__ or ' unbound %s method' % object.im_class.__name__) object = object.im_func | 6dcfa3884d3e4a6fe8dc57eec4d8df1980cda04e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6dcfa3884d3e4a6fe8dc57eec4d8df1980cda04e/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
22640,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
681,
33,
7036,
16,
15630,
28793,
3318,
28793,
2590,
28793,
927,
33,
7036,
4672,
3536,
25884,
3982,
7323,
364,
279,
445,
578,
707,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
22640,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
681,
33,
7036,
16,
15630,
28793,
3318,
28793,
2590,
28793,
927,
33,
7036,
4672,
3536,
25884,
3982,
7323,
364,
279,
445,
578,
707,
... |
datdb.add_dat(dat) | def dojob(self, nodedb, logger, prof, datdb, datq): k = self.glob.keyquery.pop() if self.finish: return node = nodedb[k.nodeid] if not node: node = o2on_node.Node(k.nodeid, k.ip, k.port) logger.log("DATQUERY","dat query %s to %s" % (hexlify(k.hash),hexlify(node.id))) try: dat = node.dat(k.hash, self.glob) except o2on_node.NodeRemovable: nodedb.remove(node) nodedb.save() self.glob.keydb.remove_bynodeid(node.id) self.glob.keydb.save() except o2on_node.NodeRefused: pass except socket.error, inst: logger.log("DATQUERY", inst) else: logger.popup("DATQUERY", "Got queried dat %s" % dat.path()) nodedb.add_node(node) datdb.add_dat(dat) nodedb.save() datdb.save() self.glob.keyquery.save() | 5b052763c85865a0cecf4fc4387633d001116964 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7857/5b052763c85865a0cecf4fc4387633d001116964/o2on_job.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
4688,
12,
2890,
16,
756,
1966,
16,
1194,
16,
9214,
16,
1150,
1966,
16,
1150,
85,
4672,
417,
273,
365,
18,
10581,
18,
856,
2271,
18,
5120,
1435,
309,
365,
18,
13749,
30,
327,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
4688,
12,
2890,
16,
756,
1966,
16,
1194,
16,
9214,
16,
1150,
1966,
16,
1150,
85,
4672,
417,
273,
365,
18,
10581,
18,
856,
2271,
18,
5120,
1435,
309,
365,
18,
13749,
30,
327,
756... | |
os.system(vaspcmd) | os.system(self.vaspcmd) | def start(self,analyzeOnly = False): | dc6dffdbc5b96ac80ca5dad8514783d0c6bb0a17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14536/dc6dffdbc5b96ac80ca5dad8514783d0c6bb0a17/convergencetest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
16,
304,
9508,
3386,
273,
1083,
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,
... | [
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,
787,
12,
2890,
16,
304,
9508,
3386,
273,
1083,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
with open(filename) as fp: statement = "exec(%r)" % (fp.read(),) | with open(filename, "rb") as fp: statement = "exec(compile(%r, %r, 'exec'))" % \ (fp.read(), self.mainpyfile) | def _runscript(self, filename): # The script has to run in __main__ namespace (or imports from # __main__ will break). # # So we clear up the __main__ and set several special variables # (this gets rid of pdb's globals and cleans old variables on restarts). import __main__ __main__.__dict__.clear() __main__.__dict__.update({"__name__" : "__main__", "__file__" : filename, "__builtins__": __builtins__, }) | fca7b16988ea3de0333c2203f94ca5327fbe20c1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/fca7b16988ea3de0333c2203f94ca5327fbe20c1/pdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2681,
4263,
12,
2890,
16,
1544,
4672,
468,
1021,
2728,
711,
358,
1086,
316,
1001,
5254,
972,
1981,
261,
280,
10095,
628,
468,
1001,
5254,
972,
903,
898,
2934,
468,
468,
6155,
732,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2681,
4263,
12,
2890,
16,
1544,
4672,
468,
1021,
2728,
711,
358,
1086,
316,
1001,
5254,
972,
1981,
261,
280,
10095,
628,
468,
1001,
5254,
972,
903,
898,
2934,
468,
468,
6155,
732,
... |
python23=getPythonHomeForVersion('2.3'), | python25=getPythonHomeForVersion('2.5'), | def lookupInnoHome(): """Try either version 5 or version 4""" fallback = r'C:\Program Files\Inno Setup 5' regkey = r'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall' _four = 'Inno Setup 4_is1' _five = 'Inno Setup 5_is1' _innohome = getValueFromReg(r'%s\%s' % (regkey, _five), "Inno Setup: App Path", None) if _innohome is None: _innohome = getValueFromReg(r'%s\%s' % (regkey, _four), "Inno Setup: App Path", None) if _innohome is None: return fallback else: return _innohome | 8f99f453beadd112d47468f3a8c3f392c5f03c95 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12595/8f99f453beadd112d47468f3a8c3f392c5f03c95/aapwin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3689,
382,
2135,
8684,
13332,
3536,
7833,
3344,
1177,
1381,
578,
1177,
1059,
8395,
5922,
273,
436,
11,
39,
5581,
9459,
6471,
64,
382,
2135,
10939,
1381,
11,
960,
856,
273,
436,
11,
3584,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3689,
382,
2135,
8684,
13332,
3536,
7833,
3344,
1177,
1381,
578,
1177,
1059,
8395,
5922,
273,
436,
11,
39,
5581,
9459,
6471,
64,
382,
2135,
10939,
1381,
11,
960,
856,
273,
436,
11,
3584,... |
if on == 1 and sn != 2: return self._fix_nan(context) if sn == 1 and on != 2: return other._fix_nan(context) | if on == 1 and sn == 0: return self._fix(context) if sn == 1 and on == 0: return other._fix(context) | def min_mag(self, other, context=None): """Compares the values numerically with their sign ignored.""" other = _convert_other(other, raiseit=True) | 20496fab6e0a86537543bcf9c27e44cbca2dc2df /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/20496fab6e0a86537543bcf9c27e44cbca2dc2df/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1131,
67,
4527,
12,
2890,
16,
1308,
16,
819,
33,
7036,
4672,
3536,
19199,
326,
924,
6389,
1230,
598,
3675,
1573,
5455,
12123,
1308,
273,
389,
6283,
67,
3011,
12,
3011,
16,
1002,
305,
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,
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,
1131,
67,
4527,
12,
2890,
16,
1308,
16,
819,
33,
7036,
4672,
3536,
19199,
326,
924,
6389,
1230,
598,
3675,
1573,
5455,
12123,
1308,
273,
389,
6283,
67,
3011,
12,
3011,
16,
1002,
305,
3... |
self.start(None, (lambda: videoNode.play(), | videoNode.play() seek(26) self.start(None, (lambda: self.compareImage("testVideoSeek0", False), | def seek(frame): videoNode.seekToFrame(frame) | 269e7be164fa8d6b8e2c2b9f05f5d1f47c1fd5c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7300/269e7be164fa8d6b8e2c2b9f05f5d1f47c1fd5c2/AVTest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6520,
12,
3789,
4672,
6191,
907,
18,
16508,
774,
3219,
12,
3789,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6520,
12,
3789,
4672,
6191,
907,
18,
16508,
774,
3219,
12,
3789,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
@expectedFailure | @unittest.expectedFailure | def testAssertEqual(self): equal_pairs = [ ((), ()), ({}, {}), ([], []), (set(), set()), (frozenset(), frozenset())] for a, b in equal_pairs: # This mess of try excepts is to test the assertEqual behavior # itself. try: self.assertEqual(a, b) except self.failureException: self.fail('assertEqual(%r, %r) failed' % (a, b)) try: self.assertEqual(a, b, msg='foo') except self.failureException: self.fail('assertEqual(%r, %r) with msg= failed' % (a, b)) try: self.assertEqual(a, b, 'foo') except self.failureException: self.fail('assertEqual(%r, %r) with third parameter failed' % (a, b)) | 6582b9b5a65f214cf780492cc2e6f760049db1c0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/6582b9b5a65f214cf780492cc2e6f760049db1c0/test_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
8213,
5812,
12,
2890,
4672,
3959,
67,
11545,
273,
306,
261,
9334,
1832,
3631,
13556,
16,
2618,
3631,
23265,
6487,
5378,
3631,
261,
542,
9334,
444,
1435,
3631,
261,
28138,
542,
9334,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8213,
5812,
12,
2890,
4672,
3959,
67,
11545,
273,
306,
261,
9334,
1832,
3631,
13556,
16,
2618,
3631,
23265,
6487,
5378,
3631,
261,
542,
9334,
444,
1435,
3631,
261,
28138,
542,
9334,
... |
"Save this song anyway?") % song("~basename") | "Save this song anyway?") %( util.escape(util.fsdecode(song("~basename")))) | def save_song(model, path, iter): song = model[path][0] row = model[path] changed = False if not song.valid() and not qltk.ConfirmAction( parent, _("Tag may not be accurate"), _("<b>%s</b> changed while the program was running. " "Saving without refreshing your library may " "overwrite other changes to the song.\n\n" "Save this song anyway?") % song("~basename") ).run(): return True | 3bb46a2b48c7498c4f0a63467f55f8d391063832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/3bb46a2b48c7498c4f0a63467f55f8d391063832/widgets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
67,
816,
75,
12,
2284,
16,
589,
16,
1400,
4672,
17180,
273,
938,
63,
803,
6362,
20,
65,
1027,
273,
938,
63,
803,
65,
3550,
273,
1083,
309,
486,
17180,
18,
877,
1435,
471,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
67,
816,
75,
12,
2284,
16,
589,
16,
1400,
4672,
17180,
273,
938,
63,
803,
6362,
20,
65,
1027,
273,
938,
63,
803,
65,
3550,
273,
1083,
309,
486,
17180,
18,
877,
1435,
471,
486,
... |
self.cmdloop() self.commands_defining = False self.prompt = prompt_back | try: self.cmdloop() finally: self.commands_defining = False self.prompt = prompt_back | def do_commands(self, arg): """Defines a list of commands associated to a breakpoint. | ebc81410629ce3639c56eb18d7add18de2f320e2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/ebc81410629ce3639c56eb18d7add18de2f320e2/pdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
7847,
12,
2890,
16,
1501,
4672,
3536,
15109,
279,
666,
434,
4364,
3627,
358,
279,
18820,
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,
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,
741,
67,
7847,
12,
2890,
16,
1501,
4672,
3536,
15109,
279,
666,
434,
4364,
3627,
358,
279,
18820,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.max_gap = abs(max_offset - min_offset) | self.max_gap = max_offset - min_offset if self.max_gap < 0: raise Exception, "crash!" | def set_time_slides(self, offsetdictlist): self.timeslides = offsetdictlist min_offset = min([min(timeslide.itervalues()) for timeslide in offsetdictlist]) max_offset = max([max(timeslide.itervalues()) for timeslide in offsetdictlist]) # largest gap that can conceivably be closed by the time # slides self.max_gap = abs(max_offset - min_offset) | 69866d56421b302c1276f750bf24cf85555eadc2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/69866d56421b302c1276f750bf24cf85555eadc2/ligolw_cafe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
957,
67,
2069,
4369,
12,
2890,
16,
1384,
1576,
1098,
4672,
365,
18,
8293,
80,
4369,
273,
1384,
1576,
1098,
1131,
67,
3348,
273,
1131,
3816,
1154,
12,
8293,
8130,
18,
2165,
237... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
957,
67,
2069,
4369,
12,
2890,
16,
1384,
1576,
1098,
4672,
365,
18,
8293,
80,
4369,
273,
1384,
1576,
1098,
1131,
67,
3348,
273,
1131,
3816,
1154,
12,
8293,
8130,
18,
2165,
237... |
scrolledwindow = textview.get_parent() va = scrolledwindow.get_vadjustment() bottom = va.value >= (va.upper - int(va.page_size*1.5)) buffer = textview.get_buffer() linenr = buffer.get_line_count() ME = 0 if line.startswith("* "): ME = 1 if NICOTINE.np.config.sections["logging"]["timestamps"] and showstamp: if timestamp_format and not timestamp: line = "%s %s\n" % (recode(time.strftime(timestamp_format)), line) elif timestamp_format and timestamp: line = "%s %s\n" % (recode(time.strftime(timestamp_format, time.localtime(timestamp))), line) else: line += "\n" match = URL_RE.search(line) while CATCH_URLS and match: start = line[:match.start()] url = match.group()[:-1] urltag = _makeurltag(buffer, tag, url) line = line[match.end()-1:] if USERNAMEHOTSPOTS and username != None and usertag != None and not ME: | def _usertag(buffer, line): if USERNAMEHOTSPOTS and username != None and usertag != None: | def _append(buffer, text, tag): iter = buffer.get_end_iter() | 78aed55165358d897aa2f05c276eaeb92c63f9ad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8738/78aed55165358d897aa2f05c276eaeb92c63f9ad/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6923,
12,
4106,
16,
977,
16,
1047,
4672,
1400,
273,
1613,
18,
588,
67,
409,
67,
2165,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
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,
389,
6923,
12,
4106,
16,
977,
16,
1047,
4672,
1400,
273,
1613,
18,
588,
67,
409,
67,
2165,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if PROFILE: | if PROFILE: | def buildChunk(self): PROFILE = False | d30e9692e8069f4ca8f6a777869c341be527891d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/d30e9692e8069f4ca8f6a777869c341be527891d/NanotubeGenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
5579,
12,
2890,
4672,
4629,
3776,
273,
1083,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
5579,
12,
2890,
4672,
4629,
3776,
273,
1083,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
parent_folder, | parent_ob, | def uploadLocations(self, file=None, dialect='comma', encoding='utf-8', approved=False, parent_folder='', geo_type='', REQUEST=None): """ """ errs = [] metadata = ['name', 'description', 'address', 'URL', 'latitude', 'longitude'] | abe9767061a105f400224a80f24e1c043b502446 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/abe9767061a105f400224a80f24e1c043b502446/GeoMapTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3617,
10985,
12,
2890,
16,
585,
33,
7036,
16,
10864,
2218,
25034,
2187,
2688,
2218,
3158,
17,
28,
2187,
20412,
33,
8381,
16,
982,
67,
5609,
2218,
2187,
7856,
67,
723,
2218,
2187,
12492,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3617,
10985,
12,
2890,
16,
585,
33,
7036,
16,
10864,
2218,
25034,
2187,
2688,
2218,
3158,
17,
28,
2187,
20412,
33,
8381,
16,
982,
67,
5609,
2218,
2187,
7856,
67,
723,
2218,
2187,
12492,
... |
data = orange.ExampleTable(r'../../doc/datasets/voting') | import os if os.path.isfile(r'../../doc/datasets/voting'): data = orange.ExampleTable(r'../../doc/datasets/voting') else: data = orange.ExampleTable('voting') | def dataset(self, data): if data and len(data.domain.attributes): self.data = orange.Preprocessor_discretize(data, method=orange.EquiNDiscretization(numberOfIntervals=5)) print self.data.domain self.classIntCB.setDisabled(self.data.domain.classVar == None) self.computeMatrix() else: self.send("Distance Matrix", None) | eb32759756c050422965662db401aa781cd7ad9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/eb32759756c050422965662db401aa781cd7ad9f/OWAttributeDistance.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3709,
12,
2890,
16,
501,
4672,
309,
501,
471,
562,
12,
892,
18,
4308,
18,
4350,
4672,
365,
18,
892,
273,
578,
726,
18,
1386,
8700,
67,
2251,
71,
1349,
554,
12,
892,
16,
707,
33,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3709,
12,
2890,
16,
501,
4672,
309,
501,
471,
562,
12,
892,
18,
4308,
18,
4350,
4672,
365,
18,
892,
273,
578,
726,
18,
1386,
8700,
67,
2251,
71,
1349,
554,
12,
892,
16,
707,
33,
28... |
if level < self.NO_LOG: level = self.NO_LOG | if level < self.NOTHING: level = self.NOTHING | def setLogLevel(self, level): """ Set log level [NOTHING .. INFO_MAX] """ if level < self.NO_LOG: level = self.NO_LOG if level > self.INFO_MAX: level = self.INFO_MAX self._level = level | 6a78248049174b40d3b35094614062acc2a97f86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/6a78248049174b40d3b35094614062acc2a97f86/logger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
21806,
12,
2890,
16,
1801,
4672,
3536,
1000,
613,
1801,
306,
4400,
44,
1360,
6116,
9286,
67,
6694,
65,
3536,
309,
1801,
411,
365,
18,
4400,
44,
1360,
30,
1801,
273,
365,
18,
4400,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21806,
12,
2890,
16,
1801,
4672,
3536,
1000,
613,
1801,
306,
4400,
44,
1360,
6116,
9286,
67,
6694,
65,
3536,
309,
1801,
411,
365,
18,
4400,
44,
1360,
30,
1801,
273,
365,
18,
4400,... |
running = 0 | running = offset | def _generate_text(self): serializer = Serializer(self._oeb, self._images) breaks = serializer.breaks text = serializer.text self._text_length = len(text) text = StringIO(text) nrecords = 0 offset = 0 data = text.read(RECORD_SIZE) while len(data) > 0: if self._compress == PALMDOC: data = compress_doc(data) # Without the NUL Mobipocket Desktop 6.2 will thrash. Why? record = [data, '\0'] nextra = 0 pbreak = 0 running = 0 while breaks and (breaks[0] - offset) < RECORD_SIZE: pbreak = (breaks.pop(0) - running) >> 3 record.append(decint(pbreak)) running += pbreak << 3 nextra += 1 record.append(decint(nextra + 1)) self._records.append(''.join(record)) nrecords += 1 offset += RECORD_SIZE data = text.read(RECORD_SIZE) self._text_nrecords = nrecords | cc0185ba929a38e4038f7ca89c4e7c5923b5c396 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/cc0185ba929a38e4038f7ca89c4e7c5923b5c396/writer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7163,
67,
955,
12,
2890,
4672,
6340,
273,
15348,
12,
2890,
6315,
15548,
70,
16,
365,
6315,
7369,
13,
16217,
273,
6340,
18,
29292,
977,
273,
6340,
18,
955,
365,
6315,
955,
67,
2469... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7163,
67,
955,
12,
2890,
4672,
6340,
273,
15348,
12,
2890,
6315,
15548,
70,
16,
365,
6315,
7369,
13,
16217,
273,
6340,
18,
29292,
977,
273,
6340,
18,
955,
365,
6315,
955,
67,
2469... |
import fcntl | try: import fcntl except ImportError: raise NotImplementedError("set_nonblocking() on a file object " "with no setblocking() method " "(Windows pipes don't support non-blocking I/O)") | def set_nonblocking(fd): try: setblocking = fd.setblocking except AttributeError: # This version of Python predates socket.setblocking() import fcntl fileno = fd.fileno() flags = fcntl.fcntl(fileno, fcntl.F_GETFL) fcntl.fcntl(fileno, fcntl.F_SETFL, flags | os.O_NONBLOCK) else: # socket supports setblocking() setblocking(0) | a868b1c857e43d538e3d613919df67f49b846eb8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10078/a868b1c857e43d538e3d613919df67f49b846eb8/greenio.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
5836,
18926,
12,
8313,
4672,
775,
30,
444,
18926,
273,
5194,
18,
542,
18926,
1335,
6394,
30,
468,
1220,
1177,
434,
6600,
3479,
815,
2987,
18,
542,
18926,
1435,
565,
775,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
5836,
18926,
12,
8313,
4672,
775,
30,
444,
18926,
273,
5194,
18,
542,
18926,
1335,
6394,
30,
468,
1220,
1177,
434,
6600,
3479,
815,
2987,
18,
542,
18926,
1435,
565,
775,
30,
1... |
def __exc_info(self): | def _exc_info(self): | def __exc_info(self): """Return a version of sys.exc_info() with the traceback frame minimised; usually the top level of the traceback frame is not needed. """ exctype, excvalue, tb = sys.exc_info() if sys.platform[:4] == 'java': ## tracebacks look different in Jython return (exctype, excvalue, tb) return (exctype, excvalue, tb) | b66ad788444c7f79115e9d6749906c4511b216dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b66ad788444c7f79115e9d6749906c4511b216dd/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10075,
67,
1376,
12,
2890,
4672,
3536,
990,
279,
1177,
434,
2589,
18,
10075,
67,
1376,
1435,
598,
326,
10820,
2623,
18172,
5918,
31,
11234,
326,
1760,
1801,
434,
326,
10820,
2623,
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,
389,
10075,
67,
1376,
12,
2890,
4672,
3536,
990,
279,
1177,
434,
2589,
18,
10075,
67,
1376,
1435,
598,
326,
10820,
2623,
18172,
5918,
31,
11234,
326,
1760,
1801,
434,
326,
10820,
2623,
3... |
tags, status, False, started_only, is_root) | tags_obj, status, False, started_only, is_root) | def get_task_ids_filtered(self, tags, status, started_only, is_root): # Retrieve a list of task IDs filtered by specified parameters ids = self.req.get_tasks_list( tags, status, False, started_only, is_root) # If there are no matching tasks, return an empty D-Bus array return ids if ids else dbus.Array([], "s") | 6b8c787c33618bb25f541c462aebd0cca1e2a640 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/6b8c787c33618bb25f541c462aebd0cca1e2a640/dbuswrapper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4146,
67,
2232,
67,
12071,
12,
2890,
16,
2342,
16,
1267,
16,
5746,
67,
3700,
16,
353,
67,
3085,
4672,
468,
10708,
279,
666,
434,
1562,
7115,
5105,
635,
1269,
1472,
3258,
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,
336,
67,
4146,
67,
2232,
67,
12071,
12,
2890,
16,
2342,
16,
1267,
16,
5746,
67,
3700,
16,
353,
67,
3085,
4672,
468,
10708,
279,
666,
434,
1562,
7115,
5105,
635,
1269,
1472,
3258,
273,
... |
def __patch_unapplied(self, name): | def patch_unapplied(self, name): | def __patch_unapplied(self, name): """Return true if the patch exists in the unapplied list """ return name in self.get_unapplied() | ed0350be88dca8315cf7b32e88972306aae4f700 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/ed0350be88dca8315cf7b32e88972306aae4f700/stack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
67,
318,
438,
3110,
12,
2890,
16,
508,
4672,
3536,
990,
638,
309,
326,
4729,
1704,
316,
326,
640,
438,
3110,
666,
3536,
327,
508,
316,
365,
18,
588,
67,
318,
438,
3110,
1435,
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,
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,
4729,
67,
318,
438,
3110,
12,
2890,
16,
508,
4672,
3536,
990,
638,
309,
326,
4729,
1704,
316,
326,
640,
438,
3110,
666,
3536,
327,
508,
316,
365,
18,
588,
67,
318,
438,
3110,
1435,
2... |
return AUC_i([res], classIndex, useWeights) | return AUC_i( res, classIndex, useWeights)[0] | def AUC_single(res, classIndex = -1, useWeights = True): if classIndex<0: if res.baseClass>=0: classIndex = res.baseClass else: classIndex = 1 if res.numberOfIterations > 1: return AUC_iterations(AUC_i, splitByIterations(res), (classIndex, useWeights, res, res.numberOfIterations)) else: return AUC_i([res], classIndex, useWeights) | bc5c0af27a44b052f394d4024b1794a6748315a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/bc5c0af27a44b052f394d4024b1794a6748315a8/orngStat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
432,
17479,
67,
7526,
12,
455,
16,
667,
1016,
273,
300,
21,
16,
999,
16595,
273,
1053,
4672,
309,
667,
1016,
32,
20,
30,
309,
400,
18,
1969,
797,
34,
33,
20,
30,
667,
1016,
273,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
432,
17479,
67,
7526,
12,
455,
16,
667,
1016,
273,
300,
21,
16,
999,
16595,
273,
1053,
4672,
309,
667,
1016,
32,
20,
30,
309,
400,
18,
1969,
797,
34,
33,
20,
30,
667,
1016,
273,
40... |
name = rep[0].strip().lower() | name = rep[0].strip() | def expand_sub(substr,extra=''): global _names, _thissub # find all named replacements reps = named_re.findall(substr) _names = {} _names.update(_special_names) numsubs = None for rep in reps: name = rep[0].strip().lower() thelist = conv(rep[1]) _names[name] = thelist substr = named_re.sub(r"<\1>",substr) # get rid of definition templates substr = list_re.sub(listrepl, substr) # convert all lists to named templates # newnames are constructed as needed # make lists out of string entries in name dictionary for name in _names.keys(): entry = _names[name] entrylist = entry.split(',') _names[name] = entrylist num = len(entrylist) if numsubs is None: numsubs = num elif (numsubs != num): raise ValueError, "Mismatch in number to replace" # now replace all keys for each of the lists mystr = '' for k in range(numsubs): _thissub = k mystr += template_re.sub(namerepl, substr) mystr += "\n\n" + extra return mystr | f42b743431beed95b0b354e091133b66aecd50f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/f42b743431beed95b0b354e091133b66aecd50f0/from_template.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4542,
67,
1717,
12,
10706,
16,
7763,
2218,
11,
4672,
2552,
389,
1973,
16,
389,
451,
1054,
373,
468,
1104,
777,
4141,
11413,
283,
1121,
273,
4141,
67,
266,
18,
4720,
454,
12,
10706,
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,
4542,
67,
1717,
12,
10706,
16,
7763,
2218,
11,
4672,
2552,
389,
1973,
16,
389,
451,
1054,
373,
468,
1104,
777,
4141,
11413,
283,
1121,
273,
4141,
67,
266,
18,
4720,
454,
12,
10706,
13,... |
assert nbands > 0 'Error: Number of bands (nbands) not set' assert ecut is not None 'Error: Planewave cutoff energy in eV (ecut) not set' | if not nbands > 0: raise ValueError('Number of bands (nbands) not set') if ecut is None: raise ValueError('Planewave cutoff energy in eV (ecut) not set') | def __init__(self, label='abinit', xc='LDA', kpts=None, nbands=0, width=0.04*Hartree, ecut=None, charge=0, pulay=5, mix=0.1, pps='fhi' ): """Construct ABINIT-calculator object. | 4e1204fe94459c1f8ab931c68b75f7693576de96 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5572/4e1204fe94459c1f8ab931c68b75f7693576de96/abinit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1433,
2218,
378,
2738,
2187,
15192,
2218,
48,
9793,
2187,
417,
1092,
33,
7036,
16,
4264,
5708,
33,
20,
16,
1835,
33,
20,
18,
3028,
14,
44,
485,
992,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1433,
2218,
378,
2738,
2187,
15192,
2218,
48,
9793,
2187,
417,
1092,
33,
7036,
16,
4264,
5708,
33,
20,
16,
1835,
33,
20,
18,
3028,
14,
44,
485,
992,
16... |
while (tokenizer.match(EQ) || tokenizer.match(NE) || tokenizer.match(STRICT_EQ) || tokenizer.match(STRICT_NE)) { | while (tokenizer.match(EQ) or tokenizer.match(NE) || tokenizer.match(STRICT_EQ) or tokenizer.match(STRICT_NE)) { | def EqualityExpression(tokenizer, compilerContext) { var node, childNode var builder = compilerContext.builder | 58afad4d3cade0a037f53f0a04cb23589df417b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/58afad4d3cade0a037f53f0a04cb23589df417b1/Parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9057,
560,
2300,
12,
2316,
1824,
16,
5274,
1042,
13,
288,
569,
756,
16,
9465,
569,
2089,
273,
5274,
1042,
18,
9574,
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,
9057,
560,
2300,
12,
2316,
1824,
16,
5274,
1042,
13,
288,
569,
756,
16,
9465,
569,
2089,
273,
5274,
1042,
18,
9574,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
register("windows-default", WindowsDefault) | def open(self, url, new=0, autoraise=1): os.startfile(url) return True # Oh, my... | 8f06d02935939629209b303a8ec54cf2db0cc302 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/8f06d02935939629209b303a8ec54cf2db0cc302/webbrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
880,
16,
394,
33,
20,
16,
2059,
10610,
784,
33,
21,
4672,
1140,
18,
1937,
768,
12,
718,
13,
327,
1053,
468,
531,
76,
16,
3399,
2777,
2,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1696,
12,
2890,
16,
880,
16,
394,
33,
20,
16,
2059,
10610,
784,
33,
21,
4672,
1140,
18,
1937,
768,
12,
718,
13,
327,
1053,
468,
531,
76,
16,
3399,
2777,
2,
-100,
-100,
-100,
-100,
... | |
self._modname = _getModName() | try: self._modname = _getModName() except: pass | def __init__(self, klass = None, superClasses = (), dict = {}): self._modname = _getModName() self._klass = klass self._superClasses = superClasses self._dict = dict | 1a6bfe00ef4cd6144b3e3c59732db5407d4b588b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/1a6bfe00ef4cd6144b3e3c59732db5407d4b588b/static.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
7352,
273,
599,
16,
2240,
4818,
273,
1832,
16,
2065,
273,
2618,
4672,
775,
30,
365,
6315,
1711,
529,
273,
389,
588,
1739,
461,
1435,
1335,
30,
1342,
365,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
7352,
273,
599,
16,
2240,
4818,
273,
1832,
16,
2065,
273,
2618,
4672,
775,
30,
365,
6315,
1711,
529,
273,
389,
588,
1739,
461,
1435,
1335,
30,
1342,
365,... |
[ 1 0 0 0 0] [ 0 -1/2 sqrt(3)/2 0 0] [ 0 sqrt(3)/2 1/2 0 0] [ 0 0 0 -1/2 sqrt(3)/2] [ 0 0 0 sqrt(3)/2 1/2] | [ 1 0 0 0 0] [ 0 -1/2 1/2*sqrt(3) 0 0] [ 0 1/2*sqrt(3) 1/2 0 0] [ 0 0 0 -1/2 1/2*sqrt(3)] [ 0 0 0 1/2*sqrt(3) 1/2] | def SymmetricGroupRepresentation(partition, implementation="specht", ring=None, cache_matrices=True): r""" The irreducible representation of the symmetric group corresponding to ``partition``. INPUT: - ``partition`` - a partition of a positive integer - ``implementation`` - string (default: "specht"), one of: - "seminormal": for Young's seminormal representation - "orthogonal": for Young's orthogonal representation - "specht": for Specht's representation - ``ring`` - the ring over which the representation is defined. - ``cache_matrices`` - boolean (default: True) if True, then any representation matrices that are computed are cached. EXAMPLES: Young's orthogonal representation: the matrices are orthogonal. :: sage: orth = SymmetricGroupRepresentation([2,1], "orthogonal"); orth Orthogonal representation of the symmetric group corresponding to [2, 1] sage: all(a*a.transpose() == a.parent().identity_matrix() for a in orth) True :: sage: orth = SymmetricGroupRepresentation([3,2], "orthogonal"); orth Orthogonal representation of the symmetric group corresponding to [3, 2] sage: orth([2,1,3,4,5]) [ 1 0 0 0 0] [ 0 1 0 0 0] [ 0 0 -1 0 0] [ 0 0 0 1 0] [ 0 0 0 0 -1] sage: orth([1,3,2,4,5]) [ 1 0 0 0 0] [ 0 -1/2 sqrt(3)/2 0 0] [ 0 sqrt(3)/2 1/2 0 0] [ 0 0 0 -1/2 sqrt(3)/2] [ 0 0 0 sqrt(3)/2 1/2] sage: orth([1,2,4,3,5]) [ -1/3 2*sqrt(2)/3 0 0 0] [2*sqrt(2)/3 1/3 0 0 0] [ 0 0 1 0 0] [ 0 0 0 1 0] [ 0 0 0 0 -1] The Specht Representation:: sage: spc = SymmetricGroupRepresentation([3,2], "specht") sage: spc.scalar_product_matrix(Permutation([1,2,3,4,5])) [ 1 0 0 0 0] [ 0 -1 0 0 0] [ 0 0 1 0 0] [ 0 0 0 1 0] [-1 0 0 0 -1] sage: spc.scalar_product_matrix(Permutation([5,4,3,2,1])) [ 1 -1 0 1 0] [ 0 0 1 0 -1] [ 0 0 0 -1 1] [ 0 1 -1 -1 1] [-1 0 0 0 -1] sage: spc([5,4,3,2,1]) [ 1 -1 0 1 0] [ 0 0 -1 0 1] [ 0 0 0 -1 1] [ 0 1 -1 -1 1] [ 0 1 0 -1 1] sage: spc.verify_representation() True By default, any representation matrices that are computed are cached:: sage: spc = SymmetricGroupRepresentation([3,2], "specht") sage: spc([5,4,3,2,1]) [ 1 -1 0 1 0] [ 0 0 -1 0 1] [ 0 0 0 -1 1] [ 0 1 -1 -1 1] [ 0 1 0 -1 1] sage: spc._cache__representation_matrix {(([5, 4, 3, 2, 1],), ()): [ 1 -1 0 1 0] [ 0 0 -1 0 1] [ 0 0 0 -1 1] [ 0 1 -1 -1 1] [ 0 1 0 -1 1]} This can be turned off with the keyword cache_matrices:: sage: spc = SymmetricGroupRepresentation([3,2], "specht", cache_matrices=False) sage: spc([5,4,3,2,1]) [ 1 -1 0 1 0] [ 0 0 -1 0 1] [ 0 0 0 -1 1] [ 0 1 -1 -1 1] [ 0 1 0 -1 1] sage: hasattr(spc, '_cache__representation_matrix') False NOTES: The implementation is based on the paper [Las]. REFERENCES: - [Las] Alain Lascoux, `Young representations of the symmetric group <http://phalanstere.univ-mlv.fr/~al/ARTICLES/ProcCrac.ps.gz/>`_. AUTHORS: - Franco Saliola (2009-04-23) """ partition = Partition(partition) if implementation == "seminormal": return YoungRepresentation_Seminormal(partition, ring=ring, cache_matrices=cache_matrices) elif implementation == "orthogonal": return YoungRepresentation_Orthogonal(partition, ring=ring, cache_matrices=cache_matrices) elif implementation == "specht": return SpechtRepresentation(partition, ring=ring, cache_matrices=cache_matrices) else: raise NotImplementedError, "only seminormal, orthogonal and specht are implemented" | 60d8431a4f42ed74a1bfe2618af37a3a9ee9dc9c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/60d8431a4f42ed74a1bfe2618af37a3a9ee9dc9c/symmetric_group_representations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10042,
6899,
1114,
13742,
12,
10534,
16,
4471,
1546,
87,
347,
343,
88,
3113,
9221,
33,
7036,
16,
1247,
67,
7373,
12660,
33,
5510,
4672,
436,
8395,
1021,
9482,
1118,
5286,
1523,
4335,
434... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10042,
6899,
1114,
13742,
12,
10534,
16,
4471,
1546,
87,
347,
343,
88,
3113,
9221,
33,
7036,
16,
1247,
67,
7373,
12660,
33,
5510,
4672,
436,
8395,
1021,
9482,
1118,
5286,
1523,
4335,
434... |
if edje_obj.data_get('attribute1') != None: attribute = edje_obj.data_get('attribute1') if edje_obj.data_get('attribute2') != None: item_cp = getattr(item,attribute) attribute = edje_obj.data_get('attribute2') else: item_cp = item if edje_obj.data_get('value') == 'None': value = None else: value = edje_obj.data_get('value') signal = edje_obj.data_get('signal') if attribute[-2] == "(": test = getattr(item_cp,attribute[:-2])() else: test = getattr(item_cp,attribute) if test == value: edje_obj.signal_emit(signal,'*') ly.size_hint_min_set(470,100) self.box.elm_obj.pack_end(ly) ly.show() self.items.append([item,edje_obj,ly]) edje_obj.signal_callback_add("*", "list_command", self.signal_send_others, [item,edje_obj,ly]) self.parent.scroller.elm_obj.content_set(self.box.elm_obj) self.box.elm_obj.show() self.parent.scroller.elm_obj.show() self._renew_callbacks() def _renew_callbacks(self, *args, **kargs): logger.info("renewing callbacks") for cb in self.callbacks: for i in self.items: i[1].signal_callback_add(cb[0], cb[1] , cb[2], i) def sort(self,*args,**kargs): logger.debug("list sorting") self.model.sort(self._comp_fct) def _remove_cb(self, *args, **kargs): logger.debug('window removed, removing cb') for i in self.cb_list : try: self.model.disconnect(i) except Exception, e: logger.debug("ooops wrong oid") def _modified(self, *args, **kargs): logger.info('scrolled') logger.info(args) logger.info(kargs) def add_callback(self, signal, source, func): self.callbacks.append([signal, source, func]) for i in self.items: i[1].signal_callback_add(signal, source , func, i) def signal_send_others(self, emission, signal, source, item): for i in self.items: if i != item: i[1].signal_emit(signal, "list") def signal_send(self, signal, source): for i in self.items: i[1].signal_emit(signal, source) def _remove_item(self, list, removed_item): logger.info('remove called') for item in self.items: if item[0] is removed_item: index = item item[2].remove_all() self.items.remove(index) self._redraw_box() def jump_to_index(self, *args, **kargs): if self.LetterDict: key = args[2] if self.letter_index.has_key(key): position = self.letter_index[key] point_y = 100 * int(position) if hasattr(self.parent.scroller.elm_obj, 'region_show'): self.parent.scroller.elm_obj.region_show(0, point_y, 480, 60) else: logger.info("scroller doesn't have method bounce_set please update your bindings") edje = self.parent.main_layout.elm_obj.edje_get() edje.signal_emit( "close-dict", "dict-button") else: logger.info("this list does not carry a dict, this call does not work here") | if edje_obj.data_get('attribute1') != None: attribute = edje_obj.data_get('attribute1') if edje_obj.data_get('attribute2') != None: item_cp = getattr(item,attribute) attribute = edje_obj.data_get('attribute2') else: item_cp = item if edje_obj.data_get('value') == 'None': value = None else: value = edje_obj.data_get('value') signal = edje_obj.data_get('signal') if attribute[-2] == "(": test = getattr(item_cp,attribute[:-2])() else: test = getattr(item_cp,attribute) if test == value: edje_obj.signal_emit(signal,'*') ly.size_hint_min_set(470,100) self.box.elm_obj.pack_end(ly) ly.show() self.items.append([item,edje_obj,ly]) edje_obj.signal_callback_add("*", "list_command", self.signal_send_others, [item,edje_obj,ly]) self.parent.scroller.elm_obj.content_set(self.box.elm_obj) self.box.elm_obj.show() self.parent.scroller.elm_obj.show() self._renew_callbacks() def _renew_callbacks(self, *args, **kargs): logger.info("renewing callbacks") for cb in self.callbacks: for i in self.items: i[1].signal_callback_add(cb[0], cb[1] , cb[2], i) def sort(self,*args,**kargs): logger.debug("list sorting") self.model.sort(self._comp_fct) def _remove_cb(self, *args, **kargs): logger.debug('window removed, removing cb') for i in self.cb_list : try: self.model.disconnect(i) except Exception, e: logger.debug("ooops wrong oid") def _modified(self, *args, **kargs): logger.info('scrolled') logger.info(args) logger.info(kargs) def add_callback(self, signal, source, func): self.callbacks.append([signal, source, func]) for i in self.items: i[1].signal_callback_add(signal, source , func, i) def signal_send_others(self, emission, signal, source, item): for i in self.items: if i != item: i[1].signal_emit(signal, "list") def signal_send(self, signal, source): for i in self.items: i[1].signal_emit(signal, source) def _remove_item(self, list, removed_item): logger.info('remove called') for item in self.items: if item[0] is removed_item: index = item item[2].remove_all() self.items.remove(index) self._redraw_box() def jump_to_index(self, *args, **kargs): if self.LetterDict: key = args[2] if self.letter_index.has_key(key): position = self.letter_index[key] point_y = 100 * int(position) if hasattr(self.parent.scroller.elm_obj, 'region_show'): self.parent.scroller.elm_obj.region_show(0, point_y, 480, 60) else: logger.info("scroller doesn't have method bounce_set please update your bindings") edje = self.parent.main_layout.elm_obj.edje_get() edje.signal_emit( "close-dict", "dict-button") else: logger.info("this list does not carry a dict, this call does not work here") | def _redraw_view(self, *args, **kargs): #logger.info("list redrawing") if self.Elm_win.elm_obj.is_deleted() == True: self._remove_cb() else: self.sort() if self.box.elm_obj.is_deleted() == False: self.box.elm_obj.delete() self.box = elm_box(self.Elm_win.elm_obj) self.items = [] self.letter_index = {} #self.model.sort() for item in self.model: if self.Elm_win.elm_obj.is_deleted() == True: logger.info(str(self.model)) logger.info("window deleted") ly = elementary.Layout(self.Elm_win.elm_obj) ly.file_set(self.EdjeFile, self.EdjeGroup) edje_obj = ly.edje_get() for part, attribute in self.label_list: if hasattr(item, attribute): value = getattr(item, attribute) if self.LetterDict: if self.label_list.index((part, attribute)) == 0: if self.letter_index.has_key(value[0]) == False: self.letter_index[value[0]] = self.model.index(item) if isinstance(value, tichy.Item): value = unicode(value.get_text()) elif isinstance(value, tichy.Text): value = value.value txt = unicode(value).encode('utf-8') edje_obj.part_text_set(part,txt) else: logger.info(" %s doesn't have attribute %s", str(item), str(attribute)) ##check for optional display elements if edje_obj.data_get('attribute1') != None: attribute = edje_obj.data_get('attribute1') if edje_obj.data_get('attribute2') != None: item_cp = getattr(item,attribute) attribute = edje_obj.data_get('attribute2') else: item_cp = item if edje_obj.data_get('value') == 'None': value = None else: value = edje_obj.data_get('value') signal = edje_obj.data_get('signal') if attribute[-2] == "(": test = getattr(item_cp,attribute[:-2])() else: test = getattr(item_cp,attribute) if test == value: edje_obj.signal_emit(signal,'*') | ce6932d37d71011a839f1aaf21e0b91c574f288b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/ce6932d37d71011a839f1aaf21e0b91c574f288b/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1118,
1899,
67,
1945,
12,
2890,
16,
380,
1968,
16,
2826,
79,
1968,
4672,
468,
4901,
18,
1376,
2932,
1098,
16540,
310,
7923,
309,
365,
18,
28439,
67,
8082,
18,
19597,
67,
2603,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1118,
1899,
67,
1945,
12,
2890,
16,
380,
1968,
16,
2826,
79,
1968,
4672,
468,
4901,
18,
1376,
2932,
1098,
16540,
310,
7923,
309,
365,
18,
28439,
67,
8082,
18,
19597,
67,
2603,
18,... |
class PyShell(MultiEditorWindow): | class PyShell(PyShellEditorWindow): | def write(self, s): # Override base class write self.tkconsole.console.write(s) | 3234e7ce4d8ada9532edd8d8e980dc0078adc73a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/3234e7ce4d8ada9532edd8d8e980dc0078adc73a/PyShell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
272,
4672,
468,
1439,
1026,
667,
1045,
365,
18,
16099,
8698,
18,
8698,
18,
2626,
12,
87,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
272,
4672,
468,
1439,
1026,
667,
1045,
365,
18,
16099,
8698,
18,
8698,
18,
2626,
12,
87,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
nbins = np.ceil((max(all_isi) - min(all_isi)) / bin_size) | nbins = np.ceil(all_isi.max() / bin_size) | def calc_isih(spike_trains, bin_size=1, trial_num=None): """ Calculate inter-spike interval histogram. >>> spikes = [np.array([1,2,3]), np.array([2,5,8])] >>> calc_isih(spikes) (array([ 1., 1.]), array([ 1., 2., 3.])) """ isi_trains = [ np.diff(train) for train in spike_trains ] all_isi = np.concatenate(isi_trains) if len(all_isi) < 2: return np.array([]), np.array([]) nbins = np.ceil((max(all_isi) - min(all_isi)) / bin_size) if nbins == 0: # just in case of two equal spikes nbins = 1 values, bins = np.histogram(all_isi, nbins) # Normalize values if trial_num == None: trial_num = len(spike_trains) # values = values / bin_size / trial_num values = values / trial_num return values, bins | 41719d53d2dae035c53fd06c7f97fb3b39c79d75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7039/41719d53d2dae035c53fd06c7f97fb3b39c79d75/_thorns.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
291,
7392,
12,
1752,
2547,
67,
313,
4167,
16,
4158,
67,
1467,
33,
21,
16,
12950,
67,
2107,
33,
7036,
4672,
3536,
9029,
1554,
17,
1752,
2547,
3673,
8892,
18,
225,
4080,
1694,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
291,
7392,
12,
1752,
2547,
67,
313,
4167,
16,
4158,
67,
1467,
33,
21,
16,
12950,
67,
2107,
33,
7036,
4672,
3536,
9029,
1554,
17,
1752,
2547,
3673,
8892,
18,
225,
4080,
1694,
... |
target_dir = os.path.join(self.build_src, os.path.dirname(base)) | target_dir = appendpath(self.build_src, os.path.dirname(base)) | def f2py_sources(self, sources, extension): new_sources = [] f2py_sources = [] f_sources = [] f2py_targets = {} target_dirs = [] ext_name = extension.name.split('.')[-1] skip_f2py = 0 | 5d0f8564be3eefd37a562b35d3a0633bb59c2503 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/5d0f8564be3eefd37a562b35d3a0633bb59c2503/build_src.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
22,
2074,
67,
10141,
12,
2890,
16,
5550,
16,
2710,
4672,
394,
67,
10141,
273,
5378,
284,
22,
2074,
67,
10141,
273,
5378,
284,
67,
10141,
273,
5378,
284,
22,
2074,
67,
11358,
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,
284,
22,
2074,
67,
10141,
12,
2890,
16,
5550,
16,
2710,
4672,
394,
67,
10141,
273,
5378,
284,
22,
2074,
67,
10141,
273,
5378,
284,
67,
10141,
273,
5378,
284,
22,
2074,
67,
11358,
273,
... |
print dir(input) print input.type, self.wps.inputs | def _lineageComplexInput(self, input, complexInput): """ Fill input of complex data """ print dir(input) print input.type, self.wps.inputs complexInput["complexdata"] = input.value complexInput["encoding"] = input.format["encoding"] complexInput["mimetype"] = input.format["mimeType"] complexInput["schema"] = input.format["schema"] return complexInput | 2a2473f9c958a19a8341398fac63be0d657f3370 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10967/2a2473f9c958a19a8341398fac63be0d657f3370/Execute.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1369,
410,
12795,
1210,
12,
2890,
16,
810,
16,
7233,
1210,
4672,
3536,
14192,
810,
434,
7233,
501,
3536,
7233,
1210,
9614,
14259,
892,
11929,
273,
810,
18,
1132,
7233,
1210,
9614,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1369,
410,
12795,
1210,
12,
2890,
16,
810,
16,
7233,
1210,
4672,
3536,
14192,
810,
434,
7233,
501,
3536,
7233,
1210,
9614,
14259,
892,
11929,
273,
810,
18,
1132,
7233,
1210,
9614,
5... | |
self.show_notification ( _("USB device %s mounted. Ready for use." %(device)) ) | self.show_notification ( _("USB device %s mounted. Ready for use.") %(devid) ) | def update_usb(self, *args): #print_debug ("update_usb()") data=args[0] action=data['ACTION'] device="/dev/%s" %data['DEVPATH'].split('/')[2] if( len( data['DEVPATH'].split('/') ) ) > 3: devid=data['DEVPATH'].split('/')[3] else: devid=data['DEVPATH'].split('/')[2] if action == "umount": self.show_notification ( _("USB device %s umounted. You can extract it." %(device)) ) if action == "mount": self.show_notification ( _("USB device %s mounted. Ready for use." %(device)) ) usb_status=self.xmlrpc.GetDevicesInfo(device, mode="--getstatus").replace('\n','') if usb_status == "0": ismounted=False n=1 else: ismounted=True n=2 print_debug ("update_usb() usb devid=%s ismounted=%s" %(devid, ismounted) ) #self.systray.items["usb_"%devid][1]="usb%s.png"%n self.systray.update_status("usb_%s"%devid, "usb_%s_mount"%devid, not ismounted) self.systray.update_status("usb_%s"%devid, "usb_%s_umount"%devid, ismounted) | 6b6b277d324dc98aca42c94ca02b2cc81f5f4535 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13520/6b6b277d324dc98aca42c94ca02b2cc81f5f4535/tcos-devices-ng.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
25525,
12,
2890,
16,
380,
1968,
4672,
468,
1188,
67,
4148,
7566,
2725,
67,
25525,
1435,
7923,
501,
33,
1968,
63,
20,
65,
1301,
33,
892,
3292,
12249,
3546,
2346,
1546,
19,
520... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
25525,
12,
2890,
16,
380,
1968,
4672,
468,
1188,
67,
4148,
7566,
2725,
67,
25525,
1435,
7923,
501,
33,
1968,
63,
20,
65,
1301,
33,
892,
3292,
12249,
3546,
2346,
1546,
19,
520... |
<form name="add_group" action="%(action)s" method="POST"> | <form name="add_group" action="%(action)s" method="post"> | def tmpl_add_group(self, bskid, selected_topic, groups=[], ln=cdslang): """ return form for selection of groups. @param bskid: basket id (int) @param selected_topic: topic currently displayed (int) @param groups: list of tuples (group id, group name) @param ln: language """ _ = gettext_set_language(ln) if len(groups): groups_body = """ | 0a2abb726af10679038485a34dbc4ac26d70217f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/0a2abb726af10679038485a34dbc4ac26d70217f/webbasket_templates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
1289,
67,
1655,
12,
2890,
16,
7081,
79,
350,
16,
3170,
67,
10476,
16,
3252,
22850,
6487,
7211,
33,
4315,
2069,
539,
4672,
3536,
327,
646,
364,
4421,
434,
3252,
18,
632,
891,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
1289,
67,
1655,
12,
2890,
16,
7081,
79,
350,
16,
3170,
67,
10476,
16,
3252,
22850,
6487,
7211,
33,
4315,
2069,
539,
4672,
3536,
327,
646,
364,
4421,
434,
3252,
18,
632,
891,... |
valdoc = package_doc.variables[name].value if (valdoc not in (None, UNKNOWN) and valdoc.imported_from != dotted_name): | vardoc = package_doc.variables[name] if (vardoc.value not in (None, UNKNOWN) and vardoc.imported_from != dotted_name): | def _get_module_name(filename, package_doc): """ Return (dotted_name, is_package) """ name = re.sub(r'.py\w?$', '', os.path.split(filename)[1]) if name == '__init__': is_package = True name = os.path.split(os.path.split(filename)[0])[1] else: is_package = False # [XX] if the module contains a script, then `name` may not # necessarily be a valid identifier -- which will cause # DottedName to raise an exception. Is that what I want? if package_doc is None: dotted_name = DottedName(name) else: dotted_name = DottedName(package_doc.canonical_name, name) # Check if the module looks like it's shadowed by a variable. # If so, then add a "'" to the end of its canonical name, to # distinguish it from the variable. if package_doc is not None and name in package_doc.variables: valdoc = package_doc.variables[name].value if (valdoc not in (None, UNKNOWN) and valdoc.imported_from != dotted_name): log.warning("Module %s might be shadowed by a variable with " "the same name." % dotted_name) dotted_name = DottedName(str(dotted_name)+"'") return dotted_name, is_package | 8701ab2b64603c18427d3fd9d3442545c2f83573 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/8701ab2b64603c18427d3fd9d3442545c2f83573/docparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
2978,
67,
529,
12,
3459,
16,
2181,
67,
2434,
4672,
3536,
2000,
261,
9811,
2344,
67,
529,
16,
353,
67,
5610,
13,
3536,
508,
273,
283,
18,
1717,
12,
86,
10332,
2074,
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,
389,
588,
67,
2978,
67,
529,
12,
3459,
16,
2181,
67,
2434,
4672,
3536,
2000,
261,
9811,
2344,
67,
529,
16,
353,
67,
5610,
13,
3536,
508,
273,
283,
18,
1717,
12,
86,
10332,
2074,
64,
... |
model.id)) | model and model.id or _('Unknown'))) | def state_set(self, model): state_changes = self.attrs.get('states', {}) try: if isinstance(state_changes, basestring): state_changes = eval(state_changes) if 'invisible' in state_changes: if model.expr_eval(state_changes['invisible'], check_load=False): self.hide() else: self.show() else: self.show() except: log = logging.getLogger('record') log.error("Unable to eval '%s' for label %s (record id: %s)."% \ (state_changes['invisible'], self.attrs.get('string', _('Unknown')), model.id)) self.show() | 12157425edc4377c17a5c96a7027e894305b2dbb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/12157425edc4377c17a5c96a7027e894305b2dbb/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
919,
67,
542,
12,
2890,
16,
938,
4672,
919,
67,
6329,
273,
365,
18,
7039,
18,
588,
2668,
7992,
2187,
2618,
13,
775,
30,
309,
1549,
12,
2019,
67,
6329,
16,
10699,
4672,
919,
67,
6329,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
919,
67,
542,
12,
2890,
16,
938,
4672,
919,
67,
6329,
273,
365,
18,
7039,
18,
588,
2668,
7992,
2187,
2618,
13,
775,
30,
309,
1549,
12,
2019,
67,
6329,
16,
10699,
4672,
919,
67,
6329,... |
return 'install' in sys.argv[1:] or _easy_install_marker() | if "--help" in sys.argv[1:] or "-h" in sys.argv[1:]: return False return 'install' in sys.argv[1:] or _easy_install_marker() | def _being_installed(): if os.environ.get('DONT_PATCH_SETUPTOOLS') is not None: return False if _buildout_marker(): # Installed by buildout, don't mess with a global setuptools. return False # easy_install marker return 'install' in sys.argv[1:] or _easy_install_marker() | 16a89c229e8b67af66d6951bcd4146ea4bf091da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/495/16a89c229e8b67af66d6951bcd4146ea4bf091da/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2196,
310,
67,
13435,
13332,
309,
1140,
18,
28684,
18,
588,
2668,
40,
10079,
67,
20366,
67,
4043,
57,
1856,
51,
1741,
55,
6134,
353,
486,
599,
30,
327,
1083,
309,
389,
3510,
659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2196,
310,
67,
13435,
13332,
309,
1140,
18,
28684,
18,
588,
2668,
40,
10079,
67,
20366,
67,
4043,
57,
1856,
51,
1741,
55,
6134,
353,
486,
599,
30,
327,
1083,
309,
389,
3510,
659,
... |
tempfile.tempdir = old_tempfile_tempdir | tempfile.tempdir = None | def setUp(self): self.int_32_max = 0x100000000 self.homeDir = os.path.join(tempfile.gettempdir(), 'db_home') try: os.mkdir(self.homeDir) except os.error: pass tempfile.tempdir = self.homeDir self.filename = os.path.split(tempfile.mktemp())[1] tempfile.tempdir = old_tempfile_tempdir | 1faf4d70011243c21b79c21f4ec3307357829e8d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/1faf4d70011243c21b79c21f4ec3307357829e8d/test_sequence.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
474,
67,
1578,
67,
1896,
273,
374,
92,
21,
12648,
365,
18,
8712,
1621,
273,
1140,
18,
803,
18,
5701,
12,
5814,
768,
18,
588,
5814,
1214,
9334,
296,
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,
24292,
12,
2890,
4672,
365,
18,
474,
67,
1578,
67,
1896,
273,
374,
92,
21,
12648,
365,
18,
8712,
1621,
273,
1140,
18,
803,
18,
5701,
12,
5814,
768,
18,
588,
5814,
1214,
9334,
296,
19... |
str += dom_to_html(doc.descr(), uid) + '<hr/>\n' | str += self._dom_to_html(doc.descr(), uid) + '<hr/>\n' | def _module_to_html(self, uid): """ @return: An HTML page describing the module identified by C{uid}. @rtype: C{string} @param uid: The unique identifier for the module that should be documented. @type uid: L{UID} """ # Get the module's documentation. doc = self._docmap[uid] | 62ff4e473663c51d0a945a451e36120f11d9450a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/62ff4e473663c51d0a945a451e36120f11d9450a/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2978,
67,
869,
67,
2620,
12,
2890,
16,
4555,
4672,
3536,
632,
2463,
30,
1922,
3982,
1363,
16868,
326,
1605,
9283,
635,
385,
95,
1911,
5496,
632,
86,
723,
30,
385,
95,
1080,
97,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2978,
67,
869,
67,
2620,
12,
2890,
16,
4555,
4672,
3536,
632,
2463,
30,
1922,
3982,
1363,
16868,
326,
1605,
9283,
635,
385,
95,
1911,
5496,
632,
86,
723,
30,
385,
95,
1080,
97,
... |
ti['length'] = field.max_length | d['type'].length = field.max_length | def extractInfo( self, field, info ): d = super( StringTranslator, self ).extractInfo( field, info ) if schema.interfaces.IMinMaxLen.providedBy( field ): ti['length'] = field.max_length return d | c6de4cf054001df10d7694ae0353c2ffd2990309 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4360/c6de4cf054001df10d7694ae0353c2ffd2990309/zs2sa.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
966,
12,
365,
16,
652,
16,
1123,
262,
30,
302,
273,
2240,
12,
514,
12233,
16,
365,
262,
18,
8004,
966,
12,
652,
16,
1123,
262,
309,
1963,
18,
15898,
18,
45,
17454,
2891,
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,
2608,
966,
12,
365,
16,
652,
16,
1123,
262,
30,
302,
273,
2240,
12,
514,
12233,
16,
365,
262,
18,
8004,
966,
12,
652,
16,
1123,
262,
309,
1963,
18,
15898,
18,
45,
17454,
2891,
18,
... |
suite.addTest(unittest.makeSuite(AssociateBTreeTxnTestCase)) | if db.version() >= (4, 1): suite.addTest(unittest.makeSuite(AssociateBTreeTxnTestCase)) | def test_suite(): suite = unittest.TestSuite() if db.version() >= (3, 3, 11): suite.addTest(unittest.makeSuite(AssociateErrorTestCase)) suite.addTest(unittest.makeSuite(AssociateHashTestCase)) suite.addTest(unittest.makeSuite(AssociateBTreeTestCase)) suite.addTest(unittest.makeSuite(AssociateRecnoTestCase)) suite.addTest(unittest.makeSuite(AssociateBTreeTxnTestCase)) suite.addTest(unittest.makeSuite(ShelveAssociateHashTestCase)) suite.addTest(unittest.makeSuite(ShelveAssociateBTreeTestCase)) suite.addTest(unittest.makeSuite(ShelveAssociateRecnoTestCase)) if have_threads: suite.addTest(unittest.makeSuite(ThreadedAssociateHashTestCase)) suite.addTest(unittest.makeSuite(ThreadedAssociateBTreeTestCase)) suite.addTest(unittest.makeSuite(ThreadedAssociateRecnoTestCase)) return suite | 7e87a8a0be621c8fc09f44c2047b44d63ddba8f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7e87a8a0be621c8fc09f44c2047b44d63ddba8f8/test_associate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
30676,
13332,
11371,
273,
2836,
3813,
18,
4709,
13587,
1435,
225,
309,
1319,
18,
1589,
1435,
1545,
261,
23,
16,
890,
16,
4648,
4672,
11371,
18,
1289,
4709,
12,
4873,
3813,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
30676,
13332,
11371,
273,
2836,
3813,
18,
4709,
13587,
1435,
225,
309,
1319,
18,
1589,
1435,
1545,
261,
23,
16,
890,
16,
4648,
4672,
11371,
18,
1289,
4709,
12,
4873,
3813,
18,
... |
from optparse import OptionParser | from optparse import OptionParser, OptionValueError | def main(): from optparse import OptionParser parser = OptionParser(usage='usage: %prog [options] [projenv] ...', version='%%prog %s' % __version__) auths = {} def _auth_callback(option, opt_str, value, parser, auths, cls): info = value.split(',', 3) if len(info) != 3: usage() env_name, filename, realm = info if env_name in auths: print >>sys.stderr, 'Ignoring duplicate authentication option for ' \ 'project: %s' % env_name else: auths[env_name] = cls(filename, realm) parser.add_option('-a', '--auth', action='callback', type='string', metavar='DIGESTAUTH', callback=_auth_callback, callback_args=(auths, DigestAuth), help='[project],[htdigest_file],[realm]') parser.add_option('--basic-auth', action='callback', type='string', metavar='BASICAUTH', callback=_auth_callback, callback_args=(auths, BasicAuth), help='[project],[htpasswd_file],[realm]') parser.add_option('-p', '--port', action='store', type='int', dest='port', help='the port number to bind to') parser.add_option('-b', '--hostname', action='store', dest='hostname', help='the host name or IP address to bind to') parser.add_option('-e', '--env-parent-dir', action='store', dest='env_parent_dir', metavar='PARENTDIR', help='parent directory of the project environments') if os.name == 'posix': parser.add_option('-d', '--daemonize', action='store_true', dest='daemonize', help='run in the background as a daemon') parser.set_defaults(port=80, hostname='', daemonize=False) options, args = parser.parse_args() if not args and not options.env_parent_dir: parser.error('either the --env_parent_dir option or at least one ' 'environment must be specified') server_address = (options.hostname, options.port) httpd = TracHTTPServer(server_address, options.env_parent_dir, args, auths) try: if options.daemonize: daemonize() httpd.serve_forever() except OSError: sys.exit(1) except KeyboardInterrupt: pass | b574a90bc81444686a4dcf3cdc9bc9d86de02186 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/b574a90bc81444686a4dcf3cdc9bc9d86de02186/standalone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
628,
2153,
2670,
1930,
18862,
16,
2698,
23610,
2082,
273,
18862,
12,
9167,
2218,
9167,
30,
738,
14654,
306,
2116,
65,
306,
17995,
3074,
65,
1372,
2187,
1177,
2218,
11438,
1465... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
628,
2153,
2670,
1930,
18862,
16,
2698,
23610,
2082,
273,
18862,
12,
9167,
2218,
9167,
30,
738,
14654,
306,
2116,
65,
306,
17995,
3074,
65,
1372,
2187,
1177,
2218,
11438,
1465... |
print '\twrite literal size %s' % len(literal) | _mesg('write literal size %s' % len(literal)) | def _command(self, name, *args): | b10c0e30e74484a3863b7dcd5a9fd8e9e5849364 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b10c0e30e74484a3863b7dcd5a9fd8e9e5849364/imaplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3076,
12,
2890,
16,
508,
16,
380,
1968,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3076,
12,
2890,
16,
508,
16,
380,
1968,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_addtag(fldID, ln=cdslang, value=['',-1], name='', callback="yes", confirm=-1): """form to add a new field. fldNAME - the name of the new field code - the field code""" output = "" subtitle = """<a name="4.1"></a>Add MARC tag to logical field""" text = """ Add new tag:<br> <span class="adminlabel">Tag value</span> <input class="admin_w200" maxlength="6" type="text" name="value" value="%s" /><br> <span class="adminlabel">Tag comment</span> <input class="admin_w200" type="text" name="name" value="%s" /><br> """ % ((name=='' and value[0] or name), value[0]) text += """Or existing tag:<br> <span class="adminlabel">Tag</span> <select name="value" class="admin_w200"> <option value="-1">- Select a tag -</option> """ fld_tags = get_fld_tags(fldID) tags = get_tags() fld_tags = dict(map(lambda x: (x[1], x[0]), fld_tags)) for (id_tag, tname, tvalue) in tags: if not fld_tags.has_key(id_tag): text += """<option value="%s" %s>%s</option>""" % (tvalue, (tvalue==value[1] and 'selected="selected"' or ''), "%s - %s" % (tvalue, tname)) text += """</select>""" output = createhiddenform(action="%s/admin/bibindex/bibindexadmin.py/addtag" % weburl, text=text, fldID=fldID, ln=ln, button="Add tag", confirm=1) if (value[0] and value[1] in [-1, "-1"]) or (not value[0] and value[1] not in [-1, "-1"]): if confirm in ["1", 1]: res = add_fld_tag(fldID, name, (value[0] !='' and value[0] or value[1])) output += write_outcome(res) elif confirm not in ["-1", -1]: output += """<b><span class="info">Please choose to add either a new or an existing MARC tag, but not both.</span></b> """ try: body = [output, extra] except NameError: body = [output] if callback: return perform_modifyfieldtags(fldID, ln, "perform_addtag", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) | 2bfebc745d97514fe63c0e385bb842bede8f697e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/2bfebc745d97514fe63c0e385bb842bede8f697e/bibindexadminlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
1289,
2692,
12,
19794,
734,
16,
7211,
33,
4315,
2069,
539,
16,
460,
33,
3292,
2187,
17,
21,
6487,
508,
2218,
2187,
1348,
1546,
9707,
3113,
6932,
29711,
21,
4672,
3536,
687,
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,
3073,
67,
1289,
2692,
12,
19794,
734,
16,
7211,
33,
4315,
2069,
539,
16,
460,
33,
3292,
2187,
17,
21,
6487,
508,
2218,
2187,
1348,
1546,
9707,
3113,
6932,
29711,
21,
4672,
3536,
687,
3... |
self.body.append('%% %s \n' % node.astext().replace('\n', '\n% ')) | self.body.append('%% %s\n' % node.astext().replace('\n', '\n% ')) | def visit_comment(self, node): # Escape end of line by a new comment start in comment text. self.body.append('%% %s \n' % node.astext().replace('\n', '\n% ')) raise nodes.SkipNode | 770acf8a2c64555461b48403404ff537a469fea4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5620/770acf8a2c64555461b48403404ff537a469fea4/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
3469,
12,
2890,
16,
756,
4672,
468,
18025,
679,
434,
980,
635,
279,
394,
2879,
787,
316,
2879,
977,
18,
365,
18,
3432,
18,
6923,
2668,
11438,
738,
87,
64,
82,
11,
738,
756,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
3469,
12,
2890,
16,
756,
4672,
468,
18025,
679,
434,
980,
635,
279,
394,
2879,
787,
316,
2879,
977,
18,
365,
18,
3432,
18,
6923,
2668,
11438,
738,
87,
64,
82,
11,
738,
756,... |
print "\t | print >> stream, "\t | def WriteClassHeader(self, generator): generator.checkWriteDispatchBaseClass() doc = self.doc print 'class ' + self.python_name + '(DispatchBaseClass):' if doc[1]: print '\t' + build._safeQuotedString(doc[1]) try: progId = pythoncom.ProgIDFromCLSID(self.clsid) print "\t# This class is creatable by the name '%s'" % (progId) except pythoncom.com_error: pass print "\tCLSID = " + repr(self.clsid) if self.coclass_clsid is None: print "\tcoclass_clsid = None" else: print "\tcoclass_clsid = " + repr(self.coclass_clsid) print self.bWritten = 1 | d465d55b4c2e9a03e3b613dd6344bf0290ff0ff6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/d465d55b4c2e9a03e3b613dd6344bf0290ff0ff6/genpy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
797,
1864,
12,
2890,
16,
4456,
4672,
4456,
18,
1893,
3067,
5325,
2171,
797,
1435,
997,
273,
365,
18,
2434,
1172,
296,
1106,
296,
397,
365,
18,
8103,
67,
529,
397,
7747,
5325,
217... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
797,
1864,
12,
2890,
16,
4456,
4672,
4456,
18,
1893,
3067,
5325,
2171,
797,
1435,
997,
273,
365,
18,
2434,
1172,
296,
1106,
296,
397,
365,
18,
8103,
67,
529,
397,
7747,
5325,
217... |
execTime = toEpoch(endTime)-toEpoch(startTime) | def sendAccounting( self, jobID ): """Send WMS accounting data for the given job """ accountingReport = Job() result = self.jobDB.getJobAttributes(jobID) if not result['OK']: return result jobDict = result['Value'] startTime = jobDict['StartExecTime'] if not startTime or startTime == 'None' : result = self.logDB.getJobLoggingInfo(jobID) if not result['OK']: startTime = jobDict['SubmissionTime'] else: for status,minor,app,stime,source in result['Value']: if status == 'Running': startTime = stime break if not startTime: startTime = jobDict['SubmissionTime'] | 1bc0d189cfa76ea128be98dcb17942841327a3d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/1bc0d189cfa76ea128be98dcb17942841327a3d2/StalledJobAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
3032,
310,
12,
365,
16,
28913,
262,
30,
3536,
3826,
678,
3537,
2236,
310,
501,
364,
326,
864,
1719,
3536,
225,
2236,
310,
4820,
273,
3956,
1435,
563,
273,
365,
18,
4688,
2290,
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,
1366,
3032,
310,
12,
365,
16,
28913,
262,
30,
3536,
3826,
678,
3537,
2236,
310,
501,
364,
326,
864,
1719,
3536,
225,
2236,
310,
4820,
273,
3956,
1435,
563,
273,
365,
18,
4688,
2290,
18... | |
self.unlink(ids) | self.unlink(cr, uid, ids) | def clear(self): self.check_id += 1 if self.check_id % self._check_time: return True tounlink = [] max = time.time() - self._max_hours * 60 * 60 for id in self.datas: if self.datas[id]['internal.date_access'] < max: tounlink.append(id) self.unlink(tounlink) if len(self.datas)>self._max_count: sorted = map(lambda x: (x[1]['internal.date_access'], x[0]), self.datas.items()) sorted.sort() ids = map(lambda x: x[1], sorted[:len(self.datas)-self._max_count]) self.unlink(ids) return True | 7337e4f690fba84a29fd885cdcf7d39e5b504c0f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/7337e4f690fba84a29fd885cdcf7d39e5b504c0f/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2424,
12,
2890,
4672,
365,
18,
1893,
67,
350,
1011,
404,
309,
365,
18,
1893,
67,
350,
738,
365,
6315,
1893,
67,
957,
30,
327,
1053,
358,
318,
1232,
273,
5378,
943,
273,
813,
18,
957,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2424,
12,
2890,
4672,
365,
18,
1893,
67,
350,
1011,
404,
309,
365,
18,
1893,
67,
350,
738,
365,
6315,
1893,
67,
957,
30,
327,
1053,
358,
318,
1232,
273,
5378,
943,
273,
813,
18,
957,... |
total = vals['credit'] or (-vals['debit']) | total = vals['debit'] - vals['credit'] if journal.refund_journal: base_code = 'ref_base_code_id' tax_code = 'ref_tax_code_id' account_id = 'account_paid_id' base_sign = 'ref_base_sign' tax_sign = 'ref_tax_sign' else: base_code = 'base_code_id' tax_code = 'tax_code_id' account_id = 'account_collected_id' base_sign = 'base_sign' tax_sign = 'tax_sign' tmp_cnt = 0 | def create(self, cr, uid, vals, context=None, check=True): if not context: context={} account_obj = self.pool.get('account.account') tax_obj=self.pool.get('account.tax') | e35628a21e6d0ebd530e15b8c3e40e19acdcaa85 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/e35628a21e6d0ebd530e15b8c3e40e19acdcaa85/account_move_line.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
4422,
16,
4555,
16,
5773,
16,
819,
33,
7036,
16,
866,
33,
5510,
4672,
309,
486,
819,
30,
819,
12938,
2236,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
4631,
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
4422,
16,
4555,
16,
5773,
16,
819,
33,
7036,
16,
866,
33,
5510,
4672,
309,
486,
819,
30,
819,
12938,
2236,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
... |
IN_CLASSA_HOST = (0xffffffff & ~IN_CLASSA_NET) | IN_CLASSA_HOST = ((-1) & ~IN_CLASSA_NET) | def IN_CLASSA(a): return ((((in_addr_t)(a)) & 0x80000000) == 0) | 790e95fdfc3f46a9206393f77f1f8141643fbe2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/790e95fdfc3f46a9206393f77f1f8141643fbe2f/IN.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2120,
67,
5237,
37,
12,
69,
4672,
327,
261,
12443,
12,
267,
67,
4793,
67,
88,
21433,
69,
3719,
473,
374,
92,
28,
17877,
13,
422,
374,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2120,
67,
5237,
37,
12,
69,
4672,
327,
261,
12443,
12,
267,
67,
4793,
67,
88,
21433,
69,
3719,
473,
374,
92,
28,
17877,
13,
422,
374,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if not e in edges: edges.append(e) | if not e in edges: edges.append(e) | def build_tree(issue, graphs={}, nodes=[], edges=[]): """ build a dependency tree for all references """ node = Node(issue) if not node.id in [n.id for n in nodes]: nodes.append(node) else: return # stop recursion collector_id = obj2id(issue.aq_parent) if not collector_id in graphs.keys(): graphs[collector_id] = {'title': issue.aq_parent.title_or_id(), 'url': issue.aq_parent.absolute_url(1)} for ref in issue.getRefs(): ref_issue = issue.getPhysicalRoot().restrictedTraverse(unquote(ref.absolute_url(1))) e = Edge(node, Node(ref_issue)) if not e in edges: edges.append(e) build_tree(ref_issue, graphs, nodes, edges) return graphs, nodes, edges | ccc5c2945c218f4f24e210c3d24f1f1ab586b14c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/ccc5c2945c218f4f24e210c3d24f1f1ab586b14c/graphviz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
3413,
12,
13882,
16,
19422,
28793,
2199,
22850,
6487,
5231,
33,
8526,
4672,
3536,
1361,
279,
4904,
2151,
364,
777,
5351,
3536,
225,
756,
273,
2029,
12,
13882,
13,
309,
486,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3413,
12,
13882,
16,
19422,
28793,
2199,
22850,
6487,
5231,
33,
8526,
4672,
3536,
1361,
279,
4904,
2151,
364,
777,
5351,
3536,
225,
756,
273,
2029,
12,
13882,
13,
309,
486,
756... |
self.log.warn(x) self.log.warn(msg) | self.log.error(msg,x) | def getWatchdog(self,pid,thread,spObject,jobcputime): """This method returns the CE instance corresponding to the local OS, the Linux watchdog is returned by default. """ localOS = None | 95b7841b10ba8091c355ade37da19ac27c8992e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/95b7841b10ba8091c355ade37da19ac27c8992e4/WatchdogFactory.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
5234,
20330,
12,
2890,
16,
6610,
16,
5930,
16,
1752,
921,
16,
4688,
71,
458,
494,
4672,
3536,
2503,
707,
1135,
326,
29538,
791,
4656,
358,
326,
1191,
5932,
16,
326,
13318,
4267,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
5234,
20330,
12,
2890,
16,
6610,
16,
5930,
16,
1752,
921,
16,
4688,
71,
458,
494,
4672,
3536,
2503,
707,
1135,
326,
29538,
791,
4656,
358,
326,
1191,
5932,
16,
326,
13318,
4267,
2... |
alpha = wascr | alpha = wascr / lw | def forward(self, lm=None): """Compute forward variable for all arcs in the lattice.""" self.find_preds() self.remove_unreachable() # For each node in self (they sort forward by time, which is # actually the only thing that guarantees that a nodes' # predecessors will be touched before it) for w in self.nodes(): # For each outgoing arc from w for i,x in enumerate(w.exits): wf, wascr = x # This is alpha_t(w) alpha = LOGZERO # If w has no predecessors the previous alpha is 1.0 if len(w.prev) == 0: alpha = wascr # For each predecessor node to w for v in w.prev: # Get language model score P(w|v) (bigrams only for now...) if lm: lscr = lm.score(v.sym, w.sym) else: lscr = 0 # Find the arc from v to w to get its alpha for vf, vs in v.exits: vascr, valpha, vbeta = vs if vf == w.entry: # Accumulate alpha for this arc alpha = logadd(alpha, valpha + lscr + wascr) # Update the acoustic score to hold alpha and beta w.exits[i] = (wf, (wascr, alpha, LOGZERO)) | b88d472faced4bd646a32445dca9a4356701162a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6303/b88d472faced4bd646a32445dca9a4356701162a/lattice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5104,
12,
2890,
16,
14966,
33,
7036,
4672,
3536,
7018,
5104,
2190,
364,
777,
21569,
316,
326,
16690,
12123,
365,
18,
4720,
67,
6510,
87,
1435,
365,
18,
4479,
67,
318,
17246,
1435,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5104,
12,
2890,
16,
14966,
33,
7036,
4672,
3536,
7018,
5104,
2190,
364,
777,
21569,
316,
326,
16690,
12123,
365,
18,
4720,
67,
6510,
87,
1435,
365,
18,
4479,
67,
318,
17246,
1435,
468,
... |
old_entry, users[uid], ignore_list, ignore_oldexistent=1)) | old_entry, user, ignore_list, ignore_oldexistent=1)) | def save_user(self, uid): """ Save one user in the LDAP backend. If updating, the entry will be dropped prior of insertion. """ | a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a99fa36c9c57f1ef71f9ac0df9bc184bbcc4d91b/ldap_backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
67,
1355,
12,
2890,
16,
4555,
4672,
3536,
7074,
1245,
729,
316,
326,
11916,
4221,
18,
971,
9702,
16,
326,
1241,
903,
506,
14611,
6432,
434,
12626,
18,
3536,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
67,
1355,
12,
2890,
16,
4555,
4672,
3536,
7074,
1245,
729,
316,
326,
11916,
4221,
18,
971,
9702,
16,
326,
1241,
903,
506,
14611,
6432,
434,
12626,
18,
3536,
2,
-100,
-100,
-100,
... |
elif key.code in (keysyms.Delete, keysyms.KP_Delete) and key.mask & modifier.CONTROL_MASK: | elif key.code == keysyms.Delete and key.mask & modifier.CONTROL_MASK: | def _table_mode_process_key_event (self, key): '''Xingma Mode Process Key Event''' cond_letter_translate = lambda (c): \ self._convert_to_full_width (c) if self._full_width_letter [self._mode] else c cond_punct_translate = lambda (c): \ self._convert_to_full_width (c) if self._full_width_punct [self._mode] else c # We have to process the pinyin mode change key event here, # because we ignore all Release event below. if self._match_hotkey (key, keysyms.Shift_R, modifier.SHIFT_MASK + modifier.RELEASE_MASK) and self._ime_py: res = self._editor.r_shift () self._refresh_properties () self._update_ui () return res # process commit to preedit if self._match_hotkey (key, keysyms.Shift_R, modifier.SHIFT_MASK + modifier.RELEASE_MASK) or self._match_hotkey (key, keysyms.Shift_L, modifier.SHIFT_MASK + modifier.RELEASE_MASK): res = self._editor.l_shift () self._update_ui () return res # Match sigle char mode switch hotkey if self._match_hotkey (key, keysyms.comma, modifier.CONTROL_MASK): self.property_activate ( u"onechar" ) return True # Ignore key release event now :) if key.mask & modifier.RELEASE_MASK: return True | 020920c335d9cd332820caadfe129ed724f8364a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/544/020920c335d9cd332820caadfe129ed724f8364a/table.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2121,
67,
3188,
67,
2567,
67,
856,
67,
2575,
261,
2890,
16,
498,
4672,
9163,
60,
310,
2540,
8126,
4389,
1929,
2587,
26418,
6941,
67,
13449,
67,
13929,
273,
3195,
261,
71,
4672,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2121,
67,
3188,
67,
2567,
67,
856,
67,
2575,
261,
2890,
16,
498,
4672,
9163,
60,
310,
2540,
8126,
4389,
1929,
2587,
26418,
6941,
67,
13449,
67,
13929,
273,
3195,
261,
71,
4672,
52... |
if errmsg!='No module named _rl_accel': raise | if errMsg!='No module named _rl_accel': raise | def _AsciiHexDecode(input): """Decodes input using ASCII-Hex coding. Not used except to provide a test of the inverse function.""" #strip out all whitespace stripped = string.join(string.split(input),'') assert stripped[-1] == '>', 'Invalid terminator for Ascii Hex Stream' stripped = stripped[:-1] #chop off terminator assert len(stripped) % 2 == 0, 'Ascii Hex stream has odd number of bytes' i = 0 output = cStringIO.StringIO() while i < len(stripped): twobytes = stripped[i:i+2] output.write(chr(eval('0x'+twobytes))) i = i + 2 output.reset() return output.read() | 8fcf168c0c65307a2abe9a1c46a32d957fa2ab1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/8fcf168c0c65307a2abe9a1c46a32d957fa2ab1f/pdfutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
21363,
7037,
6615,
12,
2630,
4672,
3536,
20978,
810,
1450,
11768,
17,
7037,
14848,
18,
225,
2288,
1399,
1335,
358,
5615,
279,
1842,
434,
326,
8322,
445,
12123,
225,
468,
6406,
596,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21363,
7037,
6615,
12,
2630,
4672,
3536,
20978,
810,
1450,
11768,
17,
7037,
14848,
18,
225,
2288,
1399,
1335,
358,
5615,
279,
1842,
434,
326,
8322,
445,
12123,
225,
468,
6406,
596,
... |
else | else: | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 947) else quickfix.StringField.__init__(self, 947, 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,
2468,
9462,
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,
2468,
9462,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
2738... |
""" Attempt to resolve a url into an object in the Zope namespace. The url may be absolute or a catalog path style url. If no object is found, None is returned. No exceptions are raised. """ script=REQUEST.script if string.find(path, script) != 0: path='%s/%s' % (script, path) | """ """ while path and path[0]=='/': path=path[1:] while path and path[-1]=='/': path=path[:-1] req=REQUEST.clone() rsp=req.response req['PATH_INFO']=path object=None try: object=req.traverse(path) except: pass if object is not None: if hasattr(object, 'id'): if callable(object.id): name=object.id() else: name=object.id elif hasattr(object, '__name__'): name=object.__name__ else: name='' if name != os.path.split(path)[-1]: result = req.PARENTS[0] req.close() return result req.close() return object req.close() raise rsp.errmsg, sys.exc_value | def resolve_url(self, path, REQUEST): """ Attempt to resolve a url into an object in the Zope namespace. The url may be absolute or a catalog path style url. If no object is found, None is returned. No exceptions are raised. """ script=REQUEST.script if string.find(path, script) != 0: path='%s/%s' % (script, path) print "resolving", path try: return REQUEST.resolve_url(path) except: print "not found" return None | 8d2817c7510574c144e733630f85598482f5ed02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8d2817c7510574c144e733630f85598482f5ed02/ZCatalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2245,
67,
718,
12,
2890,
16,
589,
16,
12492,
4672,
3536,
3536,
1323,
589,
471,
589,
63,
20,
65,
18920,
2473,
30,
225,
589,
33,
803,
63,
21,
26894,
1323,
589,
471,
589,
18919,
21,
65,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2245,
67,
718,
12,
2890,
16,
589,
16,
12492,
4672,
3536,
3536,
1323,
589,
471,
589,
63,
20,
65,
18920,
2473,
30,
225,
589,
33,
803,
63,
21,
26894,
1323,
589,
471,
589,
18919,
21,
65,... |
PyObjectFields, Py_ssize_t, Py_TPFLAGS_READYING, Py_TPFLAGS_READY | PyVarObjectFields, Py_ssize_t, Py_TPFLAGS_READYING, Py_TPFLAGS_READY | from pypy.interpreter.typedef import TypeDef | e4529b24f0158211300ffe05a32757e300aa48cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/e4529b24f0158211300ffe05a32757e300aa48cb/typeobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
628,
18951,
93,
18,
2761,
11599,
18,
723,
536,
1930,
1412,
3262,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
628,
18951,
93,
18,
2761,
11599,
18,
723,
536,
1930,
1412,
3262,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
raise NotFound() | raise NotFound(message="%s does not exist" % location) | def get(self): | 26224e27871a1ba9e3d0ee406204219f5e382105 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/26224e27871a1ba9e3d0ee406204219f5e382105/Sharing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
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,
336,
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,
-1... |
""" debug mud log """ global debug if (debug['log']): log = open(debug['logfile'], 'a') time = strftime('%a, %d %b %Y %H:%M:%S %Z', localtime()) log.write('%s: %s\n' % (time, text)) time = strftime('%H:%M:%S', localtime()) print '%s: %s' % (time, text) if (debug['log']): log.close() return 0 | """ debug mud log """ global debug if debug['log']: log = open(debug['logfile'], 'a') time = strftime('%a, %d %b %Y %H:%M:%S %Z', localtime()) log.write('%s: %s\n' % (time, text)) time = strftime('%H:%M:%S', localtime()) print '%s: %s' % (time, text) if debug['log']: log.close() return 0 | def mlog(text): """ debug mud log """ global debug if (debug['log']): log = open(debug['logfile'], 'a') time = strftime('%a, %d %b %Y %H:%M:%S %Z', localtime()) log.write('%s: %s\n' % (time, text)) time = strftime('%H:%M:%S', localtime()) print '%s: %s' % (time, text) if (debug['log']): log.close() return 0 | 9f0495ce7066cd2385a6fdae1f019f7da433c5a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6760/9f0495ce7066cd2385a6fdae1f019f7da433c5a4/chloe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
312,
1330,
12,
955,
4672,
3536,
1198,
312,
1100,
613,
3536,
2552,
1198,
309,
1198,
3292,
1330,
3546,
30,
613,
273,
1696,
12,
4148,
3292,
28806,
17337,
296,
69,
6134,
813,
273,
10405,
299... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
312,
1330,
12,
955,
4672,
3536,
1198,
312,
1100,
613,
3536,
2552,
1198,
309,
1198,
3292,
1330,
3546,
30,
613,
273,
1696,
12,
4148,
3292,
28806,
17337,
296,
69,
6134,
813,
273,
10405,
299... |
def _seealso(self, seealso): | def _seealso(self, seealso, container): | def _seealso(self, seealso): 'Convert a SEEALSO node to HTML' #!!!!!!!!!!!!!!!!!!!!!!!!!!!! NO SEEALSO YET return '' if not seealso: return '' str = '<dl><dt><b>See also:</b>\n </dt><dd>' for see in seealso: if self._docmap.has_key(see[0]): str += self._uid_to_href(see[0], see[1]) + ', ' else: str += see[1] + ', ' return str[:-2] + '</dd>\n</dl>\n\n' | b1b93a7c8720ea1ae0c715da86bbf6fe1dbf094a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/b1b93a7c8720ea1ae0c715da86bbf6fe1dbf094a/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5946,
31144,
12,
2890,
16,
2621,
31144,
16,
1478,
4672,
296,
2723,
279,
3174,
41,
1013,
3584,
756,
358,
3982,
11,
468,
23045,
23045,
23045,
23045,
23045,
23045,
23045,
3741,
3174,
41,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5946,
31144,
12,
2890,
16,
2621,
31144,
16,
1478,
4672,
296,
2723,
279,
3174,
41,
1013,
3584,
756,
358,
3982,
11,
468,
23045,
23045,
23045,
23045,
23045,
23045,
23045,
3741,
3174,
41,... |
command = ("catch(`file -type \"mayaAscii\" -o \"" + filename + "\"`);\n") | command = ("catch(`file -type \"mayaAscii\" -o \"" + filename + "\"`);\n") | def WriteImport(self, filename, logname, outputDir, settings, isAnimated): """WriteImport(filename, logname, outputDir, settings, isAnimated) -> list_of_str Implements FApplication.WriteImport(). Assumes a COLLADA, maya binary, or maya ascii file is being imported. """ baseName = FUtils.GetProperFilename(filename) self.__currentImportProperName = baseName output = (os.path.join(outputDir, baseName)).replace("\\", "/") filename = filename.replace("\\", "/") self.__currentFilename = output + ".mb" extension = os.path.basename(filename).rsplit(".", 1)[1] if (extension == "mb"): command = ("catch(`file -type \"mayaBinary\" -o \"" + filename + "\"`);\n") elif (extension == "ma"): command = ("catch(`file -type \"mayaAscii\" -o \"" + filename + "\"`);\n") else: command = ("catch(`file -type \"COLLADA importer\" -o \"" + filename + "\"`);\n") self.__melScript.write( "$logname = \"" + logname.replace("\\", "/") + "\";\n" + "$descriptor = `cmdFileOutput -o $logname`;\n" + "catch(`file -f -new`);\n" + command + "catch(`file -rename \"" + output + "\"`);\n" + "catch(`file -save -type \"mayaBinary\"`);\n" + "cmdFileOutput -c $descriptor;\n" + "fixNewlines $logname;\n\n") self.__testImportCount = self.__testImportCount + 1 return [os.path.normpath(baseName + ".mb"),] | aaaf419583f4d5bf16ff80994387de818eb565fa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11176/aaaf419583f4d5bf16ff80994387de818eb565fa/FMaya_UIRender.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
5010,
12,
2890,
16,
1544,
16,
613,
529,
16,
21412,
16,
1947,
16,
353,
979,
17275,
4672,
3536,
3067,
5010,
12,
3459,
16,
613,
529,
16,
21412,
16,
1947,
16,
353,
979,
17275,
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,
2598,
5010,
12,
2890,
16,
1544,
16,
613,
529,
16,
21412,
16,
1947,
16,
353,
979,
17275,
4672,
3536,
3067,
5010,
12,
3459,
16,
613,
529,
16,
21412,
16,
1947,
16,
353,
979,
17275,
13,
... |
if not issubclass(eval(inType), eval(inS.type)): continue if issubclass(eval(outS.type), eval(inS.type)): count+= 1 | if not issubclass(inType, inInstance.getInputType(inS.name)): continue if issubclass(outInstance.getOutputType(outS.name), inInstance.getInputType(inS.name)): count+= 1 | def countCompatibleConnections(self, outputs, inputs, outType, inType): count = 0 for outS in outputs: if not issubclass(eval(outS.type), eval(outType)): continue for inS in inputs: if not issubclass(eval(inType), eval(inS.type)): continue if issubclass(eval(outS.type), eval(inS.type)): count+= 1 | db7f5291ee44be95b459e87b3ede35b934d58a4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/db7f5291ee44be95b459e87b3ede35b934d58a4e/orngDlgs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1056,
14599,
9314,
12,
2890,
16,
6729,
16,
4540,
16,
596,
559,
16,
316,
559,
4672,
1056,
273,
374,
364,
596,
55,
316,
6729,
30,
309,
486,
14664,
12,
8622,
12,
659,
55,
18,
723,
3631,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1056,
14599,
9314,
12,
2890,
16,
6729,
16,
4540,
16,
596,
559,
16,
316,
559,
4672,
1056,
273,
374,
364,
596,
55,
316,
6729,
30,
309,
486,
14664,
12,
8622,
12,
659,
55,
18,
723,
3631,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.