Returns a pileup column at the specified position. Unclear if a function
    like this is hiding somewhere in pysam API.
199248
def pileup_reads_at_position(samfile, chromosome, base0_position):
    

    # TODO: I want to pass truncate=True, stepper="all"
    # but for some reason I get this error:
    #      pileup() got an unexpected keyword argument 'truncate'
    # ...even though these options are listed in the docs for pysam 0.9.0
    #
    for column in samfile.pileup(
            chromosome,
            start=base0_position,
            end=base0_position + 1):

        if column.pos != base0_position:
            # if this column isn't centered on the base before the
            # variant then keep going
            continue

        return column.pileups

    # if we get to this point then we never saw a pileup at the
    # desired position
    return []
387099
public int positionFor(int line, int column) {
        if (lines.size() < line)
            return -1;

        return lines.get(line - 1) + column - 1;
    }
1213445
def get_column(self, col):
        
        # catch corner case with an empty file (group with no datasets)
        if not len(self.group.keys()):
            return np.array([])
        vals = self.group[col]
        if self.filter_func:
            return vals[self.mask]
        else:
            return vals[:]
540473
public static void extractColumn(DMatrixRMaj P, int col, GeoTuple3D_F64 a) {
		a.x = P.unsafe_get(0,col);
		a.y = P.unsafe_get(1,col);
		a.z = P.unsafe_get(2,col);
	}
858086
def sumai(array):
    
    n = ctypes.c_int(len(array))
    array = stypes.toIntVector(array)
    return libspice.sumai_c(array, n)
941894
def ascolumn(x, dtype = None):
    ''''''
    x = asarray(x, dtype)
    return x if len(x.shape) >= 2 else x.reshape(len(x),1)
1264234
def get_rec_column_descr(self, colnum, vstorage):
        
        npy_type, isvar, istbit = self._get_tbl_numpy_dtype(colnum)
        name = self._info['colinfo'][colnum]['name']

        if isvar:
            if vstorage == 'object':
                descr = (name, 'O')
            else:
                tform = self._info['colinfo'][colnum]['tform']
                max_size = _extract_vararray_max(tform)

                if max_size <= 0:
                    name = self._info['colinfo'][colnum]['name']
                    mess = 'Will read as an object field'
                    if max_size < 0:
                        mess = "Column '%s': No maximum size: '%s'. %s"
                        mess = mess % (name, tform, mess)
                        warnings.warn(mess, FITSRuntimeWarning)
                    else:
                        mess = "Column '%s': Max size is zero: '%s'. %s"
                        mess = mess % (name, tform, mess)
                        warnings.warn(mess, FITSRuntimeWarning)

                    # we are forced to read this as an object array
                    return self.get_rec_column_descr(colnum, 'object')

                if npy_type[0] == 'S':
                    # variable length string columns cannot
                    # themselves be arrays I don't think
                    npy_type = 'S%d' % max_size
                    descr = (name, npy_type)
                elif npy_type[0] == 'U':
                    # variable length string columns cannot
                    # themselves be arrays I don't think
                    npy_type = 'U%d' % max_size
                    descr = (name, npy_type)
                else:
                    descr = (name, npy_type, max_size)
        else:
            tdim = self._info['colinfo'][colnum]['tdim']
            shape = _tdim2shape(
                tdim, name,
                is_string=(npy_type[0] == 'S' or npy_type[0] == 'U'))
            if shape is not None:
                descr = (name, npy_type, shape)
            else:
                descr = (name, npy_type)
        return descr, isvar
696305
def get_position(self, row, col):
        """"""
        result = col
        self.log.debug('%s %s', row, col)
        lines = self.editor.getlines()[:row - 1]
        result += sum([len(l) + 1 for l in lines])
        self.log.debug(result)
        return result
273246
def get_column_at_index(self, index):
        
        if index is None:
            return None

        url = self.build_url(self._endpoints.get('get_column_index'))
        response = self.session.post(url, data={'index': index})

        if not response:
            return None

        return self.column_constructor(parent=self, **{self._cloud_data_key: response.json()})
82264
int getRowByY(int y) {
        checkForInit();
        int sum = 0;
        // header offset
        int tempY = y - mHeaderColumnHeight;
        if (tempY <= sum) {
            return 0;
        }
        for (int count = mRowHeights.length, i = 0; i < count; i++) {
            int nextSum = sum + mRowHeights[i];

            if (tempY > sum && tempY < nextSum) {
                return i;
            } else if (tempY < nextSum) {
                return i - 1;
            }
            sum = nextSum;
        }
        return mRowHeights.length - 1;
    }
22375
private ColumnHeader<ColumnName> findBestColumn() {
    int lowSize = Integer.MAX_VALUE;
    ColumnHeader<ColumnName> result = null;
    ColumnHeader<ColumnName> current = (ColumnHeader<ColumnName>) head.right;
    while (current != head) {
      if (current.size < lowSize) {
        lowSize = current.size;
        result = current;
      }
      current = (ColumnHeader<ColumnName>) current.right;
    }
    return result;
  }
1031753
def getitem_column_array(self, key):
        
        # Convert to list for type checking
        numeric_indices = list(self.columns.get_indexer_for(key))

        # Internal indices is left blank and the internal
        # `apply_func_to_select_indices` will do the conversion and pass it in.
        def getitem(df, internal_indices=[]):
            return df.iloc[:, internal_indices]

        result = self.data.apply_func_to_select_indices(
            0, getitem, numeric_indices, keep_remaining=False
        )
        # We can't just set the columns to key here because there may be
        # multiple instances of a key.
        new_columns = self.columns[numeric_indices]
        new_dtypes = self.dtypes[numeric_indices]
        return self.__constructor__(result, self.index, new_columns, new_dtypes)
43572
def pileup(self, locus):
        '''
        
        '''
        locus = to_locus(locus)
        if len(locus.positions) != 1:
            raise ValueError("Not a single-base locus: %s" % locus)
        return self.pileups[locus]
640547
function(column){
			var index = -1;
			var j = 0;
			for(var i=0;i < this.gridCompColumnArr.length;i++){
				if(this.gridCompColumnArr[i] == column){
					if(!($('#' + this.options.id + '_header').find('th').eq(i).css('display') == 'none')){
						index = j;
					}
					break;
				}
				if(!($('#' + this.options.id + '_header').find('th').eq(i).css('display') == 'none')){
					j++;
				}
			}
			return index;
		}
319565
def mapToAbsPosition(self, line, column):
        
        block = self.document().findBlockByNumber(line)
        if not block.isValid():
            raise IndexError("Invalid line index %d" % line)
        if column >= block.length():
            raise IndexError("Invalid column index %d" % column)
        return block.position() + column
256933
def get_columns (fp):
    """"""
    if not is_tty(fp):
        return 80
    if os.name == 'nt':
        return colorama.get_console_size().X
    if has_curses:
        import curses
        try:
            curses.setupterm(os.environ.get("TERM"), fp.fileno())
            return curses.tigetnum("cols")
        except curses.error:
           pass
    return 80
1350146
def stack_fetch(pos=-1)

      type, tname = stack_type_at(pos)

      case type

      when TNIL then nil

      when TSTRING then
        len = FFI::MemoryPointer.new(:size_t)
        ptr = Lib.lua_tolstring(@pointer, pos, len)
        ptr.read_string(len.read_long)

      when TBOOLEAN then (Lib.lua_toboolean(@pointer, pos) == 1)
      when TNUMBER then Lib.lua_tonumber(@pointer, pos)

      when TTABLE then Table.new(@pointer)
        # warning : this pops up the item from the stack !

      when TFUNCTION then Function.new(@pointer)
      when TTHREAD then Coroutine.new(@pointer)

      else tname
      end
    end