Generate a type of personality.

        :param category: Category.
        :return: Personality type.
        :rtype: str or int

        :Example:
            ISFJ.
494083
def personality(self, category: str = 'mbti') -> Union[str, int]:
        
        mbtis = ('ISFJ', 'ISTJ', 'INFJ', 'INTJ',
                 'ISTP', 'ISFP', 'INFP', 'INTP',
                 'ESTP', 'ESFP', 'ENFP', 'ENTP',
                 'ESTJ', 'ESFJ', 'ENFJ', 'ENTJ')

        if category.lower() == 'rheti':
            return self.random.randint(1, 10)

        return self.random.choice(mbtis)
1018324
def get_category(self, id, **data):
        
        
        return self.get("/categories/{0}/".format(id), data=data)
894202
def set_category(self, category: str = None) -> 'PygalleBaseClass':
        
        return self.set_internal(PygalleBaseClass.__KEYS.CATEGORY, category)
836712
def category(self, categories):
        
        if isinstance(categories, list):
            for c in categories:
                self.add_category(c)
        else:
            self.add_category(categories)
1115572
def arch_to_personality(arch):
    
    if isinstance(arch, bytes):
        arch = unicode(arch)
    return _lxc.arch_to_personality(arch)
76358
def interface_type(self, ift):
        
        if not isinstance(ift, str):
            ift = str(ift)
        self._attributes["if"] = ift
89647
def categories(self, value):
        

        if value is not None:
            assert type(value) is dict, "'{0}' attribute: '{1}' type is not 'dict'!".format("categories", value)
            for key, element in value.iteritems():
                assert type(key) is dict, "'{0}' attribute: '{1}' type is not 'dict'!".format("categories", key)
                assert type(element) is list, "'{0}' attribute: '{1}' type is not 'list'!".format(
                    "categories", element)
        self.__categories = value
922891
def get_new_category(self, api_category):
        
        return Category(site_id=self.site_id,
                        wp_id=api_category["ID"],
                        **self.api_object_data("category", api_category))
954597
def entity_categories(self, entity_id):
        
        attributes = self.entity_attributes(entity_id)
        return attributes.get(ENTITY_CATEGORY, [])
1244401
def get_regression_coefs(self, category, clf=ElasticNet()):
        ''' 
        '''
        self._fit_tfidf_model(category, clf)
        return clf.coef_
400237
public static UICategory create(String... categories)
   {
      if (categories == null || categories.length == 0)
      {
         return new UICategoryImpl(DEFAULT, null);
      }
      else if (categories.length == 1)
      {
         return new UICategoryImpl(categories[0], null);
      }
      else
      {
         return new UICategoryImpl(categories[0], Categories.create(Arrays.copyOfRange(categories, 1,
                  categories.length)));
      }
   }
914721
def get_one_meth_category(self, category, all_codes, code_types):
        
        categories = Series(code_types[code_types[category] == True].index)
        cond = all_codes['dtype'].isin(categories)
        codes = all_codes[cond]
        return codes
799405
def create(self, **kwargs):
        

        response = self.ghost.execute_post('%s/' % self._type_name, json={
            self._type_name: [
                kwargs
            ]
        })

        return self._model_type(response.get(self._type_name)[0])
607521
def create_atype(self, ):
        
        name = self.name_le.text()
        desc = self.desc_pte.toPlainText()
        try:
            atype = djadapter.models.Atype(name=name, description=desc)
            atype.save()
            for prj in self.projects:
                atype.projects.add(prj)
            self.atype = atype
            self.accept()
        except:
            log.exception("Could not create new assettype")
1152124
def set_category(self, category):
        
        pcategory = self.find("general/category")
        pcategory.clear()
        name = ElementTree.SubElement(pcategory, "name")
        if isinstance(category, Category):
            id_ = ElementTree.SubElement(pcategory, "id")
            id_.text = category.id
            name.text = category.name
        elif isinstance(category, basestring):
            name.text = category
992005
def file_extension(self, category=None):
        
        category = category if category else self.random_element(
            list(self.file_extensions.keys()))
        return self.random_element(self.file_extensions[category])
1143329
def for_category(self, category, context=None):
        
        assert self.installed(), "Actions not enabled on this application"
        actions = self._state["categories"].get(category, [])

        if context is None:
            context = self.context

        return [a for a in actions if a.available(context)]