collect microfomats data from the lanyrd site
18103
function getUFData(userName, identity, options, callback) {
			var url = 'http://lanyrd.com/people/' + userName,
				cache = options.cache,
				page =  new Page(url, identity, null, options);

			page.fetchUrl(function(){
				if(page.profile.hCards.length > 0){
					page.profile.hCards[0].source = 'microformat';	
					callback(null, page.profile.hCards[0]);
				}else{
					callback(null, {});
				}
			})
		}
30230
def download_data(job, master_ip, inputs, known_snps, bam, hdfs_snps, hdfs_bam):
    

    log.info("Downloading known sites file %s to %s.", known_snps, hdfs_snps)
    call_conductor(job, master_ip, known_snps, hdfs_snps, memory=inputs.memory)

    log.info("Downloading input BAM %s to %s.", bam, hdfs_bam)
    call_conductor(job, master_ip, bam, hdfs_bam, memory=inputs.memory)
17718
function getFocusElements(elm) {
        var elements = [];

        function collect(elm) {
          if (elm.nodeType != 1 || elm.style.display == 'none' || elm.disabled) {
            return;
          }

          if (canFocus(elm)) {
            elements.push(elm);
          }

          for (var i = 0; i < elm.childNodes.length; i++) {
            collect(elm.childNodes[i]);
          }
        }

        collect(elm || root.getEl());

        return elements;
      }
80343
function () {
				var oView = this.getView(),
					// Collect all possible items from all lists
					aItems = [].concat(
						oView.byId("allList").getItems(),
						oView.byId("apiList").getItems(),
						oView.byId("documentationList").getItems(),
						oView.byId("samplesList").getItems()
					),
					iLen = aItems.length,
					oItem;

				while (iLen--) {
					oItem = aItems[iLen];
					// Access control lazy loading method if available
					if (oItem._getLinkSender) {
						// Set link href to allow open in new window functionality
						oItem._getLinkSender().setHref("#/" + oItem.getCustomData()[0].getValue());
					}
				}
			}
261868
def get_bindingsite_data(self):
        """"""
        for i, site in enumerate(sorted(self.mol.interaction_sets)):
            s = self.mol.interaction_sets[site]
            bindingsite = BindingSiteReport(s).generate_xml()
            bindingsite.set('id', str(i + 1))
            bindingsite.set('has_interactions', 'False')
            self.xmlreport.insert(i + 1, bindingsite)
            for itype in BindingSiteReport(s).generate_txt():
                self.txtreport.append(itype)
            if not s.no_interactions:
                bindingsite.set('has_interactions', 'True')
            else:
                self.txtreport.append('No interactions detected.')
            sys.stdout = sys.__stdout__
657043
function collectInputFiles(pattern) {
  return new Promise((resolve, reject) => {
    glob(pattern, {root: SRC_DIR, nomount: true}, (err, files) => {
      if (err) {
        return reject(err);
      }
      resolve(files);
    });
  });
}
567462
def _get_site_info(self):
        
        response = self.wiki_request(
            {"meta": "siteinfo", "siprop": "extensions|general"}
        )

        # parse what we need out here!
        query = response.get("query", None)
        if query is None or query.get("general", None) is None:
            raise MediaWikiException("Missing query in response")

        gen = query.get("general", None)

        api_version = gen["generator"].split(" ")[1].split("-")[0]

        major_minor = api_version.split(".")
        for i, item in enumerate(major_minor):
            major_minor[i] = int(item)
        self._api_version = tuple(major_minor)
        self._api_version_str = ".".join([str(x) for x in self._api_version])

        # parse the base url out
        tmp = gen.get("server", "")
        if tmp == "":
            raise MediaWikiException("Unable to parse base url")
        if tmp.startswith("http://") or tmp.startswith("https://"):
            self._base_url = tmp
        elif gen["base"].startswith("https:"):
            self._base_url = "https:{}".format(tmp)
        else:
            self._base_url = "http:{}".format(tmp)

        self._extensions = [ext["name"] for ext in query["extensions"]]
        self._extensions = sorted(list(set(self._extensions)))
503921
function _populateMeta() {
    self.meta = {
      activeWatchInfo: Pebble.getActiveWatchInfo && Pebble.getActiveWatchInfo(),
      accountToken: Pebble.getAccountToken(),
      watchToken: Pebble.getWatchToken(),
      userData: deepcopy(options.userData || {})
    };
  }
1232460
def get_pmeshes(self, sites, permutation=None):
        
        pmeshes = []
        # _vertices = [site.coords for site in sites]
        if permutation is None:
            _vertices = [site.coords for site in sites]
        else:
            _vertices = [sites[ii].coords for ii in permutation]
        _face_centers = []
        number_of_faces = 0
        for face in self._faces:
            if len(face) in [3, 4]:
                number_of_faces += 1
            else:
                number_of_faces += len(face)

            _face_centers.append(np.array([np.mean([_vertices[face_vertex][ii]
                                                    for face_vertex in face])
                                           for ii in range(3)]))

        out = '{}\n'.format(len(_vertices) + len(_face_centers))
        for vv in _vertices:
            out += '{:15.8f} {:15.8f} {:15.8f}\n'.format(vv[0], vv[1], vv[2])
        for fc in _face_centers:
            out += '{:15.8f} {:15.8f} {:15.8f}\n'.format(fc[0], fc[1], fc[2])
        out += '{:d}\n'.format(number_of_faces)
        for iface, face in enumerate(self._faces):
            if len(face) == 3:
                out += '4\n'
            elif len(face) == 4:
                out += '5\n'
            else:
                for ii in range(len(face)):
                    out += '4\n'
                    out += '{:d}\n'.format(len(_vertices) + iface)
                    out += '{:d}\n'.format(face[ii])
                    out += '{:d}\n'.format(face[np.mod(ii + 1, len(face))])
                    out += '{:d}\n'.format(len(_vertices) + iface)
            if len(face) in [3, 4]:
                for face_vertex in face:
                    out += '{:d}\n'.format(face_vertex)
                out += '{:d}\n'.format(face[0])
        pmeshes.append({"pmesh_string": out})
        return pmeshes
410752
def get_lines(self):
        
        lines = [["{:f}".format(self._cluster[0].x),
                  "{:f}".format(self._cluster[0].y),
                  "{:f}".format(self._cluster[0].z),
                  0, self.absorbing_atom, "0.0", 0]]
        for i, site in enumerate(self._cluster[1:]):
            site_symbol = re.sub(r"[^aA-zZ]+", "", site.species_string)
            ipot = self.pot_dict[site_symbol]
            lines.append(["{:f}".format(site.x), "{:f}".format(site.y),
                          "{:f}".format(site.z), ipot, site_symbol,
                          "{:f}".format(self._cluster.get_distance(0, i + 1)), i + 1])

        return sorted(lines, key=itemgetter(5))
968134
def _repr_html_(self):
        """"""
        TileServer.run_tileserver(self, self.footprint())
        capture = "raster: %s" % self._filename
        mp = TileServer.folium_client(self, self.footprint(), capture=capture)
        return mp._repr_html_()
337531
def __item_data(self, model, index):
        """"""
        item = model.items[index]

        data = {
            "name": item.name,
            "data": item.data,
            "doc": getattr(item, "doc", None),
            "path": getattr(item, "path", None),
        }

        return data
1202990
def read
      site.collections.each do |_, collection|
        collection.read unless SPECIAL_COLLECTIONS.include?(collection.label)
      end
    end
310773
function innerCollectDeviceData(infoToCache) {
        var defered = q.defer();
        self.dataCollectionDefered = defered;

        self.log('Collecting Data from a handle', self.handle);
        
        // Indicate that this device was opened by the device scanner.
        self.openedByScanner = true;

        var deviceHandle = self.handle;
        var dt = self.openParameters.deviceType;
        var ct = self.openParameters.connectionType;
        var id = self.openParameters.identifier;

        // Initialize a curated device object.
        self.curatedDevice = new device_curator.device();

        // Link the device handle to the curated device object.
        self.curatedDevice.linkToHandle(deviceHandle, dt, ct, id)
        .then(function finishedLinkingHandle(res) {
            self.log(
                'Finished linking to a handle',
                deviceHandle,
                self.curatedDevice.savedAttributes.connectionTypeName
            );
            
            // Create a data collection timeout.
            var collectionTimeout = setTimeout(
                deviceHandleDataCollectionTimeout,
                DEVICE_DATA_COLLECTION_TIMEOUT
            );

            // Attach event listeners to the curated device.
            linkToCuratedDeviceEvents();
            console.log('reading multiple...', deviceHandle);
            // Collect information from the curated device.
            self.curatedDevice.iReadMultiple(infoToCache)
            .then(function finishedCollectingData(results) {
                // Clear the data collection timeout
                clearTimeout(collectionTimeout);

                self.log('Collecting data from a handle', deviceHandle);
                printCollectedDeviceData(results);
                saveCollectedDeviceData(results);

                // Report that the device is finished collecting data.
                stopCollectingDeviceData();
            }, function(err) {
                self.log('Error collecting data from a handle', deviceHandle, err);

                // Report that the device is finished collecting data.
                stopCollectingDeviceData();
            });
        }, function errorLinkingHandle(err) {
            console.error('Error linking to handle...');
            defered.resolve();
        });
        return defered.promise;
    }
1256346
def get_data_files():
    """"""
    if sys.platform.startswith('linux'):
        if PY3:
            data_files = [('share/applications',
                           ['scripts/condamanager3.desktop']),
                          ('share/pixmaps',
                           ['img_src/condamanager3.png'])]
        else:
            data_files = [('share/applications',
                           ['scripts/condamanager.desktop']),
                          ('share/pixmaps',
                           ['img_src/condamanager.png'])]
    elif os.name == 'nt':
        data_files = [('scripts', ['img_src/conda-manager.ico'])]
    else:
        data_files = []
    return data_files
1361887
def _collect_data(directory, input_ext, target_ext):
  """"""
  # Directory from string to tuple pair of strings
  # key: the filepath to a datafile including the datafile's basename. Example,
  #   if the datafile was "/path/to/datafile.wav" then the key would be
  #   "/path/to/datafile"
  # value: a pair of strings (input_filepath, target_filepath)
  data_files = {}
  for root, _, filenames in os.walk(directory):
    input_files = [filename for filename in filenames if input_ext in filename]
    for input_filename in input_files:
      basename = input_filename.strip(input_ext)
      input_file = os.path.join(root, input_filename)
      target_file = os.path.join(root, basename + target_ext)
      key = os.path.join(root, basename)
      assert os.path.exists(target_file)
      assert key not in data_files
      data_files[key] = (input_file, target_file)
  return data_files
1154729
function(params, options) {
      var t = this,
          port = t.get('port'),
          server = t.get('server'),
          templates = t.get('templates'),
          siteDbPath = t.get('siteDbPath'),
          parentPath = siteDbPath.indexOf('.') === 0 ? process.cwd() : '';

      // Distribute the site path to probes that need it
      t.set('siteDbPath', Path.join(parentPath, siteDbPath));

      // Initialize probes
      SyncProbe.Config.defaultProbe = 'FileSyncProbe';
      SyncProbe.FileSyncProbe.setRootPath(siteDbPath);

      // Expose the current instance so probes running
      // in this process can communicate with the server
      UI.Server.currentServer = t;

      // Internal (non-model) attributes
      t.apps = {};  // Hash appName -> app data
      t.site = null;   // Site model associated with the server

      // Create a connect server if no custom server was specified
      if (!server) {
        server = new Connect();
        t.set({server: server});
      }

      // Attach server components
      server.use(t.siteRoute.bind(t));
      server.use(Connect['static'](Path.join(__dirname, '/../..')));

      // Create a static server to the monitor distribution
      var monitorDistDir = require.resolve('monitor').replace(/lib[\\\/]index.js/, 'dist');
      t.monitorDist = Connect['static'](monitorDistDir);

      // Initialize the template library
      var gruntModules = GruntConfig.MODULE_DEF;
      gruntModules.templates.sort().forEach(function(template){
        var path = Path.normalize(__dirname + '/../../' + template);
        var id = Path.basename(path, '.html');
        templates.add({id:id, path:path});
      });

      // Build the page parameters from the config file
      var styles = "", scripts="";
      gruntModules.client_css.forEach(function(cssFile) {
        styles += CSS_TEMPLATE({cssFile: cssFile.replace('lib/','/static/')});
      });
      var clientScripts = gruntModules.client_ext.concat(gruntModules.shared_js.concat(gruntModules.client_js));
      clientScripts.forEach(function(file) {
        scripts += JS_TEMPLATE({scriptFile: file.replace('lib/','/static/')});
      });
      _.extend(PAGE_PARAMS, {
        styles: styles, scripts: scripts, version: PACKAGE_JSON.version
      });
    }