query
stringlengths
10
2k
document
stringlengths
20
51.2k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
This function will return the aui manager for a given window.
def GetManager(window): if not isinstance(wx.GetTopLevelParent(window), AuiFloatingFrame): if isinstance(window, auibar.AuiToolBar): return window.GetAuiManager() evt = AuiManagerEvent(wxEVT_AUI_FIND_MANAGER) evt.SetManager(None) evt.ResumePropagation(wx.EVENT_PROPA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetAuiManager(self):\r\n\r\n return self._mgr", "def _FindPaneManager(self):\n event = aui.AuiManagerEvent(aui.wxEVT_AUI_FIND_MANAGER)\n self.ProcessEvent(event)\n return event.GetManager()", "def getMayaWindow():\n ptr = openmayaui.MQtUtil.mainWindow()\n return wrapInstan...
[ "0.7335355", "0.7059419", "0.690221", "0.68322307", "0.67576", "0.67506754", "0.66958606", "0.66468036", "0.657084", "0.6529958", "0.6249033", "0.6087565", "0.60504556", "0.60504556", "0.5983328", "0.5962071", "0.5914325", "0.58356863", "0.58356863", "0.58356863", "0.5831246"...
0.8227463
0
Returns whether a pane can be docked or not.
def CanDockPanel(self, p): # is the pane dockable? if not p.IsDockable(): return False # if a key modifier is pressed while dragging the frame, # don't dock the window return not (wx.GetKeyState(wx.WXK_CONTROL) or wx.GetKeyState(wx.WXK_ALT))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsDockable(self):\r\n \r\n return self.IsTopDockable() or self.IsBottomDockable() or self.IsLeftDockable() or \\\r\n self.IsRightDockable() or self.IsNotebookDockable()", "def IsNotebookDockable(self):\r\n\r\n return self.HasFlag(self.optionNotebookDockable)", "def IsDock...
[ "0.8312874", "0.78714913", "0.74983364", "0.72827184", "0.70957243", "0.70350474", "0.6927925", "0.6717553", "0.6677536", "0.6675428", "0.66510606", "0.6601932", "0.64803004", "0.64334494", "0.64334494", "0.6418793", "0.63621414", "0.633112", "0.6264655", "0.62541467", "0.624...
0.8309672
1
This version of L{GetPane} looks up a pane based on a 'pane window'.
def GetPaneByWidget(self, window): for p in self._panes: if p.window == window: return p return NonePaneInfo
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetPaneByName(self, name):\r\n \r\n for p in self._panes:\r\n if p.name == name:\r\n return p\r\n \r\n return NonePaneInfo", "def GetPane(self, item):\r\n\r\n if isinstance(item, basestring):\r\n return self.GetPaneByName(item)\r\n ...
[ "0.7268681", "0.71687376", "0.71403396", "0.69058794", "0.6867015", "0.6720389", "0.6398542", "0.63968104", "0.63797665", "0.6215211", "0.61956257", "0.6152882", "0.6133891", "0.6120401", "0.6002629", "0.59419125", "0.5881125", "0.57953733", "0.57489365", "0.5723553", "0.5643...
0.7672065
0
This method is similar to to L{LoadPerspective}, with the exception that it only loads information about a single pane. It is used in combination with L{SavePaneInfo}.
def LoadPaneInfo(self, pane_part, pane): # replace escaped characters so we can # split up the string easily pane_part = pane_part.replace("\\|", "\a") pane_part = pane_part.replace("\\;", "\b") options = pane_part.split(";") for items in options: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LoadPerspective(self, layout, update=True):\r\n\r\n input = layout\r\n\r\n # check layout string version\r\n # 'layout1' = wxAUI 0.9.0 - wxAUI 0.9.2\r\n # 'layout2' = wxAUI 0.9.2 (wxWidgets 2.8)\r\n index = input.find(\"|\")\r\n part = input[0:index].strip()\r\n ...
[ "0.6257785", "0.62073463", "0.6194534", "0.6032802", "0.5963527", "0.59126216", "0.5901202", "0.5742296", "0.5687753", "0.5631249", "0.5566397", "0.52949333", "0.5292244", "0.5263285", "0.52062225", "0.5201762", "0.5181156", "0.5145944", "0.5123381", "0.511165", "0.51082546",...
0.6599087
0
Returns the current dock constraint values.
def GetDockSizeConstraint(self): return self._dock_constraint_x, self._dock_constraint_y
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_values(self,\n env,\n only_state=False\n ):\n if only_state:\n con_values = np.concatenate([con.get_value(env) for con in self.state_constraints])\n else:\n con_values = np.concatenate([con.get_value(env) for con in s...
[ "0.621805", "0.6196301", "0.61817956", "0.602817", "0.602817", "0.5980301", "0.59772915", "0.5966439", "0.5933285", "0.5917808", "0.58730364", "0.5811498", "0.5793408", "0.578015", "0.57515144", "0.5675536", "0.56619364", "0.56619364", "0.5657652", "0.56546557", "0.56546557",...
0.65779
0
This is an internal function which returns a dock's offset in pixels from the left side of the window (for horizontal docks) or from the top of the window (for vertical docks). This value is necessary for calculating fixedpane/toolbar offsets when they are dragged.
def GetDockPixelOffset(self, test): # the only way to accurately calculate the dock's # offset is to actually run a theoretical layout docks, panes = CopyDocksAndPanes2(self._docks, self._panes) panes.append(test) sizer, panes, docks, uiparts = self.LayoutAll(panes, dock...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dock_direction_get(self):\r\n \r\n if self.IsMaximized():\r\n return AUI_DOCK_CENTER\r\n else:\r\n return self._dock_direction", "def GetToolBarDockOffsets(docks):\r\n\r\n top_left = wx.Size(0, 0)\r\n bottom_right = wx.Size(0, 0)\r\n\r\n for dock in docks:\...
[ "0.71753603", "0.69268966", "0.6501744", "0.64481574", "0.63878196", "0.63336384", "0.623687", "0.61891204", "0.61855996", "0.6093233", "0.6092808", "0.60856795", "0.60587245", "0.60449344", "0.60258377", "0.6013954", "0.60131186", "0.60009044", "0.5957264", "0.5907521", "0.5...
0.7052505
1
Checks if a UI part can be actually resized.
def CheckMovableSizer(self, part): # a dock may not be resized if it has a single # pane which is not resizable if part.type == AuiDockUIPart.typeDockSizer and part.dock and \ len(part.dock.panes) == 1 and part.dock.panes[0].IsFixed(): return False ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsResizeable(self):\r\n \r\n return self.HasFlag(self.optionResizable)", "def resizable(self):\n return self._frame._root.resizable() == '1 1'", "def isSelectionResizing(self):\n return self.resizing", "def check_resize(self):\n yx = self.screen.getmaxyx()\n if s...
[ "0.78237003", "0.7101093", "0.694147", "0.6556462", "0.6534732", "0.63708526", "0.61852705", "0.60426784", "0.60290456", "0.5978372", "0.5927902", "0.5921704", "0.5889174", "0.5865804", "0.58433926", "0.5805099", "0.5768959", "0.5765002", "0.5763087", "0.5750001", "0.57421076...
0.7347182
1
Handles the ``EVT_AUINOTEBOOK_PAGE_CHANGED`` event.
def OnTabSelected(self, event): if self._masterManager: self._masterManager.OnTabSelected(event) return obj = event.GetEventObject() if obj and isinstance(obj, auibook.AuiNotebook): notebook = obj page = noteb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_page_changed(e):\n\n e.Skip()", "def page_changed(self):\n if self.current >= 0:\n if self.not_again:\n self.not_again = False\n return\n ok = self.check_oldpage(self.current)\n if not ok:\n self.not_again = True\n...
[ "0.6320058", "0.61909527", "0.60812604", "0.5719048", "0.56997025", "0.5481794", "0.54005706", "0.5386219", "0.53660303", "0.5311472", "0.5286885", "0.52705824", "0.5267356", "0.5177131", "0.5157425", "0.51355535", "0.5117655", "0.5112911", "0.5093382", "0.5070516", "0.503598...
0.43833998
63
Snaps a floating pane to one of the main frame sides.
def SnapPane(self, pane, pane_pos, pane_size, toSnap=False): if self._from_move: return managed_window = self.GetManagedWindow() wnd_pos = managed_window.GetPosition() wnd_size = managed_window.GetSize() snapX, snapY = self._snap_limits if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OnFloatingPaneMoved(self, wnd, eventOrPt):\r\n \r\n pane = self.GetPane(wnd)\r\n if not pane.IsOk():\r\n raise Exception(\"Pane window not found\")\r\n\r\n if not pane.IsSnappable():\r\n return\r\n\r\n if isinstance(eventOrPt, wx.Point):\r\n p...
[ "0.63040984", "0.6280088", "0.61052954", "0.60808307", "0.5974337", "0.5962209", "0.58686715", "0.574582", "0.5404813", "0.5339895", "0.5304865", "0.5192781", "0.51765215", "0.5129486", "0.5120869", "0.5112658", "0.5084572", "0.5084049", "0.5067382", "0.50285214", "0.49843815...
0.64557135
0
Handles the ``wx.EVT_SYS_COLOUR_CHANGED`` event for L{AuiManager}.
def OnSysColourChanged(self, event): # This event is probably triggered by a theme change # so we have to re-init the art provider. if self._art: self._art.Init() if self._frame: self.Update() self._frame.Refresh()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _on_change(self, *_):\n colour = self.on_colour if self.value else self.off_colour\n self.configure(bg=colour)\n if self.label:\n self.label.configure(bg=colour)", "def set_window_colour(self, event):\n rgb_triplet, rgb_string = tkColorChooser.askcolor()\n self.c...
[ "0.65226746", "0.65070134", "0.6286457", "0.600402", "0.59988916", "0.5939419", "0.59305686", "0.5869806", "0.5705018", "0.5694982", "0.5686876", "0.5658947", "0.5650052", "0.56019676", "0.55671155", "0.55351615", "0.55302787", "0.5524301", "0.54976046", "0.54508644", "0.5424...
0.7463163
0
Handles the ``EVT_AUI_PANE_DOCKED`` event for L{AuiManager}.
def OnPaneDocked(self, event): event.Skip() self.RemoveAutoNBCaption(event.GetPane())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OnDocked(self, event):\n self._floating = False\n self._dock_area = event.GetPane().dock_direction\n wx.PostEvent(self, wxDockPaneDockedEvent())", "def on_docked(self, event):\n area = self.widget.GetDockArea()\n if not self._guard & FLOATED_GUARD:\n self._guard ...
[ "0.6865349", "0.65334445", "0.59491295", "0.58895683", "0.5753926", "0.56251234", "0.55765617", "0.5458702", "0.54034257", "0.5369186", "0.53610235", "0.53517044", "0.5347939", "0.5336949", "0.53091335", "0.5291226", "0.525601", "0.52199054", "0.5185072", "0.518409", "0.51818...
0.5764803
4
This method implements a smooth docking effect for floating panes, similar to what the PyQT library does with its floating windows.
def SmoothDock(self, paneInfo): if paneInfo.IsToolbar(): return if not paneInfo.frame or self._hint_rect.IsEmpty(): return hint_rect = self._hint_rect win_rect = paneInfo.frame.GetScreenRect() xstart, ystart = win_rect.x, win_rect.y ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OnDocked(self, event):\n self._floating = False\n self._dock_area = event.GetPane().dock_direction\n wx.PostEvent(self, wxDockPaneDockedEvent())", "def Dock(self):\r\n\r\n if self.IsNotebookPage():\r\n self.notebook_id = -1\r\n self.dock_direction = AUI_DOCK_...
[ "0.7359378", "0.69623065", "0.6838025", "0.679305", "0.6688379", "0.663932", "0.66074723", "0.65608203", "0.65597785", "0.65407866", "0.6514509", "0.64790314", "0.6398947", "0.6305502", "0.62601227", "0.6250837", "0.6181521", "0.6078482", "0.6074315", "0.602609", "0.6009995",...
0.6463311
12
Snaps the main frame to specified position on the screen.
def Snap(self): snap, hAlign, vAlign, monitor = self._is_docked if not snap: return managed_window = self.GetManagedWindow() snap_pos = self.GetSnapPosition() wnd_pos = managed_window.GetPosition() snapX, snapY = self._snap_limits ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def move_to_start(self):\n self.pos = (SCREEN_WIDTH / 2, SCREEN_HEIGHT - 64)", "def SnapToScreen(self, snap=True, monitor=0, hAlign=wx.RIGHT, vAlign=wx.TOP):\r\n \r\n if not snap:\r\n self._is_docked = (False, wx.RIGHT, wx.TOP, 0)\r\n return\r\n\r\n displayCount = wx...
[ "0.64748114", "0.63103783", "0.62173074", "0.6167654", "0.61171836", "0.59545183", "0.5929392", "0.5924068", "0.58890086", "0.5844266", "0.5837316", "0.5780497", "0.57773817", "0.5736538", "0.5730339", "0.57091814", "0.57073313", "0.5678984", "0.56482726", "0.56450456", "0.56...
0.66781735
0
Snaps the main frame to specified position on the screen.
def SnapToScreen(self, snap=True, monitor=0, hAlign=wx.RIGHT, vAlign=wx.TOP): if not snap: self._is_docked = (False, wx.RIGHT, wx.TOP, 0) return displayCount = wx.Display.GetCount() if monitor > displayCount: raise Exception("Invalid monitor ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Snap(self):\r\n \r\n snap, hAlign, vAlign, monitor = self._is_docked\r\n if not snap:\r\n return\r\n\r\n managed_window = self.GetManagedWindow()\r\n snap_pos = self.GetSnapPosition()\r\n wnd_pos = managed_window.GetPosition()\r\n snapX, snapY = self....
[ "0.6676881", "0.6473642", "0.6216384", "0.6166356", "0.6116329", "0.59534484", "0.5929547", "0.59231275", "0.58888793", "0.58432466", "0.58355945", "0.57796484", "0.5776561", "0.57353914", "0.57288975", "0.57070535", "0.5705861", "0.567942", "0.5646958", "0.56444514", "0.5617...
0.6309866
2
Returns the main frame snapping position.
def GetSnapPosition(self): snap, hAlign, vAlign, monitor = self._is_docked display = wx.Display(monitor) area = display.GetClientArea() size = self.GetManagedWindow().GetSize() pos = wx.Point() if hAlign == wx.LEFT: pos.x = area.x ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_frame_root_pos(self, frame):\n root_pos = frame[:self.POS_SIZE].copy()\n return root_pos", "def get_pos(self):\n return self.rect.midtop", "def current_probe_position(self):\n\t\t# Obtain encoder feedback and calculate probe position\n\t\tx_position = self.x_mc.current_position() / self.st...
[ "0.67424685", "0.6546693", "0.62540275", "0.6252237", "0.6246282", "0.6221821", "0.6217913", "0.6208457", "0.6204219", "0.61988544", "0.61870587", "0.6158873", "0.61340994", "0.6127683", "0.6108961", "0.6107942", "0.6107942", "0.6098397", "0.6098397", "0.6091688", "0.608456",...
0.64981
2
Creates a Dummy Center Pane (DCP).
def _createDummyPane(self): if self.hasDummyPane: return self.hasDummyPane = True dummy = wx.Panel(self.GetManagedWindow()) info = aui.AuiPaneInfo().CenterPane().NotebookDockable(True).Name('dummyCenterPane').DestroyOnClose(True) self.AddPane(dummy, info)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _destroyDummyPane(self):\r\n\r\n if not self.hasDummyPane:\r\n return\r\n \r\n self.hasDummyPane = False\r\n self.ClosePane(self.GetPane('dummyCenterPane'))", "def CenterPane(self):\r\n \r\n self.state = 0\r\n return self.Center().PaneBorder().Resiz...
[ "0.6568739", "0.6451856", "0.6425403", "0.6263634", "0.56232095", "0.5566779", "0.55623907", "0.55250394", "0.5438721", "0.5403305", "0.5391398", "0.5355957", "0.529756", "0.52974886", "0.5276845", "0.52346087", "0.52073264", "0.52039534", "0.520119", "0.5184872", "0.5184872"...
0.76738024
0
Returns the font for calculating text measurements.
def GetMeasuringFont(self): return self._measuring_font
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_text_font ( self, object ):\n return self.text_font", "def font(self):\n\treturn self.m_font", "def font(self):\n\treturn self.m_font", "def font(self):\n return self[\"font\"]", "def font(self):\n return self[\"font\"]", "def font(self):\n return self[\"font\"]", "d...
[ "0.80801326", "0.76929003", "0.76929003", "0.7547504", "0.7547504", "0.7547504", "0.73277694", "0.73277694", "0.73277694", "0.7297551", "0.72540075", "0.723048", "0.7197916", "0.6864892", "0.6809259", "0.68075", "0.68075", "0.68075", "0.68075", "0.6803543", "0.67510283", "0...
0.8323654
0
Returns the font for calculating text measurements.
def GetMeasuringFont(self): return self._measuring_font
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_text_font ( self, object ):\n return self.text_font", "def font(self):\n\treturn self.m_font", "def font(self):\n\treturn self.m_font", "def font(self):\n return self[\"font\"]", "def font(self):\n return self[\"font\"]", "def font(self):\n return self[\"font\"]", "d...
[ "0.8080838", "0.76926714", "0.76926714", "0.7547443", "0.7547443", "0.7547443", "0.732782", "0.732782", "0.732782", "0.7296979", "0.7254883", "0.72295827", "0.71983737", "0.68646276", "0.68103456", "0.6807728", "0.6807728", "0.6807728", "0.6807728", "0.6803358", "0.67513794",...
0.83220863
1
Returns whether the attribute has text colour.
def HasTextColour(self): return self._colText != wx.NullColour
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_red(self):\n return \"red\" == self.color", "def is_text( self ):\n return self.get_main_type() == 'text'", "def GetTextColour(self):\r\n \r\n return self._colText", "def _iscolorstring(self, color):\n try:\n rgb = self.cv.winfo_rgb(color)\n ok ...
[ "0.65020317", "0.6428312", "0.64153326", "0.62680066", "0.61701196", "0.611478", "0.610234", "0.607398", "0.6073124", "0.60654", "0.6050619", "0.60388124", "0.59728646", "0.5959836", "0.59426475", "0.59153056", "0.590281", "0.58915716", "0.5891193", "0.58743906", "0.58403134"...
0.8207682
0
Returns whether the attribute has background colour.
def HasBackgroundColour(self): return self._colBack != wx.NullColour
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rgb(self) -> bool:\n return self.image_shape[2] == 3", "def GetItemBackgroundColour(self, item):\r\n\r\n return item.Attr().GetBackgroundColour()", "def HasTextColour(self):\r\n \r\n return self._colText != wx.NullColour", "def is_on_ground(self):\n return bool(self.gro...
[ "0.6118352", "0.6098643", "0.6014707", "0.5997542", "0.5961007", "0.5937598", "0.5935411", "0.5921725", "0.5836762", "0.58365303", "0.5830256", "0.5774216", "0.5760805", "0.57583207", "0.5754331", "0.57369596", "0.5680464", "0.5675199", "0.566539", "0.56484324", "0.56328905",...
0.78731227
0
Returns whether the attribute has font.
def HasFont(self): return self._font != wx.NullFont
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsOk(*args, **kwargs):\n return _gdi_.Font_IsOk(*args, **kwargs)", "def test_metadata_font_have_regular(self):\n # this tests will appear in each font\n have = False\n for i in self.metadata.fonts:\n if i.weight == 400 and i.style == 'normal':\n have = Tr...
[ "0.672579", "0.6567235", "0.63650966", "0.63556856", "0.63548154", "0.6293679", "0.626034", "0.62345296", "0.6208925", "0.61491525", "0.6148809", "0.6110688", "0.60830456", "0.60651493", "0.6039009", "0.6039009", "0.6039009", "0.6036556", "0.60302293", "0.60177886", "0.595907...
0.8223538
0
Returns the attribute background colour.
def GetBackgroundColour(self): return self._colBack
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetItemBackgroundColour(self, item):\r\n\r\n return item.Attr().GetBackgroundColour()", "def bgcolor(self):\n return self[\"bgcolor\"]", "def background_color(self):\n return self._item.get(\"background_color\")", "def get_color(self):\n return self._item.get(\"background_colo...
[ "0.748384", "0.74690735", "0.7447855", "0.73728013", "0.7175838", "0.7162199", "0.71284235", "0.71031666", "0.7056263", "0.69862777", "0.697287", "0.69584274", "0.66600925", "0.6645066", "0.6572216", "0.6337584", "0.630357", "0.62984586", "0.62888426", "0.6279723", "0.626922"...
0.6991963
9
Sets the item text (for ``EVT_TREE_BEGIN_LABEL_EDIT`` and ``EVT_TREE_END_LABEL_EDIT`` events only).
def SetLabel(self, label): self._label = label
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Edit(self, item):\r\n\r\n te = TreeEvent(wxEVT_TREE_BEGIN_LABEL_EDIT, self.GetId())\r\n te._item = item\r\n te.SetEventObject(self)\r\n if self.GetEventHandler().ProcessEvent(te) and not te.IsAllowed():\r\n # vetoed by user\r\n return\r\n \r\n # We ha...
[ "0.7539636", "0.72906065", "0.71998185", "0.704002", "0.6821987", "0.68036085", "0.6733166", "0.654373", "0.6452607", "0.64226365", "0.6407793", "0.6407478", "0.63997036", "0.63597846", "0.62829924", "0.6259019", "0.6162228", "0.6153092", "0.6057656", "0.6028443", "0.602717",...
0.0
-1
Returns the data associated to this item.
def GetData(self): return self._data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_data(self):\n return self.data", "def get_data(self):\n return self.data", "def get_data(self):\n return self.data", "def data(self, index):\n return self._itemData", "def data(self) -> Dict[int, NameItem]:\n return self.__data", "def get_data(self):\n re...
[ "0.8259914", "0.8259914", "0.8259914", "0.8181763", "0.8147021", "0.81357336", "0.81357336", "0.81357336", "0.81357336", "0.8078544", "0.8078544", "0.8078544", "0.7995236", "0.7953423", "0.7913295", "0.7896069", "0.7838633", "0.7838633", "0.7838633", "0.7838633", "0.7838633",...
0.7405524
70
Sets the data associated to this item.
def SetData(self, data): self._data = data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_data(self, data):\n\n pass", "def SetPyData(self, item, data):\r\n\r\n item.SetData(data)", "def set_data(self, data):\n self.data = data", "def setData(self, data):\n self.data = data", "def setData(self, data):\n self.data = data", "def setData(self, data):\n ...
[ "0.8201021", "0.81645", "0.81239593", "0.8038157", "0.8038157", "0.80205214", "0.7984681", "0.7984681", "0.7984681", "0.79317206", "0.7812666", "0.7812666", "0.7812666", "0.7812666", "0.7812666", "0.7812666", "0.7808267", "0.7771681", "0.7771681", "0.77389205", "0.7683685", ...
0.7864787
10
Returns the `x` position on an item, in logical coordinates.
def GetX(self): return self._x
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_x(self):\n return self.position.x", "def get_pos_x(self):\n return self.__pos_x", "def get_x_position(self):\n return self.rect.x", "def x(self):\r\n return self.position.x", "def get_x(self):\n return self.posX", "def get_x_position(self):\n return self.act...
[ "0.74947655", "0.72751313", "0.7268064", "0.7188568", "0.7173278", "0.7059969", "0.70527184", "0.7044857", "0.7014575", "0.6959625", "0.6941389", "0.6895397", "0.6750628", "0.674901", "0.6726419", "0.6688514", "0.667887", "0.663443", "0.6632898", "0.6576786", "0.65645206", ...
0.627103
31
Returns the `y` position on an item, in logical coordinates.
def GetY(self): return self._y
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getY(self):\n return self.position[1]", "def get_y_position(self): \n return self.rect.y", "def get_y_position(self):\n return self.actual_coordinates[1]", "def y(self):\r\n return self.position.y", "def _get_y(self):\n return self.position.y", "def get_y(self):\...
[ "0.72414714", "0.72316706", "0.717274", "0.71579856", "0.71550274", "0.7142883", "0.7048903", "0.70486784", "0.70009375", "0.7000498", "0.69906414", "0.69277406", "0.6845205", "0.6845205", "0.67982274", "0.67511666", "0.6687686", "0.6684679", "0.6625748", "0.6612201", "0.6590...
0.6365907
28
Returns whether the associated window is enabled or not.
def GetWindowEnabled(self): if not self._wnd: raise Exception("\nERROR: This Item Has No Window Associated") return self._windowenabled
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_enabled(self) -> bool:\n return self._enabled", "def GetWindowEnabled(self, column=None):\r\n\r\n column = (column is not None and [column] or [self._owner.GetMainColumn()])[0]\r\n\r\n if not self._wnd[column]:\r\n raise Exception(\"\\nERROR: This Item Has No Window Associa...
[ "0.72901446", "0.72484976", "0.7242012", "0.71889555", "0.71889555", "0.71889555", "0.71889555", "0.7175439", "0.7175439", "0.71711534", "0.71687245", "0.7128246", "0.71001714", "0.709231", "0.70397305", "0.7002757", "0.7002757", "0.7002757", "0.7002757", "0.7002757", "0.7002...
0.86361474
0
Returns the item type.
def GetType(self): return self._type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def item_type(self) -> str:\n return self.__item_type", "def item_type(self):\n return self._item_type", "def GetItemType(self, item):\r\n\r\n return item.GetType()", "def item_type(self):\n pass", "def _type(self, item):\n return self.cv.type(item)", "def _get_item_typ...
[ "0.91786164", "0.9112137", "0.89284503", "0.86716664", "0.82527274", "0.81261975", "0.7669147", "0.7654769", "0.7578823", "0.75660294", "0.7550785", "0.7546281", "0.7491053", "0.7478164", "0.74280024", "0.7419415", "0.741756", "0.741756", "0.7416345", "0.7409816", "0.73979366...
0.7299107
36
Gets the item parent (another instance of L{GenericTreeItem} or ``None`` for root items.
def GetParent(self): return self._parent
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetItemParent(self, item):\r\n\r\n return item.GetParent()", "def get_parent(self):\n if self.parent:\n return self.parent()\n else:\n return None", "def parentItem(self):\n return None", "def parent(self):\n if self._parent is not None:\n ...
[ "0.8161088", "0.7402157", "0.72995096", "0.6994052", "0.69605327", "0.69527215", "0.68966186", "0.68862903", "0.6854302", "0.6850949", "0.6850949", "0.6850949", "0.68084866", "0.6795008", "0.67858315", "0.6781829", "0.67463726", "0.67288345", "0.67232966", "0.67232966", "0.67...
0.6592205
23
Returns whether or not the checkbox item is a 3state checkbox.
def Is3State(self): return self._is3State
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsItem3State(self, item):\r\n\r\n return item.Is3State()", "def Get3StateValue(self):\r\n\r\n if not self.Is3State():\r\n raise Exception(\"Get3StateValue can only be used with 3-state checkbox items.\")\r\n\r\n return self._checked", "def IsItemChecked(self, item):\r\n\r\n ...
[ "0.8181437", "0.7258965", "0.7065563", "0.6538043", "0.63801736", "0.6164961", "0.61240685", "0.6092596", "0.60705096", "0.6065318", "0.60015965", "0.5986433", "0.5919304", "0.58957326", "0.58957326", "0.58957326", "0.5720687", "0.56707716", "0.5564258", "0.5559395", "0.55469...
0.7362159
1
Returns whether the item font is bold or not.
def IsBold(self): return self._isBold != 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsBold(self, item):\r\n\r\n return item.IsBold()", "def bold(self):\n b = self.__rPr.get('b')\n return True if b in ('true', '1') else False", "def asBold(self):\n\t\treturn TextFont( self.name[0:2]+'B', self.size)", "def getBoldFont(self):\r\n # obsolete?\r\n profbox()\r\n ...
[ "0.8886081", "0.78413445", "0.6855979", "0.67443335", "0.6645823", "0.65713114", "0.6421347", "0.6316321", "0.63146555", "0.6275934", "0.6231843", "0.62218976", "0.62150836", "0.6136468", "0.6124744", "0.61153877", "0.6080069", "0.6022678", "0.59611285", "0.5848855", "0.58003...
0.8132417
1
Returns whether the item font is italic or not.
def IsItalic(self): return self._isItalic != 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsItalic(self, item):\r\n\r\n return item.IsItalic()", "def test_check_italic_style_matches_names(self):\n contents = self.read_metadata_contents()\n family = Metadata.get_family_metadata(contents)\n\n for font_metadata in family.fonts:\n if font_metadata.style != 'ital...
[ "0.87213445", "0.70191216", "0.6747567", "0.673345", "0.66032535", "0.6582956", "0.64740425", "0.6432808", "0.6017978", "0.5659641", "0.56422174", "0.5618748", "0.55692744", "0.5525135", "0.54502815", "0.5395563", "0.5391619", "0.53647494", "0.53623337", "0.5285351", "0.52447...
0.8167139
1
Returns whether the item is enabled or not.
def IsEnabled(self): return self._enabled
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsItemEnabled(self, item):\r\n\r\n return item.IsEnabled()", "def IsItemEnabled(self, item):\r\n\r\n return item.IsEnabled()", "def is_enabled(self):\n return self.enabled", "def is_enabled(self):\n return self._enabled", "def is_enabled(self):\n return self._enabled"...
[ "0.86219424", "0.86219424", "0.82484865", "0.822922", "0.822922", "0.8177075", "0.81548834", "0.80648565", "0.80577505", "0.8045793", "0.8045793", "0.8045793", "0.8045793", "0.8045793", "0.8045793", "0.8036396", "0.7940849", "0.7931774", "0.7931774", "0.7931774", "0.7931774",...
0.8179197
5
Returns the item size.
def GetSize(self, x, y, theButton): bottomY = self._y + theButton.GetLineHeight(self) if y < bottomY: y = bottomY width = self._x + self._width if x < width: x = width if self.IsExpanded(): for child in self._children:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def size(self):\n return self.num_item", "def size(self) -> int:\n return self.num_items", "def get_num_items(self):\r\n return self.num_items", "def size(self):\n return len(self.items)", "def size(self):\n return len(self.items)", "def size(self):\n return len(...
[ "0.9242949", "0.8780977", "0.8351788", "0.828446", "0.828446", "0.828446", "0.828446", "0.828446", "0.8255927", "0.82037616", "0.8197615", "0.8166754", "0.81660616", "0.81660265", "0.81479615", "0.81479615", "0.81461203", "0.81353873", "0.8135338", "0.8135338", "0.8135338", ...
0.0
-1
Returns a native looking checkbox or radio button bitmap.
def GetControlBmp(self, checkbox=True, checked=False, enabled=True, x=16, y=16): bmp = wx.EmptyBitmap(x, y) mdc = wx.MemoryDC(bmp) mask = wx.Colour(0xfe, 0xfe, 0xfe) mdc.SetBackground(wx.Brush(mask)) mdc.Clear() render = wx.RendererNative.Get() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DrawRadioBitmap(*args, **kwargs):\n return _gdi_.RendererNative_DrawRadioBitmap(*args, **kwargs)", "def DrawCheckBox(*args, **kwargs):\n return _gdi_.RendererNative_DrawCheckBox(*args, **kwargs)", "def get_bitmap(isnull):\n import numpy as np\n bitlst = []\n for i in range(1+len(isnu...
[ "0.637017", "0.57438", "0.55230695", "0.53942955", "0.53918314", "0.53840333", "0.5183818", "0.5157639", "0.51072055", "0.5086128", "0.5077659", "0.5052779", "0.5029263", "0.4979003", "0.49673644", "0.4947667", "0.4914911", "0.49142912", "0.48992947", "0.48944685", "0.4891392...
0.6515241
0
Returns whether an item is enabled or disabled.
def IsItemEnabled(self, item): return item.IsEnabled()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_enabled(self):\n return self.enabled", "def IsEnabled(self):\r\n\r\n return self._enabled", "def is_enabled(self):\n return self._enabled", "def is_enabled(self):\n return self._enabled", "def isEnabled(self):\n return self.enabled", "def is_enabled(self) -> bool...
[ "0.75668687", "0.74637395", "0.746203", "0.746203", "0.74382496", "0.74146813", "0.7404513", "0.7401542", "0.7397352", "0.73699635", "0.7269111", "0.72497433", "0.72497433", "0.72497433", "0.72497433", "0.72497433", "0.72497433", "0.7247498", "0.72073364", "0.72031367", "0.72...
0.83335125
1
Returns whether or not the checkbox item is a 3state checkbox.
def IsItem3State(self, item): return item.Is3State()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Is3State(self):\r\n\r\n return self._is3State", "def Get3StateValue(self):\r\n\r\n if not self.Is3State():\r\n raise Exception(\"Get3StateValue can only be used with 3-state checkbox items.\")\r\n\r\n return self._checked", "def IsItemChecked(self, item):\r\n\r\n retu...
[ "0.7362203", "0.725678", "0.706192", "0.65344954", "0.63802487", "0.615988", "0.61243886", "0.6093796", "0.6068543", "0.60617596", "0.6001301", "0.598513", "0.5918769", "0.5890925", "0.5890925", "0.5890925", "0.5721188", "0.5671473", "0.5560241", "0.5555213", "0.55444175", ...
0.81816363
0
Actually checks/uncheks an item, sending (eventually) the two events ``EVT_TREE_ITEM_CHECKING`` and ``EVT_TREE_ITEM_CHECKED``.
def CheckItem(self, item, checked=True): # Should we raise an error here?!? if item.GetType() == 0: return if item.GetType() == 2: # it's a radio button if not checked and item.IsChecked(): # Try To Unckeck? return else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CheckItem2(self, item, checked=True, torefresh=False):\r\n\r\n if item.GetType() == 0:\r\n return\r\n \r\n item.Check(checked)\r\n\r\n if torefresh:\r\n dc = wx.ClientDC(self)\r\n self.CalculateSize(item, dc)\r\n self.RefreshLine(item)", ...
[ "0.67390746", "0.6623722", "0.6534422", "0.64656585", "0.6406747", "0.63715816", "0.636819", "0.6317747", "0.62493074", "0.6205721", "0.61438304", "0.6067661", "0.59231454", "0.58579355", "0.5681701", "0.5681701", "0.5661127", "0.5638233", "0.5620886", "0.5602504", "0.5570305...
0.7664214
0
Uncheck radio items which are on the same level of the checked one. Used internally.
def CheckSameLevel(self, item, checked=False): parent = item.GetParent() if not parent: return torefresh = False if parent.IsExpanded(): torefresh = True (child, cookie) = self.GetFirstChild(parent) while child: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UnCheckRadioParent(self, item, checked=False):\r\n\r\n e = TreeEvent(wxEVT_TREE_ITEM_CHECKING, self.GetId())\r\n e.SetItem(item)\r\n e.SetEventObject(self)\r\n \r\n if self.GetEventHandler().ProcessEvent(e):\r\n return False\r\n\r\n item.Check(checked)\r\n ...
[ "0.73684055", "0.6375725", "0.63240033", "0.6257006", "0.58867687", "0.5882893", "0.5882893", "0.5858103", "0.5811194", "0.5783778", "0.56676304", "0.5627722", "0.5533273", "0.544624", "0.54447633", "0.54436535", "0.5437293", "0.54175264", "0.53135073", "0.5265401", "0.522974...
0.5484035
13
Return ``True`` from here to allow the colours of this window to be changed by `InheritAttributes`, returning ``False`` forbids inheriting them from the parent window. The base class version returns ``False``, but this method is overridden in `wx.Control` where it returns ``True``. L{CustomTreeCtrl} does not inherit co...
def ShouldInheritColours(self): return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ShouldInheritColours(self):\n\n return False", "def any_parent_overriden(self):\n\n if self._parent._is_overriden:\n return True\n return self._parent.any_parent_overriden()", "def ignore_parent(self) -> bool:\n return self._strategy.ignore_parent", "def is_parent(s...
[ "0.7597215", "0.5870516", "0.5371205", "0.5263956", "0.52609974", "0.52583224", "0.5225928", "0.51937014", "0.51817", "0.5157654", "0.5149297", "0.5130886", "0.5123978", "0.5123978", "0.5121215", "0.5119663", "0.5062323", "0.5029751", "0.5001318", "0.49901482", "0.49502635", ...
0.75841093
1
Sets the indentation for L{CustomTreeCtrl}.
def SetIndent(self, indent): self._indent = indent self._dirty = True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_indent(self, indent: int) -> Label:\n self.setIndent(indent)\n return self", "def menu_indentation(self, event=None):\n self.parentPanel.indentation_guides(event)", "def indentation(self, indent: str) -> None:\n self._indent = indent\n self._update()", "def indent(s...
[ "0.6751251", "0.65858394", "0.64477235", "0.6320897", "0.6319711", "0.6319711", "0.6318787", "0.62034416", "0.6186882", "0.61575514", "0.61555606", "0.61518526", "0.60572857", "0.6031448", "0.60061693", "0.58158994", "0.5738525", "0.5711672", "0.56363076", "0.55981886", "0.55...
0.59167206
15
Returns ``True`` if L{CustomTreeCtrl} has the `flag` bit set.
def HasAGWFlag(self, flag): return self._agwStyle & flag
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_flag(self):\n return (self.__type & NODE_TAG) and isinstance(self.__value, bool)", "def HasFlag(self, flag):\r\n \r\n return (self.state & flag and [True] or [False])[0]", "def flag_set(self, flag):\n if self.flags & flag != 0:\n return True\n else:\n ...
[ "0.7011852", "0.67225087", "0.6431638", "0.61979145", "0.60630167", "0.5976855", "0.5866757", "0.5826632", "0.58141285", "0.5788204", "0.5750141", "0.5669143", "0.5634255", "0.55439234", "0.55367106", "0.5526498", "0.5472272", "0.5443407", "0.54100704", "0.5400185", "0.534470...
0.56354445
12
Returns the font used to render hypertext items.
def GetHyperTextFont(self): return self._hypertextfont
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def font(self):\n return self[\"font\"]", "def font(self):\n return self[\"font\"]", "def font(self):\n return self[\"font\"]", "def get_text_font ( self, object ):\n return self.text_font", "def font(self):\n\treturn self.m_font", "def font(self):\n\treturn self.m_font", "d...
[ "0.75168544", "0.75168544", "0.75168544", "0.74786425", "0.73431957", "0.73431957", "0.7009258", "0.6995852", "0.6986247", "0.6963423", "0.6871636", "0.6871636", "0.6871636", "0.67896384", "0.67896384", "0.67645735", "0.6748909", "0.6710148", "0.6522772", "0.6519056", "0.6493...
0.7521886
0
Returns the colour used to render a nonvisited hypertext item.
def GetHyperTextNewColour(self): return self._hypertextnewcolour
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetItemTextColour(self, item):\r\n\r\n return item.Attr().GetTextColour()", "def GetHyperTextVisitedColour(self):\r\n\r\n return self._hypertextvisitedcolour", "def GetHilightNonFocusColour(self):\r\n \r\n return self._hilightUnfocusedBrush.GetColour()", "def get_color(self):\...
[ "0.6746235", "0.66485345", "0.63103485", "0.6153652", "0.60313207", "0.5972131", "0.5931929", "0.59213865", "0.5898138", "0.58762854", "0.58584535", "0.58483106", "0.5822997", "0.5804703", "0.5803662", "0.5801213", "0.5766527", "0.57634574", "0.5763093", "0.57515925", "0.5722...
0.61805713
3
Returns the colour used to render a visited hypertext item.
def GetHyperTextVisitedColour(self): return self._hypertextvisitedcolour
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_color(self):\n return \"yellow\"", "def GetItemTextColour(self, item):\r\n\r\n return item.Attr().GetTextColour()", "def getColor(self):\n return self._l[2]", "def color(self):\n return self['color']", "def get_color(self) -> str:\r\n return self.color", "def co...
[ "0.7161982", "0.7091735", "0.6852193", "0.684617", "0.66451585", "0.66242945", "0.6612252", "0.65482837", "0.6548009", "0.6503032", "0.65008056", "0.64990044", "0.6490145", "0.64851564", "0.64846396", "0.6478677", "0.64700747", "0.6466711", "0.64638746", "0.64495116", "0.6440...
0.76914406
0
Sets the window for the given item.
def SetItemWindow(self, item, wnd): if wnd is not None: self._hasWindows = True if item not in self._itemWithWindow: self._itemWithWindow.append(item) else: self.DeleteItemWindow(item) else: self.DeleteItemWindow(i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SetItemWindow(self, item, window, column=None):\r\n\r\n # Reparent the window to ourselves\r\n if window.GetParent() != self:\r\n window.Reparent(self)\r\n \r\n item.SetWindow(window, column)\r\n if window:\r\n self._hasWindows = True", "def SetWindow(...
[ "0.85961556", "0.6974706", "0.6941041", "0.67793196", "0.64938366", "0.6464401", "0.6364286", "0.6346546", "0.6325693", "0.6276612", "0.6276612", "0.615219", "0.6147956", "0.6131385", "0.60605043", "0.5995136", "0.59519273", "0.58821493", "0.58819216", "0.58782256", "0.586418...
0.82186997
1
Returns whether the window associated to the item is enabled.
def GetItemWindowEnabled(self, item): return item.GetWindowEnabled()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetWindowEnabled(self):\r\n\r\n if not self._wnd:\r\n raise Exception(\"\\nERROR: This Item Has No Window Associated\")\r\n\r\n return self._windowenabled", "def GetItemWindowEnabled(self, item, column=None):\r\n\r\n return item.GetWindowEnabled(column)", "def IsItemEnabled(...
[ "0.8505214", "0.8007672", "0.7860247", "0.7860247", "0.75124294", "0.6947935", "0.6888671", "0.68344855", "0.6784399", "0.6784399", "0.6784399", "0.6784399", "0.67639107", "0.67532593", "0.67532593", "0.6734674", "0.6696562", "0.66864604", "0.6616249", "0.6616249", "0.6616249...
0.87319374
0
Returns the item type.
def GetItemType(self, item): return item.GetType()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def item_type(self) -> str:\n return self.__item_type", "def item_type(self):\n return self._item_type", "def item_type(self):\n pass", "def _type(self, item):\n return self.cv.type(item)", "def _get_item_type(item_dict):\n\n if 'object' in item_dict:\n item_ty...
[ "0.9179514", "0.91133505", "0.8672985", "0.8254685", "0.8126899", "0.7671001", "0.76566327", "0.75807065", "0.75679904", "0.75527775", "0.75483406", "0.7492804", "0.7480299", "0.74298614", "0.74204934", "0.741828", "0.741828", "0.7417536", "0.74118197", "0.7399327", "0.73985"...
0.89300174
2
Returns whether the item font is bold or not.
def IsBold(self, item): return item.IsBold()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsBold(self):\r\n\r\n return self._isBold != 0", "def bold(self):\n b = self.__rPr.get('b')\n return True if b in ('true', '1') else False", "def asBold(self):\n\t\treturn TextFont( self.name[0:2]+'B', self.size)", "def getBoldFont(self):\r\n # obsolete?\r\n profbox()\r\n bo...
[ "0.8132417", "0.78413445", "0.6855979", "0.67443335", "0.6645823", "0.65713114", "0.6421347", "0.6316321", "0.63146555", "0.6275934", "0.6231843", "0.62218976", "0.62150836", "0.6136468", "0.6124744", "0.61153877", "0.6080069", "0.6022678", "0.59611285", "0.5848855", "0.58003...
0.8886081
0
Returns whether the item font is italic or not.
def IsItalic(self, item): return item.IsItalic()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsItalic(self):\r\n\r\n return self._isItalic != 0", "def test_check_italic_style_matches_names(self):\n contents = self.read_metadata_contents()\n family = Metadata.get_family_metadata(contents)\n\n for font_metadata in family.fonts:\n if font_metadata.style != 'italic...
[ "0.8167139", "0.70191216", "0.6747567", "0.673345", "0.66032535", "0.6582956", "0.64740425", "0.6432808", "0.6017978", "0.5659641", "0.56422174", "0.5618748", "0.55692744", "0.5525135", "0.54502815", "0.5395563", "0.5391619", "0.53647494", "0.53623337", "0.5285351", "0.524470...
0.87213445
0
Returns the item parent (can be ``None`` for root items).
def GetItemParent(self, item): return item.GetParent()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parentItem(self):\n return None", "def get_parent(self):\n if self.parent:\n return self.parent()\n else:\n return None", "def parent(self):\n if self._parent is not None:\n return self._parent()\n else:\n return None", "def g...
[ "0.8205913", "0.7717568", "0.75262856", "0.74972", "0.7448224", "0.7404753", "0.7404753", "0.7404753", "0.7342986", "0.7311873", "0.7311873", "0.72820854", "0.7266002", "0.72628754", "0.7237305", "0.72158444", "0.71896815", "0.7165575", "0.7163127", "0.7146544", "0.7145013", ...
0.8844773
0
Returns the item's next child.
def GetNextChild(self, item, cookie): children = item.GetChildren() # it's ok to cast cookie to size_t, we never have indices big enough to # overflow "void *" if cookie < len(children): return children[cookie], cookie+1 else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetNext(self, item):\r\n\r\n i = item\r\n\r\n # First see if there are any children.\r\n children = i.GetChildren()\r\n if len(children) > 0:\r\n return children[0]\r\n else:\r\n # Try a sibling of this or ancestor instead\r\n p = item\r\n ...
[ "0.790135", "0.7661856", "0.7634221", "0.75526047", "0.74904335", "0.7343158", "0.7219336", "0.7049505", "0.6993133", "0.6756054", "0.67509586", "0.671204", "0.671204", "0.652528", "0.64979285", "0.64979285", "0.64979285", "0.64827406", "0.6464071", "0.6454768", "0.6443558", ...
0.7410199
5
Finds the first item starting with the given prefix after the given parent.
def FindItem(self, idParent, prefixOrig): # match is case insensitive as this is more convenient to the user: having # to press Shift-letter to go to the item starting with a capital letter # would be too bothersome prefix = prefixOrig.lower() # determine the starting po...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def search_prefix(self, prefix):\n current = self.root\n for letter in prefix:\n\n current = current.get_child(letter)\n\n if not current:\n return\n\n return current", "def first_uri_matching_prefix(xia, prefix):\n\n if xia is not None:\n for u...
[ "0.7367341", "0.66796327", "0.65452075", "0.63788384", "0.62953365", "0.62518454", "0.6222055", "0.62204194", "0.6174083", "0.6163845", "0.6124411", "0.6027229", "0.6022698", "0.6005221", "0.5947661", "0.5930605", "0.59143156", "0.5906489", "0.58784175", "0.5873262", "0.58718...
0.7395003
0
Inserts an item after the given previous.
def InsertItemByItem(self, parentId, idPrevious, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None): parent = parentId if not parent: # should we give a warning here? return self.AddRoot(text, ct_type, wnd, image, selImage, data) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insertBack(self, item):\n self.sentinel.prev.insertAfter(item)\n self.N += 1", "def add_prev(self, item, index):\n if index in self.d_buffer.keys():\n return\n if len(self) == self._size:\n self.pop_last()\n self.add_item(item, index)", "def InsertUn...
[ "0.8096463", "0.691591", "0.68085235", "0.6796612", "0.67069584", "0.66047454", "0.65974337", "0.65806025", "0.6481882", "0.64085937", "0.6406045", "0.6353539", "0.63452196", "0.6332579", "0.63248163", "0.6319397", "0.62932366", "0.6281674", "0.62663186", "0.61818427", "0.615...
0.5486305
69
Inserts an item after the given previous.
def InsertItemByIndex(self, parentId, idPrevious, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None): parent = parentId if not parent: # should we give a warning here? return self.AddRoot(text, ct_type, wnd, image, selImage, data) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insertBack(self, item):\n self.sentinel.prev.insertAfter(item)\n self.N += 1", "def add_prev(self, item, index):\n if index in self.d_buffer.keys():\n return\n if len(self) == self._size:\n self.pop_last()\n self.add_item(item, index)", "def InsertUn...
[ "0.80968386", "0.6917209", "0.6806909", "0.6796774", "0.6708484", "0.6605155", "0.6597293", "0.6579013", "0.64823925", "0.6409617", "0.64060795", "0.6352445", "0.6345431", "0.63335645", "0.6325525", "0.6319545", "0.62931174", "0.62810296", "0.62662876", "0.61819", "0.61514", ...
0.0
-1
Inserts an item after the given previous.
def InsertItem(self, parentId, input, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None): if type(input) == type(1): return self.InsertItemByIndex(parentId, input, text, ct_type, wnd, image, selImage, data) else: return self.InsertItemByItem(parentId, input, text,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insertBack(self, item):\n self.sentinel.prev.insertAfter(item)\n self.N += 1", "def add_prev(self, item, index):\n if index in self.d_buffer.keys():\n return\n if len(self) == self._size:\n self.pop_last()\n self.add_item(item, index)", "def InsertUn...
[ "0.80968386", "0.6917209", "0.6806909", "0.6796774", "0.6708484", "0.6605155", "0.6597293", "0.6579013", "0.64823925", "0.6409617", "0.64060795", "0.6352445", "0.6345431", "0.63335645", "0.6325525", "0.6319545", "0.62931174", "0.62810296", "0.62662876", "0.61819", "0.61514", ...
0.0
-1
Appends an item as a last child of its parent.
def AppendItem(self, parentId, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None): parent = parentId if not parent: # should we give a warning here? return self.AddRoot(text, ct_type, wnd, image, selImage, data) return self.DoI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetLastChild(self, item):\r\n\r\n children = item.GetChildren()\r\n return (len(children) == 0 and [None] or [children[-1]])[0]", "def lastChild(self, parent):\r\n if len(parent):\r\n return parent[-1]\r\n else:\r\n return None", "def add_last(self, e):\n ...
[ "0.7107259", "0.6767008", "0.67616457", "0.6409436", "0.6406509", "0.6350064", "0.6276853", "0.626078", "0.625997", "0.6256642", "0.6205457", "0.6180921", "0.6114312", "0.6098935", "0.6090231", "0.60697", "0.60550606", "0.5980007", "0.59679246", "0.5962802", "0.596096", "0....
0.5537879
69
Deletes all items in the L{CustomTreeCtrl}.
def DeleteAllItems(self): if self._anchor: self.Delete(self._anchor)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DeleteAllItems(self):\r\n\r\n self.DeleteRoot()", "def delete(self, *items):\n self._visual_drag.delete(*items)\n ttk.Treeview.delete(self, *items)", "def clear_tree(self):\n self.treeview.delete(*self.treeview.get_children())", "def resetTree(self):\n for fila in self....
[ "0.7668931", "0.7459976", "0.73649234", "0.7029536", "0.70227295", "0.68253225", "0.6682416", "0.6577778", "0.65695506", "0.6485713", "0.64527863", "0.63721913", "0.63004684", "0.6225094", "0.61991715", "0.6151776", "0.61134", "0.6081235", "0.60806465", "0.6065055", "0.601383...
0.6480794
10
Draws the selected item(s) with the Windows Vista style.
def DrawVistaRectangle(self, dc, rect, hasfocus): if hasfocus: outer = _rgbSelectOuter inner = _rgbSelectInner top = _rgbSelectTop bottom = _rgbSelectBottom else: outer = _rgbNoFocusOuter inne...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DrawItemSelectionRect(*args, **kwargs):\n return _gdi_.RendererNative_DrawItemSelectionRect(*args, **kwargs)", "def draw_selected(self):\n if self.get_selected() is not None and not self.check_if_locked(self.get_selected()):\n self.color_cell(pos=self.get_selected(\n ), co...
[ "0.6430985", "0.64223254", "0.61985695", "0.61925745", "0.61081046", "0.60146", "0.5988995", "0.5982163", "0.595747", "0.5886763", "0.57129586", "0.5706427", "0.570246", "0.5678944", "0.5648386", "0.55847526", "0.547322", "0.5466191", "0.5374242", "0.53446144", "0.5338605", ...
0.5092933
54
Retrieves the rectangle bounding the item.
def GetBoundingRect(self, item, textOnly=False): i = item startX, startY = self.GetViewStart() rect = wx.Rect() rect.x = i.GetX() - startX*_PIXELS_PER_UNIT rect.y = i.GetY() - startY*_PIXELS_PER_UNIT rect.width = i.GetWidth() rect.height = self.Ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetItemRect(self):\r\n\r\n return self.rect", "def boundingRect(self):\n return self.rect().adjusted(-2, -2, 2, 2)", "def boundingRect(self) -> QRectF:\n return self._rect.adjusted(-10, -10, 10, 10)", "def boundingRect(self):\n return QRectF()", "def getRect(self):\n ...
[ "0.79584354", "0.7752873", "0.74879813", "0.74585104", "0.7348598", "0.72698784", "0.7242937", "0.7196432", "0.7172444", "0.7124169", "0.71170384", "0.7102435", "0.70818937", "0.7062728", "0.70543987", "0.6983481", "0.6957524", "0.68985265", "0.68985265", "0.6867967", "0.6808...
0.8110928
0
Returns the default font and colours which are used by the control. This is useful if you want to use the same font or colour in your own control as in a standard control which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the users system, especially if it...
def GetClassDefaultAttributes(self): attr = wx.VisualAttributes() attr.colFg = wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOWTEXT) attr.colBg = wx.SystemSettings_GetColour(wx.SYS_COLOUR_LISTBOX) attr.font = wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT) return attr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetDefaultAttributes(self):\n\n return wx.Button.GetClassDefaultAttributes()", "def GetDefaultFont(self):\n return wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL)", "def _set_default_font(cls):\n if platform.system() == \"Linux\":\n for family in (\"DejaVu Sans\", \"Noto Sans\"...
[ "0.7124202", "0.6967194", "0.63986456", "0.6256435", "0.61181104", "0.6021348", "0.59450525", "0.5939272", "0.59045804", "0.58654094", "0.5767804", "0.5767804", "0.5646005", "0.56184345", "0.55793935", "0.55552346", "0.55516887", "0.5541526", "0.5540598", "0.55250955", "0.552...
0.7761261
0
Returns the column header label.
def GetText(self): return self._text
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def header(self):\r\n # favour Column.header\r\n column_header = self.column.header\r\n if column_header:\r\n return column_header\r\n # fall back to automatic best guess\r\n return self.verbose_name", "def _get_label ( self ):\n if self._label is not None:\n ...
[ "0.7972697", "0.7723146", "0.7445403", "0.7431634", "0.70454496", "0.67261404", "0.6701785", "0.66737604", "0.6590869", "0.6590869", "0.6532053", "0.6523764", "0.64629734", "0.64428765", "0.6354874", "0.63236517", "0.631583", "0.6311205", "0.63030356", "0.62303585", "0.621164...
0.0
-1
Returns the column header width in pixels.
def GetWidth(self): return self._width
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetColumnWidth(self, column):\r\n\r\n return self._header_win.GetColumnWidth(column)", "def getHeaderWidth( self ):\n return 0", "def GetWidth(self):\r\n\r\n return self._total_col_width", "def width(self):\n return self.col", "def get_column_width(self, index):\n ret...
[ "0.78895897", "0.78819704", "0.769537", "0.7529033", "0.74505544", "0.7248704", "0.7095319", "0.70234275", "0.70086056", "0.69074863", "0.6811335", "0.67886776", "0.67834496", "0.67789024", "0.6744028", "0.672451", "0.6687796", "0.6678523", "0.6678523", "0.6678523", "0.667852...
0.6317013
81
Returns the total width of all columns.
def GetWidth(self): return self._total_col_width
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def total_width(self): \n total = 0\n for i in range(self.no_of_columns()):\n total += self.col_width(i)\n return total", "def _get_widths(columns):\n # at first find the longest value in a column, then calculate its length\n return [len(max(column, key=len)) for column in columns]...
[ "0.9201286", "0.7463248", "0.7223667", "0.71999055", "0.7101429", "0.70631236", "0.6964955", "0.6915986", "0.6852618", "0.6849921", "0.68437976", "0.68406713", "0.6781643", "0.6778788", "0.676933", "0.67653346", "0.67194736", "0.6715213", "0.66921693", "0.66801697", "0.666913...
0.80076724
1
Returns the column width, in pixels.
def GetColumnWidth(self, column): if column < 0 or column >= self.GetColumnCount(): raise Exception("Invalid column") return self._columns[column].GetWidth()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetWidth(self):\r\n\r\n return self._total_col_width", "def width(self):\n return self.col", "def get_column_width(self, index):\n return self.colwid[index]", "def total_width(self): \n total = 0\n for i in range(self.no_of_columns()):\n total += self.col_width(i)\n ...
[ "0.8729123", "0.8429582", "0.8291131", "0.8129167", "0.8021081", "0.7797527", "0.7773778", "0.7584613", "0.754161", "0.7499016", "0.7462539", "0.7386391", "0.7359331", "0.73276937", "0.73204595", "0.73172194", "0.7295061", "0.728946", "0.7289405", "0.727475", "0.72702163", ...
0.75634795
8
Returns whether the window associated with an item is enabled or not.
def GetWindowEnabled(self, column=None): column = (column is not None and [column] or [self._owner.GetMainColumn()])[0] if not self._wnd[column]: raise Exception("\nERROR: This Item Has No Window Associated At Column %s"%column) return self._wnd[column].IsEnabled()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetItemWindowEnabled(self, item):\r\n\r\n return item.GetWindowEnabled()", "def GetWindowEnabled(self):\r\n\r\n if not self._wnd:\r\n raise Exception(\"\\nERROR: This Item Has No Window Associated\")\r\n\r\n return self._windowenabled", "def GetItemWindowEnabled(self, item, ...
[ "0.8881642", "0.84297436", "0.8141892", "0.7838191", "0.7838191", "0.67787546", "0.66068923", "0.65868056", "0.64704907", "0.64279866", "0.64225525", "0.64219934", "0.63777584", "0.63696975", "0.63696975", "0.63335675", "0.632755", "0.6326524", "0.6326524", "0.6326524", "0.63...
0.7455258
5
Returns the column currently edited.
def column(self): return self._column
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def column(self):\n return self[\"column\"]", "def get_column(self):\n return self._column_number", "def getColumn(self):\n return _libsbml.SBase_getColumn(self)", "def col(self):\n\t\treturn self.__col", "def getColumn(self):\n return _libsbml.SBasePlugin_getColumn(self)", "d...
[ "0.7220172", "0.7127216", "0.71211106", "0.71061826", "0.70305324", "0.6813384", "0.6813081", "0.67457426", "0.67457426", "0.67457426", "0.67457426", "0.67457426", "0.67457426", "0.67457426", "0.67457426", "0.67457426", "0.67457426", "0.67457426", "0.67457426", "0.67457426", ...
0.7247925
0
Returns whether the window associated with an item is enabled or not.
def GetItemWindowEnabled(self, item, column=None): return item.GetWindowEnabled(column)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetItemWindowEnabled(self, item):\r\n\r\n return item.GetWindowEnabled()", "def GetWindowEnabled(self):\r\n\r\n if not self._wnd:\r\n raise Exception(\"\\nERROR: This Item Has No Window Associated\")\r\n\r\n return self._windowenabled", "def IsItemEnabled(self, item):\r\n\r\...
[ "0.8883547", "0.8430175", "0.7835111", "0.7835111", "0.74552256", "0.677737", "0.6607086", "0.6581272", "0.64649856", "0.6423265", "0.64201796", "0.6418363", "0.6372961", "0.63645816", "0.63645816", "0.63349277", "0.6331561", "0.6321531", "0.6321531", "0.6321531", "0.6321531"...
0.8143221
2
Sets the window associated to an item.
def SetItemWindow(self, item, window, column=None): # Reparent the window to ourselves if window.GetParent() != self: window.Reparent(self) item.SetWindow(window, column) if window: self._hasWindows = True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SetItemWindow(self, item, wnd):\r\n\r\n if wnd is not None:\r\n self._hasWindows = True\r\n if item not in self._itemWithWindow:\r\n self._itemWithWindow.append(item)\r\n else:\r\n self.DeleteItemWindow(item)\r\n else:\r\n ...
[ "0.8299316", "0.6982606", "0.6922547", "0.6799666", "0.66379577", "0.6548592", "0.6480402", "0.644146", "0.644146", "0.6372272", "0.6351073", "0.63162047", "0.62690794", "0.6191318", "0.61121064", "0.6092746", "0.60687774", "0.601314", "0.59911776", "0.5889542", "0.5875493", ...
0.85927624
0
Returns whether an item is enabled or disabled.
def IsItemEnabled(self, item): return item.IsEnabled()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_enabled(self):\n return self.enabled", "def IsEnabled(self):\r\n\r\n return self._enabled", "def is_enabled(self):\n return self._enabled", "def is_enabled(self):\n return self._enabled", "def isEnabled(self):\n return self.enabled", "def is_enabled(self) -> bool...
[ "0.75664043", "0.7463051", "0.74615985", "0.74615985", "0.743743", "0.74145347", "0.74041134", "0.74008656", "0.73970914", "0.73693424", "0.7270323", "0.72495747", "0.72495747", "0.72495747", "0.72495747", "0.72495747", "0.72495747", "0.7247064", "0.72071636", "0.72028303", "...
0.8333761
0
Returns the L{HyperTreeList} main column (i.e. the position of the underlying L{CustomTreeCtrl}.
def GetMainColumn(self): return self._main_column
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_column(self, index):\n left, right = self._get_columns()\n return left if index < left.count else right", "def getColumn(self):\n return _libsbml.SBase_getColumn(self)", "def get_column(self):\n return self._column_number", "def first_visible_column(self):\n return...
[ "0.62821907", "0.6156257", "0.61274815", "0.61063987", "0.6013086", "0.59881663", "0.5985595", "0.59647787", "0.5940605", "0.59268266", "0.5926242", "0.58748835", "0.58707964", "0.5868961", "0.58506113", "0.5816791", "0.5816641", "0.5779302", "0.57741636", "0.57310945", "0.57...
0.7414385
0
Returns whether a flag is present in the L{HyperTreeList} style.
def HasAGWFlag(self, flag): agwStyle = self.GetAGWWindowStyleFlag() res = (agwStyle & flag and [True] or [False])[0] return res
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_flag(self):\n return (self.__type & NODE_TAG) and isinstance(self.__value, bool)", "def HasAGWFlag(self, flag):\r\n\r\n return self._agwStyle & flag", "def is_in_routing_flags_dropdown_visible(self):\n return self.is_element_visible(self.in_routing_flags_dropdown_locator)", "def H...
[ "0.67077154", "0.6641246", "0.62910306", "0.6259107", "0.6236685", "0.6156645", "0.6139805", "0.6119134", "0.6105149", "0.59865886", "0.57790035", "0.5713853", "0.57072353", "0.568719", "0.56210977", "0.55713785", "0.55700266", "0.55200547", "0.5506346", "0.5506346", "0.54645...
0.62913203
2
Returns the column width, in pixels.
def GetColumnWidth(self, column): return self._header_win.GetColumnWidth(column)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetWidth(self):\r\n\r\n return self._total_col_width", "def width(self):\n return self.col", "def get_column_width(self, index):\n return self.colwid[index]", "def total_width(self): \n total = 0\n for i in range(self.no_of_columns()):\n total += self.col_width(i)\n ...
[ "0.8728174", "0.8427217", "0.82888174", "0.81296515", "0.8018876", "0.77738464", "0.75850594", "0.7562506", "0.7541028", "0.7499288", "0.74604136", "0.7386979", "0.7360051", "0.7328086", "0.73210233", "0.7315591", "0.7295421", "0.7290151", "0.7287243", "0.72752386", "0.727072...
0.7796664
5
Returns the header window, an instance of L{TreeListHeaderWindow}.
def GetHeaderWindow(self): return self._header_win
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _horizontal_header(self):\n return self.header()", "def _horizontal_header(self):\n return self.header()", "def _horizontal_header(self):\n return self.horizontalHeader()", "def SetHeader(self, window):\n window.SetName(\"header\")\n window.SetBackgroundColour(wx.GetApp...
[ "0.62679404", "0.62679404", "0.6181685", "0.57480437", "0.54822177", "0.5438407", "0.53811103", "0.53811103", "0.53811103", "0.53769916", "0.5360842", "0.5348632", "0.5333549", "0.53096986", "0.52764773", "0.526937", "0.5251524", "0.5251524", "0.5180992", "0.5179507", "0.5169...
0.8313571
0
Returns the main window, an instance of L{TreeListMainWindow}.
def GetMainWindow(self): return self._main_win
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main_window(self) -> MainWindow:\n return self._main_window", "def getMainWindow():\n\n ptr = omui.MQtUtil.mainWindow()\n qObj = shiboken2.wrapInstance(long(ptr), QtCore.QObject)\n metaObj = qObj.metaObject()\n cls = metaObj.className()\n superCls = metaObj.superClass().className()\n ...
[ "0.78104335", "0.74572504", "0.7149967", "0.7149887", "0.7149887", "0.70970315", "0.7091211", "0.7091211", "0.7091211", "0.7063839", "0.7012005", "0.6939131", "0.6910711", "0.68777746", "0.6801669", "0.6757548", "0.67295766", "0.6712087", "0.66920227", "0.6449044", "0.6447238...
0.7956732
0
Returns the default font and colours which are used by the control. This is useful if you want to use the same font or colour in your own control as in a standard control which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the users system, especially if it...
def GetClassDefaultAttributes(self): attr = wx.VisualAttributes() attr.colFg = wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOWTEXT) attr.colBg = wx.SystemSettings_GetColour(wx.SYS_COLOUR_LISTBOX) attr.font = wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT) return attr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetDefaultAttributes(self):\n\n return wx.Button.GetClassDefaultAttributes()", "def GetDefaultFont(self):\n return wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL)", "def _set_default_font(cls):\n if platform.system() == \"Linux\":\n for family in (\"DejaVu Sans\", \"Noto Sans\"...
[ "0.7125372", "0.69648623", "0.63967836", "0.62555534", "0.6115993", "0.6019857", "0.59448606", "0.5939233", "0.5904492", "0.5862861", "0.57657975", "0.57657975", "0.5643825", "0.56171185", "0.5579557", "0.55558157", "0.55508256", "0.55392206", "0.5538851", "0.55256736", "0.55...
0.7761948
1
Adam optimizer with learning rate 0.0002 for the first 100k steps (~100 epochs) and a linearly decaying rate that goes to zero over the next 100k steps
def make_optimizer(loss, variables, name='Adam',optimizer = self.optimizer,starter_learning_rate = self.learning_rate): global_step = tf.Variable(0, trainable=False) end_learning_rate = 0.0 start_decay_step = self.start_decay_step decay_steps = self.decay_steps ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def adam_optimizer(loss, initial_lr, decay_step, decay_rate):\n global_step = tf.train.get_or_create_global_step()\n lr = tf.train.exponential_decay(initial_lr, global_step, decay_step,\n decay_rate, staircase=True)\n\n optim = tf.train.AdamOptimizer(learning_rate=lr)\n ...
[ "0.7541559", "0.7312729", "0.7249145", "0.7167758", "0.7165902", "0.7087627", "0.70474774", "0.69807446", "0.69724417", "0.69600475", "0.6946525", "0.69356716", "0.6904425", "0.6877409", "0.6862103", "0.6841474", "0.6839631", "0.68291545", "0.6803243", "0.67924845", "0.678196...
0.0
-1
fool discriminator into believing that G(x) is real
def generator_loss(self, logits): if self.lossfunc == 'use_lsgan': # use mean squared error loss = tf.reduce_mean(tf.squared_difference(logits, REAL_LABEL)) elif self.lossfunc == 'sigmoid_cross_entropy_with_logits': # heuristic, non-saturating loss # loss...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def non_saturating_gan_losses(x_real: tf.Tensor,\n x_fake: tf.Tensor,\n discriminator: Callable[[tf.Tensor], tf.Tensor],\n **hparams) -> Tuple[tf.Tensor, tf.Tensor]:\n\n d_real = discriminator(x_real)\n d_fake = discrimina...
[ "0.66298515", "0.6293464", "0.62503207", "0.61770415", "0.61550736", "0.61550736", "0.6115356", "0.6097124", "0.6028781", "0.6005217", "0.5961671", "0.5926064", "0.59255815", "0.59096074", "0.5899062", "0.58868784", "0.58611894", "0.5848886", "0.5837853", "0.5825448", "0.5795...
0.0
-1
Based on the piece's current position, update what spaces this piece threatens.\n In the instance of the rook, the spaces threatened are always along the row+column it occupies, including the space that a piece that is blocking the rest of the path occupies, regardless of team
def update_spaces_threatened(self): # Spaces threatened are all the spaces it can move to + guarding an ally at the end of a path self.spaces_threatened = self.all_possible_moves(return_spaces_threatened=True) update_threatening_king(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_spaces_threatened(self):\n # The threatened spaces will always be it's corners\n current_row = self.position[0]\n current_column = self.position[1]\n corner1 = (current_row + 1 * self.direction, current_column - 1)\n corner2 = (current_row + 1 * self.direction, current...
[ "0.7618819", "0.6988299", "0.6988299", "0.6662635", "0.6415847", "0.636012", "0.6322536", "0.6312004", "0.60647285", "0.60088855", "0.6008488", "0.59895307", "0.5952149", "0.5923191", "0.59009534", "0.5897646", "0.5879792", "0.5879792", "0.5879792", "0.587524", "0.585966", ...
0.71541065
3
Based on the piece's current position, update what spaces this piece threatens.\n In the instance of the knight, it is everywhere it can move to, regardless of the piece that is in the destination
def update_spaces_threatened(self): self.spaces_threatened = self.all_possible_moves(return_spaces_threatened=True) update_threatening_king(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_spaces_threatened(self):\n # The threatened spaces will always be it's corners\n current_row = self.position[0]\n current_column = self.position[1]\n corner1 = (current_row + 1 * self.direction, current_column - 1)\n corner2 = (current_row + 1 * self.direction, current...
[ "0.7478518", "0.7403415", "0.7403415", "0.7403415", "0.7023517", "0.6544102", "0.6483089", "0.64815503", "0.6474521", "0.6445168", "0.6436823", "0.6394961", "0.6375218", "0.6369823", "0.63311", "0.6313067", "0.62769264", "0.6245166", "0.6214985", "0.62082964", "0.62082964", ...
0.72402984
5
Generates a list with `pop_size` number of random road trips.
def _generate_random_population(self, pop_size): random_population = [] for agent in range(pop_size): random_population.append(self._generate_random_agent()) return random_population
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_random_population(pop_size):\n\n random_population = []\n for agent in range(pop_size):\n random_population.append(generate_random_agent_keys())\n return random_population", "def generate_population(population_size, member_size):\n population = []\n\n for i in range(population_...
[ "0.7597811", "0.7010747", "0.7010242", "0.7001744", "0.6816509", "0.67447746", "0.66866773", "0.66841996", "0.6643847", "0.6551734", "0.6524115", "0.6511808", "0.649323", "0.64621484", "0.6437471", "0.64051527", "0.6384612", "0.6356965", "0.6340101", "0.62757474", "0.62387204...
0.7563461
1
Limits default queryset to only candidates who have applied for units visible to the end user; annotates candidates with their number of recommended or actual appointments.
def get_queryset(self): unitlist = get_units_visible_to_user(self.request.user) return Candidate.objects.filter( appointments__committee__unit__in=unitlist, )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_queryset(self):\n query_set = super(InternetExchangeProxyManager, self).get_queryset()\n return query_set.annotate(\n participants=models.Count('ixlan_set__netixlan_set__asn',\n distinct=True),\n )", "def get_queryset(self, request):\n ...
[ "0.58814025", "0.5658061", "0.56554085", "0.5643684", "0.55657953", "0.548783", "0.5487065", "0.54252636", "0.537226", "0.53449583", "0.5330983", "0.52905715", "0.5270444", "0.52514416", "0.5240802", "0.52160794", "0.52139795", "0.5211478", "0.5196181", "0.5190109", "0.515847...
0.6832537
0
Sanitize name. Remove . ' and lowercases.
def _sanitizeName(name): name = name.lower() # lower. name = name.replace('.','') # remove periods. name = name.replace('-','') # remove dashes. name = name.replace("'",'') # remove apostrophies. # return it. return name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_name(s):\n return re.sub('[\\W_]+', '', s).lower()", "def sanitize_name(name):\n # For now just change dashes to underscores. Fix this more in the future\n return name.replace(\"-\", \"_\")", "def sanitize_name(self):\n self._name = self.get_name().strip()", "def normalize_name(cls,...
[ "0.82544047", "0.8226864", "0.820927", "0.81553805", "0.81553805", "0.81553805", "0.8052249", "0.8040569", "0.79675245", "0.7955547", "0.79045516", "0.7883824", "0.7867868", "0.78105295", "0.77994114", "0.7753832", "0.7732385", "0.7725058", "0.76759607", "0.75951904", "0.7551...
0.904362
0
Check adding new student with empty fields by administrator.
def test06_add_student_with_empty_fields(self): student_data = self.students_page.\ click_edit_students_list_button(). \ click_add_new_student_button() student_data.save_data_changes_button.click() actual_warnings = \ student_data.warnings_text_for_adding_stud...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _warn_no_students(self):\n message = \"<tr><h2>No student records were found</h2></tr>\"\n self.add_element(message,True,0,True)", "def add_student():\n\n\tprint('You must enter the student as is:\\n'\n\t\t\"'First name', 'middle name', 'Last name', 'major', 'major', 'gpa', id_number, 'minor'\"...
[ "0.68849057", "0.678692", "0.6429708", "0.6345596", "0.6341819", "0.6336821", "0.6324509", "0.62568164", "0.6237487", "0.6231557", "0.610491", "0.6058711", "0.6052275", "0.6019701", "0.60182077", "0.6004534", "0.59779173", "0.5917059", "0.5904873", "0.58908886", "0.58804506",...
0.82155687
0
Check opportunity of adding two equal students by administrator.
def test08_add_equal_students_with_admin(self): actual_save_data_changes_button = \ self.students_page.click_edit_students_list_button().\ click_add_new_student_button().\ enter_student_data(data['first_new_student']). \ click_save_data_changes_button().\ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test01_add_new_student_with_admin(self):\n students_list_with_new_student = self.students_page.\\\n click_edit_students_list_button().\\\n click_add_new_student_button().\\\n enter_student_data(data['first_new_student']).\\\n click_save_data_changes_button().\...
[ "0.68140996", "0.66592515", "0.64200205", "0.6329315", "0.625022", "0.6212312", "0.620228", "0.6177725", "0.61335516", "0.610789", "0.6101641", "0.60458577", "0.5971816", "0.59634185", "0.5916554", "0.5912424", "0.5893105", "0.5860381", "0.58577937", "0.58451974", "0.5825509"...
0.76385546
0
Check is new student added by teacher.
def test14_add_new_student_with_teacher(self): students_list_with_new_student = self.students_page. \ click_edit_students_list_button(). \ click_add_new_student_button(). \ enter_student_data(data['third_new_student']).\ enter_name_approved_by_custom(data['third_n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test01_add_new_student_with_admin(self):\n students_list_with_new_student = self.students_page.\\\n click_edit_students_list_button().\\\n click_add_new_student_button().\\\n enter_student_data(data['first_new_student']).\\\n click_save_data_changes_button().\...
[ "0.67734134", "0.6660621", "0.6580363", "0.6566909", "0.65607816", "0.6428954", "0.638335", "0.6335546", "0.62901986", "0.60897744", "0.6089524", "0.60855556", "0.60824907", "0.60779405", "0.60770047", "0.6070852", "0.5975144", "0.59510785", "0.59445727", "0.5914575", "0.5878...
0.77851117
0
Constructor. Pass in a handle to player. Needed for when moving platforms collide with the player, if they are implemented in.
def __init__(self, player): self.platform_list = pygame.sprite.Group() self.enemy_list = pygame.sprite.Group() self.player = player # Background image self.background = None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, player):\n\t\tself.player = player", "def __init__(self, player):\n self.player = player", "def __init__(self, *args, **kwargs):\n super(Player, self).__init__(*args, **kwargs)", "def __init__(self,player,name,playerFn):\n\t\tself.player = player\n\t\tself.name = name\n\t\tse...
[ "0.77596015", "0.7620766", "0.7126331", "0.70076567", "0.6924619", "0.68851465", "0.6819913", "0.6765277", "0.67340374", "0.67213535", "0.6706569", "0.6695996", "0.66713434", "0.66238743", "0.66143435", "0.65882987", "0.6510885", "0.6475657", "0.64661676", "0.64478534", "0.64...
0.6918522
5
Return Gaussian that truncates at the given number of standard deviations.
def gaussian_kernel(sigma, truncate=4.0): sigma = float(sigma) radius = int(truncate * sigma + 0.5) x, y = np.mgrid[-radius:radius + 1, -radius:radius + 1] sigma = sigma**2 k = 2 * np.exp(-0.5 * (x**2 + y**2) / sigma) k = k / np.sum(k) return k
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gaussian_template(\n wavelengths: np.ndarray,\n mean: Union[float, np.ndarray],\n std: Union[float, np.ndarray] = 30.0,\n) -> np.ndarray:\n y = norm.pdf(wavelengths, mean, std)\n return y / np.max(y, axis=-1, keepdims=True)", "def gaussian(window_size, sigma):\n gauss = torch.Tensor([math.e...
[ "0.65619296", "0.65083265", "0.6484246", "0.6438799", "0.64069104", "0.6395601", "0.6395601", "0.6372692", "0.63701415", "0.6346474", "0.63301814", "0.6319163", "0.6318686", "0.6315133", "0.62878865", "0.6284648", "0.6274298", "0.62435627", "0.61932707", "0.61906254", "0.6174...
0.58607304
40
The Young's module E Returns float the Young's module E.
def e_young(self) -> float: return self._e_young
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def e(self):\n if self._e is None:\n # self._e = self.distributions.uniform(0.3,0.33)\n # return self._e\n # max is set by q but also limited by users choice of e_max.\n res_a = 29.9*((self.j[0]/self.k[0])**(2/3))\n q = self.distributions.truncated_norm...
[ "0.7134229", "0.69721395", "0.68711317", "0.68565106", "0.66448957", "0.6567697", "0.6562301", "0.64978653", "0.64276594", "0.64276594", "0.6372055", "0.63474554", "0.6316611", "0.630509", "0.630509", "0.62590176", "0.6251313", "0.62419677", "0.6223425", "0.6220657", "0.62152...
0.6571585
5
The Poisson ratio nu Returns float the Poisson ratio nu.
def nu_poisson(self) -> float: return self._nu_poisson
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pe_ratio(self):\n if self._pe_ratio == None:\n return float('inf')\n return self._pe_ratio", "def pe_ratio(self):\n try:\n return self.price / self.dividend_yield\n except ZeroDivisionError:\n return 0.0", "def infected_ratio(self):\n if s...
[ "0.6802763", "0.6118699", "0.60822916", "0.6007136", "0.5992979", "0.59401816", "0.5929649", "0.59148395", "0.59097224", "0.5909272", "0.5875463", "0.58645695", "0.5834637", "0.5805637", "0.5762675", "0.57515186", "0.57293147", "0.5719931", "0.5687959", "0.5660465", "0.565891...
0.8215287
0
The nodal stress Returns np.ndarray nodal stress.
def nodal_stress(self) -> np.ndarray: return self._nodal_stress
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_stress(self) -> Union[np.float64, float]:\n\n return self.__stress", "def set_nodal_stress(self, nodal_stress: np.ndarray):\n self._nodal_stress = nodal_stress", "def steel_stress(self,strain_dis, newFOS=None):\r\n\t\tstress = np.zeros(len(self.reinforcement))\r\n\t\tfor i,steel in enumer...
[ "0.6475495", "0.6197988", "0.60655886", "0.59380513", "0.59271765", "0.5699855", "0.5579284", "0.5528225", "0.549997", "0.5435113", "0.5416693", "0.5266351", "0.5146147", "0.5119996", "0.50770754", "0.5056021", "0.4991959", "0.4972361", "0.4962668", "0.49500734", "0.49369434"...
0.86909693
0
Function that save json into file
def save_to_json_file(my_obj, filename): import json with open(filename, 'w') as file: json.dump(my_obj, file)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save_to_file(data):\n\ttry:\n\t\toutput_file = open(\"output.json\", \"w\")\n\t\toutput_file.write(json.dumps(data))\n\texcept:\n\t print(Fore.GREEN + \"File not found or path is incorrect\")\n\tfinally:\n\t print(Fore.GREEN + \"Success go to output.json to look at the json\")", "def save_file(data,...
[ "0.8092241", "0.80218667", "0.80046785", "0.7956789", "0.7902266", "0.7894051", "0.78629935", "0.7855122", "0.7838691", "0.77865356", "0.77756196", "0.7729424", "0.7695161", "0.76932806", "0.76888096", "0.7648773", "0.76482034", "0.7646796", "0.7643142", "0.76303387", "0.7593...
0.74638563
45
Converts a batch to a list of values.
def batch(byte_array, funcs): result = [] length = bytes_to_int(byte_array[0:4]) item_size = bytes_to_int(byte_array[4:8]) for i in range(0, length): chunk = byte_array[8+i*item_size:8+(i+1)*item_size] for f in funcs: f(chunk) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shatter_batch(self, batch):\n return [tuple([elem[i] for elem in batch])\n for i in range(batch.size)]", "def values(self):\n return [i.value for i in self.value]", "def _get_batch_data(self, batch):\n try:\n encoders = [ encoder for encoder in self._data_enco...
[ "0.6496593", "0.6373885", "0.63319325", "0.629643", "0.6237731", "0.6229378", "0.6220153", "0.61910385", "0.6171078", "0.61443114", "0.613668", "0.6102674", "0.6091358", "0.6087504", "0.6049717", "0.6047228", "0.600567", "0.5999126", "0.59880775", "0.5978998", "0.5972039", ...
0.0
-1
This takes a UNICODE string and replaces unicode characters with something equivalent in 7bit ASCII. It returns a plain ASCII string. This function makes a best effort to convert unicode characters into ASCII equivalents. It does not just strip out the Latin1 characters. All characters in the standard 7bit ASCII range ...
def unicode2ascii(_unicrap): xlate = {0xc0:'A', 0xc1:'A', 0xc2:'A', 0xc3:'A', 0xc4:'A', 0xc5:'A', 0xc6:'Ae', 0xc7:'C', 0xc8:'E', 0xc9:'E', 0xca:'E', 0xcb:'E', 0xcc:'I', 0xcd:'I', 0xce:'I', 0xcf:'I', 0xd0:'Th', 0xd1:'N', 0xd2:'O', 0xd3:'O', 0xd4:'O', 0xd5:'O', 0xd6:'O', 0xd8:'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_ascii(string):\n\tfor key in UNICODE_TO_ASCII:\n\t\tstring = string.replace(key, UNICODE_TO_ASCII[key])\n\n\treturn string", "def __unicode_to_ascii(text):\n line = unicodedata.normalize('NFKD', text)\n return ''.join(c for c in line if not unicodedata.combining(c))", "def unicode_to_ascii(s: str)...
[ "0.7445588", "0.7200559", "0.7054458", "0.7035647", "0.6820928", "0.68024474", "0.6781812", "0.67433643", "0.66924036", "0.66797334", "0.6502379", "0.6424289", "0.6405377", "0.6399218", "0.63962024", "0.6393015", "0.63878417", "0.63780975", "0.62985706", "0.6242666", "0.62295...
0.6237252
20
Remove stop words from an iterable of tokens
def remove_stops(tokens, stops): return [(token, pos) for token, pos in tokens if token not in stops.value]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_stopwords(tokens):\n\n return [t for t in tokens if t not in stopwords.words('english')]", "def remove_stopwords(tokens):\n stop_words = set(stopwords.words('english'))\n\n tokens = [w for w in tokens if w not in stop_words]\n\n return tokens", "def remove_stop_words(text_tokens):\n\n ...
[ "0.81226796", "0.80999607", "0.8079205", "0.79615486", "0.7949977", "0.78477323", "0.7830606", "0.78293467", "0.7825773", "0.7817421", "0.7703199", "0.75855994", "0.7495533", "0.74890524", "0.74606556", "0.7420881", "0.74197114", "0.7380108", "0.73754364", "0.73599905", "0.73...
0.72133815
35
Splits COCO dataset to few datsets.
def coco_split_dataset( coco_json_path, image_dir, output_dir, dataset_list_name, ratio_list ): param_info = [ (coco_json_path, 'coco_json_path', (str, Path)), (image_dir, 'image_dir', (str, Path)), (output_dir, 'output_dir', (str, Path)), (dataset_list_name, 'dataset_list_name',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __split_dataset(self):\n self.train, self.valid, _, _ = train_test_split(self.data, self.data, test_size=0.2)\n self.valid, self.test, _, _ = train_test_split(self.valid, self.valid, test_size=0.5)", "def split_data(basedir, data_split=0.80):\n manip = data_manipulator(basedir)\n manip.tr...
[ "0.70536417", "0.66193825", "0.6617771", "0.6556101", "0.6527025", "0.6483681", "0.64804894", "0.6449395", "0.6436618", "0.64059824", "0.64008707", "0.6392371", "0.638813", "0.6358079", "0.6336722", "0.63065493", "0.63030267", "0.6295136", "0.62679046", "0.6259577", "0.625787...
0.5798127
85
Mock the get and post request.
def mocked_requests_scrapping_form(*args, **kwargs): class MockResponse: def __init__(self, json_data, status_code, url): self.content = json_data self.status_code = status_code self.url = url self.cookies = {"JSESSIONID": "jkghhjgjhgfjgfgjg"} self...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_make_request_method(self, m_requests, m_sleep):\r\n request = testing.DummyRequest({mut.URL_KEY: SAMPLE_URL, \r\n mut.METHOD_KEY: SAMPLE_METHOD})\r\n m_response, response_dict = self.mock_response()\r\n m_requests.post.return_value = m_response\r...
[ "0.7363104", "0.73515767", "0.7248291", "0.72248703", "0.71914643", "0.71306014", "0.7127065", "0.71192163", "0.70416135", "0.6985732", "0.6948445", "0.6941701", "0.69401413", "0.68330956", "0.6813428", "0.6786197", "0.6776061", "0.6772067", "0.6748027", "0.6721936", "0.67095...
0.0
-1
Mock the get and post request.
def mocked_requests_scrapping_get(*args, **kwargs): class MockResponse: def __init__(self, json_data, status_code, url): self.content = json_data self.status_code = status_code self.url = url self.cookies = {"JSESSIONID": "jkghhjgjhgfjgfgjg"} self....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_make_request_method(self, m_requests, m_sleep):\r\n request = testing.DummyRequest({mut.URL_KEY: SAMPLE_URL, \r\n mut.METHOD_KEY: SAMPLE_METHOD})\r\n m_response, response_dict = self.mock_response()\r\n m_requests.post.return_value = m_response\r...
[ "0.73629266", "0.7351129", "0.72481227", "0.7224917", "0.7190817", "0.7130391", "0.7126162", "0.7118669", "0.7041898", "0.69856", "0.694968", "0.69422954", "0.69400394", "0.6833045", "0.6813909", "0.6785537", "0.67758024", "0.67722154", "0.6747663", "0.6720956", "0.6709178", ...
0.0
-1
Mock the get and post request.
def mocked_requests_scrapping_post(*args, **kwargs): class MockResponse: def __init__(self, json_data, status_code, url): self.content = json_data self.status_code = status_code self.url = url self.cookies = {"JSESSIONID": "jkghhjgjhgfjgfgjg"} self...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_make_request_method(self, m_requests, m_sleep):\r\n request = testing.DummyRequest({mut.URL_KEY: SAMPLE_URL, \r\n mut.METHOD_KEY: SAMPLE_METHOD})\r\n m_response, response_dict = self.mock_response()\r\n m_requests.post.return_value = m_response\r...
[ "0.73629266", "0.7351129", "0.72481227", "0.7224917", "0.7190817", "0.7130391", "0.7126162", "0.7118669", "0.7041898", "0.69856", "0.694968", "0.69422954", "0.69400394", "0.6833045", "0.6813909", "0.6785537", "0.67758024", "0.67722154", "0.6747663", "0.6720956", "0.6709178", ...
0.63278013
48