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
<p>Maybe you forgot to release an update issue? If so, please do this
<p>Maybe you forgot to release an update issue? If so, please do this
def tmpl_webjournal_alert_was_already_sent(language, journal_name, subject, plain_text, recipients, html_mail, issue): """ """ _ = gettext_set_language(language) interface = _(''' <form action="%s/journal/alert" name="alert" method="POST"> <input type="hidden" name="name" value="%s"/> <input type="hidden" name="recipients" value="%s" /> <input type="hidden" name="subject" value="%s" /> <input type="hidden" name="plainText" value="%s" /> <input type="hidden" name="htmlMail" value="%s" /> <input type="hidden" name="force" value="True" /> <p><em>ATTENTION! </em>The alert email for the issue %s has already been sent. Are you absolutely sure you want to resend it?</p> <p>Maybe you forgot to release an update issue? If so, please do this first <a href="%s/journal/issue_control?name=%s&issue=%s">here</a>.</p> <p>Be aware, if you go on with this, the whole configured mailing list will receive this message a second time. Only proceed if you know what you are doing!</p> <br/> <input class="formbutton" type="submit" value="I really want this!" name="sent"/> </form> ''') % (weburl, journal_name, recipients, subject, plain_text, html_mail, issue, weburl, journal_name, issue) return page(title="Confirmation Required", body=interface)
25e3889e6921bcde05623e951f65cbb8800e1823 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/25e3889e6921bcde05623e951f65cbb8800e1823/webjournal_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 1814, 441, 7116, 67, 11798, 67, 17416, 67, 17583, 67, 7569, 12, 4923, 16, 13001, 67, 529, 16, 3221, 16, 7351, 67, 955, 16, 12045, 16, 1729, 67, 4408, 16, 5672, 4672, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 1814, 441, 7116, 67, 11798, 67, 17416, 67, 17583, 67, 7569, 12, 4923, 16, 13001, 67, 529, 16, 3221, 16, 7351, 67, 955, 16, 12045, 16, 1729, 67, 4408, 16, 5672, 4672, 3536, ...
if axisattributes is None: axisattributes = tarrays[0].getAxis(0).attributes axes[axis] = axisConcatenate([t.getAxis(axis) for t in tarrays], axisid, axisattributes)
allunitsequal=True allunits=tarrays[0].getAxis(axis).units for t in tarrays[1:]: if t.getAxis(axis).units!=allunits: allunitsequal=False if allunitsequal: if axisattributes is None: axisattributes = tarrays[0].getAxis(axis).attributes axes[axis] = axisConcatenate([t.getAxis(axis) for t in tarrays], axisid, axisattributes)
def concatenate (arrays, axis=0, axisid=None, axisattributes=None): """Concatenate the arrays along the given axis. Give the extended axis the id and attributes provided - by default, those of the first array.""" tarrays = [_makeMaskedArg(a) for a in arrays] maresult = numpy.ma.concatenate(arrays, axis=axis) if len(arrays)>1: varattributes = None varid = None axes = commonDomain(tarrays[0],tarrays[1],omit=axis) grid = commonGrid(tarrays[0], tarrays[1], axes) for i in range(len(arrays)-2): if axes is None: break axes = commonAxes(tarrays[i+2],axes,omit=axis) grid = commonGrid1(a, grid, axes) else: axes = tarrays[0].getAxisList() varattributes = tarrays[0].attributes varid = tarrays[0].id if (isinstance(tarrays[0], TransientVariable)): grid = tarrays[0].getGrid() else: grid = None if axes is not None: if axisid is None: axisid = tarrays[0].getAxis(axis).id if axisattributes is None: axisattributes = tarrays[0].getAxis(0).attributes axes[axis] = axisConcatenate([t.getAxis(axis) for t in tarrays], axisid, axisattributes) # If the grid doesn't match the axislist (e.g., catenation was on latitude) then omit it. if grid is not None: for item in grid.getAxisList(): if item not in axes: grid = None return TransientVariable(maresult, axes=axes, attributes=varattributes,id=varid,grid=grid)
7c1d473c2170ea0b90bd6770e4bb8e320e08e718 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/41/7c1d473c2170ea0b90bd6770e4bb8e320e08e718/MV2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11361, 261, 16223, 16, 2654, 33, 20, 16, 2654, 350, 33, 7036, 16, 2654, 4350, 33, 7036, 4672, 3536, 21432, 340, 326, 5352, 7563, 326, 864, 2654, 18, 22374, 326, 7021, 2654, 326, 612, 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, 11361, 261, 16223, 16, 2654, 33, 20, 16, 2654, 350, 33, 7036, 16, 2654, 4350, 33, 7036, 4672, 3536, 21432, 340, 326, 5352, 7563, 326, 864, 2654, 18, 22374, 326, 7021, 2654, 326, 612, 4...
if user_data.need_to_reassess is True: self.redirect('/assessuser')
user_data.assess_if_necessary()
def get(self): user = users.get_current_user() if user:
05a73f0324711c5f3d3a931c9904ccb1e98eb8a6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/05a73f0324711c5f3d3a931c9904ccb1e98eb8a6/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 729, 273, 3677, 18, 588, 67, 2972, 67, 1355, 1435, 309, 729, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 729, 273, 3677, 18, 588, 67, 2972, 67, 1355, 1435, 309, 729, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print 'SQL>', sql
print 'SQL> ', sql
def getSequence(self, name): cur = self.conn.cursor() sql = "select nextval('%s')" % name if self.verbose: print 'SQL>', sql cur.execute(sql) return cur.fetchall()[0][0]
8830b586a28ef3b620195c52bc3c48e7f3cd50dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/8830b586a28ef3b620195c52bc3c48e7f3cd50dc/postconn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27763, 12, 2890, 16, 508, 4672, 662, 273, 365, 18, 4646, 18, 9216, 1435, 1847, 273, 315, 4025, 1024, 1125, 29909, 87, 23291, 738, 508, 309, 365, 18, 11369, 30, 1172, 296, 3997, 34, 226...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27763, 12, 2890, 16, 508, 4672, 662, 273, 365, 18, 4646, 18, 9216, 1435, 1847, 273, 315, 4025, 1024, 1125, 29909, 87, 23291, 738, 508, 309, 365, 18, 11369, 30, 1172, 296, 3997, 34, 226...
raise PreemptiveResponse, fourOhFourHandler(conn, sessionDict)
return fourOhFourHandler(conn, sessionDict)
def _processRequest(conn, sessionDict): DEBUG(PYCGI, "pycgi processing request") try: env=_fix(conn.env, conn.uri) except vfs.FileNotFoundException: DEBUG(PYCGI, "file not found!") raise PreemptiveResponse, fourOhFourHandler(conn, sessionDict) DEBUG(PYCGI, "file evidently exists") oldpwd=os.getcwd() os.environ.update(env) # what to do with argv? save_argv=sys.argv sys.argv=[env['SCRIPT_NAME']] saved=_swap_streams(conn) try: try: (directory, file) = os.path.split(env['PATH_TRANSLATED']) os.chdir(directory) DEBUG(PYCGI, "about to execfile %s" % file) execfile(file) except SystemExit: pass except: logException() raise finally: os.chdir(oldpwd) sys.argv=save_argv new=_swap_streams(conn, saved) new[0].seek(0) respp = rfc822.Message(new[0]) for k,v in respp.items(): conn.responseHeaders[k] = v conn.write(new[0].read()) return conn.response()
02eb771d6d8fa56021e7f54a6e7e70421c05e852 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/02eb771d6d8fa56021e7f54a6e7e70421c05e852/pycgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 691, 12, 4646, 16, 1339, 5014, 4672, 6369, 12, 16235, 39, 13797, 16, 315, 2074, 19062, 4929, 590, 7923, 775, 30, 1550, 33, 67, 904, 12, 4646, 18, 3074, 16, 1487, 18, 1650, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2567, 691, 12, 4646, 16, 1339, 5014, 4672, 6369, 12, 16235, 39, 13797, 16, 315, 2074, 19062, 4929, 590, 7923, 775, 30, 1550, 33, 67, 904, 12, 4646, 18, 3074, 16, 1487, 18, 1650, ...
if ID_SCHEMATOOL in self.objectIds(): schema_tool = self._getOb(ID_SCHEMATOOL) if pitem['module'] not in schema_tool.objectIds() and pitem['default_schema']: schema_tool.addSchema(pitem['module'], title=pitem['label'], defaults=pitem['default_schema'])
def manage_install_pluggableitem(self, meta_type=None, REQUEST=None): """ Makes the content with the given meta_type available for usage in the portal. Raises ValueError if content does not exist. If the content specifies an `on_install` function in it's `config` this method will call `[on_install](self)` """ data_path = join(self.get_data_path(), 'skel', 'forms') if meta_type is not None: pitem = self.get_pluggable_item(meta_type) if pitem == None: raise ValueError('Missing pluggable content type "%s"' % meta_type)
749c88bf9d4e74be00d60faed2d8e1de50942798 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/749c88bf9d4e74be00d60faed2d8e1de50942798/NySite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 5425, 67, 412, 30382, 1726, 12, 2890, 16, 2191, 67, 723, 33, 7036, 16, 12492, 33, 7036, 4672, 3536, 490, 3223, 326, 913, 598, 326, 864, 2191, 67, 723, 2319, 364, 4084, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 5425, 67, 412, 30382, 1726, 12, 2890, 16, 2191, 67, 723, 33, 7036, 16, 12492, 33, 7036, 4672, 3536, 490, 3223, 326, 913, 598, 326, 864, 2191, 67, 723, 2319, 364, 4084, 316, ...
in=master - master relative to which the widget is placed.
in=master - master relative to which the widget is placed in_=master - see 'in' option description
def place_configure(self, cnf={}, **kw): """Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed. x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account """ for k in ['in_']: if kw.has_key(k): kw[k[:-1]] = kw[k] del kw[k] self.tk.call( ('place', 'configure', self._w) + self._options(cnf, kw))
1a34834e0993d46fc81f4ef6639e6c278d5879d9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/1a34834e0993d46fc81f4ef6639e6c278d5879d9/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3166, 67, 14895, 12, 2890, 16, 23118, 28793, 2826, 9987, 4672, 3536, 6029, 279, 3604, 316, 326, 982, 3604, 18, 2672, 487, 702, 30, 316, 33, 7525, 300, 4171, 3632, 358, 1492, 326, 3604, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3166, 67, 14895, 12, 2890, 16, 23118, 28793, 2826, 9987, 4672, 3536, 6029, 279, 3604, 316, 326, 982, 3604, 18, 2672, 487, 702, 30, 316, 33, 7525, 300, 4171, 3632, 358, 1492, 326, 3604, ...
if component == 'complexType':
if component == 'attribute': tp = AttributeDeclaration(self) tp.fromDom(node) self.types[tp.getAttribute('name')] = tp elif component == 'attributeGroup': tp = AttributeGroupDefinition(self) tp.fromDom(node) self.types[tp.getAttribute('name')] = tp elif component == 'complexType':
def load(self, node): self.setAttributes(node) self.targetNamespace = self.getTargetNamespace() contents = self.getContents(node)
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 756, 4672, 365, 18, 542, 2498, 12, 2159, 13, 365, 18, 3299, 3402, 273, 365, 18, 588, 2326, 3402, 1435, 2939, 273, 365, 18, 588, 6323, 12, 2159, 13, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 756, 4672, 365, 18, 542, 2498, 12, 2159, 13, 365, 18, 3299, 3402, 273, 365, 18, 588, 2326, 3402, 1435, 2939, 273, 365, 18, 588, 6323, 12, 2159, 13, 2, -100, -100,...
raise error.ReportError(r.raw)
raise error.ReportError(report.raw)
def date_search(client, calendar, start, end = None): """ Perform a time-interval search in the `calendar`. """ rc = [] # build the request expand = cdav.Expand(start, end) data = cdav.CalendarData() + expand prop = dav.Prop() + data range = cdav.TimeRange(start, end) vevent = cdav.CompFilter("VEVENT") + range vcal = cdav.CompFilter("VCALENDAR") + vevent filter = cdav.Filter() + vcal root = cdav.CalendarQuery() + [prop, filter] q = etree.tostring(root.xmlelement(), encoding="utf-8", xml_declaration=True) response = client.report(calendar.url.path, q, 1) for r in response.tree.findall(".//" + dav.Response.tag): status = r.find(".//" + dav.Status.tag) if status.text.endswith("200 OK"): href = r.find(dav.Href.tag).text data = r.find(".//" + cdav.CalendarData.tag).text rc.append((url.make(calendar.url, href), data)) else: raise error.ReportError(r.raw) return rc
3563f2fc99b0bd4aff1100e5531044527cfcdc5e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/573/3563f2fc99b0bd4aff1100e5531044527cfcdc5e/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1509, 67, 3072, 12, 2625, 16, 5686, 16, 787, 16, 679, 273, 599, 4672, 3536, 11217, 279, 813, 17, 6624, 1623, 316, 326, 1375, 11650, 8338, 3536, 4519, 273, 5378, 225, 468, 1361, 326, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1509, 67, 3072, 12, 2625, 16, 5686, 16, 787, 16, 679, 273, 599, 4672, 3536, 11217, 279, 813, 17, 6624, 1623, 316, 326, 1375, 11650, 8338, 3536, 4519, 273, 5378, 225, 468, 1361, 326, 59...
"change our state to match what's in the storage"
""" change our state to match what's in the storage """
def load(self, storage, key): "change our state to match what's in the storage" stored = storage[key] self.__dict__.update(stored) # dangerous!
55ac4fdc2a170bd52fcbe417587721669a976b6f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/55ac4fdc2a170bd52fcbe417587721669a976b6f/test_animation_mode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 2502, 16, 498, 4672, 3536, 2549, 3134, 919, 358, 845, 4121, 1807, 316, 326, 2502, 3536, 4041, 273, 2502, 63, 856, 65, 365, 16186, 1576, 25648, 2725, 12, 22601, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 2502, 16, 498, 4672, 3536, 2549, 3134, 919, 358, 845, 4121, 1807, 316, 326, 2502, 3536, 4041, 273, 2502, 63, 856, 65, 365, 16186, 1576, 25648, 2725, 12, 22601, 13, ...
self.event_cb(self.equeue.pop(0), self)
event = self.equeue.pop(0) if self.elast_seq != None and self.elast_seq >= event.seq: continue self.elast_seq = event.seq self.event_cb(event, self)
def emitPendingEvents(self): while len(self.equeue) != 0 and self.event_cb != None: self.event_cb(self.equeue.pop(0), self)
f70e84b543eda9e394ebc37f3ac2956f6c6d0dd1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8853/f70e84b543eda9e394ebc37f3ac2956f6c6d0dd1/UA.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3626, 8579, 3783, 12, 2890, 4672, 1323, 562, 12, 2890, 18, 73, 4000, 13, 480, 374, 471, 365, 18, 2575, 67, 7358, 480, 599, 30, 365, 18, 2575, 67, 7358, 12, 2890, 18, 73, 4000, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3626, 8579, 3783, 12, 2890, 4672, 1323, 562, 12, 2890, 18, 73, 4000, 13, 480, 374, 471, 365, 18, 2575, 67, 7358, 480, 599, 30, 365, 18, 2575, 67, 7358, 12, 2890, 18, 73, 4000, 18, ...
if ev == iPlayableService.evUpdatedInfo:
if ev == iPlayableService.evUpdatedInfo or ev == iPlayableService.evEnd:
def gotServiceEvent(self, ev): service = self.session.nav.getCurrentService() if ev == iPlayableService.evUpdatedInfo: self.checkTunerState(service)
87476cca8b4a772f8f1ff2cf3168aa147d51c85c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6652/87476cca8b4a772f8f1ff2cf3168aa147d51c85c/InfoBarGenerics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2363, 1179, 1133, 12, 2890, 16, 2113, 4672, 1156, 273, 365, 18, 3184, 18, 11589, 18, 588, 3935, 1179, 1435, 309, 2113, 422, 277, 11765, 429, 1179, 18, 14965, 7381, 966, 578, 2113, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2363, 1179, 1133, 12, 2890, 16, 2113, 4672, 1156, 273, 365, 18, 3184, 18, 11589, 18, 588, 3935, 1179, 1435, 309, 2113, 422, 277, 11765, 429, 1179, 18, 14965, 7381, 966, 578, 2113, 422, ...
self.BraceHighlight(braceAtCaret, braceOpposite)
if braceStyle != self.GetStyleAt(braceOpposite): self.BraceBadLight(braceAtCaret) else: self.BraceHighlight(braceAtCaret, braceOpposite)
def braceHighlight(self): # check for matching braces braceAtCaret = -1 braceOpposite = -1 charBefore = None caretPos = self.GetCurrentPos()
a3d9caca3b0a3767f1b878f270e095666b82a313 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/a3d9caca3b0a3767f1b878f270e095666b82a313/fundamental.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22500, 16205, 12, 2890, 4672, 468, 866, 364, 3607, 26852, 22500, 861, 39, 20731, 273, 300, 21, 22500, 3817, 4974, 273, 300, 21, 1149, 4649, 273, 599, 21683, 1616, 273, 365, 18, 967, 3935...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 22500, 16205, 12, 2890, 4672, 468, 866, 364, 3607, 26852, 22500, 861, 39, 20731, 273, 300, 21, 22500, 3817, 4974, 273, 300, 21, 1149, 4649, 273, 599, 21683, 1616, 273, 365, 18, 967, 3935...
Now for the features, we need a different example. Parsing a GenBank file is probably the easiest way to get an nice example with features in it...
Now for the features, we need a different example. Parsing a GenBank file is probably the easiest way to get an nice example with features in it...
def reverse_complement(self, id=False, name=False, description=False, features=True, annotations=False, letter_annotations=True, dbxrefs=False): """Returns new SeqRecord with reverse complement sequence.
c10b2cb3eb4a1f3271c3589467698a9e6891c585 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/c10b2cb3eb4a1f3271c3589467698a9e6891c585/SeqRecord.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4219, 67, 2919, 806, 12, 2890, 16, 612, 33, 8381, 16, 508, 33, 8381, 16, 2477, 33, 8381, 16, 4467, 33, 5510, 16, 5617, 33, 8381, 16, 9471, 67, 14670, 33, 5510, 16, 1319, 92, 9316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4219, 67, 2919, 806, 12, 2890, 16, 612, 33, 8381, 16, 508, 33, 8381, 16, 2477, 33, 8381, 16, 4467, 33, 5510, 16, 5617, 33, 8381, 16, 9471, 67, 14670, 33, 5510, 16, 1319, 92, 9316, ...
self.backend.send_command('option search_integer %s' % ((self.search_integer_checkbutton.get_property('active') and '1' or '0'),)) self.backend.send_command('option search_float %s' % ((self.search_float_checkbutton.get_property('active') and '1' or '0'),))
self.set_scan_data_type()
def do_scan(self): # set scan options self.backend.send_command('option search_integer %s' % ((self.search_integer_checkbutton.get_property('active') and '1' or '0'),)) self.backend.send_command('option search_float %s' % ((self.search_float_checkbutton.get_property('active') and '1' or '0'),)) # TODO: syntax check self.backend.send_command(self.value_input.get_text()) self.update_scan_result() self.search_count +=1
349cac25108074f0246118f9701d335936a0e966 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4850/349cac25108074f0246118f9701d335936a0e966/GameConqueror.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 9871, 12, 2890, 4672, 468, 444, 4135, 702, 365, 18, 542, 67, 9871, 67, 892, 67, 723, 1435, 468, 2660, 30, 6279, 866, 365, 18, 9993, 18, 4661, 67, 3076, 12, 2890, 18, 1132, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 9871, 12, 2890, 4672, 468, 444, 4135, 702, 365, 18, 542, 67, 9871, 67, 892, 67, 723, 1435, 468, 2660, 30, 6279, 866, 365, 18, 9993, 18, 4661, 67, 3076, 12, 2890, 18, 1132, ...
self.dataA = data if data: self.varListA = data.domain.variables.native() + data.domain.getmetas().values()
if data and self.dataB and data.domain == self.dataB.domain: if data.domain.classVar: classVar = data.domain.classVar.clone() else: classVar = None dc = orange.Domain([x.clone() for x in data.domain], classVar) for i, a in enumerate(dc): a.getValueFrom = lambda ex,f,i=i: ex[i] dc.addmetas(data.domain.getmetas()) self.dataA = orange.ExampleTable(dc, data) else: self.dataA = data if self.dataA: self.varListA = self.dataA.domain.variables.native() + self.dataA.domain.getmetas().values()
def onDataAInput(self, data): # update self.dataA, self.varListA and self.varA self.dataA = data if data: self.varListA = data.domain.variables.native() + data.domain.getmetas().values() else: self.varListA = [] if not self.varA in self.varListA: self.varA = None # update info self.updateInfoA() # update attribute A listbox self.lbAttrA.clear() for var in self.varListA: self.lbAttrA.insertItem(self.icons[var.varType], var.name) self.sendData()
7ecb6cd437f659f67df45c042913bf12d5cfb9fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/7ecb6cd437f659f67df45c042913bf12d5cfb9fb/OWMergeData.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 751, 37, 1210, 12, 2890, 16, 501, 4672, 468, 1089, 365, 18, 892, 37, 16, 365, 18, 1401, 682, 37, 471, 365, 18, 1401, 37, 309, 501, 471, 365, 18, 892, 38, 471, 501, 18, 4308, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 751, 37, 1210, 12, 2890, 16, 501, 4672, 468, 1089, 365, 18, 892, 37, 16, 365, 18, 1401, 682, 37, 471, 365, 18, 1401, 37, 309, 501, 471, 365, 18, 892, 38, 471, 501, 18, 4308, ...
"openTemplate", "saveAsTemplate",
"openTemplate", "saveAsTemplate",
def import_to_global(modname, attrs=None, math=False): """ import_to_global(modname, (a,b,c,...), math): like "from modname import a,b,c,...", but imports to global namespace (__main__). If math==True, also registers functions with QtiPlot's math function list. """ mod = __import__(modname) for submod in modname.split(".")[1:]: mod = getattr(mod, submod) if attrs==None: attrs=dir(mod) for name in attrs: f = getattr(mod, name) setattr(__main__, name, f) # make functions available in QtiPlot's math function list if math and callable(f): qti.mathFunctions[name] = f
43ad7d9b0adc8ed3e5f772989ac8763c585d01ba /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2185/43ad7d9b0adc8ed3e5f772989ac8763c585d01ba/qtiplotrc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 869, 67, 6347, 12, 1711, 529, 16, 3422, 33, 7036, 16, 4233, 33, 8381, 4672, 3536, 1930, 67, 869, 67, 6347, 12, 1711, 529, 16, 261, 69, 16, 70, 16, 71, 16, 2777, 3631, 423...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 869, 67, 6347, 12, 1711, 529, 16, 3422, 33, 7036, 16, 4233, 33, 8381, 4672, 3536, 1930, 67, 869, 67, 6347, 12, 1711, 529, 16, 261, 69, 16, 70, 16, 71, 16, 2777, 3631, 423...
return '' __builtin__.copyright = _Printer(sys.copyright) __builtin__.credits = _Printer( '''Python development is led by BeOpen PythonLabs (www.pythonlabs.com).''') def make_license(filename): try: return _Printer(open(filename).read()) except IOError: return None
__builtin__.copyright = _Printer("copyright", sys.copyright) __builtin__.credits = _Printer("credits", "Python development is led by BeOpen PythonLabs (www.pythonlabs.com).")
def __repr__(self): prompt = 'Hit Return for more, or q (and Return) to quit: ' lineno = 0 while 1: try: for i in range(lineno, lineno + self.MAXLINES): print self.__lines[i] except IndexError: break else: lineno += self.MAXLINES key = None while key is None: key = raw_input(prompt) if key not in ('', 'q'): key = None if key == 'q': break return ''
745bb9de72f04d190bc870f8eb127c4e62497742 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/745bb9de72f04d190bc870f8eb127c4e62497742/site.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 6866, 273, 296, 13616, 2000, 364, 1898, 16, 578, 1043, 261, 464, 2000, 13, 358, 9706, 30, 296, 7586, 273, 374, 1323, 404, 30, 775, 30, 364, 277, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 6866, 273, 296, 13616, 2000, 364, 1898, 16, 578, 1043, 261, 464, 2000, 13, 358, 9706, 30, 296, 7586, 273, 374, 1323, 404, 30, 775, 30, 364, 277, 316, ...
def _run(self, context, arguments):
def _run(self, context, argument_values): args_spec = UserKeywordArguments(self._keyword_args, self.longname)
def _run(self, context, arguments): variables = context.get_current_vars() if context.dry_run: return self._dry_run(context, variables, arguments) return self._variable_resolving_run(context, variables, arguments)
a8ee089c12c7dcfad3ce27221bd7e8c0d51bef97 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7408/a8ee089c12c7dcfad3ce27221bd7e8c0d51bef97/userkeyword.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 12, 2890, 16, 819, 16, 1237, 67, 2372, 4672, 833, 67, 2793, 273, 2177, 8736, 4628, 12, 2890, 6315, 11041, 67, 1968, 16, 365, 18, 5748, 529, 13, 3152, 273, 819, 18, 588, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 12, 2890, 16, 819, 16, 1237, 67, 2372, 4672, 833, 67, 2793, 273, 2177, 8736, 4628, 12, 2890, 6315, 11041, 67, 1968, 16, 365, 18, 5748, 529, 13, 3152, 273, 819, 18, 588, 67...
if hasattr(var, "encode"):
if type(var) == unicode:
def _enc(var): if hasattr(var, "encode"): return var.encode("utf-8") return var
c6f9a0ceeac29fb2bf9881cf51a56ae694578980 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/c6f9a0ceeac29fb2bf9881cf51a56ae694578980/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1331, 12, 1401, 4672, 309, 618, 12, 1401, 13, 422, 5252, 30, 327, 569, 18, 3015, 2932, 3158, 17, 28, 7923, 327, 569, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1331, 12, 1401, 4672, 309, 618, 12, 1401, 13, 422, 5252, 30, 327, 569, 18, 3015, 2932, 3158, 17, 28, 7923, 327, 569, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
svc.get(group).get(option).load(value)
svc.options.get(group).get(option).load(value)
def override_configuration_system(self, services): if self.__editorname: svc = services.get('editormanager') svc.set_option('general', 'editor_type', self.__editorname) svc.options.save() if not self.opts.option: return for opt in self.opts.option: if '=' in opt: name, value = opt.split('=', 1) if '/' in name: parts = name.split('/', 3) if len(parts) == 3: service, group, option = parts try: svc = services.get(service) svc.get(group).get(option).load(value) except: pass
7aaddce307fc3214b3fb98d180b27cbd970970a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/7aaddce307fc3214b3fb98d180b27cbd970970a2/application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3849, 67, 7025, 67, 4299, 12, 2890, 16, 4028, 4672, 309, 365, 16186, 9177, 529, 30, 7538, 273, 4028, 18, 588, 2668, 4619, 535, 1063, 6134, 7538, 18, 542, 67, 3482, 2668, 12259, 2187, 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, 3849, 67, 7025, 67, 4299, 12, 2890, 16, 4028, 4672, 309, 365, 16186, 9177, 529, 30, 7538, 273, 4028, 18, 588, 2668, 4619, 535, 1063, 6134, 7538, 18, 542, 67, 3482, 2668, 12259, 2187, 2...
toolbar_buttons['decode'].connect("clicked", self.on_toolbutton_clicked, Action.DECODE) toolbar_buttons['decodeandcut'].connect("clicked", self.on_toolbutton_clicked, Action.DECODEANDCUT) toolbar_buttons['delete'].connect("clicked", self.on_toolbutton_clicked, Action.DELETE) toolbar_buttons['archive'].connect("clicked", self.on_toolbutton_clicked, Action.ARCHIVE) toolbar_buttons['cut'].connect("clicked", self.on_toolbutton_clicked, Action.CUT) toolbar_buttons['play'].connect("clicked", self.on_toolbutton_clicked, Action.PLAY) toolbar_buttons['restore'].connect("clicked", self.on_toolbutton_clicked, Action.RESTORE) toolbar_buttons['rename'].connect("clicked", self.on_toolbutton_clicked, Action.RENAME) toolbar_buttons['new_folder'].connect("clicked", self.on_toolbutton_clicked, Action.NEW_FOLDER) toolbar_buttons['cut_play'].connect("clicked", self.on_toolbutton_clicked, Action.CUT_PLAY) toolbar_buttons['real_delete'].connect("clicked", self.on_toolbutton_clicked, Action.REAL_DELETE)
self.toolbar_buttons['decode'].connect("clicked", self.on_toolbutton_clicked, Action.DECODE) self.toolbar_buttons['decodeandcut'].connect("clicked", self.on_toolbutton_clicked, Action.DECODEANDCUT) self.toolbar_buttons['delete'].connect("clicked", self.on_toolbutton_clicked, Action.DELETE) self.toolbar_buttons['archive'].connect("clicked", self.on_toolbutton_clicked, Action.ARCHIVE) self.toolbar_buttons['cut'].connect("clicked", self.on_toolbutton_clicked, Action.CUT) self.toolbar_buttons['play'].connect("clicked", self.on_toolbutton_clicked, Action.PLAY) self.toolbar_buttons['restore'].connect("clicked", self.on_toolbutton_clicked, Action.RESTORE) self.toolbar_buttons['rename'].connect("clicked", self.on_toolbutton_clicked, Action.RENAME) self.toolbar_buttons['new_folder'].connect("clicked", self.on_toolbutton_clicked, Action.NEW_FOLDER) self.toolbar_buttons['cut_play'].connect("clicked", self.on_toolbutton_clicked, Action.CUT_PLAY) self.toolbar_buttons['real_delete'].connect("clicked", self.on_toolbutton_clicked, Action.REAL_DELETE) for toolbutton in self.toolbar_buttons: self.toolbar_buttons[toolbutton].show()
def setup_main_window(self, builder): # sidebar image = gtk.Image() image.set_from_stock(gtk.STOCK_CANCEL, gtk.ICON_SIZE_MENU) builder.get_object('buttonClear').set_image(image) # tool buttons images = [ gtk.image_new_from_file(self.get_image_path('decode.png')), gtk.image_new_from_file(self.get_image_path('decodeandcut.png')), gtk.image_new_from_file(self.get_image_path('delete.png')), gtk.image_new_from_file(self.get_image_path('archive.png')), gtk.image_new_from_file(self.get_image_path('cut.png')), gtk.image_new_from_file(self.get_image_path('play.png')), gtk.image_new_from_file(self.get_image_path('restore.png')), gtk.image_new_from_file(self.get_image_path('rename.png')), gtk.image_new_from_file(self.get_image_path('new_folder.png')), gtk.image_new_from_file(self.get_image_path('play.png')), gtk.image_new_from_file(self.get_image_path('delete.png')) ] for img in images: img.show() toolbar_buttons = { 'decode': gtk.ToolButton(images[0], "Dekodieren"), 'decodeandcut': gtk.ToolButton(images[1], "Dekodieren und Schneiden"), 'delete': gtk.ToolButton(images[2], "In den Müll verschieben"), 'archive': gtk.ToolButton(images[3], "Archivieren"), 'cut': gtk.ToolButton(images[4], "Schneiden"), 'play': gtk.ToolButton(images[5], "Abspielen"), 'restore': gtk.ToolButton(images[6], "Wiederherstellen"), 'rename': gtk.ToolButton(images[7], "Umbenennen"), 'new_folder': gtk.ToolButton(images[8], "Neuer Ordner"), 'cut_play': gtk.ToolButton(images[9], "Geschnitten Abspielen"), 'real_delete': gtk.ToolButton(images[10], "Löschen") }
2bc483b8d9443c0af39f7134c699dcad2da964a5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11048/2bc483b8d9443c0af39f7134c699dcad2da964a5/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 5254, 67, 5668, 12, 2890, 16, 2089, 4672, 468, 23364, 1316, 273, 22718, 18, 2040, 1435, 1316, 18, 542, 67, 2080, 67, 15381, 12, 4521, 79, 18, 31487, 3507, 67, 25268, 16, 2271...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 5254, 67, 5668, 12, 2890, 16, 2089, 4672, 468, 23364, 1316, 273, 22718, 18, 2040, 1435, 1316, 18, 542, 67, 2080, 67, 15381, 12, 4521, 79, 18, 31487, 3507, 67, 25268, 16, 2271...
else: plist.append(self.getatom())
else: plist.append(self.getatom(self.phraseends))
def getphraselist(self): """Parse a sequence of RFC-822 phrases.
9ec58aaef2d0124bd42e30e6029fe8a7bdb906e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ec58aaef2d0124bd42e30e6029fe8a7bdb906e7/rfc822.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 844, 21636, 5449, 12, 2890, 4672, 3536, 3201, 279, 3102, 434, 8372, 17, 24532, 31413, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 844, 21636, 5449, 12, 2890, 4672, 3536, 3201, 279, 3102, 434, 8372, 17, 24532, 31413, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
raise XMLException("The XMLSchema: %s is not well-formed. %s") %(schemaname,detail)
raise XMLException("The XMLSchema: %s is not well-formed. %s" %(schemaname, detail))
def parseXML(filename, filepath='.', schemaname='', schemapath='.'): """ Parses and validates (optional) an XML file and returns an object representing the parsed XML. @param filename: Name of XML file to parse. @param filepath: Path (absolute or relative) to the XML file. Default is current folder. @param schemaname: Name of XML Schema file (if any). @param schemapath: Path (absolute or relative) to the XML Schema file (if any). Default is current folder. @raise XMLException: If the XML file can not be read or is not well-formed. If a schema is present and if the schema file can not be read, is not well-formed or if the validation fails. @return: XMLdoc, object representing the parsed XML file. """ fpath = os.path.join(filepath,filename) schpath = os.path.join(schemapath,schemaname) try: xmldoc = etree.ElementTree(file=fpath) except etree.XMLSyntaxError, detail: raise XMLException("The XML file: %s is not well-formed. %s") %(filename,detail) except IOError, detail: raise XMLException("I/O error reading the XML file: %s %s") %(filename,detail) if schemaname: try: schemadoc = etree.ElementTree(file=schpath) except etree.XMLSyntaxError, detail: raise XMLException("The XMLSchema: %s is not well-formed. %s") %(schemaname,detail) except IOError, detail: raise XMLException("I/O error reading the XMLSchema file: %s %s") %(schemaname,detail) schema = etree.XMLSchema(schemadoc) result = schema.validate(xmldoc) if not result: raise XMLException("The XML file: %s is not valid according to the XMLSchema: %s.") %(filename,schemaname) return XMLdoc(doc)
b062149090e56ddc4e345c0a94881f02a37ee54d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/b062149090e56ddc4e345c0a94881f02a37ee54d/xml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4201, 12, 3459, 16, 3608, 2218, 1093, 16, 30140, 304, 339, 2218, 2187, 30140, 438, 421, 2218, 1093, 4672, 3536, 2280, 2420, 471, 11964, 261, 10444, 13, 392, 3167, 585, 471, 1135, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4201, 12, 3459, 16, 3608, 2218, 1093, 16, 30140, 304, 339, 2218, 2187, 30140, 438, 421, 2218, 1093, 4672, 3536, 2280, 2420, 471, 11964, 261, 10444, 13, 392, 3167, 585, 471, 1135, 3...
urldata, pd, fn = getdata(d)
urldata = getdata(d)
def go(d, urldata = None): """ Fetch all urls """ if not urldata: urldata, pd, fn = getdata(d) for u in urldata: ud = urldata[u] m = ud.method if ud.localfile and not m.forcefetch(u, ud, d) and os.path.exists(ud.md5): # File already present along with md5 stamp file # Touch md5 file to show activity os.utime(ud.md5, None) continue m.go(u, ud, d) if ud.localfile and not m.forcefetch(u, ud, d): Fetch.write_md5sum(u, ud, d)
89853852ed422e5be7e488ea2389fc7760f97d29 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8123/89853852ed422e5be7e488ea2389fc7760f97d29/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1960, 12, 72, 16, 880, 892, 273, 599, 4672, 3536, 8065, 777, 6903, 3536, 309, 486, 880, 892, 30, 880, 892, 273, 336, 892, 12, 72, 13, 225, 364, 582, 316, 880, 892, 30, 23969, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1960, 12, 72, 16, 880, 892, 273, 599, 4672, 3536, 8065, 777, 6903, 3536, 309, 486, 880, 892, 30, 880, 892, 273, 336, 892, 12, 72, 13, 225, 364, 582, 316, 880, 892, 30, 23969, 273, ...
yscroll = Scrollbar(frame1, command=self.listbox.yview, orient='vertica')
yscroll = Scrollbar(frame1, command=self.listbox.yview, \ orient='vertical')
def draw(self): text = '''ROOT MENU (VMGM)
da5b36b02b4777d12c9eea8794f6b7d3fb12a3c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4675/da5b36b02b4777d12c9eea8794f6b7d3fb12a3c7/titleset-wizard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 977, 273, 9163, 9185, 490, 1157, 57, 261, 7397, 43, 49, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 977, 273, 9163, 9185, 490, 1157, 57, 261, 7397, 43, 49, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
ret = self._escapeString(value)
ret = self._escapeString( value )
def setJobParameter(self,jobID,key,value): """ Set a parameter specified by name,value pair for the job JobID """
99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2278, 1662, 12, 2890, 16, 4688, 734, 16, 856, 16, 1132, 4672, 3536, 1000, 279, 1569, 1269, 635, 508, 16, 1132, 3082, 364, 326, 1719, 22137, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2278, 1662, 12, 2890, 16, 4688, 734, 16, 856, 16, 1132, 4672, 3536, 1000, 279, 1569, 1269, 635, 508, 16, 1132, 3082, 364, 326, 1719, 22137, 3536, 2, -100, -100, -100, -100, -100, ...
str = '';
str = ''
def build_installer(request): if (request.POST['action'] == 'build_installer'): vessels = simplejson.loads(request.POST['content']) str = ''; for vessel in vessels: str += vessel['owner'] for user in vessel['users']: str += " " + user return HttpResponse(str)
8756e134ebfd025edb0fd5c1f2f31cc78110c07b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/8756e134ebfd025edb0fd5c1f2f31cc78110c07b/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 20163, 12, 2293, 4672, 309, 261, 2293, 18, 3798, 3292, 1128, 3546, 422, 296, 3510, 67, 20163, 11, 4672, 331, 403, 10558, 273, 4143, 1977, 18, 17135, 12, 2293, 18, 3798, 3292, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 20163, 12, 2293, 4672, 309, 261, 2293, 18, 3798, 3292, 1128, 3546, 422, 296, 3510, 67, 20163, 11, 4672, 331, 403, 10558, 273, 4143, 1977, 18, 17135, 12, 2293, 18, 3798, 3292, ...
cmd("rsync -a --delete "+x+"/* "+self.settings["chroot_path"]+x,\
cmd("rsync -a --delete "+x+"/ "+self.settings["chroot_path"]+x,\
def portage_overlay(self): # copy over the portage overlays # Always copy over the overlay incase it has changed if self.settings.has_key("portage_overlay"): for x in self.settings["portage_overlay"]: if os.path.exists(x): print "Copying overlay dir " +x cmd("mkdir -p "+self.settings["chroot_path"]+x,"Could not make portage_overlay dir",env=self.env) cmd("rsync -a --delete "+x+"/* "+self.settings["chroot_path"]+x,\ "Could not copy portage_overlay",env=self.env) #cmd("cp -R "+x+"/* "+self.settings["chroot_path"]+x,"Could not copy portage_overlay",env=self.env)
989aa926fc75a6f5cdede4f7e73ceea771898ef3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/989aa926fc75a6f5cdede4f7e73ceea771898ef3/generic_stage_target.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1756, 410, 67, 17312, 12, 2890, 4672, 468, 1610, 1879, 326, 1756, 410, 9218, 87, 468, 14178, 1610, 1879, 326, 9218, 316, 3593, 518, 711, 3550, 309, 365, 18, 4272, 18, 5332, 67, 856, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1756, 410, 67, 17312, 12, 2890, 4672, 468, 1610, 1879, 326, 1756, 410, 9218, 87, 468, 14178, 1610, 1879, 326, 9218, 316, 3593, 518, 711, 3550, 309, 365, 18, 4272, 18, 5332, 67, 856, 29...
if child is not None: for y in rec(child): yield y;
yield child for y in rec(child): yield y;
def rec(x): for i in x.index_set(): child = x.f(i); if child is None: break hasParent = False; for j in x.index_set(): if j == i: break if not child.e(j) == None: hasParent = True break if hasParent: break; if child is not None: for y in rec(child): yield y;
0eb8c6fa93d90c91aea75fe3593573d37960dfa1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0eb8c6fa93d90c91aea75fe3593573d37960dfa1/crystals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1950, 12, 92, 4672, 364, 277, 316, 619, 18, 1615, 67, 542, 13332, 1151, 273, 619, 18, 74, 12, 77, 1769, 309, 1151, 353, 599, 30, 898, 711, 3054, 273, 1083, 31, 364, 525, 316, 619, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1950, 12, 92, 4672, 364, 277, 316, 619, 18, 1615, 67, 542, 13332, 1151, 273, 619, 18, 74, 12, 77, 1769, 309, 1151, 353, 599, 30, 898, 711, 3054, 273, 1083, 31, 364, 525, 316, 619, ...
keys = self.defaults.keys()
keys = M.nonredundant( self.defaults.keys() + self.docs.keys() +\ self.types.keys() )
def reportArguments( self ): """Pretty-print arguments, default values and documentation""" keys = self.defaults.keys() keys.sort() r = ''
511e05e15c415ab0fceac5d72447922a26a45e31 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/511e05e15c415ab0fceac5d72447922a26a45e31/Commandline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 4628, 12, 365, 262, 30, 3536, 20491, 17, 1188, 1775, 16, 805, 924, 471, 7323, 8395, 1311, 273, 490, 18, 5836, 1118, 15362, 12, 365, 18, 7606, 18, 2452, 1435, 397, 365, 18, 8532, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 4628, 12, 365, 262, 30, 3536, 20491, 17, 1188, 1775, 16, 805, 924, 471, 7323, 8395, 1311, 273, 490, 18, 5836, 1118, 15362, 12, 365, 18, 7606, 18, 2452, 1435, 397, 365, 18, 8532, ...
+ ('Acuity', 'AF', 'Hits', 'Power', '% Power Pool')
+ ('Acuity', 'Hits', 'Power', '% Power Pool', 'AF')
def asXML(self, rich=False): document = Document() rootnode = document.createElement('SCTemplate') document.appendChild(rootnode) childnode = document.createElement('Name') childnode.appendChild(document.createTextNode( unicode(self.CharName.text()))) rootnode.appendChild(childnode) childnode = document.createElement('Realm') childnode.appendChild(document.createTextNode(self.realm)) rootnode.appendChild(childnode) childnode = document.createElement('Class') childnode.appendChild(document.createTextNode(self.charclass)) rootnode.appendChild(childnode) childnode = document.createElement('Race') childnode.appendChild(document.createTextNode( unicode(self.CharRace.currentText()))) rootnode.appendChild(childnode) childnode = document.createElement('Level') childnode.appendChild(document.createTextNode( unicode(self.CharLevel.text()))) rootnode.appendChild(childnode) childnode = document.createElement('Notes') childnode.appendChild(document.createTextNode(unicode(self.noteText))) rootnode.appendChild(childnode)
9cc5bea28d0da2829b52361f09fd1e578b64fcbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6671/9cc5bea28d0da2829b52361f09fd1e578b64fcbc/ScWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 487, 4201, 12, 2890, 16, 23657, 33, 8381, 4672, 1668, 273, 4319, 1435, 1365, 2159, 273, 1668, 18, 2640, 1046, 2668, 55, 1268, 29761, 6134, 1668, 18, 6923, 1763, 12, 3085, 2159, 13, 1151,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4201, 12, 2890, 16, 23657, 33, 8381, 4672, 1668, 273, 4319, 1435, 1365, 2159, 273, 1668, 18, 2640, 1046, 2668, 55, 1268, 29761, 6134, 1668, 18, 6923, 1763, 12, 3085, 2159, 13, 1151,...
def pop_equal(self, pop): return self.__cmp__(pop) == 0
def obj_equal(self, obj): return self.__cmp__(obj) == 0
def pop_equal(self, pop): return self.__cmp__(pop) == 0
7b6277cb13345d10dcc66bf1b08cdcbc7093f53a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/7b6277cb13345d10dcc66bf1b08cdcbc7093f53a/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1081, 67, 9729, 12, 2890, 16, 1081, 4672, 327, 365, 16186, 9625, 972, 12, 2603, 13, 422, 374, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1081, 67, 9729, 12, 2890, 16, 1081, 4672, 327, 365, 16186, 9625, 972, 12, 2603, 13, 422, 374, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
str = str + event.ljust(32) + '\t' acceptorDict = self.dict[event] for object in acceptorDict.keys(): method, extraArgs, persistent = acceptorDict[object] className = object.__class__.__name__ methodName = method.__name__ str = str + className + '.' + methodName + ' ' str = str + '\n'
str += self.__eventRepr(event)
def __repr__(self): """ Compact version of event, acceptor pairs """ str = "="*64 + "\n" keys = self.dict.keys() keys.sort() for event in keys: str = str + event.ljust(32) + '\t' acceptorDict = self.dict[event] for object in acceptorDict.keys(): method, extraArgs, persistent = acceptorDict[object] className = object.__class__.__name__ methodName = method.__name__ str = str + className + '.' + methodName + ' ' str = str + '\n' return str
7f3fc75371d08d057638a838517012d952d9705e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/7f3fc75371d08d057638a838517012d952d9705e/Messenger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 3536, 23823, 1177, 434, 871, 16, 2791, 280, 5574, 3536, 609, 273, 9671, 14, 1105, 397, 1548, 82, 6, 1311, 273, 365, 18, 1576, 18, 2452, 1435, 1311, 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, 1001, 12715, 972, 12, 2890, 4672, 3536, 23823, 1177, 434, 871, 16, 2791, 280, 5574, 3536, 609, 273, 9671, 14, 1105, 397, 1548, 82, 6, 1311, 273, 365, 18, 1576, 18, 2452, 1435, 1311, 18...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 657) else quickfix.DoubleField.__init__(self, 657, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 10321, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 10321, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738,...
zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP "zip" utility (if installed and found on the default search path) or the "zipfile" Python module (if available). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip file.
zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip file.
def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP "zip" utility (if installed and found on the default search path) or the "zipfile" Python module (if available). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip file. """ # This initially assumed the Unix 'zip' utility -- but # apparently InfoZIP's zip.exe works the same under Windows, so # no changes needed! zip_filename = base_name + ".zip" mkpath(os.path.dirname(zip_filename), dry_run=dry_run) try: spawn(["zip", "-rq", zip_filename, base_dir], dry_run=dry_run) except DistutilsExecError: # XXX really should distinguish between "couldn't find # external 'zip' command" and "zip failed" -- shouldn't try # again in the latter case. (I think fixing this will # require some cooperation from the spawn module -- perhaps # a utility function to search the path, so we can fallback # on zipfile.py without the failed spawn.) try: import zipfile except ImportError: raise DistutilsExecError, \ ("unable to create zip file '%s': " + "could neither find a standalone zip utility nor " + "import the 'zipfile' module") % zip_filename log.info("creating '%s' and adding '%s' to it", zip_filename, base_dir) def visit (z, dirname, names): for name in names: path = os.path.normpath(os.path.join(dirname, name)) if os.path.isfile(path): z.write(path, path) if not dry_run: z = zipfile.ZipFile(zip_filename, "w", compression=zipfile.ZIP_DEFLATED) os.path.walk(base_dir, visit, z) z.close() return zip_filename
79143f726d00f332dcf828c4e1d6bd2349e7bc00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/79143f726d00f332dcf828c4e1d6bd2349e7bc00/archive_util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 4450, 768, 261, 1969, 67, 529, 16, 1026, 67, 1214, 16, 3988, 33, 20, 16, 10299, 67, 2681, 33, 20, 4672, 3536, 1684, 279, 3144, 585, 628, 777, 326, 1390, 3613, 296, 1969, 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, 1221, 67, 4450, 768, 261, 1969, 67, 529, 16, 1026, 67, 1214, 16, 3988, 33, 20, 16, 10299, 67, 2681, 33, 20, 4672, 3536, 1684, 279, 3144, 585, 628, 777, 326, 1390, 3613, 296, 1969, 67...
goodRemoved = [] repBy = []
goodRemoved = []
def OnParticipantsChanged(event, wavelet): logging.info('OnParticipantsChanged Called') if ('wave-helpdesk@appspot.com' != wavelet.root_blip.creator): return badAdded = [] goodRemoved = [] #q = db.GqlQuery('SELECT * FROM UserWave WHERE wave_id = :1', wavelet.wave_id) repBy = [] #if q: # if q.reported_by: # repby = [q.reported_by] for p in event.participants_added: if (p.split('@')[1] == 'appspot.com') or (p.split('@')[1] == 'googlewaverobots.com'): badAdded.append(p) if p in ['wave-helpdesk@appspot.com', 'statusee@appspot.com',]: badAdded.remove(p) for p in event.participants_removed: if p in PARTICIPANTS + repBy: goodRemoved.append(p) if event.modified_by in PARTICIPANTS + repBy: return if not (badAdded or goodRemoved): return for i in badAdded: wavelet.participants.set_role(i, 'READ_ONLY') logging.debug('%s now read only' % i) for i in goodRemoved: wavelet.participants.add(i) logging.debug('%s was re-added' % i) wavelet.participants.set_role(event.modified_by, 'READ_ONLY')
08f71e7780f463f0c91db94bc34c01d8d26623b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4190/08f71e7780f463f0c91db94bc34c01d8d26623b0/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1988, 27620, 5033, 12, 2575, 16, 19342, 808, 4672, 2907, 18, 1376, 2668, 1398, 1988, 27620, 5033, 11782, 6134, 309, 7707, 17838, 17, 5201, 5489, 79, 36, 11411, 13130, 18, 832, 11, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1988, 27620, 5033, 12, 2575, 16, 19342, 808, 4672, 2907, 18, 1376, 2668, 1398, 1988, 27620, 5033, 11782, 6134, 309, 7707, 17838, 17, 5201, 5489, 79, 36, 11411, 13130, 18, 832, 11, ...
if getkind(FIELDTYPE) in 'po':
if getkind(FIELDTYPE) in ('ptr', 'obj'):
def setfield(cpu, pbox, xbox): p = reveal(cpu, TYPE, pbox) x = %(input)s setattr(p, %(name)r, x)
ba30169523c2668d0f4ce5f9013e1c5953cbc555 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/ba30169523c2668d0f4ce5f9013e1c5953cbc555/runner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 1518, 12, 11447, 16, 293, 2147, 16, 619, 2147, 4672, 293, 273, 283, 24293, 12, 11447, 16, 3463, 16, 293, 2147, 13, 619, 273, 8975, 2630, 13, 87, 9241, 12, 84, 16, 8975, 529, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 1518, 12, 11447, 16, 293, 2147, 16, 619, 2147, 4672, 293, 273, 283, 24293, 12, 11447, 16, 3463, 16, 293, 2147, 13, 619, 273, 8975, 2630, 13, 87, 9241, 12, 84, 16, 8975, 529, 13,...
os.remove(self._openFile)
if os.path.exists(self._openFile): os.remove(self._openFile)
def close(self):
b9f6f45a30a14770bea92600569796bff60b78e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b9f6f45a30a14770bea92600569796bff60b78e9/DBRepository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
req = Request() cache = cache_driver.BlosxomCache(req, config.py.get('cacheConfig', ''))
cache = cache_driver.BlosxomCache(request, config.py.get('cacheConfig', ''))
def autoping(name): # Load up the cache (You can just import the base cache here) cache_driver = tools.importName('Pyblosxom.cache', config.py.get('cacheDriver', 'base')) req = Request() cache = cache_driver.BlosxomCache(req, config.py.get('cacheConfig', '')) try: filename = os.path.join(config.py['datadir'], name) entryData = {} cache.load(filename) # Look for cached documents if cache.isCached(): entryData = cache.getEntry() # Cached? Try our entryparsers then. if not entryData: fileExt = re.search(r'\.([\w]+)$', filename) try: entryData = default_entry_parser(filename,req) except IOError: pass name = re.sub(config.py['datadir'],'',name) parser = link(name, entryData['title'].strip(), entryData['body'].strip(), config.py['blog_title']) trackback(parser) pingback(parser) except: pass
1a0d6a1961f55edeab49a647186314eccefca4a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/1a0d6a1961f55edeab49a647186314eccefca4a1/autoping.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2059, 22384, 12, 529, 4672, 468, 4444, 731, 326, 1247, 261, 6225, 848, 2537, 1930, 326, 1026, 1247, 2674, 13, 1247, 67, 7407, 273, 8513, 18, 5666, 461, 2668, 9413, 70, 383, 30319, 362, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2059, 22384, 12, 529, 4672, 468, 4444, 731, 326, 1247, 261, 6225, 848, 2537, 1930, 326, 1026, 1247, 2674, 13, 1247, 67, 7407, 273, 8513, 18, 5666, 461, 2668, 9413, 70, 383, 30319, 362, ...
changed_keybindings.append (row[0], accel) print("%s changed from %s to %s" % (row[0], self.term.conf.keybindings[row[0]], accel))
changed_keybindings.append ((row[0], accel)) dbg("%s changed from %s to %s" % (row[0], self.term.conf.keybindings[row[0]], accel)) newbindings = self.term.conf.keybindings for binding in changed_keybindings: newbindings[binding[0]] = binding[1] self.term.keybindings.configure (newbindings)
def apply (self, data): values = {} for page in [self.appearance, self.behaviour, self.globals, self.colours]: for property in page: widget = self.widgets[property]
584898413dacc8dbf310da2ce150e26fe5e63fae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6502/584898413dacc8dbf310da2ce150e26fe5e63fae/prefs_profile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 261, 2890, 16, 501, 4672, 924, 273, 2618, 364, 1363, 316, 306, 2890, 18, 438, 27668, 16, 365, 18, 31772, 477, 16, 365, 18, 16227, 16, 365, 18, 1293, 4390, 14542, 364, 1272, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 261, 2890, 16, 501, 4672, 924, 273, 2618, 364, 1363, 316, 306, 2890, 18, 438, 27668, 16, 365, 18, 31772, 477, 16, 365, 18, 16227, 16, 365, 18, 1293, 4390, 14542, 364, 1272, 316, ...
self.document.load_finished(ok)
self.document.set_bottom_padding(0)
def load_finished(self, ok): if self.loading_url is None: # An <iframe> finished loading return self.loading_url = None self.document.load_finished(ok) self._size_hint = self.document.mainFrame().contentsSize() scrolled = False if self.to_bottom: self.to_bottom = False self.initial_pos = 1.0 if self.initial_pos > 0.0: scrolled = True self.scroll_to(self.initial_pos, notify=False) self.initial_pos = 0.0 self.update() self.initialize_scrollbar() self.document.reference_mode(self._reference_mode) if self.manager is not None: spine_index = self.manager.load_finished(bool(ok)) if spine_index > -1: self.document.set_reference_prefix('%d.'%(spine_index+1)) if scrolled: self.manager.scrolled(self.document.scroll_fraction)
3b3a189b03511cd460ffa94dd57e665275b624c0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/3b3a189b03511cd460ffa94dd57e665275b624c0/documentview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 13527, 12, 2890, 16, 1529, 4672, 309, 365, 18, 15174, 67, 718, 353, 599, 30, 468, 1922, 411, 18891, 34, 6708, 7153, 327, 365, 18, 15174, 67, 718, 273, 599, 365, 18, 5457, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 13527, 12, 2890, 16, 1529, 4672, 309, 365, 18, 15174, 67, 718, 353, 599, 30, 468, 1922, 411, 18891, 34, 6708, 7153, 327, 365, 18, 15174, 67, 718, 273, 599, 365, 18, 5457, 1...
if type(stream_or_string) in _StringTypes:
if isinstance(stream_or_string, basestring):
def parse(stream_or_string, parser=None, bufsize=None): if bufsize is None: bufsize = default_bufsize if type(stream_or_string) in _StringTypes: stream = open(stream_or_string) else: stream = stream_or_string if not parser: parser = xml.sax.make_parser() return DOMEventStream(stream, parser, bufsize)
7b073eda48a63a46b6b26a002febc7f5e27d4cb9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/7b073eda48a63a46b6b26a002febc7f5e27d4cb9/pulldom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 3256, 67, 280, 67, 1080, 16, 2082, 33, 7036, 16, 1681, 1467, 33, 7036, 4672, 309, 1681, 1467, 353, 599, 30, 1681, 1467, 273, 805, 67, 4385, 1467, 309, 1549, 12, 3256, 67, 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, 1109, 12, 3256, 67, 280, 67, 1080, 16, 2082, 33, 7036, 16, 1681, 1467, 33, 7036, 4672, 309, 1681, 1467, 353, 599, 30, 1681, 1467, 273, 805, 67, 4385, 1467, 309, 1549, 12, 3256, 67, 2...
def showtraceback( self ): """This needs to override the default traceback thing so it can put it into a pretty colour and maybe other stuff, I don't know""" try: t, v, tb = sys.exc_info() sys.last_type = t sys.last_value = v sys.last_traceback = tb tblist = traceback.extract_tb( tb ) del tblist[:1] l = traceback.format_list( tblist ) if l: l.insert( 0, "Traceback (most recent call last):\n" ) l[len(l):] = traceback.format_exception_only( t, v ) finally: tblist = tb = None self.writetb( l ) def writetb( self, l ): """This outputs the traceback and should be overridden for anything fancy.""" map( self.write, [ "\x01y\x03%s" % i for i in l ] )
def showtraceback( self ): """This needs to override the default traceback thing so it can put it into a pretty colour and maybe other stuff, I don't know""" try: t, v, tb = sys.exc_info() sys.last_type = t sys.last_value = v sys.last_traceback = tb tblist = traceback.extract_tb( tb ) del tblist[:1] l = traceback.format_list( tblist ) if l: l.insert( 0, "Traceback (most recent call last):\n" ) l[len(l):] = traceback.format_exception_only( t, v ) finally: tblist = tb = None self.writetb( l ) def writetb( self, l ): """This outputs the traceback and should be overridden for anything fancy.""" map( self.write, [ "\x01y\x03%s" % i for i in l ] )
def showtraceback( self ): """This needs to override the default traceback thing so it can put it into a pretty colour and maybe other stuff, I don't know"""
62b5311573ce50804121e2c3e6ff3852a1e8c517 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6932/62b5311573ce50804121e2c3e6ff3852a1e8c517/bpython.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 21696, 12, 365, 262, 30, 3536, 2503, 4260, 358, 3849, 326, 805, 10820, 7757, 1427, 518, 848, 1378, 518, 1368, 279, 7517, 15046, 471, 6944, 1308, 10769, 16, 467, 2727, 1404, 5055, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2405, 21696, 12, 365, 262, 30, 3536, 2503, 4260, 358, 3849, 326, 805, 10820, 7757, 1427, 518, 848, 1378, 518, 1368, 279, 7517, 15046, 471, 6944, 1308, 10769, 16, 467, 2727, 1404, 5055, 8...
if (consumed):
if not final:
#ifdef Py_UNICODE_WIDE if c<sys.maxunicode: p += unichr(c) pos += n else:
16ed2024742360e02d96bf99f8cb5ce4527577cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/16ed2024742360e02d96bf99f8cb5ce4527577cd/app_codecs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 536, 4707, 67, 26642, 67, 59, 10385, 309, 276, 32, 9499, 18, 1896, 9124, 30, 293, 1011, 640, 1354, 86, 12, 71, 13, 949, 1011, 290, 469, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 536, 4707, 67, 26642, 67, 59, 10385, 309, 276, 32, 9499, 18, 1896, 9124, 30, 293, 1011, 640, 1354, 86, 12, 71, 13, 949, 1011, 290, 469, 30, 2, -100, -100, -100, -100, -100, -100,...
raise ImportError("No module named {0}".format(name))
raise ImportError(_ERR_MSG.format(name))
def _gcd_import(name, package=None, level=0): """Import and return the module based on its name, the package the call is being made from, and the level adjustment. This function represents the greatest common denominator of functionality between import_module and __import__. This includes settting __package__ if the loader did not. """ if package: if not hasattr(package, 'rindex'): raise ValueError("__package__ not set to a string") elif package not in sys.modules: msg = ("Parent module {0!r} not loaded, cannot perform relative " "import") raise SystemError(msg.format(package)) if not name and level == 0: raise ValueError("Empty module name") if level > 0: dot = len(package) for x in range(level, 1, -1): try: dot = package.rindex('.', 0, dot) except ValueError: raise ValueError("attempted relative import beyond " "top-level package") if name: name = "{0}.{1}".format(package[:dot], name) else: name = package[:dot] with _ImportLockContext(): try: module = sys.modules[name] if module is None: message = ("import of {} halted; " "None in sys.modules".format(name)) raise ImportError(message) return module except KeyError: pass parent = name.rpartition('.')[0] path = None if parent: if parent not in sys.modules: _gcd_import(parent) # Backwards-compatibility; be nicer to skip the dict lookup. parent_module = sys.modules[parent] try: path = parent_module.__path__ except AttributeError: raise ImportError("no module named {}; " "{} is not a package".format(name, parent)) meta_path = sys.meta_path + _IMPLICIT_META_PATH for finder in meta_path: loader = finder.find_module(name, path) if loader is not None: loader.load_module(name) break else: raise ImportError("No module named {0}".format(name)) # Backwards-compatibility; be nicer to skip the dict lookup. module = sys.modules[name] if parent: # Set the module as an attribute on its parent. setattr(parent_module, name.rpartition('.')[2], module) # Set __package__ if the loader did not. if not hasattr(module, '__package__') or module.__package__ is None: # Watch out for what comes out of sys.modules to not be a module, # e.g. an int. try: module.__package__ = module.__name__ if not hasattr(module, '__path__'): module.__package__ = module.__package__.rpartition('.')[0] except AttributeError: pass return module
bac270f248faeee44a9763b8bc5fad171980b69a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/bac270f248faeee44a9763b8bc5fad171980b69a/_bootstrap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 75, 4315, 67, 5666, 12, 529, 16, 2181, 33, 7036, 16, 1801, 33, 20, 4672, 3536, 5010, 471, 327, 326, 1605, 2511, 603, 2097, 508, 16, 326, 2181, 326, 745, 353, 3832, 7165, 628, 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, 389, 75, 4315, 67, 5666, 12, 529, 16, 2181, 33, 7036, 16, 1801, 33, 20, 4672, 3536, 5010, 471, 327, 326, 1605, 2511, 603, 2097, 508, 16, 326, 2181, 326, 745, 353, 3832, 7165, 628, 16...
self.vbox.pack_start (table, TRUE, TRUE, 5)
self.vbox.pack_start (table, True, True, 5)
def __init__ (self, title, callback, data): gtk.Dialog.__init__ (self, title, mainWindow, gtk.DIALOG_DESTROY_WITH_PARENT|gtk.DIALOG_MODAL, (gtk.STOCK_OK, gtk.RESPONSE_OK, gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)) self.callback = callback self.data = data self.connect ("response", self.responseSignal) table = gtk.Table (2, 3) commentLabel = gtk.Label (_( "Describe the device that you would like to configure.")) commentLabel.set_line_wrap (TRUE) commentLabel.show() table.attach (commentLabel, 0, 2, 0, 1, gtk.EXPAND|gtk.FILL, gtk.EXPAND, 10, 5) screenLabel = gtk.Label (_("Screen Number")) screenLabel.show() table.attach (screenLabel, 0, 1, 1, 2, 0, gtk.EXPAND, 10, 5) self.screenCombo = gtk.Combo() self.screenCombo.set_popdown_strings ( [""]+map(str,range(len(dpy.screens)))) self.screenCombo.entry.connect ("activate", self.screenSignal) self.screenCombo.list.connect ("select_child", self.screenSignal) self.screenCombo.show() table.attach (self.screenCombo, 1, 2, 1, 2, gtk.EXPAND|gtk.FILL, gtk.EXPAND, 10, 5) driverLabel = gtk.Label (_("Driver Name")) driverLabel.show() table.attach (driverLabel, 0, 1, 2, 3, 0, gtk.EXPAND, 10, 5) self.driverCombo = gtk.Combo() self.driverCombo.set_popdown_strings ( [""]+[str(driver.name) for driver in dri.DisplayInfo.drivers.values()]) self.driverCombo.show() table.attach (self.driverCombo, 1, 2, 2, 3, gtk.EXPAND|gtk.FILL, gtk.EXPAND, 10, 5) if data and data.__class__ == dri.DeviceConfig: if data.screen: self.screenCombo.entry.set_text (data.screen) if data.driver: self.driverCombo.entry.set_text (data.driver) table.show() self.vbox.pack_start (table, TRUE, TRUE, 5) self.show()
ab8126074d7036807d1d842171687cc01617a181 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/ab8126074d7036807d1d842171687cc01617a181/driconf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 2077, 16, 1348, 16, 501, 4672, 22718, 18, 6353, 16186, 2738, 972, 261, 2890, 16, 2077, 16, 2774, 3829, 16, 22718, 18, 2565, 18683, 67, 1639, 25870, 61, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 2077, 16, 1348, 16, 501, 4672, 22718, 18, 6353, 16186, 2738, 972, 261, 2890, 16, 2077, 16, 2774, 3829, 16, 22718, 18, 2565, 18683, 67, 1639, 25870, 61, ...
proc += ['--race-verifier=' + self.TMP_DIR + '/race.log']
proc += ['--race-verifier=' + self.TMP_DIR + '/race.log', '--race-verifier-sleep-ms=%d' % int(self._options.race_verifier_sleep_ms)]
def ToolSpecificFlags(self): proc = super(ThreadSanitizerRV2Mixin, self).ToolSpecificFlags() proc += ['--race-verifier=' + self.TMP_DIR + '/race.log'] return proc
4b973d7a16cfee0fc0485f43b4ca68f3d76bacca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/4b973d7a16cfee0fc0485f43b4ca68f3d76bacca/valgrind_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13288, 9969, 5094, 12, 2890, 4672, 5418, 273, 2240, 12, 3830, 26131, 1824, 54, 58, 22, 14439, 16, 365, 2934, 6364, 9969, 5094, 1435, 5418, 1011, 10228, 413, 9963, 17, 31797, 2218, 397, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13288, 9969, 5094, 12, 2890, 4672, 5418, 273, 2240, 12, 3830, 26131, 1824, 54, 58, 22, 14439, 16, 365, 2934, 6364, 9969, 5094, 1435, 5418, 1011, 10228, 413, 9963, 17, 31797, 2218, 397, 3...
path = unquote(path)
def ftp_open(self, req): host = req.get_host() if not host: raise IOError, ('ftp error', 'no host given') # XXX handle custom username & password try: host = socket.gethostbyname(host) except socket.error, msg: raise URLError(msg) host, port = splitport(host) if port is None: port = ftplib.FTP_PORT path, attrs = splitattr(req.get_selector()) path = unquote(path) dirs = path.split('/') dirs, file = dirs[:-1], dirs[-1] if dirs and not dirs[0]: dirs = dirs[1:] user = passwd = '' # XXX try: fw = self.connect_ftp(user, passwd, host, port, dirs) type = file and 'I' or 'D' for attr in attrs: attr, value = splitattr(attr) if attr.lower() == 'type' and \ value in ('a', 'A', 'i', 'I', 'd', 'D'): type = value.upper() fp, retrlen = fw.retrfile(file, type) headers = "" mtype = mimetypes.guess_type(req.get_full_url())[0] if mtype: headers += "Content-type: %s\n" % mtype if retrlen is not None and retrlen >= 0: headers += "Content-length: %d\n" % retrlen sf = StringIO(headers) headers = mimetools.Message(sf) return addinfourl(fp, headers, req.get_full_url()) except ftplib.all_errors, msg: raise IOError, ('ftp error', msg), sys.exc_info()[2]
7db04e7c4802022cfb3a1daacab333cd9efd5a78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7db04e7c4802022cfb3a1daacab333cd9efd5a78/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 3190, 12, 2890, 16, 1111, 4672, 1479, 273, 1111, 18, 588, 67, 2564, 1435, 309, 486, 1479, 30, 1002, 8340, 16, 7707, 11727, 555, 2187, 296, 2135, 1479, 864, 6134, 468, 11329, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 3190, 12, 2890, 16, 1111, 4672, 1479, 273, 1111, 18, 588, 67, 2564, 1435, 309, 486, 1479, 30, 1002, 8340, 16, 7707, 11727, 555, 2187, 296, 2135, 1479, 864, 6134, 468, 11329, ...
result = urllib2.urlopen(req)
result = _urlopen_with_retry(req)
def test_range (self): req = urllib2.Request("http://www.python.org", headers={'Range': 'bytes=20-39'}) result = urllib2.urlopen(req) data = result.read() self.assertEqual(len(data), 20)
6534a4ed2b25b245b424847a6f61ed4524fa5f72 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/6534a4ed2b25b245b424847a6f61ed4524fa5f72/test_urllib2net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3676, 261, 2890, 4672, 1111, 273, 11527, 22, 18, 691, 2932, 2505, 2207, 5591, 18, 8103, 18, 3341, 3113, 1607, 5899, 11, 2655, 4278, 296, 3890, 33, 3462, 17, 5520, 11, 6792, 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, 1842, 67, 3676, 261, 2890, 4672, 1111, 273, 11527, 22, 18, 691, 2932, 2505, 2207, 5591, 18, 8103, 18, 3341, 3113, 1607, 5899, 11, 2655, 4278, 296, 3890, 33, 3462, 17, 5520, 11, 6792, 5...
parser.setdirname(sys.argv[2]) if file == '-': fp = sys.stdin else:
dirname = sys.argv[2] parser.setdirname(dirname)
def test(): import sys debugging = 0 print_headers = 0 cont = 0 html3 = 0 while sys.argv[1:2] == ['-d']: debugging = debugging + 1 del sys.argv[1:2] if sys.argv[1] == '-p': print_headers = 1 del sys.argv[1] if sys.argv[1] == '-c': cont = 1 del sys.argv[1] if sys.argv[1] == '-3': html3 = 1 del sys.argv[1] if len(sys.argv) <> 3: print 'usage: texi2html [-d [-d]] [-p] [-c] inputfile outputdirectory' sys.exit(2) if html3: parser = TexinfoParserHTML3() else: parser = TexinfoParser() parser.cont = cont parser.debugging = debugging parser.print_headers = print_headers file = sys.argv[1] parser.setdirname(sys.argv[2]) if file == '-': fp = sys.stdin else: parser.setincludedir(os.path.dirname(file)) try: fp = open(file, 'r') except IOError, msg: print file, ':', msg sys.exit(1) parser.parse(fp) fp.close() parser.report()
ef5864ed718f5261a00bf695aae3b38b624408c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ef5864ed718f5261a00bf695aae3b38b624408c2/texi2html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 1930, 2589, 10450, 273, 374, 1172, 67, 2485, 273, 374, 466, 273, 374, 1729, 23, 273, 374, 225, 1323, 2589, 18, 19485, 63, 21, 30, 22, 65, 422, 10228, 17, 72, 3546, 30, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 1930, 2589, 10450, 273, 374, 1172, 67, 2485, 273, 374, 466, 273, 374, 1729, 23, 273, 374, 225, 1323, 2589, 18, 19485, 63, 21, 30, 22, 65, 422, 10228, 17, 72, 3546, 30, 1...
self.parseAction = [self.normalizeParseActionArgs(f) for f in list(fns)]
self.parseAction = map(self.normalizeParseActionArgs, list(fns))
def setParseAction( self, *fns ): """Define action to perform when successfully matching parse element definition. Parse action fn is a callable method with 0-3 arguments, called as fn(s,loc,toks), fn(loc,toks), fn(toks), or just fn(), where: - s = the original string being parsed - loc = the location of the matching substring - toks = a list of the matched tokens, packaged as a ParseResults object If the functions in fns modify the tokens, they can return them as the return value from fn, and the modified list of tokens will replace the original. Otherwise, fn does not need to return any value.""" self.parseAction = [self.normalizeParseActionArgs(f) for f in list(fns)] return self
b18dc9df3d867052b855a09a154d1d37325344c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12364/b18dc9df3d867052b855a09a154d1d37325344c4/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 3201, 1803, 12, 365, 16, 380, 74, 2387, 262, 30, 3536, 11644, 1301, 358, 3073, 1347, 4985, 3607, 1109, 930, 2379, 18, 2884, 1301, 2295, 353, 279, 4140, 707, 598, 374, 17, 23, 1775...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3201, 1803, 12, 365, 16, 380, 74, 2387, 262, 30, 3536, 11644, 1301, 358, 3073, 1347, 4985, 3607, 1109, 930, 2379, 18, 2884, 1301, 2295, 353, 279, 4140, 707, 598, 374, 17, 23, 1775...
def test_extract(): for arg in sys.argv[1:]: title, body = extract_html(open(arg, "rt").read()) print `title` print print `body` print print
def extract(path, content): """Extract the title and body of a document in plaintext.""" type = guess_type(path) if type == 'text/html': return extract_html(content) elif type == 'text/plain': return None, content else: return None, None
e80ec7072ab3218b843af26b93a4fd963b6c9040 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2448/e80ec7072ab3218b843af26b93a4fd963b6c9040/MySQL.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 12, 803, 16, 913, 4672, 3536, 4976, 326, 2077, 471, 1417, 434, 279, 1668, 316, 11917, 12123, 225, 618, 273, 7274, 67, 723, 12, 803, 13, 225, 309, 618, 422, 296, 955, 19, 2620, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 12, 803, 16, 913, 4672, 3536, 4976, 326, 2077, 471, 1417, 434, 279, 1668, 316, 11917, 12123, 225, 618, 273, 7274, 67, 723, 12, 803, 13, 225, 309, 618, 422, 296, 955, 19, 2620, ...
(returnType, names[0], arguments)) argumentNames = re.sub(r'(const )?[a-zA-Z0-9]+\** ([a-zA-Z0-9]+)', r'\2',
(return_type, names[0], arguments)) argument_names = re.sub(r'(const )?[a-zA-Z0-9]+\** ([a-zA-Z0-9]+)', r'\2',
def GenerateMockSource(file, functions): """Generates functions that invoke a mock GLInterface""" file.write('// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n') file.write('// Use of this source code is governed by a BSD-style license that can be\n') file.write('// found in the LICENSE file.\n') file.write('\n') file.write('// This file is automatically generated.\n') file.write('\n') file.write('#include <string.h>\n') file.write('\n') file.write('#include "app/gfx/gl/gl_interface.h"\n') file.write('\n') file.write('namespace gfx {\n') # Write function that trampoline into the GLInterface. for [returnType, names, arguments] in functions: file.write('\n') file.write('%s GL_BINDING_CALL Mock_%s(%s) {\n' % (returnType, names[0], arguments)) argumentNames = re.sub(r'(const )?[a-zA-Z0-9]+\** ([a-zA-Z0-9]+)', r'\2', arguments) if argumentNames == 'void': argumentNames = '' functionName = names[0][2:] if returnType == 'void': file.write(' GLInterface::GetGLInterface()->%s(%s);\n' % (functionName, argumentNames)) else: file.write(' return GLInterface::GetGLInterface()->%s(%s);\n' % (functionName, argumentNames)) file.write('}\n') # Write a function to lookup a mock GL function based on its name. file.write('\n') file.write('void* GL_BINDING_CALL GetMockGLProcAddress(const char* name) {\n') for [returnType, names, arguments] in functions: file.write(' if (strcmp(name, "%s") == 0)\n' % names[0]) file.write(' return reinterpret_cast<void*>(Mock_%s);\n' % names[0]) file.write(' return NULL;\n') file.write('}\n'); file.write('\n') file.write('} // namespace gfx\n')
218a5a204661ad6185f01d6233b35b2d5f86027b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/218a5a204661ad6185f01d6233b35b2d5f86027b/generate_bindings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 9865, 1830, 12, 768, 16, 4186, 4672, 3536, 6653, 4186, 716, 4356, 279, 5416, 10252, 1358, 8395, 225, 585, 18, 2626, 2668, 759, 25417, 261, 71, 13, 18965, 1021, 1680, 520, 5077, 312...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 9865, 1830, 12, 768, 16, 4186, 4672, 3536, 6653, 4186, 716, 4356, 279, 5416, 10252, 1358, 8395, 225, 585, 18, 2626, 2668, 759, 25417, 261, 71, 13, 18965, 1021, 1680, 520, 5077, 312...
package_headers = self.process_package(headers_featureset[0], vars) name = package_headers['Package'] if packages.has_key(name): package_headers = packages.get(name) package_headers['Architecture'].append(arch) else: package_headers['Architecture'] = [arch] packages.append(package_headers)
add_arch_package(packages, arch, self.process_package(headers_featureset[0], vars))
def do_featureset_packages(self, packages, makefile, arch, featureset, vars, makeflags, extra): headers_featureset = self.templates["control.headers.featureset"] package_headers = self.process_package(headers_featureset[0], vars)
ed3d5ab909e0d0ad6069a6899adc7027d637557f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5794/ed3d5ab909e0d0ad6069a6899adc7027d637557f/gencontrol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 7139, 278, 67, 10308, 12, 2890, 16, 5907, 16, 1221, 768, 16, 6637, 16, 4467, 278, 16, 4153, 16, 1221, 7133, 16, 2870, 4672, 1607, 67, 7139, 278, 273, 365, 18, 8502, 9614, 70...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 7139, 278, 67, 10308, 12, 2890, 16, 5907, 16, 1221, 768, 16, 6637, 16, 4467, 278, 16, 4153, 16, 1221, 7133, 16, 2870, 4672, 1607, 67, 7139, 278, 273, 365, 18, 8502, 9614, 70...
if verbose: print "server created"
if verbose: print("server created")
def run_servers(self, proto, servers, hdlrcls, testfunc): for svrcls in servers: addr = self.pickaddr(proto) if verbose: print "ADDR =", addr print "CLASS =", svrcls t = ServerThread(addr, svrcls, hdlrcls) if verbose: print "server created" t.start() if verbose: print "server running" for i in range(NREQ): t.ready.wait(10*DELAY) self.assert_(t.ready.isSet(), "Server not ready within a reasonable time") if verbose: print "test client", i testfunc(proto, addr) if verbose: print "waiting for server" t.join() if verbose: print "done"
459f06037c9b13cdb3e0f1e070ae33421e222d51 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/459f06037c9b13cdb3e0f1e070ae33421e222d51/test_socketserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 14247, 12, 2890, 16, 3760, 16, 7084, 16, 366, 5761, 86, 6429, 16, 1842, 644, 4672, 364, 5893, 86, 6429, 316, 7084, 30, 3091, 273, 365, 18, 11503, 4793, 12, 9393, 13, 309, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 14247, 12, 2890, 16, 3760, 16, 7084, 16, 366, 5761, 86, 6429, 16, 1842, 644, 4672, 364, 5893, 86, 6429, 316, 7084, 30, 3091, 273, 365, 18, 11503, 4793, 12, 9393, 13, 309, 3...
edit.SetDefaultCharFormat(interact.formatOutputError)
format = eval(win32ui.GetProfileVal(interact.sectionProfile, interact.STYLE_INTERACTIVE_ERROR, str(interact.formatOutputError))) edit.SetDefaultCharFormat(format)
def OnInitDialog(self):
630e18dbc3fbca2cdcb34f103137f93ab5fec50d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/630e18dbc3fbca2cdcb34f103137f93ab5fec50d/ideoptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2570, 6353, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2570, 6353, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if ($('
var lookup = $(' if (lookup.val()) {
def render(self, name, value, attrs=None): if attrs is None: attrs = {} rendered = super(ForeignKeySearchInput, self).render(name, value, attrs) if value: label = self.label_for_value(value) else: label = u'' return rendered + mark_safe(u''' <style type="text/css" media="screen"> #lookup_%(name)s { padding-right:16px; background: url( %(admin_media_prefix)simg/admin/selector-search.gif ) no-repeat right; } #del_%(name)s { display: none; } </style>
232004ad594938cbe340dce72b421873aa7f21e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13656/232004ad594938cbe340dce72b421873aa7f21e5/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 508, 16, 460, 16, 3422, 33, 7036, 4672, 309, 3422, 353, 599, 30, 3422, 273, 2618, 7935, 273, 2240, 12, 15420, 2979, 1210, 16, 365, 2934, 5902, 12, 529, 16, 460, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 508, 16, 460, 16, 3422, 33, 7036, 4672, 309, 3422, 353, 599, 30, 3422, 273, 2618, 7935, 273, 2240, 12, 15420, 2979, 1210, 16, 365, 2934, 5902, 12, 529, 16, 460, 1...
modulename = frame.f_globals["__name__"]
try: modulename = frame.f_globals["__name__"] except KeyError: modulename = None
def trace(self, frame, why, arg): if why == 'line': filename = frame.f_code.co_filename modulename = frame.f_globals["__name__"]
ed1ee6edcef108d19d14203d66a5b954531dd12f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ed1ee6edcef108d19d14203d66a5b954531dd12f/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2606, 12, 2890, 16, 2623, 16, 11598, 16, 1501, 4672, 309, 11598, 422, 296, 1369, 4278, 1544, 273, 2623, 18, 74, 67, 710, 18, 2894, 67, 3459, 31961, 273, 2623, 18, 74, 67, 16227, 9614, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2606, 12, 2890, 16, 2623, 16, 11598, 16, 1501, 4672, 309, 11598, 422, 296, 1369, 4278, 1544, 273, 2623, 18, 74, 67, 710, 18, 2894, 67, 3459, 31961, 273, 2623, 18, 74, 67, 16227, 9614, ...
class BugzillaTracker(models.Model)
class BugzillaTracker(models.Model):
def value_to_string(self, obj): value = self._get_val_from_obj(obj) return self.get_db_prep_value(value)
898fc8476e30627a18511f2da23fc7a1bc187d1e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/898fc8476e30627a18511f2da23fc7a1bc187d1e/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 460, 67, 869, 67, 1080, 12, 2890, 16, 1081, 4672, 460, 273, 365, 6315, 588, 67, 1125, 67, 2080, 67, 2603, 12, 2603, 13, 327, 365, 18, 588, 67, 1966, 67, 19109, 67, 1132, 12, 1132, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 460, 67, 869, 67, 1080, 12, 2890, 16, 1081, 4672, 460, 273, 365, 6315, 588, 67, 1125, 67, 2080, 67, 2603, 12, 2603, 13, 327, 365, 18, 588, 67, 1966, 67, 19109, 67, 1132, 12, 1132, ...
if limit: if full_objects: return related[:max_items] + \ [b.getObject() for b in results[:max_items-len(related)]] return related[:max_items] + results[:max_items-len(related)] return related+results
return results
def queryCatalog(self, REQUEST=None, batch=False, b_size=None, full_objects=False, **kw): """Invoke the catalog using our criteria to augment any passed in query before calling the catalog. """ if REQUEST is None: REQUEST = getattr(self, 'REQUEST', {}) b_start = REQUEST.get('b_start', 0)
e3c79af28dab13fe24b4eb81bf5f9a76f4ce2820 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11956/e3c79af28dab13fe24b4eb81bf5f9a76f4ce2820/topic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 9769, 12, 2890, 16, 12492, 33, 7036, 16, 2581, 33, 8381, 16, 324, 67, 1467, 33, 7036, 16, 1983, 67, 6911, 33, 8381, 16, 2826, 9987, 4672, 3536, 10969, 326, 6222, 1450, 3134, 3582,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 9769, 12, 2890, 16, 12492, 33, 7036, 16, 2581, 33, 8381, 16, 324, 67, 1467, 33, 7036, 16, 1983, 67, 6911, 33, 8381, 16, 2826, 9987, 4672, 3536, 10969, 326, 6222, 1450, 3134, 3582,...
xbmc.sleep(50) times.append(['xbmc.sleep(50)',time.clock()])
def watch(feed, pid, showDialog): times = [] times.append(['start',time.clock()]) if showDialog: pDialog = xbmcgui.DialogProgress() times.append(['xbmcgui.DialogProgress()',time.clock()]) pDialog.update(0) times.append(['pDialog.update(0)',time.clock()]) pDialog.create('IPlayer', 'Loading catchup stream info') times.append(['pDialog.create',time.clock()]) xbmc.sleep(50) times.append(['xbmc.sleep(50)',time.clock()]) subtitles_file = None item = get_item(pid) times.append(['get_item',time.clock()]) thumbnail = item.programme.thumbnail title = item.programme.title summary = item.programme.summary updated = item.programme.updated channel = None thumbfile = None if feed and feed.name: channel = feed.name times.append(['setup variables',time.clock()]) logging.info('watching channel=%s pid=%s' % (channel, pid)) times.append(['logging',time.clock()]) logging.info('thumb =%s summary=%s' % (thumbnail, summary)) times.append(['logging',time.clock()]) subtitles = get_setting_subtitles() times.append(['get_setting_subtitles',time.clock()]) if thumbnail: # attempt to use the existing thumbnail file thumbcache = xbmc.getCacheThumbName( sys.argv[ 0 ] + sys.argv[ 2 ] ) thumbfile = os.path.join( xbmc.translatePath( "special://profile" ), "Thumbnails", "Video", thumbcache[ 0 ], thumbcache ) logging.info('Reusing existing thumbfile =%s for url %s%s' % (thumbfile, sys.argv[ 0 ], sys.argv[ 2 ])) if thumbnail and not os.path.isfile(thumbfile): # thumbnail wasn't available locally so download try: # The thumbnail needs to accessed via the local filesystem # for "Media Info" to display it when playing a video if showDialog: pDialog.update(20, 'Fetching thumbnail') if pDialog.iscanceled(): raise times.append(['update dialog',time.clock()]) iplayer.httpretrieve(thumbnail, thumbfile) times.append(['retrieve thumbnail',time.clock()]) except: pass if item.is_tv: # TV Stream iconimage = 'DefaultVideo.png' if showDialog: pDialog.update(50, 'Fetching video stream info') if pDialog.iscanceled(): raise times.append(['update dialog',time.clock()]) pref = get_setting_videostream(channel) times.append(['get_setting_videostream',time.clock()]) opref = pref if showDialog: pDialog.update(70, 'Selecting video stream') if pDialog.iscanceled(): raise times.append(['update dialog',time.clock()]) media = item.get_media_for(pref) times.append(['fetch media',time.clock()]) # fall down to find a supported stream. streams = ['h264 3200', 'h264 1500', 'h264 800', 'h264 480', 'h264 400'] for i, stream in enumerate(streams): if pref == stream: break while not media and i < len(streams)-1: i += 1 logging.info('Steam %s not available, falling back to flash %s stream' % (pref, streams[i]) ) pref = streams[i] print pref media = item.get_media_for(pref) times.append(['media 1',time.clock()]) streams.reverse(); # problem - no media found for default or lower if not media: # find the first available stream in ascending order for apref in streams: media = item.get_media_for(apref) if media: pref=apref break # A potentially usable stream was found (higher bitrate than the default) offer it to the user if media: d = xbmcgui.Dialog() if d.yesno('Default %s Stream Not Available' % opref, 'Play higher bitrate %s stream ?' % pref ) == False: return False else: # Nothing usable was found d = xbmcgui.Dialog() d.ok('Stream Error', 'Can\'t locate any usable TV streams.') return False times.append(['media 2',time.clock()]) url = media.url times.append(['media.url',time.clock()]) logging.info('watching url=%s' % url) times.append(['logging',time.clock()]) if showDialog: pDialog.update(90, 'Selecting subtitles') if pDialog.iscanceled(): raise times.append(['update dialog',time.clock()]) if subtitles: subtitles_media = item.get_media_for('captions') times.append(['subtitles_media',time.clock()]) if subtitles_media: subtitles_file = download_subtitles(subtitles_media.url) times.append(['subtitles download',time.clock()]) listitem = xbmcgui.ListItem(title) times.append(['create listitem',time.clock()]) #listitem.setIconImage(iconimage) listitem.setInfo('video', { "TVShowTitle": title, 'Plot': summary + ' ' + updated, 'PlotOutline': summary, "Date": updated,}) times.append(['listitem setinfo',time.clock()]) play=xbmc.PlayList(xbmc.PLAYLIST_VIDEO) times.append(['xbmc.PlayList',time.clock()]) else: # Radio stream if showDialog: pDialog.update(30, 'Fetching radio stream info') if pDialog.iscanceled(): raise times.append(['update dialog',time.clock()]) pref = get_setting_audiostream() if showDialog: pDialog.update(50, 'Selecting radio stream') if pDialog.iscanceled(): raise times.append(['update dialog',time.clock()]) media = item.get_media_for(pref) if not media: # fallback to mp3 logging.info('Steam %s not available, trying mp3 stream' % pref) pref = 'mp3' media = item.get_media_for(pref) if not media: # fallback to wma logging.info('Steam %s not available, trying wma stream' % pref) pref = 'wma' media = item.get_media_for(pref) if not media: # fallback to real logging.info('Steam %s not available, trying real stream' % pref) pref = 'real' media = item.get_media_for(pref) if not media: d = xbmcgui.Dialog() d.ok('Stream Error', 'Error: can\'t locate radio stream') return False if pref == 'real': # fetch the rtsp link from the .ram file url = iplayer.httpget(media.url) else : # else use the direct link url = media.url logging.info('Listening to url=%s' % url) listitem = xbmcgui.ListItem(title) times.append(['listitem create',time.clock()]) listitem.setIconImage('defaultAudio.png') times.append(['listitem.setIconImage',time.clock()]) play=xbmc.PlayList(xbmc.PLAYLIST_MUSIC) times.append(['xbmc.PlayList',time.clock()]) logging.info('Playing preference %s' % pref) times.append(['logging.info',time.clock()]) if media.connection_protocol == 'rtmp': if media.SWFPlayer: listitem.setProperty("SWFPlayer", media.SWFPlayer) logging.info("SWFPlayer : " + media.SWFPlayer) if media.PlayPath: listitem.setProperty("PlayPath", media.PlayPath) logging.info("PlayPath : " + media.PlayPath) if media.PageURL: listitem.setProperty("PageURL", media.PageURL) logging.info("PageURL : " + media.PageURL) #if media.tcUrl: # listitem.setProperty("tcUrl", media.tcUrl) # print "tcUrl : " + media.tcUrl times.append(['listitem.setproperty x 3',time.clock()]) if thumbfile: listitem.setIconImage(thumbfile) times.append(['listitem.setIconImage(thumbfile)',time.clock()]) listitem.setThumbnailImage(thumbfile) times.append(['listitem.setThumbnailImage(thumbfile)',time.clock()]) del item del media if showDialog: pDialog.update(80, 'Playing') if pDialog.iscanceled(): raise times.append(['update dialog',time.clock()]) play.clear() times.append(['play.clear()',time.clock()]) play.add(url,listitem) times.append(['play.add',time.clock()]) player = xbmc.Player(xbmc.PLAYER_CORE_AUTO) times.append(['xbmc.Player()',time.clock()]) player.play(play) times.append(['player.play',time.clock()]) # Auto play subtitles if they have downloaded logging.info("subtitles: %s - subtitles_file %s " % (subtitles,subtitles_file)) times.append(['logging.info',time.clock()]) if subtitles == 'autoplay' and subtitles_file: player.setSubtitles(subtitles_file) times.append(['player.setSubtitles',time.clock()]) if showDialog: pDialog.close() times.append(['pDialog.close()',time.clock()]) if addoncompat.get_setting('enhanceddebug') == 'true': pt = times[0][1] for t in times: logging.info('Took %2.2f sec for %s' % (t[1] - pt, t[0])) pt = t[1]
3359c47f9d1b93e2ad6b2f5f50611f36ff5595c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4862/3359c47f9d1b93e2ad6b2f5f50611f36ff5595c2/default.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4267, 12, 7848, 16, 4231, 16, 2405, 6353, 4672, 225, 4124, 273, 5378, 4124, 18, 6923, 12, 3292, 1937, 2187, 957, 18, 18517, 1435, 5717, 309, 2405, 6353, 30, 293, 6353, 273, 15970, 13952,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4267, 12, 7848, 16, 4231, 16, 2405, 6353, 4672, 225, 4124, 273, 5378, 4124, 18, 6923, 12, 3292, 1937, 2187, 957, 18, 18517, 1435, 5717, 309, 2405, 6353, 30, 293, 6353, 273, 15970, 13952,...
def consume(self, pos, endpos):
def consume(self, text):
def consume(self, pos, endpos): # update line number for mo in self.newline_re.finditer(self.buf, pos, endpos): self.line += 1 self.col = 1 pos = mo.end()
508c8a5d02fc845b30bcd9539b7e31ada6e0de34 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3689/508c8a5d02fc845b30bcd9539b7e31ada6e0de34/antlrre.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7865, 12, 2890, 16, 977, 4672, 468, 1089, 980, 1300, 364, 7344, 316, 365, 18, 22861, 67, 266, 18, 4720, 2165, 12, 2890, 18, 4385, 16, 949, 16, 679, 917, 4672, 365, 18, 1369, 1011, 40...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7865, 12, 2890, 16, 977, 4672, 468, 1089, 980, 1300, 364, 7344, 316, 365, 18, 22861, 67, 266, 18, 4720, 2165, 12, 2890, 18, 4385, 16, 949, 16, 679, 917, 4672, 365, 18, 1369, 1011, 40...
"r", "d", "m", "f", "w", "l", "s", "h"
"address", "breakpoint", "cont", "cpureg", "disasm", "dspaddress", "dspbreak", "dspcont", "dspdisasm", "dspmemdump", "dspreg", "help", "loadbin", "logfile", "memdump", "memwrite", "savebin", "setopt"
def loop(self): try: rawline = raw_input(self.prompt) return rawline except EOFError: return ""
b57edc74c494d59f645ae7a3c88c107e1b456736 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8501/b57edc74c494d59f645ae7a3c88c107e1b456736/hatari-console.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 12, 2890, 4672, 775, 30, 1831, 1369, 273, 1831, 67, 2630, 12, 2890, 18, 13325, 13, 327, 1831, 1369, 1335, 6431, 668, 30, 327, 1408, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 12, 2890, 4672, 775, 30, 1831, 1369, 273, 1831, 67, 2630, 12, 2890, 18, 13325, 13, 327, 1831, 1369, 1335, 6431, 668, 30, 327, 1408, 2, -100, -100, -100, -100, -100, -100, -100, -...
self.assertTrue(u.fp.fp.raw._sock.gettimeout() is None)
self.assertTrue(u.fp.raw._sock.gettimeout() is None)
def test_http_basic(self): self.assertTrue(socket.getdefaulttimeout() is None) u = _urlopen_with_retry("http://www.python.org") self.assertTrue(u.fp.fp.raw._sock.gettimeout() is None)
cc6f32cbca424a686fbe1196b3bc36f757151e98 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/cc6f32cbca424a686fbe1196b3bc36f757151e98/test_urllib2net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2505, 67, 13240, 12, 2890, 4672, 365, 18, 11231, 5510, 12, 7814, 18, 588, 1886, 4538, 1435, 353, 599, 13, 582, 273, 389, 295, 18589, 67, 1918, 67, 9620, 2932, 2505, 2207, 559...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2505, 67, 13240, 12, 2890, 4672, 365, 18, 11231, 5510, 12, 7814, 18, 588, 1886, 4538, 1435, 353, 599, 13, 582, 273, 389, 295, 18589, 67, 1918, 67, 9620, 2932, 2505, 2207, 559...
params += dlitem
params.append(dlitem)
def handle_doc_fields(node, env): # don't traverse, only handle field lists that are immediate children for child in node.children: if not isinstance(child, nodes.field_list): continue params = None param_nodes = {} param_types = {} new_list = nodes.field_list() for field in child: fname, fbody = field try: typ, obj = fname.astext().split(None, 1) typdesc = _(doc_fields_with_arg[typ]) if _is_only_paragraph(fbody): children = fbody.children[0].children else: children = fbody.children if typdesc == '%param': if not params: pfield = nodes.field() pfield += nodes.field_name('', _('Parameters')) pfield += nodes.field_body() params = nodes.bullet_list() pfield[1] += params new_list += pfield dlitem = nodes.list_item() dlpar = nodes.paragraph() dlpar += nodes.emphasis(obj, obj) dlpar += nodes.Text(' -- ', ' -- ') dlpar += children param_nodes[obj] = dlpar dlitem += dlpar params += dlitem elif typdesc == '%type': typenodes = fbody.children if _is_only_paragraph(fbody): typenodes = [nodes.Text(' (')] + \ typenodes[0].children + [nodes.Text(')')] param_types[obj] = typenodes else: fieldname = typdesc + ' ' nfield = nodes.field() nfieldname = nodes.field_name(fieldname, fieldname) nfield += nfieldname node = nfieldname if typ in doc_fields_with_linked_arg: node = addnodes.pending_xref(obj, reftype='obj', refcaption=False, reftarget=obj, modname=env.currmodule, classname=env.currclass) nfieldname += node node += nodes.Text(obj, obj) nfield += nodes.field_body() nfield[1] += fbody.children new_list += nfield except (KeyError, ValueError): fnametext = fname.astext() try: typ = _(doc_fields_without_arg[fnametext]) except KeyError: # at least capitalize the field name typ = fnametext.capitalize() fname[0] = nodes.Text(typ) new_list += field for param, type in param_types.iteritems(): if param in param_nodes: param_nodes[param][1:1] = type child.replace_self(new_list)
e2c52d6e906d84a931df32b2e5e34976775ab69b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5532/e2c52d6e906d84a931df32b2e5e34976775ab69b/desc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2434, 67, 2821, 12, 2159, 16, 1550, 4672, 468, 2727, 1404, 10080, 16, 1338, 1640, 652, 6035, 716, 854, 14483, 2325, 364, 1151, 316, 756, 18, 5906, 30, 309, 486, 1549, 12, 362...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2434, 67, 2821, 12, 2159, 16, 1550, 4672, 468, 2727, 1404, 10080, 16, 1338, 1640, 652, 6035, 716, 854, 14483, 2325, 364, 1151, 316, 756, 18, 5906, 30, 309, 486, 1549, 12, 362...
if type(sel) == type(1.0) and 0.0 <= sel < 1.0:
if isinstance(sel, float) and 0.0 <= sel < 1.0:
def eval_print_amount(self, sel, list, msg): new_list = list if type(sel) == type(""): new_list = [] for func in list: if re.search(sel, func_std_string(func)): new_list.append(func) else: count = len(list) if type(sel) == type(1.0) and 0.0 <= sel < 1.0: count = int(count * sel + .5) new_list = list[:count] elif type(sel) == type(1) and 0 <= sel < count: count = sel new_list = list[:count] if len(list) != len(new_list): msg = msg + " List reduced from %r to %r due to restriction <%r>\n" % ( len(list), len(new_list), sel)
b1a97afadb5d6100613c19409882eba0be991b41 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/b1a97afadb5d6100613c19409882eba0be991b41/pstats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 67, 1188, 67, 8949, 12, 2890, 16, 357, 16, 666, 16, 1234, 4672, 394, 67, 1098, 273, 666, 309, 618, 12, 1786, 13, 422, 618, 2932, 6, 4672, 394, 67, 1098, 273, 5378, 364, 1326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 67, 1188, 67, 8949, 12, 2890, 16, 357, 16, 666, 16, 1234, 4672, 394, 67, 1098, 273, 666, 309, 618, 12, 1786, 13, 422, 618, 2932, 6, 4672, 394, 67, 1098, 273, 5378, 364, 1326, ...
fndir = os.path.dirname(filename) if filename[:1] == os.sep: coverpath = os.path.join(dirname, "."+fndir) else: coverpath = os.path.join(dirname, fndir)
modulename = os.path.split(results.modules[key])[1]
def create_results_log(results, dirname = ".", show_missing = 1, save_counts = 0): import re # turn the counts data ("(filename, lineno) = count") into something # accessible on a per-file basis per_file = {} for filename, lineno in results.counts.keys(): lines_hit = per_file[filename] = per_file.get(filename, {}) lines_hit[lineno] = results.counts[(filename, lineno)] # try and merge existing counts and modules file from dirname try: counts = marshal.load(open(os.path.join(dirname, "counts"))) modules = marshal.load(open(os.path.join(dirname, "modules"))) results.update(results.__class__(counts, modules)) except IOError: pass # there are many places where this is insufficient, like a blank # line embedded in a multiline string. blank = re.compile(r'^\s*(#.*)?$') # generate file paths for the coverage files we are going to write... fnlist = [] tfdir = tempfile.gettempdir() for key in per_file.keys(): filename = key # skip some "files" we don't care about... if filename == "<string>": continue # are these caused by code compiled using exec or something? if filename.startswith(tfdir): continue # XXX this is almost certainly not portable!!! fndir = os.path.dirname(filename) if filename[:1] == os.sep: coverpath = os.path.join(dirname, "."+fndir) else: coverpath = os.path.join(dirname, fndir) if filename.endswith(".pyc") or filename.endswith(".pyo"): filename = filename[:-1] # Get the original lines from the .py file try: lines = open(filename, 'r').readlines() except IOError, err: sys.stderr.write("%s: Could not open %s for reading " \ "because: %s - skipping\n" % \ ("trace", `filename`, err.strerror)) continue modulename = os.path.split(results.modules[key])[1] # build list file name by appending a ".cover" to the module name # and sticking it into the specified directory listfilename = os.path.join(coverpath, modulename + ".cover") #sys.stderr.write("modulename: %(modulename)s\n" # "filename: %(filename)s\n" # "coverpath: %(coverpath)s\n" # "listfilename: %(listfilename)s\n" # "dirname: %(dirname)s\n" # % locals()) try: outfile = open(listfilename, 'w') except IOError, err: sys.stderr.write( '%s: Could not open %s for writing because: %s" \ "- skipping\n' % ("trace", `listfilename`, err.strerror)) continue # If desired, get a list of the line numbers which represent # executable content (returned as a dict for better lookup speed) if show_missing: executable_linenos = find_executable_linenos(filename) else: executable_linenos = {} lines_hit = per_file[key] for i in range(len(lines)): line = lines[i] # do the blank/comment match to try to mark more lines # (help the reader find stuff that hasn't been covered) if lines_hit.has_key(i+1): # count precedes the lines that we captured outfile.write('%5d: ' % lines_hit[i+1]) elif blank.match(line): # blank lines and comments are preceded by dots outfile.write(' . ') else: # lines preceded by no marks weren't hit # Highlight them if so indicated, unless the line contains # '#pragma: NO COVER' (it is possible to embed this into # the text as a non-comment; no easy fix) if executable_linenos.has_key(i+1) and \ string.find(lines[i], string.join(['#pragma', 'NO COVER'])) == -1: outfile.write('>>>>>> ') else: outfile.write(' '*7) outfile.write(string.expandtabs(lines[i], 8)) outfile.close() if save_counts: # try and store counts and module info into dirname try: marshal.dump(results.counts, open(os.path.join(dirname, "counts"), "w")) marshal.dump(results.modules, open(os.path.join(dirname, "modules"), "w")) except IOError, err: sys.stderr.write("cannot save counts/modules " \ "files because %s" % err.strerror)
ed1ee6edcef108d19d14203d66a5b954531dd12f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ed1ee6edcef108d19d14203d66a5b954531dd12f/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4717, 67, 1330, 12, 4717, 16, 4283, 273, 4585, 16, 2405, 67, 7337, 273, 404, 16, 1923, 67, 8008, 273, 374, 4672, 1930, 283, 468, 7005, 326, 6880, 501, 7566, 12, 3459, 16, 75...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4717, 67, 1330, 12, 4717, 16, 4283, 273, 4585, 16, 2405, 67, 7337, 273, 404, 16, 1923, 67, 8008, 273, 374, 4672, 1930, 283, 468, 7005, 326, 6880, 501, 7566, 12, 3459, 16, 75...
uid = getUid(req)
def print_records(req, recIDs, jrec=1, rg=10, format='hb', ot='', ln=cdslang, relevances=[], relevances_prologue="(", relevances_epilogue="%%)", decompress=zlib.decompress, search_pattern=''): """Prints list of records 'recIDs' formatted accoding to 'format' in groups of 'rg' starting from 'jrec'. Assumes that the input list 'recIDs' is sorted in reverse order, so it counts records from tail to head. A value of 'rg=-9999' means to print all records: to be used with care. Print also list of RELEVANCES for each record (if defined), in between RELEVANCE_PROLOGUE and RELEVANCE_EPILOGUE. """ # load the right message language _ = gettext_set_language(ln) # get user id (for formatting based on priviledge) uid = getUid(req) # sanity checking: if req is None: return if len(recIDs): nb_found = len(recIDs) if rg == -9999: # print all records rg = nb_found else: rg = abs(rg) if jrec < 1: # sanity checks jrec = 1 if jrec > nb_found: jrec = max(nb_found-rg+1, 1) # will print records from irec_max to irec_min excluded: irec_max = nb_found - jrec irec_min = nb_found - jrec - rg if irec_min < 0: irec_min = -1 if irec_max >= nb_found: irec_max = nb_found - 1 #req.write("%s:%d-%d" % (recIDs, irec_min, irec_max)) if format.startswith('x'): # we are doing XML output: first choose XML envelope: if format.startswith('xm'): format_prologue = websearch_templates.tmpl_xml_marc_prologue() format_epilogue = websearch_templates.tmpl_xml_marc_epilogue() elif format.startswith('xn'): format_prologue = websearch_templates.tmpl_xml_nlm_prologue() format_epilogue = websearch_templates.tmpl_xml_nlm_epilogue() elif format.startswith('xr'): format_prologue = websearch_templates.tmpl_xml_rss_prologue() format_epilogue = websearch_templates.tmpl_xml_rss_epilogue() else: format_prologue = websearch_templates.tmpl_xml_default_prologue() format_epilogue = websearch_templates.tmpl_xml_default_epilogue() # now that XML envelope is chosen, do it: recIDs_to_print = [recIDs[x] for x in range(irec_max, irec_min, -1)] req.write(format_records(recIDs_to_print, format, prologue=format_prologue, epilogue=format_epilogue, ln=ln, search_pattern=search_pattern, uid=uid)) elif format.startswith('t') or str(format[0:3]).isdigit(): # we are doing plain text output: for irec in range(irec_max, irec_min, -1): x = print_record(recIDs[irec], format, ot, ln, search_pattern=search_pattern, uid=uid) req.write(x) if x: req.write('\n') elif format == 'excel': recIDs_to_print = [recIDs[x] for x in range(irec_max, irec_min, -1)] create_excel(recIDs=recIDs_to_print, req=req, ln=ln) else: # we are doing HTML output: if format == 'hp' or format.startswith("hb_") or format.startswith("hd_"): # portfolio and on-the-fly formats: for irec in range(irec_max, irec_min, -1): req.write(print_record(recIDs[irec], format, ot, ln, search_pattern=search_pattern, uid=uid)) elif format.startswith("hb"): # HTML brief format: rows = [] for irec in range(irec_max, irec_min, -1): temp = { 'number' : jrec+irec_max-irec, 'recid' : recIDs[irec], } if relevances and relevances[irec]: temp['relevance'] = relevances[irec] else: temp['relevance'] = '' temp['record'] = print_record(recIDs[irec], format, ot, ln, search_pattern=search_pattern, uid=uid) rows.append(temp) req.write(websearch_templates.tmpl_records_format_htmlbrief( ln = ln, weburl = weburl, rows = rows, relevances_prologue = relevances_prologue, relevances_epilogue = relevances_epilogue, )) else: # HTML detailed format: # print other formatting choices: rows = [] for irec in range(irec_max, irec_min, -1): temp = { 'record' : print_record(recIDs[irec], format, ot, ln, search_pattern=search_pattern, uid=uid), 'recid' : recIDs[irec], 'creationdate': '', 'modifydate' : '', } if record_exists(recIDs[irec])==1: temp['creationdate'] = get_creation_date(recIDs[irec]) temp['modifydate'] = get_modification_date(recIDs[irec]) if CFG_EXPERIMENTAL_FEATURES: r = calculate_cited_by_list(recIDs[irec]) if r: temp ['citinglist'] = r temp ['citationhistory'] = create_citation_history_graph_and_box(recIDs[irec], ln) r = calculate_co_cited_with_list(recIDs[irec]) if r: temp ['cociting'] = r r = calculate_reading_similarity_list(recIDs[irec], "downloads") if r: temp ['downloadsimilarity'] = r temp ['downloadhistory'] = create_download_history_graph_and_box(recIDs[irec], ln) # Get comments and reviews for this record if exist # FIXME: templatize me if CFG_WEBCOMMENT_ALLOW_COMMENTS or CFG_WEBCOMMENT_ALLOW_REVIEWS: from invenio.webcomment import get_first_comments_or_remarks (comments, reviews) = get_first_comments_or_remarks(recID=recIDs[irec], ln=ln, nb_comments=CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW, nb_reviews=CFG_WEBCOMMENT_NB_REVIEWS_IN_DETAILED_VIEW) temp['comments'] = comments temp['reviews'] = reviews r = calculate_reading_similarity_list(recIDs[irec], "pageviews") if r: temp ['viewsimilarity'] = r rows.append(temp) req.write(websearch_templates.tmpl_records_format_other( ln = ln, weburl = weburl, url_argd = req.argd, rows = rows, format = format, )) else: print_warning(req, _("Use different search terms."))
63975e226b845244be6e4f8c476905a42fa797ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/63975e226b845244be6e4f8c476905a42fa797ef/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 7094, 12, 3658, 16, 1950, 5103, 16, 525, 3927, 33, 21, 16, 14524, 33, 2163, 16, 740, 2218, 76, 70, 2187, 15835, 2218, 2187, 7211, 33, 4315, 2069, 539, 16, 6707, 90, 6872, 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, 1172, 67, 7094, 12, 3658, 16, 1950, 5103, 16, 525, 3927, 33, 21, 16, 14524, 33, 2163, 16, 740, 2218, 76, 70, 2187, 15835, 2218, 2187, 7211, 33, 4315, 2069, 539, 16, 6707, 90, 6872, 2...
list_noStrip = [x.strip() for x in str(gg_map_strip_exceptions).split(',')]
list_noStrip = ['weapon_%s' % x.strip() for x in \ str(gg_map_strip_exceptions).split(',')]
def round_start(event_var): # Retrieve a random userid userid = es.getuserid() # ========================================================================= # Disable Buyzones # ========================================================================= es.server.queuecmd('es_xfire %d func_buyzone Disable' %userid) # ========================================================================= # Remove weapons from the map # ========================================================================= list_noStrip = [x.strip() for x in str(gg_map_strip_exceptions).split(',')] if list_noStrip: for weapon in getWeaponList('#all'): # Make sure that the admin doesn't want the weapon left on the map if weapon in list_noStrip: continue # Remove the weapon from the map es.server.queuecmd('es_xfire %d weapon_%s kill' % (userid, weapon)) else: es.server.queuecmd('es_xfire %d weapon_* kill' %userid) # ========================================================================= # Equip players with a knife and possibly item_kevalr or item_assaultsuit # ========================================================================= equipPlayer()
70f8a07eafcd9f850c95d27be6a828b1850bf20c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4555/70f8a07eafcd9f850c95d27be6a828b1850bf20c/gungame51.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3643, 67, 1937, 12, 2575, 67, 1401, 4672, 468, 10708, 279, 2744, 6709, 6709, 273, 5001, 18, 588, 8339, 1435, 225, 468, 422, 16296, 12275, 468, 10639, 605, 9835, 14203, 468, 422, 16296, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3643, 67, 1937, 12, 2575, 67, 1401, 4672, 468, 10708, 279, 2744, 6709, 6709, 273, 5001, 18, 588, 8339, 1435, 225, 468, 422, 16296, 12275, 468, 10639, 605, 9835, 14203, 468, 422, 16296, 1...
if ul > tl or dl > tl or el > tl or tl < (23+ul+dl+el): return 0
if tl < (23+ul+dl+el): return 0
def _sane(self, index, pos): """Sanity check saved index data by reading the last undone trans
6ae3c752ee37a9a22f3f6a46cc54c722d7b143f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/6ae3c752ee37a9a22f3f6a46cc54c722d7b143f2/FileStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 87, 8806, 12, 2890, 16, 770, 16, 949, 4672, 3536, 55, 10417, 866, 5198, 770, 501, 635, 6453, 326, 1142, 640, 8734, 906, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 87, 8806, 12, 2890, 16, 770, 16, 949, 4672, 3536, 55, 10417, 866, 5198, 770, 501, 635, 6453, 326, 1142, 640, 8734, 906, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if fill == 'axis' or fill == True:
if fill == 'axis' or fill is True:
def _plot(funcs, xrange, parametric=False, polar=False, fill=None, label='', randomize=True, **options): if not is_fast_float(funcs): funcs = fast_float(funcs, expect_one_var=True) #parametric_plot will be a list or tuple of two functions (f,g) #and will plotted as (f(x), g(x)) for all x in the given range if parametric: f, g = funcs #or we have only a single function to be plotted: else: f = funcs # xrange has to be either of the form (var, xmin, xmax) or (xmin, xmax) if not isinstance(xrange, (tuple, list)): raise TypeError, "xrange must be a tuple or list" if len(xrange) == 3: xmin, xmax = xrange[1], xrange[2] elif len(xrange) == 2: xmin, xmax = xrange[0], xrange[1] else: raise ValueError, "parametric value range must be a list or tuple of length 2 or 3." #check to see if funcs is a list of functions that will #be all plotted together. if isinstance(funcs, (list, tuple)) and not parametric: rainbow_colors = rainbow(len(funcs)) G = Graphics() for i, h in enumerate(funcs): if isinstance(fill, dict): if i in fill: fill_entry = fill[i] if isinstance(fill_entry, list): if fill_entry[0] < len(funcs): fill_temp = funcs[fill_entry[0]] else: fill_temp = None else: fill_temp = fill_entry else: fill_temp = None else: fill_temp = fill options_temp = options.copy() fillcolor_temp = options_temp.pop('fillcolor', 'automatic') if fillcolor_temp == 'automatic': fillcolor_temp = rainbow_colors[i] G += plot(h, (xmin, xmax), polar = polar, fill = fill_temp, \ fillcolor = fillcolor_temp, **options_temp) return G adaptive_tolerance = options.pop('adaptive_tolerance') adaptive_recursion = options.pop('adaptive_recursion') plot_points = int(options.pop('plot_points')) data = generate_plot_points(f, xrange, plot_points, adaptive_tolerance, adaptive_recursion, randomize) if parametric: data = [(fdata, g(x)) for x, fdata in data] G = Graphics() fillcolor = options.pop('fillcolor', 'automatic') fillalpha = options.pop('fillalpha', 0.5) if fill != None: if parametric: filldata = data else: if fill == 'axis' or fill == True: base_level = 0 elif fill == 'min': base_level = min(t[1] for t in data) elif fill == 'max': base_level = max(t[1] for t in data) elif hasattr(fill, '__call__'): if fill == max or fill == min: if fill == max: fstr = 'max' else: fstr = 'min' msg = "WARNING: You use the built-in function %s for filling. You probably wanted the string '%s'." % (fstr, fstr) sage.misc.misc.verbose(msg, level=0) if not is_fast_float(fill): fill_f = fast_float(fill, expect_one_var=True) else: fill_f = fill filldata = generate_plot_points(fill_f, xrange, plot_points, adaptive_tolerance, \ adaptive_recursion, randomize) filldata.reverse() filldata += data else: try: base_level = float(fill) except TypeError: base_level = 0 if not hasattr(fill, '__call__') and polar: filldata = generate_plot_points(lambda x: base_level, xrange, plot_points, adaptive_tolerance, \ adaptive_recursion, randomize) filldata.reverse() filldata += data if not hasattr(fill, '__call__') and not polar: filldata = [(data[0][0], base_level)] + data + [(data[-1][0], base_level)] if fillcolor == 'automatic': fillcolor = (0.5, 0.5, 0.5) fill_options = {} fill_options['rgbcolor'] = fillcolor fill_options['alpha'] = fillalpha fill_options['thickness'] = 0 if polar: filldata = [(y*cos(x), y*sin(x)) for x, y in filldata] G += polygon(filldata, **fill_options) if polar: data = [(y*cos(x), y*sin(x)) for x, y in data] from sage.plot.all import line, text G += line(data, **options) # Label? if label: label = ' '+str(label) G += text(label, data[-1], horizontal_alignment='left', vertical_alignment='center') return G
53bc30b3387bfc0f18049d2b64fd1492c7912453 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/53bc30b3387bfc0f18049d2b64fd1492c7912453/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4032, 12, 17728, 16, 12314, 16, 579, 1591, 33, 8381, 16, 24244, 33, 8381, 16, 3636, 33, 7036, 16, 1433, 2218, 2187, 2744, 554, 33, 5510, 16, 2826, 2116, 4672, 309, 486, 353, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4032, 12, 17728, 16, 12314, 16, 579, 1591, 33, 8381, 16, 24244, 33, 8381, 16, 3636, 33, 7036, 16, 1433, 2218, 2187, 2744, 554, 33, 5510, 16, 2826, 2116, 4672, 309, 486, 353, 67, ...
print 'SUITE END: %s %s' % (attrs['status'], attrs['message'])
print 'SUITE END: %s %s' % (attrs['status'], attrs['statistics'])
def end_suite(self, name, attrs): print 'SUITE END: %s %s' % (attrs['status'], attrs['message'])
8e57dac4f6a8126e657e4b549e14c42666e1dd45 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6988/8e57dac4f6a8126e657e4b549e14c42666e1dd45/test_listeners.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 67, 30676, 12, 2890, 16, 508, 16, 3422, 4672, 1172, 296, 6639, 5398, 7273, 30, 738, 87, 738, 87, 11, 738, 261, 7039, 3292, 2327, 17337, 3422, 3292, 2150, 19486, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 67, 30676, 12, 2890, 16, 508, 16, 3422, 4672, 1172, 296, 6639, 5398, 7273, 30, 738, 87, 738, 87, 11, 738, 261, 7039, 3292, 2327, 17337, 3422, 3292, 2150, 19486, 2, -100, -100, -10...
assert exc.msg == "EOF while scanning triple-quoted string"
assert exc.msg == "EOF while scanning triple-quoted string literal"
def test_syntax_error(self): parse = self.parse exc = py.test.raises(SyntaxError, parse, "name another for").value assert exc.msg == "invalid syntax" assert exc.lineno == 1 assert exc.offset == 5 assert exc.text.startswith("name another for") exc = py.test.raises(SyntaxError, parse, "\"blah").value assert exc.msg == "EOL while scanning single-quoted string" exc = py.test.raises(SyntaxError, parse, "'''\n").value assert exc.msg == "EOF while scanning triple-quoted string" for input in ("())", "(()", "((", "))"): py.test.raises(SyntaxError, parse, input)
e80a51ba261fc1a92a5e47f37fd830c5b926338c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/e80a51ba261fc1a92a5e47f37fd830c5b926338c/test_pyparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 14308, 67, 1636, 12, 2890, 4672, 1109, 273, 365, 18, 2670, 3533, 273, 2395, 18, 3813, 18, 354, 6141, 12, 22510, 16, 1109, 16, 315, 529, 4042, 364, 20387, 1132, 1815, 3533, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 14308, 67, 1636, 12, 2890, 4672, 1109, 273, 365, 18, 2670, 3533, 273, 2395, 18, 3813, 18, 354, 6141, 12, 22510, 16, 1109, 16, 315, 529, 4042, 364, 20387, 1132, 1815, 3533, 18...
errormessage = _(u"File has not correct format.") if not subscriberdata: return errormessage
if subscriberdata is None: return _(u"File was not given.")
def _addItem(self, data): """add item and return message
14fa936a04a33d6cf73063d205bf79238a87a0c4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9843/14fa936a04a33d6cf73063d205bf79238a87a0c4/channel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 1180, 12, 2890, 16, 501, 4672, 3536, 1289, 761, 471, 327, 883, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 1180, 12, 2890, 16, 501, 4672, 3536, 1289, 761, 471, 327, 883, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
print " No new %02d row: 0x00" % y
def merge_glyph(self, other, atX, atY): # Calculate the new metrics new_bbX = min(self.bbX, atX + other.bbX) new_bbY = min(self.bbY, atY + other.bbY) new_bbW = max(self.bbX + self.bbW, atX + other.bbX + other.bbW) - new_bbX new_bbH = max(self.bbY + self.bbH, atY + other.bbY + other.bbH) - new_bbY new_advance = max(self.advance, atX + other.advance)
2dc80576976d5e6c20eb3313e7e1a94d8da10cbb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5104/2dc80576976d5e6c20eb3313e7e1a94d8da10cbb/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 67, 19426, 12, 2890, 16, 1308, 16, 622, 60, 16, 622, 61, 4672, 468, 9029, 326, 394, 4309, 394, 67, 9897, 60, 273, 1131, 12, 2890, 18, 9897, 60, 16, 622, 60, 397, 1308, 18, 98...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 67, 19426, 12, 2890, 16, 1308, 16, 622, 60, 16, 622, 61, 4672, 468, 9029, 326, 394, 4309, 394, 67, 9897, 60, 273, 1131, 12, 2890, 18, 9897, 60, 16, 622, 60, 397, 1308, 18, 98...
s.update(model[row][1])
s |= model[row][1].songs if sort: return sorted(s, key=operator.attrgetter("sort_key"))
def __get_songs(self): model, rows = self.get_selection().get_selected_rows() s = set() if rows and rows[0] == (0,): for row in model: if row[1]: s.update(row[1]) else: for row in rows: s.update(model[row][1]) return s
65c353a2f58dd189cd3918d5836dbf8ca05e5f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4764/65c353a2f58dd189cd3918d5836dbf8ca05e5f5f/paned.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 816, 564, 12, 2890, 4672, 938, 16, 2595, 273, 365, 18, 588, 67, 10705, 7675, 588, 67, 8109, 67, 3870, 1435, 272, 273, 444, 1435, 309, 2595, 471, 2595, 63, 20, 65, 422,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 816, 564, 12, 2890, 4672, 938, 16, 2595, 273, 365, 18, 588, 67, 10705, 7675, 588, 67, 8109, 67, 3870, 1435, 272, 273, 444, 1435, 309, 2595, 471, 2595, 63, 20, 65, 422,...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 309) else quickfix.StringField.__init__(self, 309, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 5196, 29, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, 97...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 5196, 29, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, 97...
self.myException = ParseException("",0,self.errmsg,self)
def __init__( self, expr ): super(NotAny,self).__init__(expr) #~ self.leaveWhitespace() self.skipWhitespace = False # do NOT use self.leaveWhitespace(), don't want to propagate to exprs self.mayReturnEmpty = True self.errmsg = "Found unwanted token, "+_ustr(self.expr) self.myException = ParseException("",0,self.errmsg,self)
ae3f3e7a55d584a1b43fc3b7c7b375f3a27e073e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12364/ae3f3e7a55d584a1b43fc3b7c7b375f3a27e073e/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 3065, 262, 30, 2240, 12, 1248, 2961, 16, 2890, 2934, 972, 2738, 972, 12, 8638, 13, 468, 98, 365, 18, 19574, 9431, 1435, 365, 18, 7457, 9431, 273, 1083, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 3065, 262, 30, 2240, 12, 1248, 2961, 16, 2890, 2934, 972, 2738, 972, 12, 8638, 13, 468, 98, 365, 18, 19574, 9431, 1435, 365, 18, 7457, 9431, 273, 1083, ...
for rel_id in data[f]: d,t = rel.copy_data(cr, uid, rel_id, context=context) res.append((0, 0, d)) trans_data += t
if data[f] != False: for rel_id in data[f]: d,t = rel.copy_data(cr, uid, rel_id, context=context) res.append((0, 0, d)) trans_data += t
def copy_data(self, cr, uid, id, default=None, context=None): if not context: context = {} if not default: default = {} if 'state' not in default: if 'state' in self._defaults: default['state'] = self._defaults['state'](self, cr, uid, context) data = self.read(cr, uid, [id], context=context)[0] fields = self.fields_get(cr, uid) trans_data=[] for f in fields: ftype = fields[f]['type']
346dea94b0066be747382d32d542b0b379fd2702 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/346dea94b0066be747382d32d542b0b379fd2702/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 892, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 805, 33, 7036, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 273, 2618, 309, 486, 805, 30, 805, 273, 2618, 309, 296, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 892, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 805, 33, 7036, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 273, 2618, 309, 486, 805, 30, 805, 273, 2618, 309, 296, 20...
if job.jobStatus == 'failed':
if job.jobStatus in ['failed', 'killed']:
def master_resubmit(self,jobs): '''Resubmit failed subjobs''' from pandatools import Client
1216645b706808f691417b714dd0ce7b4cebf565 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/1216645b706808f691417b714dd0ce7b4cebf565/Panda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4171, 67, 455, 373, 1938, 12, 2890, 16, 10088, 4672, 9163, 607, 373, 1938, 2535, 720, 10088, 26418, 628, 293, 464, 270, 8192, 1930, 2445, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4171, 67, 455, 373, 1938, 12, 2890, 16, 10088, 4672, 9163, 607, 373, 1938, 2535, 720, 10088, 26418, 628, 293, 464, 270, 8192, 1930, 2445, 2, -100, -100, -100, -100, -100, -100, -100, -10...
func -- a Python function or method to integrate.
func -- a Python function or method to integrate (must accept vector inputs)
def fixed_quad(func,a,b,args=(),n=5): """Compute a definite integral using fixed-order Gaussian quadrature. Description: Integrate func from a to b using Gaussian quadrature of order n. Inputs: func -- a Python function or method to integrate. a -- lower limit of integration b -- upper limit of integration args -- extra arguments to pass to function. n -- order of quadrature integration. Outputs: (val, None) val -- Gaussian quadrature approximation to the integral. """ [x,w] = p_roots(n) ainf, binf = map(scipy.isinf,(a,b)) if ainf or binf: raise ValueError, "Gaussian quadrature is only available for finite limits." y = (b-a)*(x+1)/2.0 + a return (b-a)/2.0*sum(w*func(y,*args)), None
a6b1098d53872ca1a4cb2f81a6740b8c20e9efbd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/a6b1098d53872ca1a4cb2f81a6740b8c20e9efbd/quadrature.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5499, 67, 21733, 12, 644, 16, 69, 16, 70, 16, 1968, 33, 9334, 82, 33, 25, 4672, 3536, 7018, 279, 2217, 1137, 21423, 1450, 5499, 17, 1019, 23079, 9474, 86, 1231, 18, 225, 6507, 30, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5499, 67, 21733, 12, 644, 16, 69, 16, 70, 16, 1968, 33, 9334, 82, 33, 25, 4672, 3536, 7018, 279, 2217, 1137, 21423, 1450, 5499, 17, 1019, 23079, 9474, 86, 1231, 18, 225, 6507, 30, 22...
return self.CALL_FUNCTION(argc)+2
return self.CALL_FUNCTION(argc)-2
def CALL_FUNCTION_VAR_KW(self, argc): return self.CALL_FUNCTION(argc)+2
138d90eb73415e48a0e7f09a7c9603b1164bcaed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/138d90eb73415e48a0e7f09a7c9603b1164bcaed/pyassem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22753, 67, 7788, 67, 7716, 67, 30134, 12, 2890, 16, 1501, 71, 4672, 327, 365, 18, 13730, 67, 7788, 12, 3175, 71, 27921, 22, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22753, 67, 7788, 67, 7716, 67, 30134, 12, 2890, 16, 1501, 71, 4672, 327, 365, 18, 13730, 67, 7788, 12, 3175, 71, 27921, 22, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if bossJob.runningJob['processStatus'] != 'not_handled' : logging.error( "Invalid processStatus for job %s.%s" % \ (bossJob['taskId'], bossJob['jobId']))
if bossJob.runningJob['processStatus'] != 'created' : logging.error( "Invalid processStatus for job %s.%s.%s : %s" % \ (bossJob['taskId'], bossJob['jobId'], \ bossJob.runningJob['submission'], \ bossJob.runningJob['processStatus']) )
def prepareResubmission(self, bossJob): """ __prepareResubmission__
18d85c6fb3b3ed57393e7432b8124ee7212fca3b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/18d85c6fb3b3ed57393e7432b8124ee7212fca3b/BossLiteBulkInterface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 607, 373, 3951, 12, 2890, 16, 324, 8464, 2278, 4672, 3536, 1001, 9366, 607, 373, 3951, 972, 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, 2911, 607, 373, 3951, 12, 2890, 16, 324, 8464, 2278, 4672, 3536, 1001, 9366, 607, 373, 3951, 972, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
t1 = os.stat(stampfile)[stat.ST_MTIME]
t1 = get_timestamp(stampfile)
def check_stamp_task(self, task, taskname = None):
787c1cf81195e97dda5fdab3a0a5d8bda97f6770 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/787c1cf81195e97dda5fdab3a0a5d8bda97f6770/runqueue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 14317, 67, 4146, 12, 2890, 16, 1562, 16, 1562, 529, 273, 599, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 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, 866, 67, 14317, 67, 4146, 12, 2890, 16, 1562, 16, 1562, 529, 273, 599, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for d in get_dummy_programs(p.stop, stop):
for d in get_dummy_programs(self.info['id'], p.stop, stop):
def import_programs(self, start, stop=-1): """ Get programs from the database to create ProgramItems from then add them to our local list. If there are gaps between the programs we will add dummy programs to fill it (TODO). """ new_progs = [] dummy_progs = []
56e0254e77a9d2df5b79271fa084df08db9c2a36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/56e0254e77a9d2df5b79271fa084df08db9c2a36/channels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 12890, 87, 12, 2890, 16, 787, 16, 2132, 29711, 21, 4672, 3536, 968, 25038, 628, 326, 2063, 358, 752, 13586, 3126, 628, 1508, 527, 2182, 358, 3134, 1191, 666, 18, 225, 971, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 12890, 87, 12, 2890, 16, 787, 16, 2132, 29711, 21, 4672, 3536, 968, 25038, 628, 326, 2063, 358, 752, 13586, 3126, 628, 1508, 527, 2182, 358, 3134, 1191, 666, 18, 225, 971, 19...
pass
""" <<Peer-side>> Received a CRAWLER_VIDEOPLAYBACK_INFO_QUERY request. @param permid The Crawler permid @param selversion The overlay protocol version @param channel_id Identifies a CRAWLER_REQUEST/CRAWLER_REPLY pair @param message The message payload @param reply_callback Call this function once to send the reply: reply_callback(payload [, error=123]) """ if DEBUG: print >> sys.stderr, "videoplaybackcrawler: handle_info_crawler_request", show_permid_short(permid), message try: cursor = self._event_db._db.execute_read(message) except Exception, e: reply_callback(str(e), error=1) else: if cursor: reply_callback(zlib.compress(cPickle.dumps(list(cursor), 2), 9)) else: reply_callback("error", error=2)
def handle_info_crawler_request(self, permid, selversion, channel_id, message, reply_callback): pass
fcfc0f96a502a5a799dcfc8fe67410b3da8ee259 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9686/fcfc0f96a502a5a799dcfc8fe67410b3da8ee259/VideoPlaybackCrawler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1376, 67, 71, 10644, 67, 2293, 12, 2890, 16, 4641, 350, 16, 357, 1589, 16, 1904, 67, 350, 16, 883, 16, 4332, 67, 3394, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 1640, 67, 1376, 67, 71, 10644, 67, 2293, 12, 2890, 16, 4641, 350, 16, 357, 1589, 16, 1904, 67, 350, 16, 883, 16, 4332, 67, 3394, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -1...
if log.startswith('intel_'+path+'_test') : inteltestlog=log.split('|');
def logExample(path) : global logDir,logs; intellibrarylog=[] gnulibrarylog=[] intelexamplelog=[] gnuexamplelog=[] inteltestlog=[] gnutestlog=[] for log in logs : if log.startswith('intel_library_build') : intellibrarylog=log.split('|'); if log.startswith('gnu_library_build') : gnulibrarylog=log.split('|'); if log.startswith('intel_'+path+'_build') : intelexamplelog=log.split('|'); if log.startswith('gnu_'+path+'_build') : gnuexamplelog=log.split('|'); if log.startswith('intel_'+path+'_test') : inteltestlog=log.split('|'); if log.startswith('gnu_'+path+'_test') : gnutestlog=log.split('|'); newDir = logDir; for folder in path.split('/') : newDir = newDir + '/' + folder if not os.path.isdir(newDir): os.mkdir(newDir) os.chdir(logDir+"/"+path) if os.path.exists(newDir + "/history.html") : os.remove(newDir + "/history.html") f = open(newDir + "/history.html","w") f.write("<h2>Testing Status:</h2>\n") f.write("<table><tr><td/><td>Status</td><td>Latest Execution Time</td></tr>\n") f.write("<tr><td><b>Intel Build</b></td><td/><td/></tr>") f.write("<tr><td><a href='"+rootUrl+"logs_x86_64-linux/build-intel'>OpenCMISS Library</a></td>") if(intellibrarylog[1].startswith('success')) : f.write("<td><font color='green'>Success</font></td>") else : f.write("<td><font color='red'>Fail</font></td>") f.write("<td>"+intellibrarylog[2]+"</td></tr>") f.write("<tr><td><a href='"+rootUrl+"logs_x86_64-linux/"+path+"/build-intel'>Example Build</a></td>") if(intelexamplelog[1].startswith('success')) : f.write("<td><font color='green'>Success</font></td>") else : f.write("<td><font color='red'>Fail</font></td>") f.write("<td>"+intelexamplelog[2]+"</td></tr>") if(len(inteltestlog)>1) : f.write("<tr><td><a href='"+rootUrl+"logs_x86_64-linux/"+path+"/test1-intel'>Example Test</a></td>") if(inteltestlog[1].startswith('success')) : f.write("<td><font color='green'>Success</font></td>") else : f.write("<td><font color='red'>Fail</font></td>") f.write("<td>"+inteltestlog[2]+"</td></tr>") f.write("<tr><td><b>GNU Build</b></td><td/><td/></tr>") f.write("<tr><td><a href='"+rootUrl+"logs_x86_64-linux/build-gnu'>OpenCMISS Library</a></td>") if(gnulibrarylog[1].startswith('success')) : f.write("<td><font color='green'>Success</font></td>") else : f.write("<td><font color='red'>Fail</font></td>") f.write("<td>"+gnulibrarylog[2]+"</td></tr>") f.write("<tr><td><a href='"+rootUrl+"logs_x86_64-linux/"+path+"/build-gnu'>Example Build</a></td>") if(gnuexamplelog[1].startswith('success')) : f.write("<td><font color='green'>Success</font></td>") else : f.write("<td><font color='red'>Fail</font></td>") f.write("<td>"+gnuexamplelog[2]+"</td></tr>") if(len(gnutestlog)>1) : f.write("<tr><td><a href='"+rootUrl+"logs_x86_64-linux/"+path+"/test1-gnu'>Example Test</a></td>") if(gnutestlog[1].startswith('success')) : f.write("<td><font color='green'>Success</font></td>") else : f.write("<td><font color='red'>Fail</font></td>") f.write("<td>"+gnutestlog[2]+"</td></tr>") f.write("</table>") f.close() return;
18b5abe27f23a6110ba10b3a1a245eaec911dc4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1766/18b5abe27f23a6110ba10b3a1a245eaec911dc4a/examplesLogger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 10908, 12, 803, 13, 294, 2552, 31101, 16, 10011, 31, 509, 1165, 495, 3345, 1330, 33, 8526, 22908, 332, 495, 3345, 1330, 33, 8526, 509, 292, 338, 2475, 12970, 33, 8526, 314, 13053, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 10908, 12, 803, 13, 294, 2552, 31101, 16, 10011, 31, 509, 1165, 495, 3345, 1330, 33, 8526, 22908, 332, 495, 3345, 1330, 33, 8526, 509, 292, 338, 2475, 12970, 33, 8526, 314, 13053, ...
if not f['channel']: return 3, None
def add_feed(feed_xml): """Try to add a feed. Return values: tuple (status, feed_uid) -1: unknown error 0: feed added normally 1: feed added via autodiscovery 2: feed not added, already present 3: feed not added, connection or parse error""" from singleton import db c = db.cursor() try: f = feedparser.parse(feed_xml) normalize.normalize_feed(f) if not f['channel']: return 3, None feed = { 'xmlUrl': f['url'], 'htmlUrl': str(f['channel']['link']), 'etag': f['etag'], 'title': f['channel']['title'].encode('ascii', 'xmlcharrefreplace'), 'desc': f['channel']['description'].encode('ascii', 'xmlcharrefreplace') } for key, value in feed.items(): if type(value) == str: feed[key] = escape(value) try: c.execute("""insert into fm_feeds (feed_xml, feed_etag, feed_html, feed_title, feed_desc) values ('%(xmlUrl)s', '%(etag)s', '%(htmlUrl)s', '%(title)s', '%(desc)s')""" % feed) feed_uid = db.sqlite_last_insert_rowid() process_parsed_feed(f, c, feed_uid) db.commit() return 0, feed_uid except sqlite.IntegrityError, e: if 'feed_xml' not in str(e): return -1, None else: # duplicate attempt return 2, None finally: c.close()
9e8664b8d68275cee71596c2edbf5d87997ebb5a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10695/9e8664b8d68275cee71596c2edbf5d87997ebb5a/update.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 7848, 12, 7848, 67, 2902, 4672, 3536, 7833, 358, 527, 279, 4746, 18, 2000, 924, 30, 3193, 261, 2327, 16, 4746, 67, 1911, 13, 300, 21, 30, 5917, 555, 374, 30, 4746, 3096, 158...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7848, 12, 7848, 67, 2902, 4672, 3536, 7833, 358, 527, 279, 4746, 18, 2000, 924, 30, 3193, 261, 2327, 16, 4746, 67, 1911, 13, 300, 21, 30, 5917, 555, 374, 30, 4746, 3096, 158...
RESPONSE.redirect(URL1 + '/manage_catalogIndexes?manage_tabs_message=Index%20Added') def manage_delIndexes(self, names, REQUEST, RESPONSE, URL1):
if REQUEST and RESPONSE: RESPONSE.redirect(URL1 + '/manage_catalogIndexes?manage_tabs_message=Index%20Added') def manage_delIndexes(self, names, REQUEST=None, RESPONSE=None, URL1=None):
def manage_addIndex(self, name, type, REQUEST, RESPONSE, URL1): """ add an index """ self._catalog.addIndex(name, type) RESPONSE.redirect(URL1 + '/manage_catalogIndexes?manage_tabs_message=Index%20Added')
a0dd2ff1ca43d98e5c547cbaefb673dba797e468 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a0dd2ff1ca43d98e5c547cbaefb673dba797e468/ZCatalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 1289, 1016, 12, 2890, 16, 508, 16, 618, 16, 12492, 16, 20645, 16, 1976, 21, 4672, 3536, 527, 392, 770, 3536, 365, 6315, 7199, 18, 1289, 1016, 12, 529, 16, 618, 13, 225, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 1289, 1016, 12, 2890, 16, 508, 16, 618, 16, 12492, 16, 20645, 16, 1976, 21, 4672, 3536, 527, 392, 770, 3536, 365, 6315, 7199, 18, 1289, 1016, 12, 529, 16, 618, 13, 225, 20...
return self.pic_flags + ['+ppu']
return self.pic_flags + ['+ppu', '+DD64']
def get_flags(self): return self.pic_flags + ['+ppu']
56d156240e0d7d65c443c01fff931aaa27b3cca4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14925/56d156240e0d7d65c443c01fff931aaa27b3cca4/hpux.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7133, 12, 2890, 4672, 327, 365, 18, 20003, 67, 7133, 397, 10228, 15, 11858, 89, 3546, 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, 336, 67, 7133, 12, 2890, 4672, 327, 365, 18, 20003, 67, 7133, 397, 10228, 15, 11858, 89, 3546, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def read(self,size=None):
def read(self, size=None):
def read(self,size=None): if self.extrasize <= 0 and self.fileobj is None: return ''
ebf2a48cdabef266e88e0e585bbc9f93e7887de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/ebf2a48cdabef266e88e0e585bbc9f93e7887de3/gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 33, 7036, 4672, 309, 365, 18, 23687, 554, 1648, 374, 471, 365, 18, 768, 2603, 353, 599, 30, 327, 875, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 855, 12, 2890, 16, 963, 33, 7036, 4672, 309, 365, 18, 23687, 554, 1648, 374, 471, 365, 18, 768, 2603, 353, 599, 30, 327, 875, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.with_spaces('"%s" "%s"' % (self.fname, "ab cd"), shell=1)
self.with_spaces('"%s" "%s" "%s"' % (sys.executable, self.fname, "ab cd"), shell=1)
def test_shell_string_with_spaces(self): # call() function with string argument with spaces on Windows self.with_spaces('"%s" "%s"' % (self.fname, "ab cd"), shell=1)
d835cf1c84f2b29d54f583139e03b95b906b6081 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/d835cf1c84f2b29d54f583139e03b95b906b6081/test_subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 10304, 67, 1080, 67, 1918, 67, 9554, 12, 2890, 4672, 468, 745, 1435, 445, 598, 533, 1237, 598, 7292, 603, 8202, 365, 18, 1918, 67, 9554, 22076, 9, 87, 6, 2213, 87, 5187, 73...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 67, 10304, 67, 1080, 67, 1918, 67, 9554, 12, 2890, 4672, 468, 745, 1435, 445, 598, 533, 1237, 598, 7292, 603, 8202, 365, 18, 1918, 67, 9554, 22076, 9, 87, 6, 2213, 87, 5187, 73...
utils.logger.info( 'non recursive query has not been optimized ( hint: query does not contain type and/or name )' )
utils.logger.debug( 'non recursive query has not been optimized ( hint: query does not contain type and/or name )' )
def __findout_range( self, name, decl_type, recursive ): if not self._optimized: utils.logger.info( 'running non optimized query - optimization has not been done' ) decls = self.declarations if recursive: decls = algorithm.make_flatten( self.declarations ) return decls
420149f2642ab48ea7ca588594f35e1e04160a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7398/420149f2642ab48ea7ca588594f35e1e04160a38/scopedef.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4720, 659, 67, 3676, 12, 365, 16, 508, 16, 3496, 67, 723, 16, 5904, 262, 30, 309, 486, 365, 6315, 16689, 1235, 30, 2990, 18, 4901, 18, 1376, 12, 296, 8704, 1661, 15411, 843, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4720, 659, 67, 3676, 12, 365, 16, 508, 16, 3496, 67, 723, 16, 5904, 262, 30, 309, 486, 365, 6315, 16689, 1235, 30, 2990, 18, 4901, 18, 1376, 12, 296, 8704, 1661, 15411, 843, 30...
df = float((event1.central_freq + 0.5*event1.bandwidth - event2.central_freq - 0.5*event2.bandwidth)/(event1.central_freq + 0.5*event1.bandwidth + event2.central_freq + 0.5*event2.bandwidth))
f_cut1 = event1.central_freq + event1.bandwidth / 2 f_cut2 = event2.central_freq + event2.bandwidth / 2 df = float((f_cut1 - f_cut2) / (f_cut1 + f_cut2))
def coinc_params_func(events, offsetvector): # # check for coincs that have been vetoed entirely # if len(events) < 2: return None params = {} # # zero-instrument parameters # params["nevents"] = (len(events),) # # one-instrument parameters # for event in events: prefix = "%s_" % event.ifo params["%ssnr2_chi2" % prefix] = (event.snr**2.0, event.chisq / event.chisq_dof) # # two-instrument parameters # for event1, event2 in iterutils.choices(sorted(events, key = lambda event: event.ifo), 2): assert event1.ifo != event2.ifo prefix = "%s_%s_" % (event1.ifo, event2.ifo) dt = float((event1.get_peak() + offsetvector[event1.ifo]) - (event2.get_peak() + offsetvector[event2.ifo])) params["%sdt" % prefix] = (dt,) dA = math.log10(abs(event1.amplitude / event2.amplitude)) params["%sdA" % prefix] = (dA,) df = float((event1.central_freq + 0.5*event1.bandwidth - event2.central_freq - 0.5*event2.bandwidth)/(event1.central_freq + 0.5*event1.bandwidth + event2.central_freq + 0.5*event2.bandwidth)) params["%sdf" % prefix] = (df,) # # done # return params
25a3dc1b78a704666ce9f482a744565f842bfa06 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/25a3dc1b78a704666ce9f482a744565f842bfa06/stringutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13170, 71, 67, 2010, 67, 644, 12, 5989, 16, 1384, 7737, 4672, 468, 468, 866, 364, 13170, 2143, 716, 1240, 2118, 331, 11453, 329, 21658, 468, 225, 309, 562, 12, 5989, 13, 411, 576, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13170, 71, 67, 2010, 67, 644, 12, 5989, 16, 1384, 7737, 4672, 468, 468, 866, 364, 13170, 2143, 716, 1240, 2118, 331, 11453, 329, 21658, 468, 225, 309, 562, 12, 5989, 13, 411, 576, 30, ...
def dodeleteall( self, deletes ):
def dodeleteall( self, deletes, label = "" ):
def dodeleteall( self, deletes ): if len(deletes) == 0: return True for deleter in deletes: req = request(self.manager) req.method = "DELETE" req.ruris.append(deleter[0]) req.ruri = deleter[0] if len(deleter[1]): req.user = deleter[1] if len(deleter[2]): req.pswd = deleter[2] self.dorequest( req, False, False )
1e6bbaa51c1fe6e02709841f4dd5e13a91bd8caa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/129/1e6bbaa51c1fe6e02709841f4dd5e13a91bd8caa/caldavtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 302, 369, 929, 454, 12, 365, 16, 9792, 16, 1433, 273, 1408, 262, 30, 309, 562, 12, 72, 5092, 13, 422, 374, 30, 327, 1053, 364, 6578, 264, 316, 9792, 30, 1111, 273, 590, 12, 2890, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 302, 369, 929, 454, 12, 365, 16, 9792, 16, 1433, 273, 1408, 262, 30, 309, 562, 12, 72, 5092, 13, 422, 374, 30, 327, 1053, 364, 6578, 264, 316, 9792, 30, 1111, 273, 590, 12, 2890, 1...
outfile.write(" ")
outfile.write(" ")
def write_results_file(self, path, lines, lnotab, lines_hit): """Return a coverage results file in path."""
8238d1c121b27c65496d93d95e0d7dca21108a30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/8238d1c121b27c65496d93d95e0d7dca21108a30/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 4717, 67, 768, 12, 2890, 16, 589, 16, 2362, 16, 328, 902, 378, 16, 2362, 67, 15989, 4672, 3536, 990, 279, 11196, 1686, 585, 316, 589, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 4717, 67, 768, 12, 2890, 16, 589, 16, 2362, 16, 328, 902, 378, 16, 2362, 67, 15989, 4672, 3536, 990, 279, 11196, 1686, 585, 316, 589, 12123, 2, -100, -100, -100, -100, -100, ...
self.SHAKE.waiting_for_ack = True self.SHAKE.lastaddr = -1 self.SHAKE.write_to_port(svp)
self.waiting_for_ack = True self.lastaddr = -1 self.write_to_port(svp)
def upload_vib_sample_extended(self, profile, samples, mode, freq, duty): if profile < 0 or profile > SHAKE_VIB_PROFILE_MAX: return SHAKE_ERROR
3fa1cac4ae66d72fc1e2a236b07931563054db57 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4761/3fa1cac4ae66d72fc1e2a236b07931563054db57/pyshake.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 90, 495, 67, 6358, 67, 14948, 12, 2890, 16, 3042, 16, 5216, 16, 1965, 16, 7684, 16, 302, 21348, 4672, 309, 3042, 411, 374, 578, 3042, 405, 9777, 6859, 67, 4136, 38, 67, 224...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 90, 495, 67, 6358, 67, 14948, 12, 2890, 16, 3042, 16, 5216, 16, 1965, 16, 7684, 16, 302, 21348, 4672, 309, 3042, 411, 374, 578, 3042, 405, 9777, 6859, 67, 4136, 38, 67, 224...
try: return rawval % d except KeyError, key: raise InterpolationError(key, option, section, rawval)
value = rawval while 1: if not string.find(value, "%("): try: value = value % d except KeyError, key: raise InterpolationError(key, option, section, rawval) else: return value
def get(self, section, option, raw=0): """Get an option value for a given section.
e6506e753bd3c1fc5c32271d30db46fb41f8486f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e6506e753bd3c1fc5c32271d30db46fb41f8486f/ConfigParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 2442, 16, 1456, 16, 1831, 33, 20, 4672, 3536, 967, 392, 1456, 460, 364, 279, 864, 2442, 18, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 2442, 16, 1456, 16, 1831, 33, 20, 4672, 3536, 967, 392, 1456, 460, 364, 279, 864, 2442, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if ((not only_scope.startswith(full_path)) and (not full_path.startswith(only_scope))) :
if not ((only_scope == full_path) or (only_scope.startswith(full_path + ".")) or (full_path.startswith(only_scope + "."))) :
def delete_phil_objects (current_phil, phil_path_list, only_scope=None) : i = 0 while i < len(current_phil.objects) : full_path = current_phil.objects[i].full_path() if (only_scope is not None) : if ((not only_scope.startswith(full_path)) and (not full_path.startswith(only_scope))) : i += 1 continue if current_phil.objects[i].is_template != 0 : i += 1 elif full_path in phil_path_list : del current_phil.objects[i] else : # XXX: is this always true? if hasattr(current_phil.objects[i], "objects") : for path_name in phil_path_list : if path_name.startswith(full_path) : delete_phil_objects(current_phil=current_phil.objects[i], phil_path_list=phil_path_list, only_scope=only_scope) i += 1
149ead33a5a7996e7726d9907942e0447e7a002c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/149ead33a5a7996e7726d9907942e0447e7a002c/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 844, 330, 67, 6911, 261, 2972, 67, 844, 330, 16, 1844, 330, 67, 803, 67, 1098, 16, 1338, 67, 4887, 33, 7036, 13, 294, 277, 273, 374, 1323, 277, 411, 562, 12, 2972, 67, 84...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 844, 330, 67, 6911, 261, 2972, 67, 844, 330, 16, 1844, 330, 67, 803, 67, 1098, 16, 1338, 67, 4887, 33, 7036, 13, 294, 277, 273, 374, 1323, 277, 411, 562, 12, 2972, 67, 84...