A function returning a feed like `feedgen.feed.FeedGenerator`.
        The function can be overwritten when used in other applications.

        :param feed: a feed object
        :return: an atom feed `feedgen.feed.FeedGenerator`
169007
def _generate_atom_feed(self, feed):
        
        atom_feed = self.init_atom_feed(feed)
        atom_feed.title("Feed")
        return atom_feed
1214300
def get_feed(feed_uri)
      get_contents_except_resources(feed_uri) do |res|
        #warn "Bad Content Type" unless Atom::MediaType::FEED.is_a?(@res['Content-Type'])
        @rc = Atom::Feed.new :stream => res.body
      end
      @rc
    end
626668
def extract_feed(
    inpath: str, outpath: str, view: View, config: nx.DiGraph = None
) -> str:
    """"""
    config = default_config() if config is None else config
    config = remove_node_attributes(config, "converters")
    feed = load_feed(inpath, view, config)
    return write_feed_dangerously(feed, outpath)
404791
def show(context, id):
    
    result = feeder.get(context, id=id)
    utils.format_output(result, context.format)
360968
def feed_data(self, data):
        '''
        '''
        if self.buffer is None:
            self.buffer = bytearray(data)
        else:
            self.buffer.extend(data)
        data = self.buffer

        idx = data.find(self.separator)
        if idx >= 0:    # we have a full message
            idx += len(self.separator)
            data, rest = data[:idx], data[idx:]
            self.buffer = self.response(data, rest)
            self.event('post_request').fire()
            return rest
1161790
def neo_feed(start_date = Time.now.strftime('%Y-%m-%d'),
                 end_date = (Time.now + 604800).strftime('%Y-%m-%d'))
      request
        .neo
        .rest
        .v1('feed')
        .get(:params => { :api_key => @application_id.dup,
                          :start_date => start_date,
                          :end_date => end_date })
        .to_h
    end
514775
def list_feeds(self):
        
        feeds = configparser.ConfigParser()
        feeds.read(self.data_filename)
        return feeds.sections()
1109715
def feed(self, image):
        
        network_name = self.__class__.__name__.lower()

        with tf.variable_scope(network_name):
            return self._feed(image)
20659
def feed(self, token, test_newline=True):
        
        if test_newline:
            newlines = token.count(self.newline_char)
            if newlines:
                self.line += newlines
                self.line_start_pos = self.char_pos + token.rindex(self.newline_char) + 1

        self.char_pos += len(token)
        self.column = self.char_pos - self.line_start_pos + 1
1149965
def feed_interval_get(feed_id, parameters):
	''
	val = cache.get(getkey( T_INTERVAL,
		key=feed_interval_key(feed_id, parameters) ))
	return val if isinstance(val, tuple) else (val, None)
627165
def get_feed(self):
        """"""
        return self.client.GetListFeed(self.key, self.worksheet,
            visibility='private' if self.is_authed else 'public',
            # TODO always use projection='values' ? What does full give me?
            projection='full' if self.is_authed else 'values')
641817
def _feed_stream(feeder, in_stream, out_stream, block_size = BLOCK_SIZE):
    ''

    while True:
        chunk = in_stream.read(block_size)
        if not chunk:
            break
        converted = feeder.feed(chunk)
        out_stream.write(converted)
    converted = feeder.feed()
    out_stream.write(converted)
131915
function createJob(feed) {

  // Job skeleton
  var job = {
    id: 'Job[' + uuid.v4() + ']',
    original: feed,
    time: {
      start: 0,
      end: 0
    },
    state: {
      retrying: false,
      failing: false
    },
    req: {
      retries: 0,
      data: {}
    },
    res: {
      data: null
    }
  };

  // Handling polymorphism
  if (types.check(feed, 'string')) {
    job.req.url = feed;
    feed = {};
  }
  else {

    // Parsing url if needed
    if (feed.url)
      if (types.check(feed.url, 'object'))
        job.req.url = nodeUrl.format(extend(feed.url, {protocol: 'http'}));
      else
        job.req.url = feed.url;
    else if (feed.host || feed.hostname)
      job.req.url = nodeUrl.format(extend(feed, {protocol: 'http'}));
  }

  // Request properties
  job.req.data = feed.data || {};

  [
    'auth',
    'artoo',
    'body',
    'bodyType',
    'cheerio',
    'cookies',
    'encoding',
    'headers',
    'method',
    'phantomPage',
    'proxy',
    'timeout'
  ].forEach(function(p) {
    if (feed[p]) {

      // Solving object proxy
      if (p === 'proxy' && types.check(feed[p], 'object'))
        job.req[p] = nodeUrl.format(extend(feed[p], {protocol: 'http'}));

      job.req[p] = feed[p];
    }
  });

  return job;
}
811649
def parse_feed(content):
        
        feed = feedparser.parse(content)
        articles = []
        for entry in feed['entries']:
            article = {
                'title': entry['title'],
                'link': entry['link']
            }
            try:
                article['media'] = entry['media_content'][0]['url']
            except KeyError:
                article['media'] = None
            articles.append(article)
        return articles
119772
def feed(self, data):
        
        self._lock.acquire()
        try:
            if self._event is not None:
                self._event.set()
            self._buffer_frombytes(b(data))
            self._cv.notifyAll()
        finally:
            self._lock.release()
70259
def toTag(self, output):
        ''' 
        '''
        feed = output.createElement('feed')
        feed.setAttribute('name', self.name)
        feed.setAttribute('priority', str(self.priority))

        # schedule
        schedule = output.createElement('schedule')
        schedule.setAttribute('dayOfMonth', self.dayOfMonth)
        schedule.setAttribute('dayOfWeek', self.dayOfWeek)
        schedule.setAttribute('hour', self.hour)
        schedule.setAttribute('minute', self.minute)
        if self.retry:
            schedule.setAttribute('retry', self.retry)
        feed.appendChild(schedule)

        # url
        url = output.createElement('url')
        url.appendChild(output.createTextNode(self.url))
        feed.appendChild(url)

        # source
        if self.source:
            source = output.createElement('source')
            source.appendChild(output.createTextNode(self.source))
            feed.appendChild(source)
        return feed
651639
def chain(cls, *iterables):
    

    def generator():
      for it in iterables:
        for element in it:
          yield element
    return cls(generator())