Parses Engine RPM and returns it in [RPM] as a float from 0 - 16383.75
    :param str v:
    :return int:
551549
def parse_010c(v) -> int:
    
    try:
        val = int(trim_obd_value(v), 16)
        return int(val / 4)
    except ValueError:
        return None
1073327
def rpm_eval(macro):
    """"""
    try:
        value = subprocess.Popen(
            ['rpm', '--eval', macro],
            stdout=subprocess.PIPE).communicate()[0].strip()
    except OSError:
        logger.error('Failed to get value of {0} rpm macro'.format(
            macro), exc_info=True)
        value = b''
    return console_to_str(value)
141134
def parse_value(self, frmtcode, buff, start, end):
        '''
            
        '''
        
        frmttype = self.util._formatmap[frmtcode]
        if(frmtcode == FormatType.FLOAT_32.value.code):  # @UndefinedVariable
            return self.parse_float32(buff, start, end)
        elif(frmtcode == FormatType.FLOAT_64.value.code):  # @UndefinedVariable
            return self.parse_float64(buff, start, end)
        if frmttype.value.idx <= FormatType.FIXSTR.value.idx:  # @UndefinedVariable  
            return self.parse_str(buff, start, end)
        elif frmttype.value.idx <= FormatType.INT_64.value.idx:  # @UndefinedVariable
            return self.parse_int(buff, start, end)
        elif frmttype.value.idx <= FormatType.UINT_64.value.idx:  # @UndefinedVariable
            return self.parse_uint(buff, start, end)
1150919
def VR(VR=None, description=None):
    
    value_repr = {
        "AE": "Application Entity",
        "AS": "Age String",
        "AT": "Attribute Tag",
        "CS": "Code String",
        "DA": "Date",
        "DS": "Decimal String",
        "DT": "Date/Time",
        "FL": "Floating Point Single (4 bytes)",
        "FD": "Floating Point Double (8 bytes)",
        "IS": "Integer String",
        "LO": "Long String",
        "LT": "Long Text",
        "OB": "Other Byte",
        "OF": "Other Float",
        "OW": "Other Word",
        "PN": "Person Name",
        "SH": "Short String",
        "SL": "Signed Long",
        "SQ": "Sequence of Items",
        "SS": "Signed Short",
        "ST": "Short Text",
        "TM": "Time",
        "UI": "Unique Identifier",
        "UL": "Unsigned Long",
        "UN": "Unknown",
        "US": "Unsigned Short",
        "UT": "Unlimited Text"
    }
    assert VR or description, "Either VR or description required to map VR"

    if VR is not None:
        VR = VR.upper()
        if VR in value_repr:
            return value_repr[VR]

    for key, value in value_repr.iteritems():
        if description == value:
            return key

    return None
826378
def _vmf_normalize(kappa, dim):
    
    num = np.power(kappa, dim / 2. - 1.)

    if dim / 2. - 1. < 1e-15:
        denom = np.power(2. * np.pi, dim / 2.) * i0(kappa)
    else:
        denom = np.power(2. * np.pi, dim / 2.) * iv(dim / 2. - 1., kappa)

    if np.isinf(num):
        raise ValueError("VMF scaling numerator was inf.")

    if np.isinf(denom):
        raise ValueError("VMF scaling denominator was inf.")

    if np.abs(denom) < 1e-15:
        raise ValueError("VMF scaling denominator was 0.")

    return num / denom
1046570
def b58decode_int(v):
    ''''''
    v = v.rstrip()
    v = scrub_input(v)

    decimal = 0
    for char in v:
        decimal = decimal * 58 + alphabet.index(char)
    return decimal
842158
def _int_from_str(string):
    
    float_num = float(string)
    int_num = int(float_num)
    if float_num == int_num:
        return int_num
    else:
        # Needed to handle pseudos with fractional charge
        int_num = np.rint(float_num)
        logger.warning("Converting float %s to int %s" % (float_num, int_num))
        return int_num
840748
def drive_rotational_speed_rpm(self):
        """"""

        drv_rot_speed_rpm = set()
        for member in self._drives_list():
            if member.rotation_speed_rpm is not None:
                drv_rot_speed_rpm.add(member.rotation_speed_rpm)
        return drv_rot_speed_rpm
328398
def speed_i(self):
        
        self._speed_i, value = self.get_attr_int(self._speed_i, 'speed_pid/Ki')
        return value
729451
function parseSpeed(value)
{
    if(value in speeds)
    {
        value = speeds[value];
    }

    value = parseFloat(value);
    if(isNaN(value) || !value || value <= 0)
    {
        value = 1;
    }
    return value;
}
12410
def _get_mtime():
    
    return os.path.exists(RPM_PATH) and int(os.path.getmtime(RPM_PATH)) or 0
865879
def getv(self, r):
        
        v = self.get(r)
        if not is_unknown(v):
            try:
                v = int(v)
            except ValueError:
                v = None
        else:
            v = None
        return v
743819
def y_mod(self):
        
        return 9.e9 * self.k_vrh * self.g_vrh / (3. * self.k_vrh + self.g_vrh)
469493
def snr(vref, vcmp):
    

    dv = np.var(vref)
    with np.errstate(divide='ignore'):
        rt = dv / mse(vref, vcmp)
    return 10.0 * np.log10(rt)
1252064
def get_ZPE(viblist):
    
    if type(viblist) is str:
        l = ast.literal_eval(viblist)
    else:
        l = viblist
    l = [float(w) for w in l]
    ZPE = 0.5*sum(l)*cm2ev
    return(ZPE)
763259
def cal_pst(self, v):
        
        p_h = self._hugoniot_p(v)
        p_th_h = self._hugoniot_pth(v)
        p_st = p_h - p_th_h
        return p_st
92417
def _format_value_error(self, v, e, pm=" +/- "):
        
        # If we have weird stuff
        if not _s.fun.is_a_number(v) or not _s.fun.is_a_number(e) \
            or v in [_n.inf, _n.nan, _n.NAN] or e in [_n.inf, _n.nan, _n.NAN]: 
            return str(v)+pm+str(e)
        
        # Normal values.
        try:
            sig_figs = -int(_n.floor(_n.log10(abs(e))))+1            
            return str(_n.round(v, sig_figs)) + pm + str(_n.round(e, sig_figs))

        except:
            return str(v)+pm+str(e)