Return a individual object
        
            Args:
                ind_id (str): A individual id
            
            Returns:
                individual (puzzle.models.individual)
765054
def individual(self, ind_id=None):
        
        for ind_obj in self.individuals:
            if ind_obj.ind_id == ind_id:
                return ind_obj
        return None
745986
def insertIndividual(self, individual):
        
        try:
            models.Individual.create(
                id=individual.getId(),
                datasetId=individual.getParentContainer().getId(),
                name=individual.getLocalId(),
                description=individual.getDescription(),
                created=individual.getCreated(),
                updated=individual.getUpdated(),
                species=json.dumps(individual.getSpecies()),
                sex=json.dumps(individual.getSex()),
                attributes=json.dumps(individual.getAttributes()))
        except Exception:
            raise exceptions.DuplicateNameException(
                individual.getLocalId(),
                individual.getParentContainer().getLocalId())
352987
def get_object_id(obj):
    """"""
    try:
        idx = objIds.index(obj)
        return idx + 1
    except ValueError:
        objIds.append(obj)
        return len(objIds)
1058574
def get_user(self, user_id):
        
        user_model = get_user_model()
        try:
            return user_model.objects.get(id=user_id)
        except user_model.DoesNotExist:
            return None
1010762
def get_by_id(cls, id):
        

        if any((isinstance(id, basestring) and id.isdigit(), isinstance(id,
               (int, float)))):
            return cls.query.get(int(id))
        return None
787173
def _get_id(self):
        """"""
        ret = None
        row = self.row
        if row:
            ret = row["id"]
        return ret
924016
def get_title_or_id_from_uid(uid):
    
    obj = api.get_object_by_uid(uid, default=None)
    if obj is None:
        return ""
    title_or_id = api.get_title(obj) or api.get_id(obj)
    return title_or_id
1290541
def id(self):
        
        if self._id is None:
            self._id = int(self._element.get('id'))
        return self._id
762247
def runGetIndividual(self, id_):
        
        compoundId = datamodel.BiosampleCompoundId.parse(id_)
        dataset = self.getDataRepository().getDataset(compoundId.dataset_id)
        individual = dataset.getIndividual(id_)
        return self.runGetRequest(individual)
426750
def addIndividual(self, individual):
        
        id_ = individual.getId()
        self._individualIdMap[id_] = individual
        self._individualIds.append(id_)
        self._individualNameMap[individual.getName()] = individual
841837
def _get_one(self, id):
        
        try:
            return self._to_dict(models.User.objects.get(pk=id))
        except models.User.DoesNotExist:
            raise errors.NotFound()
38407
def get(self, id):
        
        id = self.as_id(id)
        url = '%s/%s' % (self, id)
        response = self.http.get(url, auth=self.auth)
        response.raise_for_status()
        return response.json()
20521
function getId(id){
        if(_.isObject(id) && !_.isUndefined(id.id)){
            if (objectIdRegex.test(id.id)) {
                id = id.id;
            }
            else {
                id = null;
            }
        }
        return id;
    }
184002
def get_instance(model, instance_id):
    
    try:
        model = get_model(model)
    except ImportError:
        return None

    return model.query.get(instance_id)
1305937
def get(self, id):
        
        try:
            if self.request.headers.get("Id"):
                object_ = yield self.client.find_one({self.request.headers.get("Id"): id})
            else:
                object_ = yield self.client.find_one_by_id(id)

            if object_:
                self.write(object_)
                return

            self.raise_error(404, "%s/%s not found" % (self.object_name, id))

        except InvalidId as ex:
            self.raise_error(400, message="Your ID is malformed: %s" % id)
        except Exception as ex:
            self.logger.error(ex)
            self.raise_error()
1355461
def individual(ind_id):
    """"""
    individual_obj = app.db.individual(ind_id)
    return render_template('individual.html', individual=individual_obj)
544520
def int_id(self):
        ""
        id_or_name = self.id_or_name
        if id_or_name is not None and isinstance(id_or_name, int):
            return id_or_name
        return None