Jump to a specific trace frame in a trace.

        Parameters:
            selected_number: int    the trace frame number from trace output
347885
def jump(self, selected_number: int) -> None:
        
        self._verify_entrypoint_selected()
        if selected_number < 1 or selected_number > len(self.trace_tuples):
            raise UserError(
                "Trace frame number out of bounds "
                f"(expected 1-{len(self.trace_tuples)} but got {selected_number})."
            )

        self.current_trace_frame_index = selected_number - 1
        self.trace()
1245841
def find_selected(self, event):
        ''''''
        for m in self.items:
            ret = m.find_selected(event)
            if ret is not None:
                return ret
        return None
472259
def _selection_by_callable(self, view, num_slices, non_empty_slices):
        """"""

        selected = [sl for sl in non_empty_slices
                    if self._sampler(self._get_axis(self._image, view, sl))]

        return selected[:num_slices]
1322363
def select_traces(traces, interval, sample_rate=None):
    """"""
    start, end = interval
    i, j = round(sample_rate * start), round(sample_rate * end)
    i, j = int(i), int(j)
    traces = traces[i:j, :]
    # traces = traces - np.mean(traces, axis=0)
    return traces
1306421
def stack_trace(depth=None):
    
    frames = inspect.stack()[2:]
    if depth:
        frames = frames[:depth]
        
    result = StringIO()
    result.write("----------------------------------------------------\n")
    for (frame, file, line, context, code, status) in frames:
        result.write("In %s from %s\n%s %s" % (context, file, line, "\n".join(code)))
        result.write("----------------------------------------------------\n")        
    return result.getvalue()
878132
def random(*args):
    
    current_frame     = inspect.currentframe().f_back
    trace_string      = ""
    while current_frame.f_back:
      trace_string = trace_string + current_frame.f_back.f_code.co_name
      current_frame = current_frame.f_back
    return counter.get_from_trace(trace_string)
1174395
def start_trace(self, full=False, frame=None, below=0, under=None):
        """"""
        if self.tracing:
            return
        self.reset()
        log.info('Starting trace')
        frame = frame or sys._getframe().f_back
        # Setting trace without pausing
        self.set_trace(frame, break_=False)
        self.tracing = True
        self.below = below
        self.under = under
        self.full = full
599233
private void hitCountChanged()
	{
		if (!fHitValueButton.getSelection())
		{
			removeErrorMessage(fgHitCountErrorMessage);
			return;
		}
		String hitCountText = fHitValueText.getText();
		int hitCount = -1;
		try
		{
			hitCount = Integer.parseInt(hitCountText);
		} catch (NumberFormatException e1)
		{
			addErrorMessage(fgHitCountErrorMessage);
			return;
		}
		if (hitCount < 1)
		{
			addErrorMessage(fgHitCountErrorMessage);
		} else
		{
			removeErrorMessage(fgHitCountErrorMessage);
		}
	}
1162321
def start_trace(
        full=False, frame=None, below=0, under=None, server=None, port=None
):
    """"""
    wdb = Wdb.get(server=server, port=port)
    if not wdb.stepping:
        wdb.start_trace(full, frame or sys._getframe().f_back, below, under)
    return wdb
912050
def select_pane(self, target_pane):
        

        if target_pane in ['-l', '-U', '-D', '-L', '-R']:
            proc = self.cmd('select-pane', '-t%s' % self.id, target_pane)
        else:
            proc = self.cmd('select-pane', '-t%s' % target_pane)

        if proc.stderr:
            raise exc.LibTmuxException(proc.stderr)

        return self.attached_pane
695314
private static void addJumpIfNextNotDestination(CFG cfg, BasicBlock next, Instruction lastInstr, BasicBlock current) {
        Iterator<BasicBlock> outs = cfg.getOutgoingDestinations(current).iterator();
        BasicBlock target = outs.hasNext() ? outs.next() : null;

        if (target != null && !outs.hasNext()) {
            if ((target != next) && ((lastInstr == null) || !lastInstr.transfersControl())) {
                current.addInstr(new Jump(target.getLabel()));
            }
        }
    }
1262347
def _viewEntryNumber(self, ientry, select=True):
        """"""
        # pass entry to viewer dialog
        self._viewing_ientry = ientry
        entry = self.purrer.entries[ientry]
        busy = BusyIndicator()
        self.view_entry_dialog.viewEntry(entry,
                                         prev=ientry > 0 and self.purrer.entries[ientry - 1],
                                         next=ientry < len(self.purrer.entries) - 1 and self.purrer.entries[ientry + 1])
        self.view_entry_dialog.show()
        # select entry in listview
        if select:
            self.etw.clearSelection()
            self.etw.setItemSelected(self.etw.topLevelItem(ientry), True)
831504
def _frame_received(self, frame):
        
        try:
            self._rx_frames[frame["frame_id"]] = frame
        except KeyError:
            # Has no frame_id, ignore?
            pass
        _LOGGER.debug("Frame received: %s", frame)
        # Give the frame to any interested functions
        for handler in self._rx_handlers:
            handler(frame)
387615
def add_selected(self, ):
        
        browser = self.shot_browser if self.browser_tabw.currentIndex() == 1 else self.asset_browser
        selelements = browser.selected_indexes(2)
        if not selelements:
            return
        seltypes = browser.selected_indexes(3)
        if not seltypes:
            return
        elementi = selelements[0]
        typi = seltypes[0]
        if not elementi.isValid() or not typi.isValid():
            return
        element = elementi.internalPointer().internal_data()
        typ = typi.internalPointer().internal_data()[0]

        reftrack.Reftrack(self.root, self.refobjinter, typ=typ, element=element)
102136
def jump_to(self, mark, offset=0):
        """"""
        self._offset = self._bookmarks[mark] + offset
147248
def frame_received_cb(self, frame):
        """"""
        PYVLXLOG.debug("REC: %s", frame)
        for frame_received_cb in self.frame_received_cbs:
            # pylint: disable=not-callable
            self.loop.create_task(frame_received_cb(frame))
370934
def select_action(self, pos1, pos2, ctrl, shift):
    """"""
    assert pos1.surf.surf_type == pos2.surf.surf_type
    assert pos1.surf.world_to_obs == pos2.surf.world_to_obs

    action = sc_pb.Action()
    action_spatial = pos1.action_spatial(action)

    if pos1.world_pos == pos2.world_pos:  # select a point
      select = action_spatial.unit_selection_point
      pos1.obs_pos.assign_to(select.selection_screen_coord)
      mod = sc_spatial.ActionSpatialUnitSelectionPoint
      if ctrl:
        select.type = mod.AddAllType if shift else mod.AllType
      else:
        select.type = mod.Toggle if shift else mod.Select
    else:
      select = action_spatial.unit_selection_rect
      rect = select.selection_screen_coord.add()
      pos1.obs_pos.assign_to(rect.p0)
      pos2.obs_pos.assign_to(rect.p1)
      select.selection_add = shift

    # Clear the queued action if something will be selected. An alternative
    # implementation may check whether the selection changed next frame.
    units = self._units_in_area(point.Rect(pos1.world_pos, pos2.world_pos))
    if units:
      self.clear_queued_action()

    return action