This will parse the VCF entry and also store it within the VCFFile. It will also
        return the VCFEntry as well.
423773
def add_entry(self, row):
        
        var_call = VCFEntry(self.individuals)
        var_call.parse_entry( row )
        self.entries[(var_call.chrom, var_call.pos)] = var_call
        return var_call
199940
def load_vcoef(filename):
    """"""

    with open(filename) as f: 
        lines = f.readlines()

        lst = lines[0].split(',')

        nmax = int(lst[0])
        mmax = int(lst[1])
        directivity = float(lst[2])

        L = (nmax + 1) + mmax * (2 * nmax - mmax + 1);

        vec1 = np.zeros(L, dtype=np.complex128)
        vec2 = np.zeros(L, dtype=np.complex128)
   
        lines.pop(0)

        n = 0
        in_vec2 = False
        for line in lines:

            if line.strip() == 'break':
                n = 0
                in_vec2 = True;
            else:
                lst = line.split(',')
                re = float(lst[0])
                im = float(lst[1])

                if in_vec2:
                    vec2[n] = re + 1j * im
                else:
                    vec1[n] = re + 1j * im

                n += 1

    return (sp.VectorCoefs(vec1, vec2, nmax, mmax), directivity)
1359905
def parse_networking_file():
    

    pairs = dict()
    allocated_subnets = []
    try:
        with open(VMWARE_NETWORKING_FILE, "r", encoding="utf-8") as f:
            version = f.readline()
            for line in f.read().splitlines():
                try:
                    _, key, value = line.split(' ', 3)
                    key = key.strip()
                    value = value.strip()
                    pairs[key] = value
                    if key.endswith("HOSTONLY_SUBNET"):
                        allocated_subnets.append(value)
                except ValueError:
                    raise SystemExit("Error while parsing {}".format(VMWARE_NETWORKING_FILE))
    except OSError as e:
        raise SystemExit("Cannot open {}: {}".format(VMWARE_NETWORKING_FILE, e))
    return version, pairs, allocated_subnets
1127092
def find_available_vc_vers(self):
        
        ms = self.ri.microsoft
        vckeys = (self.ri.vc, self.ri.vc_for_python, self.ri.vs)
        vc_vers = []
        for hkey in self.ri.HKEYS:
            for key in vckeys:
                try:
                    bkey = winreg.OpenKey(hkey, ms(key), 0, winreg.KEY_READ)
                except (OSError, IOError):
                    continue
                subkeys, values, _ = winreg.QueryInfoKey(bkey)
                for i in range(values):
                    try:
                        ver = float(winreg.EnumValue(bkey, i)[0])
                        if ver not in vc_vers:
                            vc_vers.append(ver)
                    except ValueError:
                        pass
                for i in range(subkeys):
                    try:
                        ver = float(winreg.EnumKey(bkey, i))
                        if ver not in vc_vers:
                            vc_vers.append(ver)
                    except ValueError:
                        pass
        return sorted(vc_vers)
99826
def _parse(self):
        

        # Check prefix and initial bracket of WFN
        if self._str[0:5] != CPE2_3_WFN.CPE_PREFIX:
            errmsg = "Bad-formed CPE Name: WFN prefix not found"
            raise ValueError(errmsg)

        # Check final backet
        if self._str[-1:] != "]":
            errmsg = "Bad-formed CPE Name: final bracket of WFN not found"
            raise ValueError(errmsg)

        content = self._str[5:-1]

        if content != "":
            # Dictionary with pairs attribute-value
            components = dict()

            # Split WFN in components
            list_component = content.split(CPEComponent2_3_WFN.SEPARATOR_COMP)

            # Adds the defined components
            for e in list_component:
                # Whitespace not valid in component names and values
                if e.find(" ") != -1:
                    msg = "Bad-formed CPE Name: WFN with too many whitespaces"
                    raise ValueError(msg)

                # Split pair attribute-value
                pair = e.split(CPEComponent2_3_WFN.SEPARATOR_PAIR)
                att_name = pair[0]
                att_value = pair[1]

                # Check valid attribute name
                if att_name not in CPEComponent.CPE_COMP_KEYS_EXTENDED:
                    msg = "Bad-formed CPE Name: invalid attribute name '{0}'".format(
                        att_name)
                    raise ValueError(msg)

                if att_name in components:
                    # Duplicate attribute
                    msg = "Bad-formed CPE Name: attribute '{0}' repeated".format(
                        att_name)
                    raise ValueError(msg)

                if not (att_value.startswith('"') and
                        att_value.endswith('"')):

                    # Logical value
                    strUpper = att_value.upper()
                    if strUpper == CPEComponent2_3_WFN.VALUE_ANY:
                        comp = CPEComponentAnyValue()
                    elif strUpper == CPEComponent2_3_WFN.VALUE_NA:
                        comp = CPEComponentNotApplicable()
                    else:
                        msg = "Invalid logical value '{0}'".format(att_value)
                        raise ValueError(msg)

                elif att_value.startswith('"') and att_value.endswith('"'):
                    # String value
                    comp = CPEComponent2_3_WFN(att_value, att_name)

                else:
                    # Bad value
                    msg = "Bad-formed CPE Name: invalid value '{0}'".format(
                        att_value)
                    raise ValueError(msg)

                components[att_name] = comp

            # Adds the undefined components
            for ck in CPEComponent.CPE_COMP_KEYS_EXTENDED:
                if ck not in components:
                    components[ck] = CPEComponentUndefined()

            # #######################
            #  Storage of CPE Name  #
            # #######################

            part_comp = components[CPEComponent.ATT_PART]
            if isinstance(part_comp, CPEComponentLogical):
                elements = []
                elements.append(components)
                self[CPE.KEY_UNDEFINED] = elements
            else:
                # Create internal structure of CPE Name in parts:
                # one of them is filled with identified components,
                # the rest are empty
                part_value = part_comp.get_value()
                # Del double quotes of value
                system = part_value[1:-1]
                if system in CPEComponent.SYSTEM_VALUES:
                    self._create_cpe_parts(system, components)
                else:
                    self._create_cpe_parts(CPEComponent.VALUE_PART_UNDEFINED,
                                           components)

        # Fills the empty parts of internal structure of CPE Name
        for pk in CPE.CPE_PART_KEYS:
            if pk not in self.keys():
                self[pk] = []
122148
def parse_line(line: str, char_index=0) -> Tuple[ListingType, str]:
    """"""

    entry_name = str.rpartition(line, ' ')[-1]
    entry_type = LISTING_FLAG_MAP.get(line[char_index], ListingType.other)
    return entry_type, entry_name
368100
def _parse_entry(entry, limit=10):
        

        entry = entry.split(",")
        label = entry[0]
        points = limit

        if len(entry) > 1:
            proc = float(entry[1].strip())
            points = limit * proc

        return label, int(points)
288025
def _Parse(self):
    """"""
    vshadow_store = self._file_entry.GetVShadowStore()

    self._AddAttribute(volume_system.VolumeAttribute(
        'identifier', vshadow_store.identifier))
    self._AddAttribute(volume_system.VolumeAttribute(
        'copy_identifier', vshadow_store.copy_identifier))
    self._AddAttribute(volume_system.VolumeAttribute(
        'copy_set_identifier', vshadow_store.copy_set_identifier))
    self._AddAttribute(volume_system.VolumeAttribute(
        'creation_time', vshadow_store.get_creation_time_as_integer()))

    volume_extent = volume_system.VolumeExtent(0, vshadow_store.volume_size)
    self._extents.append(volume_extent)
540352
def get_vcf_header(source):
    
    head = HeaderParser()
    #Parse the header lines
    for line in source:
        line = line.rstrip()
        if line.startswith('#'):
            if line.startswith('##'):
                logger.debug("Found metadata line {0}".format(line))
                head.parse_meta_data(line)
            else:
                logger.debug("Found header line {0}".format(line))
                head.parse_header_line(line)
        else:
            break
    
    return head
1157697
def parse(readDataInstance):
        
        d = Directory()
        d.rva.value = readDataInstance.readDword()
        d.size.value = readDataInstance.readDword()
        return d
828544
def read_data(self, variable_instance):
        
        if self.inst is None:
            return
        if variable_instance.visavariable.device_property.upper() == 'vrms_chan1':
            return self.parse_value(self.inst.query(':MEAS:ITEM? VRMS,CHAN1'))
        return None
1278519
def _parse(self):
        
        workdir = os.path.dirname(self.filename)
        logfile = os.path.join(workdir, "logfile")
        if not os.path.isfile(logfile):
            raise IOError("The ADF logfile can not be accessed!")

        self.is_failed = False
        self.error = None
        self.final_energy = None
        self.final_structure = None
        self.energies = []
        self.structures = []
        self.frequencies = []
        self.normal_modes = None
        self.freq_type = None
        self.run_type = None
        self.is_internal_crash = False

        self._parse_logfile(logfile)
        if not self.is_failed and self.run_type != "SinglePoint":
            self._parse_adf_output()
1353562
def parse_resource_entry(self, rva):
        """"""

        try:
            data = self.get_data( rva, Structure(self.__IMAGE_RESOURCE_DIRECTORY_ENTRY_format__).sizeof() )
        except PEFormatError, excp:
            # A warning will be added by the caller if this method returns None
            return None

        resource = self.__unpack_data__(
            self.__IMAGE_RESOURCE_DIRECTORY_ENTRY_format__, data,
            file_offset = self.get_offset_from_rva(rva) )
        
        if resource is None:
            return None
        
        #resource.NameIsString = (resource.Name & 0x80000000L) >> 31
        resource.NameOffset = resource.Name & 0x7FFFFFFFL
        
        resource.__pad = resource.Name & 0xFFFF0000L
        resource.Id = resource.Name & 0x0000FFFFL
        
        resource.DataIsDirectory = (resource.OffsetToData & 0x80000000L) >> 31
        resource.OffsetToDirectory = resource.OffsetToData & 0x7FFFFFFFL
        
        return resource
1063558
def parse(self, file_handle):
        '''
        
        '''
        # open the VCD file and create a token generator
        lineIterator = iter(enumerate(file_handle))
        tokeniser = ((lineNo, word) for lineNo, line in lineIterator
                     for word in line.split() if word)

        while True:
            token = next(tokeniser)
            # parse VCD until the end of definitions
            self.keyword_dispatch[token[1]](tokeniser, token[1])
            if self.end_of_definitions:
                break

        while True:
            try:
                lineNo, token = next(lineIterator)
            except StopIteration:
                break

            # parse changes
            c = token[0]
            if c == '$':
                # skip $dump* tokens and $end tokens in sim section
                continue
            elif c == '#':
                # [TODO] may be a float
                self.now = int(token[1:])
            else:
                sp = token.split()
                sp_len = len(sp)
                if sp_len == 1:
                    # 1 bit value
                    value = c
                    vcdId = token[1:]
                elif sp_len == 2:
                    # vectors and strings
                    value, vcdId = sp
                else:
                    raise VcdSyntaxError(
                        "Line %d: Don't understand: %s " % (lineNo, token))

                self.value_change(vcdId.strip(), value.strip())
814930
function parseVCF(text) {
    var lines = U.reject(text.split('\n'), function(line) {
      return line === '';
    });

    var partitions = U.partition(lines, function(line) {
      return line[0] === '#';
    });

    var header = parseHeader(partitions[0]),
        records = U.map(partitions[1], function(line) {
          return new Record(line, header);
        });

    return {header: header, records: records};
  }
135398
private JCheckBox getChkParseSVNEntries() {
		if (parseSVNEntries == null) {
			parseSVNEntries = new JCheckBox();
			parseSVNEntries.setText(Constant.messages.getString("spider.options.label.svnentries"));
		}
		return parseSVNEntries;
	}
49515
def bvlpdu_contents(self, use_dict=None, as_class=dict):
        """"""
        return key_value_contents(use_dict=use_dict, as_class=as_class,
            key_values=(
                ('function', 'DeleteForeignDeviceTableEntry'),
                ('address', str(self.bvlciAddress)),
            ))