Load .firebaserc file
515803
function loadFirebaseRc() {
  const rcFilePath = `${process.cwd()}/.firebaserc`;
  if (!fs.existsSync(rcFilePath)) {
    throw new Error('.firebaserc file not found');
  }
  try {
    const fileStr = fs.readFileSync(rcFilePath);
    return JSON.parse(fileStr);
  } catch (err) {
    console.log('Error loading .firebaserc: ', err); // eslint-disable-line no-console
    throw err;
  }
}
195610
def load(filename, **kwargs):
    
    with open(filename, 'rb') as f:
        reader = T7Reader(f, **kwargs)
        return reader.read_obj()
520454
async function log(err) {
    try {
        err = JSON.parse(JSON.stringify(err, Reflect.ownKeys(err)));
    } catch (error) {
        err = err;
    }

    try {
        const requestData = {
            version: pjson.version,
            err,
            timestamp: {
                '.sv': 'timestamp',
            },
        };

        const result = await request({
            url: `${constants.FIREBASE_DATABASE_URL}/logs/errors.json`,
            method: 'POST',
            json: true,
            headers: {
                'content-type': 'application/json',
            },
            body: requestData,
        });
        console.log(`Error logged: ${result.name}`);
    } catch (error) {}
    return;
}
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
484616
def load_from_json(file_path):
    """"""
    if os.path.exists(file_path):
        raw_data = open(file_path, 'rb').read()
        return json.loads(base64.decodestring(raw_data).decode('utf-8'))
392138
def load_stream(filename):
    """"""
    rawfile = pkg_resources.resource_stream(__name__, filename)
    if six.PY2:
        return rawfile
    return io.TextIOWrapper(rawfile, 'utf-8')
428170
def loadFromFile(self, filename):
        
        if self.__base_url:
            filename = basejoin(self.__base_url,filename)
        file = open(filename, 'rb')
        try:
            schema = self.loadFromStream(file, filename)
        finally:
            file.close()

        return schema
1077370
function(cb) {
      if (!has(fileReloaders, localHmr.updateMode)) {
        cb(new Error("updateMode "+localHmr.updateMode+" not implemented"));
        return;
      }
      var reloader = fileReloaders[localHmr.updateMode];
      reloader(function(err, data) {
        if (err || !data || lastScriptData === data) {
          cb(err, false);
          return;
        }
        lastScriptData = data;
        localHmr.newLoad = null;
        try {
          if (bundle__filename || bundle__dirname) {
            new Function('require', '__filename', '__dirname', data)(require, bundle__filename, bundle__dirname);
          } else {
            new Function('require', data)(require);
          }
          // running the file sets _hmr.newLoad
        } catch (err2) {
          localHmr.newLoad = null;
          cb(err2);
          return;
        }
        if (!localHmr.newLoad) {
          cb(new Error("Reloaded script did not set hot module reload data"));
          return;
        }
        cb(null, true);
      });
    }
998575
def load(self):
        """"""

        with open(self.store_file_path, 'r') as fh:
            self.store = json.loads(fh.read())
655380
def _load(self):
        """"""
        self.wavelength, self.irradiance = \
            np.genfromtxt(self.filename, unpack=True)
173664
def load_json(filename):
    """"""
    try:
        if PY2:
            args = 'rb'
        else:
            args = 'r'
        with open(filename, args) as fid:
            data = json.load(fid)
        return data, None
    except Exception as err:
        return None, str(err)
638952
def load(self, _from):
        """"""

        def load_rec(inode, config):
            """Recursive part of loading."""
            for k in config:
                if isinstance(config[k], dict) and \
                   k not in ['value', 'default']:
                    if k in inode:
                        load_rec(inode[k], config[k])
                    else:
                        LOG.debug("+ config element: '%s'", k)
                else:
                    inode[k] = config[k]

        with open(_from, 'r') as infile:
            obj = yaml.load(infile, Loader=ConfigLoader)
            upgrade(obj)
            load_rec(self.node, obj)
            self['config_file'] = os.path.abspath(_from)
219015
function loadFile(entry, opts, formatter, cb, errCb) {
      var type = entry.assetType || entry.bundle;
      formatter = formatter || ss.client.formatters[entry.ext || type];
      if (!formatter) {
        throw new Error('Unsupported file extension \'.' + entry.ext + '\' when we were expecting some type of ' +
          ((type||'unknown').toUpperCase()) + ' file. Please provide a formatter for ' + (entry.file) + ' or move it to /client/static');
      }
      if (formatter.assetType !== type) {
        throw new Error('Unable to render \'' + entry.file + '\' as this appears to be a ' + (type.toUpperCase()) +
          ' file. Expecting some type of ' + (type.toUpperCase()) + ' file in ' + (path.dirname(entry.file)) + ' instead');
      }

      // Use the formatter to pre-process the asset before bundling
      try {
        return formatter.call(this.clientFilePath(entry.file), opts, cb, errCb);
      } catch (err) {
        return errCb(err);
      }
    }
698633
function load (opts, cb) {
    var file;
    if (typeof opts === 'string') {
        file = opts;
        opts = {};
    } else {
        file = opts.file;
    }

    // try cache
    if (!opts.force && load.cache[file]) {
        process.nextTick(function () {
            cb(null, load.cache[file]);
        });
        return;
    }

    FS.readFile(file, 'utf-8', function (err, data) {
        load.cache[file] = data;
        cb(err, data);
    });
}
1326478
def _load(self, filename=None):
        """"""
        if not filename:
            filename = self.aatsr_path

        wb_ = open_workbook(filename)

        for sheet in wb_.sheets():
            ch_name = sheet.name.strip()
            if ch_name == 'aatsr_' + self.bandname:

                data = np.array([s.split() for s in
                                 sheet.col_values(0,
                                                  start_rowx=3, end_rowx=258)])
                data = data.astype('f')
                wvl = data[:, 0]
                resp = data[:, 1]

                self.rsr = {'wavelength': wvl, 'response': resp}
479552
def load(self, ladderName):
        """"""
        self.name = ladderName # preset value to load self.filename
        with open(self.filename, "rb") as f:
            data = f.read()
            self.__dict__.update( json.loads(data) )
184997
def load_child_node(self, key):
        """"""
        index = self.get_child_index(key)
        if key is None:
            return EmptyNode(None)
        else:
            path = os.path.join(self.get_value(), key)
            if index < self.dir_count:
                return DirectoryNode(path, self.display, parent=self)
            else:
                path = os.path.join(self.get_value(), key)
                return FileNode(path, self.display, parent=self)