Start BT proposal
421222
async function () {
    const oThis = this;

    // Validate new branded token
    logger.step("** Validating branded token");
    await oThis._validateBrandedTokenDetails();

    // Generate reserve address
    logger.step("** Generating reserve address");
    var addressRes = await oThis._generateAddress();
    oThis.reserveAddress = addressRes.data.address;
    logger.info("* address:", oThis.reserveAddress);

    // Start the BT proposal
    var proposeRes = await oThis._propose();

    // Monitor the BT proposal response
    var statusRes = await oThis._checkProposeStatus(proposeRes.data.transaction_hash);
    var registrationStatus = statusRes.data.registration_status;
    oThis.uuid = registrationStatus['uuid'];
    oThis.erc20 = registrationStatus['erc20_address'];

    // Add branded token to config file
    logger.step("** Updating branded token config file");
    await oThis._updateBrandedTokenConfig();

    // Allocating shard for storage of token balances
    logger.step("** Allocating shard for storage of token balances");
    await oThis._allocateShard();

    process.exit(0);

  }
1295219
private BT advanceAndRead(BT reuse) throws IOException {
		if (!partitions.hasNext()) {
			return null;
		}
		currentPartition = partitions.next();
		currentPartition.setReadPosition(0);

		try {
			reuse = serializer.deserialize(reuse, currentPartition);
		} catch (EOFException e) {
			reuse = advanceAndRead(reuse);
		}
		return reuse;
	}
1186534
def start (self):
        '''
        

        '''
        self.subrgb = rospy.Subscriber(self.topicrgb, ImageROS)
        self.subd = rospy.Subscriber(self.topicd, ImageROS)
        self.ts = message_filters.ApproximateTimeSynchronizer([subrgb, subd], 1, 0.1, allow_headerless=True)
        self.ts.registerCallback(self.__callback)
1237621
def start(self):
        """"""
        self.storage.update({
            'term': self.storage.term + 1,
            'voted_for': self.id
        })

        self.vote_count = 1
        self.request_vote()
        self.election_timer.start()
410982
def start(self):
        """"""
        self._useV2 = self.cf.platform.get_protocol_version() >= 4

        logger.debug('[%d]: Using V2 protocol: %d', self.port, self._useV2)

        logger.debug('[%d]: Start fetching...', self.port)
        # Register callback in this class for the port
        self.cf.add_port_callback(self.port, self._new_packet_cb)

        # Request the TOC CRC
        self.state = GET_TOC_INFO
        pk = CRTPPacket()
        pk.set_header(self.port, TOC_CHANNEL)
        if self._useV2:
            pk.data = (CMD_TOC_INFO_V2,)
            self.cf.send_packet(pk, expected_reply=(CMD_TOC_INFO_V2,))
        else:
            pk.data = (CMD_TOC_INFO,)
            self.cf.send_packet(pk, expected_reply=(CMD_TOC_INFO,))
1367643
def start(self, blocking=False):
        
        self.debug("()")
        # Init GPIO
        # Enable warnings
        GPIO.setwarnings(True)
        # Careful - numbering between different pi version might differ
        if self.gpio_mode == "BOARD":
            GPIO.setmode(GPIO.BOARD)
        else:
            GPIO.setmode(GPIO.BCM)

        # Register people
        try:
            self.changer.on_person_new(self.people)
        except:
            self.exception("Failed to add people to audience")
            raise StartException("Adding people failed")

        # Setup pins
        for gpio in self.gpios:
            GPIO.setup(gpio, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
            GPIO.add_event_detect(
                gpio, GPIO.BOTH,
                callback=self._gpio_callback, bouncetime=self.gpio_bouncetime
            )
        super(GPIODetector, self).start(blocking)
903667
public void start(BundleContext bc) throws Exception {
		bundleContext = bc;
		tracker = new ServiceTracker<>(bc,
				HttpService.class, this);
		tracker.open();
	}
380884
def update(self):
        """"""
        _LOGGER.debug("Querying the device..")
        time = datetime.now()
        value = struct.pack('BBBBBBB', PROP_INFO_QUERY,
                            time.year % 100, time.month, time.day,
                            time.hour, time.minute, time.second)

        self._conn.make_request(PROP_WRITE_HANDLE, value)
214415
def propose_value(self, key, value, assume_leader=False):
        
        assert isinstance(key, UUID)
        paxos_aggregate = PaxosAggregate.start(
            originator_id=key,
            quorum_size=self.quorum_size,
            network_uid=self.name
        )
        msg = paxos_aggregate.propose_value(value, assume_leader=assume_leader)
        while msg:
            msg = paxos_aggregate.receive_message(msg)
        new_events = paxos_aggregate.__batch_pending_events__()
        self.record_process_event(ProcessEvent(new_events))
        self.repository.take_snapshot(paxos_aggregate.id)
        self.publish_prompt()
        return paxos_aggregate
415877
def on(self):
        """"""
        msg = X10Send.unit_code_msg(self.address.x10_housecode,
                                    self.address.x10_unitcode)
        self._send_method(msg)

        msg = X10Send.command_msg(self.address.x10_housecode,
                                  X10_COMMAND_ON)
        self._send_method(msg, False)
        self._update_subscribers(0xff)
450593
def srbt1(bt_address, pkts, *args, **kargs):
    """"""
    a, b = srbt(bt_address, pkts, *args, **kargs)
    if len(a) > 0:
        return a[0][1]
183713
public void startAdvertising() {
        if (mBeacon == null) {
            throw new NullPointerException("Beacon cannot be null.  Set beacon before starting advertising");
        }
        int manufacturerCode = mBeacon.getManufacturer();
        int serviceUuid = -1;
        if (mBeaconParser.getServiceUuid() != null) {
            serviceUuid = mBeaconParser.getServiceUuid().intValue();
        }

        if (mBeaconParser == null) {
            throw new NullPointerException("You must supply a BeaconParser instance to BeaconTransmitter.");
        }

        byte[] advertisingBytes = mBeaconParser.getBeaconAdvertisementData(mBeacon);
        String byteString = "";
        for (int i= 0; i < advertisingBytes.length; i++) {
            byteString += String.format("%02X", advertisingBytes[i]);
            byteString += " ";
        }
        LogManager.d(TAG, "Starting advertising with ID1: %s ID2: %s ID3: %s and data: %s of size "
                        + "%s", mBeacon.getId1(),
                        mBeacon.getIdentifiers().size() > 1 ? mBeacon.getId2() : "",
                        mBeacon.getIdentifiers().size() > 2 ? mBeacon.getId3() : "", byteString,
                advertisingBytes.length);

        try{
            AdvertiseData.Builder dataBuilder = new AdvertiseData.Builder();
            if (serviceUuid > 0) {
                byte[] serviceUuidBytes = new byte[] {
                        (byte) (serviceUuid & 0xff),
                        (byte) ((serviceUuid >> 8) & 0xff)};
                ParcelUuid parcelUuid = parseUuidFrom(serviceUuidBytes);
                dataBuilder.addServiceData(parcelUuid, advertisingBytes);
                dataBuilder.addServiceUuid(parcelUuid);
                dataBuilder.setIncludeTxPowerLevel(false);
                dataBuilder.setIncludeDeviceName(false);

            } else {
                dataBuilder.addManufacturerData(manufacturerCode, advertisingBytes);
            }

            AdvertiseSettings.Builder settingsBuilder = new AdvertiseSettings.Builder();

            settingsBuilder.setAdvertiseMode(mAdvertiseMode);
            settingsBuilder.setTxPowerLevel(mAdvertiseTxPowerLevel);
            settingsBuilder.setConnectable(mConnectable);

            mBluetoothLeAdvertiser.startAdvertising(settingsBuilder.build(), dataBuilder.build(), getAdvertiseCallback());
            LogManager.d(TAG, "Started advertisement with callback: %s", getAdvertiseCallback());

        } catch (Exception e){
            LogManager.e(e, TAG, "Cannot start advertising due to exception");
        }
    }
228685
def start(self):
        
        self._context.add_service_listener(
            self, self.requirement.filter, self.requirement.specification
        )
294787
private void btCancelActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btCancelActionPerformed
    {//GEN-HEADEREND:event_btCancelActionPerformed

      if (isImporting)
      {
        worker.cancel(true);
        statementController.cancelStatements();
      }
      setVisible(false);
    }
763158
def setup_blueprint(self):
        """"""

        # Register endpoints.
        self.blueprint.add_url_rule("/", "status", self.status)
        self.blueprint.add_url_rule("/healthy", "health", self.healthy)
        self.blueprint.add_url_rule("/ready", "ready", self.ready)
        self.blueprint.add_url_rule("/threads", "threads", self.threads_bt)
1146530
def start(self):
        '''
        
        '''
        if ':' in self.address:
            self.skt = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
        else:
            self.skt = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        if self.reuse_port:
            self.skt.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
            if hasattr(socket, 'SO_REUSEPORT'):
                self.skt.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
            else:
                log.error('SO_REUSEPORT not supported')
        try:
            self.skt.bind((self.address, int(self.port)))
        except socket.error as msg:
            error_string = 'Unable to bind to port {} on {}: {}'.format(self.port, self.address, msg)
            log.error(error_string, exc_info=True)
            raise BindException(error_string)
346982
def start(self, block=True):
        """"""
        if self._state == INIT:
            if not any(self.on_message.receivers_for(blinker.ANY)):
                raise RuntimeError('no receivers connected to on_message')

            self.logger.debug('starting %s...', self.name)
            self._state = RUNNING
            self.query_nsqd()

            if self.lookupds:
                self.query_lookupd()
                self._killables.add(self._workers.spawn(self._poll_lookupd))

            self._killables.add(self._workers.spawn(self._poll_ready))

        else:
            self.logger.warn('%s already started', self.name)

        if block:
            self.join()