neulab/docprompting-conala huggingface dataset:
class mimetypes.MimeTypes(filenames=(), strict=True)  
This class represents a MIME-types database. By default, it provides access to the same database as the rest of this module. The initial database is a copy of that provided by the module, and may be extended by loading additional mime.types-style files into the database using the read() or readfp() methods. The mapping dictionaries may also be cleared before loading additional data if the default data is not desired. The optional filenames parameter can be used to cause additional files to be loaded “on top” of the default database.  
suffix_map  
Dictionary mapping suffixes to suffixes. This is used to allow recognition of encoded files for which the encoding and the type are indicated by the same extension. For example, the .tgz extension is mapped to .tar.gz to allow the encoding and type to be recognized separately. This is initially a copy of the global suffix_map defined in the module. 
  
encodings_map  
Dictionary mapping filename extensions to encoding types. This is initially a copy of the global encodings_map defined in the module. 
  
types_map  
Tuple containing two dictionaries, mapping filename extensions to MIME types: the first dictionary is for the non-standards types and the second one is for the standard types. They are initialized by common_types and types_map. 
  
types_map_inv  
Tuple containing two dictionaries, mapping MIME types to a list of filename extensions: the first dictionary is for the non-standards types and the second one is for the standard types. They are initialized by common_types and types_map. 
  
guess_extension(type, strict=True)  
Similar to the guess_extension() function, using the tables stored as part of the object. 
  
guess_type(url, strict=True)  
Similar to the guess_type() function, using the tables stored as part of the object. 
  
guess_all_extensions(type, strict=True)  
Similar to the guess_all_extensions() function, using the tables stored as part of the object. 
  
read(filename, strict=True)  
Load MIME information from a file named filename. This uses readfp() to parse the file. If strict is True, information will be added to list of standard types, else to the list of non-standard types. 
  
readfp(fp, strict=True)  
Load MIME type information from an open file fp. The file must have the format of the standard mime.types files. If strict is True, information will be added to the list of standard types, else to the list of non-standard types. 
  
read_windows_registry(strict=True)  
Load MIME type information from the Windows registry. Availability: Windows. If strict is True, information will be added to the list of standard types, else to the list of non-standard types.  New in version 3.2.
encodings_map  
Dictionary mapping filename extensions to encoding types. This is initially a copy of the global encodings_map defined in the module.
guess_all_extensions(type, strict=True)  
Similar to the guess_all_extensions() function, using the tables stored as part of the object.
guess_extension(type, strict=True)  
Similar to the guess_extension() function, using the tables stored as part of the object.
guess_type(url, strict=True)  
Similar to the guess_type() function, using the tables stored as part of the object.
read(filename, strict=True)  
Load MIME information from a file named filename. This uses readfp() to parse the file. If strict is True, information will be added to list of standard types, else to the list of non-standard types.
readfp(fp, strict=True)  
Load MIME type information from an open file fp. The file must have the format of the standard mime.types files. If strict is True, information will be added to the list of standard types, else to the list of non-standard types.
read_windows_registry(strict=True)  
Load MIME type information from the Windows registry. Availability: Windows. If strict is True, information will be added to the list of standard types, else to the list of non-standard types.  New in version 3.2.
suffix_map  
Dictionary mapping suffixes to suffixes. This is used to allow recognition of encoded files for which the encoding and the type are indicated by the same extension. For example, the .tgz extension is mapped to .tar.gz to allow the encoding and type to be recognized separately. This is initially a copy of the global suffix_map defined in the module.
types_map  
Tuple containing two dictionaries, mapping filename extensions to MIME types: the first dictionary is for the non-standards types and the second one is for the standard types. They are initialized by common_types and types_map.
types_map_inv  
Tuple containing two dictionaries, mapping MIME types to a list of filename extensions: the first dictionary is for the non-standards types and the second one is for the standard types. They are initialized by common_types and types_map.
mimetypes.read_mime_types(filename)  
Load the type map given in the file filename, if it exists. The type map is returned as a dictionary mapping filename extensions, including the leading dot ('.'), to strings of the form 'type/subtype'. If the file filename does not exist or cannot be read, None is returned.
mimetypes.suffix_map  
Dictionary mapping suffixes to suffixes. This is used to allow recognition of encoded files for which the encoding and the type are indicated by the same extension. For example, the .tgz extension is mapped to .tar.gz to allow the encoding and type to be recognized separately.
min(iterable, *[, key, default])  
min(arg1, arg2, *args[, key])  
Return the smallest item in an iterable or the smallest of two or more arguments. If one positional argument is provided, it should be an iterable. The smallest item in the iterable is returned. If two or more positional arguments are provided, the smallest of the positional arguments is returned. There are two optional keyword-only arguments. The key argument specifies a one-argument ordering function like that used for list.sort(). The default argument specifies an object to return if the provided iterable is empty. If the iterable is empty and default is not provided, a ValueError is raised. If multiple items are minimal, the function returns the first one encountered. This is consistent with other sort-stability preserving tools such as sorted(iterable, key=keyfunc)[0] and heapq.nsmallest(1,
iterable, key=keyfunc).  New in version 3.4: The default keyword-only argument.   Changed in version 3.8: The key can be None.
mmap.MADV_NORMAL  
mmap.MADV_RANDOM  
mmap.MADV_SEQUENTIAL  
mmap.MADV_WILLNEED  
mmap.MADV_DONTNEED  
mmap.MADV_REMOVE  
mmap.MADV_DONTFORK  
mmap.MADV_DOFORK  
mmap.MADV_HWPOISON  
mmap.MADV_MERGEABLE  
mmap.MADV_UNMERGEABLE  
mmap.MADV_SOFT_OFFLINE  
mmap.MADV_HUGEPAGE  
mmap.MADV_NOHUGEPAGE  
mmap.MADV_DONTDUMP  
mmap.MADV_DODUMP  
mmap.MADV_FREE  
mmap.MADV_NOSYNC  
mmap.MADV_AUTOSYNC  
mmap.MADV_NOCORE  
mmap.MADV_CORE  
mmap.MADV_PROTECT  
These options can be passed to mmap.madvise(). Not every option will be present on every system. Availability: Systems with the madvise() system call.  New in version 3.8.
class mmap.mmap(fileno, length, tagname=None, access=ACCESS_DEFAULT[, offset])  
(Windows version) Maps length bytes from the file specified by the file handle fileno, and creates a mmap object. If length is larger than the current size of the file, the file is extended to contain length bytes. If length is 0, the maximum length of the map is the current size of the file, except that if the file is empty Windows raises an exception (you cannot create an empty mapping on Windows). tagname, if specified and not None, is a string giving a tag name for the mapping. Windows allows you to have many different mappings against the same file. If you specify the name of an existing tag, that tag is opened, otherwise a new tag of this name is created. If this parameter is omitted or None, the mapping is created without a name. Avoiding the use of the tag parameter will assist in keeping your code portable between Unix and Windows. offset may be specified as a non-negative integer offset. mmap references will be relative to the offset from the beginning of the file. offset defaults to 0. offset must be a multiple of the ALLOCATIONGRANULARITY. Raises an auditing event mmap.__new__ with arguments fileno, length, access, offset.
close()  
Closes the mmap. Subsequent calls to other methods of the object will result in a ValueError exception being raised. This will not close the open file.
find(sub[, start[, end]])  
Returns the lowest index in the object where the subsequence sub is found, such that sub is contained in the range [start, end]. Optional arguments start and end are interpreted as in slice notation. Returns -1 on failure.  Changed in version 3.5: Writable bytes-like object is now accepted.
flush([offset[, size]])  
Flushes changes made to the in-memory copy of a file back to disk. Without use of this call there is no guarantee that changes are written back before the object is destroyed. If offset and size are specified, only changes to the given range of bytes will be flushed to disk; otherwise, the whole extent of the mapping is flushed. offset must be a multiple of the PAGESIZE or ALLOCATIONGRANULARITY. None is returned to indicate success. An exception is raised when the call failed.  Changed in version 3.8: Previously, a nonzero value was returned on success; zero was returned on error under Windows. A zero value was returned on success; an exception was raised on error under Unix.
madvise(option[, start[, length]])  
Send advice option to the kernel about the memory region beginning at start and extending length bytes. option must be one of the MADV_* constants available on the system. If start and length are omitted, the entire mapping is spanned. On some systems (including Linux), start must be a multiple of the PAGESIZE. Availability: Systems with the madvise() system call.  New in version 3.8.
move(dest, src, count)  
Copy the count bytes starting at offset src to the destination index dest. If the mmap was created with ACCESS_READ, then calls to move will raise a TypeError exception.
read([n])  
Return a bytes containing up to n bytes starting from the current file position. If the argument is omitted, None or negative, return all bytes from the current file position to the end of the mapping. The file position is updated to point after the bytes that were returned.  Changed in version 3.3: Argument can be omitted or None.
readline()  
Returns a single line, starting at the current file position and up to the next newline. The file position is updated to point after the bytes that were returned.
read_byte()  
Returns a byte at the current file position as an integer, and advances the file position by 1.
resize(newsize)  
Resizes the map and the underlying file, if any. If the mmap was created with ACCESS_READ or ACCESS_COPY, resizing the map will raise a TypeError exception.
rfind(sub[, start[, end]])  
Returns the highest index in the object where the subsequence sub is found, such that sub is contained in the range [start, end]. Optional arguments start and end are interpreted as in slice notation. Returns -1 on failure.  Changed in version 3.5: Writable bytes-like object is now accepted.
seek(pos[, whence])  
Set the file’s current position. whence argument is optional and defaults to os.SEEK_SET or 0 (absolute file positioning); other values are os.SEEK_CUR or 1 (seek relative to the current position) and os.SEEK_END or 2 (seek relative to the file’s end).
size()  
Return the length of the file, which can be larger than the size of the memory-mapped area.
write(bytes)  
Write the bytes in bytes into memory at the current position of the file pointer and return the number of bytes written (never less than len(bytes), since if the write fails, a ValueError will be raised). The file position is updated to point after the bytes that were written. If the mmap was created with ACCESS_READ, then writing to it will raise a TypeError exception.  Changed in version 3.5: Writable bytes-like object is now accepted.   Changed in version 3.6: The number of bytes written is now returned.
write_byte(byte)  
Write the integer byte into memory at the current position of the file pointer; the file position is advanced by 1. If the mmap was created with ACCESS_READ, then writing to it will raise a TypeError exception.
modulefinder — Find modules used by a script Source code: Lib/modulefinder.py This module provides a ModuleFinder class that can be used to determine the set of modules imported by a script. modulefinder.py can also be run as a script, giving the filename of a Python script as its argument, after which a report of the imported modules will be printed.  
modulefinder.AddPackagePath(pkg_name, path)  
Record that the package named pkg_name can be found in the specified path. 
  
modulefinder.ReplacePackage(oldname, newname)  
Allows specifying that the module named oldname is in fact the package named newname. 
  
class modulefinder.ModuleFinder(path=None, debug=0, excludes=[], replace_paths=[])  
This class provides run_script() and report() methods to determine the set of modules imported by a script. path can be a list of directories to search for modules; if not specified, sys.path is used. debug sets the debugging level; higher values make the class print debugging messages about what it’s doing. excludes is a list of module names to exclude from the analysis. replace_paths is a list of (oldpath, newpath) tuples that will be replaced in module paths.  
report()  
Print a report to standard output that lists the modules imported by the script and their paths, as well as modules that are missing or seem to be missing. 
  
run_script(pathname)  
Analyze the contents of the pathname file, which must contain Python code. 
  
modules  
A dictionary mapping module names to modules. See Example usage of ModuleFinder. 
 
 Example usage of ModuleFinder The script that is going to get analyzed later on (bacon.py): import re, itertools

try:
    import baconhameggs
except ImportError:
    pass

try:
    import guido.python.ham
except ImportError:
    pass
 The script that will output the report of bacon.py: from modulefinder import ModuleFinder

finder = ModuleFinder()
finder.run_script('bacon.py')

print('Loaded modules:')
for name, mod in finder.modules.items():
    print('%s: ' % name, end='')
    print(','.join(list(mod.globalnames.keys())[:3]))

print('-'*50)
print('Modules not imported:')
print('\n'.join(finder.badmodules.keys()))
 Sample output (may vary depending on the architecture): Loaded modules:
_types:
copyreg:  _inverted_registry,_slotnames,__all__
sre_compile:  isstring,_sre,_optimize_unicode
_sre:
sre_constants:  REPEAT_ONE,makedict,AT_END_LINE
sys:
re:  __module__,finditer,_expand
itertools:
__main__:  re,itertools,baconhameggs
sre_parse:  _PATTERNENDERS,SRE_FLAG_UNICODE
array:
types:  __module__,IntType,TypeType
---------------------------------------------------
Modules not imported:
guido.python.ham
baconhameggs
modulefinder.AddPackagePath(pkg_name, path)  
Record that the package named pkg_name can be found in the specified path.
class modulefinder.ModuleFinder(path=None, debug=0, excludes=[], replace_paths=[])  
This class provides run_script() and report() methods to determine the set of modules imported by a script. path can be a list of directories to search for modules; if not specified, sys.path is used. debug sets the debugging level; higher values make the class print debugging messages about what it’s doing. excludes is a list of module names to exclude from the analysis. replace_paths is a list of (oldpath, newpath) tuples that will be replaced in module paths.  
report()  
Print a report to standard output that lists the modules imported by the script and their paths, as well as modules that are missing or seem to be missing. 
  
run_script(pathname)  
Analyze the contents of the pathname file, which must contain Python code. 
  
modules  
A dictionary mapping module names to modules. See Example usage of ModuleFinder.
report()  
Print a report to standard output that lists the modules imported by the script and their paths, as well as modules that are missing or seem to be missing.
run_script(pathname)  
Analyze the contents of the pathname file, which must contain Python code.
modulefinder.ReplacePackage(oldname, newname)  
Allows specifying that the module named oldname is in fact the package named newname.
exception ModuleNotFoundError  
A subclass of ImportError which is raised by import when a module could not be located. It is also raised when None is found in sys.modules.  New in version 3.6.
msilib.add_data(database, table, records)  
Add all records to the table named table in database. The table argument must be one of the predefined tables in the MSI schema, e.g. 'Feature', 'File', 'Component', 'Dialog', 'Control', etc. records should be a list of tuples, each one containing all fields of a record according to the schema of the table. For optional fields, None can be passed. Field values can be ints, strings, or instances of the Binary class.
msilib.add_stream(database, name, path)  
Add the file path into the _Stream table of database, with the stream name name.
msilib.add_tables(database, module)  
Add all table content from module to database. module must contain an attribute tables listing all tables for which content should be added, and one attribute per table that has the actual content. This is typically used to install the sequence tables.
class msilib.Binary(filename)  
Represents entries in the Binary table; inserting such an object using add_data() reads the file named filename into the table.
class msilib.CAB(name)  
The class CAB represents a CAB file. During MSI construction, files will be added simultaneously to the Files table, and to a CAB file. Then, when all files have been added, the CAB file can be written, then added to the MSI file. name is the name of the CAB file in the MSI file.  
append(full, file, logical)  
Add the file with the pathname full to the CAB file, under the name logical. If there is already a file named logical, a new file name is created. Return the index of the file in the CAB file, and the new name of the file inside the CAB file. 
  
commit(database)  
Generate a CAB file, add it as a stream to the MSI file, put it into the Media table, and remove the generated file from the disk.
append(full, file, logical)  
Add the file with the pathname full to the CAB file, under the name logical. If there is already a file named logical, a new file name is created. Return the index of the file in the CAB file, and the new name of the file inside the CAB file.
commit(database)  
Generate a CAB file, add it as a stream to the MSI file, put it into the Media table, and remove the generated file from the disk.
class msilib.Control(dlg, name)  
Base class of the dialog controls. dlg is the dialog object the control belongs to, and name is the control’s name.  
event(event, argument, condition=1, ordering=None)  
Make an entry into the ControlEvent table for this control. 
  
mapping(event, attribute)  
Make an entry into the EventMapping table for this control. 
  
condition(action, condition)  
Make an entry into the ControlCondition table for this control.
condition(action, condition)  
Make an entry into the ControlCondition table for this control.
event(event, argument, condition=1, ordering=None)  
Make an entry into the ControlEvent table for this control.
msilib.CreateRecord(count)  
Return a new record object by calling MSICreateRecord(). count is the number of fields of the record.
Database.Close()  
Close the database object, through MsiCloseHandle().  New in version 3.7.
Database.Commit()  
Commit the changes pending in the current transaction, by calling MSIDatabaseCommit().
Database.GetSummaryInformation(count)  
Return a new summary information object, by calling MsiGetSummaryInformation(). count is the maximum number of updated values.
Database.OpenView(sql)  
Return a view object, by calling MSIDatabaseOpenView(). sql is the SQL statement to execute.
class msilib.Dialog(db, name, x, y, w, h, attr, title, first, default, cancel)  
Return a new Dialog object. An entry in the Dialog table is made, with the specified coordinates, dialog attributes, title, name of the first, default, and cancel controls.  
control(name, type, x, y, width, height, attributes, property, text, control_next, help)  
Return a new Control object. An entry in the Control table is made with the specified parameters. This is a generic method; for specific types, specialized methods are provided. 
  
text(name, x, y, width, height, attributes, text)  
Add and return a Text control. 
  
bitmap(name, x, y, width, height, text)  
Add and return a Bitmap control. 
  
line(name, x, y, width, height)  
Add and return a Line control. 
  
pushbutton(name, x, y, width, height, attributes, text, next_control)  
Add and return a PushButton control. 
  
radiogroup(name, x, y, width, height, attributes, property, text, next_control)  
Add and return a RadioButtonGroup control. 
  
checkbox(name, x, y, width, height, attributes, property, text, next_control)  
Add and return a CheckBox control.
bitmap(name, x, y, width, height, text)  
Add and return a Bitmap control.
checkbox(name, x, y, width, height, attributes, property, text, next_control)  
Add and return a CheckBox control.
control(name, type, x, y, width, height, attributes, property, text, control_next, help)  
Return a new Control object. An entry in the Control table is made with the specified parameters. This is a generic method; for specific types, specialized methods are provided.
line(name, x, y, width, height)  
Add and return a Line control.
pushbutton(name, x, y, width, height, attributes, text, next_control)  
Add and return a PushButton control.
radiogroup(name, x, y, width, height, attributes, property, text, next_control)  
Add and return a RadioButtonGroup control.
text(name, x, y, width, height, attributes, text)  
Add and return a Text control.
class msilib.Directory(database, cab, basedir, physical, logical, default[, componentflags])  
Create a new directory in the Directory table. There is a current component at each point in time for the directory, which is either explicitly created through start_component(), or implicitly when files are added for the first time. Files are added into the current component, and into the cab file. To create a directory, a base directory object needs to be specified (can be None), the path to the physical directory, and a logical directory name. default specifies the DefaultDir slot in the directory table. componentflags specifies the default flags that new components get.  
start_component(component=None, feature=None, flags=None, keyfile=None, uuid=None)  
Add an entry to the Component table, and make this component the current component for this directory. If no component name is given, the directory name is used. If no feature is given, the current feature is used. If no flags are given, the directory’s default flags are used. If no keyfile is given, the KeyPath is left null in the Component table. 
  
add_file(file, src=None, version=None, language=None)  
Add a file to the current component of the directory, starting a new one if there is no current component. By default, the file name in the source and the file table will be identical. If the src file is specified, it is interpreted relative to the current directory. Optionally, a version and a language can be specified for the entry in the File table. 
  
glob(pattern, exclude=None)  
Add a list of files to the current component as specified in the glob pattern. Individual files can be excluded in the exclude list. 
  
remove_pyc()  
Remove .pyc files on uninstall.
add_file(file, src=None, version=None, language=None)  
Add a file to the current component of the directory, starting a new one if there is no current component. By default, the file name in the source and the file table will be identical. If the src file is specified, it is interpreted relative to the current directory. Optionally, a version and a language can be specified for the entry in the File table.