Retrieve forward information.
332672
def get_destinations(cls, domain, source):
        """"""
        forwards = cls.list(domain, {'items_per_page': 500})
        for fwd in forwards:
            if fwd['source'] == source:
                return fwd['destinations']

        return []
977182
def forwards(self, orm):
        ""
        for qde_xtf in orm['xtf.QualifiedDublinCoreElement'].objects.all().order_by('id'):
            qde = orm.QualifiedDublinCoreElement()
            qde.content = qde_xtf.content
            qde.term = qde_xtf.term
            qde.qualifier = qde_xtf.qualifier
            #import pdb;pdb.set_trace()
            c= orm['contenttypes.ContentType'].objects.get(pk=qde_xtf.content_type.pk)
            #c.name = qde_xtf.content_type.name
            #c.app_label = qde_xtf.content_type.app_label
            #c.model = qde_xtf.content_type.model
            qde.content_type = c
            #qde.content_type = qde_xtf.content_type
            qde.object_id = qde_xtf.object_id
            qde.save()
        for qdeh_xtf in  orm['xtf.QualifiedDublinCoreElementHistory'].objects.all().order_by('id'):
            qdeh = orm.QualifiedDublinCoreElementHistory()
            qdeh.content = qdeh_xtf.content
            qdeh.term = qdeh_xtf.term
            qdeh.qualifier = qdeh_xtf.qualifier
            c= orm['contenttypes.ContentType'].objects.get(pk=qdeh_xtf.content_type.pk)
            #c.name = qdeh_xtf.content_type.name
            #c.app_label = qdeh_xtf.content_type.app_label
            #c.model = qdeh_xtf.content_type.model
            qdeh.content_type = c
            #qdeh.content_type = qdeh_xtf.content_type
            qdeh.object_id = qdeh_xtf.object_id
            qdeh.qdce = orm['dublincore.QualifiedDublinCoreElement'].objects.get(pk=qdeh_xtf.qdce.pk)
            qdeh.qdce_id_stored = qdeh_xtf.qdce_id_stored
            qdeh.save()
1109138
def forward(self, observations):
        
        input_data = self.input_block(observations)

        base_output = self.backbone(input_data)
        policy_params = self.action_head(base_output)

        q = self.q_head(base_output)

        return policy_params, q
32383
def forward(self, search: str):
        
        url_path = "/api/forward/{search}".format(search=search)
        return self._request(path=url_path)
687596
def forward_prediction(self, m):
        
        return self.infer(self.conf.m_dims, self.conf.s_dims, m)
424823
def forward(self, X):
        """"""
        # Identify the first non-zero integer from the right (i.e., the length
        # of the sequence before padding starts).
        batch_size, max_seq = X.shape[0], X.shape[1]
        seq_lengths = torch.zeros(batch_size, dtype=torch.long)
        for i in range(batch_size):
            for j in range(max_seq - 1, -1, -1):
                if not torch.all(X[i, j] == 0):
                    seq_lengths[i] = j + 1
                    break

        # Sort by length because pack_padded_sequence requires it
        # Save original order to restore before returning
        seq_lengths, perm_idx = seq_lengths.sort(0, descending=True)
        X = X[perm_idx]
        inv_perm_idx = torch.tensor(
            [i for i, _ in sorted(enumerate(perm_idx), key=lambda idx: idx[1])],
            dtype=torch.long,
        )

        # Encode and pack input sequence
        X_packed = rnn_utils.pack_padded_sequence(
            self.encoder.encode(X), seq_lengths, batch_first=True
        )

        # Run LSTM
        outputs, (h_t, c_t) = self.lstm(X_packed)

        # Unpack and reduce outputs
        outputs_unpacked, _ = rnn_utils.pad_packed_sequence(outputs, batch_first=True)
        reduced = self._reduce_output(outputs_unpacked, seq_lengths)
        return reduced[inv_perm_idx, :]
1061668
def _parse_forward(mapping):
    '''
    
    '''
    if len(mapping.split(':')) > 3:
        (srcport, destport, protocol, destaddr) = mapping.split(':')
    else:
        (srcport, destport, protocol) = mapping.split(':')
        destaddr = ''
    return ForwardingMapping(srcport, destport, protocol, destaddr)
35329
def forwards(self, orm):
        ""
        # for every status
        for status in orm['booking.BookingStatus'].objects.all():
            # iterate over the old renamed translation instances
            for statustrans_old in orm['booking.BookingStatusTranslationRenamed'].objects.filter(status=status):
                orm['booking.BookingStatusTranslation'].objects.create(
                    name=statustrans_old.name,
                    language_code=statustrans_old.language,
                    master=status,
                )
1086630
def forwards(self, orm):
        ""
        # Note: Remember to use orm['appname.ModelName'] rather than "from appname.models..."
        for entry in orm['multilingual_news.NewsEntry'].objects.all():
            self.migrate_placeholder(
                orm, entry, 'excerpt', 'multilingual_news_excerpt', 'excerpt')
            self.migrate_placeholder(
                orm, entry, 'content', 'multilingual_news_content', 'content')
662080
def get_so_far(self):
        
        position = self.packet.tell()
        self.rewind()
        return self.packet.read(position)
246256
def forward(self, is_train=False):
        """"""
        for texec in self.train_execs:
            texec.forward(is_train=is_train)
683990
def forward(self, x, mask):
        """"""
        all_layers = []
        for layer in self.layers:
            x = layer(x, mask)
            if self.return_all_layers:
                all_layers.append(x)

        if self.return_all_layers:
            all_layers[-1] = self.norm(all_layers[-1])
            return all_layers
        return self.norm(x)
235523
def find_forward(data, offset = 0, length = data.length)
      node = nil
      lastvaluenode = nil
      i = offset
      while (i<offset+length)
        c = data[i]
        if (node == nil)
          node = self.find_horizontal(c)
        elsif (node.down != nil)
          node = node.down.find_horizontal(c)
        else
          return lastvaluenode
        end
        return lastvaluenode  if (node == nil)
        lastvaluenode = node if (node.value != nil)
        i += 1
      end
      lastvaluenode
    end
643518
def forward(self, x):
        ''''''
        N,C,H,W = x.size()
        g = self.groups
        return x.view(N,g,C/g,H,W).permute(0,2,1,3,4).contiguous().view(N,C,H,W)
1209144
def forward(self, observations):
        
        observations = self.input_block(observations)
        base_output = self.backbone(observations)
        q_values = self.q_head(base_output)
        return q_values
839270
def database_forwards(self, app_label, schema_editor, from_state, to_state):
        """"""
        from resolwe.flow.models.data import DataQuerySet
        # pylint: disable=protected-access

        Data = from_state.apps.get_model('flow', 'Data')  # pylint: disable=invalid-name
        DataQuerySet._delete_chunked(Data.objects.filter(process__slug=self.process))

        Process = from_state.apps.get_model('flow', 'Process')  # pylint: disable=invalid-name
        Process.objects.filter(slug=self.process).delete()
522932
def forward(self, x, sampled_values, label):
        """"""
        sampled_candidates, _, _ = sampled_values
        # (batch_size,)
        label = label.reshape(shape=(-1,))
        # (num_sampled+batch_size,)
        ids = nd.concat(sampled_candidates, label, dim=0)
        # lookup weights and biases
        weight = self.weight.row_sparse_data(ids)
        bias = self.bias.data(ids.context)
        # (num_sampled+batch_size, dim)
        w_all = nd.Embedding(data=ids, weight=weight, **self._kwargs)
        # (num_sampled+batch_size,)
        b_all = nd.take(bias, indices=ids)
        out, new_targets = self._dense(x, sampled_values, label, w_all, b_all)
        return out, new_targets