input
stringlengths
11
7.65k
target
stringlengths
22
8.26k
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def setTail(self, pt): self.pt = pt self.Tail.Eq(pt) self.Head.setPoint(self.pt.x + self.x, self.pt.y + self.y)
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def _get_selected_path(self): """ Helper function to get the selected path @return Gtk.TreePath : returns exactly one path for the selected object or None """ selection = self.get_selection() if selection: model, selected_paths ...
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def getHead(self): return self.Head
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def select_backend(self, backend_id=None): """ Selects the backend corresponding to backend_id. If backend_id is none, refreshes the current configuration panel. @param backend_id: the id of the backend to select """ selection = self.get_selection() if backend_id...
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def getTail(self): return self.Tail
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def drawMe(self, g): self.g = g self.g.beginPath() self.g.moveTo(self.p1.x,self.p1.y) self.g.lineTo(self.p2.x,self.p2.y) self.g.stroke()
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def test(self): return ("this is pure test to Inherit")
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def __init__(self, p1, p2): self.p1 = p1 self.p2 = p2 self.length = math.sqrt(math.pow((self.p2.x - self.p1.x), 2) + math.pow((self.p2.y - self.p1.y), 2))
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def drawMe(self, g): self.g = g hole = 5 radius = 10 length = self.getR() # alert(length) # 儲存先前的繪圖狀態 self.g.save() self.g.translate(self.p1.x,self.p1.y) #alert(str(self.p1.x)+","+str(self.p1.y)) #self.g.rotate(-((math.pi/2)-self.getT())) ...
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def __init__(self, p1, p2, p3): self.p1 = p1 self.p2 = p2 self.p3 = p3
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def getLenp3(self): p1 = self.p1 ret = p1.distance(self.p2) return ret
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def getLenp1(self): p2 = self.p2 ret = p2.distance(self.p3) return ret
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def getLenp2(self): p1 = self.p1 ret = p1.distance(self.p3) return ret
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def getAp1(self): ret = math.acos(((self.getLenp2() * self.getLenp2() + self.getLenp3() * self.getLenp3()) - self.getLenp1() * self.getLenp1()) / (2* self.getLenp2() * self.getLenp3())) return ret
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def getAp2(self): ret =math.acos(((self.getLenp1() * self.getLenp1() + self.getLenp3() * self.getLenp3()) - self.getLenp2() * self.getLenp2()) / (2* self.getLenp1() * self.getLenp3())) return ret
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def getAp3(self): ret = math.acos(((self.getLenp1() * self.getLenp1() + self.getLenp2() * self.getLenp2()) - self.getLenp3() * self.getLenp3()) / (2* self.getLenp1() * self.getLenp2())) return ret
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def drawMe(self, g): self.g = g r = 5 # 繪出三個頂點 self.p1.drawMe(self.g,r) self.p2.drawMe(self.g,r) self.p3.drawMe(self.g,r) line1 = Line(self.p1,self.p2) line2 = Line(self.p1,self.p3) line3 = Line(self.p2,self.p3) # 繪出三邊線 line1.drawMe...
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def setSSS(self, lenp3, lenp1, lenp2): self.lenp3 = lenp3 self.lenp1 = lenp1 self.lenp2 = lenp2 self.ap1 = math.acos(((self.lenp2 * self.lenp2 + self.lenp3 * self.lenp3) - self.lenp1 * self.lenp1) / (2* self.lenp2 * self.lenp3)) self.ap2 = math.acos(((self.lenp1 * self.lenp1 + se...
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def setSAS(self, lenp3, ap2, lenp1): self.lenp3 = lenp3 self.ap2 = ap2 self.lenp1 = lenp1 self.lenp2 = math.sqrt((self.lenp3 * self.lenp3 + self.lenp1 * self.lenp1) - 2* self.lenp3 * self.lenp1 * math.cos(self.ap2)) #等於 SSS(AB, BC, CA)
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def setSaSS(self, lenp2, lenp3, lenp1): self.lenp2 = lenp2 self.lenp3 = lenp3 self.lenp1 = lenp1 if(self.lenp1 > (self.lenp2 + self.lenp3)): #<CAB 夾角為 180 度, 三點共線且 A 介於 BC 之間 ret = math.pi else : # <CAB 夾角為 0, 三點共線且 A 不在 BC 之間 if((self....
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def getSSS(self): temp = [] temp.append( self.getLenp1() ) temp.append( self.getLenp2() ) temp.append( self.getLenp3() ) return temp
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def getAAA(self): temp = [] temp.append( self.getAp1() ) temp.append( self.getAp2() ) temp.append( self.getAp3() ) return temp
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def getASASAS(self): temp = [] temp.append(self.getAp1()) temp.append(self.getLenp1()) temp.append(self.getAp2()) temp.append(self.getLenp2()) temp.append(self.getAp3()) temp.append(self.getLenp3()) return temp
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def setPPSS(self, p1, p3, lenp1, lenp3): temp = [] self.p1 = p1 self.p3 = p3 self.lenp1 = lenp1 self.lenp3 = lenp3 #bp3 is the angle beside p3 point, cp3 is the angle for line23, p2 is the output line31 = Line(p3, p1) self.lenp2 = line31.getR() #s...
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def draw(): global theta context.clearRect(0, 0, canvas.width, canvas.height) line1.drawMe(context) line2.drawMe(context) line3.drawMe(context) #triangle1.drawMe(context) #triangle2.drawMe(context) theta += dx p2.x = p1.x + line1.length*math.cos(theta*degree) p2.y = p1.y - line1....
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def __init__(self, store): self.store = store
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def __init__(self, name): self._name = name
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def __init__(self, x, y): self.x = x self.y = y
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def __init__(self, action: str = None) -> None: super().__init__(prefix, action)
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def draw(self, context): pass
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def conversion_fn(): """Temporary function.""" pass
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def _files(self): return []
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def no_op(*args, **kwargs): pass
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def open(read_server_info=True): return
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def query_vpp_config(self): NotImplemented
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def tag(g, p): None
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def vsParseFd(self, fd): raise NotImplementedError()
def emit(self, level, message): raise NotImplementedError('Please implement an emit method')
def test_should_encode_false(self): encoded = cypher_repr(False) assert encoded == u"false"