This method creates an entry in this group.

        Compare to StdEntry for information about the arguments.

        One of the following arguments is needed:

        - title
        - url
        - username
        - password
        - comment
198243
def create_entry(self, title='', image=1, url='', username='', password='',
                      comment='', y=2999, mon=12, d=28, h=23, min_=59, s=59):
        

        return self.db.create_entry(self, title, image, url, username, 
                                    password, comment, y, mon, d, h, min_, s)
453847
def create(self, username, password, tags=''):
        
        user_payload = json.dumps({
            'password': password,
            'tags': tags
        })
        return self.http_client.put(API_USER % username,
                                    payload=user_payload)
796267
def create(cls, api, default_name=None, description=None):
        
        path = 'group'

        data = {}
        if default_name:
            data['default_group_name'] = default_name
        if description:
            data['description'] = description
        if api.domain:
            data['domain'] = api.domain

        response_data = api.request(path, data=data)

        id = response_data['group_id']
        group = cls(api, id)
        group.default_name = response_data['default_group_name']

        return group
486479
def import_entry(self, title, content, item_node):
        
        try:
            creation_date = datetime.strptime(
                item_node.find('{%s}post_date_gmt' % WP_NS).text,
                '%Y-%m-%d %H:%M:%S')
        except ValueError as error:
            print 'Import entry error: {}'.format(error)

            creation_date = datetime.now()

        if settings.USE_TZ:
            creation_date = timezone.make_aware(
                creation_date, pytz.timezone('GMT'))

        excerpt = strip_tags(item_node.find(
            '{%sexcerpt/}encoded' % WP_NS).text or '')
        if not excerpt:
            if self.auto_excerpt:
                excerpt = Truncator(strip_tags(content)).words(50)
            else:
                excerpt = ''

        # Prefer use this function than
        # item_node.find('{%s}post_name' % WP_NS).text
        # Because slug can be not well formated
        slug = slugify(title)[:255] or 'post-%s' % item_node.find(
            '{%s}post_id' % WP_NS).text

        entry_dict = {
            'title': title,
            'content': content,
            'excerpt': excerpt,
            'tags': ', '.join(self.get_entry_tags(item_node.findall(
                'category'))),
            'status': self.REVERSE_STATUS[item_node.find(
                '{%s}status' % WP_NS).text],
            'comment_enabled': item_node.find(
                '{%s}comment_status' % WP_NS).text == 'open',
            'pingback_enabled': item_node.find(
                '{%s}ping_status' % WP_NS).text == 'open',
            'featured': item_node.find('{%s}is_sticky' % WP_NS).text == '1',
            'password': item_node.find('{%s}post_password' % WP_NS).text or '',
            'login_required': item_node.find(
                '{%s}status' % WP_NS).text == 'private',
            'last_update': timezone.now()}
        entry_dict['trackback_enabled'] = entry_dict['pingback_enabled']

        entry, created = Entry.objects.get_or_create(
            slug=slug, creation_date=creation_date,
            defaults=entry_dict)
        if created:
            try:
                entry.categories.add(*self.get_entry_categories(
                    item_node.findall('category')))
                entry.authors.add(self.authors[item_node.find(
                    '{http://purl.org/dc/elements/1.1/}creator').text])
                entry.sites.add(self.SITE)
            except KeyError as error:
                print 'Import entry error: {}'.format(error)

        return entry, created
1372672
private void createNewUser() throws CmsException {

        //Password was checked by validator before
        String ou = m_ou.getValue();
        if (!ou.endsWith("/")) {
            ou += "/";
        }
        CmsUser user = m_cms.createUser(ou + m_loginname.getValue(), m_pw.getPassword1(), "", null);
        updateUser(user);
        m_cms.writeUser(user);
        if (!CmsStringUtil.isEmptyOrWhitespaceOnly(m_group.getValue())) {
            m_cms.addUserToGroup(user.getName(), m_group.getValue());
        }
        OpenCms.getRoleManager().addUserToRole(m_cms, (CmsRole)m_role.getValue(), user.getName());
        m_user = user;

    }
292095
def create_user(self, username, password, tags=""):
        
        path = Client.urls['users_by_name'] % username
        body = json.dumps({'password': password, 'tags': tags})
        return self._call(path, 'PUT', body=body,
                                 headers=Client.json_headers)
258879
def write_entry_to_file(file_descriptor, entry_comment, entry_key):
    
    escaped_key = re.sub(r'([^\\])"', '\\1\\"', entry_key)
    file_descriptor.write(u'/* %s */\n' % entry_comment)
    file_descriptor.write(u'"%s" = "%s";\n' % (escaped_key, escaped_key))
54334
def prompt(self):
        
        name = self.term.prompt_input('Enter page: /')
        if name:
            # Check if opening a submission url or a subreddit url
            # Example patterns for submissions:
            #     comments/571dw3
            #     /comments/571dw3
            #     /r/pics/comments/571dw3/
            #     https://www.reddit.com/r/pics/comments/571dw3/at_disneyland
            submission_pattern = re.compile(r'(^|/)comments/(?P<id>.+?)($|/)')

            match = submission_pattern.search(name)
            if match:
                url = 'https://www.reddit.com/comments/{0}'.format(match.group('id'))
                self.selected_page = self.open_submission_page(url)
            else:
                self.selected_page = self.open_subreddit_page(name)
660176
def create_group(self, name):
        
        name = to_text(name)
        return self.post(
            url="https://api.weixin.qq.com/cgi-bin/groups/create",
            data={"group": {
                "name": name
            }}
        )
229146
def new(cls,
            username,
            password=None,
            email=None,
            first_name="",
            last_name="",
            login_method=None,
            role="MEMBER"
            ):
        
        data = {
            "first_name": first_name,
            "last_name": last_name,
            "email": email
        }

        if not password:
            password = utils.generate_random_string()

        username = username.strip().lower()
        if "@" in username and not email:
            if not utils.is_email_valid(username):
                exceptions.AuthError(_("Invalid username"))
            data["email"] = username
        elif email:
            if not utils.is_email_valid(email):
                exceptions.AuthError(_("Invalid username"))

        if not utils.is_username_valid(username):
            exceptions.AuthError(_("Invalid username"))
        if not utils.is_password_valid(password):
            raise exceptions.AuthError(_("Password is invalid"))

        if cls.get_by_username(username):
            raise exceptions.AuthError(_("Username exists already"))
        _email = data.get("email")
        if _email:
            if cls.get_by_email(_email):
                raise exceptions.AuthError(_("Email address exists already"))

        role = AuthUserRole.get_by_name(role or "MEMBER")
        if not role:
            raise exceptions.AuthError(_("Invalid user role"))

        data.update({
            "username": username,
            "password_hash": cls.encrypt_password(password),
            "email_verified": False,
            "login_method": login_method,
            "role": role,
            "status": cls.STATUS_ACTIVE
        })
        user = cls.create(**data)
        user.reset_secret_key()
        return user
1063203
def move_entry(self, entry = None, group = None):
        

        if entry is None or group is None or type(entry) is not v1Entry or \
            type(group) is not v1Group:
            raise KPError("Need an entry and a group.")
        elif entry not in self.entries:
            raise KPError("No entry found.")
        elif group in self.groups:
            entry.group.entries.remove(entry)
            group.entries.append(entry)
            entry.group_id = group.id_
            entry.group = group
            return True
        else:
            raise KPError("No group found.")
1035749
def _create_entry(self, title, data, tags):
        
        status = False
        if data.get('link') and len(data.get('link')) > 0:
            wall = self.wall()
            if wall is not False:
                try:
                    wall.post_entries(url=data.get('link').encode(), title=title, tags=(tags.lower()))
                    logger.debug('wallabag {} created'.format(data.get('link')))
                    status = True
                except Exception as e:
                    logger.critical('issue with something else that a token link ? : {}'.format(data.get('link')))
                    logger.critical(e)
                    update_result(self.trigger_id, msg=e, status=False)
                    status = False
        else:
            status = True  # we ignore empty link
        return status
910895
def create(self, data={}, **kwargs):
        "
        url = self.base_url
        return self.post_url(url, data, **kwargs)
144659
def _create_chord_entry(task_id, task_class, message_body, user_id):
    
    args = message_body['args']
    kwargs = message_body['kwargs']
    arguments_dict = task_class.arguments_as_dict(*args, **kwargs)
    name = task_class.generate_name(arguments_dict)
    total_steps = task_class.calculate_total_steps(arguments_dict)
    parent_name = kwargs.get('user_task_name', '')
    chord_data = message_body['chord']
    group_id = message_body['taskset']
    with transaction.atomic():
        group, created = UserTaskStatus.objects.get_or_create(
            task_id=group_id, defaults={'is_container': True, 'name': parent_name, 'task_class': 'celery.group',
                                        'total_steps': total_steps, 'user_id': user_id})
        if created:
            # Also create a status for the chord as a whole
            chord = UserTaskStatus.objects.create(
                is_container=True, name=parent_name, task_class='celery.chord', task_id=str(uuid4()),
                total_steps=total_steps, user_id=user_id)
            group.parent = chord
            group.save(update_fields={'parent', 'modified'})
        else:
            chord = None
            group.increment_total_steps(total_steps)
            if parent_name and not group.name:
                group.set_name(parent_name)
        UserTaskStatus.objects.create(
            name=name, parent=group, task_class=task_class, task_id=task_id, total_steps=total_steps, user_id=user_id)
        # chord body task status
        if not created:
            # body being handled by another of the tasks in the header
            return
        task_id = chord_data['options']['task_id']
        body_task = chord_data['task']
        body_class = import_string(body_task).__class__
        if not issubclass(body_class, UserTaskMixin):
            return
        args = chord_data['args']
        kwargs = chord_data['kwargs']
        arguments_dict = body_class.arguments_as_dict(*args, **kwargs)
        name = body_class.generate_name(arguments_dict)
        total_steps = body_class.calculate_total_steps(arguments_dict)
        UserTaskStatus.objects.get_or_create(
            task_id=task_id, defaults={'name': name, 'parent': chord, 'task_class': body_task,
                                       'total_steps': total_steps, 'user_id': user_id})
        chord.increment_total_steps(total_steps)
55798
def group_create(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(keep_name=True, **kwargs)
    return cloud.create_group(**kwargs)
312494
private MongoCredential createCredentail(String group) {
		final Setting setting = this.setting;
		if(null == setting) {
			return null;
		}
		final String user = setting.getStr("user", group, setting.getStr("user"));
		final String pass = setting.getStr("pass", group, setting.getStr("pass"));
		final String database = setting.getStr("database", group, setting.getStr("database"));
		return createCredentail(user, database, pass);
	}
1225775
def register_entry(self, navbar_kwargs):
        
        # Add a new rule for each level in the path.
        path = navbar_kwargs.pop('path')
        # If a single object is used rather than an iterable (including
        # a single string), wrap it before using.
        if not hasattr(path, '__iter__') or isinstance(path, basestring):
            path = [path]

        entry_group = self.navbar_entries
        # HACK: I'd like to intelligently replace the URL rule in the
        # case where the intended rule is provided, but the function has
        # already created a blank "placeholder" rule for it. There are
        # probably nicer ways to approach this, but it works.
        for name, is_last in iter_islast(path):
            kwargs = deepcopy(navbar_kwargs)
            kwargs['name'] = name
            for existing_entry in entry_group:
                # If there's an existing entry for this "link", use it
                # instead of creating a new one. If this existing entry
                # has no rule and this is the last item in ``path``, the
                # rule was intended to be assigned to this entry, so
                # overwrite the blank rule with the one provided via
                # ``navbar_kwargs``.
                if existing_entry.name == name:
                    entry = existing_entry
                    if is_last:
                        entry.endpoint = kwargs['endpoint']
                    break
            else:
                # If we can't find an existing entry, create one with a
                # blank endpoint. If this rule is not the final one in
                # the list, the endpoint was not intended for this, so
                # don't assign it.
                if not is_last:
                    kwargs['endpoint'] = None
                entry = NavbarEntry(**kwargs)
                entry_group.add(entry)
            entry_group = entry.children