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
if var == fld or (var == True and fld) or (fld == True and var):
if var == fld:
def tmpl_is_selected(self, var, fld): """ Checks if *var* and *fld* are equal, and if yes, returns ' selected'. Useful for select boxes.
5f8564ebe54d9e533f3a69dd2ac1e3acfe41fdf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/5f8564ebe54d9e533f3a69dd2ac1e3acfe41fdf3/websearch_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 291, 67, 8109, 12, 2890, 16, 569, 16, 9880, 4672, 3536, 13074, 309, 380, 1401, 14, 471, 380, 19794, 14, 854, 3959, 16, 471, 309, 12465, 16, 1135, 296, 3170, 10332, 225, 1925...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10720, 67, 291, 67, 8109, 12, 2890, 16, 569, 16, 9880, 4672, 3536, 13074, 309, 380, 1401, 14, 471, 380, 19794, 14, 854, 3959, 16, 471, 309, 12465, 16, 1135, 296, 3170, 10332, 225, 1925...
condition.add(address, size)
condition.add(address, size, action)
def watch_buffer(self, pid, address, size, action = None): """ Sets a page breakpoint and notifies when the given buffer is accessed. @see: L{dont_watch_variable} @type pid: int @param pid: Process global ID. @type address: int @param address: Memory address of buffer to watch. @type size: int @param size: Size in bytes of buffer to watch. @type action: function @param action: (Optional) Action callback function. See L{define_page_breakpoint} for more details. """ # Check the size isn't negative. if size < 1: raise ValueError, "Bad size for buffer watch: %r" % size # Get the base address and size in pages required for this buffer. base = PageBreakpoint.align_address_start(address) pages = PageBreakpoint.get_buffer_size_in_pages(address, size) # Do we already have a page breakpoint there? if self.has_page_breakpoint(pid, base): # Get the breakpoint. bp = self._BreakpointContainer__get_page_bp(pid, address) # Get the breakpoint's condition. condition = bp.get_condition() # If it's not a BufferWatch or compatible, raise an exception # with a nice error message instead of just crashing. # (Shouldn't happen unless you defined page breakpoints manually) if not hasattr(condition, 'add') or not hasattr(condition, 'span'): msg = "Can't set buffer watch at 0x%.08x-0x%.08x" raise RuntimeError, msg % (address, address + size) # Add the new buffer to the watch. condition.add(address, size) # Did the required range of watched pages change? n_base, n_pages = condition.span() if n_base < bp.get_address() or n_pages > bp.get_size_in_pages(): # Erase the previous breakpoint and define a new one. self.erase_page_breakpoint(pid, base) self.define_page_breakpoint(pid, n_base, n_pages, condition) self.enable_page_breakpoint(pid, n_base) # If not, was the breakpoint previously disabled? # (This shouldn't happen unless you tinker with it) elif bp.is_disabled(): # Re-enable the breakpoint. self.enable_page_breakpoint(pid, base) # There was no breakpoint here, define a new one. else: condition = BufferWatch() condition.add(address, size) self.define_page_breakpoint(pid, base, pages, condition) self.enable_page_breakpoint(pid, base)
562df25ff97eea1a3b7efa1460c1be02315ac013 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/562df25ff97eea1a3b7efa1460c1be02315ac013/breakpoint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4267, 67, 4106, 12, 2890, 16, 4231, 16, 1758, 16, 963, 16, 1301, 273, 599, 4672, 3536, 11511, 279, 1363, 18820, 471, 19527, 1347, 326, 864, 1613, 353, 15539, 18, 225, 632, 5946, 30, 51...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 4106, 12, 2890, 16, 4231, 16, 1758, 16, 963, 16, 1301, 273, 599, 4672, 3536, 11511, 279, 1363, 18820, 471, 19527, 1347, 326, 864, 1613, 353, 15539, 18, 225, 632, 5946, 30, 51...
('BeautifulSoup', '3.0.5', 'beautifulsoup', 'python-beautifulsoup', 'python-beautifulsoup'),
('BeautifulSoup', '3.0.5', 'beautifulsoup', 'python-beautifulsoup', 'python-BeautifulSoup'),
def __init__(self, dict): self.update(dict) if not dict.has_key('img'): self['img'] = self['name']
d269e83191eaddc27a4970d9718ace9e93f8ff79 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/d269e83191eaddc27a4970d9718ace9e93f8ff79/download.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2065, 4672, 365, 18, 2725, 12, 1576, 13, 309, 486, 2065, 18, 5332, 67, 856, 2668, 6081, 11, 4672, 365, 3292, 6081, 3546, 273, 365, 3292, 529, 3546, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2065, 4672, 365, 18, 2725, 12, 1576, 13, 309, 486, 2065, 18, 5332, 67, 856, 2668, 6081, 11, 4672, 365, 3292, 6081, 3546, 273, 365, 3292, 529, 3546, 2, ...
<Url type="application/opensearchdescription+xml" rel="self" template="%(CFG_SITE_URL)s/search/opensearchdescription" />
<Url type="application/opensearchdescription+xml" rel="self" template="%(CFG_SITE_URL)s/opensearchdescription" />
def tmpl_opensearch_description(self, ln): """ Returns the OpenSearch description file of this site. """ _ = gettext_set_language(ln) return """<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
0b2970baab66c776567b8547fb241de18d0c9af0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2139/0b2970baab66c776567b8547fb241de18d0c9af0/websearch_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 3190, 3072, 67, 3384, 12, 2890, 16, 7211, 4672, 3536, 2860, 326, 3502, 2979, 2477, 585, 434, 333, 2834, 18, 3536, 389, 273, 24972, 67, 542, 67, 4923, 12, 2370, 13, 327, 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, 3190, 3072, 67, 3384, 12, 2890, 16, 7211, 4672, 3536, 2860, 326, 3502, 2979, 2477, 585, 434, 333, 2834, 18, 3536, 389, 273, 24972, 67, 542, 67, 4923, 12, 2370, 13, 327, 3536...
def writeCalibValidityPaf(fileNameList, fd=sys.stdout):
def writeCalibValidityPaf(fileNameList, fd=sys.stdout, stripPrefix=None):
def writeCalibValidityPaf(fileNameList, fd=sys.stdout): if isinstance(fileNameList, str): fileNameList = [fileNameList] calibInfo = {} for fileName in fileNameList: dirName = os.path.split(os.path.dirname(fileName))[-1] basename = os.path.basename(fileName) name, suffix = os.path.splitext(basename) if suffix == ".fits": calibType, extra, ccd, amp = name.split("-") elif suffix == ".paf": calibType, ccd, amp = name.split("-") else: print >> sys.stderr, "I don't recognize %s's suffix" % fileName continue expTime, filter = None, None if needExpTime(calibType): expTime = extra elif needFilter(calibType): filter = extra elif calibType in ("scatter"): continue; # ignoring scattered light frames elif calibType in ("defect"): pass else: print >> sys.stderr, "I don't know what to do with %s" % (fileName) continue if re.search(r"^c\d+$", ccd): ccd = "CCD%03d" % int(ccd[1:]) else: print >> sys.stderr, "Expected cXXXX, saw %s in %s" % (ccd, fileName) continue if re.search(r"^a\d+$", amp): amp = "Amplifier%03d" % int(amp[1:]) else: print >> sys.stderr, "Expected cXXXX, saw %s in %s" % (amp, fileName) continue if calibType == "defect": crunid = dirName # we'll check that they are the same validFrom = "1970/01/01" validTo = validFrom else: meta = afwImage.readMetadata(fileName, 0) crunid = meta.get("CRUNID").strip() validFrom = meta.get("TVSTART") # data validity start time validTo = meta.get("TVSTOP") # data validity end time # # Reformat YYYY/MM/DD dates to ISO # validFrom = "%4d-%02d-%02dT00:00:00.00Z" % tuple([int(x) for x in validFrom.split("/")]) validTo = "%4d-%02d-%02dT00:00:00.00Z" % tuple([int(x) for x in validTo.split("/")]) if crunid != dirName: print >> sys.stderr, "Expected CRUNID = %s, saw %s" % (crunid, dirName) if not calibInfo.has_key(ccd): calibInfo[ccd] = {} if not calibInfo[ccd].has_key(amp): calibInfo[ccd][amp] = {} if not calibInfo[ccd][amp].has_key(calibType): calibInfo[ccd][amp][calibType] = [] calibInfo[ccd][amp][calibType].append(_CalibData(fileName, crunid, validFrom, validTo, expTime=expTime, filter=filter)) # # Write that out # print >> fd, "calibrations: {" for ccd in sorted(calibInfo.keys()): print >> fd, " %s: {" % ccd for amp in sorted(calibInfo[ccd].keys()): print >> fd, " %s: {" % amp for calibType in sorted(calibInfo[ccd][amp].keys()): for calib in calibInfo[ccd][amp][calibType]: print >> fd, """\ %s: { fileName: %-25s # Calibration file version: %-25s # This calibration's version validFrom: %-25s # Start time of this calibration's validity validTo: %-25s # End time of this calibration's validity
f17c29bed5128804ef3019be6dce1a595b85acb6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6526/f17c29bed5128804ef3019be6dce1a595b85acb6/calibDatabase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3005, 495, 19678, 52, 1727, 12, 17812, 682, 16, 5194, 33, 9499, 18, 10283, 16, 2569, 2244, 33, 7036, 4672, 225, 309, 1549, 12, 17812, 682, 16, 609, 4672, 3968, 682, 273, 306, 178...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3005, 495, 19678, 52, 1727, 12, 17812, 682, 16, 5194, 33, 9499, 18, 10283, 16, 2569, 2244, 33, 7036, 4672, 225, 309, 1549, 12, 17812, 682, 16, 609, 4672, 3968, 682, 273, 306, 178...
print options.max_length
def parse_mail(options): # parse configuration if options.configuration: config = ConfigParser() config.read([CFG_FILE, os.path.expanduser('~/%s' % CFG_FILE), options.configuration_file]) section = options.configuration if not config.has_section(section): raise ValueError("Section '%s' not found in configuration file" % section) for op in ('url', 'username', 'password'): if not config.has_option(section, op): raise ValueError("Section '%s' has no option '%s'" % (section, op)) options.url = config.get(section, 'url') options.username = config.get(section, 'username') options.password = config.get(section, 'password') if config.has_section('default'): if config.has_option('default', 'maxlength'): options.max_length = int(config.get('default', 'maxlength')) else: options.max_length = MAX_LENGTH print options.max_length if options.filename is not None: LOG.debug('Reading from: %s' % options.filename) text = open(options.filename).read() else: print >>sys.stderr, 'Reading mail from stdin' text = sys.stdin.read() LOG.debug('Length of message: %d bytes' % len(text)) if len(text) > options.max_length: raise RuntimeError('Message size exceeds allowed length of %d bytes' % options.max_length) msg = email.message_from_string(text) R = Result() for part in msg.walk(): ct = part.get_content_type() encoding = part.get_charset() or 'iso-8859-15' if part.has_key("From"): R.sendername, R.senderaddress = email.Utils.parseaddr(part.get("From")) R.reply_to = R.senderaddress LOG.debug('From=%s,%s' % (R.sendername, R.senderaddress)) if part.has_key("Reply-To"): R.reply_to = email.Utils.parseaddr(part.get("Reply-To"))[1] LOG.debug('Reply-To=%s' % (R.reply_to)) if part.has_key("Subject"): R.subject = decode_header(part.get("Subject"))[0][0] LOG.debug('Subject=%s' % (R.subject)) if ct in ('text/plain',): R.body = unicode(part.get_payload(decode=1), encoding).encode('utf-8') elif ct.startswith('image/'): R.addAttachment(part.get_payload(decode=1), ct, part.get_filename()) return R
540fb55d2d214b8af3bb8e3119ba72de0508ad40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/540fb55d2d214b8af3bb8e3119ba72de0508ad40/smtp2pcng.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 4408, 12, 2116, 4672, 225, 468, 1109, 1664, 309, 702, 18, 7025, 30, 642, 273, 25076, 1435, 642, 18, 896, 3816, 19727, 67, 3776, 16, 1140, 18, 803, 18, 12320, 1355, 2668, 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, 1109, 67, 4408, 12, 2116, 4672, 225, 468, 1109, 1664, 309, 702, 18, 7025, 30, 642, 273, 25076, 1435, 642, 18, 896, 3816, 19727, 67, 3776, 16, 1140, 18, 803, 18, 12320, 1355, 2668, 98, ...
Inputs: doc_titles - a list to be filled with strings of package documentation titles.
def __init__(self): """ Manages loading SciPy packages. Inputs:
b35106b05b7a8ae5a5b524593697f093f86439d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/b35106b05b7a8ae5a5b524593697f093f86439d1/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3536, 490, 940, 281, 7153, 2850, 77, 9413, 5907, 18, 225, 24472, 30, 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, 1001, 2738, 972, 12, 2890, 4672, 3536, 490, 940, 281, 7153, 2850, 77, 9413, 5907, 18, 225, 24472, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
sqlValList.append( "`bucket%s`.`%s`=%s" % ( typeName, valueField, value ) )
sqlValList.append( "`%s`.`%s`=%s" % ( tableName, valueField, value ) )
def __updateBucket( self, typeName, startTime, bucketLength, keyValues, bucketValues, connObj = False ): """ Update a bucket when coming from the raw insert """ cmd = "UPDATE `bucket%s` SET " % typeName sqlValList = [] for pos in range( len( self.dbCatalog[ typeName ][ 'values' ] ) ): valueField = self.dbCatalog[ typeName ][ 'values' ][ pos ] value = bucketValues[ pos ] sqlValList.append( "`bucket%s`.`%s`=%s" % ( typeName, valueField, value ) ) cmd += ", ".join( sqlValList ) cmd += " WHERE `bucket%s`.`startTime`='%s' AND `bucket%s`.`bucketLength`='%s' AND " % ( typeName, startTime, typeName, bucketLength ) cmd += self.__generateSQLConditionForKeys( typeName, keyValues ) return self._update( cmd, conn = connObj )
7663d95782c4987a99eb5394bb9f465c2ab982d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/7663d95782c4987a99eb5394bb9f465c2ab982d5/AccountingDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2725, 4103, 12, 365, 16, 8173, 16, 8657, 16, 2783, 1782, 16, 498, 1972, 16, 2783, 1972, 16, 1487, 2675, 273, 1083, 262, 30, 3536, 2315, 279, 2783, 1347, 19283, 628, 326, 1831, 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, 1001, 2725, 4103, 12, 365, 16, 8173, 16, 8657, 16, 2783, 1782, 16, 498, 1972, 16, 2783, 1972, 16, 1487, 2675, 273, 1083, 262, 30, 3536, 2315, 279, 2783, 1347, 19283, 628, 326, 1831, 22...
raise SafeException("Implementation " + impl + " of " "interface " + iface + " cannot be "
raise SafeException("Implementation " + impl.id + " of " "interface " + iface.get_name() + " cannot be "
def download_and_run(mainwindow, prog_args): """If all downloads are ready, runs the program. Otherwise, hides mainwindow, shows the download progress box and then runs it. On error, mainwindow is re-shown.""" downloads = [] for iface, impl in policy.get_uncached_implementations(): if not impl.download_sources: raise SafeException("Implementation " + impl + " of " "interface " + iface + " cannot be " "downloaded (no download locations given in " "interface!") dl = download.begin_impl_download(impl.download_sources[0], force = True) downloads.append((iface, dl)) def run_it(): import run try: run.execute(policy, prog_args) mainwindow.destroy() except SafeException, ex: box = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, str(ex)) box.run() box.destroy() mainwindow.show() if downloads: DownloadProgessBox(run_it, downloads, mainwindow).show() else: run_it()
f710178ab1264ee96a0a84b1aa534b4f223d4f04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10543/f710178ab1264ee96a0a84b1aa534b4f223d4f04/download_box.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 67, 464, 67, 2681, 12, 5254, 5668, 16, 11243, 67, 1968, 4672, 3536, 2047, 777, 23011, 854, 5695, 16, 7597, 326, 5402, 18, 5272, 16, 366, 4369, 2774, 5668, 16, 17975, 326, 4224, 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, 4224, 67, 464, 67, 2681, 12, 5254, 5668, 16, 11243, 67, 1968, 4672, 3536, 2047, 777, 23011, 854, 5695, 16, 7597, 326, 5402, 18, 5272, 16, 366, 4369, 2774, 5668, 16, 17975, 326, 4224, 4...
return f.taylor(v=v,a=a,n=n)
return f.taylor(*args)
def taylor(f, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable `v` around the point `a`, containing terms through `(x - a)^n`. INPUT: - ``v`` - variable - ``a`` - number - ``n`` - integer EXAMPLES:: sage: var('x,k,n') (x, k, n) sage: taylor (sqrt (1 - k^2*sin(x)^2), x, 0, 6) -1/720*(45*k^6 - 60*k^4 + 16*k^2)*x^6 - 1/24*(3*k^4 - 4*k^2)*x^4 - 1/2*k^2*x^2 + 1 sage: taylor ((x + 1)^n, x, 0, 4) 1/24*(n^4 - 6*n^3 + 11*n^2 - 6*n)*x^4 + 1/6*(n^3 - 3*n^2 + 2*n)*x^3 + 1/2*(n^2 - n)*x^2 + n*x + 1 """ if not isinstance(f, Expression): f = SR(f) return f.taylor(v=v,a=a,n=n)
633bfa8986eb00c84d3329a7fc202dcbd0a6259c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/633bfa8986eb00c84d3329a7fc202dcbd0a6259c/functional.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 528, 80, 280, 12, 74, 16, 331, 16, 279, 16, 290, 4672, 3536, 7784, 5708, 365, 316, 279, 15282, 399, 528, 80, 280, 578, 511, 8377, 547, 4166, 316, 326, 2190, 1375, 90, 68, 6740, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 528, 80, 280, 12, 74, 16, 331, 16, 279, 16, 290, 4672, 3536, 7784, 5708, 365, 316, 279, 15282, 399, 528, 80, 280, 578, 511, 8377, 547, 4166, 316, 326, 2190, 1375, 90, 68, 6740, ...
rc = abd.Adb.break_anywhere(self, frame)
rc = bdb.Bdb.break_anywhere(self, frame)
def break_anywhere(self, frame): traceenter("break_anywhere", _dumpf(frame)) if self.breakFlags==axdebug.APPBREAKFLAG_DEBUGGER_HALT: self.breakReason = axdebug.BREAKREASON_DEBUGGER_HALT return 1 rc = abd.Adb.break_anywhere(self, frame) tracev("break_anywhere",_dumpf(frame),"returning",rc) return rc
08ca6b2a16671829eec11ca4f47a503515cbda02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/08ca6b2a16671829eec11ca4f47a503515cbda02/adb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 898, 67, 2273, 6051, 12, 2890, 16, 2623, 4672, 2606, 2328, 2932, 8820, 67, 2273, 6051, 3113, 389, 8481, 74, 12, 3789, 3719, 309, 365, 18, 8820, 5094, 631, 651, 4148, 18, 7215, 27960, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 898, 67, 2273, 6051, 12, 2890, 16, 2623, 4672, 2606, 2328, 2932, 8820, 67, 2273, 6051, 3113, 389, 8481, 74, 12, 3789, 3719, 309, 365, 18, 8820, 5094, 631, 651, 4148, 18, 7215, 27960, 9...
for child in self:
for (from_valid, until_valid) in self:
def _build_element(self, *args, **kwargs): self.element.clear() for child in self: from_elem = etree.SubElement(self.element, '{%s}from' % self._xml_namespace, nsmap=self._xml_application.xml_nsmap) until_elem = etree.SubElement(self.element, '{%s}until' % self._xml_namespace, nsmap=self._xml_application.xml_nsmap)
fd5df93b1c6a5f639d8fdf08057b9a8dbe8241f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5703/fd5df93b1c6a5f639d8fdf08057b9a8dbe8241f8/policy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 2956, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 365, 18, 2956, 18, 8507, 1435, 364, 261, 2080, 67, 877, 16, 3180, 67, 877, 13, 316, 365, 30, 628, 67, 10037, 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, 389, 3510, 67, 2956, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 365, 18, 2956, 18, 8507, 1435, 364, 261, 2080, 67, 877, 16, 3180, 67, 877, 13, 316, 365, 30, 628, 67, 10037, 273, ...
if string.find(sys.executable, sys.exec_prefix) != -1:
if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
def finalize_options (self): from distutils import sysconfig
aa1f05c31f27044d68dfbd009d3ce770dedc3c6c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/aa1f05c31f27044d68dfbd009d3ce770dedc3c6c/build_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 261, 2890, 4672, 628, 2411, 5471, 1930, 2589, 1425, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 12409, 67, 2116, 261, 2890, 4672, 628, 2411, 5471, 1930, 2589, 1425, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.cSternSphereNodePath = self.shipNodePath.attachNewNode(
self.cSternSphereNodePath = self.ship.getInteractCollisionRoot().attachNewNode(
def setupCollisions(self): if self.pusher: return """ Set up the collision sphere """ # This is a sphere on the ground to detect barrier collisions
c96edd1d0d4516da319c4a2cdc9632fef44b9969 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/c96edd1d0d4516da319c4a2cdc9632fef44b9969/ShipPilot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13535, 12682, 12, 2890, 4672, 309, 365, 18, 6206, 264, 30, 327, 3536, 1000, 731, 326, 17740, 20041, 3536, 468, 1220, 353, 279, 20041, 603, 326, 19209, 358, 5966, 24651, 27953, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13535, 12682, 12, 2890, 4672, 309, 365, 18, 6206, 264, 30, 327, 3536, 1000, 731, 326, 17740, 20041, 3536, 468, 1220, 353, 279, 20041, 603, 326, 19209, 358, 5966, 24651, 27953, 2, -...
handle_close_event = handle_read_event
handle_close = handle_read_event
def handle_read_event(self): raise asyncore.ExitNow()
cceeaedede586cdaa02f131be8842cc30ba62ba9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/cceeaedede586cdaa02f131be8842cc30ba62ba9/test_asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 896, 67, 2575, 12, 2890, 4672, 1002, 4326, 479, 18, 6767, 8674, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 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, 1640, 67, 896, 67, 2575, 12, 2890, 4672, 1002, 4326, 479, 18, 6767, 8674, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
print >>sys.stderr, 'zoob'
def soap(request): '''SAMLv1.1 soap endpoint implementation. It should handle request for: - artifact resolution - logout - and federation termination''' print >>sys.stderr, 'zoob' soap_message = get_soap_message(request) request_type = lasso.getRequestTypeFromSoapMsg(soap_message) if request_type == lasso.REQUEST_TYPE_LOGIN: print >>sys.stderr, 'coin' return artifact_resolve(request, soap_message) else: print >>sys.stderr, 'toto' message = _('ID-FFv1.2: soap request type %r is currently not supported') % request_type logging.warning(message) return NotImplementedError(message)
4104699244e1f0c7351686ecd9bfcff32a3d8355 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11208/4104699244e1f0c7351686ecd9bfcff32a3d8355/idff12_endpoints.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9930, 12, 2293, 4672, 9163, 21380, 90, 21, 18, 21, 9930, 2494, 4471, 18, 225, 2597, 1410, 1640, 590, 364, 30, 300, 6462, 7861, 300, 12735, 300, 471, 22572, 7067, 19650, 26418, 9930, 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, 9930, 12, 2293, 4672, 9163, 21380, 90, 21, 18, 21, 9930, 2494, 4471, 18, 225, 2597, 1410, 1640, 590, 364, 30, 300, 6462, 7861, 300, 12735, 300, 471, 22572, 7067, 19650, 26418, 9930, 67, ...
self.addFormattingElement(self, name, attributes)
self.addFormattingElement(name, attributes)
def startTagA(self, name, attributes): afeAElement = self.parser.elementInActiveFormattingElements("a") if afeAElement: self.parser.parseError() self.endTagA("a") if afeAElement in self.parser.openElements: self.parser.openElements.remove(afeAElement) if afeAElement in self.parser.activeFormattingElements: self.parser.activeFormattingElements.remove(afeAElement) self.parser.reconstructActiveFormattingElements() self.addFormattingElement(self, name, attributes)
71bb2b3bb38e163608588ee19478e6e981a2ee61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/71bb2b3bb38e163608588ee19478e6e981a2ee61/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 1805, 37, 12, 2890, 16, 508, 16, 1677, 4672, 279, 3030, 37, 1046, 273, 365, 18, 4288, 18, 2956, 382, 3896, 23974, 3471, 2932, 69, 7923, 309, 279, 3030, 37, 1046, 30, 365, 18, 42...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 1805, 37, 12, 2890, 16, 508, 16, 1677, 4672, 279, 3030, 37, 1046, 273, 365, 18, 4288, 18, 2956, 382, 3896, 23974, 3471, 2932, 69, 7923, 309, 279, 3030, 37, 1046, 30, 365, 18, 42...
self.valid_namelists = ['cntrl','ewald','qmmm']
self.pb_nml = self.pb_obj.sander self.valid_namelists = ['cntrl','ewald','qmmm','pb'] elif self.program == "sander.APBS": self.cntrl_nml = self.cntrl_obj.sander self.pb_nml = self.pb_obj.sanderAPBS self.valid_namelists = ['cntrl','apbs']
def __init__(self, program = 'sander', verbosity = 1): # define instance data self.program = program # which program we're creating the input file for self.cntrl_obj = cntrl() # object with cntrl namelist vars in a dictionary self.ewald_obj = ewald() # object with ewald namelist vars in a dictionary self.verbosity = 0 # verbosity level: 0 -- print nothing # 1 -- print errors # 2 -- print errors and warnings # 3 -- print errors, warnings, and notes self.cntrl_nml = {} # dictionary with cntrl namelist vars self.cntrl_nml_defaults = {} # dictionary with default cntrl namelist vars self.ewald_nml = {} # dictionary with ewald namelist vars self.ewald_nml_defaults = {} # dictionary with default ewald namelist vars self.valid_namelists = [] # array with valid namelists for each program self.title = 'mdin prepared by mdin.py' # title for the mdin file
1c414d83729af2407be18fff7052ca6c9a2354a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8376/1c414d83729af2407be18fff7052ca6c9a2354a5/mdin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5402, 273, 296, 87, 464, 264, 2187, 11561, 273, 404, 4672, 468, 4426, 791, 501, 365, 18, 12890, 273, 5402, 3639, 468, 1492, 5402, 732, 4565, 4979, 326, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5402, 273, 296, 87, 464, 264, 2187, 11561, 273, 404, 4672, 468, 4426, 791, 501, 365, 18, 12890, 273, 5402, 3639, 468, 1492, 5402, 732, 4565, 4979, 326, 8...
self.channels.remove(channel)
del self.channels[channel.name]
def cleanup(self): # do some cleanup tasks to free some memory # hopefully python's resource counter will properly detect the object as something # that can be disposed of to_delete = [] for channel in self.channels.values(): if len(channel.members) == 0: to_delete.append(channel) for channel in to_delete: self.channels.remove(channel) del to_delete
fd98a3b7022274a1a915b3ff0bd2947a307d5e02 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12995/fd98a3b7022274a1a915b3ff0bd2947a307d5e02/ircserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6686, 12, 2890, 4672, 468, 741, 2690, 6686, 4592, 358, 4843, 2690, 3778, 468, 27370, 4095, 5790, 1807, 1058, 3895, 903, 8214, 5966, 326, 733, 487, 5943, 468, 716, 848, 506, 1015, 7423, 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, 6686, 12, 2890, 4672, 468, 741, 2690, 6686, 4592, 358, 4843, 2690, 3778, 468, 27370, 4095, 5790, 1807, 1058, 3895, 903, 8214, 5966, 326, 733, 487, 5943, 468, 716, 848, 506, 1015, 7423, 4...
def metadata():
def metadata(self):
def metadata(): """Returns a dictionary-like object containing the key-value pairs of metadata defined for this item."""
872770490fc2833fcb07f8e060881988c36fc1d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2607/872770490fc2833fcb07f8e060881988c36fc1d9/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1982, 12, 2890, 4672, 3536, 1356, 279, 3880, 17, 5625, 733, 4191, 326, 498, 17, 1132, 5574, 434, 1982, 2553, 364, 333, 761, 12123, 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, 0, 0, 0, 0, 0, 0, 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, 1982, 12, 2890, 4672, 3536, 1356, 279, 3880, 17, 5625, 733, 4191, 326, 498, 17, 1132, 5574, 434, 1982, 2553, 364, 333, 761, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.conn.do.playid(self.currentdata.get_value(iter, 0))
try: self.conn.do.playid(self.currentdata.get_value(iter, 0)) except: pass
def on_current_click(self, treeview, path, column): iter = self.currentdata.get_iter(path) self.conn.do.playid(self.currentdata.get_value(iter, 0)) self.iterate_now()
da896f22bf546993eeffd323f5ff881a73f4468a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/da896f22bf546993eeffd323f5ff881a73f4468a/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 2972, 67, 7475, 12, 2890, 16, 2151, 1945, 16, 589, 16, 1057, 4672, 1400, 273, 365, 18, 2972, 892, 18, 588, 67, 2165, 12, 803, 13, 775, 30, 365, 18, 4646, 18, 2896, 18, 160...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 2972, 67, 7475, 12, 2890, 16, 2151, 1945, 16, 589, 16, 1057, 4672, 1400, 273, 365, 18, 2972, 892, 18, 588, 67, 2165, 12, 803, 13, 775, 30, 365, 18, 4646, 18, 2896, 18, 160...
return False return True
return {'code':'emv_doc_error'} return {'code':'emv_doc_sent'}
def send_email(cr,uid,obj,context): """ Get Emailmvision connection infos """ ev_host = obj.mail_service_id.ev_host ev_service = obj.mail_service_id.ev_service ev_encrypt = obj.mail_service_id.ev_encrypt ev_random = obj.mail_service_id.ev_random email_dest = obj.address_id.email or '' email_reply = obj.segment_id.campaign_id.trademark_id.email or '' context['document_id'] = obj.document_id.id context['address_id'] = obj.address_id.id context['wi_id'] = obj.wi_id.id email_subject = merge_message(cr, uid, obj.document_id.subject or '',context) name_from = obj.segment_id.campaign_id.trademark_id.name or '' name_reply = obj.segment_id.campaign_id.trademark_id.name or '' pool = pooler.get_pool(cr.dbname) message = [] if obj.mail_service_id.store_email_document: ir_att_obj = pool.get('ir.attachment') ir_att_ids = ir_att_obj.search(cr,uid,[('res_model','=','dm.campaign.document'),('res_id','=',obj.id),('file_type','=','html')]) for attach in ir_att_obj.browse(cr,uid,ir_att_ids): message.append(base64.decodestring(attach.datas)) else : document_data = pool.get('dm.offer.document').browse(cr,uid,obj.document_id.id) if obj.document_id.editor == 'internal' : message.append(generate_internal_reports(cr, uid, 'html2html', document_data, False, context)) else : msg = generate_openoffice_reports(cr, uid, 'html2html', document_data, False, context) message.extend(msg) for msg in message: root = etree.HTML(msg) body = root.find('body') print "message :", message # I think html_content = message should wrk html_content = ''.join([ etree.tostring(x) for x in body.getchildren()]) print "body :", html_content
5fc1f54db19c52d78ef1270601596e3f813432c3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/5fc1f54db19c52d78ef1270601596e3f813432c3/dm_emailvision_api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 3652, 12, 3353, 16, 1911, 16, 2603, 16, 2472, 4672, 225, 3536, 968, 8166, 81, 2820, 1459, 10626, 3536, 2113, 67, 2564, 273, 1081, 18, 4408, 67, 3278, 67, 350, 18, 14965, 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, 1366, 67, 3652, 12, 3353, 16, 1911, 16, 2603, 16, 2472, 4672, 225, 3536, 968, 8166, 81, 2820, 1459, 10626, 3536, 2113, 67, 2564, 273, 1081, 18, 4408, 67, 3278, 67, 350, 18, 14965, 67, ...
sage: Mod(2,5) <= x
sage: Mod(2,5) <= x
def __le__(self, right): r""" Construct the symbolic inequality \code{self <= right}.
2b6ad56bcf2516ea032c64349bb279c9ac313cda /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2b6ad56bcf2516ea032c64349bb279c9ac313cda/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 298, 972, 12, 2890, 16, 2145, 4672, 436, 8395, 14291, 326, 16754, 316, 9729, 560, 521, 710, 95, 2890, 1648, 2145, 5496, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 298, 972, 12, 2890, 16, 2145, 4672, 436, 8395, 14291, 326, 16754, 316, 9729, 560, 521, 710, 95, 2890, 1648, 2145, 5496, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
rs = domain.connection.query_with_attributes(domain.name, query, attr_names, next_token)
rs = domain.connection.query_with_attributes(domain.name, query, attr_names, next_token=next_token)
def query_lister(domain, query='', max_items=None, attr_names=None): more_results = True num_results = 0 next_token = None while more_results: rs = domain.connection.query_with_attributes(domain.name, query, attr_names, next_token) for item in rs: if max_items: if num_results == max_items: raise StopIteration yield item num_results += 1 next_token = rs.next_token more_results = next_token != None
74913a17176869a1f3fc31fc4f83e36b9b1e3879 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/74913a17176869a1f3fc31fc4f83e36b9b1e3879/queryresultset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 67, 1098, 264, 12, 4308, 16, 843, 2218, 2187, 943, 67, 3319, 33, 7036, 16, 1604, 67, 1973, 33, 7036, 4672, 1898, 67, 4717, 273, 1053, 818, 67, 4717, 273, 374, 1024, 67, 2316, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 67, 1098, 264, 12, 4308, 16, 843, 2218, 2187, 943, 67, 3319, 33, 7036, 16, 1604, 67, 1973, 33, 7036, 4672, 1898, 67, 4717, 273, 1053, 818, 67, 4717, 273, 374, 1024, 67, 2316, 27...
found_init = 0 modules = {} dirs = [] for file in os.listdir(dirname): filepath = os.path.join(dirname, file) if os.path.isdir(filepath): dirs.append(filepath)
try: if os.path.isfile(os.path.join(dirname, '__init__.py')): pkg = import_module(os.path.join(dirname, '__init__.py')) elif os.path.isfile(os.path.join(dirname, '__init__.pyw')): pkg = import_module(os.path.join(dirname, '__init__.pyw')) elif os.path.isfile(os.path.join(dirname, '__init__.pyc')): pkg = import_module(os.path.join(dirname, '__init__.pyc')) else: return [] except: return [] modules = _find_modules(pkg).keys() modules.sort() return [pkg.__name__] + modules def _find_modules(pkg): """ Helper function for L{find_modules}. """ pkgname = pkg.__name__ paths = [] for dir in pkg.__path__: if os.path.isdir(dir): paths += [os.path.join(dir, file) for file in os.listdir(dir)] modules = {} subdirectories = [] for filepath in paths: file = os.path.split(filepath)[-1] if os.path.isdir(filepath): if re.match(r'\w+', file): subpkgname = '%s.%s' % (pkg.__name__, file) try: subpkg = _import_module(subpkgname) except: continue if not hasattr(subpkg, '__path__'): continue modules[subpkgname] = 1 modules.update(_find_modules(subpkg))
def find_modules(dirname): """ If C{dirname} contains a package, then return the filenames for the package, its modules, and all of its descendant packages and modules. If C{dirname} does not contain a package, then return an empty list. @rtype: C{list} of C{string} @return: The filenames for the package in C{dirname}, its modules, and all of its descendant packages and modules. @type dirname: C{string} @param dirname: The directory name to search. """ if not os.path.isdir(dirname): return [] found_init = 0 modules = {} dirs = [] # Search for directories & modules, and check for __init__.py. # Don't include duplicates (like foo.py and foo.pyc), and give # precedance to the .py files. for file in os.listdir(dirname): filepath = os.path.join(dirname, file) if os.path.isdir(filepath): dirs.append(filepath) elif not re.match(r'\w+.py.?', file): continue # Ignore things like ".#foo.py" or "a-b.py" elif file[-3:] == '.py': modules[file] = os.path.join(dirname, file) if file == '__init__.py': found_init = 1 elif file[-4:-1] == '.py': modules.setdefault(file[:-1], file) if file[:-1] == '__init__.py': found_init = 1 modules = modules.values() # If there was no __init__.py, then this isn't a package # directory; return nothing. if not found_init: return [] # Recurse to the child directories. for d in dirs: modules += find_modules(d) return modules
b9eaae15c1716aa772cd1f26c76cd22cf5b3881d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/b9eaae15c1716aa772cd1f26c76cd22cf5b3881d/imports.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 6400, 12, 12287, 4672, 3536, 971, 385, 95, 12287, 97, 1914, 279, 2181, 16, 1508, 327, 326, 9066, 364, 326, 2181, 16, 2097, 4381, 16, 471, 777, 434, 2097, 17465, 5907, 471, 43...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 6400, 12, 12287, 4672, 3536, 971, 385, 95, 12287, 97, 1914, 279, 2181, 16, 1508, 327, 326, 9066, 364, 326, 2181, 16, 2097, 4381, 16, 471, 777, 434, 2097, 17465, 5907, 471, 43...
self.check_sizeof([], h + l + p + l) self.check_sizeof([1, 2, 3], h + l + p + l + 3*l)
self.check_sizeof([], size(h + 'lPP')) self.check_sizeof([1, 2, 3], size(h + 'lPP') + 3*self.P)
def test_specialtypes(self): i = self.i l = self.l p = self.p h = self.headersize # dict self.check_sizeof({}, h + 3*l + 3*p + 8*(l + 2*p)) longdict = {1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8} self.check_sizeof(longdict, h + 3*l + 3*p + 8*(l + 2*p) + 16*(l + 2*p)) # list self.check_sizeof([], h + l + p + l) self.check_sizeof([1, 2, 3], h + l + p + l + 3*l) # unicode usize = len(u'\0'.encode('unicode-internal')) samples = [u'', u'1'*100] # we need to test for both sizes, because we don't know if the string # has been cached for s in samples: basicsize = h + l + p + l + p + usize * (len(s) + 1) self.check_sizeof(s, basicsize,\ size2=basicsize + sys.getsizeof(str(s))) # XXX trigger caching encoded version as Python string s = samples[1] try: getattr(sys, s) except AttributeError: pass finally: self.check_sizeof(s, basicsize + sys.getsizeof(str(s)))
5c5f6ea02a90835741c65e40e2b7c4e412c33d55 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/5c5f6ea02a90835741c65e40e2b7c4e412c33d55/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9371, 2352, 12, 2890, 4672, 277, 273, 365, 18, 77, 328, 273, 365, 18, 80, 293, 273, 365, 18, 84, 366, 273, 365, 18, 2485, 554, 468, 2065, 365, 18, 1893, 67, 1467, 792, 23...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9371, 2352, 12, 2890, 4672, 277, 273, 365, 18, 77, 328, 273, 365, 18, 80, 293, 273, 365, 18, 84, 366, 273, 365, 18, 2485, 554, 468, 2065, 365, 18, 1893, 67, 1467, 792, 23...
(fails, i+1), (0, i+1), '(fails, combos) == (0, combos)'
(fails, i+1), (0, i+1)
def test_yuv__sanity_testing_converted_should_not_raise(self): fails = 0 for i, (r,g,b,a) in enumerate(rgba_combinations): c = pygame.Color (r,g,b,a) other = pygame.Color(0) try: other.yuv = c.yuv except ValueError: fails += 1 self.assertEqual ( (fails, i+1), (0, i+1), '(fails, combos) == (0, combos)' )
c6e7f322382f4acb4620e49e674de647c9ab082a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1298/c6e7f322382f4acb4620e49e674de647c9ab082a/color_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 93, 16303, 972, 87, 10417, 67, 3813, 310, 67, 6283, 329, 67, 13139, 67, 902, 67, 11628, 12, 2890, 4672, 6684, 273, 374, 225, 364, 277, 16, 261, 86, 16, 75, 16, 70, 16, 69...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 93, 16303, 972, 87, 10417, 67, 3813, 310, 67, 6283, 329, 67, 13139, 67, 902, 67, 11628, 12, 2890, 4672, 6684, 273, 374, 225, 364, 277, 16, 261, 86, 16, 75, 16, 70, 16, 69...
bgimage.save(os.path.join(getTempPath(),"background-%s-f%06d.jpg" % (page, framenum)),"JPEG",quality=90)
bgimage.save(os.path.join(getTempPath(),"background-%s-f%06d.jpg" % (page, framenum)),"JPEG",quality=99)
def createMenu(screensize, screendpi, numberofitems): """Creates all the necessary menu images and files for the MythBurn menus.""" #Get the main menu node (we must only have 1) menunode=themeDOM.getElementsByTagName("menu") if menunode.length!=1: fatalError("Cannot find menu element in theme file") menunode=menunode[0] menuitems=menunode.getElementsByTagName("item") #Total number of video items on a single menu page (no less than 1!) itemsperpage = menuitems.length write( "Menu items per page %s" % itemsperpage) #Get background image filename backgroundfilename = menunode.attributes["background"].value if backgroundfilename=="": fatalError("Background image is not set in theme file") backgroundfilename = getThemeFile(themeName,backgroundfilename) write( "Background image file is %s" % backgroundfilename) if not doesFileExist(backgroundfilename): fatalError("Background image not found (%s)" % backgroundfilename) #Get highlight color highlightcolor = "red" if menunode.hasAttribute("highlightcolor"): highlightcolor = menunode.attributes["highlightcolor"].value #Get menu music menumusic = "menumusic.ac3" if menunode.hasAttribute("music"): menumusic = menunode.attributes["music"].value #Get menu length menulength = 15 if menunode.hasAttribute("length"): menulength = int(menunode.attributes["length"].value) write("Music is %s, length is %s seconds" % (menumusic, menulength)) #Page number counter page=1 #Item counter to indicate current video item itemnum=1 write("Creating DVD menus") while itemnum <= numberofitems: write("Menu page %s" % page) #need to check if any of the videos are flaged as movies #and if so generate the required preview write("Creating Preview Video") previewitem = itemnum itemsonthispage = 0 haspreview = False previewx = [] previewy = [] previeww = [] previewh = [] previewmask = [] while previewitem <= numberofitems and itemsonthispage < itemsperpage: menuitem=menuitems[ itemsonthispage ] itemsonthispage+=1 #make sure the preview folder is empty and present previewfolder = createEmptyPreviewFolder(previewitem) #and then generate the preview if required (px=9999 means not required) px, py, pw, ph, maskimage = generateVideoPreview(previewitem, itemsonthispage, menuitem, 0, menulength, previewfolder) previewx.append(px) previewy.append(py) previeww.append(pw) previewh.append(ph) previewmask.append(maskimage) if px != 9999: haspreview = True previewitem+=1 #previews generated but need to save where we started from savedpreviewitem = itemnum #Number of video items on this menu page itemsonthispage=0 #instead of loading the background image and drawing on it we now #make a transparent image and draw all items on it. This overlay #image is then added to the required background image when the #preview items are added (the reason for this is it will assist #if the background image is actually a video) overlayimage=Image.new("RGBA",screensize) draw=ImageDraw.Draw(overlayimage) #Create image to hold button masks (same size as background) bgimagemask=Image.new("RGBA",overlayimage.size) drawmask=ImageDraw.Draw(bgimagemask) spumuxdom = xml.dom.minidom.parseString('<subpictures><stream><spu force="yes" start="00:00:00.0" highlight="" select="" ></spu></stream></subpictures>') spunode = spumuxdom.documentElement.firstChild.firstChild #Loop through all the items on this menu page while itemnum <= numberofitems and itemsonthispage < itemsperpage: menuitem=menuitems[ itemsonthispage ] itemsonthispage+=1 drawThemeItem(page, itemsonthispage, itemnum, menuitem, overlayimage, draw, bgimagemask, drawmask, highlightcolor, spumuxdom, spunode, numberofitems, 0,"") #On to the next item itemnum+=1 #Paste the overlay image onto the background bgimage=Image.open(backgroundfilename,"r").resize(screensize) bgimage.paste(overlayimage, (0,0), overlayimage) #Save this menu image and its mask bgimage.save(os.path.join(getTempPath(),"background-%s.jpg" % page),"JPEG", quality=90) bgimagemask.save(os.path.join(getTempPath(),"backgroundmask-%s.png" % page),"PNG",quality=99,optimize=0,dpi=screendpi) #now that the base background has been made and all the previews generated #we need to add the previews to the background #Assumption: We assume that there is nothing in the location of where the items go #(ie, no text on the images) itemsonthispage = 0 #numframes should be the number of preview images that have been created numframes=secondsToFrames(menulength) # only generate the preview video if required. if haspreview == True: write( "Generating the preview images" ) framenum = 0 while framenum < numframes: previewitem = savedpreviewitem itemsonthispage = 0 while previewitem <= numberofitems and itemsonthispage < itemsperpage: itemsonthispage+=1 if previewx[itemsonthispage-1] != 9999: previewpath = os.path.join(getItemTempPath(previewitem), "preview") previewfile = "preview-i%d-t1-f%d.jpg" % (itemsonthispage, framenum) imagefile = os.path.join(previewpath, previewfile) if doesFileExist(imagefile): picture = Image.open(imagefile, "r").resize((previeww[itemsonthispage-1], previewh[itemsonthispage-1])) picture = picture.convert("RGBA") imagemaskfile = os.path.join(previewpath, "mask-i%d.png" % itemsonthispage) if previewmask[itemsonthispage-1] != None: bgimage.paste(picture, (previewx[itemsonthispage-1], previewy[itemsonthispage-1]), previewmask[itemsonthispage-1]) else: bgimage.paste(picture, (previewx[itemsonthispage-1], previewy[itemsonthispage-1])) del picture previewitem+=1 #bgimage.save(os.path.join(getTempPath(),"background-%s-f%06d.png" % (page, framenum)),"PNG",quality=100,optimize=0,dpi=screendpi) bgimage.save(os.path.join(getTempPath(),"background-%s-f%06d.jpg" % (page, framenum)),"JPEG",quality=90) framenum+=1 spumuxdom.documentElement.firstChild.firstChild.setAttribute("select",os.path.join(getTempPath(),"backgroundmask-%s.png" % page)) spumuxdom.documentElement.firstChild.firstChild.setAttribute("highlight",os.path.join(getTempPath(),"backgroundmask-%s.png" % page)) #Release large amounts of memory ASAP ! del draw del bgimage del drawmask del bgimagemask del overlayimage del previewx del previewy del previewmask WriteXMLToFile (spumuxdom,os.path.join(getTempPath(),"spumux-%s.xml" % page)) if mainmenuAspectRatio == "4:3": aspect_ratio = 2 else: aspect_ratio = 3 write("Encoding Menu Page %s using aspect ratio '%s'" % (page, mainmenuAspectRatio)) if haspreview == True: encodeMenu(os.path.join(getTempPath(),"background-%s-f%%06d.jpg" % page), os.path.join(getTempPath(),"temp.m2v"), getThemeFile(themeName,menumusic), menulength, os.path.join(getTempPath(),"temp.mpg"), os.path.join(getTempPath(),"spumux-%s.xml" % page), os.path.join(getTempPath(),"menu-%s.mpg" % page), aspect_ratio) else: encodeMenu(os.path.join(getTempPath(),"background-%s.jpg" % page), os.path.join(getTempPath(),"temp.m2v"), getThemeFile(themeName,menumusic), menulength, os.path.join(getTempPath(),"temp.mpg"), os.path.join(getTempPath(),"spumux-%s.xml" % page), os.path.join(getTempPath(),"menu-%s.mpg" % page), aspect_ratio) #Move on to the next page page+=1
c82d8a0c4a33fc669861191621297cdbb83d3d9b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13713/c82d8a0c4a33fc669861191621297cdbb83d3d9b/mythburn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 4599, 12, 1017, 266, 773, 554, 16, 888, 266, 409, 7259, 16, 1300, 792, 3319, 4672, 3536, 2729, 777, 326, 4573, 3824, 4602, 471, 1390, 364, 326, 8005, 451, 38, 321, 21374, 12123, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 4599, 12, 1017, 266, 773, 554, 16, 888, 266, 409, 7259, 16, 1300, 792, 3319, 4672, 3536, 2729, 777, 326, 4573, 3824, 4602, 471, 1390, 364, 326, 8005, 451, 38, 321, 21374, 12123, 2...
self.currSliderPanel.SetSize(self.sliderWin.GetSize())
self.currSliderPanel.SetSize(self.sliderWin.GetSize())
def OnSize(self, event = None): """ Created: 23.05.2005, KP Description: Handle size events """ wx.LayoutAlgorithm().LayoutWindow(self.parent, self.visWin) x, y = self.zsliderWin.GetSize() self.zsliderPanel.SetSize((x, y)) visSize = self.visWin.GetClientSize() # was here self.annotateBar.Layout() newsize = visSize[0] if self.currentWindow: self.currentWindow.SetSize(visSize) self.currMode.relayout() if self.currMode.layoutTwice() and event: wx.CallAfter(self.OnSize) self.oldClientSize = newsize if self.currSliderPanel: self.currSliderPanel.SetSize(self.sliderWin.GetSize()) if time.time() - self.lastWinSaveTime > 5: self.saveWindowSizes()
228d177ed04eda3e5752ade67b1e400d3b569646 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/228d177ed04eda3e5752ade67b1e400d3b569646/Visualizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1225, 12, 2890, 16, 871, 273, 599, 4672, 3536, 12953, 30, 10213, 18, 6260, 18, 6976, 25, 16, 1475, 52, 6507, 30, 5004, 963, 2641, 3536, 7075, 18, 3744, 6801, 7675, 3744, 3829, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1225, 12, 2890, 16, 871, 273, 599, 4672, 3536, 12953, 30, 10213, 18, 6260, 18, 6976, 25, 16, 1475, 52, 6507, 30, 5004, 963, 2641, 3536, 7075, 18, 3744, 6801, 7675, 3744, 3829, 12...
Label(calErrFrame, text='Calibration Error (extra frac. error in system vis.)').pack(side=LEFT, anchor=W)
Label(calErrFrame, text='Calibration Error (extra frac. error in system vis.) [NOT OIFITS]').pack(side=LEFT, anchor=W)
def __init__(self, parent, dismissCommand=None): """Constructor.
510037cbc83e2826b5b0580b2f57020e3ce293c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5943/510037cbc83e2826b5b0580b2f57020e3ce293c6/fitgui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 29926, 2189, 33, 7036, 4672, 3536, 6293, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 29926, 2189, 33, 7036, 4672, 3536, 6293, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
description="hurry.resource integration for Zope.",
description="Fanstatic integration for Zope.",
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
20fe8909e7e6b78b4c5829e683284188289e93e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9606/20fe8909e7e6b78b4c5829e683284188289e93e0/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, -100, -100, -100,...
if config.usage.show_infobar_on_zap.value: self.doShow()
def keyNumberGlobal(self, number):
8ed4d48a8dc5cf0a399ae147b34f845a15fb94d4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6652/8ed4d48a8dc5cf0a399ae147b34f845a15fb94d4/InfoBarGenerics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 1854, 5160, 12, 2890, 16, 1300, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 1854, 5160, 12, 2890, 16, 1300, 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...
self.assertRaises(RuntimeError, util.wait, d)
return self.assertFailure(d, RuntimeError)
def myiter(): if 0: yield None else: raise RuntimeError()
f3a56bc136e5b5fa4542bd86397d2b4297734a70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7078/f3a56bc136e5b5fa4542bd86397d2b4297734a70/test_cooperator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 2165, 13332, 309, 374, 30, 2824, 599, 469, 30, 1002, 7265, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 2165, 13332, 309, 374, 30, 2824, 599, 469, 30, 1002, 7265, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Returns True if and only if P defines is a point on the
Returns True if and only if P is a point on the
def __contains__(self, P): """ Returns True if and only if P defines is a point on the elliptic curve. P just has to be something that can be coerced to a point.
89c2370a6c124c1bf3f51b0d97beaaae4ef2736c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/89c2370a6c124c1bf3f51b0d97beaaae4ef2736c/ell_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12298, 972, 12, 2890, 16, 453, 4672, 3536, 2860, 1053, 309, 471, 1338, 309, 453, 353, 279, 1634, 603, 326, 415, 549, 21507, 8882, 18, 225, 453, 2537, 711, 358, 506, 5943, 716, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12298, 972, 12, 2890, 16, 453, 4672, 3536, 2860, 1053, 309, 471, 1338, 309, 453, 353, 279, 1634, 603, 326, 415, 549, 21507, 8882, 18, 225, 453, 2537, 711, 358, 506, 5943, 716, 84...
self.assertEqual(entry.category[0].label, 'presentation')
self.assertEqual(entry.category[0].label, 'viewed') self.assertEqual(entry.category[1].label, 'presentation')
def testUploadAndDeletePresentation(self): ms = gdata.MediaSource(file_path='test.ppt', content_type='application/vnd.ms-powerpoint') entry = self.doclist.UploadPresentation(ms, 'test preso') self.assertEqual(entry.title.text, 'test preso') self.assertEqual(entry.category[0].label, 'presentation') self.assert_(isinstance(entry, gdata.docs.DocumentListEntry)) self.doclist.Delete(entry.GetEditLink().href)
dcc46816af19bac967f4b588353a3ee4514dd5d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6580/dcc46816af19bac967f4b588353a3ee4514dd5d2/service_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 4777, 1876, 2613, 6351, 367, 12, 2890, 4672, 4086, 273, 314, 892, 18, 5419, 1830, 12, 768, 67, 803, 2218, 3813, 18, 84, 337, 2187, 913, 67, 723, 2218, 3685, 19, 11169, 18, 959, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4777, 1876, 2613, 6351, 367, 12, 2890, 4672, 4086, 273, 314, 892, 18, 5419, 1830, 12, 768, 67, 803, 2218, 3813, 18, 84, 337, 2187, 913, 67, 723, 2218, 3685, 19, 11169, 18, 959, ...
i = end - l
i = end - L
def rfind(self, sub, start=0, end=None): r""" Returns the index of the last occurrence of sub in self, such that sub is contained within self[start:end]. Returns -1 on failure. INPUT:
ac01f803958583026685031a12eb209830c3f54d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ac01f803958583026685031a12eb209830c3f54d/word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31257, 12, 2890, 16, 720, 16, 787, 33, 20, 16, 679, 33, 7036, 4672, 436, 8395, 2860, 326, 770, 434, 326, 1142, 13083, 434, 720, 316, 365, 16, 4123, 716, 720, 353, 7542, 3470, 365, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31257, 12, 2890, 16, 720, 16, 787, 33, 20, 16, 679, 33, 7036, 4672, 436, 8395, 2860, 326, 770, 434, 326, 1142, 13083, 434, 720, 316, 365, 16, 4123, 716, 720, 353, 7542, 3470, 365, 63...
src = gr.file_descriptor_source(gr.sizeof_gr_complex, 0)
src = gr.file_descriptor_source(input_size, 0)
def __init__(self): gr.top_block.__init__(self)
b41d501980b0b5a99df2f7f49afdd20540a4a67a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9155/b41d501980b0b5a99df2f7f49afdd20540a4a67a/btrx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3821, 18, 3669, 67, 2629, 16186, 2738, 972, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3821, 18, 3669, 67, 2629, 16186, 2738, 972, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
tests = list(tests) test_count = len(tests) test_count_width = len(str(test_count))
test_count = '/{}'.format(len(selected)) test_count_width = len(test_count) - 1
def test_forever(tests=list(selected)): while True: for test in tests: yield test if bad: return
3906cbc81830de7ec1e285e8bb902c47bc9c7fe8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/3906cbc81830de7ec1e285e8bb902c47bc9c7fe8/regrtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1405, 502, 12, 16341, 33, 1098, 12, 8109, 3719, 30, 1323, 1053, 30, 364, 1842, 316, 7434, 30, 2824, 1842, 309, 5570, 30, 327, 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, 1842, 67, 1405, 502, 12, 16341, 33, 1098, 12, 8109, 3719, 30, 1323, 1053, 30, 364, 1842, 316, 7434, 30, 2824, 1842, 309, 5570, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -10...
name_length = struct.unpack("!I", data[pos:pos+4]) & 0x7fffffff
name_length = struct.unpack("!I", data[pos:pos+4])[0] & 0x7fffffff
def __init__(self, data=""): self.values = [] pos = 0 while pos < len(data): if ord(data[pos]) & 128: name_length = struct.unpack("!I", data[pos:pos+4]) & 0x7fffffff pos += 4 else: name_length = ord(data[pos]) pos += 1 if ord(data[pos]) & 128: value_length = struct.unpack("!I", data[pos:pos+4]) & 0x7fffffff pos += 4 else: value_length = ord(data[pos]) pos += 1 if pos + name_length + value_length > len(data): raise ValueError, "Unexpected end-of-data in NameValueRecord" self.values.append((data[pos:pos+name_length], data[pos+name_length:pos+name_length+value_length])) pos += name_length + value_length
bc96479fe82ed082f5c9d2616befa70f055dbb98 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/506/bc96479fe82ed082f5c9d2616befa70f055dbb98/fcgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 1546, 6, 4672, 365, 18, 2372, 273, 5378, 949, 273, 374, 1323, 949, 411, 562, 12, 892, 4672, 309, 4642, 12, 892, 63, 917, 5717, 473, 8038, 30, 508,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 1546, 6, 4672, 365, 18, 2372, 273, 5378, 949, 273, 374, 1323, 949, 411, 562, 12, 892, 4672, 309, 4642, 12, 892, 63, 917, 5717, 473, 8038, 30, 508,...
S_ADS_ERRORSOCCURRED = _HRESULT_TYPEDEF_(0x00005011L) S_ADS_NOMORE_ROWS = _HRESULT_TYPEDEF_(0x00005012L) S_ADS_NOMORE_COLUMNS = _HRESULT_TYPEDEF_(0x00005013L)
S_ADS_ERRORSOCCURRED = _HRESULT_TYPEDEF_(0x00005011) S_ADS_NOMORE_ROWS = _HRESULT_TYPEDEF_(0x00005012) S_ADS_NOMORE_COLUMNS = _HRESULT_TYPEDEF_(0x00005013)
def _HRESULT_TYPEDEF_(_sc): return _sc
0af7c3eff94e33f21f59d3de2010fde4f4f49363 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/992/0af7c3eff94e33f21f59d3de2010fde4f4f49363/adsicon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 44, 12289, 67, 2399, 12904, 67, 24899, 1017, 4672, 327, 389, 1017, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 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, 44, 12289, 67, 2399, 12904, 67, 24899, 1017, 4672, 327, 389, 1017, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
minDeltax - min(x2 - x1)
minDeltax = min(x2 - x1)
def setData(self, *dataList): """ Set data to the plot
7c21316bd2b0282da374aba97a863460405e2cdb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/7c21316bd2b0282da374aba97a863460405e2cdb/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7929, 12, 2890, 16, 380, 892, 682, 4672, 3536, 1000, 501, 358, 326, 3207, 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, 7929, 12, 2890, 16, 380, 892, 682, 4672, 3536, 1000, 501, 358, 326, 3207, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
print no
def read(self,fname,verbose=0): f=open(fname,"rb") try: self._readheader(f) except: raise rows =int(self.header['NROWS']) cols =int(self.header['NCOLS']) try: npixelb=int(self.header['NPIXELB']) # you had to read the Bruker docs to know this! except: print "length",len(self.header['NPIXELB']) for c in self.header['NPIXELB']:
abca1a50e184b3e0f8e3bde8c9e061c7bdffa2d1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9619/abca1a50e184b3e0f8e3bde8c9e061c7bdffa2d1/brukerimage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 12749, 16, 11369, 33, 20, 4672, 284, 33, 3190, 12, 12749, 10837, 6731, 7923, 225, 775, 30, 365, 6315, 896, 3374, 12, 74, 13, 1335, 30, 1002, 2595, 282, 273, 474, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 12749, 16, 11369, 33, 20, 4672, 284, 33, 3190, 12, 12749, 10837, 6731, 7923, 225, 775, 30, 365, 6315, 896, 3374, 12, 74, 13, 1335, 30, 1002, 2595, 282, 273, 474, 1...
self.spPenalty.setSingleStep(50)
def __init__(self, players, ruleset): """selection for this player, tiles are the still available tiles""" QDialog.__init__(self, None) self.setWindowTitle(m18n("Penalty") + ' - kmj') self.players = players self.ruleset = ruleset grid = QGridLayout(self) lblOffense = QLabel(m18n('Offense:')) crimes = list([x for x in self.ruleset.penaltyRules if not ('absolute' in x.actions and players.winner)]) self.cbCrime = ListComboBox(crimes) lblOffense.setBuddy(self.cbCrime) grid.addWidget(lblOffense, 0, 0) grid.addWidget(self.cbCrime, 0, 1, 1, 4) lblPenalty = QLabel(m18n('Total Penalty')) self.spPenalty = QSpinBox() self.spPenalty.setRange(0, 9999) self.spPenalty.setSingleStep(50) lblPenalty.setBuddy(self.spPenalty) self.lblUnits = QLabel(m18n('points')) grid.addWidget(lblPenalty, 1, 0) grid.addWidget(self.spPenalty, 1, 1) grid.addWidget(self.lblUnits, 1, 2) grid.addWidget(QLabel(m18n('Payers')), 2, 0) grid.addWidget(QLabel(m18n('pay')), 2, 1) grid.addWidget(QLabel(m18n('Payees')), 2, 3) grid.addWidget(QLabel(m18n('get')), 2, 4) self.payers = [] self.payees = [] # a penalty can never involve the winner, neither as payer nor as payee for idx in range(3): self.payers.append(ListComboBox(players.losers())) self.payees.append(ListComboBox(players.losers())) for idx, payer in enumerate(self.payers): grid.addWidget(payer, 3+idx, 0) payer.lblPayment = QLabel() grid.addWidget(payer.lblPayment, 3+idx, 1) for idx, payee in enumerate(self.payees): grid.addWidget(payee, 3+idx, 3) payee.lblPayment = QLabel() grid.addWidget(payee.lblPayment, 3+idx, 4) grid.addWidget(QLabel(''), 6, 0) grid.setRowStretch(6, 10) for player in self.payers + self.payees: self.connect(player, SIGNAL('currentIndexChanged(int)'), self.playerChanged) self.connect(self.cbCrime, SIGNAL('currentIndexChanged(int)'), self.crimeChanged) self.buttonBox = KDialogButtonBox(self) grid.addWidget(self.buttonBox, 7, 0, 1, 5) self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel) self.connect(self.buttonBox, SIGNAL("rejected()"), self, SLOT("reject()")) self.btnExecute = self.buttonBox.addButton(i18n("&Execute"), QDialogButtonBox.AcceptRole, self, SLOT("accept()")) self.crimeChanged() self.state = StateSaver(self)
93bf41dcf49cae215afcd24ea1052237ec6a25e0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1679/93bf41dcf49cae215afcd24ea1052237ec6a25e0/playfield.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 18115, 16, 25303, 4672, 3536, 10705, 364, 333, 7291, 16, 12568, 854, 326, 4859, 2319, 12568, 8395, 2238, 6353, 16186, 2738, 972, 12, 2890, 16, 599, 13, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 18115, 16, 25303, 4672, 3536, 10705, 364, 333, 7291, 16, 12568, 854, 326, 4859, 2319, 12568, 8395, 2238, 6353, 16186, 2738, 972, 12, 2890, 16, 599, 13, 365...
for name in ('lib', 'purelib', 'platlib', 'scripts', 'data'):
for name in ('lib', 'purelib', 'platlib', 'scripts', 'data', 'headers'):
def finalize_options (self):
a57694ae8de46f457cfae28cb5e5ae20972186bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a57694ae8de46f457cfae28cb5e5ae20972186bf/install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 261, 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, 12409, 67, 2116, 261, 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, -...
else: break
def import_mail_from_message(request, message): """ Reads a message generated by the email package and imports it to the wiki. """ _ = request.getText msg = process_message(message) wiki_addrs = request.cfg.mail_import_wiki_addrs request.user = user.get_by_email_address(request, msg['from_addr'][1]) if not request.user: raise ProcessingError("No suitable user found for mail address %r" % (msg['from_addr'][1], )) d = get_pagename_content(request, msg) pagename = d['pagename'] generate_summary = d['generate_summary'] comment = u"Mail: '%s'" % (msg['subject'], ) page = PageEditor(request, pagename, do_editor_backup=0) if not request.user.may.save(page, "", 0): raise ProcessingError("Access denied for page %r" % pagename) attachments = [] for att in msg['attachments']: i = 0 while 1: if i == 0: fname = att.filename else: components = att.filename.split(".") new_suffix = "-" + str(i) # add the counter before the file extension if len(components) > 1: fname = u"%s%s.%s" % (u".".join(components[:-1]), new_suffix, components[-1]) else: fname = att.filename + new_suffix try: # get the fname again, it might have changed fname, fsize = add_attachment(request, pagename, fname, att.data) attachments.append(fname) except AttachmentAlreadyExists: i += 1 else: break # build an attachment link table for the page with the e-mail attachment_links = [""] + [u'''[[attachment:%s|%s]]''' % ("%s/%s" % (pagename, att), att) for att in attachments] # assemble old page content and new mail body together old_content = Page(request, pagename).get_raw_body() if old_content: new_content = u"%s\n-----\n" % old_content else: new_content = '' #if not (generate_summary and "/" in pagename): #generate header in any case: new_content += u"'''Mail: %s (%s, <<DateTime(%s)>>)'''\n\n" % (msg['subject'], email_to_markup(request, msg['from_addr']), msg['date']) new_content += d['content'] new_content += "\n" + u"\n * ".join(attachment_links) try: page.saveText(new_content, 0, comment=comment) except page.AccessDenied: raise ProcessingError("Access denied for page %r" % pagename) if generate_summary and "/" in pagename: parent_page = u"/".join(pagename.split("/")[:-1]) old_content = Page(request, parent_page).get_raw_body().splitlines() found_table = None table_ends = None for lineno, line in enumerate(old_content): if line.startswith("## mail_overview") and old_content[lineno+1].startswith("||"): found_table = lineno elif found_table is not None and line.startswith("||"): table_ends = lineno + 1 elif table_ends is not None and not line.startswith("||"): break # in order to let the gettext system recognise the <<GetText>> calls used below, # we must repeat them here: [_("Date"), _("From"), _("To"), _("Content"), _("Attachments")] table_header = (u"\n\n## mail_overview (don't delete this line)\n" + u"|| '''<<GetText(Date)>> ''' || '''<<GetText(From)>> ''' || '''<<GetText(To)>> ''' || '''<<GetText(Content)>> ''' || '''<<GetText(Attachments)>> ''' ||\n" ) from_col = email_to_markup(request, msg['from_addr']) to_col = ' '.join([email_to_markup(request, (realname, mailaddr)) for realname, mailaddr in msg['target_addrs'] if not mailaddr in wiki_addrs]) subj_col = '[[%s|%s]]' % (pagename, msg['subject']) date_col = msg['date'] attach_col = " ".join(attachment_links) new_line = u'|| <<DateTime(%s)>> || %s || %s || %s || %s ||' % (date_col, from_col, to_col, subj_col, attach_col) if found_table is not None: content = "\n".join(old_content[:table_ends] + [new_line] + old_content[table_ends:]) else: content = "\n".join(old_content) + table_header + new_line page = PageEditor(request, parent_page, do_editor_backup=0) page.saveText(content, 0, comment=comment)
c351a395100127ed2afa86e58ab095a8917b59dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/c351a395100127ed2afa86e58ab095a8917b59dc/mailimport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 4408, 67, 2080, 67, 2150, 12, 2293, 16, 883, 4672, 3536, 29185, 279, 883, 4374, 635, 326, 2699, 2181, 471, 10095, 518, 358, 326, 9050, 18, 3536, 389, 273, 590, 18, 588, 1528,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4408, 67, 2080, 67, 2150, 12, 2293, 16, 883, 4672, 3536, 29185, 279, 883, 4374, 635, 326, 2699, 2181, 471, 10095, 518, 358, 326, 9050, 18, 3536, 389, 273, 590, 18, 588, 1528,...
confirmed_notification, sdp_notification = None, None while confirmed_notification is None or sdp_notification is None:
confirmed_notification_data = None while confirmed_notification_data is None or sdp_notification_data is None:
def _wait_confirmed_and_sdp(self, q): """Wait for SIPInvitationChangedState(state=CONFIRMED) and SIPInvitationGotSDPUpdate notifications. Return tuple of 2 items - data of those 2 notifications. """ confirmed_notification, sdp_notification = None, None while confirmed_notification is None or sdp_notification is None: notification = q.wait() data = notification.data if notification.name == self.event_names[0]: if data.state=='CONFIRMED': confirmed_notification = notification elif data.state=='DISCONNECTING': raise InvitationError(originator='local') elif data.state=='DISCONNECTED': raise InvitationError(**data.__dict__) elif notification.name == self.event_names[1]: sdp_notification = notification if not data.succeeded: raise SDPNegotiationError('SDP negotiation failed: %s' % notification.data.error) return confirmed_notification.data, sdp_notification.data
8d91fcad227c1071056107c9797c7c26d508db99 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/8d91fcad227c1071056107c9797c7c26d508db99/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7048, 67, 21606, 67, 464, 67, 6427, 84, 12, 2890, 16, 1043, 4672, 3536, 5480, 364, 348, 2579, 19896, 5033, 1119, 12, 2019, 33, 2248, 1653, 54, 25773, 13, 471, 348, 2579, 19896, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7048, 67, 21606, 67, 464, 67, 6427, 84, 12, 2890, 16, 1043, 4672, 3536, 5480, 364, 348, 2579, 19896, 5033, 1119, 12, 2019, 33, 2248, 1653, 54, 25773, 13, 471, 348, 2579, 19896, 15...
self.__entries = []
self._entries = []
def __init__ (self): self.__entries = []
ed500b819555108af67057bd24de252315b598d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/ed500b819555108af67057bd24de252315b598d2/edit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 4672, 365, 16186, 8219, 273, 5378, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 4672, 365, 16186, 8219, 273, 5378, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
'Subsuites & Subsuites 2': ([], ['Subsuites', 'Subsuites 2'], 4), 'Subsuites': ([], ['Sub 1', 'Sub 2'], 2), 'Sub 1': (['SubSuite1 First'], [], 1), 'Sub 2': (['SubSuite2 First'], [], 1), 'Subsuites 2': ([], ['Subsuite 3'], 2), 'Subsuite 3': (['SubSuite3 First', 'SubSuite3 Second'], [], 2),
'Subsuites & Subsuites2': ([], ['Subsuites', 'Subsuites2'], 4), 'Subsuites': ([], ['Sub1', 'Sub2'], 2), 'Sub1': (['SubSuite1 First'], [], 1), 'Sub2': (['SubSuite2 First'], [], 1), 'Subsuites2': ([], ['Subsuite3'], 2), 'Subsuite3': (['SubSuite3 First', 'SubSuite3 Second'], [], 2),
def end_suite(self, *args): raise RuntimeError("Here comes an exception!")
c985fbe301e4db20cc5b7506c4febc7b5667a63e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7408/c985fbe301e4db20cc5b7506c4febc7b5667a63e/listeners.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 67, 30676, 12, 2890, 16, 380, 1968, 4672, 1002, 7265, 2932, 26715, 14535, 392, 1520, 4442, 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...
[ 1, 1, 1, 1, 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, 679, 67, 30676, 12, 2890, 16, 380, 1968, 4672, 1002, 7265, 2932, 26715, 14535, 392, 1520, 4442, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
image_width, image_height)
image_width, image_height)[0]
def Listing(self, to_listing, settings): val = settings.listing
cf366e4ddbb9aa3670074ed733601bdb123ae44c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/cf366e4ddbb9aa3670074ed733601bdb123ae44c/main1_image.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 987, 310, 12, 2890, 16, 358, 67, 21228, 16, 1947, 4672, 1244, 273, 1947, 18, 21228, 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, 987, 310, 12, 2890, 16, 358, 67, 21228, 16, 1947, 4672, 1244, 273, 1947, 18, 21228, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
glyphnumber=k+(5*j)+(25*i)+(64*liquescentiae[liquescentia])+(512*shapes[shape])
glyphnumber=i+(5*j)+(25*k)+(64*liquescentiae[liquescentia])+(512*shapes[shape])
def name(i, j, k, shape, liquescentia): if shortglyphs==0: glyphnumber=k+(5*j)+(25*i)+(256*liquescentiae[liquescentia])+(512*shapes[shape]) else : glyphnumber=k+(5*j)+(25*i)+(64*liquescentiae[liquescentia])+(512*shapes[shape]) return "_%04d" % (glyphnumber)
3476babc235eee7e0f876eaf20ec2cdd45f09a8b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7096/3476babc235eee7e0f876eaf20ec2cdd45f09a8b/squarize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 12, 77, 16, 525, 16, 417, 16, 2179, 16, 4501, 372, 742, 319, 1155, 4672, 309, 3025, 19426, 87, 631, 20, 30, 9440, 2696, 33, 79, 15, 12, 25, 14, 78, 27921, 12, 2947, 14, 77, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 12, 77, 16, 525, 16, 417, 16, 2179, 16, 4501, 372, 742, 319, 1155, 4672, 309, 3025, 19426, 87, 631, 20, 30, 9440, 2696, 33, 79, 15, 12, 25, 14, 78, 27921, 12, 2947, 14, 77, ...
sage: print group_to_LatinSquare(G)
sage: group_to_LatinSquare(G)
def group_to_LatinSquare(G): """ Construct a latin square on the symbols [0, 1, ..., n-1] for a group with an n by n Cayley table. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: print group_to_LatinSquare(DihedralGroup(2)) [0 1 2 3] [1 0 3 2] [2 3 0 1] [3 2 1 0] sage: G = gap.Group(PermutationGroupElement((1,2,3))) sage: print group_to_LatinSquare(G) [0 1 2] [1 2 0] [2 0 1] """ if isinstance(G, GapElement): rows = map(lambda x: list(x), list(gap.MultiplicationTable(G))) new_rows = [] for x in rows: new_rows.append(map(lambda x: int(x)-1, x)) return matrix(new_rows) # Otherwise we must have some kind of Sage permutation group object, # such as sage.groups.perm_gps.permgroup.PermutationGroup_generic # or maybe sage.groups.perm_gps.permgroup_named. # We should have a cayley_table() function. try: C = G.cayley_table() except: # We got some other kind of group object? raise NotImplemented L = LatinSquare(C.nrows(), C.ncols()) k = 0 entries = {} for r in range(C.nrows()): for c in range(C.ncols()): e_table = C[r, c] if entries.has_key(e_table): L[r, c] = entries[e_table] else: entries[e_table] = k L[r, c] = k k += 1 return L
494f2bd1cd82ea9dcc25f8e258b7375812aed1c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/494f2bd1cd82ea9dcc25f8e258b7375812aed1c9/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1041, 67, 869, 67, 6607, 267, 22255, 12, 43, 4672, 3536, 14291, 279, 30486, 8576, 603, 326, 7963, 306, 20, 16, 404, 16, 1372, 16, 290, 17, 21, 65, 364, 279, 1041, 598, 392, 290, 635,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1041, 67, 869, 67, 6607, 267, 22255, 12, 43, 4672, 3536, 14291, 279, 30486, 8576, 603, 326, 7963, 306, 20, 16, 404, 16, 1372, 16, 290, 17, 21, 65, 364, 279, 1041, 598, 392, 290, 635,...
self,
self,
def between(self, cleft, cright): """Produce a BETWEEN clause, i.e. ``<column> BETWEEN <cleft> AND <cright>``"""
0dbbd6fe669afed79be8f639455e324ab9b817ca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/0dbbd6fe669afed79be8f639455e324ab9b817ca/expression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3086, 12, 2890, 16, 1619, 1222, 16, 276, 4083, 4672, 3536, 25884, 279, 25178, 6591, 16, 277, 18, 73, 18, 12176, 32, 2827, 34, 25178, 411, 2131, 1222, 34, 4116, 411, 3353, 750, 34, 1033...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3086, 12, 2890, 16, 1619, 1222, 16, 276, 4083, 4672, 3536, 25884, 279, 25178, 6591, 16, 277, 18, 73, 18, 12176, 32, 2827, 34, 25178, 411, 2131, 1222, 34, 4116, 411, 3353, 750, 34, 1033...
errors.append(StructuringError(estr, para_token)) def _add_section(doc, heading_token, stack, indent_stack, errors, warnings):
errors.append(StructuringError(estr, para_token.startline)) def _add_section(doc, heading_token, stack, indent_stack, errors):
def _add_para(doc, para_token, stack, indent_stack, errors, warnings): """Colorize the given paragraph, and add it to the DOM tree.""" # Check indentation, and update the parent's indentation # when appropriate. if indent_stack[-1] == None: indent_stack[-1] = para_token.indent if para_token.indent == indent_stack[-1]: # Colorize the paragraph and add it. para = _colorize(doc, para_token, errors, warnings) stack[-1].appendChild(para) else: estr = "Improper paragraph indentation." errors.append(StructuringError(estr, para_token))
7bf7c136593a0f12e906094a55f7b8f591c5abaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7bf7c136593a0f12e906094a55f7b8f591c5abaf/epytext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 25072, 12, 2434, 16, 12602, 67, 2316, 16, 2110, 16, 3504, 67, 3772, 16, 1334, 16, 5599, 4672, 3536, 2957, 554, 326, 864, 10190, 16, 471, 527, 518, 358, 326, 4703, 2151, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1289, 67, 25072, 12, 2434, 16, 12602, 67, 2316, 16, 2110, 16, 3504, 67, 3772, 16, 1334, 16, 5599, 4672, 3536, 2957, 554, 326, 864, 10190, 16, 471, 527, 518, 358, 326, 4703, 2151, ...
for j in range(len(components)-1, 1, -1):
for j in range(len(components)-1, 0, -1):
def findUID(name, container=None, docmap=None): """ Attempt to find the UID for the object that can be accessed with the name C{name} from the module C{module}. @param name: The name used to identify the object. @type name: C{string} @param container: The UID of the class or module containing the object. If no container is specified, then L{__builtin__} is used. @type container: L{UID} or C{None} @param docmap: A documentation map, which is used to check if C{name} is the name of a module variable, class variable, or instance variable. @type docmap: L{objdoc.DocMap} @return: The UID for the object that can be accessed with the name C{name} from the module C{module}; or C{None} if no object was found. @rtype: L{UID} or C{None} """ if name == '': return None name = re.sub(r'\(.*\)$', '', name) if container and not (container.is_module() or container.is_class()): raise ValueError('Bad container %r' % container) if container is None: try: container = make_uid(sys.modules['__builtin__']) except: pass # Is it the short name for a member of the containing class? if container and container.is_class(): if _is_variable_in(name, container, docmap): val = None # it may not be a real object return make_uid(val, container, name) elif container.value().__dict__.has_key(name): cls = container.value() obj = cls.__dict__[name] if type(obj) is _FunctionType: return make_uid(new.instancemethod(obj, None, cls), container, name) else: return make_uid(obj, container, name) else: container = container.module() if container: components = name.split('.') module = container.value() # Is it a variable in the containing module? if _is_variable_in(name, container, docmap): val = None # it may not be a real object return make_uid(val, container, name) # Is it an object in the containing module? try: obj = module for component in components: obj_parent = obj obj_name = component try: obj = obj.__dict__[component] except: raise KeyError() try: return make_uid(obj, make_uid(obj_parent), obj_name) except: pass except KeyError: pass if container: container_name = container.name() else: container_name = '' # Is it a module name? The module name may be relative to the # containing module, or any of its ancestors. modcomponents = container_name.split('.') for i in range(len(modcomponents)-1, -1, -1): try: modname = '.'.join(modcomponents[:i]+[name]) return(make_uid(import_module(modname))) except: pass # Is it an object in a module? The module part of the name may be # relative to the containing module, or any of its ancestors. modcomponents = container_name.split('.') components = name.split('.') for i in range(len(modcomponents)-1, -1, -1): for j in range(len(components)-1, 0, -1): try: modname = '.'.join(modcomponents[:i]+components[:j]) objname = '.'.join(components[j:]) mod = import_module(modname) if _is_variable_in(name, make_uid(mod), docmap): val = None # it may not be a real object return make_uid(val, container, name) obj = getattr(import_module(modname), objname) return make_uid(obj, make_uid(mod), objname) except: pass # Is it an field of a class in a module? The module part of the # name may be relative to the containing module, or any of its # ancestors. modcomponents = container_name.split('.') components = name.split('.') for i in range(len(modcomponents)-1, -1, -1): for j in range(len(components)-1, 1, -1): try: modname = '.'.join(modcomponents[:i]+components[:j]) objname = '.'.join(components[j:-1]) fieldname = components[-1] mod = import_module(modname) if _is_variable_in(name, make_uid(mod), docmap): val = None # it may not be a real object return make_uid(val, container, name) obj = getattr(import_module(modname), objname) field = getattr(obj, fieldname) return make_uid(field, make_uid(obj), fieldname) except: pass # We couldn't find it; return None. return None
1ba36792df8ee7a0c4ea3a0679d5d342cab1f6f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/1ba36792df8ee7a0c4ea3a0679d5d342cab1f6f8/uid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 3060, 12, 529, 16, 1478, 33, 7036, 16, 997, 1458, 33, 7036, 4672, 3536, 12864, 358, 1104, 326, 10034, 364, 326, 733, 716, 848, 506, 15539, 598, 326, 508, 385, 95, 529, 97, 628, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 3060, 12, 529, 16, 1478, 33, 7036, 16, 997, 1458, 33, 7036, 4672, 3536, 12864, 358, 1104, 326, 10034, 364, 326, 733, 716, 848, 506, 15539, 598, 326, 508, 385, 95, 529, 97, 628, ...
if modification_date is None: modification_date = self.creation_date self.modification_date = modification_date
if modification_date: self.setModificationDate(DateTime(modification_date))
def __init__(self, id, container, title='', description='', submitter_id=None, submitter_name=None, submitter_email=None, kibitzers=None, security_related=0, topic=None, classification=None, importance=None, resolution=None, version_info=None, creation_date=None, modification_date=None, effective_date=None, expiration_date=None, assignees=None, file=None, fileid=None, filetype=None, invisible=0): """ """
4e723b508f00c17dd09f77ab257f3335300a6677 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/4e723b508f00c17dd09f77ab257f3335300a6677/CollectorIssue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 612, 16, 1478, 16, 2077, 2218, 2187, 2477, 2218, 2187, 4879, 387, 67, 350, 33, 7036, 16, 4879, 387, 67, 529, 33, 7036, 16, 4879, 387, 67, 3652, 33, 703...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 612, 16, 1478, 16, 2077, 2218, 2187, 2477, 2218, 2187, 4879, 387, 67, 350, 33, 7036, 16, 4879, 387, 67, 529, 33, 7036, 16, 4879, 387, 67, 3652, 33, 703...
self.timeouts.sustain = 120
def handle_established(self): self.timeouts.sustain = 120
0e1987183f9006d765406cf7845735b4e268e9ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8801/0e1987183f9006d765406cf7845735b4e268e9ab/smb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 395, 9237, 5992, 12, 2890, 4672, 365, 18, 4538, 87, 18, 87, 641, 530, 273, 15743, 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, 1640, 67, 395, 9237, 5992, 12, 2890, 4672, 365, 18, 4538, 87, 18, 87, 641, 530, 273, 15743, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if OPTIONS.methodjit_only: jit_flags = [ '-m' ] else: jit_flags = [ '-m', '-j' ] return [ JS ] + jit_flags + [ '-e', expr, '-f', os.path.join(lib_dir, 'prolog.js'),
return [ JS ] + jitflags + [ '-e', expr, '-f', os.path.join(lib_dir, 'prolog.js'),
def get_test_cmd(path, lib_dir): libdir_var = lib_dir if not libdir_var.endswith('/'): libdir_var += '/' expr = "const platform=%r; const libdir=%r;"%(sys.platform, libdir_var) if OPTIONS.methodjit_only: jit_flags = [ '-m' ] else: jit_flags = [ '-m', '-j' ] return [ JS ] + jit_flags + [ '-e', expr, '-f', os.path.join(lib_dir, 'prolog.js'), '-f', path ]
accb8777a93bfa5bd8b702fb15a576d551c083d3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/accb8777a93bfa5bd8b702fb15a576d551c083d3/trace-test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3813, 67, 4172, 12, 803, 16, 2561, 67, 1214, 4672, 2561, 1214, 67, 1401, 273, 2561, 67, 1214, 309, 486, 2561, 1214, 67, 1401, 18, 5839, 1918, 2668, 2473, 4672, 2561, 1214, 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, 336, 67, 3813, 67, 4172, 12, 803, 16, 2561, 67, 1214, 4672, 2561, 1214, 67, 1401, 273, 2561, 67, 1214, 309, 486, 2561, 1214, 67, 1401, 18, 5839, 1918, 2668, 2473, 4672, 2561, 1214, 67,...
for v in self._pos: new_pos[perm[v]] = self._pos[v]
for v in perm.iterkeys(): try: new_pos[perm[v]] = self._pos[v] except KeyError: pass
def relabel(self, perm=None, inplace=True, return_map=False): r""" Uses a dictionary, list, or permutation to relabel the (di)graph. If perm is a dictionary d, each old vertex v is a key in the dictionary, and its new label is d[v].
5bb3d2037cbabc4243387c98a0000a697b9f48cc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5bb3d2037cbabc4243387c98a0000a697b9f48cc/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1279, 873, 12, 2890, 16, 4641, 33, 7036, 16, 11783, 33, 5510, 16, 327, 67, 1458, 33, 8381, 4672, 436, 8395, 14854, 279, 3880, 16, 666, 16, 578, 17440, 358, 1279, 873, 326, 261, 3211, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1279, 873, 12, 2890, 16, 4641, 33, 7036, 16, 11783, 33, 5510, 16, 327, 67, 1458, 33, 8381, 4672, 436, 8395, 14854, 279, 3880, 16, 666, 16, 578, 17440, 358, 1279, 873, 326, 261, 3211, ...
print "size=", size
def execute(self, inputs, update = 0, last = 0): """ Created: 29.05.2006, KP Description: Execute the filter with given inputs and return the output """ if not ProcessingFilter.ProcessingFilter.execute(self, inputs): return None image = self.getInput(1)
6d7b572696d4ecdce2049b45a6e109836f3272c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/6d7b572696d4ecdce2049b45a6e109836f3272c9/SegmentationFilters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 4540, 16, 1089, 273, 374, 16, 1142, 273, 374, 4672, 3536, 12953, 30, 12899, 18, 6260, 18, 6976, 26, 16, 1475, 52, 6507, 30, 7903, 326, 1034, 598, 864, 4540, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 4540, 16, 1089, 273, 374, 16, 1142, 273, 374, 4672, 3536, 12953, 30, 12899, 18, 6260, 18, 6976, 26, 16, 1475, 52, 6507, 30, 7903, 326, 1034, 598, 864, 4540, 471, ...
debug(2, "created " + dir)
bb.debug(2, "created " + dir)
def mkdirhier(dir): """Create a directory like 'mkdir -p', but does not complain if directory already exists like os.makedirs """ debug(3, "mkdirhier(%s)" % dir) try: os.makedirs(dir) debug(2, "created " + dir) except OSError, e: if e.errno != 17: raise e
8f83be3338d7aef4b6fcef5ea89dc69fa587c1f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/8f83be3338d7aef4b6fcef5ea89dc69fa587c1f6/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6535, 76, 2453, 12, 1214, 4672, 3536, 1684, 279, 1867, 3007, 296, 26686, 300, 84, 2187, 1496, 1552, 486, 532, 7446, 309, 1867, 1818, 1704, 3007, 1140, 18, 81, 9477, 10539, 3536, 225, 119...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6535, 76, 2453, 12, 1214, 4672, 3536, 1684, 279, 1867, 3007, 296, 26686, 300, 84, 2187, 1496, 1552, 486, 532, 7446, 309, 1867, 1818, 1704, 3007, 1140, 18, 81, 9477, 10539, 3536, 225, 119...
return self.__validator(self.__assemble())
if event.direction: return self.__validator(self.__assemble()) else: return True
def onChanging(self, event): try: return self.__validator(self.__assemble()) except p6.extension.exceptions.ExtensionSettingsException, e: # an error occured while validating the extension settings # show an alert wx.MessageDialog(None, str(e), "Error", wx.OK).ShowModal() # veto the event -- don't allow the page to change w/o correction event.Veto()
4fce4ca0c2df39825b41a089783c4eeccd832d33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2607/4fce4ca0c2df39825b41a089783c4eeccd832d33/fieldrender.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 782, 18183, 12, 2890, 16, 871, 4672, 775, 30, 309, 871, 18, 9855, 30, 327, 365, 16186, 7357, 12, 2890, 16186, 29676, 10756, 469, 30, 327, 1053, 1335, 293, 26, 18, 6447, 18, 11855,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 782, 18183, 12, 2890, 16, 871, 4672, 775, 30, 309, 871, 18, 9855, 30, 327, 365, 16186, 7357, 12, 2890, 16186, 29676, 10756, 469, 30, 327, 1053, 1335, 293, 26, 18, 6447, 18, 11855,...
def exclude(attrname): return False
def exclude(attrname, obj): return False
def exclude(attrname): return False
2d2285b0284b81fb9971943703ec4e07739713d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/2d2285b0284b81fb9971943703ec4e07739713d6/debug.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4433, 12, 1747, 529, 4672, 327, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4433, 12, 1747, 529, 4672, 327, 1083, 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, -10...
print ":100664 000000 %s %s D\t%s\t%s" % (hg.hex(mmap[f]), empty, f, f)
print ":100664 000000 %s %s D\t%s\t%s" % (hg.short(mmap[f]), empty, f, f)
def read(f): return file(os.path.join(repo.root, f)).read()
1c5a771c9609237f9deb3e7d05682937d58d4a9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/1c5a771c9609237f9deb3e7d05682937d58d4a9e/hgk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 74, 4672, 327, 585, 12, 538, 18, 803, 18, 5701, 12, 7422, 18, 3085, 16, 284, 13, 2934, 896, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 855, 12, 74, 4672, 327, 585, 12, 538, 18, 803, 18, 5701, 12, 7422, 18, 3085, 16, 284, 13, 2934, 896, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.mixer_internal = PREFS["mixer_internal"]
self.mixer_internal = bool(int(PREFS["mixer_internal"]))
def __init__(self): """ Constructor """ gtk.StatusIcon.__init__(self)
134e78bdef56e497d86f480fccd23d203396b9f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6497/134e78bdef56e497d86f480fccd23d203396b9f3/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3536, 11417, 3536, 22718, 18, 1482, 5554, 16186, 2738, 972, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3536, 11417, 3536, 22718, 18, 1482, 5554, 16186, 2738, 972, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
log.debug("SEGMENT: 0x%x%x, len=%d" % (ff,segtype,seglen))
def __init__(self,file): core.ImageInfo.__init__(self) self.mime = 'image/jpeg' self.type = 'jpeg image'
3845c08405f74954fdc40384fc1fe9cb29572aec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11721/3845c08405f74954fdc40384fc1fe9cb29572aec/jpginfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 768, 4672, 2922, 18, 2040, 966, 16186, 2738, 972, 12, 2890, 13, 365, 18, 11757, 273, 296, 2730, 19, 14423, 11, 365, 18, 723, 273, 296, 14423, 1316, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 768, 4672, 2922, 18, 2040, 966, 16186, 2738, 972, 12, 2890, 13, 365, 18, 11757, 273, 296, 2730, 19, 14423, 11, 365, 18, 723, 273, 296, 14423, 1316, 11, ...
self.pack_start(dimensions_frame, False, False)
self.contents.pack_start(dimensions_frame, False, False)
def __init__(self, image_width = 0, image_height = 0, pixbuf = 0, x = 0, y = 0, width = 0, height = 0, ocr_engines_list = []): super(BoxEditor, self).__init__() self.pixbuf = pixbuf self.image_window = gtk.ScrolledWindow() self.image_window.set_size_request(200, 200) self.image_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.x_spin_button = gtk.SpinButton(gtk.Adjustment(0,0,0,1), 1.0, 0) self.setX(x) self.y_spin_button = gtk.SpinButton(gtk.Adjustment(0,0,0,1), 1.0, 0) self.setY(y) self.width_spin_button = gtk.SpinButton(gtk.Adjustment(0,0,0,1), 1.0, 0) self.setWidth(width) self.height_spin_button = gtk.SpinButton(gtk.Adjustment(0,0,0,1), 1.0, 0) self.setHeight(height) self.make_text_button = self.__makeRadioButton(_('Text'), 'gnome-mime-text') self.make_image_button = self.__makeRadioButton(_('Image'), 'gnome-mime-image', self.make_text_button) box_type_frame = gtk.Frame(_('Type')) box_type_table = gtk.Table(1, 2, True) box_type_table.attach(self.make_text_button, 0, 1, 0, 1) box_type_table.attach(self.make_image_button, 1, 2, 0, 1) box_type_frame.add(box_type_table) self.pack_start(box_type_frame, False, False) self.image_width = image_width self.image_height = image_height self.pack_start(self.image_window, False, False) dimensions_frame = gtk.Frame(_('Bounds')) dimensions_table = gtk.Table(2, 4, True) dimensions_table.attach(gtk.Label(_('X')), 0, 1, 0, 1) dimensions_table.attach(self.x_spin_button, 1, 2, 0, 1) dimensions_table.attach(gtk.Label(_('Y')), 2, 3, 0, 1) dimensions_table.attach(self.y_spin_button, 3, 4, 0, 1) dimensions_table.attach(gtk.Label(_('Width')), 0, 1, 1, 2) dimensions_table.attach(self.width_spin_button, 1, 2, 1, 2) dimensions_table.attach(gtk.Label(_('Height')), 2, 3, 1, 2) dimensions_table.attach(self.height_spin_button, 3, 4, 1, 2) dimensions_frame.add(dimensions_table) self.pack_start(dimensions_frame, False, False) self.setXRange() self.setYRange() self.setWidthRange() self.setHeightRange() self.text_properties_frame = self.__makeOcrProperties(ocr_engines_list) self.add(self.text_properties_frame) self.set_spacing(10) self.show_all()
0aaed0a9481d2dc56c4287a7a5e7804d4fe8ab22 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3764/0aaed0a9481d2dc56c4287a7a5e7804d4fe8ab22/widgetPresenter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1316, 67, 2819, 273, 374, 16, 1316, 67, 4210, 273, 374, 16, 11871, 4385, 273, 374, 16, 619, 273, 374, 16, 677, 273, 374, 16, 1835, 273, 374, 16, 2072, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1316, 67, 2819, 273, 374, 16, 1316, 67, 4210, 273, 374, 16, 11871, 4385, 273, 374, 16, 619, 273, 374, 16, 677, 273, 374, 16, 1835, 273, 374, 16, 2072, ...
self.scope = scope = folder
self.data['scope'] = scope = folder
def setScopeInfos(self, context, request, showbreadcrumbs): """ set scope and all infos related to scope """ browsedpath = request.get('browsedpath', self.browsedpath) # find browser root and rootpath if undefined if self.root is None : if self.rootpath : self.root = aq_inner(self.portal.restrictedTraverse(self.rootpath)) else : root = aq_inner(context) while not INavigationRoot.providedBy(root) : root = aq_inner(root.aq_parent) self.root = root self.rootpath = '/'.join(root.getPhysicalPath()) # find scope if undefined # by default scope = browsedpath or first parent folderish or context if context is a folder scope = self.scope if scope is None : if browsedpath : self.scope = scope = aq_inner(self.portal.restrictedTraverse(browsedpath)) else : folder = aq_inner(context) if not bool(getattr(aq_base(folder), 'isPrincipiaFolderish', False)) : folder = aq_inner(folder.aq_parent) self.scope = scope = folder self.scopetitle = scope.pretty_title_or_id() self.scopetype = scopetype = scope.portal_type self.scopeiconclass = 'contenttype-%s divicon' % scopetype.lower().replace(' ','-') # set browsedpath and browsed_url self.browsedpath = '/'.join(scope.getPhysicalPath()) self.browsed_url = scope.absolute_url() if scope is not self.root : parentscope = aq_inner(scope.aq_parent) self.parentpath = '/'.join(parentscope.getPhysicalPath()) # set breadcrumbs # TODO : use self.catalog if showbreadcrumbs : crumbs = [] item = scope itempath = self.browsedpath while itempath != self.rootpath : crumb = {} crumb['path'] = itempath crumb['title'] = item.title_or_id() crumbs.append(crumb) item = aq_inner(item.aq_parent) itempath = '/'.join(item.getPhysicalPath()) crumbs.reverse() self.breadcrumbs = crumbs
347e94cd476fff654d676c70d876655150dcb18b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9052/347e94cd476fff654d676c70d876655150dcb18b/finder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 3876, 7655, 12, 2890, 16, 819, 16, 590, 16, 2405, 31603, 4672, 3536, 444, 2146, 471, 777, 10626, 3746, 358, 2146, 3536, 324, 492, 730, 803, 273, 590, 18, 588, 2668, 70, 492, 730, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3876, 7655, 12, 2890, 16, 819, 16, 590, 16, 2405, 31603, 4672, 3536, 444, 2146, 471, 777, 10626, 3746, 358, 2146, 3536, 324, 492, 730, 803, 273, 590, 18, 588, 2668, 70, 492, 730, ...
blkt_number = blkt_file[25:28]
blkt_number = blkt_file[-7:-4]
def test_allBlockettes(self): """ Tests all Blockettes. """ # Loop over all files in the blockette-tests directory. for blkt_file in iglob('blockette-tests/blockette*.txt'): # Get blockette number. blkt_number = blkt_file[25:28] # Check whether the blockette class can be loaded. try: __import__('obspy.xseed.blockette.blockette' + blkt_number) except: msg = 'Failed to import blockette', blkt_number raise ImportError(msg) # Parse the file. test_examples = self.parseFile(blkt_file) # The last step is to actually test the conversions to and from # SEED/XSEED for every example in every direction. self.SEEDAndXSEEDConversion(test_examples, blkt_number)
e941ea0353dd1452c064b49107c82f63b66df94a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/e941ea0353dd1452c064b49107c82f63b66df94a/test_blockettes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 454, 1768, 278, 1078, 12, 2890, 4672, 3536, 7766, 87, 777, 3914, 278, 1078, 18, 3536, 468, 9720, 1879, 777, 1390, 316, 326, 1203, 7637, 17, 16341, 1867, 18, 364, 2811, 8629, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 454, 1768, 278, 1078, 12, 2890, 4672, 3536, 7766, 87, 777, 3914, 278, 1078, 18, 3536, 468, 9720, 1879, 777, 1390, 316, 326, 1203, 7637, 17, 16341, 1867, 18, 364, 2811, 8629, ...
print debug_prefix + " " + message
log.write( debug_prefix + ' ' + message + '\n' )
def debug( message ): """ Prints debug message to stdout """ print debug_prefix + " " + message
f28a47ea8502062fdbaf8d5b146e52172b5dbc41 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5365/f28a47ea8502062fdbaf8d5b146e52172b5dbc41/tsfscript.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 12, 883, 262, 30, 3536, 3038, 87, 1198, 883, 358, 3909, 3536, 613, 18, 2626, 12, 1198, 67, 3239, 397, 296, 296, 397, 883, 397, 2337, 82, 11, 262, 225, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 12, 883, 262, 30, 3536, 3038, 87, 1198, 883, 358, 3909, 3536, 613, 18, 2626, 12, 1198, 67, 3239, 397, 296, 296, 397, 883, 397, 2337, 82, 11, 262, 225, 2, -100, -100, -100, -100...
for i in xrange(0, len(revs), window):
for i, window in increasing_windows(0, len(revs)):
def iterate(): for i in xrange(0, len(revs), window): yield 'window', revs[0] < revs[-1], revs[-1] nrevs = [rev for rev in revs[i:min(i+window, len(revs))] if rev in wanted] srevs = list(nrevs) srevs.sort() for rev in srevs: fns = fncache.get(rev) or filter(matchfn, getchange(rev)[3]) yield 'add', rev, fns for rev in nrevs: yield 'iter', rev, None
7cf9670d0f0b52933c484099f84673e88870dbfb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/7cf9670d0f0b52933c484099f84673e88870dbfb/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7401, 13332, 364, 277, 16, 2742, 316, 21006, 67, 13226, 12, 20, 16, 562, 12, 266, 6904, 3719, 30, 2824, 296, 5668, 2187, 5588, 87, 63, 20, 65, 411, 5588, 87, 18919, 21, 6487, 5588, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7401, 13332, 364, 277, 16, 2742, 316, 21006, 67, 13226, 12, 20, 16, 562, 12, 266, 6904, 3719, 30, 2824, 296, 5668, 2187, 5588, 87, 63, 20, 65, 411, 5588, 87, 18919, 21, 6487, 5588, 8...
return(self.__io.read()) return(self.__io.read(len))
return(self.__io.read()) return(self.__io.read(len))
def io_read(self, len = -1): if self.__io == None: return(-1) if len < 0: return(self.__io.read())
1d75c8a822dbe6608e646cdbbeb174a3a4ab49c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/1d75c8a822dbe6608e646cdbbeb174a3a4ab49c0/libxml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2527, 67, 896, 12, 2890, 16, 562, 273, 300, 21, 4672, 309, 365, 16186, 1594, 422, 599, 30, 327, 19236, 21, 13, 309, 562, 411, 374, 30, 327, 12, 2890, 16186, 1594, 18, 896, 10756, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2527, 67, 896, 12, 2890, 16, 562, 273, 300, 21, 4672, 309, 365, 16186, 1594, 422, 599, 30, 327, 19236, 21, 13, 309, 562, 411, 374, 30, 327, 12, 2890, 16186, 1594, 18, 896, 10756, 2, ...
return [newSymbolTable(st, self._filename)
return [_newSymbolTable(st, self._filename)
def __check_children(self, name): return [newSymbolTable(st, self._filename) for st in self._table.children if st.name == name]
60c5edeea14a896235e346266127fdcc094ac287 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/60c5edeea14a896235e346266127fdcc094ac287/symtable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1893, 67, 5906, 12, 2890, 16, 508, 4672, 327, 306, 67, 2704, 5335, 1388, 12, 334, 16, 365, 6315, 3459, 13, 364, 384, 316, 365, 6315, 2121, 18, 5906, 309, 384, 18, 529, 422, 508...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1893, 67, 5906, 12, 2890, 16, 508, 4672, 327, 306, 67, 2704, 5335, 1388, 12, 334, 16, 365, 6315, 3459, 13, 364, 384, 316, 365, 6315, 2121, 18, 5906, 309, 384, 18, 529, 422, 508...
TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
if sys.platform == "win32": TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB) else: TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS)
def CreatePandaVersionFiles(): version1=int(VERSION.split(".")[0]) version2=int(VERSION.split(".")[1]) version3=int(VERSION.split(".")[2]) nversion=version1*1000000+version2*1000+version3 pandaversion_h = PANDAVERSION_H.replace("VERSION1",str(version1)) pandaversion_h = pandaversion_h.replace("VERSION2",str(version2)) pandaversion_h = pandaversion_h.replace("VERSION3",str(version3)) pandaversion_h = pandaversion_h.replace("NVERSION",str(nversion)) checkpandaversion_cxx = CHECKPANDAVERSION_CXX.replace("VERSION1",str(version1)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION2",str(version2)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION3",str(version3)) checkpandaversion_cxx = checkpandaversion_cxx.replace("NVERSION",str(nversion)) checkpandaversion_h = CHECKPANDAVERSION_H.replace("VERSION1",str(version1)) checkpandaversion_h = checkpandaversion_h.replace("VERSION2",str(version2)) checkpandaversion_h = checkpandaversion_h.replace("VERSION3",str(version3)) checkpandaversion_h = checkpandaversion_h.replace("NVERSION",str(nversion)) ConditionalWriteFile('built/include/pandaVersion.h', pandaversion_h) ConditionalWriteFile('built/include/checkPandaVersion.cxx', checkpandaversion_cxx) ConditionalWriteFile('built/include/checkPandaVersion.h', checkpandaversion_h) ConditionalWriteFile("built/tmp/null.cxx","")
285a66ac23cacffced6ea52a82dd4e54c7bcbfb7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8543/285a66ac23cacffced6ea52a82dd4e54c7bcbfb7/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 52, 464, 69, 1444, 2697, 13332, 1177, 21, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 20, 5717, 1177, 22, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 21, 5717, 1177, 23, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 52, 464, 69, 1444, 2697, 13332, 1177, 21, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 20, 5717, 1177, 22, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 21, 5717, 1177, 23, ...
'Sigma'
'Sigma',
def _sys_init_(self, system): return self._name
631b754625caff2d26d2c6f0c51c000b669102c3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/631b754625caff2d26d2c6f0c51c000b669102c3/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9499, 67, 2738, 67, 12, 2890, 16, 2619, 4672, 327, 365, 6315, 529, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9499, 67, 2738, 67, 12, 2890, 16, 2619, 4672, 327, 365, 6315, 529, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
mimetype,_ = mimetypes.guess_type(path, strict=False) if mimetype == None: if os.path.isdir(path) or os.path.islink(path): mimetype = 'directory' if mimetype == None: return None id = self.create(mimetype,path,parent) if mimetype == 'directory': if self.inotify is not None: mask = IN_CREATE | IN_DELETE | IN_MOVED_FROM | IN_MOVED_TO | IN_CHANGED self.inotify.watch(path, mask=mask, auto_add=False, callbacks=(self.notify,id)) return self.store[id]
try: mimetype,_ = mimetypes.guess_type(path, strict=False) if mimetype == None: if os.path.isdir(path) or os.path.islink(path): mimetype = 'directory' if mimetype == None: return None id = self.create(mimetype,path,parent) if mimetype == 'directory': if self.inotify is not None: mask = IN_CREATE | IN_DELETE | IN_MOVED_FROM | IN_MOVED_TO | IN_CHANGED self.inotify.watch(path, mask=mask, auto_add=False, callbacks=(self.notify,id)) return self.store[id] except OSError, msg: """ seems we have some permissions issues along the content path """ self.warning("path %r isn't accessible, error %r", path, msg)
def append(self,path,parent): #print "append", path mimetype,_ = mimetypes.guess_type(path, strict=False) if mimetype == None: if os.path.isdir(path) or os.path.islink(path): mimetype = 'directory' if mimetype == None: return None
5cee4911885b0331af11b43703625bf719eb1f31 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11626/5cee4911885b0331af11b43703625bf719eb1f31/fs_storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 12, 2890, 16, 803, 16, 2938, 4672, 468, 1188, 315, 6923, 3113, 589, 12595, 16, 67, 273, 20369, 15180, 18, 20885, 67, 723, 12, 803, 16, 5490, 33, 8381, 13, 309, 12595, 422, 599, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 12, 2890, 16, 803, 16, 2938, 4672, 468, 1188, 315, 6923, 3113, 589, 12595, 16, 67, 273, 20369, 15180, 18, 20885, 67, 723, 12, 803, 16, 5490, 33, 8381, 13, 309, 12595, 422, 599, ...
l[i] = None l = [x for x in l if x is not None]
l[i] = MISSING_CODE l = [x for x in l if x != MISSING_CODE]
def parsecodes(codes, len=len, range=range): """ Converts code combinations to either a single code integer or a tuple of integers. meta-codes (in angular brackets, e.g. <LR> and <RL>) are ignored. Empty codes or illegal ones are returned as None. """ if not codes: return None l = codes.split('+') if len(l) == 1: return int(l[0],16) for i in range(len(l)): try: l[i] = int(l[i],16) except ValueError: l[i] = None l = [x for x in l if x is not None] if len(l) == 1: return l[0] else: return tuple(l)
bd209ffc3e022448bdaba23959ee9f28891c44ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/bd209ffc3e022448bdaba23959ee9f28891c44ac/gencodec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 7000, 12, 7000, 16, 562, 33, 1897, 16, 1048, 33, 3676, 4672, 225, 3536, 20377, 981, 17265, 358, 3344, 279, 2202, 981, 3571, 578, 279, 3193, 434, 12321, 18, 225, 2191, 17, 7000, 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, 7000, 12, 7000, 16, 562, 33, 1897, 16, 1048, 33, 3676, 4672, 225, 3536, 20377, 981, 17265, 358, 3344, 279, 2202, 981, 3571, 578, 279, 3193, 434, 12321, 18, 225, 2191, 17, 7000, 2...
lchecked=' checked="checked"'
lchecked = ' checked="checked"'
def history(page, pagename, request): # show history as default _ = request.getText
f23aaa071053ca9885d9ca3dea13be3568ea755c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/f23aaa071053ca9885d9ca3dea13be3568ea755c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4927, 12, 2433, 16, 4262, 1069, 16, 590, 4672, 468, 2405, 4927, 487, 805, 389, 273, 590, 18, 588, 1528, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4927, 12, 2433, 16, 4262, 1069, 16, 590, 4672, 468, 2405, 4927, 487, 805, 389, 273, 590, 18, 588, 1528, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
(r'(=)(\s*)([^(),]+)(\s*)(,?)',
(r'(=)(\s*)([^(),]+)(\s*)(,?)',
def analyse_text(text): return 0.05
4ae831b0e4480b67188eb837f8ff674aab40a215 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2885/4ae831b0e4480b67188eb837f8ff674aab40a215/web.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31087, 67, 955, 12, 955, 4672, 327, 374, 18, 6260, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31087, 67, 955, 12, 955, 4672, 327, 374, 18, 6260, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
cm('test.test_pyclbr', ignore=('defined_in',))
cm('test.test_pyclbr')
def test_others(self): cm = self.checkModule
39e2d376cc78754548026969ed2493e4b643f498 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/39e2d376cc78754548026969ed2493e4b643f498/test_pyclbr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 28197, 12, 2890, 4672, 5003, 273, 365, 18, 1893, 3120, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1842, 67, 28197, 12, 2890, 4672, 5003, 273, 365, 18, 1893, 3120, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "apply style"
def doApplyStyle(self): print "apply style" name = str(self.colourScheme.currentText()) print name,self.maxColours palette = brewer.palette(name,self.maxColours) #self.layer.symbols = [makeSymbol(self,rgb) for rgb in palette] self.layer.r = QgsUniqueValueRenderer(QGis.Polygon) self.layer.r.setClassificationField(self.fieldIndex) for k,v in self.gColouring.iteritems(): #self.layer.r.insertValue(k,self.layer.symbols[v-1]) self.layer.r.insertValue(k,makeSymbol(self,palette[v-1],k)) self.layer.setRenderer(self.layer.r) self.iface.mapCanvas().refresh()
ea4c183019c70ea9573c53927563e998884130c0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5997/ea4c183019c70ea9573c53927563e998884130c0/mainDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 7001, 2885, 12, 2890, 4672, 508, 273, 609, 12, 2890, 18, 27408, 9321, 18, 2972, 1528, 10756, 1172, 508, 16, 2890, 18, 1896, 914, 4390, 12127, 273, 324, 266, 2051, 18, 26474, 12, 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, 741, 7001, 2885, 12, 2890, 4672, 508, 273, 609, 12, 2890, 18, 27408, 9321, 18, 2972, 1528, 10756, 1172, 508, 16, 2890, 18, 1896, 914, 4390, 12127, 273, 324, 266, 2051, 18, 26474, 12, 5...
proxy_user=None, proxy_pass=None, debug=2,
proxy_user=None, proxy_pass=None, debug=0,
def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, host=None, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=2, https_connection_factory=None, region=None, path='/'): """ Init method to create a new connection to EC2.
79e16af0d527cddbe636e64250e4bf4eb6c55a1c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1098/79e16af0d527cddbe636e64250e4bf4eb6c55a1c/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2287, 67, 3860, 67, 856, 67, 350, 33, 7036, 16, 2287, 67, 5875, 67, 3860, 67, 856, 33, 7036, 16, 353, 67, 8869, 33, 5510, 16, 1479, 33, 7036, 16, 175...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2287, 67, 3860, 67, 856, 67, 350, 33, 7036, 16, 2287, 67, 5875, 67, 3860, 67, 856, 33, 7036, 16, 353, 67, 8869, 33, 5510, 16, 1479, 33, 7036, 16, 175...
self.assertEquals(self.sink.__grefcount__, 2)
self.assertEquals(self.src.__grefcount__, 2)
def testNoProbe(self): self.event = gst.event_new_eos() gst.debug('created new eos %r, id %x' % ( self.event, id(self.event))) self.assertEquals(self.event.__grefcount__, 1) gst.debug('pushing event on linked pad, no probe') self.assertEquals(self.src.push_event(self.event), True) gst.debug('pushed event on linked pad, no probe') # one refcount is held by our scope self.assertEquals(self.event.__grefcount__, 1) # the event has reffed the sink pad as the src of the event self.assertEquals(self.sink.__grefcount__, 2) # clear it self.event = None self.assertEquals(self.sink.__grefcount__, 1)
fd6a936f24d0100c4e2a19984e355a9298cf8089 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1020/fd6a936f24d0100c4e2a19984e355a9298cf8089/test_pad.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2279, 21042, 12, 2890, 4672, 365, 18, 2575, 273, 314, 334, 18, 2575, 67, 2704, 67, 73, 538, 1435, 314, 334, 18, 4148, 2668, 4824, 394, 425, 538, 738, 86, 16, 612, 738, 92, 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, 1842, 2279, 21042, 12, 2890, 4672, 365, 18, 2575, 273, 314, 334, 18, 2575, 67, 2704, 67, 73, 538, 1435, 314, 334, 18, 4148, 2668, 4824, 394, 425, 538, 738, 86, 16, 612, 738, 92, 11, ...
node.setAttribute("index", i)
node.setAttribute("index", str(i))
def marshall(self, value): """Marshall an option value, return a list of DOM nodes. Initially I tried to use XML-RPC marshalling for this, but besides being far too verbose for this, it didn't fit in with PGBuild.Config's requirements for tag distinctness. """ nodes = [] if type(value) == list or type(value) == tuple: for i in xrange(len(value)): node = self.createElement("item") node.setAttribute("index", i) for child in self.marshall(value[i]): node.appendChild(child) nodes.append(node) else: nodes.append(self.createTextNode(str(value))) return nodes
2d6727610b5f58c66966d7151b5c1d568d038d31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/454/2d6727610b5f58c66966d7151b5c1d568d038d31/Main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1833, 12, 2890, 16, 460, 4672, 3536, 1851, 392, 1456, 460, 16, 327, 279, 666, 434, 4703, 2199, 18, 4378, 6261, 467, 12928, 358, 999, 3167, 17, 8087, 1833, 310, 364, 333, 16, 1496, 324,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1833, 12, 2890, 16, 460, 4672, 3536, 1851, 392, 1456, 460, 16, 327, 279, 666, 434, 4703, 2199, 18, 4378, 6261, 467, 12928, 358, 999, 3167, 17, 8087, 1833, 310, 364, 333, 16, 1496, 324,...
self._variables = []
variables = {}
def __init__(self, mod, verbosity=0): self._tmp_var = {} self._tmp_type = {} ObjDoc.__init__(self, mod, verbosity)
d3395d508175517a8a8289ffc33bd81b4ee231c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/d3395d508175517a8a8289ffc33bd81b4ee231c2/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 681, 16, 11561, 33, 20, 4672, 365, 6315, 5645, 67, 1401, 273, 2618, 365, 6315, 5645, 67, 723, 273, 2618, 18760, 1759, 16186, 2738, 972, 12, 2890, 16, 681...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 681, 16, 11561, 33, 20, 4672, 365, 6315, 5645, 67, 1401, 273, 2618, 365, 6315, 5645, 67, 723, 273, 2618, 18760, 1759, 16186, 2738, 972, 12, 2890, 16, 681...
data = {"wpName": self.username,
data = {"wpName": self.username.encode(self.site.encoding()),
def getCookie(self, remember=True): """Login to wikipedia. remember Remember login (default: True) Returns cookie data if succesful, None otherwise.""" data = {"wpName": self.username, "wpPassword": self.password, "wpLoginattempt": "Aanmelden & Inschrijven", # dutch button label seems to work for all wikis "wpRemember": str(int(bool(remember)))} data = wikipedia.urlencode(data.items()) headers = { "Content-type": "application/x-www-form-urlencoded", "User-agent": "RobHooftWikiRobot/1.0" } pagename = self.site.login_address() if self.site.hostname() in config.authenticate.keys(): response = urllib2.urlopen(urllib2.Request('http://'+self.site.hostname()+pagename, data)) data = response.read() wikipedia.cj.save(wikipedia.COOKIEFILE) return "Ok" else: conn = httplib.HTTPConnection(self.site.hostname()) conn.request("POST", pagename, data, headers) response = conn.getresponse() conn.close()
5ddc188ac9f9b44767c872a4d4b2c0e8c11792c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/5ddc188ac9f9b44767c872a4d4b2c0e8c11792c8/login.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24643, 12, 2890, 16, 11586, 33, 5510, 4672, 3536, 5358, 358, 21137, 18, 225, 11586, 565, 23133, 3925, 261, 1886, 30, 1053, 13, 225, 2860, 3878, 501, 309, 8667, 764, 2706, 16, 599, 3541, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24643, 12, 2890, 16, 11586, 33, 5510, 4672, 3536, 5358, 358, 21137, 18, 225, 11586, 565, 23133, 3925, 261, 1886, 30, 1053, 13, 225, 2860, 3878, 501, 309, 8667, 764, 2706, 16, 599, 3541, ...
used. The numerical values (n,rc,e) are used to determine the
used. The numerical values (n, rc, e) are used to determine the
def varformatstr(self, name, n=None, rc=None, e=None): """ Return a format string which is understood by print et al.
e506ccc2459e6e3948659b0d1b28d9d6b70342e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e506ccc2459e6e3948659b0d1b28d9d6b70342e4/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 569, 2139, 701, 12, 2890, 16, 508, 16, 290, 33, 7036, 16, 4519, 33, 7036, 16, 425, 33, 7036, 4672, 3536, 2000, 279, 740, 533, 1492, 353, 31727, 4773, 635, 1172, 3393, 524, 18, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 569, 2139, 701, 12, 2890, 16, 508, 16, 290, 33, 7036, 16, 4519, 33, 7036, 16, 425, 33, 7036, 4672, 3536, 2000, 279, 740, 533, 1492, 353, 31727, 4773, 635, 1172, 3393, 524, 18, 2, -10...
if releaseMode == "debug": distOption = "-dD"
if branchID is None: s = buildVersion
def doDistribution(releaseMode, workingDir, log, outputDir, buildVersion, buildVersionEscaped, hardhatScript): # Create end-user, developer distributions if perfMode: print "Skipping distribution (Performance Test Run) for " + releaseMode log.write(separator) log.write("Skipping distribution (Performance Test Run) for " + releaseMode + "\n") else: print "Making distribution files for " + releaseMode log.write(separator) log.write("Making distribution files for " + releaseMode + "\n") if releaseMode == "debug": distOption = "-dD" else: distOption = "-D" try: outputList = hardhatutil.executeCommandReturnOutput( [hardhatScript, "-o", os.path.join(outputDir, buildVersion), distOption, buildVersionEscaped]) hardhatutil.dumpOutputList(outputList, log) except hardhatutil.ExternalCommandErrorWithOutputList, e: print "distribution failed", e.exitCode log.write("***Error during distribution***\n") hardhatutil.dumpOutputList(e.outputList, log) forceBuildNextCycle(log, workingDir) raise e except Exception, e: doCopyLog("***Error during distribution building*** ", workingDir, logPath, log) forceBuildNextCycle(log, workingDir) raise e
2a9da97e06fb6ab4a19663aed2faa56d4b212c30 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/2a9da97e06fb6ab4a19663aed2faa56d4b212c30/newchandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 9003, 12, 9340, 2309, 16, 5960, 1621, 16, 613, 16, 21412, 16, 1361, 1444, 16, 1361, 1444, 17208, 16, 7877, 11304, 3651, 4672, 468, 282, 1788, 679, 17, 1355, 16, 8751, 23296, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 9003, 12, 9340, 2309, 16, 5960, 1621, 16, 613, 16, 21412, 16, 1361, 1444, 16, 1361, 1444, 17208, 16, 7877, 11304, 3651, 4672, 468, 282, 1788, 679, 17, 1355, 16, 8751, 23296, 309, ...
def __init__(self, **kwargs):
def __init__(self):
def __init__(self, **kwargs): self.doDispatchFlag = 1 self.__transports = {} self.__recvCbFun = self.__timerCbFun = None apply(self.registerTransports, [], kwargs)
8735aa5e5e72b12d645ad0cc6772914686da5e8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/587/8735aa5e5e72b12d645ad0cc6772914686da5e8b/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 2896, 5325, 4678, 273, 404, 365, 16186, 2338, 4363, 273, 2618, 365, 16186, 18334, 15237, 22783, 273, 365, 16186, 12542, 15237, 22783, 273, 599, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 2896, 5325, 4678, 273, 404, 365, 16186, 2338, 4363, 273, 2618, 365, 16186, 18334, 15237, 22783, 273, 365, 16186, 12542, 15237, 22783, 273, 599, 22...
cmd = cmd + 'where s._Object_key = %s\n' % markerKey
cmd = cmd + 'and s._Object_key = %s\n' % markerKey
def priority8(): # human synonyms of mouse orthologs print 'processing priority 8...%s' % mgi_utils.date() cmd = 'select distinct m._Marker_key, m2 = m2._Marker_key, m._Organism_key, _OrthologOrganism_key = m2._Organism_key ' + \ 'into #orthology1 ' + \ 'from MRK_Marker m, MRK_Marker m2, HMD_Homology h1, HMD_Homology h2, ' + \ 'HMD_Homology_Marker hm1, HMD_Homology_Marker hm2, MGI_Organism s ' + \ 'where m._Organism_key = 1 ' + \ 'and m._Marker_key = hm1._Marker_key ' + \ 'and hm1._Homology_key = h1._Homology_key ' + \ 'and h1._Class_key = h2._Class_key ' + \ 'and h2._Homology_key = hm2._Homology_key ' + \ 'and hm2._Marker_key = m2._Marker_key ' + \ 'and m2._Organism_key = 2 ' + \ 'and m2._Organism_key = s._Organism_key ' if markerKey is not None: cmd = cmd + 'and m._Marker_key = %s\n' % markerKey db.sql(cmd, None) db.sql('create index idx1 on #orthology1(m2)', None) db.sql('create index idx2 on #orthology1(_OrthologOrganism_key)', None) # human synonym cmd = 'select o._Marker_key, o._Organism_key, o._OrthologOrganism_key, label = s.synonym ' + \ 'from #orthology1 o, MGI_SynonymType st, MGI_Synonym s ' + \ 'where st._MGIType_key = 2 ' + \ 'and st._Organism_key = o._OrthologOrganism_key ' + \ 'and st._SynonymType_key = s._SynonymType_key ' + \ 'and o.m2 = s._Object_key ' if markerKey is not None: cmd = cmd + 'where s._Object_key = %s\n' % markerKey writeRecord(db.sql(cmd, 'auto'), 1, 8, 'MY', 'human synonym')
5b92781424868aacee0b2bc18b7096aa7848ce8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/342/5b92781424868aacee0b2bc18b7096aa7848ce8e/mrklabel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4394, 28, 13332, 225, 468, 8672, 27260, 434, 7644, 16208, 12854, 564, 225, 1172, 296, 10632, 4394, 1725, 2777, 9, 87, 11, 738, 312, 10052, 67, 5471, 18, 712, 1435, 225, 1797, 273, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4394, 28, 13332, 225, 468, 8672, 27260, 434, 7644, 16208, 12854, 564, 225, 1172, 296, 10632, 4394, 1725, 2777, 9, 87, 11, 738, 312, 10052, 67, 5471, 18, 712, 1435, 225, 1797, 273, 296, ...
labels = [''] * n
labels = [] if type(n) not in (ListType,TupleType): labels = [''] * n else: for m in n: labels = labels + [''] * m
def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(normData)
2d57ef3fa5f6f2cc84d02f85f0b434b83c665873 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/2d57ef3fa5f6f2cc84d02f85f0b434b83c665873/doughnut.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 55, 18886, 12, 2890, 4672, 468, 3883, 2788, 501, 309, 618, 12, 2890, 18, 892, 13, 316, 261, 19366, 16, 7257, 559, 13, 471, 618, 12, 2890, 18, 892, 63, 20, 5717, 316, 261, 19366...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 55, 18886, 12, 2890, 4672, 468, 3883, 2788, 501, 309, 618, 12, 2890, 18, 892, 13, 316, 261, 19366, 16, 7257, 559, 13, 471, 618, 12, 2890, 18, 892, 63, 20, 5717, 316, 261, 19366...
exts.append( Extension('_Alias', ['alias/_Aliasmodule.c'],
exts.append( Extension('macfs', ['macfsmodule.c', '../Python/getapplbycreator.c'],
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
66bc4a46a7fb3489b8760a3b1faf31bc78b9cc0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66bc4a46a7fb3489b8760a3b1faf31bc78b9cc0f/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
return False
return (False,False)
def check_special_condition(self,cr,uid,reg): # same as pay_and_recon,will be used if check_ids field exists return False
b4a2ee60413b682b4df69b4e10589aa6bee11927 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/b4a2ee60413b682b4df69b4e10589aa6bee11927/event.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 9371, 67, 4175, 12, 2890, 16, 3353, 16, 1911, 16, 1574, 4672, 468, 1967, 487, 8843, 67, 464, 67, 266, 591, 16, 20194, 506, 1399, 309, 866, 67, 2232, 652, 1704, 327, 1083, 2,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 9371, 67, 4175, 12, 2890, 16, 3353, 16, 1911, 16, 1574, 4672, 468, 1967, 487, 8843, 67, 464, 67, 266, 591, 16, 20194, 506, 1399, 309, 866, 67, 2232, 652, 1704, 327, 1083, 2,...
if item is not None and item.isMutating():
if item is not None and item.isDeleting():
def onWatchNotification(cls, op, uuid, names): """ When an item someone's watching has changed, we need to synchronize. """ # Ignore notifications for items being stamped. (We get a lot then, # but the items really aren't consistent. Anyone who cares about an # item kind change should have another way to hear about it: the # detail view explicitly monitors itsKind; that notification, as # well as collection-change notifications that the rest of the app # uses, happen outside isMutating. repoView = wx.GetApp().UIRepositoryView item = repoView.find(uuid, False) if item is not None and item.isMutating(): return itemDict = Block.watchingItems.get(uuid, None) if itemDict is not None: notifications = {} # Collect all the blocks we're supposed to notify about # this item and these attributes for attributeName in names: for block in itemDict.get(attributeName, ()): if not block.ignoreNotifications: # add to (or start) the list of attributes on # this block that we need to notify now. notifications.setdefault(block, [])\ .append(attributeName) # Do the notifications for (block, attrs) in notifications.items(): #logger.debug("Notifying %s of change to '%s'", #debugName(block), "', '".join(attrs)) block._sendItemNotificationAndSynchronize('itemChange', (op, uuid, attrs))
58d47daca4c8713e12bbd8a4e53d4bd77cff53b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/58d47daca4c8713e12bbd8a4e53d4bd77cff53b8/Block.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 5234, 4386, 12, 6429, 16, 1061, 16, 3822, 16, 1257, 4672, 3536, 5203, 392, 761, 18626, 1807, 22917, 711, 3550, 16, 732, 1608, 358, 16978, 18, 3536, 468, 8049, 9208, 364, 1516, 3832,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5234, 4386, 12, 6429, 16, 1061, 16, 3822, 16, 1257, 4672, 3536, 5203, 392, 761, 18626, 1807, 22917, 711, 3550, 16, 732, 1608, 358, 16978, 18, 3536, 468, 8049, 9208, 364, 1516, 3832,...
if type(value) == type(''): parse_format = DHM_FORMAT if (not date_time): return str(value)
def formatLang(self, value, digits=2, date=False,date_time=False, grouping=True, monetary=False): if isinstance(value, (str, unicode)) and not value: return '' if not self.lang_dict_called: self._get_lang_dict() self.lang_dict_called = True
2ad27accfc99c6b9b815492519125016c464ffce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/2ad27accfc99c6b9b815492519125016c464ffce/report_sxw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 7275, 12, 2890, 16, 460, 16, 6815, 33, 22, 16, 1509, 33, 8381, 16, 712, 67, 957, 33, 8381, 16, 12116, 33, 5510, 16, 31198, 33, 8381, 4672, 309, 1549, 12, 1132, 16, 261, 701, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 7275, 12, 2890, 16, 460, 16, 6815, 33, 22, 16, 1509, 33, 8381, 16, 712, 67, 957, 33, 8381, 16, 12116, 33, 5510, 16, 31198, 33, 8381, 4672, 309, 1549, 12, 1132, 16, 261, 701, 1...
print instance.creation_method if instance.creation_method==1:
creation_method = int(instance.creation_method) if creation_method==1:
def create_repo(sender, instance, signal, *args, **kwargs): """Create the mercurial repo""" from hgfront.project.models import Project from hgfront.repo.models import Repo p = Project.objects.get(name_long=instance.project) u = ui.ui() directory = os.path.join(settings.MERCURIAL_REPOS, p.name_short, instance.repo_dirname) if not bool(os.path.isdir(directory)): print instance.creation_method if instance.creation_method==1: hg.repository(u, directory , create=True) return True elif instance.creation_method==2: hg.clone(u, str(instance.repo_url), directory, True) return True else: raise ValueError("Invalid Creation Method") else: raise ValueError("Invalid: %s already exists for this project" % instance.repo_dirname)
9954fda0b750b47afab053b0fc8022fbe97b838b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14843/9954fda0b750b47afab053b0fc8022fbe97b838b/signals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 7422, 12, 15330, 16, 791, 16, 4277, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 1684, 326, 4045, 1397, 649, 3538, 8395, 628, 22576, 10211, 18, 4406, 18, 7665, 1930, 5420, 628, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 7422, 12, 15330, 16, 791, 16, 4277, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 1684, 326, 4045, 1397, 649, 3538, 8395, 628, 22576, 10211, 18, 4406, 18, 7665, 1930, 5420, 628, ...
if self.id == 'qx.xml.Document': pass
def getNodeDeps(node, inFunction=True): ltime = rtime = [] # distinction is in the depsItems that populate this array self._analyzeClassDepsNode(node, ltime, rtime, inFunction, variants, recurse=False) return ltime
ef64703bef4d019c16029db5dfda0796d4f0cdec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/ef64703bef4d019c16029db5dfda0796d4f0cdec/Class.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5973, 14430, 12, 2159, 16, 316, 2083, 33, 5510, 4672, 328, 957, 273, 436, 957, 273, 5378, 225, 468, 2411, 267, 349, 353, 316, 326, 8740, 3126, 716, 6490, 333, 526, 365, 6315, 304, 9508...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5973, 14430, 12, 2159, 16, 316, 2083, 33, 5510, 4672, 328, 957, 273, 436, 957, 273, 5378, 225, 468, 2411, 267, 349, 353, 316, 326, 8740, 3126, 716, 6490, 333, 526, 365, 6315, 304, 9508...
'move_ids': fields.many2many('stock.move', 'picking_move_wizard_rel', 'picking_move_wizard_id', 'move_id', 'Move lines',required=True), 'address_id' : fields.many2one('res.partner.address', 'Dest. Address',invisible=True), 'picking_id': fields.many2one('stock.picking', 'Packing list', select=True,invisible=True), } _defaults={ 'picking_id':_get_picking, 'address_id':_get_picking_address, } def action_move(self,cr,uid,ids,context=None): move_obj=self.pool.get('stock.move') picking_obj=self.pool.get('stock.picking') for act in self.read(cr,uid,ids): move_lines=move_obj.browse(cr,uid,act['move_ids'])
'move_ids': fields.many2many('stock.move', 'picking_move_wizard_rel', 'picking_move_wizard_id', 'move_id', 'Move lines', required=True), 'address_id': fields.many2one('res.partner.address', 'Dest. Address', invisible=True), 'picking_id': fields.many2one('stock.picking', 'Packing list', select=True, invisible=True), } _defaults = { 'picking_id': _get_picking, 'address_id': _get_picking_address, } def action_move(self, cr, uid, ids, context=None): move_obj = self.pool.get('stock.move') picking_obj = self.pool.get('stock.picking') for act in self.read(cr, uid, ids): move_lines = move_obj.browse(cr, uid, act['move_ids'])
def _get_picking_address(self,cr,uid,ctx): picking_obj=self.pool.get('stock.picking') if ctx.get('action_id',False): picking=picking_obj.browse(cr,uid,[ctx['action_id']])[0] return picking.address_id and picking.address_id.id or False return False
369221b47101072e094ad2d02fe2edd2b47690aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/369221b47101072e094ad2d02fe2edd2b47690aa/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 11503, 310, 67, 2867, 12, 2890, 16, 3353, 16, 1911, 16, 5900, 4672, 6002, 310, 67, 2603, 33, 2890, 18, 6011, 18, 588, 2668, 15381, 18, 11503, 310, 6134, 309, 1103, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 11503, 310, 67, 2867, 12, 2890, 16, 3353, 16, 1911, 16, 5900, 4672, 6002, 310, 67, 2603, 33, 2890, 18, 6011, 18, 588, 2668, 15381, 18, 11503, 310, 6134, 309, 1103, 18, ...
im1.save(tilefilename,tileformat)
im1.save(tilefilename,self.tiledriver)
def scale_query_to_tile(self, dsquery, dstile, tilefilename=''): """Scales down query dataset to the tile dataset"""
c4960cab782eaaed0d0ec95af10325a5941f605f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10290/c4960cab782eaaed0d0ec95af10325a5941f605f/gdal2tiles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3159, 67, 2271, 67, 869, 67, 15368, 12, 2890, 16, 3780, 2271, 16, 3046, 398, 16, 4769, 3459, 2218, 11, 4672, 3536, 55, 21177, 2588, 843, 3709, 358, 326, 4769, 3709, 8395, 2, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3159, 67, 2271, 67, 869, 67, 15368, 12, 2890, 16, 3780, 2271, 16, 3046, 398, 16, 4769, 3459, 2218, 11, 4672, 3536, 55, 21177, 2588, 843, 3709, 358, 326, 4769, 3709, 8395, 2, -100, -100...
self.view.handle_invalid_name()
self.view.handle_invalid_name(new_name)
def save(self): try: new_name = self.view.get_name() new_color = self.view.get_color() if not self._name_valid(new_name): self.view.handle_invalid_name() return if self._name_in_use(new_name): self.view.handle_used_name() return if self.category is None: self.category = Category(new_name, new_color, True) else: self.category.name = new_name self.category.color = new_color self.db.save_category(self.category) self.view.close() except TimelineIOError, e: self.view.handle_db_error(e)
3be93aa11295d1e8fa928ed6b4e6b02c7cfde8bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5252/3be93aa11295d1e8fa928ed6b4e6b02c7cfde8bf/categoryeditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 4672, 775, 30, 394, 67, 529, 273, 365, 18, 1945, 18, 588, 67, 529, 1435, 394, 67, 3266, 273, 365, 18, 1945, 18, 588, 67, 3266, 1435, 309, 486, 365, 6315, 529, 67, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 4672, 775, 30, 394, 67, 529, 273, 365, 18, 1945, 18, 588, 67, 529, 1435, 394, 67, 3266, 273, 365, 18, 1945, 18, 588, 67, 3266, 1435, 309, 486, 365, 6315, 529, 67, 8...
if CFG_EXTERNAL_AUTHENTICATION.has_key(prefs['login_method']) and not CFG_EXTERNAL_AUTHENTICATION[prefs['login_method']][1]:
if CFG_EXTERNAL_AUTHENTICATION.has_key(prefs['login_method']) and CFG_EXTERNAL_AUTHENTICATION[prefs['login_method']][0]:
def perform_set(email,password, ln, verbose=0): """Perform_set(email,password): edit your account parameters, email and password. """ try: res = run_sql("SELECT id, nickname FROM user WHERE email=%s", (email,)) uid = res[0][0] nickname = res[0][1] except: uid = 0 nickname = "" CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS_LOCAL = CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS prefs = get_user_preferences(uid) if CFG_EXTERNAL_AUTHENTICATION.has_key(prefs['login_method']) and not CFG_EXTERNAL_AUTHENTICATION[prefs['login_method']][1]: CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS_LOCAL = 3 out = websession_templates.tmpl_user_preferences( ln = ln, email = email, email_disabled = (CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS_LOCAL >= 2), password = password, password_disabled = (CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS_LOCAL >= 3), nickname = nickname, ) if len(CFG_EXTERNAL_AUTHENTICATION) > 1: try: uid = run_sql("SELECT id FROM user where email=%s", (email,)) uid = uid[0][0] except: uid = 0 current_login_method = prefs['login_method'] methods = CFG_EXTERNAL_AUTHENTICATION.keys() # Filtering out methods that don't provide user_exists to check if # a user exists in the external auth method before letting him/her # to switch. for method in methods: if CFG_EXTERNAL_AUTHENTICATION[method][0]: try: if not CFG_EXTERNAL_AUTHENTICATION[method][0].user_exists(email): methods.remove(method) except (AttributeError, WebAccessExternalAuthError): methods.remove(method) methods.sort() if len(methods) > 1: out += websession_templates.tmpl_user_external_auth( ln = ln, methods = methods, current = current_login_method, method_disabled = (CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS >= 4) ) try: current_group_records = prefs['websearch_group_records'] except KeyError: current_group_records = 10 try: show_latestbox = prefs['websearch_latestbox'] except KeyError: show_latestbox = True try: show_helpbox = prefs['websearch_helpbox'] except KeyError: show_helpbox = True out += websession_templates.tmpl_user_websearch_edit( ln = ln, current = current_group_records, show_latestbox = show_latestbox, show_helpbox = show_helpbox, ) if verbose >= 9: for key, value in prefs.items(): out += "<b>%s</b>:%s<br>" % (key, value) out += perform_display_external_user_settings(prefs, ln) return out
7f2f78daf00c1144cf62358dd5b7d00acc9774cf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/7f2f78daf00c1144cf62358dd5b7d00acc9774cf/webaccount.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 542, 12, 3652, 16, 3664, 16, 7211, 16, 3988, 33, 20, 4672, 3536, 4990, 67, 542, 12, 3652, 16, 3664, 4672, 3874, 3433, 2236, 1472, 16, 2699, 471, 2201, 18, 3536, 225, 775, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 542, 12, 3652, 16, 3664, 16, 7211, 16, 3988, 33, 20, 4672, 3536, 4990, 67, 542, 12, 3652, 16, 3664, 4672, 3874, 3433, 2236, 1472, 16, 2699, 471, 2201, 18, 3536, 225, 775, 3...