Return the classic iris data in a nice package.
335155
def iris(display=False):
    

    d = sklearn.datasets.load_iris()
    df = pd.DataFrame(data=d.data, columns=d.feature_names) # pylint: disable=E1101
    if display:
        return df, [d.target_names[v] for v in d.target] # pylint: disable=E1101
    else:
        return df, d.target
391254
def convert_old(data):
    ""
    ret = default_config()
    ret['sync'].update(data.get('peeringdb', {}))
    ret['orm']['database'].update(data.get('database', {}))
    return ret
351952
def _name(iris_obj, default='unknown'):
    
    return (iris_obj.var_name or iris_obj.standard_name or
            iris_obj.long_name or default)
326819
def data(self, index, role=Qt.DisplayRole):
        """"""
        if not index.isValid():
            return to_qvariant()
        if role == Qt.DisplayRole:
            if index.column() == 0:
                value = osp.basename(self.get_value(index))
                return to_qvariant(value)
            else:
                value = self.get_value(index)
                return to_qvariant(value)
        elif role == Qt.TextAlignmentRole:
            return to_qvariant(int(Qt.AlignLeft|Qt.AlignVCenter))
        elif role == Qt.ToolTipRole:
            if index.column() == 0:
                value = self.get_value(index)
                return to_qvariant(value)
            else:
                return to_qvariant()
489783
def getRetinas(self, retina_name=None):
        

        resourcePath = '/retinas'
        method = 'GET'

        queryParams = {}
        headerParams = {'Accept': 'Application/json', 'Content-Type': 'application/json'}
        postData = None

        queryParams['retina_name'] = retina_name
        response = self.apiClient._callAPI(resourcePath, method, queryParams, postData, headerParams)
        return [retina.Retina(**r) for r in response.json()]
1070459
def _get_raw_data(subset):
  """"""
  raw_data = _LOADED.get(subset)
  if raw_data is not None:
    return raw_data, _LOADED["vocab"]
  else:
    train_data, valid_data, test_data, vocab = ptb_reader.ptb_raw_data(
        FLAGS.data_path)
    _LOADED.update({
        "train": np.array(train_data),
        "valid": np.array(valid_data),
        "test": np.array(test_data),
        "vocab": vocab
    })
    return _LOADED[subset], vocab
995967
def v1_fc_get(visid_to_dbid, store, cid):
    '''
    '''
    fc = store.get(visid_to_dbid(cid))
    if fc is None:
        bottle.abort(404, 'Feature collection "%s" does not exist.' % cid)
    return util.fc_to_json(fc)
823414
def prepare_static_data(self, data):
        
        d = data.copy()
        for f in self.get_fields():
            if f['static'] and f['name'] in d:
                d[f['name']] = make_view_field(f, None, self.types_convert_map, self.fields_convert_map, d[f['name']])['display']
        return d
529615
def get_internal_data(self):
        
        if self.filetype is "pickle":
            return pickle.load(open(self.location_internal, "rb"))
        elif self.filetype is "hickle":
            import hickle
            return hickle.load(open(self.location_internal, "rb"))
        else:
            raise ValueError(
                "Invalue filetype {} (must be {} or {})".format(
                    self.filetype, "pickle", "hickle"
                )
            )
228637
def find_package_data():
    

    l = list()
    for start in ('ambry/support', 'ambry/bundle/default_files'):
        for root, dirs, files in os.walk(start):

            for f in files:

                if f.endswith('.pyc'):
                    continue

                path = os.path.join(root, f).replace('ambry/', '')

                l.append(path)

    return {'ambry': l}
329566
def get_package_info(package):
    """"""
    url = 'https://pypi.python.org/pypi/{}/json'.format(package)
    r = requests.get(url)
    r.raise_for_status()
    return r.json()
209001
def historicalData(self, reqId, date, open, high, low, close, volume, barCount, WAP, hasGaps):
        """"""
        return _swigibpy.EWrapper_historicalData(self, reqId, date, open, high, low, close, volume, barCount, WAP, hasGaps)
211220
def _get_object_as_soft(self):
        """"""
        soft = []
        if self.database is not None:
            soft.append(self.database._get_object_as_soft())
        soft += ["^%s = %s" % (self.geotype, self.name),
                 self._get_metadata_as_string()]
        for subset in self.subsets.values():
            soft.append(subset._get_object_as_soft())
        soft += ["^%s = %s" % (self.geotype, self.name),
                 self._get_columns_as_string(),
                 self._get_table_as_string()]
        return "\n".join(soft)
1004011
def get_package_versions(intfs, props):
    # type: (List[str], Dict[str, Any]) -> List[Tuple[str, str]]
    
    result = []
    for intf in intfs:
        pkg_name = get_package_from_classname(intf)
        if pkg_name:
            key = ENDPOINT_PACKAGE_VERSION_ + pkg_name
            val = props.get(key, None)
            if val:
                result.append((key, val))
    return result
140633
def pretty(self):
        """"""
        lines = list()
        for index, record in enumerate(self._records):
            lines.append(("record {0}".format(index+1),))
            lines.append(("  type", repr(record.type)))
            lines.append(("  name", repr(record.name)))
            lines.append(("  data", repr(record.data)))
        lwidth = max([len(line[0]) for line in lines])
        lines = [(line[0].ljust(lwidth),) + line[1:] for line in lines]
        lines = [" = ".join(line) for line in lines]
        return ("\n").join([line for line in lines])
929684
def get(self, **user_parameters):
        """"""
        plugin, open_args = self._create_open_args(user_parameters)
        data_source = plugin(**open_args)
        data_source.catalog_object = self._catalog
        data_source.name = self.name
        data_source.description = self._description
        data_source.cat = self._catalog

        return data_source
815144
def _get_data(self) -> BaseFrameManager:
        

        def iloc(partition, row_internal_indices, col_internal_indices):
            return partition.iloc[row_internal_indices, col_internal_indices]

        masked_data = self.parent_data.apply_func_to_indices_both_axis(
            func=iloc,
            row_indices=self.index_map.values,
            col_indices=self.columns_map.values,
            lazy=False,
            keep_remaining=False,
        )
        return masked_data