Basename for USAF base.

    Args:
        usaf (str): USAF code

    Returns:
        (str)
558644
def tmybasename(usaf):
    
    url_file = open(env.SRC_PATH + '/tmy3.csv')
    for line in url_file.readlines():
        if line.find(usaf) is not -1:
            return line.rstrip().partition(',')[0]
1047506
def name(self):
        """"""
        basename = self.basename
        if basename is None:
            return None
        
        parent = self.Naming_parent
        if parent is None:
            return basename
        else:    
            return parent.generate_unique_name(basename)
417544
def get_fieldname(self, field, arnum):
        
        name = field.getName()
        # ensure we have only *one* suffix
        base_name = name.split("-")[0]
        suffix = "-{}".format(arnum)
        return "{}{}".format(base_name, suffix)
634428
def basename_without_extension(self):
        
        ret = self.basename.rsplit('.', 1)[0]
        if ret.endswith('.tar'):
            ret = ret[0:len(ret)-4]
        return ret
10112
def base_id(self):
        '''  '''
        # If base id is already set, return it.
        if self._base_id is not None:
            return self._base_id

        # Send COMMON_COMMAND 0x08, CO_RD_IDBASE request to the module
        self.send(Packet(PACKET.COMMON_COMMAND, data=[0x08]))
        # Loop over 10 times, to make sure we catch the response.
        # Thanks to timeout, shouldn't take more than a second.
        # Unfortunately, all other messages received during this time are ignored.
        for i in range(0, 10):
            try:
                packet = self.receive.get(block=True, timeout=0.1)
                # We're only interested in responses to the request in question.
                if packet.packet_type == PACKET.RESPONSE and packet.response == RETURN_CODE.OK and len(packet.response_data) == 4:
                    # Base ID is set in the response data.
                    self._base_id = packet.response_data
                    # Put packet back to the Queue, so the user can also react to it if required...
                    self.receive.put(packet)
                    break
                # Put other packets back to the Queue.
                self.receive.put(packet)
            except queue.Empty:
                continue
        # Return the current Base ID (might be None).
        return self._base_id
322098
def _file_name(fname, base_dir):
        

        fname = fname.replace("\\", "\\\\")

        if base_dir != '' and fname[0] != ':' and not os.path.isabs(fname):
            fname = os.path.join(base_dir, fname)

        return fname
1273274
def getDisplayName( self ):
        "  "
        displayName = self.name
        if self.base:
            displayName += "( " + ", ".join( self.base ) + " )"
        return displayName
11796
function basename(s) {
			if ( s == null ) {
				return "";
			}
			s = String(s);
			return s.slice(1 + s.lastIndexOf('.'));
		}
1320340
def string_to_basename(s):
    '''
    
    '''
    s = s.strip().lower()
    s = re.sub(r'[^\w\s-]', '', s)
    return re.sub(r'[\s-]+', '-', s)
418127
def get_basename_from_file(file)
      basename = Pathname.new(file).basename.to_s
      basename[0..(basename.rindex('.') - 1)]
    end
1063656
def name(self, code):
        
        code = self.alpha2(code)
        if code not in self.countries:
            return ""
        return self.translate_pair(code)[1]
213034
def full_name(self):
        
        import ibis.expr.operations as ops

        return ops.DayOfWeekName(self.op().arg).to_expr()
1283466
def declare_base(erroName=True):
    
    if erroName:
        class Base(Exception):
            def __str__(self):
                if len(self.args):
                    return "%s: %s" % (self.__class__.__name__, self.args[0])
                else:
                    return "%s: %s" % (self.__class__.__name__, self.default)
    else:
        class Base(Exception):
            def __str__(self):
                if len(self.args):
                    return "%s" % self.args[0]
                else:
                    return "%s" % self.default
    return Base
265455
def basename(self, suffix=''):
		''' '''
		return os.path.basename(self._file, suffix) if self._file else None
1218850
def get_fqn(base_fqn, delimiter, name=None):
    
    if name and name.startswith("%s%s" % (base_fqn, delimiter)):
        return name

    return delimiter.join([_f for _f in [base_fqn, name] if _f])
28410
def name(self):
        
        if self._meta and self._meta.get('name'):
            # get it from the meta file
            return self._meta.get('name')
        # infer it from the basename
        return self.basename.replace('_', ' ').title()
799551
def basename(path, extension_marker="."):
    
    result = os.path.basename(path or "")
    if extension_marker:
        pre, _, post = result.rpartition(extension_marker)
        return pre or post

    return result