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
'/usr/local/include/db3',
'/usr/include/db3',
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
141cd423f5039b9efe4d6fa7280d4d98d607e1ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/141cd423f5039b9efe4d6fa7280d4d98d607e1ba/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 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, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
'color': (0,0,0)
'color': black
def listAttrs(self): print 'name =', self.name print 'parent =', self.parent keylist = self.defaults.keys() keylist.sort() for key in keylist: value = self.attributes.get(key, None) if value: print '%s = %s (direct)' % (key, value) else: #try for inherited value = getattr(self.parent, key, None) if value: print '%s = %s (inherited)' % (key, value) else: value = self.defaults[key] print '%s = %s (class default)' % (key, value)
4dd2d12518353ba3030029bc130c21d5f071c2c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/4dd2d12518353ba3030029bc130c21d5f071c2c9/layout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 8262, 12, 2890, 4672, 1172, 296, 529, 273, 2187, 365, 18, 529, 1172, 296, 2938, 273, 2187, 365, 18, 2938, 498, 1098, 273, 365, 18, 7606, 18, 2452, 1435, 498, 1098, 18, 3804, 1435,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 8262, 12, 2890, 4672, 1172, 296, 529, 273, 2187, 365, 18, 529, 1172, 296, 2938, 273, 2187, 365, 18, 2938, 498, 1098, 273, 365, 18, 7606, 18, 2452, 1435, 498, 1098, 18, 3804, 1435,...
return(-1) self.__io.flush() return(0)
return(-1) self.__io.flush() return(0)
def io_flush(self): if self.__io == None: return(-1)
1d75c8a822dbe6608e646cdbbeb174a3a4ab49c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/1d75c8a822dbe6608e646cdbbeb174a3a4ab49c0/libxml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2527, 67, 11330, 12, 2890, 4672, 309, 365, 16186, 1594, 422, 599, 30, 327, 19236, 21, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2527, 67, 11330, 12, 2890, 4672, 309, 365, 16186, 1594, 422, 599, 30, 327, 19236, 21, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
event_id = base_calendar_id2real_id(event_id) if not event_id in new_ids: new_ids.append(event_id)
if not real_event_id in new_ids: new_ids.append(real_event_id)
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): """ Overrides orm write method. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of crm meeting's ids @param vals: Dictionary of field value. @param context: A standard dictionary for contextual values @return: True """ if not context: context = {} if isinstance(ids, (str, int, long)): select = [ids] else: select = ids new_ids = [] for event_id in select: if len(str(event_id).split('-')) > 1: data = self.read(cr, uid, event_id, ['date', 'date_deadline', \ 'rrule', 'duration']) if data.get('rrule'): real_date = data.get('date') data.update(vals) new_id = self.modify_this(cr, uid, event_id, data, \ real_date, context) context.update({'active_id': new_id, 'active_ids': [new_id]}) continue event_id = base_calendar_id2real_id(event_id) if not event_id in new_ids: new_ids.append(event_id)
d53b3d9c693a99a0ae03bd7d21fb2ab9c8727117 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d53b3d9c693a99a0ae03bd7d21fb2ab9c8727117/base_calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 33, 7036, 16, 866, 33, 5510, 16, 1089, 67, 1893, 33, 5510, 4672, 3536, 531, 9857, 13969, 1045, 707, 18, 632, 891, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 33, 7036, 16, 866, 33, 5510, 16, 1089, 67, 1893, 33, 5510, 4672, 3536, 531, 9857, 13969, 1045, 707, 18, 632, 891, 365...
+ setupend])
+ setupend)
def revert_pdf_options(document): "Revert PDF options for hyperref." # store the PDF options and delete the entries from the Lyx file i = 0 hyperref = False title = "" author = "" subject = "" keywords = "" bookmarks = "" bookmarksnumbered = "" bookmarksopen = "" bookmarksopenlevel = "" breaklinks = "" pdfborder = "" colorlinks = "" backref = "" pagebackref = "" pagemode = "" otheroptions = "" i = find_token(document.header, "\\use_hyperref", i) if i != -1: hyperref = get_value(document.header, "\\use_hyperref", i) == 'true' del document.header[i] i = find_token(document.header, "\\pdf_store_options", i) if i != -1: del document.header[i] i = find_token(document.header, "\\pdf_title", 0) if i != -1: title = get_value_string(document.header, '\\pdf_title', 0, 0, True) title = ' pdftitle={' + title + '}' del document.header[i] i = find_token(document.header, "\\pdf_author", 0) if i != -1: author = get_value_string(document.header, '\\pdf_author', 0, 0, True) if title == "": author = ' pdfauthor={' + author + '}' else: author = ',\n pdfauthor={' + author + '}' del document.header[i] i = find_token(document.header, "\\pdf_subject", 0) if i != -1: subject = get_value_string(document.header, '\\pdf_subject', 0, 0, True) if title == "" and author == "": subject = ' pdfsubject={' + subject + '}' else: subject = ',\n pdfsubject={' + subject + '}' del document.header[i] i = find_token(document.header, "\\pdf_keywords", 0) if i != -1: keywords = get_value_string(document.header, '\\pdf_keywords', 0, 0, True) if title == "" and author == "" and subject == "": keywords = ' pdfkeywords={' + keywords + '}' else: keywords = ',\n pdfkeywords={' + keywords + '}' del document.header[i] i = find_token(document.header, "\\pdf_bookmarks", 0) if i != -1: bookmarks = get_value_string(document.header, '\\pdf_bookmarks', 0) bookmarks = ',\n bookmarks=' + bookmarks del document.header[i] i = find_token(document.header, "\\pdf_bookmarksnumbered", i) if i != -1: bookmarksnumbered = get_value_string(document.header, '\\pdf_bookmarksnumbered', 0) bookmarksnumbered = ',\n bookmarksnumbered=' + bookmarksnumbered del document.header[i] i = find_token(document.header, "\\pdf_bookmarksopen", i) if i != -1: bookmarksopen = get_value_string(document.header, '\\pdf_bookmarksopen', 0) bookmarksopen = ',\n bookmarksopen=' + bookmarksopen del document.header[i] i = find_token(document.header, "\\pdf_bookmarksopenlevel", i) if i != -1: bookmarksopenlevel = get_value_string(document.header, '\\pdf_bookmarksopenlevel', 0, 0, True) bookmarksopenlevel = ',\n bookmarksopenlevel=' + bookmarksopenlevel del document.header[i] i = find_token(document.header, "\\pdf_breaklinks", i) if i != -1: breaklinks = get_value_string(document.header, '\\pdf_breaklinks', 0) breaklinks = ',\n breaklinks=' + breaklinks del document.header[i] i = find_token(document.header, "\\pdf_pdfborder", i) if i != -1: pdfborder = get_value_string(document.header, '\\pdf_pdfborder', 0) if pdfborder == 'true': pdfborder = ',\n pdfborder={0 0 0}' else: pdfborder = ',\n pdfborder={0 0 1}' del document.header[i] i = find_token(document.header, "\\pdf_colorlinks", i) if i != -1: colorlinks = get_value_string(document.header, '\\pdf_colorlinks', 0) colorlinks = ',\n colorlinks=' + colorlinks del document.header[i] i = find_token(document.header, "\\pdf_backref", i) if i != -1: backref = get_value_string(document.header, '\\pdf_backref', 0) backref = ',\n backref=' + backref del document.header[i] i = find_token(document.header, "\\pdf_pagebackref", i) if i != -1: pagebackref = get_value_string(document.header, '\\pdf_pagebackref', 0) pagebackref = ',\n pagebackref=' + pagebackref del document.header[i] i = find_token(document.header, "\\pdf_pagemode", 0) if i != -1: pagemode = get_value_string(document.header, '\\pdf_pagemode', 0) pagemode = ',\n pdfpagemode=' + pagemode del document.header[i] i = find_token(document.header, "\\pdf_quoted_options", 0) if i != -1: otheroptions = get_value_string(document.header, '\\pdf_quoted_options', 0, 0, True) if title == "" and author == "" and subject == "" and keywords == "": otheroptions = ' ' + otheroptions else: otheroptions = ',\n ' + otheroptions del document.header[i] # write to the preamble when hyperref was used if hyperref == True: # preamble write preparations # bookmark numbers are only output when they are turned on if bookmarksopen == ',\n bookmarksopen=true': bookmarksopen = bookmarksopen + bookmarksopenlevel if bookmarks == ',\n bookmarks=true': bookmarks = bookmarks + bookmarksnumbered + bookmarksopen else: bookmarks = bookmarks # hypersetup is only output when there are things to be set up setupstart = '\\hypersetup{%\n' setupend = ' }\n' if otheroptions == "" and title == "" and author == ""\ and subject == "" and keywords == "": setupstart = "" setupend = "" # write the preamble add_to_preamble(document, ['% Commands inserted by lyx2lyx for PDF properties', '\\usepackage[unicode=true' + bookmarks + breaklinks + pdfborder + backref + pagebackref + colorlinks + pagemode + ']\n' ' {hyperref}\n' + setupstart + title + author + subject + keywords + otheroptions + setupend])
35bfca8f6067f010a714af7198b6086220394ffd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7514/35bfca8f6067f010a714af7198b6086220394ffd/lyx_1_6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 7699, 67, 2116, 12, 5457, 4672, 315, 426, 1097, 12667, 702, 364, 9512, 1734, 1199, 468, 1707, 326, 12667, 702, 471, 1430, 326, 3222, 628, 326, 511, 93, 92, 585, 277, 273, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 7699, 67, 2116, 12, 5457, 4672, 315, 426, 1097, 12667, 702, 364, 9512, 1734, 1199, 468, 1707, 326, 12667, 702, 471, 1430, 326, 3222, 628, 326, 511, 93, 92, 585, 277, 273, 37...
fname = f.startswith('custom_') and f[7:] or f
def format_props(self): tkt = self.ticket tkt['id'] = '%s' % tkt['id'] t = self.modtime or tkt['time'] tkt['modified'] = time.strftime('%c', time.localtime(t)) fields = ['id', 'status', 'component', 'modified', 'severity', 'milestone', 'priority', 'version', 'owner', 'reporter'] fields.extend(filter(lambda f: f.startswith('custom_'), self.ticket.keys())) i = 1 width = [0,0,0,0] for f in fields: if not tkt.has_key(f): continue fval = str(tkt[f]) if fval.find('\n') > -1: continue fname = f.startswith('custom_') and f[7:] or f idx = 2*(i % 2) if len(fname) > width[idx]: width[idx] = len(fname) if len(fval) > width[idx+1]: width[idx+1] = len(fval) i += 1 format = (' %%%is: %%-%is%s' % (width[0], width[1], CRLF), '%%%is: %%-%is | ' % (width[2], width[3])) i = 1 l = (width[2] + width[3] + 5) sep = l*'-' + '+' + (self.COLS-l)*'-' txt = sep + CRLF big=[] for f in fields: if not tkt.has_key(f): continue fval = tkt[f] fname = f.startswith('custom_') and f[7:] or f if '\n' in str(fval): big.append((fname.capitalize(), fval)) else: txt += format[i%2] % (fname.capitalize(), fval) i += 1 if i % 2 == 0: txt += '\n' if big: txt += sep for k,v in big: txt += '\n%s:\n%s\n\n' % (k,v) txt += sep return txt
ded62a2a8bea3ff7ebdabe21a68b4f5e1fcdd8f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/ded62a2a8bea3ff7ebdabe21a68b4f5e1fcdd8f8/Notify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 9693, 12, 2890, 4672, 268, 8629, 273, 365, 18, 16282, 268, 8629, 3292, 350, 3546, 273, 1995, 87, 11, 738, 268, 8629, 3292, 350, 3546, 268, 273, 365, 18, 1711, 957, 578, 268, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 9693, 12, 2890, 4672, 268, 8629, 273, 365, 18, 16282, 268, 8629, 3292, 350, 3546, 273, 1995, 87, 11, 738, 268, 8629, 3292, 350, 3546, 268, 273, 365, 18, 1711, 957, 578, 268, ...
self.value = m.eval('keyframe -t %d -q -eval -vc %s;'%(keyTime,attrpath)) index = self.index()
self.value = cmd.keyframe(attrpath,time=(keyTime,),query=True,eval=True,valueChange=True) index = self.index
def __init__( self, attrpath, keyTime=None, keyIdx=None ): #if the attrpath doesn't exist, then just create an empty key instance if not m.eval('objExists "%s";'%(attrpath,)): self.obj = None self.attr = None self.time = None self.value = None self.iw = None self.ow = None self.itt = None self.ott = None self.time = None return
8781a673d03469676f09284ae55510ab6d71bde7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1810/8781a673d03469676f09284ae55510ab6d71bde7/keyUtils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 1604, 803, 16, 498, 950, 33, 7036, 16, 498, 4223, 33, 7036, 262, 30, 468, 430, 326, 1604, 803, 3302, 1404, 1005, 16, 1508, 2537, 752, 392, 1008, 498, 79...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 1604, 803, 16, 498, 950, 33, 7036, 16, 498, 4223, 33, 7036, 262, 30, 468, 430, 326, 1604, 803, 3302, 1404, 1005, 16, 1508, 2537, 752, 392, 1008, 498, 79...
for x in external.itervalues(): uisetup = getattr(x, 'uisetup', None)
for name in external.itervalues(): mod = sys.modules[name] uisetup = getattr(mod, 'uisetup', None)
def importh(name): mod = __import__(name) components = name.split('.') for comp in components[1:]: mod = getattr(mod, comp) return mod
825751194dd69f6cdbe00dad20510d06fcbba915 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/825751194dd69f6cdbe00dad20510d06fcbba915/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1646, 7825, 12, 529, 4672, 681, 273, 1001, 5666, 972, 12, 529, 13, 4085, 273, 508, 18, 4939, 2668, 1093, 13, 364, 1161, 316, 4085, 63, 21, 30, 14542, 681, 273, 3869, 12, 1711, 16, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1646, 7825, 12, 529, 4672, 681, 273, 1001, 5666, 972, 12, 529, 13, 4085, 273, 508, 18, 4939, 2668, 1093, 13, 364, 1161, 316, 4085, 63, 21, 30, 14542, 681, 273, 3869, 12, 1711, 16, 11...
"""Recognizes two parsers in sequence.""" def parser(parms, state):
"""Recognizes a number of parsers in sequence.""" def parser(parms, state): saved = ParserState(state.index, state.line, state.col, None)
def Seq(*parsers): """Recognizes two parsers in sequence.""" def parser(parms, state): r = None for p in parsers: r = p(parms, state) if isinstance(r, ParserError): return r return r return Parser(parser, Seq.__doc__)
48c6fab0b6c5ad8b9dffbae6e05de81afc93d1cb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8158/48c6fab0b6c5ad8b9dffbae6e05de81afc93d1cb/parcombs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14367, 30857, 11104, 4672, 3536, 22931, 3128, 279, 1300, 434, 14212, 316, 3102, 12123, 1652, 2082, 12, 29927, 16, 919, 4672, 5198, 273, 6783, 1119, 12, 2019, 18, 1615, 16, 919, 18, 1369, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14367, 30857, 11104, 4672, 3536, 22931, 3128, 279, 1300, 434, 14212, 316, 3102, 12123, 1652, 2082, 12, 29927, 16, 919, 4672, 5198, 273, 6783, 1119, 12, 2019, 18, 1615, 16, 919, 18, 1369, ...
self.GotoPos(pos + 1)
self.GotoPos(pos + curr)
def AddLine(self, before=False): """Add a new line to the document""" line = self.LineFromPosition(self.GetCurrentPos()) if before: line = line - 1 if line < 0: line = 0 pos = self.GetLineEndPosition(line) self.InsertText(pos, self.GetEOLChar()) self.GotoPos(pos + 1)
420520d6982defdb59b18b8fb3e871a4241165bb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3530/420520d6982defdb59b18b8fb3e871a4241165bb/ed_stc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 1670, 12, 2890, 16, 1865, 33, 8381, 4672, 3536, 986, 279, 394, 980, 358, 326, 1668, 8395, 980, 273, 365, 18, 1670, 1265, 2555, 12, 2890, 18, 967, 3935, 1616, 10756, 309, 1865, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 1670, 12, 2890, 16, 1865, 33, 8381, 4672, 3536, 986, 279, 394, 980, 358, 326, 1668, 8395, 980, 273, 365, 18, 1670, 1265, 2555, 12, 2890, 18, 967, 3935, 1616, 10756, 309, 1865, 30...
type, default = schema[name] if issubclass(type, SimpleType): value = unicode(node.children) value = type.decode(value) elif issubclass(type, ComplexType): value = type.decode(node)
if name in schema: type, default = schema[name] if issubclass(type, SimpleType): value = unicode(node.children) value = type.decode(value) elif issubclass(type, ComplexType): value = type.decode(node) else: raise ValueError, 'bad type for "%s"' % name if 'lang' in node.attributes: language = node.attributes['lang'].value else: language = None property.set_property(name, value, language=language)
def decode(cls, node): schema = cls.schema property = cls() for node in node.get_elements(): name = node.name # Decode the value type, default = schema[name] if issubclass(type, SimpleType): value = unicode(node.children) value = type.decode(value) elif issubclass(type, ComplexType): value = type.decode(node) else: raise ValueError, 'bad type for "%s"' % name # The language if 'lang' in node.attributes: language = node.attributes['lang'].value else: language = None # Set property value property.set_property(name, value, language=language) return property
5c78ff8e791d5c1d7f89fc4c05a8e2a229df6747 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/5c78ff8e791d5c1d7f89fc4c05a8e2a229df6747/Schema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 12, 6429, 16, 756, 4672, 1963, 273, 2028, 18, 4821, 1272, 273, 2028, 1435, 364, 756, 316, 756, 18, 588, 67, 6274, 13332, 508, 273, 756, 18, 529, 468, 6209, 326, 460, 309, 508, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 12, 6429, 16, 756, 4672, 1963, 273, 2028, 18, 4821, 1272, 273, 2028, 1435, 364, 756, 316, 756, 18, 588, 67, 6274, 13332, 508, 273, 756, 18, 529, 468, 6209, 326, 460, 309, 508, ...
while len(remains) > 0 and remains != "/": (a,b) = os.path.split(remains) lst.append(b) remains = a if (remains == "/"):
while remains and remains not in ("/", "//"): remains, end = os.path.split(remains) lst.append(end) if remains in ("/", "//"):
def split_path_left(in_path): """ Given a path a/b/c .., return a pair (a, b/c..) - ie. like os.path.split(), but leftward. What we actually do here is to split the path until we have nothing left, then take the head and rest of the resulting list. """ remains = in_path lst = [ ] while len(remains) > 0 and remains != "/": (a,b) = os.path.split(remains) lst.append(b) remains = a if (remains == "/"): lst.append("") # Our list is in reverse order, so .. lst.reverse() rp = lst[1] for i in lst[2:]: rp = os.path.join(rp, i) return (lst[0], rp)
fc18012b9523c0debfe74df2af54885fabbe3889 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4427/fc18012b9523c0debfe74df2af54885fabbe3889/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 67, 803, 67, 4482, 12, 267, 67, 803, 4672, 3536, 16803, 279, 589, 279, 19, 70, 19, 71, 6116, 16, 327, 279, 3082, 261, 69, 16, 324, 19, 71, 838, 13, 300, 9228, 18, 3007, 1140,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 67, 803, 67, 4482, 12, 267, 67, 803, 4672, 3536, 16803, 279, 589, 279, 19, 70, 19, 71, 6116, 16, 327, 279, 3082, 261, 69, 16, 324, 19, 71, 838, 13, 300, 9228, 18, 3007, 1140,...
return value
return ''.join(value)
def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left value = ''
b200d0cde9c9fab7945d656036f93e00ee2b1b2e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/b200d0cde9c9fab7945d656036f93e00ee2b1b2e/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 875, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 875, 2, -100, -100, -100, -100, ...
'<p>The Developer compressed images contain a snapshot of Cosmo.</p>\n'
'<p>The Debug compressed images contain a snapshot of Cosmo.</p>\n'
def CreateIndex(treeName, outputDir, newDirName, nowString, buildName): """ Generates HTML files that contain links and hash information for downloadable files. """ newPrefix = outputDir + os.sep + newDirName + os.sep head1 = '<html>\n<head>\n' +\ '<META HTTP-EQUIV="Pragma" CONTENT="no-cache">\n' +\ '<title>Download %s %s %s </title>\n' % (treeName, buildName, newDirName) +\ '<link rel="Stylesheet" ' +\ 'href="http://www.osafoundation.org/css/OSAF.css" ' +\ 'type="text/css" charset="iso-8859-1">\n' head2 = '</head>\n' +\ '<body>\n' +\ '<img src="http://www.osafoundation.org/images/OSAFLogo.gif" ' + 'alt="[OSAF Logo]">\n' +\ '<h2>' + treeName + ' Build: ' + nowString + ' (machine: ' + buildName + ')</h2>\n' cryptoblurb = '<p>This software is subject to the U.S. Export ' +\ 'Administration Regulations and other U.S. law, and may ' +\ 'not be exported or re-exported to certain countries ' +\ '(currently Cuba, Iran, Libya, North Korea, Sudan and ' +\ 'Syria) or to persons or entities prohibited from ' +\ 'receiving U.S. exports (including Denied Parties, ' +\ 'Specially Designated Nationals, and entities on the ' +\ 'Bureau of Industry and Security Entity List or involved ' +\ 'with missile technology or nuclear, chemical or ' +\ 'biological weapons).</p>\n' index = head1 + head2 + cryptoblurb userInstall = None userTarball = None devInstall = None devTarball = None for distro in ('enduser', 'developer'): distroFile = os.path.join(outputDir, newDirName, distro) if os.path.exists(distroFile): lines = _readFile(distroFile) for line in lines: actualDistroFile = line.strip() actualDistro = os.path.join(outputDir, newDirName, actualDistroFile) distroExt = os.path.splitext(actualDistroFile)[1] if _instructions.has_key(distroExt): distroType = _instructions[distroExt][0] else: raise MissingFileError, ('Unknown distribution extension: %s' % distroExt) if distroType == 'tarball': if distro == 'enduser': userTarball = (actualDistroFile, actualDistro, _instructions[distroExt][1]) else: devTarball = (actualDistroFile, actualDistro, _instructions[distroExt][1]) else: if distro == 'developer': devInstall = (actualDistroFile, actualDistro, _instructions[distroExt][1]) else: userInstall = (actualDistroFile, actualDistro, _instructions[distroExt][1]) if userInstall: index += '<h3>End-User Installer</h3>\n' +\ '<p>If you just want to use Chandler, then this is the file to download.<br/>\n' +\ userInstall[2] + '</p>\n' index += '<p><a href="%s">%s</a> (%s)<br/>\n' % \ (userInstall[0], userInstall[0], hardhatutil.fileSize(userInstall[1])) index += 'MD5 checksum: %s<br/>\nSHA checksum: %s</p>\n' % \ (hardhatutil.MD5sum(userInstall[1]), hardhatutil.SHAsum(userInstall[1])) if devInstall: index += '<h3>Developer Installer</h3>\n' +\ "<p>If you're a developer and want to run Chandler in debugging mode, " +\ 'this distribution contains debug versions of the binaries. ' +\ 'Assertions are active, the __debug__ global is set to True, ' +\ 'and memory leaks are listed upon exit. You can also use this ' +\ 'distribution to develop your own parcels (See ' +\ '<a href="http://wiki.osafoundation.org/bin/view/Chandler/ParcelLoading">Parcel Loading</a> ' +\ 'for details on loading your own parcels).<br/>\n' +\ devInstall[2] + '</p>\n' index += '<p><a href="%s">%s</a> (%s)<br/>\n' % \ (devInstall[0], devInstall[0], hardhatutil.fileSize(devInstall[1])) index += 'MD5 checksum: %s<br/>\nSHA checksum: %s</p>\n' % \ (hardhatutil.MD5sum(actualDistro), hardhatutil.SHAsum(devInstall[1])) if userTarball or devTarball: if treeName == 'Cosmo': index += '<h3>Compressed Install Images</h3>\n' +\ '<p>The Developer compressed images contain a snapshot of Cosmo.</p>\n' else: index += '<h3>Compressed Install Images</h3>\n' +\ '<p>The End-User and Developer compressed images contain a snapshot of Chandler.\n' +\ 'Use these if you cannot or do not want to use the installers.</p>\n' if userTarball: index += '<p>End-Users: <a href="%s">%s</a> (%s): %s<br/>\n' % \ (userTarball[0], userTarball[0], hardhatutil.fileSize(userTarball[1]), userTarball[2]) index += 'MD5 checksum: %s<br/>\nSHA checksum: %s</p>\n' % \ (hardhatutil.MD5sum(userTarball[1]), hardhatutil.SHAsum(userTarball[1])) if devTarball: index += '<p>Developers: <a href="%s">%s</a> (%s): %s<br/>\n' % \ (devTarball[0], devTarball[0], hardhatutil.fileSize(devTarball[1]), devTarball[2]) index += 'MD5 checksum: %s<br/>\nSHA checksum: %s</p>\n' % \ (hardhatutil.MD5sum(devTarball[1]), hardhatutil.SHAsum(devTarball[1])) index += '</body></html>\n' fileOut = file(newPrefix + "index.html", "w") fileOut.write(index) fileOut.close() fileOut = file(outputDir + os.sep + "latest.html", "w") fileOut.write(head1 +\ '<meta http-equiv="refresh" content="0;URL=' + newDirName + '">\n' +\ head2 +\ '<h2>Latest Continuous ' + buildName + ' Build</h2>\n' +\ '<a href="' + newDirName + '">' + newDirName + '</a>\n' +\ '</body></html>\n') fileOut.close() # This file is used by: # - http://builds.osafoundation.org/index.html # - http://wiki.osafoundation.org/bin/view/Chandler/GettingChandler fileOut = file(outputDir+os.sep+"time.js", "w") fileOut.write("document.write('" + nowString + "');\n") fileOut.close()
3485f4ffdfc7ff1ea1fd5556c076562a7aa58df2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/3485f4ffdfc7ff1ea1fd5556c076562a7aa58df2/tinderbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1016, 12, 3413, 461, 16, 21412, 16, 394, 28780, 16, 2037, 780, 16, 1361, 461, 4672, 3536, 31902, 3982, 1390, 716, 912, 4716, 471, 1651, 1779, 364, 4224, 429, 1390, 18, 3536, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1016, 12, 3413, 461, 16, 21412, 16, 394, 28780, 16, 2037, 780, 16, 1361, 461, 4672, 3536, 31902, 3982, 1390, 716, 912, 4716, 471, 1651, 1779, 364, 4224, 429, 1390, 18, 3536, 225, ...
print "onExtraDataChange: %s %s=>%s" %(id, key, value)
logging.debug("onExtraDataChange: %s %s=>%s" %(id, key, value))
def onExtraDataChange(self, id, key, value): print "onExtraDataChange: %s %s=>%s" %(id, key, value)
d9e80712040f977a65437d98198220eeff4f916b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1208/d9e80712040f977a65437d98198220eeff4f916b/ufovboxapi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 7800, 751, 3043, 12, 2890, 16, 612, 16, 498, 16, 460, 4672, 1172, 315, 265, 7800, 751, 3043, 30, 738, 87, 738, 87, 9207, 9, 87, 6, 8975, 350, 16, 498, 16, 460, 13, 2, 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, 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, 603, 7800, 751, 3043, 12, 2890, 16, 612, 16, 498, 16, 460, 4672, 1172, 315, 265, 7800, 751, 3043, 30, 738, 87, 738, 87, 9207, 9, 87, 6, 8975, 350, 16, 498, 16, 460, 13, 2, -100, ...
unittest.TextTestRunner().run(makeSuite())
unittest.TextTestRunner().run(makeSuite())
def makeSuite(): return makeSuiteForClasses(PythonPointTestCase)
112a2d83b99fae7899399b97adcb8938b25f0928 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/112a2d83b99fae7899399b97adcb8938b25f0928/test_tools_pythonpoint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 13587, 13332, 327, 1221, 13587, 1290, 4818, 12, 15774, 2148, 4709, 2449, 13, 282, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1221, 13587, 13332, 327, 1221, 13587, 1290, 4818, 12, 15774, 2148, 4709, 2449, 13, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
name=self._getChildData('name',root=memberdef),
name=name,
def _translate_memberdef_function( self, memberdef, target=None, scope=None, **kwargs ): ## The current BoostBook to Docbook translator doesn't respect method ## IDs. Nor does it assign any useable IDs to the individial methods. # self._setID(memberdef.getAttribute('id'), # scope+'::'+self._getChildData('name',root=memberdef)) ## Hence instead of registering an ID for the method we point it at the ## containing class. self._setID(memberdef.getAttribute('id'),scope) method = target.appendChild(self._createNode('method', # id=memberdef.getAttribute('id'), name=self._getChildData('name',root=memberdef), cv=' '.join([ if_attribute(memberdef,'const','const','').strip() ]), specifiers=' '.join([ if_attribute(memberdef,'static','static',''), if_attribute(memberdef,'explicit','explicit',''), if_attribute(memberdef,'inline','inline','') ]).strip() )) ## We iterate the children to translate each part of the function. for n in memberdef.childNodes: self._translateNode(memberdef,'function',n,target=method) return method
74d8dd29c88bf17661b7e631fb09ea9c087eca91 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9981/74d8dd29c88bf17661b7e631fb09ea9c087eca91/doxproc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 13929, 67, 5990, 536, 67, 915, 12, 365, 16, 3140, 536, 16, 1018, 33, 7036, 16, 2146, 33, 7036, 16, 2826, 4333, 262, 30, 7541, 1021, 783, 17980, 669, 9084, 358, 3521, 3618, 8333, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13929, 67, 5990, 536, 67, 915, 12, 365, 16, 3140, 536, 16, 1018, 33, 7036, 16, 2146, 33, 7036, 16, 2826, 4333, 262, 30, 7541, 1021, 783, 17980, 669, 9084, 358, 3521, 3618, 8333, ...
pkg.source = self.source + node.prop("href")
pkg.source = self.source + "/" + node.prop("href")
def __parsePackage(self, node): pkg = package.RpmPackage(self.config, "dummy") pkg["signature"] = {} while node != None: if node.type != "element": node = node.next continue if node.name == "name": pkg["name"] = node.content elif node.name == "arch": pkg["arch"] = node.content elif node.name == "version": pkg["version"] = node.prop("ver") pkg["release"] = node.prop("rel") pkg["epoch"] = [int(node.prop("epoch"))] elif node.name == "checksum": if node.prop("type") == "md5": pkg["signature"]["md5"] = node.content elif node.prop("type") == "sha": pkg["signature"]["sha1header"] = node.content elif node.name == "location": pkg.source = self.source + node.prop("href") elif node.name == "format": self.__parseFormat(node.children, pkg) node = node.next pkg.header_read = 1 pkg["provides"] = pkg.getProvides() pkg["requires"] = pkg.getRequires() pkg["obsoletes"] = pkg.getObsoletes() pkg["conflicts"] = pkg.getConflicts() pkg["triggers"] = pkg.getTriggers() if pkg.has_key("providename"): del pkg["providename"] if pkg.has_key("provideflags"): del pkg["provideflags"] if pkg.has_key("provideversion"): del pkg["provideversion"] if pkg.has_key("requirename"): del pkg["requirename"] if pkg.has_key("requireflags"): del pkg["requireflags"] if pkg.has_key("requireversion"): del pkg["requireversion"] if pkg.has_key("obsoletename"): del pkg["obsoletename"] if pkg.has_key("obsoleteflags"): del pkg["obsoleteflags"] if pkg.has_key("obsoleteversion"): del pkg["obsoleteversion"] if pkg.has_key("conflictname"): del pkg["conflictname"] if pkg.has_key("conflictflags"): del pkg["conflictflags"] if pkg.has_key("conflictversion"): del pkg["conflictversion"] return pkg
2b477bdbc8db838e14ec1e6a6494a184da9c6a28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/2b477bdbc8db838e14ec1e6a6494a184da9c6a28/io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2670, 2261, 12, 2890, 16, 756, 4672, 3475, 273, 2181, 18, 54, 7755, 2261, 12, 2890, 18, 1425, 16, 315, 21050, 7923, 3475, 9614, 8195, 11929, 273, 2618, 1323, 756, 480, 599, 30, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2670, 2261, 12, 2890, 16, 756, 4672, 3475, 273, 2181, 18, 54, 7755, 2261, 12, 2890, 18, 1425, 16, 315, 21050, 7923, 3475, 9614, 8195, 11929, 273, 2618, 1323, 756, 480, 599, 30, 3...
if res[1] != 'draft': raise osv.except_osv(_('UserError'), _('The Ledger Posting (%s) for centralisation ' \ 'has been confirmed!') % res[2])
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') if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']: raise osv.except_osv(_('Bad account!'), _('You can not use an inactive account!')) if 'journal_id' in vals and 'journal_id' not in context: context['journal_id'] = vals['journal_id'] if 'period_id' in vals and 'period_id' not in context: context['period_id'] = vals['period_id'] if ('journal_id' not in context) and ('move_id' in vals) and vals['move_id']: m = self.pool.get('account.move').browse(cr, uid, vals['move_id']) context['journal_id'] = m.journal_id.id context['period_id'] = m.period_id.id
99d8cd6e3cf40d4aa3daacffdfd574f1c9cf5590 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/99d8cd6e3cf40d4aa3daacffdfd574f1c9cf5590/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, 1, 1...
[ 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, ...
*sensor.params))
*sensor.formatted_params))
def request_sensor_list(self, sock, msg): """Request the list of sensors.""" if not msg.arguments: for name, sensor in sorted(self._sensors.iteritems(), key=lambda x: x[0]): self.inform(sock, Message.inform("sensor-list", name, sensor.stype, sensor.description, sensor.units, *sensor.params)) return Message.reply("sensor-list", "ok", str(len(self._sensors))) else: name = msg.arguments[0] if name in self._sensors: sensor = self._sensors[name] self.inform(sock, Message.inform("sensor-list", name, sensor.stype, sensor.description, sensor.units, *sensor.params)) return Message.reply("sensor-list", "ok", "1") else: return Message.reply("sensor-list", "fail", "Unknown sensor name.")
ad1a16292e6d7324de6159e90d643ba82d134d99 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10400/ad1a16292e6d7324de6159e90d643ba82d134d99/katcp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 590, 67, 27426, 67, 1098, 12, 2890, 16, 7313, 16, 1234, 4672, 3536, 691, 326, 666, 434, 31349, 12123, 309, 486, 1234, 18, 7099, 30, 364, 508, 16, 10583, 316, 3115, 12, 2890, 6315, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 590, 67, 27426, 67, 1098, 12, 2890, 16, 7313, 16, 1234, 4672, 3536, 691, 326, 666, 434, 31349, 12123, 309, 486, 1234, 18, 7099, 30, 364, 508, 16, 10583, 316, 3115, 12, 2890, 6315, 87, ...
notification_center = NotificationCenter()
def _browse_cb(self, file, flags, interface_index, error_code, service_name, regtype, reply_domain): notification_center = NotificationCenter() if error_code != bonjour.kDNSServiceErr_NoError: self._discover_timer = reactor.callLater(1, self._command_channel.send, Command('discover')) return if not (flags & bonjour.kDNSServiceFlagsAdd): uri = FrozenSIPURI.parse(service_name.strip('<>').encode('utf-8')) if uri != self.account.contact[uri.parameters.get('transport', 'udp')] and uri in self._neighbours: self._neighbours.remove(uri) notification_center.post_notification('BonjourAccountDidRemoveNeighbour', sender=self.account, data=TimestampedNotificationData(uri=uri)) return try: file = bonjour.DNSServiceResolve(0, interface_index, service_name, regtype, reply_domain, self._resolve_cb) except bonjour.BonjourError: # Maybe we should log the error, but how? -Luci pass else: bonjour_file = BonjourFile(file, 'resolution') self._files.append(bonjour_file) self._select_proc.kill(RestartSelect)
8e35ab24bf2b7ebd86f546a9d1d49ec606190fd1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5703/8e35ab24bf2b7ebd86f546a9d1d49ec606190fd1/account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 25731, 67, 7358, 12, 2890, 16, 585, 16, 2943, 16, 1560, 67, 1615, 16, 555, 67, 710, 16, 1156, 67, 529, 16, 960, 723, 16, 4332, 67, 4308, 4672, 309, 555, 67, 710, 480, 324, 265...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 25731, 67, 7358, 12, 2890, 16, 585, 16, 2943, 16, 1560, 67, 1615, 16, 555, 67, 710, 16, 1156, 67, 529, 16, 960, 723, 16, 4332, 67, 4308, 4672, 309, 555, 67, 710, 480, 324, 265...
if not deltaer: return
if not deltaer: return
def endringsmegler(self, tabell): gmlver = self.gmlbib.versjon() nyver = self.nybib.versjon() deltaer = [kartver for kartver in self.endringskart.keys() if kartver > gmlver and kartver <= nyver] if not deltaer: return deltaer.sort() for ver in deltaer: endringer = self.endringskart[ver] if not endringer.has_key(tabell): continue tabellendringer = endringer[tabell] yield tabellendringer
6994ec428ea0e01059014a8f65b2a215e28c11fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3611/6994ec428ea0e01059014a8f65b2a215e28c11fa/oppgradering.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 86, 899, 81, 1332, 749, 12, 2890, 16, 268, 873, 80, 4672, 314, 781, 502, 273, 365, 18, 19005, 70, 495, 18, 2496, 78, 265, 1435, 15308, 502, 225, 273, 365, 18, 18538, 70, 495, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 86, 899, 81, 1332, 749, 12, 2890, 16, 268, 873, 80, 4672, 314, 781, 502, 273, 365, 18, 19005, 70, 495, 18, 2496, 78, 265, 1435, 15308, 502, 225, 273, 365, 18, 18538, 70, 495, ...
attributes['source'] = options['file']
attributes['source'] = path
def raw(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): """ Pass through content unchanged Content is included in output based on type argument Content may be included inline (content section of directive) or imported from a file or url. """ attributes = {'format': arguments[0]} if content: if options.has_key('file') or options.has_key('url'): error = state_machine.reporter.error( '"%s" directive may not both specify an external file and ' 'have content.' % name, nodes.literal_block(block_text, block_text), line=lineno) return [error] text = '\n'.join(content) elif options.has_key('file'): if options.has_key('url'): error = state_machine.reporter.error( 'The "file" and "url" options may not be simultaneously ' 'specified for the "%s" directive.' % name, nodes.literal_block(block_text, block_text), line=lineno) return [error] try: raw_file = open(options['file']) except IOError, error: severe = state_machine.reporter.severe( 'Problems with "%s" directive path:\n%s.' % (name, error), nodes.literal_block(block_text, block_text), line=lineno) return [severe] text = raw_file.read() raw_file.close() attributes['source'] = options['file'] elif options.has_key('url'): try: raw_file = urlopen(options['url']) except (URLError, IOError, OSError), error: severe = state_machine.reporter.severe( 'Problems with "%s" directive URL "%s":\n%s.' % (name, options['url'], error), nodes.literal_block(block_text, block_text), line=lineno) return [severe] text = raw_file.read() raw_file.close() attributes['source'] = options['file'] else: error = state_machine.reporter.warning( 'The "%s" directive requires content; none supplied.' % (name), nodes.literal_block(block_text, block_text), line=lineno) return [error] raw_node = nodes.raw('', text, **attributes) return [raw_node]
51a89dbdd80e9fad0cc50f309b15ae9343639730 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/51a89dbdd80e9fad0cc50f309b15ae9343639730/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1831, 12, 529, 16, 1775, 16, 702, 16, 913, 16, 7586, 16, 913, 67, 3348, 16, 1203, 67, 955, 16, 919, 16, 919, 67, 9149, 4672, 3536, 10311, 3059, 913, 14827, 225, 3697, 353, 5849, 316,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1831, 12, 529, 16, 1775, 16, 702, 16, 913, 16, 7586, 16, 913, 67, 3348, 16, 1203, 67, 955, 16, 919, 16, 919, 67, 9149, 4672, 3536, 10311, 3059, 913, 14827, 225, 3697, 353, 5849, 316,...
TixWidget.__init__(self, master, 'tixResizeHandle', ['options'], cnf, kw)
TixWidget.__init__(self, master, 'tixResizeHandle', ['options'], cnf, kw)
def __init__(self, master, cnf={}, **kw):
b0e44d61d9e592e1acd6aa05eac9704ba5776f61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0e44d61d9e592e1acd6aa05eac9704ba5776f61/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 23118, 28793, 2826, 9987, 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, ...
[ 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, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 23118, 28793, 2826, 9987, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
+ service_vessel + '/cronlog.txt" 2>&1; else tempconrtab=`mktemp` && ' \
+ service_vessel + '/cronlog.txt" 2>&1; else tempcrontab=`mktemp` && ' \
def add_seattle_to_crontab(): """ <Purpose> Adds an entry to the crontab to run seattle automatically at boot. <Arguments> None. <Exceptions> OSError if cron is not installed on this system. <Side Effects> Adds an entry to the crontab. <Returns> True if an entry for seattle was successfully added to the crontab, False otherwise. """ # Check to see if the crontab has already been modified to run seattle. crontab_contents_stdout,crontab_contents_stderr = \ subprocess.Popen(["crontab", "-l"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() if get_starter_file_name() in crontab_contents_stdout: raise AlreadyInstalledError("An entry for seattle was already detected " \ + "in the crontab.") # Since seattle is not already installed, modify crontab to run seattle at # boot. # Get the service vessel where standard error produced from cron will be # written. service_vessel = servicelogger.get_servicevessel() # The crontab entry is different if running on FreeBSD because the mktemp # command works differently on this system. if platform.system() == "FreeBSD": cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else ' \ + 'tempconrtab=`mktemp -t tempcrontab` && crontab -l | sed ' \ + '\'/start_seattle.sh/d\' > ${tempcrontab} && ' \ + 'crontab ${tempcrontab} && rm ${tempcrontab}; fi' + os.linesep else: cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else tempconrtab=`mktemp` && ' \ + 'crontab -l | sed \'/start_seattle.sh/d\' > ${tempcrontab} && ' \ + 'crontab ${tempcrontab} && rm ${tempcrontab}; fi' + os.linesep # Generate a temp file with the user's crontab plus our task. temp_crontab_file = tempfile.NamedTemporaryFile() temp_crontab_file.write(crontab_contents_stdout) temp_crontab_file.write(cron_line_entry) temp_crontab_file.flush() # Now, replace the crontab with that temp file and remove(close) the # tempfile. replace_crontab = subprocess.Popen(["crontab",temp_crontab_file.name], stdout=subprocess.PIPE, stderr=subprocess.PIPE) replace_crontab.wait() temp_crontab_file.close() # Finally, confirm that seattle was successfully added to the crontab and note # the result in the configuration file ('nodeman.cfg'). config = persist.restore_object('nodeman.cfg') crontab_contents_stdout,crontab_contents_stderr = \ subprocess.Popen(["crontab", "-l"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() if get_starter_file_name() in crontab_contents_stdout: config['crontab_updated_for_2009_installer'] = True persist.commit_object(config,'nodeman.cfg') return True else: # Although the default setting for # config['crontab_updated_for_2009_installer'] = False, it should still be # set in the event that there was a previous installer which set this value # to True, but now for whatever reason, installation in the crontab failed. config['crontab_updated_for_2009_installer'] = False persist.commit_object(config,'nodeman.cfg') return False
bbf7b365491b7d294e186c0a0973af3b8eae5a35 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/bbf7b365491b7d294e186c0a0973af3b8eae5a35/seattleinstaller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 307, 4558, 298, 67, 869, 67, 3353, 30335, 13332, 3536, 411, 10262, 4150, 34, 15605, 392, 1241, 358, 326, 4422, 30335, 358, 1086, 695, 4558, 298, 6635, 622, 4835, 18, 225, 411, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 307, 4558, 298, 67, 869, 67, 3353, 30335, 13332, 3536, 411, 10262, 4150, 34, 15605, 392, 1241, 358, 326, 4422, 30335, 358, 1086, 695, 4558, 298, 6635, 622, 4835, 18, 225, 411, ...
term._titlebox.set_from_icon_name(APP_NAME + '_receive_off', gtk.ICON_SIZE_MENU)
term._titlebox.set_from_icon_name('_receive_off', gtk.ICON_SIZE_MENU)
def on_vte_focus_in(self, vte, event): for term in self.terminator.term_list: idx = self.terminator.term_list.index(term) if term != self and term._group != None and term._group == self._group: # Not active, group is not none, and in active's group if self.terminator.groupsend == 0: term._titlebox.set_foreground_color(gtk.gdk.color_parse (self.conf.title_ia_txt_color)) term._titlebox.set_background_color(gtk.gdk.color_parse (self.conf.title_ia_bg_color)) term._titlebox.set_from_icon_name(APP_NAME + '_receive_off', gtk.ICON_SIZE_MENU) else: term._titlebox.set_foreground_color(gtk.gdk.color_parse (self.conf.title_rx_txt_color)) term._titlebox.set_background_color(gtk.gdk.color_parse (self.conf.title_rx_bg_color)) term._titlebox.set_from_icon_name(APP_NAME + '_receive_on', gtk.ICON_SIZE_MENU) elif term != self and term._group == None or term._group != self._group: # Not active, group is not none, not in active's group if self.terminator.groupsend == 2: term._titlebox.set_foreground_color(gtk.gdk.color_parse (self.conf.title_rx_txt_color)) term._titlebox.set_background_color(gtk.gdk.color_parse (self.conf.title_rx_bg_color)) term._titlebox.set_from_icon_name(APP_NAME + '_receive_on', gtk.ICON_SIZE_MENU) else: term._titlebox.set_foreground_color(gtk.gdk.color_parse (self.conf.title_ia_txt_color)) term._titlebox.set_background_color(gtk.gdk.color_parse (self.conf.title_ia_bg_color)) term._titlebox.set_from_icon_name(APP_NAME + '_receive_off', gtk.ICON_SIZE_MENU) else: term._titlebox.set_foreground_color(gtk.gdk.color_parse (self.conf.title_tx_txt_color)) term._titlebox.set_background_color(gtk.gdk.color_parse (self.conf.title_tx_bg_color)) if self.terminator.groupsend == 2: term._titlebox.set_from_icon_name(APP_NAME + '_active_broadcast_all', gtk.ICON_SIZE_MENU) elif self.terminator.groupsend == 1: term._titlebox.set_from_icon_name(APP_NAME + '_active_broadcast_group', gtk.ICON_SIZE_MENU) else: term._titlebox.set_from_icon_name(APP_NAME + '_active_broadcast_off', gtk.ICON_SIZE_MENU) return
03f5ea40d449d1481bd80eb4e3e2f3005c8217dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1032/03f5ea40d449d1481bd80eb4e3e2f3005c8217dc/terminatorterm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 90, 736, 67, 13923, 67, 267, 12, 2890, 16, 331, 736, 16, 871, 4672, 364, 2481, 316, 365, 18, 9505, 639, 18, 6408, 67, 1098, 30, 2067, 273, 365, 18, 9505, 639, 18, 6408, 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, 603, 67, 90, 736, 67, 13923, 67, 267, 12, 2890, 16, 331, 736, 16, 871, 4672, 364, 2481, 316, 365, 18, 9505, 639, 18, 6408, 67, 1098, 30, 2067, 273, 365, 18, 9505, 639, 18, 6408, 67...
m = m.gcd(a) P[i] = a for b in Q: if m.gcd(b) == 1: try: pts.append(X([ num/b for num in P ])) except: pass i = 0 m = ZZ(0)
def enum_affine_rational_field(X,B): """ Enumerates affine rational points on scheme X (defined over `\QQ`) up to bound B. INPUT: - ``X`` - a scheme or set of abstract rational points of a scheme - ``B`` - a positive integer bound OUTPUT: - a list containing the affine points of X of height up to B, sorted. EXAMPLES:: sage: A.<x,y,z> = AffineSpace(3,QQ) sage: from sage.schemes.generic.rational_point import enum_affine_rational_field sage: enum_affine_rational_field(A(QQ),1) [(-1, -1, -1), (-1, -1, 0), (-1, -1, 1), (-1, 0, -1), (-1, 0, 0), (-1, 0, 1), (-1, 1, -1), (-1, 1, 0), (-1, 1, 1), (0, -1, -1), (0, -1, 0), (0, -1, 1), (0, 0, -1), (0, 0, 0), (0, 0, 1), (0, 1, -1), (0, 1, 0), (0, 1, 1), (1, -1, -1), (1, -1, 0), (1, -1, 1), (1, 0, -1), (1, 0, 0), (1, 0, 1), (1, 1, -1), (1, 1, 0), (1, 1, 1)] :: sage: A.<w,x,y,z> = AffineSpace(4,QQ) sage: S = A.subscheme([x^2-y*z+3,w^3+z+y^2]) sage: enum_affine_rational_field(S(QQ),2) [] sage: enum_affine_rational_field(S(QQ),3) [(-2, 0, -3, -1)] :: sage: A.<x,y> = AffineSpace(2,QQ) sage: C = Curve(x^2+y-x) sage: enum_affine_rational_field(C,10) [(-2, -6), (-1, -2), (0, 0), (1, 0), (2, -2), (3, -6)] AUTHOR: David R. Kohel <kohel@maths.usyd.edu.au> (small adjustments by Charlie Turner 06-2010) """ if is_Scheme(X): X = X(X.base_ring()) n = X.codomain().ambient_space().ngens() if X.value_ring() is ZZ: Q = [ 1 ] else: # rational field Q = [ k+1 for k in range(B) ] R = [ 0 ] + [ s*k for k in range(1,B+1) for s in [1,-1] ] pts = [] P = [ 0 for _ in range(n) ] m = ZZ(0) try: pts.append(X(P)) except: pass iters = [ iter(R) for _ in range(n) ] [ iters[j].next() for j in range(n) ] i = 0 while i < n: try: a = ZZ(iters[i].next()) m = m.gcd(a) P[i] = a for b in Q: if m.gcd(b) == 1: try: pts.append(X([ num/b for num in P ])) except: pass i = 0 m = ZZ(0) except StopIteration: iters[i] = iter(R) # reset P[i] = iters[i].next() # reset P[i] to 0 and increment i += 1 pts.sort() return pts
0c1f24a85f1dccaf5341fcaca9e87554c8bacafa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0c1f24a85f1dccaf5341fcaca9e87554c8bacafa/rational_point.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2792, 67, 7329, 558, 67, 7034, 287, 67, 1518, 12, 60, 16, 38, 4672, 3536, 6057, 264, 815, 28381, 436, 8371, 3143, 603, 4355, 1139, 261, 2178, 1879, 1375, 64, 53, 53, 24065, 731, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2792, 67, 7329, 558, 67, 7034, 287, 67, 1518, 12, 60, 16, 38, 4672, 3536, 6057, 264, 815, 28381, 436, 8371, 3143, 603, 4355, 1139, 261, 2178, 1879, 1375, 64, 53, 53, 24065, 731, 358, ...
raise error, 'option -%s not recognized' % opt
raise GetoptError('option -%s not recognized' % opt, opt)
def short_has_arg(opt, shortopts): for i in range(len(shortopts)): if opt == shortopts[i] != ':': return shortopts[i+1:i+2] == ':' raise error, 'option -%s not recognized' % opt
a7904059d5d83aa20da1ab14c4b244a2aaeb5d0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a7904059d5d83aa20da1ab14c4b244a2aaeb5d0f/getopt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3025, 67, 5332, 67, 3175, 12, 3838, 16, 3025, 4952, 4672, 364, 277, 316, 1048, 12, 1897, 12, 6620, 4952, 3719, 30, 309, 2153, 422, 3025, 4952, 63, 77, 65, 480, 3921, 30, 327, 3025, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3025, 67, 5332, 67, 3175, 12, 3838, 16, 3025, 4952, 4672, 364, 277, 316, 1048, 12, 1897, 12, 6620, 4952, 3719, 30, 309, 2153, 422, 3025, 4952, 63, 77, 65, 480, 3921, 30, 327, 3025, 4...
(hdr, rpmloc) = h
hdr, rpmloc = h[0], h[1]
def _unpackError(self, bytes, total, h): (hdr, rpmloc) = h pkgtup = self._dopkgtup(hdr) txmbrs = self.base.tsInfo.getMembers(pkgtup=pkgtup) for txmbr in txmbrs: txmbr.output_state = TS_FAILED msg = "Error unpacking rpm package %s" % txmbr.po self.display.errorlog(msg) # FIXME - should we raise? I need a test case pkg to see what the # right behavior should be
55e5fb2fea38d08dfa5e256d6675eb14037b8fa0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/55e5fb2fea38d08dfa5e256d6675eb14037b8fa0/rpmtrans.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 17309, 668, 12, 2890, 16, 1731, 16, 2078, 16, 366, 4672, 7723, 16, 25228, 1829, 273, 366, 63, 20, 6487, 366, 63, 21, 65, 3475, 88, 416, 273, 365, 6315, 72, 556, 79, 4521, 416, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17309, 668, 12, 2890, 16, 1731, 16, 2078, 16, 366, 4672, 7723, 16, 25228, 1829, 273, 366, 63, 20, 6487, 366, 63, 21, 65, 3475, 88, 416, 273, 365, 6315, 72, 556, 79, 4521, 416, ...
iso8601_format = "%Y-%m-%dT%H:%M:%S.00Z"
def generateRSS(lst): """Generate a RSS 2.0 feed describing the list of packages. Return the libxml2.xmlDoc of the feed. This document must be freed using xmlDoc.freeDoc(). RSS 2.0 Specification: http://blogs.law.harvard.edu/tech/rss """ iso8601_format = "%Y-%m-%dT%H:%M:%S.00Z" rfc822_format = "%a, %d %b %Y %X GMT" xhtml_ns = "http://www.w3.org/1999/xhtml" now = time.strftime(rfc822_format, time.gmtime()) doc = libxml2.newDoc('1.0') escape = doc.encodeEntitiesReentrant rss = doc.newChild(None, 'rss', None) rss.setProp('version', '2.0') channel = rss.newChild(None, 'channel', None) channel.newChild(None, 'title', 'Yum Package List') channel.newChild(None, 'link', 'http://linux.duke.edu/projects/yum/') channel.newChild(None, 'description', 'Yum Package List') channel.newChild(None, 'pubDate', now) channel.newChild(None, 'generator', 'Yum') for pkg in lst: item = channel.newChild(None, 'item', None) title = escape(str(pkg)) item.newChild(None, 'title', title) date = time.gmtime(float(pkg.returnSimple('buildtime'))) item.newChild(None, 'pubDate', time.strftime(rfc822_format, date)) # build up changelog changelog = '' cnt = 0 for e in pkg.changelog: cnt += 1 if cnt > 3: changelog += '...' break (date, author, desc) = e date = time.strftime(rfc822_format, time.gmtime(float(date))) changelog += '%s - %s\n%s\n\n' % (date, author, desc) body = item.newChild(None, "body", None) body.newNs(xhtml_ns, None) body.newChild(None, "p", escape(pkg.returnSimple('summary'))) body.newChild(None, "pre", escape(pkg.returnSimple('description'))) body.newChild(None, "p", 'Change Log:') body.newChild(None, "pre", escape(changelog)) item.newChild(None, 'description', escape(changelog)) return doc
cbf62289f57bbab0b8940be7c00923e3747b39dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/cbf62289f57bbab0b8940be7c00923e3747b39dc/output.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 31211, 12, 16923, 4672, 3536, 4625, 279, 31481, 576, 18, 20, 4746, 16868, 326, 666, 434, 5907, 18, 2000, 326, 16394, 22, 18, 2902, 1759, 434, 326, 4746, 18, 1220, 1668, 1297, 506, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 31211, 12, 16923, 4672, 3536, 4625, 279, 31481, 576, 18, 20, 4746, 16868, 326, 666, 434, 5907, 18, 2000, 326, 16394, 22, 18, 2902, 1759, 434, 326, 4746, 18, 1220, 1668, 1297, 506, ...
self.flag_command(self.session.set_DHCP)
self.flag_command(self.session.set_DHCP, line)
def do_dhcp(self, line): self.flag_command(self.session.set_DHCP)
6348a397444293213ebed29101e9e92278a42177 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10805/6348a397444293213ebed29101e9e92278a42177/linksys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 19153, 4057, 12, 2890, 16, 980, 4672, 365, 18, 6420, 67, 3076, 12, 2890, 18, 3184, 18, 542, 67, 16501, 4258, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 19153, 4057, 12, 2890, 16, 980, 4672, 365, 18, 6420, 67, 3076, 12, 2890, 18, 3184, 18, 542, 67, 16501, 4258, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
rcl reg, reg, imm
rcli reg, reg, imm
def macroop RCL_R_I
114a82fa822a0123ec295fa2299d0b3189b7ba42 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7385/114a82fa822a0123ec295fa2299d0b3189b7ba42/rotate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 534, 5017, 67, 54, 67, 45, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 534, 5017, 67, 54, 67, 45, 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, ...
if not self.HasFlag(FNB_VC8): rect = self.GetClientRect(); clientWidth = rect.width; tabHeight = render.CalcTabHeight(self) tabWidth = render.CalcTabWidth(self, page, tabHeight) posx = self._pParent._nPadding if self._nFrom >= 0: for i in xrange(self._nFrom, len(self._pagesInfoVec)): if self._pagesInfoVec[i].GetPosition() == wx.Point(-1, -1): break posx += self._pagesInfoVec[i].GetSize().x if posx + tabWidth + render.GetButtonsAreaLength(self) >= clientWidth: return False return True else: vc8_render = render vTabInfo = vc8_render.NumberTabsCanFit(self) if page - self._nFrom >= len(vTabInfo): return False return True
vTabInfo = render.NumberTabsCanFit(self) if page - self._nFrom >= len(vTabInfo): return False return True
def CanFitToScreen(self, page): """ Returns wheter a tab can fit in the left space in the screen or not. """
6231770f8935b3a2c5e27a32b9103287076d9191 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/6231770f8935b3a2c5e27a32b9103287076d9191/flatnotebook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4480, 14219, 774, 7956, 12, 2890, 16, 1363, 4672, 3536, 2860, 600, 847, 279, 3246, 848, 4845, 316, 326, 2002, 3476, 316, 326, 5518, 578, 486, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4480, 14219, 774, 7956, 12, 2890, 16, 1363, 4672, 3536, 2860, 600, 847, 279, 3246, 848, 4845, 316, 326, 2002, 3476, 316, 326, 5518, 578, 486, 18, 3536, 2, -100, -100, -100, -100, -100, ...
if networkParams["ssid"]:
if networkParams.has_key("ssid"):
def initLogging(filename, debug=False): """Initialize logging.""" import logging, logging.handlers logger = logging.getLogger() if debug: logger.setLevel(logging.DEBUG) else: logger.setLevel(logging.INFO) handler = logging.FileHandler(filename) formatter = logging.Formatter("%(asctime)s:%(levelname)s:%(message)s") handler.setFormatter(formatter) logger.addHandler(handler) logger.info("networkwatcher running.")
a52f2adaeb5169e4c2875ac3716a8021423ed0b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14343/a52f2adaeb5169e4c2875ac3716a8021423ed0b0/networkwatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 7735, 12, 3459, 16, 1198, 33, 8381, 4672, 3536, 7520, 2907, 12123, 1930, 2907, 16, 2907, 18, 11046, 225, 1194, 273, 2907, 18, 588, 3328, 1435, 225, 309, 1198, 30, 1194, 18, 542, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 7735, 12, 3459, 16, 1198, 33, 8381, 4672, 3536, 7520, 2907, 12123, 1930, 2907, 16, 2907, 18, 11046, 225, 1194, 273, 2907, 18, 588, 3328, 1435, 225, 309, 1198, 30, 1194, 18, 542, ...
workingDirectory = '/afs/cern.ch/user/a/atsareg/test/CREAM'
if pilotOptions is None: return S_ERROR('Errors in compiling pilot options')
def __getExecutable(self,queue,pilotsToSubmit,bundleProxy=True): """ Prepare the full executable for queue """ result = gProxyManager.getPilotProxyFromDIRACGroup(self.genericPilotDN, self.genericPilotGroup, 1000 ) if not result['OK']: return result proxyString = result['Value'] proxy = '' if bundleProxy: proxy = proxyString pilotOptions = self.__getPilotOptions(queue,pilotsToSubmit) workingDirectory = '/afs/cern.ch/user/a/atsareg/test/CREAM' executable = self.__writePilotScript(self.workingDirectory, pilotOptions, proxy) result = S_OK() result['Executable'] = executable result['Proxy'] = proxyString return result
5da9405bb66c0cc3c09cb8a31c714e32f31f0ffd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/5da9405bb66c0cc3c09cb8a31c714e32f31f0ffd/SiteDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 17709, 12, 2890, 16, 4000, 16, 84, 330, 6968, 774, 11620, 16, 9991, 3886, 33, 5510, 4672, 3536, 7730, 326, 1983, 9070, 364, 2389, 3536, 225, 563, 273, 314, 3886, 1318, 18, 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, 1001, 588, 17709, 12, 2890, 16, 4000, 16, 84, 330, 6968, 774, 11620, 16, 9991, 3886, 33, 5510, 4672, 3536, 7730, 326, 1983, 9070, 364, 2389, 3536, 225, 563, 273, 314, 3886, 1318, 18, 5...
condition = "date>=\"%s\" and date<=\"%s\" and records.sport=sports.id_sports and sports.name=\"%s\"" %(date_ini,date_end, sport)
condition = "date>=\"%s\" and date<=\"%s\" and records.sport=sports.id_sports and sports.id_sports=\"%s\"" %(date_ini,date_end, sport)
def getrecordPeriod(self,date_ini, date_end, sport=None): #TODO This is essentially the same as getrecordPeriodSport (except date ranges) - need to look at merging the two tables = "records,sports" if not sport: condition = "date>=\"%s\" and date<=\"%s\" and records.sport=sports.id_sports" %(date_ini,date_end) else: condition = "date>=\"%s\" and date<=\"%s\" and records.sport=sports.id_sports and sports.name=\"%s\"" %(date_ini,date_end, sport)
9741794740667213845b1d1011c51fb21f9e941f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11865/9741794740667213845b1d1011c51fb21f9e941f/record.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3366, 5027, 12, 2890, 16, 712, 67, 8767, 16, 1509, 67, 409, 16, 272, 655, 33, 7036, 4672, 468, 6241, 1220, 353, 18518, 11220, 326, 1967, 487, 336, 3366, 5027, 55, 655, 261, 14137,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3366, 5027, 12, 2890, 16, 712, 67, 8767, 16, 1509, 67, 409, 16, 272, 655, 33, 7036, 4672, 468, 6241, 1220, 353, 18518, 11220, 326, 1967, 487, 336, 3366, 5027, 55, 655, 261, 14137,...
CGC = default_cgc()
cgc_path = default_cgc()
def main(cg_shader, CGC): matrixloadorder = get_matrixloadorder(cg_shader) glsl_vertex, glsl_fragment, log = cg_to_glsl(cg_shader, CGC) print log print fix_glsl(glsl_vertex) print print '// #o3d SplitMarker' print get_matrixloadorder(cg_shader).strip() print print fix_glsl(glsl_fragment)
2a3a06654561be5d0a871c950e7a791bea57bb75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/2a3a06654561be5d0a871c950e7a791bea57bb75/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 26275, 67, 674, 1143, 16, 385, 15396, 4672, 3148, 945, 1019, 273, 336, 67, 5667, 945, 1019, 12, 26275, 67, 674, 1143, 13, 5118, 2069, 67, 15281, 16, 5118, 2069, 67, 11956, 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, 2774, 12, 26275, 67, 674, 1143, 16, 385, 15396, 4672, 3148, 945, 1019, 273, 336, 67, 5667, 945, 1019, 12, 26275, 67, 674, 1143, 13, 5118, 2069, 67, 15281, 16, 5118, 2069, 67, 11956, 16...
return (self._state != self.Open)
return (self._state == self.Open)
def isOpen(self): """Return True if serial connection is open" """ return (self._state != self.Open)
7320d726c693ef4b5837cb2e152516a8f86f4cbd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6236/7320d726c693ef4b5837cb2e152516a8f86f4cbd/TkSerial.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16633, 12, 2890, 4672, 3536, 990, 1053, 309, 2734, 1459, 353, 1696, 6, 3536, 327, 261, 2890, 6315, 2019, 422, 365, 18, 3678, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16633, 12, 2890, 4672, 3536, 990, 1053, 309, 2734, 1459, 353, 1696, 6, 3536, 327, 261, 2890, 6315, 2019, 422, 365, 18, 3678, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
sequence2ast(tree)
parser.sequence2ast(tree)
def check_bad_tree(tree, label): print print label try: sequence2ast(tree) except parser.ParserError: print "caught expected exception for invalid tree" pass else: print "test failed: did not properly detect invalid tree:" pprint.pprint(tree)
02a295b8a443321ca1fe9fb2b47e4b910e8e0bb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/02a295b8a443321ca1fe9fb2b47e4b910e8e0bb6/test_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 8759, 67, 3413, 12, 3413, 16, 1433, 4672, 1172, 1172, 1433, 775, 30, 2082, 18, 6178, 22, 689, 12, 3413, 13, 1335, 2082, 18, 2678, 668, 30, 1172, 315, 27611, 2665, 1520, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 8759, 67, 3413, 12, 3413, 16, 1433, 4672, 1172, 1172, 1433, 775, 30, 2082, 18, 6178, 22, 689, 12, 3413, 13, 1335, 2082, 18, 2678, 668, 30, 1172, 315, 27611, 2665, 1520, 364, ...
ops = self.get_by_bytecode("CALL_METHOD")
ops = self.get_by_bytecode("LOOKUP_METHOD") assert not ops[0] assert not ops[1] ops = self.get_by_bytecode("CALL_METHOD", True)
def main(n): i = 0 a = A(1) while i < n: x = a.f(i) i = a.f(x) return i
34b381d7e133e70b31149583a9364690ecb4be93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/34b381d7e133e70b31149583a9364690ecb4be93/test_pypy_c.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 82, 4672, 277, 273, 374, 279, 273, 432, 12, 21, 13, 1323, 277, 411, 290, 30, 619, 273, 279, 18, 74, 12, 77, 13, 277, 273, 279, 18, 74, 12, 92, 13, 327, 277, 2, 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, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 82, 4672, 277, 273, 374, 279, 273, 432, 12, 21, 13, 1323, 277, 411, 290, 30, 619, 273, 279, 18, 74, 12, 77, 13, 277, 273, 279, 18, 74, 12, 92, 13, 327, 277, 2, -100, ...
page_namespace = site.family.namespaces[104]['la']
page_namespace = site.family.namespaces[104][site.lang]
def treat(self, pageno): """ Loads the given page, does some changes, and saves it. """
2d2eaea551fa80bca8d41fe414a8204974954c88 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/2d2eaea551fa80bca8d41fe414a8204974954c88/djvutext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10116, 12, 2890, 16, 4262, 5764, 4672, 3536, 4444, 87, 326, 864, 1363, 16, 1552, 2690, 3478, 16, 471, 14649, 518, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10116, 12, 2890, 16, 4262, 5764, 4672, 3536, 4444, 87, 326, 864, 1363, 16, 1552, 2690, 3478, 16, 471, 14649, 518, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.bary.SetControlValue(vy)
if vy == None: self.bary.HiliteControl(255) self.bary_enabled = 0 else: if not self.bary_enabled: self.bary_enabled = 1 if self.activated: self.bary.HiliteControl(0) self.bary.SetControlValue(vy) def scalebarvalue(self, absmin, absmax, curmin, curmax): if curmin <= absmin and curmax >= absmax: return None if curmin <= absmin: return 0 if curmax >= absmax: return 32767 perc = float(curmin-absmin)/float(absmax-absmin) return int(perc*32767)
def updatescrollbars(self): SetPort(self.wid) vx, vy = self.getscrollbarvalues() if self.barx: self.barx.SetControlValue(vx) if self.bary: self.bary.SetControlValue(vy)
7bfc875270587bd6819702ab51d0a6a41aaec0cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7bfc875270587bd6819702ab51d0a6a41aaec0cb/FrameWork.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2166, 270, 742, 2693, 13518, 12, 2890, 4672, 1000, 2617, 12, 2890, 18, 30902, 13, 17911, 16, 24993, 273, 365, 18, 588, 12033, 3215, 2372, 1435, 309, 365, 18, 3215, 92, 30, 365, 18, 321...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2166, 270, 742, 2693, 13518, 12, 2890, 4672, 1000, 2617, 12, 2890, 18, 30902, 13, 17911, 16, 24993, 273, 365, 18, 588, 12033, 3215, 2372, 1435, 309, 365, 18, 3215, 92, 30, 365, 18, 321...
if self.debug > 0: print 'setting: %s. self.ready = False ' % key
log.debug('setting: %s. self.ready = False ' % key)
def set(self, **kwargs): '''set a parameter
e111e7f7da49e775bf6f578ffb8369e435e7a68c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/e111e7f7da49e775bf6f578ffb8369e435e7a68c/jacapo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 2826, 4333, 4672, 9163, 542, 279, 1569, 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, 1652, 444, 12, 2890, 16, 2826, 4333, 4672, 9163, 542, 279, 1569, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if ev.type == 'action': action = ev.action
if ev.type == 'action': action = ev.action
def indent_block(text): return '\n'.join([' %s' % line for line in text.split('\n')])
f82b807905125f1ddcce4b0029163f2497bc5d0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/f82b807905125f1ddcce4b0029163f2497bc5d0b/format_transcript.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3504, 67, 2629, 12, 955, 4672, 327, 2337, 82, 10332, 5701, 12, 3292, 565, 738, 87, 11, 738, 980, 565, 364, 980, 316, 977, 18, 4939, 2668, 64, 82, 6134, 5717, 225, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3504, 67, 2629, 12, 955, 4672, 327, 2337, 82, 10332, 5701, 12, 3292, 565, 738, 87, 11, 738, 980, 565, 364, 980, 316, 977, 18, 4939, 2668, 64, 82, 6134, 5717, 225, 2, -100, -100, -100...
tokens = self.parseAction( instring, tokensStart, retTokens )
for fn in self.parseAction: tokens = fn( instring, tokensStart, retTokens ) if tokens is not None: if isinstance(tokens,tuple): tokens = tokens[1] warnings.warn("Returning loc from parse actions is deprecated, return only modified tokens", DeprecationWarning,stacklevel=2) retTokens = ParseResults( tokens, self.resultsName, asList=self.saveAsList and isinstance(tokens,(ParseResults,list)), modal=self.modalResults ) except ParseException, err: if (self.debugActions[2] ): self.debugActions[2]( instring, tokensStart, self, err ) raise else: for fn in self.parseAction: tokens = fn( instring, tokensStart, retTokens )
def parse( self, instring, loc, doActions=True, callPreParse=True ): debugging = ( self.debug ) #and doActions )
cf270a876802009d82e8d28923bdd6b889a1f506 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3693/cf270a876802009d82e8d28923bdd6b889a1f506/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 365, 16, 316, 1080, 16, 1515, 16, 741, 6100, 33, 5510, 16, 745, 1386, 3201, 33, 5510, 262, 30, 10450, 273, 261, 365, 18, 4148, 262, 468, 464, 741, 6100, 262, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 365, 16, 316, 1080, 16, 1515, 16, 741, 6100, 33, 5510, 16, 745, 1386, 3201, 33, 5510, 262, 30, 10450, 273, 261, 365, 18, 4148, 262, 468, 464, 741, 6100, 262, 2, -100, -100,...
self.debug('Checking Loop Starts for job: '+str(job))
self.log.debug('Checking Loop Starts for job: '+str(job))
def checkJob(self,job): """ This method controls the order and presence of each sanity check for submitted jobs. This should be easily extended in the future to accommodate any other potential checks. """
a6debbed9900a8e23c472e793e54d6837cc52921 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/a6debbed9900a8e23c472e793e54d6837cc52921/JobSanityAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 2278, 12, 2890, 16, 4688, 4672, 3536, 1220, 707, 11022, 326, 1353, 471, 9805, 434, 1517, 16267, 866, 364, 9638, 6550, 18, 1220, 1410, 506, 17997, 7021, 316, 326, 3563, 358, 28217, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 866, 2278, 12, 2890, 16, 4688, 4672, 3536, 1220, 707, 11022, 326, 1353, 471, 9805, 434, 1517, 16267, 866, 364, 9638, 6550, 18, 1220, 1410, 506, 17997, 7021, 316, 326, 3563, 358, 28217, 1...
'if NOT "%%_4ver%%" == "" "%(python)s" -O -c "from %(package)s.scripts.%(module)s import run; run()" %%$\n' 'if "%%_4ver%%" == "" "%(python)s" -O -c "from %(package)s.scripts.%(module)s import run; run()" %%*\n'
'if NOT "%%_4ver%%" == "" "%(python)s" -c "from %(package)s.scripts.%(module)s import run; run()" %%$\n' 'if "%%_4ver%%" == "" "%(python)s" -c "from %(package)s.scripts.%(module)s import run; run()" %%*\n'
def copy_scripts(self): """ Create each script listed in 'self.scripts' """ if not self.package_name: raise Exception("You have to inherit build_scripts_create and" " provide a package name")
e43001d731ec5b7816c0a309354ad7994c728291 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e43001d731ec5b7816c0a309354ad7994c728291/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 12827, 12, 2890, 4672, 3536, 1788, 1517, 2728, 12889, 316, 296, 2890, 18, 12827, 11, 3536, 309, 486, 365, 18, 5610, 67, 529, 30, 1002, 1185, 2932, 6225, 1240, 358, 6811, 1361, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 12827, 12, 2890, 4672, 3536, 1788, 1517, 2728, 12889, 316, 296, 2890, 18, 12827, 11, 3536, 309, 486, 365, 18, 5610, 67, 529, 30, 1002, 1185, 2932, 6225, 1240, 358, 6811, 1361, ...
if isinstance(v, int):
if isinstance(v, default_int):
def set_solver_options(self, solver_args): """ Set options for the solver. Parameters: solver_args -- Dict with int, real or string options for the solver ipopt. """ for k, v in solver_args.iteritems(): if isinstance(v, int): self.nlp_ipopt.opt_sim_ipopt_set_int_option(k, v) elif isinstance(v, float): self.nlp_ipopt.opt_sim_ipopt_set_num_option(k, v) elif isinstance(v, str): self.nlp_ipopt.opt_sim_ipopt_set_string_option(k, v)
1c4965eb95357f4f1bbf3412aa51b77dd94464a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7711/1c4965eb95357f4f1bbf3412aa51b77dd94464a4/algorithm_drivers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 27198, 67, 2116, 12, 2890, 16, 12776, 67, 1968, 4672, 3536, 1000, 702, 364, 326, 12776, 18, 225, 7012, 30, 12776, 67, 1968, 1493, 9696, 598, 509, 16, 2863, 578, 533, 702, 364,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 27198, 67, 2116, 12, 2890, 16, 12776, 67, 1968, 4672, 3536, 1000, 702, 364, 326, 12776, 18, 225, 7012, 30, 12776, 67, 1968, 1493, 9696, 598, 509, 16, 2863, 578, 533, 702, 364,...
mainsizer.Add(self.notebox)
self.mainsizer.Add(self.notebox)
def __init__(self, group, model, group_name = 'default', annotations = None): wx.Frame.__init__(self, None, -1, "Annotations for " + group_name,style = wx.DEFAULT_FRAME_STYLE | wx.RESIZE_BORDER ) self.panel = wx.Panel(self, -1, size = self.GetSize() ) #self.textBox = wx.TextCtrl(self.panel, -1, txt, style= wx.TE_MULTILINE) self.okBtn = wx.Button(self.panel, id=wx.ID_OK) self.cancelBtn = wx.Button(self.panel, id=wx.ID_CANCEL) self.Bind(wx.EVT_BUTTON, self.OnOkay, self.okBtn) self.Bind(wx.EVT_BUTTON, self.OnCancel, self.cancelBtn) self.group = group self.model = model self.annotations = [] self.notebox = wx.FlexGridSizer(2,2, 0,0) self.notebox.Add(wx.StaticText(self.panel, -1, 'Name')) self.notebox.Add(wx.StaticText(self.panel, -1, 'Value')) self.notebox.AddGrowableCol(0,1) self.notebox.AddGrowableCol(1,1) if annotations is not None: for note in annotations: self.notebox.SetRows(self.notebox.GetRows()+1) name = wx.TextCtrl(self.panel, -1, note[0]) value = wx.TextCtrl(self.panel, -1, note[1]) self.notebox.Add(name) self.notebox.Add(value) self.annotations.append((name,value)) self.Bind(wx.EVT_TEXT, self.OnNotes, name) self.Bind(wx.EVT_TEXT, self.OnNotes, value) name = wx.TextCtrl(self.panel, -1, '') value = wx.TextCtrl(self.panel, -1, '') self.notebox.Add(name) self.notebox.Add(value) self.Bind(wx.EVT_TEXT, self.OnNotes, name) self.Bind(wx.EVT_TEXT, self.OnNotes, value) self.annotations.append((name,value)) #layout mainsizer = wx.BoxSizer(wx.VERTICAL) #mainsizer.Add(self.textBox,1,wx.EXPAND) mainsizer.Add(self.notebox) btnsizer = wx.BoxSizer(wx.HORIZONTAL) btnsizer.Add((10,10),1) btnsizer.Add(self.cancelBtn) btnsizer.Add((10,10)) btnsizer.Add(self.okBtn) btnsizer.Add((10,10)) mainsizer.Add(btnsizer, 0, wx.EXPAND) self.panel.SetSizer(mainsizer) mainsizer.Fit(self)
d268b929dc1c28ee3e2bcc995f6c844853952b7a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9486/d268b929dc1c28ee3e2bcc995f6c844853952b7a/AnnotateFrame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1041, 16, 938, 16, 1041, 67, 529, 273, 296, 1886, 2187, 5617, 273, 599, 4672, 7075, 18, 3219, 16186, 2738, 972, 12, 2890, 16, 599, 16, 300, 21, 16, 315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1041, 16, 938, 16, 1041, 67, 529, 273, 296, 1886, 2187, 5617, 273, 599, 4672, 7075, 18, 3219, 16186, 2738, 972, 12, 2890, 16, 599, 16, 300, 21, 16, 315...
for t,fname in enum(self):
for t,fname in self.enum():
def get_Nb_density(self, averaged=True): nbs = np.empty((self.size)) Vs = np.empty((self.size)) for t,fname in enum(self): coords = np.loadtxt(fname,delimiter='\t', skiprows=2) nbs[t-self.offset] = len(coords) Vs[t-self.offset] = np.ptp(coords, axis=0).prod() if averaged: return (nbs/Vs).mean() else: return (nbs, Vs)
f6b41338b974c6729411daaeac37e1cd5466224c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3150/f6b41338b974c6729411daaeac37e1cd5466224c/experiment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 22816, 67, 18781, 12, 2890, 16, 23713, 11349, 33, 5510, 4672, 290, 2038, 273, 1130, 18, 5531, 12443, 2890, 18, 1467, 3719, 776, 87, 273, 1130, 18, 5531, 12443, 2890, 18, 1467, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 22816, 67, 18781, 12, 2890, 16, 23713, 11349, 33, 5510, 4672, 290, 2038, 273, 1130, 18, 5531, 12443, 2890, 18, 1467, 3719, 776, 87, 273, 1130, 18, 5531, 12443, 2890, 18, 1467, ...
if hasattr(self, '_type_url'): if type in self._type_url: return self._type_url[type] else: self._type_url = {} self._type_url[type] = '/%s/%s/' % (type, '/'.join(self.anchor.tree_encode()[-2:])) return self._type_url[type]
def _really_get_type_url(self): if hasattr(self, '_type_url'): if type in self._type_url: return self._type_url[type] else: self._type_url = {} self._type_url[type] = '/%s/%s/' % (type, '/'.join(self.anchor.tree_encode()[-2:])) return self._type_url[type] return property(_really_get_type_url)
def _get_type_url(self, type): if hasattr(self, '_type_url'): if type in self._type_url: return self._type_url[type] else: self._type_url = {}
9d88cda6fe81a76d0182aee50530610052e05e2f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12041/9d88cda6fe81a76d0182aee50530610052e05e2f/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 723, 67, 718, 12, 2890, 16, 618, 4672, 309, 3859, 12, 2890, 16, 2070, 723, 67, 718, 11, 4672, 309, 618, 316, 365, 6315, 723, 67, 718, 30, 327, 365, 6315, 723, 67, 718...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 723, 67, 718, 12, 2890, 16, 618, 4672, 309, 3859, 12, 2890, 16, 2070, 723, 67, 718, 11, 4672, 309, 618, 316, 365, 6315, 723, 67, 718, 30, 327, 365, 6315, 723, 67, 718...
his2 = history.clone() mvs, score = alphaBeta(self, his2, 1, -9999, 9999)
mvs, score = alphaBeta(self, history[-1], 1, -9999, 9999)
def runAnalyze (self, history): self.analyzeLock.acquire() del self.analyzeMoves[:] his2 = history.clone() mvs, score = alphaBeta(self, his2, 1, -9999, 9999) self.analyzeMoves = mvs if mvs: self.emit("analyze", mvs) # TODO: When PyChess is put in its own process, # this should be turned into a loop, seaking deeper and deeper if len(history) == self.analyzingBoard: mvs, score = alphaBeta(self, his2, 2, -9999, 9999) self.analyzeMoves = mvs if mvs: self.emit("analyze", mvs) self.analyzeLock.release()
33aed89a2f7c6e52014e708b62339c91f9bc2e13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5339/33aed89a2f7c6e52014e708b62339c91f9bc2e13/PyChess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 31984, 261, 2890, 16, 4927, 4672, 365, 18, 304, 9508, 2531, 18, 1077, 1039, 1435, 1464, 365, 18, 304, 9508, 19297, 10531, 65, 225, 312, 6904, 16, 4462, 273, 4190, 38, 1066, 12, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 31984, 261, 2890, 16, 4927, 4672, 365, 18, 304, 9508, 2531, 18, 1077, 1039, 1435, 1464, 365, 18, 304, 9508, 19297, 10531, 65, 225, 312, 6904, 16, 4462, 273, 4190, 38, 1066, 12, 2...
for dep in unresolved[pkg]:
for dep in conflicts[pkg]:
def __runDepResolution(self): """Try to resolve all dependencies and remove all conflicts..
61e83336822cb5d95e6b9b429d15f49436c1bdaa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/61e83336822cb5d95e6b9b429d15f49436c1bdaa/yum.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2681, 16316, 11098, 12, 2890, 4672, 3536, 7833, 358, 2245, 777, 5030, 471, 1206, 777, 14450, 838, 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, 1001, 2681, 16316, 11098, 12, 2890, 4672, 3536, 7833, 358, 2245, 777, 5030, 471, 1206, 777, 14450, 838, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
print "HIT"
def _getSchema(self): """return the schema associated with this instance""" # PHASE: Collect # using the policy schemaSources = self._schemaPolicy.collect(self) ### XXX Each axis should hand back a token that we can ## resubmit to validate our cache, but I will punt now ## and do full composite. Fake something for now if self._schemaPolicy.validate(self, schemaSources): print "HIT" return self.schema
75e08a74a464f86886370e505a9d643843e1dfbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/75e08a74a464f86886370e505a9d643843e1dfbc/Provider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 3078, 12, 2890, 4672, 3536, 2463, 326, 1963, 3627, 598, 333, 791, 8395, 468, 15490, 4429, 30, 9302, 468, 1450, 326, 3329, 1963, 8628, 273, 365, 6315, 4821, 2582, 18, 14676, 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, 389, 588, 3078, 12, 2890, 4672, 3536, 2463, 326, 1963, 3627, 598, 333, 791, 8395, 468, 15490, 4429, 30, 9302, 468, 1450, 326, 3329, 1963, 8628, 273, 365, 6315, 4821, 2582, 18, 14676, 12,...
externalID = Calais.content_id(text)
externalID = self.content_id( text )
def analyze(self, text, content_type="text/txt"): """ Submits 'text' to OpenCalais for analysis and memorizes the extracted metadata. Set the content-type to 'text/html' if you are submitting HTML data. """ externalID = Calais.content_id(text) paramsXML = PARAMS_XML % (content_type, self.allow_distro, self.allow_search, externalID, self.submitter) param = urllib.urlencode({'licenseID':self.api_key, 'content':text, 'paramsXML':paramsXML}) # do not fetch the data again, if a file exists in the cache get_calias_data = urllib.urlopen(OPENCALAIS_URL, param).read if self.cache is None: xml_data = unpack( get_calias_data() ) else: xml_data = unpack( self.cache.fetch( externalID, get_calias_data ) )
81e94b045477ce84d5691e72cef69f651c8d471e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6604/81e94b045477ce84d5691e72cef69f651c8d471e/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12375, 12, 2890, 16, 977, 16, 913, 67, 723, 1546, 955, 19, 5830, 6, 4672, 3536, 2592, 22679, 296, 955, 11, 358, 3502, 3005, 69, 291, 364, 6285, 471, 1663, 280, 3128, 326, 9438, 1982, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12375, 12, 2890, 16, 977, 16, 913, 67, 723, 1546, 955, 19, 5830, 6, 4672, 3536, 2592, 22679, 296, 955, 11, 358, 3502, 3005, 69, 291, 364, 6285, 471, 1663, 280, 3128, 326, 9438, 1982, ...
msg['In-Replay-To'] = self.messageID
msg['In-Reply-To'] = self.messageID
def run(self): sbjct = self.sbjct sbjct = eg.ParseString(sbjct) From = self.From To = self.To To = eg.ParseString(To) Copy = self.Copy Txt = self.Txt Txt = eg.ParseString(Txt) Append = self.Append Append = eg.ParseString(Append) toName = self.toName toName = eg.ParseString(toName) choices = [item[0] for item in self.plugin.texts] if Append in choices: indx = choices.index(Append) Append = self.plugin.texts[indx][1] else: Append = None From = From.split(' - ')[-1] indx = [item[0] for item in self.plugin.configs].index(From) account = self.plugin.configs[indx] try: indx = [item[0] for item in self.plugin.servers].index(account[8]) except: eg.PrintError(text.error5 % (account[8], self.plugin.servers[0][0])) indx = 0 server = self.plugin.servers[indx] choices = [item[0] for item in self.plugin.groups] if Copy in choices: indx = choices.index(Copy) Copy = self.plugin.groups[indx][1] else: Copy = None
b38dc8881c425781e3bd5f610cc554c4d034a6be /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/b38dc8881c425781e3bd5f610cc554c4d034a6be/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 272, 441, 299, 273, 365, 18, 87, 441, 299, 272, 441, 299, 273, 9130, 18, 3201, 780, 12, 87, 441, 299, 13, 6338, 273, 365, 18, 1265, 2974, 273, 365, 18, 774, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 272, 441, 299, 273, 365, 18, 87, 441, 299, 272, 441, 299, 273, 9130, 18, 3201, 780, 12, 87, 441, 299, 13, 6338, 273, 365, 18, 1265, 2974, 273, 365, 18, 774, 2...
flag = False
flag = membership_flag = False product_ids = []
def action_move_create(self, cr, uid, ids, context=None): flag = False move_obj = self.pool.get('account.move') move_line_obj = self.pool.get('account.move.line') data_invoice = self.browse(cr,uid,ids[0]) #raise an error if one of the account_invoice_line doesn't have an analytic entry for line in data_invoice.invoice_line: if not line.analytics_id: flag = True if flag: raise osv.except_osv('Error!','Invoice line should have Analytic Distribution to create Analytic Entries.') super(account_invoice, self).action_move_create(cr, uid, ids, context)
36016262e7995e40cbf781e6a0aa6ce4ff03c103 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/36016262e7995e40cbf781e6a0aa6ce4ff03c103/cci_account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 8501, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 2982, 273, 12459, 67, 6420, 273, 1083, 3017, 67, 2232, 273, 5378, 3635, 67, 2603, 273, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 8501, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 2982, 273, 12459, 67, 6420, 273, 1083, 3017, 67, 2232, 273, 5378, 3635, 67, 2603, 273, 365, ...
"""Setup 'self.sock' and 'self.file'."""
"""Setup connection to remote server on "host:port". This connection will be used by the routines: read, readline, send, shutdown. """
def open(self, host, port): """Setup 'self.sock' and 'self.file'.""" self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.sock.connect((self.host, self.port)) self.file = self.sock.makefile('r')
15e5d5344d572e78397473e5fbba38e9d25d7b0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/15e5d5344d572e78397473e5fbba38e9d25d7b0f/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 1479, 16, 1756, 4672, 3536, 7365, 1459, 358, 2632, 1438, 603, 315, 2564, 30, 655, 9654, 1220, 1459, 903, 506, 1399, 635, 326, 28580, 30, 855, 16, 12023, 16, 1366, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 1479, 16, 1756, 4672, 3536, 7365, 1459, 358, 2632, 1438, 603, 315, 2564, 30, 655, 9654, 1220, 1459, 903, 506, 1399, 635, 326, 28580, 30, 855, 16, 12023, 16, 1366, 1...
self.cur = self.curtable.addRow(attrs)
if attrs: self.curtable.addRow(dict(attrs)) else: self.cur = self.curtable.addRow()
def table_row(self, on, attrs=(), **kw): if(on): self.cur = self.curtable.addRow(attrs) return ""
1433435f169a98600ed153334470f8365d04459c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/1433435f169a98600ed153334470f8365d04459c/text_docbook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1014, 67, 492, 12, 2890, 16, 603, 16, 3422, 33, 9334, 2826, 9987, 4672, 309, 12, 265, 4672, 309, 3422, 30, 365, 18, 1397, 2121, 18, 1289, 1999, 12, 1576, 12, 7039, 3719, 469, 30, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1014, 67, 492, 12, 2890, 16, 603, 16, 3422, 33, 9334, 2826, 9987, 4672, 309, 12, 265, 4672, 309, 3422, 30, 365, 18, 1397, 2121, 18, 1289, 1999, 12, 1576, 12, 7039, 3719, 469, 30, 365...
comment = Bytes(
comment = Text(
def __delitem__(schema_id): """Remove a stored schema with a given id."""
02232372bbd8dbf185adda3e1c3ba92a61d1eeb0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/02232372bbd8dbf185adda3e1c3ba92a61d1eeb0/app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 1726, 972, 12, 4821, 67, 350, 4672, 3536, 3288, 279, 4041, 1963, 598, 279, 864, 612, 12123, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3771, 1726, 972, 12, 4821, 67, 350, 4672, 3536, 3288, 279, 4041, 1963, 598, 279, 864, 612, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
print "line '%s' gives name %s" % (line, name)
def calculateName(cls, line): firstComma = line.find(",") firstSemiColon = line.find(";") firstParen = line.find("(") ndx = min([ x for x in [firstComma, firstSemiColon, firstParen] if x > 0])
10d8221f1dfc279977da23fe690564d82febb85a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11493/10d8221f1dfc279977da23fe690564d82febb85a/moleculizermol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4604, 461, 12, 6429, 16, 980, 4672, 1122, 15594, 273, 980, 18, 4720, 2932, 16, 7923, 1122, 13185, 77, 19636, 273, 980, 18, 4720, 2932, 4868, 13, 1122, 25520, 273, 980, 18, 4720, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4604, 461, 12, 6429, 16, 980, 4672, 1122, 15594, 273, 980, 18, 4720, 2932, 16, 7923, 1122, 13185, 77, 19636, 273, 980, 18, 4720, 2932, 4868, 13, 1122, 25520, 273, 980, 18, 4720, 2932, ...
outbound = Leg(outboundCookie, call.dialog) outbound.outgoingCall() self._voiceapps[voiceappCookie].va_callanswered(outbound) def outboundCallFailed(self, voiceappCookie, outboundCookie, exc):
leg.setDialog(call.dialog) leg.outgoingCall() self._voiceapps[voiceappCookie].va_callanswered(leg) def outboundCallFailed(self, leg, voiceappCookie, outboundCookie, exc):
def outboundCallConnected(self, voiceappCookie, outboundCookie): from shtoom.doug.leg import Leg print "outbound connected!", voiceappCookie, outboundCookie call = self._calls[outboundCookie] outbound = Leg(outboundCookie, call.dialog) outbound.outgoingCall() self._voiceapps[voiceappCookie].va_callanswered(outbound)
0a599aead52cb5bddd70ca10db6281a00467e650 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1265/0a599aead52cb5bddd70ca10db6281a00467e650/doug.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11663, 1477, 8932, 12, 2890, 16, 15063, 2910, 6151, 16, 11663, 6151, 4672, 628, 272, 647, 4252, 18, 2896, 637, 18, 1935, 1930, 17167, 1172, 315, 659, 3653, 5840, 5, 3113, 15063, 2910, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11663, 1477, 8932, 12, 2890, 16, 15063, 2910, 6151, 16, 11663, 6151, 4672, 628, 272, 647, 4252, 18, 2896, 637, 18, 1935, 1930, 17167, 1172, 315, 659, 3653, 5840, 5, 3113, 15063, 2910, 61...
lib = env.SharedLibrary(target, source, *args, **kw) result = env.ChromeInstall('$LIB_DIR', lib)
result = env.SharedLibrary('$LIB_DIR/' + str(target), source, *args, **kw)
def ChromeSharedLibrary(env, target, source, *args, **kw): source = compilable_files(env, source) if env.get('_GYP'): lib = env.SharedLibrary(target, source, *args, **kw) result = env.ChromeInstall('$LIB_DIR', lib) else: kw['COMPONENT_STATIC'] = False result = [env.ComponentLibrary(target, source, *args, **kw)[0]] if env.get('INCREMENTAL'): env.Precious(result) return result
8654036d617cd47db19b21a8c6cafb9c6bbf29f1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/8654036d617cd47db19b21a8c6cafb9c6bbf29f1/chromium_builders.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15159, 7887, 9313, 12, 3074, 16, 1018, 16, 1084, 16, 380, 1968, 16, 2826, 9987, 4672, 1084, 273, 1161, 330, 429, 67, 2354, 12, 3074, 16, 1084, 13, 309, 1550, 18, 588, 2668, 67, 20564, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15159, 7887, 9313, 12, 3074, 16, 1018, 16, 1084, 16, 380, 1968, 16, 2826, 9987, 4672, 1084, 273, 1161, 330, 429, 67, 2354, 12, 3074, 16, 1084, 13, 309, 1550, 18, 588, 2668, 67, 20564, ...
self.say('?learn some-concept is Not-very-long-definition ;)')
self.say('I need an \'is\' in the middle')
def cmd_learn(self, m): """ Learn a definition """ if (m == ""): return words = m.split() if (len(words) < 3): self.say('?learn some-concept is Not-very-long-definition ;)') return try: pos = words.index('is') except: self.say('?learn some-concept is Not-very-long-definition ;)') return concept = string.lower(' '.join(words[:pos])) definition = ' '.join(words[pos+1:]) self.definitions[concept] = definition # Save definition in file try: f = open(self.def_file, 'a') pickle.dump(self.definitions, f) f.close() self.say('I am a smarter bot.') except: pass
15a91ae44286c89635509f89cd2f770768d87b8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9641/15a91ae44286c89635509f89cd2f770768d87b8b/jibot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 21346, 12, 2890, 16, 312, 4672, 3536, 3519, 1303, 279, 2379, 3536, 309, 261, 81, 422, 1408, 4672, 327, 4511, 273, 312, 18, 4939, 1435, 309, 261, 1897, 12, 3753, 13, 411, 890,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 21346, 12, 2890, 16, 312, 4672, 3536, 3519, 1303, 279, 2379, 3536, 309, 261, 81, 422, 1408, 4672, 327, 4511, 273, 312, 18, 4939, 1435, 309, 261, 1897, 12, 3753, 13, 411, 890,...
makefile_in = os.path.join(exec_prefix, 'Modules', 'Makefile')
makefile_in = os.path.join(exec_prefix, 'Makefile')
def main(): # overridable context prefix = None # settable with -p option exec_prefix = None # settable with -P option extensions = [] exclude = [] # settable with -x option addn_link = [] # settable with -l, but only honored under Windows. path = sys.path[:] modargs = 0 debug = 1 odir = '' win = sys.platform[:3] == 'win' replace_paths = [] # settable with -r option error_if_any_missing = 0 # default the exclude list for each platform if win: exclude = exclude + [ 'dos', 'dospath', 'mac', 'macpath', 'macfs', 'MACFS', 'posix', 'os2', 'ce', 'riscos', 'riscosenviron', 'riscospath', ] fail_import = exclude[:] # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' subsystem = 'console' # parse command line by first replacing any "-i" options with the # file contents. pos = 1 while pos < len(sys.argv)-1: # last option can not be "-i", so this ensures "pos+1" is in range! if sys.argv[pos] == '-i': try: options = open(sys.argv[pos+1]).read().split() except IOError, why: usage("File name '%s' specified with the -i option " "can not be read - %s" % (sys.argv[pos+1], why) ) # Replace the '-i' and the filename with the read params. sys.argv[pos:pos+2] = options pos = pos + len(options) - 1 # Skip the name and the included args. pos = pos + 1 # Now parse the command line with the extras inserted. try: opts, args = getopt.getopt(sys.argv[1:], 'r:a:dEe:hmo:p:P:qs:wX:x:l:') except getopt.error, msg: usage('getopt error: ' + str(msg)) # proces option arguments for o, a in opts: if o == '-h': print __doc__ return if o == '-d': debug = debug + 1 if o == '-e': extensions.append(a) if o == '-m': modargs = 1 if o == '-o': odir = a if o == '-p': prefix = a if o == '-P': exec_prefix = a if o == '-q': debug = 0 if o == '-w': win = not win if o == '-s': if not win: usage("-s subsystem option only on Windows") subsystem = a if o == '-x': exclude.append(a) if o == '-X': exclude.append(a) fail_import.append(a) if o == '-E': error_if_any_missing = 1 if o == '-l': addn_link.append(a) if o == '-a': apply(modulefinder.AddPackagePath, tuple(a.split("=", 2))) if o == '-r': f,r = a.split("=", 2) replace_paths.append( (f,r) ) # modules that are imported by the Python runtime implicits = [] for module in ('site', 'warnings',): if module not in exclude: implicits.append(module) # default prefix and exec_prefix if not exec_prefix: if prefix: exec_prefix = prefix else: exec_prefix = sys.exec_prefix if not prefix: prefix = sys.prefix # determine whether -p points to the Python source tree ishome = os.path.exists(os.path.join(prefix, 'Python', 'ceval.c')) # locations derived from options version = sys.version[:3] if win: extensions_c = 'frozen_extensions.c' if ishome: print "(Using Python source directory)" binlib = exec_prefix incldir = os.path.join(prefix, 'Include') config_h_dir = exec_prefix config_c_in = os.path.join(prefix, 'Modules', 'config.c.in') frozenmain_c = os.path.join(prefix, 'Python', 'frozenmain.c') makefile_in = os.path.join(exec_prefix, 'Modules', 'Makefile') if win: frozendllmain_c = os.path.join(exec_prefix, 'Pc\\frozen_dllmain.c') else: binlib = os.path.join(exec_prefix, 'lib', 'python%s' % version, 'config') incldir = os.path.join(prefix, 'include', 'python%s' % version) config_h_dir = os.path.join(exec_prefix, 'include', 'python%s' % version) config_c_in = os.path.join(binlib, 'config.c.in') frozenmain_c = os.path.join(binlib, 'frozenmain.c') makefile_in = os.path.join(binlib, 'Makefile') frozendllmain_c = os.path.join(binlib, 'frozen_dllmain.c') supp_sources = [] defines = [] includes = ['-I' + incldir, '-I' + config_h_dir] # sanity check of directories and files check_dirs = [prefix, exec_prefix, binlib, incldir] if not win: # These are not directories on Windows. check_dirs = check_dirs + extensions for dir in check_dirs: if not os.path.exists(dir): usage('needed directory %s not found' % dir) if not os.path.isdir(dir): usage('%s: not a directory' % dir) if win: files = supp_sources + extensions # extensions are files on Windows. else: files = [config_c_in, makefile_in] + supp_sources for file in supp_sources: if not os.path.exists(file): usage('needed file %s not found' % file) if not os.path.isfile(file): usage('%s: not a plain file' % file) if not win: for dir in extensions: setup = os.path.join(dir, 'Setup') if not os.path.exists(setup): usage('needed file %s not found' % setup) if not os.path.isfile(setup): usage('%s: not a plain file' % setup) # check that enough arguments are passed if not args: usage('at least one filename argument required') # check that file arguments exist for arg in args: if arg == '-m': break # if user specified -m on the command line before _any_ # file names, then nothing should be checked (as the # very first file should be a module name) if modargs: break if not os.path.exists(arg): usage('argument %s not found' % arg) if not os.path.isfile(arg): usage('%s: not a plain file' % arg) # process non-option arguments scriptfile = args[0] modules = args[1:] # derive target name from script name base = os.path.basename(scriptfile) base, ext = os.path.splitext(base) if base: if base != scriptfile: target = base else: target = base + '.bin' # handle -o option base_frozen_c = frozen_c base_config_c = config_c base_target = target if odir and not os.path.isdir(odir): try: os.mkdir(odir) print "Created output directory", odir except os.error, msg: usage('%s: mkdir failed (%s)' % (odir, str(msg))) base = '' if odir: base = os.path.join(odir, '') frozen_c = os.path.join(odir, frozen_c) config_c = os.path.join(odir, config_c) target = os.path.join(odir, target) makefile = os.path.join(odir, makefile) if win: extensions_c = os.path.join(odir, extensions_c) # Handle special entry point requirements # (on Windows, some frozen programs do not use __main__, but # import the module directly. Eg, DLLs, Services, etc custom_entry_point = None # Currently only used on Windows python_entry_is_main = 1 # Is the entry point called __main__? # handle -s option on Windows if win: import winmakemakefile try: custom_entry_point, python_entry_is_main = \ winmakemakefile.get_custom_entry_point(subsystem) except ValueError, why: usage(why) # Actual work starts here... # collect all modules of the program dir = os.path.dirname(scriptfile) path[0] = dir mf = modulefinder.ModuleFinder(path, debug, exclude, replace_paths) if win and subsystem=='service': # If a Windows service, then add the "built-in" module. mod = mf.add_module("servicemanager") mod.__file__="dummy.pyd" # really built-in to the resulting EXE for mod in implicits: mf.import_hook(mod) for mod in modules: if mod == '-m': modargs = 1 continue if modargs: if mod[-2:] == '.*': mf.import_hook(mod[:-2], None, ["*"]) else: mf.import_hook(mod) else: mf.load_file(mod) # Add the main script as either __main__, or the actual module name. if python_entry_is_main: mf.run_script(scriptfile) else: mf.load_file(scriptfile) if debug > 0: mf.report() print dict = mf.modules if error_if_any_missing: missing = mf.any_missing() if missing: sys.exit("There are some missing modules: %r" % missing) # generate output for frozen modules files = makefreeze.makefreeze(base, dict, debug, custom_entry_point, fail_import) # look for unfrozen modules (builtin and of unknown origin) builtins = [] unknown = [] mods = dict.keys() mods.sort() for mod in mods: if dict[mod].__code__: continue if not dict[mod].__file__: builtins.append(mod) else: unknown.append(mod) # search for unknown modules in extensions directories (not on Windows) addfiles = [] frozen_extensions = [] # Windows list of modules. if unknown or (not win and builtins): if not win: addfiles, addmods = \ checkextensions.checkextensions(unknown+builtins, extensions) for mod in addmods: if mod in unknown: unknown.remove(mod) builtins.append(mod) else: # Do the windows thang... import checkextensions_win32 # Get a list of CExtension instances, each describing a module # (including its source files) frozen_extensions = checkextensions_win32.checkextensions( unknown, extensions, prefix) for mod in frozen_extensions: unknown.remove(mod.name) # report unknown modules if unknown: sys.stderr.write('Warning: unknown modules remain: %s\n' % ' '.join(unknown)) # windows gets different treatment if win: # Taking a shortcut here... import winmakemakefile, checkextensions_win32 checkextensions_win32.write_extension_table(extensions_c, frozen_extensions) # Create a module definition for the bootstrap C code. xtras = [frozenmain_c, os.path.basename(frozen_c), frozendllmain_c, os.path.basename(extensions_c)] + files maindefn = checkextensions_win32.CExtension( '__main__', xtras ) frozen_extensions.append( maindefn ) outfp = open(makefile, 'w') try: winmakemakefile.makemakefile(outfp, locals(), frozen_extensions, os.path.basename(target)) finally: outfp.close() return # generate config.c and Makefile builtins.sort() infp = open(config_c_in) outfp = bkfile.open(config_c, 'w') try: makeconfig.makeconfig(infp, outfp, builtins) finally: outfp.close() infp.close() cflags = ['$(OPT)'] cppflags = defines + includes libs = [os.path.join(binlib, 'libpython$(VERSION).a')] somevars = {} if os.path.exists(makefile_in): makevars = parsesetup.getmakevars(makefile_in) for key in makevars.keys(): somevars[key] = makevars[key] somevars['CFLAGS'] = ' '.join(cflags) # override somevars['CPPFLAGS'] = ' '.join(cppflags) # override files = [base_config_c, base_frozen_c] + \ files + supp_sources + addfiles + libs + \ ['$(MODLIBS)', '$(LIBS)', '$(SYSLIBS)'] outfp = bkfile.open(makefile, 'w') try: makemakefile.makemakefile(outfp, somevars, files, base_target) finally: outfp.close() # Done! if odir: print 'Now run "make" in', odir, print 'to build the target:', base_target else: print 'Now run "make" to build the target:', base_target
a27a2a2be54857fe8853213ff6541413f79aefd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a27a2a2be54857fe8853213ff6541413f79aefd3/freeze.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 5713, 27621, 819, 1633, 273, 599, 15604, 468, 444, 2121, 598, 300, 84, 1456, 1196, 67, 3239, 273, 599, 5375, 468, 444, 2121, 598, 300, 52, 1456, 4418, 273, 5378, 4433, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 468, 5713, 27621, 819, 1633, 273, 599, 15604, 468, 444, 2121, 598, 300, 84, 1456, 1196, 67, 3239, 273, 599, 5375, 468, 444, 2121, 598, 300, 52, 1456, 4418, 273, 5378, 4433, ...
weighting, setting ``weighted`` to ``True`` will force
weighting, setting ``weighted=True`` will force
def longest_path(self, s = None, t = None, weighted = False, algorithm = "MILP", solver = None, verbose = 0): r""" Returns a longest path of ``self``.
fbdfc46fda1150428e37faef1f31cd5518ab4374 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/fbdfc46fda1150428e37faef1f31cd5518ab4374/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 273, 599, 16, 268, 273, 599, 16, 13747, 273, 1083, 16, 4886, 273, 315, 49, 2627, 52, 3113, 12776, 273, 599, 16, 3988, 273, 374, 4672, 436, 8395, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 273, 599, 16, 268, 273, 599, 16, 13747, 273, 1083, 16, 4886, 273, 315, 49, 2627, 52, 3113, 12776, 273, 599, 16, 3988, 273, 374, 4672, 436, 8395, 28...
class_="menu"), " ",
class_="menu"), " ",
def fill_menubar(self): self.menubar = html.div( html.a("news", href="http://codespeak.net/pypy/dist/pypy/doc/news.html", class_="menu"), " ", html.a("blog", href="http://morepypy.blogspot.com", class_="menu"), html.a("getting-started", href=self.get_doclink("getting-started.html"), class_="menu"), " ", html.a("documentation", href=self.get_doclink("index.html"), class_="menu"), " ", html.a("svn", href="https://codespeak.net/viewvc/pypy/dist/", class_="menu"), " ", html.a("issues", href="https://codespeak.net/issue/pypy-dev/", class_="menu"), html.a("contact", href=self.get_doclink("contact.html"), class_="menu"), " ", " ", id="menubar")
518be313d80fdcf44016f241eb5b96401b360a57 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6934/518be313d80fdcf44016f241eb5b96401b360a57/confrest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 67, 27617, 373, 297, 12, 2890, 4672, 365, 18, 27617, 373, 297, 273, 1729, 18, 2892, 12, 1729, 18, 69, 2932, 18443, 3113, 3897, 1546, 2505, 2207, 7000, 10244, 18, 2758, 19, 22680, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 67, 27617, 373, 297, 12, 2890, 4672, 365, 18, 27617, 373, 297, 273, 1729, 18, 2892, 12, 1729, 18, 69, 2932, 18443, 3113, 3897, 1546, 2505, 2207, 7000, 10244, 18, 2758, 19, 22680, ...
if self.is_subgroup(other): return -1
if hasattr(other, 'ambient_group'): o_ambient = other.ambient_group()
def __cmp__(self, other): r""" Compare ``self`` and ``other``. If ``self`` and ``other`` are in a common ambient group, then self = other precisely if ``self`` is contained in ``other``. EXAMPLES:: sage: G = CyclicPermutationGroup(4) sage: gens = G.gens() sage: H = DihedralGroup(4) sage: PermutationGroup_subgroup(H,list(gens)) Subgroup of Dihedral group of order 8 as a permutation group generated by [(1,2,3,4)] sage: K=PermutationGroup_subgroup(H,list(gens)) sage: G<K False sage: G>K False """ if self is other: return 0 if not isinstance(other, PermutationGroup_generic): return -1 c = cmp(self.ambient_group(), other.ambient_group()) if c: return c if self.is_subgroup(other): return -1 else: return 1
7f9093a1beb84a46fbc8d26ae85187329cd42822 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/7f9093a1beb84a46fbc8d26ae85187329cd42822/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 436, 8395, 11051, 12176, 2890, 10335, 471, 12176, 3011, 68, 8338, 971, 12176, 2890, 10335, 471, 12176, 3011, 10335, 854, 316, 279, 2975, 13232, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9625, 972, 12, 2890, 16, 1308, 4672, 436, 8395, 11051, 12176, 2890, 10335, 471, 12176, 3011, 68, 8338, 971, 12176, 2890, 10335, 471, 12176, 3011, 10335, 854, 316, 279, 2975, 13232, 1...
checkProg('a LaTeX -> Open Document converter', ['oolatex $$i', 'oolatex.sh $$i', 'htlatex $$i \'xhtml,ooffice\' \'ooffice/! -cmozhtf\' \'-coo\' \'-cvalidate\''],
checkProg('a LaTeX -> Open Document converter', ['oolatex $$i', 'oolatex.sh $$i', \ '/usr/share/tex4ht/oolatex $$i', \ 'htlatex $$i \'xhtml,ooffice\' \'ooffice/! -cmozhtf\' \'-coo\' \'-cvalidate\''],
def checkConverterEntries(): ''' Check all converters (\converter entries) ''' checkProg('the pdflatex program', ['pdflatex $$i'], rc_entry = [ r'\converter pdflatex pdf2 "%%" "latex"' ]) ''' If we're running LyX in-place then tex2lyx will be found in ../src/tex2lyx. Add this directory to the PATH temporarily and search for tex2lyx. Use PATH to avoid any problems with paths-with-spaces. ''' path_orig = os.environ["PATH"] os.environ["PATH"] = os.path.join('..', 'src', 'tex2lyx') + \ os.pathsep + path_orig checkProg('a LaTeX/Noweb -> LyX converter', ['tex2lyx', 'tex2lyx' + version_suffix], rc_entry = [r'''\converter latex lyx "%% -f $$i $$o" ""
022bcb105c784efabc301a63afd1c8acf56d72fc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7514/022bcb105c784efabc301a63afd1c8acf56d72fc/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 5072, 5400, 13332, 9163, 2073, 777, 19414, 17938, 15747, 3222, 13, 9163, 866, 626, 75, 2668, 5787, 8169, 26264, 5402, 2187, 10228, 7699, 26264, 5366, 77, 17337, 4519, 67, 4099, 273, 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, 866, 5072, 5400, 13332, 9163, 2073, 777, 19414, 17938, 15747, 3222, 13, 9163, 866, 626, 75, 2668, 5787, 8169, 26264, 5402, 2187, 10228, 7699, 26264, 5366, 77, 17337, 4519, 67, 4099, 273, 3...
return is_edit_url(request.getURL())
val = is_edit_url(request.getURL()) logger.debug("Is edit url? %s", val) return val
def edit_url(request, props): ''' The default switch check based on a subdomain of cms, edit or manage''' from collective.editskinswitcher.utils import is_edit_url return is_edit_url(request.getURL())
d08332efca449cf018089ca8289d806027ad3804 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10439/d08332efca449cf018089ca8289d806027ad3804/traversal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 718, 12, 2293, 16, 3458, 4672, 9163, 1021, 805, 1620, 866, 2511, 603, 279, 16242, 434, 6166, 16, 3874, 578, 10680, 26418, 628, 3274, 688, 18, 329, 1282, 79, 2679, 30390, 264, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 718, 12, 2293, 16, 3458, 4672, 9163, 1021, 805, 1620, 866, 2511, 603, 279, 16242, 434, 6166, 16, 3874, 578, 10680, 26418, 628, 3274, 688, 18, 329, 1282, 79, 2679, 30390, 264, ...
if isinstance(self.session.context, Backend.StaticContext):
if isinstance(self.session.context, Backend.TimedContext): if self.session.context.state == self.session.context.NOT_RUNNING: packets = self.session.context.get_all_data() else: self.statusbar.label = _('<b>Cannot reorganize the flow while sniffing</b>') self.statusbar.start_animation(True) return elif isinstance(self.session.context, Backend.StaticContext):
def __on_reorder(self, action): if isinstance(self.session.context, Backend.StaticContext): packets = self.session.context.get_data() elif isinstance(self.session.context, Backend.TimedContext) and \ self.session.context.state == self.session.context.NOT_RUNNING: packets = self.session.context.get_all_data() else: self.statusbar.label = "<b>Cannot reorganize the flow while sniffing</b>" self.statusbar.start_animation(True)
95f39a9022363d615b2588d9252ae09e194eda43 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11468/95f39a9022363d615b2588d9252ae09e194eda43/SniffPage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 265, 67, 266, 1019, 12, 2890, 16, 1301, 4672, 309, 1549, 12, 2890, 18, 3184, 18, 2472, 16, 11736, 18, 19336, 1042, 4672, 309, 365, 18, 3184, 18, 2472, 18, 2019, 422, 365, 18, 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, 1001, 265, 67, 266, 1019, 12, 2890, 16, 1301, 4672, 309, 1549, 12, 2890, 18, 3184, 18, 2472, 16, 11736, 18, 19336, 1042, 4672, 309, 365, 18, 3184, 18, 2472, 18, 2019, 422, 365, 18, 3...
declare_opcode_set(op_remove_obj, 0x89, 2, 0x10)
declare_opcode_set(op_remove_obj, 0x89, 3, 0x10)
def op_remove_obj(self, *args): """"""
92af643ed01cfa78abdc1df4c1f1030d7e8c8acd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2052/92af643ed01cfa78abdc1df4c1f1030d7e8c8acd/zcpu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1061, 67, 4479, 67, 2603, 12, 2890, 16, 380, 1968, 4672, 3536, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 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, 1061, 67, 4479, 67, 2603, 12, 2890, 16, 380, 1968, 4672, 3536, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __delslice(self, i, j): self.beginRemoveRows(QModelIndex(), i, j) del self._list[i:j] self.endRemoveRows()
def __delslice__(self, i, j): if j > i: self.beginRemoveRows(QModelIndex(), i, j - 1) del self._list[i:j] self.endRemoveRows()
def __delslice(self, i, j): self.beginRemoveRows(QModelIndex(), i, j) del self._list[i:j] self.endRemoveRows()
d35d5e73d8590696a42e6dc2d32d99fcc6755a25 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/d35d5e73d8590696a42e6dc2d32d99fcc6755a25/OWItemModels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 6665, 972, 12, 2890, 16, 277, 16, 525, 4672, 309, 525, 405, 277, 30, 365, 18, 10086, 3288, 4300, 12, 53, 1488, 1016, 9334, 277, 16, 525, 300, 404, 13, 1464, 365, 6315, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 6665, 972, 12, 2890, 16, 277, 16, 525, 4672, 309, 525, 405, 277, 30, 365, 18, 10086, 3288, 4300, 12, 53, 1488, 1016, 9334, 277, 16, 525, 300, 404, 13, 1464, 365, 6315, 10...
Makes the frame a CONN_BUF_SIZE frame
Makes the frame a MULTIPLEXER_CONN_BUF_SIZE frame
def initConnBufSizeFrame(self,referenceID, bufferSize): """ <Purpose> Makes the frame a CONN_BUF_SIZE frame
992246c633c09fe5d066f537c0640421e414afac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/992246c633c09fe5d066f537c0640421e414afac/Multiplexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 3543, 5503, 1225, 3219, 12, 2890, 16, 6180, 734, 16, 16939, 4672, 3536, 411, 10262, 4150, 34, 490, 3223, 326, 2623, 279, 3492, 50, 67, 3000, 42, 67, 4574, 2623, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 3543, 5503, 1225, 3219, 12, 2890, 16, 6180, 734, 16, 16939, 4672, 3536, 411, 10262, 4150, 34, 490, 3223, 326, 2623, 279, 3492, 50, 67, 3000, 42, 67, 4574, 2623, 2, -100, -100, -1...
self._debug(HURT_ME_PLENTY, "JS jsScriptSrc", `url`, `ver`)
def jsScriptSrc (self, url, language): """Start a background download for <script src=""> tags""" assert self.state=='parse' ver = 0.0 if language: mo = re.search(r'(?i)javascript(?P<num>\d\.\d)', language) if mo: ver = float(mo.group('num')) if self.base_url: url = urlparse.urljoin(self.base_url, url) else: url = urlparse.urljoin(self.url, url) self._debug(HURT_ME_PLENTY, "JS jsScriptSrc", `url`, `ver`) if _has_ws(url): print >> sys.stderr, "HtmlParser[%d]: broken JS url"%self.level,\ `url`, "at", `self.url` return self.state = 'wait' self.waited = 'True' self.js_src = 'True' client = HttpProxyClient(self.jsScriptData, (url, ver)) ClientServerMatchmaker(client, "GET %s HTTP/1.1" % url, #request {}, #headers '', #content {'nofilter': None}, # nofilter 'identity', # compress mime = "application/x-javascript", )
5827a6b2fdf9c1202486a8f36e257a6eab010228 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/5827a6b2fdf9c1202486a8f36e257a6eab010228/HtmlParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3828, 3651, 7740, 261, 2890, 16, 880, 16, 2653, 4672, 3536, 1685, 279, 5412, 4224, 364, 411, 4263, 1705, 1546, 6441, 2342, 8395, 1815, 365, 18, 2019, 18920, 2670, 11, 1924, 273, 374, 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, 3828, 3651, 7740, 261, 2890, 16, 880, 16, 2653, 4672, 3536, 1685, 279, 5412, 4224, 364, 411, 4263, 1705, 1546, 6441, 2342, 8395, 1815, 365, 18, 2019, 18920, 2670, 11, 1924, 273, 374, 18,...
global prop_id prop_id = prop_id + 1 print ",("+`prop_id`+","+`channel`+",'"+name+"','"+owner+"',DEFAULT)", def insert_property_end(): print ";"
global next_prop, prop_id, props if (not name in props): next_prop = next_prop + 1 props[name] = next_prop prop_id = next_prop print "INSERT INTO property (id,name,owner,is_tag) VALUE ("+`prop_id`+",'"+name+"','"+owner+"',TRUE);" else: prop_id = props[name] print "INSERT INTO value (channel_id,property_id) VALUE ("+`channel`+","+`prop_id`+");"
def insert_tag(channel, name, owner): global prop_id prop_id = prop_id + 1 print ",("+`prop_id`+","+`channel`+",'"+name+"','"+owner+"',DEFAULT)",
85d9a21e95668ee2b6ca8df4c7adbd3d6fa3eac5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6226/85d9a21e95668ee2b6ca8df4c7adbd3d6fa3eac5/create_bench_db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 2692, 12, 4327, 16, 508, 16, 3410, 4672, 2552, 2270, 67, 350, 2270, 67, 350, 273, 2270, 67, 350, 397, 404, 1172, 3104, 2932, 15, 68, 5986, 67, 350, 68, 15, 15937, 15, 68, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 2692, 12, 4327, 16, 508, 16, 3410, 4672, 2552, 2270, 67, 350, 2270, 67, 350, 273, 2270, 67, 350, 397, 404, 1172, 3104, 2932, 15, 68, 5986, 67, 350, 68, 15, 15937, 15, 68, ...
if re.match(e[1], result):
if re.match(escapestr(e[1], ampm), result):
def strftest(now): if verbose: print "strftime test for", time.ctime(now) nowsecs = str(long(now))[:-1] gmt = time.gmtime(now) now = time.localtime(now) if now[3] < 12: ampm='(AM|am)' else: ampm='(PM|pm)' jan1 = time.localtime(time.mktime((now[0], 1, 1, 0, 0, 0, 0, 1, 0))) try: if now[8]: tz = time.tzname[1] else: tz = time.tzname[0] except AttributeError: tz = '' if now[3] > 12: clock12 = now[3] - 12 elif now[3] > 0: clock12 = now[3] else: clock12 = 12 expectations = ( ('%a', calendar.day_abbr[now[6]], 'abbreviated weekday name'), ('%A', calendar.day_name[now[6]], 'full weekday name'), ('%b', calendar.month_abbr[now[1]], 'abbreviated month name'), ('%B', calendar.month_name[now[1]], 'full month name'), # %c see below ('%d', '%02d' % now[2], 'day of month as number (00-31)'), ('%H', '%02d' % now[3], 'hour (00-23)'), ('%I', '%02d' % clock12, 'hour (01-12)'), ('%j', '%03d' % now[7], 'julian day (001-366)'), ('%m', '%02d' % now[1], 'month as number (01-12)'), ('%M', '%02d' % now[4], 'minute, (00-59)'), ('%p', ampm, 'AM or PM as appropriate'), ('%S', '%02d' % now[5], 'seconds of current time (00-60)'), ('%U', '%02d' % ((now[7] + jan1[6])//7), 'week number of the year (Sun 1st)'), ('%w', '0?%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'), ('%W', '%02d' % ((now[7] + (jan1[6] - 1)%7)//7), 'week number of the year (Mon 1st)'), # %x see below ('%X', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%y', '%02d' % (now[0]%100), 'year without century'), ('%Y', '%d' % now[0], 'year with century'), # %Z see below ('%%', '%', 'single percent sign'), ) nonstandard_expectations = ( # These are standard but don't have predictable output ('%c', fixasctime(time.asctime(now)), 'near-asctime() format'), ('%x', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), '%m/%d/%y %H:%M:%S'), ('%Z', '%s' % tz, 'time zone name'), # These are some platform specific extensions ('%D', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), 'mm/dd/yy'), ('%e', '%2d' % now[2], 'day of month as number, blank padded ( 0-31)'), ('%h', calendar.month_abbr[now[1]], 'abbreviated month name'), ('%k', '%2d' % now[3], 'hour, blank padded ( 0-23)'), ('%n', '\n', 'newline character'), ('%r', '%02d:%02d:%02d %s' % (clock12, now[4], now[5], ampm), '%I:%M:%S %p'), ('%R', '%02d:%02d' % (now[3], now[4]), '%H:%M'), ('%s', nowsecs, 'seconds since the Epoch in UCT'), ('%t', '\t', 'tab character'), ('%T', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%3y', '%03d' % (now[0]%100), 'year without century rendered using fieldwidth'), ) if verbose: print "Strftime test, platform: %s, Python version: %s" % \ (sys.platform, sys.version.split()[0]) for e in expectations: try: result = time.strftime(e[0], now) except ValueError, error: print "Standard '%s' format gave error:" % e[0], error continue if re.match(e[1], result): continue if not result or result[0] == '%': print "Does not support standard '%s' format (%s)" % (e[0], e[2]) else: print "Conflict for %s (%s):" % (e[0], e[2]) print " Expected %s, but got %s" % (e[1], result) for e in nonstandard_expectations: try: result = time.strftime(e[0], now) except ValueError, result: if verbose: print "Error for nonstandard '%s' format (%s): %s" % \ (e[0], e[2], str(result)) continue if re.match(e[1], result): if verbose: print "Supports nonstandard '%s' format (%s)" % (e[0], e[2]) elif not result or result[0] == '%': if verbose: print "Does not appear to support '%s' format (%s)" % (e[0], e[2]) else: if verbose: print "Conflict for nonstandard '%s' format (%s):" % (e[0], e[2]) print " Expected %s, but got %s" % (e[1], result)
c82208eecbe97e1535be4b1c8c12a68d54d29bd5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c82208eecbe97e1535be4b1c8c12a68d54d29bd5/test_strftime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 1222, 395, 12, 3338, 4672, 309, 3988, 30, 1172, 315, 701, 9982, 1842, 364, 3113, 813, 18, 21261, 12, 3338, 13, 2037, 21317, 273, 609, 12, 5748, 12, 3338, 3719, 10531, 17, 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, 609, 1222, 395, 12, 3338, 4672, 309, 3988, 30, 1172, 315, 701, 9982, 1842, 364, 3113, 813, 18, 21261, 12, 3338, 13, 2037, 21317, 273, 609, 12, 5748, 12, 3338, 3719, 10531, 17, 21, 65, ...
break
def update_streams(self, streams): self.chat = None self.audio = None for stream in streams: if isinstance(stream, MSRPChat): self.chat = stream break if isinstance(stream, GreenAudioStream): self.audio = stream break self.streams = streams self.manager.update_prompt()
8e2bb123b1ce26dd00a5e9e603bb9e35ec708d0a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/8e2bb123b1ce26dd00a5e9e603bb9e35ec708d0a/sip_session2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 16320, 12, 2890, 16, 8205, 4672, 365, 18, 10880, 273, 599, 365, 18, 11509, 273, 599, 364, 1407, 316, 8205, 30, 309, 1549, 12, 3256, 16, 9238, 54, 52, 14163, 4672, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 16320, 12, 2890, 16, 8205, 4672, 365, 18, 10880, 273, 599, 365, 18, 11509, 273, 599, 364, 1407, 316, 8205, 30, 309, 1549, 12, 3256, 16, 9238, 54, 52, 14163, 4672, 365, 18, ...
ladder graph. ::
ladder graph. ::
def GeneralizedPetersenGraph(self, n,k): r""" Returns a generalized Petersen graph with `2n` nodes. The variables `n`, `k` are integers such that `n>2` and `0<k\leq\lfloor(n-1)`/`2\rfloor`
a2ad0103402756f8db79454b2283ad1d542b2c37 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/a2ad0103402756f8db79454b2283ad1d542b2c37/graph_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9544, 1235, 52, 1032, 275, 4137, 12, 2890, 16, 290, 16, 79, 4672, 436, 8395, 2860, 279, 7470, 1235, 453, 1032, 275, 2667, 598, 1375, 22, 82, 68, 2199, 18, 1021, 3152, 1375, 82, 9191, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9544, 1235, 52, 1032, 275, 4137, 12, 2890, 16, 290, 16, 79, 4672, 436, 8395, 2860, 279, 7470, 1235, 453, 1032, 275, 2667, 598, 1375, 22, 82, 68, 2199, 18, 1021, 3152, 1375, 82, 9191, ...
self.existingLocation.setUrl(KUrl("%s/trunk/l10n-kde4/%s" % (localsvnroot, lang)))
def validatePage(self): if self.existing.isChecked(): return True if os.system('which svn')!=0: KMessageBox.error(self,i18n("Please install 'subversion' package\nto have Lokalize download KDE translation files."),i18n("Subversion client not found")) return False
4fff230674ead7cc7c99d83ee717306bc218b272 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1688/4fff230674ead7cc7c99d83ee717306bc218b272/newprojectwizard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 1964, 12, 2890, 4672, 309, 365, 18, 11711, 18, 291, 11454, 13332, 327, 1053, 309, 1140, 18, 4299, 2668, 12784, 5893, 82, 6134, 5, 33, 20, 30, 1475, 27647, 18, 1636, 12, 2890, 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, 1954, 1964, 12, 2890, 4672, 309, 365, 18, 11711, 18, 291, 11454, 13332, 327, 1053, 309, 1140, 18, 4299, 2668, 12784, 5893, 82, 6134, 5, 33, 20, 30, 1475, 27647, 18, 1636, 12, 2890, 16,...
try: body = [output, extra] except NameError: body = [output]
body = [output]
def perform_rearrangefield(colID, ln, fmeth, callback='yes', confirm=-1): """rearrang the fields alphabetically colID - the collection """ subtitle = "Order fields alphabetically" output = "" col_fld = dict(map(lambda x: (x[0], x[1]), get_col_fld(colID, fmeth))) fld_names = get_def_name('', "field") if len(col_fld) > 0: score = len(col_fld) for (fldID, name) in fld_names: if col_fld.has_key(fldID): run_sql("UPDATE collection_field_fieldvalue SET score=%s WHERE id_collection=%s and id_field=%s" % (score, colID, fldID)) score -= 1 output += write_outcome((1, "")) else: output += write_outcome((0, (0, "No fields to order"))) try: body = [output, extra] except NameError: body = [output] output = "<br>" + addadminbox(subtitle, body) if fmeth == "soo": return perform_showsortoptions(colID, ln, content=output) elif fmeth == "sew": return perform_showsearchfields(colID, ln, content=output) elif fmeth == "seo": return perform_showsearchoptions(colID, ln, content=output)
8dcf4c4b5c4b6097cd6d61f62b4123913eecc2ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/8dcf4c4b5c4b6097cd6d61f62b4123913eecc2ec/websearchadminlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 266, 297, 3676, 1518, 12, 1293, 734, 16, 7211, 16, 10940, 546, 16, 1348, 2218, 9707, 2187, 6932, 29711, 21, 4672, 3536, 266, 5399, 539, 326, 1466, 10877, 6478, 645, 734, 300, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 266, 297, 3676, 1518, 12, 1293, 734, 16, 7211, 16, 10940, 546, 16, 1348, 2218, 9707, 2187, 6932, 29711, 21, 4672, 3536, 266, 5399, 539, 326, 1466, 10877, 6478, 645, 734, 300, ...
GraphStatistic.__init__(self, 'Commits by time')
GraphStatistic.__init__(self, 'total_commit_count_in_time', 'Total commit count by time')
def __init__(self, config, revision_data): assert(isinstance(revision_data, RevisionData)) GraphStatistic.__init__(self, 'Commits by time') self._revision_data = revision_data self._config = config
b8888de85047fe93273e5989b691f6b75032d60e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2516/b8888de85047fe93273e5989b691f6b75032d60e/msvnstats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 642, 16, 6350, 67, 892, 4672, 1815, 12, 291, 1336, 12, 13057, 67, 892, 16, 13132, 751, 3719, 5601, 20673, 16186, 2738, 972, 12, 2890, 16, 296, 4963, 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, 1001, 2738, 972, 12, 2890, 16, 642, 16, 6350, 67, 892, 4672, 1815, 12, 291, 1336, 12, 13057, 67, 892, 16, 13132, 751, 3719, 5601, 20673, 16186, 2738, 972, 12, 2890, 16, 296, 4963, 67, ...
if self.slideshow_mode == False: self.set_zoom_sensitivities()
self.set_zoom_sensitivities()
def zoom_to_fit_or_1_to_1(self, action): if action != None and self.slideshow_mode == True: return if self.userimage != "": self.last_image_action_was_fit = True # Calculate zoomratio needed to fit to window: win_width = self.available_image_width() win_height = self.available_image_height() img_width = self.originalimg.get_width() img_height = self.originalimg.get_height() if self.orientation == 1: # Image is rotated, swap img_width and img_height: img_width, img_height = img_height, img_width width_ratio = float(img_width)/win_width height_ratio = float(img_height)/win_height if width_ratio < height_ratio: max_ratio = height_ratio else: max_ratio = width_ratio self.zoomratio = 1/float(max_ratio) self.zoomratio_for_zoom_to_fit = self.zoomratio if self.slideshow_mode == False: self.set_zoom_sensitivities() if self.first_image_load == True and self.zoomratio > 1: # Revert to 1:1 zoom self.zoom_1_to_1(action) else: self.put_zoom_image_to_window() self.update_statusbar() return
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7182, 67, 869, 67, 7216, 67, 280, 67, 21, 67, 869, 67, 21, 12, 2890, 16, 1301, 4672, 309, 1301, 480, 599, 471, 365, 18, 2069, 4369, 13606, 67, 3188, 422, 1053, 30, 327, 309, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7182, 67, 869, 67, 7216, 67, 280, 67, 21, 67, 869, 67, 21, 12, 2890, 16, 1301, 4672, 309, 1301, 480, 599, 471, 365, 18, 2069, 4369, 13606, 67, 3188, 422, 1053, 30, 327, 309, 365, 1...
)
]
def __init__(self, portName, baud = 9600, parity = "n", dataBits = 8, stopBits = 1, handshake = "none", timeout = None, eolTranslation = "lf", readCallback = None, stateCallback = None,
09841073459245ec2a604fa831e32016d00f8e97 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6353/09841073459245ec2a604fa831e32016d00f8e97/TkSerial.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1756, 461, 16, 9846, 1100, 273, 19332, 713, 16, 19904, 273, 315, 82, 3113, 501, 6495, 273, 1725, 16, 2132, 6495, 273, 404, 16, 11942, 273, 315, 6102, 311...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1756, 461, 16, 9846, 1100, 273, 19332, 713, 16, 19904, 273, 315, 82, 3113, 501, 6495, 273, 1725, 16, 2132, 6495, 273, 404, 16, 11942, 273, 315, 6102, 311...
"""Tests for localfile/Backend/get_task method :
"""Tests for localfile/Backend/get_task method:
def test_localfile_backend_method4(self): """Tests for localfile/Backend/get_task method : - Compares task titles to check if method works. """ self.create_test_environment() doc, configxml = cleanxml.openxmlfile(self.datapath, 'config') xmlproject = doc.getElementsByTagName('backend') for domobj in xmlproject: dic = {} if domobj.hasAttribute("module") : dic["module"] = str(domobj.getAttribute("module")) dic["pid"] = str(domobj.getAttribute("pid")) dic["xmlobject"] = domobj dic["filename"] = self.taskfile beobj = localfile.Backend(dic) dstore = datastore.DataStore() newtask = dstore.new_task(tid="0@2", pid="1", newtask=True) beobj.get_task(newtask, "0@1") self.assertEqual(newtask.get_title(), u"Ceci est un test")
2a547b8351d82de6f0224782922b79909baf7a74 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/2a547b8351d82de6f0224782922b79909baf7a74/backends.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3729, 768, 67, 9993, 67, 2039, 24, 12, 2890, 4672, 3536, 14650, 364, 1191, 768, 19, 7172, 19, 588, 67, 4146, 707, 30, 300, 5427, 4807, 1562, 14693, 358, 866, 309, 707, 6330, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3729, 768, 67, 9993, 67, 2039, 24, 12, 2890, 4672, 3536, 14650, 364, 1191, 768, 19, 7172, 19, 588, 67, 4146, 707, 30, 300, 5427, 4807, 1562, 14693, 358, 866, 309, 707, 6330, ...
cty.POINTER(cty.c_int), cty.POINTER(cty.c_int), cty.POINTER(cty.c_int)],
cty.POINTER(cty.c_int), cty.POINTER(cty.c_int), cty.POINTER(cty.c_int)],
def fl_insert_formbrowser(ob, line, new_form): """ fl_insert_formbrowser(ob, line, new_form) -> num. """ retval = _fl_insert_formbrowser(ob, line, new_form) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 6387, 67, 687, 11213, 12, 947, 16, 980, 16, 394, 67, 687, 4672, 3536, 1183, 67, 6387, 67, 687, 11213, 12, 947, 16, 980, 16, 394, 67, 687, 13, 317, 818, 18, 3536, 225, 522...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 6387, 67, 687, 11213, 12, 947, 16, 980, 16, 394, 67, 687, 4672, 3536, 1183, 67, 6387, 67, 687, 11213, 12, 947, 16, 980, 16, 394, 67, 687, 13, 317, 818, 18, 3536, 225, 522...
if os.path.exists(self.dev_path): return True return False
self.attached = os.path.exists(self.dev_path) return self.attached
def Attach(self): """Attach to an existing file.
ecb091e30fa78bfbe0be99c9862639bcdb08eff7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/ecb091e30fa78bfbe0be99c9862639bcdb08eff7/bdev.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8659, 12, 2890, 4672, 3536, 4761, 358, 392, 2062, 585, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8659, 12, 2890, 4672, 3536, 4761, 358, 392, 2062, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if encoding: try: text = _encode(text, encoding) except UnicodeError: return _encode_entity(text)
def _escape_cdata(text, encoding=None): # escape character data try: if encoding: try: text = _encode(text, encoding) except UnicodeError: return _encode_entity(text) text = text.replace("&", "&amp;") text = text.replace("<", "&lt;") text = text.replace(">", "&gt;") return text except (TypeError, AttributeError): _raise_serialization_error(text)
aee804b3fce4c5038906d49ddb1a5d50826dbe83 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/aee804b3fce4c5038906d49ddb1a5d50826dbe83/ElementTree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6939, 67, 71, 892, 12, 955, 16, 2688, 33, 7036, 4672, 468, 4114, 3351, 501, 775, 30, 977, 273, 977, 18, 2079, 2932, 10, 3113, 7830, 931, 4868, 13, 977, 273, 977, 18, 2079, 2932,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6939, 67, 71, 892, 12, 955, 16, 2688, 33, 7036, 4672, 468, 4114, 3351, 501, 775, 30, 977, 273, 977, 18, 2079, 2932, 10, 3113, 7830, 931, 4868, 13, 977, 273, 977, 18, 2079, 2932,...
hostport = (u.hostname or "localhost", u.port or 80)
hostport = (u.hostname or "localhost", u.port or default_tcp_port)
def client(msg, client_key, client_cert, server_ta, url, callback, errback): """ Open client HTTPS connection, send a message, set up callbacks to handle response. """ u = urlparse.urlparse(url) if (u.scheme not in ("", "https") or u.username is not None or u.password is not None or u.params != "" or u.query != "" or u.fragment != ""): raise rpki.exceptions.BadClientURL, "Unusable URL %s" % url if debug_http: rpki.log.debug("Contacting %s" % url) request = http_request( cmd = "POST", path = u.path, body = msg, callback = callback, errback = errback, Host = u.hostname, Content_Type = rpki_content_type) hostport = (u.hostname or "localhost", u.port or 80) if debug_http: rpki.log.debug("Created request %r for %r" % (request, hostport)) if not isinstance(server_ta, (tuple, list)): server_ta = (server_ta,) if hostport not in client_queues: client_queues[hostport] = http_queue(hostport, cert = client_cert, key = client_key, ta = server_ta) client_queues[hostport].request(request) # Defer connection attempt until after we've had time to process any # pending I/O events, in case connections have closed. if debug_http: rpki.log.debug("Scheduling connection startup for %r" % request) rpki.async.defer(client_queues[hostport].restart)
b83343098c9df5336f5e9b07a35b4b83e5782733 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/119/b83343098c9df5336f5e9b07a35b4b83e5782733/https.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1004, 12, 3576, 16, 1004, 67, 856, 16, 1004, 67, 7593, 16, 1438, 67, 2351, 16, 880, 16, 1348, 16, 29642, 4672, 3536, 3502, 1004, 18904, 1459, 16, 1366, 279, 883, 16, 444, 731, 6689, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1004, 12, 3576, 16, 1004, 67, 856, 16, 1004, 67, 7593, 16, 1438, 67, 2351, 16, 880, 16, 1348, 16, 29642, 4672, 3536, 3502, 1004, 18904, 1459, 16, 1366, 279, 883, 16, 444, 731, 6689, ...
return cell.car
if not iscons(cell): return Exception("Car received non-cons object %s"%cell, None) else: return cell.car
def car( self, stack, cell ): return cell.car
1e539b757dbaa03deef51ae2ce6933dc9863832a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10358/1e539b757dbaa03deef51ae2ce6933dc9863832a/builtins.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5926, 12, 365, 16, 2110, 16, 2484, 262, 30, 327, 2484, 18, 9815, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5926, 12, 365, 16, 2110, 16, 2484, 262, 30, 327, 2484, 18, 9815, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sourceX,sourceY,sourceZ=normalizePosition(source.mat.translationPart(),normalizationOffset,normalizationScale)
sourceX,sourceY,sourceZ=normalizePosition(source.mat.translationPart(),normalizationOffset,normalizationScale,False)
def choreoExport (scene,normalize=True): SelectedObjects = Blender.Object.GetSelected() listeners=Acoustic.getListeners() sources=[] target=None buffer="" for source in Acoustic.getSources(): if source.sel==1: sources.append(source) for listener in listeners: if listener.sel==1: target=listener break if target==None or not sources: Blender.Draw.PupMenu('You have to select one listener and at least one source objects!') return allAcousticObjects=Acoustic.getAcousticObjects(scene) # print list(allAcousticObjects) #TODO: refactor this (checked three times!) if normalize==True: normalizationOffset,normalizationScale=getNormalizationParameters(allAcousticObjects) for frame in range(Blender.Get('staframe'),Blender.Get('endframe')): Blender.Set('curframe',frame) roll,descention,azimuth=target.mat.toEuler() targetElevation=(-descention)%360 targetRoll=(roll)%360 targetAzimuth=(azimuth)%360 if normalize==True: targetX,targetY,targetZ=normalizePosition(listener.mat.translationPart(),normalizationOffset,normalizationScale) else: targetX,targetY,targetZ=listener.mat.translationPart() sourcesPositions="" for source in sources: if source.sel==1: if normalize==True: sourceX,sourceY,sourceZ=normalizePosition(source.mat.translationPart(),normalizationOffset,normalizationScale) else: sourceX,sourceY,sourceZ=source.mat.translationPart() sourcesPositions+=" %f %f %f" % (sourceX,sourceY,sourceZ) buffer+=ChoreoLineTemplate % vars() return buffer
db826d79aa0fcdbf20d0025f8b9f046ee5203638 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1456/db826d79aa0fcdbf20d0025f8b9f046ee5203638/exporter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 462, 479, 83, 6144, 261, 23694, 16, 12237, 33, 5510, 4672, 4352, 828, 4710, 273, 8069, 2345, 18, 921, 18, 967, 7416, 1435, 4679, 33, 37, 2894, 641, 335, 18, 588, 5583, 1435, 5550, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 462, 479, 83, 6144, 261, 23694, 16, 12237, 33, 5510, 4672, 4352, 828, 4710, 273, 8069, 2345, 18, 921, 18, 967, 7416, 1435, 4679, 33, 37, 2894, 641, 335, 18, 588, 5583, 1435, 5550, 33, ...
for patch in patchset.patch_set:
new_content_entities = [] patches = list(patchset.patch_set) for patch in patches:
def upload(request): """/upload - Like new() or add(), but from the upload.py script. This generates a text/plain response. """ if request.user is None: if IS_DEV: request.user = users.User(request.POST.get('user', 'test@example.com')) else: return HttpResponse('Login required', status=401) form = UploadForm(request.POST, request.FILES) issue = None patchset = None if form.is_valid(): issue_id = form.cleaned_data['issue'] if issue_id: action = 'updated' issue = models.Issue.get_by_id(issue_id) if issue is None: form.errors['issue'] = ['No issue exists with that id (%s)' % issue_id] elif issue.local_base and not form.cleaned_data.get('content_upload'): form.errors['issue'] = ['Base files upload required for that issue.'] issue = None else: if request.user != issue.owner: form.errors['user'] = ['You (%s) don\'t own this issue (%s)' % (request.user, issue_id)] issue = None else: patchset = _add_patchset_from_form(request, issue, form, 'subject', emails_add_only=True) if not patchset: issue = None else: action = 'created' issue = _make_new(request, form) if issue is not None: patchset = issue.patchset if issue is None: msg = 'Issue creation errors:\n%s' % repr(form.errors) else: msg = ('Issue %s. URL: %s' % (action, request.build_absolute_uri('/%s' % issue.key().id()))) if (form.cleaned_data.get('content_upload') or form.cleaned_data.get('separate_patches')): # Extend the response message: 2nd line is patchset id. msg +="\n%d" % patchset.key().id() if form.cleaned_data.get('content_upload'): # Extend the response: additional lines are the expected filenames. issue.local_base = True issue.put() for patch in patchset.patch_set: content = models.Content(is_uploaded=True, parent=patch) content.put() patch.content = content patch.put() msg += "\n%d %s" % (patch.key().id(), patch.filename) return HttpResponse(msg, content_type='text/plain')
bd03b6584360532e8e6a719e1567571d59d3a8c7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/476/bd03b6584360532e8e6a719e1567571d59d3a8c7/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 12, 2293, 4672, 3536, 19, 6327, 300, 23078, 394, 1435, 578, 527, 9334, 1496, 628, 326, 3617, 18, 2074, 2728, 18, 225, 1220, 6026, 279, 977, 19, 7446, 766, 18, 3536, 309, 590, 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, 3617, 12, 2293, 4672, 3536, 19, 6327, 300, 23078, 394, 1435, 578, 527, 9334, 1496, 628, 326, 3617, 18, 2074, 2728, 18, 225, 1220, 6026, 279, 977, 19, 7446, 766, 18, 3536, 309, 590, 18,...
elif sum < -10000:
elif sum < -MAX_EXP:
def __call__(self, example, format = orange.GetValue): sum = -self.getmargin(example)
a8a8a5750de8cbc588c019527ecb652bddeaf670 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/a8a8a5750de8cbc588c019527ecb652bddeaf670/orngLR_Jakulin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 3454, 16, 740, 273, 578, 726, 18, 967, 620, 4672, 2142, 273, 300, 2890, 18, 588, 10107, 12, 8236, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 3454, 16, 740, 273, 578, 726, 18, 967, 620, 4672, 2142, 273, 300, 2890, 18, 588, 10107, 12, 8236, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
Construct a module with basis from the data in ``x``
Construct a module with basis from the data in ``x``.
def _call_(self, x): """ Construct a module with basis from the data in ``x``
375e9030032add3b70c6aae55910223d729ae6b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/375e9030032add3b70c6aae55910223d729ae6b2/modules_with_basis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1991, 67, 12, 2890, 16, 619, 4672, 3536, 14291, 279, 1605, 598, 10853, 628, 326, 501, 316, 12176, 92, 10335, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1991, 67, 12, 2890, 16, 619, 4672, 3536, 14291, 279, 1605, 598, 10853, 628, 326, 501, 316, 12176, 92, 10335, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
rooms.remove(msg.room)
del rooms[msg.room]
def PrivateRoomRemoved(self, msg): rooms = self.PrivateRooms if msg.room in rooms: rooms.remove(msg.room) self.SetPrivateRooms()
96acf2720c6539e7731eccd651d156c35c9064f6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8738/96acf2720c6539e7731eccd651d156c35c9064f6/chatrooms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8726, 13646, 10026, 12, 2890, 16, 1234, 4672, 26450, 273, 365, 18, 6014, 13646, 87, 309, 1234, 18, 13924, 316, 26450, 30, 1464, 26450, 63, 3576, 18, 13924, 65, 365, 18, 694, 6014, 13646,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8726, 13646, 10026, 12, 2890, 16, 1234, 4672, 26450, 273, 365, 18, 6014, 13646, 87, 309, 1234, 18, 13924, 316, 26450, 30, 1464, 26450, 63, 3576, 18, 13924, 65, 365, 18, 694, 6014, 13646,...
super(RetentionTag, self).__init__(tag, *args, **kw)
super(RetentionTag, self).__init__(tag, **kw)
def __init__(self, is_default, tag, *args, **kw): self.set_default_val(is_default) super(RetentionTag, self).__init__(tag, *args, **kw) session.flush()
835466dda6773486ec7d952dfff4da194fdcaf8b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14755/835466dda6773486ec7d952dfff4da194fdcaf8b/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 353, 67, 1886, 16, 1047, 16, 380, 1968, 16, 2826, 9987, 4672, 365, 18, 542, 67, 1886, 67, 1125, 12, 291, 67, 1886, 13, 2240, 12, 14688, 1805, 16, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 353, 67, 1886, 16, 1047, 16, 380, 1968, 16, 2826, 9987, 4672, 365, 18, 542, 67, 1886, 67, 1125, 12, 291, 67, 1886, 13, 2240, 12, 14688, 1805, 16, 365, ...
\item u = drop_down(list, label) -- a drop down menu
\item u = input_grid(nrows, ncols, default=None, label=None, to_value=lambda x:x, width=4) -- an editable grid of objects (a matrix or array)
... def _(a=(1,4), b=(0,10)):
e49d467910fb7bf80b7ae43ae16d248c817857b4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e49d467910fb7bf80b7ae43ae16d248c817857b4/interact.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 1652, 389, 12, 69, 28657, 21, 16, 24, 3631, 324, 28657, 20, 16, 2163, 3719, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 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, 1372, 1652, 389, 12, 69, 28657, 21, 16, 24, 3631, 324, 28657, 20, 16, 2163, 3719, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 704) else quickfix.DoubleField.__init__(self, 704, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 2371, 3028, 13, 469, 9549, 904, 18, 5265, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 2371, 3028, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738, ...
pass
def dataReceived(self, chunk): buffer = self.buffer + chunk processed = cBanana.dataReceived(self.state, buffer, self.callExpressionReceived) self.buffer = buffer[processed:]
8c9aafc5edeca89565643045db12c06873d3aa0e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/8c9aafc5edeca89565643045db12c06873d3aa0e/banana.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 8872, 12, 2890, 16, 2441, 4672, 1613, 273, 365, 18, 4106, 397, 2441, 5204, 273, 276, 38, 304, 13848, 18, 892, 8872, 12, 2890, 18, 2019, 16, 1613, 16, 365, 18, 1991, 2300, 8872, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 8872, 12, 2890, 16, 2441, 4672, 1613, 273, 365, 18, 4106, 397, 2441, 5204, 273, 276, 38, 304, 13848, 18, 892, 8872, 12, 2890, 18, 2019, 16, 1613, 16, 365, 18, 1991, 2300, 8872, ...
e = ebuild.Ebuild(pkgatom)
e = ebuild.Ebuild(pkgatom, pkg_manager=pkg_manager)
def main(argv): global trac fetch.check_db_cache() conf = config.Config() out.ebegin('Trac - user autentication') try: trac = Trac(conf.trac_user, conf.trac_passwd) except TracError as err: out.eend(1) print(err, file=sys.stderr) else: out.eend(0) # creating the overlay overlay.create_overlay() desc_tree = description_tree.DescriptionTree() packages = desc_tree.packages() out.einfo('Number of octave-forge packages: %i' % len(packages)) # creating the ebuilds for all the packages for pkgatom in packages: e = ebuild.Ebuild(pkgatom) try: e.create(nodeps=True) except: pass installed_packages = [] try: for pkgatom in desc_tree.packages(): if build_package(pkgatom): installed_packages.append('=g-octave/'+pkgatom) except: pass finally: remove_packages(installed_packages)
8f112a3b2db1aaeea27fefb0c018c0d642a3007b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10378/8f112a3b2db1aaeea27fefb0c018c0d642a3007b/tinderbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 2552, 1284, 71, 225, 2158, 18, 1893, 67, 1966, 67, 2493, 1435, 2195, 273, 642, 18, 809, 1435, 225, 596, 18, 73, 10086, 2668, 1609, 71, 300, 729, 2059, 3031, 6134...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 2552, 1284, 71, 225, 2158, 18, 1893, 67, 1966, 67, 2493, 1435, 2195, 273, 642, 18, 809, 1435, 225, 596, 18, 73, 10086, 2668, 1609, 71, 300, 729, 2059, 3031, 6134...