check all positions
496030
def checkPos(self):
        """"""
        soup = BeautifulSoup(self.css1(path['movs-table']).html, 'html.parser')
        poss = []
        for label in soup.find_all("tr"):
            pos_id = label['id']
            # init an empty list
            # check if it already exist
            pos_list = [x for x in self.positions if x.id == pos_id]
            if pos_list:
                # and update it
                pos = pos_list[0]
                pos.update(label)
            else:
                pos = self.new_pos(label)
            pos.get_gain()
            poss.append(pos)
        # remove old positions
        self.positions.clear()
        self.positions.extend(poss)
        logger.debug("%d positions update" % len(poss))
        return self.positions
776849
public function shiftPositions()
    {
        $this->owner->updateAllCounters(
            [$this->positionAttribute => -1],
            ['>', $this->positionAttribute, $this->owner->{$this->positionAttribute}]
        );
    }
744477
def _scan(positions):
    """"""
    scores = []
    for start in range(0, len(positions) - 17, 5):
        end = start = 17
        scores.add(_enrichment(positions[start:end], positions[:start], positions[end:]))
382104
def include? position
      position = Position.normalize(position)
      contain?(position) && !(position.line == start.line && position.character == start.character)
    end
170058
def xy_positions(self):
        """"""
        if self._xy_positions is None or len(self._xy_positions) == 0:
            xy_pos = []
            for dom_id, pos in self.dom_positions.items():
                if self.domid2floor(dom_id) == 1:
                    xy_pos.append(np.array([pos[0], pos[1]]))
            self._xy_positions = np.array(xy_pos)
        return self._xy_positions
799435
def in_check(self, position, location=None):
        
        location = location or self.location
        for piece in position:

            if piece is not None and piece.color != self.color:
                if not isinstance(piece, King):
                    for move in piece.possible_moves(position):

                        if move.end_loc == location:
                            return True
                else:
                    if self.loc_adjacent_to_opponent_king(piece.location, position):
                        return True

        return False
1101869
def _find_column_label_positions(self, match_value_or_fct, levels=None):
        """"""
        allmatches = find_locations(self.df.columns, match_value_or_fct, levels)
        if allmatches and self.inc_index:  # tramslate back
            allmatches = [m + self.nidxs for m in allmatches]
        return allmatches
385210
def _find_row_label_positions(self, match_value_or_fct, levels=None):
        """"""
        allmatches = find_locations(self.df.index, match_value_or_fct, levels)
        if allmatches and self.inc_index:  # tramslate back
            allmatches = [m + self.nhdrs for m in allmatches]
        return allmatches
139848
function getAllNearPositions(position) {
    return [[-1, -1], [0, -1], [1, -1], [-1, 0], [1, 0], [-1, 1], [0, 1], [1, 1] // Below positions
    ].map(function (toAdd) {
        return {
            x: position.x + toAdd[0],
            y: position.y + toAdd[1]
        };
    });
}
93683
private static int findGroupEnd(Page page, PagesHashStrategy pagesHashStrategy, int startPosition)
    {
        checkArgument(page.getPositionCount() > 0, "Must have at least one position");
        checkPositionIndex(startPosition, page.getPositionCount(), "startPosition out of bounds");

        return findEndPosition(startPosition, page.getPositionCount(), (firstPosition, secondPosition) -> pagesHashStrategy.rowEqualsRow(firstPosition, page, secondPosition, page));
    }
333263
def position(self, x, y, text):
        
        sys.stdout.write("\x1b7\x1b[%d;%df%s\x1b8" % (x, y, text))
        sys.stdout.flush()
100889
def check_selection(self):
        
        if self.current_prompt_pos is None:
            self.set_cursor_position('eof')
        else:
            self.truncate_selection(self.current_prompt_pos)
624516
def getPos(position, pagesize):
    
    position = str(position).split()
    if len(position) != 2:
        raise Exception("position not defined right way")
    x, y = [getSize(pos) for pos in position]
    return getCoords(x, y, None, None, pagesize)
552389
def get_positions(self, copy=True):
        '''
        
        '''
        if copy:
            return self._positions.copy()
        else:
            return self._positions
496085
def position(self):
        
        legendPos = self._element.legendPos
        if legendPos is None:
            return XL_LEGEND_POSITION.RIGHT
        return legendPos.val
994410
def empty_positions(&block)
      positions = []
      each_position do |row, column|
        next if get_cell(row, column)
        yield(row, column) if block_given?
        positions << [row, column]
      end
      positions
    end
52151
def pane_position_check(self):
        
        text_buffer = self.get_buffer()

        # not needed if the right side bar is un-docked
        from rafcon.gui.singleton import main_window_controller

        if main_window_controller is None or main_window_controller.view is None:
            return
        from rafcon.gui.runtime_config import global_runtime_config
        if global_runtime_config.get_config_value('RIGHT_BAR_WINDOW_UNDOCKED'):
            return

        # move the pane left if the cursor is to far right and the pane position is less then 440 from its max position
        button_container_min_width = self.button_container_min_width
        width_of_all = button_container_min_width + self.tab_width
        text_view_width = button_container_min_width - self.line_numbers_width
        min_line_string_length = float(button_container_min_width)/float(self.source_view_character_size)

        current_pane_pos = main_window_controller.view['right_h_pane'].get_property('position')
        max_position = main_window_controller.view['right_h_pane'].get_property('max_position')
        pane_rel_pos = main_window_controller.view['right_h_pane'].get_property('max_position') - current_pane_pos
        if pane_rel_pos >= width_of_all + self.line_numbers_width:
            pass
        else:
            cursor_line_offset = text_buffer.get_iter_at_offset(text_buffer.props.cursor_position).get_line_offset()
            needed_rel_pos = text_view_width/min_line_string_length*cursor_line_offset \
                             + self.tab_width + self.line_numbers_width
            needed_rel_pos = min(width_of_all, needed_rel_pos)
            if pane_rel_pos >= needed_rel_pos:
                pass
            else:
                main_window_controller.view['right_h_pane'].set_property('position', max_position - needed_rel_pos)
                spacer_width = int(width_of_all + self.line_numbers_width - needed_rel_pos)
                self.spacer_frame.set_size_request(width=spacer_width, height=-1)