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
lookupTable = ipIsr.LookupTableMultiplicativeF(tableValues)
lookupTable = isrLib.LookupTableMultiplicativeF(tableValues)
def LookupTableFromPolicy(tablePolicy, stageName = 'lsst.ip.isr.lookuptablefrompolicy'): tableType = tablePolicy.getString('type') tableLength = tablePolicy.getInt('length') tableValues = tablePolicy.getArray('value') assert len(tableValues) == tableLength tableValues = afwMath.vectorD(tableValues) if tableType == 'Replace': lookupTable = ipIsr.LookupTableReplaceF(tableValues) elif tableType == 'Multiplicative': lookupTable = ipIsr.LookupTableMultiplicativeF(tableValues) else: pexLog.Trace(stageName, 4, 'Unknown table type : %s' % (tableType)) return None return lookupTable
9178ba52aa57399136f285c8a065b1707c990801 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6526/9178ba52aa57399136f285c8a065b1707c990801/IsrStages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8834, 1388, 1265, 2582, 12, 2121, 2582, 16, 6009, 461, 273, 296, 3251, 334, 18, 625, 18, 291, 86, 18, 7330, 3648, 429, 2080, 5086, 11, 4672, 1014, 559, 282, 273, 1014, 2582, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8834, 1388, 1265, 2582, 12, 2121, 2582, 16, 6009, 461, 273, 296, 3251, 334, 18, 625, 18, 291, 86, 18, 7330, 3648, 429, 2080, 5086, 11, 4672, 1014, 559, 282, 273, 1014, 2582, 18, 588, ...
digits = fields.get('digits', (16, 2))[1]
digits = fields[fname].get('digits', (16, 2))[1]
def parse(self, model, root_node, fields): dict_widget = {} button_list = [] attrs = node_attributes(root_node) on_write = attrs.get('on_write', '') editable = attrs.get('editable', False) if editable: treeview = EditableTreeView(editable) else: treeview = gtk.TreeView() treeview.cells = {} treeview.sequence = attrs.get('sequence', False) treeview.colors = {} self.treeview = treeview for color_spec in attrs.get('colors', '').split(';'): if color_spec: colour, test = color_spec.split(':') self.treeview.colors[colour] = test treeview.set_property('rules-hint', True) if not self.title: self.title = attrs.get('string', 'Unknown') tooltips = common.Tooltips()
7edd5051ac3136b47eff45f78761d548170042ef /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9151/7edd5051ac3136b47eff45f78761d548170042ef/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 938, 16, 1365, 67, 2159, 16, 1466, 4672, 2065, 67, 6587, 273, 2618, 3568, 67, 1098, 273, 5378, 3422, 273, 756, 67, 4350, 12, 3085, 67, 2159, 13, 603, 67, 2626, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 938, 16, 1365, 67, 2159, 16, 1466, 4672, 2065, 67, 6587, 273, 2618, 3568, 67, 1098, 273, 5378, 3422, 273, 756, 67, 4350, 12, 3085, 67, 2159, 13, 603, 67, 2626, 27...
verbose = False
verbose = self.get_verbosity()
def run(self): """Do the actual simulation. The input is set using setters/constructor. The solution can be retrieved using self.get_solution() """ return_last = self.get_return_last() sensi = self.get_sensitivity_analysis() time_step = self.get_time_step() start_time = self.get_start_time() end_time = self.get_final_time() verbose = False model = self.get_model() if verbose: print "Input before integration:", model.u print "States:", model.x print start_time, "to", end_time import sys sys.stdout.flush() if end_time < start_time: raise SundialsSimulationException('End time cannot be before start ' 'time.') if end_time == start_time: raise SundialsSimulationException('End time and start time cannot ' 'currently coinside.') # If this line is not here T[-1] returned will be end_time - time_step #end_time = end_time + time_step def _sundials_f(t, x, dx, f_data): """The sundials' RHS evaluation function. This function basically moves data between SUNDIALS arrays and NumPy arrays. Parameters: t -- the point time on which the evalution is being done. x -- the states. dx -- the derivatives of the states. f_data -- contains the model and an array with it's parameters. See SUNDIALS' manual and/or PySUNDIALS demos for more information. """ data = ctypes.cast(f_data, PUserData).contents model = data.model model.t = (t - data.t_sim_start) / data.t_sim_duration if data.ignore_p == 0: p = data.parameters sundials_params = p.params model.pi = sundials_params[p.pi_start : p.pi_end] model.u = sundials_params[p.u_start : p.u_end] # Copying from sundials space to model space and back again model.x = x model.eval_ode_f() dx[:] = model.dx return 0
2259378e77273c298d71047069b8f83885e323aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/2259378e77273c298d71047069b8f83885e323aa/sundials.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 3244, 326, 3214, 14754, 18, 225, 1021, 810, 353, 444, 1450, 25627, 19, 12316, 18, 1021, 6959, 848, 506, 10295, 1450, 365, 18, 588, 67, 13385, 1435, 3536, 327,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 3244, 326, 3214, 14754, 18, 225, 1021, 810, 353, 444, 1450, 25627, 19, 12316, 18, 1021, 6959, 848, 506, 10295, 1450, 365, 18, 588, 67, 13385, 1435, 3536, 327,...
sys.stdout.write(_("(%s)\n") % inst.hint)
sys.stderr.write(_("(%s)\n") % inst.hint)
def dispatch(args): "run the command specified in args" try: u = uimod.ui() if '--traceback' in args: u.setconfig('ui', 'traceback', 'on') except util.Abort, inst: sys.stderr.write(_("abort: %s\n") % inst) if inst.hint: sys.stdout.write(_("(%s)\n") % inst.hint) return -1 except error.ParseError, inst: if len(inst.args) > 1: sys.stderr.write(_("hg: parse error at %s: %s\n") % (inst.args[1], inst.args[0])) else: sys.stderr.write(_("hg: parse error: %s\n") % inst.args[0]) return -1 return _runcatch(u, args)
e40f3c107f46a0ebc29972991f30db71fb8dd09c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/e40f3c107f46a0ebc29972991f30db71fb8dd09c/dispatch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3435, 12, 1968, 4672, 315, 2681, 326, 1296, 1269, 316, 833, 6, 775, 30, 582, 273, 582, 381, 369, 18, 4881, 1435, 309, 3534, 21696, 11, 316, 833, 30, 582, 18, 542, 1425, 2668, 4881, 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, 3435, 12, 1968, 4672, 315, 2681, 326, 1296, 1269, 316, 833, 6, 775, 30, 582, 273, 582, 381, 369, 18, 4881, 1435, 309, 3534, 21696, 11, 316, 833, 30, 582, 18, 542, 1425, 2668, 4881, 2...
milestones = [m for m in Milestone.select(self.env, showall, db)
milestones = Milestone.select(self.env, 'completed' in show, db) if 'noduedate' in show: milestones = [m for m in milestones if m.due is not None or m.completed] milestones = [m for m in milestones
def process_request(self, req): req.perm.require('MILESTONE_VIEW')
da151934436e39b5fb17fbda7ca373193e3f7022 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/da151934436e39b5fb17fbda7ca373193e3f7022/roadmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 12, 2890, 16, 1111, 4672, 1111, 18, 12160, 18, 6528, 2668, 7492, 900, 882, 5998, 67, 12145, 6134, 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, 1207, 67, 2293, 12, 2890, 16, 1111, 4672, 1111, 18, 12160, 18, 6528, 2668, 7492, 900, 882, 5998, 67, 12145, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if data is not masked:
if data is not masked and self.ndim > 1:
def __getitem__(self, indx): """x.__getitem__(y) <==> x[y]
67ff354b5ca927b3776dae59e421317f47f5d59d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/67ff354b5ca927b3776dae59e421317f47f5d59d/tseries.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 24732, 4672, 3536, 92, 16186, 31571, 972, 12, 93, 13, 411, 631, 34, 619, 63, 93, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 24732, 4672, 3536, 92, 16186, 31571, 972, 12, 93, 13, 411, 631, 34, 619, 63, 93, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return http.Response(stream=s)
return HTMLResponse(stream=s)
def render(self, ctx): s = notebook.plain_text_worksheet_html(self.name) return http.Response(stream=s)
86a4ed9cb0aba48a11523b820246bf1c9d9e7be2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/86a4ed9cb0aba48a11523b820246bf1c9d9e7be2/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 272, 273, 14718, 18, 7446, 67, 955, 67, 1252, 8118, 67, 2620, 12, 2890, 18, 529, 13, 327, 1062, 18, 1064, 12, 3256, 33, 87, 13, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1743, 12, 2890, 16, 1103, 4672, 272, 273, 14718, 18, 7446, 67, 955, 67, 1252, 8118, 67, 2620, 12, 2890, 18, 529, 13, 327, 1062, 18, 1064, 12, 3256, 33, 87, 13, 2, -100, -100, -100, ...
that can be found on MoinMoin:FeatureRequests/WikiEMoinMoin\mailintegration """
that can be found on MoinMoin:FeatureRequests/WikiEmailintegration """
def get_pagename_content(msg, email_subpage_template, wiki_address): """ Generates pagename and content according to the specification that can be found on MoinMoin:FeatureRequests/WikiEMoinMoin\mailintegration """ generate_summary = False choose_html = True pagename_tpl = "" for addr in ('to_addr', 'cc_addr', 'bcc_addr'): if msg[addr][1].strip().lower() == wiki_address: pagename_tpl = msg[addr][0] if not pagename_tpl: m = re_subject.match(msg['subject']) if m: pagename_tpl = m.group(1) else: # special fix for outlook users :-) if pagename_tpl[-1] == pagename_tpl[0] == "'": pagename_tpl = pagename_tpl[1:-1] if pagename_tpl.endswith("/"): pagename_tpl += email_subpage_template # last resort if not pagename_tpl: pagename_tpl = email_subpage_template # rewrite using string.formatter when python 2.4 is mandantory pagename = (pagename_tpl.replace("$from", msg['from_addr'][0]). replace("$date", msg['date']). replace("$subj", msg['subject'])) if pagename.startswith("+ ") and "/" in pagename: generate_summary = True pagename = pagename[1:].lstrip() if choose_html and msg['html']: content = "{{{#!html\n%s\n}}}" % msg['html'].replace("}}}", "} } }") else: # strip signatures ... content = re_sigstrip.sub("", msg['text']) return {'pagename': pagename, 'content': content, 'generate_summary': generate_summary}
1412324803940e40bf045ce957f674e8310d48a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/1412324803940e40bf045ce957f674e8310d48a2/mailimport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9095, 1069, 67, 1745, 12, 3576, 16, 2699, 67, 1717, 2433, 67, 3202, 16, 9050, 67, 2867, 4672, 3536, 31902, 4262, 1069, 471, 913, 4888, 358, 326, 7490, 716, 848, 506, 1392, 603...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9095, 1069, 67, 1745, 12, 3576, 16, 2699, 67, 1717, 2433, 67, 3202, 16, 9050, 67, 2867, 4672, 3536, 31902, 4262, 1069, 471, 913, 4888, 358, 326, 7490, 716, 848, 506, 1392, 603...
textList.extend([controlTypes.speechStateLabels[state] for state in positiveStateSet])
stateList.extend([controlTypes.speechStateLabels[state] for state in positiveStateSet])
def speakObjectProperties(obj,groupName=False,name=False,role=False,states=False,value=False,description=False,keyboardShortcut=False,positionString=False,level=False,contains=False,reason=REASON_QUERY): global beenCanceled if speechMode==speechMode_off: return elif speechMode==speechMode_beeps: tones.beep(config.conf["speech"]["beepSpeechModePitch"],speechMode_beeps_ms) return beenCanceled=False textList=[] if groupName: groupNameText=obj.groupName if isinstance(groupNameText,basestring) and len(groupNameText)>0 and not groupNameText.isspace(): textList.append(groupNameText) if name: nameText=obj.name if isinstance(nameText,basestring) and len(nameText)>0 and not nameText.isspace(): textList.append(nameText) if role: roleNum=obj.role if isinstance(roleNum,int) and (reason!=REASON_FOCUS or roleNum not in silentRolesOnFocus): textList.append(controlTypes.speechRoleLabels[roleNum]) if states: stateSet=obj.states oldStateSet=obj._oldStates positiveStateSet=stateSet oldPositiveStateSet=oldStateSet negativeStateSet=set() oldNegativeStateSet=set() if not role: roleNum=obj.role if reason==REASON_CHANGE: positiveStateSet=positiveStateSet-silentPositiveStatesOnStateChange[controlTypes.ROLE_UNKNOWN] oldPositiveStateSet=oldPositiveStateSet-silentPositiveStatesOnStateChange[controlTypes.ROLE_UNKNOWN] if roleNum!=controlTypes.ROLE_UNKNOWN and silentPositiveStatesOnStateChange.has_key(roleNum): positiveStateSet=positiveStateSet-silentPositiveStatesOnStateChange[roleNum] oldPositiveStateSet=oldPositiveStateSet-silentPositiveStatesOnStateChange[roleNum] textList.extend([controlTypes.speechStateLabels[state] for state in (positiveStateSet-oldPositiveStateSet)]) elif reason==REASON_FOCUS: positiveStateSet=positiveStateSet-silentPositiveStatesOnFocus[controlTypes.ROLE_UNKNOWN] if roleNum!=controlTypes.ROLE_UNKNOWN and silentPositiveStatesOnFocus.has_key(roleNum): positiveStateSet=positiveStateSet-silentPositiveStatesOnFocus[roleNum] textList.extend([controlTypes.speechStateLabels[state] for state in positiveStateSet]) else: textList.extend([controlTypes.speechStateLabels[state] for state in positiveStateSet]) if spokenNegativeStates.has_key(roleNum): negativeStateSet=negativeStateSet|(spokenNegativeStates[roleNum]-stateSet) if reason==REASON_CHANGE: oldNegativeStateSet=oldNegativeStateSet|(spokenNegativeStates[roleNum]-oldStateSet) textList.extend([_("not %s")%controlTypes.speechStateLabels[state] for state in (negativeStateSet-oldNegativeStateSet)]) if value: valueText=obj.value if isinstance(valueText,basestring) and len(valueText)>0 and not valueText.isspace(): textList.append(valueText) if description: descriptionText=obj.description if not name: nameText=obj.name if descriptionText!=nameText and isinstance(descriptionText,basestring) and len(descriptionText)>0 and not descriptionText.isspace(): textList.append(descriptionText) if keyboardShortcut and config.conf["presentation"]["reportKeyboardShortcuts"]: keyboardShortcutText=obj.keyboardShortcut if isinstance(keyboardShortcutText,basestring) and len(keyboardShortcutText)>0 and not keyboardShortcutText.isspace(): textList.append(keyboardShortcutText) if positionString: positionStringText=obj.positionString if isinstance(positionStringText,basestring) and len(positionStringText)>0 and not positionStringText.isspace(): textList.append(positionStringText) if level: levelNum=obj.level if isinstance(levelNum,int): textList.append(_("level %d")%levelNum) if contains: containsText=obj.contains if isinstance(containsText,basestring) and len(containsText)>0 and not containsText.isspace(): textList.append(_("contains %s")%containsText) text=" ".join(textList) if len(text)>0 and not text.isspace(): text=processText(text) getSynth().speakText(text)
56363b3a70f6de082b32f0ae32aa381eadd77d58 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/56363b3a70f6de082b32f0ae32aa381eadd77d58/speech.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 10244, 921, 2297, 12, 2603, 16, 1655, 461, 33, 8381, 16, 529, 33, 8381, 16, 4615, 33, 8381, 16, 7992, 33, 8381, 16, 1132, 33, 8381, 16, 3384, 33, 8381, 16, 31486, 15576, 33, 838...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 10244, 921, 2297, 12, 2603, 16, 1655, 461, 33, 8381, 16, 529, 33, 8381, 16, 4615, 33, 8381, 16, 7992, 33, 8381, 16, 1132, 33, 8381, 16, 3384, 33, 8381, 16, 31486, 15576, 33, 838...
self.addLNBSimple(slotid = x, orbpos = int(nim.diseqcA.vals[nim.diseqcA.value][1]), toneburstmode = 0, diseqcmode = 1, diseqcpos = 0) self.addLNBSimple(slotid = x, orbpos = int(nim.diseqcB.vals[nim.diseqcB.value][1]), toneburstmode = 0, diseqcmode = 1, diseqcpos = 1) self.addLNBSimple(slotid = x, orbpos = int(nim.diseqcC.vals[nim.diseqcC.value][1]), toneburstmode = 0, diseqcmode = 1, diseqcpos = 2) self.addLNBSimple(slotid = x, orbpos = int(nim.diseqcD.vals[nim.diseqcD.value][1]), toneburstmode = 0, diseqcmode = 1, diseqcpos = 3)
self.addLNBSimple(sec, slotid = x, orbpos = int(nim.diseqcA.vals[nim.diseqcA.value][1]), toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AA) self.addLNBSimple(sec, slotid = x, orbpos = int(nim.diseqcB.vals[nim.diseqcB.value][1]), toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.AB) self.addLNBSimple(sec, slotid = x, orbpos = int(nim.diseqcC.vals[nim.diseqcC.value][1]), toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.BA) self.addLNBSimple(sec, slotid = x, orbpos = int(nim.diseqcD.vals[nim.diseqcD.value][1]), toneburstmode = diseqcParam.NO, diseqcmode = diseqcParam.V1_0, diseqcpos = diseqcParam.BB)
def update(self): eDVBSatelliteEquipmentControl.getInstance().clear() self.satList = []
45b15800295dbe7e8aa64c7c97e62ed7a9f0a137 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/45b15800295dbe7e8aa64c7c97e62ed7a9f0a137/NimManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 425, 30199, 12692, 270, 19345, 13142, 11568, 3367, 18, 588, 1442, 7675, 8507, 1435, 225, 365, 18, 12973, 682, 273, 5378, 2, 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, 1089, 12, 2890, 4672, 425, 30199, 12692, 270, 19345, 13142, 11568, 3367, 18, 588, 1442, 7675, 8507, 1435, 225, 365, 18, 12973, 682, 273, 5378, 2, -100, -100, -100, -100, -100, -100, -100, ...
f=open(DV.log_file,'r')
f=DamnOpenFile(DV.log_file,'r')
def run(self): Damnlog('Bug reporter thread launched.') if not len(self.desc): Damnlog('Bug reporter not sending anything - bug description is empty.') self.postEvent(DV.l('Empty bug description field'),DV.l('You must enter a bug description.'),error=True,closedialog=False) return Damnlog('Ready to submit bug.') Damnlog('Initiating Google Code API object.') api=gdata.projecthosting.client.ProjectHostingClient() Damnlog('Logging in with damnvid-user@gmail.com credentials') try: api.client_login('damnvid.user@gmail.com','damnviduser',source='DamnVid '+DV.version,service='code') # OMG! Raw password! except: Damnlog('Could not log in to Google Code (Invalid connection?)',traceback.format_exc()) self.postEvent(DV.l('Error while connecting'),DV.l('Could not connect to Google Code. Please make sure that your Internet connection is active and that no firewall is blocking DamnVid.'),error=True,closedialog=False) return summary=u'Bug: '+self.desc+u'\n\nSteps:\n'+self.steps+u'\n\n'+self.sysinfo+u'\n\n' if len(self.email): summary+=u'Email: '+self.email.replace(u'@',u' (at) ').replace(u'.', u' (dot) ').replace(u'+', u' (plus) ').replace(u'-', u' (minus) ')+u'\n\n' try: Damnlog('Starting log dump, flusing.') DV.log.flush() Damnlog('Flushed, dumping...') logdump='' f=open(DV.log_file,'r') for i in f: logdump+=i f.close() logdump=DamnUnicode(logdump.strip()) Damnlog('Log dump done, uploading to pastebin.') http=urllib2.urlopen(urllib2.Request('http://pastehtml.com/upload/create?input_type=txt&result=address',urllib.urlencode({'txt':logdump}))) pasteurl=http.read(-1) http.close() Damnlog('Uploaded to',pasteurl) summary+=u'damnvid.log: '+DamnUnicode(pasteurl) except: summary+=u'(Could not upload the contents of damnvid.log)' Damnlog('Login successful, submitting issue...') try: api.add_issue('damnvid',self.desc.encode('utf8','ignore'),summary.encode('utf8','ignore'),'windypower',status='New',labels=['Type-Defect','Priority-Medium']) except: Damnlog('Issue submission failed.',traceback.format_exc()) self.postEvent(DV.l('Error while submitting issue'),DV.l('Could not submit bug report to Google Code. Please make sure that your Internet connection is active and that no firewall is blocking DamnVid.'),error=True,closedialog=False) return Damnlog('Issue submission successful.') self.postEvent(DV.l('Success'),DV.l('Bug report submitted successfully. Thanks!'),error=False,closedialog=True)
eb32c3f0350ac5e4cc4ce63c81f04bfa758a966a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/eb32c3f0350ac5e4cc4ce63c81f04bfa758a966a/DamnVid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 463, 301, 82, 1330, 2668, 19865, 11528, 2650, 28786, 1093, 13, 309, 486, 562, 12, 2890, 18, 5569, 4672, 463, 301, 82, 1330, 2668, 19865, 11528, 486, 5431, 6967, 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, 1086, 12, 2890, 4672, 463, 301, 82, 1330, 2668, 19865, 11528, 2650, 28786, 1093, 13, 309, 486, 562, 12, 2890, 18, 5569, 4672, 463, 301, 82, 1330, 2668, 19865, 11528, 486, 5431, 6967, 300...
>>> import numpy as np
>>> import numpy as N
def read_design(desfile, delimiter=',', try_integer=True): """ Return a record array with the design. The columns are first cast as numpy.float, if this fails, its dtype is unchanged. If try_integer is True and a given column can be cast as float, it is then tested to see if it can be cast as numpy.int. >>> design = [["id","age","gender"],[1,23.5,"male"],[2,24.1,"female"],[3,24.5,"male"]] >>> read_design(design) recarray([(1, 23.5, 'male'), (2, 24.100000000000001, 'female'), (3, 24.5, 'male')], dtype=[('id', '<i4'), ('age', '<f8'), ('gender', '|S6')]) >>> design = [["id","age","gender"],[1,23.5,"male"],[2,24.1,"female"],[3.,24.5,"male"]] >>> read_design(design) recarray([(1, 23.5, 'male'), (2, 24.100000000000001, 'female'), (3, 24.5, 'male')], dtype=[('id', '<i4'), ('age', '<f8'), ('gender', '|S6')]) >>> read_design(design, try_integer=False) recarray([(1.0, 23.5, 'male'), (2.0, 24.100000000000001, 'female'), (3.0, 24.5, 'male')], dtype=[('id', '<f8'), ('age', '<f8'), ('gender', '|S6')]) >>> """ if type(desfile) == type("string"): desfile = file(desfile) _reader = reader(desfile, delimiter=delimiter) else: _reader = iter(desfile) colnames = _reader.next() predesign = np.rec.fromrecords([row for row in _reader], names=colnames) # Try to typecast each column to float, then int dtypes = predesign.dtype.descr newdescr = [] newdata = [] for name, descr in dtypes: x = predesign[name] try: y = np.asarray(x.copy(), np.float) # cast as float if np.alltrue(np.equal(x, y)): if try_integer: z = y.astype(np.int) # cast as int if np.alltrue(np.equal(y, z)): newdata.append(z) newdescr.append(z.dtype.descr[0][1]) else: newdata.append(y) newdescr.append(y.dtype.descr[0][1]) else: newdata.append(y) newdescr.append(y.dtype.descr[0][1]) except: newdata.append(x) newdescr.append(descr) return np.rec.fromarrays(newdata, formats=sjoin(newdescr, ','), names=colnames)
d2943ba86f6fded3206a1c709529212d0c25be17 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12658/d2943ba86f6fded3206a1c709529212d0c25be17/regression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 16934, 12, 5489, 768, 16, 5654, 33, 2187, 2187, 775, 67, 7745, 33, 5510, 4672, 3536, 2000, 279, 1409, 526, 598, 326, 8281, 18, 1021, 2168, 854, 1122, 4812, 487, 3972, 18, 5659...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 16934, 12, 5489, 768, 16, 5654, 33, 2187, 2187, 775, 67, 7745, 33, 5510, 4672, 3536, 2000, 279, 1409, 526, 598, 326, 8281, 18, 1021, 2168, 854, 1122, 4812, 487, 3972, 18, 5659...
if birth_event:
if death_event:
def add_data_entry(self, obj): from QuestionDialog import ErrorDialog # First, get the data: if "," in self.de_widgets["NPName"].get_text(): surname, firstname = self.de_widgets["NPName"].get_text().split(",", 1) else: surname, firstname = self.de_widgets["NPName"].get_text(), "" surname = surname.strip() firstname = firstname.strip() gender = self.de_widgets["NPGender"].get_active() if self._dirty: current_person = self._dirty_person else: current_person = self.get_active_object("Person") # Pre-check to make sure everything is ok: ------------------------------------------- if surname == "" and firstname == "": ErrorDialog(_("Please provide a name."), _("Can't add new person.")) return if self.de_widgets["NPRelation"].get_active() == self.NO_REL: # "No relation to active person" pass elif self.de_widgets["NPRelation"].get_active() == self.AS_PARENT: # "Add as a Parent" if current_person == None: ErrorDialog(_("Please set an active person."), _("Can't add new person as a parent.")) return elif gender == gen.lib.Person.UNKNOWN: # unknown ErrorDialog(_("Please set the new person's gender."), _("Can't add new person as a parent.")) return elif self.de_widgets["NPRelation"].get_active() == self.AS_SPOUSE: # "Add as a Spouse" if current_person == None: ErrorDialog(_("Please set an active person."), _("Can't add new person as a spouse.")) return elif (gender == gen.lib.Person.UNKNOWN and current_person.get_gender() == gen.lib.Person.UNKNOWN): # both genders unknown ErrorDialog(_("Please set the new person's gender."), _("Can't add new person as a spouse.")) return elif self.de_widgets["NPRelation"].get_active() == self.AS_SIBLING: # "Add as a Sibling" if current_person == None: ErrorDialog(_("Please set an active person."), _("Can't add new person as a sibling.")) return elif self.de_widgets["NPRelation"].get_active() == self.AS_CHILD: # "Add as a Child" if current_person == None: ErrorDialog(_("Please set an active person."), _("Can't add new person as a child.")) return # Start the transaction: ------------------------------------------------------------ self.trans = self.dbstate.db.transaction_begin() # New person -------------------------------------------------- # Add birth new_birth_date, new_birth_place = self.process_dateplace(self.de_widgets["NPBirth"].get_text().strip()) birth_event = self.make_event(gen.lib.EventType.BIRTH, new_birth_date, new_birth_place) if birth_event: # Only add if there is an event: source_text = self.de_widgets["NPBirthSource"].get_text().strip() if source_text: new, source = self.get_or_create_source(source_text) self.add_source(birth_event, source) self.dbstate.db.commit_event(birth_event, self.trans) # Add death new_death_date, new_death_place = self.process_dateplace(self.de_widgets["NPDeath"].get_text()) death_event = self.make_event(gen.lib.EventType.DEATH, new_death_date, new_death_place) if birth_event: # Only add if there is an event: source_text = self.de_widgets["NPDeathSource"].get_text().strip() if source_text: new, source = self.get_or_create_source(source_text) self.add_source(death_event, source) self.dbstate.db.commit_event(death_event, self.trans) # Now, create the person and events: person = self.make_person(firstname, surname, gender) # New birth for person: if birth_event: birth_ref = gen.lib.EventRef() birth_ref.set_reference_handle(birth_event.get_handle()) person.set_birth_ref(birth_ref) # New death for person: if death_event: death_ref = gen.lib.EventRef() death_ref.set_reference_handle(death_event.get_handle()) person.set_death_ref(death_ref) self.dbstate.db.add_person(person, self.trans) # All error checking done; just add relation: if self.de_widgets["NPRelation"].get_active() == self.NO_REL: # "No relation to active person" pass elif self.de_widgets["NPRelation"].get_active() == self.AS_PARENT: # "Add as a Parent" # Go through current_person parent families added = False for family_handle in current_person.get_parent_family_handle_list(): family = self.dbstate.db.get_family_from_handle(family_handle) if family: # find one that person would fit as a parent fam_husband_handle = family.get_father_handle() fam_wife_handle = family.get_mother_handle() # can we add person as wife? if fam_wife_handle == None and person.get_gender() == gen.lib.Person.FEMALE: # add the person family.set_mother_handle(person.get_handle()) family.set_relationship(gen.lib.FamilyRelType.MARRIED) person.add_family_handle(family.get_handle()) added = True break elif fam_husband_handle == None and person.get_gender() == gen.lib.Person.MALE: # add the person family.set_father_handle(person.get_handle()) family.set_relationship(gen.lib.FamilyRelType.MARRIED) person.add_family_handle(family.get_handle()) added = True break if added: self.dbstate.db.commit_family(family, self.trans) else: family = gen.lib.Family() self.dbstate.db.add_family(family, self.trans) if person.get_gender() == gen.lib.Person.MALE: family.set_father_handle(person.get_handle()) elif person.get_gender() == gen.lib.Person.FEMALE: family.set_mother_handle(person.get_handle()) family.set_relationship(gen.lib.FamilyRelType.MARRIED) # add curent_person as child childref = gen.lib.ChildRef() childref.set_reference_handle(current_person.get_handle()) family.add_child_ref( childref) current_person.add_parent_family_handle(family.get_handle()) # finalize person.add_family_handle(family.get_handle()) self.dbstate.db.commit_family(family, self.trans) elif self.de_widgets["NPRelation"].get_active() == self.AS_SPOUSE: # "Add as a Spouse" added = False family = None for family_handle in current_person.get_family_handle_list(): family = self.dbstate.db.get_family_from_handle(family_handle) if family: fam_husband_handle = family.get_father_handle() fam_wife_handle = family.get_mother_handle() if current_person.get_handle() == fam_husband_handle: # can we add person as wife? if fam_wife_handle == None: if person.get_gender() == gen.lib.Person.FEMALE: # add the person family.set_mother_handle(person.get_handle()) family.set_relationship(gen.lib.FamilyRelType.MARRIED) person.add_family_handle(family.get_handle()) added = True break elif person.get_gender() == gen.lib.Person.UNKNOWN: family.set_mother_handle(person.get_handle()) family.set_relationship(gen.lib.FamilyRelType.MARRIED) person.set_gender(gen.lib.Person.FEMALE) self.de_widgets["NPGender"].set_active(gen.lib.Person.FEMALE) person.add_family_handle(family.get_handle()) added = True break elif current_person.get_handle() == fam_wife_handle: # can we add person as husband? if fam_husband_handle == None: if person.get_gender() == gen.lib.Person.MALE: # add the person family.set_father_handle(person.get_handle()) family.set_relationship(gen.lib.FamilyRelType.MARRIED) person.add_family_handle(family.get_handle()) added = True break elif person.get_gender() == gen.lib.Person.UNKNOWN: family.set_father_handle(person.get_handle()) family.set_relationship(gen.lib.FamilyRelType.MARRIED) person.add_family_handle(family.get_handle()) person.set_gender(gen.lib.Person.MALE) self.de_widgets["NPGender"].set_active(gen.lib.Person.MALE) added = True break if added: self.dbstate.db.commit_family(family, self.trans) else: if person.get_gender() == gen.lib.Person.UNKNOWN: if current_person.get_gender() == gen.lib.Person.UNKNOWN: ErrorDialog(_("Please set gender on Active or new person."), _("Can't add new person as a spouse.")) return elif current_person.get_gender() == gen.lib.Person.MALE: family = gen.lib.Family() self.dbstate.db.add_family(family, self.trans) family.set_father_handle(current_person.get_handle()) family.set_mother_handle(person.get_handle()) family.set_relationship(gen.lib.FamilyRelType.MARRIED) person.set_gender(gen.lib.Person.FEMALE) self.de_widgets["NPGender"].set_active(gen.lib.Person.FEMALE) person.add_family_handle(family.get_handle()) current_person.add_family_handle(family.get_handle()) self.dbstate.db.commit_family(family, self.trans) elif current_person.get_gender() == gen.lib.Person.FEMALE: family = gen.lib.Family() self.dbstate.db.add_family(family, self.trans) family.set_father_handle(person.get_handle()) family.set_mother_handle(current_person.get_handle()) family.set_relationship(gen.lib.FamilyRelType.MARRIED) person.set_gender(gen.lib.Person.MALE) self.de_widgets["NPGender"].set_active(gen.lib.Person.MALE) person.add_family_handle(family.get_handle()) current_person.add_family_handle(family.get_handle()) self.dbstate.db.commit_family(family, self.trans) elif person.get_gender() == gen.lib.Person.MALE: if current_person.get_gender() == gen.lib.Person.UNKNOWN: family = gen.lib.Family() self.dbstate.db.add_family(family, self.trans) family.set_father_handle(person.get_handle()) family.set_mother_handle(current_person.get_handle()) family.set_relationship(gen.lib.FamilyRelType.MARRIED) current_person.set_gender(gen.lib.Person.FEMALE) person.add_family_handle(family.get_handle()) current_person.add_family_handle(family.get_handle()) self.dbstate.db.commit_family(family, self.trans) elif current_person.get_gender() == gen.lib.Person.MALE: ErrorDialog(_("Same genders on Active and new person."), _("Can't add new person as a spouse.")) return elif current_person.get_gender() == gen.lib.Person.FEMALE: family = gen.lib.Family() self.dbstate.db.add_family(family, self.trans) family.set_father_handle(person.get_handle()) family.set_mother_handle(current_person.get_handle()) family.set_relationship(gen.lib.FamilyRelType.MARRIED) person.add_family_handle(family.get_handle()) current_person.add_family_handle(family.get_handle()) self.dbstate.db.commit_family(family, self.trans) elif person.get_gender() == gen.lib.Person.FEMALE: if current_person.get_gender() == gen.lib.Person.UNKNOWN: family = gen.lib.Family() self.dbstate.db.add_family(family, self.trans) family.set_father_handle(current_person.get_handle()) family.set_mother_handle(person.get_handle()) family.set_relationship(gen.lib.FamilyRelType.MARRIED) current_person.set_gender(gen.lib.Person.MALE) person.add_family_handle(family.get_handle()) current_person.add_family_handle(family.get_handle()) self.dbstate.db.commit_family(family, self.trans) elif current_person.get_gender() == gen.lib.Person.MALE: family = gen.lib.Family() self.dbstate.db.add_family(family, self.trans) family.set_father_handle(current_person.get_handle()) family.set_mother_handle(person.get_handle()) family.set_relationship(gen.lib.FamilyRelType.MARRIED) person.add_family_handle(family.get_handle()) current_person.add_family_handle(family.get_handle()) self.dbstate.db.commit_family(family, self.trans) elif current_person.get_gender() == gen.lib.Person.FEMALE: ErrorDialog(_("Same genders on Active and new person."), _("Can't add new person as a spouse.")) return elif self.de_widgets["NPRelation"].get_active() == self.AS_SIBLING: # "Add as a Sibling" added = False for family_handle in current_person.get_parent_family_handle_list(): family = self.dbstate.db.get_family_from_handle(family_handle) if family: childref = gen.lib.ChildRef() childref.set_reference_handle(person.get_handle()) family.add_child_ref( childref) person.add_parent_family_handle(family.get_handle()) added = True break if added: self.dbstate.db.commit_family(family, self.trans) else: family = gen.lib.Family() self.dbstate.db.add_family(family, self.trans) childref = gen.lib.ChildRef() childref.set_reference_handle(person.get_handle()) family.add_child_ref( childref) childref = gen.lib.ChildRef() childref.set_reference_handle(current_person.get_handle()) family.add_child_ref( childref) person.add_parent_family_handle(family.get_handle()) current_person.add_parent_family_handle(family.get_handle()) self.dbstate.db.commit_family(family, self.trans) elif self.de_widgets["NPRelation"].get_active() == self.AS_CHILD: # "Add as a Child" added = False family = None for family_handle in current_person.get_family_handle_list(): family = self.dbstate.db.get_family_from_handle(family_handle) if family: childref = gen.lib.ChildRef() childref.set_reference_handle(person.get_handle()) family.add_child_ref( childref) person.add_parent_family_handle(family.get_handle()) added = True break if added: self.dbstate.db.commit_family(family, self.trans) else: if current_person.get_gender() == gen.lib.Person.UNKNOWN: ErrorDialog(_("Please set gender on Active person."), _("Can't add new person as a child.")) return else: family = gen.lib.Family() self.dbstate.db.add_family(family, self.trans) childref = gen.lib.ChildRef() childref.set_reference_handle(person.get_handle()) family.add_child_ref( childref) person.add_parent_family_handle(family.get_handle()) current_person.add_family_handle(family.get_handle()) if gen.lib.Person.FEMALE: family.set_mother_handle(current_person.get_handle()) else: family.set_father_handle(current_person.get_handle()) self.dbstate.db.commit_family(family, self.trans) # Commit changes ------------------------------------------------- if current_person: self.dbstate.db.commit_person(current_person, self.trans) if person: source_text = self.de_widgets["NPSource"].get_text().strip() if source_text: new, source = self.get_or_create_source(source_text) self.add_source(person, source) self.dbstate.db.commit_person(person, self.trans) self.dbstate.db.transaction_commit(self.trans, (_("Gramplet Data Entry: %s") % name_displayer.display(person)))
861e586e662758397fc67efe6d3dd2d7c6559c1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1491/861e586e662758397fc67efe6d3dd2d7c6559c1a/DataEntryGramplet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 892, 67, 4099, 12, 2890, 16, 1081, 4672, 628, 18267, 6353, 1930, 1068, 6353, 468, 5783, 16, 336, 326, 501, 30, 309, 5753, 316, 365, 18, 323, 67, 18148, 9614, 23430, 461, 6, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 892, 67, 4099, 12, 2890, 16, 1081, 4672, 628, 18267, 6353, 1930, 1068, 6353, 468, 5783, 16, 336, 326, 501, 30, 309, 5753, 316, 365, 18, 323, 67, 18148, 9614, 23430, 461, 6, ...
caller_allocates = '**' not in node.type.ctype
target = self._transformer.lookup_giname(node.type.target_giname) has_double_indirection = '**' in node.type.ctype is_structure_or_union = isinstance(target, (ast.Record, ast.Union)) caller_allocates = (not has_double_indirection and is_structure_or_union)
def _apply_annotations_param_ret_common(self, parent, node, tag): options = getattr(tag, 'options', {})
1113955bb6a5276c21771685dd30c51f9ef1661f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2770/1113955bb6a5276c21771685dd30c51f9ef1661f/maintransformer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9010, 67, 14670, 67, 891, 67, 1349, 67, 6054, 12, 2890, 16, 982, 16, 756, 16, 1047, 4672, 702, 273, 3869, 12, 2692, 16, 296, 2116, 2187, 2618, 13, 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, 9010, 67, 14670, 67, 891, 67, 1349, 67, 6054, 12, 2890, 16, 982, 16, 756, 16, 1047, 4672, 702, 273, 3869, 12, 2692, 16, 296, 2116, 2187, 2618, 13, 2, -100, -100, -100, -100, -10...
os.path.splitext(path)[1].lower() in PE_FILE_EXTENSIONS)
os.path.splitext(path)[1].lower() in PE_FILE_EXTENSIONS and os.path.basename(path) not in EXCLUDED_FILES)
def IsPEFile(path): return (os.path.isfile(path) and os.path.splitext(path)[1].lower() in PE_FILE_EXTENSIONS)
868525fcd5a697f484454c78cc4754e5fab77a5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/868525fcd5a697f484454c78cc4754e5fab77a5f/checkbins.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2585, 1423, 812, 12, 803, 4672, 327, 261, 538, 18, 803, 18, 291, 768, 12, 803, 13, 471, 1140, 18, 803, 18, 4939, 408, 12, 803, 25146, 21, 8009, 8167, 1435, 316, 16628, 67, 3776, 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, 2585, 1423, 812, 12, 803, 4672, 327, 261, 538, 18, 803, 18, 291, 768, 12, 803, 13, 471, 1140, 18, 803, 18, 4939, 408, 12, 803, 25146, 21, 8009, 8167, 1435, 316, 16628, 67, 3776, 67, ...
def logError(self, file): self.error('Could not figure out where file %s goes. Please correct by ' 'hand.', file) def doFile(self, file):
def logError(self, path): self.error('Could not choose correct location for file %s.', path) def doFile(self, path):
def logError(self, file): self.error('Could not figure out where file %s goes. Please correct by ' 'hand.', file)
730ee8a8def7c3e74277a1b9fd995bc254c71aae /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7642/730ee8a8def7c3e74277a1b9fd995bc254c71aae/badfilecontents.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20638, 12, 2890, 16, 585, 4672, 365, 18, 1636, 2668, 4445, 486, 7837, 596, 1625, 585, 738, 87, 13998, 18, 7801, 3434, 635, 296, 296, 2349, 1093, 16, 585, 13, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 20638, 12, 2890, 16, 585, 4672, 365, 18, 1636, 2668, 4445, 486, 7837, 596, 1625, 585, 738, 87, 13998, 18, 7801, 3434, 635, 296, 296, 2349, 1093, 16, 585, 13, 2, -100, -100, -100, -100,...
converter=conn.getConverter()
def _processWhere(conn, args, fieldData): if args and isinstance(args[0], basestring): if fieldData: raise ValueError, "cannot pass keyword args when including sql string" sql=args[0] values=args[1:]
3546b489c540e47c23cc09d9dbc54588c9d46a36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/3546b489c540e47c23cc09d9dbc54588c9d46a36/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 5262, 12, 4646, 16, 833, 16, 23970, 4672, 309, 833, 471, 1549, 12, 1968, 63, 20, 6487, 10699, 4672, 309, 23970, 30, 1002, 2068, 16, 315, 12892, 1342, 4932, 833, 1347, 6508, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2567, 5262, 12, 4646, 16, 833, 16, 23970, 4672, 309, 833, 471, 1549, 12, 1968, 63, 20, 6487, 10699, 4672, 309, 23970, 30, 1002, 2068, 16, 315, 12892, 1342, 4932, 833, 1347, 6508, ...
print "Hardresetting %s" % ( self.host.hostname,)
print "Hardresetting %s" % self.host.hostname
def execute_control(self, timeout=None): section = 0 time_left = None if timeout: end_time = time.time() + timeout time_left = end_time - time.time() while not timeout or time_left > 0: last = self.execute_section(section, time_left) if timeout: time_left = end_time - time.time() if time_left <= 0: break section += 1 if re.match(r'^END .*\t----\t----\t.*$', last): print "Client complete" return elif re.match('^\t*GOOD\t----\treboot\.start.*$', last): print "Client is rebooting" print "Waiting for client to halt" if not self.host.wait_down(HALT_TIME): raise error.AutotestRunError("%s \ failed to shutdown after %ds" % (self.host.hostname, HALT_TIME)) print "Client down, waiting for restart" if not self.host.wait_up(BOOT_TIME): # since reboot failed # hardreset the machine once if possible # before failing this control file print "Hardresetting %s" % ( self.host.hostname,) try: self.host.hardreset(wait=False) except error.AutoservUnsupportedError: print "Hardreset unsupported on %s" % ( self.host.hostname,) raise error.AutotestRunError("%s failed" " to boot after %ds" % ( self.host.hostname, BOOT_TIME,)) self.host.reboot_followup() continue self.host.job.record("ABORT", None, None, "Autotest client terminated " + "unexpectedly") # give the client machine a chance to recover from # possible crash self.host.wait_up(CRASH_RECOVERY_TIME) raise error.AutotestRunError("Aborting - unexpected " "final status message " "from client: %s\n" % last)
7de56c56f0ac0ba4ac9f5411aa58bb607bd40895 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/7de56c56f0ac0ba4ac9f5411aa58bb607bd40895/autotest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 67, 7098, 12, 2890, 16, 2021, 33, 7036, 4672, 2442, 273, 374, 813, 67, 4482, 273, 599, 309, 2021, 30, 679, 67, 957, 273, 813, 18, 957, 1435, 397, 2021, 813, 67, 4482, 273, 679,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 67, 7098, 12, 2890, 16, 2021, 33, 7036, 4672, 2442, 273, 374, 813, 67, 4482, 273, 599, 309, 2021, 30, 679, 67, 957, 273, 813, 18, 957, 1435, 397, 2021, 813, 67, 4482, 273, 679,...
w_meth = self.fn.descr_function_get(space.wrap(5), space.type(space.wrap(5)))
w_meth = descr_function_get(space, self.fn, space.wrap(5), space.type(space.wrap(5)))
def test_fail_call(self): space = self.space w_meth = self.fn.descr_function_get(space.wrap(5), space.type(space.wrap(5))) meth = space.unwrap(w_meth) args = Arguments(space, [space.wrap("spam"), space.wrap("egg")]) self.space.raises_w(self.space.w_TypeError, meth.call_args, args)
ca4c901ccd89e8a8901197bcc41d081914f4c315 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/ca4c901ccd89e8a8901197bcc41d081914f4c315/test_function.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6870, 67, 1991, 12, 2890, 4672, 3476, 273, 365, 18, 2981, 341, 67, 27305, 273, 18426, 67, 915, 67, 588, 12, 2981, 16, 365, 18, 4293, 16, 3476, 18, 4113, 12, 25, 3631, 3476,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6870, 67, 1991, 12, 2890, 4672, 3476, 273, 365, 18, 2981, 341, 67, 27305, 273, 18426, 67, 915, 67, 588, 12, 2981, 16, 365, 18, 4293, 16, 3476, 18, 4113, 12, 25, 3631, 3476,...
self._contents.append(Text.Content('', self.objects, self, 'Plot',
plot = Text.Content('', self.objects, self, 'Plot',
def plot(self, tag): xsize, ysize, refobj, adjustment = struct.unpack("<HHII", tag.contents) self._contents.append(Text.Content('', self.objects, self, 'Plot', {'xsize': xsize, 'ysize': ysize, 'refobj':refobj, 'adjustment':self.adjustment_map[adjustment]}))
b3ee66c4985bbd05093af6684622cb40abf9e427 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/b3ee66c4985bbd05093af6684622cb40abf9e427/objects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12, 2890, 16, 1047, 4672, 619, 1467, 16, 677, 1467, 16, 283, 27936, 16, 18335, 273, 1958, 18, 17309, 2932, 32, 17500, 6954, 3113, 1047, 18, 3980, 13, 3207, 273, 3867, 18, 1350, 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, 3207, 12, 2890, 16, 1047, 4672, 619, 1467, 16, 677, 1467, 16, 283, 27936, 16, 18335, 273, 1958, 18, 17309, 2932, 32, 17500, 6954, 3113, 1047, 18, 3980, 13, 3207, 273, 3867, 18, 1350, 2...
except Exception,e:
except Exception,e:
def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = [] data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in range(len(fields)): if i >= len(line): raise Exception(_('Please check that all your lines have %d columns.') % (len(fields),)) if not line[i]: continue field = fields[i] if (len(field)==len(prefix)+1) and field[len(prefix)].endswith(':db_id'): # Database ID res = False if line[i]: field_name = field[0].split(':')[0] model_rel = fields_def[field_name]['relation'] if fields_def[field[len(prefix)][:-6]]['type']=='many2many': res_id = [] for db_id in line[i].split(config.get('csv_internal_sep')): try: _check_db_id(self, model_rel, db_id) res_id.append(db_id) except Exception,e: warning += [tools.exception_to_unicode(e)] logger.notifyChannel("import", netsvc.LOG_ERROR, tools.exception_to_unicode(e)) if len(res_id): res = [(6, 0, res_id)] else: try: _check_db_id(self, model_rel, line[i]) res = line[i] except Exception,e: warning += [tools.exception_to_unicode(e)] logger.notifyChannel("import", netsvc.LOG_ERROR, tools.exception_to_unicode(e)) row[field_name] = res or False continue
fbee346b9261dc633c438e1335656f5f7cfd43f6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/fbee346b9261dc633c438e1335656f5f7cfd43f6/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 783, 67, 2978, 16, 938, 67, 529, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 420...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 783, 67, 2978, 16, 938, 67, 529, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 420...
def parse(self, systemID): self.parseFile(urllib.urlopen(systemID))
def parse(self, source): """parse using the URL or file handle""" source = saxutils.prepare_input_source(source) self.parseFile(source.getCharacterStream() or source.getByteStream())
def parse(self, systemID): self.parseFile(urllib.urlopen(systemID))
658956d4ee9fe64ab780ded26ffb076143baf06c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/658956d4ee9fe64ab780ded26ffb076143baf06c/Parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 2619, 734, 4672, 365, 18, 2670, 812, 12, 718, 2941, 18, 295, 18589, 12, 4299, 734, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 2619, 734, 4672, 365, 18, 2670, 812, 12, 718, 2941, 18, 295, 18589, 12, 4299, 734, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self._added_traits = {}
self._added_traits = {}
def __init__(self, name='', parent=None, doc=None, add_to_parent=True): super(Container, self).__init__() # don't forget to init HasTraits # or @on_trait_change decorator won't work! self._valid_dict = {} # contains validity flag for each io Trait self._sources = {} # for checking that destination traits cannot be # set by other objects self._added_traits = {} # for keeping track of dynamically added traits for serialization self.parent = parent self.name = name self._inputs = None self._outputs = None self._containers = None if doc is not None: self.__doc__ = doc
8586d67f5d42158f614b7fc3ff6c91066cfdb680 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12610/8586d67f5d42158f614b7fc3ff6c91066cfdb680/container.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 2218, 2187, 982, 33, 7036, 16, 997, 33, 7036, 16, 527, 67, 869, 67, 2938, 33, 5510, 4672, 2240, 12, 2170, 16, 365, 2934, 972, 2738, 972, 1435, 468...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 2218, 2187, 982, 33, 7036, 16, 997, 33, 7036, 16, 527, 67, 869, 67, 2938, 33, 5510, 4672, 2240, 12, 2170, 16, 365, 2934, 972, 2738, 972, 1435, 468...
if message: params['message'] = message
if message: params['message'] = unicode(message)
def share(self, users, message = None): """Shares this track (sends out recommendations). * users: A list that can contain usernames, emails, User objects, or all of them. * message: A message to include in the recommendation message. """ #last.fm currently accepts a max of 10 recipient at a time while(len(users) > 10): section = users[0:9] users = users[9:] self.share(section, message) nusers = [] for user in users: if isinstance(user, User): nusers.append(user.getName()) else: nusers.append(user) params = self._getParams() recipients = ','.join(nusers) params['recipient'] = recipients if message: params['message'] = message Request(self, 'track.share', self.api_key, params, True, self.secret).execute()
39f6fcae7ffe65e98e639a4f98a0137f176570bc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9926/39f6fcae7ffe65e98e639a4f98a0137f176570bc/pylast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7433, 12, 2890, 16, 3677, 16, 883, 273, 599, 4672, 3536, 24051, 333, 3298, 261, 4661, 87, 596, 22867, 1012, 2934, 380, 3677, 30, 432, 666, 716, 848, 912, 27675, 16, 14255, 16, 2177, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7433, 12, 2890, 16, 3677, 16, 883, 273, 599, 4672, 3536, 24051, 333, 3298, 261, 4661, 87, 596, 22867, 1012, 2934, 380, 3677, 30, 432, 666, 716, 848, 912, 27675, 16, 14255, 16, 2177, 21...
if (md.decl.type.hasReply() or md.decl.type.isCtor() or md.decl.type.isDtor()):
if md.decl.type.hasReply():
def visitProtocol(self, p): self.file.addthing(cxx.Whitespace.NL)
a864017a0319c1647f5f43fdebf3ac181d70f464 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/a864017a0319c1647f5f43fdebf3ac181d70f464/lower.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 5752, 12, 2890, 16, 293, 4672, 365, 18, 768, 18, 1289, 4274, 12, 71, 5279, 18, 9431, 18, 24924, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3757, 5752, 12, 2890, 16, 293, 4672, 365, 18, 768, 18, 1289, 4274, 12, 71, 5279, 18, 9431, 18, 24924, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
result = "for("
def __for(node): result = "for(" setup = getattr(node, "setup", None) condition = getattr(node, "condition", None) update = getattr(node, "update", None) if setup: result += compress(setup) result += __semicolonSymbol if condition: result += compress(condition) result += __semicolonSymbol if update: result += compress(update) body = compress(node.body) result += ")%s" % body return result
86d6454a6d94f3f988981cfde2c0e2c07a5b0527 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/86d6454a6d94f3f988981cfde2c0e2c07a5b0527/Compressor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1884, 12, 2159, 4672, 3875, 273, 3869, 12, 2159, 16, 315, 8401, 3113, 599, 13, 2269, 273, 3869, 12, 2159, 16, 315, 4175, 3113, 599, 13, 1089, 273, 3869, 12, 2159, 16, 315, 2725, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1884, 12, 2159, 4672, 3875, 273, 3869, 12, 2159, 16, 315, 8401, 3113, 599, 13, 2269, 273, 3869, 12, 2159, 16, 315, 4175, 3113, 599, 13, 1089, 273, 3869, 12, 2159, 16, 315, 2725, ...
a1 = asarray_chkfinite(a) overwrite_a = overwrite_a or (_datanotshared(a1,a))
a1 = asarray_chkfinite(a) overwrite_a = overwrite_a or (_datanotshared(a1,a))
def eigh(a,lower=1,eigvals_only=0,overwrite_a=0): """ Solve real symmetric or complex hermitian eigenvalue problem. Inputs: a -- A hermitian N x N matrix. lower -- values in a are read from lower triangle [1: UPLO='L' (default) / 0: UPLO='U'] eigvals_only -- don't compute eigenvectors. overwrite_a -- content of a may be destroyed Outputs: w,v -- w: eigenvalues, v: eigenvectors [for eigvals_only == False] w -- eigenvalues [for eigvals_only == True (default)]. Definitions: a * v[:,i] = w[i] * vr[:,i] v.H * v = identity """ if eigvals_only or overwrite_a: a1 = asarray_chkfinite(a) overwrite_a = overwrite_a or (_datanotshared(a1,a)) else: a1 = array(a) if (a1.dtype.char in typecodes['AllFloat']) and not isfinite(a1).all(): raise ValueError, "array must not contain infs or NaNs" overwrite_a = 1 if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]: raise ValueError, 'expected square matrix' if a1.dtype.char in 'FD': heev, = get_lapack_funcs(('heev',),(a1,)) if heev.module_name[:7] == 'flapack': lwork = calc_lwork.heev(heev.prefix,a1.shape[0],lower) w,v,info = heev(a1,lwork = lwork, compute_v = not eigvals_only, lower = lower, overwrite_a = overwrite_a) else: # 'clapack' w,v,info = heev(a1, compute_v = not eigvals_only, lower = lower, overwrite_a = overwrite_a) if info<0: raise ValueError,\ 'illegal value in %-th argument of internal heev'%(-info) if info>0: raise LinAlgError,"eig algorithm did not converge" else: # a1.dtype.char in 'fd': syev, = get_lapack_funcs(('syev',),(a1,)) if syev.module_name[:7] == 'flapack': lwork = calc_lwork.syev(syev.prefix,a1.shape[0],lower) w,v,info = syev(a1,lwork = lwork, compute_v = not eigvals_only, lower = lower, overwrite_a = overwrite_a) else: # 'clapack' w,v,info = syev(a1, compute_v = not eigvals_only, lower = lower, overwrite_a = overwrite_a) if info<0: raise ValueError,\ 'illegal value in %-th argument of internal syev'%(-info) if info>0: raise LinAlgError,"eig algorithm did not converge" if eigvals_only: return w return w, v
cd400c1c2f5100b19fcf298f15e60d171a9932cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/cd400c1c2f5100b19fcf298f15e60d171a9932cb/decomp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 2031, 12, 69, 16, 8167, 33, 21, 16, 22663, 4524, 67, 3700, 33, 20, 16, 19274, 67, 69, 33, 20, 4672, 3536, 348, 5390, 2863, 15108, 578, 7233, 366, 1035, 305, 2779, 16719, 1132, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 2031, 12, 69, 16, 8167, 33, 21, 16, 22663, 4524, 67, 3700, 33, 20, 16, 19274, 67, 69, 33, 20, 4672, 3536, 348, 5390, 2863, 15108, 578, 7233, 366, 1035, 305, 2779, 16719, 1132, 6...
concept = string.lower(akaNick) if (self.definitions.has_key(concept)): self.cmd_def_first(concept)
aka = akaNick.lower() if (self.definitions.has_key(aka)): self.say('%s (aka %s) is %s' % (concept,aka,self.definitions[concept][0]))
def cmd_def_first(self, m): concept = string.lower(m) if (self.definitions.has_key(concept)): self.say('%s is %s' % (m,self.definitions[concept][0])) else: try: nickList = ((self.masternicks[self.NickAka[concept]])['nicklist'])[:] for akaNick in nickList: concept = string.lower(akaNick) if (self.definitions.has_key(concept)): self.cmd_def_first(concept) except: self.cmd_def_unknown(m) if m in self.favorites: self.say("%s is on %s's favorites list" % (m,self.queen)) if m in self.disfavorites: self.say("%s is on %s's least favorites list" % (m,self.queen))
2d7c19442152750eb85b5fa0dc6841ddefaaabe2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9641/2d7c19442152750eb85b5fa0dc6841ddefaaabe2/jibot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 536, 67, 3645, 12, 2890, 16, 312, 4672, 12402, 273, 533, 18, 8167, 12, 81, 13, 309, 261, 2890, 18, 13314, 18, 5332, 67, 856, 12, 25770, 3719, 30, 365, 18, 87, 528, 29909, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 536, 67, 3645, 12, 2890, 16, 312, 4672, 12402, 273, 533, 18, 8167, 12, 81, 13, 309, 261, 2890, 18, 13314, 18, 5332, 67, 856, 12, 25770, 3719, 30, 365, 18, 87, 528, 29909, ...
end = pos + len( v ) f1, f2, f3 = a[0:pos], a[pos:end], a[end:]
end = pos + len( value ) f1, f2, f3 = abs[0:pos], abs[pos:end], abs[end:]
def __substitute( self, fragments, name, value ): """ Look in all not yet substituted fragments for parts that can be substituted by value and, if successful, create a new fragment @param fragments: fragment tuples @type fragments: [ (str, str) ] @param name: substitution variable name @type name: str @param value: susbtitution value in current environment @type value: str @return: fragment tuples @rtype: [ (str, str) ] """ result = []
3c3e49363a7a3c916b648c6154d8aef255c31d3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/482/3c3e49363a7a3c916b648c6154d8aef255c31d3e/LocalPath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1717, 17207, 12, 365, 16, 14656, 16, 508, 16, 460, 262, 30, 3536, 10176, 316, 777, 486, 4671, 7461, 4817, 14656, 364, 2140, 716, 848, 506, 7461, 4817, 635, 460, 471, 16, 309, 687...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1717, 17207, 12, 365, 16, 14656, 16, 508, 16, 460, 262, 30, 3536, 10176, 316, 777, 486, 4671, 7461, 4817, 14656, 364, 2140, 716, 848, 506, 7461, 4817, 635, 460, 471, 16, 309, 687...
print "Try something like install_package('moin-1.5.4.p0'),"
print "Try something like install_package('moin-1.5.6'),"
def wiki_create_instance(directory='sage_wiki'): try: from MoinMoin.server.standalone import StandaloneConfig, run except ImportError: print "You must install the optional moin package." print "Try something like install_package('moin-1.5.4.p0')," print "but note that the package name may have a different" print "version. Use optional_packages() to get a list" print "of current package names." return share = '%s/share/moin'%misc.SAGE_LOCAL if os.path.exists(directory): print "Directory '%s' already exists."%directory return os.system('cp -r %s/data %s/'%(share,directory)) os.system('cp -r %s/underlay %s/'%(share,directory)) os.system('cp %s/config/wikiconfig.py %s/'%(share,directory)) os.system('cp %s/server/moin.py %s/'%(share,directory))
5f3ef361fc81c9a771ee5a50bc33c7f7053ab555 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/5f3ef361fc81c9a771ee5a50bc33c7f7053ab555/moin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9050, 67, 2640, 67, 1336, 12, 5149, 2218, 87, 410, 67, 13044, 11, 4672, 775, 30, 628, 490, 885, 49, 885, 18, 3567, 18, 10145, 12451, 1930, 934, 464, 12451, 809, 16, 1086, 1335, 11308, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9050, 67, 2640, 67, 1336, 12, 5149, 2218, 87, 410, 67, 13044, 11, 4672, 775, 30, 628, 490, 885, 49, 885, 18, 3567, 18, 10145, 12451, 1930, 934, 464, 12451, 809, 16, 1086, 1335, 11308, ...
w, h = drawable.wrap(self.width, self.y - self.bottomMargin - self.bottomPadding)
y = self.y p = self.bottomMargin + self.bottomPadding w, h = drawable.wrap(self.width, y - p )
def add(self, drawable): """ Draws the object at the current position. Returns 1 if successful, 0 if it would not fit. Raises a LayoutError if the object is too wide, or if it is too high for a totally empty frame, to avoid infinite loops""" w, h = drawable.wrap(self.width, self.y - self.bottomMargin - self.bottomPadding)
b84d697ebfdc6a6adcb88bc03a632af5167c1e5d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b84d697ebfdc6a6adcb88bc03a632af5167c1e5d/layout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 19021, 4672, 3536, 10184, 87, 326, 733, 622, 326, 783, 1754, 18, 2860, 404, 309, 6873, 16, 374, 309, 518, 4102, 486, 4845, 18, 20497, 279, 9995, 668, 309, 326, 733, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 19021, 4672, 3536, 10184, 87, 326, 733, 622, 326, 783, 1754, 18, 2860, 404, 309, 6873, 16, 374, 309, 518, 4102, 486, 4845, 18, 20497, 279, 9995, 668, 309, 326, 733, ...
return "%s, %s)" % (numpy.ndarray.__repr__(self)[:-1], repr(self.metadata))
return "%s, %s)" % (repr(self.view(numpy.ndarray))[:-1], repr(self.metadata))
def __repr__(self): return "%s, %s)" % (numpy.ndarray.__repr__(self)[:-1], repr(self.metadata))
e04c61ad8714219b9691d55d7b3e2b6e6734a660 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/e04c61ad8714219b9691d55d7b3e2b6e6734a660/metaarray.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 2213, 87, 16, 738, 87, 2225, 738, 261, 12715, 12, 2890, 18, 1945, 12, 15974, 18, 25681, 3719, 10531, 17, 21, 6487, 8480, 12, 2890, 18, 4165, 3719...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12715, 972, 12, 2890, 4672, 327, 2213, 87, 16, 738, 87, 2225, 738, 261, 12715, 12, 2890, 18, 1945, 12, 15974, 18, 25681, 3719, 10531, 17, 21, 6487, 8480, 12, 2890, 18, 4165, 3719...
scalarproducts_to_order = { 0: 2, 1: 3, 2: 4, 3: 7
scalarproducts_to_order = { 0: 2, 1: 3, 2: 4, 3: 6
def coxeter_matrix_as_function(t): """ Returns the coxeter matrix associated to the Cartan type t. EXAMPLES: sage: from sage.combinat.root_system.coxeter_matrix import coxeter_matrix_as_function sage: f = coxeter_matrix_as_function(['A',4]) sage: matrix([[f(i,j) for j in range(1,5)] for i in range(1,5)]) [1 3 2 2] [3 1 3 2] [2 3 1 3] [2 2 3 1] """ a = CartanType(t).dynkin_diagram() scalarproducts_to_order = { 0: 2, 1: 3, 2: 4, 3: 7 # 4 should be infinity } return lambda i,j: 1 if i == j else scalarproducts_to_order[a[i,j]*a[j,i]]
e2fada126ece71f9b885e5ce2444b0d81173d6e8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/e2fada126ece71f9b885e5ce2444b0d81173d6e8/coxeter_matrix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1825, 92, 847, 67, 5667, 67, 345, 67, 915, 12, 88, 4672, 3536, 2860, 326, 1825, 92, 847, 3148, 3627, 358, 326, 17695, 304, 618, 268, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 628...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1825, 92, 847, 67, 5667, 67, 345, 67, 915, 12, 88, 4672, 3536, 2860, 326, 1825, 92, 847, 3148, 3627, 358, 326, 17695, 304, 618, 268, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 628...
def CheckUsers(self, users_to_check = [], minimal = True, batch = False, auto_answer = None):
def CheckUsers(self, users_to_check = [], minimal = True, batch = False, auto_answer = None):
def CheckUsers(self, users_to_check = [], minimal = True, batch = False, auto_answer = None): """Check user accounts and account data consistency."""
2d1ecedf1a4d5090557df25efcb2a065c17595e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2d1ecedf1a4d5090557df25efcb2a065c17595e0/users.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 6588, 12, 2890, 16, 3677, 67, 869, 67, 1893, 273, 5378, 16, 16745, 273, 1053, 16, 2581, 273, 1083, 16, 3656, 67, 13490, 273, 599, 4672, 3536, 1564, 729, 9484, 471, 2236, 501, 142...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2073, 6588, 12, 2890, 16, 3677, 67, 869, 67, 1893, 273, 5378, 16, 16745, 273, 1053, 16, 2581, 273, 1083, 16, 3656, 67, 13490, 273, 599, 4672, 3536, 1564, 729, 9484, 471, 2236, 501, 142...
that suffix will be stripped off and the number interpreted as the port number to use.
and there is no port specified, that suffix will be stripped off and the number interpreted as the port number to use.
def connect(self, host='localhost', port = 0): """Connect to a host on a given port.
4be90e2b319a530f8ad5751d163daf7879d72218 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4be90e2b319a530f8ad5751d163daf7879d72218/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 16, 1479, 2218, 13014, 2187, 1756, 273, 374, 4672, 3536, 5215, 358, 279, 1479, 603, 279, 864, 1756, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 16, 1479, 2218, 13014, 2187, 1756, 273, 374, 4672, 3536, 5215, 358, 279, 1479, 603, 279, 864, 1756, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
'INT64': lambda r: FBNumeric(precision=r['fprec'], length=r['fscale'] * -1),
'INT64': lambda r: FBNumeric(precision=r['fprec'], scale=r['fscale'] * -1),
def get_col_spec(self): return "SMALLINT"
41bc4d877f09eac7b408155cf17a8a216a7ace97 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1074/41bc4d877f09eac7b408155cf17a8a216a7ace97/firebird.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1293, 67, 2793, 12, 2890, 4672, 327, 315, 23882, 3217, 6, 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, 336, 67, 1293, 67, 2793, 12, 2890, 4672, 327, 315, 23882, 3217, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
query = "SELECT bb.id_bibrec FROM bibrec_bib90x AS bb, bib97x AS b WHERE b.value='%s' AND b.tag='970__a' AND bb.id_bibxxx=b.id" %\
query = "SELECT bb.id_bibrec FROM bibrec_bib97x AS bb, bib97x AS b WHERE b.value='%s' AND b.tag='970__a' AND bb.id_bibxxx=b.id" %\
def get_mysql_recid_from_aleph_sysno(sysno): """Returns MySQL's recID for ALEPH sysno passed in the argument (e.g. "2209836CERCER"). Returns None in case of failure.""" out = None query = "SELECT bb.id_bibrec FROM bibrec_bib90x AS bb, bib97x AS b WHERE b.value='%s' AND b.tag='970__a' AND bb.id_bibxxx=b.id" %\ (escape_string(sysno)) res = run_sql(query, None, 1) if res: out = res[0][0] return out
f8885ff5b8b672e89581fb5ee226eb8e5bf90872 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/f8885ff5b8b672e89581fb5ee226eb8e5bf90872/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12527, 67, 3927, 350, 67, 2080, 67, 5349, 844, 67, 9499, 2135, 12, 9499, 2135, 4672, 3536, 1356, 13485, 1807, 1950, 734, 364, 432, 900, 8939, 2589, 2135, 2275, 316, 326, 1237, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12527, 67, 3927, 350, 67, 2080, 67, 5349, 844, 67, 9499, 2135, 12, 9499, 2135, 4672, 3536, 1356, 13485, 1807, 1950, 734, 364, 432, 900, 8939, 2589, 2135, 2275, 316, 326, 1237, ...
[(0.500000000, -5.45450037e-18), (0.400000000 + 4.00000000*I, 3.31920245 - 2.60028054*I), (0.300000000 + 8.00000000*I, -0.886341185 - 0.422640337*I), (0.200000000 + 12.0000000*I, -3.50558936 - 0.108531690*I), (0.100000000 + 16.0000000*I, -3.87043288 - 1.88049411*I)]
[(0.500000000, 0), (0.400000000 + 4.00000000*I, 3.31920245 - 2.60028054*I), (0.300000000 + 8.00000000*I, -0.886341185 - 0.422640337*I), (0.200000000 + 12.0000000*I, -3.50558936 - 0.108531690*I), (0.100000000 + 16.0000000*I, -3.87043288 - 1.88049411*I)]
def Lseries_values_along_line(self, s0, s1, number_samples): """ Return values of $L(E, s)$ at \code{number_samples} equally-spaced sample points along the line from $s_0$ to $s_1$ in the complex plane.
de740b3a65ec32182bff1b0dd0b15bd37e236b51 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/de740b3a65ec32182bff1b0dd0b15bd37e236b51/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 511, 10222, 67, 2372, 67, 287, 932, 67, 1369, 12, 2890, 16, 272, 20, 16, 272, 21, 16, 1300, 67, 7319, 4672, 3536, 2000, 924, 434, 271, 48, 12, 41, 16, 272, 21877, 622, 521, 710, 95...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 511, 10222, 67, 2372, 67, 287, 932, 67, 1369, 12, 2890, 16, 272, 20, 16, 272, 21, 16, 1300, 67, 7319, 4672, 3536, 2000, 924, 434, 271, 48, 12, 41, 16, 272, 21877, 622, 521, 710, 95...
"VALUES ('%s',%d,'%s','%s','%s','%s',UTC_TIMESTAMP(),UTC_TIMESTAMP(),'Submitted', %s)" % \
"VALUES ('%s',%d,'%s','%s','%s','%s',UTC_TIMESTAMP(),UTC_TIMESTAMP(),'Submitted')" % \
def addPilotTQReference(self,pilotRef,taskQueueID,ownerDN,ownerGroup,broker='Unknown', gridType='DIRAC',requirements='Unknown'): """ Add a new pilot job reference """
34a9ca6aa3e14fada33d15303ea2064d317b3eba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/34a9ca6aa3e14fada33d15303ea2064d317b3eba/PilotAgentsDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 52, 22797, 56, 53, 2404, 12, 2890, 16, 84, 22797, 1957, 16, 4146, 3183, 734, 16, 8443, 8609, 16, 8443, 1114, 16, 21722, 2218, 4874, 2187, 3068, 559, 2218, 4537, 2226, 2187, 16175, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 52, 22797, 56, 53, 2404, 12, 2890, 16, 84, 22797, 1957, 16, 4146, 3183, 734, 16, 8443, 8609, 16, 8443, 1114, 16, 21722, 2218, 4874, 2187, 3068, 559, 2218, 4537, 2226, 2187, 16175, ...
newtext = newtext + getCheckCategoriesTemplate(usage, galleries)
newtext = newtext + getCheckCategoriesTemplate(usage, galleries, len(newcats))
def saveImagePage(imagepage, newcats, usage, galleries, onlyfilter): ''' Remove the old categories and add the new categories to the image. ''' newtext = wikipedia.removeCategoryLinks(imagepage.get(), imagepage.site()) if not(onlyfilter): newtext = removeTemplates(newtext) newtext = newtext + getCheckCategoriesTemplate(usage, galleries) for category in newcats: newtext = newtext + u'[[Category:' + category + u']]\n' if(onlyfilter): comment = u'Filtering categories' else: comment = u'Image is categorized by a bot using data from [[Commons:Tools#CommonSense|CommonSense]]' wikipedia.showDiff(imagepage.get(), newtext) imagepage.put(newtext, comment) return
150cf2ff8102a117c1a9fafa35227be3e6321871 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/150cf2ff8102a117c1a9fafa35227be3e6321871/imagerecat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 2040, 1964, 12, 2730, 2433, 16, 394, 24750, 16, 4084, 16, 314, 30912, 16, 1338, 2188, 4672, 9163, 3581, 326, 1592, 6477, 471, 527, 326, 394, 6477, 358, 326, 1316, 18, 9163, 394, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 2040, 1964, 12, 2730, 2433, 16, 394, 24750, 16, 4084, 16, 314, 30912, 16, 1338, 2188, 4672, 9163, 3581, 326, 1592, 6477, 471, 527, 326, 394, 6477, 358, 326, 1316, 18, 9163, 394, ...
if name in seq_parts: seq_parts[name].append(seq)
if name == 'QUERY': parse_number = parse_number + 1 n = 0 if parse_number == 1: seq_parts.append(seq) seq_names.append(name)
def to_generic(self, alphabet): """Retrieve generic alignment object for the given alignment.
5ec4b5b4aacaade427ff27088ff04f2f01a617d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/5ec4b5b4aacaade427ff27088ff04f2f01a617d8/Record.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 13540, 12, 2890, 16, 10877, 4672, 3536, 5767, 5210, 8710, 733, 364, 326, 864, 8710, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 13540, 12, 2890, 16, 10877, 4672, 3536, 5767, 5210, 8710, 733, 364, 326, 864, 8710, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
types.FunctionType, types.LambdaType, types.MethodType]:
types.FunctionType, types.LambdaType, types.MethodType, types.InstanceType]:
def _copy(self, obj): """ <Purpose> Create a deep copy of an object without using the python 'copy' module. Using copy.deepcopy() doesn't work because builtins like id and hasattr aren't available when this is called. <Arguments> self obj The object to make a deep copy of. <Exceptions> TypeError If an object is encountered that we don't know how to make a copy of. NamespaceViolationError If an unexpected error occurs while copying. This isn't the greatest solution, but in general the idea is we just need to abort the wrapped function call. <Side Effects> A new reference is created to every non-simple type of object. That is, everything except objects of type str, unicode, int, etc. <Returns> The deep copy of obj. """ try: if type(obj) in [str, unicode, int, long, float, complex, bool, types.NoneType, types.FunctionType, types.LambdaType, types.MethodType]: return obj elif type(obj) in [tuple, list, set, frozenset]: temp_list = [] for item in obj: temp_list.append(self._copy(item)) if type(obj) is tuple: return tuple(temp_list) elif type(obj) is set: return set(temp_list) elif type(obj) is frozenset: return frozenset(temp_list) else: return temp_list elif type(obj) is dict: temp_dict = {} for key in obj: temp_dict[key] = self._copy(obj[key]) return temp_dict # We don't copy certain objects. This is because copying an emulated file # object, for example, will cause the destructor of the original one to # be invoked, which will close the actual underlying file. As the object # is wrapped and the client does not have access to it, it's safe to not # wrap it. elif isinstance(obj, (NamespaceObjectWrapper, emulfile.emulated_file, emulcomm.emulated_socket, thread.LockType)): return obj else: raise TypeError("_copy is not implemented for objects of type " + str(type(obj))) except Exception, e: self._handle_violation("_copy failed on " + str(obj) + " with message " + str(e))
574705fccbcd3a86a51e7a6665d77b29ca418316 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7272/574705fccbcd3a86a51e7a6665d77b29ca418316/namespace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3530, 12, 2890, 16, 1081, 4672, 3536, 411, 10262, 4150, 34, 1788, 279, 4608, 1610, 434, 392, 733, 2887, 1450, 326, 5790, 296, 3530, 11, 1605, 18, 11637, 1610, 18, 16589, 3530, 1435,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3530, 12, 2890, 16, 1081, 4672, 3536, 411, 10262, 4150, 34, 1788, 279, 4608, 1610, 434, 392, 733, 2887, 1450, 326, 5790, 296, 3530, 11, 1605, 18, 11637, 1610, 18, 16589, 3530, 1435,...
if rev > 1: try: for _, prev in self._history(path, 0, rev-1, limit=1): return prev except (SystemError, core.SubversionException): pass return None
return self._previous_rev(rev, path)
def previous_rev(self, rev, path=''): rev = self.normalize_rev(rev) if rev > 1: # don't use oldest here, as it's too expensive try: for _, prev in self._history(path, 0, rev-1, limit=1): return prev except (SystemError, # "null arg to internal routine" in 1.2.x core.SubversionException): # in 1.3.x pass return None
c095aabe7b11ac17cb1155c074cc4a0a86c311f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/c095aabe7b11ac17cb1155c074cc4a0a86c311f2/svn_fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2416, 67, 9083, 12, 2890, 16, 5588, 16, 589, 2218, 11, 4672, 5588, 273, 365, 18, 12237, 67, 9083, 12, 9083, 13, 309, 5588, 405, 404, 30, 468, 2727, 1404, 999, 17067, 2674, 16, 487, 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, 2416, 67, 9083, 12, 2890, 16, 5588, 16, 589, 2218, 11, 4672, 5588, 273, 365, 18, 12237, 67, 9083, 12, 9083, 13, 309, 5588, 405, 404, 30, 468, 2727, 1404, 999, 17067, 2674, 16, 487, 5...
if (crystal_symmetry.unit_cell() is None
if (( crystal_symmetry is None or crystal_symmetry.unit_cell() is None)
def as_miller_arrays(self, crystal_symmetry=None, force_symmetry=False, merge_equivalents=True, base_array_info=None): if (self._file_type is None): return [] info_source = self._file_name if (info_source.startswith("./") or info_source.startswith(".\\")): info_source = info_source[2:] if (base_array_info is None): base_array_info = miller.array_info( source=info_source, source_type=self._file_type) if (self._file_type == "cctbx.miller.array"): result = [] for miller_array in self._file_content: info = miller_array.info() if (info is None or not isinstance(info, miller.array_info)): info = base_array_info info.source = info_source info.crystal_symmetry_from_file = crystal.symmetry( unit_cell=miller_array.unit_cell(), space_group_info=miller_array.space_group_info()) result.append(miller_array.customized_copy( crystal_symmetry=miller_array.join_symmetry( other_symmetry=crystal_symmetry, force=force_symmetry)) .set_info(info) .set_observation_type(miller_array.observation_type())) return result if (crystal_symmetry.unit_cell() is None and self._observation_type == 'hklf+ins/res' ): name, ext = os.path.splitext(self._file_name) for shelx_file_name in ('%s.ins' % name, '%s.res' % name): try: shelx_file = open(shelx_file_name) break except IOError: continue else: raise Sorry("Can't open files %s.ins or %s.res" "required by the option hklf+ins/res" % name) crystal_symmetry = crystal_symmetry_from_ins.extract_from( file=shelx_file) shelx_file.seek(0) remaining = shelx_file.read() shelx_file.close() m = re.search("^HKLF\s*(\d)", remaining, re.X|re.M|re.S) if m is None: raise Sorry("%s does not contain the mandatory HKLF instruction" % shelx_file.name) if m.group(1) == "4": self._observation_type = "intensities" elif m.group(1) == "3": self._observation_type = "amplitudes" else: raise Sorry("HKLF %s not supported" % m.group(1)) result = self._file_content.as_miller_arrays( crystal_symmetry=crystal_symmetry, force_symmetry=force_symmetry, merge_equivalents=merge_equivalents, base_array_info=base_array_info) if (self.file_type() == "shelx_hklf"): if (self._observation_type == "intensities"): result[0].set_info(result[0].info().customized_copy( labels=["Iobs", "SigIobs"])) result[0].set_observation_type_xray_intensity() elif (self._observation_type == "amplitudes"): result[0].set_info(result[0].info().customized_copy( labels=["Fobs", "SigFobs"])) result[0].set_observation_type_xray_amplitude() else: raise Sorry("Unresolved amplitude/intensity ambiguity: %s\n" " SHELX reflection files may contain amplitudes or intensities.\n" " Please append =amplitudes\n" " or =hklf3\n" " or =intensities\n" " or =hklf4\n" " to the file name argument or parameter to resolve the" " ambiguity.\n" " If a corresponding .ins file is available, look for the" " HKLF codeword.\n" " Alternatively, run the phenix.reflection_statistics" " command twice,\n" " once with =amplitudes and once with =intensities. Inspect" " the <I^2>/(<I>)^2\n" " statistics. For acentric structures the values should" " fluctuate around\n" " 2.0, for centric structures around 3.0. If the statistics" " are not conclusive\n" " it will be best to recover the original reflection data, such" " as SCALEPACK,\n" " SCALA MTZ, XDS, or d*TREK files." % self._file_name) return result
df6c635657903f516e32da2c1a66eb7d4ce60efd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/696/df6c635657903f516e32da2c1a66eb7d4ce60efd/reflection_file_reader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 487, 67, 81, 24462, 67, 16223, 12, 2890, 16, 4422, 31365, 67, 8117, 18042, 33, 7036, 16, 2944, 67, 8117, 18042, 33, 8381, 16, 2691, 67, 14298, 5162, 4877, 33, 5510, 16, 1026, 67, 1126,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 487, 67, 81, 24462, 67, 16223, 12, 2890, 16, 4422, 31365, 67, 8117, 18042, 33, 7036, 16, 2944, 67, 8117, 18042, 33, 8381, 16, 2691, 67, 14298, 5162, 4877, 33, 5510, 16, 1026, 67, 1126,...
if not XMPP.getRoster().getShow(user.jid) == None and len(user.items_pending) > 0:
if len(XMPP.getRoster().getResources(user.jid)) > 0 and len(user.items_pending) > 0:
def userNotifications(userjid, initialtext = None): """Send notification to some JID""" user = users[userjid] # if the user is conected and have pending items... if not XMPP.getRoster().getShow(user.jid) == None and len(user.items_pending) > 0: if initialtext: XMPP.send(Message(to = user.jid, body = initialtext, typ = 'chat')) user.items_pending.reverse() #we send all items and delete it while len(user.items_pending) > 0: item = user.items_pending.pop() text = "\n%s\n%s" % (re.replace('<.*?>', '', item.title), item.permalink) if item.text != "": text += "\n\n%s" % (re.replace('<.*?>', '', item.text)) text += "\n" XMPP.send(Message(to = user.jid, body = text, typ = 'chat'))
63957c314feeda59d7773d14737ccf8e9027770b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2189/63957c314feeda59d7773d14737ccf8e9027770b/jfn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 729, 14111, 12, 1355, 18252, 16, 2172, 955, 273, 599, 4672, 3536, 3826, 3851, 358, 2690, 804, 734, 8395, 729, 273, 3677, 63, 1355, 18252, 65, 468, 309, 326, 729, 353, 356, 828, 471, 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, 729, 14111, 12, 1355, 18252, 16, 2172, 955, 273, 599, 4672, 3536, 3826, 3851, 358, 2690, 804, 734, 8395, 729, 273, 3677, 63, 1355, 18252, 65, 468, 309, 326, 729, 353, 356, 828, 471, 12...
PrefDialog()
PrefDialog(self)
def on_ppm_pref(self,event,data=None): PrefDialog()
e55a5724d25a08ab1a8b3ca4b24f3a1f9c9d998c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7075/e55a5724d25a08ab1a8b3ca4b24f3a1f9c9d998c/dockbarx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 84, 7755, 67, 25724, 12, 2890, 16, 2575, 16, 892, 33, 7036, 4672, 28184, 6353, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 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, 603, 67, 84, 7755, 67, 25724, 12, 2890, 16, 2575, 16, 892, 33, 7036, 4672, 28184, 6353, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
select.error, thread.error, socket.error):
select.error, threading.ThreadError, socket.error):
def checkReconnectSwitch(self): # A fallback client initially connects to a read-only server, # then discovers a read-write server and switches to that
3cd508c395275293f366cb0b9dcf0fa90db32808 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/3cd508c395275293f366cb0b9dcf0fa90db32808/ConnectionTests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 20427, 10200, 12, 2890, 4672, 468, 432, 5922, 1004, 22458, 23441, 358, 279, 855, 17, 3700, 1438, 16, 468, 1508, 1015, 14014, 414, 279, 855, 17, 2626, 1438, 471, 28216, 358, 716, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 20427, 10200, 12, 2890, 4672, 468, 432, 5922, 1004, 22458, 23441, 358, 279, 855, 17, 3700, 1438, 16, 468, 1508, 1015, 14014, 414, 279, 855, 17, 2626, 1438, 471, 28216, 358, 716, 2, ...
return self.db.untransform_record_data(self._untransform(data))
return self._db_untransform(self._untransform(data))
def untransform_record_data(self, data): return self.db.untransform_record_data(self._untransform(data))
34b8ee72b590e823c6ddc5f50fc447eb69ab6b9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8677/34b8ee72b590e823c6ddc5f50fc447eb69ab6b9c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 6547, 67, 3366, 67, 892, 12, 2890, 16, 501, 4672, 327, 365, 18, 1966, 18, 318, 6547, 67, 3366, 67, 892, 12, 2890, 6315, 318, 6547, 12, 892, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 640, 6547, 67, 3366, 67, 892, 12, 2890, 16, 501, 4672, 327, 365, 18, 1966, 18, 318, 6547, 67, 3366, 67, 892, 12, 2890, 6315, 318, 6547, 12, 892, 3719, 2, -100, -100, -100, -100, -100...
Returns an object implementing IConnector. This connector will call various callbacks on the factory when a connection is made, failed, or lost - see ClientFactory docs for details.
@returns: An object implementing IConnector. This connector will call various callbacks on the factory when a connection is made, failed, or lost - see ClientFactory docs for details.
def connectTCP(self, host, port, factory, timeout=30, bindAddress=None): """Connect a TCP client.
97e07c1876e6ccb6aa36e03f4d9706ee6e059380 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/97e07c1876e6ccb6aa36e03f4d9706ee6e059380/interfaces.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 13891, 12, 2890, 16, 1479, 16, 1756, 16, 3272, 16, 2021, 33, 5082, 16, 1993, 1887, 33, 7036, 4672, 3536, 5215, 279, 9911, 1004, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 13891, 12, 2890, 16, 1479, 16, 1756, 16, 3272, 16, 2021, 33, 5082, 16, 1993, 1887, 33, 7036, 4672, 3536, 5215, 279, 9911, 1004, 18, 2, -100, -100, -100, -100, -100, -100, -100, -...
print "Warning: Could not find trajectory for variable " + name
print "Warning: Could not find trajectory for input variable " + name
def set_initial_from_dymola(self,res, hs_init, start_time_init, final_time_init): """ Initialize the optimization vector from an object of either ResultDymolaTextual or ResultDymolaBinary.
6d8e2cb4182c2b7be72da092b65eeabc29b1019a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7711/6d8e2cb4182c2b7be72da092b65eeabc29b1019a/ipopt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 6769, 67, 2080, 67, 72, 2942, 355, 69, 12, 2890, 16, 455, 16, 12670, 67, 2738, 16, 787, 67, 957, 67, 2738, 16, 727, 67, 957, 67, 2738, 4672, 3536, 9190, 326, 14850, 3806, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6769, 67, 2080, 67, 72, 2942, 355, 69, 12, 2890, 16, 455, 16, 12670, 67, 2738, 16, 787, 67, 957, 67, 2738, 16, 727, 67, 957, 67, 2738, 4672, 3536, 9190, 326, 14850, 3806, ...
""" Prepend dir to path removing duplicates if necessery (also from previous versions) based on the prefix. """ newpath = "" matched = 0 for d in p.split(':'): if newpath: newpath += ':' if d.find(prefix) != -1: newpath += dir matched = 1 else: newpath += d if not matched: if newpath: newpath = dir+':'+newpath else: newpath = dir return newpath
""" Prepend dir to path removing duplicates if necessery (also from previous versions) based on the prefix. """ newpath = "" matched = 0 for d in p.split(':'): if newpath: newpath += ':' if d.find(prefix) != -1: newpath += dir matched = 1 else: newpath += d if not matched: if newpath: newpath = dir+':'+newpath else: newpath = dir return newpath
def prepend_search_path(p,dir,prefix): """ Prepend dir to path removing duplicates if necessery (also from previous versions) based on the prefix. """ newpath = "" matched = 0 for d in p.split(':'): if newpath: newpath += ':' if d.find(prefix) != -1: newpath += dir matched = 1 else: newpath += d if not matched: if newpath: newpath = dir+':'+newpath else: newpath = dir return newpath
2379c2f53950ecf327966e75adef9bde63f974f9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/2379c2f53950ecf327966e75adef9bde63f974f9/ganga_setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8254, 67, 3072, 67, 803, 12, 84, 16, 1214, 16, 3239, 4672, 3536, 28466, 1577, 358, 589, 9427, 11211, 309, 290, 3957, 627, 261, 31144, 628, 2416, 5244, 13, 2511, 603, 326, 1633, 18, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8254, 67, 3072, 67, 803, 12, 84, 16, 1214, 16, 3239, 4672, 3536, 28466, 1577, 358, 589, 9427, 11211, 309, 290, 3957, 627, 261, 31144, 628, 2416, 5244, 13, 2511, 603, 326, 1633, 18, 353...
self.db[key] = value
self.db[self.get_key(key)] = value
def __setitem__(self, key, value): self.db[key] = value
a08514b3b41d65d0b4eeeab9bc1fba226b60ec13 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14800/a08514b3b41d65d0b4eeeab9bc1fba226b60ec13/prefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 498, 16, 460, 4672, 365, 18, 1966, 63, 2890, 18, 588, 67, 856, 12, 856, 25887, 273, 460, 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, 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, 542, 1726, 972, 12, 2890, 16, 498, 16, 460, 4672, 365, 18, 1966, 63, 2890, 18, 588, 67, 856, 12, 856, 25887, 273, 460, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
for m in modorpack.orderedcontents:
for m in sorted(modorpack.orderedcontents, key=lambda m.fullName()):
def moduleSummary(modorpack): r = [tags.li[taglink(modorpack), ' - ', doc2html(modorpack, summary=True)]] if isinstance(modorpack, model.Package) and len(modorpack.orderedcontents) > 1: ul = tags.ul() for m in modorpack.orderedcontents: if m.name != '__init__': ul[moduleSummary(m)] r.append(ul) return r
c196a4e3b7587c610193f1a3b10d93e92eb15424 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5471/c196a4e3b7587c610193f1a3b10d93e92eb15424/nevowhtml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1605, 4733, 12, 1711, 280, 2920, 4672, 436, 273, 306, 4156, 18, 549, 63, 2692, 1232, 12, 1711, 280, 2920, 3631, 296, 300, 2265, 997, 22, 2620, 12, 1711, 280, 2920, 16, 4916, 33, 5510, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1605, 4733, 12, 1711, 280, 2920, 4672, 436, 273, 306, 4156, 18, 549, 63, 2692, 1232, 12, 1711, 280, 2920, 3631, 296, 300, 2265, 997, 22, 2620, 12, 1711, 280, 2920, 16, 4916, 33, 5510, ...
(self.message.method, self.message.path, self.message.proto)))
(message.method, message.path, message.proto)))
def send_message(self, message): message.extract_request() self.send_line(' '.join( (self.message.method, self.message.path, self.message.proto))) self.send_line('Connection: close') for line in message.headers[1:]: if not (line.startswith('Keep-Alive: ') or line.startswith('Connection: ') or line.startswith('Proxy-')): self.send_line(line) self.send_line('') self.buffer.append(message.data)
aaac96e2d79bfc7b9f2da4537d314d493a2b7089 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3111/aaac96e2d79bfc7b9f2da4537d314d493a2b7089/throxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2150, 12, 2890, 16, 883, 4672, 883, 18, 8004, 67, 2293, 1435, 365, 18, 4661, 67, 1369, 2668, 2418, 5701, 12, 261, 2150, 18, 2039, 16, 883, 18, 803, 16, 883, 18, 9393, 20349...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2150, 12, 2890, 16, 883, 4672, 883, 18, 8004, 67, 2293, 1435, 365, 18, 4661, 67, 1369, 2668, 2418, 5701, 12, 261, 2150, 18, 2039, 16, 883, 18, 803, 16, 883, 18, 9393, 20349...
def __init__(self, count=1, trace=1, countfuncs=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None):
def __init__(self, count=1, trace=1, countfuncs=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None):
def __init__(self, count=1, trace=1, countfuncs=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None): """ @param count true iff it should count number of times each line is executed @param trace true iff it should print out each line that is being counted @param countfuncs true iff it should just output a list of (filename, modulename, funcname,) for functions that were called at least once; This overrides `count' and `trace' @param ignoremods a list of the names of modules to ignore @param ignoredirs a list of the names of directories to ignore all of the (recursive) contents of @param infile file from which to read stored counts to be added into the results @param outfile file in which to write the results """ self.infile = infile self.outfile = outfile self.ignore = Ignore(ignoremods, ignoredirs) self.counts = {} # keys are (filename, linenumber) self.blabbed = {} # for debugging self.pathtobasename = {} # for memoizing os.path.basename self.donothing = 0 self.trace = trace self._calledfuncs = {} if countfuncs: self.globaltrace = self.globaltrace_countfuncs elif trace and count: self.globaltrace = self.globaltrace_lt self.localtrace = self.localtrace_trace_and_count elif trace: self.globaltrace = self.globaltrace_lt self.localtrace = self.localtrace_trace elif count: self.globaltrace = self.globaltrace_lt self.localtrace = self.localtrace_count else: # Ahem -- do nothing? Okay. self.donothing = 1
1255e8bca5f975b133653db2e2f74b0d4cb7a9da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1255e8bca5f975b133653db2e2f74b0d4cb7a9da/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1056, 33, 21, 16, 2606, 33, 21, 16, 1056, 17728, 33, 20, 16, 2305, 22760, 33, 9334, 2305, 8291, 33, 9334, 14568, 33, 7036, 16, 8756, 33, 7036, 4672, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1056, 33, 21, 16, 2606, 33, 21, 16, 1056, 17728, 33, 20, 16, 2305, 22760, 33, 9334, 2305, 8291, 33, 9334, 14568, 33, 7036, 16, 8756, 33, 7036, 4672, 35...
None, [cty.POINTER(FL_OBJECT), STRING],
None, [cty.POINTER(FL_OBJECT), STRING],
def fl_set_folder(ob, form): """ fl_set_folder(ob, form) """ _fl_set_folder(ob, form)
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, 542, 67, 5609, 12, 947, 16, 646, 4672, 3536, 1183, 67, 542, 67, 5609, 12, 947, 16, 646, 13, 3536, 225, 389, 2242, 67, 542, 67, 5609, 12, 947, 16, 646, 13, 282, 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, 1183, 67, 542, 67, 5609, 12, 947, 16, 646, 4672, 3536, 1183, 67, 542, 67, 5609, 12, 947, 16, 646, 13, 3536, 225, 389, 2242, 67, 542, 67, 5609, 12, 947, 16, 646, 13, 282, 2, -100, ...
self.inenclosure = 1
self.inenclosure += 1
def _start_enclosure(self, attrsD): self.inenclosure = 1 attrsD = self._itsAnHrefDamnIt(attrsD) self._getContext().setdefault('enclosures', []).append(FeedParserDict(attrsD)) href = attrsD.get('href') if href: context = self._getContext() if not context.get('id'): context['id'] = href
3f76623982d76bdcc9659f24af7e8899c23dbb94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/3f76623982d76bdcc9659f24af7e8899c23dbb94/feedparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1937, 67, 1331, 5919, 12, 2890, 16, 3422, 40, 4672, 365, 18, 267, 1331, 5919, 1011, 404, 3422, 40, 273, 365, 6315, 1282, 979, 15962, 40, 301, 82, 7193, 12, 7039, 40, 13, 365, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1937, 67, 1331, 5919, 12, 2890, 16, 3422, 40, 4672, 365, 18, 267, 1331, 5919, 1011, 404, 3422, 40, 273, 365, 6315, 1282, 979, 15962, 40, 301, 82, 7193, 12, 7039, 40, 13, 365, 63...
the variables constants and the others the original variables, but should be much faster.
the variables constants and the others the original variables.
def fix(self, fixed=None, **kw): """ Fixes some given variables in a given multivariate polynomial and returns the changed multivariate polynomials. The polynomial itself is not affected. The variable,value pairs for fixing are to be provided as dictionary of the form {variable:value}.
0f8dedaf07d1f17e9858c06714e1e6c8c670836f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/0f8dedaf07d1f17e9858c06714e1e6c8c670836f/multi_polynomial_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 12, 2890, 16, 5499, 33, 7036, 16, 2826, 9987, 4672, 3536, 12139, 281, 2690, 864, 3152, 316, 279, 864, 1778, 27693, 16991, 471, 1135, 326, 3550, 1778, 27693, 16991, 87, 18, 1021, 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, 2917, 12, 2890, 16, 5499, 33, 7036, 16, 2826, 9987, 4672, 3536, 12139, 281, 2690, 864, 3152, 316, 279, 864, 1778, 27693, 16991, 471, 1135, 326, 3550, 1778, 27693, 16991, 87, 18, 1021, 16...
if call_id == -1:
if call_id != -1:
def _cb_on_pager_status(self, call_id, to_uri, body, user_data, code, reason, acc_id): call = None if call_id == -1: call = self._lookup_call(call_id) if call: call._cb.on_pager_status(body, user_data, code, reason) else: acc = self._lookup_account(acc_id) buddy = self._lookup_buddy(-1, to_uri) if buddy: buddy._cb.on_pager_status(body, user_data, code, reason) else: acc._cb.on_pager_status(to_uri, body, user_data, code, reason)
763da97bb5cd340898d1ac8173a5bc40a4fd5973 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1375/763da97bb5cd340898d1ac8173a5bc40a4fd5973/pjsua.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7358, 67, 265, 67, 24081, 67, 2327, 12, 2890, 16, 745, 67, 350, 16, 358, 67, 1650, 16, 1417, 16, 729, 67, 892, 16, 981, 16, 3971, 16, 4078, 67, 350, 4672, 745, 273, 599, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7358, 67, 265, 67, 24081, 67, 2327, 12, 2890, 16, 745, 67, 350, 16, 358, 67, 1650, 16, 1417, 16, 729, 67, 892, 16, 981, 16, 3971, 16, 4078, 67, 350, 4672, 745, 273, 599, 309, ...
title = "Édition du groupe %s" % name
title = _("Editing group %s") % name
def edit(uri, name) : """Edit a group.""" users.reload() groups.reload() u = users.users g = groups.groups title = "Édition du groupe %s" % name data = '%s\n%s\n%s\n' % (w.backto(), __groups_actions(), w.menu(uri)) try : group = g[groups.name_to_gid(name)] sys = groups.is_system_group(name) dbl_lists = {} if sys : groups_filters_lists_ids = ( (name, ( 'Gérer les membres', 'Utilisateurs non affectés', 'Membres actuels' ), 'members' ), (configuration.groups.resp_prefix + name, None, '&#160;' ), (configuration.groups.guest_prefix + name, None, '&#160;' ) ) else : groups_filters_lists_ids = ( (name, ['Gérer les membres', 'Utilisateurs non affectés', 'Membres actuels'], 'members'), (configuration.groups.resp_prefix + name, ['Gérer les responsables', 'Utilisateurs non affectés', 'Responsables actuels'], 'resps'), (configuration.groups.guest_prefix + name, ['Gérer les invités', 'Utilisateurs non affectés', 'Invités actuels'], 'guests') ) for (gname, titles, id) in groups_filters_lists_ids : if titles is None : dbl_lists[gname] = id else : users.Select(users.FILTER_STANDARD) dest = g[groups.name_to_gid(gname)]['members'][:] source = [ u[uid]['login'] for uid in users.filtered_users ] for current in g[groups.name_to_gid(gname)]['members'] : try : source.remove(current) except ValueError : dest.remove(current) dest.sort() source.sort() dbl_lists[gname] = w.doubleListBox(titles, id, source, dest) def descr(desc, system) : if system : return desc else : return w.input('description', desc, size = 30, maxlength = 256, accesskey = 'D') def skel(cur_skel, system) : if system : return '' else : return ''' <tr> <td><strong>Squelette</strong></td><td>%s</td> </tr> ''' % w.select('skel', configuration.users.skels, cur_skel, func = os.path.basename) def permissive(perm, sys) : if sys : return '' else : return ''' <tr> <td><strong>Répertoire permissif&#160;?</strong></td><td>%s</td> </tr> ''' % w.checkbox('permissive', "True", "Oui", checked = perm ) form_name = "user_edit_form" data += '''<div id="content">
690f3241794eb1e9043f01ac59d34922393aa298 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7650/690f3241794eb1e9043f01ac59d34922393aa298/groups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 12, 1650, 16, 508, 13, 294, 3536, 4666, 279, 1041, 12123, 225, 3677, 18, 17517, 1435, 3252, 18, 17517, 1435, 225, 582, 273, 3677, 18, 5577, 314, 273, 3252, 18, 4650, 225, 2077, 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, 3874, 12, 1650, 16, 508, 13, 294, 3536, 4666, 279, 1041, 12123, 225, 3677, 18, 17517, 1435, 3252, 18, 17517, 1435, 225, 582, 273, 3677, 18, 5577, 314, 273, 3252, 18, 4650, 225, 2077, 2...
namespace = self._classes[fileId]["namespace"] relpath = self._classes[fileId]["relpath"] lib = self._libs[namespace] cUri = self._computeResourceUri(lib, relpath, rType='class', appRoot=self.approot) cUri = self._encodeUri(cUri) sUri = relpath sUri = os.path.normpath(sUri) sUri = Path.posifyPath(sUri) sUri = self._encodeUri(sUri) sUri = '%s:%s' % (namespace, sUri) packageUris.append('"%s"' % cUri) packageUrisSmall.append('"%s"' % sUri) allUris.append("[" + ",".join(packageUris) + "]") allUrisSmall.append("[" + ",".join(packageUrisSmall) + "]") uriData = "[" + ",\n".join(allUris) + "]" uriDataSmall = "[" + ",\n".join(allUrisSmall) + "]" loaderFile = os.path.join(filetool.root(), os.pardir, "data", "generator", "loader-source.tmpl.js") result = filetool.read(loaderFile) rmap = {} rmap.update(globalCodes) rmap["Parts"] = partData rmap["Uris"] = uriData rmap["Uris2"] = uriDataSmall rmap["Boot"] = '"%s"' % boot templ = MyTemplate(result) result = templ.safe_substitute(rmap) return result def generateSourcePackageCode(self, parts, packages, boot, globalCodes, format=False): if not parts: return "" partData = "{" for partId in parts: partData += '"%s":' % (partId) partData += ('%s,' % parts[partId]).replace(" ", "") partData=partData[:-1] + "}" allUris = [] allUrisSmall = [] for packageId, package in enumerate(packages): packageUris = [] packageUrisSmall = [] for fileId in package: namespace = self._classes[fileId]["namespace"] relpath = self._classes[fileId]["relpath"] lib = self._libs[namespace] cUri = self._computeResourceUri(lib, relpath, rType='class', appRoot=self.approot) sUri = Uri(OsPath(relpath).toUri()) sUri = '%s:%s' % (namespace, sUri.value()) packageUris.append('"%s"' % cUri) packageUrisSmall.append('"%s"' % sUri)
namespace = self._classes[fileId]["namespace"] relpath = OsPath(self._classes[fileId]["relpath"]) lib = self._libs[namespace] classUri = self._computeResourceUri(lib, relpath, rType='class', appRoot=self.approot) shortUri = Uri(relpath.toUri()) packageUris.append('"%s"' % classUri.encodedValue()) packageUrisSmall.append('"%s:%s"' % (namespace, shortUri.encodedValue()))
def generateSourcePackageCode0(self, parts, packages, boot, globalCodes, format=False): if not parts: return ""
6c1607de6e1c540f791e595f73bd040a2fd94679 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/6c1607de6e1c540f791e595f73bd040a2fd94679/CodeGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 1830, 2261, 1085, 20, 12, 2890, 16, 2140, 16, 5907, 16, 4835, 16, 2552, 6295, 16, 740, 33, 8381, 4672, 309, 486, 2140, 30, 327, 1408, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 1830, 2261, 1085, 20, 12, 2890, 16, 2140, 16, 5907, 16, 4835, 16, 2552, 6295, 16, 740, 33, 8381, 4672, 309, 486, 2140, 30, 327, 1408, 2, -100, -100, -100, -100, -100, -100, -100,...
method = getattr(self, "irc_%s" % command, None) try: if method is not None: method(prefix, params) else: self.irc_unknown(prefix, command, params) except: log.deferr()
self.handleCommand(command, prefix, params) def handleCommand(self, command, prefix, params): """Determine the function to call for the given command and call it with the given arguments. """ method = getattr(self, "irc_%s" % command, None) try: if method is not None: method(prefix, params) else: self.irc_unknown(prefix, command, params) except: log.deferr()
def dataReceived(self, data): """This hack is to support mIRC, which sends LF only, even though the RFC says CRLF. (Also, the flexibility of LineReceiver to turn "line mode" on and off was not required.) """ self.buffer = self.buffer + data lines = string.split(self.buffer, LF) # Put the (possibly empty) element after the last LF back in the # buffer self.buffer = lines.pop()
c7c0043bdffda58d13dd58d76c46129051e91bf2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/c7c0043bdffda58d13dd58d76c46129051e91bf2/irc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 8872, 12, 2890, 16, 501, 4672, 3536, 2503, 11769, 353, 358, 2865, 312, 30240, 16, 1492, 9573, 18803, 1338, 16, 5456, 11376, 326, 8372, 20185, 21791, 18, 225, 261, 1067, 2048, 16, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 8872, 12, 2890, 16, 501, 4672, 3536, 2503, 11769, 353, 358, 2865, 312, 30240, 16, 1492, 9573, 18803, 1338, 16, 5456, 11376, 326, 8372, 20185, 21791, 18, 225, 261, 1067, 2048, 16, 32...
add_link(req, what, self.env.href.log(path, **args),
return self.env.href.log(path, **args) def add_page_link(what, page): add_link(req, what, make_log_href(page=page, pages=urllib.quote_plus(' '.join(pages))),
def add_page_link(what, page): args = { 'rev': rev, 'log_mode': log_mode, 'limit': limit, 'page': page, 'pages': urllib.quote_plus(' '.join(pages)), } if full_messages: args['full_messages'] = full_messages add_link(req, what, self.env.href.log(path, **args), 'Revision Log (Page %d)' % (page))
157d852e334a1bd7594d87e0a099c7a011249e6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/157d852e334a1bd7594d87e0a099c7a011249e6e/Browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2433, 67, 1232, 12, 23770, 16, 1363, 4672, 833, 273, 288, 296, 9083, 4278, 5588, 16, 296, 1330, 67, 3188, 4278, 613, 67, 3188, 16, 296, 3595, 4278, 1800, 16, 296, 2433, 4278, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2433, 67, 1232, 12, 23770, 16, 1363, 4672, 833, 273, 288, 296, 9083, 4278, 5588, 16, 296, 1330, 67, 3188, 4278, 613, 67, 3188, 16, 296, 3595, 4278, 1800, 16, 296, 2433, 4278, ...
statusDir = '%s/%s' % (reqDir,status) if os.path.isdir(statusDir): requestNames = os.listdir(statusDir)
statusDir = '%s/%s' % ( reqDir, status ) if os.path.isdir( statusDir ): requestNames = os.listdir( statusDir )
def __locateRequest(self,requestName,assigned=False): """ Locate the sub requests associated with a requestName """ gLogger.info("RequestDBFile.__locateRequest: Attempting to locate %s." % requestName) requestTypes = os.listdir(self.root) subRequests = [] try: for requestType in requestTypes: reqDir = "%s/%s" % (self.root,requestType) if os.path.isdir(reqDir): statusList = os.listdir(reqDir) if not assigned and 'Assigned' in statusList: statusList.remove('Assigned') for status in statusList: statusDir = '%s/%s' % (reqDir,status) if os.path.isdir(statusDir): requestNames = os.listdir(statusDir) if requestName in requestNames: requestPath = '%s/%s' % (statusDir,requestName) subRequests.append(requestPath) gLogger.info("RequestDBFile.__locateRequest: Successfully located %s." % requestName) return S_OK(subRequests) except Exception, x: errStr = "RequestDBFile.__locateRequest: Exception while locating request." gLogger.exception(errStr,requestName,lException=x) return S_ERROR(errStr)
457151afa0c3cb1200853bb72493b03e8f994fca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/457151afa0c3cb1200853bb72493b03e8f994fca/RequestDBFile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 25450, 691, 12, 2890, 16, 2293, 461, 16, 15938, 33, 8381, 4672, 3536, 2851, 340, 326, 720, 3285, 3627, 598, 279, 590, 461, 3536, 314, 3328, 18, 1376, 2932, 691, 2290, 812, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 25450, 691, 12, 2890, 16, 2293, 461, 16, 15938, 33, 8381, 4672, 3536, 2851, 340, 326, 720, 3285, 3627, 598, 279, 590, 461, 3536, 314, 3328, 18, 1376, 2932, 691, 2290, 812, 16186, ...
return '%s' % (strx)
return '%s' % (strx)
def chain_size_string(self, jdict): if jdict.has_key("chains") == False: return "---"
bb3b5e8c7c0e2fcb8020d92f6dcfef34849d771b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10674/bb3b5e8c7c0e2fcb8020d92f6dcfef34849d771b/webtlsmd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2687, 67, 1467, 67, 1080, 12, 2890, 16, 525, 1576, 4672, 309, 525, 1576, 18, 5332, 67, 856, 2932, 23060, 7923, 422, 1083, 30, 327, 5238, 10951, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2687, 67, 1467, 67, 1080, 12, 2890, 16, 525, 1576, 4672, 309, 525, 1576, 18, 5332, 67, 856, 2932, 23060, 7923, 422, 1083, 30, 327, 5238, 10951, 2, -100, -100, -100, -100, -100, -100, -...
st = string.replace(st, k, v)
st = st.replace(k, v)
def multireplace(st, dct): for k, v in dct.items(): st = string.replace(st, k, v) return st
8799a8f5fb9f9e869533ca9824ec8ac8d4c44d8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/8799a8f5fb9f9e869533ca9824ec8ac8d4c44d8b/telnet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1778, 577, 964, 12, 334, 16, 18253, 4672, 364, 417, 16, 331, 316, 18253, 18, 3319, 13332, 384, 273, 384, 18, 2079, 12, 79, 16, 331, 13, 327, 384, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1778, 577, 964, 12, 334, 16, 18253, 4672, 364, 417, 16, 331, 316, 18253, 18, 3319, 13332, 384, 273, 384, 18, 2079, 12, 79, 16, 331, 13, 327, 384, 225, 2, -100, -100, -100, -100, -100...
cur_dir_paths = [ os.path.join(script_path, 'cgc'), os.path.join(script_path, 'cgc.exe') ]
cur_dir_paths = [os.path.join(script_path, 'cgc'), os.path.join(script_path, 'cgc.exe')]
def default_cgc(): paths = [ '/usr/bin/cgc', 'C:/Program Files/NVIDIA Corporation/Cg/bin/cgc.exe', 'C:/Program Files (x86)/NVIDIA Corporation/Cg/bin/cgc.exe' ] for path in paths: if os.path.exists(path): return path script_path = os.path.abspath(sys.path[0]) # Try again looking in the current working directory to match # the layout of the prebuilt o3dConverter binaries. cur_dir_paths = [ os.path.join(script_path, 'cgc'), os.path.join(script_path, 'cgc.exe') ] for path in cur_dir_paths: if (os.path.exists(path)): return path # Last fallback is to use the binaries in o3d/third_party/cg/files. # Unfortunately, because we can't rely on the OS name, we have to # actually try running the cgc executable. o3d_root = find_o3d_root(); cg_root = os.path.join(o3d_root, 'third_party', 'cg', 'files') exes = [ os.path.join(cg_root, 'linux', 'bin', 'cgc'), os.path.join(cg_root, 'linux', 'bin64', 'cgc'), os.path.join(cg_root, 'mac', 'bin', 'cgc'), os.path.join(cg_root, 'win', 'bin', 'cgc.exe') ] for exe in exes: try: subprocess.call([exe, '-v'], stdout=open(os.devnull, 'w'), stderr=open(os.devnull, 'w')) return exe except: pass # We don't know where cgc lives. return ''
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 67, 71, 13241, 13332, 2953, 273, 306, 1173, 13640, 19, 4757, 19, 71, 13241, 2187, 296, 39, 27824, 9459, 6471, 19, 11679, 734, 15188, 9557, 11390, 19, 39, 75, 19, 4757, 19, 71, 132...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 67, 71, 13241, 13332, 2953, 273, 306, 1173, 13640, 19, 4757, 19, 71, 13241, 2187, 296, 39, 27824, 9459, 6471, 19, 11679, 734, 15188, 9557, 11390, 19, 39, 75, 19, 4757, 19, 71, 132...
if self.preventedForFlash:
if self.preventedForFlash or not self.getActivated():
def _check_for_Flash(self): try: tmp = "/tmp" ## look for filenames that begin with 'Flash' for file in os.listdir(tmp): if file.startswith("Flash"): filepath = os.path.join(tmp, file) ## Time of last access. atime = os.stat(filepath).st_atime ### see if user is buffering a flash video if (self.flash_atimes.get(filepath) != None and self.flash_atimes.get(filepath) != atime): ### If caffeine is activated for any other ### reason, don't activate. if self.preventedForFlash: logging.info("Caffeine has detected "+ "that Flash video is playing, "+ "and will activate for 5 minutes.")
296e50cf57b70a484cd9d85bb27a1e90a09d87a5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1563/296e50cf57b70a484cd9d85bb27a1e90a09d87a5/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 1884, 67, 11353, 12, 2890, 4672, 775, 30, 1853, 273, 2206, 5645, 6, 7541, 2324, 364, 9066, 716, 2376, 598, 296, 11353, 11, 364, 585, 316, 1140, 18, 1098, 1214, 12, 5645,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 67, 1884, 67, 11353, 12, 2890, 4672, 775, 30, 1853, 273, 2206, 5645, 6, 7541, 2324, 364, 9066, 716, 2376, 598, 296, 11353, 11, 364, 585, 316, 1140, 18, 1098, 1214, 12, 5645,...
b.nombrebodega as 'Bodega', d.fechacreacion as 'Fecha', d.observacion,
b.nombrebodega as 'Bodega', d.fechacreacion as 'Fecha', kx.observacion as 'Observacion Kardex', d.observacion as 'Observacion Doc',
def updateModels(self): try: if not self.database.isOpen(): if not self.database.open(): raise UserWarning(u"Existen problemas de conexión con la base de datos") self.navigationmodel.setQuery((QSqlQuery(u""" SELECT d.iddocumento, CONCAT_WS(' ',tdc.descripcion, d.ndocimpreso) as 'Documento Referencia', kx.ndocimpreso as 'Numero Kardex', b.nombrebodega as 'Bodega', d.fechacreacion as 'Fecha', d.observacion, d.idbodega FROM documentos d JOIN tiposdoc tdc ON tdc.idtipodoc = d.idtipodoc JOIN bodegas b ON b.idbodega = d.idbodega JOIN docpadrehijos dpd ON dpd.idpadre = d.iddocumento JOIN documentos kx ON kx.iddocumento = dpd.idhijo AND kx.idtipodoc = 27 WHERE d.idtipodoc IN (%s) GROUP BY d.iddocumento """ % self.tiposdoc))) self.detailsModel.setQuery(u""" SELECT axd.idarticulo, ad.descripcion as 'Articulo', axd.unidades as 'Unidades', IF(akx.unidades > 0, CONCAT('+',akx.unidades), IFNULL(akx.unidades,0)) as 'Ajuste', axd.iddocumento FROM articulosxdocumento axd JOIN vw_articulosdescritos ad ON ad.idarticulo = axd.idarticulo JOIN documentos d ON axd.iddocumento = d.iddocumento AND d.idtipodoc IN (%s) JOIN docpadrehijos dph ON axd.iddocumento = dph.idpadre LEFT JOIN articulosxdocumento akx ON akx.iddocumento = dph.idhijo GROUP BY dph.idpadre, axd.idarticulo """ % self.tiposdoc) self.mapper.setModel( self.navproxymodel ) self.mapper.addMapping(self.txtParentPrintedDocumentNumber, NDOCIMPRESO) self.mapper.addMapping(self.txtPrintedDocumentNumber, NKARDEX) self.mapper.addMapping(self.dtPicker, FECHA) self.mapper.addMapping(self.txtWarehouse, NOMBREBODEGA) self.tabledetails.horizontalHeader().setStretchLastSection(True) except UserWarning as inst: QMessageBox.critical(self, "Llantera Esquipulas", str(inst)) except Exception as inst: print inst
228e147f7ca159b05bd8e79d8fcd7d57976c6018 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11009/228e147f7ca159b05bd8e79d8fcd7d57976c6018/kardex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 8430, 12, 2890, 4672, 775, 30, 309, 486, 365, 18, 6231, 18, 291, 3678, 13332, 309, 486, 365, 18, 6231, 18, 3190, 13332, 1002, 2177, 6210, 12, 89, 6, 4786, 275, 6199, 345, 443, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8430, 12, 2890, 4672, 775, 30, 309, 486, 365, 18, 6231, 18, 291, 3678, 13332, 309, 486, 365, 18, 6231, 18, 3190, 13332, 1002, 2177, 6210, 12, 89, 6, 4786, 275, 6199, 345, 443, ...
if path == "/test/":
if path == "/test":
def get(self): path = self.request.path # special path to invoke the unit tests # TODO(nickbaum): is there a less ghetto way to invoke the unit test? if path == "/test/": self.unitTest() return # if root, redirect to index.html # TODO(nickbaum): this doesn't handle /chrome/extensions/trunk, etc if (path == "/chrome/extensions") or (path == "chrome/extensions/"): self.redirect("/chrome/extensions/index.html") return # else remove prefix if(path[:18] == "/chrome/extensions"): path = path[18:] # TODO(nickbaum): there's a subtle bug here: if there are two instances of the app, # their default caches will override each other. This is bad! result = memcache.get(path) if result is None: logging.info("Cache miss: " + path) url = self.getSrcUrl(path) if (url[1] is not Channel.TRUNK) and (url[0] != "http://src.chromium.org/favicon.ico"): branch = self.getBranch(url[1]) url = url[0] % branch else: url = url[0] logging.info("Path: " + self.request.path) logging.info("Url: " + url) try: result = urlfetch.fetch(url + self.request.query_string) if result.status_code != 200: logging.error("urlfetch failed: " + url) # TODO(nickbaum): what should we do when the urlfetch fails? except: logging.error("urlfetch failed: " + url) # TODO(nickbaum): what should we do when the urlfetch fails? try: if not memcache.add(path, result, DEFAULT_CACHE_TIME): logging.error("Memcache set failed.") except: logging.error("Memcache set failed.") for key in result.headers: self.response.headers[key] = result.headers[key] self.response.out.write(result.content)
08284a8e331cb1a9ac04ee5e0da07efb131514bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/08284a8e331cb1a9ac04ee5e0da07efb131514bd/chromeextensionsdocs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 589, 273, 365, 18, 2293, 18, 803, 468, 4582, 589, 358, 4356, 326, 2836, 7434, 468, 2660, 12, 17091, 12124, 379, 4672, 353, 1915, 279, 5242, 21409, 278, 869, 4031, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 4672, 589, 273, 365, 18, 2293, 18, 803, 468, 4582, 589, 358, 4356, 326, 2836, 7434, 468, 2660, 12, 17091, 12124, 379, 4672, 353, 1915, 279, 5242, 21409, 278, 869, 4031, ...
try: from os import popen3 except NameError:
if hasattr(os, "popen3"): def popen3(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin, child_stderr) are returned.""" w, r, e = os.popen3(cmd, mode, bufsize) return r, w, e else:
def popen2(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" if type(mode) is type(0) and bufsize == -1: bufsize = mode mode = 't' assert mode in ('t', 'b') _cleanup() inst = Popen3(cmd, 0, bufsize) return inst.fromchild, inst.tochild
c153d89f35e9d66718234209ea5fe528bc920b4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c153d89f35e9d66718234209ea5fe528bc920b4d/popen2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30925, 22, 12, 4172, 16, 1965, 2218, 88, 2187, 1681, 1467, 29711, 21, 4672, 3536, 5289, 326, 5972, 1296, 296, 4172, 11, 316, 279, 720, 17, 2567, 18, 225, 971, 296, 4385, 1467, 11, 353,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30925, 22, 12, 4172, 16, 1965, 2218, 88, 2187, 1681, 1467, 29711, 21, 4672, 3536, 5289, 326, 5972, 1296, 296, 4172, 11, 316, 279, 720, 17, 2567, 18, 225, 971, 296, 4385, 1467, 11, 353,...
print `header`
def decode(input, output, resonly=0): if type(input) == type(''): input = open(input, 'rb') # Should we also test for FSSpecs or FSRefs? header = input.read(AS_HEADER_LENGTH) print `header` try: magic, version, dummy, nentry = struct.unpack(AS_HEADER_FORMAT, header) except ValueError, arg: raise Error, "Unpack header error: %s"%arg if verbose: print 'Magic: 0x%8.8x'%magic print 'Version: 0x%8.8x'%version print 'Entries: %d'%nentry if magic != AS_MAGIC: raise Error, 'Unknown AppleSingle magic number 0x%8.8x'%magic if version != AS_VERSION: raise Error, 'Unknown AppleSingle version number 0x%8.8x'%version if nentry <= 0: raise Error, "AppleSingle file contains no forks" headers = [input.read(AS_ENTRY_LENGTH) for i in range(nentry)] didwork = 0 for hdr in headers: try: id, offset, length = struct.unpack(AS_ENTRY_FORMAT, hdr) except ValueError, arg: raise Error, "Unpack entry error: %s"%arg if verbose: print 'Fork %d, offset %d, length %d'%(id, offset, length) input.seek(offset) if length == 0: data = '' else: data = input.read(length) if len(data) != length: raise Error, 'Short read: expected %d bytes got %d'%(length, len(data)) if id == AS_DATAFORK: if verbose: print ' (data fork)' if not resonly: didwork = 1 fp = open(output, 'wb') fp.write(data) fp.close() elif id == AS_RESOURCEFORK: didwork = 1 if verbose: print ' (resource fork)' if resonly: fp = open(output, 'wb') else: fp = MacOS.openrf(output, 'wb') fp.write(data) fp.close() elif id in AS_IGNORE: if verbose: print ' (ignored)' else: raise Error, 'Unknown fork type %d'%id if not didwork: raise Error, 'No useful forks found'
3a0beeede35f9ea91f2095c1ee92394bd116a68f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3a0beeede35f9ea91f2095c1ee92394bd116a68f/applesingle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 12, 2630, 16, 876, 16, 400, 3700, 33, 20, 4672, 309, 618, 12, 2630, 13, 422, 618, 2668, 11, 4672, 810, 273, 1696, 12, 2630, 16, 296, 6731, 6134, 468, 9363, 732, 2546, 1842, 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, 2495, 12, 2630, 16, 876, 16, 400, 3700, 33, 20, 4672, 309, 618, 12, 2630, 13, 422, 618, 2668, 11, 4672, 810, 273, 1696, 12, 2630, 16, 296, 6731, 6134, 468, 9363, 732, 2546, 1842, 364...
if self.occurences:
if self.occurrences:
def __str__(self, wrapwidth=78): """ Return the string representation of the entry. """ ret = [] # comment first, if any (with text wrapping as xgettext does) if self.comment != '': comments = _strsplit(self._decode(self.comment), '\n') for comment in comments: if wrapwidth > 0 and len(comment) > wrapwidth-3: lines = _textwrap(comment, wrapwidth, initial_indent='#. ', subsequent_indent='#. ', break_long_words=False) _listappend(ret, lines) else: _listappend(ret, '#. %s' % comment) # translator comment, if any (with text wrapping as xgettext does) if self.tcomment != '': tcomments = _strsplit(self._decode(self.tcomment), '\n') for tcomment in tcomments: if wrapwidth > 0 and len(tcomment) > wrapwidth-2: lines = _textwrap(tcomment, wrapwidth, initial_indent='# ', subsequent_indent='# ', break_long_words=False) _listappend(ret, lines) else: _listappend(ret, '# %s' % tcomment) # occurences (with text wrapping as xgettext does) if self.occurences: filelist = [] for fpath, lineno in self.occurences: _listappend(filelist, '%s:%s' % (self._decode(fpath), lineno)) filestr = _strjoin(' ', filelist) if wrapwidth > 0 and len(filestr)+3 > wrapwidth: # XXX textwrap split words that contain hyphen, this is not # what we want for filenames, so the dirty hack is to # temporally replace hyphens with a char that a file cannot # contain, like "*" lines = _strreplace(filestr, '-', '*') lines = _textwrap(filestr, wrapwidth, initial_indent='#: ', subsequent_indent='#: ', break_long_words=False) # end of the replace hack for line in lines: _listappend(ret, _strreplace(line, '*', '-')) else: _listappend(ret, '#: '+filestr) # flags if self.flags: flags = [] for flag in self.flags: _listappend(flags, flag) _listappend(ret, '#, %s' % _strjoin(', ', flags)) _listappend(ret, _BaseEntry.__str__(self)) return _strjoin('\n', ret)
ff9943af59a4994cd9185e9c75a8b1d02243ae04 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9209/ff9943af59a4994cd9185e9c75a8b1d02243ae04/polib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 16, 2193, 2819, 33, 8285, 4672, 3536, 2000, 326, 533, 4335, 434, 326, 1241, 18, 3536, 325, 273, 5378, 468, 2879, 1122, 16, 309, 1281, 261, 1918, 977, 14702, 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, 1001, 701, 972, 12, 2890, 16, 2193, 2819, 33, 8285, 4672, 3536, 2000, 326, 533, 4335, 434, 326, 1241, 18, 3536, 325, 273, 5378, 468, 2879, 1122, 16, 309, 1281, 261, 1918, 977, 14702, 4...
tarinfo.name = normpath(tarinfo.name) if tarinfo.isdir(): tarinfo.name += "/" if tarinfo.linkname: tarinfo.linkname = normpath(tarinfo.linkname) if tarinfo.size > MAXSIZE_MEMBER: if self.posix: raise ValueError("file is too large (>= 8 GB)") else: self._dbg(2, "tarfile: Created GNU tar largefile header") if len(tarinfo.linkname) > LENGTH_LINK: if self.posix: raise ValueError("linkname is too long (>%d)" % (LENGTH_LINK)) else: self._create_gnulong(tarinfo.linkname, GNUTYPE_LONGLINK) tarinfo.linkname = tarinfo.linkname[:LENGTH_LINK -1] self._dbg(2, "tarfile: Created GNU tar extension LONGLINK") if len(tarinfo.name) > LENGTH_NAME: if self.posix: prefix = tarinfo.name[:LENGTH_PREFIX + 1] while prefix and prefix[-1] != "/": prefix = prefix[:-1] name = tarinfo.name[len(prefix):] prefix = prefix[:-1] if not prefix or len(name) > LENGTH_NAME: raise ValueError("name is too long (>%d)" % (LENGTH_NAME)) tarinfo.name = name tarinfo.prefix = prefix else: self._create_gnulong(tarinfo.name, GNUTYPE_LONGNAME) tarinfo.name = tarinfo.name[:LENGTH_NAME - 1] self._dbg(2, "tarfile: Created GNU tar extension LONGNAME") self.fileobj.write(tarinfo.tobuf(self.posix)) self.offset += BLOCKSIZE
tarinfo = copy.copy(tarinfo) buf = tarinfo.tobuf(self.posix) self.fileobj.write(buf) self.offset += len(buf)
def addfile(self, tarinfo, fileobj=None): """Add the TarInfo object `tarinfo' to the archive. If `fileobj' is given, tarinfo.size bytes are read from it and added to the archive. You can create TarInfo objects using gettarinfo(). On Windows platforms, `fileobj' should always be opened with mode 'rb' to avoid irritation about the file size. """ self._check("aw")
90ce5908d2ea58a840421d27e19e71de9322dfc5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/90ce5908d2ea58a840421d27e19e71de9322dfc5/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 768, 12, 2890, 16, 8232, 1376, 16, 17041, 33, 7036, 4672, 3536, 986, 326, 20334, 966, 733, 1375, 11718, 1376, 11, 358, 326, 5052, 18, 971, 1375, 768, 2603, 11, 353, 864, 16, 8232,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 768, 12, 2890, 16, 8232, 1376, 16, 17041, 33, 7036, 4672, 3536, 986, 326, 20334, 966, 733, 1375, 11718, 1376, 11, 358, 326, 5052, 18, 971, 1375, 768, 2603, 11, 353, 864, 16, 8232,...
dataSample5 = [(10, 20), (20, 30), (30, 40), (40, 50), (50, 60)]
dataSample5 = [(10, 60), (20, 50), (30, 40), (40, 30)]
def sample4d(): "Make a bar chart showing value axis region entirely *below* zero." drawing = Drawing(400, 200) data = [(-13, -20)] bc = VerticalBarChart() bc.x = 50 bc.y = 50 bc.height = 125 bc.width = 300 bc.data = data bc.strokeColor = colors.black bc.valueAxis.valueMin = -30 bc.valueAxis.valueMax = -10 bc.valueAxis.valueStep = 15 bc.categoryAxis.labels.boxAnchor = 'n' bc.categoryAxis.labels.dy = -5 bc.categoryAxis.categoryNames = ['Ying', 'Yang'] drawing.add(bc) return drawing
fc7ad267a5cb33da3e1b6e29af074a0469ccb6d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/fc7ad267a5cb33da3e1b6e29af074a0469ccb6d6/barchart1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3296, 24, 72, 13332, 315, 6464, 279, 4653, 4980, 17253, 460, 2654, 3020, 21658, 380, 27916, 14, 3634, 1199, 225, 16327, 273, 10184, 310, 12, 16010, 16, 4044, 13, 225, 501, 273, 306, 1923...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3296, 24, 72, 13332, 315, 6464, 279, 4653, 4980, 17253, 460, 2654, 3020, 21658, 380, 27916, 14, 3634, 1199, 225, 16327, 273, 10184, 310, 12, 16010, 16, 4044, 13, 225, 501, 273, 306, 1923...
result = result + self.doctree( entry, modname, cl, prefix + ' ')
result = result + self.formattree( entry, modname, c, prefix + ' ')
def doctree(self, tree, modname, parent=None, prefix=''): """Render in text a class tree as returned by inspect.getclasstree().""" result = '' for entry in tree: if type(entry) is type(()): cl, bases = entry result = result + prefix + classname(cl, modname) if bases and bases != (parent,): parents = map(lambda cl, m=modname: classname(cl, m), bases) result = result + '(%s)' % join(parents, ', ') result = result + '\n' elif type(entry) is type([]): result = result + self.doctree( entry, modname, cl, prefix + ' ') return result
2c3f3ddf9452a1f3f228e0d8c7abdbeed214a6b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2c3f3ddf9452a1f3f228e0d8c7abdbeed214a6b7/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31263, 992, 12, 2890, 16, 2151, 16, 16037, 16, 982, 33, 7036, 16, 1633, 2218, 11, 4672, 3536, 3420, 316, 977, 279, 667, 2151, 487, 2106, 635, 5334, 18, 588, 830, 345, 334, 992, 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, 31263, 992, 12, 2890, 16, 2151, 16, 16037, 16, 982, 33, 7036, 16, 1633, 2218, 11, 4672, 3536, 3420, 316, 977, 279, 667, 2151, 487, 2106, 635, 5334, 18, 588, 830, 345, 334, 992, 1435, ...
result = self.make_token(start, self.last_matched_index, source)
result = self.make_token(start, self.last_matched_state, source)
def find_next_token(self): while 1: self.state = 0 start = self.last_matched_index + 1 assert start >= 0
ab2dd1d0d919309230ba14eaf8630e3f031f665b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6934/ab2dd1d0d919309230ba14eaf8630e3f031f665b/lexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 4285, 67, 2316, 12, 2890, 4672, 1323, 404, 30, 365, 18, 2019, 273, 374, 787, 273, 365, 18, 2722, 67, 11073, 67, 1615, 397, 404, 1815, 787, 1545, 374, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1104, 67, 4285, 67, 2316, 12, 2890, 4672, 1323, 404, 30, 365, 18, 2019, 273, 374, 787, 273, 365, 18, 2722, 67, 11073, 67, 1615, 397, 404, 1815, 787, 1545, 374, 2, -100, -100, -100, -...
self.lock.acquire()
def updateDone(self): self.lock.acquire() self._message('') self.updateText = None self.lock.release()
96cb9597972f2239714af0c054dbabf0c65c5eab /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/96cb9597972f2239714af0c054dbabf0c65c5eab/updatecmd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 7387, 12, 2890, 4672, 365, 6315, 2150, 2668, 6134, 365, 18, 2725, 1528, 273, 599, 365, 18, 739, 18, 9340, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 7387, 12, 2890, 4672, 365, 6315, 2150, 2668, 6134, 365, 18, 2725, 1528, 273, 599, 365, 18, 739, 18, 9340, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
partner = self.browse(cr, uid, id).partner_id context.update({'lang': partner.lang})
partner = self.browse(cr, uid, id,context=context).partner_id if partner.lang: context.update({'lang': partner.lang})
def button_reset_taxes(self, cr, uid, ids, context=None): if not context: context = {} ait_obj = self.pool.get('account.invoice.tax') for id in ids: cr.execute("DELETE FROM account_invoice_tax WHERE invoice_id=%s", (id,)) partner = self.browse(cr, uid, id).partner_id context.update({'lang': partner.lang}) for taxe in ait_obj.compute(cr, uid, id, context=context).values(): ait_obj.create(cr, uid, taxe) # Update the stored value (fields.function), so we write to trigger recompute self.pool.get('account.invoice').write(cr, uid, ids, {}, context=context)
a4fbd2e0ffe239d3413c2aee9203565e06bbf7c8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/a4fbd2e0ffe239d3413c2aee9203565e06bbf7c8/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3568, 67, 6208, 67, 8066, 281, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 273, 2618, 279, 305, 67, 2603, 273, 365, 18, 6011, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3568, 67, 6208, 67, 8066, 281, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 273, 2618, 279, 305, 67, 2603, 273, 365, 18, 6011, 18, 588, ...
stderr = "scons: \*\*\* \[failed\d+] Error 2\n",
stderr = re_errors,
def fail_action(target = None, source = None, env = None): return 2
4feb688e4af7e13dfc04f99db3e0b0d2e205270c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12817/4feb688e4af7e13dfc04f99db3e0b0d2e205270c/multiple-parents.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 67, 1128, 12, 3299, 273, 599, 16, 1084, 273, 599, 16, 1550, 273, 599, 4672, 327, 576, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 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, 2321, 67, 1128, 12, 3299, 273, 599, 16, 1084, 273, 599, 16, 1550, 273, 599, 4672, 327, 576, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
try: if isinstance(self.socket, ssl.SSLSocket): if self.socket._sslobj is not None: self.socket.unwrap() finally: super(SSLConnection, self).close()
if (isinstance(self.socket, ssl.SSLSocket) and self.socket._sslobj is not None): self._do_ssl_shutdown()
def close(self): try: if isinstance(self.socket, ssl.SSLSocket): if self.socket._sslobj is not None: self.socket.unwrap() finally: super(SSLConnection, self).close()
1ed3d171f04d0572132f528b514b20d186bd005e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/1ed3d171f04d0572132f528b514b20d186bd005e/test_ftplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 775, 30, 309, 1549, 12, 2890, 18, 7814, 16, 5832, 18, 1260, 25831, 4672, 309, 365, 18, 7814, 6315, 1049, 383, 441, 353, 486, 599, 30, 365, 18, 7814, 18, 318, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 775, 30, 309, 1549, 12, 2890, 18, 7814, 16, 5832, 18, 1260, 25831, 4672, 309, 365, 18, 7814, 6315, 1049, 383, 441, 353, 486, 599, 30, 365, 18, 7814, 18, 318, 41...
def _findSources(repos, callback=None):
def _findSources(self, repos, callback=None):
def _findSources(repos, callback=None): """ Method used to find all of the source components that would need to be built to build this group, including their flavor. """ return findSourcesForGroup(repos, self, callback)
a023d558219e13d3a60367ef226b52f871f2d3b0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/a023d558219e13d3a60367ef226b52f871f2d3b0/grouprecipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 8628, 12, 2890, 16, 13686, 16, 1348, 33, 7036, 4672, 3536, 2985, 1399, 358, 1104, 777, 434, 326, 1084, 4085, 716, 4102, 1608, 358, 506, 6650, 358, 1361, 333, 1041, 16, 6508, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 4720, 8628, 12, 2890, 16, 13686, 16, 1348, 33, 7036, 4672, 3536, 2985, 1399, 358, 1104, 777, 434, 326, 1084, 4085, 716, 4102, 1608, 358, 506, 6650, 358, 1361, 333, 1041, 16, 6508, ...
def __getSubTree(tree, index): total = 0 if index == 0: return tree for child in tree: if total == index: return child try: nbrChild = IndividualTree.count(child) if nbrChild + total > index: return __getNode(child, index-total) else: total += nbrChild except: total += 1 return __getSubTree(self, index)
total = 0 if index == 0: return self for child in self: if total == index: return child try: nbrChild = IndividualTree.count(child) if nbrChild + total > index: return getSubTree(child, index-total) else: total += nbrChild except: total += 1
def __getSubTree(tree, index): total = 0 if index == 0: return tree for child in tree: if total == index: return child try: nbrChild = IndividualTree.count(child) if nbrChild + total > index: return __getNode(child, index-total) else: total += nbrChild except: total += 1
53f79555b4bcb3f22327d10adc6588f641221bfd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7315/53f79555b4bcb3f22327d10adc6588f641221bfd/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1676, 2471, 12, 3413, 16, 770, 4672, 2078, 273, 374, 309, 770, 422, 374, 30, 327, 2151, 364, 1151, 316, 2151, 30, 309, 2078, 422, 770, 30, 327, 1151, 775, 30, 26297, 1763, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1676, 2471, 12, 3413, 16, 770, 4672, 2078, 273, 374, 309, 770, 422, 374, 30, 327, 2151, 364, 1151, 316, 2151, 30, 309, 2078, 422, 770, 30, 327, 1151, 775, 30, 26297, 1763, ...
self.assertRaises(apsw.AbortError, blobro.read, 2)
def check_unchanged(): self.assertEqual(_fixup(buf[0]), BYTES(r"\x44")) self.assertEqual(_fixup(buf[1]), BYTES(r"\x55")) self.assertEqual(_fixup(buf[2]), BYTES(r"\x66")) self.assertEqual(_fixup(buf[3]), BYTES(r"\x77")) self.assertEqual(len(buf), 4)
a8ad9b57c969f6eae876f52887c05f5cfeb653a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/993/a8ad9b57c969f6eae876f52887c05f5cfeb653a0/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 4384, 2330, 13332, 365, 18, 11231, 5812, 24899, 904, 416, 12, 4385, 63, 20, 65, 3631, 26214, 12, 86, 12691, 92, 6334, 6, 3719, 365, 18, 11231, 5812, 24899, 904, 416, 12, 4385,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4384, 2330, 13332, 365, 18, 11231, 5812, 24899, 904, 416, 12, 4385, 63, 20, 65, 3631, 26214, 12, 86, 12691, 92, 6334, 6, 3719, 365, 18, 11231, 5812, 24899, 904, 416, 12, 4385,...
box = (int(x_diff), int(y_diff), int(x-x_diff), int(y-y_diff))
box = (int(x_diff), int(y_diff), int(x_diff+new_width), int(y_diff+new_height))
def create_size(self, photosize): if self.size_exists(photosize): return if not os.path.isdir(self.cache_path()): os.makedirs(self.cache_path()) try: im = Image.open(self.get_image_filename()) except IOError: return if im.size == photosize.size(): shutil.copy(self.get_image_filename(), self._get_SIZE_path(photosize)) return cur_width, cur_height = im.size new_width, new_height = photosize.size() if photosize.crop: ratio = max(float(new_width)/cur_width,float(new_height)/cur_height) x = (cur_width * ratio) y = (cur_height * ratio) xd = abs(new_width - x) yd = abs(new_height - y) x_diff = int(xd / 2) y_diff = int(yd / 2) if self.crop_from == 'top': box = (int(x_diff), 0, int(x-x_diff), new_height) elif self.crop_from == 'left': box = (0, int(y_diff), new_width, int(y-y_diff)) elif self.crop_from == 'bottom': box = (int(x_diff), int(yd), int(x-x_diff), int(y)) # y - yd = new_height elif self.crop_from == 'right': box = (int(xd), int(y_diff), int(x), int(y-y_diff)) # x - xd = new_width else: box = (int(x_diff), int(y_diff), int(x-x_diff), int(y-y_diff)) resized = im.resize((int(x), int(y)), Image.ANTIALIAS).crop(box) else: if not new_width == 0 and not new_height == 0: if cur_width > cur_height: ratio = float(new_width)/cur_width else: ratio = float(new_height)/cur_height else: if new_width == 0: ratio = float(new_height)/cur_height else: ratio = float(new_width)/cur_width resized = im.resize((int(cur_width*ratio), int(cur_height*ratio)), Image.ANTIALIAS) # Paletted images can not be filtered. # TODO: look into converting the image, applying the filter and then converting back. if resized.palette is None: if self.filter_set is not None: filter_set = self.filter_set.filters.all() elif photosize.filter_set is not None: filter_set = list(photosize.filter_set.filters.all()) else: filter_set = None if filter_set is not None: for f in filter_set: filter = getattr(ImageFilter, f.name, None) if filter is not None: try: resized = resized.filter(filter) except ValueError: pass resized_filename = getattr(self, "get_%s_path" % photosize.name)() try: if im.format == 'JPEG': resized.save(resized_filename, 'JPEG', quality=photosize.quality, optimize=True) else: resized.save(resized_filename) except IOError, e: if os.path.isfile(resized_filename): os.unlink(resized_filename) raise e
2b1c8ab9545b0315a6723fbdbba41e94b2e6411e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10711/2b1c8ab9545b0315a6723fbdbba41e94b2e6411e/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 1467, 12, 2890, 16, 18185, 554, 4672, 309, 365, 18, 1467, 67, 1808, 12, 29121, 554, 4672, 327, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 2890, 18, 2493, 67, 803, 1435, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 1467, 12, 2890, 16, 18185, 554, 4672, 309, 365, 18, 1467, 67, 1808, 12, 29121, 554, 4672, 327, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 2890, 18, 2493, 67, 803, 1435, 467...
return (self.byDefaultMap is not None
return (self.byDefaultMap is not None and troveTup not in self.referencedByUnclonedMap
def troveInfoNeedsErase(self, mark, troveTup): kind = mark[0] if kind != V_REFTRV: # we only erase trove references - all other types # just let remain with their old, uncloned values. # This could change. return False return (self.byDefaultMap is not None and troveTup not in self.byDefaultMap)
e843c33c6ada7595981dd6a3700e12604fe1ae91 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/e843c33c6ada7595981dd6a3700e12604fe1ae91/clone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23432, 537, 966, 26419, 41, 5648, 12, 2890, 16, 2267, 16, 23432, 537, 56, 416, 4672, 3846, 273, 2267, 63, 20, 65, 309, 3846, 480, 776, 67, 10771, 4349, 58, 30, 468, 732, 1338, 22038, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23432, 537, 966, 26419, 41, 5648, 12, 2890, 16, 2267, 16, 23432, 537, 56, 416, 4672, 3846, 273, 2267, 63, 20, 65, 309, 3846, 480, 776, 67, 10771, 4349, 58, 30, 468, 732, 1338, 22038, ...
self._name = 'List<%s>' % ITEMTYPE
def __init__(self, ITEMTYPE=None): self._ITEMTYPE = ITEMTYPE self._name = 'List<%s>' % ITEMTYPE self._null = _null_list(self) if ITEMTYPE is not None: self._init_methods()
20c02f778335cfe2c5b08aeb62dc35326fc9b579 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/20c02f778335cfe2c5b08aeb62dc35326fc9b579/ootype.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 25504, 2399, 33, 7036, 4672, 365, 6315, 12674, 2399, 273, 25504, 2399, 365, 6315, 2011, 273, 389, 2011, 67, 1098, 12, 2890, 13, 309, 25504, 2399, 353, 486,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 25504, 2399, 33, 7036, 4672, 365, 6315, 12674, 2399, 273, 25504, 2399, 365, 6315, 2011, 273, 389, 2011, 67, 1098, 12, 2890, 13, 309, 25504, 2399, 353, 486,...
bugs_number = [] for filename in os.listdir(install_file_path): if filename.endswith(pypt_bug_file_format): bugs_number.append(filename) if bugs_number: list_bugs() display_options() response = get_response() while True: if response == "?": display_options() response = get_response()
if bug_parse_required is True: bugs_number = [] for filename in os.listdir(install_file_path): if filename.endswith(pypt_bug_file_format): bugs_number.append(filename)
def list_bugs(): log.msg("\n\nFollowing are the list of bugs present.\n") for each_bug in bugs_number.keys(): bug_num = each_bug.split('.')[1] bug_subject = bugs_number[each_bug] log.msg("%s\t%s\n" % (bug_num, bug_subject) )
bf27eda3758a3b77fdeff5b846a63c1c8feb3962 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12499/bf27eda3758a3b77fdeff5b846a63c1c8feb3962/pypt_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 19381, 13332, 613, 18, 3576, 31458, 82, 64, 82, 8328, 310, 854, 326, 666, 434, 22398, 3430, 8403, 82, 7923, 364, 1517, 67, 925, 316, 22398, 67, 2696, 18, 2452, 13332, 7934, 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, 666, 67, 19381, 13332, 613, 18, 3576, 31458, 82, 64, 82, 8328, 310, 854, 326, 666, 434, 22398, 3430, 8403, 82, 7923, 364, 1517, 67, 925, 316, 22398, 67, 2696, 18, 2452, 13332, 7934, 67...
(0.10010010001000)
(0, 10010010001000)
def lyndon_factorization(self): r""" Returns the Lyndon factorization of self. The *Lyndon factorization* of a finite word `w` is the unique factorization of `w` as a non-increasing product of Lyndon words, i.e., `w = l_1\cdots l_n` where each `l_i` is a Lyndon word and `l_1\geq \cdots \geq l_n`. See for instance [1]. OUTPUT:
5d95314847705862dc3fe746c7aff44f4caaa2bf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/5d95314847705862dc3fe746c7aff44f4caaa2bf/word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 878, 19752, 67, 6812, 1588, 12, 2890, 4672, 436, 8395, 2860, 326, 511, 878, 19752, 5578, 1588, 434, 365, 18, 225, 1021, 380, 48, 878, 19752, 5578, 1588, 14, 434, 279, 25922, 2076, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 878, 19752, 67, 6812, 1588, 12, 2890, 4672, 436, 8395, 2860, 326, 511, 878, 19752, 5578, 1588, 434, 365, 18, 225, 1021, 380, 48, 878, 19752, 5578, 1588, 14, 434, 279, 25922, 2076, ...
raise RuntimeError, 'expected "%s", "%s", "%s", "%s",or "%s" at index %d but got: %s' % (TdbqLiteral.IS, TdbqLiteral.EQUAL, TdbqLiteral.NOT_EQUAL, TdbqLiteral.MATCHES, TdbqLiteral.DOES_NOT_MATCH, oper.index(), oper.translate())
raise RuntimeError, 'expected "%s", "%s", "%s", "%s" or "%s" at index %d but got: %s' % (TdbqLiteral.IS, TdbqLiteral.EQUAL, TdbqLiteral.NOT_EQUAL, TdbqLiteral.MATCHES, TdbqLiteral.DOES_NOT_MATCH, oper.index(), oper.translate())
def __expression(self): '''expression : TdbqToken.PAREN_OPEN or_expression TdbqToken.PAREN_CLOSE | TdbqToken.IDENTIFIER TdbqToken.IS TdbqToken.NOT? ( TdbqToken.SET | TdbqToken.STRING ) | TdbqToken.IDENTIFIER ( TdbqToken.EQUAL | TdbqToken.NOT_EQUAL | TdbqToken.MATCHES | TdbqToken.DOES_NOT_MATCH ) TdbqToken.STRING ;''' if self.__accept(TdbqToken.PAREN_OPEN): self.__or_expression() self.__expect(TdbqToken.PAREN_CLOSE, self.__input[self.__ind].index()) return # Identifier ident = self.__input[self.__ind] self.__expect(TdbqToken.IDENTIFIER, ident.index()) func_ident = str_to_lambda_au(ident.value()) if func_ident is None: raise RuntimeError, 'bad identifier at index %d: %s' % (ident.index(), ident.value()) # Operator, or "is" and optional "not" oper = self.__input[self.__ind] opertyp = oper.type() if self.__accept(TdbqToken.IS): if self.__accept(TdbqToken.NOT): opertyp = TdbqToken.NOT_EQUAL else: opertyp = TdbqToken.EQUAL elif opertyp in [TdbqToken.EQUAL, TdbqToken.NOT_EQUAL, TdbqToken.MATCHES, TdbqToken.DOES_NOT_MATCH]: self.__expect(opertyp, oper.index()) else: raise RuntimeError, 'expected "%s", "%s", "%s", "%s",or "%s" at index %d but got: %s' % (TdbqLiteral.IS, TdbqLiteral.EQUAL, TdbqLiteral.NOT_EQUAL, TdbqLiteral.MATCHES, TdbqLiteral.DOES_NOT_MATCH, oper.index(), oper.translate())
6f28484b019d00ef3a706af71fd3242ba769df33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/766/6f28484b019d00ef3a706af71fd3242ba769df33/tdbq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 8692, 12, 2890, 4672, 9163, 8692, 294, 17050, 85, 1345, 18, 15111, 67, 11437, 578, 67, 8692, 17050, 85, 1345, 18, 15111, 67, 13384, 571, 17050, 85, 1345, 18, 16606, 17050, 85, 1345...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8692, 12, 2890, 4672, 9163, 8692, 294, 17050, 85, 1345, 18, 15111, 67, 11437, 578, 67, 8692, 17050, 85, 1345, 18, 15111, 67, 13384, 571, 17050, 85, 1345, 18, 16606, 17050, 85, 1345...
path = path.replace('/', os.sep)
path = self._absnorm(path)
def _list_dir(self, path, pattern=None, pattern_type='simple', absolute=False): path = path.replace('/', os.sep) if not os.path.isdir(path): raise DataError("Directory '%s' does not exist" % path) items = os.listdir(path) if pattern: items = BUILTIN._filter_lines(items, pattern, pattern_type) items.sort() if utils.to_boolean(absolute, true_strs=['absolute'], default=False): path = utils.normpath(path) items = [ os.path.join(path,item) for item in items ] return items
4e92df2860c270b97129fb5577b1caec2faab8a2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/4e92df2860c270b97129fb5577b1caec2faab8a2/OperatingSystem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1098, 67, 1214, 12, 2890, 16, 589, 16, 1936, 33, 7036, 16, 1936, 67, 723, 2218, 9647, 2187, 4967, 33, 8381, 4672, 589, 273, 365, 6315, 5113, 7959, 12, 803, 13, 309, 486, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1098, 67, 1214, 12, 2890, 16, 589, 16, 1936, 33, 7036, 16, 1936, 67, 723, 2218, 9647, 2187, 4967, 33, 8381, 4672, 589, 273, 365, 6315, 5113, 7959, 12, 803, 13, 309, 486, 1140, 1...
import __main__ __main__.__dict__.clear() __main__.__dict__.update({'__name__':'__main__'}) require(dist_spec)[0].metadata.run_script(script_name, __main__.__dict__)
ns = sys._getframe(1).f_globals name = ns['__name__'] ns.clear() ns['__name__'] = name require(dist_spec)[0].metadata.run_script(script_name, ns) run_main = run_script
def run_main(dist_spec, script_name): """Locate distribution `dist_spec` and run its `script_name` script""" import __main__ __main__.__dict__.clear() __main__.__dict__.update({'__name__':'__main__'}) require(dist_spec)[0].metadata.run_script(script_name, __main__.__dict__)
6a241540966aab371e48413a7f8ace8d2257aa6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/495/6a241540966aab371e48413a7f8ace8d2257aa6f/pkg_resources.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 5254, 12, 4413, 67, 2793, 16, 2728, 67, 529, 4672, 3536, 1333, 340, 7006, 1375, 4413, 67, 2793, 68, 471, 1086, 2097, 1375, 4263, 67, 529, 68, 2728, 8395, 3153, 273, 2589, 631...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 5254, 12, 4413, 67, 2793, 16, 2728, 67, 529, 4672, 3536, 1333, 340, 7006, 1375, 4413, 67, 2793, 68, 471, 1086, 2097, 1375, 4263, 67, 529, 68, 2728, 8395, 3153, 273, 2589, 631...
print m
def footer(**map): yield self.t("footer", **map)
55da75345ebeff110bc62a1da01a64434540c9bd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/55da75345ebeff110bc62a1da01a64434540c9bd/hgweb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9860, 12, 636, 1458, 4672, 2824, 365, 18, 88, 2932, 14723, 3113, 2826, 1458, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 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, 9860, 12, 636, 1458, 4672, 2824, 365, 18, 88, 2932, 14723, 3113, 2826, 1458, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
ws = environ.get('wsgi.websocket')
ws = environ.pop('wsgi.websocket')
def __call__(self, environ, start_response): client = environ[CLIENT_KEY] g = client.get_greenlet() if not g: # new greenlet g = greenlet.greenlet(self.app) client.set_greenlet(g) c = Continuation(client) environ[CONTINUATION_KEY] = c
c69e897ff4f08edeed98630174273730d30b2f68 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5908/c69e897ff4f08edeed98630174273730d30b2f68/websocket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 1004, 273, 5473, 63, 11935, 67, 3297, 65, 314, 273, 1004, 18, 588, 67, 11571, 1810, 1435, 309, 486, 314, 30, 468, 394, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 1004, 273, 5473, 63, 11935, 67, 3297, 65, 314, 273, 1004, 18, 588, 67, 11571, 1810, 1435, 309, 486, 314, 30, 468, 394, 1...
EXAMPLE: sage: A2 = WeylCharacterRing(['A',2]) sage: a2 = WeightRing(A2) sage: W = a2.lattice().weyl_group() sage: mu = a2(2,1,0) sage: nu = sum(mu.weyl_group_action(w) for w in W) sage: nu a2(0,1,2) + a2(0,2,1) + a2(1,0,2) + a2(1,2,0) + a2(2,0,1) + a2(2,1,0) sage: nu.character() -2*A2(1,1,1) + A2(2,1,0)
EXAMPLES: sage: A2 = WeylCharacterRing(['A',2]) sage: a2 = WeightRing(A2) sage: W = a2.lattice().weyl_group() sage: mu = a2(2,1,0) sage: nu = sum(mu.weyl_group_action(w) for w in W) sage: nu a2(0,1,2) + a2(0,2,1) + a2(1,0,2) + a2(1,2,0) + a2(2,0,1) + a2(2,1,0) sage: nu.character() -2*A2(1,1,1) + A2(2,1,0)
def character(self): """ Assuming that self is invariant under the Weyl group, this will express it as a linear combination of characters. If self is not Weyl group invariant, this method will not terminate. EXAMPLE: sage: A2 = WeylCharacterRing(['A',2]) sage: a2 = WeightRing(A2) sage: W = a2.lattice().weyl_group() sage: mu = a2(2,1,0) sage: nu = sum(mu.weyl_group_action(w) for w in W) sage: nu a2(0,1,2) + a2(0,2,1) + a2(1,0,2) + a2(1,2,0) + a2(2,0,1) + a2(2,1,0) sage: nu.character() -2*A2(1,1,1) + A2(2,1,0) """ return WeylCharacter(self._parent._parent, self._parent._parent.char_from_weights(self._mdict), self._mdict)
da4d6149538661041003f964c0d06f212d52f0f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/da4d6149538661041003f964c0d06f212d52f0f5/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3351, 12, 2890, 4672, 3536, 4725, 21249, 716, 365, 353, 22514, 3613, 326, 678, 402, 80, 1041, 16, 333, 903, 16947, 518, 487, 279, 9103, 10702, 434, 3949, 18, 971, 365, 353, 486, 678, 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, 3351, 12, 2890, 4672, 3536, 4725, 21249, 716, 365, 353, 22514, 3613, 326, 678, 402, 80, 1041, 16, 333, 903, 16947, 518, 487, 279, 9103, 10702, 434, 3949, 18, 971, 365, 353, 486, 678, 4...
g = G(self.gens()[2])
g = G(self.gens()[2])
def F(self): G = self.group()
c4436c8abac791e198815503e74478ec5cbb6c54 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c4436c8abac791e198815503e74478ec5cbb6c54/cubegroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 478, 12, 2890, 4672, 611, 273, 365, 18, 1655, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 478, 12, 2890, 4672, 611, 273, 365, 18, 1655, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.first_toggle = True
def __init__(self): self.usb_devices = [] self.tmp_swapdir = "" self.tmp_overlaydir = "" self.puel = False self.splash = None self.first_toggle = True self.do_not_update = False self.env = self.update_env()
a71fd501b6f910af85a30de85185063ed8b203cf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1208/a71fd501b6f910af85a30de85185063ed8b203cf/osbackend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 25525, 67, 12506, 565, 273, 5378, 365, 18, 5645, 67, 22270, 1214, 565, 273, 1408, 365, 18, 5645, 67, 17312, 1214, 273, 1408, 365, 18, 11938, 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, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 25525, 67, 12506, 565, 273, 5378, 365, 18, 5645, 67, 22270, 1214, 565, 273, 1408, 365, 18, 5645, 67, 17312, 1214, 273, 1408, 365, 18, 11938, 2...
iplist.append(ip)
if ip in bhip: if ip in ports: iplist.append(ip) iplist.append(bhip[ip]) else: iplist.append(ip)
def getASNlist_cymru(list): ASNlist = [] s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(("whois.cymru.com",43)) s.send("begin\r\n"+"\r\n".join(list)+"\r\nend\r\n") r = "" while 1: l = s.recv(8192) if l == "": break r += l s.close() for l in r.splitlines()[1:]: asn,ip,desc = map(str.strip, l.split("|")) if asn == "NA": continue asn = int(asn) ASNlist.append((ip,asn,desc)) return ASNlist
d3077b31b527f51a50f26ce248da866a657b9544 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/d3077b31b527f51a50f26ce248da866a657b9544/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 22269, 1098, 67, 2431, 81, 8653, 12, 1098, 4672, 18598, 1098, 273, 5378, 272, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 272, 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, 336, 22269, 1098, 67, 2431, 81, 8653, 12, 1098, 4672, 18598, 1098, 273, 5378, 272, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 272, 18,...
globals.update(vars())
globals().update(vars())
def do_imports(self): try: from mercurial.__version__ import version from mercurial import hg, ui, cmdutil except ImportError: pass
4338058b6c9050f594e35747f2ec2621d5622f30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/833/4338058b6c9050f594e35747f2ec2621d5622f30/setuptools_hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 21350, 12, 2890, 4672, 775, 30, 628, 4045, 1397, 649, 16186, 1589, 972, 1930, 1177, 628, 4045, 1397, 649, 1930, 22576, 16, 5915, 16, 24884, 1335, 11308, 30, 1342, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 21350, 12, 2890, 4672, 775, 30, 628, 4045, 1397, 649, 16186, 1589, 972, 1930, 1177, 628, 4045, 1397, 649, 1930, 22576, 16, 5915, 16, 24884, 1335, 11308, 30, 1342, 2, -100, -100,...
locale = locale.getdefaultlocale()
locale = _locale.getdefaultlocale()
def __init__(self, firstweekday=0, locale=None): TextCalendar.__init__(self, firstweekday) if locale is None: locale = locale.getdefaultlocale() self.locale = locale
cd469a0757f6a55b468e50bf09177c79ce0782a5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/cd469a0757f6a55b468e50bf09177c79ce0782a5/calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1122, 10741, 2881, 33, 20, 16, 2573, 33, 7036, 4672, 3867, 7335, 16186, 2738, 972, 12, 2890, 16, 1122, 10741, 2881, 13, 309, 2573, 353, 599, 30, 2573, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1122, 10741, 2881, 33, 20, 16, 2573, 33, 7036, 4672, 3867, 7335, 16186, 2738, 972, 12, 2890, 16, 1122, 10741, 2881, 13, 309, 2573, 353, 599, 30, 2573, 27...