Fill function for create_featuredata_map
331742
def add_psms_to_proteindata(proteindata, p_acc, pool, psmdata):
    """"""
    seq, psm_id = psmdata[2], psmdata[3]
    try:
        proteindata[p_acc]['pools'][pool]['psms'].add(psm_id)
    except KeyError:
        emptyinfo = {'psms': set(), 'peptides': set(), 'unipeps': 0}
        try:
            proteindata[p_acc]['pools'][pool] = emptyinfo
        except KeyError:
            proteindata[p_acc].update({'pools': {pool: emptyinfo}})
        proteindata[p_acc]['pools'][pool]['psms'].add(psm_id)
    proteindata[p_acc]['pools'][pool]['peptides'].add(seq)
1152685
function fillMethods(apiObj, urls) {
  const urlKeys = Object.keys(urls);

  urlKeys.forEach((urlKey) => {
    const urlVal = urls[urlKey];

    if (typeof urlVal === 'string') {
      apiObj[urlKey] = assembleHttp(urlVal);
    } else if (urlVal.url) {
      apiObj[urlKey] = assembleHttp(urlVal);
    } else {
      apiObj[urlKey] = {};
      fillMethods(apiObj[urlKey], urlVal);
    }
  });
}
586692
def fill_inputs(values):
        
        name_map = {  # TODO: get rid of this crap
            "title_tags": "title",
            "subtitle_tags": "subtitle",
            "place_tags": "place",
            "lang_tags": "language",
            "keyword_tags": "keywords",
            "author_tags": "author",
            "publisher_tags": "publisher",
            "annotation_tags": "annotation",
            "creation_dates": "creation_date",
        }

        for remote_name in values.keys():
            # special adapter for aleph keyword view
            if remote_name == "keyword_tags":
                adder = ViewController.analysis_kw_handler.add_keyword
                for keyword in values[remote_name]:
                    adder(keyword["val"])
                continue

            local_name = name_map.get(remote_name, remote_name)
            setattr(ViewController, local_name, values[remote_name])
217043
function filledRectangle($x1, $y1, $width, $height)
    {
        $this->addContent(sprintf("\n%.3F %.3F %.3F %.3F re f", $x1, $y1, $width, $height));
    }
1231861
def fill_borders(self, *args):
        

        to_run = []
        cases = {"y": self._fill_row_borders,
                 "x": self._fill_col_borders}
        for dim in args:
            try:
                to_run.append(cases[dim])
            except KeyError:
                raise NameError("Unrecognized dimension: " + str(dim))

        for fun in to_run:
            fun()
1283810
function insert(outMap, inMap, length, index) {
  // Move existing mappings
  if (length) {
    outMap._mappings.unsortedForEach(mapping => {
      if (mapping.generatedLine > index) mapping.generatedLine += length;
    });
  }

  // Add new mappings
  if (inMap) {
    const inConsumer = new SourceMapConsumer(inMap.toJSON());

    inConsumer.eachMapping(mapping => {
      outMap.addMapping({
        source: mapping.source,
        original: mapping.source == null
          ? null
          : {
              line: mapping.originalLine,
              column: mapping.originalColumn
            },
        generated: {
          line: index + mapping.generatedLine - 1,
          column: mapping.generatedColumn
        }
      });
    });

    inConsumer.sources.forEach((source, idx) => {
      outMap.setSourceContent(source, inConsumer.sourcesContent[idx]);
    });
  }
}
932814
function fillBar() {
  var arr = []
  for (var i=0; i<servers.length; i++) {
    arr.push(Math.round(Math.random()*10))
  }
  bar.setData({titles: servers, data: arr})
}
728044
def format(self, **kwargs):
        """"""
        attrs = self._attrs.copy()
        attrs.update({'width': self._width, 'height': self._height})
        attrs.update(kwargs)
        return Map(self._features, **attrs)
1023995
private Map<String, CmsDecorationObject> fillMap(CmsObject cms, CmsResource res) throws CmsException {

        if (LOG.isDebugEnabled()) {
            LOG.debug(
                Messages.get().getBundle().key(Messages.LOG_DECORATION_MAP_FILL_MAP_2, m_name, m_decoratorDefinition));
        }

        Map<String, CmsDecorationObject> decMap = new HashMap<String, CmsDecorationObject>();
        // upgrade the resource to get the file content
        CmsFile file = cms.readFile(res);
        // get all the entries
        String unparsedContent = new String(file.getContents());

        String delimiter = "\r\n";
        if (unparsedContent.indexOf(delimiter) == -1) {
            // there was no \r\n delimiter in the csv file, so check if the lines are seperated by
            // \n only
            if (unparsedContent.indexOf("\n") > -1) {
                delimiter = "\n";
            }
        }

        if (LOG.isDebugEnabled()) {
            LOG.debug(
                Messages.get().getBundle().key(
                    Messages.LOG_DECORATION_MAP_FILL_MAP_DELIMITER_2,
                    res.getName(),
                    CmsStringUtil.escapeJavaScript(delimiter)));
        }

        List<String> entries = CmsStringUtil.splitAsList(unparsedContent, delimiter);

        if (LOG.isDebugEnabled()) {
            LOG.debug(
                Messages.get().getBundle().key(
                    Messages.LOG_DECORATION_MAP_FILL_MAP_SPLIT_LIST_2,
                    res.getName(),
                    entries));
        }
        Iterator<String> i = entries.iterator();
        while (i.hasNext()) {
            try {
                String entry = i.next();
                // extract key and value
                if (CmsStringUtil.isNotEmpty(entry)) {
                    int speratator = entry.indexOf(CSV_SEPERATOR);
                    if (speratator > -1) {
                        String key = entry.substring(0, speratator).trim();
                        String value = entry.substring(speratator + 1).trim();
                        if (CmsStringUtil.isNotEmpty(key) && CmsStringUtil.isNotEmpty(value)) {
                            CmsDecorationObject decObj = new CmsDecorationObject(
                                key,
                                value,
                                m_decoratorDefinition,
                                m_locale);
                            decMap.put(key, decObj);
                            if (LOG.isDebugEnabled()) {
                                LOG.debug(
                                    Messages.get().getBundle().key(
                                        Messages.LOG_DECORATION_MAP_ADD_DECORATION_OBJECT_2,
                                        decObj,
                                        key));
                            }
                        }
                    }
                }
            } catch (Exception e) {
                if (LOG.isErrorEnabled()) {
                    LOG.error(Messages.get().getBundle().key(Messages.LOG_DECORATION_MAP_FILL_2, m_name, e));
                }
            }
        }

        return decMap;
    }
1019369
def buildcontent(self):
        """"""

        self.buildcontainer()
        self.option = json.dumps(self.options, cls = HighchartsEncoder)
        self.setoption = json.dumps(self.setOptions, cls = HighchartsEncoder)
        self.data = json.dumps(self.data_temp, cls = HighchartsEncoder)

        # DEM 2017/04/25: Make 'data' available as an array
        # ... this permits jinja2 array access to each data definition
        # ... which is useful for looping over multiple data sources
        self.data_list = [json.dumps(x, cls = HighchartsEncoder) for x in self.data_temp]

        if self.drilldown_flag: 
            self.drilldown_data = json.dumps(self.drilldown_data_temp, cls = HighchartsEncoder)
        self._htmlcontent = self.template_content_highcharts.render(chart=self).encode('utf-8')
412884
function renderPatternPartial(patternId, drizzleData, Handlebars) {
  const patternObj = deepPattern(patternId, drizzleData.patterns);
  const localContext = patternContext(patternObj, drizzleData);
  let template = Handlebars.partials[patternId];
  if (typeof template !== 'undefined') {
    if (typeof template !== 'function') {
      template = Handlebars.compile(template);
    }
    // Render and return
    return template(localContext);
  }
  DrizzleError.error(
    new DrizzleError(
      `Partial for pattern ${patternId} not found`,
      DrizzleError.LEVELS.ERROR
    ),
    drizzleData.options.debug
  );
}
459263
function insertMultiFragment (collection, index, array) {

    // Only get the objects with the correct collection value
    var filtered = finalarray.filter(function (element) {
      return element.collection === collection;
    });

    // Map data with corresponding partials
    var map = maps.multimap(collection)
      , obj = {fragment : plates.bind(partials[collection], filtered, maps.collections())};
    ruffian = plates.bind(ruffian, obj, map);
  }
181565
function callFilledRectangle( $info )
    {
        $params = array();

        eZPDFTable::extractParameters( $info['p'], 0, $params, true );

        $keyArray = array ( 'c', 'm', 'y', 'k' );
        $cmykTop = explode( ',', $params['cmykTop'] );
        $cmykBottom = explode( ',', $params['cmykBottom'] );

        foreach ( array_keys( $cmykBottom ) as $key )
        {
            $cmykBottom[$keyArray[$key]] = $cmykBottom[$key];
            unset( $cmykBottom[$key] );
            $cmykTop[$keyArray[$key]] = $cmykTop[$key];
            unset( $cmykTop[$key] );
        }

        $this->ezShadedRectangle( $params['x'], $params['y'], $params['width'], $params['height'], $cmykTop, $cmykBottom );
    }
459980
function createVertexBufferObjects(renderState) {
    if (m_geomData) {
      if (renderState) {
        m_context = renderState.m_context;
      }
      var numberOfSources = m_geomData.numberOfSources(),
          i, j, k, bufferId = null, keys, ks, numberOfPrimitives, data;

      for (i = 0; i < numberOfSources; i += 1) {
        bufferId = m_context.createBuffer();
        m_context.bindBuffer(vgl.GL.ARRAY_BUFFER, bufferId);
        data = m_geomData.source(i).data();
        if (!(data instanceof Float32Array)) {
          data = new Float32Array(data);
        }
        m_context.bufferData(vgl.GL.ARRAY_BUFFER, data,
                      m_dynamicDraw ? vgl.GL.DYNAMIC_DRAW :
                      vgl.GL.STATIC_DRAW);

        keys = m_geomData.source(i).keys();
        ks = [];

        for (j = 0; j < keys.length; j += 1) {
          ks.push(keys[j]);
        }

        m_bufferVertexAttributeMap[i] = ks;
        m_buffers[i] = bufferId;
      }

      numberOfPrimitives = m_geomData.numberOfPrimitives();
      for (k = 0; k < numberOfPrimitives; k += 1) {
        bufferId = m_context.createBuffer();
        m_context.bindBuffer(vgl.GL.ARRAY_BUFFER, bufferId);
        m_context.bufferData(vgl.GL.ARRAY_BUFFER,
          m_geomData.primitive(k).indices(), vgl.GL.STATIC_DRAW);
        m_buffers[i] = bufferId;
        i += 1;
      }

      m_glCompileTimestamp.modified();
    }
  }
1289050
protected function fillDataForEmpty()
    {
        // Fill field references if they are empty
        $fields = [];

        // Add columns for attributes
        foreach ($this->info->attributes as $attribute) {

            if ($attribute->hidden || ! $this->shouldAttributeBeEditableByDefault($attribute, $this->info)) {
                continue;
            }

            $fields[ $attribute->name ] = $this->makeModelFormFieldDataForAttributeData($attribute);
        }


        // Add fields for relations
        foreach ($this->info->relations as $relation) {

            $fields[ $relation->name ] = $this->makeModelFormFieldDataForRelationData($relation);
        }


        $this->info->form->fields = $fields;
    }
283743
function Datamap( options ) {

    if ( typeof d3 === 'undefined' || typeof topojson === 'undefined' ) {
      throw new Error('Include d3.js (v3.0.3 or greater) and topojson on this page before creating a new map');
   }

    //set options for global use
    this.options = defaults(options, defaultOptions);
    this.options.geographyConfig = defaults(options.geographyConfig, defaultOptions.geographyConfig);
    this.options.bubblesConfig = defaults(options.bubblesConfig, defaultOptions.bubblesConfig);
    this.options.arcConfig = defaults(options.arcConfig, defaultOptions.arcConfig);

    //add the SVG container
    if ( d3.select( this.options.element ).select('svg').length > 0 ) {
      addContainer.call(this, this.options.element, this.options.height, this.options.width );
    }

    /* Add core plugins to this instance */
    this.addPlugin('bubbles', handleBubbles);
    this.addPlugin('legend', addLegend);
    this.addPlugin('arc', handleArcs);
    this.addPlugin('labels', handleLabels);

    //append style block with basic hoverover styles
    if ( ! this.options.disableDefaultStyles ) {
      addStyleBlock();
    }

    return this.draw();
  }
1004602
def get_fill_value(dataset):
    """"""
    if np.issubdtype(dataset.dtype, np.integer):
        return dataset.attrs.get('_FillValue', np.nan)
    return np.nan