Action: load a file for annotations.
492278
def load_annot(self):
        """"""
        if self.parent.info.filename is not None:
            filename = splitext(self.parent.info.filename)[0] + '_scores.xml'
        else:
            filename = None

        filename, _ = QFileDialog.getOpenFileName(self, 'Load annotation file',
                                                  filename,
                                                  'Annotation File (*.xml)')

        if filename == '':
            return

        try:
            self.update_notes(filename, False)
        except FileNotFoundError:
            msg = 'Annotation file not found'
            self.parent.statusBar().showMessage(msg)
            lg.info(msg)
1157562
def convert_to_annotation(file, output):
    """"""
    resource = parse_bel_resource(file)

    write_annotation(
        keyword=resource['Namespace']['Keyword'],
        values={k: '' for k in resource['Values']},
        citation_name=resource['Citation']['NameString'],
        description=resource['Namespace']['DescriptionString'],
        file=output
    )
230563
def load(self):
        """"""
        basepath = os.path.dirname(os.path.abspath(__file__))
        filename = os.sep.join([basepath, c.FOLDER_JSON, c.FILE_GAME_VERSIONS])
        Handler.ALL_VERS_DATA = {} # reset known data; do not retain defunct information
        with open(filename, "r") as f:
            data = json.loads( f.read() )
        self.update(data)
        self._updated = False
677396
def load(self, filepath):
        """"""
        for attributeLines in oboTermParser(filepath):
            oboTerm = _attributeLinesToDict(attributeLines)
            if oboTerm['id'] not in self.oboTerms:
                self.oboTerms[oboTerm['id']] = oboTerm            
            else:
                oldOboTerm = self.oboTerms[oboTerm['id']]
                oldTermIsObsolete = _termIsObsolete(oldOboTerm)
                newTermIsObsolete = _termIsObsolete(oboTerm)
                if oldTermIsObsolete and not newTermIsObsolete:
                    self.oboTerms[oboTerm['id']] = oboTerm
                else:
                    #At least one of two terms with identical id must be obsolete
                    assert oldTermIsObsolete or newTermIsObsolete
1060029
def load(path):
  """"""
  proto = _parse_saved_model(path)
  _merge_assets_key_collection(proto, path)
  handler = SavedModelHandler()
  handler._proto = proto  # pylint: disable=protected-access
  return handler
688924
private void load() {
        InputStream propertiesInputStream = null;
        try {
            propertiesInputStream = propertiesInputStream();
            if (propertiesInputStream == null) {
                throw new IllegalArgumentException("The properties file could not be loaded!");
            }
            properties.load(propertiesInputStream);
        } catch (IOException e) {
            LOGGER.error("Can't load properties", e);
        } finally {
            try {
                if (propertiesInputStream != null) {
                    propertiesInputStream.close();
                }
            } catch (IOException e) {
                LOGGER.error("Can't close the properties InputStream", e);
            }
        }
    }
881424
private void loadConfigurationFiles() {

        // Parse the first annotation found (manage overriding)
        final Configuration conf = ClassUtility.getLastClassAnnotation(this.getClass(), Configuration.class);

        // Conf variable cannot be null because it was defined in this class
        // It's possible to discard default behaviour by setting an empty string to the value.

        // launch the configuration search engine
        ResourceBuilders.PARAMETER_BUILDER.searchConfigurationFiles(conf.value(), conf.extension());

    }
433475
def load(file):
    
    with open(file, 'r') as f:
        contents = f.read()
    lambder.load_events(contents)
149824
def do_load(self, filename):
        """"""
        try:
            self.__session.load(filename)
        except IOError as e:
            self.logger.error(e.strerror)
357770
public void load() throws FileNotFoundException, IOException {
    BufferedReader is = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
    ArrayList<String> buf = new ArrayList<>();
    while (is.ready()) {
      String line = is.readLine();
      // skip comments
      if (line.startsWith(COMMENT_PREFIX)) {
        continue;
      }
      if (line.length() == 0 && !buf.isEmpty()) {
        String title = buf.remove(0);
        store.add(new Pair<>(title, buf));
        buf = new ArrayList<>();
      } else {
        buf.add(line);
      }
    }
    if (!buf.isEmpty()) {
      String title = buf.remove(0);
      store.add(new Pair<>(title, buf));
      buf = new ArrayList<>();
    }
    is.close();
  }
342711
protected void load() throws FileNotFoundException {
        XMLObjectReader reader = null;
        try {
            reader = XMLObjectReader.newInstance(new FileInputStream(persistFile.toString()));

            reader.setBinding(binding);
            load(reader);
        } catch (XMLStreamException ex) {
            // this.logger.info(
            // "Error while re-creating Linksets from persisted file", ex);
        }
    }
1358198
def make_annotation(self):
        """"""
        annotation = dict()

        # Put all properties of the action object into the annotation
        for item in dir(self):
            if len(item) > 0 and item[0] != '_' and \
                    not inspect.ismethod(getattr(self, item)):
                annotation[item] = getattr(self, item)

        return annotation
1080234
def loader():
    """"""
    url = request.args.get('url')  # read image URL as a request URL param
    response = requests.get(url)  # make request to static image file
    return response.content
1059252
private void loadMessagesFiles() {

        // Parse the first annotation found (manage overriding)
        final Localized local = ClassUtility.getLastClassAnnotation(this.getClass(), Localized.class);

        // Conf variable cannot be null because it was defined in this class
        // It's possible to discard default behavior by setting an empty string to the value.

        // launch the configuration search engine
        ResourceBuilders.MESSAGE_BUILDER.searchMessagesFiles(local.value());
    }
668811
public void load(File... files) throws IOException {
        setFeatureStats(DistributionStats.load(files[0], files[1]));
        if (isFitLabel()) {
            setLabelStats(DistributionStats.load(files[2], files[3]));
        }
    }
1138710
def load(self, arguments):
        ""
        features = arguments[1:-1]
        list(map(self.load_feature, features))
1196807
def load_context(context, file_path=None):
    """"""
    if not file_path:
        file_path = _get_context_filepath()
    if os.path.exists(file_path):
        with io.open(file_path, encoding='utf-8') as f:
            for line in f:
                execute(line, context)