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
yPos = addTocRow(i[0], i[1], yPos, body) rowCount = rowCount + 1 if rowCount > tocstyle.tocRows:
if rowCount == tocstyle.tocRows:
def addToc(tocList): rowCount = 0 yPos = 0 tocPageNum = 1 tocPageCount = 1 scribus.newPage(tocPageNum) isEvenPage = setOddEven(tocPageNum) body = buildTocPageFrames() # create frames for new empty page if isEvenPage == 0: scribus.setTextAlignment(2, body) else: scribus.setTextAlignment(0, body) for i in tocList: yPos = addTocRow(i[0], i[1], yPos, body) rowCount = rowCount + 1 if rowCount > tocstyle.tocRows: # Need to build a new TOC page (started from zero, not one) tocPageNum = tocPageNum + 1 scribus.newPage(tocPageNum) isEvenPage = setOddEven(tocPageNum) body = buildTocPageFrames() if isEvenPage == 0: scribus.setTextAlignment(2, body) else: scribus.setTextAlignment(0, body) rowCount = 0 yPos = 0 tocPageCount = tocPageCount + 1 if app.wantDoubleSided.get() == 1: if tocPageCount % 2 != 0: # Odd page tocPageNum = tocPageNum + 1 scribus.newPage(tocPageNum) # Add an extra page if odd number
790a99f879b635f2b3b5552597409fb837e11aa1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3910/790a99f879b635f2b3b5552597409fb837e11aa1/FontSample.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 56, 504, 12, 1391, 682, 4672, 14888, 273, 374, 677, 1616, 273, 374, 17919, 1964, 2578, 273, 404, 17919, 1964, 1380, 273, 404, 225, 888, 1533, 407, 18, 2704, 1964, 12, 1391, 1964, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 56, 504, 12, 1391, 682, 4672, 14888, 273, 374, 677, 1616, 273, 374, 17919, 1964, 2578, 273, 404, 17919, 1964, 1380, 273, 404, 225, 888, 1533, 407, 18, 2704, 1964, 12, 1391, 1964, ...
print "FAIL"
print "FAIL"; failures = failures + 1
def __eq__(self, other): if isinstance(other, FooStruct): return self.bar == other.bar return 0
14105f5c7b7349c63655b5a3c3785fe12d84aa68 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11935/14105f5c7b7349c63655b5a3c3785fe12d84aa68/memcache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 11253, 972, 12, 2890, 16, 1308, 4672, 309, 1549, 12, 3011, 16, 23077, 3823, 4672, 327, 365, 18, 3215, 422, 1308, 18, 3215, 327, 374, 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, 1001, 11253, 972, 12, 2890, 16, 1308, 4672, 309, 1549, 12, 3011, 16, 23077, 3823, 4672, 327, 365, 18, 3215, 422, 1308, 18, 3215, 327, 374, 2, -100, -100, -100, -100, -100, -100, -100, ...
urls = 'dashboard_app.test_urls'
def test_test_result__unknown(self): obj = TestResult(result=TestResult.RESULT_UNKNOWN, id=1) self.assertEqual(unicode(obj), "#1 unknown")
2b83bb1076913ab164d9a60de7990ee0053066ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7382/2b83bb1076913ab164d9a60de7990ee0053066ed/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3813, 67, 2088, 972, 8172, 12, 2890, 4672, 1081, 273, 7766, 1253, 12, 2088, 33, 4709, 1253, 18, 12289, 67, 14737, 16, 612, 33, 21, 13, 365, 18, 11231, 5812, 12, 9124, 12, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3813, 67, 2088, 972, 8172, 12, 2890, 4672, 1081, 273, 7766, 1253, 12, 2088, 33, 4709, 1253, 18, 12289, 67, 14737, 16, 612, 33, 21, 13, 365, 18, 11231, 5812, 12, 9124, 12, 2...
if isinstance(e, self.dbapi.OperationalError): return 'Unable to complete network request to host' in str(e) elif isinstance(e, self.dbapi.ProgrammingError):
if isinstance(e, (self.dbapi.OperationalError, self.dbapi.ProgrammingError)):
def is_disconnect(self, e): if isinstance(e, self.dbapi.OperationalError): return 'Unable to complete network request to host' in str(e) elif isinstance(e, self.dbapi.ProgrammingError): msg = str(e) return ('Invalid connection state' in msg or 'Invalid cursor state' in msg) else: return False
535a4a77bf2415a292a6aa818df7bb3958569f67 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1074/535a4a77bf2415a292a6aa818df7bb3958569f67/kinterbasdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 20177, 12, 2890, 16, 425, 4672, 309, 1549, 12, 73, 16, 261, 2890, 18, 1966, 2425, 18, 2988, 287, 668, 16, 365, 18, 1966, 2425, 18, 9459, 11987, 668, 3719, 30, 1234, 273, 609...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 20177, 12, 2890, 16, 425, 4672, 309, 1549, 12, 73, 16, 261, 2890, 18, 1966, 2425, 18, 2988, 287, 668, 16, 365, 18, 1966, 2425, 18, 9459, 11987, 668, 3719, 30, 1234, 273, 609...
if self.closed: raise ValueError, "I/O operation on closed file"
_complain_ifclosed(self.closed)
def write(self, s): if self.closed: raise ValueError, "I/O operation on closed file" if not s: return # Force s to be a string or unicode if not isinstance(s, basestring): s = str(s) if self.pos == self.len: self.buflist.append(s) self.len = self.pos = self.pos + len(s) return if self.pos > self.len: self.buflist.append('\0'*(self.pos - self.len)) self.len = self.pos newpos = self.pos + len(s) if self.pos < self.len: if self.buflist: self.buf += ''.join(self.buflist) self.buflist = [] self.buflist = [self.buf[:self.pos], s, self.buf[newpos:]] self.buf = '' if newpos > self.len: self.len = newpos else: self.buflist.append(s) self.len = newpos self.pos = newpos
6542690b4188f7f53b198ea23efc9b5bbea194dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6542690b4188f7f53b198ea23efc9b5bbea194dc/StringIO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 272, 4672, 389, 832, 7446, 67, 430, 12204, 12, 2890, 18, 12204, 13, 309, 486, 272, 30, 327, 468, 11889, 272, 358, 506, 279, 533, 578, 5252, 309, 486, 1549, 12, 87...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 272, 4672, 389, 832, 7446, 67, 430, 12204, 12, 2890, 18, 12204, 13, 309, 486, 272, 30, 327, 468, 11889, 272, 358, 506, 279, 533, 578, 5252, 309, 486, 1549, 12, 87...
message = self.socket.recv(msglen)
if msglen: message = self.socket.recv(msglen) else: message = ""
def read_response_noraise(self): try: reply = self.socket.recv(3) code = ord(reply[0]) msglen = ord(reply[1])*256 + ord(reply[2]) message = self.socket.recv(msglen) except: return (econn, 'Server aborted the connection') return (code, message)
aec86c6eafe725401247d860757a25279d993c2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14066/aec86c6eafe725401247d860757a25279d993c2d/daemon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2740, 67, 82, 10610, 784, 12, 2890, 4672, 775, 30, 4332, 273, 365, 18, 7814, 18, 18334, 12, 23, 13, 981, 273, 4642, 12, 10629, 63, 20, 5717, 1234, 1897, 273, 4642, 12, 10629...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2740, 67, 82, 10610, 784, 12, 2890, 4672, 775, 30, 4332, 273, 365, 18, 7814, 18, 18334, 12, 23, 13, 981, 273, 4642, 12, 10629, 63, 20, 5717, 1234, 1897, 273, 4642, 12, 10629...
'''Called when a link is clicked. Override to use, return true if click is swallowed '''
"""Called when a link is clicked. Override to use, return true if click is swallowed """
def BrowseClick(self, word, line, lineNo, start, style): '''Called when a link is clicked. Override to use, return true if click is swallowed ''' return false
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 605, 12481, 6563, 12, 2890, 16, 2076, 16, 980, 16, 980, 2279, 16, 787, 16, 2154, 4672, 3536, 8185, 1347, 279, 1692, 353, 17688, 18, 1439, 358, 999, 16, 327, 638, 309, 4682, 353, 1352, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 605, 12481, 6563, 12, 2890, 16, 2076, 16, 980, 16, 980, 2279, 16, 787, 16, 2154, 4672, 3536, 8185, 1347, 279, 1692, 353, 17688, 18, 1439, 358, 999, 16, 327, 638, 309, 4682, 353, 1352, ...
pattern = self.patterns.interpreted_or_phrase_ref
end_pattern = self.patterns.interpreted_or_phrase_ref
def interpreted_or_phrase_ref(self, match, lineno): pattern = self.patterns.interpreted_or_phrase_ref string = match.string matchstart = match.start('backquote') matchend = match.end('backquote') rolestart = match.start('role') role = match.group('role') position = '' if role: role = role[1:-1] position = 'prefix' elif self.quoted_start(match): return (string[:matchend], [], string[matchend:], []) endmatch = pattern.search(string[matchend:]) if endmatch and endmatch.start(1): # 1 or more chars escaped = endmatch.string[:endmatch.start(1)] text = unescape(escaped, 0) rawsource = unescape( string[match.start():matchend+endmatch.end()], 1) if rawsource[-1:] == '_': if role: msg = self.reporter.warning( 'Mismatch: inline interpreted text start-string and' ' role with phrase-reference end-string at line %s.' % lineno) text = unescape(string[matchstart:matchend], 1) rawsource = unescape(string[matchstart:matchend], 1) prb = self.problematic(text, rawsource, msg) return (string[:matchstart], [prb], string[matchend:], [msg]) return self.phrase_ref( string[:matchstart], string[matchend:][endmatch.end():], text, rawsource) else: return self.interpreted( string[:rolestart], string[matchend:][endmatch.end():], endmatch, role, position, lineno, escaped, rawsource, text) msg = self.reporter.warning( 'Inline interpreted text or phrase reference start-string ' 'without end-string at line %s.' % lineno) text = unescape(string[matchstart:matchend], 1) rawsource = unescape(string[matchstart:matchend], 1) prb = self.problematic(text, rawsource, msg) return string[:matchstart], [prb], string[matchend:], [msg]
018a79821ccb1056404d43dbe32e444d1a0e03c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/018a79821ccb1056404d43dbe32e444d1a0e03c1/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19898, 67, 280, 67, 9429, 67, 1734, 12, 2890, 16, 845, 16, 7586, 4672, 679, 67, 4951, 273, 365, 18, 13317, 18, 24713, 329, 67, 280, 67, 9429, 67, 1734, 533, 273, 845, 18, 1080, 845, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19898, 67, 280, 67, 9429, 67, 1734, 12, 2890, 16, 845, 16, 7586, 4672, 679, 67, 4951, 273, 365, 18, 13317, 18, 24713, 329, 67, 280, 67, 9429, 67, 1734, 533, 273, 845, 18, 1080, 845, ...
events = kq.control(None, 4, 1)
time.sleep(1.0) else: self.fail('timeout waiting for event notifications')
def test_queue_event(self): serverSocket = socket.socket() serverSocket.bind(('127.0.0.1', 0)) serverSocket.listen(1) client = socket.socket() client.setblocking(False) try: client.connect(('127.0.0.1', serverSocket.getsockname()[1])) except socket.error, e: self.assertEquals(e.args[0], errno.EINPROGRESS) else: #raise AssertionError("Connect should have raised EINPROGRESS") pass # FreeBSD doesn't raise an exception here server, addr = serverSocket.accept()
197d1617a5761be094bec9f8bbe12bff2bd7c829 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/197d1617a5761be094bec9f8bbe12bff2bd7c829/test_kqueue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4000, 67, 2575, 12, 2890, 4672, 1438, 4534, 273, 2987, 18, 7814, 1435, 1438, 4534, 18, 4376, 12, 2668, 14260, 18, 20, 18, 20, 18, 21, 2187, 374, 3719, 1438, 4534, 18, 18085, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4000, 67, 2575, 12, 2890, 4672, 1438, 4534, 273, 2987, 18, 7814, 1435, 1438, 4534, 18, 4376, 12, 2668, 14260, 18, 20, 18, 20, 18, 21, 2187, 374, 3719, 1438, 4534, 18, 18085, ...
print("Candidates: %s" % revlist[good:bad])
print('Candidates: %s' % revlist[good:bad])
def main(): usage = ('%prog [options] [-- chromium-options]\n' 'Perform binary search on the snapshot builds.') parser = optparse.OptionParser(usage=usage) # Strangely, the default help output doesn't include the choice list. choices = ['mac', 'xp', 'linux', 'linux-64'] parser.add_option('-a', '--archive', choices = choices, help = 'The buildbot archive to bisect [%s].' % '|'.join(choices)) parser.add_option('-b', '--bad', type = 'int', help = 'The bad revision to bisect to.') parser.add_option('-g', '--good', type = 'int', help = 'The last known good revision to bisect from.') parser.add_option('-p', '--profile', '--user-data-dir', type = 'str', help = 'Profile to use; this will not reset every run. ' + 'Defaults to a clean profile.') (opts, args) = parser.parse_args() if opts.archive is None: parser.print_help() return 1 if opts.bad and opts.good and (opts.good > opts.bad): print ('The good revision (%d) must precede the bad revision (%d).\n' % (opts.good, opts.bad)) parser.print_help() return 1 SetArchiveVars(opts.archive) # Pick a starting point, try to get HEAD for this. if opts.bad: bad_rev = opts.bad else: bad_rev = 0 try: # Location of the latest build revision number BUILD_LATEST_URL = "%s/LATEST" % (BUILD_BASE_URL) nh = urllib.urlopen(BUILD_LATEST_URL) latest = int(nh.read()) nh.close() bad_rev = raw_input("Bad revision [HEAD:%d]: " % latest) if (bad_rev == ""): bad_rev = latest bad_rev = int(bad_rev) except Exception, e: print("Could not determine latest revision. This could be bad...") bad_rev = int(raw_input("Bad revision: ")) # Find out when we were good. if opts.good: good_rev = opts.good else: good_rev = 0 try: good_rev = int(raw_input("Last known good [0]: ")) except Exception, e: pass # Get a list of revisions to bisect across. revlist = GetRevList(good_rev, bad_rev) if len(revlist) < 2: # Don't have enough builds to bisect print "We don't have enough builds to bisect. revlist: %s" % revlist sys.exit(1) # If we don't have a |good_rev|, set it to be the first revision possible. if good_rev == 0: good_rev = revlist[0] # These are indexes of |revlist|. good = 0 bad = len(revlist) - 1 last_known_good_rev = revlist[good] # Binary search time! while good < bad: candidates = revlist[good:bad] num_poss = len(candidates) if num_poss > 10: print("%d candidates. %d tries left." % (num_poss, round(math.log(num_poss, 2)))) else: print("Candidates: %s" % revlist[good:bad]) # Cut the problem in half... test = int((bad - good) / 2) + good test_rev = revlist[test] # Let the user give this rev a spin (in her own profile, if she wants). profile = opts.profile if not profile: profile = 'profile' # In a temp dir. TryRevision(test_rev, profile, args) if AskIsGoodBuild(test_rev): last_known_good_rev = revlist[good] good = test + 1 else: bad = test # We're done. Let the user know the results in an official manner. print("You are probably looking for build %d." % revlist[bad]) print("CHANGELOG URL:") print(CHANGELOG_URL % (last_known_good_rev, revlist[bad])) print("Built at revision:") print(BUILD_VIEWVC_URL % revlist[bad])
bd8dcb92e8921af7f33bb5d675d9439c018cc819 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/bd8dcb92e8921af7f33bb5d675d9439c018cc819/build-bisect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 4084, 273, 7707, 9, 14654, 306, 2116, 65, 306, 413, 8123, 5077, 17, 2116, 13944, 82, 11, 296, 4990, 3112, 1623, 603, 326, 4439, 10736, 1093, 13, 2082, 273, 2153, 2670, 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, 2774, 13332, 4084, 273, 7707, 9, 14654, 306, 2116, 65, 306, 413, 8123, 5077, 17, 2116, 13944, 82, 11, 296, 4990, 3112, 1623, 603, 326, 4439, 10736, 1093, 13, 2082, 273, 2153, 2670, 18, ...
return('[KeyName:' + event.Key + ']')
return(npchrstr)
def ParseEventValue(self, event): '''Pass the event ascii value through the requisite filters. Returns the result as a string. ''' if chr(event.Ascii) == self.settings['General']['Log File Field Separator']: return('[sep_key]') #translate backspace into text string, if option is set. if event.Ascii == 8 and self.settings['General']['Parse Backspace'] == True: return('[KeyName:' + event.Key + ']') #translate escape into text string, if option is set. if event.Ascii == 27 and self.settings['General']['Parse Escape'] == True: return('[KeyName:' + event.Key + ']')
01e0c0cca2f42daf828fcd59e2a6d786e413242d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3638/01e0c0cca2f42daf828fcd59e2a6d786e413242d/logwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 1133, 620, 12, 2890, 16, 871, 4672, 9163, 6433, 326, 871, 11384, 460, 3059, 326, 10780, 291, 1137, 3415, 18, 2860, 326, 563, 487, 279, 533, 18, 9163, 309, 4513, 12, 2575, 18, 213...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 1133, 620, 12, 2890, 16, 871, 4672, 9163, 6433, 326, 871, 11384, 460, 3059, 326, 10780, 291, 1137, 3415, 18, 2860, 326, 563, 487, 279, 533, 18, 9163, 309, 4513, 12, 2575, 18, 213...
(Finite subgroup with invariants [5, 10] over QQbar of Abelian variety factor of dimension 3 of J0(67), Abelian variety factor of dimension 2 of J0(67))
(Finite subgroup with invariants [5, 10] over QQbar of Abelian subvariety of dimension 3 of J0(67), Abelian subvariety of dimension 2 of J0(67))
def intersection(self, other): """ Returns the intersection of self and other inside a common ambient Jacobian product.
f30f87afcce1c095974cd5259aa7272b60928586 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/f30f87afcce1c095974cd5259aa7272b60928586/abvar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7619, 12, 2890, 16, 1308, 4672, 3536, 2860, 326, 7619, 434, 365, 471, 1308, 4832, 279, 2975, 13232, 1979, 804, 1077, 26968, 3017, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 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, 7619, 12, 2890, 16, 1308, 4672, 3536, 2860, 326, 7619, 434, 365, 471, 1308, 4832, 279, 2975, 13232, 1979, 804, 1077, 26968, 3017, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
proxy_url = Uri.parse_uri(proxy) if not proxy_url.port:
proxy_uri = Uri.parse_uri(proxy) if not proxy_uri.port:
def _get_connection(self, uri, headers=None): # Check to see if there are proxy settings required for this request. proxy = None if uri.scheme == 'https': proxy = os.environ.get('https_proxy') elif uri.scheme == 'http': proxy = os.environ.get('http_proxy') if not proxy: return HttpClient._get_connection(self, uri, headers=headers) # Now we have the URL of the appropriate proxy server. # Get a username and password for the proxy if required. proxy_auth = _get_proxy_auth() if uri.scheme == 'https': import socket if proxy_auth: proxy_auth = 'Proxy-authorization: %s' % proxy_auth # Construct the proxy connect command. port = uri.port if not port: port = 443 proxy_connect = 'CONNECT %s:%s HTTP/1.0\r\n' % (uri.host, port) # Set the user agent to send to the proxy user_agent = '' if headers and 'User-Agent' in headers: user_agent = 'User-Agent: %s\r\n' % (headers['User-Agent']) proxy_pieces = '%s%s%s\r\n' % (proxy_connect, proxy_auth, user_agent) # Find the proxy host and port. proxy_uri = Uri.parse_uri(proxy) if not proxy_uri.port: proxy_uri.port = '80' # Connect to the proxy server, very simple recv and error checking p_sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM) p_sock.connect((proxy_url.host, int(proxy_url.port))) p_sock.sendall(proxy_pieces) response = '' # Wait for the full response. while response.find("\r\n\r\n") == -1: response += p_sock.recv(8192) p_status = response.split()[1] if p_status != str(200): raise ProxyError('Error status=%s' % str(p_status)) # Trivial setup for ssl socket. ssl = socket.ssl(p_sock, None, None) fake_sock = httplib.FakeSocket(p_sock, ssl) # Initalize httplib and replace with the proxy socket. connection = httplib.HTTPConnection(proxy_url.host) connection.sock=fake_sock return connection elif uri.scheme == 'http': proxy_url = Uri.parse_uri(proxy) if not proxy_url.port: proxy_uri.port = '80' if proxy_auth: headers['Proxy-Authorization'] = proxy_auth.strip() return httplib.HTTPConnection(proxy_uri.host, int(proxy_uri.port)) return None
6567eeb64a0babc777a059943d1d32ae30a2f405 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5609/6567eeb64a0babc777a059943d1d32ae30a2f405/http_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4071, 12, 2890, 16, 2003, 16, 1607, 33, 7036, 4672, 468, 2073, 358, 2621, 309, 1915, 854, 2889, 1947, 1931, 364, 333, 590, 18, 2889, 273, 599, 309, 2003, 18, 9068, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4071, 12, 2890, 16, 2003, 16, 1607, 33, 7036, 4672, 468, 2073, 358, 2621, 309, 1915, 854, 2889, 1947, 1931, 364, 333, 590, 18, 2889, 273, 599, 309, 2003, 18, 9068, 422, ...
'pageStart':(page-1)*5,
'pageStart':(page-1)*25,
def browse(request): #saving globals as locals for speed lhex = hex lint = int # get search from session search = request.session['search'] #generate iValues start = 0 - (search.segmentLength-1) / 2 stop = lint(math.ceil((search.segmentLength-1) / 2.0))+1 iIndex = lint(math.ceil(searchSettings.segmentSize/2.0)-1) #paginate segments = search.querySet().order_by('protein') paginator = Paginator(segments, 25) # Show 25 segments per page # Make sure page request is an int. If not, deliver first page. try: page = lint(request.GET.get('page', '1')) except ValueError: page = 1 # If page request (9999) is out of range, deliver last page of results. try: paginatedSegments = paginator.page(page) except (EmptyPage, InvalidPage): page = paginator.num_pages paginatedSegments = paginator.page(page) #generate a list of pages to display in the pagination bar pages = get_page_list(paginator, page) # use ranges for RGB to introduce colorful steps colors = [] colorstop=searchSettings.segmentSize/2 rRange = (75,245); gRange = (180,245); bRange = (240,245); rInterval = round((rRange[1]-rRange[0])/colorstop) gInterval = round((gRange[1]-gRange[0])/colorstop) bInterval = round((bRange[1]-bRange[0])/colorstop) for i in range(colorstop-stop+1, colorstop+1): red = '%s' % lhex(lint(i*rInterval+rRange[0]))[2:] if i*rInterval+rRange[0] > 9 else '%02d' % lint(lhex(lint(i*rInterval+rRange[0]))[2:]) green = '%s' % lhex(lint(i*gInterval+gRange[0]))[2:] if i*gInterval+gRange[0] > 9 else '%02d' % lint(lhex(lint(i*gInterval+gRange[0]))[2:]) blue = '%s' % lhex(lint(i*bInterval+bRange[0]))[2:] if i*bInterval+bRange[0] > 9 else '%02d' % lint(lhex(lint(i*bInterval+bRange[0]))[2:]) colors.append((red,green,blue)) return render_to_response('browse.html', { 'segments': paginatedSegments, 'segmentSlice':'%i:%i'%(iIndex+start,iIndex+stop), 'iIndex':iIndex, 'pageStart':(page-1)*5, 'indexColors':colors, 'pages':pages, 'segmentLength':search.segmentLength }, context_instance=RequestContext(request))
ef7f0182fd46746319102afcaf6a32192f3b7c91 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6163/ef7f0182fd46746319102afcaf6a32192f3b7c91/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 12, 2293, 4672, 468, 87, 5339, 10941, 487, 8985, 364, 8632, 328, 7118, 273, 3827, 19477, 273, 509, 225, 468, 336, 1623, 628, 1339, 1623, 273, 590, 18, 3184, 3292, 3072, 3546, 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, 21670, 12, 2293, 4672, 468, 87, 5339, 10941, 487, 8985, 364, 8632, 328, 7118, 273, 3827, 19477, 273, 509, 225, 468, 336, 1623, 628, 1339, 1623, 273, 590, 18, 3184, 3292, 3072, 3546, 225,...
pressedBitmap = wx.GetApp().GetImage(name + "md.png")
pressedBitmap = wx.GetApp().GetImage(name + "MouseDown.png")
def __init__(self, parent, name): """
d538f66797bdfbf7bdd94c3e51298810f14648dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d538f66797bdfbf7bdd94c3e51298810f14648dc/CollectionCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 508, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 508, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.wfile.write('ERR -1 unknown command. Use CONVERT_HTML, '
self.wfile.write('ERR 550 unknown command. Use CONVERT_HTML, '
def handle(self): """The protocol:
1a05a1b9f78a5aa3d8397c7ea22705164c4038f6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9481/1a05a1b9f78a5aa3d8397c7ea22705164c4038f6/pyunoserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 4672, 3536, 1986, 1771, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1640, 12, 2890, 4672, 3536, 1986, 1771, 30, 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...
_py_ext = [triple[0] for triple in imp.get_suffixes() if triple[2] == imp.PY_SOURCE][0]
_py_ext = [triple[0] for triple in imp.get_suffixes() if triple[2] == imp.PY_SOURCE][0]
def _visit_pyfiles(list, dirname, names): """ Helper for getFilesForName(). """ # get extension for python source files if not globals().has_key('_py_ext'): import imp global _py_ext _py_ext = [triple[0] for triple in imp.get_suffixes() if triple[2] == imp.PY_SOURCE][0] # don't recurse into CVS directories if 'CVS' in names: names.remove('CVS') # add all *.py files to list list.extend( [os.path.join(dirname, file) for file in names if os.path.splitext(file)[1] == _py_ext])
e04ee70a68045f8d229ab59ad9b0256d0278c745 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e04ee70a68045f8d229ab59ad9b0256d0278c745/pygettext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11658, 67, 2074, 2354, 12, 1098, 16, 4283, 16, 1257, 4672, 3536, 9705, 364, 18262, 1290, 461, 7675, 3536, 468, 336, 2710, 364, 5790, 1084, 1390, 309, 486, 10941, 7675, 5332, 67, 856...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11658, 67, 2074, 2354, 12, 1098, 16, 4283, 16, 1257, 4672, 3536, 9705, 364, 18262, 1290, 461, 7675, 3536, 468, 336, 2710, 364, 5790, 1084, 1390, 309, 486, 10941, 7675, 5332, 67, 856...
pickle.dump(session, f)
cPickle.dump(session, f)
def usage(): print "Usage: scapy.py [-s sessionfile]" sys.exit(0)
cd0da83d8842c2084edc7bdc6d54eb7b4107601d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/cd0da83d8842c2084edc7bdc6d54eb7b4107601d/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 315, 5357, 30, 888, 438, 93, 18, 2074, 23059, 87, 1339, 768, 4279, 2589, 18, 8593, 12, 20, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 315, 5357, 30, 888, 438, 93, 18, 2074, 23059, 87, 1339, 768, 4279, 2589, 18, 8593, 12, 20, 13, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
keys = Set(values.keys())
keys = set(values.keys())
def ParseEDSFile(filepath): eds_dict = {} # Read file text eds_file = open(filepath,'r').read() sections = ExtractSections(eds_file) # Parse assignments for each section for section_name, assignments in sections: # Reset values of entry values = {} # Search if the section name match an index or subindex expression index_result = index_model.match(section_name.upper()) subindex_result = subindex_model.match(section_name.upper()) index_objectlinks_result = index_objectlinks_model.match(section_name.upper()) # Compilation of the EDS information dictionary is_entry = False # First case, section name is in SECTION_KEYNAMES if section_name.upper() in SECTION_KEYNAMES: # Verify that entry is not already defined if section_name.upper() not in eds_dict: eds_dict[section_name.upper()] = values else: raise SyntaxError, "\"[%s]\" section is defined two times"%section_name # Second case, section name is an index name elif index_result: # Extract index number index = int(index_result.groups()[0], 16) # If index hasn't been referenced before, we add an entry into the dictionary if index not in eds_dict: eds_dict[index] = values eds_dict[index]["subindexes"] = {} elif eds_dict[index].keys() == ["subindexes"]: values["subindexes"] = eds_dict[index]["subindexes"] eds_dict[index] = values else: raise SyntaxError, "\"[%s]\" section is defined two times"%section_name is_entry = True # Third case, section name is a subindex name elif subindex_result: # Extract index and subindex number index, subindex = [int(value, 16) for value in subindex_result.groups()] # If index hasn't been referenced before, we add an entry into the dictionary # that will be updated later if index not in eds_dict: eds_dict[index] = {"subindexes" : {}} if subindex not in eds_dict[index]["subindexes"]: eds_dict[index]["subindexes"][subindex] = values else: raise SyntaxError, "\"[%s]\" section is defined two times"%section_name is_entry = True # Third case, section name is a subindex name elif index_objectlinks_result: pass # In any other case, there is a syntax problem into EDS file else: raise SyntaxError, "Section \"[%s]\" is unrecognized"%section_name for assignment in assignments: # Escape any comment if assignment.startswith(";"): pass # Verify that line is a valid assignment elif assignment.find('=') > 0: # Split assignment into the two values keyname and value keyname, value = assignment.split("=", 1) # keyname must be immediately followed by the "=" sign, so we # verify that there is no whitespace into keyname if keyname.isalnum(): # value can be preceded and followed by whitespaces, so we escape them value = value.strip() # First case, value starts with "$NODEID", then it's a formula if value.upper().startswith("$NODEID"): try: test = int(value.upper().replace("$NODEID+", ""), 16) computed_value = "\"%s\""%value except: raise SyntaxError, "\"%s\" is not a valid formula for attribute \"%s\" of section \"[%s]\""%(value, keyname, section_name) # Second case, value starts with "0x", then it's an hexadecimal value elif value.startswith("0x") or value.startswith("-0x"): try: computed_value = int(value, 16) except: raise SyntaxError, "\"%s\" is not a valid value for attribute \"%s\" of section \"[%s]\""%(value, keyname, section_name) elif value.isdigit() or value.startswith("-") and value[1:].isdigit(): # Third case, value is a number and starts with "0", then it's an octal value if value.startswith("0") or value.startswith("-0"): computed_value = int(value, 8) # Forth case, value is a number and don't start with "0", then it's a decimal value else: computed_value = int(value) # In any other case, we keep string value else: computed_value = value # Add value to values dictionary if computed_value != "": # If entry is an index or a subindex if is_entry: # Verify that keyname is a possible attribute if keyname.upper() not in ENTRY_ATTRIBUTES: raise SyntaxError, "Keyname \"%s\" not recognised for section \"[%s]\""%(keyname, section_name) # Verify that value is valid elif not ENTRY_ATTRIBUTES[keyname.upper()](computed_value): raise SyntaxError, "Invalid value \"%s\" for keyname \"%s\" of section \"[%s]\""%(value, keyname, section_name) else: values[keyname.upper()] = computed_value else: values[keyname.upper()] = computed_value # All lines that are not empty and are neither a comment neither not a valid assignment elif assignment.strip() != "": raise SyntaxError, "\"%s\" is not a valid EDS line"%assignment.strip() # If entry is an index or a subindex if is_entry: # Verify that entry has an ObjectType values["OBJECTTYPE"] = values.get("OBJECTTYPE", 7) # Extract parameters defined keys = Set(values.keys()) keys.discard("subindexes") # Extract possible parameters and parameters required possible = Set(ENTRY_TYPES[values["OBJECTTYPE"]]["require"] + ENTRY_TYPES[values["OBJECTTYPE"]]["optional"]) required = Set(ENTRY_TYPES[values["OBJECTTYPE"]]["require"]) # Verify that parameters defined contains all the parameters required if not keys.issuperset(required): missing = required.difference(keys)._data.keys() if len(missing) > 1: attributes = "Attributes %s are"%", ".join(["\"%s\""%attribute for attribute in missing]) else: attributes = "Attribute \"%s\" is"%missing[0] raise SyntaxError, "Error on section \"[%s]\":\n%s required for a%s entry"%(section_name, attributes, ENTRY_TYPES[values["OBJECTTYPE"]]["name"]) # Verify that parameters defined are all in the possible parameters if not keys.issubset(possible): unsupported = keys.difference(possible)._data.keys() if len(unsupported) > 1: attributes = "Attributes %s are"%", ".join(["\"%s\""%attribute for attribute in unsupported]) else: attributes = "Attribute \"%s\" is"%unsupported[0] raise SyntaxError, "Error on section \"[%s]\":\n%s unsupported for a%s entry"%(section_name, attributes, ENTRY_TYPES[values["OBJECTTYPE"]]["name"]) VerifyValue(values, section_name, "ParameterValue") VerifyValue(values, section_name, "DefaultValue") return eds_dict
56162b84b67d9ee4f8dd7e430cc40d3b75aa5880 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11017/56162b84b67d9ee4f8dd7e430cc40d3b75aa5880/eds_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 2056, 55, 812, 12, 10561, 4672, 1675, 87, 67, 1576, 273, 2618, 468, 2720, 585, 977, 1675, 87, 67, 768, 273, 1696, 12, 10561, 11189, 86, 16063, 896, 1435, 7178, 273, 8152, 15965, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 2056, 55, 812, 12, 10561, 4672, 1675, 87, 67, 1576, 273, 2618, 468, 2720, 585, 977, 1675, 87, 67, 768, 273, 1696, 12, 10561, 11189, 86, 16063, 896, 1435, 7178, 273, 8152, 15965, ...
"""Return a DOM representation of this Node.""" return self._dom_node(dom)
"""Return a DOM **fragment** representation of this Node.""" domroot = dom.Document() return self._dom_node(domroot)
def asdom(self, dom=xml.dom.minidom): """Return a DOM representation of this Node.""" return self._dom_node(dom)
183416f6087e556f5bf9bbf1bbda38d4f68a92cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/183416f6087e556f5bf9bbf1bbda38d4f68a92cc/nodes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 487, 9859, 12, 2890, 16, 4092, 33, 2902, 18, 9859, 18, 1154, 350, 362, 4672, 3536, 990, 279, 4703, 4335, 434, 333, 2029, 12123, 327, 365, 6315, 9859, 67, 2159, 12, 9859, 13, 2, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 487, 9859, 12, 2890, 16, 4092, 33, 2902, 18, 9859, 18, 1154, 350, 362, 4672, 3536, 990, 279, 4703, 4335, 434, 333, 2029, 12123, 327, 365, 6315, 9859, 67, 2159, 12, 9859, 13, 2, -100, ...
align_view=7,
align_view='7',
(def 9).
be16af044c84d140f0984e73ad722121058bc87f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/be16af044c84d140f0984e73ad722121058bc87f/SequenceSearcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 261, 536, 2468, 2934, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 261, 536, 2468, 2934, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
path = self._window.get_active_document().get_uri_for_display()
def on_view_populate_popup(self, view, menu): path = self._window.get_active_document().get_uri_for_display() separator = gtk.SeparatorMenuItem() menu.append(separator) separator.show() context_menu = GeditMainContextMenu(self, self.base_dir, [path]).get_menu() for context_menu_item in context_menu: menu.append(context_menu_item)
f536a3b3d5a07da5e3600d24ae1bb1ebfa1cbd71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/f536a3b3d5a07da5e3600d24ae1bb1ebfa1cbd71/rabbitvcs-plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 1945, 67, 19936, 67, 16086, 12, 2890, 16, 1476, 16, 3824, 4672, 4182, 273, 22718, 18, 6581, 12958, 1435, 3824, 18, 6923, 12, 11287, 13, 4182, 18, 4500, 1435, 225, 819, 67, 541...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 1945, 67, 19936, 67, 16086, 12, 2890, 16, 1476, 16, 3824, 4672, 4182, 273, 22718, 18, 6581, 12958, 1435, 3824, 18, 6923, 12, 11287, 13, 4182, 18, 4500, 1435, 225, 819, 67, 541...
class AbstractPatchLandingCommand(AbstractPatchProcessingCommand): def __init__(self, help_text, args_description): self._sequence = StepSequence([ CleanWorkingDirectoryStep, UpdateStep, ApplyPatchStep, EnsureBuildersAreGreenStep, BuildStep, RunTestsStep, CommitStep, ClosePatchStep, CloseBugStep, ]) AbstractPatchProcessingCommand.__init__(self, help_text, args_description, self._sequence.options()) def _prepare_to_process(self, options, args, tool): EnsureBuildersAreGreenStep(tool, options).run({}) def _process_patch(self, patch, options, args, tool): state = {"patch": patch} self._sequence.run_and_handle_errors(tool, options, state)
class AbstractPatchLandingCommand(AbstractPatchSequencingCommand): prepare_steps = [ EnsureBuildersAreGreenStep, ] main_steps = [ CleanWorkingDirectoryStep, UpdateStep, ApplyPatchStep, EnsureBuildersAreGreenStep, BuildStep, RunTestsStep, CommitStep, ClosePatchStep, CloseBugStep, ]
def _fetch_list_of_patches_to_process(self, options, args, tool): all_patches = [] for bug_id in args: patches = tool.bugs.fetch_reviewed_patches_from_bug(bug_id) log("%s found on bug %s." % (pluralize("reviewed patch", len(patches)), bug_id)) all_patches += patches return all_patches
740b86ff29d9244b9b7731cde818daa13c805df5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/740b86ff29d9244b9b7731cde818daa13c805df5/download.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5754, 67, 1098, 67, 792, 67, 30278, 67, 869, 67, 2567, 12, 2890, 16, 702, 16, 833, 16, 5226, 4672, 777, 67, 30278, 273, 5378, 364, 7934, 67, 350, 316, 833, 30, 16482, 273, 5226,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5754, 67, 1098, 67, 792, 67, 30278, 67, 869, 67, 2567, 12, 2890, 16, 702, 16, 833, 16, 5226, 4672, 777, 67, 30278, 273, 5378, 364, 7934, 67, 350, 316, 833, 30, 16482, 273, 5226,...
import traceback
def __init__(self, *args, **kw): super(CalendarEventMixin, self).__init__(*args, **kw) import traceback self.occurrenceFor = self if not kw.has_key('icalUID'): self.icalUID = unicode(self.itsUUID)
7fb917f7560d3e0ca7085b7c1f025ef2ba2d16a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/7fb917f7560d3e0ca7085b7c1f025ef2ba2d16a8/Calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 9987, 4672, 2240, 12, 7335, 1133, 14439, 16, 365, 2934, 972, 2738, 972, 30857, 1968, 16, 2826, 9987, 13, 365, 18, 31177, 1290, 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, 380, 1968, 16, 2826, 9987, 4672, 2240, 12, 7335, 1133, 14439, 16, 365, 2934, 972, 2738, 972, 30857, 1968, 16, 2826, 9987, 13, 365, 18, 31177, 1290, 273, ...
self.dbconnection = sqlmodule.connect self.usingUnicodeStrings = True if kw.get("ncli"): conn_str = "Provider=SQLNCLI;" else: conn_str = "Provider=SQLOLEDB;" conn_str += "Data Source=%s;Initial Catalog=%s;" if kw.get("sspi"): conn_str += "Integrated Security=SSPI;Persist Security Info=False" self.make_conn_str = lambda keys: [conn_str % (keys.host, keys.db)] else: conn_str += "User Id=%s;Password=%s" self.make_conn_str = lambda keys: [conn_str % (keys.host, keys.db, keys.user, keys.password)] col.popKey(kw, "sspi") col.popKey(kw, "ncli") except ImportError:
except ImportError:
def __init__(self, db, user, password='', host='localhost', autoCommit=0, **kw): global sqlmodule if not sqlmodule: try: import adodbapi as sqlmodule self.dbconnection = sqlmodule.connect # ADO uses unicode only (AFAIK) self.usingUnicodeStrings = True
6d2fe3ce0ccb18c001f426e5fe10c3fed722d5fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6718/6d2fe3ce0ccb18c001f426e5fe10c3fed722d5fd/mssqlconnection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1319, 16, 729, 16, 2201, 2218, 2187, 1479, 2218, 13014, 2187, 3656, 5580, 33, 20, 16, 2826, 9987, 4672, 2552, 1847, 2978, 309, 486, 1847, 2978, 30, 775, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1319, 16, 729, 16, 2201, 2218, 2187, 1479, 2218, 13014, 2187, 3656, 5580, 33, 20, 16, 2826, 9987, 4672, 2552, 1847, 2978, 309, 486, 1847, 2978, 30, 775, ...
self.daemon_logfile, self.daemon_pidfile, self.server_port))
_ShellSafe(self.daemon_logfile), _ShellSafe(self.daemon_pidfile), self.server_port))
def daemon_command(self): """Return command to start the daemon""" return (self.distccd() + "--verbose --lifetime=%d --daemon --log-file %s " "--pid-file %s --port %d --allow 127.0.0.1" % (self.daemon_lifetime(), self.daemon_logfile, self.daemon_pidfile, self.server_port))
fdaf4c739372bb2a573823fa0779dc82dc60ac67 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7392/fdaf4c739372bb2a573823fa0779dc82dc60ac67/testdistcc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8131, 67, 3076, 12, 2890, 4672, 3536, 990, 1296, 358, 787, 326, 8131, 8395, 327, 261, 2890, 18, 4413, 952, 72, 1435, 397, 5238, 11369, 1493, 17155, 5095, 72, 1493, 21511, 1493, 1330, 17,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8131, 67, 3076, 12, 2890, 4672, 3536, 990, 1296, 358, 787, 326, 8131, 8395, 327, 261, 2890, 18, 4413, 952, 72, 1435, 397, 5238, 11369, 1493, 17155, 5095, 72, 1493, 21511, 1493, 1330, 17,...
whenDone()
task.schedule(whenDone)
def __init__(self, host, port, protocol, timeout=None, connector=None): """Initialize the client, setting up its socket, and request to connect. """ if host == 'unix': # "port" in this case is really a filename try: mode = os.stat(port)[0] except OSError, ose: protocol.connectionFailed() # no such file or directory return if not (mode & (stat.S_IFSOCK | # that's not a socket stat.S_IROTH | # that's not readable stat.S_IWOTH )):# that's not writable protocol.connectionFailed() return # success. self.realAddress = self.addr = port # we are using unix sockets skt = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) whenDone = self.doConnect else: skt = self.createInternetSocket() self.addr = (host, port) whenDone = self.resolveAddress self.host = host self.port = port self.connector = connector Connection.__init__(self, skt, protocol) self.doWrite = self.doConnect self.doRead = self.doConnect self.logstr = self.protocol.__class__.__name__+",client" whenDone() if timeout is not None: main.addTimeout(self.failIfNotConnected, timeout)
9b7cdd01ca433fda99796fad2a9bef4907d56fcb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b7cdd01ca433fda99796fad2a9bef4907d56fcb/tcp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 16, 1756, 16, 1771, 16, 2021, 33, 7036, 16, 8703, 33, 7036, 4672, 3536, 7520, 326, 1004, 16, 3637, 731, 2097, 2987, 16, 471, 590, 358, 3077, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 16, 1756, 16, 1771, 16, 2021, 33, 7036, 16, 8703, 33, 7036, 4672, 3536, 7520, 326, 1004, 16, 3637, 731, 2097, 2987, 16, 471, 590, 358, 3077, 18, ...
includes = '
includes = '
def parse_isa_desc(isa_desc_file, output_dir, include_path): # set a global var for the input filename... used in error messages global input_filename input_filename = isa_desc_file global fileNameStack fileNameStack = [(input_filename, 1)] # Suck the ISA description file in. input = open(isa_desc_file) isa_desc = input.read() input.close() # Perform Preprocessing isa_desc = preprocess_isa_desc(isa_desc) # Parse it. (isa_name, namespace, global_code, namespace_code) = yacc.parse(isa_desc) # grab the last three path components of isa_desc_file to put in # the output filename = '/'.join(isa_desc_file.split('/')[-3:]) # generate decoder.hh includes = '#include "base/bitfield.hh" // for bitfield support' global_output = global_code.header_output namespace_output = namespace_code.header_output decode_function = '' update_if_needed(output_dir + '/decoder.hh', file_template % vars()) # generate decoder.cc includes = '#include "%s/decoder.hh"' % include_path global_output = global_code.decoder_output namespace_output = namespace_code.decoder_output # namespace_output += namespace_code.decode_block decode_function = namespace_code.decode_block update_if_needed(output_dir + '/decoder.cc', file_template % vars()) # generate per-cpu exec files for cpu in CpuModel.list: includes = '#include "%s/decoder.hh"\n' % include_path includes += cpu.includes global_output = global_code.exec_output[cpu.name] namespace_output = namespace_code.exec_output[cpu.name] decode_function = '' update_if_needed(output_dir + '/' + cpu.filename, file_template % vars())
99484cfae81f3f01ccdfcd273ddc2bdb41e6456b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6787/99484cfae81f3f01ccdfcd273ddc2bdb41e6456b/isa_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 291, 69, 67, 5569, 12, 291, 69, 67, 5569, 67, 768, 16, 876, 67, 1214, 16, 2341, 67, 803, 4672, 468, 444, 279, 2552, 569, 364, 326, 810, 1544, 2777, 1399, 316, 555, 2743, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 291, 69, 67, 5569, 12, 291, 69, 67, 5569, 67, 768, 16, 876, 67, 1214, 16, 2341, 67, 803, 4672, 468, 444, 279, 2552, 569, 364, 326, 810, 1544, 2777, 1399, 316, 555, 2743, ...
if out: print out
if stdout: print stdout if stderr: print >>sys.stderr, stderr
def work(): # A worker thread. try: while True: try: test, args_tuple = pending.popleft() except IndexError: output.put((None, None, None)) return if not quiet: print test sys.stdout.flush() # -E is needed by some tests, e.g. test_import popen = Popen([sys.executable, '-E', '-m', 'test.regrtest', '--slaveargs', json.dumps(args_tuple)], stdout=PIPE, stderr=STDOUT, universal_newlines=True, close_fds=True) out = popen.communicate()[0].strip() out = debug_output_pat.sub("", out) out, _, result = out.strip().rpartition("\n") result = json.loads(result) output.put((test, out.strip(), result)) except BaseException: output.put((None, None, None)) raise
0b02e9b20963e971a27586451a3eca5bdacf38dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/0b02e9b20963e971a27586451a3eca5bdacf38dc/regrtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 13332, 468, 432, 4322, 2650, 18, 775, 30, 1323, 1053, 30, 775, 30, 1842, 16, 833, 67, 8052, 273, 4634, 18, 5120, 4482, 1435, 1335, 10195, 30, 876, 18, 458, 12443, 7036, 16, 599, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 13332, 468, 432, 4322, 2650, 18, 775, 30, 1323, 1053, 30, 775, 30, 1842, 16, 833, 67, 8052, 273, 4634, 18, 5120, 4482, 1435, 1335, 10195, 30, 876, 18, 458, 12443, 7036, 16, 599, ...
options.append(("B", "Keyboard", "Keyboard configuration"))
options.append(("K", "Keyboard", "Keyboard configuration"))
def EnterEscapeMenu(self): options = [] options.append(("B", "Back", "Return to the game")) options.append(("B", "Keyboard", "Keyboard configuration")) options.append(("D", "Debug", "Debug options")) options.append(("Q", "Quit", "Disconnect from the game")) self.DisplayMenu(MODE_ESCAPE_MENU, options)
b9f8510f0c954283a39c38d5d9ec270a0b1354a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8026/b9f8510f0c954283a39c38d5d9ec270a0b1354a1/roguelike.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15439, 8448, 4599, 12, 2890, 4672, 702, 273, 5378, 702, 18, 6923, 12, 2932, 38, 3113, 315, 2711, 3113, 3639, 315, 990, 358, 326, 7920, 6, 3719, 702, 18, 6923, 12, 2932, 47, 3113, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15439, 8448, 4599, 12, 2890, 4672, 702, 273, 5378, 702, 18, 6923, 12, 2932, 38, 3113, 315, 2711, 3113, 3639, 315, 990, 358, 326, 7920, 6, 3719, 702, 18, 6923, 12, 2932, 47, 3113, 315, ...
f.write("UPDATEDEFAULT=no\n") f.write("\n") f.write(" f.write("DEFAULTKERNEL=%s\n" %(defkern,)) f.close() dosync()
partNum = None return (name, partNum) def getRootDevName(initrd, fsset, rootDev, instRoot): if not os.access(instRoot + initrd, os.R_OK): return "/dev/%s" % (rootDev,)
def rectifyLuksName(anaconda, name): if name is not None and name.startswith('mapper/luks-'): try: newname = anaconda.id.partitions.encryptedDevices.get(name[12:]) if newname is None: for luksdev in anaconda.id.partitions.encryptedDevices.values(): if os.path.basename(luksdev.getDevice(encrypted=1)) == name[12:]: newname = luksdev break name = newname.getDevice() except: pass return name
583246e158d09b4e23c27cb6c4ae52ba7fa7afdb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7066/583246e158d09b4e23c27cb6c4ae52ba7fa7afdb/bootloaderInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4917, 1164, 48, 89, 7904, 461, 12, 13848, 591, 2414, 16, 508, 4672, 309, 508, 353, 486, 599, 471, 508, 18, 17514, 1918, 2668, 13919, 19, 28832, 7904, 6627, 4672, 775, 30, 26722, 273, 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, 4917, 1164, 48, 89, 7904, 461, 12, 13848, 591, 2414, 16, 508, 4672, 309, 508, 353, 486, 599, 471, 508, 18, 17514, 1918, 2668, 13919, 19, 28832, 7904, 6627, 4672, 775, 30, 26722, 273, 3...
headers = {'content-type': "application/x-www-form-urlencoded"}
headers = {} if method == 'POST': headers['content-type'] = "application/x-www-form-urlencoded"
def __init__(self, fp=None, headers=None, outerboundary="", environ=os.environ, keep_blank_values=0, strict_parsing=0): """Constructor. Read multipart/* until last part.
70e2dac8ef474f7927b490d5fab69689b1319d4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/70e2dac8ef474f7927b490d5fab69689b1319d4b/cgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4253, 33, 7036, 16, 1607, 33, 7036, 16, 6390, 16604, 1546, 3113, 5473, 33, 538, 18, 28684, 16, 3455, 67, 12111, 67, 2372, 33, 20, 16, 5490, 67, 24979, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 4253, 33, 7036, 16, 1607, 33, 7036, 16, 6390, 16604, 1546, 3113, 5473, 33, 538, 18, 28684, 16, 3455, 67, 12111, 67, 2372, 33, 20, 16, 5490, 67, 24979, ...
print dictionary
def get(key, lang = None): if lang == None: lang = wikipedia.mylang try: # find out how old our saved dump is (in seconds) file_age = time.time() - os.path.getmtime('mediawiki-messages/mediawiki-messages-%s.dat' % lang) # if it's older than 1 month, reload it if file_age > 30 * 24 * 60 * 60: print 'Current MediaWiki message dump is one month old, reloading' refresh_messages(lang) except OSError: # no saved dumped exists yet refresh_messages(lang) # TODO: It's quite inefficient to reload the file every time this function # is used. Maybe we can save its content the first time the function is # called. f = open('mediawiki-messages/mediawiki-messages-%s.dat' % lang, 'r') dictionary = pickle.load(f) f.close() key = key[0].lower() + key[1:] print dictionary if dictionary.has_key(key): return dictionary[key] else: # TODO: Throw exception instead? print 'ERROR: MediaWiki Key %s not found' % key
3822eafa781b90c050589957c2f9ec2a7013e9f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/3822eafa781b90c050589957c2f9ec2a7013e9f1/mediawiki_messages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 856, 16, 3303, 273, 599, 4672, 309, 3303, 422, 599, 30, 3303, 273, 21137, 18, 4811, 4936, 775, 30, 468, 1104, 596, 3661, 1592, 3134, 5198, 4657, 353, 261, 267, 3974, 13, 585, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 856, 16, 3303, 273, 599, 4672, 309, 3303, 422, 599, 30, 3303, 273, 21137, 18, 4811, 4936, 775, 30, 468, 1104, 596, 3661, 1592, 3134, 5198, 4657, 353, 261, 267, 3974, 13, 585, ...
cr.execute('select "'+field._fields_id+'" from "'+field_obj._table+'" where id in ('+','.join(map(str,ids2))+')') ids3 = [x[0] for x in cr.fetchall()]
ids3 = [] for i in range((len(ids2) / ID_MAX) + (len(ids2) % ID_MAX)): sub_ids2 = ids2[ID_MAX * i:ID_MAX * (i + 1)] cr.execute('select "'+field._fields_id+'" ' \ 'from "'+field_obj._table+'" ' \ 'where id in ('+','.join(map(str,sub_ids2))+')') ids3.extend([x[0] for x in cr.fetchall()])
def _where_calc(self, cr, user, args, active_test=True, context=None): if not context: context={} args = args[:] # if the object has a field named 'active', filter out all inactive # records unless they were explicitely asked for if 'active' in self._columns and (active_test and context.get('active_test', True)): i = 0 active_found = False while i<len(args): if args[i][0]=='active': active_found = True i += 1 if not active_found: args.append(('active', '=', 1))
49d7cae04d7977f364f6f5de70e1e3d7090f240e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/49d7cae04d7977f364f6f5de70e1e3d7090f240e/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6051, 67, 12448, 12, 2890, 16, 4422, 16, 729, 16, 833, 16, 2695, 67, 3813, 33, 5510, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 12938, 833, 273, 833, 10531, 65, 468, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6051, 67, 12448, 12, 2890, 16, 4422, 16, 729, 16, 833, 16, 2695, 67, 3813, 33, 5510, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 12938, 833, 273, 833, 10531, 65, 468, 309, ...
sys.stderr.write(py_exc.msg)
sys.stderr.write(py_exc.msg + '\n')
def compile(file, cfile=None, dfile=None, doraise=False): """Byte-compile one Python source file to Python bytecode. Arguments: file: source filename cfile: target filename; defaults to source with 'c' or 'o' appended ('c' normally, 'o' in optimizing mode, giving .pyc or .pyo) dfile: purported filename; defaults to source (this is the filename that will show up in error messages) doraise: flag indicating whether or not an exception should be raised when a compile error is found. If an exception occurs and this flag is set to False, a string indicating the nature of the exception will be printed, and the function will return to the caller. If an exception occurs and this flag is set to True, a PyCompileError exception will be raised. Note that it isn't necessary to byte-compile Python modules for execution efficiency -- Python itself byte-compiles a module when it is loaded, and if it can, writes out the bytecode to the corresponding .pyc (or .pyo) file. However, if a Python installation is shared between users, it is a good idea to byte-compile all modules upon installation, since other users may not be able to write in the source directories, and thus they won't be able to write the .pyc/.pyo file, and then they would be byte-compiling every module each time it is loaded. This can slow down program start-up considerably. See compileall.py for a script/module that uses this module to byte-compile all installed files (or all files in selected directories). """ f = open(file, 'U') try: timestamp = long(os.fstat(f.fileno()).st_mtime) except AttributeError: timestamp = long(os.stat(file).st_mtime) codestring = f.read() f.close() if codestring and codestring[-1] != '\n': codestring = codestring + '\n' try: codeobject = __builtin__.compile(codestring, dfile or file,'exec') except Exception,err: py_exc = PyCompileError(err.__class__,err.args,dfile or file) if doraise: raise py_exc else: sys.stderr.write(py_exc.msg) return if cfile is None: cfile = file + (__debug__ and 'c' or 'o') fc = open(cfile, 'wb') fc.write('\0\0\0\0') wr_long(fc, timestamp) marshal.dump(codeobject, fc) fc.flush() fc.seek(0, 0) fc.write(MAGIC) fc.close() set_creator_type(cfile)
937d95e15115155d11a5a130e7a4b1c2fc737801 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/937d95e15115155d11a5a130e7a4b1c2fc737801/py_compile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 12, 768, 16, 276, 768, 33, 7036, 16, 302, 768, 33, 7036, 16, 302, 10610, 784, 33, 8381, 4672, 3536, 3216, 17, 11100, 1245, 6600, 1084, 585, 358, 6600, 22801, 18, 225, 13599, 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, 4074, 12, 768, 16, 276, 768, 33, 7036, 16, 302, 768, 33, 7036, 16, 302, 10610, 784, 33, 8381, 4672, 3536, 3216, 17, 11100, 1245, 6600, 1084, 585, 358, 6600, 22801, 18, 225, 13599, 30, ...
(module_name, 'en_US', 'field', 'help', 'selection') + \
('en_US', 'field', 'help', 'selection') + \
def _field_create(self, cursor, module_name): cursor.execute("SELECT id FROM ir_model WHERE model = %s", (self._name,)) if not cursor.rowcount: # reference model in order to have a description # of its fonctionnality in custom_report cursor.execute("INSERT INTO ir_model " \ "(model, name, info) VALUES (%s, %s, %s)", (self._name, self._description, self.__doc__)) cursor.commit() cursor.execute("SELECT id FROM ir_model WHERE model = %s", (self._name,)) (model_id,) = cursor.fetchone()
311ecc3b2b0e98fdfe0eb8b4e8182a84abd3caeb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/311ecc3b2b0e98fdfe0eb8b4e8182a84abd3caeb/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1518, 67, 2640, 12, 2890, 16, 3347, 16, 1605, 67, 529, 4672, 3347, 18, 8837, 2932, 4803, 612, 4571, 9482, 67, 2284, 4852, 938, 273, 738, 87, 3113, 261, 2890, 6315, 529, 16, 3719, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1518, 67, 2640, 12, 2890, 16, 3347, 16, 1605, 67, 529, 4672, 3347, 18, 8837, 2932, 4803, 612, 4571, 9482, 67, 2284, 4852, 938, 273, 738, 87, 3113, 261, 2890, 6315, 529, 16, 3719, ...
**Contracts evaluation**: Note that all contracts for the arguments and the return values are evaluated in the same context. This make it possible to use common variables in the contract expression. For example, in the example above, the return value is constrained to be a list of the same length (``N``) as the parameter ``b``. **Using docstrings** Note that, by convention, those annotations must be parseable as RestructuredText. This is relevant if you are using Sphinx. If the contract string has special RST characters in it, like ``*``, you can include it in double ticks. |pycontracts| will remove the double ticks before interpreting the string.
**Contracts evaluation**: Note that all contracts for the arguments and the return values are evaluated in the same context. This make it possible to use common variables in the contract expression. For example, in the example above, the return value is constrained to be a list of the same length (``N``) as the parameter ``b``. **Using docstrings** Note that, by convention, those annotations must be parseable as RestructuredText. This is relevant if you are using Sphinx. If the contract string has special RST characters in it, like ``*``, you can include it in double ticks. |pycontracts| will remove the double ticks before interpreting the string.
def my_function(a, b): """ Function description. :type a: int,>0 :type b: list[N],N>0 :rtype: list[N] """ pass
85562dd004b414f169fe9e2e8440311e1c9dbcb5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13591/85562dd004b414f169fe9e2e8440311e1c9dbcb5/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 67, 915, 12, 69, 16, 324, 4672, 3536, 4284, 2477, 18, 294, 723, 279, 30, 509, 16, 34, 20, 294, 723, 324, 30, 666, 63, 50, 6487, 50, 34, 20, 294, 86, 723, 30, 666, 63, 50, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 67, 915, 12, 69, 16, 324, 4672, 3536, 4284, 2477, 18, 294, 723, 279, 30, 509, 16, 34, 20, 294, 723, 324, 30, 666, 63, 50, 6487, 50, 34, 20, 294, 86, 723, 30, 666, 63, 50, ...
self.assertRaises(_ped.CreateException, self.set_start, -1) self.assertRaises(_ped.CreateException, self.set_start, 1000000000)
self.assertRaises(_ped.CreateException, self.g.set_start, -1) self.assertRaises(_ped.CreateException, self.g.set_start, 1000000000)
def runTest(self): self.g.set_start(10) self.assert_(self.g.start == 10) self.assert_(self.g.length == 90) self.assert_(self.g.end == 100)
7ea094a5a9369af6702e865d752b1bac938f2e5d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5978/7ea094a5a9369af6702e865d752b1bac938f2e5d/test_geometry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 4709, 12, 2890, 4672, 365, 18, 75, 18, 542, 67, 1937, 12, 2163, 13, 365, 18, 11231, 67, 12, 2890, 18, 75, 18, 1937, 422, 1728, 13, 365, 18, 11231, 67, 12, 2890, 18, 75, 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, 4709, 12, 2890, 4672, 365, 18, 75, 18, 542, 67, 1937, 12, 2163, 13, 365, 18, 11231, 67, 12, 2890, 18, 75, 18, 1937, 422, 1728, 13, 365, 18, 11231, 67, 12, 2890, 18, 75, 18, ...
if not grouping:return s
if not grouping:return (s, 0)
def _group(s): conv=localeconv() grouping=conv['grouping'] if not grouping:return s result="" seps = 0 spaces = "" if s[-1] == ' ': sp = s.find(' ') spaces = s[sp:] s = s[:sp] while s and grouping: # if grouping is -1, we are done if grouping[0]==CHAR_MAX: break # 0: re-use last group ad infinitum elif grouping[0]!=0: #process last group group=grouping[0] grouping=grouping[1:] if result: result=s[-group:]+conv['thousands_sep']+result seps += 1 else: result=s[-group:] s=s[:-group] if s and s[-1] not in "0123456789": # the leading string is only spaces and signs return s+result+spaces,seps if not result: return s+spaces,seps if s: result=s+conv['thousands_sep']+result seps += 1 return result+spaces,seps
67addfe2a87d22458323e268d2bcc7406e6febc2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/67addfe2a87d22458323e268d2bcc7406e6febc2/locale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1655, 12, 87, 4672, 6292, 33, 3729, 17181, 90, 1435, 12116, 33, 4896, 3292, 25592, 3546, 309, 486, 12116, 30, 2463, 261, 87, 16, 374, 13, 563, 1546, 6, 695, 1121, 273, 374, 7292, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1655, 12, 87, 4672, 6292, 33, 3729, 17181, 90, 1435, 12116, 33, 4896, 3292, 25592, 3546, 309, 486, 12116, 30, 2463, 261, 87, 16, 374, 13, 563, 1546, 6, 695, 1121, 273, 374, 7292, ...
this = apply(_quickfix.new_UnderlyingSecurityExchange, args)
this = _quickfix.new_UnderlyingSecurityExchange(*args)
def __init__(self, *args): this = apply(_quickfix.new_UnderlyingSecurityExchange, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 14655, 6291, 4368, 11688, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 14655, 6291, 4368, 11688, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335...
tests[port] = {"port": port, "data": '%08x' % random.randint(0, 0xffffffff)}
test_data[port] = '%08x' % random.randint(0, 0xffffffff) if len(test_ports) == 0: log.debug("%s: no testable ports.") router.last_tested = int(time.time()) return
def exit_test(self, router): tests = {} results = [] test_ports = [] recv_sockets = [] self.test_exit = router exit = router.router # FIXME
edf3e1ef6dbdfa62fde9e97a9acdba9c0ebf2af5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9986/edf3e1ef6dbdfa62fde9e97a9acdba9c0ebf2af5/torbel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2427, 67, 3813, 12, 2890, 16, 4633, 4672, 7434, 273, 2618, 1686, 273, 5378, 1842, 67, 4363, 273, 5378, 10665, 67, 7814, 87, 273, 5378, 365, 18, 3813, 67, 8593, 273, 4633, 2427, 273, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2427, 67, 3813, 12, 2890, 16, 4633, 4672, 7434, 273, 2618, 1686, 273, 5378, 1842, 67, 4363, 273, 5378, 10665, 67, 7814, 87, 273, 5378, 365, 18, 3813, 67, 8593, 273, 4633, 2427, 273, 46...
self.short_name = self.station['infos']['short_name'] + '_' + str(self.channel_id) self.channel.name = self.station['infos']['name'] + '_' + str(self.channel_id)
self.short_name = self.station['infos']['short_name'] self.channel.name = self.station['infos']['name']
def __init__(self, station, channel_id): Thread.__init__(self) #self.channel_q = channel_q self.station = station self.buffer_size = 16384 self.channel_id = channel_id self.channel = Shout() self.id = 999999 self.counter = 0 self.rand_list = [] self.command = "cat " # Media self.media_dir = self.station['media']['dir'] self.channel.format = self.station['media']['format'] self.mode_shuffle = int(self.station['media']['shuffle']) # Infos self.short_name = self.station['infos']['short_name'] + '_' + str(self.channel_id) self.channel.name = self.station['infos']['name'] + '_' + str(self.channel_id) self.channel.genre = self.station['infos']['genre'] self.channel.description = self.station['infos']['description'] self.channel.url = self.station['infos']['url'] # Server self.channel.protocol = 'http' # | 'xaudiocast' | 'icy' self.channel.host = self.station['server']['host'] self.channel.port = int(self.station['server']['port']) self.channel.user = 'source' self.channel.password = self.station['server']['sourcepassword'] self.channel.mount = '/' + self.short_name + '.' + self.channel.format #print self.channel.mount self.channel.public = int(self.station['server']['public']) # s.audio_info = { 'key': 'val', ... } # (keys are shout.SHOUT_AI_BITRATE, shout.SHOUT_AI_SAMPLERATE, # shout.SHOUT_AI_CHANNELS, shout.SHOUT_AI_QUALITY)
ab8799f1c339289c045d33156b803d545ac43f7b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12047/ab8799f1c339289c045d33156b803d545ac43f7b/defuzz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13282, 16, 1904, 67, 350, 4672, 4884, 16186, 2738, 972, 12, 2890, 13, 468, 2890, 18, 4327, 67, 85, 273, 1904, 67, 85, 365, 18, 17894, 273, 13282, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13282, 16, 1904, 67, 350, 4672, 4884, 16186, 2738, 972, 12, 2890, 13, 468, 2890, 18, 4327, 67, 85, 273, 1904, 67, 85, 365, 18, 17894, 273, 13282, 365, ...
sys.stderr.write("WARNING: %s can not be found - standard extensions may not be found" % mapFileName)
sys.stderr.write("WARNING: %s can not be found - standard extensions may not be found\n" % defaultMapName)
def checkextensions(unknown, extra_inis, prefix): # Create a table of frozen extensions defaultMapName = os.path.join( os.path.split(sys.argv[0])[0], "extensions_win32.ini") if not os.path.isfile(defaultMapName): sys.stderr.write("WARNING: %s can not be found - standard extensions may not be found" % mapFileName) else: # must go on end, so other inis can override. extra_inis.append(defaultMapName) ret = [] for mod in unknown: for ini in extra_inis:
f190bfbe7746865ad81e5b8938b9b12b15e0b868 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/f190bfbe7746865ad81e5b8938b9b12b15e0b868/checkextensions_win32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 9489, 12, 8172, 16, 2870, 67, 267, 291, 16, 1633, 4672, 468, 1788, 279, 1014, 434, 12810, 4418, 225, 805, 863, 461, 273, 1140, 18, 803, 18, 5701, 12, 1140, 18, 803, 18, 4939, 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, 866, 9489, 12, 8172, 16, 2870, 67, 267, 291, 16, 1633, 4672, 468, 1788, 279, 1014, 434, 12810, 4418, 225, 805, 863, 461, 273, 1140, 18, 803, 18, 5701, 12, 1140, 18, 803, 18, 4939, 12...
self.splitter = wxSplitterWindow(self, -1, style=wxSP_NOBORDER | wxSP_3DSASH | wxSP_FULLSASH)
self.splitter = wxSplitterWindow(self, -1, style=wxSP_NOBORDER | wxSP_3DSASH | wxSP_FULLSASH) use_images = (1 or wxPlatform == '__WXMSW__') if use_images: (stackImgIdx, breaksImgIdx, watchesImgIdx, localsImgIdx, globalsImgIdx) = range(5) else: stackImgIdx=breaksImgIdx=watchesImgIdx=localsImgIdx=globalsImgIdx=-1
def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger')
5670e50e1632ce1c246206653a7700bc0df89b49 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/5670e50e1632ce1c246206653a7700bc0df89b49/Debugger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4858, 16, 1544, 33, 7036, 16, 11735, 67, 3188, 33, 21, 4672, 7075, 3219, 16186, 2738, 972, 12, 2890, 16, 4858, 16, 300, 21, 16, 296, 24113, 6134, 2, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4858, 16, 1544, 33, 7036, 16, 11735, 67, 3188, 33, 21, 4672, 7075, 3219, 16186, 2738, 972, 12, 2890, 16, 4858, 16, 300, 21, 16, 296, 24113, 6134, 2, -1...
self.msgText("findNextBlock Found " + self.giveBlockName(blockTest) + "\n")
if (self.debugLevel >= LowDebug) : self.msgText("findNextBlock Found " + self.giveBlockName(blockTest) + "\n")
def findNextBlock(self, cB) : # look down list of getToBlockDirection for match # use 'suggestion' flag if current block doesn't have direction nB = None dirFlag = cB.getDirection() if (dirFlag == jmri.Path.NONE) : if (self.blockDirection.isSelected() == True) : dirFlag = dirFlag or jmri.Path.EAST else : dirFlag = dirFlag or jmri.Path.WEST pathList = cB.getPaths() #self.msgText("searching " + len(pathList).toString() + " paths from " + self.giveBlockName(cB) + "\n") for p in pathList : blockTest = p.getBlock() if (p.checkPathSet()) : dirTest = p.getToBlockDirection() #self.msgText("findNextBlock path traversable: " + self.giveBlockName(cB) + " to " + self.giveBlockName(blockTest) + " dirTest: " + jmri.Path.decodeDirection(dirTest) + ":" + dirTest.toString() + " dirFlag: " + jmri.Path.decodeDirection(dirFlag) + ":" + dirFlag.toString() + " result: " + (dirTest & dirFlag).toString() + "\n") if (dirTest & dirFlag != 0) : nB = blockTest self.msgText("findNextBlock Found " + self.giveBlockName(blockTest) + "\n") #break #else : #self.msgText("findNextBlock path not traversable: " + self.giveBlockName(cB) + " to " + self.giveBlockName(blockTest) + "\n") return nB
637586c522dc4614e3aa55f7046de00d6eaa8ae0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1660/637586c522dc4614e3aa55f7046de00d6eaa8ae0/RobotThrottle2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19429, 1768, 12, 2890, 16, 276, 38, 13, 294, 468, 2324, 2588, 666, 434, 19478, 1768, 8212, 364, 845, 468, 999, 296, 87, 21166, 11, 2982, 309, 783, 1203, 3302, 1404, 1240, 4068, 290, 38...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19429, 1768, 12, 2890, 16, 276, 38, 13, 294, 468, 2324, 2588, 666, 434, 19478, 1768, 8212, 364, 845, 468, 999, 296, 87, 21166, 11, 2982, 309, 783, 1203, 3302, 1404, 1240, 4068, 290, 38...
dist = lamp.getDist()
def export_lights(lmp): # only lamps type 0, 1 and 4 supported at the moment # lamp types are: 0 - Lamp, 1 - Sun, 2 - Spot, 3 - Hemi, 4 - Area # Spots are replaced by directional (cylinrical) lights: adjust dist as close as possible to the ground receiving the # cone of light if you want Radius as close as possible lamp = lmp.getData() print "o exporting lamps" if lamp.type == 0: print " o exporting lamp "+lmp.name+"..." # get the rgb component for the lamp red = lamp.col[0] green = lamp.col[1] blue = lamp.col[2] power = lamp.energy * LAMPPOWER.val # get the location of the lamp objmatrix = lmp.matrix lampV = Mathutils.Vector([0, 0, 0, 1]) lampV = lampV * objmatrix FILE.write("\n\nlight {\n") FILE.write("\ttype point\n") FILE.write("\tcolor { \"sRGB nonlinear\" %.3f %.3f %.3f }\n" % (red, green, blue)) FILE.write("\tpower %s\n" % (power)) FILE.write("\tp %s %s %s\n" % (lampV[0], lampV[1], lampV[2])) FILE.write("}") elif lamp.type == 1: if IMP_SUN.val == 1: print " o exporting sun-light "+lmp.name+"..." invmatrix = Mathutils.Matrix(lmp.getInverseMatrix()) FILE.write("\nlight {\n") FILE.write("\ttype sunsky\n") FILE.write("\tup 0 0 1\n") FILE.write("\teast 0 1 0\n") FILE.write("\tsundir %f %f %f\n" % (invmatrix[0][2], invmatrix[1][2], invmatrix[2][2])) FILE.write("\tturbidity %s\n" % SUN_TURB.val) FILE.write("\tsamples %s\n" % SUN_SAMPLES.val) FILE.write("}") else: print " o exporting lamp "+lmp.name+"..." # get the rgb component for the lamp red = lamp.col[0] green = lamp.col[1] blue = lamp.col[2] power = lamp.energy * LAMPPOWER.val # get the location of the lamp objmatrix = lmp.matrix lampV = Mathutils.Vector([0, 0, 0, 1]) lampV = lampV * objmatrix FILE.write("\n\nlight {\n") FILE.write("\ttype point\n") FILE.write("\tcolor { \"sRGB nonlinear\" %.3f %.3f %.3f }\n" % (red, green, blue)) FILE.write("\tpower %s\n" % (power)) FILE.write("\tp %s %s %s\n" % (lampV[0], lampV[1], lampV[2])) FILE.write("}") elif lamp.type == 4: print " o exporting area-light "+lmp.name+"..." objmatrix = lmp.matrix xsize = lamp.areaSizeX * 0.5 if lamp.areaSizeY: # If rectangular area: print "o exporting rectangular area-light "+lmp.name+"..." ysize = lamp.areaSizeY * 0.5 else: # Else, square area: print "o exporting square area-light "+lmp.name+"..." ysize = xsize lampV0 = Mathutils.Vector([-xsize, ysize, 0, 1]) lampV1 = Mathutils.Vector([ xsize, ysize, 0, 1]) lampV2 = Mathutils.Vector([ xsize, -ysize, 0, 1]) lampV3 = Mathutils.Vector([-xsize, -ysize, 0, 1]) lampV0 = lampV0 * objmatrix lampV1 = lampV1 * objmatrix lampV2 = lampV2 * objmatrix lampV3 = lampV3 * objmatrix red = lamp.col[0] green = lamp.col[1] blue = lamp.col[2] radiance = lamp.energy * MESHLIGHTPOWER.val FILE.write("\n\nlight {\n") FILE.write("\ttype meshlight\n") FILE.write("\tname \"%s\"\n" % (lmp.name)) FILE.write("\temit { \"sRGB nonlinear\" %.3f %.3f %.3f }\n" % (red, green, blue)) FILE.write("\tradiance %s\n" % (radiance)) FILE.write("\tsamples %s\n" % DSAMPLES.val) FILE.write("\tpoints 4\n") FILE.write("\t\t%s %s %s\n" % (lampV0[0], lampV0[1], lampV0[2])) FILE.write("\t\t%s %s %s\n" % (lampV1[0], lampV1[1], lampV1[2])) FILE.write("\t\t%s %s %s\n" % (lampV2[0], lampV2[1], lampV2[2])) FILE.write("\t\t%s %s %s\n" % (lampV3[0], lampV3[1], lampV3[2])) FILE.write("\ttriangles 2\n") FILE.write("\t\t0 1 2\n") FILE.write("\t\t0 2 3\n") FILE.write("}") elif lamp.type == 2: print " o exporting spotlight "+lmp.name+"..." objmatrix = lmp.matrix targetV = Mathutils.Vector([0, 0, -1, 1]) targetV = targetV * objmatrix lampV = Mathutils.Vector([0, 0, 0, 1]) lampV = lampV * objmatrix angle = lamp.getSpotSize()*pi/360 dist = lamp.getDist() radius = dist/cos(angle)*sin(angle) red = lamp.col[0] green = lamp.col[1] blue = lamp.col[2] radiance = lamp.energy * LAMPPOWER.val FILE.write("\n\nlight {\n") FILE.write("\ttype directional\n") FILE.write("\tsource %s %s %s\n" % (lampV[0], lampV[1], lampV[2])) FILE.write("\ttarget %s %s %s\n" % (targetV[0], targetV[1], targetV[2])) FILE.write("\tradius %s\n" % (radius)) FILE.write("\temit { \"sRGB nonlinear\" %.3f %.3f %.3f }\n" % (red, green, blue)) FILE.write("}") elif lamp.type == 3: print " o exporting spherical light "+lmp.name+"..." objmatrix = lmp.matrix lampV = Mathutils.Vector([0, 0, 0, 1]) lampV = lampV * objmatrix dist = lamp.getDist() red = lamp.col[0] green = lamp.col[1] blue = lamp.col[2] power = lamp.energy * LAMPPOWER.val FILE.write("\n\nlight {\n") FILE.write("\ttype spherical\n") FILE.write("\tcolor { \"sRGB nonlinear\" %.3f %.3f %.3f }\n" % (red, green, blue)) FILE.write("\tradiance %s\n" % (power)) FILE.write("\tcenter %s %s %s\n" % (lampV[0], lampV[1], lampV[2])) FILE.write("\tradius %s\n" % (dist)) FILE.write("\tsamples %s\n" % DSAMPLES.val) FILE.write("}") else: print "Unsupported type lamp detected" if CONVLAMP.val == 1: print " o exporting lamp "+lmp.name+"..." # get the rgb component for the lamp red = lamp.col[0] green = lamp.col[1] blue = lamp.col[2] power = lamp.energy * LAMPPOWER.val # get the location of the lamp objmatrix = lmp.matrix lampV = Mathutils.Vector([0, 0, 0, 1]) lampV = lampV * objmatrix FILE.write("\n\nlight {\n") FILE.write("\ttype point\n") FILE.write("\tcolor { \"sRGB nonlinear\" %.3f %.3f %.3f }\n" % (red, green, blue)) FILE.write("\tpower %s\n" % (power)) FILE.write("\tp %s %s %s\n" % (lampV[0], lampV[1], lampV[2])) FILE.write("}")
223dfc1c7b8557f033095eceba9a38be84b7749e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12400/223dfc1c7b8557f033095eceba9a38be84b7749e/sunflow_export.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 5099, 87, 12, 80, 1291, 4672, 468, 1338, 328, 25508, 618, 374, 16, 404, 471, 1059, 3260, 622, 326, 10382, 468, 328, 931, 1953, 854, 30, 374, 300, 511, 931, 16, 404, 300, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 5099, 87, 12, 80, 1291, 4672, 468, 1338, 328, 25508, 618, 374, 16, 404, 471, 1059, 3260, 622, 326, 10382, 468, 328, 931, 1953, 854, 30, 374, 300, 511, 931, 16, 404, 300, 31...
print repr(data) d = self.sendGlobalRequest('tcpip-forward', data, 1)
d = self.sendGlobalRequest('tcpip-forward', data)
def serviceStarted(self): if not options['notty']: self.openChannel(SSHSession()) if options.localForwards: for localPort, hostport in options.localForwards: reactor.listenTCP(localPort, forwarding.SSHLocalForwardingFactory(self, hostport)) if options.remoteForwards: for remotePort, hostport in options.remoteForwards: log.msg('asking for remote forwarding for %s:%s' % (remotePort, hostport)) data = forwarding.packGlobal_tcpip_forward( ('0.0.0.0', remotePort)) print repr(data) d = self.sendGlobalRequest('tcpip-forward', data, 1) self.remoteForwards[remotePort] = hostport d.addCallback(self.reply)
10190f1e6ff609457b68d8105e9a08ea93d3daf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/10190f1e6ff609457b68d8105e9a08ea93d3daf6/conch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1156, 9217, 12, 2890, 4672, 309, 486, 702, 3292, 902, 4098, 3546, 30, 365, 18, 3190, 2909, 12, 12559, 2157, 10756, 309, 702, 18, 3729, 1290, 6397, 30, 364, 1191, 2617, 16, 27143, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1156, 9217, 12, 2890, 4672, 309, 486, 702, 3292, 902, 4098, 3546, 30, 365, 18, 3190, 2909, 12, 12559, 2157, 10756, 309, 702, 18, 3729, 1290, 6397, 30, 364, 1191, 2617, 16, 27143, 316, ...
save = self.definingMacro self.definingMacro = macroName
if not self.metal: self.interpret(macro) return self.pushMacro("define-macro", macroName, None)
def do_defineMacro(self, macroName, macro): save = self.definingMacro self.definingMacro = macroName self.interpret(macro) self.definingMacro = save
16e9bae32a04e1cc90bd99d273eafe765aba3b03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/16e9bae32a04e1cc90bd99d273eafe765aba3b03/TALInterpreter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 11255, 17392, 12, 2890, 16, 11522, 461, 16, 11522, 4672, 309, 486, 365, 18, 10578, 287, 30, 365, 18, 24713, 12, 26448, 13, 327, 365, 18, 6206, 17392, 2932, 11255, 17, 26448, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 11255, 17392, 12, 2890, 16, 11522, 461, 16, 11522, 4672, 309, 486, 365, 18, 10578, 287, 30, 365, 18, 24713, 12, 26448, 13, 327, 365, 18, 6206, 17392, 2932, 11255, 17, 26448, 3...
elif value.isdigit(): if value.startswith("0"):
elif value.isdigit() or value.startswith("-") and value[1:].isdigit(): if value.startswith("0") or value.startswith("-0"):
def ParseCPJFile(filepath): networks = [] # Read file text cpj_file = open(filepath,'r').read() sections = ExtractSections(cpj_file) # Parse assignments for each section for section_name, assignments in sections: # Verify that section name is TOPOLOGY if section_name.upper() in "TOPOLOGY": # Reset values for topology topology = {"Name" : "", "Nodes" : {}} for assignment in assignments: # Escape any comment if assignment.startswith(";"): pass # Verify that line is a valid assignment elif assignment.find('=') > 0: # Split assignment into the two values keyname and value keyname, value = assignment.split("=", 1) # keyname must be immediately followed by the "=" sign, so we # verify that there is no whitespace into keyname if keyname.isalnum(): # value can be preceded and followed by whitespaces, so we escape them value = value.strip() # First case, value starts with "0x", then it's an hexadecimal value if value.startswith("0x"): try: computed_value = int(value, 16) except: raise SyntaxError, "\"%s\" is not a valid value for attribute \"%s\" of section \"[%s]\""%(value, keyname, section_name) elif value.isdigit(): # Second case, value is a number and starts with "0", then it's an octal value if value.startswith("0"): computed_value = int(value, 8) # Third case, value is a number and don't start with "0", then it's a decimal value else: computed_value = int(value) # In any other case, we keep string value else: computed_value = value # Search if the section name match any cpj expression nodepresent_result = nodepresent_model.match(keyname.upper()) nodename_result = nodename_model.match(keyname.upper()) nodedcfname_result = nodedcfname_model.match(keyname.upper()) if keyname.upper() == "NETNAME": if not is_string(computed_value): raise SyntaxError, "Invalid value \"%s\" for keyname \"%s\" of section \"[%s]\""%(value, keyname, section_name) topology["Name"] = computed_value elif keyname.upper() == "NODES": if not is_integer(computed_value): raise SyntaxError, "Invalid value \"%s\" for keyname \"%s\" of section \"[%s]\""%(value, keyname, section_name) topology["Number"] = computed_value elif keyname.upper() == "EDSBASENAME": if not is_string(computed_value): raise SyntaxError, "Invalid value \"%s\" for keyname \"%s\" of section \"[%s]\""%(value, keyname, section_name) topology["Path"] = computed_value elif nodepresent_result: if not is_boolean(computed_value): raise SyntaxError, "Invalid value \"%s\" for keyname \"%s\" of section \"[%s]\""%(value, keyname, section_name) nodeid = int(nodepresent_result.groups()[0]) if nodeid not in topology["Nodes"].keys(): topology["Nodes"][nodeid] = {} topology["Nodes"][nodeid]["Present"] = computed_value elif nodename_result: if not is_string(value): raise SyntaxError, "Invalid value \"%s\" for keyname \"%s\" of section \"[%s]\""%(value, keyname, section_name) nodeid = int(nodename_result.groups()[0]) if nodeid not in topology["Nodes"].keys(): topology["Nodes"][nodeid] = {} topology["Nodes"][nodeid]["Name"] = computed_value elif nodedcfname_result: if not is_string(computed_value): raise SyntaxError, "Invalid value \"%s\" for keyname \"%s\" of section \"[%s]\""%(value, keyname, section_name) nodeid = int(nodedcfname_result.groups()[0]) if nodeid not in topology["Nodes"].keys(): topology["Nodes"][nodeid] = {} topology["Nodes"][nodeid]["DCFName"] = computed_value else: raise SyntaxError, "Keyname \"%s\" not recognised for section \"[%s]\""%(keyname, section_name) # All lines that are not empty and are neither a comment neither not a valid assignment elif assignment.strip() != "": raise SyntaxError, "\"%s\" is not a valid CPJ line"%assignment.strip() if "Number" not in topology.keys(): raise SyntaxError, "\"Nodes\" keyname in \"[%s]\" section is missing"%section_name if topology["Number"] != len(topology["Nodes"]): raise SyntaxError, "\"Nodes\" value not corresponding to number of nodes defined" for nodeid, node in topology["Nodes"].items(): if "Present" not in node.keys(): raise SyntaxError, "\"Node%dPresent\" keyname in \"[%s]\" section is missing"%(nodeid, section_name) networks.append(topology) # In other case, there is a syntax problem into CPJ file else: raise SyntaxError, "Section \"[%s]\" is unrecognized"%section_name return networks
377e3b02a272798306727eecf174777a489d3f3d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/116/377e3b02a272798306727eecf174777a489d3f3d/eds_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 4258, 46, 812, 12, 10561, 4672, 13884, 273, 5378, 468, 2720, 585, 977, 3283, 78, 67, 768, 273, 1696, 12, 10561, 11189, 86, 16063, 896, 1435, 7178, 273, 8152, 15965, 12, 4057, 78, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 4258, 46, 812, 12, 10561, 4672, 13884, 273, 5378, 468, 2720, 585, 977, 3283, 78, 67, 768, 273, 1696, 12, 10561, 11189, 86, 16063, 896, 1435, 7178, 273, 8152, 15965, 12, 4057, 78, ...
data_rows=s.getvalue(),
data_rows=''.join(s),
def make_table(self,fromlines,tolines,fromdesc='',todesc='',context=False, numlines=5): """Returns HTML table of side by side comparison with change highlights
37a93df12625acb7635b8d1d2f949000f6eba0b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/37a93df12625acb7635b8d1d2f949000f6eba0b0/difflib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2121, 12, 2890, 16, 2080, 3548, 16, 3490, 1465, 16, 2080, 5569, 2218, 2187, 88, 369, 742, 2218, 2187, 2472, 33, 8381, 16, 818, 3548, 33, 25, 4672, 3536, 1356, 3982, 1014, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2121, 12, 2890, 16, 2080, 3548, 16, 3490, 1465, 16, 2080, 5569, 2218, 2187, 88, 369, 742, 2218, 2187, 2472, 33, 8381, 16, 818, 3548, 33, 25, 4672, 3536, 1356, 3982, 1014, 434...
msg.setId(self._generate_id())
newid = self._generate_id() if options["globals", "verbose"]: print "[imapfilter] saving %s with new id:" % msg.uid, newid msg.setId(newid)
def __getitem__(self, key): """Return message matching the given *uid*.
706ff615bb6d13331fedc0849e94d029ad4e9af5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6126/706ff615bb6d13331fedc0849e94d029ad4e9af5/sb_imapfilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 498, 4672, 3536, 990, 883, 3607, 326, 864, 380, 1911, 11146, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 498, 4672, 3536, 990, 883, 3607, 326, 864, 380, 1911, 11146, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.windows.get_widget('goMenuItem').show() self.windows.get_widget('bookmarksMenuItem').show()
self.windows.get_widget('go').show() self.windows.get_widget('bookmarks').show() self.windows.get_widget('backButton').show()
def __init__(self, view, showMethodTree = False, showObjectTree = False, showMethodInteraction = False): self.view = view self.session = view.session self.showMethodTree = showMethodTree self.showObjectTree = showObjectTree self.showMethodInteraction = showMethodInteraction self.windows = gtk.glade.XML(os.path.join(os.path.split(gnomoire.__file__)[0], "_gnomoire", "gnomoire.glade"))
f6d209fd3fc3a67ecfe53a6deb3942f1fe07afae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9377/f6d209fd3fc3a67ecfe53a6deb3942f1fe07afae/gnomoire.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1476, 16, 2405, 1305, 2471, 273, 1083, 16, 2405, 921, 2471, 273, 1083, 16, 2405, 1305, 17419, 273, 1083, 4672, 365, 18, 1945, 273, 1476, 365, 18, 3184, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1476, 16, 2405, 1305, 2471, 273, 1083, 16, 2405, 921, 2471, 273, 1083, 16, 2405, 1305, 17419, 273, 1083, 4672, 365, 18, 1945, 273, 1476, 365, 18, 3184, 2...
raise
raise ValueError, "Name: Can't be empty"
def __validate_name(self): """Validate the name value from textbox""" try: name = self._textctrl_name.GetValue().strip() if len(name) == 0: raise except: display_error_message("Name: Can't be empty") set_focus_on_textctrl(self._textctrl_name) raise return name
01f62a12ca8547e7a54951a0e67c95aa57328a81 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/01f62a12ca8547e7a54951a0e67c95aa57328a81/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5662, 67, 529, 12, 2890, 4672, 3536, 4270, 326, 508, 460, 628, 977, 2147, 8395, 775, 30, 508, 273, 365, 6315, 955, 16277, 67, 529, 18, 967, 620, 7675, 6406, 1435, 309, 562, 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, 5662, 67, 529, 12, 2890, 4672, 3536, 4270, 326, 508, 460, 628, 977, 2147, 8395, 775, 30, 508, 273, 365, 6315, 955, 16277, 67, 529, 18, 967, 620, 7675, 6406, 1435, 309, 562, 12, ...
if account and account.tax_ids: for tax in self.pool.get('account.tax').compute_inv(cr,uid,[account.tax_ids[0]],total,1.00): total -= tax['amount'] data['account_tax_id'] = account.tax_ids[0].id
def _default_get(self, cr, uid, fields, context={}): # Compute simple values data = super(account_move_line, self).default_get(cr, uid, fields, context)
5bf1b8d2855666ea607f32dea4df15d6a1ea462e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/5bf1b8d2855666ea607f32dea4df15d6a1ea462e/account_move_line.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1886, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1466, 16, 819, 12938, 4672, 468, 8155, 4143, 924, 501, 273, 2240, 12, 4631, 67, 8501, 67, 1369, 16, 365, 2934, 1886, 67, 588, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1886, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1466, 16, 819, 12938, 4672, 468, 8155, 4143, 924, 501, 273, 2240, 12, 4631, 67, 8501, 67, 1369, 16, 365, 2934, 1886, 67, 588, 12...
self.log("Error in HTTP stream handler") print traceback.format_exc() self.log("Closing due to error") self.close()
if sys.exc_info()[0] is SystemExit: self.log("Caught SystemExit, propagating") raise else: self.log("Error in HTTP stream handler") print traceback.format_exc() self.log("Closing due to error") self.close()
def handle_error(self): self.log("Error in HTTP stream handler") print traceback.format_exc() self.log("Closing due to error") self.close()
e43c0c6116f9131646b5df0aa1ec03d6478ef9cc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/119/e43c0c6116f9131646b5df0aa1ec03d6478ef9cc/https.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1636, 12, 2890, 4672, 365, 18, 1330, 2932, 668, 316, 2239, 1407, 1838, 7923, 1172, 10820, 18, 2139, 67, 10075, 1435, 365, 18, 1330, 2932, 15745, 6541, 358, 555, 7923, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1636, 12, 2890, 4672, 365, 18, 1330, 2932, 668, 316, 2239, 1407, 1838, 7923, 1172, 10820, 18, 2139, 67, 10075, 1435, 365, 18, 1330, 2932, 15745, 6541, 358, 555, 7923, 365, 18, ...
num_updates = updates+obsoletes self.emit(num_updates) def doShutdown(self):
if not self.opts.do_update: num_updates = updates+obsoletes self.emitAvailable(num_updates) self.closeRpmDB()
def updatesCheck(self): updates = len(self.up.getUpdatesList()) obsoletes = len(self.up.getObsoletesTuples())
e2d410c6d27e539632284c34aafe0b0bf67c6b04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/e2d410c6d27e539632284c34aafe0b0bf67c6b04/yum-updatesd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4533, 1564, 12, 2890, 4672, 4533, 273, 562, 12, 2890, 18, 416, 18, 588, 5121, 682, 10756, 7160, 355, 278, 281, 273, 562, 12, 2890, 18, 416, 18, 588, 27637, 355, 278, 281, 25813, 10756,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4533, 1564, 12, 2890, 4672, 4533, 273, 562, 12, 2890, 18, 416, 18, 588, 5121, 682, 10756, 7160, 355, 278, 281, 273, 562, 12, 2890, 18, 416, 18, 588, 27637, 355, 278, 281, 25813, 10756,...
PARAMETER["false_easting",2000000.063000002], PARAMETER["false_northing",0]]"""
PARAMETER["false_easting",2000000], PARAMETER["false_northing",0], AUTHORITY["EPSG","32049"], AXIS["X",EAST], AXIS["Y",NORTH]]"""
def genbin_1(): tst = gdaltest.GDALTest( 'GenBin', 'tm4628_96.bil', 1, 5738, 0, 0, 500, 1 ) prj = """PROJCS["NAD27 / Washington South", GEOGCS["NAD27", DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866",6378206.4,294.9786982139103, AUTHORITY["EPSG","7008"]], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.01745329251994328, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4267"]], UNIT["feet",0.3048006], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",45.83333333333334], PARAMETER["standard_parallel_2",47.33333333333334], PARAMETER["latitude_of_origin",45.33333333333334], PARAMETER["central_meridian",-120.5], PARAMETER["false_easting",2000000.063000002], PARAMETER["false_northing",0]]""" gt = (1181700.9894981384, 82.021003723042099, 0.0, 596254.01050186157, 0.0, -82.021003723045894 ) return tst.testOpen( check_prj = prj, check_gt = gt )
f811069d718ab76034cddbf47c695f10cc3d9151 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10289/f811069d718ab76034cddbf47c695f10cc3d9151/genbin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 4757, 67, 21, 13332, 225, 268, 334, 273, 15551, 2390, 395, 18, 27338, 1013, 4709, 12, 296, 7642, 9913, 2187, 296, 16925, 8749, 6030, 67, 10525, 18, 70, 330, 2187, 404, 16, 15981, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 4757, 67, 21, 13332, 225, 268, 334, 273, 15551, 2390, 395, 18, 27338, 1013, 4709, 12, 296, 7642, 9913, 2187, 296, 16925, 8749, 6030, 67, 10525, 18, 70, 330, 2187, 404, 16, 15981, ...
if package:
if not package:
def testAllCreate(self): package = PackagePages(self.request.rootpage.page_name, self.request) temp = tempfile.NamedTemporaryFile(suffix='.zip') package.collectpackage(self.request.rootpage.getPageList( include_underlay=False, filter=lambda name: not wikiutil.isSystemPage(self.request, name)), temp) if package: py.test.skip("No user created pages in wiki!") assert zipfile.is_zipfile(temp.name)
f2d010b7db5853b392a3165777ef04c4489df09c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/f2d010b7db5853b392a3165777ef04c4489df09c/test_packages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1595, 1684, 12, 2890, 4672, 2181, 273, 7508, 5716, 12, 2890, 18, 2293, 18, 3085, 2433, 18, 2433, 67, 529, 16, 365, 18, 2293, 13, 1906, 273, 13275, 18, 7604, 23808, 12, 8477, 2218...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1595, 1684, 12, 2890, 4672, 2181, 273, 7508, 5716, 12, 2890, 18, 2293, 18, 3085, 2433, 18, 2433, 67, 529, 16, 365, 18, 2293, 13, 1906, 273, 13275, 18, 7604, 23808, 12, 8477, 2218...
self.buffer_thickness = max(radii) + self.covalent_bond_tolerance
self.buffer_thickness = 2*max(radii) + self.covalent_bond_tolerance
def __init__(self, structure, geometrical_constraints, **kwds): """ Construct for the given instance of xray.structure subject to the given sequence of constraints. Each constraint instance shall understand: constraint.add_to(self). That method shall perform 2 tasks:
81046a99c652365c1da7f082871593cd7d3be2c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/81046a99c652365c1da7f082871593cd7d3be2c5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3695, 16, 7364, 1591, 287, 67, 11967, 16, 2826, 25577, 4672, 3536, 14291, 364, 326, 864, 791, 434, 619, 435, 18, 7627, 3221, 358, 326, 864, 3102, 434, 62...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3695, 16, 7364, 1591, 287, 67, 11967, 16, 2826, 25577, 4672, 3536, 14291, 364, 326, 864, 791, 434, 619, 435, 18, 7627, 3221, 358, 326, 864, 3102, 434, 62...
log_and_exec(DELETE + " profile --group responsibilisateurs") log_and_exec(DELETE + " group --name=test_users_B -vv")
log_and_exec(DEL + " profile --group responsibilisateurs") log_and_exec(DEL + " group --name=test_users_B -vv")
def test_users(): """Test ADD/MOD/DEL on user accounts in various ways.""" test_message('''starting users related tests.''') log_and_exec(ADD + " group --name test_users_A --description 'groupe créé pour la suite de tests sur les utilisateurs, vous pouvez effacer'") log_and_exec(ADD + " profile --name Utilisagers --group utilisagers --comment 'profil normal créé pour la suite de tests utilisateurs'") log_and_exec(ADD + " profile --name Responsibilisateurs --group responsibilisateurs --groups cdrom,lpadmin,plugdev,audio,video,scanner,fuse --comment 'profil power user créé pour la suite de tests utilisateurs.'") log_and_exec(ADD + " group --name test_users_B --description 'groupe créé pour la suite de tests sur les utilisateurs, vous pouvez effacer'") os.system(GETENT + " groups") os.system(GETENT + " profiles") log_and_exec(ADD + " user --firstname Utiliçateur --lastname Accentué") log_and_exec(ADD + " user --gecos 'Utilisateur Accentué n°2'", True, 12, comment = "can't build a login from only a GECOS field.") log_and_exec(ADD + " user --login utilisager.normal --profile utilisagers") log_and_exec(MODIFY + " user --login=utilisager.normal -v --add-groups test_users_A") log_and_exec(MODIFY + " user --login=utilisager.normal -v --add-groups test_users_B") # should produce nothing, because nothing is wrong. log_and_exec(CHECK + " group -v --name test_users_B") os.system("rm ~utilisager.normal/test_users_A") # all must be OK, extended checks are not enabled, the program will not "see" the missing link. log_and_exec(CHECK + " group -v --name test_users_A") # the link to group_A isn't here ! log_and_exec(CHECK + " group -vv --name test_users_A --extended --auto-no", True, 7, comment = "a user lacks a symlink.") log_and_exec(CHECK + " group -vv --name test_users_A --extended --auto-yes") # the same check, but checking from users.py #os.system("rm ~utilisager.normal/test_users_A") #log_and_exec(CHECK + " user --name utilisager.normal") # not yet implemented #log_and_exec(CHECK + " user --name utilisager.normal --extended --auto-no", True, 7, comment="user lacks symlink") #log_and_exec(CHECK + " user --name utilisager.normal --extended --auto-yes") # checking for Maildir repair capacity... if configuration.users.mailbox_type == configuration.MAIL_TYPE_HOME_MAILDIR: os.system("rm -rf ~utilisager.normal/" + configuration.users.mailbox) log_and_exec(CHECK + " user -v --name utilisager.normal --auto-no", True, 7, comment="user lacks ~/" + configuration.users.mailbox) log_and_exec(CHECK + " user -v --name utilisager.normal --auto-yes") os.system("touch ~utilisager.normal/.dmrc ; chmod 666 ~utilisager.normal/.dmrc") log_and_exec(CHECK + " user -v --name utilisager.normal --auto-yes") os.system("mv -f ~utilisager.normal/test_users_B ~utilisager.normal/mon_groupe_B_préféré") # all must be ok, the link is just renamed... log_and_exec(CHECK + " group -vv --name test_users_B --extended") # FIXME: verify the user can create things in shared group dirs. log_and_exec(MODIFY + " user --login=utilisager.normal --del-groups test_users_A") # should fail log_and_exec(MODIFY + " user --login=utilisager.normal --del-groups test_users_A", comment = "already not a member.") log_and_exec(ADD + " user --login test.responsibilly --profile responsibilisateurs") log_and_exec(MODIFY + " profile --group utilisagers --add-groups cdrom") log_and_exec(MODIFY + " profile --group utilisagers --add-groups cdrom,test_users_B") log_and_exec(MODIFY + " profile --group utilisagers --apply-groups") log_and_exec(MODIFY + " profile --group responsibilisateurs --add-groups plugdev,audio,test_users_A") log_and_exec(MODIFY + " profile --group responsibilisateurs --del-groups audio") log_and_exec(MODIFY + " profile --group responsibilisateurs --apply-groups") # clean the system log_and_exec(DELETE + " user --login utilicateur.accentue") log_and_exec(DELETE + " user --login utilisateur.accentuen2", True, 5, comment = "this user has *NOT* been created previously.") log_and_exec(DELETE + " profile -vvv --group utilisagers --del-users --no-archive") #os.system(GETENT + " users") log_and_exec(DELETE + " profile --group responsibilisateurs", True, 12, comment = "there are still some users in the pri group of this profile.") log_and_exec(DELETE + " group --name=test_users_A --del-users --no-archive") log_and_exec(DELETE + " user --login test.responsibilly") # this should work now that the last user has been deleted log_and_exec(DELETE + " profile --group responsibilisateurs") log_and_exec(DELETE + " group --name=test_users_B -vv") # already deleted before #log_and_exec(DELETE + " user --login utilisager.normal") #log_and_exec(DELETE + " user --login test.responsibilly") test_message('''users related tests finished.''')
07cb13c975b820cb15074a8378ec89357e5846f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/07cb13c975b820cb15074a8378ec89357e5846f4/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5577, 13332, 3536, 4709, 11689, 19, 6720, 19, 24733, 603, 729, 9484, 316, 11191, 16226, 12123, 225, 1842, 67, 2150, 2668, 6309, 18526, 3677, 3746, 7434, 1093, 11, 6134, 225, 613,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5577, 13332, 3536, 4709, 11689, 19, 6720, 19, 24733, 603, 729, 9484, 316, 11191, 16226, 12123, 225, 1842, 67, 2150, 2668, 6309, 18526, 3677, 3746, 7434, 1093, 11, 6134, 225, 613,...
wizard_run('base_setup.base_setup', { 'profile': idprof[0], 'charts': idl10n[0], }, 'menu') for lang in langs: print '\t\tTesting Language', lang, '...' wizard_run('module.lang.install', {'lang': lang})
else: idl10n = [-1] wizard_run('base_setup.base_setup', { 'profile': idprof[0], 'charts': idl10n[0], }, 'menu') for lang in langs: print '\t\tTesting Language', lang, '...' wizard_run('module.lang.install', {'lang': lang})
def wizard_run(wizname, fieldvalues={}, endstate='end'): wiz_id = sock4.create(dbname, uid, 'admin', wizname) state = 'init' datas = {'form':{}} while state!=endstate: res = sock4.execute(dbname, uid, 'admin', wiz_id, datas, state, {}) if 'datas' in res: datas['form'].update( res['datas'] ) if res['type']=='form': for field in res['fields'].keys(): datas['form'][field] = res['fields'][field].get('value', False) state = res['state'][-1][0] datas['form'].update(fieldvalues) elif res['type']=='state': state = res['state'] return True
2915d47a71d551c55ab089f64cfffefc0393f5f3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/2915d47a71d551c55ab089f64cfffefc0393f5f3/check_profile_l10n_all.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24204, 67, 2681, 12, 91, 452, 529, 16, 652, 2372, 28793, 679, 2019, 2218, 409, 11, 4672, 341, 452, 67, 350, 273, 7313, 24, 18, 2640, 12, 20979, 16, 4555, 16, 296, 3666, 2187, 341, 45...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24204, 67, 2681, 12, 91, 452, 529, 16, 652, 2372, 28793, 679, 2019, 2218, 409, 11, 4672, 341, 452, 67, 350, 273, 7313, 24, 18, 2640, 12, 20979, 16, 4555, 16, 296, 3666, 2187, 341, 45...
def _CheckNodeFreeMemory(cfg, node, reason, requested, hypervisor):
def _CheckNodeFreeMemory(lu, node, reason, requested, hypervisor):
def _CheckNodeFreeMemory(cfg, node, reason, requested, hypervisor): """Checks if a node has enough free memory. This function check if a given node has the needed amount of free memory. In case the node has less memory or we cannot get the information from the node, this function raise an OpPrereqError exception. @type cfg: C{config.ConfigWriter} @param cfg: the ConfigWriter instance from which we get configuration data @type node: C{str} @param node: the node to check @type reason: C{str} @param reason: string to use in the error message @type requested: C{int} @param requested: the amount of memory in MiB to check for @type hypervisor: C{str} @param hypervisor: the hypervisor to ask for memory stats @raise errors.OpPrereqError: if the node doesn't have enough memory, or we cannot check the node """ nodeinfo = rpc.call_node_info([node], cfg.GetVGName(), hypervisor) if not nodeinfo or not isinstance(nodeinfo, dict): raise errors.OpPrereqError("Could not contact node %s for resource" " information" % (node,)) free_mem = nodeinfo[node].get('memory_free') if not isinstance(free_mem, int): raise errors.OpPrereqError("Can't compute free memory on node %s, result" " was '%s'" % (node, free_mem)) if requested > free_mem: raise errors.OpPrereqError("Not enough memory on node %s for %s:" " needed %s MiB, available %s MiB" % (node, reason, requested, free_mem))
b9bddb6bdf7ac5841c732845ce0122c64bb026b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/b9bddb6bdf7ac5841c732845ce0122c64bb026b1/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1564, 907, 9194, 6031, 12, 28832, 16, 756, 16, 3971, 16, 3764, 16, 9512, 10227, 4672, 3536, 4081, 309, 279, 756, 711, 7304, 4843, 3778, 18, 225, 1220, 445, 866, 309, 279, 864, 756...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1564, 907, 9194, 6031, 12, 28832, 16, 756, 16, 3971, 16, 3764, 16, 9512, 10227, 4672, 3536, 4081, 309, 279, 756, 711, 7304, 4843, 3778, 18, 225, 1220, 445, 866, 309, 279, 864, 756...
raise ParserError("while scanning a block mapping", self.marks[-1],
raise ParserError("while parsing a block mapping", self.marks[-1],
def parse_block_mapping_key(self): if self.check_token(KeyToken): token = self.get_token() if not self.check_token(KeyToken, ValueToken, BlockEndToken): self.states.append(self.parse_block_mapping_value) return self.parse_block_node_or_indentless_sequence() else: self.state = self.parse_block_mapping_value return self.process_empty_scalar(token.end_mark) if not self.check_token(BlockEndToken): token = self.peek_token() raise ParserError("while scanning a block mapping", self.marks[-1], "expected <block end>, but found %r" % token.id, token.start_mark) token = self.get_token() event = MappingEndEvent(token.start_mark, token.end_mark) self.state = self.states.pop() self.marks.pop() return event
95c8976b37428c048ea78c18be63c03897557c21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12018/95c8976b37428c048ea78c18be63c03897557c21/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2629, 67, 6770, 67, 856, 12, 2890, 4672, 309, 365, 18, 1893, 67, 2316, 12, 653, 1345, 4672, 1147, 273, 365, 18, 588, 67, 2316, 1435, 309, 486, 365, 18, 1893, 67, 2316, 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, 1109, 67, 2629, 67, 6770, 67, 856, 12, 2890, 4672, 309, 365, 18, 1893, 67, 2316, 12, 653, 1345, 4672, 1147, 273, 365, 18, 588, 67, 2316, 1435, 309, 486, 365, 18, 1893, 67, 2316, 12, ...
file = os.path.abspath(file)
def rename(self, src, dest, options=''): """ Move (rename) the given file.
ac9f108c6f21c3ad8c2941ced5e59d4ddf264682 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/ac9f108c6f21c3ad8c2941ced5e59d4ddf264682/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6472, 12, 2890, 16, 1705, 16, 1570, 16, 702, 2218, 11, 4672, 3536, 9933, 261, 18539, 13, 326, 864, 585, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6472, 12, 2890, 16, 1705, 16, 1570, 16, 702, 2218, 11, 4672, 3536, 9933, 261, 18539, 13, 326, 864, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
ATEventBaseSchema = ATContentTypeSchema.copy() ATEventBaseSchema['description'].primary = True ATEventSchema = ATEventBaseSchema + Schema((
ATEventSchema = ATContentTypeSchema.copy + Schema((
def __init__(self, prefix='', archive=False): pass
f98eabe813032df83369483850534aca1fdfcb3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11956/f98eabe813032df83369483850534aca1fdfcb3b/schemata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1633, 2218, 2187, 5052, 33, 8381, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 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, 1001, 2738, 972, 12, 2890, 16, 1633, 2218, 2187, 5052, 33, 8381, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
laterID = None file = None
def loseConnection(self): "Kill rsync process" if self.transport: if self.transport.pid: log.debug("killing rsync child" + str(self.transport.pid), 'rsync_client') os.kill(self.transport.pid, signal.SIGTERM) #self.transport.loseConnection()
d1edb4f2d936c29931d17ce8be7dd263a355beea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7531/d1edb4f2d936c29931d17ce8be7dd263a355beea/apt_proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29612, 1952, 12, 2890, 4672, 315, 19045, 3597, 1209, 1207, 6, 309, 365, 18, 13049, 30, 309, 365, 18, 13049, 18, 6610, 30, 613, 18, 4148, 2932, 79, 5789, 3597, 1209, 1151, 6, 397, 609, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29612, 1952, 12, 2890, 4672, 315, 19045, 3597, 1209, 1207, 6, 309, 365, 18, 13049, 30, 309, 365, 18, 13049, 18, 6610, 30, 613, 18, 4148, 2932, 79, 5789, 3597, 1209, 1151, 6, 397, 609, ...
p.setContentHandler(xml.sax.XMLGenerator())
p.setContentHandler(xml.sax.saxutils.XMLGenerator())
def create_parser(*args, **kwargs): return ExpatParser(*args, **kwargs)
410df5ffc21bd01223f05f5d20c137371286dcf4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/410df5ffc21bd01223f05f5d20c137371286dcf4/expatreader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4288, 30857, 1968, 16, 2826, 4333, 4672, 327, 7784, 270, 2678, 30857, 1968, 16, 2826, 4333, 13, 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, 752, 67, 4288, 30857, 1968, 16, 2826, 4333, 4672, 327, 7784, 270, 2678, 30857, 1968, 16, 2826, 4333, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.attrAddButton.setIcon(QIcon(os.path.join(self.widgetDir, r"icons\Dlg_up3.png")))
self.attrAddButton.setIcon(QIcon(os.path.join(self.widgetDir, "icons/Dlg_up3.png")))
def createShowHiddenLists(self, placementTab, callback = None): maxWidth = 180 self.updateCallbackFunction = callback self.shownAttributes = [] self.selectedShown = [] self.hiddenAttributes = [] self.selectedHidden = []
20cd349af4eca1b2cf713f1f711552e61b55ec3b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/20cd349af4eca1b2cf713f1f711552e61b55ec3b/OWVisWidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 5706, 9345, 7432, 12, 2890, 16, 12607, 5661, 16, 1348, 273, 599, 4672, 17681, 273, 9259, 365, 18, 2725, 2428, 2083, 273, 1348, 365, 18, 674, 995, 2498, 273, 5378, 365, 18, 8109, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 5706, 9345, 7432, 12, 2890, 16, 12607, 5661, 16, 1348, 273, 599, 4672, 17681, 273, 9259, 365, 18, 2725, 2428, 2083, 273, 1348, 365, 18, 674, 995, 2498, 273, 5378, 365, 18, 8109, 2...
directory})
directory}, short_title='Differences')
def cmd_diff_file(self, filename): if self.opt('meld_integration', 'use_meld_for_diff'): self.boss.call_command('meldembed', 'diff', filename=filename) else: directory = os.path.dirname(filename) basename = os.path.basename(filename) vcs = self.call('get_vcs_for_directory', directory=directory) if vcs.NAME == 'Null': self.log.info('"%s" is not version controlled', directory) else: try: commandargs = vcs.diff_command() + [basename] self.boss.call_command('terminal', 'execute', command_args=commandargs, icon_name='vcs_diff', term_type='dumb', kwdict = {'directory': directory}) except NotImplementedError: self.log.info('Not implemented for %s' % vcs.NAME)
9653b9dcd82c0834a3faa949a817968ff9c3cc18 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/9653b9dcd82c0834a3faa949a817968ff9c3cc18/versioncontrol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 5413, 67, 768, 12, 2890, 16, 1544, 4672, 309, 365, 18, 3838, 2668, 81, 488, 67, 27667, 2187, 296, 1202, 67, 81, 488, 67, 1884, 67, 5413, 11, 4672, 365, 18, 70, 8464, 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, 1797, 67, 5413, 67, 768, 12, 2890, 16, 1544, 4672, 309, 365, 18, 3838, 2668, 81, 488, 67, 27667, 2187, 296, 1202, 67, 81, 488, 67, 1884, 67, 5413, 11, 4672, 365, 18, 70, 8464, 18, ...
counters_command = ('%s -start:coverage -shutdown' %
counters_command = ('%s -shutdown' %
def TearDown(self): """Tear down method.
3039e8499d9e67b0f9d59f0c0c4a6fe541e073c5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/3039e8499d9e67b0f9d59f0c0c4a6fe541e073c5/coverage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 399, 2091, 4164, 12, 2890, 4672, 3536, 56, 2091, 2588, 707, 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, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 399, 2091, 4164, 12, 2890, 4672, 3536, 56, 2091, 2588, 707, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
checkin, checkout = self.checkin, self.checkout
self.checkin_mutex.acquire() self.waiting = self.waiting + 1 if self.waiting == self.num_threads: self.waiting = self.num_threads - 1 self.checkout_mutex.release() return self.checkin_mutex.release()
def enter(self): checkin, checkout = self.checkin, self.checkout
157f92e2b29d073ecbc5a79ea012f85cd0478331 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/157f92e2b29d073ecbc5a79ea012f85cd0478331/test_thread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6103, 12, 2890, 4672, 866, 267, 16, 13926, 273, 365, 18, 1893, 267, 16, 365, 18, 17300, 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, 6103, 12, 2890, 4672, 866, 267, 16, 13926, 273, 365, 18, 1893, 267, 16, 365, 18, 17300, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
return makeSuiteForClasses(SplitFrameParagraphTest,FragmentTestCase, ParagraphSplitTestCase, ULTestCase, JustifyTestCase, AutoLeadingTestCase)
return makeSuiteForClasses(ParagraphCorners,SplitFrameParagraphTest,FragmentTestCase, ParagraphSplitTestCase, ULTestCase, JustifyTestCase, AutoLeadingTestCase)
def makeSuite(): return makeSuiteForClasses(SplitFrameParagraphTest,FragmentTestCase, ParagraphSplitTestCase, ULTestCase, JustifyTestCase, AutoLeadingTestCase)
b1649deef41024e32a251eb9c4ab940e5ac52f2c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7053/b1649deef41024e32a251eb9c4ab940e5ac52f2c/test_platypus_paragraphs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 13587, 13332, 327, 1221, 13587, 1290, 4818, 12, 17719, 6217, 9646, 16, 5521, 3219, 17719, 4709, 16, 7456, 4709, 2449, 16, 24963, 5521, 4709, 2449, 16, 587, 48, 4709, 2449, 16, 12526,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 13587, 13332, 327, 1221, 13587, 1290, 4818, 12, 17719, 6217, 9646, 16, 5521, 3219, 17719, 4709, 16, 7456, 4709, 2449, 16, 24963, 5521, 4709, 2449, 16, 587, 48, 4709, 2449, 16, 12526,...
config_entry = self.config.merge('base', None, arch, subarch, flavour)
config_entry = self.config.merge('base', arch, subarch, flavour)
def do_flavour(self, packages, makefile, arch, subarch, flavour, vars, makeflags, extra): config_entry = self.config.merge('base', None, arch, subarch, flavour) if config_entry.get('modules', True) is False: return
3a617fc46a6dd1cb9a3b3c205e230c0a88eb1a45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5794/3a617fc46a6dd1cb9a3b3c205e230c0a88eb1a45/gencontrol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2242, 842, 477, 12, 2890, 16, 5907, 16, 1221, 768, 16, 6637, 16, 720, 991, 16, 31227, 477, 16, 4153, 16, 1221, 7133, 16, 2870, 4672, 642, 67, 4099, 273, 365, 18, 1425, 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, 741, 67, 2242, 842, 477, 12, 2890, 16, 5907, 16, 1221, 768, 16, 6637, 16, 720, 991, 16, 31227, 477, 16, 4153, 16, 1221, 7133, 16, 2870, 4672, 642, 67, 4099, 273, 365, 18, 1425, 18, ...
""" try: return x.real() except AttributeError: return CDF(x).real()
sage: real(5/3) 5/3 sage: a = 2.5 sage: real(a) 2.50000000000000 sage: type(real(a)) <type 'sage.rings.real_mpfr.RealNumber'> """ try: return x.real() except AttributeError: pass try: rdf_x = RDF(x) return x except TypeError: pass return CDF(x).real()
def real(x): """ Return the real part of x. EXAMPLES: sage: z = 1+2*I sage: real(z) 1 """ try: return x.real() except AttributeError: return CDF(x).real()
313fb865f84ffd0853b9ff9c9b291aa56c032b08 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/313fb865f84ffd0853b9ff9c9b291aa56c032b08/functional.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2863, 12, 92, 4672, 3536, 2000, 326, 2863, 1087, 434, 619, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 998, 273, 404, 15, 22, 14, 45, 272, 410, 30, 2863, 12, 94, 13, 404, 272, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2863, 12, 92, 4672, 3536, 2000, 326, 2863, 1087, 434, 619, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 998, 273, 404, 15, 22, 14, 45, 272, 410, 30, 2863, 12, 94, 13, 404, 272, 41...
if self._base != None: result += Registers[self._base] + "+" if self._index != None: result += Registers[self._index] if self._scale > 1: result += "*%d" % self._scale if self._disp >= 0: result += "+0x%x" % self._disp
if self.base != None: result += Registers[self.base] + "+" if self.index != None: result += Registers[self.index] if self.scale > 1: result += "*%d" % self.scale if self.disp >= 0: result += "+0x%x" % self.disp
def _toText(self): if self._type == OPERAND_IMMEDIATE: if self._value >= 0: return "0x%x" % self._value else: return "-0x%x" % abs(self._value) elif self._type == OPERAND_REGISTER: return self.GetName() elif self._type == OPERAND_ABSOLUTE_ADDRESS: return '[0x%x]' % self._disp elif self._type == OPERAND_FAR_MEMORY: return '%s:%s' % (hex(self._seg), hex(self._off)) elif (self._type == OPERAND_MEMORY): result = "[" if self._base != None: result += Registers[self._base] + "+" if self._index != None: result += Registers[self._index] if self._scale > 1: result += "*%d" % self._scale if self._disp >= 0: result += "+0x%x" % self._disp else: result += "-0x%x" % abs(self._disp) return result + "]"
7c2914851425839fab07457054443c7767eb9683 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8360/7c2914851425839fab07457054443c7767eb9683/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 1528, 12, 2890, 4672, 309, 365, 6315, 723, 422, 17205, 4307, 67, 3445, 15971, 1777, 30, 309, 365, 6315, 1132, 1545, 374, 30, 327, 315, 20, 92, 9, 92, 6, 738, 365, 6315, 113...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 869, 1528, 12, 2890, 4672, 309, 365, 6315, 723, 422, 17205, 4307, 67, 3445, 15971, 1777, 30, 309, 365, 6315, 1132, 1545, 374, 30, 327, 315, 20, 92, 9, 92, 6, 738, 365, 6315, 113...
finally: hdlr.release()
finally: _releaseLock()
def removeHandler(self, hdlr): """ Remove the specified handler from this logger. """ if hdlr in self.handlers: hdlr.acquire() try: self.handlers.remove(hdlr) finally: hdlr.release()
32fb6a81f992d86bb4c227912602c224dbbc7d7f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/32fb6a81f992d86bb4c227912602c224dbbc7d7f/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 1503, 12, 2890, 16, 366, 5761, 86, 4672, 3536, 3581, 326, 1269, 1838, 628, 333, 1194, 18, 3536, 309, 366, 5761, 86, 316, 365, 18, 11046, 30, 366, 5761, 86, 18, 1077, 1039, 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, 1206, 1503, 12, 2890, 16, 366, 5761, 86, 4672, 3536, 3581, 326, 1269, 1838, 628, 333, 1194, 18, 3536, 309, 366, 5761, 86, 316, 365, 18, 11046, 30, 366, 5761, 86, 18, 1077, 1039, 1435, ...
self.attach(self.city, 0, 1, 2, 3, gtk.FILL, gtk.FILL) self.attach(self.region, 1, 2, 2, 3, gtk.EXPAND|gtk.FILL, gtk.FILL) self.attach(self.code, 2, 3, 2, 3, gtk.EXPAND|gtk.FILL, gtk.FILL)
self.table.attach(self.city, 0, 1, 2, 3, gtk.FILL, gtk.FILL) self.table.attach(self.region, 1, 2, 2, 3, gtk.EXPAND|gtk.FILL, gtk.FILL) self.table.attach(self.code, 2, 3, 2, 3, gtk.EXPAND|gtk.FILL, gtk.FILL)
def build_interface(self): self.box = LabelField([self.content.value.box, types["BOX"]], False) self.extended = LabelField([self.content.value.extended, types["EXTENDED"]], False) self.street = LabelField([self.content.value.street, types["STREET"]], False) self.city = LabelField([self.content.value.city, types["CITY"]], False) self.region = LabelField([self.content.value.region, types["REGION"]], False) self.code = LabelField([self.content.value.code, types["CODE"]], False) self.country = LabelField([self.content.value.country, types["COUNTRY"]], False)
a8a4c6ca09f6afe3062c9a37ce6363c545145985 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/a8a4c6ca09f6afe3062c9a37ce6363c545145985/arkadas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5831, 12, 2890, 4672, 365, 18, 2147, 273, 5287, 974, 3816, 2890, 18, 1745, 18, 1132, 18, 2147, 16, 1953, 9614, 16876, 11929, 6487, 1083, 13, 365, 18, 14948, 273, 5287, 974, 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, 1361, 67, 5831, 12, 2890, 4672, 365, 18, 2147, 273, 5287, 974, 3816, 2890, 18, 1745, 18, 1132, 18, 2147, 16, 1953, 9614, 16876, 11929, 6487, 1083, 13, 365, 18, 14948, 273, 5287, 974, 3...
self.assertEquals(util.wait(d), self.RESULT)
return d.addCallback(lambda result: self.assertEquals(result, self.RESULT))
def stopAndGo(ign): c.stop() outstandingD.callback('arglebargle')
f3a56bc136e5b5fa4542bd86397d2b4297734a70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7078/f3a56bc136e5b5fa4542bd86397d2b4297734a70/test_cooperator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 1876, 5741, 12, 724, 4672, 276, 18, 5681, 1435, 20974, 40, 18, 3394, 2668, 3175, 298, 70, 3175, 298, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 1876, 5741, 12, 724, 4672, 276, 18, 5681, 1435, 20974, 40, 18, 3394, 2668, 3175, 298, 70, 3175, 298, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
exe_path = libtbx.env.under_build("ksdssp/exe/ksdssp") if not os.path.isfile(exe_path) : raise RuntimeError("KSDSSP not available.")
exe_path = get_ksdssp_exe_path()
def run_ksdssp (file_name, log=sys.stderr) : if not os.path.isfile(file_name) : raise RuntimeError("File %s not found.") exe_path = libtbx.env.under_build("ksdssp/exe/ksdssp") if not os.path.isfile(exe_path) : raise RuntimeError("KSDSSP not available.") print >> log, " Running KSDSSP to generate HELIX and SHEET records" ksdssp_out = easy_run.fully_buffered(command="%s %s" % (exe_path, file_name))
0bc14071d9364def7d33a409fac526a38f23f248 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/0bc14071d9364def7d33a409fac526a38f23f248/secondary_structure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 79, 6427, 1049, 84, 261, 768, 67, 529, 16, 613, 33, 9499, 18, 11241, 13, 294, 309, 486, 1140, 18, 803, 18, 291, 768, 12, 768, 67, 529, 13, 294, 1002, 7265, 2932, 812, 738...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 79, 6427, 1049, 84, 261, 768, 67, 529, 16, 613, 33, 9499, 18, 11241, 13, 294, 309, 486, 1140, 18, 803, 18, 291, 768, 12, 768, 67, 529, 13, 294, 1002, 7265, 2932, 812, 738...
}, domain="[('type', '=', 'storage')]")
}, domain="[('type', 'not in', " \ "('supplier', 'customer', 'warehouse'))]")
def button_draft(self, cursor, user, ids, context=None): workflow_service = LocalService('workflow') for packing in self.browse(cursor, user, ids, context=context): workflow_service.trg_create(user, self._name, packing.id, cursor, context=context)
9421ee0cb4b5bf757b877a086c543d6842d209a3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9298/9421ee0cb4b5bf757b877a086c543d6842d209a3/packing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3568, 67, 17153, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 6095, 67, 3278, 273, 3566, 1179, 2668, 13815, 6134, 364, 2298, 310, 316, 365, 18, 25731, 12, 9216, 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, 3568, 67, 17153, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 6095, 67, 3278, 273, 3566, 1179, 2668, 13815, 6134, 364, 2298, 310, 316, 365, 18, 25731, 12, 9216, 16, ...
img = None
Image = None
def _test(): import EasyDialogs try: import img except ImportError: img = None import MacOS Qt.EnterMovies() path = EasyDialogs.AskFileForOpen(message='Video to convert') if not path: sys.exit(0) rdr = reader(path) if not rdr: sys.exit(1) dstdir = EasyDialogs.AskFileForSave(message='Name for output folder') if not dstdir: sys.exit(0) num = 0 os.mkdir(dstdir) videofmt = rdr.GetVideoFormat() imgfmt = videofmt.getformat() imgw, imgh = videofmt.getsize() timestamp, data = rdr.ReadVideo() while data: fname = 'frame%04.4d.jpg'%num num = num+1 pname = os.path.join(dstdir, fname) if not img: print 'Not', print 'Writing %s, size %dx%d, %d bytes'%(fname, imgw, imgh, len(data)) if img: wrt = img.writer(imgfmt, pname) wrt.width = imgw wrt.height = imgh wrt.write(data) timestamp, data = rdr.ReadVideo() MacOS.SetCreatorAndType(pname, 'ogle', 'JPEG') if num > 20: print 'stopping at 20 frames so your disk does not fill up:-)' break print 'Total frames:', num
19fd33128b9c345b26a7a08d56069bb76e3c15b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/19fd33128b9c345b26a7a08d56069bb76e3c15b3/videoreader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 13332, 1930, 29442, 11885, 14072, 775, 30, 1930, 3774, 1335, 11308, 30, 3421, 273, 599, 1930, 13217, 4618, 7354, 18, 10237, 16727, 29028, 1435, 589, 273, 29442, 11885, 14072, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 13332, 1930, 29442, 11885, 14072, 775, 30, 1930, 3774, 1335, 11308, 30, 3421, 273, 599, 1930, 13217, 4618, 7354, 18, 10237, 16727, 29028, 1435, 589, 273, 29442, 11885, 14072, 18, ...
flags['fortify_source'] = '0'
flags['fortify_source'] = 0
def get_binary_flags(self, file): """ Function to get binary flags from a file """ flags = {}
db3e09aa0517efc638ded0f40524a2b41dc13d44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11154/db3e09aa0517efc638ded0f40524a2b41dc13d44/binary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8578, 67, 7133, 12, 2890, 16, 585, 4672, 3536, 4284, 358, 336, 3112, 2943, 628, 279, 585, 3536, 2943, 273, 2618, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8578, 67, 7133, 12, 2890, 16, 585, 4672, 3536, 4284, 358, 336, 3112, 2943, 628, 279, 585, 3536, 2943, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def Read(self):
def Read(self, template = False):
def Read(self): write = False try: conf = ConfigParser.ConfigParser() conf.read(self._filename) except ConfigParser.Error: return False for sect in self._settings: for name in self._settings[sect][1]: try: val = conf.get(section = sect, option = name) if self._settings[sect][0]: # is binary? val = binascii.a2b_hex(val) self._settings[sect][1][name] = val except ConfigParser.Error: pass # for older version set display infected only to 1 if self._settings['UI'][1]['Version'] == '': self._settings['ClamAV'][1]['InfectedOnly'] = '1' write = True
479ae4a453370d59d25f3d548b12a87ebe6e2642 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3644/479ae4a453370d59d25f3d548b12a87ebe6e2642/Config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2720, 12, 2890, 16, 1542, 273, 1083, 4672, 1045, 273, 1083, 775, 30, 2195, 273, 25076, 18, 809, 2678, 1435, 2195, 18, 896, 12, 2890, 6315, 3459, 13, 1335, 25076, 18, 668, 30, 327, 1083...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2720, 12, 2890, 16, 1542, 273, 1083, 4672, 1045, 273, 1083, 775, 30, 2195, 273, 25076, 18, 809, 2678, 1435, 2195, 18, 896, 12, 2890, 6315, 3459, 13, 1335, 25076, 18, 668, 30, 327, 1083...
def readSingleRecordToMSR(self, filename, reclen = -1, dataflag = 1, skipnotdata = 1, verbose = 0, record_number = 0):
def readSingleRecordToMSR(self, filename, reclen= -1, dataflag=1, skipnotdata=1, verbose=0, record_number=0):
def readFileToTraceGroup(self, filename, reclen = -1, timetol = -1, sampratetol = -1, dataflag = 1, skipnotdata = 1, dataquality = 1, verbose = 0): """ Reads Mini-SEED data from file. Returns MSTraceGroup structure. @param filename: Name of Mini-SEED file. @param reclen: If reclen is 0 the length of the first record is auto- detected. All subsequent records are then expected to have the same record length. If reclen is negative the length of every record is automatically detected. Defaults to -1. @param timetol: Time tolerance, default to -1 (1/2 sample period). @param sampratetol: Sample rate tolerance, defaults to -1 (rate dependent) @param dataflag: Controls whether data samples are unpacked, defaults to true (0). @param skipnotdata: If true (not zero) any data chunks read that to do not have valid data record indicators will be skipped. Defaults to true (1). @param dataquality: If the dataquality flag is true traces will be grouped by quality in addition to the source name identifiers. Defaults to true (1). @param verbose: Controls verbosity from 0 to 2. Defaults to None (0). """ # Creates MSTraceGroup Structure mstg = C.pointer(MSTraceGroup()) # Uses libmseed to read the file and populate the MSTraceGroup errcode = clibmseed.ms_readtraces( C.pointer(mstg), str(filename), C.c_int(reclen), C.c_double(timetol), C.c_double(sampratetol), C.c_short(dataquality), C.c_short(skipnotdata), C.c_short(dataflag), C.c_short(verbose)) if errcode != 0: assert 0, "\n\nError while reading Mini-SEED file: " + filename return mstg
da81b4ce7064a28a168b56663efe435b307a52d4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/da81b4ce7064a28a168b56663efe435b307a52d4/libmseed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10413, 774, 3448, 1114, 12, 2890, 16, 1544, 16, 283, 830, 275, 273, 300, 21, 16, 26668, 355, 273, 300, 21, 16, 16260, 683, 270, 278, 355, 273, 300, 21, 16, 501, 6420, 273, 404, 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, 10413, 774, 3448, 1114, 12, 2890, 16, 1544, 16, 283, 830, 275, 273, 300, 21, 16, 26668, 355, 273, 300, 21, 16, 16260, 683, 270, 278, 355, 273, 300, 21, 16, 501, 6420, 273, 404, 16, ...
"""Returns current line number within a string, counting newlines as line separators
"""Returns current line number within a string, counting newlines as line separators.
def lineno(loc,strg): """Returns current line number within a string, counting newlines as line separators The first line is number 1. """ return strg.count("\n",0,loc) + 1
a4a9edc430c1f433f7d01c71c795b1656411c38c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12364/a4a9edc430c1f433f7d01c71c795b1656411c38c/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7586, 12, 1829, 16, 701, 75, 4672, 3536, 1356, 783, 980, 1300, 3470, 279, 533, 16, 22075, 19181, 487, 980, 14815, 18, 1021, 1122, 980, 353, 1300, 404, 18, 3536, 327, 609, 75, 18, 1883,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7586, 12, 1829, 16, 701, 75, 4672, 3536, 1356, 783, 980, 1300, 3470, 279, 533, 16, 22075, 19181, 487, 980, 14815, 18, 1021, 1122, 980, 353, 1300, 404, 18, 3536, 327, 609, 75, 18, 1883,...
self.feedUnaryFloatOperation(in_data, expected_data, builtins.Sin)
self.feedBuiltin(in_data, builtins.Sin)
def testSin(self): in_data = [0.0, 1.0, 4.0, -1.0, -4.0, 10.0] expected_data = [0.0, 0.841470984808, -0.756802495308, -0.841470984808, 0.756802495308, -0.544021110889] self.feedUnaryFloatOperation(in_data, expected_data, builtins.Sin)
cc8fa694fe2a35a8d4a0dd6abe32834453e713e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10307/cc8fa694fe2a35a8d4a0dd6abe32834453e713e8/test_builtins.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 55, 267, 12, 2890, 4672, 316, 67, 892, 273, 306, 20, 18, 20, 16, 404, 18, 20, 16, 1059, 18, 20, 16, 300, 21, 18, 20, 16, 300, 24, 18, 20, 16, 1728, 18, 20, 65, 2665, 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, 1842, 55, 267, 12, 2890, 4672, 316, 67, 892, 273, 306, 20, 18, 20, 16, 404, 18, 20, 16, 1059, 18, 20, 16, 300, 21, 18, 20, 16, 300, 24, 18, 20, 16, 1728, 18, 20, 65, 2665, 67, ...
A->A B->G C->F D->G E->G F->F G->G H->G I->A J->G K->A L->A M->G
A->A B->G C->F D->G E->G F->F G->G H->G I->A J->G K->A L->A M->G
... def __str__(self):
7bada064f17fe94764857ba822d8ce942b636aca /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/7bada064f17fe94764857ba822d8ce942b636aca/test_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 701, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1372, 377, 1652, 1001, 701, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
left join stock_picking p on (m.picking_id=p.id) left join product_product pp on (m.product_id=pp.id) left join product_template pt on (pp.product_tmpl_id=pt.id) left join product_uom u on (m.product_uom=u.id) left join stock_location l on (m.location_id=l.id) group by
LEFT JOIN stock_picking p ON (m.picking_id=p.id) LEFT JOIN product_product pp ON (m.product_id=pp.id) LEFT JOIN product_template pt ON (pp.product_tmpl_id=pt.id) LEFT JOIN product_uom u ON (m.product_uom=u.id) LEFT JOIN stock_location l ON (m.location_id=l.id) GROUP BY
def init(self, cr): tools.drop_view_if_exists(cr, 'report_stock_inventory') cr.execute("""
70911f1e6859e4f03d8351e60e310cc25e5794f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/70911f1e6859e4f03d8351e60e310cc25e5794f9/report_stock_move.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 4422, 4672, 8513, 18, 7285, 67, 1945, 67, 430, 67, 1808, 12, 3353, 16, 296, 6006, 67, 15381, 67, 26024, 6134, 4422, 18, 8837, 2932, 3660, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 4422, 4672, 8513, 18, 7285, 67, 1945, 67, 430, 67, 1808, 12, 3353, 16, 296, 6006, 67, 15381, 67, 26024, 6134, 4422, 18, 8837, 2932, 3660, 2, -100, -100, -100, -100,...
v = model.Person('hacker', 'hacker@example.org',
v = model.core.Person('hacker', 'hacker@example.org',
def test_create(self): """Test creation of a Submission object""" self.model = 'submission.Submission'
41d9ae5f909a58b749142d2b3ba3cfd27cb58570 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12856/41d9ae5f909a58b749142d2b3ba3cfd27cb58570/test_submission.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2640, 12, 2890, 4672, 3536, 4709, 6710, 434, 279, 2592, 3951, 733, 8395, 225, 365, 18, 2284, 273, 296, 12684, 18, 17865, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 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, 2640, 12, 2890, 4672, 3536, 4709, 6710, 434, 279, 2592, 3951, 733, 8395, 225, 365, 18, 2284, 273, 296, 12684, 18, 17865, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
if seg and reg in _REGMAP: return idaapi.SetDefaultRegisterValue(seg, _REGMAP[reg], value)
reg = idaapi.str2reg(reg); if seg and reg >= 0: return idaapi.SetDefaultRegisterValue(seg, reg, value)
def SetSegDefReg(ea, reg, value): """ Set default segment register value for a segment @param ea: any address in the segment if no segment is present at the specified address then all segments will be affected @param reg: name of segment register @param value: default value of the segment register. -1-undefined. """ seg = idaapi.getseg(ea) if seg and reg in _REGMAP: return idaapi.SetDefaultRegisterValue(seg, _REGMAP[reg], value) else: return False
d7c6f94f08492db2c5746018864f511714e64efc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4773/d7c6f94f08492db2c5746018864f511714e64efc/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 3289, 3262, 1617, 12, 24852, 16, 960, 16, 460, 4672, 3536, 1000, 805, 3267, 1744, 460, 364, 279, 3267, 225, 632, 891, 24164, 30, 1281, 1758, 316, 326, 3267, 309, 1158, 3267, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 3289, 3262, 1617, 12, 24852, 16, 960, 16, 460, 4672, 3536, 1000, 805, 3267, 1744, 460, 364, 279, 3267, 225, 632, 891, 24164, 30, 1281, 1758, 316, 326, 3267, 309, 1158, 3267, 353, ...
print 'request', self.path, self.input
def delegate(self, *args): self.args = args self.input = web.input(_method='GET') self.path = web.ctx.path if web.ctx.method in ['POST', 'PUT']: self.data = web.data() else: self.data = None headers = dict((k[len('HTTP_'):].replace('-', '_').lower(), v) for k, v in web.ctx.environ.items()) self.before_request() try: print 'request', self.path, self.input server = web.config.infobase_server req = urllib2.Request(server + self.path + '?' + urllib.urlencode(self.input), self.data, headers=headers) response = urllib2.urlopen(req) except urllib2.HTTPError, e: response = e self.status_code = response.code self.status_msg = response.msg self.output = response.read() self.headers = dict(response.headers.items()) for k in ['transfer-encoding', 'server', 'connection', 'date']: self.headers.pop(k, None) if self.status_code == 200: self.after_request() else: self.process_error()
c6110a31b35829199f1e2c5d882a70b14e4fea79 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3913/c6110a31b35829199f1e2c5d882a70b14e4fea79/adapter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7152, 12, 2890, 16, 380, 1968, 4672, 365, 18, 1968, 273, 833, 365, 18, 2630, 273, 3311, 18, 2630, 24899, 2039, 2218, 3264, 6134, 365, 18, 803, 273, 3311, 18, 5900, 18, 803, 225, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7152, 12, 2890, 16, 380, 1968, 4672, 365, 18, 1968, 273, 833, 365, 18, 2630, 273, 3311, 18, 2630, 24899, 2039, 2218, 3264, 6134, 365, 18, 803, 273, 3311, 18, 5900, 18, 803, 225, 309, ...
scheduler = ''
def killTask(self, taskSpecId): """
816c7c30814438d8c9489740376256b3aef8ff85 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/816c7c30814438d8c9489740376256b3aef8ff85/BossLiteKiller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 2174, 12, 2890, 16, 1562, 1990, 548, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 2174, 12, 2890, 16, 1562, 1990, 548, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
logo_height = IntOption('header_logo', 'height', 73,
logo_height = IntOption('header_logo', 'height', -1,
def get_templates_dirs(): """Return a list of directories containing the provided ClearSilver templates. """
83d832e55124e84ac351ee9e326cc862aae4d910 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/83d832e55124e84ac351ee9e326cc862aae4d910/chrome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8502, 67, 8291, 13332, 3536, 990, 279, 666, 434, 6402, 4191, 326, 2112, 10121, 19740, 502, 5539, 18, 3536, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8502, 67, 8291, 13332, 3536, 990, 279, 666, 434, 6402, 4191, 326, 2112, 10121, 19740, 502, 5539, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
return None
from mwlib.siteinfo import get_siteinfo return get_siteinfo('de')
def get_siteinfo(self): return None
6d9052ea107159ebe39a82fd9c2bfea63d45fa46 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/6d9052ea107159ebe39a82fd9c2bfea63d45fa46/test_zipcreator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4256, 1376, 12, 2890, 4672, 628, 14721, 2941, 18, 4256, 1376, 1930, 336, 67, 4256, 1376, 327, 336, 67, 4256, 1376, 2668, 323, 6134, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4256, 1376, 12, 2890, 4672, 628, 14721, 2941, 18, 4256, 1376, 1930, 336, 67, 4256, 1376, 327, 336, 67, 4256, 1376, 2668, 323, 6134, 225, 2, -100, -100, -100, -100, -100, -100, ...
raise SMTPServerDisconnected
raise SMTPServerDisconnected('please run connect() first')
def send(self, str): """Send `str' to the server.""" if self.debuglevel > 0: print 'send:', `str` if self.sock: try: self.sock.send(str) except socket.error: raise SMTPServerDisconnected else: raise SMTPServerDisconnected
6db5b8e16dd193fbed573cb344da0a84b1bbe19f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/6db5b8e16dd193fbed573cb344da0a84b1bbe19f/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 2890, 16, 609, 4672, 3536, 3826, 1375, 701, 11, 358, 326, 1438, 12123, 309, 365, 18, 4148, 2815, 405, 374, 30, 1172, 296, 4661, 30, 2187, 1375, 701, 68, 309, 365, 18, 15031, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 2890, 16, 609, 4672, 3536, 3826, 1375, 701, 11, 358, 326, 1438, 12123, 309, 365, 18, 4148, 2815, 405, 374, 30, 1172, 296, 4661, 30, 2187, 1375, 701, 68, 309, 365, 18, 15031, ...
temp = (array(hcol), array(hrow)) print temp return temp
return (array(hcol), array(hrow))
def eval_h(x, lagrange, obj_factor, flag, user_data = None): if flag: #print "Here" hrow = [0, 1, 1, 2, 2, 2, 3, 3, 3, 3] hcol = [0, 0, 1, 0, 1, 2, 0, 1, 2, 3] temp = (array(hcol), array(hrow)) print temp return temp else: print "H called" print obj_factor print x print lagrange values = zeros((10), float_) values[0] = obj_factor * (2*x[3]) values[1] = obj_factor * (x[3]) values[2] = 0 values[3] = obj_factor * (x[3]) values[4] = 0 values[5] = 0 values[6] = obj_factor * (2*x[0] + x[1] + x[2]) values[7] = obj_factor * (x[0]) values[8] = obj_factor * (x[0]) values[9] = 0 values[1] += lagrange[0] * (x[2] * x[3]) values[3] += lagrange[0] * (x[1] * x[3]) values[4] += lagrange[0] * (x[0] * x[3]) values[6] += lagrange[0] * (x[1] * x[2]) values[7] += lagrange[0] * (x[0] * x[2]) values[8] += lagrange[0] * (x[0] * x[1]) values[0] += lagrange[1] * 2 values[2] += lagrange[1] * 2 values[5] += lagrange[1] * 2 values[9] += lagrange[1] * 2 print values return values
f07713a9801aa2bfe7badd1fd535cca44424eea5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12033/f07713a9801aa2bfe7badd1fd535cca44424eea5/example.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 67, 76, 12, 92, 16, 17241, 3676, 16, 1081, 67, 6812, 16, 2982, 16, 729, 67, 892, 273, 599, 4672, 309, 2982, 30, 468, 1188, 315, 26715, 6, 366, 492, 273, 306, 20, 16, 404, 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, 5302, 67, 76, 12, 92, 16, 17241, 3676, 16, 1081, 67, 6812, 16, 2982, 16, 729, 67, 892, 273, 599, 4672, 309, 2982, 30, 468, 1188, 315, 26715, 6, 366, 492, 273, 306, 20, 16, 404, 16,...
if len(changesFile) > 0:
if len(self.changesFile) > 0:
def run(self, args): self.branch = "refs/heads/" + self.branch self.globalPrefix = self.previousDepotPath = os.popen("git-repo-config --get p4.depotpath").read() if len(self.globalPrefix) != 0: self.globalPrefix = self.globalPrefix[:-1]
19d73797bca78a225d3ddc0134a33ec0ce48b167 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12824/19d73797bca78a225d3ddc0134a33ec0ce48b167/git-p4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 833, 4672, 365, 18, 7500, 273, 315, 9316, 19, 20263, 4898, 397, 365, 18, 7500, 365, 18, 6347, 2244, 273, 365, 18, 11515, 758, 13130, 743, 273, 1140, 18, 84, 3190, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 833, 4672, 365, 18, 7500, 273, 315, 9316, 19, 20263, 4898, 397, 365, 18, 7500, 365, 18, 6347, 2244, 273, 365, 18, 11515, 758, 13130, 743, 273, 1140, 18, 84, 3190, ...
return key and [i for __, i in lst] or lst
return [i[-1] for i in lst]
def sorted(iterable, cmp=None, key=None, reverse=False): """Partial implementation of the "sorted" function from Python 2.4""" lst = key and [(key(i), i) for i in iterable] or list(iterable) lst.sort() if reverse: lst = reversed(lst) return key and [i for __, i in lst] or lst
3b2fbe5b648b457a98eae9daf17c7f1d0637fb02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/3b2fbe5b648b457a98eae9daf17c7f1d0637fb02/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3115, 12, 15364, 16, 9411, 33, 7036, 16, 498, 33, 7036, 16, 4219, 33, 8381, 4672, 3536, 9447, 4471, 434, 326, 315, 10350, 6, 445, 628, 6600, 576, 18, 24, 8395, 9441, 273, 498, 471, 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, 3115, 12, 15364, 16, 9411, 33, 7036, 16, 498, 33, 7036, 16, 4219, 33, 8381, 4672, 3536, 9447, 4471, 434, 326, 315, 10350, 6, 445, 628, 6600, 576, 18, 24, 8395, 9441, 273, 498, 471, 3...
usage()
usage()
def main(argv): try: opts, args = getopt.getopt(argv, "hb:p:cd", ["help", "binary=", "profileName=", "clobber"]) except getopt.GetoptError: usage() sys.exit(2) binary = "" profileName = "default" clobber=0 for o,a in opts: if o in ("-h", "--help"): usage() sys.exit() if o in ("-b","--binary"): binary=a if o in ("-p","--profileName"): profileName=a if o in ("-c","--clobber"): clobber=1 if binary=="" or not os.path.exists(binary): usage() sys.exit(2) profileLocation = runCreateProfile(binary,profileName) if not profileLocation or not os.path.exists(profileLocation): print "Couldn't find profile location" sys.exit(2) # Delete the existing profile directory if clobber is requested. # -CreateProfile will re-create it in the right place. if clobber: dirname = os.path.dirname(profileLocation) shutil.rmtree(dirname) profileLocation = runCreateProfile(binary,profileName) if not profileLocation or not os.path.exists(profileLocation): print "Couldn't find profile location on second pass" sys.exit(2) populatePrefs(profileLocation)
3dd9b6fa2752be865565e32c8b6744cb98f0c30c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/3dd9b6fa2752be865565e32c8b6744cb98f0c30c/createTestingProfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 19485, 16, 315, 76, 70, 30, 84, 30, 4315, 3113, 8247, 5201, 3113, 315, 8578, 1546, 16, 315, 5040, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 19485, 16, 315, 76, 70, 30, 84, 30, 4315, 3113, 8247, 5201, 3113, 315, 8578, 1546, 16, 315, 5040, 46...
def layout_banner(maxheight, session):
def layout_banner(maxheight, session, baseurl):
def layout_banner(maxheight, session): """calculates dimensions, image name for banner""" logo_width, logo_height = min((98*maxheight/130, maxheight), (98, 130)) banner_width, banner_height = min((290*maxheight/160, maxheight), (290, 160)) if logo_width <= 61: logo_image = getattr(getattr(session.instance, "logos", None), "medium", "/images/pootle-medium.png") else: logo_image = getattr(getattr(session.instance, "logos", None), "normal", "/images/pootle.png") banner_image = getattr(getattr(session.instance, "logos", None), "banner", "/images/WordForge-white.png") return {"logo_width": logo_width, "logo_height": logo_height, "banner_width": banner_width, "banner_height": banner_height, "logo_image": logo_image, "banner_image": banner_image}
4ec0ef2508050836566698fb746f963104a1e896 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11388/4ec0ef2508050836566698fb746f963104a1e896/pagelayout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3511, 67, 16563, 12, 1896, 4210, 16, 1339, 16, 25427, 4672, 3536, 12780, 815, 5769, 16, 1316, 508, 364, 14090, 8395, 19128, 67, 2819, 16, 19128, 67, 4210, 273, 1131, 12443, 10689, 14, 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, 3511, 67, 16563, 12, 1896, 4210, 16, 1339, 16, 25427, 4672, 3536, 12780, 815, 5769, 16, 1316, 508, 364, 14090, 8395, 19128, 67, 2819, 16, 19128, 67, 4210, 273, 1131, 12443, 10689, 14, 18...