Get a EOCubeChunk
543181
def get_chunk(self, ji):
        """"""
        return EOCubeSceneCollectionChunk(ji=ji,
                                          df_layers=self.df_layers,
                                          chunksize=self.chunksize,
                                          variables=self.variables,
                                          qa=self.qa,
                                          qa_valid=self.qa_valid,
                                          wdir=self.wdir)
826356
def encode(self, input_str):
    """"""
    inputs = self.encoders["inputs"].encode(input_str) + [EOS_ID]
    batch_inputs = np.reshape(inputs, [1, -1, 1, 1])  # Make it 3D.
    return batch_inputs
1232606
def get(name, ezo):
        '''
        
        '''

        key = DB.pkey([EZO.CONTRACT, name])
        cp, err = ezo.db.get(key)
        if err:
            return None, err

        if not cp:
            return None, None

        # create a new Contract
        c = Contract(cp["name"], ezo)
        c.abi = cp["abi"]
        c.bin = cp["bin"]
        c.hash = cp["hash"]
        c.source = cp["source"]
        c.timestamp = cp["timestamp"]
        c.te_map = cp['te-map']

        return c, None
290713
def getBranch(self, name, **context):
        """"""
        for keyLen in self._vars.getKeysLens():
            subName = name[:keyLen]
            if subName in self._vars:
                return self._vars[subName]

        raise error.NoSuchObjectError(name=name, idx=context.get('idx'))
769142
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return ESP_TransformSuite(key)
        if key not in ESP_TransformSuite._member_map_:
            extend_enum(ESP_TransformSuite, key, default)
        return ESP_TransformSuite[key]
1233115
function getOfflineContext(numOfChannels, length, sampleRate) {
    if (offlineCtx) {
        return offlineCtx;
    }
    numOfChannels = numOfChannels || 2;
    sampleRate = sampleRate || 44100;
    length = sampleRate || numOfChannels;

    const OfflineCtx = window.OfflineAudioContext || window.webkitOfflineAudioContext;

    offlineCtx = (OfflineCtx ? new OfflineCtx(numOfChannels, length, sampleRate) : null);

    return offlineCtx;
}
1082196
def _get_object(data, position, obj_end, opts):
    """"""
    obj_size = _UNPACK_INT(data[position:position + 4])[0]
    end = position + obj_size - 1
    if data[end:position + obj_size] != b"\x00":
        raise InvalidBSON("bad eoo")
    if end >= obj_end:
        raise InvalidBSON("invalid object length")
    obj = _elements_to_dict(data, position + 4, end, opts, subdocument=True)

    position += obj_size
    if "$ref" in obj:
        return (DBRef(obj.pop("$ref"), obj.pop("$id", None),
                      obj.pop("$db", None), obj), position)
    return obj, position
954550
function (e) {
		currentProgram = undefined;
		currentModule = {
			name: null,
			resource: getResourceName(e.filename),
			module: getModuleName(getResourceName(e.filename)),
			localNames: Object.create(null)
		};
	}
64799
def getCocktailSum(e0, e1, eCocktail, uCocktail):
  """"""
  # get mask and according indices
  mask = (eCocktail >= e0) & (eCocktail <= e1)
  # data bin range wider than single cocktail bin
  if np.any(mask):
    idx = getMaskIndices(mask)
    # determine coinciding flags
    eCl, eCu = eCocktail[idx[0]], eCocktail[idx[1]]
    not_coinc_low, not_coinc_upp = (eCl != e0), (eCu != e1)
    # get cocktail sum in data bin (always w/o last bin)
    uCocktailSum = fsum(uCocktail[mask[:-1]][:-1])
    logging.debug('    sum: {}'.format(uCocktailSum))
    # get correction for non-coinciding edges
    if not_coinc_low:
      eCl_bw = eCl - eCocktail[idx[0]-1]
      corr_low = (eCl - e0) / eCl_bw
      abs_corr_low = float(corr_low) * uCocktail[idx[0]-1]
      uCocktailSum += abs_corr_low
      logging.debug(('    low: %g == %g -> %g (%g) -> %g -> {} -> {}' % (
        e0, eCl, eCl - e0, eCl_bw, corr_low
      )).format(abs_corr_low, uCocktailSum))
    if not_coinc_upp:
      if idx[1]+1 < len(eCocktail):
        eCu_bw = eCocktail[idx[1]+1] - eCu
        corr_upp = (e1 - eCu) / eCu_bw
        abs_corr_upp = float(corr_upp) * uCocktail[idx[1]]
      else:# catch last index (quick fix!)
        abs_corr_upp = eCu_bw = corr_upp = 0
      uCocktailSum += abs_corr_upp
      logging.debug(('    upp: %g == %g -> %g (%g) -> %g -> {} -> {}' % (
        e1, eCu, e1 - eCu, eCu_bw, corr_upp
      )).format(abs_corr_upp, uCocktailSum))
  else:
    mask = (eCocktail >= e0)
    idx = getMaskIndices(mask) # only use first index
    # catch if already at last index
    if idx[0] == idx[1] and idx[0] == len(eCocktail)-1:
      corr = (e1 - e0) / (eCocktail[idx[0]] - eCocktail[idx[0]-1])
      uCocktailSum = float(corr) * uCocktail[idx[0]-1]
    else: # default case
      corr = (e1 - e0) / (eCocktail[idx[0]+1] - eCocktail[idx[0]])
      uCocktailSum = float(corr) * uCocktail[idx[0]]
    logging.debug('    sum: {}'.format(uCocktailSum))
  return uCocktailSum
1212306
private static IAtom getCommon(IBond bndA, IBond bndB) {
        IAtom beg = bndA.getBegin();
        IAtom end = bndA.getEnd();
        if (bndB.contains(beg))
            return beg;
        else if (bndB.contains(end))
            return end;
        else
            return null;
    }
1362826
private static Composite addEOC(Composite composite, Bound eocBound)
    {
        return eocBound == Bound.END ? composite.end() : composite.start();
    }
793569
def _inputcooker_getc(self, block=True):
        """"""
        if self.rawq:
            ret = self.rawq[0]
            self.rawq = self.rawq[1:]
            return ret
        if not block:
            if not self.inputcooker_socket_ready():
                return ''
        ret = self.sock.recv(20)
        self.eof = not(ret)
        self.rawq = self.rawq + ret
        if self.eof:
            raise EOFError
        return self._inputcooker_getc(block)
2036
def __public_objs(self):
        
        _budoc = getattr(self.module.module, '__budoc__', {})

        def forced_out(name):
            return _budoc.get('%s.%s' % (self.name, name), False) is None

        def exported(name):
            exported = name == '__init__' or _is_exported(name)
            return not forced_out(name) and exported

        idents = dict(inspect.getmembers(self.cls))
        return dict([(n, o) for n, o in idents.items() if exported(n)])
1238906
def get(method, hmc, uri, uri_parms, logon_required):
        """"""
        cpc_oid = uri_parms[0]
        query_str = uri_parms[1]
        try:
            cpc = hmc.cpcs.lookup_by_oid(cpc_oid)
        except KeyError:
            raise InvalidResourceError(method, uri)

        # Reflect the result of listing the partition
        result_partitions = []
        if cpc.dpm_enabled:
            filter_args = parse_query_parms(method, uri, query_str)
            for partition in cpc.partitions.list(filter_args):
                result_partition = {}
                for prop in partition.properties:
                    if prop in ('object-uri', 'name', 'status'):
                        result_partition[prop] = partition.properties[prop]
                result_partitions.append(result_partition)
        return {'partitions': result_partitions}
445639
function(contextObj, options) {
        options = options ? mergeDeep(this.options, options, true) : this.options;
        var context = this._parseContext(contextObj);
        var subKey = options.applySubstitutions !== false ? 'subbed': 'unsubbed';
        var collector = this.masterDelta ? cloneDeep(this.masterDelta[subKey]) : {};
        this._readHelper(this.tree, 0, context, collector, subKey);
        if(collector.__ycb_source__) {
            return omit(collector, '__ycb_source__');
        }
        return collector;
    }
1226751
function(eObject) {
        if (!eObject || !eObject instanceof EObject) return this;

        if (this._isContainment) {
            eObject.eContainingFeature = this._feature;
            eObject.eContainer = this._owner;
        }

        this._size++;
        this._internal.push(eObject);

        var eResource = this._owner.eResource(),
            eve = 'add';

        if (this._feature) eve += ':' + this._feature.get('name');
        this._owner.trigger(eve, eObject);
        if (eResource) eResource.trigger('add', this);

        return this;
    }
11296
def privtopub(priv,outcompressed=True):
    '''
    
    '''

    x, y = ecmultiply(Gx,Gy,int(priv,16))
    x = dechex(x,32)
    y = dechex(y,32)
    o = '04' + x + y
    if outcompressed:
        return compress(o)
    else:
        return o