get a cross sectional for a given location in the
        items ; handle dups

        return the result, is *could* be a view in the case of a
        single block
328283
def fast_xs(self, loc):
        
        if len(self.blocks) == 1:
            return self.blocks[0].iget((slice(None), loc))

        items = self.items

        # non-unique (GH4726)
        if not items.is_unique:
            result = self._interleave()
            if self.ndim == 2:
                result = result.T
            return result[loc]

        # unique
        dtype = _interleaved_dtype(self.blocks)

        n = len(items)
        if is_extension_array_dtype(dtype):
            # we'll eventually construct an ExtensionArray.
            result = np.empty(n, dtype=object)
        else:
            result = np.empty(n, dtype=dtype)

        for blk in self.blocks:
            # Such assignment may incorrectly coerce NaT to None
            # result[blk.mgr_locs] = blk._slice((slice(None), loc))
            for i, rl in enumerate(blk.mgr_locs):
                result[rl] = blk._try_coerce_result(blk.iget((i, loc)))

        if is_extension_array_dtype(dtype):
            result = dtype.construct_array_type()._from_sequence(
                result, dtype=dtype
            )

        return result
572779
function getPreviousItem(opts: Options, value: Value, block?: Block): ?Block {
    const { document, startBlock } = value;
    block = block || startBlock;

    const currentItem = getCurrentItem(opts, value, block);
    if (!currentItem) {
        return null;
    }

    const previousSibling = document.getPreviousSibling(currentItem.key);

    if (!previousSibling) {
        return null;
    } else if (previousSibling.type === opts.typeItem) {
        return previousSibling;
    }
    return null;
}
935131
def get_offset_from_rva(self, rva):
        
        
        s = self.get_section_by_rva(rva)
        if not s:

            # If not found within a section assume it might
            # point to overlay data or otherwise data present
            # but not contained in any section. In those
            # cases the RVA should equal the offset
            if rva<len(self.__data__):
                return rva
                
            raise PEFormatError, 'data at RVA can\'t be fetched. Corrupt header?'
        
        return s.get_offset_from_rva(rva)
1096265
def locateChild(self, ctx, segments):
        
        store = _storeFromUsername(
            self.loginSystem.store, segments[0].decode('utf-8'))
        if store is None:
            return rend.NotFound
        return (SharingIndex(store, self.webViewer), segments[1:])
186638
function (item, raw, content) {
            var self = this;
            var base = '../',
                baseItem,
                newWin = false,
                className = 'crosslink';

            item = fixType(item);

            item = baseItem = Y.Lang.trim(item.replace('{', '').replace('}', ''));
            //Remove Cruft
            item = item.replace('*', '').replace('[', '').replace(']', '');
            var link = false,
                href;

            if (self.data.classes[item]) {
                link = true;
            } else {
                if (self.data.classes[item.replace('.', '')]) {
                    link = true;
                    item = item.replace('.', '');
                }
            }
            if (self.options.externalData) {
                if (self.data.classes[item]) {
                    if (self.data.classes[item].external) {
                        href = self.data.classes[item].path;
                        base = self.options.externalData.base;
                        className += ' external';
                        newWin = true;
                        link = true;
                    }
                }
            }

            if (item.indexOf('/') > -1) {
                //We have a class + method to parse
                var parts = item.split('/'),
                    cls = parts[0],
                    method = parts[1],
                    type = 'method';

                if (method.indexOf(':') > -1) {
                    parts = method.split(':');
                    method = parts[0];
                    type = parts[1];
                    if (type.indexOf('attr') === 0) {
                        type = 'attribute';
                    }
                }

                if (cls && method) {
                    if (self.data.classes[cls]) {
                        self.data.classitems.forEach(function (i) {
                            if (i.itemtype === type && i.name === method && i.class === cls) {
                                link = true;
                                baseItem = method;
                                var t = type;
                                if (t === 'attribute') {
                                    t = 'attr';
                                }
                                href = Y.webpath(base, 'classes', cls + '.html#' + t + '_' + method);
                            }
                        });
                    }
                }

            }

            if (item === 'Object' || item === 'Array') {
                link = false;
            }
            if (!href) {
                href = Y.webpath(base, 'classes', item + '.html');
                if (base.match(/^https?:\/\//)) {
                    href = base + Y.webpath('classes', item + '.html');
                }
            }
            if (!link && self.options.linkNatives) {
                if (self.NATIVES && self.NATIVES[item]) {
                    href = self.NATIVES_LINKER(item);
                    if (href) {
                        className += ' external';
                        newWin = true;
                        link = true;
                    }
                }
            }
            if (link) {
                if (content !== undefined) {
                    content = content.trim();
                }
                if (!content) {
                    content = baseItem;
                }
                item = '<a href="' + href + '" class="' + className + '"' + ((newWin) ? ' target="_blank"' : '') + '>' + content + '</a>';
            }
            return (raw) ? href : item;
        }
955336
function getLocatedNode(parent, data, pos) {
        if (data.startRepeat) {
            var ret = data.startRepeat,
                    end = data.endRepeat
            pos += 1
            for (var i = 0; i < pos; i++) {
                ret = ret.nextSibling
                if (ret == end)
                    return end
            }
            return ret
        } else {
            return parent.childNodes[data.group * pos] || null
        }
    }
321585
function stripDuplicates(results) {
  var i;
  var placeshash = {};
  var stripped = [];
  for (i = 0; i < results.length; i++) {
    var lat = Number(results[i].location.split(",")[0]).toFixed(1);
    var lng = Number(results[i].location.split(",")[1]).toFixed(1);

    var hash = results[i].name + "_" + lat + " " + lng;
    if (!defined(placeshash[hash])) {
      placeshash[hash] = results[i];
      stripped.push(results[i]);
    }
  }
  return stripped;
}
594916
def get_content(self, offset, size):
        """"""
        return _bfd.section_get_content(self.bfd, self._ptr, offset, size)
884243
function(model, callback) {
			var self = this;
			model.getRoot(function(root) {
				// Find the existing ID reversely
				var location = self.location;
				while (location.length > 0) {
					// Create a fake item
					// NOTE: it's a hack because we don't have any efficient
					//       way to get the actual file node. Instead, we have
					//       to do it recursively starting from the root. If
					//       you find anything wierd happens, change it to the
					//       actual item object.
					var item = {
						Location: location
					};
					var id = model.getId(item);
					// Test if this element exists
					var exists = !!document.getElementById(id);
					if (exists) {
						callback(id);
						return;
					}
					// Not found. This probably means this item is collapsed.
					// Try to find one level upper.
					// Here I assume every url starts from "/"
					location = location.substr(0, location.lastIndexOf('/'));
				}
				// Nothing found
				callback('');
			});
		}
970383
def getdir(self, section, option, raw=False, vars=None, fallback="", validate=False):
        
        v = self.get(section, option, raw=raw, vars=vars, fallback=fallback)
        v = self._convert_to_path(v)
        return v if not validate or os.path.isdir(v) else fallback
797262
def block_transfer(self, buffer, x, y):
        
        # Just copy the double-buffer cells - the real screen will sync on refresh.
        block_min_x = max(0, x)
        block_max_x = min(x + buffer.width, self._width)

        # Check for trivial non-overlap
        if block_min_x > block_max_x:
            return

        # Copy the available section
        for by in range(0, self._height):
            if y <= by < y + buffer.height:
                self._double_buffer[by][block_min_x:block_max_x] = buffer.slice(
                    block_min_x - x, by - y, block_max_x - block_min_x)
480899
def get_single_item(d):
    """"""
    assert len(d) == 1, 'Single-item dict must have just one item, not %d.' % len(d)
    return next(six.iteritems(d))
562018
def get(self, title):
        
        key = '/library/sections/%s/all' % self.key
        return self.fetchItem(key, title__iexact=title)
547573
def get_multifile_object_child_location(self, parent_item_prefix: str, child_name: str) -> str:
        
        check_var(parent_item_prefix, var_types=str, var_name='parent_item_prefix')
        check_var(child_name, var_types=str, var_name='item_name')

        # assert that folder_path is a folder
        if not isdir(parent_item_prefix):
            raise ValueError(
                'Cannot get attribute item in non-flat mode, parent item path is not a folder : ' + parent_item_prefix)
        return join(parent_item_prefix, child_name)
141246
def get_dupe_prob(self, url):
        
        path, query = _parse_url(url)
        dupestats = []
        extend_ds = lambda x: dupestats.extend(filter(None, (
            ds_dict.get(key) for ds_dict, key in x)))
        if self.urls_by_path.get(path):
            extend_ds([(self.path_dupstats, path)])
        # If param is in the query
        for param, value in query.items():
            qwp_key = _q_key(_without_key(query, param))
            # Have we seen the query with param changed or removed?
            has_changed = self.urls_by_path_qwp.get((path, param, qwp_key))
            has_removed = self.urls_by_path_q.get((path, qwp_key))
            if has_changed or has_removed:
                extend_ds(self._param_dupstats(path, param, qwp_key))
            if has_removed:
                extend_ds(self._param_value_dupstats(path, param, value))
        # If param is not in the query, but we've crawled a page when it is
        q_key = _q_key(query)
        for param in (self.params_by_path.get(path, set()) - set(query)):
            if self.urls_by_path_qwp.get((path, param, q_key)):
                extend_ds(self._param_dupstats(path, param, q_key))
                # FIXME - this could be a long list of param values,
                # it's better to somehow store only high-probability values?
                for value in self.param_values.get((path, param), set()):
                    extend_ds(self._param_value_dupstats(path, param, value))
        return max(ds.get_prob() for ds in dupestats) if dupestats else 0.
1091429
def founditem_view(request, item_id):
    
    founditem = get_object_or_404(FoundItem, id=item_id)
    return render(request, "itemreg/item_view.html", {"item": founditem, "type": "found"})
458540
def itemByPath( self, path, includeRoot = False ):
        
        sep     = self.separator()
        path    = nativestring(path).strip(sep)
        if ( not path ):
            if ( includeRoot ):
                return self.invisibleRootItem()
            else:
                return None
            
        splt    = path.split(sep)
        item    = self.invisibleRootItem()
        for part in splt:
            next_item = None
            for row in range(item.rowCount()):
                child = item.child(row)
                if ( child.text() == part ):
                    next_item = child
                    break
            
            if ( not next_item ):
                item = None
                break
                
            item = next_item
            item.initialize()
        
        return item