Finish pairing process.
769408
async def finish_pairing(self, pin):
        """"""
        self.srp.step1(pin)

        pub_key, proof = self.srp.step2(self._atv_pub_key, self._atv_salt)

        msg = messages.crypto_pairing({
            tlv8.TLV_SEQ_NO: b'\x03',
            tlv8.TLV_PUBLIC_KEY: pub_key,
            tlv8.TLV_PROOF: proof})
        resp = await self.protocol.send_and_receive(
            msg, generate_identifier=False)

        pairing_data = _get_pairing_data(resp)
        atv_proof = pairing_data[tlv8.TLV_PROOF]
        log_binary(_LOGGER, 'Device', Proof=atv_proof)

        encrypted_data = self.srp.step3()
        msg = messages.crypto_pairing({
            tlv8.TLV_SEQ_NO: b'\x05',
            tlv8.TLV_ENCRYPTED_DATA: encrypted_data})
        resp = await self.protocol.send_and_receive(
            msg, generate_identifier=False)

        pairing_data = _get_pairing_data(resp)
        encrypted_data = pairing_data[tlv8.TLV_ENCRYPTED_DATA]

        return self.srp.step4(encrypted_data)
1345931
public void done() {
		for(ByteBuffer bb : bbs) {
			ringPut(bb);
		}
		bbs.clear();
		curr = null;
	}
180231
def finalize(self):
        """"""
        for c in self.consumers:
            c.finalize()
        self.result = [c.result for c in self.consumers]
1018291
public void finish() {
		if (startMeasure == null) {
			Say.info("No invokations are measured");
		}
		else {
			long total = System.currentTimeMillis() - startMeasure;
			double average = 1d * total / counter;
			logFinished(total, average);
		}
	}
10433
public function finish()
    {
        $this->resolveRelations();
        $this->writeXmlFiles();
        $this->createTables();
        $this->import();
        $this->writeExtensionIni();
    }
105051
def finalize(self):
        
        if self.rc_file:
            self.rc_file.close()
        if self.env_file:
            self.env_file.close()
947589
public function finish()
    {

        foreach ($this->drivers as $name => $class) {
            $handler = $class->getHandler();
            if (isset($handler->terminatable) && $handler->terminatable == false) {
                unset($this->drivers[$name]);
                continue;
            }

            if ($class->get('terminate') !== true) {
                $class->finish();
            }
            unset($this->drivers[$name]);
        }
        $this->drivers = [];
    }
1093486
def finish(self, chunk=None):
        """"""
        self._log_disconnect()

        super(BaseHandler, self).finish(chunk)
1098123
protected void finishCreate() {

        try {
            mConnection = createConnection(mDriver.getText(), mURL.getText(),
                                           mUser.getText(),
                                           mPassword.getText());

            dispose();
        } catch (Exception e) {
            e.printStackTrace();
            mError.setText(e.toString());
        }
    }
1088775
public void finish() {
        if ( finSignal == null && finished )
            return;
        // signal finish of execution, so remoting can clean up callback id mappings
        // override if always single result or finish can be emitted by the remote method
        // note one can send FINSILENT to avoid the final message to be visible to receiver callback/spore
        cb.complete(null, null);
        finished = true;
    }
745706
def commit(self):
        """"""
        out = open(self.name,'wb')
        cPickle.dump(self.fields,out,self.protocol)
        cPickle.dump(self.next_id,out,self.protocol)
        cPickle.dump(self.records,out,self.protocol)
        cPickle.dump(self.indices,out,self.protocol)
        out.close()
750414
def _finish_init(self, client, entities, input_chat):
        
        self._client = client
        self._sender = entities.get(self._sender_id)
        if self._sender:
            try:
                self._input_sender = utils.get_input_peer(self._sender)
            except TypeError:
                self._input_sender = None

        self._chat = entities.get(self.chat_id)
        self._input_chat = input_chat
        if not self._input_chat and self._chat:
            try:
                self._input_chat = utils.get_input_peer(self._chat)
            except TypeError:
                self._input_chat = None

        self._via_bot = entities.get(self.via_bot_id)
        if self._via_bot:
            try:
                self._via_input_bot = utils.get_input_peer(self._via_bot)
            except TypeError:
                self._via_input_bot = None

        if self.fwd_from:
            self._forward = Forward(self._client, self.fwd_from, entities)

        if self.action:
            if isinstance(self.action, (types.MessageActionChatAddUser,
                                        types.MessageActionChatCreate)):
                self._action_entities = [entities.get(i)
                                         for i in self.action.users]
            elif isinstance(self.action, types.MessageActionChatDeleteUser):
                self._action_entities = [entities.get(self.action.user_id)]
            elif isinstance(self.action, types.MessageActionChatJoinedByLink):
                self._action_entities = [entities.get(self.action.inviter_id)]
            elif isinstance(self.action, types.MessageActionChatMigrateTo):
                self._action_entities = [entities.get(utils.get_peer_id(
                    types.PeerChannel(self.action.channel_id)))]
            elif isinstance(
                    self.action, types.MessageActionChannelMigrateFrom):
                self._action_entities = [entities.get(utils.get_peer_id(
                    types.PeerChat(self.action.chat_id)))]
1296062
def finish(self):
        
        self.repo.git.checkout(self.current_branch)
        self.repo.close()
792287
private void finishCompletion() {
        // assert state > COMPLETING;
        for (WaitNode q; (q = waiters) != null;) {
            if (U.compareAndSwapObject(this, WAITERS, q, null)) {
                for (;;) {
                    Thread t = q.thread;
                    if (t != null) {
                        q.thread = null;
                        LockSupport.unpark(t);
                    }
                    WaitNode next = q.next;
                    if (next == null)
                        break;
                    q.next = null; // unlink to help gc
                    q = next;
                }
                break;
            }
        }

        done();

        callable = null;        // to reduce footprint
    }
1079974
protected function _finish()
    {
        global $classLoader; // composer's class loader instance
        snapshot();
        Plugin::dropCache();
        // trick: makes plugin visible to AcoManager
        $classLoader->addPsr4($this->_plugin['name'] . "\\", normalizePath(ROOT . "/plugins/{$this->_plugin['name']}/src"), true);
        AcoManager::buildAcos($this->_plugin['name']);
        $this->_reset();
    }
841174
def finish(self, result, array_id = None):
    """"""
    # check if there is any array job still running
    new_status = 'success' if result == 0 else 'failure'
    new_result = result
    finished = True
    if array_id is not None:
      for array_job in self.array:
        if array_job.id == array_id:
          array_job.status = new_status
          array_job.result = result
          array_job.finish_time = datetime.now()
        if array_job.status not in ('success', 'failure'):
          finished = False
        elif new_result == 0:
          new_result = array_job.result

    if finished:
      # There was no array job, or all array jobs finished
      self.status = 'success' if new_result == 0 else 'failure'
      self.result = new_result
      self.finish_time = datetime.now()

      # update all waiting jobs
      for job in self.get_jobs_waiting_for_us():
        if job.status == 'waiting':
          job.queue()
1077628
private static void finish() {

		if (progress.getMax() != null) {

			StringBuilder output = new StringBuilder();
			output.append("\nTile Generation: ").append(progress.getProgress())
					.append(" of ").append(progress.getMax());

			if (geoPackage != null) {
				try {
					GeoPackageTextOutput textOutput = new GeoPackageTextOutput(
							geoPackage);
					output.append("\n\n");
					output.append(textOutput.header());
					output.append("\n\n");
					output.append(textOutput.tileTable(tileTable));

				} finally {
					geoPackage.close();
				}
			}

			System.out.println(output.toString());
		}
	}