r"""
        Returns a generator that yields all of the droplets running on the same
        physical server as the droplet

        :rtype: generator of `Droplet`\ s
        :raises DOAPIError: if the API endpoint replies with an error
321609
def fetch_all_neighbors(self):
        
        """
        api = self.doapi_manager
        return map(api._droplet, api.paginate(self.url + '/neighbors',
                                             'droplets'))
243934
def _generate_instances(self):
        
        for node in self.node_stack:
            yield node
        while self._data:
            yield self._make_instance(self._data.pop(0))
219776
def datasetsGenerator(self, request):
        
        return self._topLevelObjectGenerator(
            request, self.getDataRepository().getNumDatasets(),
            self.getDataRepository().getDatasetByIndex)
1000180
def cells(self) -> Generator[Tuple[int, int], None, None]:
        """"""
        yield from itertools.product(
            range(self.row_start, self.row_end),
            range(self.column_start, self.column_end)
        )
800454
def all_connections(self):
        """"""
        for i in _xrange(self.num_patterns):
            for c in self._available_connections[i]:
                yield c
            for c in self._in_use_connections[i]:
                yield c
896935
def get_row_generator(self, ref, cache=None):

        """"""
        from inspect import isgenerator
        from rowgenerators import get_generator

        g = get_generator(ref)

        if not g:
            raise GenerateError("Cant figure out how to generate rows from {} ref: {}".format(type(ref), ref))
        else:
            return g
22618
def fetch_all_kernels(self):
        
        """
        api = self.doapi_manager
        for kern in api.paginate(self.url + '/kernels', 'kernels'):
            yield Kernel(kern, doapi_manager=api)
323099
def _generate(self):
        """"""
        doc_count = 0
        for fp in self.all_files:
            for doc in self._get_docs_for_path(fp):
                yield doc
                doc_count += 1
                if doc_count >= self.max_docs:
                    return
494867
def main(output):
    

    client = Session().client('cloudresourcemanager', 'v1', 'projects')

    results = []
    for page in client.execute_paged_query('list', {}):
        for project in page.get('projects', []):

            if project['lifecycleState'] != 'ACTIVE':
                continue

            project_info = {
                'project_id': project['projectId'],
                'name': project['name'],
            }

            if 'labels' in project:
                project_info['tags'] = [
                    'label:%s:%s' % (k, v) for k, v in project.get('labels', {}).items()]
            results.append(project_info)

    output.write(
        yaml.safe_dump({'projects': results}, default_flow_style=False))
118813
def iterator(self):
        
        for obj in (self.execute().json().get("items") or []):
            yield self.api_obj_class(self.api, obj)
905525
def fetch(self):
        
        raw = yield gen.Task(self._redis_client.get, self._key)
        if raw:
            self.loads(base64.b64decode(raw))
            raise gen.Return(True)
        raise gen.Return(False)
1097083
def asyncStarPmap(asyncCallable, iterable):
    
    results = []
    yield asyncStarParallel(asyncCallable, results.append, iterable)
    returnValue(results)
989001
def get_data_generator_by_id(hardware_source_id, sync=True):
    
    hardware_source = HardwareSourceManager().get_hardware_source_for_hardware_source_id(hardware_source_id)
    def get_last_data():
        return hardware_source.get_next_xdatas_to_finish()[0].data.copy()
    yield get_last_data
880629
def run(self):
        
        if not self.drip_model.enabled:
            return None

        self.prune()
        count = self.send()

        return count
227120
def create_server(
            self,
            loop: asyncio.AbstractEventLoop,
            sock: Any,
            ssl: SSLContext,
    ) -> TypeGenerator[Any, None, Server]:
        
        if loop is not None and self._loop is not loop:
            self._loop = loop
        return (yield from self.listen(
            sock=sock,
            ssl=ssl,
        ))
1106581
def generate_apiary_doc(task_router):
    
    generator = ApiaryDoc()

    for m in task_router.get_task_packages() + get_method_packages():
        m = importlib.import_module(m)
        generator.docmodule(m)

    return generator
576163
function outputAll(generator) {

    var output = (opts.outputs && opts.outputs[0]);
    if (!output) return log('scripts.outputAll: no output');

    var omit = output.omitRoutes;
    if (omit && !u.isArray(omit)) { omit = [omit]; }

    // TODO: re-use similar filter in server/serve-statics and generator.output
    var filterRe = new RegExp( '^(/admin/|/server/' +
                (opts.editor ? '' : '|/pub/') +
                       (omit ? '|' + u.map(omit, u.escapeRegExp).join('|') : '') +
                               ')');

    u.each(self.scripts, function(script) {
      if (filterRe.test(script.route)) return;

      var out = fspath.join(output.path, script.route);
      var ws = createOutputStream(out);
      var time = u.timer();
      ws.on('finish', function() {
        log('output script: %s (%d bytes, %d ms)', out, ws.bytesWritten, time());
      });
      ws.on('error', log);

      // reuse browserify-middleware with current production or debug options
      var options = browserify.settings.normalize(script.opts);
      var bundler = browserify.buildBundle(script.path, options);
      bundler.bundle().pipe(ws);
    });

    if (opts.editor) {
      var out = fspath.join(output.path, '/pub/_opts.json');
      fs.outputJson(out, serializeOpts(generator, true, output), function(err) {
        log(err || 'output opts: %s', out);
      });
    }
  }