syck_parser_load_documents
764252
@JRubyMethod(frame=true)
    public static IRubyObject load_documents(IRubyObject self, IRubyObject port, Block proc) {
        Ruby runtime = self.getRuntime();
        ThreadContext ctx = runtime.getCurrentContext();

        IRubyObject input = ((RubyHash)self.callMethod(ctx, "options")).op_aref(ctx, runtime.newSymbol("input"));
        IRubyObject model = ((RubyHash)self.callMethod(ctx, "options")).op_aref(ctx, runtime.newSymbol("Model"));

        Parser parser = (Parser)self.dataGetStructChecked();
        setModel(self, input, model);

        Extra bonus = (Extra)parser.bonus;
        bonus.taint = assignIO(runtime, parser, new IRubyObject[]{port});
        parser.setRootOnError(runtime.getNil());
        bonus.resolver = self.callMethod(ctx, "resolver");
        bonus.proc = null;

        while(true) {
            bonus.data = RubyHash.newHash(runtime);
            IRubyObject v = (IRubyObject)parser.parse();
            if(parser.eof) {
                return runtime.getNil();
            }

            if(v == null) {
                v = runtime.getFalse();
            }
            
            proc.yield(ctx, v);
        }
    }
330044
def load(self, ymlfile=None):
        """"""
        if ymlfile is not None:
            self.ymlfile = ymlfile

        try:
            # If yaml should be 'cleaned' of document references
            if self._clean:
                self.data = self.process(self.ymlfile)
            else:
                with open(self.ymlfile, 'rb') as stream:
                    for data in yaml.load_all(stream):
                        self.data.append(data)

            self.loaded = True
        except ScannerError, e:
            msg = "YAML formattting error - '" + self.ymlfile + ": '" + str(e) + "'"
            raise util.YAMLError(msg)
34077
def _lazy_load(self):
        
        obj = self._connection.documents.get(id=self.id)
        self.__dict__['contributor'] = obj.contributor
        self.__dict__['contributor_organization'] = \
            obj.contributor_organization
        self.__dict__['data'] = obj.data
        self.__dict__['annotations'] = obj.__dict__['annotations']
        self.__dict__['sections'] = obj.__dict__['sections']
487417
async def _load(self):
        

        flags = self._kwargs.get('flags')

        if not flags:
            flags = {1: {}}

        cols = {k: [] for k in flags.keys()}

        with open(self._file_path, newline='', encoding='utf-8') as f:
            reader = csv.reader(f)

            for row in reader:
                for i, col in cols.items():
                    try:
                        val = row[i].strip()
                        assert val
                    except (IndexError, AssertionError):
                        pass
                    else:
                        col.append((row[0], val))

        for i, col in cols.items():
            self._update({self._locale: col}, flags[i])
1288326
def parse_files(files, options = {}, &block) # :yields: request
      files.each { |file| parse_file(file, options, &block) }
    end
1066211
def load_many(self, fobjs=None):
        """"""
        if fobjs is not None:
            # tolerance
            if not hasattr(fobjs, "__iter__"):
                fobjs = [fobjs]

            for index, (fobj, page) in enumerate(zip(fobjs, self.pages)):
                if fobj is None:
                    continue
                elif isinstance(fobj, ft.DataFile):
                    self.load(fobj, index)
                elif isinstance(fobj, str):
                    self.load_filename(fobj, index)
                else:
                    raise TypeError("Invalid object of class '{}'".format(fobj.__class__.__name__))
941009
def parse(self):
        """"""
        start = time.time()

        if self.cache:
            self.load_cache()

        if not self.cache_loaded:
            super(ObjParser, self).parse()

        logger.info("%s: Load time: %s", self.file_name, time.time() - start)
195610
def load(filename, **kwargs):
    
    with open(filename, 'rb') as f:
        reader = T7Reader(f, **kwargs)
        return reader.read_obj()
1052727
public<IN,S> void load(IN in, Parse<IN, S> parser) throws IOException, ParseException {
		extract(in,(Writer)null, parser);
	}
129607
function loadContent(file, parser)
{
  var content, config;

  try
  {
    content = stripBOM(fs.readFileSync(file, {encoding: 'utf8'}));
    // provide file path as the second argument for complex parsing,
    // also it matches `module._compile` nodejs API.
    // Note: JSON.parse accepts two arguments, but ignores anything
    // but function on the second place, so it's safe to pass a filename
    // Other parsers might need to have wrappers.
    config = parser(content, file);
  }
  catch (e)
  {
    throw new Error('Config file ' + file + ' cannot be read or malformed: ' + e.message);
  }

  return config;
}
836468
def load_corpus(path):
    

    # Check if the data exists, otherwise download or raise
    if not os.path.exists(path):
        raise ValueError((
            "'{}' dataset has not been downloaded, "
            "use the yellowbrick.download module to fetch datasets"
        ).format(path))

    # Read the directories in the directory as the categories.
    categories = [
        cat for cat in os.listdir(path)
        if os.path.isdir(os.path.join(path, cat))
    ]

    files  = [] # holds the file names relative to the root
    data   = [] # holds the text read from the file
    target = [] # holds the string of the category

    # Load the data from the files in the corpus
    for cat in categories:
        for name in os.listdir(os.path.join(path, cat)):
            files.append(os.path.join(path, cat, name))
            target.append(cat)

            with open(os.path.join(path, cat, name), 'r') as f:
                data.append(f.read())


    # Return the data bunch for use similar to the newsgroups example
    return Bunch(
        categories=categories,
        files=files,
        data=data,
        target=target,
    )
611975
def load(self, file_parser, section_name):
        
        self._load(file_parser, section_name)
        self.post_load()
635380
def parse_document(lexer: Lexer) -> DocumentNode:
    """"""
    start = lexer.token
    return DocumentNode(
        definitions=many_nodes(lexer, TokenKind.SOF, parse_definition, TokenKind.EOF),
        loc=loc(lexer, start),
    )
658280
def load (self, filename):
        
        if self.filename is None:
            self.filename = filename

        stream = open(self.filename, "rb")
        for doc in yaml.load_all(stream):
            for table in doc:
                self.add(table)
        stream.close()
1282796
def load
      parsed = JSON.parse(File.read(SPECPATH))
      structs = StructureContainer.new(parsed['PropertyTypes'])

      parsed['ResourceTypes'].each do |key, spec|
        match = key.match(/\A(\w+)::(\w+)::(\w+)\z/)

        register(match[1], match[2], match[3], spec, structs.search(key))
      end
    end
399956
async def load(self,
                   file_path,
                   locale=None,
                   key: int = 0,
                   pos: int = 1,
                   neg: Optional[ColRanges] = None):
        

        if neg is None:
            neg: ColRanges = [(2, None)]

        await self.start(file_path, locale, kwargs={
            'key': key,
            'pos': pos,
            'neg': neg,
        })
578517
def parse(self, limit=None, or_limit=1):
        
        dir_path = Path(self.rawdir)
        aeolus_file = dir_path / self.files['aeolus']['file']
        aeolus_fh = aeolus_file.open('r')
        count = 0
        for line in aeolus_fh.readlines():
            if limit is not None and count >= limit:
                break
            line = line.rstrip("\n,")
            if line != '[' and line != ']':
                self._parse_aeolus_data(document=json.loads(line),
                                        or_limit=or_limit)
                count += 1
            if count % 500 == 0:
                LOG.info("Processed %i documents", count)

        aeolus_fh.close()
        return