Returns the corrections applied to a particular entry.

        Args:
            entry: A ComputedEntry object.

        Returns:
            ({correction_name: value})
1548
def get_corrections_dict(self, entry):
        
        corrections = {}
        for c in self.corrections:
            val = c.get_correction(entry)
            if val != 0:
                corrections[str(c)] = val
        return corrections
1110979
def entry(name)
      entry = @zip.find_entry(name)
      raise NotFoundError, "'#{name}'" if entry.nil?
      return entry
    end
844494
def get_form_energy(self, entry):
        
        c = entry.composition
        return entry.energy - sum([c[el] * self.el_refs[el].energy_per_atom
                                   for el in c.elements])
799829
def get_correction(self, entry):
        
        # TODO: add smarter defect level shifting based on defect level projection onto host bands
        hybrid_cbm = entry.parameters["hybrid_cbm"]
        hybrid_vbm = entry.parameters["hybrid_vbm"]
        vbm = entry.parameters["vbm"]
        cbm = entry.parameters["cbm"]
        num_hole_vbm = entry.parameters["num_hole_vbm"]
        num_elec_cbm = entry.parameters["num_elec_cbm"]

        self.metadata["vbmshift"] = hybrid_vbm - vbm  # note vbmshift has UPWARD as positive convention
        self.metadata["cbmshift"] = hybrid_cbm - cbm  # note cbmshift has UPWARD as positive convention

        charge = entry.charge
        vbm_shift_correction = charge * self.metadata["vbmshift"]
        # negative sign has to do with fact that these are holes
        hole_vbm_shift_correction = -1. * num_hole_vbm * self.metadata["vbmshift"]
        elec_cbm_shift_correction = num_elec_cbm * self.metadata["cbmshift"]

        entry.parameters["bandshift_meta"] = dict(self.metadata)

        return {
            "vbm_shift_correction": vbm_shift_correction,
            "hole_vbm_shift_correction": hole_vbm_shift_correction,
            "elec_cbm_shift_correction": elec_cbm_shift_correction
        }
958499
def __parse_entry(entry_line):
    
    if entry_line.startswith("!"):
        entry_line = sub(r"!\w*?_", '', entry_line)
    else:
        entry_line = entry_line.strip()[1:]
    try:
        entry_type, entry_name = [i.strip() for i in entry_line.split("=", 1)]
    except ValueError:
        entry_type = [i.strip() for i in entry_line.split("=", 1)][0]
        entry_name = ''
    return entry_type, entry_name
68833
def get_value(self,
                  entry_name: Text,
                  entry_lines: Sequence[Text]) -> Optional[Text]:
        """"""
        # Search through all lines and return the first matching one
        for line in entry_lines:
            match = self._regex.match(line)
            if match:
                return match.group(1)
        # nothing matched
        return None
830877
function encodeGlossaryEntry(entry) {
    return {
        id: entry.getID(),
        name: entry.getName(),
        description: entry.getDescription()
    };
}
1255860
def get_entry_for(entry, language)
      if entry.length > 1
        entry_string = get_entry_for_rec(entry[1..-1], language, hashes[language][entry[0]])
      else
        entry_string = hashes[language][entry[0]]
      end

      if entry_string.kind_of?(Array)
        entry_string = entry_string.map(&:inspect).join(', ')
      end
      entry_string
    end
1180518
def parse_entry(self, entry):
        """"""
        entry = entry.split('\t')
        self.chrom, self.pos, self.id, self.ref, alt_, self.qual, filter_, info, self.format = entry[:9]
        self.samples = entry[9:]
        self.alt = alt_.split(',')
        if filter_ == 'PASS' or filter_ == '.':
            self.passed = True
        else:
            self.passed = filter_.split(';')
        self.info = info
        # currently unused
        #if info != '.':
            #info_l = info.split(';')
            #self.info = [v.split('=') if '=' in v else (v,1) for v in info_l]
        self.format = self.format.split(':')
        if 'GT' in self.format:
            self.GT = self.format.index('GT')
        if 'GQ' in self.format:
            self.GQ = self.format.index('GQ')
        if 'DP' in self.format:
            self.DP = self.format.index('DP')
        if 'FT' in self.format:
            self.FT = self.format.index('FT')
183537
def _entryChanged(self, entry):
        """"""
        # resave the log
        self.purrer.save()
        # redo entry item
        if entry.tw_item:
            number = entry.tw_item._ientry
            entry.tw_item = None
            self.etw.takeTopLevelItem(number)
            if number:
                after = self.etw.topLevelItem(number - 1)
            else:
                after = None
            self._addEntryItem(entry, number, after)
        # log will have changed, so update the viewer
        self._updateViewer()
970194
def _cache_get_entry(self, entry_name, key=ENTIRE_ENTRY_KEY, default=False):
        
        if key is self.ENTIRE_ENTRY_KEY:
            return self._cache[entry_name]
        return self._cache[entry_name].get(key, default)
1372605
def select_entry(self, *arguments):
        
        matches = self.smart_search(*arguments)
        if len(matches) > 1:
            logger.info("More than one match, prompting for choice ..")
            labels = [entry.name for entry in matches]
            return matches[labels.index(prompt_for_choice(labels))]
        else:
            logger.info("Matched one entry: %s", matches[0].name)
            return matches[0]
66270
def entry_modification_time(self):
    """"""
    timestamp = self._fsntfs_attribute.get_entry_modification_time_as_integer()
    return dfdatetime_filetime.Filetime(timestamp=timestamp)
77588
public ValidationResult check(Entry entry)
	{
		result = new ValidationResult();

		if (entry.isDelete())
		{
			reportMessage(Severity.FIX, entry.getOrigin(), FIX_ID, entry.getPrimaryAccession());
		}
		return result;
	}
738406
V getLiveValue(ReferenceEntry<K, V> entry) {
    if (entry.getKey() == null) {
      return null;
    }
    V value = entry.getValueReference().get();
    if (value == null) {
      return null;
    }

    if (expires() && isExpired(entry)) {
      return null;
    }
    return value;
  }
1172620
def as_entry(self, energies):
        
        relevant_comp = [comp * abs(coeff) for coeff, comp
                         in zip(self._coeffs, self._all_comp)]
        comp = sum(relevant_comp, Composition())
        entry = ComputedEntry(0.5 * comp, self.calculate_energy(energies))
        entry.name = self.__str__()
        return entry
359458
def Matches(self, file_entry):
    
    if not self._names or not file_entry.IsFile():
      return False

    return file_entry.name.lower() in self._names