Adds the inputed profile to the system.
        
        :param      profile | <XViewProfile>
439539
def removeProfile(self, profile):
        
        if not profile in self._profiles:
            return
        
        index = self._profiles.index(profile)
        self._profiles.remove(profile)
        self._profileCombo.blockSignals(True)
        self._profileCombo.takeItem(index)
        self._profileCombo.blockSignals(False)
324927
public Governator addProfiles(Collection<String> profiles) {
        if (profiles != null) {
            this.profiles.addAll(profiles);
        }
        return this;
    }
469430
def StartProfiling(self, configuration, identifier):
    
    if not configuration:
      return

    if configuration.HaveProfileTasks():
      self._tasks_profiler = profilers.TasksProfiler(identifier, configuration)
      self._tasks_profiler.Start()
864159
def fromProfile(cls, profile):
        
        session = bones.SessionAPI.fromProfile(profile)
        return cls(session)
682638
def profile(self, new_profile):
        
        if not isinstance(new_profile, FirefoxProfile):
            new_profile = FirefoxProfile(new_profile)
        self._profile = new_profile
51428
public AccountHeaderBuilder addProfiles(@NonNull IProfile... profiles) {
        if (this.mProfiles == null) {
            this.mProfiles = new ArrayList<>();
        }
        if (mDrawer != null) {
            mDrawer.mDrawerBuilder.idDistributor.checkIds(profiles);
        }
        Collections.addAll(this.mProfiles, profiles);

        return this;
    }
191154
private void putInCache(UserProfile profile)
   {
      cache.put(profile.getUserName(), profile, CacheType.USER_PROFILE);
   }
955799
def load_profiles(self, overwrite=False):
        
        for profile in self.minimum_needs.get_profiles(overwrite):
            self.profile_combo.addItem(profile)
        minimum_needs = self.minimum_needs.get_full_needs()
        self.profile_combo.setCurrentIndex(
            self.profile_combo.findText(minimum_needs['profile']))
683534
def profile(self, profile):
        
        # clear staging data
        self._staging_data = None
        # retrieve language from install.json or assume Python
        lang = profile.get('install_json', {}).get('programLanguage', 'PYTHON')
        # load instance of ArgBuilder
        profile_args = ArgBuilder(lang, self.profile_args(profile.get('args')))
        # set current profile
        self._profile = profile
        # attach instance to current profile
        self._profile['profile_args'] = profile_args
        # load tcex module after current profile is set
        self.load_tcex()
        # select report for current profile
        self.reports.profile(profile.get('profile_name'))
        # create required directories for tcrun to function
        self._create_tc_dirs()
1354585
def load_profiles_from_file(self, fqfn):
        
        if self.args.verbose:
            print('Loading profiles from File: {}{}{}'.format(c.Style.BRIGHT, c.Fore.MAGENTA, fqfn))
        with open(fqfn, 'r+') as fh:
            data = json.load(fh)
            for profile in data:
                # force update old profiles
                self.profile_update(profile)
                if self.args.action == 'validate':
                    self.validate(profile)
            fh.seek(0)
            fh.write(json.dumps(data, indent=2, sort_keys=True))
            fh.truncate()

        for d in data:
            if d.get('profile_name') in self.profiles:
                self.handle_error(
                    'Found a duplicate profile name ({}).'.format(d.get('profile_name'))
                )
            self.profiles.setdefault(
                d.get('profile_name'),
                {'data': d, 'ij_filename': d.get('install_json'), 'fqfn': fqfn},
            )
429224
protected function _setProfile() {
        $projectName = basename(dirname(realpath(APPLICATION_PATH)));
        $profileName = $projectName . '_' . APPLICATION_ENV;

        $this->_profile = $profileName;
    }
115483
public <F> void updateProfileField(ProfileField<F, ?> field, F value) {
		if (field.isSingle()) {
			getResourceFactory()
					.getApiResource("/user/profile/" + field.getName())
					.entity(new ProfileFieldSingleValue<F>(value),
							MediaType.APPLICATION_JSON_TYPE).put();
		} else {
			getResourceFactory()
					.getApiResource("/user/profile/" + field.getName())
					.entity(new ProfileFieldMultiValue<F>(value),
							MediaType.APPLICATION_JSON_TYPE).put();
		}
	}
1146676
def setProfiles(self, profiles):
        
        self.blockSignals(True)
        self._profileCombo.blockSignals(True)
        
        self._profiles = profiles[:]
        self._profileCombo.clear()
        self._profileCombo.addItems(map(lambda x: x.name(), profiles))
        
        self._profileCombo.blockSignals(False)
        self.blockSignals(False)
300325
def initializeProfile(self):
        

        LOGGER.debug("> Building '{0}' profile.".format(self.__file))

        sections_file_parser = SectionsFileParser(self.__file)
        sections_file_parser.parse()

        if sections_file_parser.sections:
            fileStructureParsingError = lambda attribute: foundations.exceptions.FileStructureParsingError(
                "{0} | No '{1}' attribute found, '{2}' file structure seems invalid!".format(
                    self.__class__.__name__, attribute, self.__file))

            self.__directory = os.path.dirname(self.__file)
            self.__name = sections_file_parser.get_value("Name", "Component", default=None)
            if self.__name is None:
                raise fileStructureParsingError("Name")

            self.__title = sections_file_parser.get_value("Title", "Component", default=None)
            if self.__title is None:
                self.__title = self.__name

            self.__package = sections_file_parser.get_value("Module", "Component", default=None)
            if self.__package is None:
                raise fileStructureParsingError("Module")

            self.__attribute = sections_file_parser.get_value("Object", "Component", default=None)
            if self.__attribute is None:
                raise fileStructureParsingError("Object")

            self.__require = sections_file_parser.get_value("Require", "Component", default=None)
            self.__require = list() if self.__require is None else self.__require.split("|")

            self.__version = sections_file_parser.get_value("Version", "Component", default=None)
            if self.__version is None:
                raise fileStructureParsingError("Version")

            self.__author = sections_file_parser.get_value("Author", "Informations", default=None)

            self.__email = sections_file_parser.get_value("Email", "Informations", default=None)

            self.__url = sections_file_parser.get_value("Url", "Informations", default=None)

            self.__description = sections_file_parser.get_value("Description", "Informations", default=None)

            return True
        else:
            raise foundations.exceptions.FileStructureParsingError(
                "{0} | No sections found, '{1}' file structure seems invalid!".format(self.__class__.__name__,
                                                                                      self.__file))
886121
def change_profile(self, profile_name):
        """"""
        self._server_side_completer = self._create_server_side_completer(
            session=botocore.session.Session(profile=profile_name))
108181
def set_icc_profile(self, profile=None, name='ICC Profile'):
        
        if isinstance(profile, (basestring, bytes)):
            icc_profile = [name, profile]
        # TODO: more check
        else:
            icc_profile = profile

        if not icc_profile[0]:
            raise Error("ICC profile should have a name")
        elif not isinstance(icc_profile[0], bytes):
            icc_profile[0] = strtobytes(icc_profile[0])
        self.icc_profile = icc_profile
591180
def do_profile(self,args):
        
        parser = CommandArgumentParser("profile")
        parser.add_argument(dest="profile",help="Profile name")
        parser.add_argument('-v','--verbose',dest="verbose",action='store_true',help='verbose')
        args = vars(parser.parse_args(args))

        profile = args['profile']
        verbose = args['verbose']
        if verbose:
            print "Selecting profile '{}'".format(profile)

        selectedProfile = {}
        if profile in Config.config['profiles']:
            selectedProfile = Config.config['profiles'][profile]

        selectedProfile['name'] = profile
        Config.config['selectedProfile'] = selectedProfile

        awsProfile = profile
        if 'awsProfile' in selectedProfile:
            awsProfile = selectedProfile['awsProfile']
        AwsConnectionFactory.resetInstance(profile=awsProfile)