Get the file format description. This describes the type of
        data stored on disk.
13990
def get_file_format(self):
        
        # Have cached file format?
        if self._file_fmt is not None:
            return self._file_fmt

        # Make the call to retrieve it.
        desc = AudioStreamBasicDescription()
        size = ctypes.c_int(ctypes.sizeof(desc))
        check(_coreaudio.ExtAudioFileGetProperty(
            self._obj, PROP_FILE_DATA_FORMAT, ctypes.byref(size),
            ctypes.byref(desc)
        ))

        # Cache result.
        self._file_fmt = desc
        return desc
1005235
def get_header_description(filedata):
    """"""
    python_version = sys.version_info.major
    if python_version == 3:
        filedata = Parser().parsestr(filedata)
    else:
        filedata = Parser().parsestr(filedata.encode("UTF-8", "replace"))

    payload = filedata.get_payload()
    lines = payload.split('\n')
    while True:
        if lines and lines[-1] == '':
            lines.pop()
        else:
            break
    return '\n'.join(lines)
10873
def get_description_type(path=PKG_DESCRIBE):
    
    _, ext = os.path.splitext(path)
    return {
        ".rst": "text/x-rst",
        ".txt": "text/plain",
        ".md": "text/markdown",
    }[ext]
1281067
private int getFileType(String typeInfo) {
        switch (typeInfo) {
            case "ASCII":
                return FTP.ASCII_FILE_TYPE;
            case "BINARY":
                return FTP.BINARY_FILE_TYPE;
            case "EBCDIC":
                return FTP.EBCDIC_FILE_TYPE;
            case "LOCAL":
                return FTP.LOCAL_FILE_TYPE;
            default:
                return FTP.BINARY_FILE_TYPE;
        }
    }
206024
def get_string(self):
        
        if self in [MimeType.TIFF_d8, MimeType.TIFF_d16, MimeType.TIFF_d32f]:
            return 'image/{}'.format(self.value)
        if self is MimeType.JP2:
            return 'image/jpeg2000'
        if self in [MimeType.RAW, MimeType.REQUESTS_RESPONSE]:
            return self.value
        return mimetypes.types_map['.' + self.value]
1272834
def diskdata():
    """"""
    p = os.popen("/bin/df -l -P")
    ddata = {}
    tsize = 0
    for line in p.readlines():
        d = line.split()
        if ("/dev/sd" in d[0] or "/dev/hd" in d[0] or "/dev/mapper" in d[0]):
            tsize = tsize + int(d[1])
    ddata["Disk_GB"] = int(tsize)/1000000
    p.close()
    return ddata
381389
def get_formats(self, id, **data):
        
        
        return self.get("/formats/{0}/".format(id), data=data)
473247
def filesize(self):
        """"""
        if self.kind == 'data':
            return len(self._data.data)
        return self._data.filesize
344140
def _GetStat(self):
    
    stat_object = super(NTFSFileEntry, self)._GetStat()

    # File data stat information.
    if self._fsntfs_file_entry.has_default_data_stream():
      stat_object.size = self._fsntfs_file_entry.get_size()

    # Ownership and permissions stat information.
    # TODO: stat_object.mode
    # TODO: stat_object.uid
    # TODO: stat_object.gid

    # File entry type stat information.
    if self._IsLink(self._fsntfs_file_entry.file_attribute_flags):
      stat_object.type = stat_object.TYPE_LINK
    elif self._fsntfs_file_entry.has_directory_entries_index():
      stat_object.type = stat_object.TYPE_DIRECTORY
    else:
      stat_object.type = stat_object.TYPE_FILE

    # Other stat information.
    file_reference = self._fsntfs_file_entry.file_reference
    stat_object.ino = file_reference & _FILE_REFERENCE_MFT_ENTRY_BITMASK
    stat_object.fs_type = 'NTFS'

    stat_object.is_allocated = self._fsntfs_file_entry.is_allocated()

    return stat_object
73145
@Override
  public String getDescription() {
    String ucExt = extension.substring(1).toUpperCase();
    return (ucExt + " Files (*" + extension + ')');
  }
875623
def GetStructFormatString(self):
    
    if not self._element_data_type_map:
      return None

    number_of_elements = None
    if self._data_type_definition.elements_data_size:
      element_byte_size = self._element_data_type_definition.GetByteSize()
      if element_byte_size is None:
        return None

      number_of_elements, _ = divmod(
          self._data_type_definition.elements_data_size, element_byte_size)

    elif self._data_type_definition.number_of_elements:
      number_of_elements = self._data_type_definition.number_of_elements

    format_string = self._element_data_type_map.GetStructFormatString()
    if not number_of_elements or not format_string:
      return None

    return '{0:d}{1:s}'.format(number_of_elements, format_string)
498695
def _format_info(data):
    '''
    
    '''
    return {'name': data.gr_name,
            'gid': data.gr_gid,
            'passwd': data.gr_passwd,
            'members': data.gr_mem}
1351480
def description(self):
        """"""
        return (
            self.name,
            self.type_code,
            None,  # TODO: display_length; should this be self.length?
            self.get_column_length(),  # 'internal_size'
            self.get_column_length(),  # 'precision'  # TODO: why!?!?
            self.scale,
            self.flags % 2 == 0)
1087327
public String getDescription() {
        Object[] params = new Object[parameters.length];
        for (int i = 0; i < parameters.length; i++) {
            params[i] = parameters[i];
        }
        return String.format(format, params);
    }
973843
function get_data() {
        $data = parent::get_data();

        if ($data !== null and isset($data->description)) {
            $data->descriptionformat = $data->description['format'];
            $data->description = $data->description['text'];
        }

        return $data;
    }
186882
def get_file_mode_for_writing(context):
    
    format = context['tar'].get('format', None)
    # slightly weird double-check because falsy format could mean either format
    # doesn't exist in input, OR that it exists and is empty. Exists-but-empty
    # has special meaning - default to no compression.
    if format or format == '':
        mode = f"w:{context.get_formatted_string(format)}"
    else:
        mode = 'w:xz'

    return mode
161370
def get_file_extension(format_):
    """"""
    if format_ not in FORMAT_IDENTIFIER_TO_FORMAT_CLASS:
        raise UnknownFormatIdentifierError(format_)

    for ext, f in FILE_EXTENSION_TO_FORMAT_IDENTIFIER.items():
        if f == format_:
            return ext

    raise RuntimeError("No file extension for format %r" % format_)