neulab/docprompting-conala huggingface dataset:
os.getloadavg()  
Return the number of processes in the system run queue averaged over the last 1, 5, and 15 minutes or raises OSError if the load average was unobtainable. Availability: Unix.
os.getlogin()  
Return the name of the user logged in on the controlling terminal of the process. For most purposes, it is more useful to use getpass.getuser() since the latter checks the environment variables LOGNAME or USERNAME to find out who the user is, and falls back to pwd.getpwuid(os.getuid())[0] to get the login name of the current real user id. Availability: Unix, Windows.
os.getpgid(pid)  
Return the process group id of the process with process id pid. If pid is 0, the process group id of the current process is returned. Availability: Unix.
os.getpgrp()  
Return the id of the current process group. Availability: Unix.
os.getppid()  
Return the parent’s process id. When the parent process has exited, on Unix the id returned is the one of the init process (1), on Windows it is still the same id, which may be already reused by another process. Availability: Unix, Windows.  Changed in version 3.2: Added support for Windows.
os.getpriority(which, who)  
Get program scheduling priority. The value which is one of PRIO_PROCESS, PRIO_PGRP, or PRIO_USER, and who is interpreted relative to which (a process identifier for PRIO_PROCESS, process group identifier for PRIO_PGRP, and a user ID for PRIO_USER). A zero value for who denotes (respectively) the calling process, the process group of the calling process, or the real user ID of the calling process. Availability: Unix.  New in version 3.3.
os.getrandom(size, flags=0)  
Get up to size random bytes. The function can return less bytes than requested. These bytes can be used to seed user-space random number generators or for cryptographic purposes. getrandom() relies on entropy gathered from device drivers and other sources of environmental noise. Unnecessarily reading large quantities of data will have a negative impact on other users of the /dev/random and /dev/urandom devices. The flags argument is a bit mask that can contain zero or more of the following values ORed together: os.GRND_RANDOM and GRND_NONBLOCK. See also the Linux getrandom() manual page. Availability: Linux 3.17 and newer.  New in version 3.6.
os.getresgid()  
Return a tuple (rgid, egid, sgid) denoting the current process’s real, effective, and saved group ids. Availability: Unix.  New in version 3.2.
os.getresuid()  
Return a tuple (ruid, euid, suid) denoting the current process’s real, effective, and saved user ids. Availability: Unix.  New in version 3.2.
os.getsid(pid)  
Call the system call getsid(). See the Unix manual for the semantics. Availability: Unix.
os.getuid()  
Return the current process’s real user id. Availability: Unix.
os.getxattr(path, attribute, *, follow_symlinks=True)  
Return the value of the extended filesystem attribute attribute for path. attribute can be bytes or str (directly or indirectly through the PathLike interface). If it is str, it is encoded with the filesystem encoding. This function can support specifying a file descriptor and not following symlinks. Raises an auditing event os.getxattr with arguments path, attribute.  Changed in version 3.6: Accepts a path-like object for path and attribute.
os.get_blocking(fd)  
Get the blocking mode of the file descriptor: False if the O_NONBLOCK flag is set, True if the flag is cleared. See also set_blocking() and socket.socket.setblocking(). Availability: Unix.  New in version 3.5.
os.get_exec_path(env=None)  
Returns the list of directories that will be searched for a named executable, similar to a shell, when launching a process. env, when specified, should be an environment variable dictionary to lookup the PATH in. By default, when env is None, environ is used.  New in version 3.2.
os.get_handle_inheritable(handle)  
Get the “inheritable” flag of the specified handle (a boolean). Availability: Windows.
os.get_inheritable(fd)  
Get the “inheritable” flag of the specified file descriptor (a boolean).
os.get_terminal_size(fd=STDOUT_FILENO)  
Return the size of the terminal window as (columns, lines), tuple of type terminal_size. The optional argument fd (default STDOUT_FILENO, or standard output) specifies which file descriptor should be queried. If the file descriptor is not connected to a terminal, an OSError is raised. shutil.get_terminal_size() is the high-level function which should normally be used, os.get_terminal_size is the low-level implementation. Availability: Unix, Windows.
os.GRND_NONBLOCK  
By default, when reading from /dev/random, getrandom() blocks if no random bytes are available, and when reading from /dev/urandom, it blocks if the entropy pool has not yet been initialized. If the GRND_NONBLOCK flag is set, then getrandom() does not block in these cases, but instead immediately raises BlockingIOError.  New in version 3.6.
os.GRND_RANDOM  
If this bit is set, then random bytes are drawn from the /dev/random pool instead of the /dev/urandom pool.  New in version 3.6.
os.initgroups(username, gid)  
Call the system initgroups() to initialize the group access list with all of the groups of which the specified username is a member, plus the specified group id. Availability: Unix.  New in version 3.2.
os.isatty(fd)  
Return True if the file descriptor fd is open and connected to a tty(-like) device, else False.
os.kill(pid, sig)  
Send signal sig to the process pid. Constants for the specific signals available on the host platform are defined in the signal module. Windows: The signal.CTRL_C_EVENT and signal.CTRL_BREAK_EVENT signals are special signals which can only be sent to console processes which share a common console window, e.g., some subprocesses. Any other value for sig will cause the process to be unconditionally killed by the TerminateProcess API, and the exit code will be set to sig. The Windows version of kill() additionally takes process handles to be killed. See also signal.pthread_kill(). Raises an auditing event os.kill with arguments pid, sig.  New in version 3.2: Windows support.
os.killpg(pgid, sig)  
Send the signal sig to the process group pgid. Raises an auditing event os.killpg with arguments pgid, sig. Availability: Unix.
os.lchflags(path, flags)  
Set the flags of path to the numeric flags, like chflags(), but do not follow symbolic links. As of Python 3.3, this is equivalent to os.chflags(path, flags, follow_symlinks=False). Raises an auditing event os.chflags with arguments path, flags. Availability: Unix.  Changed in version 3.6: Accepts a path-like object.
os.lchmod(path, mode)  
Change the mode of path to the numeric mode. If path is a symlink, this affects the symlink rather than the target. See the docs for chmod() for possible values of mode. As of Python 3.3, this is equivalent to os.chmod(path, mode, follow_symlinks=False). Raises an auditing event os.chmod with arguments path, mode, dir_fd. Availability: Unix.  Changed in version 3.6: Accepts a path-like object.
os.lchown(path, uid, gid)  
Change the owner and group id of path to the numeric uid and gid. This function will not follow symbolic links. As of Python 3.3, this is equivalent to os.chown(path, uid, gid, follow_symlinks=False). Raises an auditing event os.chown with arguments path, uid, gid, dir_fd. Availability: Unix.  Changed in version 3.6: Accepts a path-like object.
os.linesep  
The string used to separate (or, rather, terminate) lines on the current platform. This may be a single character, such as '\n' for POSIX, or multiple characters, for example, '\r\n' for Windows. Do not use os.linesep as a line terminator when writing files opened in text mode (the default); use a single '\n' instead, on all platforms.
os.link(src, dst, *, src_dir_fd=None, dst_dir_fd=None, follow_symlinks=True)  
Create a hard link pointing to src named dst. This function can support specifying src_dir_fd and/or dst_dir_fd to supply paths relative to directory descriptors, and not following symlinks. Raises an auditing event os.link with arguments src, dst, src_dir_fd, dst_dir_fd. Availability: Unix, Windows.  Changed in version 3.2: Added Windows support.   New in version 3.3: Added the src_dir_fd, dst_dir_fd, and follow_symlinks arguments.   Changed in version 3.6: Accepts a path-like object for src and dst.
os.listdir(path='.')  
Return a list containing the names of the entries in the directory given by path. The list is in arbitrary order, and does not include the special entries '.' and '..' even if they are present in the directory. If a file is removed from or added to the directory during the call of this function, whether a name for that file be included is unspecified. path may be a path-like object. If path is of type bytes (directly or indirectly through the PathLike interface), the filenames returned will also be of type bytes; in all other circumstances, they will be of type str. This function can also support specifying a file descriptor; the file descriptor must refer to a directory. Raises an auditing event os.listdir with argument path.  Note To encode str filenames to bytes, use fsencode().   See also The scandir() function returns directory entries along with file attribute information, giving better performance for many common use cases.   Changed in version 3.2: The path parameter became optional.   New in version 3.3: Added support for specifying path as an open file descriptor.   Changed in version 3.6: Accepts a path-like object.
os.listxattr(path=None, *, follow_symlinks=True)  
Return a list of the extended filesystem attributes on path. The attributes in the list are represented as strings decoded with the filesystem encoding. If path is None, listxattr() will examine the current directory. This function can support specifying a file descriptor and not following symlinks. Raises an auditing event os.listxattr with argument path.  Changed in version 3.6: Accepts a path-like object.
os.lockf(fd, cmd, len)  
Apply, test or remove a POSIX lock on an open file descriptor. fd is an open file descriptor. cmd specifies the command to use - one of F_LOCK, F_TLOCK, F_ULOCK or F_TEST. len specifies the section of the file to lock. Raises an auditing event os.lockf with arguments fd, cmd, len. Availability: Unix.  New in version 3.3.
os.lseek(fd, pos, how)  
Set the current position of file descriptor fd to position pos, modified by how: SEEK_SET or 0 to set the position relative to the beginning of the file; SEEK_CUR or 1 to set it relative to the current position; SEEK_END or 2 to set it relative to the end of the file. Return the new cursor position in bytes, starting from the beginning.
os.lstat(path, *, dir_fd=None)  
Perform the equivalent of an lstat() system call on the given path. Similar to stat(), but does not follow symbolic links. Return a stat_result object. On platforms that do not support symbolic links, this is an alias for stat(). As of Python 3.3, this is equivalent to os.stat(path, dir_fd=dir_fd,
follow_symlinks=False). This function can also support paths relative to directory descriptors.  See also The stat() function.   Changed in version 3.2: Added support for Windows 6.0 (Vista) symbolic links.   Changed in version 3.3: Added the dir_fd parameter.   Changed in version 3.6: Accepts a path-like object.   Changed in version 3.8: On Windows, now opens reparse points that represent another path (name surrogates), including symbolic links and directory junctions. Other kinds of reparse points are resolved by the operating system as for stat().
os.major(device)  
Extract the device major number from a raw device number (usually the st_dev or st_rdev field from stat).
os.makedev(major, minor)  
Compose a raw device number from the major and minor device numbers.
os.makedirs(name, mode=0o777, exist_ok=False)  
Recursive directory creation function. Like mkdir(), but makes all intermediate-level directories needed to contain the leaf directory. The mode parameter is passed to mkdir() for creating the leaf directory; see the mkdir() description for how it is interpreted. To set the file permission bits of any newly-created parent directories you can set the umask before invoking makedirs(). The file permission bits of existing parent directories are not changed. If exist_ok is False (the default), an FileExistsError is raised if the target directory already exists.  Note makedirs() will become confused if the path elements to create include pardir (eg. “..” on UNIX systems).  This function handles UNC paths correctly. Raises an auditing event os.mkdir with arguments path, mode, dir_fd.  New in version 3.2: The exist_ok parameter.   Changed in version 3.4.1: Before Python 3.4.1, if exist_ok was True and the directory existed, makedirs() would still raise an error if mode did not match the mode of the existing directory. Since this behavior was impossible to implement safely, it was removed in Python 3.4.1. See bpo-21082.   Changed in version 3.6: Accepts a path-like object.   Changed in version 3.7: The mode argument no longer affects the file permission bits of newly-created intermediate-level directories.
os.memfd_create(name[, flags=os.MFD_CLOEXEC])  
Create an anonymous file and return a file descriptor that refers to it. flags must be one of the os.MFD_* constants available on the system (or a bitwise ORed combination of them). By default, the new file descriptor is non-inheritable. The name supplied in name is used as a filename and will be displayed as the target of the corresponding symbolic link in the directory /proc/self/fd/. The displayed name is always prefixed with memfd: and serves only for debugging purposes. Names do not affect the behavior of the file descriptor, and as such multiple files can have the same name without any side effects. Availability: Linux 3.17 or newer with glibc 2.27 or newer.  New in version 3.8.
os.MFD_CLOEXEC  
os.MFD_ALLOW_SEALING  
os.MFD_HUGETLB  
os.MFD_HUGE_SHIFT  
os.MFD_HUGE_MASK  
os.MFD_HUGE_64KB  
os.MFD_HUGE_512KB  
os.MFD_HUGE_1MB  
os.MFD_HUGE_2MB  
os.MFD_HUGE_8MB  
os.MFD_HUGE_16MB  
os.MFD_HUGE_32MB  
os.MFD_HUGE_256MB  
os.MFD_HUGE_512MB  
os.MFD_HUGE_1GB  
os.MFD_HUGE_2GB  
os.MFD_HUGE_16GB  
These flags can be passed to memfd_create(). Availability: Linux 3.17 or newer with glibc 2.27 or newer. The MFD_HUGE* flags are only available since Linux 4.14.  New in version 3.8.
os.minor(device)  
Extract the device minor number from a raw device number (usually the st_dev or st_rdev field from stat).
os.mkdir(path, mode=0o777, *, dir_fd=None)  
Create a directory named path with numeric mode mode. If the directory already exists, FileExistsError is raised. On some systems, mode is ignored. Where it is used, the current umask value is first masked out. If bits other than the last 9 (i.e. the last 3 digits of the octal representation of the mode) are set, their meaning is platform-dependent. On some platforms, they are ignored and you should call chmod() explicitly to set them. This function can also support paths relative to directory descriptors. It is also possible to create temporary directories; see the tempfile module’s tempfile.mkdtemp() function. Raises an auditing event os.mkdir with arguments path, mode, dir_fd.  New in version 3.3: The dir_fd argument.   Changed in version 3.6: Accepts a path-like object.
os.mkfifo(path, mode=0o666, *, dir_fd=None)  
Create a FIFO (a named pipe) named path with numeric mode mode. The current umask value is first masked out from the mode. This function can also support paths relative to directory descriptors. FIFOs are pipes that can be accessed like regular files. FIFOs exist until they are deleted (for example with os.unlink()). Generally, FIFOs are used as rendezvous between “client” and “server” type processes: the server opens the FIFO for reading, and the client opens it for writing. Note that mkfifo() doesn’t open the FIFO — it just creates the rendezvous point. Availability: Unix.  New in version 3.3: The dir_fd argument.   Changed in version 3.6: Accepts a path-like object.
os.mknod(path, mode=0o600, device=0, *, dir_fd=None)  
Create a filesystem node (file, device special file or named pipe) named path. mode specifies both the permissions to use and the type of node to be created, being combined (bitwise OR) with one of stat.S_IFREG, stat.S_IFCHR, stat.S_IFBLK, and stat.S_IFIFO (those constants are available in stat). For stat.S_IFCHR and stat.S_IFBLK, device defines the newly created device special file (probably using os.makedev()), otherwise it is ignored. This function can also support paths relative to directory descriptors. Availability: Unix.  New in version 3.3: The dir_fd argument.   Changed in version 3.6: Accepts a path-like object.
os.name  
The name of the operating system dependent module imported. The following names have currently been registered: 'posix', 'nt', 'java'.  See also sys.platform has a finer granularity. os.uname() gives system-dependent version information. The platform module provides detailed checks for the system’s identity.
os.nice(increment)  
Add increment to the process’s “niceness”. Return the new niceness. Availability: Unix.
os.open(path, flags, mode=0o777, *, dir_fd=None)  
Open the file path and set various flags according to flags and possibly its mode according to mode. When computing mode, the current umask value is first masked out. Return the file descriptor for the newly opened file. The new file descriptor is non-inheritable. For a description of the flag and mode values, see the C run-time documentation; flag constants (like O_RDONLY and O_WRONLY) are defined in the os module. In particular, on Windows adding O_BINARY is needed to open files in binary mode. This function can support paths relative to directory descriptors with the dir_fd parameter. Raises an auditing event open with arguments path, mode, flags.  Changed in version 3.4: The new file descriptor is now non-inheritable.   Note This function is intended for low-level I/O. For normal usage, use the built-in function open(), which returns a file object with read() and write() methods (and many more). To wrap a file descriptor in a file object, use fdopen().   New in version 3.3: The dir_fd argument.   Changed in version 3.5: If the system call is interrupted and the signal handler does not raise an exception, the function now retries the system call instead of raising an InterruptedError exception (see PEP 475 for the rationale).   Changed in version 3.6: Accepts a path-like object.
os.openpty()  
Open a new pseudo-terminal pair. Return a pair of file descriptors (master, slave) for the pty and the tty, respectively. The new file descriptors are non-inheritable. For a (slightly) more portable approach, use the pty module. Availability: some flavors of Unix.  Changed in version 3.4: The new file descriptors are now non-inheritable.
os.O_RDONLY  
os.O_WRONLY  
os.O_RDWR  
os.O_APPEND  
os.O_CREAT  
os.O_EXCL  
os.O_TRUNC  
The above constants are available on Unix and Windows.
os.O_ASYNC  
os.O_DIRECT  
os.O_DIRECTORY  
os.O_NOFOLLOW  
os.O_NOATIME  
os.O_PATH  
os.O_TMPFILE  
os.O_SHLOCK  
os.O_EXLOCK  
The above constants are extensions and not present if they are not defined by the C library.  Changed in version 3.4: Add O_PATH on systems that support it. Add O_TMPFILE, only available on Linux Kernel 3.11 or newer.
os.O_BINARY  
os.O_NOINHERIT  
os.O_SHORT_LIVED  
os.O_TEMPORARY  
os.O_RANDOM  
os.O_SEQUENTIAL  
os.O_TEXT  
The above constants are only available on Windows.
os.O_DSYNC  
os.O_RSYNC  
os.O_SYNC  
os.O_NDELAY  
os.O_NONBLOCK  
os.O_NOCTTY  
os.O_CLOEXEC  
The above constants are only available on Unix.  Changed in version 3.3: Add O_CLOEXEC constant.
os.pardir  
The constant string used by the operating system to refer to the parent directory. This is '..' for Windows and POSIX. Also available via os.path.
os.path.abspath(path)  
Return a normalized absolutized version of the pathname path. On most platforms, this is equivalent to calling the function normpath() as follows: normpath(join(os.getcwd(), path)).  Changed in version 3.6: Accepts a path-like object.
os.path.basename(path)  
Return the base name of pathname path. This is the second element of the pair returned by passing path to the function split(). Note that the result of this function is different from the Unix basename program; where basename for '/foo/bar/' returns 'bar', the basename() function returns an empty string ('').  Changed in version 3.6: Accepts a path-like object.
os.path.commonpath(paths)  
Return the longest common sub-path of each pathname in the sequence paths. Raise ValueError if paths contain both absolute and relative pathnames, the paths are on the different drives or if paths is empty. Unlike commonprefix(), this returns a valid path. Availability: Unix, Windows.  New in version 3.5.   Changed in version 3.6: Accepts a sequence of path-like objects.
os.path.commonprefix(list)  
Return the longest path prefix (taken character-by-character) that is a prefix of all paths in list. If list is empty, return the empty string ('').  Note This function may return invalid paths because it works a character at a time. To obtain a valid path, see commonpath(). >>> os.path.commonprefix(['/usr/lib', '/usr/local/lib'])
'/usr/l'

>>> os.path.commonpath(['/usr/lib', '/usr/local/lib'])
'/usr'
   Changed in version 3.6: Accepts a path-like object.
os.path.dirname(path)  
Return the directory name of pathname path. This is the first element of the pair returned by passing path to the function split().  Changed in version 3.6: Accepts a path-like object.
os.path.exists(path)  
Return True if path refers to an existing path or an open file descriptor. Returns False for broken symbolic links. On some platforms, this function may return False if permission is not granted to execute os.stat() on the requested file, even if the path physically exists.  Changed in version 3.3: path can now be an integer: True is returned if it is an open file descriptor, False otherwise.   Changed in version 3.6: Accepts a path-like object.
os.path.expanduser(path)  
On Unix and Windows, return the argument with an initial component of ~ or ~user replaced by that user’s home directory. On Unix, an initial ~ is replaced by the environment variable HOME if it is set; otherwise the current user’s home directory is looked up in the password directory through the built-in module pwd. An initial ~user is looked up directly in the password directory. On Windows, USERPROFILE will be used if set, otherwise a combination of HOMEPATH and HOMEDRIVE will be used. An initial ~user is handled by stripping the last directory component from the created user path derived above. If the expansion fails or if the path does not begin with a tilde, the path is returned unchanged.  Changed in version 3.6: Accepts a path-like object.   Changed in version 3.8: No longer uses HOME on Windows.
os.path.expandvars(path)  
Return the argument with environment variables expanded. Substrings of the form $name or ${name} are replaced by the value of environment variable name. Malformed variable names and references to non-existing variables are left unchanged. On Windows, %name% expansions are supported in addition to $name and ${name}.  Changed in version 3.6: Accepts a path-like object.
os.path.getatime(path)  
Return the time of last access of path. The return value is a floating point number giving the number of seconds since the epoch (see the time module). Raise OSError if the file does not exist or is inaccessible.
os.path.getctime(path)  
Return the system’s ctime which, on some systems (like Unix) is the time of the last metadata change, and, on others (like Windows), is the creation time for path. The return value is a number giving the number of seconds since the epoch (see the time module). Raise OSError if the file does not exist or is inaccessible.  Changed in version 3.6: Accepts a path-like object.
os.path.getmtime(path)  
Return the time of last modification of path. The return value is a floating point number giving the number of seconds since the epoch (see the time module). Raise OSError if the file does not exist or is inaccessible.  Changed in version 3.6: Accepts a path-like object.