Unlocks the SIM card using the specified PIN (if necessary, else does nothing)
549120
def _unlockSim(self, pin):
        
        # Unlock the SIM card if needed
        try:
            cpinResponse = lineStartingWith('+CPIN', self.write('AT+CPIN?', timeout=0.25))
        except TimeoutException as timeout:
            # Wavecom modems do not end +CPIN responses with "OK" (github issue #19) - see if just the +CPIN response was returned
            if timeout.data != None:
                cpinResponse = lineStartingWith('+CPIN', timeout.data)
                if cpinResponse == None:
                    # No useful response read
                    raise timeout
            else:
                # Nothing read (real timeout)
                raise timeout
        if cpinResponse != '+CPIN: READY':
            if pin != None:
                self.write('AT+CPIN="{0}"'.format(pin))
            else:
                raise PinRequiredError('AT+CPIN')
252244
public synchronized void unlockExclusive()
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "unlockExclusive", this);

    // Synchronize on the locking Mutex.
    synchronized (iMutex)
    {
      // Only release the lock if the holder is the current thread.
      if (Thread.currentThread() == iExclusiveLockHolder)
      {
        if (tc.isDebugEnabled())
          SibTr.debug(tc, "Unlocking current thread " + (iExclusiveLockCount - 1));

        // Decrement the exclusive lock count,
        // if the count reaches 0 then we know that 
        // we can safely remove the exclusive lock
        if (--iExclusiveLockCount == 0)
        {
          // Set the flag to indicate that the exclusive lock
          // has been released.
          iExclusivelyLocked = false;

          // Set the exclusive lock holder thread to be null
          iExclusiveLockHolder = null;

          // Notify any threads waiting for this lock.
          notifyAll();
        }
      }
      else if (tc.isDebugEnabled())
        SibTr.debug(tc, "Thread not the current thread to unlock exclusively");
    }

    if (tc.isEntryEnabled())
      SibTr.exit(tc, "unlockExclusive");

  }
661672
def unlock(self):
        
        if isinstance(self._session, manager.Manager):
            self._session.unlock()
716005
private final synchronized void unlock()
                    throws ObjectManagerException
    {
        final String methodName = "unlock";
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        methodName,
                        new Object[] { transactionLock });

        setState(nextStateForUnlock); // Make the state change. 

        transactionLock = new TransactionLock(null);
        numberOfLocksTaken = 0;
        notify(); // Wake up one waiter.

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       methodName);
    }
276837
public Optional<LockResource> tryLockInode(Long inodeId, LockMode mode) {
    return mInodeLocks.tryGet(inodeId, mode);
  }
47451
def _lock(self):
        """"""
        if not self.locked:
            self.device.cu.lock()
            self.locked = True
202516
def unlock(self, request, *args, **kwargs):
        
        self.object = self.get_object()
        success_url = self.get_success_url()
        self.object.status = Topic.TOPIC_UNLOCKED
        self.object.save()
        messages.success(self.request, self.success_message)
        return HttpResponseRedirect(success_url)
391261
def run_unlock(device_type, args):
    """"""
    util.setup_logging(verbosity=args.verbose)
    with device_type() as d:
        log.info('unlocked %s device', d)
1354976
def unlock(self):
        """"""
        r = fapi.unlock_workspace(self.namespace, self.name, self.api_url)
        fapi._check_response_code(r, 204)
        self.data['workspace']['isLocked'] = False
        return self
1328925
private void tryUnlock() {

        if (m_resource != null) {
            try {
                A_CmsUI.getCmsObject().unlockResource(m_resource);
            } catch (CmsException e) {
                LOG.debug("Unlocking resource " + m_resource.getRootPath() + " failed", e);
            }
        }
    }
1045382
def reacquire(self):
        
        if self.local.token is None:
            raise LockError("Cannot reacquire an unlocked lock")
        if self.timeout is None:
            raise LockError("Cannot reacquire a lock with no timeout")
        return self.do_reacquire()
298815
def get_pin(self, _code=None):
        """"""
        description = (
            'Use the numeric keypad to describe number positions.\n'
            'The layout is:\n'
            '    7 8 9\n'
            '    4 5 6\n'
            '    1 2 3')
        return interact(
            title='{} PIN'.format(self.device_name),
            prompt='PIN:',
            description=description,
            binary=self.pin_entry_binary,
            options=self.options_getter())
687773
function ( ) {
			if ( ! options.exist ) {
				// http request to Nominatim to performs the Geocoding of the pin.
				// To avoid to much call to Nominatim with the same position,
				// the call is only performed when it's a new pin
				var NominatimUrl = 
					'http://nominatim.openstreetmap.org/reverse?format=json&lat=' +
					latlng.lat +
					'&lon=' +
					latlng.lng +
					'&zoom=' +
					Map.getZoom ( ) +
					'&addressdetails=1&accept-language=' +
					_Translator.UserLanguage +
					'&osm_type=W';
				var XmlHttpRequest = new XMLHttpRequest ( );
				XmlHttpRequest.onreadystatechange = function ( ) { 
					if ( XmlHttpRequest.readyState == 4 && XmlHttpRequest.status == 200 ) {
						_NominatimCallback ( XmlHttpRequest.responseText );
					}
				};  
				XmlHttpRequest.open ( "GET", NominatimUrl, true );
				XmlHttpRequest.send ( null );
			}
		}
638051
def unlock(self, password = None, keyfile = None, buf = None):
        

        if ((password is None or password == "") and (keyfile is None or
             keyfile == "")):
            raise KPError("A password/keyfile is needed")
        elif ((type(password) is not str and password is not None) or
              (type(keyfile) is not str and keyfile is not None)):
            raise KPError("password/keyfile must be a string.")
        if keyfile == "":
            keyfile = None
        if password == "":
            password = None
        self.password = password
        self.keyfile = keyfile
        return self.load(buf)
961034
def lock(self):
        """"""
        endpoint = API_SESAME_CONTROL_ENDPOINT.format(self.device_id)
        payload = {'type': 'lock'}
        response = self.account.request('POST', endpoint, payload=payload)
        if response is None:
            return False
        if response.status_code == 200 or response.status_code == 204:
            return True
        return False
1367894
private static void isrCallback(int pin) {
        // dispatch callback to the subscribers for this pin
        List<GpioInterruptCallback> callbacks = isrCallbacks[pin];

        // ensure callbacks collection exists for this pins number
        if(callbacks != null && !callbacks.isEmpty()){
            // iterate over each callback delegate and invoke the callback if the pin and edge type match
            for(GpioInterruptCallback callback : callbacks){
                callback.callback(pin);
            }
        }
    }
520709
function unlock()
    {
        if ( $fp = $this->fp() )
        {
            fclose( $fp );
            @unlink( $this->MetaFileName );
            @unlink( $this->FileName );
            $GLOBALS['eZMutex_FP_' . $this->FileName] = false;
        }
        return false;
    }