rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
a : array_like of string_ or unicode_ Returns ------- out : ndarray Output array of booleans | a : array_like of str or unicode Returns ------- out : ndarray Output array of bools | def isalpha(a): """ Returns true for each element if all characters in the string are alphabetic and there is at least one character, false otherwise. Calls `str.isalpha` element-wise. For 8-bit strings, this method is locale-dependent. Parameters ---------- a : array_like of string_ or unicode_ Returns ------- out : ndarray Output array of booleans See also -------- str.isalpha """ return _vec_string(a, bool_, 'isalpha') | 05324d0e986a1012a342e2650b3883e13a285029 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/05324d0e986a1012a342e2650b3883e13a285029/defchararray.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
5429,
12,
69,
4672,
3536,
2860,
638,
364,
1517,
930,
309,
777,
3949,
316,
326,
533,
854,
524,
8133,
7943,
471,
1915,
353,
622,
4520,
1245,
3351,
16,
629,
3541,
18,
225,
23665,
137... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
5429,
12,
69,
4672,
3536,
2860,
638,
364,
1517,
930,
309,
777,
3949,
316,
326,
533,
854,
524,
8133,
7943,
471,
1915,
353,
622,
4520,
1245,
3351,
16,
629,
3541,
18,
225,
23665,
137... |
print "Making " + str(item) | def makeAllItems(self): assert self.notify.debugStateCall(self) for i in range(len(self['items'])): item = self["items"][i] # If the item is a 'str', then it has not been created # Therefore, use the the function given to make it or # just make it a frame print "Making " + str(item) if item.__class__.__name__ == 'str': if self['itemMakeFunction']: # If there is a function to create the item item = apply(self['itemMakeFunction'], (item, i, self['itemMakeExtraArgs'])) else: item = DirectFrame(text = item, text_align = self['itemsAlign'], text_wordwrap = self['itemsWordwrap'], relief = None) # Then add the newly formed item back into the normal item list self["items"][i] = item item.reparentTo(self.itemFrame) self.recordMaxHeight() | 920a7f21df18e5c883bde48bca63565ecae09673 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/920a7f21df18e5c883bde48bca63565ecae09673/DirectScrolledList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
1595,
3126,
12,
2890,
4672,
1815,
365,
18,
12336,
18,
4148,
1119,
1477,
12,
2890,
13,
364,
277,
316,
1048,
12,
1897,
12,
2890,
3292,
3319,
3546,
3719,
30,
761,
273,
365,
9614,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
1595,
3126,
12,
2890,
4672,
1815,
365,
18,
12336,
18,
4148,
1119,
1477,
12,
2890,
13,
364,
277,
316,
1048,
12,
1897,
12,
2890,
3292,
3319,
3546,
3719,
30,
761,
273,
365,
9614,
33... | |
Returns the sum of the row lengths of the skew partition. | Returns the row lengths of the skew partition. | def row_lengths(self): """ Returns the sum of the row lengths of the skew partition. | a81413f56684165290170400ebbbb1d1e1ca37aa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/a81413f56684165290170400ebbbb1d1e1ca37aa/skew_partition.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1027,
67,
14907,
12,
2890,
4672,
3536,
2860,
326,
2142,
434,
326,
1027,
10917,
434,
326,
20001,
3590,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1027,
67,
14907,
12,
2890,
4672,
3536,
2860,
326,
2142,
434,
326,
1027,
10917,
434,
326,
20001,
3590,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def append_process(xmldoc, program = None, version = None, cvs_repository = None, cvs_entry_time = None, comment = None, is_online = False, jobid = 0, domain = None, ifos = None): """ Add an entry to the process table in xmldoc. program, version, cvs_repository, comment, domain, and ifos should all be strings. cvs_entry_time should be a string in the format "YYYY/MM/DD HH:MM:SS". is_online should be a boolean, jobid an integer. """ proctable = table.get_table(xmldoc, lsctables.ProcessTable.tableName) proctable.sync_next_id() process = lsctables.Process() process.program = program process.version = version process.cvs_repository = cvs_repository if cvs_entry_time is not None: process.cvs_entry_time = XLALUTCToGPS(time.strptime(cvs_entry_time, "%Y/%m/%d %H:%M:%S")).seconds else: process.cvs_entry_time = None process.comment = comment process.is_online = int(is_online) process.node = socket.gethostname() process.username = os.environ["LOGNAME"] process.unix_procid = os.getpid() process.start_time = XLALUTCToGPS(time.gmtime()).seconds process.end_time = None process.jobid = jobid process.domain = domain process.set_ifos(ifos) process.process_id = proctable.get_next_id() proctable.append(process) | def append_process(*args, **kwargs): """ Identical to the append_process() function in glue.ligolw.utils.process except uses LAL to convert UTC to GPS time to get the leap seconds correct. """ process = ligolwprocess.append_process(*args, **kwargs) if "cvs_entry_time" in kwargs and kwargs["cvs_entry_time"] is not None: process.cvs_entry_time = XLALUTCToGPS(time.strptime(kwargs["cvs_entry_time"], "%Y/%m/%d %H:%M:%S")).seconds | def append_process(xmldoc, program = None, version = None, cvs_repository = None, cvs_entry_time = None, comment = None, is_online = False, jobid = 0, domain = None, ifos = None): """ Add an entry to the process table in xmldoc. program, version, cvs_repository, comment, domain, and ifos should all be strings. cvs_entry_time should be a string in the format "YYYY/MM/DD HH:MM:SS". is_online should be a boolean, jobid an integer. """ proctable = table.get_table(xmldoc, lsctables.ProcessTable.tableName) proctable.sync_next_id() process = lsctables.Process() process.program = program process.version = version process.cvs_repository = cvs_repository if cvs_entry_time is not None: process.cvs_entry_time = XLALUTCToGPS(time.strptime(cvs_entry_time, "%Y/%m/%d %H:%M:%S")).seconds else: process.cvs_entry_time = None process.comment = comment process.is_online = int(is_online) process.node = socket.gethostname() process.username = os.environ["LOGNAME"] process.unix_procid = os.getpid() process.start_time = XLALUTCToGPS(time.gmtime()).seconds process.end_time = None process.jobid = jobid process.domain = domain process.set_ifos(ifos) process.process_id = proctable.get_next_id() proctable.append(process) return process | e2a092cec7533600caf3420a51c7a0d5c17de455 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/e2a092cec7533600caf3420a51c7a0d5c17de455/llwapp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
67,
2567,
30857,
1968,
16,
2826,
4333,
4672,
3536,
13128,
1706,
358,
326,
714,
67,
2567,
1435,
445,
316,
17960,
18,
80,
360,
355,
91,
18,
5471,
18,
2567,
1335,
4692,
511,
1013,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
67,
2567,
30857,
1968,
16,
2826,
4333,
4672,
3536,
13128,
1706,
358,
326,
714,
67,
2567,
1435,
445,
316,
17960,
18,
80,
360,
355,
91,
18,
5471,
18,
2567,
1335,
4692,
511,
1013,
35... |
if is_32bit: return sys.platform else: return get_build_architecture().lower() | ba = get_build_architecture() if ba == "AMD64": return "win-x86_64" if ba == "Itanium": return "win-ia64" return sys.platform | def hacked_get_platform(): """getplaform monkey-patched by pywin32 setup""" if is_32bit: return sys.platform else: return get_build_architecture().lower() | f6dfdc5ee1898eaba97fe194719e75daf4a60728 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/992/f6dfdc5ee1898eaba97fe194719e75daf4a60728/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11769,
329,
67,
588,
67,
9898,
13332,
3536,
588,
412,
69,
687,
6921,
856,
17,
2272,
329,
635,
2395,
8082,
1578,
3875,
8395,
9846,
273,
336,
67,
3510,
67,
991,
18123,
1435,
309,
9846,
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,
11769,
329,
67,
588,
67,
9898,
13332,
3536,
588,
412,
69,
687,
6921,
856,
17,
2272,
329,
635,
2395,
8082,
1578,
3875,
8395,
9846,
273,
336,
67,
3510,
67,
991,
18123,
1435,
309,
9846,
4... |
if socket_connect(fd, address): return if time.time() >= end: raise timeout wait_write(fd.fileno(), timeout=end-time.time()) | err = sock.getsockopt(SOL_SOCKET, SO_ERROR) if err: raise error(err, strerror(err)) result = sock.connect_ex(address) if not result or result == EISCONN: break elif (result in (EWOULDBLOCK, EINPROGRESS, EALREADY)) or (result == EINVAL and is_windows): timeleft = end - time.time() if timeleft <= 0: raise timeout wait_readwrite(sock.fileno(), timeout=timeleft) else: raise error(result, strerror(result)) | def connect(self, address): if isinstance(address, tuple) and len(address)==2: address = gethostbyname(address[0]), address[1] if self.timeout == 0.0: return self.fd.connect(address) fd = self.fd if self.timeout is None: while not socket_connect(fd, address): wait_write(fd.fileno()) else: end = time.time() + self.timeout while True: if socket_connect(fd, address): return if time.time() >= end: raise timeout wait_write(fd.fileno(), timeout=end-time.time()) | d33d6fba8a837c865fee87e4078f1ec0c404c998 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10423/d33d6fba8a837c865fee87e4078f1ec0c404c998/socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
12,
2890,
16,
1758,
4672,
309,
1549,
12,
2867,
16,
3193,
13,
471,
562,
12,
2867,
13,
631,
22,
30,
1758,
273,
336,
2564,
1637,
529,
12,
2867,
63,
20,
65,
3631,
1758,
63,
21,
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,
3077,
12,
2890,
16,
1758,
4672,
309,
1549,
12,
2867,
16,
3193,
13,
471,
562,
12,
2867,
13,
631,
22,
30,
1758,
273,
336,
2564,
1637,
529,
12,
2867,
63,
20,
65,
3631,
1758,
63,
21,
6... |
@param hide_broken_links: Don't display broken links | @param disable_autorotation: Don't autorotate very wide images | def __init__(self, book, path, font_delta=0, verbose=False, cover=None, max_link_levels=sys.maxint, link_level=0, is_root=True, baen=False, chapter_detection=True, chapter_regex=re.compile('chapter|book|appendix', re.IGNORECASE), link_exclude=re.compile('$'), page_break=re.compile('h[12]', re.IGNORECASE), profile=PRS500_PROFILE, hide_broken_links=False, disable_autorotation=False): ''' Convert HTML file at C{path} and add it to C{book}. After creating the object, you must call L{self.process_links} on it to create the links and then L{self.writeto} to output the LRF/S file. @param book: The LRF book @type book: L{libprs500.lrf.pylrs.Book} @param path: path to the HTML file to process @type path: C{str} @param width: Width of the device on which the LRF file is to be read @type width: C{int} @param height: Height of the device on which the LRF file is to be read @type height: C{int} @param font_delta: The amount in pts by which all fonts should be changed @type font_delta: C{int} @param verbose: Whether processing should be verbose or not @type verbose: C{bool} @param cover: Path to an image to use as the cover of this book @type cover: C{str} @param max_link_levels: Number of link levels to process recursively @type max_link_levels: C{int} @param link_level: Current link level @type link_level: C{int} @param is_root: True iff this object is converting the root HTML file @type is_root: C{bool} @param chapter_detection: Insert page breaks before what looks like the start of a chapter @type chapter_detection: C{bool} @param chapter_regex: The compiled regular expression used to search for chapter titles @param link_exclude: Compiled regex. Matching hrefs are ignored. @param page_break: Compiled regex. Page breaks are inserted before matching tags if no page-breaks are found and no chapter headings are detected. @param profile: Defines the geometry of the display device @param hide_broken_links: Don't display broken links ''' # Defaults for various formatting tags self.css = dict( h1 = {"font-size" :"xx-large", "font-weight":"bold", 'text-indent':'0pt'}, h2 = {"font-size" :"x-large", "font-weight":"bold", 'text-indent':'0pt'}, h3 = {"font-size" :"large", "font-weight":"bold", 'text-indent':'0pt'}, h4 = {"font-size" :"large", 'text-indent':'0pt'}, h5 = {"font-weight" :"bold", 'text-indent':'0pt'}, b = {"font-weight" :"bold"}, strong = {"font-weight" :"bold"}, i = {"font-style" :"italic"}, em = {"font-style" :"italic"}, small = {'font-size' :'small'}, pre = {'font-family' :'monospace' }, center = {'text-align' : 'center'} ) self.profile = profile #: Defines the geometry of the display device self.chapter_detection = chapter_detection #: Flag to toggle chapter detection self.chapter_regex = chapter_regex #: Regex used to search for chapter titles self.link_exclude = link_exclude #: Ignore matching hrefs self.scaled_images = {} #: Temporary files with scaled version of images self.rotated_images = {} #: Temporary files with rotated version of images self.max_link_levels = max_link_levels #: Number of link levels to process recursively self.link_level = link_level #: Current link level self.disable_autorotation = disable_autorotation self.blockquote_style = book.create_block_style(sidemargin=60, topskip=20, footskip=20) self.unindented_style = book.create_text_style(parindent=0) self.page_break = page_break #: Regex controlling forced page-break behavior self.text_styles = []#: Keep track of already used textstyles self.block_styles = []#: Keep track of already used blockstyles self.images = {} #: Images referenced in the HTML document self.targets = {} #: <a name=...> elements self.links = [] #: <a href=...> elements self.files = {} #: links that point to other files self.links_processed = False #: Whether links_processed has been called on this object self.font_delta = font_delta # Set by table processing code so that any <a name> within the table # point to the previous element self.anchor_to_previous = None self.cover = cover self.memory = [] #: Used to ensure that duplicate CSS unhandled erros are not reported self.in_ol = False #: Flag indicating we're in an <ol> element self.book = book #: The Book object representing a BBeB book self.is_root = is_root #: Are we converting the root HTML file self.lstrip_toggle = False #: If true the next add_text call will do an lstrip self.hide_broken_links = hide_broken_links path = os.path.abspath(path) os.chdir(os.path.dirname(path)) self.file_name = os.path.basename(path) print "Processing", self.file_name print '\tParsing HTML...', sys.stdout.flush() nmassage = copy.copy(BeautifulSoup.MARKUP_MASSAGE) nmassage.extend(HTMLConverter.MARKUP_MASSAGE) self.baen = baen if baen: nmassage.extend(HTMLConverter.BAEN_SANCTIFY) self.soup = BeautifulSoup(open(self.file_name, 'r').read(), convertEntities=BeautifulSoup.HTML_ENTITIES, markupMassage=nmassage) print 'done\n\tConverting to BBeB...', sys.stdout.flush() self.verbose = verbose self.current_page = None self.current_para = None self.current_style = {} self.page_break_found = False match = self.PAGE_BREAK_PAT.search(unicode(self.soup)) if match and not re.match('avoid', match.group(1), re.IGNORECASE): self.page_break_found = True self.parse_file() HTMLConverter.processed_files[path] = self print 'done' | 7329106b9971a236c22ef7a40e8a849bddcad759 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/7329106b9971a236c22ef7a40e8a849bddcad759/convert_from.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
6978,
16,
589,
16,
3512,
67,
9878,
33,
20,
16,
3988,
33,
8381,
16,
5590,
33,
7036,
16,
943,
67,
1232,
67,
12095,
33,
9499,
18,
1896,
474,
16,
1692,
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,
1001,
2738,
972,
12,
2890,
16,
6978,
16,
589,
16,
3512,
67,
9878,
33,
20,
16,
3988,
33,
8381,
16,
5590,
33,
7036,
16,
943,
67,
1232,
67,
12095,
33,
9499,
18,
1896,
474,
16,
1692,
6... |
flags = select.POLLIN | flags = select.POLLIN | select.POLLPRI | def poll2(timeout=0.0, map=None): # Use the poll() support added to the select module in Python 2.0 if map is None: map = socket_map if timeout is not None: # timeout is in milliseconds timeout = int(timeout*1000) pollster = select.poll() if map: for fd, obj in map.items(): flags = 0 if obj.readable(): flags = select.POLLIN if obj.writable(): flags = flags | select.POLLOUT if flags: pollster.register(fd, flags) try: r = pollster.poll(timeout) except select.error, err: if err[0] != EINTR: raise r = [] for fd, flags in r: obj = map.get(fd) if obj is None: continue readwrite(obj, flags) | 3c678da3136dc4adbbf998ed008680dcb9c4e717 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/3c678da3136dc4adbbf998ed008680dcb9c4e717/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7672,
22,
12,
4538,
33,
20,
18,
20,
16,
852,
33,
7036,
4672,
468,
2672,
326,
7672,
1435,
2865,
3096,
358,
326,
2027,
1605,
316,
6600,
576,
18,
20,
309,
852,
353,
599,
30,
852,
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,
7672,
22,
12,
4538,
33,
20,
18,
20,
16,
852,
33,
7036,
4672,
468,
2672,
326,
7672,
1435,
2865,
3096,
358,
326,
2027,
1605,
316,
6600,
576,
18,
20,
309,
852,
353,
599,
30,
852,
273,
... |
sage: print check_bitrade_generators(a, b, G.identity()) | sage: check_bitrade_generators(a, b, gap('()')) | def check_bitrade_generators(a, b, c): """ Three group elements a, b, c will generate a bitrade if a*b*c = 1 and the subgroups <a>, <b>, <c> intersect (pairwise) in just the identity. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: a, b, c, G = p3_group_bitrade_generators(3) sage: print check_bitrade_generators(a, b, c) True sage: print check_bitrade_generators(a, b, G.identity()) False """ A = PermutationGroup([a]) B = PermutationGroup([b]) C = PermutationGroup([c]) if a*b != c**(-1): return False X = gap.Intersection(gap.Intersection(A, B), C) return X.Size() == 1 | 494f2bd1cd82ea9dcc25f8e258b7375812aed1c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/494f2bd1cd82ea9dcc25f8e258b7375812aed1c9/latin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
3682,
354,
323,
67,
25959,
12,
69,
16,
324,
16,
276,
4672,
3536,
935,
992,
1041,
2186,
279,
16,
324,
16,
276,
903,
2103,
279,
2831,
354,
323,
309,
279,
14,
70,
14,
71,
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,
866,
67,
3682,
354,
323,
67,
25959,
12,
69,
16,
324,
16,
276,
4672,
3536,
935,
992,
1041,
2186,
279,
16,
324,
16,
276,
903,
2103,
279,
2831,
354,
323,
309,
279,
14,
70,
14,
71,
273... |
self.assertEqual(-(0x7fffffff), -2147483647) | if platform_long_is_32_bits: self.assertEqual(-(0x7fffffff), -2147483647) else: self.assertEqual(-(0x7fffffffffffffff), -9223372036854775807) | def test_hex_baseline(self): # Baseline tests self.assertEqual(0x0, 0) self.assertEqual(0x10, 16) self.assertEqual(0x7fffffff, 2147483647) # Ditto with a minus sign and parentheses self.assertEqual(-(0x0), 0) self.assertEqual(-(0x10), -16) self.assertEqual(-(0x7fffffff), -2147483647) # Ditto with a minus sign and NO parentheses self.assertEqual(-0x0, 0) self.assertEqual(-0x10, -16) self.assertEqual(-0x7fffffff, -2147483647) | dcfdceb9a21881b58f0278dda92a7cdce6782614 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dcfdceb9a21881b58f0278dda92a7cdce6782614/test_hexoct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7118,
67,
27818,
12,
2890,
4672,
468,
605,
345,
3027,
7434,
365,
18,
11231,
5812,
12,
20,
92,
20,
16,
374,
13,
365,
18,
11231,
5812,
12,
20,
92,
2163,
16,
2872,
13,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7118,
67,
27818,
12,
2890,
4672,
468,
605,
345,
3027,
7434,
365,
18,
11231,
5812,
12,
20,
92,
20,
16,
374,
13,
365,
18,
11231,
5812,
12,
20,
92,
2163,
16,
2872,
13,
365,
... |
for page in self.__getMembersInternal(titleonly): self.members.append(page) yield page def __getMembersInternal(self, titleonly): | for member in self.__getMembersInternal(): self.members.append(member) if titleonly: yield member.title else: yield member def __getMembersInternal(self, namespace=False): | def getAllMembersGen(self, titleonly=False, reload=False): """ Generator function for pages in the category titleonly - set to True to return strings, else it will return Page objects reload - reload the list even if it was generated before """ if self.members and not reload: for page in self.members: yield page else: self.members = [] for page in self.__getMembersInternal(titleonly): self.members.append(page) yield page | e657ba26703fb1be19915808bfa4f1dd2f094db3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8398/e657ba26703fb1be19915808bfa4f1dd2f094db3/category.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5514,
6918,
7642,
12,
2890,
16,
2077,
3700,
33,
8381,
16,
7749,
33,
8381,
4672,
3536,
10159,
445,
364,
4689,
316,
326,
3150,
2077,
3700,
300,
444,
358,
1053,
358,
327,
2064,
16,
469,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5514,
6918,
7642,
12,
2890,
16,
2077,
3700,
33,
8381,
16,
7749,
33,
8381,
4672,
3536,
10159,
445,
364,
4689,
316,
326,
3150,
2077,
3700,
300,
444,
358,
1053,
358,
327,
2064,
16,
469,
5... |
def __getattr__(self, key): try: return self.__dict__[key] except KeyError: pass try: return self.__getitem__(key) except: raise AttributeError, "object has no attribute '%s'" % key | def __getitem__(self, key): if key == 'channel': key = 'feed' if key == 'items': key = 'entries' return UserDict.__getitem__(self, key) | b3c42297ed6d1067cba85829e8aa2d2b9949f4f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b3c42297ed6d1067cba85829e8aa2d2b9949f4f0/feedparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
309,
498,
422,
296,
4327,
4278,
498,
273,
296,
7848,
11,
309,
498,
422,
296,
3319,
4278,
498,
273,
296,
8219,
11,
327,
2177,
5014,
16186,
315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
309,
498,
422,
296,
4327,
4278,
498,
273,
296,
7848,
11,
309,
498,
422,
296,
3319,
4278,
498,
273,
296,
8219,
11,
327,
2177,
5014,
16186,
315... | |
self.engine.hide(config.OSD_FADE_STEPS) | def hide(self): """ hide the guide """ MenuApplication.hide(self) # self.engine.clear() self.engine.hide(config.OSD_FADE_STEPS) | 0e053604cc42bbe5e72d37ee056c59878ab51b26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/0e053604cc42bbe5e72d37ee056c59878ab51b26/tvguide.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6853,
12,
2890,
4672,
3536,
6853,
326,
7343,
3536,
9809,
3208,
18,
11248,
12,
2890,
13,
468,
365,
18,
8944,
18,
8507,
1435,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
6853,
12,
2890,
4672,
3536,
6853,
326,
7343,
3536,
9809,
3208,
18,
11248,
12,
2890,
13,
468,
365,
18,
8944,
18,
8507,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
line = [ '%%run %s' % editor.uri ] runner.run_lines(line) | runner.run_lines(lines) def run_file(editor): lines = [ '%%run %s' % editor.uri ] show_and_run(editor, lines) def debug_file(editor): lines = [ '%%run -d %s' %editor.uri ] show_and_run(editor, lines) | def run_file(editor): runner = get_ipython_runner(editor) if not runner.visible(): runner.show() editor.popup_widget(runner.panel) line = [ '%%run %s' % editor.uri ] runner.run_lines(line) | e670707715d6edfebfacd6bb6abd0193e94b9da4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14800/e670707715d6edfebfacd6bb6abd0193e94b9da4/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
768,
12,
9177,
4672,
8419,
273,
336,
67,
9126,
3041,
67,
18156,
12,
9177,
13,
309,
486,
8419,
18,
8613,
13332,
8419,
18,
4500,
1435,
4858,
18,
16086,
67,
6587,
12,
18156,
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,
1086,
67,
768,
12,
9177,
4672,
8419,
273,
336,
67,
9126,
3041,
67,
18156,
12,
9177,
13,
309,
486,
8419,
18,
8613,
13332,
8419,
18,
4500,
1435,
4858,
18,
16086,
67,
6587,
12,
18156,
18,... |
(item.itsPath, attributeName, reference.itsPath) | (item.itsPath, attributeName, displayPath) | def completeAssignments(self, item, assignments): """ Perform all the delayed attribute assignments for an item """ | 6fe2d3d7d61559986cdae14bc15c75cc2c8c1bdc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/6fe2d3d7d61559986cdae14bc15c75cc2c8c1bdc/Parcel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3912,
18628,
12,
2890,
16,
761,
16,
13610,
4672,
3536,
11217,
777,
326,
15278,
1566,
13610,
364,
392,
761,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
3912,
18628,
12,
2890,
16,
761,
16,
13610,
4672,
3536,
11217,
777,
326,
15278,
1566,
13610,
364,
392,
761,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
start_dd, end_dd = '<listitem>', '</listitem></varlistentry>' | start_dd, end_dd = '<listitem><para>', '</para></listitem></varlistentry>' | def visitNode_a_name(self, node): self.visitNodeDefault(node) | 3cf61b2d33db96a9e4660ec1551bbe58779db763 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3cf61b2d33db96a9e4660ec1551bbe58779db763/docbook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
907,
67,
69,
67,
529,
12,
2890,
16,
756,
4672,
365,
18,
11658,
907,
1868,
12,
2159,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
907,
67,
69,
67,
529,
12,
2890,
16,
756,
4672,
365,
18,
11658,
907,
1868,
12,
2159,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
security.declareProtected(permissions.ModifyPortalContent, | security.declareProtected(CMFCorePermissions.ModifyPortalContent, | def keys(self): return self._names | b9a35d44b511b5a532334179a24412a4695367d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/b9a35d44b511b5a532334179a24412a4695367d1/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1311,
12,
2890,
4672,
327,
365,
6315,
1973,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1311,
12,
2890,
4672,
327,
365,
6315,
1973,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if progress_callback: progress_callback(filename, None) | if progress_callback: progress_callback(filename) | def _write(self, directory, progress_callback): """ A helper for L{write} that writes all documentation to a given directory. This is typically called once for the public API documentation, and once for the private API documentation. """ # Write the object documentation. self._write_docs(directory, progress_callback) # Write the tree file (package & class hierarchies) filename = os.path.join(directory, 'trees.html') if progress_callback: progress_callback(filename, None) self._write_trees(filename) | ff8a7768302f9a81d34b7d6002d78ad59f4ed37f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/ff8a7768302f9a81d34b7d6002d78ad59f4ed37f/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
12,
2890,
16,
1867,
16,
4007,
67,
3394,
4672,
3536,
432,
4222,
364,
511,
95,
2626,
97,
716,
7262,
777,
7323,
358,
279,
864,
1867,
18,
225,
1220,
353,
14755,
2566,
3647,
364,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
12,
2890,
16,
1867,
16,
4007,
67,
3394,
4672,
3536,
432,
4222,
364,
511,
95,
2626,
97,
716,
7262,
777,
7323,
358,
279,
864,
1867,
18,
225,
1220,
353,
14755,
2566,
3647,
364,... |
username=self.main.localdata.GetUsername(ip) | if username.startswith('error: tcos-last'): username="---" try: print_debug("set_client_data() => get num process") num_process=self.main.localdata.GetNumProcess(ip) except: num_process="---" print_debug("set_client_data() => get time logged") time_logged=self.main.localdata.GetTimeLogged(ip) if not time_logged or time_logged == "" or time_logged.startswith('error: tcos-last'): time_logged="---" print_debug("set_client_data() => get active connection") | def set_client_data(self, ip, model, iter): print_debug ( "refresh_client_info2() updating host data..." ) inactive_image = gtk.gdk.pixbuf_new_from_file(shared.IMG_DIR + 'inactive.png') active_image = gtk.gdk.pixbuf_new_from_file(shared.IMG_DIR + 'active.png') active_ssl_image = gtk.gdk.pixbuf_new_from_file(shared.IMG_DIR + 'active_ssl.png') logged_image = gtk.gdk.pixbuf_new_from_file(shared.IMG_DIR + 'logged.png') unlogged_image = gtk.gdk.pixbuf_new_from_file(shared.IMG_DIR + 'unlogged.png') locked_image = gtk.gdk.pixbuf_new_from_file(shared.IMG_DIR + 'locked.png') locked_net_image = gtk.gdk.pixbuf_new_from_file(shared.IMG_DIR + 'locked_net.png') locked_net_screen_image = gtk.gdk.pixbuf_new_from_file(shared.IMG_DIR + 'locked_net_screen.png') unlocked_image = gtk.gdk.pixbuf_new_from_file(shared.IMG_DIR + 'unlocked.png') # disable cache self.main.localdata.cache_timeout=0 hostname=self.main.localdata.GetHostname(ip) username=self.main.localdata.GetUsername(ip) if self.main.localdata.IsActive(ip): if self.main.xmlrpc.sslconnection: image_active=active_ssl_image else: image_active=active_image else: image_active=inactive_image if self.main.localdata.IsLogged(ip): image_logged=logged_image else: image_logged=unlogged_image if self.main.localdata.IsBlocked(ip): blocked_screen=True else: blocked_screen=False if self.main.localdata.IsBlockedNet(ip): blocked_net=True else: blocked_net=False if blocked_screen and blocked_net: image_blocked=locked_net_screen_image elif blocked_screen == False and blocked_net: image_blocked=locked_net_image elif blocked_screen and blocked_net == False: image_blocked=locked_image else: image_blocked=unlocked_image num_process=self.main.localdata.GetNumProcess(ip) time_logged=self.main.localdata.GetTimeLogged(ip) #enable cache again self.main.localdata.cache_timeout=shared.cache_timeout model.set_value (iter, COL_HOST, hostname ) model.set_value (iter, COL_IP, ip ) model.set_value (iter, COL_USERNAME, username ) model.set_value (iter, COL_ACTIVE, image_active ) model.set_value (iter, COL_LOGGED, image_logged) model.set_value (iter, COL_BLOCKED, image_blocked) model.set_value (iter, COL_PROCESS, num_process ) model.set_value (iter, COL_TIME, time_logged) | e97dfbc740773c38976ad8ab8b195f84cf355ee2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13520/e97dfbc740773c38976ad8ab8b195f84cf355ee2/TcosActions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
2625,
67,
892,
12,
2890,
16,
2359,
16,
938,
16,
1400,
4672,
1172,
67,
4148,
261,
315,
9144,
67,
2625,
67,
1376,
22,
1435,
9702,
1479,
501,
7070,
262,
225,
16838,
67,
2730,
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,
444,
67,
2625,
67,
892,
12,
2890,
16,
2359,
16,
938,
16,
1400,
4672,
1172,
67,
4148,
261,
315,
9144,
67,
2625,
67,
1376,
22,
1435,
9702,
1479,
501,
7070,
262,
225,
16838,
67,
2730,
2... |
aboutdialog.connect("response", close_about) aboutdialog.connect("delete_event", close_about) aboutdialog.show_all() | aboutdialog.run() aboutdialog.destroy() | def show_website(dialog, blah, link): webbrowser.open_new(link) | 337e2628519817abde9df50dbed69c769add8439 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/337e2628519817abde9df50dbed69c769add8439/arkadas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
21868,
12,
12730,
16,
2811,
9795,
16,
1692,
4672,
3311,
11213,
18,
3190,
67,
2704,
12,
1232,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2405,
67,
21868,
12,
12730,
16,
2811,
9795,
16,
1692,
4672,
3311,
11213,
18,
3190,
67,
2704,
12,
1232,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
msg = "The combination %s is not unique in the frame cache file" % str(key) | msg = "The combination %s is not unique in the frame cache file" \ % str(key) | def parse(self): """ Each line of the frame cache file is like the following: | 24b81d2ec6995782c831003011aff6c9c31e0e57 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3589/24b81d2ec6995782c831003011aff6c9c31e0e57/pipeline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
4672,
3536,
8315,
980,
434,
326,
2623,
1247,
585,
353,
3007,
326,
3751,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
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,
1109,
12,
2890,
4672,
3536,
8315,
980,
434,
326,
2623,
1247,
585,
353,
3007,
326,
3751,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.pool.get('stock.move').write(cr, uid, [proc.move_id.id], | move_obj.write(cr, uid, [proc.move_id.id], | def action_move_create(self, cr, uid, ids,context=None): proc_obj = self.pool.get('procurement.order') move_obj = self.pool.get('stock.move') location_obj = self.pool.get('stock.location') wf_service = netsvc.LocalService("workflow") for proc in proc_obj.browse(cr, uid, ids, context=context): line = None for line in proc.product_id.flow_pull_ids: if line.location_id==proc.location_id: break assert line, 'Line can not be False if we are on this state of the workflow' origin = (proc.origin or proc.name or '').split(':')[0] +':'+line.name picking_id = self.pool.get('stock.picking').create(cr, uid, { 'origin': origin, 'company_id': line.company_id and line.company_id.id or False, 'type': line.picking_type, 'stock_journal_id': line.journal_id and line.journal_id.id or False, 'move_type': 'one', 'address_id': line.partner_address_id.id, 'note': line.name, # TODO: note on procurement ? 'invoice_state': line.invoice_state, }) move_id = self.pool.get('stock.move').create(cr, uid, { 'name': line.name, 'picking_id': picking_id, 'company_id': line.company_id and line.company_id.id or False, 'product_id': proc.product_id.id, 'date': proc.date_planned, 'product_qty': proc.product_qty, 'product_uom': proc.product_uom.id, 'product_uos_qty': (proc.product_uos and proc.product_uos_qty)\ or proc.product_qty, 'product_uos': (proc.product_uos and proc.product_uos.id)\ or proc.product_uom.id, 'address_id': line.partner_address_id.id, 'location_id': line.location_src_id.id, 'location_dest_id': line.location_id.id, 'move_dest_id': proc.move_id and proc.move_id.id or False, # to verif, about history ? 'tracking_id': False, 'cancel_cascade': line.cancel_cascade, 'state': 'confirmed', 'note': line.name, # TODO: same as above }) if proc.move_id and proc.move_id.state in ('confirmed'): self.pool.get('stock.move').write(cr,uid, [proc.move_id.id], { 'state':'waiting' }, context=context) proc_id = self.pool.get('procurement.order').create(cr, uid, { 'name': line.name, 'origin': origin, 'company_id': line.company_id and line.company_id.id or False, 'date_planned': proc.date_planned, 'product_id': proc.product_id.id, 'product_qty': proc.product_qty, 'product_uom': proc.product_uom.id, 'product_uos_qty': (proc.product_uos and proc.product_uos_qty)\ or proc.product_qty, 'product_uos': (proc.product_uos and proc.product_uos.id)\ or proc.product_uom.id, 'location_id': line.location_src_id.id, 'procure_method': line.procure_method, 'move_id': move_id, }) wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr) wf_service.trg_validate(uid, 'procurement.order', proc_id, 'button_confirm', cr) if proc.move_id: self.pool.get('stock.move').write(cr, uid, [proc.move_id.id], {'location_id':proc.location_id.id}) | fa99a1d9c04f0859a4d185a55a27780f4d2da4c1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/fa99a1d9c04f0859a4d185a55a27780f4d2da4c1/mrp_pull.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
8501,
67,
2640,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
2472,
33,
7036,
4672,
5418,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
9381,
594,
475,
18,
1019,
6134,
3635,
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,
1301,
67,
8501,
67,
2640,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
2472,
33,
7036,
4672,
5418,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
9381,
594,
475,
18,
1019,
6134,
3635,
6... |
[2, 2, 3] | [2, 6] | def elementary_divisors(self): """ EXAMPLES: sage: G = AbelianGroup(2,[2,6]) sage: G Multiplicative Abelian Group isomorphic to C2 x C6 sage: G.invariants() [2, 6] sage: G.elementary_divisors() [2, 2, 3] sage: J = AbelianGroup([1,3,5,12]) sage: J.elementary_divisors() [3, 3, 4, 5] """ inv = self.invariants() invs = list(inv) invs2 = list(inv) n = len(invs) for a in invs: if not is_prime_power(a): invs2.remove(a) facs = factor(a) pfacs = [facs[i][0]**facs[i][1] for i in range(len(facs))] invs2 = invs2 + pfacs invs2.sort() return invs2 | d1d151891b571a6398a41fe7c68b5bf2f4add0f4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/d1d151891b571a6398a41fe7c68b5bf2f4add0f4/abelian_group.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
930,
814,
67,
2892,
291,
1383,
12,
2890,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
611,
273,
9771,
292,
2779,
1114,
12,
22,
16,
63,
22,
16,
26,
5717,
272,
410,
30,
611,
5991,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
930,
814,
67,
2892,
291,
1383,
12,
2890,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
611,
273,
9771,
292,
2779,
1114,
12,
22,
16,
63,
22,
16,
26,
5717,
272,
410,
30,
611,
5991,
... |
if not self._is_inside_work_tree(): | if not self.is_inside_work_tree(): | def _get_current_branch(self): """Returns either a branchname or None if head is detached""" if not self._is_inside_work_tree(): raise CommandError(_('Unexpected: Checkoutdir is not a git ' 'repository:' + self.get_checkoutdir())) try: return os.path.basename( get_output(['git', 'symbolic-ref', '-q', 'HEAD'], cwd=self.get_checkoutdir(), extra_env=get_git_extra_env()).strip()) except CommandError: return None | f3dca446ec51b04ec85ec73c7ed97895744dff87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4596/f3dca446ec51b04ec85ec73c7ed97895744dff87/git.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
2972,
67,
7500,
12,
2890,
4672,
3536,
1356,
3344,
279,
3803,
529,
578,
599,
309,
910,
353,
22037,
8395,
309,
486,
365,
18,
291,
67,
28091,
67,
1252,
67,
3413,
13332,
1002... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2972,
67,
7500,
12,
2890,
4672,
3536,
1356,
3344,
279,
3803,
529,
578,
599,
309,
910,
353,
22037,
8395,
309,
486,
365,
18,
291,
67,
28091,
67,
1252,
67,
3413,
13332,
1002... |
self.label14.set_width_chars(16) | self.label14.set_width_chars(18) | def __init__(self, create = True, accel_group = None, tooltips = None): if accel_group is None: self.accel_group = gtk.AccelGroup() else: self.accel_group = accel_group if tooltips is None: self.tooltips = gtk.Tooltips() else: self.tooltips = tooltips self.tooltips.enable() if create: self.LogFrame = gtk.Window() self.LogFrame.set_title(_("Log")) self.LogFrame.add_accel_group(self.accel_group) self.LogFrame.show() | 813bd892e00cbf0bb0b8cac261792e712b6cefeb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8738/813bd892e00cbf0bb0b8cac261792e712b6cefeb/settings_glade.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
752,
273,
1053,
16,
15153,
67,
1655,
273,
599,
16,
358,
4397,
7146,
273,
599,
4672,
309,
15153,
67,
1655,
353,
599,
30,
365,
18,
30737,
67,
1655,
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,
2738,
972,
12,
2890,
16,
752,
273,
1053,
16,
15153,
67,
1655,
273,
599,
16,
358,
4397,
7146,
273,
599,
4672,
309,
15153,
67,
1655,
353,
599,
30,
365,
18,
30737,
67,
1655,
273,
... |
uid=uid) | uid=uid, verbose=verbose) | def call_bibformat(recID, format="HD", ln=cdslang, search_pattern=None, uid=None): """ Calls BibFormat and returns formatted record. BibFormat will decide by itself if old or new BibFormat must be used. """ keywords = [] if search_pattern is not None: units = create_basic_search_units(None, str(search_pattern), None) keywords = [unit[1] for unit in units if unit[0] != '-'] return format_record(recID, of=format, ln=ln, search_pattern=keywords, uid=uid) | 9189a35dfa2bb2550f28c89f35ffa36ae73a43d6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2139/9189a35dfa2bb2550f28c89f35ffa36ae73a43d6/search_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
67,
70,
495,
2139,
12,
3927,
734,
16,
740,
1546,
44,
40,
3113,
7211,
33,
4315,
2069,
539,
16,
1623,
67,
4951,
33,
7036,
16,
4555,
33,
7036,
4672,
3536,
23665,
605,
495,
1630,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
67,
70,
495,
2139,
12,
3927,
734,
16,
740,
1546,
44,
40,
3113,
7211,
33,
4315,
2069,
539,
16,
1623,
67,
4951,
33,
7036,
16,
4555,
33,
7036,
4672,
3536,
23665,
605,
495,
1630,
47... |
parser.show(sys.stderr, tree, 0) | parser.show(sys.stdout, tree, 0) | def showTree(tree): parser.show(sys.stderr, tree, 0) | 25c7fed9a797ed55297f0f7730dfadecfbcb2fbb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/25c7fed9a797ed55297f0f7730dfadecfbcb2fbb/test_treecleaner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
2471,
12,
3413,
4672,
2082,
18,
4500,
12,
9499,
18,
10283,
16,
2151,
16,
374,
13,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
2471,
12,
3413,
4672,
2082,
18,
4500,
12,
9499,
18,
10283,
16,
2151,
16,
374,
13,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
"""INPUT: S, a Weyl character ring for a Lie subgroup or subalgebra RULE - a branching rule. | """ | def branch(self, S, rule="default"): """INPUT: S, a Weyl character ring for a Lie subgroup or subalgebra RULE - a branching rule. Returns the restriction of the character to the subalgebra. If no rule is specified, we will try to specify one. | af4f5f46d5016de6167398d67987ba1855db181e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/af4f5f46d5016de6167398d67987ba1855db181e/weyl_characters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3803,
12,
2890,
16,
348,
16,
1720,
1546,
1886,
6,
4672,
3536,
2860,
326,
9318,
434,
326,
3351,
358,
326,
720,
287,
29087,
18,
971,
1158,
1720,
353,
1269,
16,
732,
903,
775,
358,
4800,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3803,
12,
2890,
16,
348,
16,
1720,
1546,
1886,
6,
4672,
3536,
2860,
326,
9318,
434,
326,
3351,
358,
326,
720,
287,
29087,
18,
971,
1158,
1720,
353,
1269,
16,
732,
903,
775,
358,
4800,
... |
list.append(self, CfgRegExp.parseString(val)) | list.append(self, CfgRegExp().parseString(val)) | def addExp(self, val): list.append(self, CfgRegExp.parseString(val)) | cd5aa07e1bd05a246276ac833f508478808ca84d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/cd5aa07e1bd05a246276ac833f508478808ca84d/cfgtypes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2966,
12,
2890,
16,
1244,
4672,
666,
18,
6923,
12,
2890,
16,
24631,
13673,
18,
2670,
780,
12,
1125,
3719,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2966,
12,
2890,
16,
1244,
4672,
666,
18,
6923,
12,
2890,
16,
24631,
13673,
18,
2670,
780,
12,
1125,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
parent = node.parentNode.parentNode | parent2 = node.parentNode.parentNode parent = node.parentNode first = True newnode = None | def _parse_text(self, cursor, user, node, localcontext, context, node_context): if node.parentNode.tagName == 'text:text-input': localcontext['RepeatIn'] = lambda lst, name, parents=False: \ self.repeat_in(lst, name, parents=parents, tnode=node, node_context=node_context) localcontext['setTag'] = lambda oldtag, newtag, attrs=None: \ self.set_tag(oldtag, newtag, attrs=attrs, tnode=node) localcontext['removeParentNode'] = lambda tag='p': \ self.remove_parent_node(tag, tnode=node) localcontext['setLang'] = lambda lang: \ self.set_lang(lang, localcontext) localcontext['formatLang'] = lambda value, digits=2, date=False: \ self.format_lang(value, digits=digits, date=date, localcontext=localcontext) localcontext['time'] = time res = eval(node.nodeValue, localcontext) if hasattr(res, '__str__'): res = res.__str__() if isinstance(res, basestring): if '\n' in res: parent = node.parentNode.parentNode for val in res.decode('utf-8').split('\n'): newnode = node.cloneNode(1) newnode.nodeValue = val node.parentNode.parentNode.appendChild(newnode) newnode = node.parentNode.cloneNode(1) newnode.nodeType = newnode.ELEMENT_NODE newnode.tagName = 'text:line-break' newnode.firstChild.nodeValue = '' newnode.removeAttribute('text:description') node.parentNode.parentNode.appendChild(newnode) parent.removeChild(parent.firstChild) parent.removeChild(parent.lastChild) else: node.nodeValue = res.decode('utf-8') node.parentNode.parentNode.replaceChild(node, node.parentNode) return res if 'language' in localcontext: lang = localcontext['language'] text = node.nodeValue if lang and text and not text.isspace(): translation_obj = self.pool.get('ir.translation') new_text = translation_obj._get_source(cursor, self._name, 'rml', lang, text) if new_text: node.nodeValue = new_text return None | 18ff80db73c539bd9af18b69ce5e5bd1a9316af1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/18ff80db73c539bd9af18b69ce5e5bd1a9316af1/report.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
67,
955,
12,
2890,
16,
3347,
16,
729,
16,
756,
16,
1191,
2472,
16,
819,
16,
756,
67,
2472,
4672,
309,
756,
18,
2938,
907,
18,
2692,
461,
422,
296,
955,
30,
955,
17,
2630... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
955,
12,
2890,
16,
3347,
16,
729,
16,
756,
16,
1191,
2472,
16,
819,
16,
756,
67,
2472,
4672,
309,
756,
18,
2938,
907,
18,
2692,
461,
422,
296,
955,
30,
955,
17,
2630... |
for key,value in kwds.items(): | for key,field_value in kwds.items(): | def post_package_edit_form(self, package_ref, form=None, status=[200], **kwds): if form == None: form = self.get_package_edit_form(package_ref) for key,value in kwds.items(): package_id = self.package_id_from_ref(package_ref) field_name = 'Package-%s-%s' % (package_id, key) form[field_name] = value form_data = form.submit_fields() data = { 'form_data': form_data, 'log_message': 'Unit-testing the Forms API...', 'author': 'automated test suite', } offset = self.offset_package_edit_form(package_ref) return self.post(offset, data, status=status) | 8b2d03c0e3f27fce7d4d0a408d3cf549780da788 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/265/8b2d03c0e3f27fce7d4d0a408d3cf549780da788/test_form.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
67,
5610,
67,
4619,
67,
687,
12,
2890,
16,
2181,
67,
1734,
16,
646,
33,
7036,
16,
1267,
22850,
6976,
6487,
2826,
25577,
4672,
309,
646,
422,
599,
30,
646,
273,
365,
18,
588,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
67,
5610,
67,
4619,
67,
687,
12,
2890,
16,
2181,
67,
1734,
16,
646,
33,
7036,
16,
1267,
22850,
6976,
6487,
2826,
25577,
4672,
309,
646,
422,
599,
30,
646,
273,
365,
18,
588,
67... |
if self.currimg_zoomratio < self.min_zoomratio * self.zoomratio_for_zoom_to_fit: self.set_zoom_out_sensitivities(False) else: self.set_zoom_out_sensitivities(True) if self.currimg_zoomratio > self.max_zoomratio * self.zoomratio_for_zoom_to_fit: self.set_zoom_in_sensitivities(False) else: self.set_zoom_in_sensitivities(True) | self.set_zoom_out_sensitivities(True) self.set_zoom_in_sensitivities(True) | def set_zoom_sensitivities(self): if self.currimg_is_animation == False: if self.currimg_zoomratio < self.min_zoomratio * self.zoomratio_for_zoom_to_fit: self.set_zoom_out_sensitivities(False) else: self.set_zoom_out_sensitivities(True) if self.currimg_zoomratio > self.max_zoomratio * self.zoomratio_for_zoom_to_fit: self.set_zoom_in_sensitivities(False) else: self.set_zoom_in_sensitivities(True) else: self.set_zoom_out_sensitivities(False) self.set_zoom_in_sensitivities(False) | 662bee3d316f5b6b637b01ea71d5f3dfbd7059d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/662bee3d316f5b6b637b01ea71d5f3dfbd7059d1/mirage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
14932,
67,
87,
773,
305,
427,
1961,
12,
2890,
4672,
309,
365,
18,
17016,
6081,
67,
291,
67,
30822,
422,
1083,
30,
365,
18,
542,
67,
14932,
67,
659,
67,
87,
773,
305,
427,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14932,
67,
87,
773,
305,
427,
1961,
12,
2890,
4672,
309,
365,
18,
17016,
6081,
67,
291,
67,
30822,
422,
1083,
30,
365,
18,
542,
67,
14932,
67,
659,
67,
87,
773,
305,
427,
... |
@param fullName: explict fullName to use when a new item is created | @param fullName: optional explict fullName when not using the "name <address>" form of the nameOrAddressString parameter | def getEmailAddress (cls, nameOrAddressString, fullName=''): """ Lookup or create an EmailAddress based on the supplied string. @param nameOrAddressString: emailAddress string, or fullName for lookup @type nameOrAddressString: C{String} @param fullName: explict fullName to use when a new item is created @type fullName: C{String} @return: C{EmailAddress} or None if not found, and nameOrAddressString is\ not a valid email address. """ import osaf.mail.message as message # avoid circularity | b49ad043cedb1bb6d12fe3f876acb791dd27643e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b49ad043cedb1bb6d12fe3f876acb791dd27643e/Mail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17297,
1887,
261,
6429,
16,
26840,
1887,
780,
16,
12424,
2218,
11,
4672,
3536,
8834,
578,
752,
392,
8166,
1887,
2511,
603,
326,
4580,
533,
18,
632,
891,
26840,
1887,
780,
30,
28748,
533,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17297,
1887,
261,
6429,
16,
26840,
1887,
780,
16,
12424,
2218,
11,
4672,
3536,
8834,
578,
752,
392,
8166,
1887,
2511,
603,
326,
4580,
533,
18,
632,
891,
26840,
1887,
780,
30,
28748,
533,... |
class Artist(BaseObject, Cacheable, Taggable): | class Artist(_BaseObject, _Cacheable, _Taggable): | def toStr(self): """Returns a string representation of the object.""" return self.getArtist().getName().encode('utf-8') + ' - ' + self.getTitle().encode('utf-8') | 903c9b1622fe56617e5099f20abdc69f2090f8e0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9926/903c9b1622fe56617e5099f20abdc69f2090f8e0/pylast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
1585,
12,
2890,
4672,
3536,
1356,
279,
533,
4335,
434,
326,
733,
12123,
225,
327,
365,
18,
588,
4411,
376,
7675,
17994,
7675,
3015,
2668,
3158,
17,
28,
6134,
397,
296,
300,
296,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
1585,
12,
2890,
4672,
3536,
1356,
279,
533,
4335,
434,
326,
733,
12123,
225,
327,
365,
18,
588,
4411,
376,
7675,
17994,
7675,
3015,
2668,
3158,
17,
28,
6134,
397,
296,
300,
296,
3... |
stderr = "(scons: \*\*\* \[failed\d+] Error 2\n)+", | stderr = re_errors, | def fail_action(target = None, source = None, env = None): return 2 | 4feb688e4af7e13dfc04f99db3e0b0d2e205270c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12817/4feb688e4af7e13dfc04f99db3e0b0d2e205270c/multiple-parents.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2321,
67,
1128,
12,
3299,
273,
599,
16,
1084,
273,
599,
16,
1550,
273,
599,
4672,
327,
576,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2321,
67,
1128,
12,
3299,
273,
599,
16,
1084,
273,
599,
16,
1550,
273,
599,
4672,
327,
576,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
g=graph.Graph(vertices=intervals) | g = graph.Graph(vertices=intervals) | def RandomInterval(self,n): """ Returns a random interval graph. | cb6598dd732697748819fef1dd6a788e90366e44 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/cb6598dd732697748819fef1dd6a788e90366e44/graph_generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8072,
4006,
12,
2890,
16,
82,
4672,
3536,
2860,
279,
2744,
3673,
2667,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
8072,
4006,
12,
2890,
16,
82,
4672,
3536,
2860,
279,
2744,
3673,
2667,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
result[rec_id] += 1 citation_list[rec_id].append(recid) | result[rec_id] += 1 citation_list[rec_id].append(recid) | def ref_analyzer(citation_informations, initialresult, initial_citationlist, initial_referencelist): """Analyze the citation informations and calculate the citation weight and cited by list dictionary """ citation_list = initial_citationlist reference_list = initial_referencelist result = initialresult d_reports_numbers = citation_informations[0] d_references_report_numbers = citation_informations[1] d_references_s = citation_informations[2] d_records_s = citation_informations[3] t1 = os.times()[4] for recid, refnumbers in d_references_report_numbers.iteritems(): for refnumber in refnumbers: p = refnumber f = 'reportnumber' rec_id = get_recids_matching_query(p, f) if rec_id: result[rec_id[0]] += 1 citation_list[rec_id[0]].append(recid) reference_list[recid].append(rec_id[0]) t2 = os.times()[4] for recid, refss in d_references_s.iteritems(): for refs in refss: p = refs f = 'publref' rec_id = get_recids_matching_query(p, f) if rec_id and not recid in citation_list[rec_id[0]]: result[rec_id[0]] += 1 citation_list[rec_id[0]].append(recid) if rec_id and not rec_id[0] in reference_list[recid]: reference_list[recid].append(rec_id[0]) t3 = os.times()[4] for rec_id, recnumbers in d_reports_numbers.iteritems(): for recnumber in recnumbers: p = recnumber f = '999C5r' recid_list = get_recids_matching_query(p, f) if recid_list: for recid in recid_list: if not recid in citation_list[rec_id]: result[rec_id] += 1 citation_list[rec_id].append(recid) if not rec_id in reference_list[recid]: reference_list[recid].append(rec_id) t4 = os.times()[4] for recid, recs in d_records_s.iteritems(): tmp = recs.find("-") if tmp < 0: recs_modified = recs else: recs_modified = recs[:tmp] p = recs_modified f = '999C5s' rec_ids = get_recids_matching_query(p, f) if rec_ids: for rec_id in rec_ids: if not rec_id in citation_list[recid]: result[recid] += 1 citation_list[recid].append(rec_id) if not recid in reference_list[rec_id]: reference_list[rec_id].append(recid) t5 = os.times()[4] insert_cit_ref_list_intodb(citation_list, reference_list) print "\nExecution time for analizing the citation information generating the dictionary: " print "checking ref number: ", (t2-t1) print "checking ref ypvt: ", (t3-t2) print "checking rec number: ", (t4-t3) print "checking rec ypvt: ", (t5-t4) print "total time of refAnalize: ", (t5-t1) return result | 385083617dff6625d438f022975529212d88558e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/385083617dff6625d438f022975529212d88558e/bibrank_citation_indexer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1278,
67,
13647,
12,
71,
8773,
67,
267,
687,
1012,
16,
2172,
2088,
16,
2172,
67,
71,
8773,
1098,
16,
2172,
67,
266,
586,
1331,
5449,
4672,
3536,
31984,
326,
21145,
26978,
471,
4604,
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,
1278,
67,
13647,
12,
71,
8773,
67,
267,
687,
1012,
16,
2172,
2088,
16,
2172,
67,
71,
8773,
1098,
16,
2172,
67,
266,
586,
1331,
5449,
4672,
3536,
31984,
326,
21145,
26978,
471,
4604,
32... |
job = int(job) except Exception,x: errorList.append( ('Expected integer for JobID', job ) ) | job = int( job ) except Exception, x: errorList.append( ( 'Expected integer for JobID', job ) ) | def usage(): print 'Usage: %s <JobID> [<JobID>]' %(Script.scriptName) DIRAC.exit(2) | b88356c8571ab409f104405a01e9407cfe8f8ed6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/b88356c8571ab409f104405a01e9407cfe8f8ed6/dirac-admin-get-job-pilot-output.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
296,
5357,
30,
738,
87,
411,
2278,
734,
34,
306,
32,
2278,
734,
34,
3864,
8975,
3651,
18,
4263,
461,
13,
18544,
2226,
18,
8593,
12,
22,
13,
225,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
296,
5357,
30,
738,
87,
411,
2278,
734,
34,
306,
32,
2278,
734,
34,
3864,
8975,
3651,
18,
4263,
461,
13,
18544,
2226,
18,
8593,
12,
22,
13,
225,
2,
-100,
-100,
-10... |
elif not getConfig()['global']['urllib'] and not isinstance(cj, (mechanize.MozillaCookieJar, mechanize.LWPCookieJar, mechanize.MSIECookieJar) ): logStatusMsg(u"""attempting to load cookie type: %s """ % getConfig()['global']['cookieType'], 5) | elif (not getConfig()['global']['urllib'] and not isinstance(cj, (mechanize.MozillaCookieJar, mechanize.LWPCookieJar, mechanize.MSIECookieJar) )): logStatusMsg(u"""attempting to load cookie type: %s\ """ % getConfig()['global']['cookieType'], 5) | def cookieHandler(): u"""returns 0 if no cookie configured, 1 if cookie configured, 2 if cookie already configured (even if it is for a null value)""" global cj returnValue = 2 logStatusMsg(u"""testing cookieFile settings""", 5) if cj == 1: pass elif cj == None and not getConfig()['global']['cookieFile']: logStatusMsg(u"""no cookies set""", 5) returnValue = 0 elif getConfig()['global']['urllib'] and not isinstance(cj, (cookielib.MozillaCookieJar, cookielib.LWPCookieJar) ): logStatusMsg(u"""attempting to load cookie type: %s """ % getConfig()['global']['cookieType'], 5) cj = cookielib.__getattribute__( getConfig()['global']['cookieType'] )() try: cj.load(getConfig()['global']['cookieFile']) returnValue = 1 logStatusMsg(u"""cookies loaded""", 5) except (cookielib.LoadError, IOError), m: logStatusMsg( unicodeC(m) + u' disabling cookies. To re-enable cookies, stop RSSDler, correct the problem, and restart.', 1) returnValue = 0 elif not getConfig()['global']['urllib'] and not isinstance(cj, (mechanize.MozillaCookieJar, mechanize.LWPCookieJar, mechanize.MSIECookieJar) ): logStatusMsg(u"""attempting to load cookie type: %s """ % getConfig()['global']['cookieType'], 5) cj = mechanize.__getattribute__( getConfig()['global']['cookieType'] )() try: cj.load(getConfig()['global']['cookieFile']) returnValue = 1 logStatusMsg(u"""cookies loaded""", 5) except (mechanize._clientcookie.LoadError, IOError), m: logStatusMsg( unicodeC(m) + u' disabling cookies. To re-enable cookies, stop RSSDler, correct the problem, and restart.', 1) returnValue = 0 return returnValue | 633e00b171a777d923e4aead2f2717108d53a3b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/633e00b171a777d923e4aead2f2717108d53a3b9/rssdler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3878,
1503,
13332,
582,
8395,
6154,
374,
309,
1158,
3878,
4351,
16,
404,
309,
3878,
4351,
16,
576,
309,
3878,
1818,
4351,
261,
16728,
309,
518,
353,
364,
279,
446,
460,
15574,
2552,
1889... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3878,
1503,
13332,
582,
8395,
6154,
374,
309,
1158,
3878,
4351,
16,
404,
309,
3878,
4351,
16,
576,
309,
3878,
1818,
4351,
261,
16728,
309,
518,
353,
364,
279,
446,
460,
15574,
2552,
1889... |
a = a.replace("\\", "/") | a = a.replace("/", "\\") | def _ConvertFromCygwinPath(a): if env_OS != "Windows_NT": return a #a = a.replace("/", "\\") a = a.replace("\\", "/") if (a.find("\\cygdrive\\") == 0): a = a[10] + ":" + a[11:] return a | 199b8be483b465c727429d8811ffe6fa53bbbeb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9328/199b8be483b465c727429d8811ffe6fa53bbbeb9/pylib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2723,
1265,
39,
4338,
8082,
743,
12,
69,
4672,
309,
1550,
67,
4618,
480,
315,
10399,
67,
1784,
6877,
327,
279,
468,
69,
273,
279,
18,
2079,
2932,
19,
3113,
14520,
13,
69,
273,
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,
389,
2723,
1265,
39,
4338,
8082,
743,
12,
69,
4672,
309,
1550,
67,
4618,
480,
315,
10399,
67,
1784,
6877,
327,
279,
468,
69,
273,
279,
18,
2079,
2932,
19,
3113,
14520,
13,
69,
273,
2... |
head, tail = os.path.split(nanohive_exe) head, tail = os.path.split(head) nh_home, tail = os.path.split(head) | if os.platform == 'win32': head, tail = os.path.split(nanohive_exe) head, tail = os.path.split(head) nh_home, tail = os.path.split(head) | def get_nh_home(): '''Return the Nano-Hive home directory''' # Retreive the Nano-Hive home directory by stripping off the last two directories # from the Nano-Hive executable path. nanohive_exe = env.prefs[nanohive_path_prefs_key] head, tail = os.path.split(nanohive_exe) head, tail = os.path.split(head) nh_home, tail = os.path.split(head) return nh_home | 30ca77d00cd528310e8ce1ccb53d86f60a896d8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/30ca77d00cd528310e8ce1ccb53d86f60a896d8e/NanoHiveUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
82,
76,
67,
8712,
13332,
9163,
990,
326,
23294,
83,
17,
44,
688,
6382,
1867,
26418,
225,
468,
17100,
266,
688,
326,
23294,
83,
17,
44,
688,
6382,
1867,
635,
2569,
1382,
3397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
82,
76,
67,
8712,
13332,
9163,
990,
326,
23294,
83,
17,
44,
688,
6382,
1867,
26418,
225,
468,
17100,
266,
688,
326,
23294,
83,
17,
44,
688,
6382,
1867,
635,
2569,
1382,
3397,
... |
if doc[0]==child: | if build.MakePublicAttributeName(doc[0]) == child: | def generate_child(self, child, dir): "Generate a single child. May force a few children to be built as we generate deps" self.generate_type = GEN_DEMAND_CHILD oldOut = sys.stdout | 7041ce878de7b5958b55585712a4a9be3423b8c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/7041ce878de7b5958b55585712a4a9be3423b8c4/genpy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
3624,
12,
2890,
16,
1151,
16,
1577,
4672,
315,
4625,
279,
2202,
1151,
18,
225,
16734,
2944,
279,
11315,
2325,
358,
506,
6650,
487,
732,
2103,
8740,
6,
365,
18,
7163,
67,
723,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
3624,
12,
2890,
16,
1151,
16,
1577,
4672,
315,
4625,
279,
2202,
1151,
18,
225,
16734,
2944,
279,
11315,
2325,
358,
506,
6650,
487,
732,
2103,
8740,
6,
365,
18,
7163,
67,
723,... |
day = '%s'""" % (ts.year, rs[0]['high'], rs[0]['low'], | day = '%s'""" % (ts.year, rs[0]['max_tmpf'], rs[0]['min_tmpf'], | def compare_with_summary(ts, row): station = row['station'] date = row['d'] rainfall= row['rainfall'] high = row['high'] low = row['low'] rs = iem.query("""SELECT * from summary_%s WHERE station = '%s' and day = '%s'""" % (ts.year, station, date)).dictresult() # Check to see if we should add an entry into the database! if len(rs) == 0: iem.query("""INSERT into summary_%s(station, geom, network, day) VALUES ('%s', (select geom from current WHERE station = '%s'), '%s', '%s') """ % ( ts.year, station, station,'AWOS', date ) ) rs = [{'pday': None, 'max_tmpf': None, 'min_tmpf': None}] if (rs[0]['pday'] != rainfall or rs[0]['high'] != high or rs[0]['low'] != low): sql = """UPDATE summary_%s SET max_tmpf = %s, min_tmpf = %s, pday = %s WHERE network = 'AWOS' and station = '%s' and day = '%s'""" % (ts.year, rs[0]['high'], rs[0]['low'], rs[0]['pday'], station, date) iem.query(sql) | e1abe03e0985f4bfc64e99f6ce0ccf3fcf7a550b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11189/e1abe03e0985f4bfc64e99f6ce0ccf3fcf7a550b/update_summary.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
67,
1918,
67,
7687,
12,
3428,
16,
1027,
4672,
13282,
273,
1027,
3292,
17894,
3546,
1509,
565,
273,
1027,
3292,
72,
3546,
767,
10625,
454,
33,
1027,
3292,
7596,
25602,
3546,
3551,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
67,
1918,
67,
7687,
12,
3428,
16,
1027,
4672,
13282,
273,
1027,
3292,
17894,
3546,
1509,
565,
273,
1027,
3292,
72,
3546,
767,
10625,
454,
33,
1027,
3292,
7596,
25602,
3546,
3551,
5... |
def doClobber(self, dummy, dirname, chmodDone=False): | def doClobber(self, dummy, dirname, **kwargs): | def doClobber(self, dummy, dirname, chmodDone=False): # Bzr class wouldn't check that, because it assumes dirname == workdir, # so already created. d = os.path.join(self.builder.basedir, dirname) if not os.path.exists(d): return defer.succeed(0) return Bzr.doClobber(self, dummy, dirname, chmodDone=chmodDone) | bd85377a3a2e98f1de8f3746832e9c0e8fb4f828 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12355/bd85377a3a2e98f1de8f3746832e9c0e8fb4f828/command.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
39,
1295,
744,
12,
2890,
16,
9609,
16,
4283,
16,
2826,
4333,
4672,
468,
605,
94,
86,
667,
4102,
82,
1404,
866,
716,
16,
2724,
518,
13041,
4283,
422,
22231,
16,
468,
1427,
1818,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
39,
1295,
744,
12,
2890,
16,
9609,
16,
4283,
16,
2826,
4333,
4672,
468,
605,
94,
86,
667,
4102,
82,
1404,
866,
716,
16,
2724,
518,
13041,
4283,
422,
22231,
16,
468,
1427,
1818,
... |
print "Cannot read in phi0 variable" | print >> sys.stderr, "Cannot read in phi0 variable" | def main(): # Import the Configuration File into config # Import the Configuration File into config if(len(sys.argv) < 2): print "Insufficient command line arguments " print " Usage is ",sys.argv[0]," <ConfigFile> {Job Number} " print " Exiting ........." sys.exit(1) try: config = __import__(sys.argv[1]); except: print "Cannot import Config file '",sys.argv[1],"' exiting ...." sys.exit(1) UniqueID = '' # Compute Unique ID Number if(len(sys.argv) >= 3): UniqueID += '_' + sys.argv[2] # Variables Structure/Dictionary Vars = {} # SFT time baseline try: Vars['TSFT'] = config.TSFT except: print "TSFT cannot be read" sys.exit(1) # Strength of signal try: Vars['h0'] = config.h0 except: print "h0 cannot be read" sys.exit(1) # Cosine of iota try: Vars['cosi'] = config.cosi except: try: Vars['cosi'] = random.uniform(config.cosi_min,config.cosi_max) except: print "Cannot read in cosi variable" sys.exit(1) if(math.fabs(Vars['cosi']) > 1): print "abs(cosi) > 1 !!!" sys.exit(1) # Initial Phase try: Vars['phi0'] = config.phi0 except: try: Vars['phi0'] = random.uniform(config.phi0_min,config.phi0_max) except: print "Cannot read in phi0 variable" sys.exit(1) # Polarization Angle try: Vars['psi'] = config.psi except: try: Vars['psi'] = random.uniform(config.psi_min,config.psi_max) except: print "Cannot read in psi variable" sys.exit(1) # Number of Dirichlet terms used. try: Vars['Dterms'] = float(config.Dterms) except: print "Dterms cannot be read" sys.exit(1) # Interferometer try: IFOs = config.IFOs IFOs = IFOs.split(' ') NumofIFOs = len(IFOs) Vars['NumofIFOs'] = NumofIFOs Vars['IFO'] = [] for i in range(NumofIFOs): Vars['IFO'].append(IFOs[i]) except: print "IFO cannot be read" sys.exit(1) # Start Time try: t0 = config.t0 t0 = t0.split(' ') if(len(t0) != NumofIFOs): print "Number of starttimes != Number of IFOs" sys.exit(1) Vars['t0'] = [] for i in range(NumofIFOs): Vars['t0'].append(float(t0[i])) except: print "t0 cannot be read" sys.exit(1) # Reference Time in SSB try: Vars['refTime'] = float(config.refTime) refString = ' --refTime ' + str(Vars['refTime']) except: refString = ' ' # Output Directory try: Vars['Out'] = config.Out + UniqueID except: print "Out cannot be read" sys.exit(1) # Ephemeris Directory try: Vars['Ephem'] = config.Ephem except: print "Ephem cannot be read" sys.exit(1) # Ephemeris Year try: Vars['EphemYear'] = config.EphemYear except: print "EphemYear cannot be read" sys.exit(1) # Noise Sh try: Vars['Sh'] = float(config.Sh) except: print "Sh cannot be read" sys.exit(1) # Duration of Analysis try: TSpan = config.TSpan TSpan = TSpan.split(' ') if(len(TSpan) != NumofIFOs): print "Number of TSpans != Number of IFOs" sys.exit(1) Vars['TSpan'] = [] for i in range(NumofIFOs): Vars['TSpan'].append(float(TSpan[i])) except: print "TSpan cannot be read" sys.exit(1) # Number of SFTs to add try: NumSFTs = config.NumSFTs NumSFTs = NumSFTs.split(' ') if(len(NumSFTs) != NumofIFOs): print "Number of starttimes != Number of IFOs" sys.exit(1) Vars['NumSFTs'] = [] for i in range(NumofIFOs): Vars['NumSFTs'].append(int(NumSFTs[i])) except: print "NumSFTs cannot be read" sys.exit(1) # Number of Gaps to add try: NumGaps = config.NumGaps NumGaps = NumGaps.split(' ') if(len(NumGaps) != NumofIFOs): print "Number of starttimes != Number of IFOs" sys.exit(1) Vars['NumGaps'] = [] for i in range(NumofIFOs): Vars['NumGaps'].append(int(NumGaps[i])) except: print "NumGaps cannot be read" sys.exit(1) # Alpha (Right Ascension) try: Vars['Alpha'] = config.Alpha except: try: Vars['Alpha'] = random.uniform(config.Alpha_min,config.Alpha_max) except: print "Cannot read in Alpha variable" sys.exit(1) if(Vars['Alpha'] < 0 or Vars['Alpha'] > 2.0*math.pi): print "Alpha out of bounds !!!" sys.exit(1) # Delta (Declination) try: Vars['Delta'] = config.Delta except: try: Vars['Delta'] = random.uniform(config.Delta_min,config.Delta_max) except: print "Cannot read in Delta variable" sys.exit(1) if(math.fabs(Vars['Delta']) > math.pi/2.0): print "abs(Delta) > pi/2 !!!" sys.exit(1) # Minimum Frequency try: Vars['Fmin'] = config.Fmin except: print "Fmin cannot be read" sys.exit(1) # Band of Analysis try: Vars['Band'] = config.Band except: print "Band cannot be read" sys.exit(1) # Injection Frequency try: Vars['Finj'] = config.Finj except: try: Vars['Finj'] = random.uniform(config.Finj_min,config.Finj_max) except: print "Cannot read in Finj variable" sys.exit(1) if(Vars['Finj'] < 0): print "Finj < 0 !!!" sys.exit(1) # Spindown/ FDOT try: Vars['FDot'] = config.FDot except: try: Vars['FDot'] = random.uniform(config.FDot_min,config.FDot_max) except: print "Cannot read in FDot variable" sys.exit(1) # FDOTBand try: Vars['FDotBand'] = config.FDotBand except: Vars['FDotBand'] = 0 #print "Cannot read in FDot variable" #sys.exit(1) # dFDot try: Vars['dFDot'] = config.dFDot except: Vars['dFDot'] = 10 # Resolution try: Vars['Res'] = config.Res if(Vars['Res'] > 1.0/Vars['TSpan'][0]): print "Resolution too low, set to 1/T" Vars['Res'] = 1.0/Vars['TSpan'][0] if(Vars['Res'] < 0): print "Resolution < 0" sys.exit(1) except: Vars['Res'] = 1.0/Vars['TSpan'][0] current = 0 for i in range(NumofIFOs): if(Vars['TSpan'][i] > Vars['TSpan'][current]): current = i Vars['Res'] = 1.0/Vars['TSpan'][i] # Debug Check try: Vars['debug'] = config.debug except: Vars['debug'] = 1.0 # F Threshold try: Vars['FThres'] = config.FThres except: Vars['FThres'] = 0 # Optional Output Variable from Resamp try: Vars['ResampOutput'] = config.ResampOutput except: Vars['ResampOutput'] = "MyTS" # Optional Use Your Own TimeStampsFile try: Vars['TimeStampsFile'] = config.TimeStampsFile TimeStampsFile_Is_Set = True except: Vars['TimeStampsFile'] = 'TimeStampsFile' + UniqueID TimeStampsFile_Is_Set = False # Print out all the variables (if Debug is on) if(Vars['debug']): print "---------- Configuration Variables --------- " PrintValues(Vars) print "-------------------------------------------- \n \n" # Create the Time Stamp File if(not(TimeStampsFile_Is_Set)): CreateTimeStampFile(Vars,UniqueID) # If running multiple time, delete all the old SFTs if(os.path.exists("./"+Vars['Out'])): try: shutil.rmtree(Vars['Out']) except: print "Could not delete old directory\n" sys.exit(1) try: os.mkdir(Vars['Out']) except: print "Something went wrong creating new directory\n" print "Permission trouble maybe\n" sys.exit(1) # Generate Fake data string for ifo in range(NumofIFOs): FakeDataString = GenFakeDataString(1,Vars,ifo,UniqueID,refString) if(Vars['debug']): print "----------- Makefakedata String ------------" print FakeDataString print "--------------------------------------------\n\n" # Generate the data try: G = commands.getoutput(FakeDataString) os.remove("timestampsFile"+Vars['IFO'][ifo]+UniqueID) except: print "Tried to generate SFTs, failed" sys.exit(1) # Run v2() OutputFileVLoudest = "OutputVLoudest" + UniqueID OutputFileVFstat = "OutputVFstat" + UniqueID startstring = "lalapps_ComputeFStatistic_v2 --outputFstat " + OutputFileVFstat + " --outputLoudest " + OutputFileVLoudest + " -F " + str(Vars['FThres']) + " " endstring = " " + refString V2DataString = GenDataString(startstring,endstring,Vars) if(Vars['debug']): print "----------- V2 String ------------" print V2DataString print "----------------------------------\n\n" print "----------- Running V2 -----------" (status,Voutput) = commands.getstatusoutput(V2DataString) if(status): print "V2 failed, Output was \n\n" print Voutput sys.exit(1) if(Vars['debug']): print "---------- V2 Done ---------------\n\n" # Run Resamp ResampLocation = "/home/ppatel/lalsuite/lalapps/src/pulsar/FDS_isolated/ResamplingFstat/" OutputFileRLoudest = "OutputRLoudest" + UniqueID OutputFileRFstat = "OutputRFstat" + UniqueID startstring = ResampLocation + "lalapps_ComputeFStatistic_resamp --outputFstat " + OutputFileRFstat + " --outputLoudest " + OutputFileRLoudest+ " -F " + str(Vars['FThres']) + " " endstring = " " + refString RDataString = GenDataString(startstring,endstring,Vars) if(Vars['debug']): print "-------- Resamp String -----------" print RDataString print "----------------------------------\n\n" print "--------- Running Resamp ---------" (status,Routput) = commands.getstatusoutput(RDataString) if(status): print "Resamp failed, Output was\n\n" print Routput sys.exit(0) if(Vars['debug']): print "---------- Resamp Done -----------\n\n" if(Vars['debug']): print "---------- Deleting SFT Folder ---------\n\n" try: shutil.rmtree(Vars['Out']) except: print " Could not delete SFT folder \n\n" sys.exit(1) FreqOutput = AnalyzeFreq(OutputFileRFstat,OutputFileVFstat,Vars['Finj'],Vars['Res']) LoudestOutput = AnalyzeLoudest(OutputFileRLoudest,OutputFileVLoudest) os.remove(OutputFileRLoudest) os.remove(OutputFileVLoudest) #os.remove(OutputFileRFstat) #os.remove(OutputFileVFstat) print FreqOutput,LoudestOutput return(0) | 9f242671e9d0d7238a0ede41c485e14209156b6b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/9f242671e9d0d7238a0ede41c485e14209156b6b/multiresamp_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
225,
468,
6164,
326,
4659,
1387,
1368,
642,
468,
6164,
326,
4659,
1387,
1368,
642,
309,
12,
1897,
12,
9499,
18,
19485,
13,
411,
576,
4672,
1172,
315,
5048,
11339,
1296,
980,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
225,
468,
6164,
326,
4659,
1387,
1368,
642,
468,
6164,
326,
4659,
1387,
1368,
642,
309,
12,
1897,
12,
9499,
18,
19485,
13,
411,
576,
4672,
1172,
315,
5048,
11339,
1296,
980,... |
for func in list: | for func in stat_list: | def get_print_list(self, sel_list): width = self.max_name_len if self.fcn_list: list = self.fcn_list[:] msg = " Ordered by: " + self.sort_type + '\n' else: list = self.stats.keys() msg = " Random listing order was used\n" | 1076eed9bee3b873e1cb1bcca42f40854ecd9db4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/1076eed9bee3b873e1cb1bcca42f40854ecd9db4/pstats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1188,
67,
1098,
12,
2890,
16,
357,
67,
1098,
4672,
1835,
273,
365,
18,
1896,
67,
529,
67,
1897,
309,
365,
18,
7142,
82,
67,
1098,
30,
666,
273,
365,
18,
7142,
82,
67,
1098... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1188,
67,
1098,
12,
2890,
16,
357,
67,
1098,
4672,
1835,
273,
365,
18,
1896,
67,
529,
67,
1897,
309,
365,
18,
7142,
82,
67,
1098,
30,
666,
273,
365,
18,
7142,
82,
67,
1098... |
<dtml-var "ImageObject.tag(border=5, align=left)"> | <dtml-var "ImageObject.tag(border='5', align='left')"> | def manage_addImage(id, file, title='', precondition='', content_type=''): """ Add a new Image object. Creates a new Image object 'id' with the contents of 'file'. """ | 6f1a8d1e5405b8b97c96fc2c9ee2d2eef03f2cf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6f1a8d1e5405b8b97c96fc2c9ee2d2eef03f2cf0/Image.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
1289,
2040,
12,
350,
16,
585,
16,
2077,
2218,
2187,
24148,
2218,
2187,
913,
67,
723,
2218,
11,
4672,
3536,
225,
1436,
279,
394,
3421,
733,
18,
225,
10210,
279,
394,
3421,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
1289,
2040,
12,
350,
16,
585,
16,
2077,
2218,
2187,
24148,
2218,
2187,
913,
67,
723,
2218,
11,
4672,
3536,
225,
1436,
279,
394,
3421,
733,
18,
225,
10210,
279,
394,
3421,
73... |
self.setModificationDate(DateTime(modification_date)) | self._setModificationDate(DateTime(modification_date)) | def __init__(self, id, container, title='', description='', submitter_id=None, submitter_name=None, submitter_email=None, kibitzers=None, security_related=0, topic=None, classification=None, importance=None, resolution=None, version_info=None, creation_date=None, modification_date=None, effective_date=None, expiration_date=None, assignees=None, file=None, fileid=None, filetype=None, invisible=0): """ """ | 923f9b90b0a3b1980714b8ff37423ce54eb3afcc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/923f9b90b0a3b1980714b8ff37423ce54eb3afcc/CollectorIssue.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
612,
16,
1478,
16,
2077,
2218,
2187,
2477,
2218,
2187,
4879,
387,
67,
350,
33,
7036,
16,
4879,
387,
67,
529,
33,
7036,
16,
4879,
387,
67,
3652,
33,
703... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
612,
16,
1478,
16,
2077,
2218,
2187,
2477,
2218,
2187,
4879,
387,
67,
350,
33,
7036,
16,
4879,
387,
67,
529,
33,
7036,
16,
4879,
387,
67,
3652,
33,
703... |
sys.stderr.write('\b|') | sys.stderr.write('\b'+colorCyan+'|'+colorNormal) | def consoleProgressHook(label, i = 0, n = 0, showWhenChanged = False, scriptName=None ): global spin global currentString if not hasattr(consoleProgressHook, 'endString'): consoleProgressHook.endString = '\n' if not label: sys.stderr.write('\n') return if label != currentString: if currentString: sys.stderr.write('\n') Log_Normal(label+'... ', scriptName=scriptName) currentString = label if i >= n: sys.stderr.write(consoleProgressHook.endString) currentString = '' return if i % 4 == 0: sys.stderr.write('\b|') elif i % 4 == 1: sys.stderr.write('\b/') elif i % 4 == 2: sys.stderr.write('\b-') elif i % 4 == 3: sys.stderr.write('\b\\') | 59a8be0683b32ad8cdd43774807802feb02b14e2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5186/59a8be0683b32ad8cdd43774807802feb02b14e2/PythonUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2983,
5491,
5394,
12,
1925,
16,
277,
273,
374,
16,
290,
273,
374,
16,
2405,
9434,
5033,
273,
1083,
16,
31008,
33,
7036,
262,
30,
2552,
12490,
2552,
783,
780,
309,
486,
3859,
12,
8698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2983,
5491,
5394,
12,
1925,
16,
277,
273,
374,
16,
290,
273,
374,
16,
2405,
9434,
5033,
273,
1083,
16,
31008,
33,
7036,
262,
30,
2552,
12490,
2552,
783,
780,
309,
486,
3859,
12,
8698,
... |
class InvalidLongAsString: def __int__(self): return 'foobar' | def __int__(self): return 99 | 7179220b57faca4606430b97847308b34f45f623 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/7179220b57faca4606430b97847308b34f45f623/test_getargs2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
474,
972,
12,
2890,
4672,
327,
14605,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
474,
972,
12,
2890,
4672,
327,
14605,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
request.prepath = [] | prefixLen = 3+request.isSecure()+4+len(path)+len(request.prepath[-3]) | def getChild(self, path, request): if ':' in path: host, port = path.split(':', 1) port = int(port) else: host, port = path, 80 request.setHost(host, port) request.prepath = [] request.path = '/'+'/'.join(request.postpath) return request.site.getResourceFor(request) | 1d8ae9dee952b83cd70d29313702a10900bb0869 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1d8ae9dee952b83cd70d29313702a10900bb0869/vhost.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8154,
12,
2890,
16,
589,
16,
590,
4672,
309,
3921,
316,
589,
30,
1479,
16,
1756,
273,
589,
18,
4939,
2668,
30,
2187,
404,
13,
1756,
273,
509,
12,
655,
13,
469,
30,
1479,
16,
1756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8154,
12,
2890,
16,
589,
16,
590,
4672,
309,
3921,
316,
589,
30,
1479,
16,
1756,
273,
589,
18,
4939,
2668,
30,
2187,
404,
13,
1756,
273,
509,
12,
655,
13,
469,
30,
1479,
16,
1756,
... |
if userExercise.streak == 0: | if userExercise.streak == 0 and userExercise.longest_streak >= 10: | def get(self): user = users.get_current_user() if user: exid = self.request.get('exid') key = self.request.get('key') problem_number = self.request.get('problem_number') time_warp = self.request.get('time_warp') | 956ba0a974942a3e57c0db01e642b5fb4fc0f42f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/956ba0a974942a3e57c0db01e642b5fb4fc0f42f/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
4672,
729,
273,
3677,
18,
588,
67,
2972,
67,
1355,
1435,
309,
729,
30,
431,
350,
273,
365,
18,
2293,
18,
588,
2668,
338,
350,
6134,
498,
273,
365,
18,
2293,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
4672,
729,
273,
3677,
18,
588,
67,
2972,
67,
1355,
1435,
309,
729,
30,
431,
350,
273,
365,
18,
2293,
18,
588,
2668,
338,
350,
6134,
498,
273,
365,
18,
2293,
18,
588,
... |
self.visible = False self.canvas = None self.width = 0 self.height = 0 | def hide(self): """ hide all layers """ for l in self.layer: l.unparent() self.visible = False self.canvas = None self.width = 0 self.height = 0 | e5003564ebb5e7136c0a28201f71609ff1130898 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/e5003564ebb5e7136c0a28201f71609ff1130898/handler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6853,
12,
2890,
4672,
3536,
6853,
777,
6623,
3536,
364,
328,
316,
365,
18,
6363,
30,
328,
18,
318,
2938,
1435,
365,
18,
8613,
273,
1083,
365,
18,
15424,
225,
273,
599,
365,
18,
2819,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6853,
12,
2890,
4672,
3536,
6853,
777,
6623,
3536,
364,
328,
316,
365,
18,
6363,
30,
328,
18,
318,
2938,
1435,
365,
18,
8613,
273,
1083,
365,
18,
15424,
225,
273,
599,
365,
18,
2819,
... | |
if (sys.platform == "darwin" and not RTDIST): | if (sys.platform == "darwin"): | def CompileLink(dll, obj, opts): if (COMPILER=="MSVC"): cmd = "link /nologo" if (platform.architecture()[0] == "64bit"): cmd += " /MACHINE:X64" if ("MFC" not in opts): cmd += " /NOD:MFC90.LIB" cmd += " /NOD:MFC80.LIB /NOD:LIBCI.LIB /DEBUG" cmd += " /nod:libc /nod:libcmtd /nod:atlthunk /nod:atls" if (GetOrigExt(dll) != ".exe"): cmd += " /DLL" optlevel = GetOptimizeOption(opts) if (optlevel==1): cmd += " /MAP /MAPINFO:EXPORTS /NOD:MSVCRT.LIB /NOD:MSVCPRT.LIB /NOD:MSVCIRT.LIB" if (optlevel==2): cmd += " /MAP:NUL /NOD:MSVCRT.LIB /NOD:MSVCPRT.LIB /NOD:MSVCIRT.LIB" if (optlevel==3): cmd += " /MAP:NUL /NOD:MSVCRTD.LIB /NOD:MSVCPRTD.LIB /NOD:MSVCIRTD.LIB" if (optlevel==4): cmd += " /MAP:NUL /LTCG /NOD:MSVCRTD.LIB /NOD:MSVCPRTD.LIB /NOD:MSVCIRTD.LIB" if ("MFC" in opts): if (optlevel<=2): cmd += " /NOD:MSVCRTD.LIB /NOD:mfcs90d.lib mfcs90d.lib MSVCRTD.lib" else: cmd += " /NOD:MSVCRT.LIB /NOD:mfcs90.lib mfcs90.lib MSVCRT.lib" cmd += " /FIXED:NO /OPT:REF /STACK:4194304 /INCREMENTAL:NO " cmd += ' /OUT:' + BracketNameWithQuotes(dll) if (dll.endswith(".dll")): cmd += ' /IMPLIB:' + GetOutputDir() + '/lib/'+os.path.splitext(os.path.basename(dll))[0]+".lib" for (opt, dir) in LIBDIRECTORIES: if (opt=="ALWAYS") or (opts.count(opt)): cmd += ' /LIBPATH:' + BracketNameWithQuotes(dir) for x in obj: if (x.endswith(".dll")): cmd += ' ' + GetOutputDir() + '/lib/' + os.path.splitext(os.path.basename(x))[0] + ".lib" elif (x.endswith(".lib")): dname = os.path.splitext(dll)[0]+".dll" if (GetOrigExt(x) != ".ilb" and os.path.exists(GetOutputDir()+"/bin/" + os.path.splitext(os.path.basename(x))[0] + ".dll")): exit("Error: in makepanda, specify "+dname+", not "+x) cmd += ' ' + BracketNameWithQuotes(x) elif (x.endswith(".def")): cmd += ' /DEF:' + BracketNameWithQuotes(x) elif (x.endswith(".dat")): pass else: cmd += ' ' + BracketNameWithQuotes(x) if (GetOrigExt(dll)==".exe"): cmd += " " + GetOutputDir() + "/tmp/pandaIcon.res" for (opt, name) in LIBNAMES: if (opt=="ALWAYS") or (opts.count(opt)): cmd += " " + BracketNameWithQuotes(name) oscmd(cmd) SetVC90CRTVersion(dll+".manifest") mtcmd = "mt -manifest " + dll + ".manifest -outputresource:" + dll if (dll.endswith(".exe")==0): mtcmd = mtcmd + ";2" else: mtcmd = mtcmd + ";1" oscmd(mtcmd) if (COMPILER=="LINUX"): if (GetOrigExt(dll)==".exe"): cmd = 'g++ -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib' else: if (sys.platform == "darwin"): cmd = 'g++ -undefined dynamic_lookup' if ("BUNDLE" in opts): cmd += ' -bundle ' else: cmd += ' -dynamiclib -install_name ' + os.path.basename(dll) cmd += ' -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib' else: cmd = 'g++ -shared -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib' for x in obj: if (GetOrigExt(x) != ".dat"): base = os.path.basename(x) if (base[-3:]==".so") and (base[:3]=="lib"): cmd += ' -l' + base[3:-3] elif (base[-2:]==".a") and (base[:3]=="lib"): cmd += ' -l' + base[3:-2] else: cmd += ' ' + x for (opt, dir) in LIBDIRECTORIES: if (opt=="ALWAYS") or (opt in opts): cmd += ' -L' + BracketNameWithQuotes(dir) for (opt, name) in LIBNAMES: if (opt=="ALWAYS") or (opt in opts): cmd += ' ' + BracketNameWithQuotes(name) cmd += " -lpthread" if (not sys.platform.startswith("freebsd")): cmd += " -ldl" if (sys.platform == "darwin" and not RTDIST): cmd += " -isysroot " + SDK["MACOSX"] + " -Wl,-syslibroot," + SDK["MACOSX"] if (int(platform.mac_ver()[0][3]) >= 6): cmd += " -arch x86_64 -arch i386" else: cmd += " -arch i386" if ("NOPPC" not in opts): cmd += " -arch ppc" oscmd(cmd) if (GetOrigExt(dll)==".exe" and GetOptimizeOption(opts)==4 and "NOSTRIP" not in opts): oscmd("strip " + BracketNameWithQuotes(dll)) os.system("chmod +x " + BracketNameWithQuotes(dll)) | 7b95264fe8a5bb5589ca054890b63f3ecd172b9c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/7b95264fe8a5bb5589ca054890b63f3ecd172b9c/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16143,
2098,
12,
27670,
16,
1081,
16,
1500,
4672,
309,
261,
31075,
14668,
31713,
3537,
13464,
6,
4672,
1797,
273,
315,
1232,
342,
82,
3966,
83,
6,
309,
261,
9898,
18,
991,
18123,
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,
16143,
2098,
12,
27670,
16,
1081,
16,
1500,
4672,
309,
261,
31075,
14668,
31713,
3537,
13464,
6,
4672,
1797,
273,
315,
1232,
342,
82,
3966,
83,
6,
309,
261,
9898,
18,
991,
18123,
1435,
... |
myCacheMask="*/%s-analyseQscan_%s_%s*_seis_rds*.cache"%(sngl.ifo,sngl.ifo,timeString) | myCacheMask="*%s*/%s-analyseQscan_%s_%s*_seis_rds*.cache"%\ (self.coinc.type,sngl.ifo,sngl.ifo,timeString) | def get_analyzeQscan_SEIS(self): """ This seeks out the html and png files associated with SEIS result of an analyzeQscan job. """ cacheList=list() cacheFiles=list() for sngl in self.coinc.sngls: timeString=str(float(sngl.time)).replace(".","_") myCacheMask="*/%s-analyseQscan_%s_%s*_seis_rds*.cache"%(sngl.ifo,sngl.ifo,timeString) #Read the cache file or files cacheList.extend(fnmatch.filter(self.fsys,myCacheMask)) cacheFiles=self.__readCache__(cacheList) return cacheFiles | 05455322ab6b4df00c83701e9e61844538f87dd5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/05455322ab6b4df00c83701e9e61844538f87dd5/makeCheckListWiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
304,
9508,
53,
9871,
67,
1090,
5127,
12,
2890,
4672,
3536,
1220,
6520,
87,
596,
326,
1729,
471,
14476,
1390,
3627,
598,
3174,
5127,
563,
434,
392,
12375,
53,
9871,
1719,
18,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
304,
9508,
53,
9871,
67,
1090,
5127,
12,
2890,
4672,
3536,
1220,
6520,
87,
596,
326,
1729,
471,
14476,
1390,
3627,
598,
3174,
5127,
563,
434,
392,
12375,
53,
9871,
1719,
18,
3... |
r""" Sequence of Fibonacci numbers, offset 0,4. REFERENCES: S. Plouffe, Project Gutenberg, The First 1001 Fibonacci Numbers, \url{http://ibiblio.org/pub/docs/books/gutenberg/etext01/fbncc10.txt} We have one more. Our first Fibonacci number is 0. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000045; a Fibonacci numbers with index n >= 0 sage: a(0) 0 sage: a(1) 1 sage: a.list(12) [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] sage: a(1/3) Traceback (most recent call last): ... TypeError: input must be an int, long, or Integer AUTHOR: -- Jaap Spies (2007-01-13) """ def __init__(self): | def __init__(self): r""" Sequence of Fibonacci numbers, offset 0,4. REFERENCES: S. Plouffe, Project Gutenberg, The First 1001 Fibonacci Numbers, \url{http://ibiblio.org/pub/docs/books/gutenberg/etext01/fbncc10.txt} We have one more. Our first Fibonacci number is 0. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000045; a Fibonacci numbers with index n >= 0 sage: a(0) 0 sage: a(1) 1 sage: a.list(12) [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] sage: a(1/3) Traceback (most recent call last): ... TypeError: input must be an int, long, or Integer AUTHOR: -- Jaap Spies (2007-01-13) """ | def _eval(self, n): return partition.Partitions(n).count() | 8b300fed02e947af57b58146f62dccfc715cf0b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/8b300fed02e947af57b58146f62dccfc715cf0b9/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
3590,
18,
13738,
12,
82,
2934,
1883,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
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,
389,
8622,
12,
2890,
16,
290,
4672,
327,
3590,
18,
13738,
12,
82,
2934,
1883,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
in_progress.progress = args[0] | in_progress.progress = callback._args[0] | def newfunc(*args, **kwargs): if pool is MAINTHREAD and not async and is_mainthread(): # Fast-path case: mainthread synchronous call from the mainthread return func(*args, **kwargs) | 5bb6b1539843238267b376c002842d1df973a362 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11722/5bb6b1539843238267b376c002842d1df973a362/thread.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
644,
30857,
1968,
16,
2826,
4333,
4672,
309,
2845,
353,
22299,
21730,
471,
486,
4326,
471,
353,
67,
5254,
5930,
13332,
468,
9545,
17,
803,
648,
30,
2774,
5930,
12209,
745,
628,
326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
394,
644,
30857,
1968,
16,
2826,
4333,
4672,
309,
2845,
353,
22299,
21730,
471,
486,
4326,
471,
353,
67,
5254,
5930,
13332,
468,
9545,
17,
803,
648,
30,
2774,
5930,
12209,
745,
628,
326,... |
return eval("self.%s" % attr.lower()) | return getattr(self, attr.lower()) | def __getattr__(self, attr): # Allow UPPERCASE variants of IMAP4 command methods. if Commands.has_key(attr): return eval("self.%s" % attr.lower()) raise AttributeError("Unknown IMAP4 command: '%s'" % attr) | ed860500914c98bc53bdadf292c180ffad9bec09 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ed860500914c98bc53bdadf292c180ffad9bec09/imaplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
1604,
4672,
468,
4202,
7852,
29290,
13415,
12935,
434,
6246,
2203,
24,
1296,
2590,
18,
309,
18034,
18,
5332,
67,
856,
12,
1747,
4672,
327,
3869,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
1604,
4672,
468,
4202,
7852,
29290,
13415,
12935,
434,
6246,
2203,
24,
1296,
2590,
18,
309,
18034,
18,
5332,
67,
856,
12,
1747,
4672,
327,
3869,
12,
... |
module, xml_id = line[i].rsplit('.', 1) | if '.' in line[i]: module, xml_id = line[i].rsplit('.', 1) else: module, xml_id = current_module, line[i] | def process_liness(self, datas, prefix, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = '' data_id= False # # Import normal fields # for i in range(len(fields)): if i>=len(line): raise 'Please check that all your lines have %d cols.' % (len(fields),) field = fields[i] if field == ["id"]: data_id= line[i] continue if (len(field)==len(prefix)+1) and field[len(prefix)].endswith(':id'): res_id = False if line[i]: if fields_def[field[len(prefix)][:-3]]['type']=='many2many': res_id = [] for word in line[i].split(','): module, xml_id = word.rsplit('.', 1) ir_model_data_obj = self.pool.get('ir.model.data') id=ir_model_data_obj._get_id(cr, uid, module, xml_id) res_id2=ir_model_data_obj.read(cr, uid, [id], ['res_id'])[0]['res_id'] if res_id2: res_id.append(res_id2) if len(res_id): res_id=[(6,0,res_id)] else: module, xml_id = line[i].rsplit('.', 1) ir_model_data_obj = self.pool.get('ir.model.data') id=ir_model_data_obj._get_id(cr, uid, module, xml_id) res_id=ir_model_data_obj.read(cr, uid, [id], ['res_id'])[0]['res_id'] row[field[0][:-3]] = res_id or False continue if (len(field)==len(prefix)+1) and len(field[len(prefix)].split(':lang=')) == 2: f, lang = field[len(prefix)].split(':lang=') translate.setdefault(lang, {})[f]=line[i] or False continue if (len(field)==len(prefix)+1) and (prefix==field[0:len(prefix)]): if fields_def[field[len(prefix)]]['type']=='integer': res =line[i] and int(line[i]) elif fields_def[field[len(prefix)]]['type']=='float': res =line[i] and float(line[i]) elif fields_def[field[len(prefix)]]['type']=='selection': res = False for key,val in fields_def[field[len(prefix)]]['selection']: if key==line[i]: #val==line[i] if from the client ! res = key if line[i] and not res: logger.notifyChannel("import", netsvc.LOG_WARNING, "key '%s' not found in selection field '%s'" %(line[i], field[len(prefix)])) elif fields_def[field[len(prefix)]]['type']=='many2one': res = False if line[i]: relation = fields_def[field[len(prefix)]]['relation'] res2 = self.pool.get(relation).name_search(cr, uid, line[i], [],operator='=') res = (res2 and res2[0][0]) or False if not res and line[i]: warning += ('Relation not found: '+line[i]+' on '+relation + ' !\n') if not res: logger.notifyChannel("import",netsvc.LOG_WARNING,'Relation not found: '+line[i]+' on '+relation + ' !\n') elif fields_def[field[len(prefix)]]['type']=='many2many': res = [] if line[i]: relation = fields_def[field[len(prefix)]]['relation'] for word in line[i].split(','): res2 = self.pool.get(relation).name_search(cr, uid, word, [],operator='=') res3 = (res2 and res2[0][0]) or False if res3: res.append(res3) if len(res): res= [(6,0,res)] else: res = line[i] or False row[field[len(prefix)]] = res elif (prefix==field[0:len(prefix)]): if field[0] not in todo: todo.append(field[len(prefix)]) # # Import one2many fields # nbrmax = 1 for field in todo: newfd = self.pool.get(fields_def[field]['relation']).fields_get(cr, uid, context=context) res = process_liness(self, datas, prefix+[field], newfd, position) (newrow,max2,w2, translate2,data_id) = res nbrmax = max(nbrmax, max2) warning = warning+w2 reduce(lambda x,y: x and y, newrow) row[field] = (reduce(lambda x,y: x or y, newrow.values()) and [(0,0,newrow)]) or [] i = max2 while (position+i)<len(datas): ok = True for j in range(len(fields)): field2 = fields[j] if (len(field2)<=(len(prefix)+1)) and datas[position+i][j]: ok = False if not ok: break | eab36ac71fc3f02a1475b4e771b1dc2744f7edd1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/eab36ac71fc3f02a1475b4e771b1dc2744f7edd1/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
80,
6336,
12,
2890,
16,
5386,
16,
1633,
16,
1466,
67,
536,
16,
1754,
33,
20,
4672,
980,
273,
5386,
63,
3276,
65,
1027,
273,
2618,
4204,
273,
2618,
10621,
273,
5378,
3436,
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,
1207,
67,
80,
6336,
12,
2890,
16,
5386,
16,
1633,
16,
1466,
67,
536,
16,
1754,
33,
20,
4672,
980,
273,
5386,
63,
3276,
65,
1027,
273,
2618,
4204,
273,
2618,
10621,
273,
5378,
3436,
2... |
if not self.index_slots is None: raise MonomialException, "Expecting scalar-valued expression." self.index_slots = indices print "Index slots after apply_tensor:", self.index_slots | for m in self.monomials: m.apply_tensor(indices) | def apply_tensor(self, indices): if not self.index_slots is None: raise MonomialException, "Expecting scalar-valued expression." self.index_slots = indices print "Index slots after apply_tensor:", self.index_slots | 77f5b57aca0f4f80bf6d0d5a9436b738045bd57c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/624/77f5b57aca0f4f80bf6d0d5a9436b738045bd57c/monomials.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
13720,
12,
2890,
16,
4295,
4672,
309,
486,
365,
18,
1615,
67,
18875,
353,
599,
30,
1002,
490,
4708,
649,
503,
16,
315,
24439,
4981,
17,
4531,
329,
2652,
1199,
365,
18,
1615,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
13720,
12,
2890,
16,
4295,
4672,
309,
486,
365,
18,
1615,
67,
18875,
353,
599,
30,
1002,
490,
4708,
649,
503,
16,
315,
24439,
4981,
17,
4531,
329,
2652,
1199,
365,
18,
1615,
... |
if type(self.ctx.classObj) != types.ClassType: | if type(self.ctx.classObj) not in [ types.ClassType, types.TypeType]: | def HandleWxpTag(self, tag): # create a new context object self.ctx = _Context() | fb757066dfea26412c518153f7c4af05a8a43dc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/fb757066dfea26412c518153f7c4af05a8a43dc9/wxpTag.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5004,
59,
23829,
1805,
12,
2890,
16,
1047,
4672,
468,
752,
279,
394,
819,
733,
365,
18,
5900,
273,
389,
1042,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5004,
59,
23829,
1805,
12,
2890,
16,
1047,
4672,
468,
752,
279,
394,
819,
733,
365,
18,
5900,
273,
389,
1042,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if not os.path.isdir(globalVars.configPath): os.makedirs(globalVars.configPath) | if not os.path.isdir(globalVars.appArgs.configPath): os.makedirs(globalVars.appArgs.configPath) | def save(): """Saves the configuration to the config file. """ global conf if not os.path.isdir(globalVars.configPath): os.makedirs(globalVars.configPath) try: # Copy default settings and formatting. conf.validate(val, copy = True) conf.write() log.info("Configuration saved") except Exception, e: log.warning("Could not save configuration - probably read only file system") log.debugWarning("", exc_info=True) raise e | 8d1db699efa6387a249f3dd1368e1107b0b37a9d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/8d1db699efa6387a249f3dd1368e1107b0b37a9d/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
13332,
3536,
13370,
326,
1664,
358,
326,
642,
585,
18,
3536,
2552,
2195,
309,
486,
1140,
18,
803,
18,
291,
1214,
12,
6347,
5555,
18,
2910,
2615,
18,
1425,
743,
4672,
1140,
18,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
13332,
3536,
13370,
326,
1664,
358,
326,
642,
585,
18,
3536,
2552,
2195,
309,
486,
1140,
18,
803,
18,
291,
1214,
12,
6347,
5555,
18,
2910,
2615,
18,
1425,
743,
4672,
1140,
18,
81... |
generic = form.has_key('generic'): | generic = form.has_key('generic') | def _form_generic (form): """Check generic validity""" global generic generic = form.has_key('generic'): return True | 961cc704e12d7a79f53cb3e7e34f814d6004bc34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/961cc704e12d7a79f53cb3e7e34f814d6004bc34/rating_html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
687,
67,
13540,
261,
687,
4672,
3536,
1564,
5210,
13800,
8395,
2552,
5210,
5210,
273,
646,
18,
5332,
67,
856,
2668,
13540,
6134,
327,
1053,
282,
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,
687,
67,
13540,
261,
687,
4672,
3536,
1564,
5210,
13800,
8395,
2552,
5210,
5210,
273,
646,
18,
5332,
67,
856,
2668,
13540,
6134,
327,
1053,
282,
2,
-100,
-100,
-100,
-100,
-100,
-10... |
rospy.logerror('failed to find manipulator end effector %s'%req.hand_frame_id) | rospy.logerr('failed to find manipulator end effector %s'%req.hand_frame_id) | def MoveToHandPositionFn(req): with env: (robot_trans,robot_rot) = listener.lookupTransform(baseframe, robot.GetLinks()[0].GetName(), rospy.Time(0)) Trobot = matrixFromQuat([robot_rot[3],robot_rot[0],robot_rot[1],robot_rot[2]]) Trobot[0:3,3] = robot_trans hand = listener.transformPose(baseframe, req.hand_goal) o = hand.pose.orientation p = hand.pose.position Thandgoal = matrixFromQuat([o.w,o.x,o.y,o.z]) Thandgoal[0:3,3] = [p.x,p.y,p.z] with valueslock: robot.SetTransformWithDOFValues(Trobot,values) if len(req.manip_name) > 0: manip = robot.GetManipulator(req.manip_name) if manip is None: rospy.logerror('failed to find manipulator %s'%req.manip_name) return None else: manips = [manip for manip in robot.GetManipulators() if manip.GetEndEffector().GetName()==req.hand_frame_id] if len(manips) == 0: rospy.logerror('failed to find manipulator end effector %s'%req.hand_frame_id) return None manip = manips[0] | 475a3ad4bd90de109c5f4d2b05921306e58c8c9d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7881/475a3ad4bd90de109c5f4d2b05921306e58c8c9d/armplanning_openrave.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9933,
774,
1144,
2555,
5372,
12,
3658,
4672,
598,
1550,
30,
261,
28870,
67,
2338,
16,
28870,
67,
8342,
13,
273,
2991,
18,
8664,
4059,
12,
1969,
3789,
16,
14386,
18,
967,
7100,
1435,
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,
9933,
774,
1144,
2555,
5372,
12,
3658,
4672,
598,
1550,
30,
261,
28870,
67,
2338,
16,
28870,
67,
8342,
13,
273,
2991,
18,
8664,
4059,
12,
1969,
3789,
16,
14386,
18,
967,
7100,
1435,
63... |
divisor (as an element of the free $\mathbb{Z}$-module with the cusps | divisor (as an element of the free $\ZZ$-module with the cusps | def reduce_basis(self, long_etas): r""" Produce a more manageable basis via LLL-reduction. INPUT: -- a list of EtaGroupElement objects (which should all be of the same level) OUTPUT: -- a new list of EtaGroupElement objects having hopefully smaller norm | a1cda92a820e5c353f02cc2bb27e616d03075497 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/a1cda92a820e5c353f02cc2bb27e616d03075497/etaproducts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5459,
67,
23774,
12,
2890,
16,
1525,
67,
29960,
4672,
436,
8395,
23278,
279,
1898,
10680,
429,
10853,
3970,
511,
4503,
17,
1118,
4062,
18,
225,
12943,
30,
1493,
279,
666,
434,
512,
2351,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5459,
67,
23774,
12,
2890,
16,
1525,
67,
29960,
4672,
436,
8395,
23278,
279,
1898,
10680,
429,
10853,
3970,
511,
4503,
17,
1118,
4062,
18,
225,
12943,
30,
1493,
279,
666,
434,
512,
2351,... |
new = Request(newurl, req.get_data()) | new = Request(newurl, req.get_data(), req.headers) | def http_error_302(self, req, fp, code, msg, headers): if headers.has_key('location'): newurl = headers['location'] elif headers.has_key('uri'): newurl = headers['uri'] else: return newurl = urlparse.urljoin(req.get_full_url(), newurl) | 7a91f66e7cf82374433f62284fe15170fdfbc1a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7a91f66e7cf82374433f62284fe15170fdfbc1a5/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1062,
67,
1636,
67,
23,
3103,
12,
2890,
16,
1111,
16,
4253,
16,
981,
16,
1234,
16,
1607,
4672,
309,
1607,
18,
5332,
67,
856,
2668,
3562,
11,
4672,
394,
718,
273,
1607,
3292,
3562,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1062,
67,
1636,
67,
23,
3103,
12,
2890,
16,
1111,
16,
4253,
16,
981,
16,
1234,
16,
1607,
4672,
309,
1607,
18,
5332,
67,
856,
2668,
3562,
11,
4672,
394,
718,
273,
1607,
3292,
3562,
35... |
raise PackageNotFoundError(dep) | required_reason = ("required by '%s'" % (required_by)) \ if required_by is not None \ else "specified as target" raise PackageNotFoundError(dep, required_reason) | def get_deps_for_targets(pkg_cfg, targets): visited = [] deps_left = list(targets) while deps_left: dep = deps_left.pop() if dep not in visited: visited.append(dep) if dep not in pkg_cfg.packages: raise PackageNotFoundError(dep) dep_cfg = pkg_cfg.packages[dep] deps_left.extend(dep_cfg.get('dependencies', [])) return visited | 9ed880dc09f538f35e23a6a63a165ba539fe1fdc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14687/9ed880dc09f538f35e23a6a63a165ba539fe1fdc/packaging.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14877,
67,
1884,
67,
11358,
12,
10657,
67,
7066,
16,
5774,
4672,
9711,
273,
5378,
8740,
67,
4482,
273,
666,
12,
11358,
13,
225,
1323,
8740,
67,
4482,
30,
5993,
273,
8740,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14877,
67,
1884,
67,
11358,
12,
10657,
67,
7066,
16,
5774,
4672,
9711,
273,
5378,
8740,
67,
4482,
273,
666,
12,
11358,
13,
225,
1323,
8740,
67,
4482,
30,
5993,
273,
8740,
67,
... |
options, args = getopt.getopt(sys.argv[1:], "hk:cdv", ["help", "keep", "compress", "delete="]) | options, args = getopt.getopt(sys.argv[1:], "hk:cd", ["help", "keep", "compress", "delete="]) | def main(): logdir = "/usr/srb/data/log" file = 'srbLog.*' fList = {} numFiles = 0 ops = 0 try: options, args = getopt.getopt(sys.argv[1:], "hk:cdv", ["help", "keep", "compress", "delete="]) except getopt.GetoptError, err: # will print something like "option -a not recognized" print str(err) # print help information and exit: usage() sys.exit() if len(options) ==0 : sys.exit('Please use the option -k to specify the number of log files that you want to keep') for o, a in options: if o in ("-h", "--help"): usage() sys.exit() elif o in ("-k", "--keep"): try: numFiles = int(sys.argv[2]) except: sys.exit('Must provide a valid number!') | 6dd588506c2b6d44d8b94385fdb05849f7ca02ce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1913/6dd588506c2b6d44d8b94385fdb05849f7ca02ce/LogsCleanup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
225,
613,
1214,
273,
2206,
13640,
19,
87,
6731,
19,
892,
19,
1330,
6,
585,
273,
296,
87,
6731,
1343,
25664,
284,
682,
273,
2618,
818,
2697,
273,
374,
6727,
273,
374,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
225,
613,
1214,
273,
2206,
13640,
19,
87,
6731,
19,
892,
19,
1330,
6,
585,
273,
296,
87,
6731,
1343,
25664,
284,
682,
273,
2618,
818,
2697,
273,
374,
6727,
273,
374,
225,
... |
sys_prefix = sys.exec_prefix | sys_prefix = os.path.normpath (sys.exec_prefix) | def replace_sys_prefix (self, config_attr, fallback_postfix, use_exec=0): """Attempts to glean a simple pattern from an installation directory available as a 'sysconfig' attribute: if the directory name starts with the "system prefix" (the one hard-coded in the Makefile and compiled into Python), then replace it with the current installation prefix and return the "relocated" installation directory.""" | c27d80025134ee2ae92557af3b9d6c5496004c88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c27d80025134ee2ae92557af3b9d6c5496004c88/install.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1453,
67,
9499,
67,
3239,
261,
2890,
16,
642,
67,
1747,
16,
5922,
67,
2767,
904,
16,
999,
67,
4177,
33,
20,
4672,
3536,
10113,
358,
314,
298,
304,
279,
4143,
1936,
628,
392,
13193,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1453,
67,
9499,
67,
3239,
261,
2890,
16,
642,
67,
1747,
16,
5922,
67,
2767,
904,
16,
999,
67,
4177,
33,
20,
4672,
3536,
10113,
358,
314,
298,
304,
279,
4143,
1936,
628,
392,
13193,
1... |
self.processSolidusInTag() self.state = self.states["beforeAttributeName"] | if not self.processSolidusInTag(): self.state = self.states["beforeAttributeName"] | def tagNameState(self): data = self.stream.char() if data in spaceCharacters: self.state = self.states["beforeAttributeName"] elif data in asciiLetters: self.currentToken["name"] += data +\ self.stream.charsUntil(asciiLetters, True) elif data == u">": self.emitCurrentToken() elif data == EOF: self.tokenQueue.append({"type": "ParseError", "data": "eof-in-tag-name"}) self.emitCurrentToken() elif data == u"/": self.processSolidusInTag() self.state = self.states["beforeAttributeName"] else: self.currentToken["name"] += data return True | 550c46313e3f881206ff15f361fec45b6adef1f4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10463/550c46313e3f881206ff15f361fec45b6adef1f4/tokenizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7196,
1119,
12,
2890,
4672,
501,
273,
365,
18,
3256,
18,
3001,
1435,
309,
501,
316,
3476,
11600,
30,
365,
18,
2019,
273,
365,
18,
7992,
9614,
5771,
19240,
11929,
1327,
501,
316,
11384,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7196,
1119,
12,
2890,
4672,
501,
273,
365,
18,
3256,
18,
3001,
1435,
309,
501,
316,
3476,
11600,
30,
365,
18,
2019,
273,
365,
18,
7992,
9614,
5771,
19240,
11929,
1327,
501,
316,
11384,
... |
if selfparam: self._return.set_descr(epytext.parse_as_para(rtype)) else: self._return.set_type(epytext.parse_as_para(rtype)) | descr = markup.parse(rtype) if selfparam: self._return.set_descr(descr) else: self._return.set_type(descr) | def _init_builtin_signature(self, func): """ Construct the signature for a builtin function or method from its docstring. If the docstring uses the standard convention of including a signature in the first line of the docstring (and formats that signature according to standard conventions), then it will be used to extract a signature. Otherwise, the signature will be set to a single varargs variable named C{"..."}. | d0164ceec6b7c656820c9cc53370c59eb64d4605 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/d0164ceec6b7c656820c9cc53370c59eb64d4605/objdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
24553,
67,
8195,
12,
2890,
16,
1326,
4672,
3536,
14291,
326,
3372,
364,
279,
15273,
445,
578,
707,
628,
2097,
14525,
18,
225,
971,
326,
14525,
4692,
326,
4529,
15797,
434,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2738,
67,
24553,
67,
8195,
12,
2890,
16,
1326,
4672,
3536,
14291,
326,
3372,
364,
279,
15273,
445,
578,
707,
628,
2097,
14525,
18,
225,
971,
326,
14525,
4692,
326,
4529,
15797,
434,... |
self.syntax_error('attribute value not quoted') | self.syntax_error("attribute `%s' value not quoted" % attrname) if '<' in attrvalue: self.syntax_error("`<' illegal in attribute value") | def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k) if not res: break attrname, attrvalue = res.group('name', 'value') if attrvalue is None: self.syntax_error('no attribute value specified') attrvalue = attrname elif attrvalue[:1] == "'" == attrvalue[-1:] or \ attrvalue[:1] == '"' == attrvalue[-1:]: attrvalue = attrvalue[1:-1] else: self.syntax_error('attribute value not quoted') if attributes is not None and not attributes.has_key(attrname): self.syntax_error('unknown attribute %s of element %s' % (attrname, tag)) if attrdict.has_key(attrname): self.syntax_error('attribute specified twice') attrvalue = string.translate(attrvalue, attrtrans) attrdict[attrname] = self.translate_references(attrvalue) k = res.end(0) if attributes is not None: # fill in with default attributes for key, val in attributes.items(): if val is not None and not attrdict.has_key(key): attrdict[key] = val return attrdict, k | a410d6a227cd319b6aaccb60dced4660f1be0df3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a410d6a227cd319b6aaccb60dced4660f1be0df3/xmllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
4350,
12,
2890,
16,
1047,
16,
417,
16,
525,
16,
1677,
273,
599,
4672,
1831,
892,
273,
365,
18,
1899,
892,
468,
4494,
1109,
326,
501,
3086,
417,
471,
525,
1368,
279,
1047,
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,
1109,
67,
4350,
12,
2890,
16,
1047,
16,
417,
16,
525,
16,
1677,
273,
599,
4672,
1831,
892,
273,
365,
18,
1899,
892,
468,
4494,
1109,
326,
501,
3086,
417,
471,
525,
1368,
279,
1047,
4... |
for i in range(Nsta): | for i in xrange(Nsta): | def classicStaLta(a, Nsta, Nlta): """ Computes the standard STA/LTA from a given imput array a. The length of the STA is given by Nsta in samples, respectively is the length of the LTA given by Nlta in samples. @type a: Numpy ndarray @param a: Seismic Trace @type Nsta: Int @param Nsta: Length of short time average window in samples @type Nlta: Int @param Nlta: Length of long time average window in samples @rtype: Numpy ndarray @return: Charactristic function of classic STA/LTA """ m = len(a) # # compute the short time average (STA) sta = np.zeros(len(a), dtype='float64') pad_sta = np.zeros(Nsta) for i in range(Nsta): # window size to smooth over sta = sta + np.concatenate((pad_sta, a[i:m - Nsta + i] ** 2)) sta = sta / Nsta # # compute the long time average (LTA) lta = np.zeros(len(a), dtype='float64') pad_lta = np.ones(Nlta) # avoid for 0 division 0/1=0 for i in range(Nlta): # window size to smooth over lta = lta + np.concatenate((pad_lta, a[i:m - Nlta + i] ** 2)) lta = lta / Nlta # # pad zeros of length Nlta to avoid overfit and # return STA/LTA ratio sta[0:Nlta] = 0 return sta / lta | ea4c7ece41544c44ddf36d8239db27ef9e2868d1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/ea4c7ece41544c44ddf36d8239db27ef9e2868d1/trigger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28937,
510,
69,
48,
2351,
12,
69,
16,
423,
334,
69,
16,
423,
80,
2351,
4672,
3536,
14169,
281,
326,
4529,
2347,
37,
19,
48,
9833,
628,
279,
864,
709,
458,
526,
279,
18,
1021,
769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28937,
510,
69,
48,
2351,
12,
69,
16,
423,
334,
69,
16,
423,
80,
2351,
4672,
3536,
14169,
281,
326,
4529,
2347,
37,
19,
48,
9833,
628,
279,
864,
709,
458,
526,
279,
18,
1021,
769,
... |
if hasattr(sys, '_getframe'): currentframe = sys._getframe | if hasattr(sys, '_getframe'): currentframe = lambda: sys._getframe(3) | def currentframe(): """Return the frame object for the caller's stack frame.""" try: raise Exception except: return sys.exc_traceback.tb_frame.f_back | cb33d30a39988d44554871be3c5b931b57557eea /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/cb33d30a39988d44554871be3c5b931b57557eea/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
783,
3789,
13332,
3536,
990,
326,
2623,
733,
364,
326,
4894,
1807,
2110,
2623,
12123,
775,
30,
1002,
1185,
1335,
30,
327,
2589,
18,
10075,
67,
21696,
18,
18587,
67,
3789,
18,
74,
67,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
783,
3789,
13332,
3536,
990,
326,
2623,
733,
364,
326,
4894,
1807,
2110,
2623,
12123,
775,
30,
1002,
1185,
1335,
30,
327,
2589,
18,
10075,
67,
21696,
18,
18587,
67,
3789,
18,
74,
67,
8... |
'tests/paren.bib'): | 'tests/paren.bib', 'tests/url.bib'): | def expand (file, entry): | 839de8a1e0541fd36c80aae33f204ac1e727be3a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14180/839de8a1e0541fd36c80aae33f204ac1e727be3a/testsuite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4542,
261,
768,
16,
1241,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4542,
261,
768,
16,
1241,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
('lp', POINTER(LPX), 1), | ('lp', POINTER(glp_prob), 1), | def LPXKKT_FIELDS(): return [ ('pe_ae_max', c_double), # largest absolute error ('pe_ae_row', c_int), # number of row with largest absolute error ('pe_re_max', c_double), # largest relative error ('pe_re_row', c_int), # number of row with largest relative error ('pe_quality', c_int), # quality of primal solution | 6f19a1f55402af52669d1e2728707ba0e9b605b3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1322/6f19a1f55402af52669d1e2728707ba0e9b605b3/glpk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
511,
52,
60,
47,
47,
56,
67,
12683,
13332,
327,
306,
7707,
347,
67,
8906,
67,
1896,
2187,
276,
67,
9056,
3631,
468,
12756,
4967,
555,
7707,
347,
67,
8906,
67,
492,
2187,
276,
67,
474... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
511,
52,
60,
47,
47,
56,
67,
12683,
13332,
327,
306,
7707,
347,
67,
8906,
67,
1896,
2187,
276,
67,
9056,
3631,
468,
12756,
4967,
555,
7707,
347,
67,
8906,
67,
492,
2187,
276,
67,
474... |
self.assertTaskBrainEquality('getAssignees', (default_user, )) | self.assertTaskBrainEquality('getAssignees', ()) | def test_getAssignees(self): self.assertTaskBrainEquality('getAssignees', (default_user, )) | 8921a3f808f8e2d0c9b1a855d8825219657c0e9d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10431/8921a3f808f8e2d0c9b1a855d8825219657c0e9d/testTask.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
4910,
25521,
12,
2890,
4672,
365,
18,
11231,
2174,
38,
7596,
20273,
2668,
588,
4910,
25521,
2187,
261,
1886,
67,
1355,
16,
8623,
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,
67,
588,
4910,
25521,
12,
2890,
4672,
365,
18,
11231,
2174,
38,
7596,
20273,
2668,
588,
4910,
25521,
2187,
261,
1886,
67,
1355,
16,
8623,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
break | continue | for state_name, state_def in obj.states.iteritems(): if 'result' in state_def: result = state_def['result'] if result['type'] != 'form': break | e6eefb68a66515ec8052e113aff90e5ae42854f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7397/e6eefb68a66515ec8052e113aff90e5ae42854f4/translate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
364,
919,
67,
529,
16,
919,
67,
536,
316,
1081,
18,
7992,
18,
2165,
3319,
13332,
309,
296,
2088,
11,
316,
919,
67,
536,
30,
563,
273,
919,
67,
536,
3292,
2088,
3546,
309,
563,
3292,
723,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
364,
919,
67,
529,
16,
919,
67,
536,
316,
1081,
18,
7992,
18,
2165,
3319,
13332,
309,
296,
2088,
11,
316,
919,
67,
536,
30,
563,
273,
919,
67,
536,
3292,
2088,
3546,
309,
563,
3292,
723,
... |
print "Unmatched open delimiter '%s' on line %d", (symbol, lineno) | print "Unmatched open delimiter '%s' on line %d" % (symbol, lineno) | def checkit(source, opts, morecmds=[]): """Check the LaTex formatting in a sequence of lines. Opts is a mapping of options to option values if any: -m munge parenthesis and brackets -f forward slash warnings to be skipped -d delimiters only checking -v verbose listing on delimiters -s lineno: linenumber to start scan (default is 1). Morecmds is a sequence of LaTex commands (without backslashes) that are to be considered valid in the scan. """ texcmd = re.compile(r'\\[A-Za-z]+') validcmds = sets.Set(cmdstr.split()) for cmd in morecmds: validcmds.add('\\' + cmd) openers = [] # Stack of pending open delimiters if '-m' in opts: pairmap = {']':'[(', ')':'(['} # Munged openers else: pairmap = {']':'[', ')':'('} # Normal opener for a given closer openpunct = sets.Set('([') # Set of valid openers delimiters = re.compile(r'\\(begin|end){([_a-zA-Z]+)}|([()\[\]])') startline = int(opts.get('-s', '1')) lineno = 0 for lineno, line in izip(count(startline), islice(source, startline-1, None)): line = line.rstrip() if '-f' not in opts and '/' in line: # Warn whenever forward slashes encountered line = line.rstrip() print 'Warning, forward slash on line %d: %s' % (lineno, line) if '-d' not in opts: # Validate commands nc = line.find(r'\newcommand') if nc != -1: start = line.find('{', nc) end = line.find('}', start) validcmds.add(line[start+1:end]) for cmd in texcmd.findall(line): if cmd not in validcmds: print r'Warning, unknown tex cmd on line %d: \%s' % (lineno, cmd) # Check balancing of open/close markers (parens, brackets, etc) for begend, name, punct in delimiters.findall(line): if '-v' in opts: print lineno, '|', begend, name, punct, if begend == 'begin' and '-d' not in opts: openers.append((lineno, name)) elif punct in openpunct: openers.append((lineno, punct)) elif begend == 'end' and '-d' not in opts: matchclose(lineno, name, openers, pairmap) elif punct in pairmap: matchclose(lineno, punct, openers, pairmap) if '-v' in opts: print ' --> ', openers for lineno, symbol in openers: print "Unmatched open delimiter '%s' on line %d", (symbol, lineno) print 'Done checking %d lines.' % (lineno,) return 0 | b5bee2fb9833966f6443bcaf5b5d2dbd6cdb404c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b5bee2fb9833966f6443bcaf5b5d2dbd6cdb404c/texcheck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
305,
12,
3168,
16,
1500,
16,
1898,
24680,
33,
8526,
4672,
3536,
1564,
326,
21072,
16733,
10407,
316,
279,
3102,
434,
2362,
18,
225,
25769,
353,
279,
2874,
434,
702,
358,
1456,
924,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
305,
12,
3168,
16,
1500,
16,
1898,
24680,
33,
8526,
4672,
3536,
1564,
326,
21072,
16733,
10407,
316,
279,
3102,
434,
2362,
18,
225,
25769,
353,
279,
2874,
434,
702,
358,
1456,
924,
... |
return "text/" + (html_re.search(s) >= 0 and 'html' or 'plain') | if (lower(strip(s)[:6]) == '<html>' or find(s, '</') > 0): return 'text/html' return 'text/plain' | def text_type(s): return "text/" + (html_re.search(s) >= 0 and 'html' or 'plain') | a4036ced64653b36f02a710f625fef6133c00d75 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a4036ced64653b36f02a710f625fef6133c00d75/content_types.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
977,
67,
723,
12,
87,
4672,
225,
309,
261,
8167,
12,
6406,
12,
87,
13,
10531,
26,
5717,
422,
2368,
2620,
1870,
578,
1104,
12,
87,
16,
4357,
6134,
405,
374,
4672,
327,
296,
955,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
977,
67,
723,
12,
87,
4672,
225,
309,
261,
8167,
12,
6406,
12,
87,
13,
10531,
26,
5717,
422,
2368,
2620,
1870,
578,
1104,
12,
87,
16,
4357,
6134,
405,
374,
4672,
327,
296,
955,
19,
... |
def func(node): if not isinstance(node, Expr.MemoryRef): return node return Expr.MemoryRef(node.offset + delta) return Expr(self.root.apply(func)) | code = self.code getpartial = self._getpartial simplify = self._simplify newcode = [] lastref = 0 i = 0 for i in xrange(len(code)): if code[i] is _EXPRREF: assert isinstance(code[i-1], (int, long)) newcode.extend(code[lastref:i-1]) newcode.append(code[i-1] + delta) lastref = i newcode.extend(code[lastref:]) return Expr(newcode) | def func(node): if not isinstance(node, Expr.MemoryRef): return node return Expr.MemoryRef(node.offset + delta) | 1dd24e33ec6c36d3d5a36f2c212e6968864d27b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/1dd24e33ec6c36d3d5a36f2c212e6968864d27b3/esotope-bfc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1326,
12,
2159,
4672,
309,
486,
1549,
12,
2159,
16,
8074,
18,
6031,
1957,
4672,
327,
756,
327,
8074,
18,
6031,
1957,
12,
2159,
18,
3348,
397,
3622,
13,
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,
1326,
12,
2159,
4672,
309,
486,
1549,
12,
2159,
16,
8074,
18,
6031,
1957,
4672,
327,
756,
327,
8074,
18,
6031,
1957,
12,
2159,
18,
3348,
397,
3622,
13,
2,
-100,
-100,
-100,
-100,
-100,... |
if proc not in (1, 3, 4): | if proc not in (1, 3, 4): | def mkcred(self, proc): if proc not in (1, 3, 4): # not Mnt/Unmnt/Unmntall return rpc.AUTH_NULL, '' if self.cred == None: self.cred = rpc.AUTH_UNIX, rpc.make_auth_unix_default() return self.cred | 0efef3efd4653fd988e938d1fb1499801bb607d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0efef3efd4653fd988e938d1fb1499801bb607d7/mountclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
20610,
12,
2890,
16,
5418,
4672,
309,
5418,
486,
316,
261,
21,
16,
890,
16,
1059,
4672,
468,
486,
490,
496,
19,
984,
21818,
19,
984,
21818,
454,
327,
6724,
18,
7131,
67,
8560,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
20610,
12,
2890,
16,
5418,
4672,
309,
5418,
486,
316,
261,
21,
16,
890,
16,
1059,
4672,
468,
486,
490,
496,
19,
984,
21818,
19,
984,
21818,
454,
327,
6724,
18,
7131,
67,
8560,
... |
try: with self.browser: if isinstance(contact, Contact): _id = contact.id elif isinstance(contact, (int,long,str,unicode)): _id = contact else: raise TypeError("The parameter 'contact' isn't a contact nor a int/long/str/unicode: %s" % contact) profile = self.browser.get_profile(_id) if profile.is_online(): s = Contact.STATUS_ONLINE else: s = Contact.STATUS_OFFLINE if isinstance(contact, Contact): contact.id = _id contact.name = profile.get_name() contact.status = s else: contact = Contact(_id, profile.get_name(), s) contact.status_msg = u'%s old' % profile.table['details']['old'] contact.summary = profile.description contact.avatar = None for photo in profile.photos: contact.set_photo(photo.split('/')[-1], url=photo, thumbnail_url=photo.replace('image', 'thumb1_')) contact.profile = [] stats = ProfileNode('stats', 'Stats', [], flags=ProfileNode.HEAD|ProfileNode.SECTION) for label, value in profile.get_stats().iteritems(): stats.value.append(ProfileNode(label, label.capitalize(), value)) contact.profile.append(stats) for section, d in profile.get_table().iteritems(): s = ProfileNode(section, section.capitalize(), [], flags=ProfileNode.SECTION) for key, value in d.iteritems(): s.value.append(ProfileNode(key, key.capitalize(), value)) contact.profile.append(s) return contact except BrowserUnavailable: return None | with self.browser: if isinstance(contact, Contact): _id = contact.id elif isinstance(contact, (int,long,str,unicode)): _id = contact else: raise TypeError("The parameter 'contact' isn't a contact nor a int/long/str/unicode: %s" % contact) profile = self.browser.get_profile(_id) if profile.is_online(): s = Contact.STATUS_ONLINE else: s = Contact.STATUS_OFFLINE if isinstance(contact, Contact): contact.id = _id contact.name = profile.get_name() contact.status = s else: contact = Contact(_id, profile.get_name(), s) contact.status_msg = u'%s old' % profile.table['details']['old'] contact.summary = profile.description contact.avatar = None for photo in profile.photos: contact.set_photo(photo.split('/')[-1], url=photo, thumbnail_url=photo.replace('image', 'thumb1_')) contact.profile = [] stats = ProfileNode('stats', 'Stats', [], flags=ProfileNode.HEAD|ProfileNode.SECTION) for label, value in profile.get_stats().iteritems(): stats.value.append(ProfileNode(label, label.capitalize(), value)) contact.profile.append(stats) for section, d in profile.get_table().iteritems(): s = ProfileNode(section, section.capitalize(), [], flags=ProfileNode.SECTION) for key, value in d.iteritems(): s.value.append(ProfileNode(key, key.capitalize(), value)) contact.profile.append(s) return contact | def get_contact(self, contact): try: with self.browser: if isinstance(contact, Contact): _id = contact.id elif isinstance(contact, (int,long,str,unicode)): _id = contact else: raise TypeError("The parameter 'contact' isn't a contact nor a int/long/str/unicode: %s" % contact) | 776f5d3ac8454b572b13b7fa4192823c1555ec84 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/776f5d3ac8454b572b13b7fa4192823c1555ec84/backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8994,
12,
2890,
16,
5388,
4672,
775,
30,
598,
365,
18,
11213,
30,
309,
1549,
12,
8994,
16,
13329,
4672,
389,
350,
273,
5388,
18,
350,
1327,
1549,
12,
8994,
16,
261,
474,
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,
336,
67,
8994,
12,
2890,
16,
5388,
4672,
775,
30,
598,
365,
18,
11213,
30,
309,
1549,
12,
8994,
16,
13329,
4672,
389,
350,
273,
5388,
18,
350,
1327,
1549,
12,
8994,
16,
261,
474,
16,... |
return self._getMessage(int(args), 12345) | try: number = int(args) except ValueError: number = -1 return self._getMessage(number, 12345) | def onRetr(self, command, args): """POP3 RETR command.""" return self._getMessage(int(args), 12345) | 959f6c8f86abe1ad21eb4ad3e6c79f2ae1aaf183 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/959f6c8f86abe1ad21eb4ad3e6c79f2ae1aaf183/pop3proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
7055,
86,
12,
2890,
16,
1296,
16,
833,
4672,
3536,
30374,
23,
10366,
54,
1296,
12123,
327,
365,
6315,
24906,
12,
474,
12,
1968,
3631,
2593,
25574,
13,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
7055,
86,
12,
2890,
16,
1296,
16,
833,
4672,
3536,
30374,
23,
10366,
54,
1296,
12123,
327,
365,
6315,
24906,
12,
474,
12,
1968,
3631,
2593,
25574,
13,
2,
-100,
-100,
-100,
-100,
-... |
def stop_at_breakpoint (process): if process.IsValid(): state = process.GetState() if state != lldb.eStateStopped: return lldb.eStateInvalid thread = process.GetThreadAtIndex(0) if thread.IsValid(): if thread.GetStopReason() == lldb.eStopReasonBreakpoint: return lldb.eStateStopped else: return lldb.eStateInvalid else: return lldb.eStateInvalid | f1_breakpoints = {} read_input(sys.argv[1], f1_breakpoints) f1_items = f1_breakpoints.items() f2_breakpoints = {} read_input(sys.argv[2], f2_breakpoints) f2_items = f2_breakpoints.items() mismatch = 0 for f2bp in range(len(f2_items)): id = f2_items[f2bp][0] bp = f2_items[f2bp][1] bp1 = f1_breakpoints.get(id) if bp1 is None: print "bp is missing" | def stop_at_breakpoint (process): if process.IsValid(): state = process.GetState() if state != lldb.eStateStopped: return lldb.eStateInvalid thread = process.GetThreadAtIndex(0) if thread.IsValid(): if thread.GetStopReason() == lldb.eStopReasonBreakpoint: return lldb.eStateStopped else: return lldb.eStateInvalid else: return lldb.eStateInvalid else: return lldb.eStateInvalid | 70d48bca8c194d748be178a223126e17b2e8529f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11986/70d48bca8c194d748be178a223126e17b2e8529f/CompareDebugInfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
284,
21,
67,
8820,
4139,
273,
2618,
855,
67,
2630,
12,
9499,
18,
19485,
63,
21,
6487,
284,
21,
67,
8820,
4139,
13,
284,
21,
67,
3319,
273,
284,
21,
67,
8820,
4139,
18,
3319,
1435,
225,
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,
284,
21,
67,
8820,
4139,
273,
2618,
855,
67,
2630,
12,
9499,
18,
19485,
63,
21,
6487,
284,
21,
67,
8820,
4139,
13,
284,
21,
67,
3319,
273,
284,
21,
67,
8820,
4139,
18,
3319,
1435,
225,
2... |
return _('Multiples of %d') % ( self.curlevel+1 ) def setLevel(self, n): self.curlevel = n | return _('Multiples of %d') % ( self.cur_sublevel+1 ) def setLevel(self, level, sublevel): self.curlevel = level self.cur_sublevel = sublevel | def getTitle(self): return _('Multiples of %d') % ( self.curlevel+1 ) | af34e64d38be11ba68a4418286816d4e15a20114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/af34e64d38be11ba68a4418286816d4e15a20114/gnumch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10786,
12,
2890,
4672,
327,
389,
2668,
5002,
6089,
434,
738,
72,
6134,
738,
261,
365,
18,
1397,
2815,
15,
21,
262,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10786,
12,
2890,
4672,
327,
389,
2668,
5002,
6089,
434,
738,
72,
6134,
738,
261,
365,
18,
1397,
2815,
15,
21,
262,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
f = at.force[i]/(HARTREE/BOHR) self.force.write('%20.10e%20.10e%20.10e%4d%4d X\n' % (f[1], f[2], f[3], spind[at.species[i]], objind)) | f = at.force[i].copy() if self.rydberg: f /= (RYDBERG/BOHR) self.force.write('%20.10e%20.10e%20.10e%4d%4d X\n' % (f[1], f[2], f[3], self.species_map[str(at.species[i])], objind)) | def write(self, at): | aa058d12f01c015ff4496d1d7d2c6865e46f4066 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/aa058d12f01c015ff4496d1d7d2c6865e46f4066/sio2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
622,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
622,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
class FakeSpecial(FakeFile): | class FakeFifo(FakeFile): pass class FakeDevice(FakeFile): | def __getattr__(self, name): if name in ('mode', 'mtime', 'atime', 'ctime', 'refcount'): return self.dereference().__getattr__(name) | 754ae64ac3d42c03c45da2920fdd1d027194154d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5149/754ae64ac3d42c03c45da2920fdd1d027194154d/os_mock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
508,
4672,
309,
508,
316,
7707,
3188,
2187,
296,
10838,
2187,
296,
270,
494,
2187,
296,
21261,
2187,
296,
1734,
1883,
11,
4672,
327,
365,
18,
765,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
508,
4672,
309,
508,
316,
7707,
3188,
2187,
296,
10838,
2187,
296,
270,
494,
2187,
296,
21261,
2187,
296,
1734,
1883,
11,
4672,
327,
365,
18,
765,
7... |
self.SendToRietveld('/%d/close' % self.issue, body, ctype) | self.SendToRietveld('/%d/close' % self.issue, payload=body, content_type=ctype) | def CloseIssue(self): """Closes the Rietveld issue for this changelist.""" data = [("description", self.description),] ctype, body = upload.EncodeMultipartFormData(data, []) self.SendToRietveld('/%d/close' % self.issue, body, ctype) | bf9d78335c1e5913a87418e1740247bd9f0394fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/bf9d78335c1e5913a87418e1740247bd9f0394fe/gcl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3527,
12956,
12,
2890,
4672,
3536,
18545,
326,
534,
6213,
90,
488,
5672,
364,
333,
9435,
5449,
12123,
501,
273,
306,
2932,
3384,
3113,
365,
18,
3384,
3631,
65,
11920,
16,
1417,
273,
3617... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3527,
12956,
12,
2890,
4672,
3536,
18545,
326,
534,
6213,
90,
488,
5672,
364,
333,
9435,
5449,
12123,
501,
273,
306,
2932,
3384,
3113,
365,
18,
3384,
3631,
65,
11920,
16,
1417,
273,
3617... |
for content in contents: | for content in self._content: | def render(self, header = 1): print "Content-Type: text/plain\n" print "Welcome to debug mode!" print "You wanted the %(flavour)s flavour if I support flavours" % self._py | c5df7f53c9b4b8148e6861e0768ed14057fae1df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/c5df7f53c9b4b8148e6861e0768ed14057fae1df/debug.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1446,
273,
404,
4672,
1172,
315,
1350,
17,
559,
30,
977,
19,
7446,
64,
82,
6,
1172,
315,
59,
16312,
358,
1198,
1965,
4442,
1172,
315,
6225,
15504,
326,
8975,
2242,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1446,
273,
404,
4672,
1172,
315,
1350,
17,
559,
30,
977,
19,
7446,
64,
82,
6,
1172,
315,
59,
16312,
358,
1198,
1965,
4442,
1172,
315,
6225,
15504,
326,
8975,
2242,
... |
i = string.rfind(basepath[:-1], '/') | i = basepath[:-1].rfind('/') | def basejoin(base, url): """Utility to combine a URL with a base URL to form a new URL.""" type, path = splittype(url) if type: # if url is complete (i.e., it contains a type), return it return url host, path = splithost(path) type, basepath = splittype(base) # inherit type from base if host: # if url contains host, just inherit type if type: return type + '://' + host + path else: # no type inherited, so url must have started with // # just return it return url host, basepath = splithost(basepath) # inherit host basepath, basetag = splittag(basepath) # remove extraneous cruft basepath, basequery = splitquery(basepath) # idem if path[:1] != '/': # non-absolute path name if path[:1] in ('#', '?'): # path is just a tag or query, attach to basepath i = len(basepath) else: # else replace last component i = string.rfind(basepath, '/') if i < 0: # basepath not absolute if host: # host present, make absolute basepath = '/' else: # else keep non-absolute basepath = '' else: # remove last file component basepath = basepath[:i+1] # Interpret ../ (important because of symlinks) while basepath and path[:3] == '../': path = path[3:] i = string.rfind(basepath[:-1], '/') if i > 0: basepath = basepath[:i+1] elif i == 0: basepath = '/' break else: basepath = '' path = basepath + path if type and host: return type + '://' + host + path elif type: return type + ':' + path elif host: return '//' + host + path # don't know what this means else: return path | b2493f855a7319ce0748bfb965253cad9c9f5a2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b2493f855a7319ce0748bfb965253cad9c9f5a2c/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1026,
5701,
12,
1969,
16,
880,
4672,
3536,
6497,
358,
8661,
279,
1976,
598,
279,
1026,
1976,
358,
646,
279,
394,
1976,
12123,
618,
16,
589,
273,
1416,
723,
12,
718,
13,
309,
618,
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,
1026,
5701,
12,
1969,
16,
880,
4672,
3536,
6497,
358,
8661,
279,
1976,
598,
279,
1026,
1976,
358,
646,
279,
394,
1976,
12123,
618,
16,
589,
273,
1416,
723,
12,
718,
13,
309,
618,
30,
... |
id.pluralequation ='0' | id.pluralequation = '0' | def create_default_languages(): from pootle_app.core import Language af = Language(code="af") af.fullname = u"Afrikaans" af.specialchars = u"ëïêôûáéíóúý" af.nplurals = '2' af.pluralequation = "(n != 1)" af.save() | 705dd9e8bba1245496893550d0b060f0049a0893 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/705dd9e8bba1245496893550d0b060f0049a0893/initdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
1886,
67,
14045,
13332,
628,
293,
1632,
298,
67,
2910,
18,
3644,
1930,
9889,
225,
10073,
273,
9889,
12,
710,
1546,
1727,
7923,
10073,
18,
21885,
273,
582,
6,
12664,
566,
7282,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1886,
67,
14045,
13332,
628,
293,
1632,
298,
67,
2910,
18,
3644,
1930,
9889,
225,
10073,
273,
9889,
12,
710,
1546,
1727,
7923,
10073,
18,
21885,
273,
582,
6,
12664,
566,
7282,
... |
@type newVersion | @type newVersion: versions.NewVersion | def _localChanges(repos, changeSet, curPkg, srcPkg, newVersion, root, flags): """ Populates a change set against the files in the filesystem and builds a package object which describes the files installed. The return is a tuple with a boolean saying if anything changes and a package reflecting what's in the filesystem; the changeSet is updated as a side effect. @param repos: Repository this directory is against. @type repos: repository.Repository @param changeSet: Changeset to update with information for this package @type changeSet: changeset.ChangeSet @param curPkg: Package which is installed @type curPkg: package.Package @param srcPkg: Package to generate the change set against @type srcPkg: package.Package @param newVersion: version to use for the newly created package @type newVersion @param root: root directory the files are in (ignored for sources, which are assumed to be in the current directory) @type root: str @param flags: IGNOREUGIDS or zero @type flags: int """ noIds = ((flags & IGNOREUGIDS) != 0) newPkg = curPkg.copy() newPkg.changeVersion(newVersion) for (fileId, path, version) in newPkg.iterFileList(): if path[0] == '/': realPath = root + path else: realPath = os.getcwd() + "/" + path try: os.lstat(realPath) except OSError: log.error("%s is missing (use remove if this is intentional)" % path) return None if srcPkg and srcPkg.hasFile(fileId): srcFileVersion = srcPkg.getFile(fileId)[1] srcFile = repos.getFileVersion(fileId, srcFileVersion) else: srcFile = None f = files.FileFromFilesystem(realPath, fileId, possibleMatch = srcFile) if path.endswith(".recipe"): f.flags.isConfig(set = True) if not srcPkg or not srcPkg.hasFile(fileId): # if we're committing against head, this better be a new file. # if we're generating a diff against someplace else, it might not # be. assert(srcPkg or isinstance(version, versions.NewVersion)) # new file, so this is easy changeSet.addFile(fileId, None, newVersion, f.freeze()) newPkg.addFile(fileId, path, newVersion) if f.hasContents: newCont = filecontents.FromFilesystem(realPath) changeSet.addFileContents(fileId, changeset.ChangedFileTypes.file, newCont, f.flags.isConfig()) continue oldVersion = srcPkg.getFile(fileId)[1] (oldFile, oldCont) = repos.getFileVersion(fileId, oldVersion, withContents = 1) if not f.metadataEqual(oldFile, ignoreOwnerGroup = noIds): newPkg.addFile(fileId, path, newVersion) (filecs, hash) = changeset.fileChangeSet(fileId, oldFile, f) changeSet.addFile(fileId, oldVersion, newVersion, filecs) if hash: newCont = filecontents.FromFilesystem(realPath) (contType, cont) = changeset.fileContentsDiff(oldFile, oldCont, f, newCont) changeSet.addFileContents(fileId, contType, cont, f.flags.isConfig()) (csPkg, filesNeeded, pkgsNeeded) = newPkg.diff(srcPkg) assert(not pkgsNeeded) changeSet.newPackage(csPkg) if (csPkg.getOldFileList() or csPkg.getChangedFileList() or csPkg.getNewFileList()): foundDifference = 1 else: foundDifference = 0 return (foundDifference, newPkg) | e29b00fafc03e9fa735b89b5c7aae80865a1a8d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/e29b00fafc03e9fa735b89b5c7aae80865a1a8d2/update.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3729,
7173,
12,
15564,
16,
26104,
16,
662,
11264,
16,
1705,
11264,
16,
28906,
16,
1365,
16,
2943,
4672,
3536,
10264,
17099,
279,
2549,
444,
5314,
326,
1390,
316,
326,
6496,
471,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3729,
7173,
12,
15564,
16,
26104,
16,
662,
11264,
16,
1705,
11264,
16,
28906,
16,
1365,
16,
2943,
4672,
3536,
10264,
17099,
279,
2549,
444,
5314,
326,
1390,
316,
326,
6496,
471,
107... |
if f.status == HASH_NOT_CHECKED: self.current_file = os.path.basename(f.filename) f.real_hash = self.get_file_hash(f.filename) self.progress_file=self.progress_file+1 if len(f.expected_hash) == 0: | self.current_file = os.path.basename(f.filename) f.real_hash = self.get_file_hash(f.filename) self.progress_file=self.progress_file+1 if len(f.expected_hash) == 0: f.status = HASH_OK else: if f.real_hash == f.expected_hash: | def thread_update_hash(self): for f in self.files: if self.abort: # cancel button pressed break | 4cb54394f66ed588dc24956f996e226c975c2371 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2200/4cb54394f66ed588dc24956f996e226c975c2371/parano.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2650,
67,
2725,
67,
2816,
12,
2890,
4672,
225,
364,
284,
316,
365,
18,
2354,
30,
309,
365,
18,
18623,
30,
468,
3755,
3568,
19504,
898,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2650,
67,
2725,
67,
2816,
12,
2890,
4672,
225,
364,
284,
316,
365,
18,
2354,
30,
309,
365,
18,
18623,
30,
468,
3755,
3568,
19504,
898,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.append(self.read(len)) | self.append(str(self.read(len), "latin-1")) | def load_short_binstring(self): len = ord(self.read(1)) self.append(self.read(len)) | f93254d2992896445cbd1eec0ee4a80eb8edc6b8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/f93254d2992896445cbd1eec0ee4a80eb8edc6b8/pickle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
6620,
67,
4757,
1080,
12,
2890,
4672,
562,
273,
4642,
12,
2890,
18,
896,
12,
21,
3719,
365,
18,
6923,
12,
2890,
18,
896,
12,
1897,
3719,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
6620,
67,
4757,
1080,
12,
2890,
4672,
562,
273,
4642,
12,
2890,
18,
896,
12,
21,
3719,
365,
18,
6923,
12,
2890,
18,
896,
12,
1897,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
del(self._contents[item.key]) | try: del(self._contents[item.key]) removed.append(item) except KeyError: print_d("Could not find/remove %r." % item.key, self) | def remove(self, items): """Remove items. This causes a 'removed' signal.""" if not items: return print_d("Removing %d items." % len(items), self) for item in items: print_d("Removing %r." % item.key, self) del(self._contents[item.key]) self.dirty = True self.emit('removed', items) | e1974c65f998820f3751ec5acbb839d2808f04fa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4764/e1974c65f998820f3751ec5acbb839d2808f04fa/_library.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
12,
2890,
16,
1516,
4672,
3536,
3288,
1516,
18,
1220,
14119,
279,
296,
14923,
11,
4277,
12123,
309,
486,
1516,
30,
327,
1172,
67,
72,
2932,
18939,
738,
72,
1516,
1199,
738,
562,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
12,
2890,
16,
1516,
4672,
3536,
3288,
1516,
18,
1220,
14119,
279,
296,
14923,
11,
4277,
12123,
309,
486,
1516,
30,
327,
1172,
67,
72,
2932,
18939,
738,
72,
1516,
1199,
738,
562,
... |
def recursiveImport(modulename, baseDir=None): | def recursiveImport(modulename, baseDir=None, noCWD=0): | def recursiveImport(modulename, baseDir=None): """Dynamically imports possible packagized module, or raises ImportError""" import imp parts = string.split(modulename, '.') part = parts[0] path = list(baseDir and (type(baseDir) not in SeqTypes and [baseDir] or filter(None,baseDir)) or None) if '.' not in path: path.insert(0,'.') #make import errors a bit more informative try: (file, pathname, description) = imp.find_module(part, path) childModule = parentModule = imp.load_module(part, file, pathname, description) for name in parts[1:]: (file, pathname, description) = imp.find_module(name, parentModule.__path__) childModule = imp.load_module(name, file, pathname, description) setattr(parentModule, name, childModule) parentModule = childModule except ImportError: msg = "cannot import '%s' while attempting recursive import of '%s'" % (part, modulename) if baseDir: msg = msg + " under paths '%s'" % `path` raise ImportError, msg return childModule | f0f6a55bf072756e72e64c68b21801f403e5f233 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/f0f6a55bf072756e72e64c68b21801f403e5f233/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5904,
5010,
12,
1711,
332,
1069,
16,
14078,
33,
7036,
16,
1158,
12844,
40,
33,
20,
4672,
3536,
9791,
1230,
10095,
3323,
2298,
346,
1235,
1605,
16,
578,
14183,
11308,
8395,
1930,
1646,
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,
5904,
5010,
12,
1711,
332,
1069,
16,
14078,
33,
7036,
16,
1158,
12844,
40,
33,
20,
4672,
3536,
9791,
1230,
10095,
3323,
2298,
346,
1235,
1605,
16,
578,
14183,
11308,
8395,
1930,
1646,
21... |
"""Recieve notification that a connection had been established | """Receive notification that a connection had been established | def connected(connection): """Recieve notification that a connection had been established """ | 80ff7ba6ebed32a4a11af1cd8399e070416d398b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9502/80ff7ba6ebed32a4a11af1cd8399e070416d398b/interfaces.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5840,
12,
4071,
4672,
3536,
11323,
3851,
716,
279,
1459,
9323,
2118,
19703,
3536,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5840,
12,
4071,
4672,
3536,
11323,
3851,
716,
279,
1459,
9323,
2118,
19703,
3536,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
start += stop | start += step | def frange(start, stop, step): while start <= stop: yield start start += stop | c6d868e76ccc3e94a4b98dd2d0767c15acbcbae6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c6d868e76ccc3e94a4b98dd2d0767c15acbcbae6/test_colorsys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
3676,
12,
1937,
16,
2132,
16,
2235,
4672,
1323,
787,
1648,
2132,
30,
2824,
787,
787,
1011,
2235,
225,
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,
284,
3676,
12,
1937,
16,
2132,
16,
2235,
4672,
1323,
787,
1648,
2132,
30,
2824,
787,
787,
1011,
2235,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
newfilename, error) | newfilename, e) | def moveToMoviesDirectory(self): """Move our downloaded file from the Incomplete Downloads directoy to the movies directory. """ | 81b61165b84e3e0c79cb93f02f5a55a6527c2a8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/81b61165b84e3e0c79cb93f02f5a55a6527c2a8a/download.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13863,
16727,
29028,
2853,
12,
2890,
4672,
3536,
7607,
3134,
13549,
585,
628,
326,
657,
6226,
13059,
87,
2657,
13372,
358,
326,
7344,
29028,
1867,
18,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
13863,
16727,
29028,
2853,
12,
2890,
4672,
3536,
7607,
3134,
13549,
585,
628,
326,
657,
6226,
13059,
87,
2657,
13372,
358,
326,
7344,
29028,
1867,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.