Load network data from the API.
352696
def load(self, callback=None, errback=None, reload=False):
        
        if not reload and self.data:
            raise NetworkException('Network already loaded')

        def success(result, *args):
            self.data = result
            self.id = result['id']
            self.name = result['name']
            self.report = self._rest.report(self.id)
            if callback:
                return callback(self)
            else:
                return self

        if self.id is None:
            if self.name is None:
                raise NetworkException('Must at least specify an id or name')
            else:
                self.id = [network for network in self._rest.list()
                           if network['name'] == self.name][0]['id']

        return self._rest.retrieve(self.id, callback=success,
                                   errback=errback)
988600
def loadJson(self, data):
        """"""
        if not isinstance(data, dict):
            data = json.loads(data)
        self.__dict__.update(data)
        self.inflate() # restore objects from str values
        #if self.ports:  self._gotPorts = True
        return self
1025275
async def get_data(self, resource):
        """"""
        url = '{}{}'.format(
            self.base_url, self.endpoint.format(resource=resource))

        try:
            with async_timeout.timeout(5, loop=self._loop):
                response = await self._session.get(url)

            _LOGGER.info(
                "Response from Netdata: %s", response.status)
            data = await response.json()
            _LOGGER.debug(data)
            self.values = {k: v for k, v in zip(
                data['labels'], data['data'][0])}

        except (asyncio.TimeoutError, aiohttp.ClientError, socket.gaierror):
            _LOGGER.error("Can not load data from Netdata")
            raise exceptions.NetdataConnectionError()
574623
def load(self):
        
        s = load_stack(self)
        if s:
            self.hooks = s.hooks
            self.calls = s.calls
363515
function loadAPI() {
  var apiPath = this.fullPath(this.paths.api);
  if (fs.existsSync(apiPath) && fs.statSync(apiPath).isDirectory()) {
    var files = protos.util.ls(apiPath, this.regex.jsFile);
    files.forEach(function(file) {
      var methods = protos.require(apiPath + "/" + file, true); // Don't use module cache (allow reloading)
      _.extend(this.api, methods);
    }, this);
  }
  this.emit('api_loaded', this.api);
}
273480
def load_weights(self):
        
        if self.network_weights_loader:
            self.network_weights = self.network_weights_loader()
            self.network_weights_loader = None
944154
def load_data(fname, **kwargs):
    """"""
    fname = get_file(fname)
    if fname.suffix == ".lzma":
        return load_tar_lzma_data(fname)
    elif fname.suffix == ".zip":
        return load_zip_data(fname, **kwargs)
1217531
private void loadDataFromInternet() throws IOException {
		URL url = new URL(DATA_RETRIVE_URL);
		InputStream is = url.openStream();
		try {
			PHPFileParser fp = new PHPFileParser(is);
			createInternalDataStructre(fp.getSections());
		} finally {
			is.close();
		}
	}
654488
def process_raw_data(cls, raw_data):
        """"""
        properties = raw_data["properties"]

        routes = []
        raw_routes = properties.get("routes", [])
        for raw_route in raw_routes:
            raw_route["parentResourceID"] = raw_data["resourceId"]
            routes.append(Routes.from_raw_data(raw_route))
        properties["routes"] = routes

        subnets = []
        raw_subnets = properties.get("subnets", [])
        for raw_subnet in raw_subnets:
            subnets.append(Resource.from_raw_data(raw_subnet))
        properties["subnets"] = subnets

        return super(RouteTables, cls).process_raw_data(raw_data)
1179968
def _get_network(self):
        '''
        
        '''
        data = dict()
        data['interfaces'] = salt.utils.network.interfaces()
        data['subnets'] = salt.utils.network.subnets()

        return data
1167175
def load(app_id):
    """"""
    path_to_data = find_experiment_export(app_id)
    if path_to_data is None:
        raise IOError("Dataset {} could not be found.".format(app_id))

    return Data(path_to_data)
1239189
def loadalldatas():
    """"""
    dependency_order = ['common', 'profiles', 'blog', 'democomments']
    for app in dependency_order:
        project.recursive_load(os.path.join(paths.project_paths.manage_root, app))
793367
def load_data(self, pdbid):
        """"""
        f = urlopen("http://projects.biotec.tu-dresden.de/plip-rest/pdb/%s?format=xml" % pdbid.lower())
        self.doc = etree.parse(f)
1063847
def load(self, response):
        '''
        '''
        self._response = response

        if self.next_location(raw=True):
            self._num_redirects += 1
115410
def _load(self):
        
        graph = self.context.parent.graph.get_context(self.context.identifier)
        data = {}
        for (_, p, o) in graph.triples((self.context.identifier, None, None)):
            if not p.startswith(META):
                continue
            name = p[len(META):]
            data[name] = o.toPython()
        return data
527804
@NonNull
	@MainThread
	protected LiveData<ApiResponse<NetworkDataType>> loadFromNetwork() {
		MutableLiveData<ApiResponse<NetworkDataType>> mutableLiveData = new MutableLiveData<>();
		AppExecutors.getNetworkIOExecutor().execute(new Runnable() {
			@Override
			public void run() {
				LOGGER.info(getTag() + ": Loading resource from network");
				ApiResponse<NetworkDataType> apiResponse;
				try {
					apiResponse = doLoadFromNetwork();
				} catch (Exception e) {
					AbstractException abstractException = wrapException(e);
					logHandledException(abstractException);
					apiResponse = new ApiErrorResponse<>(abstractException);
				}
				mutableLiveData.postValue(apiResponse);
			}
		});
		return mutableLiveData;
	}
1172469
def process_raw_data(cls, raw_data):
        """"""
        properties = raw_data["properties"]

        ip_configurations = []
        raw_settings = properties.get("ipConfigurations", [])
        for raw_configuration in raw_settings:
            raw_configuration["parentResourceID"] = raw_data["resourceId"]
            ip_configuration = IPConfiguration.from_raw_data(raw_configuration)
            ip_configurations.append(ip_configuration)
        properties["ipConfigurations"] = ip_configurations

        raw_settings = properties.get("dnsSettings", {})
        dns_settings = DNSSettings.from_raw_data(raw_settings)
        properties["dnsSettings"] = dns_settings

        raw_settings = properties.get("portSettings", {})
        port_settings = PortSettings.from_raw_data(raw_settings)
        properties["portSettings"] = port_settings

        return super(NetworkInterfaces, cls).process_raw_data(raw_data)