Get part number.
436289
def delete(cls, mp, part_number):
        """"""
        return cls.query.filter_by(
            upload_id=mp.upload_id,
            part_number=part_number
        ).delete()
311363
def elements(self):
        """"""
        offset = self.EXTRA_DIGITS
        if offset:
            return (self._id[:offset], self.company_prefix, self._reference,
                    self.check_digit)
        else:
            return (self.company_prefix, self._reference, self.check_digit)
91936
def type(self):
        """"""
        if isinstance(self.value, numbers.Number):
            return "number"
        if isinstance(self.value, basestring):
            return "string"
        return "unknown"
822588
def get_number(self, num, table=None):
        """"""
        if table is None: table = self.main_table
        self.own_cursor.execute('SELECT * from "%s" LIMIT 1 OFFSET %i;' % (self.main_table, num))
        return self.own_cursor.fetchone()
1192228
def get_parts(self, parts=None, reference_level=0):
        """"""
        if parts is None:
            parts = list()
            new_reference_level = reference_level
        else:
            self._level_in_section = self._level + reference_level
            new_reference_level = self._level_in_section
            parts.append(self.my_osid_object)
        if self._child_parts is None:
            if self.has_magic_children():
                self.generate_children()
            else:
                return parts
        for part in self._child_parts:
            part.get_parts(parts, new_reference_level)
            # Don't need to append here, because parts is passed by reference
            # so appending is redundant
            # child_parts = part.get_parts(parts, new_reference_level)
            # known_part_ids = [str(part.ident) for part in parts]
            #
            # for child_part in child_parts:
            #     if str(child_part.ident) not in known_part_ids:
            #         parts.append(child_part)
            #         known_part_ids.append(str(child_part.ident))
        return parts
1060834
def get_match_number(self, pattern, case=False, regexp=False):
        """"""
        position = self.textCursor().position()
        source_text = self.get_text(position_from='sof', position_to=position)
        match_number = self.get_number_matches(pattern,
                                               source_text=source_text,
                                               case=case, regexp=regexp)
        return match_number
507902
def serial_number(self):
        
        if self._serial_number is None:
            self._serial_number = util.get_string(self, self.iSerialNumber)
        return self._serial_number
788827
def parse_partlist(str):
    '''
    '''
    lines = str.strip().splitlines()
    lines = filter(len, lines)
    hind = header_index(lines)
    if hind is None:
        log.debug('empty partlist found')
        return ([], [])

    header_line = lines[hind]
    header = header_line.split('  ')
    header = filter(len, header)
    positions = [header_line.index(x) for x in header]
    header = [x.strip().split()[0].lower() for x in header]

    data_lines = lines[hind + 1:]

    def parse_data_line(line):
        y = [(h, line[pos1:pos2].strip()) for h, pos1, pos2 in zip(
            header, positions, positions[1:] + [1000])]
        return dict(y)

    data = [parse_data_line(x) for x in data_lines]
    return (header, data)
170999
def get(self, roleId):
        """"""
        role = db.Role.find_one(Role.role_id == roleId)

        if not role:
            return self.make_response('No such role found', HTTP.NOT_FOUND)

        return self.make_response({'role': role})
910474
def get_by_details(self, name, type, clazz):
        """"""
        entry = DNSEntry(name, type, clazz)
        return self.get(entry)
524744
def repr_part(self):
        """"""
        optargs = [('weighting', array_str(self.array, nprint=10), ''),
                   ('exponent', self.exponent, 2.0)]
        return signature_string([], optargs, sep=',\n',
                                mod=[[], ['!s', ':.4']])
759042
def getCountLT(self, item):
        """"""
        index = bisect.bisect_left(self._list, item)
        return index
731308
def retrieve():
    """"""
    a = TpPd(pd=0x3)
    b = MessageType(mesType=0x1c)  # 00011100
    packet = a / b
    return packet
1038356
def get(self, item):
        """"""
        uri = "/%s/%s" % (self.uri_base, utils.get_id(item))
        return self._get(uri)
782964
def get_num_part_files():
    """"""
    num_parts = 0
    for filename in os.listdir(os.getcwd()):
        if filename.startswith('PART') and filename.endswith('.html'):
            num_parts += 1
    return num_parts
1160825
public function getPart($part)
    {
        return isset($this->parts[$part]) ? $this->parts[$part] : null;
    }
716589
def get_number(self):
        '''
        
        '''
        number = None
        start = self.get_char('0123456789.-')
        if start:
            number = start
            finish = self.get_chars('-e0123456789.')
            if finish:
                number += finish
        if any(c in number for c in '.e'):
            return float(number)
        else:
            return int(number)