helper function to get dataloader
965436
def get_training_data(batch_size):
    
    return gluon.data.DataLoader(
        CIFAR10(train=True, transform=transformer),
        batch_size=batch_size, shuffle=True, last_batch='discard')
504012
function getAttr(fs, pathOrFd, attr, isFd, callback) {
  var getFn = 'fgetxattr';

  if(isFd !== true) {
    callback = isFd;
    getFn = 'getxattr';
  }

  fs[getFn](pathOrFd, attr, function(err, value) {
    if(err && err.code !== 'ENOATTR') {
      return callback(err);
    }

    callback(null, value);
  });
}
563124
def get_data_store(args):
    """"""
    return tacl.DataStore(args.db, args.memory, args.ram)
437867
def loader(self):
        """"""
        loader = super().loader
        if self._lazy and (sys.version_info.major, sys.version_info.minor) != (3, 4):
            loader = LazyLoader.factory(loader)
        # Strip the leading underscore from slots
        return partial(
            loader, **{object.lstrip("_"): getattr(self, object) for object in self.__slots__}
        )
26150
def attrload(value: Any, type_: Type[T], **kwargs) -> T:
    
    from . import dataloader
    from .plugins import attrload as loadplugin
    loader = dataloader.Loader(**kwargs)
    loadplugin.add2loader(loader)
    return loader.load(value, type_)
1352911
def get_load(jid):
    '''
    
    '''
    serv = _get_serv(ret=None)
    data = serv.get('load:{0}'.format(jid))
    if data:
        return salt.utils.json.loads(data)
    return {}
1216185
function getRawRequest(context, excludedPreLoaders) {
    excludedPreLoaders = excludedPreLoaders || /eslint-loader/;
    return loaderUtils.getRemainingRequest({
        resource: context.resource,
        loaderIndex: context.loaderIndex,
        loaders: context.loaders.filter(loader => !excludedPreLoaders.test(loader.path))
    });
}
667165
function batchLoaderFunc(graphqlType, serializeRecordKey, getRecords) {
  return keys => getRecords(keys)
    .then(resultArray => getResultsByKey(
      keys, extractAllItems(resultArray), serializeRecordKey, graphqlType,
      { onError: logger }
      )
    );
}
865361
private static function getLoader()
    {
        if (self::isNull(self::$loader)) {
            self::$loader = Loader::getImageLoader(Image::getConfig());
        }

        return self::$loader;
    }
351769
function getDataRegistry(identifier) {
  assert(!identifier || (typeof identifier === 'string'), `Invalid identifier specified: ${identifier}`);

  if (!window.__private__) window.__private__ = {};
  if (window.__private__.dataRegistry === undefined) window.__private__.dataRegistry = {};

  if (identifier)
    return namespace(identifier, window.__private__.dataRegistry);
  else if (identifier === null)
    return null
  else
    return window.__private__.dataRegistry;
}
795391
function Loader(source) {
    const query = this.query ? JSON.parse(this.query.replace(/^\?/, '')) : {
        exportFormat: 'exports.locals = ',  // use CSS module export format by default
    };
    this.cacheable();
    return source + "\n" + query.exportFormat + JSON.stringify(getFileJSON(this.resourcePath)) + ';';
}
993696
function Loader () {
  var FINAL_STATES = {'loaded': true, 'complete': true, 4: true}
  var head = document.getElementsByTagName('head')[0]
  var pending = {}
  var counter = 0
  return {
    /**
     * @private
     * @callback dataCallback
     * @memberof Loader.prototype
     * @param {object|string} data JSON object, or string returned by request as `responseText`.
     */
    /**
     * Loads and returns a JSON resource asynchronously, using XMLHttpRequest (AJAX).
     * @memberof Loader.prototype
     * @param {string} src HTTP(S) URL of the JSON resource to load.
     * @param {dataCallback} cb Callback function with request's data as first parameter.
     */
    loadJSON: function (src, cb) {
      // if (pending[src]) return cb && cb();
      // pending[src] = true;
      // cross-domain ajax call
      var xdr = new window.XMLHttpRequest()
      xdr.onload = function () {
        var data = xdr.responseText
        try {
          data = JSON.parse(data)
        } catch (e) {};
        cb(data)
        // delete pending[src];
      }
      xdr.open('GET', src, true)
      xdr.send()
    },
    /**
     * @private
     * @callback errorCallback
     * @memberof Loader.prototype
     * @param {Error} error Error caught thru the `error` event or `appendChild()` call, if any.
     */
    /**
     * Loads a JavaScript resource into the page.
     * @memberof Loader.prototype
     * @param {string} src HTTP(S) URL of the JavaScript resource to load into the page.
     * @param {errorCallback} cb Callback function with error as first parameter, if any.
     */
    includeJS: function (src, cb) {
      var inc, nt
      if (pending[src]) {
        if (cb) {
          nt = setInterval(function () {
            if (pending[src]) { return console.log('still loading', src, '...') }
            clearInterval(nt)
            cb()
          }, 50)
        }
        return
      }
      pending[src] = true
      inc = document.createElement('script')
      // inc.async = "async";
      inc.onload = function () {
        if (!pending[src]) { return }
        delete pending[src]
        cb && setTimeout(cb, 1)
        delete inc.onload
      }
      inc.onerror = function (e) {
        e.preventDefault()
        inc.onload(e)
      }
      inc.onreadystatechange = function () {
        if (!inc.readyState || FINAL_STATES[inc.readyState]) { inc.onload() }
      }
      try {
        inc.src = src
        head.appendChild(inc)
      } catch (e) {
        console.error('Error while including', src, e)
        cb(e)
      }
    },
    /**
     * Loads and returns a JSON resource asynchronously, by including it into the page (not AJAX).
     * @memberof Loader.prototype
     * @param {string} src HTTP(S) URL of the JSON resource to load.
     * @param {function} cb Callback function, called by the resource's script.
     */
    loadJSONP: function (src, cb) {
      var callbackFct = '__loadjsonp__' + (counter++)
      window[callbackFct] = function () {
        cb.apply(window, arguments)
        delete window[callbackFct]
      }
      this.includeJS(src + (src.indexOf('?') == -1 ? '?' : '&') + 'callback=' + callbackFct, function () {
        // if http request fails (e.g. 404 error / no content)
        setTimeout(window[callbackFct], 10)
      })
    }
  }
}
850505
function load (source, options, callback = noop) {
      if (typeof options === 'function') callback = options, options = {}
      options = assign({type: null, encoding: 'base64'}, options)

      // Callback handler
      var contents = window.webContents
      eventcb(contents, 'did-finish-load', 'did-fail-load', callback)

      // Load source as data:
      if (options.type) {
        const data = Buffer.from(source).toString(options.encoding)
        return window.loadURL(`data:${options.type};${options.encoding},${data}`, options)
      }

      // Load source as URL:
      const protocol = url.parse(source).protocol
      if (!protocol) source = 'file://' + source
      return window.loadURL(source, options)
    }
1074922
def getLoader(user, repo, sha=None, prov=None):
    """"""
    if user is None and repo is None:
        loader = LocalLoader()
    else:
        loader = GithubLoader(user, repo, sha, prov)
    return loader
449060
def datagetter(cls):
        
        with open('myfile', 'rt') as f:
            rows = [r for r in csv.reader(f)]
        dothing = lambda _: [i for i, v in enumerate(_)]
        rows = [dothing(_) for _ in rows]
        raise NotImplementedError('You need to implement this yourlself!')
        return rows
1012782
def get_materialized_data_cache(doc=None):
    """"""

    from metapack.constants import MATERIALIZED_DATA_PREFIX
    from os.path import join

    if not doc:
        from metapack import Downloader
        downloader = Downloader()
        return downloader.cache.getsyspath(MATERIALIZED_DATA_PREFIX)
    else:
        dr = doc._cache.getsyspath(join(MATERIALIZED_DATA_PREFIX, doc.name))

        ensure_dir(dr)

        return dr
447786
def _databunch_load_empty(cls, path, fname:str='export.pkl'):
    ""
    sd = LabelLists.load_empty(path, fn=fname)
    return sd.databunch()