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
wait_count = len(self.proposed_streams) while wait_count > 0 or not connected or self._channel: notification = self._channel.wait() if notification.name == 'MediaStreamDidStart': wait_count -= 1 elif notification.name == 'SIPInvitationChangedState': if notification.data.state == 'early' and notification.data.code == 180: notification_center.post_notification('SIPSessionGotRingIndication', self, TimestampedNotificationData()) elif notification.data.state == 'connecting': received_code = notification.data.code received_reason = notification.data.reason elif notification.data.state == 'connected': if not connected: connected = True notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='local', method='INVITE', code=received_code, reason=received_reason)) else: unhandled_notifications.append(notification) except MediaStreamDidFailError, e:
with api.timeout(self.media_stream_timeout): wait_count = len(self.proposed_streams) while wait_count > 0 or not connected or self._channel: notification = self._channel.wait() if notification.name == 'MediaStreamDidStart': wait_count -= 1 elif notification.name == 'SIPInvitationChangedState': if notification.data.state == 'early' and notification.data.code == 180: notification_center.post_notification('SIPSessionGotRingIndication', self, TimestampedNotificationData()) elif notification.data.state == 'connecting': received_code = notification.data.code received_reason = notification.data.reason elif notification.data.state == 'connected': if not connected: connected = True notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='local', method='INVITE', code=received_code, reason=received_reason)) else: unhandled_notifications.append(notification) except (MediaStreamDidFailError, api.TimeoutError), e:
def connect(self, to_header, routes, streams): self.greenlet = api.getcurrent() notification_center = NotificationCenter() settings = SIPSimpleSettings()
ca8ff735b715508e573178d1e2ebce06a82a6072 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/ca8ff735b715508e573178d1e2ebce06a82a6072/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 16, 358, 67, 3374, 16, 4912, 16, 8205, 4672, 365, 18, 11571, 1810, 273, 1536, 18, 588, 2972, 1435, 3851, 67, 5693, 273, 8050, 8449, 1435, 1947, 273, 348, 2579, 5784, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3077, 12, 2890, 16, 358, 67, 3374, 16, 4912, 16, 8205, 4672, 365, 18, 11571, 1810, 273, 1536, 18, 588, 2972, 1435, 3851, 67, 5693, 273, 8050, 8449, 1435, 1947, 273, 348, 2579, 5784, 26...
cell=array(atoms.get_cell(), Float),
cell=npy2num(atoms.get_cell()),
def __init__(self, calc, atoms=None): self.calc = calc self.atoms = calc.GetListOfAtoms()
89358f58fa7285389788f3ca327c3972e926d85c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5735/89358f58fa7285389788f3ca327c3972e926d85c/old.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7029, 16, 9006, 33, 7036, 4672, 365, 18, 12448, 273, 7029, 365, 18, 14937, 273, 7029, 18, 967, 682, 951, 14280, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 7029, 16, 9006, 33, 7036, 4672, 365, 18, 12448, 273, 7029, 365, 18, 14937, 273, 7029, 18, 967, 682, 951, 14280, 1435, 2, -100, -100, -100, -100, -100, -1...
assert sys.getrefcount(a["hello"]) == 2 assert a["hello"] == 123.0
assert_equal(sys.getrefcount(a["hello"]),2) assert_equal(a["hello"],123.0)
def check_set_char(self,level=5): a = UserDict() inline_tools.inline('a["hello"] = 123.0;',['a']) assert sys.getrefcount(a["hello"]) == 2 assert a["hello"] == 123.0
1a2e32f8d57897230b5265290279639d73dda37e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/1a2e32f8d57897230b5265290279639d73dda37e/test_scxx_object.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 542, 67, 3001, 12, 2890, 16, 2815, 33, 25, 4672, 279, 273, 2177, 5014, 1435, 6370, 67, 6642, 18, 10047, 2668, 69, 9614, 23711, 11929, 273, 17335, 18, 20, 31, 2187, 3292, 69, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 542, 67, 3001, 12, 2890, 16, 2815, 33, 25, 4672, 279, 273, 2177, 5014, 1435, 6370, 67, 6642, 18, 10047, 2668, 69, 9614, 23711, 11929, 273, 17335, 18, 20, 31, 2187, 3292, 69, ...
tokentype, token, start, end, line = g.next()
tokentype, token = g.next()[0:2]
def _getname(g): # Helper to get a dotted name, return a pair (name, token) where # name is the dotted name, or None if there was no dotted name, # and token is the next input token. parts = [] tokentype, token, start, end, line = g.next() if tokentype != NAME and token != '*': return (None, token) parts.append(token) while True: tokentype, token, start, end, line = g.next() if token != '.': break tokentype, token, start, end, line = g.next() if tokentype != NAME: break parts.append(token) return (".".join(parts), token)
7d4cac5de777aad61727f6a068b3c392bb76f3e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/7d4cac5de777aad61727f6a068b3c392bb76f3e3/pyclbr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 529, 12, 75, 4672, 468, 9705, 358, 336, 279, 20965, 508, 16, 327, 279, 3082, 261, 529, 16, 1147, 13, 1625, 468, 508, 353, 326, 20965, 508, 16, 578, 599, 309, 1915, 1703, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 529, 12, 75, 4672, 468, 9705, 358, 336, 279, 20965, 508, 16, 327, 279, 3082, 261, 529, 16, 1147, 13, 1625, 468, 508, 353, 326, 20965, 508, 16, 578, 599, 309, 1915, 1703, 11...
harness_logger.addHandler(ch) harness_logger.debug("Logging started.")
logger.addHandler(ch) logger.debug("Logging started.")
def startlogging(): """Start the logging system to store rotational log based on date.""" harness_logger.setLevel(LOGLEVEL) #Get date for logfile date = time.strftime("%Y%m%d") #create file handler and set level to debug fh = logging.handlers.RotatingFileHandler(filename=LOGDIR + date + ".log", maxBytes=2**20, backupCount=50) fh.setLevel(LOGLEVEL) #create console handler and set level to error ch = logging.StreamHandler() ch.setLevel(logging.ERROR) #create formatter formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") #add formatter to fh fh.setFormatter(formatter) #add formatter to ch ch.setFormatter(formatter) #add fh to logger harness_logger.addHandler(fh) #add ch to logger harness_logger.addHandler(ch) harness_logger.debug("Logging started.")
f223202969073212fc1aa367feb866465ea53538 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7283/f223202969073212fc1aa367feb866465ea53538/srcmerge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 11167, 13332, 3536, 1685, 326, 2907, 2619, 358, 1707, 6752, 287, 613, 2511, 603, 1509, 12123, 366, 1303, 403, 67, 4901, 18, 542, 2355, 12, 4842, 10398, 13, 468, 967, 1509, 364, 1520...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 11167, 13332, 3536, 1685, 326, 2907, 2619, 358, 1707, 6752, 287, 613, 2511, 603, 1509, 12123, 366, 1303, 403, 67, 4901, 18, 542, 2355, 12, 4842, 10398, 13, 468, 967, 1509, 364, 1520...
def handshake(client):
def do_handshake(client):
def handshake(client): handshake = client.recv(1024) print "Handshake [%s]" % handshake if handshake.startswith("<policy-file-request/>"): print "Sending:", policy_response client.send(policy_response) handshake = client.recv(1024) print "Handshake [%s]" % handshake req_lines = handshake.split("\r\n") _, path, _ = req_lines[0].split(" ") _, origin = req_lines[4].split(" ") _, host = req_lines[3].split(" ") client.send(server_handshake % (origin, host, path))
1e633bc8eeef5e92f134ec0cf705a1f7644b9f93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13207/1e633bc8eeef5e92f134ec0cf705a1f7644b9f93/wstest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2349, 7478, 12, 2625, 4672, 11942, 273, 1004, 18, 18334, 12, 2163, 3247, 13, 1172, 315, 14545, 9799, 87, 4279, 738, 11942, 309, 11942, 18, 17514, 1918, 2932, 32, 5086, 17, 768, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2349, 7478, 12, 2625, 4672, 11942, 273, 1004, 18, 18334, 12, 2163, 3247, 13, 1172, 315, 14545, 9799, 87, 4279, 738, 11942, 309, 11942, 18, 17514, 1918, 2932, 32, 5086, 17, 768, ...
path = re.sub(self.req.path_info + '$', '', self.req.uri)
path = re.sub('%s$' % re.escape(self.req.path_info), '', self.req.uri)
def init_request(self): core.Request.init_request(self)
a205424fd3a094d1b692c1abe83b6e59851fc585 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/a205424fd3a094d1b692c1abe83b6e59851fc585/ModPythonHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 2293, 12, 2890, 4672, 2922, 18, 691, 18, 2738, 67, 2293, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 2293, 12, 2890, 4672, 2922, 18, 691, 18, 2738, 67, 2293, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
func = getattr(self._obj_, funcname)
func = getattr(self._obj_, funcname)
def _invokeex_(self, dispid, lcid, wFlags, args, kwArgs, serviceProvider): ### note: lcid is being ignored...
e38b15fa717c4005cc3cc803982a9351a3164f83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/e38b15fa717c4005cc3cc803982a9351a3164f83/policy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14407, 338, 67, 12, 2890, 16, 1015, 6610, 16, 9109, 350, 16, 341, 5094, 16, 833, 16, 5323, 2615, 16, 1156, 2249, 4672, 11849, 4721, 30, 9109, 350, 353, 3832, 5455, 2777, 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, 389, 14407, 338, 67, 12, 2890, 16, 1015, 6610, 16, 9109, 350, 16, 341, 5094, 16, 833, 16, 5323, 2615, 16, 1156, 2249, 4672, 11849, 4721, 30, 9109, 350, 353, 3832, 5455, 2777, 2, -100, ...
if 'hyperlink' in exceptions: import weblinkchecker
import weblinkchecker
def replaceExcept(text, old, new, exceptions, caseInsensitive = False, allowoverlap = False, marker = ''): """ Replaces old by new in text, skipping occurences of old e.g. within nowiki tags or HTML comments. If caseInsensitive is true, then use case insensitivity in the regex matching. If allowoverlap is true, overlapping occurences are all replaced (watch out when using this, it might lead to infinite loops!). Parameters: text - a string old - a compiled regular expression new - a string exceptList - a list of strings which signal what to leave out, e.g. ['math', 'table', 'template'] caseInsensitive - a boolean marker - a string, it will be added to the last replacement, if nothing is changed, it is added at the end """ # Hyperlink regex is defined in weblinkchecker.py. Only import # when required. if 'hyperlink' in exceptions: import weblinkchecker exceptionRegexes = { 'comment': re.compile(r'(?s)<!--.*?-->'), 'includeonly': re.compile(r'(?is)<includeonly>.*?</includeonly>'), 'math': re.compile(r'(?is)<math>.*?</math>'), 'noinclude': re.compile(r'(?is)<noinclude>.*?</noinclude>'), # wiki tags are ignored inside nowiki tags. 'nowiki': re.compile(r'(?is)<nowiki>.*?</nowiki>'), # lines that start with a space are shown in a monospace font and # have whitespace preserved, with wiki tags being ignored. 'pre': re.compile(r'(?is)<pre>.*?</pre>'), # lines that start with a space are shown in a monospace font and # have whitespace preserved. 'startspace': re.compile(r'(?m)^ (.*?)$'), # tables often have whitespace that is used to improve wiki # source code readability. # TODO: handle nested tables. 'table': re.compile(r'(?ims)^{\|.*?^\|}|<table>.*?</table>'), # templates with parameters often have whitespace that is used to # improve wiki source code readability. # 'template': re.compile(r'(?s){{.*?}}'), # The regex above fails on nested templates. This regex can handle # templates cascaded up to level 3, but no deeper. For arbitrary # depth, we'd need recursion which can't be done in Python's re. # After all, the language of correct parenthesis words is not regular. 'template': re.compile(r'(?s){{(({{(({{.*?}})|.)*}})|.)*}}'), 'hyperlink': weblinkchecker.compileLinkR(), 'gallery': re.compile(r'(?is)<gallery.*?>.*?</gallery>'), } # if we got a string, compile it as a regular expression if type(old) == type('') or type(old) == type(u''): if caseInsensitive: old = re.compile(old, re.IGNORECASE | re.UNICODE) else: old = re.compile(old) dontTouchRegexes = [] for exc in exceptions: if isinstance(exc, str) or isinstance(exc, unicode): # assume it's a reference to the exceptionRegexes dictionary # defined above. dontTouchRegexes.append(exceptionRegexes[exc]) else: # assume it's a regular expression dontTouchRegexes.append(exc) index = 0 markerpos = len(text) while True: match = old.search(text, index) if not match: # nothing left to replace break # check which exception will occur next. nextExceptionMatch = None for dontTouchR in dontTouchRegexes: excMatch = dontTouchR.search(text, index) if excMatch and ( nextExceptionMatch is None or excMatch.start() < nextExceptionMatch.start()): nextExceptionMatch = excMatch if nextExceptionMatch is not None and nextExceptionMatch.start() <= match.start(): # an HTML comment or text in nowiki tags stands before the next valid match. Skip. index = nextExceptionMatch.end() else: # We found a valid match. Replace it. # We cannot just insert the new string, as it may contain regex # group references such as \2 or \g<name>. # On the other hand, this approach does not work because it can't # handle lookahead or lookbehind (see bug #1731008): #replacement = old.sub(new, text[match.start():match.end()]) #text = text[:match.start()] + replacement + text[match.end():] # So we have to process the group references manually. replacement = new groupR = re.compile(r'\\(?P<number>\d+)|\\g<(?P<name>.+?)>') while True: groupMatch = groupR.search(replacement) if not groupMatch: break groupID = groupMatch.group('name') or int(groupMatch.group('number')) replacement = replacement[:groupMatch.start()] + match.group(groupID) + replacement[groupMatch.end():] text = text[:match.start()] + replacement + text[match.end():] # continue the search on the remaining text if allowoverlap: index = match.start() + 1 else: index = match.start() + len(replacement) markerpos = match.start() + len(replacement) text = text[:markerpos] + marker + text[markerpos:] return text
eca31fd15bbe663c5ba16a5939877aa72f67b61e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/eca31fd15bbe663c5ba16a5939877aa72f67b61e/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 30212, 12, 955, 16, 1592, 16, 394, 16, 4798, 16, 648, 21931, 273, 1083, 16, 1699, 17946, 273, 1083, 16, 5373, 273, 875, 4672, 3536, 868, 11350, 1592, 635, 394, 316, 977, 16, 1419...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 30212, 12, 955, 16, 1592, 16, 394, 16, 4798, 16, 648, 21931, 273, 1083, 16, 1699, 17946, 273, 1083, 16, 5373, 273, 875, 4672, 3536, 868, 11350, 1592, 635, 394, 316, 977, 16, 1419...
def test_os_stat():
def INPROGRESStest_os_stat():
def test_os_stat(): filename = str(py.magic.autopath()) def call_stat(): st = os.stat(filename) return st f = compile(call_stat, []) result = f() assert result[0] == os.stat(filename)[0] assert result[1] == os.stat(filename)[1] assert result[2] == os.stat(filename)[2]
d34a51bae02a2a15a0cbb6494817ba20ee73c26b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/d34a51bae02a2a15a0cbb6494817ba20ee73c26b/test_extfunc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2120, 3373, 43, 7031, 510, 395, 67, 538, 67, 5642, 13332, 1544, 273, 609, 12, 2074, 18, 11179, 18, 5854, 556, 421, 10756, 1652, 745, 67, 5642, 13332, 384, 273, 1140, 18, 5642, 12, 3459...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2120, 3373, 43, 7031, 510, 395, 67, 538, 67, 5642, 13332, 1544, 273, 609, 12, 2074, 18, 11179, 18, 5854, 556, 421, 10756, 1652, 745, 67, 5642, 13332, 384, 273, 1140, 18, 5642, 12, 3459...
if len(relatedSimulations)>0 :
assert len(relatedSimulations)==1, "Expecting related simulations to be of size 1" relatedSimulation=relatedSimulations[0] if relatedSimulation.value :
def add_simulation(self,simClass,rootElement):
10123885e8a783cfbb9b572d99b168b5684a1b1e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7019/10123885e8a783cfbb9b572d99b168b5684a1b1e/Translator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 9812, 6234, 12, 2890, 16, 9812, 797, 16, 3085, 1046, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 9812, 6234, 12, 2890, 16, 9812, 797, 16, 3085, 1046, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
'server.socket_host' : '0.0.0.0',
'server.socket_host' : listen_on,
def __init__(self, db, opts, embedded=False, show_tracebacks=True): self.db = db for item in self.db: item break self.opts = opts self.embedded = embedded self.max_cover_width, self.max_cover_height = \ map(int, self.opts.max_cover.split('x')) self.max_stanza_items = opts.max_opds_items path = P('content_server') self.build_time = fromtimestamp(os.stat(path).st_mtime) self.default_cover = open(P('content_server/default_cover.jpg'), 'rb').read()
c290d0037cc5585a836c0b4cdcc92cdea15833f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/c290d0037cc5585a836c0b4cdcc92cdea15833f6/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1319, 16, 1500, 16, 7488, 33, 8381, 16, 2405, 67, 21696, 87, 33, 5510, 4672, 365, 18, 1966, 273, 1319, 364, 761, 316, 365, 18, 1966, 30, 761, 898, 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, 1319, 16, 1500, 16, 7488, 33, 8381, 16, 2405, 67, 21696, 87, 33, 5510, 4672, 365, 18, 1966, 273, 1319, 364, 761, 316, 365, 18, 1966, 30, 761, 898, 365,...
_add_new_format(bibdoc, first_url, first_format, docname, doctype, newname)
_add_new_format(bibdoc, url, format, docname, doctype, newname)
def _add_new_icon(bibdoc, url, restriction): """Adds a new icon to an existing bibdoc, replacing the previous one if it exists. If url is empty, just remove the current icon.""" if not url: bibdoc.delete_icon() else: try: path = urllib2.urlparse.urlsplit(url)[2] filename = os.path.split(path)[-1] format = filename[len(file_strip_ext(filename)):].lower() tmpurl = download_url(url, format) try: icondoc = bibdoc.add_icon(tmpurl, 'icon-%s' % bibdoc.get_docname()) if restriction and restriction != 'KEEP-OLD-VALUE': icondoc.set_status(restriction) except StandardError, e: write_message("('%s', '%s') icon not added because '%s'." % (url, format, e), stream=sys.stderr) os.remove(tmpurl) return False except Exception, e: write_message("Error in downloading '%s' because of: %s" % (url, e)) return False return True
f5d952728470a781f1053f86aea902c6af03eb09 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/f5d952728470a781f1053f86aea902c6af03eb09/bibupload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 2704, 67, 3950, 12, 70, 495, 2434, 16, 880, 16, 9318, 4672, 3536, 3655, 279, 394, 4126, 358, 392, 2062, 25581, 2434, 16, 13993, 326, 2416, 1245, 309, 518, 1704, 18, 971,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 2704, 67, 3950, 12, 70, 495, 2434, 16, 880, 16, 9318, 4672, 3536, 3655, 279, 394, 4126, 358, 392, 2062, 25581, 2434, 16, 13993, 326, 2416, 1245, 309, 518, 1704, 18, 971,...
ret = self.__displayLogsQuery(ctx, params, session).all() size = map(lambda c: (c.id, c.bundle_id), ret)
size = [] size.extend(cmds)
def displayLogs(self, ctx, params = {}): # TODO USE ctx session = create_session() for i in ('b_id', 'cmd_id', 'coh_id', 'gid', 'uuid', 'filt'): if not params.has_key(i) or params[i] == '': params[i] = None if not params.has_key('min'): params['min'] = 0 if not params.has_key('max'): params['max'] = -1 if not params.has_key('finished') or params['finished'] == '': params['finished'] = False try: params['order_by'] = getattr(self.commands_on_host.c, params['order_by']) except: params['order_by'] = getattr(self.commands_on_host.c, 'next_launch_date')
8a1ddb93e1200c7fcac0d4117a6db55d8bbd5528 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5988/8a1ddb93e1200c7fcac0d4117a6db55d8bbd5528/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 7777, 12, 2890, 16, 1103, 16, 859, 273, 2618, 4672, 468, 2660, 14988, 1103, 1339, 273, 752, 67, 3184, 1435, 364, 277, 316, 7707, 70, 67, 350, 2187, 296, 4172, 67, 350, 2187, 296,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 7777, 12, 2890, 16, 1103, 16, 859, 273, 2618, 4672, 468, 2660, 14988, 1103, 1339, 273, 752, 67, 3184, 1435, 364, 277, 316, 7707, 70, 67, 350, 2187, 296, 4172, 67, 350, 2187, 296,...
elif len(sys.argv) == 3: ifp = open(sys.argv[1]) ofp = open(sys.argv[2], "w")
elif len(args) == 1: ifp = open(args) ofp = sys.stdout elif len(args) == 2: ifp = open(args[0]) ofp = open(args[1], "w")
def main(): if len(sys.argv) == 2: ifp = open(sys.argv[1]) ofp = sys.stdout elif len(sys.argv) == 3: ifp = open(sys.argv[1]) ofp = open(sys.argv[2], "w") else: usage() sys.exit(2) convert(ifp, ofp, { # entries have the form: # name: ([attribute names], is1stOptional, isEmpty, isEnv, nocontent) # attribute names can be: # "string" -- normal attribute # ("string",) -- sub-element with content of macro; like for \section # ["string"] -- sub-element "appendix": ([], 0, 1, 0, 0), "bifuncindex": (["name"], 0, 1, 0, 0), "catcode": ([], 0, 1, 0, 0), "cfuncdesc": (["type", "name", ("args",)], 0, 0, 1, 0), "chapter": ([("title",)], 0, 0, 0, 0), "chapter*": ([("title",)], 0, 0, 0, 0), "classdesc": (["name", ("args",)], 0, 0, 1, 0), "ctypedesc": (["name"], 0, 0, 1, 0), "cvardesc": (["type", "name"], 0, 0, 1, 0), "datadesc": (["name"], 0, 0, 1, 0), "declaremodule": (["id", "type", "name"], 1, 1, 0, 0), "deprecated": (["release"], 0, 0, 0, 0), "documentclass": (["classname"], 0, 1, 0, 0), "excdesc": (["name"], 0, 0, 1, 0), "funcdesc": (["name", ("args",)], 0, 0, 1, 0), "funcdescni": (["name", ("args",)], 0, 0, 1, 0), "funcline": (["name"], 0, 0, 0, 0), "funclineni": (["name"], 0, 0, 0, 0), "geq": ([], 0, 1, 0, 0), "hline": ([], 0, 1, 0, 0), "include": (["source"], 0, 1, 0, 0), "indexii": (["ie1", "ie2"], 0, 1, 0, 0), "indexiii": (["ie1", "ie2", "ie3"], 0, 1, 0, 0), "indexiv": (["ie1", "ie2", "ie3", "ie4"], 0, 1, 0, 0), "indexname": ([], 0, 0, 0, 0), "input": (["source"], 0, 1, 0, 0), "item": ([("leader",)], 1, 0, 0, 0), "label": (["id"], 0, 1, 0, 0), "labelwidth": ([], 0, 1, 0, 0), "large": ([], 0, 1, 0, 0), "LaTeX": ([], 0, 1, 0, 0), "leftmargin": ([], 0, 1, 0, 0), "leq": ([], 0, 1, 0, 0), "lineii": ([["entry"], ["entry"]], 0, 0, 0, 1), "lineiii": ([["entry"], ["entry"], ["entry"]], 0, 0, 0, 1), "lineiv": ([["entry"], ["entry"], ["entry"], ["entry"]], 0, 0, 0, 1), "localmoduletable": ([], 0, 1, 0, 0), "makeindex": ([], 0, 1, 0, 0), "makemodindex": ([], 0, 1, 0, 0), "maketitle": ([], 0, 1, 0, 0), "manpage": (["name", "section"], 0, 1, 0, 0), "memberdesc": (["class", "name"], 1, 0, 1, 0), "methoddesc": (["class", "name", ("args",)], 1, 0, 1, 0), "methoddescni": (["class", "name", ("args",)], 1, 0, 1, 0), "methodline": (["class", "name"], 1, 0, 0, 0), "methodlineni": (["class", "name"], 1, 0, 0, 0), "moduleauthor": (["name", "email"], 0, 1, 0, 0), "opcodedesc": (["name", "var"], 0, 0, 1, 0), "par": ([], 0, 1, 0, 0), "paragraph": ([("title",)], 0, 0, 0, 0), "refbimodindex": (["name"], 0, 1, 0, 0), "refexmodindex": (["name"], 0, 1, 0, 0), "refmodindex": (["name"], 0, 1, 0, 0), "refstmodindex": (["name"], 0, 1, 0, 0), "refmodule": (["ref"], 1, 0, 0, 0), "renewcommand": (["macro"], 0, 0, 0, 0), "rfc": (["num"], 0, 1, 0, 0), "section": ([("title",)], 0, 0, 0, 0), "sectionauthor": (["name", "email"], 0, 1, 0, 0), "seemodule": (["ref", "name"], 1, 0, 0, 0), "stindex": (["type"], 0, 1, 0, 0), "subparagraph": ([("title",)], 0, 0, 0, 0), "subsection": ([("title",)], 0, 0, 0, 0), "subsubsection": ([("title",)], 0, 0, 0, 0), "list": (["bullet", "init"], 0, 0, 1, 0), "tableii": (["colspec", "style", ["entry"], ["entry"]], 0, 0, 1, 0), "tableiii": (["colspec", "style", ["entry"], ["entry"], ["entry"]], 0, 0, 1, 0), "tableiv": (["colspec", "style", ["entry"], ["entry"], ["entry"], ["entry"]], 0, 0, 1, 0), "version": ([], 0, 1, 0, 0), "versionadded": (["version"], 0, 1, 0, 0), "versionchanged": (["version"], 0, 1, 0, 0), "withsubitem": (["text"], 0, 0, 0, 0), # "ABC": ([], 0, 1, 0, 0), "ASCII": ([], 0, 1, 0, 0), "C": ([], 0, 1, 0, 0), "Cpp": ([], 0, 1, 0, 0), "EOF": ([], 0, 1, 0, 0), "e": ([], 0, 1, 0, 0), "ldots": ([], 0, 1, 0, 0), "NULL": ([], 0, 1, 0, 0), "POSIX": ([], 0, 1, 0, 0), "UNIX": ([], 0, 1, 0, 0), # # Things that will actually be going away! # "fi": ([], 0, 1, 0, 0), "ifhtml": ([], 0, 1, 0, 0), "makeindex": ([], 0, 1, 0, 0), "makemodindex": ([], 0, 1, 0, 0), "maketitle": ([], 0, 1, 0, 0), "noindent": ([], 0, 1, 0, 0), "protect": ([], 0, 1, 0, 0), "tableofcontents": ([], 0, 1, 0, 0), }, discards=["fi", "ifhtml", "makeindex", "makemodindex", "maketitle", "noindent", "tableofcontents"], autoclosing=["chapter", "section", "subsection", "subsubsection", "paragraph", "subparagraph", ])
9c473c6a358659888084683e3936939942224818 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9c473c6a358659888084683e3936939942224818/latex2esis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 562, 12, 9499, 18, 19485, 13, 422, 576, 30, 309, 84, 273, 1696, 12, 9499, 18, 19485, 63, 21, 5717, 434, 84, 273, 2589, 18, 10283, 1327, 562, 12, 1968, 13, 422, 404,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 309, 562, 12, 9499, 18, 19485, 13, 422, 576, 30, 309, 84, 273, 1696, 12, 9499, 18, 19485, 63, 21, 5717, 434, 84, 273, 2589, 18, 10283, 1327, 562, 12, 1968, 13, 422, 404,...
Multiplicative Abelian Group isomorphic to Z x Z, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a, b*c]
Multiplicative Abelian Group isomorphic to Z x Z, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C30 x C64 x C729 generated by [a, b*c]
def __init__(self, ambient, gens, names="f"): """ EXAMPLES: sage: F = AbelianGroup(5,[30,64,729],names = list("abcde")) sage: a,b,c,d,e = F.gens() sage: F.subgroup([a^3,b]) Multiplicative Abelian Group isomorphic to Z x Z, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a^3, b] sage: F.subgroup([c]) Multiplicative Abelian Group isomorphic to C2 x C3 x C5, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [c] sage: F.subgroup([a,c]) Multiplicative Abelian Group isomorphic to Z x C2 x C3 x C5, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a, c] sage: F.subgroup([a,b*c]) Multiplicative Abelian Group isomorphic to Z x Z, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a, b*c] sage: F.subgroup([b*c,d]) Multiplicative Abelian Group isomorphic to Z x C64, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [b*c, d] sage: F.subgroup([a*b,c^6,d],names = list("xyz")) Multiplicative Abelian Group isomorphic to Z x C5 x C64, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a*b, c^6, d] sage: H.<x,y,z> = F.subgroup([a*b, c^6, d]); H Multiplicative Abelian Group isomorphic to Z x C5 x C64, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a*b, c^6, d] sage: G = F.subgroup([a*b,c^6,d],names = list("xyz")) sage: G Multiplicative Abelian Group isomorphic to Z x C5 x C64, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a*b, c^6, d] sage: x,y,z = G.gens() sage: x.order() +Infinity sage: y.order() 5 sage: z.order() 64 sage: A = AbelianGroup(5,[3, 5, 5, 7, 8], names = "abcde") sage: a,b,c,d,e = A.gens() sage: A.subgroup([a,b]) Multiplicative Abelian Group isomorphic to C3 x C5, which is the subgroup of Multiplicative Abelian Group isomorphic to C3 x C5 x C5 x C7 x C8 generated by [a, b] sage: A.subgroup([a,b,c,d^2,e]) Multiplicative Abelian Group isomorphic to C3 x C5 x C5 x C7 x C8, which is the subgroup of Multiplicative Abelian Group isomorphic to C3 x C5 x C5 x C7 x C8 generated by [a, b, c, d^2, e] sage: A.subgroup([a,b,c,d^2,e^2]) Multiplicative Abelian Group isomorphic to C3 x C4 x C5 x C5 x C7, which is the subgroup of Multiplicative Abelian Group isomorphic to C3 x C5 x C5 x C7 x C8 generated by [a, b, c, d^2, e^2] sage: B = A.subgroup([a^3,b,c,d,e^2]); B Multiplicative Abelian Group isomorphic to C4 x C5 x C5 x C7, which is the subgroup of Multiplicative Abelian Group isomorphic to C3 x C5 x C5 x C7 x C8 generated by [b, c, d, e^2] sage: B.invariants() [4, 5, 5, 7] sage: A = AbelianGroup(4,[1009, 2003, 3001, 4001], names = "abcd") sage: a,b,c,d = A.gens() sage: B = A.subgroup([a^3,b,c,d]) sage: B.invariants() [1009, 2003, 3001, 4001] sage: A.order() 24266473210027 sage: B.order() 24266473210027 sage: A = AbelianGroup(4,[1008, 2003, 3001, 4001], names = "abcd") sage: a,b,c,d = A.gens() sage: B = A.subgroup([a^3,b,c,d]) sage: B Multiplicative Abelian Group isomorphic to C3 x C7 x C16 x C2003 x C3001 x C4001, which is the subgroup of Multiplicative Abelian Group isomorphic to C7 x C9 x C16 x C2003 x C3001 x C4001 generated by [a^3, b, c, d] Infinite groups can also be handled: sage: G = AbelianGroup([3,4,0], names = "abc") sage: a,b,c = G.gens() sage: F = G.subgroup([a,b^2,c]); F Multiplicative Abelian Group isomorphic to Z x C3 x C4, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x C3 x C4 generated by [a, b^2, c] sage: F.invariants() [0, 3, 4] sage: F.gens() [a, b^2, c] sage: F.order() +Infinity
91d93eac9e73babe24c77f9b0d1b0336a7d35cef /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/91d93eac9e73babe24c77f9b0d1b0336a7d35cef/abelian_group.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13232, 1979, 16, 314, 773, 16, 1257, 1546, 74, 6, 4672, 3536, 225, 5675, 8900, 11386, 30, 272, 410, 30, 478, 273, 9771, 292, 2779, 1114, 12, 25, 16, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13232, 1979, 16, 314, 773, 16, 1257, 1546, 74, 6, 4672, 3536, 225, 5675, 8900, 11386, 30, 272, 410, 30, 478, 273, 9771, 292, 2779, 1114, 12, 25, 16, 63...
if self.__daemonic and sys_ is None:
if self.__daemonic and (sys_ is None or sys_.__doc__ is None):
def encaps(self): try: self._Thread__bootstrap_inner() except: if self.__daemonic and sys_ is None: return raise
83637fce9d84e40f9663bd13c9ff4c71de481dfa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5339/83637fce9d84e40f9663bd13c9ff4c71de481dfa/ThreadPool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22106, 12, 2890, 4672, 775, 30, 365, 6315, 3830, 972, 12722, 67, 7872, 1435, 1335, 30, 309, 365, 16186, 2414, 20918, 471, 261, 9499, 67, 353, 599, 578, 2589, 67, 16186, 2434, 972, 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, 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, 22106, 12, 2890, 4672, 775, 30, 365, 6315, 3830, 972, 12722, 67, 7872, 1435, 1335, 30, 309, 365, 16186, 2414, 20918, 471, 261, 9499, 67, 353, 599, 578, 2589, 67, 16186, 2434, 972, 353, ...
if not result:
if not result and not self.abort:
def run(self): self.abort=False if not self.abort: self.uri=self.uris[0] self.update(0) self.parent.thisvideo.append(self.parent.videos[self.parent.converting]) self.filename=REGEX_FILE_CLEANUP_FILENAME.sub('',self.parent.meta[self.parent.videos[self.parent.converting]]['name']) self.profile=int(self.parent.meta[self.parent.videos[self.parent.converting]]['profile']) self.outdir=self.parent.prefs.getp(self.profile,'Outdir') if self.outdir[-1:]==os.sep: self.outdir=self.outdir[0:-1] if not os.path.lexists(self.outdir): os.makedirs(self.outdir) elif not os.path.isdir(self.outdir): os.remove(self.outdir) os.makedirs(self.outdir) self.outdir=self.outdir+os.sep if os.path.lexists(self.uri): self.stream=self.uri # It's a file stream, ffmpeg will take care of it else: self.stream='-' # It's another stream, spawn a downloader thread to take care of it and feed the content to ffmpeg via stdin if self.profile==-1: # Do not encode, just copy try: failed=False if self.stream=='-': # Spawn a downloader src=DamnURLPicker(self.uris) total=int(src.info()['Content-Length']) try: tmpuri=src.info()['Content-Disposition'][src.info()['Content-Disposition'].find('filename=')+9:] except: tmpuri='Video.avi' # And pray for the best! else: # Just copy the file, lol total=int(os.lstat(self.stream).st_size) src=open(self.stream,'rb') tmpuri=self.stream if REGEX_URI_EXTENSION_EXTRACT.search(tmpuri): ext='.'+REGEX_URI_EXTENSION_EXTRACT.sub('\\1',tmpuri) else: ext='.avi' # And pray for the best again! self.filename=self.getfinalfilename(self.outdir,self.filename,ext) dst=open(self.outdir+self.filename+ext,'wb') keepgoing=True copied=0.0 self.update(statustext='Copying '+self.parent.meta[self.parent.videos[self.parent.converting]]['name']+' to '+self.filename+ext+'...') while keepgoing and not self.abort: i=src.read(256) if len(i): dst.write(i) copied+=256.0 else: copied=float(total) keepgoing=False progress=min((100.0,copied/total*100.0)) self.update(progress,status=self.parent.meta[self.parent.videos[self.parent.converting]]['status']+' ['+str(int(progress))+'%]') except: failed=True self.grabberrun=False if self.abort or failed: self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Failure.' self.update(status='Failure.') else: self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Success!' self.update(status='Success!') self.update(go=self.abort) return os_exe_ext='' if DV_OS_NAME=='nt': os_exe_ext='.exe' elif DV_OS_NAME=='mac': os_exe_ext='osx' self.passes=1 cmd=[DV_BIN_PATH+'ffmpeg'+os_exe_ext,'-i','?DAMNVID_VIDEO_STREAM?','-y','-title',self.parent.meta[self.parent.videos[self.parent.converting]]['name'],'-comment','Converted by DamnVid '+DV_VERSION+'.','-deinterlace','-passlogfile',DV_TMP_PATH+'pass'] for i in DV_PREFERENCES.keys(): if i[0:25]=='damnvid-profile:encoding_': i=i[16:] pref=self.parent.prefs.getp(self.profile,i) if pref: if type(DV_PREFERENCES['damnvid-profile:'+i]['kind']) is type(''): if DV_PREFERENCES['damnvid-profile:'+i]['kind'][0]=='%': pref=str(round(float(pref),0)) # Round if i=='encoding_pass': pref='?DAMNVID_VIDEO_PASS?' if i=='b' and pref=='sameq': cmd.append('-sameq') else: cmd.extend(['-'+i[9:],pref]) vidformat=self.parent.prefs.getp(self.profile,'Encoding_f') self.vcodec=self.parent.prefs.getp(self.profile,'Encoding_vcodec') self.totalpasses=self.parent.prefs.getp(self.profile,'Encoding_pass') if not self.totalpasses: self.totalpasses=1 else: self.totalpasses=int(self.totalpasses) if vidformat and DV_FILE_EXT.has_key(vidformat): ext='.'+DV_FILE_EXT[vidformat] else: if self.vcodec and DV_FILE_EXT_BY_CODEC.has_key(self.vcodec): ext='.'+DV_FILE_EXT_BY_CODEC[self.vcodec] else: ext='.avi' flags=[] if self.vcodec and DV_CODEC_ADVANCED_CL.has_key(self.vcodec): for o in DV_CODEC_ADVANCED_CL[self.vcodec]: if type(o) is type(''): if o not in flags: # If the flag is already there, don't add it again flags.append(o) else: if '-'+o[0] not in cmd: # If the option is already there, don't overwrite it cmd.extend(['-'+o[0],o[1]]) if len(flags): cmd.extend(['-flags',''.join(flags)]) self.filename=self.getfinalfilename(self.outdir,self.filename,ext) self.filenamenoext=self.filename self.tmpfilename=self.gettmpfilename(DV_TMP_PATH,self.filenamenoext,ext) cmd.append('?DAMNVID_OUTPUT_FILE?') self.filename=self.filenamenoext+ext self.duration=None self.update(statustext='Converting '+self.parent.meta[self.parent.videos[self.parent.converting]]['name']+' to '+self.filename+'...') while int(self.passes)<=int(self.totalpasses) and not self.abort: if self.totalpasses!=1: self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Pass '+str(self.passes)+'/'+str(self.totalpasses)+'...' self.update(status='Pass '+str(self.passes)+'/'+str(self.totalpasses)+'...') if self.stream=='-': if self.passes==1: self.tmppassfile=DV_TMP_PATH+self.gettmpfilename(DV_TMP_PATH,self.filenamenoext,ext) else: self.stream=self.tmppassfile if self.passes!=1: self.tmpfilename=self.gettmpfilename(DV_TMP_PATH,self.filenamenoext,ext) self.process=DamnSpawner(self.cmd2str(cmd),stderr=subprocess.PIPE,stdin=subprocess.PIPE,cwd=os.path.dirname(DV_TMP_PATH)) if self.stream=='-': if self.totalpasses!=1: self.feeder=DamnDownloader(self.uris,self.process.stdin,self.tmppassfile) else: self.feeder=DamnDownloader(self.uris,self.process.stdin) self.feeder.start() curline='' tmpdump=open('tmp.txt','a') while self.process.poll()==None and not self.abort: c=self.process.stderr.read(1) curline+=c if c=="\r" or c=="\n": tmpdump.write(curline+'\n') self.parseLine(curline) curline='' self.passes+=1 self.update(100) result=self.process.poll() # The process is complete, but .poll() still returns the process's return code time.sleep(.25) # Wait a bit self.grabberrun=False # That'll make the DamnConverterGrabber wake up just in case if result and os.path.lexists(DV_TMP_PATH+self.tmpfilename): os.remove(DV_TMP_PATH+self.tmpfilename) # Delete the output file if ffmpeg has exitted with a bad return code for i in os.listdir(os.path.dirname(DV_TMP_PATH)): if i[0:8]=='damnvid-': i=i[8:] if i==self.tmpfilename and not result: try: os.rename(DV_TMP_PATH+i,self.outdir+self.filename) except: # Maybe the file still isn't unlocked, it happens... Wait moar and retry try: time.sleep(2) os.rename(DV_TMP_PATH+i,self.outdir+self.filename) except: # Now this is really bad, alert the user try: # Manual copy, might be needed if we're working on two different filesystems on a non-Windows platform src=open(DV_TMP_PATH+i,'rb') dst=open(self.outdir+self.filename,'wb') for fileline in src.readlines(): dst.write(fileline) try: # Another try block in order to avoid raising the huge except block with the dialog src.close() dst.close() os.remove(DV_TMP_PATH+i) except: pass except: self.update(dialog=('Cannot move file!','DamnVid successfully converted the file but something (File permissions? Disconnected removable device?) prevents it from moving it to the output directory.\nAll hope is not lost, you can still move the file by yourself. It is here:\n'+DV_TMP_PATH+i,wx.OK|wx.ICON_EXCLAMATION)) else: try: os.remove(DV_TMP_PATH+i) except: pass if not result: self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Success!' self.update(status='Success!',go=self.abort) return self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Failure.' self.update(status='Failure.',go=self.abort)
f27250737f78523bfec1b1c3076be5fba709cfcd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/f27250737f78523bfec1b1c3076be5fba709cfcd/DamnVid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 365, 18, 18623, 33, 8381, 309, 486, 365, 18, 18623, 30, 365, 18, 1650, 33, 2890, 18, 23510, 63, 20, 65, 365, 18, 2725, 12, 20, 13, 365, 18, 2938, 18, 2211, 91...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4672, 365, 18, 18623, 33, 8381, 309, 486, 365, 18, 18623, 30, 365, 18, 1650, 33, 2890, 18, 23510, 63, 20, 65, 365, 18, 2725, 12, 20, 13, 365, 18, 2938, 18, 2211, 91...
else: pen.SetStyle(wx.SOLID) dc.SetPen(pen) self.block_w = block_w = max(min(w / 2 - 1, 8), 0) self.block_h = block_h = max(min(h / 2 - 1, 8), 0) dc.DrawRectangle(x + 1, y + 1, block_w, block_h) dc.DrawRectangle(x2 - block_w - 1, y + 1, block_w, block_h) dc.DrawRectangle(x + 1, y2 - block_h - 1, block_w, block_h) dc.DrawRectangle(x2 - block_w - 1, y2 - block_h - 1, block_w, block_h) dc.SetLogicalFunction(wx.COPY)
self.block_w = block_w = max(min(w / 2 - 1, 8), 0) self.block_h = block_h = max(min(h / 2 - 1, 8), 0) dc.DrawRectangle(x + 1, y + 1, block_w, block_h) dc.DrawRectangle(x2 - block_w - 1, y + 1, block_w, block_h) dc.DrawRectangle(x + 1, y2 - block_h - 1, block_w, block_h) dc.DrawRectangle(x2 - block_w - 1, y2 - block_h - 1, block_w, block_h) if wx.Platform == '__WXMAC__': if clear: self.RefreshRect(wx.Rect(x, y, w, h)) else: _draw_rubber_inner() else: dc.SetLogicalFunction(wx.XOR) _draw_rubber_inner() dc.SetLogicalFunction(wx.COPY)
def draw_rubber(self, dc=None, clear=False): if dc == None: dc = wx.ClientDC(self) scaling = self.scaling origin = [x * self.scroll_amount for x in self.GetViewStart()] x = min(self.rubber_origin_x, self.rubber_x2) y = min(self.rubber_origin_y, self.rubber_y2) x2 = max(self.rubber_origin_x, self.rubber_x2) y2 = max(self.rubber_origin_y, self.rubber_y2) x, y, x2, y2 = tuple([int(a * scaling) for a in (x, y, x2, y2)]) x -= origin[0] y -= origin[1] x2 -= origin[0] y2 -= origin[1] w = x2 - x h = y2 - y dc.SetLogicalFunction(wx.XOR) pen = wx.GREY_PEN pen.SetStyle(wx.DOT) dc.SetPen(pen) dc.SetBrush(wx.TRANSPARENT_BRUSH) dc.DrawRectangle(x, y, w, h) if wx.Platform != '__WXMAC__': dc.SetPen(wx.TRANSPARENT_PEN) brush = wx.BLUE_BRUSH brush.SetColour(wx.Color(167, 105, 39)) dc.SetBrush(brush) else: pen.SetStyle(wx.SOLID) dc.SetPen(pen) self.block_w = block_w = max(min(w / 2 - 1, 8), 0) self.block_h = block_h = max(min(h / 2 - 1, 8), 0) dc.DrawRectangle(x + 1, y + 1, block_w, block_h) dc.DrawRectangle(x2 - block_w - 1, y + 1, block_w, block_h) dc.DrawRectangle(x + 1, y2 - block_h - 1, block_w, block_h) dc.DrawRectangle(x2 - block_w - 1, y2 - block_h - 1, block_w, block_h) dc.SetLogicalFunction(wx.COPY)
34c247b5b1596fc0a539fe1b62c4ab87ae5d23b3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9927/34c247b5b1596fc0a539fe1b62c4ab87ae5d23b3/gamera_display.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 67, 18271, 744, 12, 2890, 16, 6744, 33, 7036, 16, 2424, 33, 8381, 4672, 309, 6744, 422, 599, 30, 6744, 273, 7075, 18, 1227, 5528, 12, 2890, 13, 10612, 273, 365, 18, 24576, 4026, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 67, 18271, 744, 12, 2890, 16, 6744, 33, 7036, 16, 2424, 33, 8381, 4672, 309, 6744, 422, 599, 30, 6744, 273, 7075, 18, 1227, 5528, 12, 2890, 13, 10612, 273, 365, 18, 24576, 4026, ...
print "Exception:", e
print "Exception:", e
def get_dav_eprop(self,cr, ns, propname): if self.M_NS.has_key(ns): prefix = self.M_NS[ns] else: print "No namespace:",ns, "( for prop:", propname,")" return None propname = propname.replace('-','_') mname = prefix + "_" + propname if not hasattr(self, mname): return None
fe0ee384c7b5a64c12f8725027352df173701456 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/fe0ee384c7b5a64c12f8725027352df173701456/caldav_node.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 20752, 67, 73, 5986, 12, 2890, 16, 3353, 16, 3153, 16, 2270, 529, 4672, 309, 365, 18, 49, 67, 3156, 18, 5332, 67, 856, 12, 2387, 4672, 1633, 273, 365, 18, 49, 67, 3156, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 20752, 67, 73, 5986, 12, 2890, 16, 3353, 16, 3153, 16, 2270, 529, 4672, 309, 365, 18, 49, 67, 3156, 18, 5332, 67, 856, 12, 2387, 4672, 1633, 273, 365, 18, 49, 67, 3156, 63...
cr.execute('select distinct "'+col+'" from "'+self._table+'" where id in ('+ids_str+')', upd1) nids = [x[0] for x in cr.fetchall()]
nids = [] for i in range((len(ids) / ID_MAX) + ((len(ids) % ID_MAX) and 1 or 0)): sub_ids = ids[ID_MAX * i:ID_MAX * (i + 1)] ids_str = string.join(map(str, sub_ids),',') cr.execute('select distinct "'+col+'" from "'+self._table+'" ' \ 'where id in ('+ids_str+')', upd1) nids.extend([x[0] for x in cr.fetchall()])
def write(self, cr, user, ids, vals, context=None): if not context: context={} if not ids: return True if isinstance(ids, (int, long)): ids = [ids] delta= context.get('read_delta',False) if delta and self._log_access: cr.execute("select (now() - min(write_date)) <= '%s'::interval from %s where id in (%s)"% (delta,self._table,",".join(map(str, ids))) ) res= cr.fetchone() if res and res[0]: for field in vals: if field in self._columns and self._columns[field]._classic_write: raise except_orm('ConcurrencyException', 'This record was modified in the meanwhile')
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, 1045, 12, 2890, 16, 4422, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 12938, 309, 486, 3258, 30, 327, 1053, 309, 1549, 12, 2232, 16, 261, 474, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 12938, 309, 486, 3258, 30, 327, 1053, 309, 1549, 12, 2232, 16, 261, 474, 16, ...
iq.query.addElement("password", content = self.password)
reply.query.addElement("password", content = self.password)
def _authQueryResultEvent(self, iq): if iq["type"] == "result": # Construct auth request iq = IQ(self.xmlstream, "set") iq.addElement(("jabber:iq:auth", "query")) iq.query.addElement("username", content = self.jid.user) iq.query.addElement("resource", content = self.jid.resource) # Prefer digest over plaintext if DigestAuthQry.matches(iq): digest = xmlstream.hashPassword(self.xmlstream.sid, self.password) iq.query.addElement("digest", content = digest) else: iq.query.addElement("password", content = self.password)
f4deb2f74ca862c4f64bbe03a471e65f2d1b8aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f4deb2f74ca862c4f64bbe03a471e65f2d1b8aad/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1944, 23583, 1133, 12, 2890, 16, 24288, 4672, 309, 24288, 9614, 723, 11929, 422, 315, 2088, 6877, 468, 14291, 1357, 590, 24288, 273, 26950, 12, 2890, 18, 2902, 3256, 16, 315, 542, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1944, 23583, 1133, 12, 2890, 16, 24288, 4672, 309, 24288, 9614, 723, 11929, 422, 315, 2088, 6877, 468, 14291, 1357, 590, 24288, 273, 26950, 12, 2890, 18, 2902, 3256, 16, 315, 542, 7...
else
else:
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 916) else quickfix.StringField.__init__(self, 916, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 2468, 2313, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 2468, 2313, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
return res
return res
def execute(connector, method, *args): global wait_count res = False try: res = getattr(connector,method)(*args) except socket.error,e: if e.args[0] == 111: if wait_count > wait_limit: print "Server is taking too long to start, it has exceeded the maximum limit of %d seconds."%(wait_limit) clean() sys.exit(1) print 'Please wait %d sec to start server....'%(waittime) wait_count += 1 time.sleep(waittime) res = execute(connector, method, *args) else: raise e wait_count = 0 return res
394b361dedd1707263f6181bd5d85f013837d7c7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/394b361dedd1707263f6181bd5d85f013837d7c7/base_quality_interrogation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 23159, 16, 707, 16, 380, 1968, 4672, 2552, 2529, 67, 1883, 400, 273, 1083, 775, 30, 400, 273, 3869, 12, 23159, 16, 2039, 21433, 14, 1968, 13, 1335, 2987, 18, 1636, 16, 73, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 23159, 16, 707, 16, 380, 1968, 4672, 2552, 2529, 67, 1883, 400, 273, 1083, 775, 30, 400, 273, 3869, 12, 23159, 16, 2039, 21433, 14, 1968, 13, 1335, 2987, 18, 1636, 16, 73, ...
if self.drawMode in [0 ,2]: self.scene.setComponentPlane(self.component if self.drawMode == 2 else None)
self.error(0) if self.drawMode == 0: self.scene.setComponentPlane(None) elif self.drawMode == 2: self.scene.setComponentPlane(self.component)
def setMode(self): self.componentCombo.setEnabled(self.drawMode == 2) if not self.somMap: return if self.drawMode in [0 ,2]: self.scene.setComponentPlane(self.component if self.drawMode == 2 else None) elif self.drawMode == 1: self.scene.setUMatrix() if self.histogram: self.setHistogram() self.updateToolTips() self.updateGrid() self.setZoom()
c2b295319c990527bd9bf9a858df173321bdb062 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/c2b295319c990527bd9bf9a858df173321bdb062/OWSOMVisualizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2309, 12, 2890, 4672, 365, 18, 4652, 16156, 18, 542, 1526, 12, 2890, 18, 9446, 2309, 422, 576, 13, 309, 486, 365, 18, 87, 362, 863, 30, 327, 365, 18, 1636, 12, 20, 13, 309, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2309, 12, 2890, 4672, 365, 18, 4652, 16156, 18, 542, 1526, 12, 2890, 18, 9446, 2309, 422, 576, 13, 309, 486, 365, 18, 87, 362, 863, 30, 327, 365, 18, 1636, 12, 20, 13, 309, 36...
alias(e=quit)
alias(e=edit)
def alias(**kw): for key, value in kw.items(): by_name[key] = value
c2f7c84c1aa524d6224e53888625c0e6fa153d6a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5729/c2f7c84c1aa524d6224e53888625c0e6fa153d6a/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2308, 12, 636, 9987, 4672, 364, 498, 16, 460, 316, 5323, 18, 3319, 13332, 635, 67, 529, 63, 856, 65, 273, 460, 225, 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, 2308, 12, 636, 9987, 4672, 364, 498, 16, 460, 316, 5323, 18, 3319, 13332, 635, 67, 529, 63, 856, 65, 273, 460, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
for li, lc in ((RADIXCHAR, "decimal_point"), (THOUSEP, "thousands_sep")):
for li, lc in ("decimal_point", "thousands_sep"):
def test_lc_numeric_localeconv(self): # Test localeconv against known values for loc in candidate_locales: try: setlocale(LC_NUMERIC, loc) except Error: continue for li, lc in ((RADIXCHAR, "decimal_point"), (THOUSEP, "thousands_sep")): self.numeric_tester('localeconv', localeconv()[lc], lc, loc)
c89567d5e2ec4d2674a343239418f173a6812615 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/c89567d5e2ec4d2674a343239418f173a6812615/test__locale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17704, 67, 5246, 67, 3729, 17181, 90, 12, 2890, 4672, 468, 7766, 1191, 17181, 90, 5314, 4846, 924, 364, 1515, 316, 5500, 67, 22638, 30, 775, 30, 444, 6339, 12, 13394, 67, 229...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17704, 67, 5246, 67, 3729, 17181, 90, 12, 2890, 4672, 468, 7766, 1191, 17181, 90, 5314, 4846, 924, 364, 1515, 316, 5500, 67, 22638, 30, 775, 30, 444, 6339, 12, 13394, 67, 229...
self.print_line('') self.print_line(self.s)
def p_key(self): """Process a keypress"""
aa909d4c863a437a3480f93f02817c24f0fcb937 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6932/aa909d4c863a437a3480f93f02817c24f0fcb937/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 856, 12, 2890, 4672, 3536, 2227, 279, 498, 1028, 8395, 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, 293, 67, 856, 12, 2890, 4672, 3536, 2227, 279, 498, 1028, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
line = unicode(line, sys.stdin.encoding)
line = util.to_unicode(line, sys.stdin.encoding)
def onecmd(self, line): """`line` may be a `str` or an `unicode` object""" try: if isinstance(line, str): line = unicode(line, sys.stdin.encoding) rv = cmd.Cmd.onecmd(self, line) or 0 except SystemExit: raise except Exception, e: print>>sys.stderr, 'Command failed: %s' % e rv = 2 if not self.interactive: return rv
fd112cf9a7955fa29a885549a286a09e5eb91a4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/fd112cf9a7955fa29a885549a286a09e5eb91a4c/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1245, 4172, 12, 2890, 16, 980, 4672, 3536, 68, 1369, 68, 2026, 506, 279, 1375, 701, 68, 578, 392, 1375, 9124, 68, 733, 8395, 775, 30, 309, 1549, 12, 1369, 16, 609, 4672, 980, 273, 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, 1245, 4172, 12, 2890, 16, 980, 4672, 3536, 68, 1369, 68, 2026, 506, 279, 1375, 701, 68, 578, 392, 1375, 9124, 68, 733, 8395, 775, 30, 309, 1549, 12, 1369, 16, 609, 4672, 980, 273, 17...
self[0][0].parent().is_atomic_repr()))
self.base_ring().is_atomic_repr()))
def _latex_(self): if len(self) == 0: return latex.latex(self.__unit) try: atomic = ((isinstance(self[0][0], (int, long)) or \ self[0][0].parent().is_atomic_repr())) except AttributeError: atomic = False s = '' for i in range(len(self)): t = latex.latex(self[i][0]) if not atomic and ('+' in t or '-' in t or ' ' in t): t = '(%s)'%t n = self[i][1] if n != 1: t += '^{%s}'%latex.latex(n) s += t if i < len(self)-1: s += ' \\cdot ' if self.__unit != 1: if atomic: u = latex.latex(self.__unit) else: u = '\\left(%s\\right)'%latex.latex(self.__unit) s = u + ' \\cdot ' + s return s
7b30ddb30ae1a435bd7243058fc57880a92701a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b30ddb30ae1a435bd7243058fc57880a92701a4/factorization.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 26264, 67, 12, 2890, 4672, 309, 562, 12, 2890, 13, 422, 374, 30, 327, 25079, 18, 26264, 12, 2890, 16186, 4873, 13, 775, 30, 7960, 273, 14015, 291, 1336, 12, 2890, 63, 20, 6362, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26264, 67, 12, 2890, 4672, 309, 562, 12, 2890, 13, 422, 374, 30, 327, 25079, 18, 26264, 12, 2890, 16186, 4873, 13, 775, 30, 7960, 273, 14015, 291, 1336, 12, 2890, 63, 20, 6362, ...
return _BindParamClause(self.name, obj, _compared_to_operator=operator, _compared_to_type=self.type, unique=True)
return _BindParamClause(self.name, obj, _compared_to_operator=operator, _compared_to_type=self.type, unique=True)
def _bind_param(self, operator, obj): return _BindParamClause(self.name, obj, _compared_to_operator=operator, _compared_to_type=self.type, unique=True)
0b93f88d2c199737f8d1202bb95240fed122b531 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1074/0b93f88d2c199737f8d1202bb95240fed122b531/expression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4376, 67, 891, 12, 2890, 16, 3726, 16, 1081, 4672, 327, 389, 3357, 786, 7044, 12, 2890, 18, 529, 16, 1081, 16, 389, 9877, 72, 67, 869, 67, 9497, 33, 9497, 16, 389, 9877, 72, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4376, 67, 891, 12, 2890, 16, 3726, 16, 1081, 4672, 327, 389, 3357, 786, 7044, 12, 2890, 18, 529, 16, 1081, 16, 389, 9877, 72, 67, 869, 67, 9497, 33, 9497, 16, 389, 9877, 72, 6...
from twisted.python import components
def wchild_more(self, request): return self
b9862e1e72353c749b084a9b5c9ea54b37ea7278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b9862e1e72353c749b084a9b5c9ea54b37ea7278/login.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 3624, 67, 10161, 12, 2890, 16, 590, 4672, 327, 365, 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, 341, 3624, 67, 10161, 12, 2890, 16, 590, 4672, 327, 365, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return '0x%04x' % t
return '0x%0*X' % (precision, t)
def hexrepr(t): if t is None: return 'None' try: len(t) except: return '0x%04x' % t try: return '(' + ', '.join(map(lambda t: '0x%04x' % t, t)) + ')' except TypeError, why: print '* failed to convert %r: %s' % (t, why) raise
4921a875d0f169be4b60ad4a8387987255fa01ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4921a875d0f169be4b60ad4a8387987255fa01ac/gencodec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3827, 12715, 12, 88, 4672, 225, 309, 268, 353, 599, 30, 327, 296, 7036, 11, 775, 30, 562, 12, 88, 13, 1335, 30, 327, 296, 20, 92, 9, 20, 14, 60, 11, 738, 261, 14548, 16, 268, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3827, 12715, 12, 88, 4672, 225, 309, 268, 353, 599, 30, 327, 296, 7036, 11, 775, 30, 562, 12, 88, 13, 1335, 30, 327, 296, 20, 92, 9, 20, 14, 60, 11, 738, 261, 14548, 16, 268, 13,...
d = self.get('date', None)
d = self.get('date', '').strip()
def date(self): d = self.get('date', None) if d: return parseDatetimetz(self.get('date')) return datetime.datetime.now()
9a6987d6f11ace6d7b6871806cc8e60db9e00283 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6274/9a6987d6f11ace6d7b6871806cc8e60db9e00283/emailmessage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1509, 12, 2890, 4672, 302, 273, 365, 18, 588, 2668, 712, 2187, 875, 2934, 6406, 1435, 309, 302, 30, 327, 1109, 5139, 278, 381, 278, 94, 12, 2890, 18, 588, 2668, 712, 26112, 225, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1509, 12, 2890, 4672, 302, 273, 365, 18, 588, 2668, 712, 2187, 875, 2934, 6406, 1435, 309, 302, 30, 327, 1109, 5139, 278, 381, 278, 94, 12, 2890, 18, 588, 2668, 712, 26112, 225, 327, ...
if sub >= 5: header = "\033[01;32m\n" if sub >= g_max_sub: g_max_sub = sub header = "\033[01;33m\n"
if sub >= g_max_sub: g_max_sub = sub header = "\033[01;33m" elif sub >= 5: header = "\033[01;32m" if not valid: header = "\033[01;31m"
def update(self, index, left_score, rigt_score, valid): global g_max_sub
2de7dc9c2b01f64ae003edf0798f21745ad80d56 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/600/2de7dc9c2b01f64ae003edf0798f21745ad80d56/process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 770, 16, 2002, 67, 6355, 16, 436, 360, 88, 67, 6355, 16, 923, 4672, 2552, 314, 67, 1896, 67, 1717, 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, 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, 1089, 12, 2890, 16, 770, 16, 2002, 67, 6355, 16, 436, 360, 88, 67, 6355, 16, 923, 4672, 2552, 314, 67, 1896, 67, 1717, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
{'pattern': r'\[url\](.*?)\[/url\]', 'repl': r'<a href="\1">\1</a>'}, {'pattern': r'\[url=(.*?)\](.*?)\[/url\]', 'repl': r'<a href="\1">\2</a>'}, {'pattern': r'\[link\](.*?)\[/link\]', 'repl': r'<a href="\1">\1</a>'}, {'pattern': r'\[link=(.*?)\](.*?)\[/link\]', 'repl': r'<a href="\1">\2</a>'}, {'pattern': r'\[email\](.*?)\[/email\]', 'repl': r'<a href="mailto:\1">\1</a>'}, {'pattern': r'\[email=(.*?)\](.*?)\[/email\]', 'repl': r'<a href="mailto:\1">\2</a>'}, {'pattern': r'\[img\](.*?)\[/img\]', 'repl': r'<img src="\1">'}, {'pattern': r'\[img=(.*?)\](.*?)\[/img\]', 'repl': r'<img src="\1" alt="\2">'},
{'pattern': r'\[url\]%s\[/url\]' % URL_RE, 'repl': r'<a href="\1">\1</a>'}, {'pattern': r'\[url=%s\](.*?)\[/url\]' % URL_RE, 'repl': r'<a href="\1">\3</a>'}, {'pattern': r'\[link\]%s\[/link\]' % URL_RE, 'repl': r'<a href="\1">\1</a>'}, {'pattern': r'\[link=%s\](.*?)\[/link\]' % URL_RE, 'repl': r'<a href="\1">\3</a>'}, {'pattern': r'\[email\]%s\[/email\]' % EMAIL_RE, 'repl': r'<a href="mailto:\1">\1</a>'}, {'pattern': r'\[email=%s\](.*?)\[/email\]' % EMAIL_RE, 'repl': r'<a href="mailto:\1">\5</a>'}, {'pattern': r'\[img\]%s\[/img\]' % URL_RE, 'repl': r'<img src="\1">'}, {'pattern': r'\[img=%s\](.*?)\[/img\]' % URL_RE, 'repl': r'<img src="\1" alt="\3">'},
def code_parser(matchobj): """ Escaping bbcode and html tags between [code] tags. """ value = matchobj.group(1) value = value.replace('[', '&#91;') value = value.replace(']', '&#93;') value = value.replace('<br />', '\n') return "<pre><code>%s</code></pre>" % value
7bdc07f42d3ee7c8b40b8fe8999525162d92bc2f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13701/7bdc07f42d3ee7c8b40b8fe8999525162d92bc2f/bbmarkup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 981, 67, 4288, 12, 1916, 2603, 4672, 3536, 512, 1017, 24447, 7129, 710, 471, 1729, 2342, 3086, 306, 710, 65, 2342, 18, 3536, 225, 460, 273, 845, 2603, 18, 1655, 12, 21, 13, 460, 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, 981, 67, 4288, 12, 1916, 2603, 4672, 3536, 512, 1017, 24447, 7129, 710, 471, 1729, 2342, 3086, 306, 710, 65, 2342, 18, 3536, 225, 460, 273, 845, 2603, 18, 1655, 12, 21, 13, 460, 273, ...
sage: G = graphs.PetersenGraph() sage: G.kirchhoff_matrix() [ 3 -1 0 0 -1 -1 0 0 0 0] [-1 3 -1 0 0 0 -1 0 0 0] [ 0 -1 3 -1 0 0 0 -1 0 0] [ 0 0 -1 3 -1 0 0 0 -1 0] [-1 0 0 -1 3 0 0 0 0 -1] [-1 0 0 0 0 3 0 -1 -1 0] [ 0 -1 0 0 0 0 3 0 -1 -1] [ 0 0 -1 0 0 -1 0 3 0 -1] [ 0 0 0 -1 0 -1 -1 0 3 0] [ 0 0 0 0 -1 0 -1 -1 0 3] sage: G = graphs.Grid2dGraph(3,3)
sage: G = Graph() sage: G.add_edges([(0,1,1),(1,2,2),(0,2,3),(0,3,4)]) sage: M = G.kirchhoff_matrix(weighted=True); M [ 8 -1 -3 -4] [-1 3 -2 0] [-3 -2 5 0] [-4 0 0 4]
def kirchhoff_matrix(self): """ Returns the Kirchhoff matrix (a.k.a. the Laplacian) of the graph.
928e3f8dd0a83c7962a3f00f910838348623d97d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/928e3f8dd0a83c7962a3f00f910838348623d97d/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 417, 481, 343, 76, 3674, 67, 5667, 12, 2890, 4672, 3536, 2860, 326, 1475, 481, 343, 76, 3674, 3148, 261, 69, 18, 79, 18, 69, 18, 326, 21072, 30538, 2779, 13, 434, 326, 2667, 18, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 417, 481, 343, 76, 3674, 67, 5667, 12, 2890, 4672, 3536, 2860, 326, 1475, 481, 343, 76, 3674, 3148, 261, 69, 18, 79, 18, 69, 18, 326, 21072, 30538, 2779, 13, 434, 326, 2667, 18, 2, ...
self.pack_start(self.image_window, False, False)
self.contents.pack_start(self.image_window, False, False)
def __init__(self, image_width = 0, image_height = 0, pixbuf = 0, x = 0, y = 0, width = 0, height = 0, ocr_engines_list = []): super(BoxEditor, self).__init__() self.pixbuf = pixbuf self.image_window = gtk.ScrolledWindow() self.image_window.set_size_request(200, 200) self.image_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.x_spin_button = gtk.SpinButton(gtk.Adjustment(0,0,0,1), 1.0, 0) self.setX(x) self.y_spin_button = gtk.SpinButton(gtk.Adjustment(0,0,0,1), 1.0, 0) self.setY(y) self.width_spin_button = gtk.SpinButton(gtk.Adjustment(0,0,0,1), 1.0, 0) self.setWidth(width) self.height_spin_button = gtk.SpinButton(gtk.Adjustment(0,0,0,1), 1.0, 0) self.setHeight(height) self.make_text_button = self.__makeRadioButton(_('Text'), 'gnome-mime-text') self.make_image_button = self.__makeRadioButton(_('Image'), 'gnome-mime-image', self.make_text_button) box_type_frame = gtk.Frame(_('Type')) box_type_table = gtk.Table(1, 2, True) box_type_table.attach(self.make_text_button, 0, 1, 0, 1) box_type_table.attach(self.make_image_button, 1, 2, 0, 1) box_type_frame.add(box_type_table) self.pack_start(box_type_frame, False, False) self.image_width = image_width self.image_height = image_height self.pack_start(self.image_window, False, False) dimensions_frame = gtk.Frame(_('Bounds')) dimensions_table = gtk.Table(2, 4, True) dimensions_table.attach(gtk.Label(_('X')), 0, 1, 0, 1) dimensions_table.attach(self.x_spin_button, 1, 2, 0, 1) dimensions_table.attach(gtk.Label(_('Y')), 2, 3, 0, 1) dimensions_table.attach(self.y_spin_button, 3, 4, 0, 1) dimensions_table.attach(gtk.Label(_('Width')), 0, 1, 1, 2) dimensions_table.attach(self.width_spin_button, 1, 2, 1, 2) dimensions_table.attach(gtk.Label(_('Height')), 2, 3, 1, 2) dimensions_table.attach(self.height_spin_button, 3, 4, 1, 2) dimensions_frame.add(dimensions_table) self.pack_start(dimensions_frame, False, False) self.setXRange() self.setYRange() self.setWidthRange() self.setHeightRange() self.text_properties_frame = self.__makeOcrProperties(ocr_engines_list) self.add(self.text_properties_frame) self.set_spacing(10) self.show_all()
0aaed0a9481d2dc56c4287a7a5e7804d4fe8ab22 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3764/0aaed0a9481d2dc56c4287a7a5e7804d4fe8ab22/widgetPresenter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1316, 67, 2819, 273, 374, 16, 1316, 67, 4210, 273, 374, 16, 11871, 4385, 273, 374, 16, 619, 273, 374, 16, 677, 273, 374, 16, 1835, 273, 374, 16, 2072, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1316, 67, 2819, 273, 374, 16, 1316, 67, 4210, 273, 374, 16, 11871, 4385, 273, 374, 16, 619, 273, 374, 16, 677, 273, 374, 16, 1835, 273, 374, 16, 2072, ...
'status', 'parser')
'status')
def _set_common_attributes(self, post): forms.set_fields(post, self.data, 'comments_enabled', 'pings_enabled', 'status', 'parser') post.bind_categories(self.data['categories']) post.bind_tags(self.data['tags'])
990ae6efe379500753f0bd7519ae9ea17940993d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12815/990ae6efe379500753f0bd7519ae9ea17940993d/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 6054, 67, 4350, 12, 2890, 16, 1603, 4672, 10138, 18, 542, 67, 2821, 12, 2767, 16, 365, 18, 892, 16, 296, 9231, 67, 5745, 2187, 296, 4675, 67, 5745, 2187, 296, 2327, 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, 389, 542, 67, 6054, 67, 4350, 12, 2890, 16, 1603, 4672, 10138, 18, 542, 67, 2821, 12, 2767, 16, 365, 18, 892, 16, 296, 9231, 67, 5745, 2187, 296, 4675, 67, 5745, 2187, 296, 2327, 613...
prof_bin += [join(gsl_install_dir, "bin")]; prof_ld += [join(gsl_install_dir, "lib")];
if not join(gsl_install_dir, "bin") in prof_bin: prof_bin += [join(gsl_install_dir, "bin")]; if not join(gsl_install_dir, "lib") in prof_ld: prof_ld += [join(gsl_install_dir, "lib")]; print prof_ld, prof_bin
def progress(blocks, blocksize, total): ESC = chr(27); sys.stdout.write(ESC + '[2K' + ESC+'[G') text = " %i of %i bytes (%.0f percent) complete" % (blocks*blocksize, total, float(blocks*blocksize*100)/total) sys.stdout.write(text + '\x08'*len(text)) sys.stdout.flush()
5ff66dc64e37f9a7c6636b5707a4985d48a30bea /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5491/5ff66dc64e37f9a7c6636b5707a4985d48a30bea/getbuildtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4007, 12, 7996, 16, 18440, 16, 2078, 4672, 512, 2312, 273, 4513, 12, 5324, 1769, 2589, 18, 10283, 18, 2626, 12, 41, 2312, 397, 5271, 22, 47, 11, 397, 512, 2312, 6797, 63, 43, 6134, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4007, 12, 7996, 16, 18440, 16, 2078, 4672, 512, 2312, 273, 4513, 12, 5324, 1769, 2589, 18, 10283, 18, 2626, 12, 41, 2312, 397, 5271, 22, 47, 11, 397, 512, 2312, 6797, 63, 43, 6134, 9...
W = notebook.import_worksheet(filename, self.username) except IOError, msg: print msg raise ValueError, "Unfortunately, there was an error uploading the worksheet. It could be an old unsupported format or worse. If you desparately need its contents contact the Google group sage-support and post a link to your worksheet. Alternatively, an sws file is just a bzip2'd tarball; take a look inside!" finally: os.unlink(filename) if dir: shutil.rmtree(dir) except ValueError, msg: s = "Error uploading worksheet '%s'."%msg return http.Response(stream = message(s, '/')) if ctx.args.has_key('nameField'): new_name = ctx.args['nameField'][0].strip() if new_name: W.set_name(new_name) return http.RedirectResponse('/home/'+W.filename())
try: W = notebook.import_worksheet(filename, self.username) except IOError, msg: print msg raise ValueError, "Unfortunately, there was an error uploading the worksheet. It could be an old unsupported format or worse. If you desparately need its contents contact the Google group sage-support and post a link to your worksheet. Alternatively, an sws file is just a bzip2'd tarball; take a look inside!" finally: os.unlink(filename) if dir: shutil.rmtree(dir) except ValueError, msg: s = "Error uploading worksheet '%s'."%msg return http.Response(stream = message(s, '/')) if ctx.args.has_key('nameField'): new_name = ctx.args['nameField'][0].strip() if new_name: W.set_name(new_name) return http.RedirectResponse('/home/'+W.filename()) if url != '': from twisted.web.client import downloadPage d = downloadPage(url, filename) d.addCallback(callback) return d else: return callback(None)
def render(self, ctx): url = ctx.args['urlField'][0].strip() dir = '' # we will delete the directory below if it is used if url != '': # downloading a file from the internet filename = get_remote_file(url, verbose=True) else: # uploading a file from the user's computer dir = tmp_dir() filename = ctx.files['fileField'][0][0] # Make tmp file in SAGE temp directory filename = '%s/%s'%(dir, filename) f = file(filename,'wb') # Then download to that file. f.write(ctx.files['fileField'][0][2].read()) # TODO: Server blocking issues (?!) f.close()
63bff0af61658cb5c245d9f61e2a2178f58417cb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/63bff0af61658cb5c245d9f61e2a2178f58417cb/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 880, 273, 1103, 18, 1968, 3292, 718, 974, 3546, 63, 20, 8009, 6406, 1435, 1577, 273, 875, 225, 468, 732, 903, 1430, 326, 1867, 5712, 309, 518, 353, 1399...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 880, 273, 1103, 18, 1968, 3292, 718, 974, 3546, 63, 20, 8009, 6406, 1435, 1577, 273, 875, 225, 468, 732, 903, 1430, 326, 1867, 5712, 309, 518, 353, 1399...
if type(transparent) is False:
if transparent is False:
def save_png(self, filepath=None, font='', transparent=False, **kwargs): ''' Save png version of the plot.
523653143a10c16be8609e4d92cfcf175c7fc84e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6471/523653143a10c16be8609e4d92cfcf175c7fc84e/qtgnuplot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 6446, 12, 2890, 16, 3608, 33, 7036, 16, 3512, 2218, 2187, 17270, 33, 8381, 16, 2826, 4333, 4672, 9163, 7074, 14476, 1177, 434, 326, 3207, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 1923, 67, 6446, 12, 2890, 16, 3608, 33, 7036, 16, 3512, 2218, 2187, 17270, 33, 8381, 16, 2826, 4333, 4672, 9163, 7074, 14476, 1177, 434, 326, 3207, 18, 2, -100, -100, -100, -100, -100, ...
return self.Get(url, desired_class=str)
return self.Get(url).read()
def get_photo(self, contact_entry_or_url): """Retrives the binary data for the contact's profile photo as a string. Args: contact_entry_or_url: a gdata.contacts.ContactEntry objecr or a string containing the photo link's URL. If the contact entry does not contain a photo link, the image will not be fetched and this method will return None. """ # TODO: add the ability to write out the binary image data to a file, # reading and writing a chunk at a time to avoid potentially using up # large amounts of memory. url = None if isinstance(contact_entry_or_url, gdata.contacts.data.ContactEntry): photo_link = contact_entry_or_url.GetPhotoLink() if photo_link: url = photo_link.href else: url = contact_entry_or_url if url: return self.Get(url, desired_class=str) else: return None
43071c5e333531269269244c5d63496b73e294c8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6580/43071c5e333531269269244c5d63496b73e294c8/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 17232, 12, 2890, 16, 5388, 67, 4099, 67, 280, 67, 718, 4672, 3536, 7055, 86, 3606, 326, 3112, 501, 364, 326, 5388, 1807, 3042, 10701, 487, 279, 533, 18, 225, 6634, 30, 5388, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 17232, 12, 2890, 16, 5388, 67, 4099, 67, 280, 67, 718, 4672, 3536, 7055, 86, 3606, 326, 3112, 501, 364, 326, 5388, 1807, 3042, 10701, 487, 279, 533, 18, 225, 6634, 30, 5388, ...
return Topology.objects.get(id=id)
try: return Topology.objects.get(id=id) except Topology.DoesNotExit: raise fault.new(fault.NO_SUCH_TOPOLOGY, "No such topology: %s" % id)
def get(id): return Topology.objects.get(id=id)
e0106587275640c21bf257ecdd094f17f6cad3f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3860/e0106587275640c21bf257ecdd094f17f6cad3f1/topology.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 350, 4672, 775, 30, 327, 19726, 18, 6911, 18, 588, 12, 350, 33, 350, 13, 1335, 19726, 18, 10154, 1248, 6767, 30, 1002, 12530, 18, 2704, 12, 643, 18, 3417, 67, 19958, 67, 429...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 350, 4672, 775, 30, 327, 19726, 18, 6911, 18, 588, 12, 350, 33, 350, 13, 1335, 19726, 18, 10154, 1248, 6767, 30, 1002, 12530, 18, 2704, 12, 643, 18, 3417, 67, 19958, 67, 429...
f=open(filename,'r')
'''Reads metadata (properties for nodes) from a file. Usage: loadNodeProperties(net,filename,splitterChar=None). The metadata file can contain any number of columns; first row is reserved for headers. The first column header should be node_label, and the column should contain similar labels for nodes as used in the network, i.e. each label should be a node of net. Other columns contain user-defined properties, and the column headers are automatically appended to the property list. Example input file format: node_label node_color node_class node1 blue class1 ''' def isanum(str): from string import digits for c in str: if not c in digits: return 0 return 1 f=open(filename,'rU')
def loadNodeProperties(net,filename,splitterChar=None): #todo: see if the node names are strings, ints or floats f=open(filename,'r') #Read in the fields line=f.readline() fieldNames=line.strip().split(splitterChar) nfields=len(fieldNames) if fieldNames[0]!="name": raise Exception("The properties file should define the first field as \"name\".") #Add the property names to the net for field in range(1,nfields): netext.addNodeProperty(net,fieldNames[field]) #Add the properties for each node for i,line in enumerate(f): fields=line.strip().split(splitterChar) if len(fields)!=nfields: raise Exception("Invalid number of fields on row: "+str(i+2)) nodeName=fields[0] #todo: see if node is in net for field in range(1,nfields): net.nodeProperty[fieldNames[field]][nodeName]=fields[field]
986d249c3034061b5c04ed08c97300325b9fc335 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/768/986d249c3034061b5c04ed08c97300325b9fc335/netio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 907, 2297, 12, 2758, 16, 3459, 16, 4939, 387, 2156, 33, 7036, 4672, 468, 9012, 30, 2621, 309, 326, 756, 1257, 854, 2064, 16, 15542, 578, 19172, 26418, 7483, 1982, 261, 4738, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 907, 2297, 12, 2758, 16, 3459, 16, 4939, 387, 2156, 33, 7036, 4672, 468, 9012, 30, 2621, 309, 326, 756, 1257, 854, 2064, 16, 15542, 578, 19172, 26418, 7483, 1982, 261, 4738, 364, ...
Cw = Matrix(P,e,e, columns).transpose()
Cw = Matrix(P, e, e, columns).transpose()
def inversion_polynomials_single_sbox(self, x= None, w=None, biaffine_only=None, correct_only=None): """ Generator for S-Box inversion polynomials of a single sbox.
26b5b14a2a46b23848ccefac3b41425cf353e86a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/26b5b14a2a46b23848ccefac3b41425cf353e86a/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 1589, 67, 3915, 13602, 87, 67, 7526, 67, 87, 2147, 12, 2890, 16, 619, 33, 599, 16, 341, 33, 7036, 16, 324, 1155, 1403, 558, 67, 3700, 33, 7036, 16, 3434, 67, 3700, 33, 7036, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 1589, 67, 3915, 13602, 87, 67, 7526, 67, 87, 2147, 12, 2890, 16, 619, 33, 599, 16, 341, 33, 7036, 16, 324, 1155, 1403, 558, 67, 3700, 33, 7036, 16, 3434, 67, 3700, 33, 7036, 4...
namegroup = self.explicit.groups.target.name
def hyperlink_target(self, match): pattern = self.explicit.patterns.target namegroup = self.explicit.groups.target.name lineno = self.state_machine.abs_line_number() block, indent, offset, blank_finish = \ self.state_machine.get_first_known_indented( match.end(), until_blank=1, strip_indent=0) blocktext = match.string[:match.end()] + '\n'.join(block) block = [escape2null(line) for line in block] escaped = block[0] blockindex = 0 while 1: targetmatch = pattern.match(escaped) if targetmatch: break blockindex += 1 try: escaped += block[blockindex] except (IndexError, MarkupError): raise MarkupError('malformed hyperlink target at line %s.' % lineno) del block[:blockindex] block[0] = (block[0] + ' ')[targetmatch.end()-len(escaped)-1:].strip() if block and block[-1].strip()[-1:] == '_': # possible indirect target reference = ' '.join([line.strip() for line in block]) refname = self.is_reference(reference) if refname: target = nodes.target(blocktext, '', refname=refname) self.add_target(targetmatch.group(namegroup), '', target) self.document.note_indirect_target(target) return [target], blank_finish nodelist = [] reference = ''.join([line.strip() for line in block]) if reference.find(' ') != -1: warning = self.reporter.warning( 'Hyperlink target at line %s contains whitespace. ' 'Perhaps a footnote was intended?' % (self.state_machine.abs_line_number() - len(block) + 1), '', nodes.literal_block(blocktext, blocktext)) nodelist.append(warning) else: unescaped = unescape(reference) target = nodes.target(blocktext, '') self.add_target(targetmatch.group(namegroup), unescaped, target) nodelist.append(target) return nodelist, blank_finish
9aa86b66cf632d24cd8412c352ecb461084727da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/9aa86b66cf632d24cd8412c352ecb461084727da/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9512, 1232, 67, 3299, 12, 2890, 16, 845, 4672, 1936, 273, 365, 18, 16511, 18, 13317, 18, 3299, 7586, 273, 365, 18, 2019, 67, 9149, 18, 5113, 67, 1369, 67, 2696, 1435, 1203, 16, 3504, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9512, 1232, 67, 3299, 12, 2890, 16, 845, 4672, 1936, 273, 365, 18, 16511, 18, 13317, 18, 3299, 7586, 273, 365, 18, 2019, 67, 9149, 18, 5113, 67, 1369, 67, 2696, 1435, 1203, 16, 3504, ...
1/x + 1/2 - (x/12) + x^2/24 - (19*x^3/720)
1/x + 1/2 - x/12 + x^2/24 - (19*x^3/720)
def taylor(self, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable v around the point a, containing terms through $(x - a)^n$.
704a652e2c7e5dbfb231de9aebca508a4fd72309 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/704a652e2c7e5dbfb231de9aebca508a4fd72309/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 528, 80, 280, 12, 2890, 16, 331, 16, 279, 16, 290, 4672, 3536, 7784, 5708, 365, 316, 279, 15282, 399, 528, 80, 280, 578, 511, 8377, 547, 4166, 316, 326, 2190, 331, 6740, 326, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 528, 80, 280, 12, 2890, 16, 331, 16, 279, 16, 290, 4672, 3536, 7784, 5708, 365, 316, 279, 15282, 399, 528, 80, 280, 578, 511, 8377, 547, 4166, 316, 326, 2190, 331, 6740, 326, 16...
self.recipients = recipients
self.recipients = list(recipients)
def __init__(self, subject, recipients=None, body=None, html=None, sender=None): if sender is None: sender = current_app.config.get("DEFAULT_MAIL_SENDER")
7aa3563ecd7b61713b9590274ece10a23924595c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11489/7aa3563ecd7b61713b9590274ece10a23924595c/mail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3221, 16, 12045, 33, 7036, 16, 1417, 33, 7036, 16, 1729, 33, 7036, 16, 5793, 33, 7036, 4672, 225, 309, 5793, 353, 599, 30, 5793, 273, 783, 67, 2910, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3221, 16, 12045, 33, 7036, 16, 1417, 33, 7036, 16, 1729, 33, 7036, 16, 5793, 33, 7036, 4672, 225, 309, 5793, 353, 599, 30, 5793, 273, 783, 67, 2910, 18...
if self.test_spd_say(port=speechd_port): dispatcher_working = True skip = question("Speech Dispatcher works. Do you want to skip other tests?", True) if skip: return {'dispatcher_working': True}
if speechd_running: if self.test_spd_say(port=speechd_port): dispatcher_working = True skip = question("Speech Dispatcher works. Do you want to skip other tests?", True) if skip: return {'dispatcher_working': True} else: dispatcher_working = False
def diagnostics(self, speechd_port = 6560, output_modules=[], audio_output=[]):
dab9cc834627fd61bc20c697201ecaf74e719ab1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7484/dab9cc834627fd61bc20c697201ecaf74e719ab1/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22568, 12, 2890, 16, 24556, 72, 67, 655, 273, 1666, 4313, 20, 16, 876, 67, 6400, 22850, 6487, 7447, 67, 2844, 33, 8526, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22568, 12, 2890, 16, 24556, 72, 67, 655, 273, 1666, 4313, 20, 16, 876, 67, 6400, 22850, 6487, 7447, 67, 2844, 33, 8526, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.cal.append(str(i))
self.cal_days.append(str(i))
def SetCal(self, year, month): self.InitValues() # reset initial values
b25cb7db43121f1f6899b7ebfcd6ccc3806dd0f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/b25cb7db43121f1f6899b7ebfcd6ccc3806dd0f6/calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 3005, 12, 2890, 16, 3286, 16, 3138, 4672, 365, 18, 2570, 1972, 1435, 4202, 468, 2715, 2172, 924, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 3005, 12, 2890, 16, 3286, 16, 3138, 4672, 365, 18, 2570, 1972, 1435, 4202, 468, 2715, 2172, 924, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
print 'Change directory to ' + CHROMIUM_SOURCE_DIR os.chdir(CHROMIUM_SOURCE_DIR)
print 'Change directory to ' + options.source_dir os.chdir(options.source_dir) coverity_password = _ReadPassword(options.coverity_password_file)
def main(options, args): """Runs all the selected tests for the given build type and target.""" # Create the lock file to prevent another instance of this script from # running. lock_filename = '%s\\%s' % (CHROMIUM_SOURCE_DIR, LOCK_FILE) try: lock_file = os.open(lock_filename, os.O_CREAT | os.O_EXCL | os.O_TRUNC | os.O_RDWR) except OSError, err: print 'Failed to open lock file:\n ' + str(err) return 1 # Write the pid of this script (the python.exe process) to the lock file. os.write(lock_file, str(os.getpid())) options.target = options.target.title() start_time = time.time() print 'Change directory to ' + CHROMIUM_SOURCE_DIR os.chdir(CHROMIUM_SOURCE_DIR) cmd = 'gclient sync' _RunCommand(cmd, options.dry_run, shell=True) print 'Elapsed time: %ds' % (time.time() - start_time) # Do a clean build. Remove the build output directory first. # TODO(wtc): Consider using Python's rmtree function in the shutil module, # or the RemoveDirectory function in # trunk/tools/buildbot/scripts/common/chromium_utils.py. cmd = 'rmdir /s /q %s\\%s\\%s' % (CHROMIUM_SOURCE_DIR, CHROMIUM_SOLUTION_DIR, options.target) _RunCommand(cmd, options.dry_run, shell=True) print 'Elapsed time: %ds' % (time.time() - start_time) cmd = '%s\\cov-build.exe --dir %s devenv.com %s\\%s /build %s' % ( COVERITY_BIN_DIR, COVERITY_INTERMEDIATE_DIR, CHROMIUM_SOURCE_DIR, CHROMIUM_SOLUTION_FILE, options.target) _RunCommand(cmd, options.dry_run) print 'Elapsed time: %ds' % (time.time() - start_time) cmd = '%s\\cov-analyze.exe --dir %s %s' % (COVERITY_BIN_DIR, COVERITY_INTERMEDIATE_DIR, COVERITY_ANALYZE_OPTIONS) _RunCommand(cmd, options.dry_run) print 'Elapsed time: %ds' % (time.time() - start_time) cmd = ('%s\\cov-commit-defects.exe --dir %s --remote %s --port %s' '--product %s ' '--target %s ' '--user %s ' '--password %s') % (COVERITY_BIN_DIR, COVERITY_INTERMEDIATE_DIR, COVERITY_REMOTE, COVERITY_PORT, COVERITY_PRODUCT, COVERITY_TARGET, COVERITY_USER, CHROMIUM_PASSWORD) _RunCommand(cmd, options.dry_run) print 'Total time: %ds' % (time.time() - start_time) os.close(lock_file) os.remove(lock_filename) return 0
97a075ca3e52e81079b87f05b3b06a1c30ace6e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/97a075ca3e52e81079b87f05b3b06a1c30ace6e5/coverity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 3536, 9361, 777, 326, 3170, 7434, 364, 326, 864, 1361, 618, 471, 1018, 12123, 468, 1788, 326, 2176, 585, 358, 5309, 4042, 791, 434, 333, 2728, 628, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 3536, 9361, 777, 326, 3170, 7434, 364, 326, 864, 1361, 618, 471, 1018, 12123, 468, 1788, 326, 2176, 585, 358, 5309, 4042, 791, 434, 333, 2728, 628, 468, ...
if program_name == "thinca":
if program_name == "thinca":
def get_background_livetime_by_slide(connection, program_name, seglists, veto_segments=None, verbose = False): if program_name == "thinca": return background_livetime_ring_by_slide(connection, program_name, seglists, veto_segments, verbose) if program_name == "gstlal_inspiral": return background_livetime_nonring_by_slide(connection, seglists, veto_segments, verbose)
b1497fc0da111e4d5c79a92b091f6259f9f9d0f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/b1497fc0da111e4d5c79a92b091f6259f9f9d0f5/farutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9342, 67, 80, 427, 2374, 67, 1637, 67, 26371, 12, 4071, 16, 5402, 67, 529, 16, 2291, 9772, 16, 331, 11453, 67, 12838, 33, 7036, 16, 3988, 273, 1083, 4672, 225, 309, 5402, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9342, 67, 80, 427, 2374, 67, 1637, 67, 26371, 12, 4071, 16, 5402, 67, 529, 16, 2291, 9772, 16, 331, 11453, 67, 12838, 33, 7036, 16, 3988, 273, 1083, 4672, 225, 309, 5402, 67...
if None != self.output: self.output.initialize() self.output.writeInfo()
self.output.initialize() self.output.writeInfo()
def initialize(self, totalTime, numTimeSteps): """ Initialize DirichletBoundary boundary condition. """ logEvent = "%sinit" % self._loggingPrefix self._logger.eventBegin(logEvent) assert(None != self.cppHandle) self.dbRate.initialize() self.cppHandle.dbRate = self.dbRate.cppHandle
f63c412130c179e1852644591511e33f34e09c87 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8645/f63c412130c179e1852644591511e33f34e09c87/DirichletBoundary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2890, 16, 2078, 950, 16, 818, 950, 11811, 4672, 3536, 9190, 8446, 1354, 1810, 11941, 7679, 2269, 18, 3536, 25424, 273, 2213, 87, 2738, 6, 738, 365, 6315, 11167, 2244, 365, 6315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2890, 16, 2078, 950, 16, 818, 950, 11811, 4672, 3536, 9190, 8446, 1354, 1810, 11941, 7679, 2269, 18, 3536, 25424, 273, 2213, 87, 2738, 6, 738, 365, 6315, 11167, 2244, 365, 6315...
bitmap = wx.ArtProvider.GetBitmap( self.GetToolBarImageName(), client = wx.ART_TOOLBAR, size = toolbar.GetToolBitmapSize() )
imageName = self.GetToolBarImageName() if not imageName: imageName = 'generic' bitmap = wx.ArtProvider.GetBitmap( imageName, client = wx.ART_TOOLBAR, size = toolbar.GetToolBitmapSize() )
def AppendInToolBar(self, parent, toolbar, controlId): bitmap = wx.ArtProvider.GetBitmap( self.GetToolBarImageName(), client = wx.ART_TOOLBAR, size = toolbar.GetToolBitmapSize() ) tool = toolbar.AddLabelTool( id = controlId, label = self.GetCaption(), bitmap = bitmap, kind = self.GetKind(), shortHelp = self.GetToolTipText(), longHelp = self.GetToolTipText() ) tool.Enable(self.enabled) parent.Bind(wx.EVT_TOOL, EventToCommandExecutionAdapter(self).Execute, tool) self.tools.add( tool ) return tool
f9de156ac41ca237d2f23961afa8287738f19945 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14747/f9de156ac41ca237d2f23961afa8287738f19945/Command.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6181, 382, 6364, 5190, 12, 2890, 16, 982, 16, 12748, 16, 3325, 548, 4672, 29842, 273, 365, 18, 967, 6364, 5190, 2040, 461, 1435, 309, 486, 29842, 30, 29842, 273, 296, 13540, 11, 9389, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6181, 382, 6364, 5190, 12, 2890, 16, 982, 16, 12748, 16, 3325, 548, 4672, 29842, 273, 365, 18, 967, 6364, 5190, 2040, 461, 1435, 309, 486, 29842, 30, 29842, 273, 296, 13540, 11, 9389, ...
if name.startswith(prefix):
if prefixes: sw = name.startswith for prefix in prefixes: if sw(prefix): names[name] = tag else:
def findnames(file, prefix=""): names = {} for line in file.readlines(): if line[0] == '!': continue fields = line.split() name, tag = fields[0], fields[-1] if tag == 'd' and name.endswith('_H'): continue if name.startswith(prefix): names[name] = tag return names
3765bd23f1517b1a04fc6472a2ca1e8ea61a227f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3765bd23f1517b1a04fc6472a2ca1e8ea61a227f/undoc_symbols.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 1973, 12, 768, 16, 1633, 1546, 6, 4672, 1257, 273, 2618, 364, 980, 316, 585, 18, 896, 3548, 13332, 309, 980, 63, 20, 65, 422, 11817, 4278, 1324, 1466, 273, 980, 18, 4939, 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, 1104, 1973, 12, 768, 16, 1633, 1546, 6, 4672, 1257, 273, 2618, 364, 980, 316, 585, 18, 896, 3548, 13332, 309, 980, 63, 20, 65, 422, 11817, 4278, 1324, 1466, 273, 980, 18, 4939, 1435, ...
rrnd *= n / (n - 1.0) prnd *= n / (n - 1.0)
rrnd *= np.sqrt(n / (n - 1.0)) prnd *= np.sqrt(n / (n - 1.0))
def step(self, f): atoms = self.atoms p = self.atoms.get_momenta()
9c2fed2c1f457ad8ae731e30616d4191eaef1753 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5572/9c2fed2c1f457ad8ae731e30616d4191eaef1753/langevin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2235, 12, 2890, 16, 284, 4672, 9006, 273, 365, 18, 14937, 293, 273, 365, 18, 14937, 18, 588, 67, 22027, 69, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2235, 12, 2890, 16, 284, 4672, 9006, 273, 365, 18, 14937, 293, 273, 365, 18, 14937, 18, 588, 67, 22027, 69, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
print "Enabling RGBA"
log.add('Enabling RGBA')
def __init__(self, config, plugindir, use_trayicon, try_rgba, start_hidden=False, WebBrowser=True): self.clip_data = "" self.configfile = config self.transfermsgs = {} self.transfermsgspostedtime = 0 self.manualdisconnect = 0 self.away = 0 self.exiting = 0 self.startup = True self.current_tab = 0 self.rescanning = 0 self.brescanning = 0 self.needrescan = 0 self.autoaway = False self.awaytimer = None self.SEXY = SEXY self.chatrooms = None self.tts = [] self.tts_playing = self.continue_playing = False
5b9c99ed36f23c0f56579a3f05ed0bcf912fdf19 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8738/5b9c99ed36f23c0f56579a3f05ed0bcf912fdf19/frame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 642, 16, 15852, 728, 481, 16, 999, 67, 313, 528, 3950, 16, 775, 67, 26198, 16, 787, 67, 6345, 33, 8381, 16, 2999, 9132, 33, 5510, 4672, 225, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 642, 16, 15852, 728, 481, 16, 999, 67, 313, 528, 3950, 16, 775, 67, 26198, 16, 787, 67, 6345, 33, 8381, 16, 2999, 9132, 33, 5510, 4672, 225, 365, 18, ...
self.parseAction += [self.normalizeParseActionArgs(f) for f in list(fns)]
self.parseAction += map(self.normalizeParseActionArgs, list(fns))
def addParseAction( self, *fns ): """Add parse action to expression's list of parse actions. See setParseAction_.""" self.parseAction += [self.normalizeParseActionArgs(f) for f in list(fns)] return self
b18dc9df3d867052b855a09a154d1d37325344c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12364/b18dc9df3d867052b855a09a154d1d37325344c4/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 3201, 1803, 12, 365, 16, 380, 74, 2387, 262, 30, 3536, 986, 1109, 1301, 358, 2652, 1807, 666, 434, 1109, 4209, 18, 2164, 444, 3201, 1803, 67, 12123, 365, 18, 2670, 1803, 1011, 852...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 3201, 1803, 12, 365, 16, 380, 74, 2387, 262, 30, 3536, 986, 1109, 1301, 358, 2652, 1807, 666, 434, 1109, 4209, 18, 2164, 444, 3201, 1803, 67, 12123, 365, 18, 2670, 1803, 1011, 852...
self.selected_csv = self.ls_csv.get_value(iter,0)
self.selected_csv = self.ls_csv.get_value(iter, 0)
def _on_row_activated(self, treeview, path, view_column, data = None): # get selected rows from both treeviews/lists if treeview == self.tv_griffith: self.iter_griffith = self.ls_griffith.get_iter(path) if self.iter_griffith: self.selected_griffith = self.ls_griffith.get_value(self.iter_griffith,0) if treeview == self.tv_csv: iter = self.ls_csv.get_iter(path) if iter: self.selected_csv = self.ls_csv.get_value(iter,0) # enable add button if both lists have a selected item if self.selected_griffith is not None and self.selected_csv is not None: self.b_add.set_sensitive(True) else: self.b_add.set_sensitive(False)
8dd23db0ad40a315c4c2431088bf2a98189408a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2687/8dd23db0ad40a315c4c2431088bf2a98189408a8/CSV.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 265, 67, 492, 67, 18836, 12, 2890, 16, 2151, 1945, 16, 589, 16, 1476, 67, 2827, 16, 501, 273, 599, 4672, 468, 336, 3170, 2595, 628, 3937, 2151, 7061, 19, 9772, 309, 2151, 1945, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 265, 67, 492, 67, 18836, 12, 2890, 16, 2151, 1945, 16, 589, 16, 1476, 67, 2827, 16, 501, 273, 599, 4672, 468, 336, 3170, 2595, 628, 3937, 2151, 7061, 19, 9772, 309, 2151, 1945, ...
fs.close()
def save_lost(self, u, finished=False): r'''Write the resume file for transfer from the user.
cd47416e19d031fcc47b26622ed4a3af139cea4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2496/cd47416e19d031fcc47b26622ed4a3af139cea4c/sumiget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 383, 334, 12, 2890, 16, 582, 16, 6708, 33, 8381, 4672, 436, 26418, 3067, 326, 10774, 585, 364, 7412, 628, 326, 729, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 383, 334, 12, 2890, 16, 582, 16, 6708, 33, 8381, 4672, 436, 26418, 3067, 326, 10774, 585, 364, 7412, 628, 326, 729, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -10...
n = 1<<i L = randrange(n) print "%2d %6d" % (i, n), fl()
n = 1 << i L = randfloats(n) print "%2d %7d" % (i, n), flush()
def tabulate(r): """Tabulate sort speed for lists of various sizes. The sizes are 2**i for i in r (the argument, a list). The output displays i, 2**i, and the time to sort arrays of 2**i floating point numbers with the following properties: *sort: random data \sort: descending data /sort: ascending data ~sort: many duplicates -sort: all equal !sort: worst case scenario """ cases = ("*sort", "\\sort", "/sort", "~sort", "-sort", "!sort") fmt = ("%2s %6s" + " %6s"*len(cases)) print fmt % (("i", "2**i") + cases) for i in r: n = 1<<i L = randrange(n) ##assert len(L) == n print "%2d %6d" % (i, n), fl() doit(L) # *sort L.reverse() doit(L) # \sort doit(L) # /sort if n > 4: del L[4:] L = L*(n/4) L = map(lambda x: --x, L) doit(L) # ~sort del L L = map(abs, [-0.5]*n) doit(L) # -sort L = range(n/2-1, -1, -1) L[len(L):] = range(n/2) doit(L) # !sort print
f8afed6f99fca0ae1d7e089553421e556949d15e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f8afed6f99fca0ae1d7e089553421e556949d15e/sortperf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3246, 6243, 12, 86, 4672, 3536, 5661, 6243, 1524, 8632, 364, 6035, 434, 11191, 8453, 18, 225, 1021, 8453, 854, 576, 636, 77, 364, 277, 316, 436, 261, 5787, 1237, 16, 279, 666, 2934, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3246, 6243, 12, 86, 4672, 3536, 5661, 6243, 1524, 8632, 364, 6035, 434, 11191, 8453, 18, 225, 1021, 8453, 854, 576, 636, 77, 364, 277, 316, 436, 261, 5787, 1237, 16, 279, 666, 2934, 22...
'd': r"(?P<d>3[0-1]|[0-2]\d|\d| \d)",
'd': r"(?P<d>3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])",
def __init__(self, locale_time=LocaleTime()): """Init inst with non-locale regexes and store LocaleTime object.""" # XXX: should 0 be valid for: # day (d), julian day (j), month (m), and hour12 (I)? super(TimeRE,self).__init__({ # The " \d" option is to make %c from ANSI C work 'd': r"(?P<d>3[0-1]|[0-2]\d|\d| \d)", 'H': r"(?P<H>2[0-3]|[0-1]\d|\d)", 'I': r"(?P<I>0\d|1[0-2]|\d)", 'j': r"(?P<j>(?:3[0-5]\d|36[0-6])|[0-2]\d\d|\d\d|\d)", 'm': r"(?P<m>0\d|1[0-2]|\d)", 'M': r"(?P<M>[0-5]\d|\d)", 'S': r"(?P<S>6[0-1]|[0-5]\d|\d)", 'U': r"(?P<U>5[0-3]|[0-4]\d|\d)", 'w': r"(?P<w>[0-6])", 'W': r"(?P<W>5[0-3]|[0-4]\d|\d)", # Same as U 'y': r"(?P<y>\d\d)", 'Y': r"(?P<Y>\d\d\d\d)"}) self.locale_time = locale_time
5efc50d8afd31dc4cb0ef1b58899943eb0e4cb67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5efc50d8afd31dc4cb0ef1b58899943eb0e4cb67/_strptime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2573, 67, 957, 33, 3916, 950, 1435, 4672, 3536, 2570, 1804, 598, 1661, 17, 6339, 28522, 471, 1707, 6458, 950, 733, 12123, 468, 11329, 30, 1410, 374, 506, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2573, 67, 957, 33, 3916, 950, 1435, 4672, 3536, 2570, 1804, 598, 1661, 17, 6339, 28522, 471, 1707, 6458, 950, 733, 12123, 468, 11329, 30, 1410, 374, 506, ...
res = self.__getDirectoryContents(datasetName)
res = self.__getDirectoryContents( datasetName )
def resolveDataset(self,dataset,allStatus=False): res = self.__checkArgumentFormat(dataset) if not res['OK']: return res datasets = res['Value'] created = self.__openSession() successful = {} failed = {} for datasetName in datasets.keys(): res = self.__getDirectoryContents(datasetName) if not res['OK']: failed[datasetName] = res['Message'] else: #linkDict = res['Value']['Links'] linkDict = res['Value']['Files'] datasetFiles = {} for link,fileMetadata in linkDict.items(): #target = fileMetadata[link]['MetaData']['Target'] target = link datasetFiles[target] = fileMetadata['Replicas'] successful[datasetName] = datasetFiles if created: self.__closeSession() resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict)
6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 10656, 12, 2890, 16, 8682, 16, 454, 1482, 33, 8381, 4672, 400, 273, 365, 16186, 1893, 1379, 1630, 12, 8682, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 11109, 273, 400, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 10656, 12, 2890, 16, 8682, 16, 454, 1482, 33, 8381, 4672, 400, 273, 365, 16186, 1893, 1379, 1630, 12, 8682, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 11109, 273, 400, 32...
dialog.hide()
def quit_cb(self, *trash): self.app.doc.model.split_stroke() self.app.save_gui_config() # FIXME: should do this periodically, not only on quit
99de33265bcd2428534b19b55145da8878357970 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7129/99de33265bcd2428534b19b55145da8878357970/drawwindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9706, 67, 7358, 12, 2890, 16, 380, 28665, 4672, 365, 18, 2910, 18, 2434, 18, 2284, 18, 4939, 67, 16181, 1435, 365, 18, 2910, 18, 5688, 67, 20292, 67, 1425, 1435, 468, 9852, 30, 1410, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9706, 67, 7358, 12, 2890, 16, 380, 28665, 4672, 365, 18, 2910, 18, 2434, 18, 2284, 18, 4939, 67, 16181, 1435, 365, 18, 2910, 18, 5688, 67, 20292, 67, 1425, 1435, 468, 9852, 30, 1410, ...
self.ioloop = ioloop.IOLoop()
def run(self): """The thread's main activity. Call start() instead.""" self.socket = self.context.socket(zmq.SUB) self.socket.setsockopt(zmq.SUBSCRIBE,'') self.socket.setsockopt(zmq.IDENTITY, self.session.session) self.socket.connect('tcp://%s:%i' % self.address) self.ioloop = ioloop.IOLoop() self.iostate = POLLIN|POLLERR self.ioloop.add_handler(self.socket, self._handle_events, self.iostate) self.ioloop.start()
c9d5747ff09dc7a24a311ccb59a0dceb3ad36595 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4219/c9d5747ff09dc7a24a311ccb59a0dceb3ad36595/kernelmanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 1986, 2650, 1807, 2774, 5728, 18, 225, 3049, 787, 1435, 3560, 12123, 365, 18, 7814, 273, 365, 18, 2472, 18, 7814, 12, 94, 11636, 18, 8362, 13, 365, 18, 7814...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4672, 3536, 1986, 2650, 1807, 2774, 5728, 18, 225, 3049, 787, 1435, 3560, 12123, 365, 18, 7814, 273, 365, 18, 2472, 18, 7814, 12, 94, 11636, 18, 8362, 13, 365, 18, 7814...
u'w' : self.WordRightExtend,
u'w' : self.WordPartRightExtend, u'W' : self.WordRightExtend,
def ViCmdDispatch(self): """Processes vi commands
fc1a4d54ed58dd571baa8121082443aca12da187 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3530/fc1a4d54ed58dd571baa8121082443aca12da187/ed_stc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23910, 5931, 5325, 12, 2890, 4672, 3536, 10599, 13206, 4364, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 23910, 5931, 5325, 12, 2890, 4672, 3536, 10599, 13206, 4364, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "netloc", netloc p = Popen(["cat", filePattern],
print "netloc (%s) is local" % netloc print "looking for cache(s): %s" % filePattern p = Popen(["cat %s"% filePattern], shell=True, stdin=open("/dev/null"),
def getSearch(cls, searchDirUrl): # retrieve all cache files for a given search (scheme, netloc, path, query, frag) = urlsplit(searchDirUrl) if scheme == "file": filePattern = os.path.join(path, "*.cache") if netloc == "localhost" or islocalhost(netloc): print "netloc", netloc p = Popen(["cat", filePattern], stdout=PIPE, close_fds=True) else: # assuming no port or username in netloc and query and frag are nil p = Popen(["ssh", netloc, "cat", filePattern], stdout=PIPE, close_fds=True) retval = cls.fromfile(p.stdout) p.stdout.close() del p return retval else: raise Exception("unknown scheme '%s' in '%s'" % (scheme, searchDirUrl))
4504576766bef72dcb9f89b883d1dc97fd4325bd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3589/4504576766bef72dcb9f89b883d1dc97fd4325bd/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15627, 12, 6429, 16, 1623, 1621, 1489, 4672, 468, 4614, 777, 1247, 1390, 364, 279, 864, 1623, 261, 9068, 16, 17345, 16, 589, 16, 843, 16, 10111, 13, 273, 880, 4939, 12, 3072, 1621, 148...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15627, 12, 6429, 16, 1623, 1621, 1489, 4672, 468, 4614, 777, 1247, 1390, 364, 279, 864, 1623, 261, 9068, 16, 17345, 16, 589, 16, 843, 16, 10111, 13, 273, 880, 4939, 12, 3072, 1621, 148...
<twisted.web2.http.Response code=200, streamlen=603>
<twisted.web2.http.Response code=200, streamlen=...>
def render(self, ctx): """ Rendering this resource (1) empties the trash, and (2) returns a message. EXAMPLES: We create a notebook with a worksheet, put it in the trash, then empty the trash by creating and rendering this worksheet. sage: n = sage.server.notebook.notebook.Notebook('notebook-test') sage: n.add_user('sage','sage','sage@sagemath.org',force=True) sage: W = n.new_worksheet_with_title_from_text('Sage', owner='sage') sage: W.move_to_trash('sage') sage: n.worksheet_names() ['sage/0'] sage: sage.server.notebook.twist.notebook = n sage: E = sage.server.notebook.twist.EmptyTrash('sage'); E <sage.server.notebook.twist.EmptyTrash object at ...> sage: E.render(None) <twisted.web2.http.Response code=200, streamlen=603>
4b74e58e753c504830adac21cd5c59acffbd8dcc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/4b74e58e753c504830adac21cd5c59acffbd8dcc/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 3536, 18018, 333, 1058, 261, 21, 13, 801, 337, 606, 326, 20703, 16, 471, 261, 22, 13, 1135, 279, 883, 18, 225, 5675, 8900, 11386, 30, 1660, 752, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 3536, 18018, 333, 1058, 261, 21, 13, 801, 337, 606, 326, 20703, 16, 471, 261, 22, 13, 1135, 279, 883, 18, 225, 5675, 8900, 11386, 30, 1660, 752, 279, ...
returmn w_Undefined
return w_Undefined
def execute(self, ctx): if self.expr is None: returmn w_Undefined return self.expr.execute(ctx)
48bed23139fcbb7150e0ac6137ec3ef5e47635f5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/48bed23139fcbb7150e0ac6137ec3ef5e47635f5/interpreter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 1103, 4672, 309, 365, 18, 8638, 353, 599, 30, 327, 341, 67, 10317, 327, 365, 18, 8638, 18, 8837, 12, 5900, 13, 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, 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, 1836, 12, 2890, 16, 1103, 4672, 309, 365, 18, 8638, 353, 599, 30, 327, 341, 67, 10317, 327, 365, 18, 8638, 18, 8837, 12, 5900, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
cmds.connectControl( self.__fields[i], plug.child( i ).name() ) self._addPopupMenu( parentUI = self.__fields[i], attributeName = plug.child(i).name() )
childPlugName = self.nodeName() + "." + plug.child(i).partialName() cmds.connectControl( self.__fields[i], childPlugName ) self._addPopupMenu( parentUI = self.__fields[i], attributeName = childPlugName )
def replace( self, node, parameter ) : ParameterUI.replace( self, node, parameter ) if len(self.__fields) and len(self.__fields) == self.__dim: plug = self.plug() for i in range(0, self.__dim): cmds.connectControl( self.__fields[i], plug.child( i ).name() ) self._addPopupMenu( parentUI = self.__fields[i], attributeName = plug.child(i).name() )
312604e0f337cb8e3c0059ec3e33d810869eb5dd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9042/312604e0f337cb8e3c0059ec3e33d810869eb5dd/ParameterUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 12, 365, 16, 756, 16, 1569, 262, 294, 225, 5498, 5370, 18, 2079, 12, 365, 16, 756, 16, 1569, 262, 225, 309, 562, 12, 2890, 16186, 2821, 13, 471, 562, 12, 2890, 16186, 2821, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 12, 365, 16, 756, 16, 1569, 262, 294, 225, 5498, 5370, 18, 2079, 12, 365, 16, 756, 16, 1569, 262, 225, 309, 562, 12, 2890, 16186, 2821, 13, 471, 562, 12, 2890, 16186, 2821, 13,...
systemId != None):
systemId != None and systemId != "about:legacy-compat"):
def processDoctype(self, token):
b39e8a0ae07fbad099708d63974098bf43ba0153 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9368/b39e8a0ae07fbad099708d63974098bf43ba0153/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 3244, 12387, 12, 2890, 16, 1147, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 3244, 12387, 12, 2890, 16, 1147, 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, -1...
code = """%(return_type)s %(name)s(%(typed_args)s) { if (%(count_name)s < 0) { SetGLError(GL_INVALID_VALUE, "gl%(name)s: n < 0"); return; } %(resource_type)s_id_handler_->FreeIds(%(args)s); helper_->%(name)sImmediate(%(args)s); } """ file.Write(code % {
args = {
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" impl_decl = func.GetInfo('impl_decl') if impl_decl == None or impl_decl == True: code = """%(return_type)s %(name)s(%(typed_args)s) {
1fd26d8cdd166ec84c06bb7d4a8557293428fc0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/1fd26d8cdd166ec84c06bb7d4a8557293428fc0e/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 43, 11386, 22, 13621, 1864, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 9380, 67, 8840, 273, 1326, 18, 967, 966, 2668, 11299, 67, 8840, 6134,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 43, 11386, 22, 13621, 1864, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 9380, 67, 8840, 273, 1326, 18, 967, 966, 2668, 11299, 67, 8840, 6134,...
uom_by_prod = dict((x.id, x.default_uom) for x in product_obj.browse(
default_uom = dict((x.id, x.default_uom) for x in product_obj.browse(
def products_by_location(self, cursor, user, location_ids, product_ids=None, context=None):
9106e27d17ef999853c6304793e435b5f505120e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9298/9106e27d17ef999853c6304793e435b5f505120e/product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10406, 67, 1637, 67, 3562, 12, 2890, 16, 3347, 16, 729, 16, 2117, 67, 2232, 16, 3017, 67, 2232, 33, 7036, 16, 819, 33, 7036, 4672, 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, 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, 10406, 67, 1637, 67, 3562, 12, 2890, 16, 3347, 16, 729, 16, 2117, 67, 2232, 16, 3017, 67, 2232, 33, 7036, 16, 819, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
if kw.has_key('owners') and kw['owners'] and not kw['owners']:
if kw.has_key('owners') and not kw['owners']:
def validate_host_info(self, *args): """ Validate the host info for add or edit @param args[0]['editing']: a boolean of if this is validating for add or edit @raise Exception( messages list ) if any errors occur """ messages = [] kw = args[0] # VALIDATE ARGUMENTS if not kw.has_key('editing'): kw['editing'] = False # Make the owners argument if owners_list was specified if kw.has_key('owners_list'): # If given an owners CSV string, make it a list kw['owners'] = kw['owners_list'].split(',') del kw['owners_list'] # If new host and no owners, add me as the only owner if not kw['editing'] and not kw.has_key('owners_list') and not kw.has_key('owners'): kw['owners'] = [cherrypy.session['user']['username'],] if (not kw.has_key('mac') or not kw.has_key('hostname') or not kw.has_key('domain') or not kw.has_key('expiration') or (not kw['editing'] and not kw.has_key('owners') and (not kw.has_key('add_host_to_my_group') or (kw.has_key('add_host_to_my_group') and not kw['add_host_to_my_group']))) or not kw.has_key('description') or not kw.has_key('is_dynamic') ): messages.append('Some information required to perform the action was not supplied. %s' % str(kw)) if kw['editing'] and not kw.has_key('old_mac'): raise error.RequiredArgument("When editing, old_mac is a required argument.") if not kw['is_dynamic'] and not kw['editing'] and (not kw.has_key('network') or (kw.has_key('network') and not kw['network'])): messages.append("This is a static IP registration and the network was not specified.") # Make sure that anything that is dropdown-like (except networks) is using IDs as values if kw.has_key('domain') and kw['domain'] and type(kw['domain']) is not types.IntType: raise error.InvalidArgument("The domain specified must be an integer and must be a domain ID.") if kw.has_key('expiration') and kw['expiration'] and type(kw['expiration']) is not types.IntType: raise error.InvalidArgument("The expiration specified must be an integer and must be an expiration ID.") if kw.has_key('owners') and kw['owners'] and type(kw['owners']) is not types.ListType and type(kw['owners']) is not types.TupleType: raise error.InvalidArgument("The owners argument specified must be a list or tuple of group names.") # Raise required argument errors if messages: raise error.ListXMLRPCFault(messages)
e12040f5a2371c37dcb531e4f0fd780fd0c0fb90 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7602/e12040f5a2371c37dcb531e4f0fd780fd0c0fb90/xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 2564, 67, 1376, 12, 2890, 16, 380, 1968, 4672, 3536, 3554, 326, 1479, 1123, 364, 527, 578, 3874, 225, 632, 891, 833, 63, 20, 23962, 4619, 310, 3546, 30, 279, 1250, 434, 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, 1954, 67, 2564, 67, 1376, 12, 2890, 16, 380, 1968, 4672, 3536, 3554, 326, 1479, 1123, 364, 527, 578, 3874, 225, 632, 891, 833, 63, 20, 23962, 4619, 310, 3546, 30, 279, 1250, 434, 309, ...
added,removed=get_filechanges(repo,revision,parents,man) sys.stderr.write('Exporting revision %d with %d changed/%d removed files\n' % (revision,len(added),len(removed))) for a in added:
added,changed,removed=get_filechanges(repo,revision,parents,man) sys.stderr.write('Exporting revision %d with %d/%d/%d added/changed/removed files\n' % (revision,len(added),len(changed),len(removed))) for a in added+changed:
def export_commit(ui,repo,revision,marks,heads,last,max,count): (_,user,(time,timezone),files,desc,branch,_)=get_changeset(ui,repo,revision) parents=repo.changelog.parentrevs(revision) wr('commit refs/heads/%s' % branch) wr('mark :%d' % (revision+1)) wr('committer %s %d %s' % (user,time,timezone)) wr('data %d' % (len(desc)+1)) # wtf? wr(desc) wr() src=heads.get(branch,'') link='' if src!='': # if we have a cached head, this is an incremental import: initialize it # and kill reference so we won't init it again wr('from %s' % src) heads[branch]='' sys.stderr.write('Initializing branch [%s] to parent [%s]\n' % (branch,src)) link=src # avoid making a merge commit for incremental import elif link=='' and not heads.has_key(branch) and revision>0: # newly created branch and not the first one: connect to parent tmp=get_parent_mark(parents[0],marks) wr('from %s' % tmp) sys.stderr.write('Link new branch [%s] to parent [%s]\n' % (branch,tmp)) link=tmp # avoid making a merge commit for branch fork if parents: l=last.get(branch,revision) for p in parents: # 1) as this commit implicitely is the child of the most recent # commit of this branch, ignore this parent # 2) ignore nonexistent parents # 3) merge otherwise if p==l or p==revision or p<0: continue tmp=get_parent_mark(p,marks) # if we fork off a branch, don't merge with our parent via 'merge' # as we have 'from' already above if tmp==link: continue sys.stderr.write('Merging branch [%s] with parent [%s] from [r%d]\n' % (branch,tmp,p)) wr('merge %s' % tmp) last[branch]=revision heads[branch]='' # we need this later to write out tags marks[str(revision)]=':%d'%(revision+1) ctx=repo.changectx(str(revision)) man=ctx.manifest() added,removed=get_filechanges(repo,revision,parents,man) sys.stderr.write('Exporting revision %d with %d changed/%d removed files\n' % (revision,len(added),len(removed))) for a in added: fctx=ctx.filectx(a) d=fctx.data() wr('M %s inline %s' % (gitmode(man.execf(a)),a)) wr('data %d' % len(d)) # had some trouble with size() wr(d) for r in removed: wr('D %s' % r) wr() return checkpoint(count)
c002051c82e22ca816afd1475885fc38e92693ad /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12824/c002051c82e22ca816afd1475885fc38e92693ad/hg2git.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 7371, 12, 4881, 16, 7422, 16, 13057, 16, 17439, 16, 20263, 16, 2722, 16, 1896, 16, 1883, 4672, 261, 67, 16, 1355, 16, 12, 957, 16, 12690, 3631, 2354, 16, 5569, 16, 7500, 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, 3359, 67, 7371, 12, 4881, 16, 7422, 16, 13057, 16, 17439, 16, 20263, 16, 2722, 16, 1896, 16, 1883, 4672, 261, 67, 16, 1355, 16, 12, 957, 16, 12690, 3631, 2354, 16, 5569, 16, 7500, 16...
"""distributes domains as the NaiveDistrutor, except that the unique
"""distributes domains as the NaiveDistributor, except that the unique
def _distribute(self, dom1, dom2): """See AbstractDistributor""" variable = self.findSmallestDomain(dom1) values = dom1[variable].get_values() if self.verbose: print 'Distributing domain for variable', variable, \ 'at value', values[0] dom1[variable].remove_values(values[1:]) dom2[variable].remove_value(values[0]) return (dom1[variable], dom2[variable])
ac78d8abaa475349fcadf8fadd72415a00d5d8b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/ac78d8abaa475349fcadf8fadd72415a00d5d8b5/distributor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2251, 887, 12, 2890, 16, 4092, 21, 16, 4092, 22, 4672, 3536, 9704, 4115, 1669, 19293, 8395, 2190, 273, 365, 18, 4720, 19187, 395, 3748, 12, 9859, 21, 13, 924, 273, 4092, 21, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2251, 887, 12, 2890, 16, 4092, 21, 16, 4092, 22, 4672, 3536, 9704, 4115, 1669, 19293, 8395, 2190, 273, 365, 18, 4720, 19187, 395, 3748, 12, 9859, 21, 13, 924, 273, 4092, 21, 63, ...
self.__show_context_menu()
self.__show_context_menu(button, activate_time)
def on_status_popup_menu(self, widget, button, activate_time, data=None): self.__show_context_menu()
67ae3691eb4b368f280e474a6e85459e42379973 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11048/67ae3691eb4b368f280e474a6e85459e42379973/notify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 2327, 67, 16086, 67, 5414, 12, 2890, 16, 3604, 16, 3568, 16, 10235, 67, 957, 16, 501, 33, 7036, 4672, 365, 16186, 4500, 67, 2472, 67, 5414, 12, 5391, 16, 10235, 67, 957, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 2327, 67, 16086, 67, 5414, 12, 2890, 16, 3604, 16, 3568, 16, 10235, 67, 957, 16, 501, 33, 7036, 4672, 365, 16186, 4500, 67, 2472, 67, 5414, 12, 5391, 16, 10235, 67, 957, 13,...
from common import debug debug(config.get('server', ''))
def authenticate(self, anon=True): """ Authenticate to the server """ if anon: try: self.client.auth(None, "", self.resource) return True except TypeError: self.handler.emit('error', msg=_('Error: Could not \ authenticate. Please make sure the server you chose \ (%s) supports anonymous authentication' % (config.get('server', '')))) return False else: password = config.get('password', '') jid = config.get('jid', '') from common import debug debug(config.get('server', '')) auth = self.client.auth(jid_get_node(jid), password, "salut") debug(repr(auth)) return auth
124b7ebf49d088815c893af62000008f3910db43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9814/124b7ebf49d088815c893af62000008f3910db43/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8929, 12, 2890, 16, 30637, 33, 5510, 4672, 3536, 26644, 358, 326, 1438, 3536, 309, 30637, 30, 775, 30, 365, 18, 2625, 18, 1944, 12, 7036, 16, 23453, 365, 18, 3146, 13, 327, 1053, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8929, 12, 2890, 16, 30637, 33, 5510, 4672, 3536, 26644, 358, 326, 1438, 3536, 309, 30637, 30, 775, 30, 365, 18, 2625, 18, 1944, 12, 7036, 16, 23453, 365, 18, 3146, 13, 327, 1053, 1335,...
else:
elif hasattr(file, 'name'):
def loadFromStream(self, file, name=None): """Return a WSDL instance loaded from a file object.""" document = DOM.loadDocument(file) wsdl = WSDL() if name: wsdl.location = name else: wsdl.location = file.name wsdl.load(document) return wsdl
04e2f3993d7a37e62998063205144655ef8ff47d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/04e2f3993d7a37e62998063205144655ef8ff47d/WSDLTools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24935, 1228, 12, 2890, 16, 585, 16, 508, 33, 7036, 4672, 3536, 990, 279, 30567, 791, 4203, 628, 279, 585, 733, 12123, 1668, 273, 4703, 18, 945, 2519, 12, 768, 13, 17642, 273, 30567, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24935, 1228, 12, 2890, 16, 585, 16, 508, 33, 7036, 4672, 3536, 990, 279, 30567, 791, 4203, 628, 279, 585, 733, 12123, 1668, 273, 4703, 18, 945, 2519, 12, 768, 13, 17642, 273, 30567, 14...
q = -1.0*atoms.f
q = -1.0*self.f
def step(self, f): atoms = self.atoms self.ni = atoms.nimages-2 # try: atoms.imax # except: atoms.imax=0 # if(not self.ni):atoms.imax=1 g = open('out','w') atoms.r = npy.zeros((self.ni, atoms.natoms, self.dim), 'd') for i in range(1, atoms.nimages-1): atoms.r[i-1] = atoms.images[i].get_positions() print >> g,'atoms.r',atoms.r atoms.f = npy.zeros((self.ni, atoms.natoms, self.dim), 'd') for i in range(1, atoms.nimages-1): atoms.f[i-1] = atoms.images[i].get_forces() print >> g,'atoms.f',atoms.f try: atoms.start except:atoms.start=0 if(not atoms.start): atoms.start = 1 atoms.a = npy.zeros(self.memory+1, 'd') self.ptmp = atoms self.maxstep = npy.sqrt(self.maxstep * self.ni) atoms.lbfgsinit = 0 try: atoms.lbfgsinit except:atoms.lbfgsinit=0 if(not atoms.lbfgsinit): atoms.lbfgsinit = 1 atoms.Ho = npy.ones((self.ni, atoms.natoms, self.dim), 'd') if (not self.min=='line'):atoms.Ho = atoms.Ho * self.alpha atoms.ITR = 1 atoms.s = [1.] atoms.y = [1.] atoms.rho = [1.] else: a1 = abs (npy.vdot(atoms.f, atoms.f_old)) a2 = npy.vdot(atoms.f_old, atoms.f_old) print 'a1,a2 created',a1,a2 if(self.min=='line'): if(a1<=0.5* a2 and a2!=0): reset_flag = 0 else: reset_flag = 1 else: reset_flag = 0 if(reset_flag==0): g1 = open('out1','w') g2 = open('out2','w') print >> g1,'atoms.r',atoms.r print >> g2,'atoms.r_old',atoms.r_old ITR = atoms.ITR#correctly generated if(ITR > self.memory): atoms.s.pop(1) atoms.y.pop(1) atoms.rho.pop(1) ITR=self.memory atoms.s.append(atoms.r - atoms.r_old)#!!atoms.r is not updating # boundry cond # for i in range(atoms.ni): # if(method=='min'):i=0 # try: # DBC(atoms.s[ITR][i],atoms.p[i].Box) #need to make matrix for box # except: # print "Box not found." # if(method=='min'):break atoms.y.append(-(atoms.f-atoms.f_old)) atoms.rho.append(1/npy.vdot(atoms.y[ITR],atoms.s[ITR])) atoms.ITR += 1 else:
689ed3715e535adf898039f50971002aa6c5a5e9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1380/689ed3715e535adf898039f50971002aa6c5a5e9/glbfgs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2235, 12, 2890, 16, 284, 4672, 9006, 273, 365, 18, 14937, 365, 18, 15834, 273, 9006, 18, 82, 7369, 17, 22, 468, 775, 30, 9006, 18, 381, 651, 468, 1335, 30, 9006, 18, 381, 651, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2235, 12, 2890, 16, 284, 4672, 9006, 273, 365, 18, 14937, 365, 18, 15834, 273, 9006, 18, 82, 7369, 17, 22, 468, 775, 30, 9006, 18, 381, 651, 468, 1335, 30, 9006, 18, 381, 651, 33, ...
main(sys.argv[1])
import sys main(sys.argv[1])
def main(filename): for tokens in read_tsv(filename): json = tokens[-1] doc = simplejson.loads(json) cover = doc.get('covers') and doc.get('covers')[0] isbns = doc.get('isbn_10', []) + doc.get('isbn_13') key = doc['key'] if cover and cover > 0: print "\t".join([cover, key, ",".join(isbns)])
fd1a633f87fe1ba4e7c921ab7cce7a6c535da720 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/fd1a633f87fe1ba4e7c921ab7cce7a6c535da720/gen_cover_mapping.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 3459, 4672, 364, 2430, 316, 855, 67, 25338, 12, 3459, 4672, 1163, 273, 2430, 18919, 21, 65, 997, 273, 4143, 1977, 18, 17135, 12, 1977, 13, 225, 5590, 273, 997, 18, 588, 2668,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3459, 4672, 364, 2430, 316, 855, 67, 25338, 12, 3459, 4672, 1163, 273, 2430, 18919, 21, 65, 997, 273, 4143, 1977, 18, 17135, 12, 1977, 13, 225, 5590, 273, 997, 18, 588, 2668,...
self._resizeTerminal()
def sigwinch_handler(s, f): sigwinch.append(True)
f1806133f0160c813de35e1b127006f4672f5d7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/f1806133f0160c813de35e1b127006f4672f5d7a/logger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3553, 8082, 343, 67, 4176, 12, 87, 16, 284, 4672, 3553, 8082, 343, 18, 6923, 12, 5510, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3553, 8082, 343, 67, 4176, 12, 87, 16, 284, 4672, 3553, 8082, 343, 18, 6923, 12, 5510, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"xls", "xla"),
"xls", "xla", "msi", ),
def createFields(self): for i in xrange(self.start, self.start + self.count): yield SECT(self, "index[%u]" % i)
0bd456007e76a497bfd7c6d01b57bc8bd9650ccd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/0bd456007e76a497bfd7c6d01b57bc8bd9650ccd/ole2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2314, 12, 2890, 4672, 364, 277, 316, 12314, 12, 2890, 18, 1937, 16, 365, 18, 1937, 397, 365, 18, 1883, 4672, 2824, 3174, 1268, 12, 2890, 16, 315, 1615, 14451, 89, 4279, 738, 277, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 752, 2314, 12, 2890, 4672, 364, 277, 316, 12314, 12, 2890, 18, 1937, 16, 365, 18, 1937, 397, 365, 18, 1883, 4672, 2824, 3174, 1268, 12, 2890, 16, 315, 1615, 14451, 89, 4279, 738, 277, ...
self.log_error("Could not run %s: %s" % (mname, e)) self._get_ignore_body(fore)
self.log_error("Could not run %s: %s", mname, e)
def _handle_one_foreign(self,fore, path, auth_provider): """ This method overrides the handle_one_request for *children* handlers. It is required, since the first line should not be read again..
d0eb1d75164ab218856f107ccfdae06dfd1179b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d0eb1d75164ab218856f107ccfdae06dfd1179b4/websrv_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 476, 67, 12774, 12, 2890, 16, 1405, 16, 589, 16, 1357, 67, 6778, 4672, 3536, 1220, 707, 9515, 326, 1640, 67, 476, 67, 2293, 364, 380, 5906, 14, 4919, 18, 2597, 353, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 476, 67, 12774, 12, 2890, 16, 1405, 16, 589, 16, 1357, 67, 6778, 4672, 3536, 1220, 707, 9515, 326, 1640, 67, 476, 67, 2293, 364, 380, 5906, 14, 4919, 18, 2597, 353, 19...
return S_ERROR( error)
return S_ERROR( error )
def configureCE( ceName='',ceType='', cfg=None, currentSectionPath='' ): """ Produce new dirac.cfg including configuration for new CE """ from DIRAC.Resources.Computing.ComputingElementFactory import ComputingElementFactory from DIRAC.Resources.Computing.ComputingElement import getLocalCEConfigDict from DIRAC import gConfig cesCfg = ResourcesDefaults.getComputingElementDefaults( ceName, ceType, cfg, currentSectionPath ) ceNameList = cesCfg.listSections() if not ceNameList: error = 'No CE Name provided' gLogger.error( error ) if exitOnError: exit( -1 ) return S_ERROR( error) for ceName in ceNameList: if 'CEType' not in cesCfg[ceName]: error = 'Missing Type for CE "%s"' % ceName gLogger.error( error ) if exitOnError: exit( -1 ) return S_ERROR( error) localsiteCfg = localCfg['LocalSite'] # Replace Configuration under LocalSite with new Configuration for ceName in ceNameList: if localsiteCfg.existsKey( ceName ): gLogger.notice(' Removing existing CE:', ceName ) localsiteCfg.deleteKey( ceName ) gLogger.notice( 'Configuring CE:', ceName ) localsiteCfg.createNewSection( ceName, contents=cesCfg[ceName] ) # Apply configuration and try to instantiate the CEs gConfig.loadCFG( localCfg ) for ceName in ceNameList: ceFactory = ComputingElementFactory( ) try: ceInstance = ceFactory.getCE(ceType, ceName) except Exception, x: error = 'Fail to instantiate CE' gLogger.exception(error) if exitOnError: exit( -1 ) return S_ERROR( error) if not ceInstance['OK']: error = 'Fail to instantiate CE: %s' % ceInstance['Message'] gLogger.error(error) if exitOnError: exit( -1 ) return S_ERROR( error) # Everything is OK, we can save the new cfg localCfg.writeToFile( cfgFile ) gLogger.always( 'LocalSite section in %s has been uptdated with new configuration:' % os.path.basename(cfgFile) ) gLogger.always( str( localCfg['LocalSite'] ) ) return S_OK( ceNameList )
9cd965a8f6afefefa23e4aaa683056b6432068d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9cd965a8f6afefefa23e4aaa683056b6432068d8/InstallTools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 1441, 12, 5898, 461, 2218, 2187, 311, 559, 2218, 2187, 2776, 33, 7036, 16, 783, 5285, 743, 2218, 11, 262, 30, 3536, 23278, 394, 4314, 8836, 18, 7066, 6508, 1664, 364, 394, 29538, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 1441, 12, 5898, 461, 2218, 2187, 311, 559, 2218, 2187, 2776, 33, 7036, 16, 783, 5285, 743, 2218, 11, 262, 30, 3536, 23278, 394, 4314, 8836, 18, 7066, 6508, 1664, 364, 394, 29538, ...
if 'dbus' in self.opts.emit_via: self.emit_dbus(num_updates) if 'syslog' in self.opts.emit_via: self.emit_syslog(num_updates) if 'email' in self.opts.emit_via: self.emit_email(num_updates) def emit_email(self, num_updates): """method to send email for notice of updates""" if num_updates > 0: output = """ Hi, There are %d package updates available. Please run the system updater. Thank You, Your Computer """ % num_updates msg = MIMEText(output) subject = 'Updates Available' msg['Subject'] = subject msg['From'] = self.opts.email_from msg['To'] = self.opts.email_to s = smtplib.SMTP() s.connect() s.sendmail(self.opts.email_from, [self.opts.email_to], msg.as_string()) s.close() def emit_syslog(self, num_updates): """method to write to syslog for notice of updates""" syslog_object = SysLogger(threshold = 10, facility=self.conf.syslog_facility, ident='yum-updatesd') syslog = LogContainer([syslog_object]) if num_updates > 0: msg = "%d update(s) available" % num_updates else: msg = "No Updates Available" syslog(0, msg) def emit_dbus(self, num_updates): """method to emit a dbus event for notice of updates""" if not self.dbusintf: return if num_updates > 0: msg = "%d updates available" % num_updates self.dbusintf.UpdatesAvailableSignal(msg) else: msg = "No Updates Available" self.dbusintf.NoUpdatesAvailableSignal(msg)
map(lambda x: x.updatesAvailable(self.updateInfo), self.emitters) def emitDownloading(self): """method to emit a notice about updates downloading""" print "downloading some updates" map(lambda x: x.updatesDownloading(self.updateInfo), self.emitters) def emitUpdateApplied(self): """method to emit a notice when automatic updates applied""" map(lambda x: x.updatesApplied(self.updateInfo), self.emitters) def emitUpdateFailed(self, errmsgs): """method to emit a notice when automatic updates failed""" map(lambda x: x.updatesFailed(errmsgs), self.emitters)
def emitAvailable(self, num_updates): """method to emit a notice about updates""" if 'dbus' in self.opts.emit_via: self.emit_dbus(num_updates) if 'syslog' in self.opts.emit_via: self.emit_syslog(num_updates) if 'email' in self.opts.emit_via: self.emit_email(num_updates)
407777395791145c466bec07939913193d3f17e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/407777395791145c466bec07939913193d3f17e6/yum-updatesd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3626, 5268, 12, 2890, 16, 818, 67, 14703, 4672, 3536, 2039, 358, 3626, 279, 11690, 2973, 4533, 8395, 309, 296, 1966, 407, 11, 316, 365, 18, 4952, 18, 18356, 67, 21985, 30, 365, 18, 183...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3626, 5268, 12, 2890, 16, 818, 67, 14703, 4672, 3536, 2039, 358, 3626, 279, 11690, 2973, 4533, 8395, 309, 296, 1966, 407, 11, 316, 365, 18, 4952, 18, 18356, 67, 21985, 30, 365, 18, 183...
else: self.__config_file = '../etc/g-octave.cfg.devel'
def __init__(self, fetch_phase=False): # Config Parser self.__config = ConfigParser.ConfigParser(self.__defaults) if os.path.exists('/etc/g-octave.cfg'): self.__config_file = '/etc/g-octave.cfg' else: self.__config_file = '../etc/g-octave.cfg.devel' self.__config.read(self.__config_file) if not fetch_phase: # Cache (JSON) cache_file = os.path.join(self.__getattr__('db'), 'cache.json') fp = open(cache_file) self.__cache = simplejson.load(fp) fp.close() # JSON json_file = os.path.join(self.__getattr__('db'), self.__cache['files']['info.json']) fp = open(json_file) self.__info = simplejson.load(fp) fp.close() self.__check_dirs()
d467ce0e87a6b856142bca7e3594caf02d827f47 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10378/d467ce0e87a6b856142bca7e3594caf02d827f47/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2158, 67, 13961, 33, 8381, 4672, 225, 468, 1903, 6783, 365, 16186, 1425, 273, 25076, 18, 809, 2678, 12, 2890, 16186, 7606, 13, 225, 309, 1140, 18, 803, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2158, 67, 13961, 33, 8381, 4672, 225, 468, 1903, 6783, 365, 16186, 1425, 273, 25076, 18, 809, 2678, 12, 2890, 16186, 7606, 13, 225, 309, 1140, 18, 803, 1...
columns = [] for col in self.get_colnames(): if not col in ignore: columns.append(col) return columns
return [col for col in self.get_colnames() if not col in ignore]
def _get_filtered_cols(self, **kwargs): pk = kwargs.get("pk", True) fk = kwargs.get("fk", True) exclude = kwargs.get("exclude", [])
d7fbc82b703f4fc1056e1156305bf017a734da3b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13203/d7fbc82b703f4fc1056e1156305bf017a734da3b/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 12071, 67, 6842, 12, 2890, 16, 2826, 4333, 4672, 2365, 273, 1205, 18, 588, 2932, 5465, 3113, 1053, 13, 10949, 273, 1205, 18, 588, 2932, 23120, 3113, 1053, 13, 4433, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 12071, 67, 6842, 12, 2890, 16, 2826, 4333, 4672, 2365, 273, 1205, 18, 588, 2932, 5465, 3113, 1053, 13, 10949, 273, 1205, 18, 588, 2932, 23120, 3113, 1053, 13, 4433, 273, ...
direction = "decrease"
def formatSubject(self, state, series, good, bad): if state == "machine": good = bad.last_other
37d1d3cd72befc38bd7fbe46ec1cb8ea78b167b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9644/37d1d3cd72befc38bd7fbe46ec1cb8ea78b167b4/analyze_talos.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 6638, 12, 2890, 16, 919, 16, 4166, 16, 7494, 16, 5570, 4672, 309, 919, 422, 315, 9149, 6877, 7494, 273, 5570, 18, 2722, 67, 3011, 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, 740, 6638, 12, 2890, 16, 919, 16, 4166, 16, 7494, 16, 5570, 4672, 309, 919, 422, 315, 9149, 6877, 7494, 273, 5570, 18, 2722, 67, 3011, 2, -100, -100, -100, -100, -100, -100, -100, -100...
print "Will rollover at %d, %d seconds from now" % (self.rolloverAt, self.rolloverAt - currentTime)
def __init__(self, filename, when='h', interval=1, backupCount=0): BaseRotatingHandler.__init__(self, filename, 'a') self.when = string.upper(when) self.backupCount = backupCount # Calculate the real rollover interval, which is just the number of # seconds between rollovers. Also set the filename suffix used when # a rollover occurs. Current 'when' events supported: # S - Seconds # M - Minutes # H - Hours # D - Days # midnight - roll over at midnight # W{0-6} - roll over on a certain day; 0 - Monday # # Case of the 'when' specifier is not important; lower or upper case # will work. currentTime = int(time.time()) if self.when == 'S': self.interval = 1 # one second self.suffix = "%Y-%m-%d_%H-%M-%S" elif self.when == 'M': self.interval = 60 # one minute self.suffix = "%Y-%m-%d_%H-%M" elif self.when == 'H': self.interval = 60 * 60 # one hour self.suffix = "%Y-%m-%d_%H" elif self.when == 'D' or self.when == 'MIDNIGHT': self.interval = 60 * 60 * 24 # one day self.suffix = "%Y-%m-%d" elif self.when.startswith('W'): self.interval = 60 * 60 * 24 * 7 # one week if len(self.when) != 2: raise ValueError("You must specify a day for weekly rollover from 0 to 6 (0 is Monday): %s" % self.when) if self.when[1] < '0' or self.when[1] > '6': raise ValueError("Invalid day specified for weekly rollover: %s" % self.when) self.dayOfWeek = int(self.when[1]) self.suffix = "%Y-%m-%d" else: raise ValueError("Invalid rollover interval specified: %s" % self.when)
dde4dc25f59403a6279aff216bdf3df43f106fb7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dde4dc25f59403a6279aff216bdf3df43f106fb7/handlers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 1347, 2218, 76, 2187, 3673, 33, 21, 16, 5114, 1380, 33, 20, 4672, 3360, 8570, 1776, 1503, 16186, 2738, 972, 12, 2890, 16, 1544, 16, 296, 69, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 1347, 2218, 76, 2187, 3673, 33, 21, 16, 5114, 1380, 33, 20, 4672, 3360, 8570, 1776, 1503, 16186, 2738, 972, 12, 2890, 16, 1544, 16, 296, 69, ...
parent=obj.parent
parent=NVDAObjects.IAccessible.IAccessible._get_parent(obj)
def focus_manageEvent(obj,isForegroundChange=False,needsFocusState=True): if isForegroundChange: needsFocusState=False if not obj: return if obj.role==controlTypes.ROLE_UNKNOWN: parent=obj.parent if parent: return focus_manageEvent(parent,isForegroundChange,False) oldFocus=api.getFocusObject() if obj==oldFocus: return oldAncestors=api.getFocusAncestors() ancestors=[] if needsFocusState: if obj.IAccessibleStates&STATE_SYSTEM_FOCUSED or obj.windowClassName.startswith("Mozilla"): hasFocusState=True else: hasFocusState=False parent=obj.parent matchedOld=False oldAncestorLen=len(oldAncestors) while parent: if parent==oldFocus: newAncestors=list(oldAncestors) newAncestors.append(oldFocus) newAncestors.extend(ancestors) ancestors=newAncestors break for index in range(oldAncestorLen): if parent==oldAncestors[(oldAncestorLen-1)-index]: ancestors=oldAncestors[0:oldAncestorLen-index]+ancestors matchedOld=True break if matchedOld: break ancestors.insert(0,parent) parent=parent.parent if needsFocusState: for parent in ancestors: if (not hasFocusState) and (parent.IAccessibleStates&STATE_SYSTEM_FOCUSED): hasFocusState=True foundGroup=False for index in range(len(ancestors)): role=ancestors[index].role if role==controlTypes.ROLE_WINDOW: continue if role==controlTypes.ROLE_GROUPING: foundGroup=True break groupObj=findGroupboxObject(ancestors[index]) if groupObj: foundGroup=True ancestors.insert(index,groupObj) break if not foundGroup: groupObj=findGroupboxObject(obj) if groupObj: ancestors.append(groupObj) if needsFocusState: if not hasFocusState: return virtualBuffers.IAccessible.update(obj) api.setFocusObject(obj,ancestors=ancestors) if isForegroundChange: speech.cancelSpeech() api.setForegroundObject(obj) eventHandler.manageEvent("gainFocus",obj)
efbd532e68c1602bb0772db4853fbd6f07450ec7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/efbd532e68c1602bb0772db4853fbd6f07450ec7/IAccessibleHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7155, 67, 12633, 1133, 12, 2603, 16, 291, 23206, 3043, 33, 8381, 16, 20600, 9233, 1119, 33, 5510, 4672, 309, 353, 23206, 3043, 30, 4260, 9233, 1119, 33, 8381, 309, 486, 1081, 30, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7155, 67, 12633, 1133, 12, 2603, 16, 291, 23206, 3043, 33, 8381, 16, 20600, 9233, 1119, 33, 5510, 4672, 309, 353, 23206, 3043, 30, 4260, 9233, 1119, 33, 8381, 309, 486, 1081, 30, 327, ...
self.bot("Changing map to %s" % self._map)
self._parent.bot("Changing map to %s" % self._map)
def end_vote_yes(self, yes, no): if yes < self.min_votes: self.console.say(self._parent.getMessage('novotes')) return self.console.queueEvent(self.console.getEvent('EVT_VOTEMAP_COMMAND', (self._map,), self.client)) self.bot("Changing map to %s" % self._map) self.console.say(self._parent.getMessage('change_map', self._map)) time.sleep(1) self.console.write("map %s" %self._map)
e711e4e64b3337ea463f63d170b1d1c626bc0e01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12909/e711e4e64b3337ea463f63d170b1d1c626bc0e01/voting2g.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 67, 25911, 67, 9707, 12, 2890, 16, 225, 12465, 16, 225, 1158, 4672, 309, 12465, 411, 365, 18, 1154, 67, 27800, 30, 365, 18, 8698, 18, 87, 528, 12, 2890, 6315, 2938, 18, 24906, 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, 679, 67, 25911, 67, 9707, 12, 2890, 16, 225, 12465, 16, 225, 1158, 4672, 309, 12465, 411, 365, 18, 1154, 67, 27800, 30, 365, 18, 8698, 18, 87, 528, 12, 2890, 6315, 2938, 18, 24906, 2...
if dir[-1] == '\n': dir = dir[:-1]
dir = dir.rstrip()
def addpackage(sitedir, name): global _dirs_in_sys_path if _dirs_in_sys_path is None: _init_pathinfo() reset = 1 else: reset = 0 fullname = os.path.join(sitedir, name) try: f = open(fullname) except IOError: return while 1: dir = f.readline() if not dir: break if dir[0] == '#': continue if dir.startswith("import"): exec dir continue if dir[-1] == '\n': dir = dir[:-1] dir, dircase = makepath(sitedir, dir) if not dircase in _dirs_in_sys_path and os.path.exists(dir): sys.path.append(dir) _dirs_in_sys_path[dircase] = 1 if reset: _dirs_in_sys_path = None
d8a38a37a5b2168f7261f76d0542b79344fdb02a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d8a38a37a5b2168f7261f76d0542b79344fdb02a/site.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 5610, 12, 87, 16261, 481, 16, 508, 4672, 2552, 389, 8291, 67, 267, 67, 9499, 67, 803, 309, 389, 8291, 67, 267, 67, 9499, 67, 803, 353, 599, 30, 389, 2738, 67, 803, 1376, 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, 527, 5610, 12, 87, 16261, 481, 16, 508, 4672, 2552, 389, 8291, 67, 267, 67, 9499, 67, 803, 309, 389, 8291, 67, 267, 67, 9499, 67, 803, 353, 599, 30, 389, 2738, 67, 803, 1376, 1435, ...
remove_criteria(request, filter) if filter.registered:
remove_criteria(request, search_filter) if search_filter.registered:
def filter_new(request): access = check_access(request, request.user, ['ain7-membre','ain7-secretariat']) if access: return access filter = annuaire_search_engine().unregistered_filters(request.user.person) if not filter: return HttpResponseRedirect('/annuaire/advanced_search/') remove_criteria(request, filter) if filter.registered: return HttpResponseRedirect( '/annuaire/advanced_search/filter/%s/' % filter.id) else: return HttpResponseRedirect('/annuaire/advanced_search/')
401c15cd538eb03714b4341818e3a5f67038b93a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5417/401c15cd538eb03714b4341818e3a5f67038b93a/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 2704, 12, 2293, 4672, 225, 2006, 273, 866, 67, 3860, 12, 2293, 16, 590, 18, 1355, 16, 10228, 530, 27, 17, 3917, 6073, 17023, 530, 27, 17, 5875, 12954, 270, 19486, 309, 2006, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 2704, 12, 2293, 4672, 225, 2006, 273, 866, 67, 3860, 12, 2293, 16, 590, 18, 1355, 16, 10228, 530, 27, 17, 3917, 6073, 17023, 530, 27, 17, 5875, 12954, 270, 19486, 309, 2006, ...
parts = s.split('+')
parts = s.split('+')
def parse_keystroke(s): """ Return (modifiers, keysym), extracted from the string `s`. It has to contain several modifiers and keysym names, joined together with a '+': CTRL+A MOD4+q """ modmask, keysym = 0, 0 parts = s.split('+') modifiers = parts[:-1] key = parts[-1] # create modmask for mod in modifiers: try: modmask |= MODIFIERS[mod.lower()] except KeyError: log.error('Unknown modifier: "%s"' % mod) # get keysym try: keysym = getattr(keysymdef, 'XK_%s' % key) except AttributeError: log.error('Unknown key: "%s"' % key) return modmask, keysym
94fa657c84ef813531abcb7b2d55d6bf218bf4f5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10761/94fa657c84ef813531abcb7b2d55d6bf218bf4f5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 856, 16181, 12, 87, 4672, 3536, 2000, 261, 15432, 16, 1311, 2942, 3631, 9438, 628, 326, 533, 1375, 87, 8338, 225, 2597, 711, 358, 912, 11392, 10429, 471, 1311, 2942, 1257, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 856, 16181, 12, 87, 4672, 3536, 2000, 261, 15432, 16, 1311, 2942, 3631, 9438, 628, 326, 533, 1375, 87, 8338, 225, 2597, 711, 358, 912, 11392, 10429, 471, 1311, 2942, 1257, 16, ...
print " OBJ: %s" % (obj_id,)
def _check(self, cr, uid, automatic=False, use_new_cursor=False, \ context=None): """ This Function is call by scheduler. """ rule_pool = self.pool.get('base.action.rule') rule_ids = rule_pool.search(cr, uid, [], context=context) self._register_hook(cr, uid, rule_ids, context=context)
6027763a6ac656c9fd5dd6a4377e6c24ecd91e0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6027763a6ac656c9fd5dd6a4377e6c24ecd91e0c/base_action_rule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 12, 2890, 16, 4422, 16, 4555, 16, 5859, 33, 8381, 16, 999, 67, 2704, 67, 9216, 33, 8381, 16, 521, 819, 33, 7036, 4672, 3536, 1220, 4284, 353, 745, 635, 8129, 18, 3536, 172...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 12, 2890, 16, 4422, 16, 4555, 16, 5859, 33, 8381, 16, 999, 67, 2704, 67, 9216, 33, 8381, 16, 521, 819, 33, 7036, 4672, 3536, 1220, 4284, 353, 745, 635, 8129, 18, 3536, 172...
topSizer.Fit(self) topSizer.SetSizeHints(self)
def __do_layout(self): # begin wxGlade: pythonShellFrame.__do_layout topSizer = wx.BoxSizer(wx.VERTICAL) sizer_2 = wx.BoxSizer(wx.VERTICAL) sizer_3 = wx.BoxSizer(wx.VERTICAL) sizer_6 = wx.BoxSizer(wx.HORIZONTAL) sizer_3.Add(self.pyShell, 1, wx.EXPAND, 0) sizer_6.Add(self.closeButton, 0, 0, 0) sizer_3.Add(sizer_6, 0, wx.TOP|wx.ALIGN_RIGHT, 7) sizer_2.Add(sizer_3, 1, wx.ALL|wx.EXPAND, 7) self.panel_1.SetAutoLayout(1) self.panel_1.SetSizer(sizer_2) topSizer.Add(self.panel_1, 1, wx.EXPAND, 0) self.SetAutoLayout(1) self.SetSizer(topSizer) topSizer.Fit(self) topSizer.SetSizeHints(self) self.Layout() # end wxGlade
77c01e2efea56fc4678be318ad48b4256113aa74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/77c01e2efea56fc4678be318ad48b4256113aa74/pythonShellFrame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2896, 67, 6741, 12, 2890, 4672, 468, 2376, 7075, 21308, 2486, 30, 5790, 13220, 3219, 16186, 2896, 67, 6741, 1760, 20512, 273, 7075, 18, 3514, 20512, 12, 27226, 18, 21654, 10109, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2896, 67, 6741, 12, 2890, 4672, 468, 2376, 7075, 21308, 2486, 30, 5790, 13220, 3219, 16186, 2896, 67, 6741, 1760, 20512, 273, 7075, 18, 3514, 20512, 12, 27226, 18, 21654, 10109, 13, ...
tmp = os.path.normpath(tempfile.mktemp())
tmp = os.path.normpath(tempfile.mktemp('.lnk'))
def __call__(self, target, source, env, for_signature): cmd = env.subst_list(self.cmd, 0, target, source)[0] if for_signature or \ (reduce(lambda x, y: x + len(y), cmd, 0) + len(cmd)) <= 2048: return self.cmd else: # In Cygwin, we want to use rm to delete the temporary file, # because del does not exist in the sh shell. rm = env.Detect('rm') or 'del'
e575cd8583002189141b3c7880578af1b4ec5a89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12817/e575cd8583002189141b3c7880578af1b4ec5a89/win32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 1018, 16, 1084, 16, 1550, 16, 364, 67, 8195, 4672, 1797, 273, 1550, 18, 1717, 334, 67, 1098, 12, 2890, 18, 4172, 16, 374, 16, 1018, 16, 1084, 25146, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 1018, 16, 1084, 16, 1550, 16, 364, 67, 8195, 4672, 1797, 273, 1550, 18, 1717, 334, 67, 1098, 12, 2890, 18, 4172, 16, 374, 16, 1018, 16, 1084, 25146, 20...
for replicaID,info in res['Value'].items():
for replicaID, info in res['Value'].items():
def __getNewReplicas(self): """ This obtains the New replicas from the Replicas table and for each LFN the requested storage element """ # First obtain the New replicas from the Replicas table res = self.stagerClient.getReplicasWithStatus('New') if not res['OK']: gLogger.error("RequestPreparation.__getNewReplicas: Failed to get replicas with New status.", res['Message']) return res if not res['Value']: gLogger.debug("RequestPreparation.__getNewReplicas: No New replicas found to process.") return S_OK() else: gLogger.debug("RequestPreparation.__getNewReplicas: Obtained %s New replicas(s) to process." % len(res['Value'])) replicas = {} replicaIDs = {} for replicaID,info in res['Value'].items(): lfn = info['LFN'] storageElement = info['SE'] if not replicas.has_key(lfn): replicas[lfn] = {} replicas[lfn][storageElement] = replicaID replicaIDs[replicaID] = (lfn,storageElement) return S_OK({'Replicas':replicas,'ReplicaIDs':replicaIDs})
d68cb60fd991fa9f206177d2794f8d04f940cd00 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d68cb60fd991fa9f206177d2794f8d04f940cd00/RequestPreparationAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1908, 17248, 12, 2890, 4672, 3536, 1220, 3768, 16598, 326, 1166, 21545, 628, 326, 31222, 1014, 471, 364, 1517, 18803, 50, 326, 3764, 2502, 930, 3536, 468, 5783, 7161, 326, 1166,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1908, 17248, 12, 2890, 4672, 3536, 1220, 3768, 16598, 326, 1166, 21545, 628, 326, 31222, 1014, 471, 364, 1517, 18803, 50, 326, 3764, 2502, 930, 3536, 468, 5783, 7161, 326, 1166,...