Prompts the user to create a new profile.
425681
def createProfile(self, profile=None, clearLayout=True):
        
        if profile:
            prof = profile
        elif not self.viewWidget() or clearLayout:
            prof = XViewProfile()
        else:
            prof = self.viewWidget().saveProfile()
        
        blocked = self.signalsBlocked()
        self.blockSignals(False)
        changed = self.editProfile(prof)
        self.blockSignals(blocked)
        
        if not changed:
            return
        
        act = self.addProfile(prof)
        act.setChecked(True)
        
        # update the interface
        if self.viewWidget() and (profile or clearLayout):
            self.viewWidget().restoreProfile(prof)
        
        if not self.signalsBlocked():
            self.profileCreated.emit(prof)
            self.profilesChanged.emit()
1051527
def profile():
    """"""
    # Create forms
    verification_form = VerificationForm(formdata=None, prefix="verification")
    profile_form = profile_form_factory()

    # Process forms
    form = request.form.get('submit', None)
    if form == 'profile':
        handle_profile_form(profile_form)
    elif form == 'verification':
        handle_verification_form(verification_form)

    return render_template(
        current_app.config['USERPROFILES_PROFILE_TEMPLATE'],
        profile_form=profile_form,
        verification_form=verification_form,)
1158018
def users_request_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/users/request_create.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
745256
def app_restart(name, profile, **kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('app:restart', **{
        'node': ctx.repo.create_secure_service('node'),
        'locator': ctx.locator,
        'name': name,
        'profile': profile,
    })
247785
def create_user(self, **kwargs):
        """"""
        kwargs = self._prepare_create_user_args(**kwargs)
        user = self.user_model(**kwargs)
        return self.put(user)
1259154
def saveProfileAs( self ):
        
        name, ok = QInputDialog.getText(self, 'Create Profile', 'Name:')
        if ( not name ):
            return
        
        manager = self.parent()
        prof    = manager.viewWidget().saveProfile()
        prof.setName(nativestring(name))
        self.parent().addProfile(prof)
572390
def users_profile_set(self, **kwargs) -> SlackResponse:
        """"""
        self._validate_xoxp_token()
        return self.api_call("users.profile.set", json=kwargs)
886121
def change_profile(self, profile_name):
        """"""
        self._server_side_completer = self._create_server_side_completer(
            session=botocore.session.Session(profile=profile_name))
872987
function addPrefs(profile, options) {
  var userPrefs = options.prefs || {};

  return when.promise(function(resolve, reject) {
    Object.keys(userPrefs).forEach(function(key) {
      profile.setPreference(key, userPrefs[key]);
    });
    profile.updatePreferences();
    resolve(profile);
  });
}
269091
def create(self, user: str, *,
               pwd: str, sgrp: str, comment: str=None) -> None:
        """"""
        data = {
            'action': 'add',
            'user': user,
            'pwd': pwd,
            'grp': 'users',
            'sgrp': sgrp
        }

        if comment:
            data['comment'] = comment

        self._request('post', URL, data=data)
1203735
public function create($name, $scratchDir, $processor, $namer, array $sources, array $destinations)
    {
        return new Profile(
            $name,
            $scratchDir,
            $this->getProcessor($processor),
            $this->getNamer($namer),
            $this->getSources($sources),
            $this->getDestinations($destinations)
        );
    }
120570
def update_profile(self, about_me=None, display_name=None, email=None, first_name=None, gender=None, last_name=None,
                       mobile_number=None, relationship_status=None, title=None, where_am_i=None,
                       scope='profile/write'):
        

        data = {}
        if about_me:
            data['AboutMe'] = about_me
        if display_name:
            data['DisplayName'] = display_name
        if email:
            data['Email'] = email
        if first_name:
            data['FirstName'] = first_name
        if gender:
            data['Gender'] = gender
        if last_name:
            data['LastName'] = last_name
        if mobile_number:
            data['MobileNumber'] = mobile_number
        if relationship_status:
            data['RelationshipStatus'] = relationship_status
        if title:
            data['Title'] = title
        if where_am_i:
            data['WhereAmI'] = where_am_i

        if data:
            _put(
                token=self.oauth.get_user_token(scope),
                uri='/user/profile',
                data=data
            )
688787
function createProfile(done) {
            if (self.closed) return done(null);

            temp.mkdir('browser-controller', function(err, dirpath) {
                if (err) return done(err);

                self.userDir = dirpath;

                done(null);
            });
        }
484755
def add_profile(self, profile, selected):
        """"""
        report = Report(profile)
        report.selected = selected
        if selected:
            self.report['settings']['selected_profiles'].append(report.name)
            self.report['settings']['selected_profile_count'] += 1
        self.report['settings']['total_profile_count'] += 1
        self.profiles.setdefault(report.name, report)
        return report
425037
public static void main(String[] args) throws InterruptedException {
    UserProfileExample example = new UserProfileExample();

    // Let's create some user profiles
    example.create("John", "Doe", true);
    example.create("Jane", "Doe", false);
    example.create("Foo", "Bar", false);

    // Now print those user profiles. This doesn't include actions
    example.printUserProfies();

    // Now we'll add some user actions to each user
    example.addAction("Jane", "Doe", "last_login", "2013-07-30 00:00:00");
    example.addAction("Jane", "Doe", "ad_click", "example.com_ad_id");
    example.addAction("Foo", "Bar", "last_login", "2013-07-30 00:00:00");

    // Print the user profiles and actions for the Does. This will include the
    // above actions, as well as a profile_created action set when creating the
    // user profiles.
    example.printUserProfileActionsForLastName("Doe");

    // Update Jane to a married status.
    example.updateUserProfile("Jane", "Doe", true);

    // Reprint the user profiles and actions. Jane should now have married true,
    // as well as a new profile_updated timestamp.
    example.printUserProfileActionsForLastName("Doe");
  }
962730
def create_user(self, **kwargs):
        """"""
        roles = kwargs.pop('roles', [])
        user = self.user_model(**self._prepare_create_user_args(**kwargs))
        user = self.put(user)
        for role in roles:
            self.add_role_to_user(user, role)
        self.put(user)
        return user
215434
def add_profile(self, namespace, key, value, force=False):
        
        try:
            entry = dax.Profile(namespace, key, value)
            self._dax_node.addProfile(entry)
        except dax.DuplicateError:
            if force:
                # Replace with the new key
                self._dax_node.removeProfile(entry)
                self._dax_node.addProfile(entry)