Add a single or block register transfer operation to this command
194923
def add(self, count, request, data, dap_index):
        
        assert self._data_encoded is False
        if self._dap_index is None:
            self._dap_index = dap_index
        assert self._dap_index == dap_index

        if self._block_request is None:
            self._block_request = request
        elif request != self._block_request:
            self._block_allowed = False
        assert not self._block_allowed or self._block_request == request

        if request & READ:
            self._read_count += count
        else:
            self._write_count += count
        self._data.append((count, request, data))

        if LOG_PACKET_BUILDS:
            self._logger.debug("add(%d, %02x:%s) -> [wc=%d, rc=%d, ba=%d]" %
                (count, request, 'r' if (request & READ) else 'w', self._write_count, self._read_count, self._block_allowed))
897111
def chain(cmd, chain, a = {})
      cmds = {
        new: '-N', rename: '-E', delete: '-X', flush: '-F',
        list_rules: '-S', list: '-L', zero: '-Z', policy: '-P'
      }
      table = build_option('-t', @table)
      numeric = build_option('-n', a[:numeric])
      rulenum = build_option(true, a[:rulenum])
      to = build_option(true, a[:to])
      @buffer << [
        'iptables', table, numeric, cmds[cmd], chain, rulenum, to
      ].compact.join(' ') << "\n"
      self
    end
224972
def write_multiple_registers(slave_id, starting_address, values):
    
    function = WriteMultipleRegisters()
    function.starting_address = starting_address
    function.values = values

    return _create_request_adu(slave_id, function.request_pdu)
1351076
def command_x(self, x, to=None):
        
        if to is None:
            ActionChains(self.driver) \
                .send_keys([Keys.COMMAND, x, Keys.COMMAND]) \
                .perform()
        else:
            self.send_keys(to, [Keys.COMMAND, x, Keys.COMMAND])
1137120
def _add_flow_v1_2(self, src, port, timeout, datapath):
        """"""
        ofproto = datapath.ofproto
        parser = datapath.ofproto_parser

        match = parser.OFPMatch(
            in_port=port, eth_src=src, eth_type=ether.ETH_TYPE_SLOW)
        actions = [parser.OFPActionOutput(
            ofproto.OFPP_CONTROLLER, ofproto.OFPCML_MAX)]
        inst = [parser.OFPInstructionActions(
            ofproto.OFPIT_APPLY_ACTIONS, actions)]
        mod = parser.OFPFlowMod(
            datapath=datapath, command=ofproto.OFPFC_ADD,
            idle_timeout=timeout, priority=65535,
            flags=ofproto.OFPFF_SEND_FLOW_REM, match=match,
            instructions=inst)
        datapath.send_msg(mod)
1202639
def _batched_write_command(
        namespace, operation, command, docs, check_keys, opts, ctx):
    
    buf = StringIO()

    # Save space for message length and request id
    buf.write(_ZERO_64)
    # responseTo, opCode
    buf.write(b"\x00\x00\x00\x00\xd4\x07\x00\x00")

    # Write OP_QUERY write command
    to_send, length = _batched_write_command_impl(
        namespace, operation, command, docs, check_keys, opts, ctx, buf)

    # Header - request id and message length
    buf.seek(4)
    request_id = _randint()
    buf.write(_pack_int(request_id))
    buf.seek(0)
    buf.write(_pack_int(length))

    return request_id, buf.getvalue(), to_send
186482
function add(err, req, res) {
  if(err) {
    // TODO: send args length errors

    // transaction errors are not queued
    // but the transaction is left open for more
    // command to be queued
    if(err instanceof TransactionError) {
      return res.send(err);
    }
    // last error
    this.error = err;
  }

  this.queue.push({err: err, req: req, res: res});
  res.send(null, QUEUED);
}
493521
def add_command(self, command):
        
        self._commands.append(command)
        self._build_command_chain(command)
28348
public void addOperation(GetOperation o) {
    pcb.addCallbacks(o);
    for (String k : o.getKeys()) {
      addKey(k);
      setVBucket(k, ((VBucketAware) o).getVBucket(k));
    }
  }
1360706
def bitop(self, operation, dest, *keys):
        
        return self.execute_command('BITOP', operation, dest, *keys)
1261086
def add(x1, x2, output_shape=None, name=None):
  
  output_shape = convert_to_shape(output_shape)
  if not isinstance(x2, Tensor):
    return ScalarAddOperation(x1, x2).outputs[0]
  with tf.name_scope(name, default_name="add"):
    x1, x2 = binary_arguments_to_tensors(x1, x2)
    return AddOperation(
        x1, x2, output_shape=_infer_binary_broadcast_shape(
            x1.shape, x2.shape, output_shape)).outputs[0]
1145628
function add (cb) {
    var files = my.args
    // Check for file arguements
    if (files.length === 0) {
      return cb( erf ('<add> command requires file arguements', usage))
    }
    // Get bin and run chained processes
    async.asyncMap( files, processchain , function (err) {
      if (err) return cb(err)  //ERRORS FROM PROCESSING CHAIN
      cb(null,my.state)
    })  // end asyncMap

    function processchain (file, cb_) {
      var source = path.join(process.cwd(),file)
      , targetdir = getActiveBin(my.state.bins)
      async.chain( [checkState, source, false]
                   , [copyFile, source, targetdir]
                   , [changeState, source, 'add']
                   , cb_ )
    }  //end processchain
  }
742518
def _write8(self, reg, value):
        """"""
        self.i2c.write8(TCS34725_COMMAND_BIT | reg, value)
933642
def push_firq_registers(self):
        
        self.cycles += 1
        self.push_word(self.system_stack_pointer, self.program_counter.value) # PC
        self.push_byte(self.system_stack_pointer, self.get_cc_value())
946955
def register_global_command(self, command, title=None, group=None):
        '''
        
        '''
        commands = self.global_commands.setdefault(group, OrderedDict())
        if title is None:
            title = (command[:1].upper() + command[1:]).replace('_', ' ')
        commands[command] = title
756254
def commit_operation( self, input_op_data, accepted_nameop, current_block_number ):
        
   
        # have to have read-write disposition 
        if self.disposition != DISPOSITION_RW:
            log.error("FATAL: borrowing violation: not a read-write connection")
            traceback.print_stack()
            os.abort()

        cur = self.db.cursor()
        canonical_op = None
        op_type_str = None      # for debugging
        opcode = accepted_nameop.get('opcode', None)

        try:
            assert opcode is not None, "Undefined op '%s'" % accepted_nameop['op']
        except Exception, e:
            log.exception(e)
            log.error("FATAL: unrecognized op '%s'" % accepted_nameop['op'] )
            os.abort()

        if opcode in OPCODE_PREORDER_OPS:
            # preorder
            canonical_op = self.commit_state_preorder( accepted_nameop, current_block_number )
            op_type_str = "state_preorder"
            
        elif opcode in OPCODE_CREATION_OPS:
            # creation
            canonical_op = self.commit_state_create( accepted_nameop, current_block_number )
            op_type_str = "state_create"
           
        elif opcode in OPCODE_TRANSITION_OPS:
            # transition 
            canonical_op = self.commit_state_transition( accepted_nameop, current_block_number )
            op_type_str = "state_transition"
       
        elif opcode in OPCODE_TOKEN_OPS:
            # token operation 
            canonical_op = self.commit_token_operation(accepted_nameop, current_block_number)
            op_type_str = "token_operation"

        else:
            raise Exception("Unknown operation {}".format(opcode))

        if canonical_op is None:
            log.error("FATAL: no canonical op generated (for {})".format(op_type_str))
            os.abort()
        
        log.debug("Extract consensus fields for {} in {}, as part of a {}".format(opcode, current_block_number, op_type_str))
        consensus_op = self.extract_consensus_op(opcode, input_op_data, canonical_op, current_block_number)
        return consensus_op
272346
def transfercmd(cmd, rest_offset = nil) # :nodoc:
      if @passive
        host, port = makepasv
        conn = open_socket(host, port)
        if @resume and rest_offset
          resp = sendcmd("REST " + rest_offset.to_s)
          if resp[0] != ?3
            raise FTPReplyError, resp
          end
        end
        resp = sendcmd(cmd)
        # skip 2XX for some ftp servers
        resp = getresp if resp[0] == ?2
        if resp[0] != ?1
          raise FTPReplyError, resp
        end
      else
        sock = makeport
        if @resume and rest_offset
          resp = sendcmd("REST " + rest_offset.to_s)
          if resp[0] != ?3
            raise FTPReplyError, resp
          end
        end
        resp = sendcmd(cmd)
        # skip 2XX for some ftp servers
        resp = getresp if resp[0] == ?2
        if resp[0] != ?1
          raise FTPReplyError, resp
        end
        conn = BufferedSocket.new(sock.accept)
        conn.read_timeout = @read_timeout
        sock.shutdown(Socket::SHUT_WR) rescue nil
        sock.read rescue nil
        sock.close
      end
      return conn
    end