Tags the response with the data for block provided by the event.
434208
public function onKernelResponse(FilterResponseEvent $event): void
    {
        if (!$event->isMasterRequest()) {
            return;
        }

        $blockView = $event->getRequest()->attributes->get('ngbmView');
        if (!$blockView instanceof BlockViewInterface) {
            return;
        }

        $this->tagger->tagBlock($event->getResponse(), $blockView->getBlock());
    }
391086
public function tagUserContext(FilterResponseEvent $event)
    {
        $response = $event->getResponse();
        if (!$response->isCacheable()) {
            return;
        }

        if ($response->headers->get('Content-Type') !== 'application/vnd.fos.user-context-hash') {
            return;
        }

        if (!$response->getTtl()) {
            return;
        }

        // We need to set tag directly on repsonse here to make sure this does not also get applied to the main request
        // when using Symfony Proxy, as tag handler does not clear tags between requests.
        $response->headers->set($this->tagHeader, $this->repoPrefix . 'ez-user-context-hash');
    }
38076
function displayResponse(response){
  
  // Gather and display HTTP response data
  var lines = [
    response.statusCode + ' ' + response.statusText,
    headersToString(response.headers)
  ];
  if(response.data){
    lines.push('');
    lines.push(prettyPrint(response.data));
  }
  output(lines.join('\n'));
  
  // Attach listeners to links so that clicking a link will auto-populate
  // the url field
  Array.from($output.querySelectorAll('.link')).forEach(function(link){
    link.addEventListener('click', function(){
      // Remove leading and trailing "
      $url.value = link.innerHTML.slice(1,-1);
      window.scrollTo(0, 0);
    });
  });
}
1062490
def _push_tag_buffer(self, data):
        """"""
        if data.context & data.CX_QUOTED:
            self._emit_first(tokens.TagAttrQuote(char=data.quoter))
            self._emit_all(self._pop())
        buf = data.padding_buffer
        self._emit_first(tokens.TagAttrStart(
            pad_first=buf["first"], pad_before_eq=buf["before_eq"],
            pad_after_eq=buf["after_eq"]))
        self._emit_all(self._pop())
        for key in data.padding_buffer:
            data.padding_buffer[key] = ""
841105
def post(self, object_type, object_id):
        """"""
        if object_id == 0:
            return Response(status=404)

        tagged_objects = []
        for name in request.get_json(force=True):
            if ':' in name:
                type_name = name.split(':', 1)[0]
                type_ = TagTypes[type_name]
            else:
                type_ = TagTypes.custom

            tag = db.session.query(Tag).filter_by(name=name, type=type_).first()
            if not tag:
                tag = Tag(name=name, type=type_)

            tagged_objects.append(
                TaggedObject(
                    object_id=object_id,
                    object_type=object_type,
                    tag=tag,
                ),
            )

        db.session.add_all(tagged_objects)
        db.session.commit()

        return Response(status=201)
635922
def tagged(self, tag, offset=0, count=25):
        ''''''
        return json.loads(self.client('tag', 'get', tag, offset, count))
584200
def AddEventTag(self, event_tag):
    
    self._RaiseIfNotWritable()

    self._storage_file.AddEventTag(event_tag)

    self._session.event_labels_counter['total'] += 1
    for label in event_tag.labels:
      self._session.event_labels_counter[label] += 1
    self.number_of_event_tags += 1
256799
def post_event(self, id, **data):
        
        
        return self.post("/events/{0}/".format(id), data=data)
1209454
def tag_array(events):
    
    all_tags = sorted(set(tag for event in events for tag in event.tags))
    array = np.zeros((len(events), len(all_tags)))
    for row, event in enumerate(events):
        for tag in event.tags:
            array[row, all_tags.index(tag)] = 1
    return array
612486
public function onBlock(BlockEvent $event)
    {
        $identifier = $event->getSetting('id', null);

        if (null === $identifier) {
            return;
        }

        $block = new Block();
        $block->setId(uniqid());
        $block->setSettings($event->getSettings());
        $block->setType($this->blockService->getName());

        $event->addBlock($block);
    }
743131
function postGetTags(id, cb) {
  var q  =
    'SELECT * FROM tags t ' +
      'JOIN posts_tags pt ON t.id = pt.tag_id AND pt.post_id = $1';

  db.getClient(function(err, client, done) {
    client.query(q, [id], function(err, r) {
      if(err) {
        cb(err);
        done(err);
      } else {
        cb(null, r.rows);
        done();
      }
    });
  });
}
1276008
function(el, tagName, tagData) {
                var helperTagCallback = tagData.options.attr('tags.' + tagName),
                    tagCallback = helperTagCallback || tags[tagName];

                // If this was an element like <foo-bar> that doesn't have a component, just render its content
                var scope = tagData.scope,
                    res;

                if (tagCallback) {
                    var reads = can.__clearReading();
                    res = tagCallback(el, tagData);
                    can.__setReading(reads);
                } else {
                    res = scope;
                }



                // If the tagCallback gave us something to render with, and there is content within that element
                // render it!
                if (res && tagData.subtemplate) {

                    if (scope !== res) {
                        scope = scope.add(res);
                    }
                    var result = tagData.subtemplate(scope, tagData.options);
                    var frag = typeof result === "string" ? can.view.frag(result) : result;
                    can.appendChild(el, frag);
                }
            }
1107793
def poll_blockchain_events(self, block_number: typing.BlockNumber):
        

        for event_listener in self.event_listeners:
            assert isinstance(event_listener.filter, StatelessFilter)

            for log_event in event_listener.filter.get_new_entries(block_number):
                yield decode_event_to_internal(event_listener.abi, log_event)
163770
public function onRetrieveObjectsByTag(GenericDatasEvent $event)
    {
        $taggedObjects = array();
        $datas = $event->getDatas();

        if (is_array($datas) && isset($datas['tag']) && !empty($datas['tag'])) {
            $search = $datas['tag'];
            $user = isset($datas['user']) ? $datas['user'] : null;
            $withPlatform = isset($datas['with_platform']) && $datas['with_platform'];
            $strictSearch = isset($datas['strict']) ? $datas['strict'] : false;
            $class = isset($datas['class']) ? $datas['class'] : null;
            $objectResponse = isset($datas['object_response']) && $datas['object_response'];
            $orderedBy = isset($datas['ordered_by']) ? $datas['ordered_by'] : 'id';
            $order = isset($datas['order']) ? $datas['order'] : 'ASC';

            $objects = $this->tagManager->getTaggedObjects(
                $user,
                $withPlatform,
                $class,
                $search,
                $strictSearch
            );

            if (!is_null($class) && $objectResponse) {
                $ids = array();

                foreach ($objects as $object) {
                    $ids[] = $object->getObjectId();
                }
                $taggedObjects = $this->tagManager->getObjectsByClassAndIds(
                    $class,
                    $ids,
                    $orderedBy,
                    $order
                );
            } else {

                foreach ($objects as $object) {
                    $datas = array();
                    $datas['class'] = $object->getObjectClass();
                    $datas['id'] = $object->getObjectId();
                    $datas['name'] = $object->getObjectName();
                    $taggedObjects[] = $datas;
                }
            }
        }
        $event->setResponse($taggedObjects);
    }
268816
def tag_event(self, calendar_id, event_id, extendedProperties):
        '''
        '''
        event_body = self.service.events().get(calendarId = self.configured_calendar_ids[calendar_id], eventId=event_id).execute()
        event_body['extendedProperties'] = event_body.get('extendedProperties', {})
        event_body['extendedProperties']['shared'] = event_body['extendedProperties'].get('shared', {})
        event_body['extendedProperties']['private'] = event_body['extendedProperties'].get('private', {})
        assert(sorted(set(extendedProperties.keys()).union(set(['shared', 'private']))) == ['private', 'shared'])
        for k, v in extendedProperties['shared'].iteritems():
            event_body['extendedProperties']['shared'][k] = v
        for k, v in extendedProperties['private'].iteritems():
            event_body['extendedProperties']['private'][k] = v
        raise Exception('not tested yet')
        updated_event = self.service.events().update(calendarId = self.configured_calendar_ids[calendar_id], eventId = event_id, body = event_body).execute()
869555
def tag(name, attributes={}, &block)
      open = sjoin name, attrs(attributes)
      body = block.call if block_given?
      if VOID_ELEMENTS.include?(name.to_sym)
        raise BuilderError, "Void elements cannot have content" if body
        "<#{open}>"
      else
        "<#{open}>#{body}</#{name}>"
      end
    end
1369459
def _process_event(self, event, tagged_data):
    """"""
    event_type = event.WhichOneof('what')
    # Handle the most common case first.
    if event_type == 'summary':
      for value in event.summary.value:
        value = data_compat.migrate_value(value)
        tag, metadata, values = tagged_data.get(value.tag, (None, None, []))
        values.append((event.step, event.wall_time, value.tensor))
        if tag is None:
          # Store metadata only from the first event.
          tagged_data[value.tag] = sqlite_writer.TagData(
              value.tag, value.metadata, values)
    elif event_type == 'file_version':
      pass  # TODO: reject file version < 2 (at loader level)
    elif event_type == 'session_log':
      if event.session_log.status == event_pb2.SessionLog.START:
        pass  # TODO: implement purging via sqlite writer truncation method
    elif event_type in ('graph_def', 'meta_graph_def'):
      pass  # TODO: support graphs
    elif event_type == 'tagged_run_metadata':
      pass