bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def set(self, event, subject, adjust, reason = None): if self.public and not event.public: event.addresponse(u'Karma must be done in public') return | def set(self, event, subject, adjust, reason=None): if self.public and not event.public: event.addresponse(u'Karma must be done in public') return | 453,300 |
def get_factoid(session, name, number, pattern, is_regex, all=False, literal=False): """session: SQLAlchemy session name: Factoid name (can contain arguments unless literal query) number: Return factoid[number] (or factoid[number:] for literal queries) pattern: Return factoids matching this pattern (cannot be used in c... | def get_factoid(session, name, number, pattern, is_regex, all=False, literal=False): """session: SQLAlchemy session name: Factoid name (can contain arguments unless literal query) number: Return factoid[number] (or factoid[number:] for literal queries) pattern: Return factoids matching this pattern (cannot be used in c... | 453,301 |
def literal(self, event, name, number, pattern, is_regex): factoids = get_factoid(event.session, name, number, pattern, is_regex, literal=True) number = number and int(number) or 1 if factoids: event.addresponse(u', '.join(u'%i: %s' % (index + number, value.value) for index, (factoid, name, value) in enumerate(factoids... | def literal(self, event, name, number, pattern, is_regex): factoids = get_factoid(event.session, name, number, pattern, is_regex, literal=True) number = number and int(number) or 1 if factoids: event.addresponse(u', '.join(u'%i: %s' % (index + number, value.value) for index, (factoid, name, value) in enumerate(factoids... | 453,302 |
def alias(self, event, target, source): | def alias(self, event, target, source): | 453,303 |
def _interpolate(message, event): "Expand factoid variables" utcnow = datetime.utcnow() now = utcnow.replace(tzinfo=tzutc()).astimezone(tzlocal()) message = message.replace(u'$who', event.sender['nick']) message = message.replace(u'$channel', event.channel) message = message.replace(u'$year', unicode(now.year)) messag... | def _interpolate(message, event): "Expand factoid variables" utcnow = datetime.utcnow() now = utcnow.replace(tzinfo=tzutc()).astimezone(tzlocal()) message = message.replace(u'$who', event.sender['nick']) message = message.replace(u'$channel', event.channel) message = message.replace(u'$year', unicode(now.year)) messag... | 453,304 |
def remote_get(self, name, number=None, pattern=None, is_regex=None, event={}): factoid = get_factoid(event.session, name, number, pattern, is_regex) | def remote_get(self, name, number=None, pattern=None, is_regex=None, event={}): factoid = get_factoid(event.session, name, number, pattern, is_regex) | 453,305 |
def last_set(self, event): if self.last_set_factoid is None: event.addresponse(u'Sorry, nobody has taught me anything recently') else: event.addresponse(u'It was: %s', self.last_set_factoid) | def last_set(self, event): if self.last_set_factoid is None: event.addresponse(u'Sorry, nobody has taught me anything recently') else: event.addresponse(u'It was: %s', self.last_set_factoid) | 453,306 |
def dota_players(self, event): try: users = self.bnet_players('W3XP') except socket.error: event.addresponse(u"Sorry, I couldn't contact the server. Maybe it's down") return if users: event.addresponse(u'The battlefield contains %s', human_join(users)) else: event.addresponse(u'Nobody. Everyone must have a lives...') | def dota_players(self, event): users = self.bnet_players('W3XP') if users: event.addresponse(u'The battlefield contains %s', human_join(users)) else: event.addresponse(u'Nobody. Everyone must have a lives...') | 453,307 |
def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | 453,308 |
def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | 453,309 |
def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | 453,310 |
def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | 453,311 |
def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | 453,312 |
def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | 453,313 |
def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | 453,314 |
def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | 453,315 |
def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | 453,316 |
def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | def cs_players(self, event): try: server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | 453,317 |
def announce(self, event, who, what, from_who, from_when): """This handler gets called after the timeout and will notice the user.""" | def announce(self, event, who, what, from_who, from_when): """This handler gets called after the timeout and will notice the user.""" | 453,318 |
def remind(self, event, who, at, when, how, what): """This is the main handler that gets called on the above @match. This parses the date and sets up the "announce" function to be fired when the time is up.""" | def remind(self, event, who, at, when, how, what): """This is the main handler that gets called on the above @match. This parses the date and sets up the "announce" function to be fired when the time is up.""" | 453,319 |
def remind(self, event, who, at, when, how, what): """This is the main handler that gets called on the above @match. This parses the date and sets up the "announce" function to be fired when the time is up.""" | def remind(self, event, who, at, when, how, what): """This is the main handler that gets called on the above @match. This parses the date and sets up the "announce" function to be fired when the time is up.""" | 453,320 |
def remind(self, event, who, at, when, how, what): """This is the main handler that gets called on the above @match. This parses the date and sets up the "announce" function to be fired when the time is up.""" | def remind(self, event, who, at, when, how, what): """This is the main handler that gets called on the above @match. This parses the date and sets up the "announce" function to be fired when the time is up.""" | 453,321 |
def remind(self, event, who, at, when, how, what): """This is the main handler that gets called on the above @match. This parses the date and sets up the "announce" function to be fired when the time is up.""" | def remind(self, event, who, at, when, how, what): """This is the main handler that gets called on the above @match. This parses the date and sets up the "announce" function to be fired when the time is up.""" | 453,322 |
def remind(self, event, who, at, when, how, what): """This is the main handler that gets called on the above @match. This parses the date and sets up the "announce" function to be fired when the time is up.""" | def remind(self, event, who, at, when, how, what): """This is the main handler that gets called on the above @match. This parses the date and sets up the "announce" function to be fired when the time is up.""" | 453,323 |
def remind(self, event, who, at, when, how, what): """This is the main handler that gets called on the above @match. This parses the date and sets up the "announce" function to be fired when the time is up.""" | def remind(self, event, who, at, when, how, what): """This is the main handler that gets called on the above @match. This parses the date and sets up the "announce" function to be fired when the time is up.""" | 453,324 |
def announce(self, event, who, what, from_who, from_when): """handler that gets called after the timeout""" | def announce(self, event, who, what, from_who, from_when): """handler that gets called after the timeout""" | 453,325 |
def announce(self, event, who, what, from_who, from_when): """handler that gets called after the timeout""" | def announce(self, event, who, what, from_who, from_when): """handler that gets called after the timeout""" | 453,326 |
def remind(self, event, who, at, when, how, what): """main handler this parses the date and sets up the "announce" function to be fired when the time is up.""" | def remind(self, event, who, at, when, how, what): """This is the main handler that gets called on the above @match. this parses the date and sets up the "announce" function to be fired when the time is up.""" | 453,327 |
def remind(self, event, who, at, when, how, what): """main handler this parses the date and sets up the "announce" function to be fired when the time is up.""" | def remind(self, event, who, at, when, how, what): """main handler This parses the date and sets up the "announce" function to be fired when the time is up.""" | 453,328 |
def _onPresenceAvailable(self, presence): entity = JID(presence["from"]) | def _onPresenceAvailable(self, presence): entity = JID(presence["from"]) | 453,329 |
def reorderVV(node, align, model, bDebug): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos in ['P']: if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node, nPUBetween, mod... | def reorderVV(node, align, model, bDebug): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos in ['P']: if ( align != None and crossLink(left_child, node, align) )\ or ( align == None and classify(left_child, node, nPU... | 453,330 |
def reorderVV(node, align, model, bDebug): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos in ['P']: if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node, nPUBetween, mod... | def reorderVV(node, align, model, bDebug): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos in ['P']: if ( align != None and crossLink(left_child, node, align) )\ or ( align == None and classify(left_child, node, nPU... | 453,331 |
def reorderVV(node, align, model, bDebug): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos in ['P']: if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node, nPUBetween, mod... | def reorderVV(node, align, model, bDebug): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos in ['P']: if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node, nPUBetween, mod... | 453,332 |
def reorderNN(node, align, model, bDebug): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos == 'DEC' or left_child.pos == 'DEG': if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_chi... | def reorderNN(node, align, model, bDebug): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos == 'DEC' or left_child.pos == 'DEG': if ( align != None and crossLink(left_child, node, align) )\ or ( align == None and class... | 453,333 |
def reorderNN(node, align, model, bDebug): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos == 'DEC' or left_child.pos == 'DEG': if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_chi... | def reorderNN(node, align, model, bDebug): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos == 'DEC' or left_child.pos == 'DEG': if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_chi... | 453,334 |
def deg(node): assert node.pos == 'DEG' for left_child in node.left_children: if left_child.pos == 'JJ': return False return True | def deg(node): assert node.pos == 'DEG' for left_child in node.left_children: if left_child.pos == 'JJ': return False return True | 453,335 |
def readAlign(path): retval = {} n=0 file = gzip.open(path) for line in file: if line.startswith('SENT:'): | def readAlign(path): retval = {} n=0 file = gzip.open(path) for line in file: if line.startswith('SENT:'): | 453,336 |
def readAlign(path): retval = {} n=0 file = gzip.open(path) for line in file: if line.startswith('SENT:'): number = int(line[6:-1]) assert number == n # make sure of sentence index if n>0: yield retval retval = {} n += 1 else: assert line.startswith('S ') source, target = map(int, line[2:-1].split()) if not source in r... | def readAlign(path): retval = {} n=0 file = gzip.open(path) for line in file: if line.startswith('SENT:'): # make sure of sentence index if n>0: yield retval retval = {} n += 1 else: assert line.startswith('S ') source, target = map(int, line[2:-1].split()) if not source in retval: retval[source] = [] retval[source].... | 453,337 |
def reorderVV(node, align, model): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos in ['P']: if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node, nPUBetween, model) ): | def reorderVV(node, align, model, bDebug): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos in ['P']: if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node, nPUBetween, mod... | 453,338 |
def reorderVV(node, align, model): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos in ['P']: if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node, nPUBetween, model) ): | def reorderVV(node, align, model): left_children = [] nPUBetween = 0 while node.left_children: if bDebug: extra = dep.CDepNode(); extra.token='('+left_child.pos; extra.pos=""; extra.word_index=-1 node.right_children.append(extra) left_child = node.left_children.pop(-1) # for each left bReorder = False if bDebug: extr... | 453,339 |
def reorderVV(node, align, model): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos in ['P']: if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node, nPUBetween, model) ): | def reorderVV(node, align, model): left_children = [] nPUBetween = 0 while node.left_children: if bDebug: extra = dep.CDepNode(); extra.token=')'; extra.pos=""; extra.word_index=-1 node.right_children.append(extra) left_child = node.left_children.pop(-1) # for each left bReorder = False if bDebug: extra = dep.CDepNode... | 453,340 |
def reorderVV(node, align, model): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos in ['P']: if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node, nPUBetween, model) ): | def reorderVV(node, align, model): left_children = [] nPUBetween = 0 while node.left_children:if bDebug: extra = dep.CDepNode(); extra.token=')'; extra.pos=""; extra.word_index=-1 node.right_children.insert(0, extra) left_child = node.left_children.pop(-1) # for each left bReorder = Falseif bDebug: extra = dep.CDepNo... | 453,341 |
def reorderVV(node, align, model): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos in ['P']: if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node, nPUBetween, model) ): | def reorderVV(node, align, model): left_children = [] nPUBetween = 0 while node.left_children: if bDebug: extra = dep.CDepNode(); extra.token='('+left_child.pos; extra.pos=""; extra.word_index=-1 node.right_children.insert(0, extra) left_child = node.left_children.pop(-1) # for each left bReorder = False if bDebug: ext... | 453,342 |
def reorderNN(node, align, model): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos == 'DEC' or left_child.pos == 'DEG': if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node... | def reorderNN(node, align, model, bDebug): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos == 'DEC' or left_child.pos == 'DEG': if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_chi... | 453,343 |
def reorderNN(node, align, model): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos == 'DEC' or left_child.pos == 'DEG': if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node... | def reorderNN(node, align, model): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos == 'DEC' or left_child.pos == 'DEG': if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node... | 453,344 |
def reorderNN(node, align, model): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos == 'DEC' or left_child.pos == 'DEG': if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node... | def reorderNN(node, align, model): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos == 'DEC' or left_child.pos == 'DEG': if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node... | 453,345 |
def reorderNode(node, align, model): # recursion for left_child in node.left_children: reorderNode(left_child, align, model) for right_child in node.right_children: reorderNode(right_child, align, model) # ver if node.pos == 'VV': reorderVV(node, align, model) # n. elif node.pos in ['NN', 'NR']: reorderNN(node, align, ... | def reorderNode(node, align, model, bDebug): # recursion for left_child in node.left_children: reorderNode(left_child, align, model) for right_child in node.right_children: reorderNode(right_child, align, model) # ver if node.pos == 'VV': reorderVV(node, align, model) # n. elif node.pos in ['NN', 'NR']: reorderNN(node,... | 453,346 |
def reorderNode(node, align, model): # recursion for left_child in node.left_children: reorderNode(left_child, align, model) for right_child in node.right_children: reorderNode(right_child, align, model) # ver if node.pos == 'VV': reorderVV(node, align, model) # n. elif node.pos in ['NN', 'NR']: reorderNN(node, align, ... | def reorderNode(node, align, model): # recursion for left_child in node.left_children: reorderNode(left_child, align, model, bDebug) for right_child in node.right_children: reorderNode(right_child, align, model) # ver if node.pos == 'VV': reorderVV(node, align, model) # n. elif node.pos in ['NN', 'NR']: reorderNN(node,... | 453,347 |
def reorderNode(node, align, model): # recursion for left_child in node.left_children: reorderNode(left_child, align, model) for right_child in node.right_children: reorderNode(right_child, align, model) # ver if node.pos == 'VV': reorderVV(node, align, model) # n. elif node.pos in ['NN', 'NR']: reorderNN(node, align, ... | def reorderNode(node, align, model): # recursion for left_child in node.left_children: reorderNode(left_child, align, model) for right_child in node.right_children: reorderNode(right_child, align, model, bDebug) # ver if node.pos == 'VV': reorderVV(node, align, model) # n. elif node.pos in ['NN', 'NR']: reorderNN(node,... | 453,348 |
def reorderNode(node, align, model): # recursion for left_child in node.left_children: reorderNode(left_child, align, model) for right_child in node.right_children: reorderNode(right_child, align, model) # ver if node.pos == 'VV': reorderVV(node, align, model) # n. elif node.pos in ['NN', 'NR']: reorderNN(node, align, ... | def reorderNode(node, align, model): # recursion for left_child in node.left_children: reorderNode(left_child, align, model) for right_child in node.right_children: reorderNode(right_child, align, model) # ver if node.pos == 'VV': reorderVV(node, align, model, bDebug) # n. elif node.pos in ['NN', 'NR']: reorderNN(node,... | 453,349 |
def reorderNode(node, align, model): # recursion for left_child in node.left_children: reorderNode(left_child, align, model) for right_child in node.right_children: reorderNode(right_child, align, model) # ver if node.pos == 'VV': reorderVV(node, align, model) # n. elif node.pos in ['NN', 'NR']: reorderNN(node, align, ... | def reorderNode(node, align, model): # recursion for left_child in node.left_children: reorderNode(left_child, align, model) for right_child in node.right_children: reorderNode(right_child, align, model) # ver if node.pos == 'VV': reorderVV(node, align, model) # n. elif node.pos in ['NN', 'NR']: reorderNN(node, align, ... | 453,350 |
def reorder(tree, align, model): reorderNode(tree.root, align, model) updateIndex(tree) | def reorder(tree, align, model, bDebug): reorderNode(tree.root, align, model, bDebug) updateIndex(tree) | 453,351 |
def deg(node): assert node.pos == 'DEG' for left_child in node.left_children: if left_child.pos == 'JJ': return False return True | def deg(node): assert node.pos == 'DEG' for left_child in node.left_children: if left_child.pos == 'JJ': return False return True | 453,352 |
def deg(node): assert node.pos == 'DEG' for left_child in node.left_children: if left_child.pos == 'JJ': return False return True | def deg(node): assert node.pos == 'DEG' for left_child in node.left_children: if left_child.pos == 'JJ': return False return True | 453,353 |
def deg(node): assert node.pos == 'DEG' for left_child in node.left_children: if left_child.pos == 'JJ': return False return True | def deg(node): assert node.pos == 'DEG' for left_child in node.left_children: if left_child.pos == 'JJ': return False return True | 453,354 |
def setupSysPath(): testPath = sys.path[0] print "sys.path[0] =", testPath rem = re.match("(^.*/)test$", testPath) if not rem: print "This script expects to reside in .../test." sys.exit(-1) lldbBasePath = rem.group(1) lldbDebugPythonPath = "build/Debug/LLDB.framework/Resources/Python" lldbReleasePythonPath = "build/Re... | def setupSysPath(): testPath = sys.path[0] rem = re.match("(^.*/)test$", testPath) if not rem: print "This script expects to reside in .../test." sys.exit(-1) lldbBasePath = rem.group(1) lldbDebugPythonPath = "build/Debug/LLDB.framework/Resources/Python" lldbReleasePythonPath = "build/Release/LLDB.framework/Resources/P... | 453,355 |
def runCmd(self, cmd, msg=None, check=True, trace=False, setCookie=True): """ Ask the command interpreter to handle the command and then check its return status. """ # Fail fast if 'cmd' is not meaningful. if not cmd or len(cmd) == 0: raise Exception("Bad 'cmd' parameter encountered") | def runCmd(self, cmd, msg=None, check=True, trace=False, setCookie=True): """ Ask the command interpreter to handle the command and then check its return status. """ # Fail fast if 'cmd' is not meaningful. if not cmd or len(cmd) == 0: raise Exception("Bad 'cmd' parameter encountered") | 453,356 |
def init(self): """ Initialize the source location, setting its file, line and column. """ f, l, c = c_void_p(), c_uint(), c_uint() SourceLocation_loc(self, byref(f), byref(l), byref(c)) self.file, self.line, self.column = File(f), l, c return self | def init(self): """ Initialize the source location, setting its file, line and column. """ f, l, c = c_object_p(), c_uint(), c_uint() SourceLocation_loc(self, byref(f), byref(l), byref(c)) self.file, self.line, self.column = File(f), l, c return self | 453,357 |
def init(self): """ Initialize the source location, setting its file, line and column. """ f, l, c = c_void_p(), c_uint(), c_uint() SourceLocation_loc(self, byref(f), byref(l), byref(c)) self.file, self.line, self.column = File(f), l, c return self | def init(self): """ Initialize the source location, setting its file, line and column. """ f, l, c = c_void_p(), c_uint(), c_uint() SourceLocation_loc(self, byref(f), byref(l), byref(c)) f = File(f) if f else None self.file, self.line, self.column = f, int(l.value), int(c.value) return self | 453,358 |
def parse(ix, path, args = []): """ Construct a translation unit from the given source file, applying the given command line argument. """ # TODO: Support unsaved files. argc, argv = len(args), create_string_vector(args) ptr = TranslationUnit_parse(ix, path, argc, byref(argv), 0, 0) return TranslationUnit(ptr, True) if... | def parse(ix, path, args = []): """ Construct a translation unit from the given source file, applying the given command line argument. """ # TODO: Support unsaved files. argc, argv = len(args), create_string_vector(args) ptr = TranslationUnit_parse(ix, path, argc, byref(argv), 0, 0) return TranslationUnit(ptr, True) if... | 453,359 |
def name(self): """Return the name of the file, if valid. Otherwise, an empty string.""" return File_name(self) if self.obj else "" | def name(self): """Return the name of the file, if valid. Otherwise, an empty string.""" return File_name(self) if self.obj else "" | 453,360 |
def time(self): """Return the time of the file, if valid. Otherwise, -1.""" return File_time(self) if self.obj else -1 | def time(self): """Return the time of the file, if valid. Otherwise, -1.""" return File_time(self) if self.obj else -1 | 453,361 |
def load(self, fun, data = None): """ Recursively visit any elements declared or referenced within this declaration. """ f = lambda d, c, x: fun(Declaration(d), c, x) Declaration_load(self, Callback(f), data) | def load(self, fun, data = None): """ Recursively visit any elements declared or referenced within this declaration. """ f = lambda d, c, x: fun(Declaration(d), c, x) Declaration_load(self, Callback(f), data) | 453,362 |
def load(self, fun, data = None): """ Recursively visit any elements declared or referenced within this declaration. """ f = lambda d, c, x: fun(Declaration(d), c, x) Declaration_load(self, Callback(f), data) | def load(self, fun, data = None): """ Recursively visit any elements declared or referenced within this declaration. """ f = lambda d, c, x: fun(Declaration(d), c, x) Declaration_load(self, Callback(f), data) | 453,363 |
def load(self, fun, data = None): """ Recursively visit any elements declared or referenced within this declaration. """ f = lambda d, c, x: fun(Declaration(d), c, x) Declaration_load(self, Callback(f), data) | def load(self, fun, data = None): """ Recursively visit any elements declared or referenced within this declaration. """ f = lambda d, c, x: fun(Declaration(d), c, x) Declaration_load(self, Callback(f), data) | 453,364 |
def test_help_should_not_hang_emacsshell(self): """Command 'settings set term-width 0' should not hang the help command.""" self.runCmd("settings set term-width 0") self.expect("help", startstr = 'The following is a list of built-in, permanent debugger commands') | def test_help_should_not_hang_emacsshell(self): """Command 'settings set term-width 0' should not hang the help command.""" self.runCmd("settings set term-width 0") self.expect("help", startstr = 'The following is a list of built-in, permanent debugger commands') | 453,365 |
def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | 453,366 |
def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | 453,367 |
def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | 453,368 |
def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | 453,369 |
def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | 453,370 |
def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | 453,371 |
def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | 453,372 |
def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | def self.runCmd("breakpoint delete") self.expect("breakpoint set -f main.m -l %d" % self.line, BREAKPOINT_CREATED, startstr = "Breakpoint created: 2: file ='main.m', line = %d, locations = 1" % self.line) self.runCmd("process continue") self.expect("expr -o -- my", "Object description displayed correctly", star... | 453,373 |
def test_with_dsym_and_run_command(self): """Create target, breakpoint, launch a process, and then kill it. | def test_with_dsym_and_run_command(self): """Create target, breakpoint, launch a process, and then kill it. | 453,374 |
def hello_world_python(self, useLaunchAPI): """Create target, breakpoint, launch a process, and then kill it.""" | def hello_world_python(self, useLaunchAPI): """Create target, breakpoint, launch a process, and then kill it.""" | 453,375 |
def lldbLoggings(): """Check and do lldb loggings if necessary.""" # Turn on logging for debugging purposes if ${LLDB_LOG} environment variable is # defined. Use ${LLDB_LOG} to specify the log file. ci = lldb.DBG.GetCommandInterpreter() res = lldb.SBCommandReturnObject() if ("LLDB_LOG" in os.environ): if ("LLDB_LOG_O... | def lldbLoggings(): """Check and do lldb loggings if necessary.""" # Turn on logging for debugging purposes if ${LLDB_LOG} environment variable is # defined. Use ${LLDB_LOG} to specify the log file. ci = lldb.DBG.GetCommandInterpreter() res = lldb.SBCommandReturnObject() if ("LLDB_LOG" in os.environ): if ("LLDB_LOG_O... | 453,376 |
def order_file(self): """Test debug symbols follow the correct order by the order file.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | def order_file(self): """Test debug symbols follow the correct order by the order file.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | 453,377 |
def test_with_dsym_and_expr_parser(self): """Test 'frame variable this' aand 'expr this' when stopped inside a constructor.""" self.buildDsym() self.class_types_expr_parser() | def test_with_dsym_and_expr_parser(self): """Test 'frame variable this' and 'expr this' when stopped inside a constructor.""" self.buildDsym() self.class_types_expr_parser() | 453,378 |
def test_with_dwarf_and_expr_parser(self): """Test 'frame variable this' aand 'expr this' when stopped inside a constructor.""" self.buildDwarf() self.class_types_expr_parser() | def test_with_dwarf_and_expr_parser(self): """Test 'frame variable this' and 'expr this' when stopped inside a constructor.""" self.buildDwarf() self.class_types_expr_parser() | 453,379 |
def class_types_expr_parser(self): """Test 'frame variable this' aand 'expr this' when stopped inside a constructor.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | def class_types_expr_parser(self): """Test 'frame variable this' and 'expr this' when stopped inside a constructor.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | 453,380 |
def getGTestTests(self, path, litConfig, localConfig): """getGTestTests(path) - [name] | def getGTestTests(self, path, litConfig, localConfig): """getGTestTests(path) - [name] | 453,381 |
def execute(self, test, litConfig): testPath,testName = os.path.split(test.getSourcePath()) while not os.path.exists(testPath): # Handle GTest parametrized and typed tests, whose name includes # some '/'s. testPath, namePrefix = os.path.split(testPath) testName = os.path.join(namePrefix, testName) | def execute(self, test, litConfig): testPath,testName = os.path.split(test.getSourcePath()) while not os.path.exists(testPath): # Handle GTest parametrized and typed tests, whose name includes # some '/'s. testPath, namePrefix = os.path.split(testPath) testName = os.path.join(namePrefix, testName) | 453,382 |
def executeShCmd(cmd, cfg, cwd, results): if isinstance(cmd, ShUtil.Seq): if cmd.op == ';': res = executeShCmd(cmd.lhs, cfg, cwd, results) return executeShCmd(cmd.rhs, cfg, cwd, results) if cmd.op == '&': raise NotImplementedError,"unsupported test command: '&'" if cmd.op == '||': res = executeShCmd(cmd.lhs, cfg, cwd... | def executeShCmd(cmd, cfg, cwd, results): if isinstance(cmd, ShUtil.Seq): if cmd.op == ';': res = executeShCmd(cmd.lhs, cfg, cwd, results) return executeShCmd(cmd.rhs, cfg, cwd, results) if cmd.op == '&': raise NotImplementedError,"unsupported test command: '&'" if cmd.op == '||': res = executeShCmd(cmd.lhs, cfg, cwd... | 453,383 |
def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | 453,384 |
def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | def data_type_and_expr_objc(self): """Lookup objective-c data types and evaluate expressions.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | 453,385 |
def test_simplehelp(self): """A simple test of 'help' command and its output.""" res = lldb.SBCommandReturnObject() self.ci.HandleCommand("help", res, False) self.assertTrue(res.Succeeded()) self.assertTrue(res.GetOutput().startswith( 'The following is a list of built-in, permanent debugger commands')) #print res.GetOu... | def test_simplehelp(self): """A simple test of 'help' command and its output.""" res = lldb.SBCommandReturnObject() self.ci.HandleCommand("help", res) self.assertTrue(res.Succeeded()) self.assertTrue(res.GetOutput().startswith( 'The following is a list of built-in, permanent debugger commands')) def test_help_should_... | 453,386 |
def expect(self, str, msg=None, patterns=None, startstr=None, substrs=None, trace=False, error=False, matching=True, exe=True): """ Similar to runCmd; with additional expect style output matching ability. | def expect(self, str, msg=None, patterns=None, startstr=None, substrs=None, trace=False, error=False, matching=True, exe=True): """ Similar to runCmd; with additional expect style output matching ability. | 453,387 |
def setupSysPath(): """Add LLDB.framework/Resources/Python to the search paths for modules.""" # Get the directory containing the current script. testPath = sys.path[0] if not testPath.endswith('test'): print "This script expects to reside in lldb's test directory." sys.exit(-1) base = os.path.abspath(os.path.join(te... | defsetupSysPath():"""AddLLDB.framework/Resources/Pythontothesearchpathsformodules."""#Getthedirectorycontainingthecurrentscript.testPath=sys.path[0]ifnottestPath.endswith('test'):print"Thisscriptexpectstoresideinlldb'stestdirectory."sys.exit(-1)base=os.path.abspath(os.path.join(testPath,os.pardir))dbgPath=os.path.join(... | 453,388 |
def initTestdirs(): """Initialize the list of directories containing our unittest scripts. '-h/--help as the first option prints out usage info and exit the program. """ global verbose global testdirs if len(sys.argv) == 1: pass elif sys.argv[1].find('-h') != -1: # Print usage info and exit. usage() sys.exit(0) else... | def initTestdirs(): """Initialize the list of directories containing our unittest scripts.'-h/--help as the first option prints out usage info and exit the program. """global verbose global testdirsif len(sys.argv) == 1: pass elif sys.argv[1].find('-h') != -1: # Print usage info and exit. usage() sys.exit(0) else: # Pr... | 453,389 |
def visit(prefix, dir, names): """Visitor function for os.path.walk(path, visit, arg).""" global suite for name in names: if os.path.isdir(os.path.join(dir, name)): continue if '.py' == os.path.splitext(name)[1] and name.startswith(prefix): # We found a pattern match for our test case. Add it to the suite. sys.path... | def visit(prefix, dir, names): """Visitor function for os.path.walk(path, visit, arg)."""global suitefor name in names: if os.path.isdir(os.path.join(dir, name)): continueif '.py' == os.path.splitext(name)[1] and name.startswith(prefix): # We found a pattern match for our test case.Add it to the suite. sys.path.append(... | 453,390 |
def set_values(self): """Test settings and readings of program variables.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | def set_values(self): """Test settings and readings of program variables.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) | 453,391 |
def test_with_dsym(self): """Exercise some thread and frame APIs to break if c() is called by a().""" self.buildDsym() self.do_conditional_break() | def test_with_dsym_python(self): """Exercise some thread and frame APIs to break if c() is called by a().""" self.buildDsym() self.do_conditional_break() | 453,392 |
def test_with_dwarf(self): """Exercise some thread and frame APIs to break if c() is called by a().""" self.buildDwarf() self.do_conditional_break() | def test_with_dwarf_python(self): """Exercise some thread and frame APIs to break if c() is called by a().""" self.buildDwarf() self.do_conditional_break() | 453,393 |
def dumpSessionInfo(self): """ Dump the debugger interactions leading to a test error/failure. This allows for more convenient postmortem analysis. | def dumpSessionInfo(self): """ Dump the debugger interactions leading to a test error/failure. This allows for more convenient postmortem analysis. | 453,394 |
def test_dead_strip(self): """Test breakpoint works correctly with dead-code stripping.""" res = self.res exe = os.path.join(os.getcwd(), "a.out") self.ci.HandleCommand("file " + exe, res) self.assertTrue(res.Succeeded()) | def test_dead_strip(self): """Test breakpoint works correctly with dead-code stripping.""" res = self.res exe = os.path.join(os.getcwd(), "a.out") self.ci.HandleCommand("file " + exe, res) self.assertTrue(res.Succeeded()) | 453,395 |
def disassemble_instructions (insts): for i in range(0, insts.GetSize()): print insts.GetInstructionAtIndex(i) | def disassemble_instructions (insts): for i in range(0, insts.GetSize()): print insts.GetInstructionAtIndex(i) | 453,396 |
def disassemble_instructions (insts): for i in range(0, insts.GetSize()): print insts.GetInstructionAtIndex(i) | def disassemble_instructions (insts): for i in range(0, insts.GetSize()): print insts.GetInstructionAtIndex(i) | 453,397 |
def test_break_with_dwarf(self): """Test setting objc breakpoints using 'regexp-break' and 'breakpoint set'.""" self.buildDwarf() self.break_on_objc_methods() | def test_break_with_dwarf(self): """Test setting objc breakpoints using 'regexp-break' and 'breakpoint set'.""" self.buildDwarf() self.break_on_objc_methods() | 453,398 |
def test_data_type_and_expr_with_dsym(self): """Lookup objective-c data types and evaluate expressions.""" self.buildDsym() self.data_type_and_expr_objc() | def test_data_type_and_expr_with_dsym(self): """Lookup objective-c data types and evaluate expressions.""" self.buildDsym() self.data_type_and_expr_objc() | 453,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.