``True`` if achievement is unlocked.

        :rtype: bool
325300
def unlocked(self):
        
        achieved = CRef.cbool()
        result = self._iface.get_ach(self.name, achieved)

        if not result:
            return False

        return bool(achieved)
179797
protected function isCompletedAchievement(Achievement $achievement): bool
    {
        $completedCriterias = array_filter($achievement->criterias(), function (AchievementCriteria $criteria) {
            return $this->isCompletedCriteria($criteria, $criteria->progress());
        });

        return count($achievement->criterias()) === count($completedCriterias);
    }
661672
def unlock(self):
        
        if isinstance(self._session, manager.Manager):
            self._session.unlock()
433548
protected function isCompletedCriteria(AchievementCriteria $criteria, AchievementCriteriaProgress $progress): bool
    {
        $progress->completed = $progress->value >= $criteria->maxValue();

        return $progress->completed;
    }
320356
def notifySolved(self, identifier, title):
        
        notify(self.workbench, u"Congratulations", u"Congratulations! You "
               "have completed the '{title}' exercise.".format(title=title))
        return {}
351664
def not_completed(f):
    

    @wraps(f)
    def check_if_complete(cls, *args, **kwargs):
        if cls.is_complete:
            raise FMBaseError('Transfer already completed.')

        return f(cls, *args, **kwargs)

    return check_if_complete
982190
public function syncAchievements()
    {
        /** @var Collection $locked */
        $locked = AchievementDetails::getUnsyncedByAchiever($this);
        $self = $this;
        $locked->each(function ($el) use ($self) {
            $progress = new AchievementProgress();
            $progress->details()->associate($el);
            $progress->achiever()->associate($this);
            $progress->points = 0;
            $progress->save();
        });
    }
652149
public function save(array $options = [])
    {
        if (is_null($this->id)) {
            $this->id = Uuid::uuid4()->toString();
        }
        $recently_unlocked = false;
        if (is_null($this->unlockedAt) && $this->isUnlocked()) {
            $recently_unlocked = true;
            $this->points = $this->details->points;
            $this->unlocked_at = Carbon::now();
        }

        $result = parent::save($options);

        // Gets the achievement class for this progress
        $class = $this->details->getClass();

        if ($recently_unlocked) {
            // Runs the callback set to run when the achievement is unlocked.
            $class->triggerUnlocked($this);
        } elseif ($this->points >= 0) {
            // Runs the callback set to run when progress has been made on the achievement.
            $class->triggerProgress($this);
        }

        return $result;
    }
366377
def _check_stage_complete(self):
        

        try:

            for task in self._tasks:
                if task.state not in [states.DONE, states.FAILED]:
                    return False

            return True

        except Exception, ex:
            raise EnTKError(ex)
137292
async def unlock(self, device):
        
        device = self._find_device(device)
        if not self.is_handleable(device) or not device.is_crypto:
            self._log.warn(_('not unlocking {0}: unhandled device', device))
            return False
        if device.is_unlocked:
            self._log.info(_('not unlocking {0}: already unlocked', device))
            return True
        if not self._prompt:
            self._log.error(_('not unlocking {0}: no password prompt', device))
            return False
        unlocked = await self._unlock_from_cache(device)
        if unlocked:
            return True
        unlocked = await self._unlock_from_keyfile(device)
        if unlocked:
            return True
        options = dict(allow_keyfile=self.udisks.keyfile_support,
                       allow_cache=self._cache is not None,
                       cache_hint=self._cache_hint)
        password = await self._prompt(device, options)
        # password can be: None, str, or udiskie.prompt.PasswordResult
        cache_hint = getattr(password, 'cache_hint', self._cache_hint)
        password = getattr(password, 'password', password)
        if password is None:
            self._log.debug(_('not unlocking {0}: cancelled by user', device))
            return False
        if isinstance(password, bytes):
            self._log.debug(_('unlocking {0} using keyfile', device))
            await device.unlock_keyfile(password)
        else:
            self._log.debug(_('unlocking {0}', device))
            await device.unlock(password)
        self._update_cache(device, password, cache_hint)
        self._log.info(_('unlocked {0}', device))
        return True
642989
def unlock(self, store=True):
        
        result = self._iface.ach_unlock(self.name)
        result and store and self._store()
        return result
142419
public function isUnlocked()
    {
        if (!is_null($this->unlockedAt)) {
            return true;
        }
        if ($this->points >= $this->details->points) {
            return true;
        }
        return false;
    }
1336962
def check_hook_mechanism_is_intact(module):
    
    result = True
    if check_register_present(module):
        result = not result
    if check_deregister_present(module):
        result = not result
    return result
233362
def is_complete(self):
        
        qstat = self._grep_qstat('complete')
        comp = self._grep_status('complete')
        if qstat and comp:
            return True
        return False
737763
def check_status(self, **kwargs):
        
        for work in self:
            work.check_status()

        if kwargs.pop("show", False):
            self.show_status(**kwargs)
67599
def release_lock(self):
    
    if not self._lock.acquired:
      return False
    else:
      self._lock.release()
      return True
743669
def is_won(grid):
    ""
    p, q = grid
    return any(way == (way & q) for way in ways_to_win)