rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
def leftDrag(self,event):
def leftDrag(self, event):
def leftDrag(self,event): pass
55ac4fdc2a170bd52fcbe417587721669a976b6f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/55ac4fdc2a170bd52fcbe417587721669a976b6f/test_animation_mode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1652, 2002, 11728, 12, 2890, 16, 871, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1652, 2002, 11728, 12, 2890, 16, 871, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
unattended_contents = re.sub(dummy_medium_re, content, unattended_contents) dummy_path = "C:" dummy_storage_re = r'\bKVM_TEST_STORAGE_DRIVER_PATH\b' storage_driver = os.environ.get('KVM_TEST_virtio_storage_path', '') if re.search(dummy_storage_re, unattended_contents): if self.install_virtio: unattended_contents = re.sub(dummy_storage_re, storage_driver, unattended_contents) else: unattended_contents = re.sub(dummy_storage_re, dummy_path, unattended_contents) dummy_network_re = r'\bKVM_TEST_NETWORK_DRIVER_PATH\b' network_driver = os.environ.get('KVM_TEST_virtio_network_path', '') if re.search(dummy_network_re, unattended_contents): if self.install_virtio: unattended_contents = re.sub(dummy_network_re, network_driver, unattended_contents) else: unattended_contents = re.sub(dummy_network_re, dummy_path, unattended_contents) dummy_nw_install_re = r'\bKVM_TEST_VIRTIO_NETWORK_INSTALLER\b' nw_install = os.environ.get('KVM_TEST_virtio_network_installer', 'help') if re.search(dummy_nw_install_re, unattended_contents): if self.install_virtio: unattended_contents = re.sub(dummy_nw_install_re, nw_install, unattended_contents) else: unattended_contents = re.sub(dummy_nw_install_re, 'help', unattended_contents)
unattended_contents = re.sub(dummy_medium_re, content, unattended_contents) def replace_virtio_key(contents, dummy_re, env): """ Replace a virtio dummy string with contents. If install_virtio is not set, replace it with a dummy string. @param contents: Contents of the unattended file @param dummy_re: Regular expression used to search on the. unattended file contents. @param env: Name of the environment variable. """ dummy_path = "C:" driver = os.environ.get(env, '') if re.search(dummy_re, contents): if self.install_virtio == "yes": if driver.endswith("msi"): driver = 'msiexec /passive /package ' + driver else: try: drive, path = driver.split(":") driver = drive + ":" + re.escape(path) except: pass contents = re.sub(dummy_re, driver, contents) else: contents = re.sub(dummy_re, dummy_path, contents) return contents vdict = {r'\bKVM_TEST_STORAGE_DRIVER_PATH\b': 'KVM_TEST_virtio_storage_path', r'\bKVM_TEST_NETWORK_DRIVER_PATH\b': 'KVM_TEST_virtio_network_path', r'\bKVM_TEST_VIRTIO_NETWORK_INSTALLER\b': 'KVM_TEST_virtio_network_installer_path'} for vkey in vdict: unattended_contents = replace_virtio_key(unattended_contents, vkey, vdict[vkey])
def create_boot_floppy(self): """ Prepares a boot floppy by creating a floppy image file, mounting it and copying an answer file (kickstarts for RH based distros, answer files for windows) to it. After that the image is umounted. """ print "Creating boot floppy"
d245408f9a2fd5877bf4770afc7b97ad08147815 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10349/d245408f9a2fd5877bf4770afc7b97ad08147815/unattended.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 7137, 67, 74, 16884, 2074, 12, 2890, 4672, 3536, 2962, 84, 4807, 279, 4835, 284, 16884, 2074, 635, 4979, 279, 284, 16884, 2074, 1316, 585, 16, 5344, 310, 518, 471, 8933, 392, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7137, 67, 74, 16884, 2074, 12, 2890, 4672, 3536, 2962, 84, 4807, 279, 4835, 284, 16884, 2074, 635, 4979, 279, 284, 16884, 2074, 1316, 585, 16, 5344, 310, 518, 471, 8933, 392, ...
evalString = " _y%dData.SetTuple1(i,_y%d[i])" % (i,i)
evalString = " _y%dData.SetTuple1(i,_y%d[i])" % (i, i)
def setData(self,*dataList): """ Set data to the plot
525240b057c0121c2cab7772950af46d6399ad7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/525240b057c0121c2cab7772950af46d6399ad7e/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7929, 12, 2890, 16, 14, 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, 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, 14, 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, -1...
"error is: %s." % (User.users_file, e))
"error is: %s." % (self.users_filename, e))
def __read_my_entry(self): try: file = open(self.users_file) except IOError, e: logging.critical("There was an error opening the users file (%s). The " "error is: %s." % (User.users_file, e)) raise UserError('Error opening users file') try: lines = file.readlines() except IOError, e: logging.critical("There was an error opening the users file (%s). The " "error is: %s." % (User.users_file, e)) raise UserError('Error reading users file') file.close() for line in lines: entry = line.split(':') if len(entry) != 2: logging.error("There is an invalid entry in the users file: %s. " "Skipping this entry." % line) continue if int(entry[0]) == self._id: self._name = entry[1].strip('\n') return raise InvalidUserIdError(user_id)
f42a194fdebca5d19e0277d35955d7040cb0756d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2803/f42a194fdebca5d19e0277d35955d7040cb0756d/user.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 896, 67, 4811, 67, 4099, 12, 2890, 4672, 775, 30, 585, 273, 1696, 12, 2890, 18, 5577, 67, 768, 13, 1335, 8340, 16, 425, 30, 2907, 18, 28000, 2932, 9828, 1703, 392, 555, 10890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 896, 67, 4811, 67, 4099, 12, 2890, 4672, 775, 30, 585, 273, 1696, 12, 2890, 18, 5577, 67, 768, 13, 1335, 8340, 16, 425, 30, 2907, 18, 28000, 2932, 9828, 1703, 392, 555, 10890, ...
try: saxparser.setDTDHandler(feedparser) except xml.sax.SAXNotSupportedException: if _debug: sys.stderr.write('using an xml library that does not support DTDHandler (not a big deal)\n') try: saxparser.setEntityResolver(feedparser) except xml.sax.SAXNotSupportedException: if _debug: sys.stderr.write('using an xml library that does not support EntityResolver (not a big deal)\n') encoding_set = (result['encoding'] == xml_encoding) if not encoding_set: bozo_exception = None proposed_encodings = [result['encoding'], xml_encoding, 'utf-8', 'iso-8859-1', 'windows-1252'] tried_encodings = [] for proposed_encoding in proposed_encodings: if proposed_encodings in tried_encodings: continue tried_encodings.append(proposed_encoding) try: data = _changeEncodingDeclaration(data, proposed_encoding) except Exception, bozo_exception: if _debug: sys.stderr.write('character encoding is wrong\n') else: if proposed_encoding != result['encoding']: try: raise CharacterEncodingOverride, "document declared as %s, but parsed as %s" % (result['encoding'], proposed_encoding) except CharacterEncodingOverride, bozo_exception: result['bozo'] = 1 result['bozo_exception'] = bozo_exception result['encoding'] = proposed_encoding encoding_set = 1 break if not encoding_set: result['bozo'] = 1 result['bozo_exception'] = bozo_exception use_strict_parser = 0 if use_strict_parser:
def parse(url_file_stream_or_string, etag=None, modified=None, agent=None, referrer=None): """Parse a feed from a URL, file, stream, or string""" result = FeedParserDict() f = _open_resource(url_file_stream_or_string, etag=etag, modified=modified, agent=agent, referrer=referrer) data = f.read() if hasattr(f, "headers"): if gzip and f.headers.get('content-encoding', '') == 'gzip': try: data = gzip.GzipFile(fileobj=_StringIO(data)).read() except: # some feeds claim to be gzipped but they're not, so we get garbage data = '' if hasattr(f, "info"): info = f.info() result["etag"] = info.getheader("ETag") last_modified = info.getheader("Last-Modified") if last_modified: result["modified"] = _parse_date(last_modified) if hasattr(f, "url"): result["url"] = f.url result["status"] = 200 # default, may be overridden later if hasattr(f, "status"): result["status"] = f.status if hasattr(f, "headers"): result["headers"] = f.headers.dict f.close() if result.get("status", 0) == 304: result['feed'] = FeedParserDict() result['entries'] = [] result['debug_message'] = "The feed has not changed since you last checked, so the server sent no data. This is a feature, not a bug!" return result result['encoding'], http_encoding, xml_encoding = _getCharacterEncoding(result.get("headers", {}), data) result['version'], data = _stripDoctype(data) baseuri = result.get('headers', {}).get('content-location', result.get('url')) # try true XML parser first if not _XML_AVAILABLE: if _debug: sys.stderr.write('no xml libraries available\n') use_strict_parser = _XML_AVAILABLE if use_strict_parser: if _debug: sys.stderr.write('using xml library\n') result['bozo'] = 0 feedparser = _StrictFeedParser(baseuri, result['encoding']) if _debug and _debug_never_use_libxml2: sys.stderr.write('not using libxml2 (even if available)\n') additional_parsers = [] else: additional_parsers = ["drv_libxml2"] saxparser = xml.sax.make_parser(additional_parsers) saxparser.setFeature(xml.sax.handler.feature_namespaces, 1) saxparser.setContentHandler(feedparser) saxparser.setErrorHandler(feedparser) try: saxparser.setDTDHandler(feedparser) except xml.sax.SAXNotSupportedException: # libxml2 driver does not support DTDHandler if _debug: sys.stderr.write('using an xml library that does not support DTDHandler (not a big deal)\n') try: saxparser.setEntityResolver(feedparser) except xml.sax.SAXNotSupportedException: # libxml2 driver does not support EntityResolver if _debug: sys.stderr.write('using an xml library that does not support EntityResolver (not a big deal)\n') encoding_set = (result['encoding'] == xml_encoding) if not encoding_set: bozo_exception = None proposed_encodings = [result['encoding'], xml_encoding, 'utf-8', 'iso-8859-1', 'windows-1252'] tried_encodings = [] for proposed_encoding in proposed_encodings: if proposed_encodings in tried_encodings: continue tried_encodings.append(proposed_encoding) try: data = _changeEncodingDeclaration(data, proposed_encoding) except Exception, bozo_exception: if _debug: sys.stderr.write('character encoding is wrong\n') else: if proposed_encoding != result['encoding']: try: raise CharacterEncodingOverride, "document declared as %s, but parsed as %s" % (result['encoding'], proposed_encoding) except CharacterEncodingOverride, bozo_exception: result['bozo'] = 1 result['bozo_exception'] = bozo_exception result['encoding'] = proposed_encoding encoding_set = 1 break if not encoding_set: result['bozo'] = 1 result['bozo_exception'] = bozo_exception use_strict_parser = 0 if use_strict_parser: source = xml.sax.xmlreader.InputSource() source.setByteStream(_StringIO(data)) if hasattr(saxparser, '_ns_stack'): # work around bug in built-in SAX parser (doesn't recognize xml: namespace) # PyXML doesn't have this problem, and it doesn't have _ns_stack either saxparser._ns_stack.append({'http://www.w3.org/XML/1998/namespace':'xml'}) try: saxparser.parse(source) except Exception, e: if _debug: sys.stderr.write('xml parsing failed\n') feedparser.bozo = 1 feedparser.bozo_exception = feedparser.exc or e if feedparser.bozo: # feed is not well-formed XML, fall back on regex-based parser result['bozo'] = 1 result['bozo_exception'] = feedparser.bozo_exception use_strict_parser = 0 if not use_strict_parser: if _debug: sys.stderr.write('using regexes, now you have two problems\n') feedparser = _LooseFeedParser(baseuri, result['encoding']) feedparser.feed(data) result['feed'] = feedparser.feeddata result['entries'] = feedparser.entries result['version'] = result['version'] or feedparser.version return result
99200d105c483d0627b0c87195d2d3372fe4ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/99200d105c483d0627b0c87195d2d3372fe4ba91/feedparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 718, 67, 768, 67, 3256, 67, 280, 67, 1080, 16, 13655, 33, 7036, 16, 4358, 33, 7036, 16, 4040, 33, 7036, 16, 14502, 33, 7036, 4672, 3536, 3201, 279, 4746, 628, 279, 1976, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 718, 67, 768, 67, 3256, 67, 280, 67, 1080, 16, 13655, 33, 7036, 16, 4358, 33, 7036, 16, 4040, 33, 7036, 16, 14502, 33, 7036, 4672, 3536, 3201, 279, 4746, 628, 279, 1976, 16...
for ifo,name,version,start,end in tmpDQSeg:
for ifo,name,version,start,end in self.resultList:
def fetchInformation(self,triggerTime=None,window=300,version=99): """ This method is responsible for queries to the data server. The results of the query become an internal list that can be converted into an HTML table. The arguments allow you to query with trigger time of interest and to change the window with each call if desired. The version argument will fetch segments with that version or higher. """ if triggerTime==int(-1): os.stdout.write("Specify trigger time please.\n") return else: self.triggerTime = int(triggerTime) try: connection=None serverURL=self.serverURL.strip("ldbd://") connection=segmentdb_utils.setup_database(serverURL) except Exception, errMsg: sys.stderr.write("Error connection to %s\n"\ %(serverURL)) sys.stderr.write("Error Message :\t %s\n"%(str(errMsg))) self.resultList=list() return try: engine=query_engine.LdbdQueryEngine(connection) gpsEnd=int(triggerTime)+int(window) gpsStart=int(triggerTime)-int(window) sqlString=self.dqvQuery%(version,gpsEnd,gpsStart) queryResult=engine.query(sqlString) self.resultList=queryResult except Exception, errMsg: sys.stderr.write("Query failed %s \n"%(self.serverURL)) sys.stdout.write("Error fetching query results at %s.\n"%(triggerTime)) sys.stderr.write("Error message seen: %s\n"%(str(errMsg))) sys.stderr.write("Query Tried: \n %s \n"%(sqlString)) return engine.close() #Coalesce the segments for each DQ flag #Reparse the information tmpDQSeg=self.resultList newDQSeg=list() if tmpDQSeg.__len__() > 0: #Obtain list of all flags uniqSegmentName=list() for ifo,name,version,start,end in tmpDQSeg: if not uniqSegmentName.__contains__((ifo,name,version)): uniqSegmentName.append((ifo,name,version)) #Save textKey for all uniq segments combos for uifo,uname,uversion in uniqSegmentName: segmentIntervals=list() #Extra segments based on uniq textKey for ifo,name,version,start,end in tmpDQSeg: if (uifo,uname,uversion)==(ifo,name,version): segmentIntervals.append((start,end)) segmentIntervals.sort() #Coalesce those segments newStyle=bool(True) if newStyle: newSegmentIntervals=self.__merge__(segmentIntervals) else: newSegmentIntervals=segmentIntervals #Write them to the object which we will return for newStart,newStop in newSegmentIntervals: newDQSeg.append([uifo,uname,uversion,newStart,newStop]) del segmentIntervals #Save the final result self.resultList=newDQSeg.sort()
3684fe51b66eea122e194da773554d201e0ff5c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/3684fe51b66eea122e194da773554d201e0ff5c9/fu_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 5369, 12, 2890, 16, 10668, 950, 33, 7036, 16, 5668, 33, 19249, 16, 1589, 33, 2733, 4672, 3536, 1220, 707, 353, 14549, 364, 6218, 358, 326, 501, 1438, 18, 225, 1021, 1686, 434, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 5369, 12, 2890, 16, 10668, 950, 33, 7036, 16, 5668, 33, 19249, 16, 1589, 33, 2733, 4672, 3536, 1220, 707, 353, 14549, 364, 6218, 358, 326, 501, 1438, 18, 225, 1021, 1686, 434, 32...
h = d.GetDialogItemAsControl(3)
h = d.GetDialogItemAsControl(3)
def AskPassword(prompt, default='', id=264): """Display a PROMPT string and a text entry field with a DEFAULT string. The string is displayed as bullets only. Return the contents of the text entry field when the user clicks the OK button or presses Return. Return None when the user clicks the Cancel button. If omitted, DEFAULT is empty. The PROMPT and DEFAULT strings, as well as the return value, can be at most 255 characters long. """ d = GetNewDialog(id, -1) if not d: print "Can't get DLOG resource with id =", id return h = d.GetDialogItemAsControl(3) # STATIC TEXT ITEM <= prompt SetDialogItemText(h, lf2cr(prompt)) h = d.GetDialogItemAsControl(4) # EDIT TEXT ITEM bullets = '\245'*len(default) SetDialogItemText(h, bullets ) d.SelectDialogItemText(4, 999, 999) d.SetDialogDefaultItem(Dialogs.ok) d.SetDialogCancelItem(Dialogs.cancel) string = default oldschedparams = MacOS.SchedParams(0,0) while 1: ready,ev = Evt.WaitNextEvent(Events.everyEvent, 6) if not ready: continue what,msg,when,where,mod = ev if what == 0 : Dlg.DialogSelect(ev) # for blinking caret elif Dlg.IsDialogEvent(ev): if what in (Events.keyDown, Events.autoKey): charcode = msg & Events.charCodeMask if ( mod & Events.cmdKey ): MacOS.SysBeep() continue # don't do cut & paste commands else: if charcode == Events.kReturnCharCode: break elif charcode == Events.kEscapeCharCode: string = None break elif charcode in (Events.kLeftArrowCharCode, Events.kBackspaceCharCode): string = string[:-1] else: string = string + chr(charcode) msg = 0245 # Octal code for bullet ev = (what,msg,when,where,mod) rs, win, item = Dlg.DialogSelect(ev) if item == Dialogs.ok : break elif item == Dialogs.cancel : string = None break elif what == Events.mouseDown: part, win = Win.FindWindow(where) if part == Windows.inDrag and win: win.DragWindow(where, screenbounds) elif part == Windows.inMenuBar: MacOS.HandleEvent(ev) else: MacOS.SysBeep() # Cannot handle selections, unfortunately elif what == Events.updateEvt: MacOS.HandleEvent(ev) apply(MacOS.SchedParams, oldschedparams) return string
60429e055ef92d63347018d239c717d7cc65d174 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/60429e055ef92d63347018d239c717d7cc65d174/EasyDialogs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25747, 3913, 12, 13325, 16, 202, 805, 2218, 2187, 612, 33, 23728, 4672, 3536, 4236, 279, 453, 3942, 1856, 533, 471, 279, 977, 1241, 652, 598, 279, 3331, 533, 18, 1021, 533, 353, 10453, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25747, 3913, 12, 13325, 16, 202, 805, 2218, 2187, 612, 33, 23728, 4672, 3536, 4236, 279, 453, 3942, 1856, 533, 471, 279, 977, 1241, 652, 598, 279, 3331, 533, 18, 1021, 533, 353, 10453, ...
"""amdmt_periodic : | PERIODIC field"""
"""amdmt_periodic : PERIODIC field"""
def p_amdmt_periodic(t): """amdmt_periodic : | PERIODIC field""" #{ AMDMT_PERIODIC $2 } pass
6898a7de9977616782066bab1d86bf5afe481caf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1485/6898a7de9977616782066bab1d86bf5afe481caf/opparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 301, 72, 1010, 67, 6908, 335, 12, 88, 4672, 3536, 301, 72, 1010, 67, 6908, 335, 294, 10950, 21054, 2871, 652, 8395, 3735, 432, 6188, 6152, 67, 28437, 2871, 271, 22, 289, 1342,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 293, 67, 301, 72, 1010, 67, 6908, 335, 12, 88, 4672, 3536, 301, 72, 1010, 67, 6908, 335, 294, 10950, 21054, 2871, 652, 8395, 3735, 432, 6188, 6152, 67, 28437, 2871, 271, 22, 289, 1342,...
header = ''.join(xpath(html % tag, expr))
header = ''.join(xpath(html, expr % tag))
def _toc_from_spine(self, opf): self.toc = toc = TOC() titles = [] headers = [] for item in self.spine: if not item.linear: continue html = item.data title = ''.join(xpath(html, '/h:html/h:head/h:title/text()')) title = COLLAPSE_RE(' ', title.strip()) if title: titles.append(title) headers.append('(unlabled)') for tag in ('h1', 'h2', 'h3', 'h4', 'h5', 'strong'): expr = '/h:html/h:body//h:%s[position()=1]/text()' header = ''.join(xpath(html % tag, expr)) header = COLLAPSE_RE.sub(' ', header.strip()) if header: headers[-1] = header break use = titles if len(titles) > len(set(titles)): use = headers for title, item in izip(use, self.spine): if not item.linear: continue toc.add(title, item.href) return True
f524968ce263965500648526102b3c5a43d0038e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/f524968ce263965500648526102b3c5a43d0038e/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1391, 67, 2080, 67, 1752, 558, 12, 2890, 16, 1061, 74, 4672, 365, 18, 1391, 273, 17919, 273, 8493, 39, 1435, 14693, 273, 5378, 1607, 273, 5378, 364, 761, 316, 365, 18, 1752, 558, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1391, 67, 2080, 67, 1752, 558, 12, 2890, 16, 1061, 74, 4672, 365, 18, 1391, 273, 17919, 273, 8493, 39, 1435, 14693, 273, 5378, 1607, 273, 5378, 364, 761, 316, 365, 18, 1752, 558, ...
A dict containing the result of the retrieve operation.
A list containing the result of the retrieve operation.
def RetrieveAllMembers(self, group_id): """Retrieve all members in the given group.
f24416f49afb909f4e826471cfc70c4d3cdbea45 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10620/f24416f49afb909f4e826471cfc70c4d3cdbea45/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10708, 1595, 6918, 12, 2890, 16, 1041, 67, 350, 4672, 3536, 5767, 777, 4833, 316, 326, 864, 1041, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10708, 1595, 6918, 12, 2890, 16, 1041, 67, 350, 4672, 3536, 5767, 777, 4833, 316, 326, 864, 1041, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
w.insert(0, 1)
w.insert(0, integer.Integer(1))
def prime_powers(start, stop=None): r""" List of all positive primes powers between start and stop-1, inclusive. If the second argument is omitted, returns the primes up to the first argument. EXAMPLES: sage: prime_powers(20) [1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19] sage: len(prime_powers(1000)) 194 sage: len(prime_range(1000)) 168 sage: a = [z for z in range(95,1234) if is_prime_power(z)] sage: b = prime_powers(95,1234) sage: len(b) 194 sage: len(a) 194 sage: a[:10] [97, 101, 103, 107, 109, 113, 121, 125, 127, 128] sage: b[:10] [97, 101, 103, 107, 109, 113, 121, 125, 127, 128] sage: a == b True """ if stop is None: start, stop = 1, int(start) from math import log from bisect import bisect v = prime_range(stop) i = bisect(v, start) if start > 2: if v[i] == start: i -= 1 w = list(v[i:]) else: w = list(v) if start <= 1: w.insert(0, 1) log_stop = log(stop) for p in v: q = p*p n = int(log(stop)/log(p)) if n <= 1: break for i in xrange(1,n): if q >= start: w.append(q) q *= p w.sort() return w
5e743ee4c8ff3bc4960c06e32e0afe1fdfe4e3e0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/5e743ee4c8ff3bc4960c06e32e0afe1fdfe4e3e0/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17014, 67, 23509, 414, 12, 1937, 16, 2132, 33, 7036, 4672, 436, 8395, 987, 434, 777, 6895, 846, 4485, 7602, 414, 3086, 787, 471, 2132, 17, 21, 16, 13562, 18, 225, 971, 326, 2205, 1237,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17014, 67, 23509, 414, 12, 1937, 16, 2132, 33, 7036, 4672, 436, 8395, 987, 434, 777, 6895, 846, 4485, 7602, 414, 3086, 787, 471, 2132, 17, 21, 16, 13562, 18, 225, 971, 326, 2205, 1237,...
title = u'Check and &Repair',
title = u'C&heck and Repair',
def makeVisibleHourMenuItems(parcel): """ Create the 'Visible Hours' submenu. Should look like: Automatic --------- 5 hours 6 hours
0f34bfb39c65fb7fde6515f91e68765902a9d99c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/0f34bfb39c65fb7fde6515f91e68765902a9d99c/menus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 6207, 13433, 4599, 3126, 12, 1065, 2183, 4672, 3536, 1788, 326, 296, 6207, 670, 4390, 11, 27539, 18, 9363, 2324, 3007, 30, 225, 11809, 4941, 300, 788, 1381, 7507, 1666, 7507, 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, 1221, 6207, 13433, 4599, 3126, 12, 1065, 2183, 4672, 3536, 1788, 326, 296, 6207, 670, 4390, 11, 27539, 18, 9363, 2324, 3007, 30, 225, 11809, 4941, 300, 788, 1381, 7507, 1666, 7507, 2, -1...
address_state = models.USStateField('State',maxlength=5,blank=True, null=True, core=True)
address_state = models.USStateField('State',blank=True, null=True, core=True)
def __str__(self): return '%s Zip Codes that are less than %s miles from %s' % \ (len(self.zipcodes.split(',')), self.distance, self.zip_code)
0ffc962cfe9560f9565ca5549049c88e639607e5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12041/0ffc962cfe9560f9565ca5549049c88e639607e5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 1995, 87, 8603, 8347, 716, 854, 5242, 2353, 738, 87, 312, 1449, 628, 738, 87, 11, 738, 521, 261, 1897, 12, 2890, 18, 4450, 7000, 18, 4939, 12, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 1995, 87, 8603, 8347, 716, 854, 5242, 2353, 738, 87, 312, 1449, 628, 738, 87, 11, 738, 521, 261, 1897, 12, 2890, 18, 4450, 7000, 18, 4939, 12, 21...
if err[0] in errno.errorcode: error = err[1]
if err[0] in (errno.ECONNRESET, errno.ENOTCONN, errno.ESHUTDOWN, \ errno.ECONNABORTED): self.handle_close() return
def handle_error(self): """Called when an exception is raised and not otherwise handled.""" self.cmd_channel.debug("DTPHandler.handle_error()") try: raise # if error is connection related we provide a detailed # information about it except socket.error, err: if err[0] in errno.errorcode: error = err[1] else: error = "Unknown connection error" # an error could occur in case we fail reading / writing # from / to file (e.g. file system gets full) except EnvironmentError, err: error = _strerror(err) except: # some other exception occurred; we don't want to provide # confidential error messages to user so we return a # generic "unknown error" response. logerror(traceback.format_exc()) error = "Unknown error" self.cmd_channel.respond("426 %s; transfer aborted." %error) self.close()
08a44a0f4f817f270bef740e82e4911e8e40f8fd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/08a44a0f4f817f270bef740e82e4911e8e40f8fd/ftpserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1636, 12, 2890, 4672, 3536, 8185, 1347, 392, 1520, 353, 11531, 471, 486, 3541, 7681, 12123, 365, 18, 4172, 67, 4327, 18, 4148, 2932, 9081, 52, 1503, 18, 4110, 67, 1636, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1636, 12, 2890, 4672, 3536, 8185, 1347, 392, 1520, 353, 11531, 471, 486, 3541, 7681, 12123, 365, 18, 4172, 67, 4327, 18, 4148, 2932, 9081, 52, 1503, 18, 4110, 67, 1636, 1435, ...
if not isinstance(targetpath, unicode): encoding = detect(targetpath)['encoding'] try: targetpath = targetpath.decode(encoding) except: targetpath = targetpath.decode('utf-8', 'replace') targetpath = targetpath.encode(filesystem_encoding)
def _extract_member(self, member, targetpath, pwd): """Extract the ZipInfo object 'member' to a physical file on the path targetpath. """ # build the destination pathname, replacing # forward slashes to platform specific separators. if targetpath[-1:] == "/": targetpath = targetpath[:-1]
90bf890e10e1b94de2516aed57e6ff57395a5843 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/90bf890e10e1b94de2516aed57e6ff57395a5843/zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8004, 67, 5990, 12, 2890, 16, 3140, 16, 1018, 803, 16, 14720, 4672, 3536, 4976, 326, 8603, 966, 733, 296, 5990, 11, 358, 279, 11640, 585, 603, 326, 589, 1018, 803, 18, 3536, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8004, 67, 5990, 12, 2890, 16, 3140, 16, 1018, 803, 16, 14720, 4672, 3536, 4976, 326, 8603, 966, 733, 296, 5990, 11, 358, 279, 11640, 585, 603, 326, 589, 1018, 803, 18, 3536, 468, ...
date.XLALGreenwichMeanSiderealTime(gps)
date.XLALGreenwichMeanSiderealTime(sim.get_peak(instrument))
def hrss_in_instrument(sim, instrument): """ Given an injection and an instrument, compute and return the h_rss of the injection as should be observed in the instrument. That is, project the waveform onto the instrument, and return the root integrated strain squared. """ if sim.coordinates != "EQUATORIAL": raise ValueError, sim.coordinates detector = inject.cached_detector[inject.prefix_to_name[instrument]] gps = { "H1": date.LIGOTimeGPS(sim.h_peak_time, sim.h_peak_time_ns), "H2": date.LIGOTimeGPS(sim.h_peak_time, sim.h_peak_time_ns), "L1": date.LIGOTimeGPS(sim.l_peak_time, sim.l_peak_time_ns) }[instrument] fplus, fcross = inject.XLALComputeDetAMResponse( detector.response, sim.longitude, # ra sim.latitude, # dec sim.polarization, date.XLALGreenwichMeanSiderealTime(gps) ) return abs(fplus) * sim.hrss
38fd7d077f44c411b43d42667ddb342e953966a5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/38fd7d077f44c411b43d42667ddb342e953966a5/SimBurstUtils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15407, 1049, 67, 267, 67, 22818, 12, 9812, 16, 10353, 4672, 3536, 16803, 392, 10380, 471, 392, 10353, 16, 3671, 471, 327, 326, 366, 67, 25151, 434, 326, 10380, 487, 1410, 506, 12117, 316...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15407, 1049, 67, 267, 67, 22818, 12, 9812, 16, 10353, 4672, 3536, 16803, 392, 10380, 471, 392, 10353, 16, 3671, 471, 327, 326, 366, 67, 25151, 434, 326, 10380, 487, 1410, 506, 12117, 316...
self.hboxlayout67.addWidget(self.ok_btn) self.gridlayout.addLayout(self.hboxlayout67,1,0,1,1)
self.hboxlayout65.addWidget(self.ok_btn) self.gridlayout.addLayout(self.hboxlayout65,1,0,1,1)
def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,917,661).size()).expandedTo(UserPrefsDialog.minimumSizeHint()))
752b48c67dcf97437d2cb83fa267b09487665da0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/752b48c67dcf97437d2cb83fa267b09487665da0/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 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, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
...<a href=" ...<a href="
...<a href=" ...<a href="
def consume_digest(self): digest = list(self.digest) del self.digest[:] return digest
f0b04506a5c04612b3f8b659e09d5165d893bbef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12308/f0b04506a5c04612b3f8b659e09d5165d893bbef/digest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7865, 67, 10171, 12, 2890, 4672, 5403, 273, 666, 12, 2890, 18, 10171, 13, 1464, 365, 18, 10171, 10531, 65, 327, 5403, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7865, 67, 10171, 12, 2890, 4672, 5403, 273, 666, 12, 2890, 18, 10171, 13, 1464, 365, 18, 10171, 10531, 65, 327, 5403, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
archive_test_name = '%s/%s-actual%s' % (self._options.archive_name, test_basename, suffix)
archive_test_name = 'layout-test-results/%s-actual%s' % (test_basename, suffix)
def _ExtractAndAddNewBaselines(self, archive_file): """Extract new baselines from archive and add them to SVN repository.
a8cca2e7f89f106d5b2cdf9f818191a14c4afb8b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a8cca2e7f89f106d5b2cdf9f818191a14c4afb8b/rebaseline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4976, 1876, 986, 1908, 11494, 14567, 12, 2890, 16, 5052, 67, 768, 4672, 3536, 4976, 394, 2580, 14567, 628, 5052, 471, 527, 2182, 358, 29537, 50, 3352, 18, 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, 0, 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, 4976, 1876, 986, 1908, 11494, 14567, 12, 2890, 16, 5052, 67, 768, 4672, 3536, 4976, 394, 2580, 14567, 628, 5052, 471, 527, 2182, 358, 29537, 50, 3352, 18, 2, -100, -100, -100, -100,...
error ("Expected to find proper channel creation, but error found:");
error ("Expected to find proper channel creation, but error found:")
def test_04 (): # call to initialize a context ctx = vortex.Ctx (); # call to init ctx if not ctx.init (): error ("Failed to init Vortex context"); return False; # call to create a connection conn = vortex.Connection (ctx, host, port); # check connection status after if if not conn.is_ok (): error ("Expected to find proper connection result, but found error. Error code was: " + str(conn.status) + ", message: " + conn.error_msg); return False; # now create a channel channel = conn.open_channel (0, REGRESSION_URI); if not channel: error ("Expected to find proper channel creation, but error found:"); # get first message error = conn.pop_channel_error (); while error: error ("Found error message: " + str (error.code) + ": " + error.msg); # next message error = conn.pop_channel_error (); return False; # check channel installed if conn.num_channels != 2: error ("Expected to find only two channels installed (administrative BEEP channel 0 and test channel) but found: " + conn.num_channels ()); return False; # now close the channel if not channel.close (): error ("Expected to find proper channel close operation, but error found: "); # get first message error = conn.pop_channel_error (); while error: error ("Found error message: " + str (error.code) + ": " + error.msg); # next message error = conn.pop_channel_error (); return False; # check channel installed if conn.num_channels != 1: error ("Expected to find only one channel installed (administrative BEEP channel 0) but found: " + conn.num_channels ()); return False; # now close the connection (already shutted down) conn.close (); ctx.exit () # finish ctx del ctx return True;
44bc361f3b497230e1d601079e2df89085d4b1cd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1306/44bc361f3b497230e1d601079e2df89085d4b1cd/vortex-regression-client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3028, 1832, 30, 468, 745, 358, 4046, 279, 819, 1103, 273, 331, 20873, 18, 6442, 261, 1769, 225, 468, 745, 358, 1208, 1103, 309, 486, 1103, 18, 2738, 1832, 30, 555, 7566, 2925...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3028, 1832, 30, 468, 745, 358, 4046, 279, 819, 1103, 273, 331, 20873, 18, 6442, 261, 1769, 225, 468, 745, 358, 1208, 1103, 309, 486, 1103, 18, 2738, 1832, 30, 555, 7566, 2925...
def makeBound( self ) :
def makeRandomBound( self ) :
def makeBound( self ) : b1 = V3d( random.random(), random.random(), random.random() ) b2 = V3d( random.random(), random.random(), random.random() ) bound = Box3d( b1 ) bound.extendBy( b2 ) return bound
4ad6372a07364aefd9c635be6abf8692f532b8cb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9042/4ad6372a07364aefd9c635be6abf8692f532b8cb/BoundedKDTree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 8529, 3499, 12, 365, 262, 294, 324, 21, 273, 776, 23, 72, 12, 2744, 18, 9188, 9334, 2744, 18, 9188, 9334, 2744, 18, 9188, 1435, 262, 324, 22, 273, 776, 23, 72, 12, 2744, 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, 1221, 8529, 3499, 12, 365, 262, 294, 324, 21, 273, 776, 23, 72, 12, 2744, 18, 9188, 9334, 2744, 18, 9188, 9334, 2744, 18, 9188, 1435, 262, 324, 22, 273, 776, 23, 72, 12, 2744, 18, ...
items = self.filter(pk_in=pk)
items = self.filter(pk__in=pk)
def update_index(self, pk=None): if pk is not None: if isinstance(pk, (list,tuple)): items = self.filter(pk_in=pk) else: items = self.filter(pk=pk) items[0]._index.all().delete() else: items = self.all() model_type = ContentType.objects.get_for_model(self.model) Index.objects.filter(content_type__pk=model_type.id).delete() IW = {} for item in items: for field, weight in self._fields.items(): for w in set(getattr(item, field).lower().split(' ')): if w and w not in FTS_STOPWORDS[self.language_code]: p = Stemmer(self.language_code) w = p(w) try: iw = IW[w]; except KeyError: iw = IndexWord.objects.get_or_create(word=w)[0] IW[w] = iw i = Index(content_object=item, word=iw) i.save()
4aca2d99d175f9e670328464582c199d146cf07b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11001/4aca2d99d175f9e670328464582c199d146cf07b/simple.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 1615, 12, 2890, 16, 2365, 33, 7036, 4672, 309, 2365, 353, 486, 599, 30, 309, 1549, 12, 5465, 16, 261, 1098, 16, 8052, 3719, 30, 1516, 273, 365, 18, 2188, 12, 5465, 972, 267...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 1615, 12, 2890, 16, 2365, 33, 7036, 4672, 309, 2365, 353, 486, 599, 30, 309, 1549, 12, 5465, 16, 261, 1098, 16, 8052, 3719, 30, 1516, 273, 365, 18, 2188, 12, 5465, 972, 267...
self.thread_loop_queue ((self.sync_stdin, ()))
self.thread_loop_queue ((self.sync_stdin_close, ()))
def thread_loop_init (self): self.select_trigger_log ( 'Press CTRL+C to stop synchronous I/O', 'info' ) self.thread_loop_queue ((self.sync_stdin, ())) return True
7eef55564ab71cf446ae63ad89bf2a261c743f8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2577/7eef55564ab71cf446ae63ad89bf2a261c743f8d/sync_stdio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2650, 67, 6498, 67, 2738, 261, 2890, 4672, 365, 18, 4025, 67, 10668, 67, 1330, 261, 296, 11840, 31568, 48, 15, 39, 358, 2132, 12209, 467, 19, 51, 2187, 296, 1376, 11, 262, 365, 18, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2650, 67, 6498, 67, 2738, 261, 2890, 4672, 365, 18, 4025, 67, 10668, 67, 1330, 261, 296, 11840, 31568, 48, 15, 39, 358, 2132, 12209, 467, 19, 51, 2187, 296, 1376, 11, 262, 365, 18, 5...
return sqrt(px * px + py * py)
return (math.sqrt(px * px + py * py), 0.0)
def get_radius(self, id=None, **kwargs): """ This method returns the radius for a detector pixel in the instrument. The radius = sqrt(x^2 + y^2).
b09a2c26c804baf09139369e68b5e56399eaea1e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/762/b09a2c26c804baf09139369e68b5e56399eaea1e/instrument.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11282, 12, 2890, 16, 612, 33, 7036, 16, 2826, 4333, 4672, 3536, 1220, 707, 1135, 326, 5725, 364, 279, 13826, 4957, 316, 326, 10353, 18, 1021, 5725, 273, 5700, 12, 92, 66, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11282, 12, 2890, 16, 612, 33, 7036, 16, 2826, 4333, 4672, 3536, 1220, 707, 1135, 326, 5725, 364, 279, 13826, 4957, 316, 326, 10353, 18, 1021, 5725, 273, 5700, 12, 92, 66, 22, ...
except:
except TypeError:
def span(gens, base_ring=None, check=True, already_echelonized=False): """ Return the $R$-span of gens (a list of vectors) where R = base_ring. EXAMPLES: sage: V = span([[1,2,5], [2,2,2]], QQ); V Vector space of degree 3 and dimension 2 over Rational Field Basis matrix: [ 1 0 -3] [ 0 1 4] sage: span([V.gen(0)], QuadraticField(-7,'a')) Vector space of degree 3 and dimension 1 over Number Field in a with defining polynomial x^2 + 7 Basis matrix: [ 1 0 -3] sage: span([[1,2,3], [2,2,2], [1,2,5]], GF(2)) Vector space of degree 3 and dimension 1 over Finite Field of size 2 Basis matrix: [1 0 1] """ if base_ring is None: R = self.base_ring() else: R = base_ring if not isinstance(R, principal_ideal_domain.PrincipalIdealDomain): raise TypeError, "The base_ring (= %s) must be a principal ideal domain."%R if len(gens) == 0: return FreeModule(R, 0) else: x = gens[0] if isinstance(x,(list,tuple)): try: gens = [ [ R(c) for c in v ] for v in gens ] except: R = R.fraction_field() try: gens = [ [ R(c) for c in v ] for v in gens ] except: raise ValueError, \ "The elements of gens (= %s) must be defined over " + \ "base_ring (= %s) or its field of fractions."%(gens, base_ring) M = FreeModule(R,len(x)) else: M = x.parent() return M.span(gens=gens, base_ring=base_ring, check=check, already_echelonized=already_echelonized)
7f8f223f948e12c9172b086452a98d24651686d8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/7f8f223f948e12c9172b086452a98d24651686d8/free_module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4548, 12, 23730, 16, 1026, 67, 8022, 33, 7036, 16, 866, 33, 5510, 16, 1818, 67, 8987, 292, 265, 1235, 33, 8381, 4672, 3536, 2000, 326, 271, 54, 8, 17, 3969, 434, 314, 773, 261, 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, 4548, 12, 23730, 16, 1026, 67, 8022, 33, 7036, 16, 866, 33, 5510, 16, 1818, 67, 8987, 292, 265, 1235, 33, 8381, 4672, 3536, 2000, 326, 271, 54, 8, 17, 3969, 434, 314, 773, 261, 69, ...
raise NotImplementedError('subclasses must implement this')
return []
def valdoc_links(self): raise NotImplementedError('subclasses must implement this')
017a8cb9d99e3e95b9cce7f876da9039c2e7d303 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/017a8cb9d99e3e95b9cce7f876da9039c2e7d303/apidoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1244, 2434, 67, 7135, 12, 2890, 4672, 1002, 11206, 2668, 1717, 4701, 1297, 2348, 333, 6134, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1244, 2434, 67, 7135, 12, 2890, 4672, 1002, 11206, 2668, 1717, 4701, 1297, 2348, 333, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.body += tw.classdef self.body += tw.initdef
self.extractCode(tw)
def generate(self, sdict, alternateWriter):
e2d87b566667969a1290b56d51a1ba4563446870 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/e2d87b566667969a1290b56d51a1ba4563446870/wsdl2python.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 2890, 16, 272, 1576, 16, 12184, 2289, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 2890, 16, 272, 1576, 16, 12184, 2289, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if job.inputdata._name == 'DQ2Dataset':
if job.inputdata and job.inputdata._name == 'DQ2Dataset':
def prepare(self,app,appsubconfig,appmasterconfig,jobmasterconfig): """prepare the subjob specific configuration"""
6c067c7712a55742b67b8a78becedfcb3c7a6c60 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/6c067c7712a55742b67b8a78becedfcb3c7a6c60/AthenaLCGRTHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 12, 2890, 16, 2910, 16, 11411, 373, 1425, 16, 2910, 7525, 1425, 16, 4688, 7525, 1425, 4672, 3536, 9366, 326, 720, 4688, 2923, 1664, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 12, 2890, 16, 2910, 16, 11411, 373, 1425, 16, 2910, 7525, 1425, 16, 4688, 7525, 1425, 4672, 3536, 9366, 326, 720, 4688, 2923, 1664, 8395, 2, -100, -100, -100, -100, -100, -100, -10...
attachments_dir = os.path.join(self.env_path, 'attachments')
self.attachments_dir = os.path.join(self.env_path, 'attachments')
def setUp(self): self.env_path = os.path.join(tempfile.gettempdir(), 'trac-tempenv') os.mkdir(self.env_path) self.db = InMemoryDatabase() attachments_dir = os.path.join(self.env_path, 'attachments') config = Configuration(None) config.setdefault('attachment', 'max_size', 512) self.env = Mock(config=config, log=logger_factory('test'), get_attachments_dir=lambda: attachments_dir, get_db_cnx=lambda: self.db) self.perm = Mock(assert_permission=lambda x: None, has_permission=lambda x: True)
f6dd111f3138341c34de1877ba14fed73fb04112 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/f6dd111f3138341c34de1877ba14fed73fb04112/attachment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 3074, 67, 803, 273, 1140, 18, 803, 18, 5701, 12, 5814, 768, 18, 588, 5814, 1214, 9334, 296, 313, 1077, 17, 874, 1907, 90, 6134, 1140, 18, 26686, 12, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 3074, 67, 803, 273, 1140, 18, 803, 18, 5701, 12, 5814, 768, 18, 588, 5814, 1214, 9334, 296, 313, 1077, 17, 874, 1907, 90, 6134, 1140, 18, 26686, 12, 2...
return '\n'.join(ret)
ret = '\n'.join(ret) if type(ret) != types.UnicodeType: return unicode(ret, self.encoding) return ret def __str__(self): """ String representation of the entry. """ return unicode(self).encode(self.encoding)
def __str__(self, wrapwidth=78): """ Common string representation of the POEntry and MOEntry objects. """ if self.obsolete: delflag = '#~ ' else: delflag = '' ret = [] # write the msgctxt if any if self.msgctxt is not None: ret += self._str_field("msgctxt", delflag, "", self.msgctxt) # write the msgid ret += self._str_field("msgid", delflag, "", self.msgid) # write the msgid_plural if any if self.msgid_plural: ret += self._str_field("msgid_plural", delflag, "", self.msgid_plural) if self.msgstr_plural: # write the msgstr_plural if any msgstrs = self.msgstr_plural keys = list(msgstrs) keys.sort() for index in keys: msgstr = msgstrs[index] plural_index = '[%s]' % index ret += self._str_field("msgstr", delflag, plural_index, msgstr) else: # otherwise write the msgstr ret += self._str_field("msgstr", delflag, "", self.msgstr) ret.append('') return '\n'.join(ret)
9a4fa4a287c3f4dd49bcca38b79fd26496cc4071 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9209/9a4fa4a287c3f4dd49bcca38b79fd26496cc4071/polib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 16, 2193, 2819, 33, 8285, 4672, 3536, 5658, 533, 4335, 434, 326, 13803, 1622, 471, 16070, 1622, 2184, 18, 3536, 309, 365, 18, 10992, 19513, 30, 1464, 6420, 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, 1001, 701, 972, 12, 2890, 16, 2193, 2819, 33, 8285, 4672, 3536, 5658, 533, 4335, 434, 326, 13803, 1622, 471, 16070, 1622, 2184, 18, 3536, 309, 365, 18, 10992, 19513, 30, 1464, 6420, 273,...
self.storeName(alias or mod)
if alias: self._resolveDots(name) self.storeName(alias) else: self.storeName(mod)
def visitImport(self, node): self.set_lineno(node) for name, alias in node.names: if VERSION > 1: self.emit('LOAD_CONST', None) self.emit('IMPORT_NAME', name) mod = name.split(".")[0] self.storeName(alias or mod)
dcbf87292da508865ba4a1421cb35577f9787bdd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dcbf87292da508865ba4a1421cb35577f9787bdd/pycodegen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 5010, 12, 2890, 16, 756, 4672, 365, 18, 542, 67, 17782, 12, 2159, 13, 364, 508, 16, 2308, 316, 756, 18, 1973, 30, 309, 8456, 405, 404, 30, 365, 18, 18356, 2668, 7783, 67, 26411...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 5010, 12, 2890, 16, 756, 4672, 365, 18, 542, 67, 17782, 12, 2159, 13, 364, 508, 16, 2308, 316, 756, 18, 1973, 30, 309, 8456, 405, 404, 30, 365, 18, 18356, 2668, 7783, 67, 26411...
return list(set([r['user'] for r in revs
result = list(set([r['user'] for r in revs
def getAuthors(self, title, revision=None): """Return names of non-bot, non-anon users for non-minor changes of given article (before given revsion). @returns: set of principal authors @rtype: set([unicode]) """
bf941eaf746ddabd5d3c54510943c23b7865476d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/bf941eaf746ddabd5d3c54510943c23b7865476d/mwapidb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14191, 1383, 12, 2890, 16, 2077, 16, 6350, 33, 7036, 4672, 3536, 990, 1257, 434, 1661, 17, 4819, 16, 1661, 17, 304, 265, 3677, 364, 1661, 17, 17364, 3478, 434, 864, 7559, 261, 5771, 86...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14191, 1383, 12, 2890, 16, 2077, 16, 6350, 33, 7036, 4672, 3536, 990, 1257, 434, 1661, 17, 4819, 16, 1661, 17, 304, 265, 3677, 364, 1661, 17, 17364, 3478, 434, 864, 7559, 261, 5771, 86...
(self.chunk_mb, disk, self.memory_mb))
self.chunk_mb, disk, self.memory_mb)
def test_one_disk_chunk(self, disk, chunk): logging.info("testing %d MB files on %s in %d MB memory", (self.chunk_mb, disk, self.memory_mb)) cmd = "%s/disktest -m %d -f %s/testfile.%d -i -S" % \ (self.srcdir, self.chunk_mb, disk, chunk) p = subprocess.Popen(cmd, shell=True) return(p.pid)
1eea256a604f674689fb1ff8191ea88bcf1f13d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/1eea256a604f674689fb1ff8191ea88bcf1f13d3/disktest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 476, 67, 10863, 67, 6551, 12, 2890, 16, 4234, 16, 2441, 4672, 2907, 18, 1376, 2932, 3813, 310, 738, 72, 17897, 1390, 603, 738, 87, 316, 738, 72, 17897, 3778, 3113, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 476, 67, 10863, 67, 6551, 12, 2890, 16, 4234, 16, 2441, 4672, 2907, 18, 1376, 2932, 3813, 310, 738, 72, 17897, 1390, 603, 738, 87, 316, 738, 72, 17897, 3778, 3113, 365, 18, ...
return unicode(self)
return unicode(self).encode('utf-8')
def __str__(self): return unicode(self)
b3ee66c4985bbd05093af6684622cb40abf9e427 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/b3ee66c4985bbd05093af6684622cb40abf9e427/objects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 5252, 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, 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, 701, 972, 12, 2890, 4672, 327, 5252, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self._name = "The fast crystal for %s2 with shape [%d,%d]"%(type[0],l1,l2)
if int(2*l1)%2 == 0: l1_str = "%d"%l1 l2_str = "%d"%l2 else: assert self.cartanType[0] == 'B' and int(2*l2)%2 == 1 l1_str = "%d/2"%int(2*l1) l2_str = "%d/2"%int(2*l2) self._name = "The fast crystal for %s2 with shape [%s,%s]"%(type[0],l1_str,l2_str)
def __init__(self, type, l1, l2): self.delpat = [] self.gampat = [] if not type[1] == 2: raise NotImplementedError if type[0] == 'A': for b in range(l2,-1,-1): for a in range(l1,l2-1,-1): for c in range(a,b-1,-1): a3 = l1-a a2 = l1+l2-a-b a1 = a-c b1 = max(a3,a2-a1); b2 = a1+a3; b3 = min(a2-a3,a1); self.delpat.append([a1,a2,a3]) self.gampat.append([b1,b2,b3]) elif type[0] == 'B' or type[0] == 'C': if type[0] == 'B': [m1, m2] = [l1+l2, l1-l2] else: [m1, m2] = [l1, l2] for b in range(m2,-1,-1): for a in range(m1,m2-1,-1): for c in range(b,a+1): for d in range(c,-1,-1): a1 = c-d a2 = m1+m2+c-a-2*b a3 = m1+m2-a-b a4 = m1-a b1 = max(a4,2*a3-a2,a2-2*a1) b2 = max(a3, a1+a4, a1+2*a3-a2) b3 = min(a2, 2*a2-2*a3+a4, 2*a1+a4) b4 = min(a1, a2-a3, a3-a4) if type[0] == 'B': self.delpat.append([a1,a2,a3,a4]) self.gampat.append([b1,b2,b3,b4]) else: self.gampat.append([a1,a2,a3,a4]) self.delpat.append([b1,b2,b3,b4]) else: raise NotImplementedError
74b48a2c98d3be610d509fe3f598329e84d5ee20 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/74b48a2c98d3be610d509fe3f598329e84d5ee20/fast_crystal_experiment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 618, 16, 328, 21, 16, 328, 22, 4672, 365, 18, 72, 1992, 270, 273, 5378, 365, 18, 75, 931, 270, 273, 5378, 309, 486, 618, 63, 21, 65, 422, 576, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 618, 16, 328, 21, 16, 328, 22, 4672, 365, 18, 72, 1992, 270, 273, 5378, 365, 18, 75, 931, 270, 273, 5378, 309, 486, 618, 63, 21, 65, 422, 576, 30, ...
self.setMaxlag('60')
if self.maxlag == 5: self.setMaxlag(120)
def setSiteinfo(self): params = {'action':'query', 'meta':'siteinfo', 'siprop':'general|namespaces' } self.setMaxlag('60') req = api.APIRequest(self, params) info = req.query() self.setMaxlag() sidata = info['query']['general'] self.siteinfo = {} for item in sidata: self.siteinfo[item] = sidata[item] nsdata = info['query']['namespaces'] self.namespaces = {} for ns in nsdata: nsinfo = nsdata[ns] self.namespaces[nsinfo['id']] = nsinfo if not 'writeapi' in sidata: print "WARNING: Write-API not enabled, you will not be able to edit" version = re.search("\d\.(\d\d)", self.siteinfo['generator']) if not int(version.group(1)) >= 13: # Will this even work on 13? print "WARNING: Some features may not work on older versions of MediaWiki"
303b1fb30187f94bebd077256d4e1acde33dfb70 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10544/303b1fb30187f94bebd077256d4e1acde33dfb70/wiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 4956, 1376, 12, 2890, 4672, 859, 273, 13666, 1128, 11, 2497, 2271, 2187, 296, 3901, 11, 2497, 4256, 1376, 2187, 296, 28477, 1764, 11, 2497, 12259, 96, 16078, 11, 289, 309, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 4956, 1376, 12, 2890, 4672, 859, 273, 13666, 1128, 11, 2497, 2271, 2187, 296, 3901, 11, 2497, 4256, 1376, 2187, 296, 28477, 1764, 11, 2497, 12259, 96, 16078, 11, 289, 309, 365, 18, ...
s.append('\n') s.append('\n')
s.append('\r\n') s.append('\r\n')
def render(self): h=self._headers s=[]
11b2a67e1419ea80c20f06030a12e4740918dc15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/11b2a67e1419ea80c20f06030a12e4740918dc15/Client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 4672, 366, 33, 2890, 6315, 2485, 272, 33, 8526, 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, 1743, 12, 2890, 4672, 366, 33, 2890, 6315, 2485, 272, 33, 8526, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
tags, notag_only = self.get_selected_tags()
tags, notag_only = self.intended_tags
def on_color_changed(self, widget): gtkcolor = widget.get_current_color() strcolor = gtk.color_selection_palette_to_string([gtkcolor]) tags, notag_only = self.get_selected_tags() for t in tags: t.set_attribute("color", strcolor) self.task_tv.refresh() self.tags_tv.refresh()
f18a90ed1f96430110b88e448fc2cdc6d6584463 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/f18a90ed1f96430110b88e448fc2cdc6d6584463/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3266, 67, 6703, 12, 2890, 16, 3604, 4672, 22718, 3266, 273, 3604, 18, 588, 67, 2972, 67, 3266, 1435, 609, 3266, 273, 22718, 18, 3266, 67, 10705, 67, 26474, 67, 869, 67, 1080, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3266, 67, 6703, 12, 2890, 16, 3604, 4672, 22718, 3266, 273, 3604, 18, 588, 67, 2972, 67, 3266, 1435, 609, 3266, 273, 22718, 18, 3266, 67, 10705, 67, 26474, 67, 869, 67, 1080, ...
pager.set_source(lines)
def display_help(self, topic='index', narg=None): if not hasattr(self.ui, 'open_pager'): return
d3ec909839a1b110232d932d0d01a2ed032fae80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5729/d3ec909839a1b110232d932d0d01a2ed032fae80/actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 67, 5201, 12, 2890, 16, 3958, 2218, 1615, 2187, 290, 3175, 33, 7036, 4672, 309, 486, 3859, 12, 2890, 18, 4881, 16, 296, 3190, 67, 24081, 11, 4672, 327, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 67, 5201, 12, 2890, 16, 3958, 2218, 1615, 2187, 290, 3175, 33, 7036, 4672, 309, 486, 3859, 12, 2890, 18, 4881, 16, 296, 3190, 67, 24081, 11, 4672, 327, 2, -100, -100, -100, -100,...
DEBUG(s)
def redraw( self ): """Redraw the screen.""" self.scr.erase() for k, s in enumerate( self.s_hist ): DEBUG(s) if not s: continue self.iy, self.ix = self.scr.getyx() for i in s.split('\x04'): self.echo( i, redraw=False ) if k < len( self.s_hist ) -1: self.scr.addstr( '\n' ) self.iy, self.ix = self.scr.getyx() self.print_line( self.s ) self.scr.refresh() self.statusbar.refresh()
98fd931909afbdb62a662c947572a0fa3d65a4a7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6932/98fd931909afbdb62a662c947572a0fa3d65a4a7/bpython.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16540, 12, 365, 262, 30, 3536, 3715, 1899, 326, 5518, 12123, 365, 18, 24638, 18, 264, 448, 1435, 364, 417, 16, 272, 316, 4241, 12, 365, 18, 87, 67, 11488, 262, 30, 309, 486, 272, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16540, 12, 365, 262, 30, 3536, 3715, 1899, 326, 5518, 12123, 365, 18, 24638, 18, 264, 448, 1435, 364, 417, 16, 272, 316, 4241, 12, 365, 18, 87, 67, 11488, 262, 30, 309, 486, 272, 30,...
['group=', 'subclass=', 'subclass-assert='])
['group=', 'subclass=', 'subclass-assert=', 'iface-quark-prefix='])
def types_to_gtypes(types): return [type_to_gtype(t)[1] for t in types]
43f87b16749e4aed1d02061f26d3e4efca865f55 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8150/43f87b16749e4aed1d02061f26d3e4efca865f55/glib-client-gen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1953, 67, 869, 67, 75, 2352, 12, 2352, 4672, 327, 306, 723, 67, 869, 67, 75, 723, 12, 88, 25146, 21, 65, 364, 268, 316, 1953, 65, 282, 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, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1953, 67, 869, 67, 75, 2352, 12, 2352, 4672, 327, 306, 723, 67, 869, 67, 75, 723, 12, 88, 25146, 21, 65, 364, 268, 316, 1953, 65, 282, 2, -100, -100, -100, -100, -100, -100, -100, ...
self.databasefile, 'profile', self.topography)
self.databasefile, self.topography, 'profile')
def set_database(self, verbose=True): """Create meteorological database Requires - input file - topography - windprofile """ executable = os.path.join(self.utilities_dir, 'SetDbs', 'SetDbs.PUB.exe') logfile = self.basepath + '.SetDbs.log' if verbose: header('Building meteorological database (SetDbs)')
c7ec9d7a361fc0608004df7bff21437c322293dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5868/c7ec9d7a361fc0608004df7bff21437c322293dd/wrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 6231, 12, 2890, 16, 3988, 33, 5510, 4672, 3536, 1684, 5100, 73, 280, 18224, 2063, 225, 16412, 300, 810, 585, 300, 1760, 15669, 300, 17064, 5040, 3536, 282, 9070, 273, 1140, 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, 444, 67, 6231, 12, 2890, 16, 3988, 33, 5510, 4672, 3536, 1684, 5100, 73, 280, 18224, 2063, 225, 16412, 300, 810, 585, 300, 1760, 15669, 300, 17064, 5040, 3536, 282, 9070, 273, 1140, 18, ...
if os.path.exists(key): chooser.set_filename(self.client.get_string(key))
file = self.client.get_string(key) if os.path.exists(file): chooser.set_uri(file)
def setup_chooser(self, key, chooser): """sets up png choosers""" fil = gtk.FileFilter() fil.set_name("PNG Files") fil.add_pattern("*.png") fil.add_pattern("*.PNG") chooser.add_filter(fil) preview = gtk.Image() chooser.set_preview_widget(preview) chooser.connect("update-preview", self.update_preview, preview) try: if os.path.exists(key): chooser.set_filename(self.client.get_string(key)) else: self.client.set_string(BAR_PATTERN_URI, "~") except TypeError: raise "\nKey: "+key+" isn't set.\nRestarting AWN usually solves this issue\n" chooser.connect("selection-changed", self.chooser_changed, key)
260dfb319cbeb03f750cdc46b3e1743c33c7a8aa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8416/260dfb319cbeb03f750cdc46b3e1743c33c7a8aa/awnPreferences.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 2599, 13164, 12, 2890, 16, 498, 16, 5011, 13164, 4672, 3536, 4424, 731, 14476, 24784, 414, 8395, 661, 273, 22718, 18, 29837, 1435, 661, 18, 542, 67, 529, 2932, 23092, 6471, 792...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 2599, 13164, 12, 2890, 16, 498, 16, 5011, 13164, 4672, 3536, 4424, 731, 14476, 24784, 414, 8395, 661, 273, 22718, 18, 29837, 1435, 661, 18, 542, 67, 529, 2932, 23092, 6471, 792...
image = self(letter)
image = self.image(letter)
def fixed_point(self, letter): r""" Returns the fixed point of ``self`` beginning by the given ``letter``.
504ba7b1455ea380dd159b2aa42179a48a8ef384 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/504ba7b1455ea380dd159b2aa42179a48a8ef384/morphism.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5499, 67, 1153, 12, 2890, 16, 9471, 4672, 436, 8395, 2860, 326, 5499, 1634, 434, 12176, 2890, 10335, 8435, 635, 326, 864, 12176, 13449, 68, 8338, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 5499, 67, 1153, 12, 2890, 16, 9471, 4672, 436, 8395, 2860, 326, 5499, 1634, 434, 12176, 2890, 10335, 8435, 635, 326, 864, 12176, 13449, 68, 8338, 2, -100, -100, -100, -100, -100, -100, -...
def __init__(self, master=None):
def __init__(self, master=None, value=None, name=None):
def __init__(self, master=None): """Construct an integer variable.
337487e3b87f887abdb3b47781508c6437cd7e94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/337487e3b87f887abdb3b47781508c6437cd7e94/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 460, 33, 7036, 16, 508, 33, 7036, 4672, 3536, 7249, 392, 3571, 2190, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 460, 33, 7036, 16, 508, 33, 7036, 4672, 3536, 7249, 392, 3571, 2190, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if win32service.__file__.find("_d")>=0:
if os.path.splitext(win32service.__file__)[0].endswith("_d"):
def LocatePythonServiceExe(exeName = None): # Try and find the specified EXE somewhere. If specifically registered, # use it. Otherwise look down sys.path, and the global PATH environment. if exeName is None: if win32service.__file__.find("_d")>=0: exeName = "PythonService_d.exe" else: exeName = "PythonService.exe" # See if it exists as specified if os.path.isfile(exeName): return win32api.GetFullPathName(exeName) baseName = os.path.splitext(os.path.basename(exeName))[0] try: exeName = win32api.RegQueryValue(win32con.HKEY_LOCAL_MACHINE, "Software\\Python\\%s\\%s" % (baseName, sys.winver)) if os.path.isfile(exeName): return exeName raise RuntimeError, "The executable '%s' is registered as the Python " \ "service exe, but it does not exist as specified" \ % exeName except win32api.error: # OK - not there - lets go a-searchin' for path in sys.path: look = os.path.join(path, exeName) if os.path.isfile(look): return win32api.GetFullPathName(look) # Try the global Path. try: return win32api.SearchPath(None, exeName)[0] except win32api.error: msg = "%s is not correctly registered\nPlease locate and run %s, and it will self-register\nThen run this service registration process again." % (exeName, exeName) raise error, msg
488308570bf7b262d7350f993916b31d387b40c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/488308570bf7b262d7350f993916b31d387b40c2/win32serviceutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2851, 340, 15774, 1179, 424, 73, 12, 14880, 461, 273, 599, 4672, 468, 6161, 471, 1104, 326, 1269, 5675, 41, 22234, 18, 225, 971, 21195, 4104, 16, 468, 999, 518, 18, 225, 5272, 2324, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2851, 340, 15774, 1179, 424, 73, 12, 14880, 461, 273, 599, 4672, 468, 6161, 471, 1104, 326, 1269, 5675, 41, 22234, 18, 225, 971, 21195, 4104, 16, 468, 999, 518, 18, 225, 5272, 2324, 25...
if len(user_absroot) == 0: absroot = tempfile.mkdtemp(prefix="abs-" + arch + "-") absroots.append(absroot) print "\nChecking out clean abs tree" for repo in include_paths: print "==>", repo if not os.path.exists(abs_conf_dir + '/supfile.' + repo): print "Cannot find file " + abs_conf_dir + '/supfile.' + repo + ". Aborting..." sys.exit() create_supfile(abs_conf_dir + '/supfile.' + repo, fsup, cvs_tags[arch]) cmd = 'csup -L 0 -r 0 -g -b ' + absroot + ' -c .sup ' + fsup os.system(cmd) else: absroot = user_absroot absroots.append(absroot)
absroot = user_absroot
def print_usage(): print "" print "Usage: check_archlinux [OPTION]" print "" print "Options:" print " --abs-tree=<path> Check specified tree (assumes the abs tree" print " is i686 unless overridden with --arch)" print " --arch=<arch> Use specified arch (e.g. 'x86_64')" print " -g Generate graphical dependency tree(s)" print " -h, --help Show this help and exit" print "" print "Examples:" print "\n Check all arches and do fresh cvs checkouts:" print " check_archlinux" print "\n Check x_86_64 only and do fresh cvs checkout:" print " check_archlinux --arch=x86_64" print "\n Check existing i686 abs tree:" print " check_archlinux --abs-tree=/var/abs" print "\n Check existing x86_64 abs tree and also generate dep tree image:" print " check_archlinux --abs-tree=/var/abs --arch=x86_64 -g" print ""
5cf896673b4b73d6591f52acbcba5a1dfc803f6c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3911/5cf896673b4b73d6591f52acbcba5a1dfc803f6c/check_archlinux.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 9167, 13332, 1172, 1408, 1172, 315, 5357, 30, 866, 67, 991, 20132, 306, 7425, 4279, 1172, 1408, 1172, 315, 1320, 2773, 1172, 315, 225, 1493, 5113, 17, 3413, 27127, 803, 34, 664...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 9167, 13332, 1172, 1408, 1172, 315, 5357, 30, 866, 67, 991, 20132, 306, 7425, 4279, 1172, 1408, 1172, 315, 1320, 2773, 1172, 315, 225, 1493, 5113, 17, 3413, 27127, 803, 34, 664...
if sys.platform.startswith("win"): nl = True else: nl = False content = RunShell(["svn", "cat", filename], universal_newlines=nl)
content = RunShell(["svn", "cat", filename])
def GetBaseFile(self, filename): status = RunShell(["svn", "status", "--ignore-externals", filename]) if not status: StatusUpdate("svn status returned no output for %s" % filename) sys.exit(False) status_lines = status.splitlines() # If file is in a cl, the output will begin with # "\n--- Changelist 'cl_name':\n". See # http://svn.collab.net/repos/svn/trunk/notes/changelist-design.txt if (len(status_lines) == 3 and not status_lines[0] and status_lines[1].startswith("--- Changelist")): status = status_lines[2] else: status = status_lines[0] # If a file is copied its status will be "A +", which signifies # "addition-with-history". See "svn st" for more information. We need to # upload the original file or else diff parsing will fail if the file was # edited. if ((status[0] == "A" and status[3] != "+") or (status[0] == " " and status[1] == "M")): # property changed content = "" elif (status[0] in ("M", "D", "R") or (status[0] == "A" and status[3] == "+")): mimetype = RunShell(["svn", "-rBASE", "propget", "svn:mime-type", filename], silent_ok=True) if mimetype.startswith("application/octet-stream"): content = "" else: # On Windows svn cat gives \r\n, and calling subprocess.Popen turns # them into \r\r\n, so use universal newlines to avoid the extra \r. if sys.platform.startswith("win"): nl = True else: nl = False content = RunShell(["svn", "cat", filename], universal_newlines=nl) keywords = RunShell(["svn", "-rBASE", "propget", "svn:keywords", filename], silent_ok=True) if keywords: content = self._CollapseKeywords(content, keywords) else: StatusUpdate("svn status returned unexpected output: %s" % status) sys.exit(False) return content, status[0:5]
703e95c1aa72e7cdf399933bd7a0267d5b60f5ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/476/703e95c1aa72e7cdf399933bd7a0267d5b60f5ec/upload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2171, 812, 12, 2890, 16, 1544, 4672, 1267, 273, 1939, 13220, 3816, 6, 31505, 3113, 315, 2327, 3113, 5238, 6185, 17, 338, 798, 1031, 3113, 1544, 5717, 309, 486, 1267, 30, 2685, 1891,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2171, 812, 12, 2890, 16, 1544, 4672, 1267, 273, 1939, 13220, 3816, 6, 31505, 3113, 315, 2327, 3113, 5238, 6185, 17, 338, 798, 1031, 3113, 1544, 5717, 309, 486, 1267, 30, 2685, 1891,...
assert a.b == desired
assert_equal(a.b,desired)
def generic_new(self, code, desired): args = ['a'] a = foo() res = inline_tools.inline(code,args) assert a.b == desired
1a2e32f8d57897230b5265290279639d73dda37e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/1a2e32f8d57897230b5265290279639d73dda37e/test_scxx_object.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5210, 67, 2704, 12, 2890, 16, 981, 16, 6049, 4672, 833, 273, 10228, 69, 3546, 279, 273, 8431, 1435, 400, 273, 6370, 67, 6642, 18, 10047, 12, 710, 16, 1968, 13, 1815, 279, 18, 70, 422...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5210, 67, 2704, 12, 2890, 16, 981, 16, 6049, 4672, 833, 273, 10228, 69, 3546, 279, 273, 8431, 1435, 400, 273, 6370, 67, 6642, 18, 10047, 12, 710, 16, 1968, 13, 1815, 279, 18, 70, 422...
if attroffs in map and hasattr(object, map[attroffs]): return getattr(object, map[attroffs])
if attroffs in attrmap and hasattr(obj, attrmap[attroffs]): return getattr(obj, attrmap[attroffs])
def _IDC_GetAttr(object, map, attroffs): """ Internal function to generically get object attributes Do not use unless you know what you are doing """ if attroffs in map and hasattr(object, map[attroffs]): return getattr(object, map[attroffs]) else: str = "attribute with offset %d not found, check the offset and report the problem" % attroffs raise KeyError, str
244a3cd02a580c0095170004ec30e922f0d1a8a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6984/244a3cd02a580c0095170004ec30e922f0d1a8a6/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 734, 39, 67, 967, 3843, 12, 1612, 16, 852, 16, 2403, 303, 1403, 87, 4672, 3536, 3186, 445, 358, 5210, 1230, 336, 733, 1677, 2256, 486, 999, 3308, 1846, 5055, 4121, 1846, 854, 9957...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 734, 39, 67, 967, 3843, 12, 1612, 16, 852, 16, 2403, 303, 1403, 87, 4672, 3536, 3186, 445, 358, 5210, 1230, 336, 733, 1677, 2256, 486, 999, 3308, 1846, 5055, 4121, 1846, 854, 9957...
eq(value, 'text/plain; charset=us-ascii; boundary="BOUNDARY"')
eq(value, 'text/plain; charset="us-ascii"; boundary="BOUNDARY"')
def test_set_boundary(self): eq = self.assertEqual # This one has no existing boundary parameter, but the Content-Type: # header appears fifth. msg = self._msgobj('msg_01.txt') msg.set_boundary('BOUNDARY') header, value = msg.items()[4] eq(header.lower(), 'content-type') eq(value, 'text/plain; charset=us-ascii; boundary="BOUNDARY"') # This one has a Content-Type: header, with a boundary, stuck in the # middle of its headers. Make sure the order is preserved; it should # be fifth. msg = self._msgobj('msg_04.txt') msg.set_boundary('BOUNDARY') header, value = msg.items()[4] eq(header.lower(), 'content-type') eq(value, 'multipart/mixed; boundary="BOUNDARY"') # And this one has no Content-Type: header at all. msg = self._msgobj('msg_03.txt') self.assertRaises(Errors.HeaderParseError, msg.set_boundary, 'BOUNDARY')
676da9a4c9ee5faa9dfccec6b403d8c9200a1502 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/676da9a4c9ee5faa9dfccec6b403d8c9200a1502/test_email.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 67, 16604, 12, 2890, 4672, 7555, 273, 365, 18, 11231, 5812, 468, 1220, 1245, 711, 1158, 2062, 7679, 1569, 16, 1496, 326, 3697, 17, 559, 30, 468, 1446, 14606, 284, 430, 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, 1842, 67, 542, 67, 16604, 12, 2890, 4672, 7555, 273, 365, 18, 11231, 5812, 468, 1220, 1245, 711, 1158, 2062, 7679, 1569, 16, 1496, 326, 3697, 17, 559, 30, 468, 1446, 14606, 284, 430, 4...
"timeout (%g) is %g seconds more than expected (%g)"
"timeout (%g) is more than %g seconds more than expected (%g)"
def testConnectTimeout(self): # Test connect() timeout _timeout = 0.001 self.sock.settimeout(_timeout)
b0cfd0cdef66bf7c97d6b083512723840cdbe799 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b0cfd0cdef66bf7c97d6b083512723840cdbe799/test_timeout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5215, 2694, 12, 2890, 4672, 468, 7766, 3077, 1435, 2021, 389, 4538, 273, 374, 18, 11664, 365, 18, 15031, 18, 542, 4538, 24899, 4538, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 5215, 2694, 12, 2890, 4672, 468, 7766, 3077, 1435, 2021, 389, 4538, 273, 374, 18, 11664, 365, 18, 15031, 18, 542, 4538, 24899, 4538, 13, 2, -100, -100, -100, -100, -100, -100, -100...
utils.system('./tiobench.pl --dir %s %s' %(self.dir, self.args))
results = utils.system_output('./tiobench.pl --dir %s %s' % (self.dir, self.args)) logging.info(results) results_path = os.path.join(self.resultsdir, 'raw_output_%s' % self.iteration) utils.open_write_close(results_path, results)
def run_once(self, dir = None, args = None): if not dir: self.dir = self.tmpdir else: self.dir = dir if not args: self.args = '--block=4096 --block=8192 --threads=10 --size=1024 --numruns=2' else: self.args = args
0281f30e0a5f4b3c365c40894b4a55ac417a8522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/0281f30e0a5f4b3c365c40894b4a55ac417a8522/tiobench.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 8243, 12, 2890, 16, 1577, 273, 599, 16, 833, 273, 599, 4672, 309, 486, 1577, 30, 365, 18, 1214, 273, 365, 18, 5645, 1214, 469, 30, 365, 18, 1214, 273, 1577, 309, 486, 833, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 8243, 12, 2890, 16, 1577, 273, 599, 16, 833, 273, 599, 4672, 309, 486, 1577, 30, 365, 18, 1214, 273, 365, 18, 5645, 1214, 469, 30, 365, 18, 1214, 273, 1577, 309, 486, 833, ...
print '>>', str
print 'execute', str
def execute(self, str, args=None, debug=0): if args != None: na = [] for a in args: if a == None: a = 'NULL' elif type(a) == types.StringType: a = "'" + a.replace('\\', '\\\\').replace("'", "\\'") + "'" na.append(a) str = str % tuple(na) if debug: print '>>', str self.__ready = 0 self.__result = [{}] self.__send('Q'+str+'\0') while not self.__ready: self.__read_response() result, self.__result = self.__result[:-1], None return result
c377ab97373e232cd084b33e2b9b2ec584fed096 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1238/c377ab97373e232cd084b33e2b9b2ec584fed096/bpgsql.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 609, 16, 833, 33, 7036, 16, 1198, 33, 20, 4672, 309, 833, 480, 599, 30, 9583, 273, 5378, 364, 279, 316, 833, 30, 309, 279, 422, 599, 30, 279, 273, 296, 8560, 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, 1836, 12, 2890, 16, 609, 16, 833, 33, 7036, 16, 1198, 33, 20, 4672, 309, 833, 480, 599, 30, 9583, 273, 5378, 364, 279, 316, 833, 30, 309, 279, 422, 599, 30, 279, 273, 296, 8560, 11...
if self.msrp_session is None and isinstance(error.value, ConnectionDone):
if self.shutting_down and isinstance(error.value, ConnectionDone):
def _handle_incoming(self, chunk=None, error=None): notification_center = NotificationCenter() if error is not None: if self.msrp_session is None and isinstance(error.value, ConnectionDone): return ndata = TimestampedNotificationData(context='reading', failure=error, reason=error.getErrorMessage()) notification_center.post_notification('MediaStreamDidFail', self, ndata) elif chunk is not None: method_handler = getattr(self, '_handle_%s' % chunk.method, None) if method_handler is not None: method_handler(chunk)
d154d9385b7e18fdd16c951eda6ee66f1e5dc5d9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/d154d9385b7e18fdd16c951eda6ee66f1e5dc5d9/msrp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 31033, 12, 2890, 16, 2441, 33, 7036, 16, 555, 33, 7036, 4672, 3851, 67, 5693, 273, 8050, 8449, 1435, 309, 555, 353, 486, 599, 30, 309, 365, 18, 674, 25387, 67, 2378, 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, 389, 4110, 67, 31033, 12, 2890, 16, 2441, 33, 7036, 16, 555, 33, 7036, 4672, 3851, 67, 5693, 273, 8050, 8449, 1435, 309, 555, 353, 486, 599, 30, 309, 365, 18, 674, 25387, 67, 2378, 4...
n = re.compile(regex, re.UNICODE|re.M)
n = re.compile(regex, re.UNICODE|re.DOTALL)
def report_image(self, image_to_report, rep_page = None, com = None, rep_text = None, addings = True, regex = None): """ Function to report the files in the report page when needed. """ if rep_page == None: rep_page = self.rep_page if com == None: com = self.com if rep_text == None: rep_text = self.rep_text another_page = wikipedia.Page(self.site, rep_page) if regex == None: regex = image_to_report try: text_get = another_page.get() except wikipedia.NoPage: text_get = '' except wikipedia.IsRedirectPage: text_get = another_page.getRedirectTarget().get() if len(text_get) >= self.logFulNumber: raise LogIsFull(u"The log page (%s) is full! Please delete the old files reported." % another_page.title()) pos = 0 # The talk page includes "_" between the two names, in this way i replace them to " " n = re.compile(regex, re.UNICODE|re.M) y = n.search(text_get, pos) if y == None: # Adding the log if addings: rep_text = rep_text % image_to_report # Adding the name of the image in the report if not done already another_page.put(text_get + rep_text, comment = com, minorEdit = False) wikipedia.output(u"...Reported...") reported = True else: pos = y.end() wikipedia.output(u"%s is already in the report page." % image_to_report) reported = False return reported
f45f17b2da5bfc90ecd37d48bcac310c9da2dcdf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/f45f17b2da5bfc90ecd37d48bcac310c9da2dcdf/checkimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 2730, 12, 2890, 16, 1316, 67, 869, 67, 6006, 16, 2071, 67, 2433, 273, 599, 16, 532, 273, 599, 16, 2071, 67, 955, 273, 599, 16, 527, 899, 273, 1053, 16, 3936, 273, 599, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 2730, 12, 2890, 16, 1316, 67, 869, 67, 6006, 16, 2071, 67, 2433, 273, 599, 16, 532, 273, 599, 16, 2071, 67, 955, 273, 599, 16, 527, 899, 273, 1053, 16, 3936, 273, 599, 46...
'square-root elementwise.',
'square-root elementwise. For real x, the domain is restricted to x>=0.',
def __init__(self, nin, nout, identity, docstring, *type_descriptions): self.nin = nin self.nout = nout if identity is None: identity = None_ self.identity = identity self.docstring = docstring self.type_descriptions = [] for td in type_descriptions: self.type_descriptions.extend(td) for td in self.type_descriptions: td.finish_signature(self.nin, self.nout)
c523feaac9020b55e33d90e6bd4e68f0ec77ffcd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/c523feaac9020b55e33d90e6bd4e68f0ec77ffcd/generate_umath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 290, 267, 16, 290, 659, 16, 4215, 16, 14525, 16, 380, 723, 67, 30288, 4672, 365, 18, 82, 267, 273, 290, 267, 365, 18, 82, 659, 273, 290, 659, 309, 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, 1001, 2738, 972, 12, 2890, 16, 290, 267, 16, 290, 659, 16, 4215, 16, 14525, 16, 380, 723, 67, 30288, 4672, 365, 18, 82, 267, 273, 290, 267, 365, 18, 82, 659, 273, 290, 659, 309, 42...
confirmMainThread()
def actual_init(self, filename): confirmMainThread() self.playbin = gst.element_factory_make('playbin') self.videosink = gst.element_factory_make("fakesink", "videosink") self.playbin.set_property("video-sink", self.videosink) self.audiosink = gst.element_factory_make("fakesink", "audiosink") self.playbin.set_property("audio-sink", self.audiosink)
dad4fc88a54f5edbc781a136e2721baad72ddafc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/dad4fc88a54f5edbc781a136e2721baad72ddafc/gstreamerrenderer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3214, 67, 2738, 12, 2890, 16, 1544, 4672, 365, 18, 1601, 4757, 273, 314, 334, 18, 2956, 67, 6848, 67, 6540, 2668, 1601, 4757, 6134, 365, 18, 6768, 538, 754, 273, 314, 334, 18, 2956, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3214, 67, 2738, 12, 2890, 16, 1544, 4672, 365, 18, 1601, 4757, 273, 314, 334, 18, 2956, 67, 6848, 67, 6540, 2668, 1601, 4757, 6134, 365, 18, 6768, 538, 754, 273, 314, 334, 18, 2956, ...
def getTargetLabel(self, version): return self.branchMap[version.branch()].trailingLabel()
def shouldClone(self, troveTup, sourceName=None): if troveTup[0].endswith(':source') and self.cloneSources: return True if self.fullRecurse: return True return self._matchesPrimaryTrove(troveTup, sourceName)
48090a0a611c5a2a32181ce3ce6d2db11fdc4a5e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/48090a0a611c5a2a32181ce3ce6d2db11fdc4a5e/clone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1410, 10930, 12, 2890, 16, 23432, 537, 56, 416, 16, 28337, 33, 7036, 4672, 309, 23432, 537, 56, 416, 63, 20, 8009, 5839, 1918, 2668, 30, 3168, 6134, 471, 365, 18, 14056, 8628, 30, 327,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1410, 10930, 12, 2890, 16, 23432, 537, 56, 416, 16, 28337, 33, 7036, 4672, 309, 23432, 537, 56, 416, 63, 20, 8009, 5839, 1918, 2668, 30, 3168, 6134, 471, 365, 18, 14056, 8628, 30, 327,...
mbuild: $(INIT_TARGET) gen_libs $(PCH_TARGET) $(CODA_TARGET)
mbuild: $(INIT_TARGET) $(BC_TARGET) gen_libs $(PCH_TARGET) $(CODA_TARGET)
def GetRemoveDirectoryCommand(self, DirList): return [self._RD_TEMPLATE_[self._FileType] % {'dir':Dir} for Dir in DirList]
c8cd1f15c424e7cb1dd077c48daa85d40c163c2c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/914/c8cd1f15c424e7cb1dd077c48daa85d40c163c2c/GenMake.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 3288, 2853, 2189, 12, 2890, 16, 8446, 682, 4672, 327, 306, 2890, 6315, 20403, 67, 12205, 67, 63, 2890, 6315, 28941, 65, 738, 13666, 1214, 4278, 1621, 97, 364, 8446, 316, 8446, 682, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 968, 3288, 2853, 2189, 12, 2890, 16, 8446, 682, 4672, 327, 306, 2890, 6315, 20403, 67, 12205, 67, 63, 2890, 6315, 28941, 65, 738, 13666, 1214, 4278, 1621, 97, 364, 8446, 316, 8446, 682, ...
if html.var("show"):
if html.has_var("show") or html.has_var("filled_in"):
def column_selection(title, var_prefix, maxnum, data, order=False):
d9482b3072e84bbef323078dfe1ccbe7bf8d0f6f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/d9482b3072e84bbef323078dfe1ccbe7bf8d0f6f/experimental.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1057, 67, 10705, 12, 2649, 16, 569, 67, 3239, 16, 943, 2107, 16, 501, 16, 1353, 33, 8381, 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, ...
[ 1, 1, 1, 1, 1, 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, 1057, 67, 10705, 12, 2649, 16, 569, 67, 3239, 16, 943, 2107, 16, 501, 16, 1353, 33, 8381, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.__UndoOneChar() self.__GetOneChar()
if not self.__UndoOneChar(): break else: self.__GetOneChar()
def __UndoToken(self): self.__UndoOneChar() while self.__CurrentChar().isspace(): self.__UndoOneChar() while not str(self.__CurrentChar()).isspace() and self.__CurrentChar() not in ('=', '|', ','): self.__UndoOneChar() self.__GetOneChar()
679c80194292a2adbbf61916ae493e9d69e25b1e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/679c80194292a2adbbf61916ae493e9d69e25b1e/FdfParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31224, 1345, 12, 2890, 4672, 365, 16186, 31224, 3335, 2156, 1435, 1323, 365, 16186, 3935, 2156, 7675, 1054, 909, 13332, 365, 16186, 31224, 3335, 2156, 1435, 1323, 486, 609, 12, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31224, 1345, 12, 2890, 4672, 365, 16186, 31224, 3335, 2156, 1435, 1323, 365, 16186, 3935, 2156, 7675, 1054, 909, 13332, 365, 16186, 31224, 3335, 2156, 1435, 1323, 486, 609, 12, 2890, ...
if summary == 'Custom Checklist Items':
if sumLow == 'custom checklist items':
def add_entry(self, summary, item=None, display=None, desc=None, resolution=None, output=None, resList=None, outputList=None): '''Adds new items to the checklist. Arguments: summary -- Summary of problem (also its key.) Keyword arguments: item -- entry is an item rather than a category. (default True) display -- display the entry in output review. (default True) desc -- long description about how to determine if the item has passed or failed the test. (default None) resolution -- state that the entry is in. (default Needs-Reviewing) output -- output string for the entry. (default None) resList -- list of valid resolutions. (default Needs-Reviewing, Pass, Fail, Non-Blocker, Not-Applicable) outputList -- dict of output strings for each resList item. (default None for each resolution in resList)
a1db0482484c662c6516c280ce4b8ea1901ecce4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2414/a1db0482484c662c6516c280ce4b8ea1901ecce4/checklist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 4099, 12, 2890, 16, 4916, 16, 761, 33, 7036, 16, 2562, 33, 7036, 16, 3044, 33, 7036, 16, 7861, 33, 7036, 16, 876, 33, 7036, 16, 400, 682, 33, 7036, 16, 876, 682, 33, 7036,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 4099, 12, 2890, 16, 4916, 16, 761, 33, 7036, 16, 2562, 33, 7036, 16, 3044, 33, 7036, 16, 7861, 33, 7036, 16, 876, 33, 7036, 16, 400, 682, 33, 7036, 16, 876, 682, 33, 7036,...
prod_name = vals['type'] + str(' Product ') + site_id.name
prod_name = vals['type'] + str(' Product ') + (site_id and site_id.name or '')
def write(self, cr, uid, ids, vals, *args, **kwargs): site_id = self.pool.get('cci_mission.embassy_folder_line').browse(cr, uid, ids)[0].folder_id.site_id if vals.has_key('type'): prod_name = vals['type'] + str(' Product ') + site_id.name cr.execute('select id from product_template where name='"'%s'"''%str(prod_name)) prod=cr.fetchone() if prod: product_id=prod[0] prod_info = self.pool.get('product.product').browse(cr, uid,product_id) account = prod_info.product_tmpl_id.property_account_income.id if not account: account = prod_info.categ_id.property_account_income_categ.id vals['account_id']=account vals['product_id']=product_id return super(osv.osv,self).write( cr, uid, ids,vals, *args, **kwargs)
8c88839b4a5bb4332ba26a22fd038186b99a5c93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/8c88839b4a5bb4332ba26a22fd038186b99a5c93/cci_mission.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 380, 1968, 16, 2826, 4333, 4672, 2834, 67, 350, 273, 365, 18, 6011, 18, 588, 2668, 952, 77, 67, 3951, 18, 351, 70, 428, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 380, 1968, 16, 2826, 4333, 4672, 2834, 67, 350, 273, 365, 18, 6011, 18, 588, 2668, 952, 77, 67, 3951, 18, 351, 70, 428, ...
stanza.get_error().serialize()))
err.get_message()))
def vcard_error(self,stanza): self.error(u"vCard query error from %s: %s" % (stanza.get_from(), stanza.get_error().serialize()))
52b975fd9233fb936a346038704b4dd1ed7be136 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12768/52b975fd9233fb936a346038704b4dd1ed7be136/vcard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29760, 67, 1636, 12, 2890, 16, 541, 11939, 4672, 365, 18, 1636, 12, 89, 6, 90, 6415, 843, 555, 628, 738, 87, 30, 738, 87, 6, 738, 261, 541, 11939, 18, 588, 67, 2080, 9334, 21650, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 29760, 67, 1636, 12, 2890, 16, 541, 11939, 4672, 365, 18, 1636, 12, 89, 6, 90, 6415, 843, 555, 628, 738, 87, 30, 738, 87, 6, 738, 261, 541, 11939, 18, 588, 67, 2080, 9334, 21650, 1...
def parse(self, filename):
def parse(self):
def parse(self, filename): # Get basic shapefile configuration. fp = open(filename, 'rb')
0c0642e5fc82b201526f4a6ecac2e32406114d3a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1821/0c0642e5fc82b201526f4a6ecac2e32406114d3a/shapefile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 4672, 468, 968, 5337, 2179, 768, 1664, 18, 4253, 273, 1696, 12, 3459, 16, 296, 6731, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 4672, 468, 968, 5337, 2179, 768, 1664, 18, 4253, 273, 1696, 12, 3459, 16, 296, 6731, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if self._sessionCookie:
if not force and self._sessionCookie:
def _authenticate(self): ''' Return an authenticated session cookie. ''' if self._sessionCookie: return self._sessionCookie
6b5bee58529db07c3438fd6beac4fa94676f3abc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9952/6b5bee58529db07c3438fd6beac4fa94676f3abc/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 22035, 12, 2890, 4672, 9163, 2000, 392, 9370, 1339, 3878, 18, 9163, 309, 486, 2944, 471, 365, 6315, 3184, 6151, 30, 327, 365, 6315, 3184, 6151, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 22035, 12, 2890, 4672, 9163, 2000, 392, 9370, 1339, 3878, 18, 9163, 309, 486, 2944, 471, 365, 6315, 3184, 6151, 30, 327, 365, 6315, 3184, 6151, 2, -100, -100, -100, -100, -100, -100...
lifetime_h = cfg.cookie_lifetime[userobj and userobj.valid] cookie_lifetime = int(float(lifetime_h) * 3600)
cookie_lifetime = _get_session_lifetime(request, userobj)
def finalize(self, request, session): if request.user.auth_method == 'setuid': userobj = request._setuid_real_user setuid = request.user.id else: userobj = request.user setuid = None logging.debug("finalize userobj = %r, setuid = %r" % (userobj, setuid)) cfg = request.cfg cookie_path = cfg.cookie_path or request.script_root or '/' if userobj and userobj.valid: session['user.id'] = userobj.id session['user.auth_method'] = userobj.auth_method session['user.auth_attribs'] = userobj.auth_attribs if setuid: session['setuid'] = setuid elif 'setuid' in session: del session['setuid'] logging.debug("after auth: storing valid user into session: %r" % userobj.name) else: logging.debug("after auth: user is invalid") if 'user.id' in session: logging.debug("after auth: destroying session: %r" % session) self.destroy_session(request, session) logging.debug("after auth: deleting session cookie!") request.delete_cookie(self.cookie_name, path=cookie_path, domain=cfg.cookie_domain)
be06d178937cf8b04a0340cc44c0414c12d7ac92 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/be06d178937cf8b04a0340cc44c0414c12d7ac92/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 12, 2890, 16, 590, 16, 1339, 4672, 309, 590, 18, 1355, 18, 1944, 67, 2039, 422, 296, 542, 1911, 4278, 729, 2603, 273, 590, 6315, 542, 1911, 67, 7688, 67, 1355, 444, 1911, 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, 12409, 12, 2890, 16, 590, 16, 1339, 4672, 309, 590, 18, 1355, 18, 1944, 67, 2039, 422, 296, 542, 1911, 4278, 729, 2603, 273, 590, 6315, 542, 1911, 67, 7688, 67, 1355, 444, 1911, 273, ...
@QtCore.pyqtSignature("on_spinColorsFrom_valueChanged(int)") def on_spinColorsFrom_valueChanfed(self, newValue): currentToValue = self.ui.spinColorsTo.value() maxToValue = self.ui.spinColorsTo.maximum() if newValue >= currentToValue: if currentToValue < maxToValue: self.ui.spinColorsTo.setValue( newValue+1 ) else: self.ui.spinColorsFrom.setValue( newValue-1 )
@QtCore.pyqtSignature("on_spinColorsFrom_editingFinished()") def on_spinColorsFrom_editingFinished(self): fromValue = self.ui.spinColorsFrom.value() toValue = self.ui.spinColorsTo.value() maxToValue = self.ui.spinColorsTo.maximum() if fromValue >= toValue: if toValue < maxToValue: self.ui.spinColorsTo.setValue( fromValue+1 ) else: self.ui.spinColorsFrom.setValue( fromValue-1 )
def on_radioDayRange_toggled(self, checked): if checked: # Enable Range self.ui.lblColorsFrom.setEnabled(True) self.ui.lblColorsTo.setEnabled(True) self.ui.spinColorsFrom.setEnabled(True) self.ui.spinColorsTo.setEnabled(True) else: # Disable Range self.ui.lblColorsFrom.setEnabled(False) self.ui.lblColorsTo.setEnabled(False) self.ui.spinColorsFrom.setEnabled(False) self.ui.spinColorsTo.setEnabled(False)
3412163d9219f64f5a2efaafd136b167fdabd5b7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/765/3412163d9219f64f5a2efaafd136b167fdabd5b7/NextShowsConfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 17006, 4245, 2655, 67, 88, 23972, 1259, 12, 2890, 16, 5950, 4672, 309, 5950, 30, 468, 9677, 8086, 365, 18, 4881, 18, 31885, 12570, 1265, 18, 542, 1526, 12, 5510, 13, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 17006, 4245, 2655, 67, 88, 23972, 1259, 12, 2890, 16, 5950, 4672, 309, 5950, 30, 468, 9677, 8086, 365, 18, 4881, 18, 31885, 12570, 1265, 18, 542, 1526, 12, 5510, 13, 365, 18, ...
for i in self.info:
info = self.get_supervisor().getAllProcessInfo() for i in info:
def completionmatches(self,text,line,flag=0): groups=[] programs=[] groupwiseprograms={} for i in self.info: programs.append(i['name']) if i['group'] not in groups: groups.append(i['group']) groupwiseprograms[i['group']]=[] groupwiseprograms[i['group']].append(i['name']) total=[] for i in groups: if i in programs: total.append(i+' ') else: for n in groupwiseprograms[i]: total.append(i+':'+n+' ') if flag: # add/remove require only the group name return [i+' ' for i in groups if i.startswith(text)] if len(line.split()) == 1: return total else: current=line.split()[-1] if line.endswith(' ') and len(line.split()) > 1: results=[i for i in total if i.startswith(text)] return results if ':' in current: g=current.split(':')[0] results = [i+' ' for i in groupwiseprograms[g] if i.startswith(text)] return results results = [i for i in total if i.startswith(text)] return results
a880d1656cb12a1da9a61e1a0e4e89cbafc0d8ba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13620/a880d1656cb12a1da9a61e1a0e4e89cbafc0d8ba/supervisorctl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8364, 8436, 12, 2890, 16, 955, 16, 1369, 16, 6420, 33, 20, 4672, 3252, 33, 8526, 25038, 33, 8526, 1041, 2460, 12890, 87, 12938, 1123, 273, 365, 18, 588, 67, 9565, 10227, 7675, 588, 159...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8364, 8436, 12, 2890, 16, 955, 16, 1369, 16, 6420, 33, 20, 4672, 3252, 33, 8526, 25038, 33, 8526, 1041, 2460, 12890, 87, 12938, 1123, 273, 365, 18, 588, 67, 9565, 10227, 7675, 588, 159...
print "</font><br>"
print "<br>"
def printFooter(): global slides print "</DIV>" if (slides == 0): print "<hr><font size=1>" print copyright print "</font><br>" print inputfile + "&nbsp&nbsp " + strftime("%Y/%m/%d %H:%M",localtime(time())) print "</BODY></HTML>"
7af5c2bb8f0372438a2b397a27fa3bf97585fc33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6154/7af5c2bb8f0372438a2b397a27fa3bf97585fc33/otl2html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 13787, 13332, 2552, 30119, 1172, 6823, 31901, 2984, 309, 261, 2069, 4369, 422, 374, 4672, 1172, 3532, 7256, 4438, 5776, 963, 33, 21, 2984, 1172, 22245, 1172, 3532, 2848, 2984, 1172, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 13787, 13332, 2552, 30119, 1172, 6823, 31901, 2984, 309, 261, 2069, 4369, 422, 374, 4672, 1172, 3532, 7256, 4438, 5776, 963, 33, 21, 2984, 1172, 22245, 1172, 3532, 2848, 2984, 1172, ...
if len(args) == 1: _help(args[0])
if len(args) == 1: _help(args.pop())
def _parse_args(): """ Process the command line arguments; return a dictionary containing the relevant info. @return: A dictionary mapping from configuration parameters to values. If a parameter is specified on the command line, then that value is used; otherwise, a default value is used. Currently, the following configuration parameters are set: C{target}; C{modules}; C{verbosity}; C{prj_name}; C{check}; C{show_private}; and C{check_all}. @rtype: C{None} """ # Default values. argvals = {'target':'html', 'modules':[], 'verbosity':0, 'prj_name':'', 'check':0, 'show_private':0, 'check_all':0, 'show_imports':0} # Get the args (backwards, since we will pop them) args = sys.argv[1:] args.reverse() while args: arg = args.pop() if arg[:1] == '-': if arg in ('-o', '--output', '--target'): try: argvals['target'] = args.pop() except: _usage() elif arg in ('-n', '--name'): try: argvals['prj_name'] = args.pop() except: _usage() elif arg in ('-u', '--url'): try: argvals['prj_url'] = args.pop() except: _usage() elif arg in ('-V', '--version'): _version() elif arg in ('-v', '--verbose'): argvals['verbosity'] += 1 elif arg in ('-q', '--quiet'): argvals['verbosity'] -= 3 elif re.match('^-v+$', arg): argvals['verbosity'] += len(arg)-1 elif arg in ('--help', '-?', '--usage', '-h'): if len(args) == 1: _help(args[0]) elif len(args) == 0: _usage(0) else: _usage() elif arg in ('--check',): argvals['check'] = 1 elif arg in ('--show-imports', '--show_imports'): argvals['show_imports'] = 1 elif arg in ('-p',): argvals['show_private'] = 1 elif arg in ('-a', '-check_all'): argvals['check_all'] = 1 elif arg in ('--css', '-c'): argvals['css'] = args.pop() if argvals['css'] == 'help': _csshelp() else: _usage() else: argvals['modules'].append(arg) # This can prevent trouble sometimes when importing things. sys.argv[:] = ['(imported)'] if argvals['modules'] == []: _usage() return argvals
45b494b393ab6ef9de3c2677601959c2f035edb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/45b494b393ab6ef9de3c2677601959c2f035edb8/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 1968, 13332, 3536, 4389, 326, 1296, 980, 1775, 31, 327, 279, 3880, 4191, 326, 9368, 1123, 18, 225, 632, 2463, 30, 432, 3880, 2874, 628, 1664, 1472, 358, 924, 18, 225, 97...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 1968, 13332, 3536, 4389, 326, 1296, 980, 1775, 31, 327, 279, 3880, 4191, 326, 9368, 1123, 18, 225, 632, 2463, 30, 432, 3880, 2874, 628, 1664, 1472, 358, 924, 18, 225, 97...
newType = "boolean"
newType = "Boolean"
def fromFunction(func, assignType, name, alternative, old=[]): # # open comment ############################################################## s = "/**\n" # # description ############################################################## oldDesc = getAttrib(old, "description") if attribHas(oldDesc, "text"): newText = oldDesc["text"] else: newText = "TODOC" s += splitText(newText, False) s += " *\n" # # add @type ############################################################## if assignType != None: s += " * @type %s\n" % assignType else: s += " * @type unknown TODOC\n" # # add @abstract ############################################################## oldAbstract = getAttrib(old, "abstract") first = func.getChild("body").getChild("block").getFirstChild(False, True) abstract = first and first.type == "throw" if abstract: if attribHas(oldAbstract, "text"): newText = oldDesc["text"] else: newText = "" s += " * @abstract%s" % splitText(newText) if not s.endswith("\n"): s += "\n" elif oldAbstract: print " * Removing old @abstract for %s" % name # # add @param ############################################################## params = func.getChild("params") if params.hasChildren(): for child in params.children: if child.type == "variable": newName = child.getChild("identifier").get("name") newType = newTypeText = nameToType(newName) newDefault = "" newText = nameToDescription(newName) oldParam = getParam(old, newName) # Get type and text from old content if oldParam: if attribHas(oldParam, "type"): newTypeText = parseType(oldParam["type"]) if attribHas(oldParam, "defaultValue"): newDefault = " ? %s" % oldParam["defaultValue"] if attribHas(oldParam, "text"): newText = oldParam["text"].strip() s += " * @param %s {%s%s}%s" % (newName, newTypeText, newDefault, splitText(newText)) if not s.endswith("\n"): s += "\n" # # add @return ############################################################## if name != "construct": oldReturn = getAttrib(old, "return") newType = "void" newText = "" # Get type and text from old content if oldReturn: if attribHas(oldReturn, "type"): newType = parseType(oldReturn["type"]) if attribHas(oldReturn, "text"): newText = oldReturn["text"].strip() # Try to autodetect the type if newType == "void": returns = getReturns(func.getChild("body"), []) if len(returns) > 0: newType = " | ".join(returns) elif name != None and name.startswith("is") and name[3].isupper(): newType = "boolean" # Add documentation hint in non void cases if newType != "void" and newText == "": newText = "TODOC" s += " * @return {%s}%s" % (newType, splitText(newText)) if not s.endswith("\n"): s += "\n" # # add @throws ############################################################## oldThrows = getAttrib(old, "throws") if hasThrows(func): if oldThrows and attribHas(oldThrows, "text"): newText = oldThrows["text"] elif abstract: newText = "the abstract function warning." else: newText = "TODOC" s += " * @throws%s" % splitText(newText) if not s.endswith("\n"): s += "\n" elif oldThrows: print " * Removing old @throw attribute in comment for %s" % name # # other @attributes ############################################################## for attrib in old: cat = attrib["category"] if cat in [ "see", "author", "deprecated", "exception", "since", "version", "abstract", "overridden" ]: s += " * @%s" % cat if attribHas(attrib, "text"): s += splitText(attrib["text"]) if not s.endswith("\n"): s += "\n" elif not cat in [ "description", "type", "abstract", "param", "return", "throws" ]: print " * Found unallowed attribute %s in comment for %s (function)" % (cat, name) # # close comment ############################################################## s += " */" return s
77305a357b8c84745c500b9efc9155020d76c5fd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/77305a357b8c84745c500b9efc9155020d76c5fd/comment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 2083, 12, 644, 16, 2683, 559, 16, 508, 16, 10355, 16, 1592, 33, 8526, 4672, 468, 468, 1696, 2879, 19709, 5516, 26487, 7, 272, 273, 2206, 636, 64, 82, 6, 282, 468, 468, 2477, 197...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 2083, 12, 644, 16, 2683, 559, 16, 508, 16, 10355, 16, 1592, 33, 8526, 4672, 468, 468, 1696, 2879, 19709, 5516, 26487, 7, 272, 273, 2206, 636, 64, 82, 6, 282, 468, 468, 2477, 197...
%s+(\.%s+)* @ %s+(\.%s*)* %s
%(emailc)s+(\.%(emailc)s+)* @ %(emailc)s+(\.%(emailc)s*)* %(urilast)s
def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages.
9fe47ec4311156cad473d8ed8bf0dba5fd73c14e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/9fe47ec4311156cad473d8ed8bf0dba5fd73c14e/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, -100, -100, -100, -100, -100,...
if pdflatex:
if engine == "pdflatex" or engine == "xelatex":
def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't convert the dvi file to png (because of postscript specials or other issues), then dvips is called, and the PS file is converted to a png file. INPUT: - ``filename`` - string: file to process, including full path - ``debug`` - bool (optional, default False): whether to print verbose debugging output - ``density`` - integer (optional, default 150): how big output image is. - ``pdflatex`` - bool (optional, default False): whether to use pdflatex. - ``png`` - bool (optional, default False): whether to produce a png file. - ``do_in_background`` - bool (optional, default False): whether to run in the background. OUTPUT: string, which could be a string starting with 'Error' (if there was a problem), or it could be 'pdf' or 'dvi'. If ``pdflatex`` is False, then a dvi file is created, but if there appear to be problems with it (because of PS special commands, for example), then a pdf file is created instead. The function returns 'dvi' or 'pdf' to indicate which type of file is created. (Detecting problems requires that dvipng be installed; if it is not, then the dvi file is not checked for problems and 'dvi' is returned.) If ``pdflatex`` is True and there are no errors, then 'pdf' is returned. .. warning:: If ``png`` is True, then when using latex (the default), you must have 'dvipng' (or 'dvips' and 'convert') installed on your operating system, or this command won't work. When using pdflatex, you must have 'convert' installed. EXAMPLES:: sage: from sage.misc.latex import _run_latex_, _latex_file_ sage: file = os.path.join(SAGE_TMP, "temp.tex") sage: O = open(file, 'w') sage: O.write(_latex_file_([ZZ[x], RR])); O.close() sage: _run_latex_(file) # random - depends on whether latex is installed 'dvi' """ if pdflatex is None: pdflatex = _Latex_prefs._option["pdflatex"] if not pdflatex and not have_latex(): print "Error: LaTeX does not seem to be installed. Download it from" print "ctan.org and try again." return "Error" if pdflatex and not have_pdflatex(): print "Error: PDFLaTeX does not seem to be installed. Download it from" print "ctan.org and try again." return "Error" # if png output + latex, check to see if dvipng or convert is installed. if png: if not pdflatex and not (have_dvipng() or have_convert()): print "" print "Error: neither dvipng nor convert (from the ImageMagick suite)" print "appear to be installed. Displaying LaTeX or PDFLaTeX output" print "requires at least one of these programs, so please install" print "and try again." print "" print "Go to http://sourceforge.net/projects/dvipng/ and" print "http://www.imagemagick.org to download these programs." return "Error" # if png output + pdflatex, check to see if convert is installed. elif pdflatex and not have_convert(): print "" print "Error: convert (from the ImageMagick suite) does not" print "appear to be installed. Displaying PDFLaTeX output" print "requires this program, so please install and try again." print "" print "Go to http://www.imagemagick.org to download it." return "Error" # check_validity: check to see if the dvi file is okay by trying # to convert to a png file. if this fails, return_suffix will be # set to "pdf". return_suffix is the return value for this # function. # # thus if not png output, check validity of dvi output if dvipng # or convert is installed. else: check_validity = have_dvipng() # set up filenames, other strings: base, filename = os.path.split(filename) filename = os.path.splitext(filename)[0] # get rid of extension if len(filename.split()) > 1: raise ValueError, "filename must contain no spaces" if not debug: redirect=' 2>/dev/null 1>/dev/null ' else: redirect='' if do_in_background: background = ' &' else: background = '' if pdflatex: command = "pdflatex" # 'suffix' is used in the string 'convert' ... suffix = "pdf" return_suffix = "pdf" else: command = "latex" suffix = "ps" return_suffix = "dvi" # Define the commands to be used: lt = 'cd "%s"&& sage-native-execute %s \\\\nonstopmode \\\\input{%s.tex} %s'%(base, command, filename, redirect) # dvipng is run with the 'picky' option: this means that if # there are warnings, no png file is created. dvipng = 'cd "%s"&& sage-native-execute dvipng --picky -q -T tight -D %s %s.dvi -o %s.png'%(base, density, filename, filename) dvips = 'sage-native-execute dvips %s.dvi %s'%(filename, redirect) ps2pdf = 'sage-native-execute ps2pdf %s.ps %s'%(filename, redirect) # We seem to need a larger size when using convert compared to # when using dvipng: density = int(1.4 * density / 1.3) convert = 'sage-native-execute convert -density %sx%s -trim %s.%s %s.png %s '%\ (density,density, filename, suffix, filename, redirect) e = 1 # it is possible to get through the following commands # without running a program, so in that case we force error if pdflatex: if png: cmd = ' && '.join([lt, convert]) else: cmd = lt if debug: print cmd e = os.system(cmd + ' ' + redirect + background) else: # latex, not pdflatex if (png or check_validity): if have_dvipng(): cmd = ' && '.join([lt, dvipng]) if debug: print cmd e = os.system(cmd + ' ' + redirect) dvipng_error = not os.path.exists(base + '/' + filename + '.png') # If there is no png file, then either the latex # process failed or dvipng failed. Assume that dvipng # failed, and try running dvips and convert. (If the # latex process failed, then dvips and convert will # fail also, so we'll still catch the error.) if dvipng_error: if png: if have_convert(): cmd = ' && '.join(['cd "%s"'%(base,), dvips, convert]) if debug: print "'dvipng' failed; trying 'convert' instead..." print cmd e = os.system(cmd + ' ' + redirect + background) else: print "Error: 'dvipng' failed and 'convert' is not installed." return "Error: dvipng failed." else: # not png, i.e., check_validity return_suffix = "pdf" cmd = ' && '.join(['cd "%s"'%(base,), dvips, ps2pdf]) if debug: print "bad dvi file; running dvips and ps2pdf instead..." print cmd e = os.system(cmd) if e: # error running dvips and/or ps2pdf command = "pdflatex" lt = 'cd "%s"&& sage-native-execute %s \\\\nonstopmode \\\\input{%s.tex} %s'%(base, command, filename, redirect) if debug: print "error running dvips and ps2pdf; trying pdflatex instead..." print cmd e = os.system(cmd + background) else: # don't have dvipng, so must have convert. run latex, dvips, convert. cmd = ' && '.join([lt, dvips, convert]) if debug: print cmd e = os.system(cmd + ' ' + redirect + background) if e: print "An error occurred." try: print open(base + '/' + filename + '.log').read() except IOError: pass return "Error latexing slide." return return_suffix
f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 67, 26264, 67, 12, 3459, 16, 1198, 33, 8381, 16, 12142, 33, 23014, 16, 8169, 26264, 33, 7036, 16, 14476, 33, 8381, 16, 741, 67, 267, 67, 9342, 33, 8381, 4672, 3536, 1220, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 67, 26264, 67, 12, 3459, 16, 1198, 33, 8381, 16, 12142, 33, 23014, 16, 8169, 26264, 33, 7036, 16, 14476, 33, 8381, 16, 741, 67, 267, 67, 9342, 33, 8381, 4672, 3536, 1220, ...
pin = os.popen('%s %s' %(provides, f))
pin = os.popen("%s '%s'" %(provides, f))
def unpackSources(self, builddir):
57ec1d46035ab999c53077cba6d1998411116c8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/57ec1d46035ab999c53077cba6d1998411116c8c/recipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 8628, 12, 2890, 16, 25666, 330, 449, 481, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 8628, 12, 2890, 16, 25666, 330, 449, 481, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if (self._ContainWebSocketTest(test_files)): self._websocket_server.Start()
def _InstantiateTestShellThreads(self, test_shell_binary, test_files): """Instantitates and starts the TestShellThread(s).
c2dd890e4234509148ededf07c457383ec53046a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/c2dd890e4234509148ededf07c457383ec53046a/run_webkit_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 22438, 4709, 13220, 13233, 12, 2890, 16, 1842, 67, 10304, 67, 8578, 16, 1842, 67, 2354, 4672, 3536, 10675, 305, 815, 471, 2542, 326, 7766, 13220, 3830, 12, 87, 2934, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 22438, 4709, 13220, 13233, 12, 2890, 16, 1842, 67, 10304, 67, 8578, 16, 1842, 67, 2354, 4672, 3536, 10675, 305, 815, 471, 2542, 326, 7766, 13220, 3830, 12, 87, 2934, 2, -100, -100, ...
'<li><a href=".+?" title=".+?">(?P<title>.+?)</a></li>')
'<li><a href="[^\"]+?" title=".+?">(?P<title>.+?)</a></li>')
def usingPages(self): """Yield Pages on which the image is displayed.""" titleList = re.search('(?s)<h2 id="filelinks">.+?</ul>', self.getImagePageHtml()).group() lineR = re.compile( '<li><a href=".+?" title=".+?">(?P<title>.+?)</a></li>') for match in lineR.finditer(titleList): try: yield Page(self.site(), match.group('title')) except InvalidTitle: output( u"Image description page %s contains invalid reference to [[%s]]." % (self.title(), match.group('title')))
647982ef07d6fc37b2f41a3ba5ae98d7467d5410 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/647982ef07d6fc37b2f41a3ba5ae98d7467d5410/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1450, 5716, 12, 2890, 4672, 3536, 16348, 22648, 603, 1492, 326, 1316, 353, 10453, 12123, 2077, 682, 273, 283, 18, 3072, 2668, 3680, 87, 13, 32, 76, 22, 612, 1546, 7540, 27269, 87, 6441, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1450, 5716, 12, 2890, 4672, 3536, 16348, 22648, 603, 1492, 326, 1316, 353, 10453, 12123, 2077, 682, 273, 283, 18, 3072, 2668, 3680, 87, 13, 32, 76, 22, 612, 1546, 7540, 27269, 87, 6441, ...
return '%s(fpointer=0x%x, finalise=%d)' % (self.__class__.__name__, self._fpointer, self._finalise)
if self._fpointer is None: return '%s(fpointer=None, finalise=%d)' % (self.__class__.__name__, self._finalise) else: return '%s(fpointer=0x%x, finalise=%d)' % (self.__class__.__name__, self._fpointer, self._finalise)
def __repr__(self): return '%s(fpointer=0x%x, finalise=%d)' % (self.__class__.__name__, self._fpointer, self._finalise)
5df60c8041314d116fa9683b7643ceff0810d75f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/5df60c8041314d116fa9683b7643ceff0810d75f/oo_fortran.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 1995, 87, 12, 7944, 2480, 33, 20, 92, 9, 92, 16, 727, 784, 5095, 72, 2506, 738, 261, 2890, 16186, 1106, 972, 16186, 529, 972, 16, 365, 6315, 79...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 1995, 87, 12, 7944, 2480, 33, 20, 92, 9, 92, 16, 727, 784, 5095, 72, 2506, 738, 261, 2890, 16186, 1106, 972, 16186, 529, 972, 16, 365, 6315, 79...
if _check_build_dir(ret, "win32", source_root_name, "build/temp.win32-%s" % sys.winver):
if _check_build_dir(ret, "win32", source_root_name, "build/temp.win32-%s/Release" % sys.winver):
def _get_build_dirs(source_root_name): ret = {} if _check_build_dir(ret, "win32", source_root_name, "build/temp.win32-%s" % sys.winver): pass elif _check_build_dir(ret, "win32", source_root_name, "win32/build"): pass # todo: add com etc maybe? return ret
a9409a7edf86df0a8c94daf9520725bfbb946a5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1361/a9409a7edf86df0a8c94daf9520725bfbb946a5f/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 3510, 67, 8291, 12, 3168, 67, 3085, 67, 529, 4672, 325, 273, 2618, 309, 389, 1893, 67, 3510, 67, 1214, 12, 1349, 16, 315, 8082, 1578, 3113, 1084, 67, 3085, 67, 529, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 3510, 67, 8291, 12, 3168, 67, 3085, 67, 529, 4672, 325, 273, 2618, 309, 389, 1893, 67, 3510, 67, 1214, 12, 1349, 16, 315, 8082, 1578, 3113, 1084, 67, 3085, 67, 529, 16,...
add_tag(tags, metadata, "artist", "ArtistName") add_tag(tags, metadata, "album", "AlbumTitle") add_tag(tags, metadata, "title", "TrackName") add_tag(tags, metadata, "tracknumber", "TrackNumber")
if extension == '.m4a': add_tag(tags, metadata, "\xa9ART", "ArtistName") add_tag(tags, metadata, "\xa9alb", "AlbumTitle") add_tag(tags, metadata, "\xa9nam", "TrackName") add_tag(tags, metadata, "trkn", "TrackNumber") else: add_tag(tags, metadata, "artist", "ArtistName") add_tag(tags, metadata, "album", "AlbumTitle") add_tag(tags, metadata, "title", "TrackName") add_tag(tags, metadata, "tracknumber", "TrackNumber")
def add_tag(tags, metadata, read_name, write_name): if read_name in tags: tag = tags.tags[read_name] tag = tag[0] metadata.write("%s\n" % write_name) metadata.write("%s\n" % tag)
f3d8d2a6cd7c6ee339fd6fd0b0c9d1e55a9f9de5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13015/f3d8d2a6cd7c6ee339fd6fd0b0c9d1e55a9f9de5/get_metadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2692, 12, 4156, 16, 1982, 16, 855, 67, 529, 16, 1045, 67, 529, 4672, 309, 855, 67, 529, 316, 2342, 30, 1047, 273, 2342, 18, 4156, 63, 896, 67, 529, 65, 1047, 273, 1047, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2692, 12, 4156, 16, 1982, 16, 855, 67, 529, 16, 1045, 67, 529, 4672, 309, 855, 67, 529, 316, 2342, 30, 1047, 273, 2342, 18, 4156, 63, 896, 67, 529, 65, 1047, 273, 1047, 63...
expected_text="</html>"))
expected_text="</html>"))
def test_twpc_username_arg(self): """testutils - test_web_page_content() and username arguments""" # should login as admin without password: self.assertEqual([], test_web_page_content(weburl, username="admin", expected_text="</html>")) # should not login as admin with password: errmsgs = test_web_page_content(weburl, username="admin", password="foo", expected_text="</html>") if errmsgs[0].find("ERROR: Cannot login as admin, test skipped.") > -1: pass else: self.fail("Should not be able to login as admin with foo password.") return
cb40db67bfc5eb0a89016ecb3e591e03d4c76e91 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/cb40db67bfc5eb0a89016ecb3e591e03d4c76e91/testutils_regression_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11246, 2436, 67, 5053, 67, 3175, 12, 2890, 4672, 3536, 3813, 5471, 300, 1842, 67, 4875, 67, 2433, 67, 1745, 1435, 471, 2718, 1775, 8395, 468, 1410, 3925, 487, 3981, 2887, 2201,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11246, 2436, 67, 5053, 67, 3175, 12, 2890, 4672, 3536, 3813, 5471, 300, 1842, 67, 4875, 67, 2433, 67, 1745, 1435, 471, 2718, 1775, 8395, 468, 1410, 3925, 487, 3981, 2887, 2201,...
format = decompose_file(format)[2]
format = decompose_file(fullpath)[2]
def add_new_file(self, fullpath, doctype="Main", docname=None, never_fail=False, description=None, comment=None, format=None): """Adds a new file with the following policy: if the docname is not set it is retrieved from the name of the file. If bibdoc with the given docname doesn't exist, it is created and the file is added to it. It it exist but it doesn't contain the format that is being added, the new format is added. If the format already exists then if never_fail is True a new bibdoc is created with a similar name but with a progressive number as a suffix and the file is added to it. The elaborated bibdoc is returned. """ if docname is None: docname = decompose_file(fullpath)[1] if format is None: format = decompose_file(format)[2] docname = normalize_docname(docname) try: bibdoc = self.get_bibdoc(docname) except InvenioWebSubmitFileError: # bibdoc doesn't already exists! bibdoc = self.add_bibdoc(doctype, docname, False) bibdoc.add_file_new_version(fullpath, description=description, comment=comment, format=format) else: try: bibdoc.add_file_new_format(fullpath, description=description, comment=comment, format=format) except InvenioWebSubmitFileError, e: # Format already exist! if never_fail: bibdoc = self.add_bibdoc(doctype, docname, True) bibdoc.add_file_new_version(fullpath, description=description, comment=comment, format=format) else: raise e return bibdoc
147856eadb240c281c737b46d059f8d84354d697 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/147856eadb240c281c737b46d059f8d84354d697/bibdocfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2704, 67, 768, 12, 2890, 16, 15170, 16, 24909, 1546, 6376, 3113, 997, 529, 33, 7036, 16, 5903, 67, 6870, 33, 8381, 16, 2477, 33, 7036, 16, 2879, 33, 7036, 16, 740, 33, 7036,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2704, 67, 768, 12, 2890, 16, 15170, 16, 24909, 1546, 6376, 3113, 997, 529, 33, 7036, 16, 5903, 67, 6870, 33, 8381, 16, 2477, 33, 7036, 16, 2879, 33, 7036, 16, 740, 33, 7036,...
netloc = params = query = fragment = ''
netloc = query = fragment = ''
def urlparse(url, scheme = '', allow_fragments = 1): """Parse a URL into 6 components: <scheme>://<netloc>/<path>;<params>?<query>#<fragment> Return a 6-tuple: (scheme, netloc, path, params, query, fragment). Note that we don't break the components up in smaller bits (e.g. netloc is a single string) and we don't expand % escapes.""" key = url, scheme, allow_fragments cached = _parse_cache.get(key, None) if cached: return cached if len(_parse_cache) >= MAX_CACHE_SIZE: # avoid runaway growth clear_cache() netloc = params = query = fragment = '' i = url.find(':') if i > 0: if url[:i] == 'http': # optimize the common case scheme = url[:i].lower() url = url[i+1:] if url[:2] == '//': i = url.find('/', 2) if i < 0: i = len(url) netloc = url[2:i] url = url[i:] if allow_fragments: i = url.rfind('#') if i >= 0: fragment = url[i+1:] url = url[:i] i = url.find('?') if i >= 0: query = url[i+1:] url = url[:i] i = url.find(';') if i >= 0: params = url[i+1:] url = url[:i] tuple = scheme, netloc, url, params, query, fragment _parse_cache[key] = tuple return tuple for c in url[:i]: if c not in scheme_chars: break else: scheme, url = url[:i].lower(), url[i+1:] if scheme in uses_netloc: if url[:2] == '//': i = url.find('/', 2) if i < 0: i = len(url) netloc, url = url[2:i], url[i:] if allow_fragments and scheme in uses_fragment: i = url.rfind('#') if i >= 0: url, fragment = url[:i], url[i+1:] if scheme in uses_query: i = url.find('?') if i >= 0: url, query = url[:i], url[i+1:] if scheme in uses_params: i = url.find(';') if i >= 0: url, params = url[:i], url[i+1:] tuple = scheme, netloc, url, params, query, fragment _parse_cache[key] = tuple return tuple
25350d7d3dc12d7365aaee887c8eb007dd4b7826 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/25350d7d3dc12d7365aaee887c8eb007dd4b7826/urlparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15185, 12, 718, 16, 4355, 273, 10226, 1699, 67, 29528, 273, 404, 4672, 3536, 3201, 279, 1976, 1368, 1666, 4085, 30, 411, 9068, 34, 2207, 32, 2758, 1829, 16893, 32, 803, 34, 31, 32, 201...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15185, 12, 718, 16, 4355, 273, 10226, 1699, 67, 29528, 273, 404, 4672, 3536, 3201, 279, 1976, 1368, 1666, 4085, 30, 411, 9068, 34, 2207, 32, 2758, 1829, 16893, 32, 803, 34, 31, 32, 201...
return result
self._attachedHooks = None if results == (True, True): return True else: if results == (False, False): return False
def detachHooks(self): """Detaches / removes callbacks from the map's hooks. Returns True if successful, False if already detached.""" result = self.nodeOverlay.detachHooks() and \ self.edgeOverlay.detachHooks() if result: for h in self._attachedHooks: h.disconnect() return result
f5646ba2e97d09010f52d1aef7d2c80ad99e53d4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/f5646ba2e97d09010f52d1aef7d2c80ad99e53d4/mapdisplay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10199, 13620, 12, 2890, 4672, 3536, 17650, 281, 342, 7157, 6689, 628, 326, 852, 1807, 9153, 18, 2860, 1053, 309, 6873, 16, 1083, 309, 1818, 22037, 12123, 563, 273, 365, 18, 2159, 11627, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10199, 13620, 12, 2890, 4672, 3536, 17650, 281, 342, 7157, 6689, 628, 326, 852, 1807, 9153, 18, 2860, 1053, 309, 6873, 16, 1083, 309, 1818, 22037, 12123, 563, 273, 365, 18, 2159, 11627, ...
items += [ menu.MenuItem("play chapter %s" % c, play_movie,
items += [ menu.MenuItem("play chapter %s" % c, chapter_selection,
def chapter_selection_menu(arg=None, menuw=None): items = [] for c in range(1, arg.available_chapters+1): items += [ menu.MenuItem("play chapter %s" % c, play_movie, (arg, ' -chapter %s' % c)) ] moviemenu = menu.Menu('CHAPTER MENU', items) menuw.pushmenu(moviemenu)
e6fd3cb2c0d12112f6fb0c3addb030ab80daf2be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/e6fd3cb2c0d12112f6fb0c3addb030ab80daf2be/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23580, 67, 10705, 67, 5414, 12, 3175, 33, 7036, 16, 3824, 91, 33, 7036, 4672, 1516, 273, 5378, 364, 276, 316, 1048, 12, 21, 16, 1501, 18, 5699, 67, 343, 1657, 414, 15, 21, 4672, 1516...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23580, 67, 10705, 67, 5414, 12, 3175, 33, 7036, 16, 3824, 91, 33, 7036, 4672, 1516, 273, 5378, 364, 276, 316, 1048, 12, 21, 16, 1501, 18, 5699, 67, 343, 1657, 414, 15, 21, 4672, 1516...
def checksums(self, files): """Run checksums for a set of output files, and append to the list."""
def checksum(self, filename): """Run checksum for an output file, and append to the list."""
def checksums(self, files): """Run checksums for a set of output files, and append to the list.""" output = file(self.publicPath("md5sums.txt"), "a") for filename in files: self.saveChecksum(filename, output) output.close()
40a23c5e6ea079738b9c939453207d50ac224e26 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9870/40a23c5e6ea079738b9c939453207d50ac224e26/worker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6697, 12, 2890, 16, 1544, 4672, 3536, 1997, 6697, 364, 392, 876, 585, 16, 471, 714, 358, 326, 666, 12123, 876, 273, 585, 12, 2890, 18, 482, 743, 2932, 1264, 25, 1364, 87, 18, 5830, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6697, 12, 2890, 16, 1544, 4672, 3536, 1997, 6697, 364, 392, 876, 585, 16, 471, 714, 358, 326, 666, 12123, 876, 273, 585, 12, 2890, 18, 482, 743, 2932, 1264, 25, 1364, 87, 18, 5830, 6...
imap_srv = imaplib.IMAP4(imap_server)
imap_username = getpass.getuser() if options.pwfile: imap_password = open(options.pwfile).read().rstrip() else: imap_password = getpass.getpass() imap_server, imap_folder = imap_str.split('/', 1) if mailbox_name[:5] == 'imaps': vprint("Using SSL") imap_srv = imaplib.IMAP4_SSL(imap_server) else: imap_srv = imaplib.IMAP4(imap_server)
def _archive_imap(mailbox_name, final_archive_name): """Archive an imap mailbox - used by archive_mailbox()""" assert(mailbox_name) assert(final_archive_name) import imaplib import cStringIO archive = None stats = Stats(mailbox_name, final_archive_name) imap_str = mailbox_name[7:] filter = build_imap_filter() vprint("imap filter: '%s'" % filter) try: imap_username, imap_str = imap_str.split(':', 1) imap_password, imap_str = imap_str.split('@', 1) imap_server, imap_folder = imap_str.split('/', 1) except: unexpected_error("you must provide a properly formatted \ IMAP connection string") imap_srv = imaplib.IMAP4(imap_server) vprint("connected to server %s" % imap_server) result, response = imap_srv.login(imap_username, imap_password) if result != 'OK': unexpected_error("authentication failure") vprint("logged in to server as %s" % imap_username) result, response = imap_srv.select(imap_folder) if result != 'OK': unexpected_error("cannot select imap folder") vprint("selected imap folder %s" % imap_folder) result, response = imap_srv.search(None, filter) if result != 'OK': unexpected_error("imap search failed") message_list_str = response[0] message_list = response[0].split() vprint("%d messages found matching filter" % len(message_list)) for msg_id in message_list: result, response = imap_srv.fetch(msg_id, '(RFC822 FLAGS)') if result != 'OK': unexpected_error("Failed to fetch message") msg_str = response[0][1] msg_flags = imaplib.ParseFlags(response[1]) msg = rfc822.Message(cStringIO.StringIO(msg_str)) add_status_headers_imap(msg, msg_flags) vprint("processing message '%s'" % msg.get('Message-ID')) if options.warn_duplicates: cache.warn_if_dupe(msg) if not options.dry_run: if not archive: archive = ArchiveMbox(final_archive_name) archive.write(msg) stats.another_archived() if not options.dry_run: if archive: archive.close() archive.finalise() vprint("Deleting messages") imap_srv.store(string.join(message_list, ','), '+FLAGS.SILENT', '\\Deleted') imap_srv.close() imap_srv.logout()
a91b2064cb7acf9c488e02a0c5e1e8c3dfe38787 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1746/a91b2064cb7acf9c488e02a0c5e1e8c3dfe38787/archivemail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10686, 67, 12161, 12, 4408, 2147, 67, 529, 16, 727, 67, 10686, 67, 529, 4672, 3536, 7465, 392, 20226, 14187, 300, 1399, 635, 5052, 67, 4408, 2147, 1435, 8395, 1815, 12, 4408, 2147, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10686, 67, 12161, 12, 4408, 2147, 67, 529, 16, 727, 67, 10686, 67, 529, 4672, 3536, 7465, 392, 20226, 14187, 300, 1399, 635, 5052, 67, 4408, 2147, 1435, 8395, 1815, 12, 4408, 2147, ...
if s[0:1] in ' \t\n':
if s[0:1] in ' \t\n':
def format_article(self, article): # called from add_article # TBD: Why do the HTML formatting here and keep it in the # pipermail database? It makes more sense to do the html # formatting as the article is being written as html and toss # the data after it has been written to the archive file.
3af39c5f05e82fd415c7f13441692ce1fa61bab9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/3af39c5f05e82fd415c7f13441692ce1fa61bab9/HyperArch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 11480, 12, 2890, 16, 7559, 4672, 468, 2566, 628, 527, 67, 11480, 468, 399, 18096, 30, 3497, 93, 741, 326, 3982, 10407, 2674, 471, 3455, 518, 316, 326, 468, 4790, 457, 4408, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 11480, 12, 2890, 16, 7559, 4672, 468, 2566, 628, 527, 67, 11480, 468, 399, 18096, 30, 3497, 93, 741, 326, 3982, 10407, 2674, 471, 3455, 518, 316, 326, 468, 4790, 457, 4408, 20...
sage: g=graphs.PetersenGraph()
sage: g = graphs.PetersenGraph()
def canonical_label(self, partition=None, certify=False, verbosity=0, edge_labels=False): """ Returns the canonical label with respect to the partition. If no partition is given, uses the unit partition. INPUT: - ``partition`` - if given, the canonical label with respect to this partition will be computed. The default is the unit partition. - ``certify`` - if True, a dictionary mapping from the (di)graph to its canonical label will be given. - ``verbosity`` - gets passed to nice: prints helpful output. - ``edge_labels`` - default False, otherwise allows only permutations respecting edge labels. EXAMPLES:: sage: D = graphs.DodecahedralGraph() sage: E = D.canonical_label(); E Dodecahedron: Graph on 20 vertices sage: D.canonical_label(certify=True) (Dodecahedron: Graph on 20 vertices, {0: 0, 1: 19, 2: 16, 3: 15, 4: 9, 5: 1, 6: 10, 7: 8, 8: 14, 9: 12, 10: 17, 11: 11, 12: 5, 13: 6, 14: 2, 15: 4, 16: 3, 17: 7, 18: 13, 19: 18}) sage: D.is_isomorphic(E) True Multigraphs:: sage: G = Graph(multiedges=True,sparse=True) sage: G.add_edge((0,1)) sage: G.add_edge((0,1)) sage: G.add_edge((0,1)) sage: G.canonical_label() Multi-graph on 2 vertices sage: Graph('A?', implementation='c_graph').canonical_label() Graph on 2 vertices
ed981e55ab1e450a7a93415d1a6c2e8a67d3eaa9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/ed981e55ab1e450a7a93415d1a6c2e8a67d3eaa9/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7378, 67, 1925, 12, 2890, 16, 3590, 33, 7036, 16, 3320, 1164, 33, 8381, 16, 11561, 33, 20, 16, 3591, 67, 5336, 33, 8381, 4672, 3536, 2860, 326, 7378, 1433, 598, 8762, 358, 326, 3590, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7378, 67, 1925, 12, 2890, 16, 3590, 33, 7036, 16, 3320, 1164, 33, 8381, 16, 11561, 33, 20, 16, 3591, 67, 5336, 33, 8381, 4672, 3536, 2860, 326, 7378, 1433, 598, 8762, 358, 326, 3590, ...
self.body.append('\n.br\n')
self.body.append('\n')
def depart_line(self, node): self.body.append('\n.br\n')
0c70e9d508694a8c78001ed892d01ad239f0e0ed /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5620/0c70e9d508694a8c78001ed892d01ad239f0e0ed/manpage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 1369, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 64, 82, 18, 2848, 64, 82, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 1369, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 64, 82, 18, 2848, 64, 82, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if avg:
if avg and bin[avg]:
def query_bins(self): """ Runs the query to calculate the bins and their relevent data """ # local vars x = self.x x1 = self.x1 y = self.y y1 = self.y1 xbin = self.xbin ybin = self.ybin
14d8c94f7bb9d43d75700554aa657f624ba9e9e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6163/14d8c94f7bb9d43d75700554aa657f624ba9e9e6/ConfDistFuncs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 67, 11862, 12, 2890, 4672, 3536, 1939, 87, 326, 843, 358, 4604, 326, 8963, 471, 3675, 6707, 616, 501, 3536, 468, 1191, 4153, 619, 273, 365, 18, 92, 619, 21, 273, 365, 18, 92, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 67, 11862, 12, 2890, 4672, 3536, 1939, 87, 326, 843, 358, 4604, 326, 8963, 471, 3675, 6707, 616, 501, 3536, 468, 1191, 4153, 619, 273, 365, 18, 92, 619, 21, 273, 365, 18, 92, 21...
resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict) def __putFile(self,src_file,dest_url,sourceSize):
resDict = {'Failed':failed, 'Successful':successful} return S_OK( resDict ) def __putFile( self, src_file, dest_url, sourceSize ):
def putFile(self,path,sourceSize=0): res = self.checkArgumentFormat(path) if not res['OK']: return res urls = res['Value'] failed = {} successful = {} for dest_url,src_file in urls.items(): # Create destination directory res = self.__executeOperation(os.path.dirname(dest_url),'createDirectory') if not res['OK']: failed[dest_url] = res['Message'] else: res = self.__putFile(src_file,dest_url,sourceSize) if res['OK']: successful[dest_url] = res['Value'] else: failed[dest_url] = res['Message'] resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict)
70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 812, 12, 2890, 16, 803, 16, 3168, 1225, 33, 20, 4672, 400, 273, 365, 18, 1893, 1379, 1630, 12, 803, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 6903, 273, 400, 3292, 620...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 812, 12, 2890, 16, 803, 16, 3168, 1225, 33, 20, 4672, 400, 273, 365, 18, 1893, 1379, 1630, 12, 803, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 6903, 273, 400, 3292, 620...
descr='test short profiles commands'
descr='''test short profiles commands'''
def test_short_syntax(): uname = 'user_test' gname = 'group_test' pname = 'profil_test' ScenarioTest([ ADD + [ 'user', uname, '-v' ], GET + [ 'user', uname ], ADD + [ 'group', gname, '-v' ], GET + [ 'group', gname ], ADD + [ 'user', uname, gname, '-v' ], GET + [ 'user', uname, '-l' ], ADD + [ 'group', '%s2' % gname, '-v' ], GET + [ 'group', '%s2' % gname ], ADD + [ 'group', '%s3,%s4' % (gname, gname), '-v' ], # should fail (already present) GET + [ 'group', '%s3,%s4' % (gname, gname) ], # should add user2 & user3 ADD + [ 'user', '%s2,%s3' % (uname, uname), '-v' ], GET + [ 'user', '%s2,%s3' % (uname, uname) ], # add 2 users in 3 groups each ADD + [ 'user', '%s2,%s3' % (uname, uname), '%s2,%s3,%s4' % (gname,gname,gname), '-v' ], GET + [ 'user', '%s2,%s3' % (uname, uname), '-l' ], # should add ONLY ONE user in a group and bypass empty one ADD + [ 'user', ',%s' % uname, ',%s2' % gname, '-v' ], # idem ADD + [ 'user', '%s,' % uname, '%s3,' % gname, '-v' ], GET + [ 'user', uname, '-l' ], # should delete only one user and bypass empty one DEL + [ 'user', ',%s' % uname, '-v'], # should fail (already deleted) DEL + [ 'user', '%s,' % uname, '-v'], # IDEM DEL + [ 'user', uname, '-v'], # delete 2 users at same time DEL + [ 'user', '%s2,%s3' % (uname, uname), '-v'], # delete groups, one, then two, then one (bypassing empty) DEL + [ 'group', gname, '-v'], DEL + [ 'group', '%s2,%s3' % (gname, gname), '-v'], DEL + [ 'group', ',%s4' % gname, '-v'], DEL + [ 'group', '%s4,' % gname, '-v'], DEL + [ 'group', '%s4' % gname, '-v'], ], descr='test short users/groups commands' ).Run() ScenarioTest([ ADD + [ 'group', gname, '-v' ], #should fail (the group is not a system group) ADD + [ 'privilege', gname, '-v' ], GET + [ 'privileges' ], ADD + [ 'group', '%ssys' % gname, '--system', '-v' ], ADD + [ 'privilege', '%ssys' % gname, '-v' ], GET + [ 'privileges' ], DEL + [ 'privilege', '%ssys' % gname ], GET + [ 'privileges' ], DEL + [ 'group', gname ], DEL + [ 'group', '%ssys' % gname ], ], descr='test short privileges commands' ).Run() ScenarioTest([ ADD + [ 'group', gname, '--system', '-v' ], ADD + [ 'group', '%s2' % gname, '-v' ], ADD + [ 'group', '%s3' % gname, '-v' ], # should fail (not a system group) ADD + [ 'profile', pname, '--group=%s2' % gname, '--force-existing' ], GET + [ 'profiles' ], # should be OK ADD + [ 'profile', pname, '--group=%s' % gname, '--force-existing' ], GET + [ 'profiles' ], MOD + [ 'profile', pname, '--add-groups=%s2,%s3' % (gname,gname) ], GET + [ 'profiles' ], MOD + [ 'profile', pname, '--del-groups=%s2,%s3' % (gname,gname) ], GET + [ 'profiles' ], DEL + [ 'profile', pname ], DEL + [ 'group', '%s2' % gname, '-v' ], DEL + [ 'group', '%s3' % gname, '-v' ], GET + [ 'profiles' ], ], descr='test short profiles commands' ).Run() ScenarioTest([ ADD + [ 'group', gname, '-v' ], ADD + [ 'group', '%s2' % gname, '-v' ], CHK + [ 'group', gname, '--auto-no', '-vv' ], CHK + [ 'group', gname, '--auto-yes', '-vv' ], CHK + [ 'group', gname, '-vb' ], CHK + [ 'group', '%s,%s2' % (gname,gname), '--auto-no', '-vv' ], CHK + [ 'group', '%s,%s2' % (gname,gname), '--auto-yes', '-vv' ], CHK + [ 'group', '%s,%s2' % (gname,gname), '-vb' ], DEL + [ 'group', '%s,%s2' % (gname,gname), '-v' ], CHK + [ 'config','--auto-no', '-vvae' ], CHK + [ 'config','--auto-yes', '-vvae' ], CHK + [ 'config','--batch', '-vvae' ], ADD + [ 'user', uname, '-v' ], CHK + [ 'user', uname, '--auto-no', '-v' ], CHK + [ 'user', uname, '--auto-yes', '-v' ], CHK + [ 'user', uname, '-vb' ], DEL + [ 'user', uname, '-v' ], ], descr='test short chk commands' ).Run() """ # extended check on user not implemented yet CHK + [ 'user', '%s,%s2' % (uname,uname), '--auto-no', '-vve' ], CHK + [ 'user', '%s,%s2' % (uname,uname), '--auto-yes', '-vve' ], CHK + [ 'user', '%s,%s2' % (uname,uname), '--batch', '-vve' ], DEL + [ 'user', '%s,%s2' % (uname,uname), '-v' ], # check on profile not implemented yet ADD + [ 'profile', '%s,%s2' % (pname,pname), '-v' ], CHK + [ 'profile', pname, '--auto-no', '-vve' ], CHK + [ 'profile', pname, '--auto-yes', '-vve' ], CHK + [ 'profile', pname, '--batch', '-vve' ], CHK + [ 'profile', '%s,%s2' % (pname,pname), '--auto-no', '-vve' ], CHK + [ 'profile', '%s,%s2' % (pname,pname), '--auto-yes', '-vve' ], CHK + [ 'profile', '%s,%s2' % (pname,pname), '--batch', '-vve' ], DEL + [ 'profile', '%s,%s2' % (pname,pname), '-v' ], """
38a496a61795ec7fb8b2f6589579ac75d0b90d9d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/38a496a61795ec7fb8b2f6589579ac75d0b90d9d/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6620, 67, 14308, 13332, 31444, 273, 296, 1355, 67, 3813, 11, 314, 529, 273, 296, 1655, 67, 3813, 11, 19952, 273, 296, 685, 7540, 67, 3813, 11, 225, 2850, 7754, 4709, 3816, 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, 67, 6620, 67, 14308, 13332, 31444, 273, 296, 1355, 67, 3813, 11, 314, 529, 273, 296, 1655, 67, 3813, 11, 19952, 273, 296, 685, 7540, 67, 3813, 11, 225, 2850, 7754, 4709, 3816, 11...
buf = ['', '']
buf = [b'', b'']
def process_rawq(self): """Transfer from raw queue to cooked queue.
a69ff7792116218bfddc90e5e2776d431495b39b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/a69ff7792116218bfddc90e5e2776d431495b39b/telnetlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 1899, 85, 12, 2890, 4672, 3536, 5912, 628, 1831, 2389, 358, 15860, 329, 2389, 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...
[ 1, 1, 1, 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, 1207, 67, 1899, 85, 12, 2890, 4672, 3536, 5912, 628, 1831, 2389, 358, 15860, 329, 2389, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
path = path to stderr file
path = path to stderr file.
def set_stderr_file(self, path): """ Set the file to which Condor directs the stderr of the job. path = path to stderr file """ self.__err_file = path
43adc4d722e280c921ddb7c38f99393e57936591 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/43adc4d722e280c921ddb7c38f99393e57936591/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 11241, 67, 768, 12, 2890, 16, 589, 4672, 3536, 1000, 326, 585, 358, 1492, 735, 72, 280, 2657, 87, 326, 4514, 434, 326, 1719, 18, 589, 273, 589, 358, 4514, 585, 18, 3536, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 11241, 67, 768, 12, 2890, 16, 589, 4672, 3536, 1000, 326, 585, 358, 1492, 735, 72, 280, 2657, 87, 326, 4514, 434, 326, 1719, 18, 589, 273, 589, 358, 4514, 585, 18, 3536, 365...
self.cursor.execute("CREATE INDEX " + index_name + " " \ "ON " + self.table_name + " (" + column_name + ")")
self.cursor.execute('CREATE INDEX "' + index_name + '" ' \ 'ON "' + self.table_name + '" ("' + column_name + '")')
def index_action(self, column_name, action='add'): index_name = "%s_%s_index" % (self.table_name, column_name)
4da5cd211bd2177e823c79d4d55af658e6f50478 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/4da5cd211bd2177e823c79d4d55af658e6f50478/sql_db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 67, 1128, 12, 2890, 16, 1057, 67, 529, 16, 1301, 2218, 1289, 11, 4672, 770, 67, 529, 273, 2213, 87, 10185, 87, 67, 1615, 6, 738, 261, 2890, 18, 2121, 67, 529, 16, 1057, 67, 52...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 770, 67, 1128, 12, 2890, 16, 1057, 67, 529, 16, 1301, 2218, 1289, 11, 4672, 770, 67, 529, 273, 2213, 87, 10185, 87, 67, 1615, 6, 738, 261, 2890, 18, 2121, 67, 529, 16, 1057, 67, 52...
self.assertEquals(sms_partials[i].get_length(), partials[i].get_length())
assert sms_partials[i].get_length() == partials[i].get_length()
def test_partial_tracking(self): """test_partial_tracking Compare pysms Partials with SMS partials.""" audio, sampling_rate = self.get_audio() pysms.sms_init() snd_header = pysms.SMS_SndHeader() # Try to open the input file to fill snd_header if(pysms.sms_openSF(self.input_file, snd_header)): raise NameError("error opening sound file: " + pysms.sms_errorString()) analysis_params = self.pysms_analysis_params(sampling_rate) if pysms.sms_initAnalysis(analysis_params, snd_header) != 0: raise Exception("Error allocating memory for analysis_params") analysis_params.iSizeSound = self.num_samples sms_header = pysms.SMS_Header() pysms.sms_fillHeader(sms_header, analysis_params, "pysms")
f0576d53f10832adb8a491f85ec86d2219a621bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10871/f0576d53f10832adb8a491f85ec86d2219a621bf/sms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11601, 67, 6440, 12, 2890, 4672, 3536, 3813, 67, 11601, 67, 6440, 11051, 21027, 959, 19060, 87, 598, 21297, 20040, 12123, 7447, 16, 11558, 67, 5141, 273, 365, 18, 588, 67, 1150...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11601, 67, 6440, 12, 2890, 4672, 3536, 3813, 67, 11601, 67, 6440, 11051, 21027, 959, 19060, 87, 598, 21297, 20040, 12123, 7447, 16, 11558, 67, 5141, 273, 365, 18, 588, 67, 1150...
logdir = "."
def main(argv = None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:msC:", ["help", "version", "trace", "count", "report", "no-report", "file=", "logdir=", "missing", "ignore-module=", "ignore-dir=", "coverdir="]) except getopt.error, msg: print >> sys.stderr, "%s: %s" % (sys.argv[0], msg) print >> sys.stderr, "Try `%s --help' for more information" \ % sys.argv[0] sys.exit(1) trace = 0 count = 0 report = 0 no_report = 0 counts_file = None logdir = "." missing = 0 ignore_modules = [] ignore_dirs = [] coverdir = None summary = 0 for opt, val in opts: if opt == "--help": usage(sys.stdout) sys.exit(0) if opt == "--version": sys.stdout.write("trace 2.0\n") sys.exit(0) if opt == "-t" or opt == "--trace": trace = 1 continue if opt == "-c" or opt == "--count": count = 1 continue if opt == "-r" or opt == "--report": report = 1 continue if opt == "-R" or opt == "--no-report": no_report = 1 continue if opt == "-f" or opt == "--file": counts_file = val continue if opt == "-d" or opt == "--logdir": logdir = val continue if opt == "-m" or opt == "--missing": missing = 1 continue if opt == "-C" or opt == "--coverdir": coverdir = val continue if opt == "-s" or opt == "--summary": summary = 1 continue if opt == "--ignore-module": ignore_modules.append(val) continue if opt == "--ignore-dir": for s in string.split(val, os.pathsep): s = os.path.expandvars(s) # should I also call expanduser? (after all, could use $HOME) s = string.replace(s, "$prefix", os.path.join(sys.prefix, "lib", "python" + sys.version[:3])) s = string.replace(s, "$exec_prefix", os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3])) s = os.path.normpath(s) ignore_dirs.append(s) continue assert 0, "Should never get here" if len(prog_argv) == 0: _err_exit("missing name of file to run") if count + trace + report > 1: _err_exit("can only specify one of --trace, --count or --report") if count + trace + report == 0: _err_exit("must specify one of --trace, --count or --report") if report and counts_file is None: _err_exit("--report requires a --file") if report and no_report: _err_exit("cannot specify both --report and --no-report") if logdir is not None: # warn if the directory doesn't exist, but keep on going # (is this the correct behaviour?) if not os.path.isdir(logdir): sys.stderr.write( "trace: WARNING, --logdir directory %s is not available\n" % `logdir`) sys.argv = prog_argv progname = prog_argv[0] if eval(sys.version[:3])>1.3: sys.path[0] = os.path.split(progname)[0] # ??? # everything is ready ignore = Ignore(ignore_modules, ignore_dirs) if trace: t = Trace(ignore) try: run(t.trace, 'execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % \ (`sys.argv[0]`, err)) elif count: t = Coverage(ignore) try: run(t.trace, 'execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % \ (`sys.argv[0]`, err)) except SystemExit: pass results = t.results() # Add another lookup from the program's file name to its import name # This give the right results, but I'm not sure why ... results.modules[progname] = os.path.splitext(progname)[0] if counts_file: # add in archived data, if available try: old_counts, old_modules = marshal.load(open(counts_file, 'rb')) except IOError: pass else: results.update(CoverageResults(old_counts, old_modules)) if not no_report: create_results_log(results, logdir, missing, summary=summary, coverdir=coverdir) if counts_file: try: marshal.dump( (results.counts, results.modules), open(counts_file, 'wb')) except IOError, err: _err_exit("Cannot save counts file %s because: %s" % \ (`counts_file`, err)) elif report: old_counts, old_modules = marshal.load(open(counts_file, 'rb')) results = CoverageResults(old_counts, old_modules) create_results_log(results, logdir, missing, summary=summary, coverdir=coverdir) else: assert 0, "Should never get here"
a30eacf45815c14b480972c5097677fac83ed4c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a30eacf45815c14b480972c5097677fac83ed4c0/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 273, 599, 4672, 1930, 336, 3838, 225, 309, 5261, 353, 599, 30, 5261, 273, 2589, 18, 19485, 775, 30, 1500, 16, 11243, 67, 19485, 273, 336, 3838, 18, 588, 3838, 12, 1948...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 273, 599, 4672, 1930, 336, 3838, 225, 309, 5261, 353, 599, 30, 5261, 273, 2589, 18, 19485, 775, 30, 1500, 16, 11243, 67, 19485, 273, 336, 3838, 18, 588, 3838, 12, 1948...
except Queue.Empty:
except Empty:
def poll(self, block=False): """Process any new results in the queue.""" while True: # still results pending? if not self.workRequests: raise NoResultsPending # are there still workers to process remaining requests? elif block and not self.workers: raise NoWorkersAvailable try: # get back next results request, result = self._results_queue.get(block=block) # has an exception occured? if request.exception and request.exc_callback: request.exc_callback(request, result) # hand results to callback, if any if request.callback and not \ (request.exception and request.exc_callback): request.callback(request, result) del self.workRequests[request.requestID] except Queue.Empty: break
a904eff6151e41d734f1ac916587d62d5b099aa2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13948/a904eff6151e41d734f1ac916587d62d5b099aa2/threadpool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7672, 12, 2890, 16, 1203, 33, 8381, 4672, 3536, 2227, 1281, 394, 1686, 316, 326, 2389, 12123, 1323, 1053, 30, 468, 4859, 1686, 4634, 35, 309, 486, 365, 18, 1252, 6421, 30, 1002, 2631, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7672, 12, 2890, 16, 1203, 33, 8381, 4672, 3536, 2227, 1281, 394, 1686, 316, 326, 2389, 12123, 1323, 1053, 30, 468, 4859, 1686, 4634, 35, 309, 486, 365, 18, 1252, 6421, 30, 1002, 2631, ...