neulab/docprompting-conala huggingface dataset:
aifc.getcomptype()  
Return a bytes array of length 4 describing the type of compression used in the audio file. For AIFF files, the returned value is b'NONE'.
aifc.getframerate()  
Return the sampling rate (number of audio frames per second).
aifc.getmark(id)  
Return the tuple as described in getmarkers() for the mark with the given id.
aifc.getmarkers()  
Return a list of markers in the audio file. A marker consists of a tuple of three elements. The first is the mark ID (an integer), the second is the mark position in frames from the beginning of the data (an integer), the third is the name of the mark (a string).
aifc.getnchannels()  
Return the number of audio channels (1 for mono, 2 for stereo).
aifc.getparams()  
Returns a namedtuple() (nchannels, sampwidth,
framerate, nframes, comptype, compname), equivalent to output of the get*() methods.
aifc.readframes(nframes)  
Read and return the next nframes frames from the audio file. The returned data is a string containing for each frame the uncompressed samples of all channels.
aifc.rewind()  
Rewind the read pointer. The next readframes() will start from the beginning.
aifc.setcomptype(type, name)  
Specify the compression type. If not specified, the audio data will not be compressed. In AIFF files, compression is not possible. The name parameter should be a human-readable description of the compression type as a bytes array, the type parameter should be a bytes array of length 4. Currently the following compression types are supported: b'NONE', b'ULAW', b'ALAW', b'G722'.
aifc.setframerate(rate)  
Specify the sampling frequency in frames per second.
aifc.setmark(id, pos, name)  
Add a mark with the given id (larger than 0), and the given name at the given position. This method can be called at any time before close().
aifc.setnchannels(nchannels)  
Specify the number of channels in the audio file.
aifc.setnframes(nframes)  
Specify the number of frames that are to be written to the audio file. If this parameter is not set, or not set correctly, the file needs to support seeking.
aifc.setparams(nchannels, sampwidth, framerate, comptype, compname)  
Set all the above parameters at once. The argument is a tuple consisting of the various parameters. This means that it is possible to use the result of a getparams() call as argument to setparams().
aifc.setsampwidth(width)  
Specify the size in bytes of audio samples.
aifc.writeframes(data)  
Write data to the output file. This method can only be called after the audio file parameters have been set.  Changed in version 3.4: Any bytes-like object is now accepted.
aifc.writeframesraw(data)  
Like writeframes(), except that the header of the audio file is not updated.  Changed in version 3.4: Any bytes-like object is now accepted.
aifc.open(file, mode=None)  
Open an AIFF or AIFF-C file and return an object instance with methods that are described below. The argument file is either a string naming a file or a file object. mode must be 'r' or 'rb' when the file must be opened for reading, or 'w' or 'wb' when the file must be opened for writing. If omitted, file.mode is used if it exists, otherwise 'rb' is used. When used for writing, the file object should be seekable, unless you know ahead of time how many samples you are going to write in total and use writeframesraw() and setnframes(). The open() function may be used in a with statement. When the with block completes, the close() method is called.  Changed in version 3.4: Support for the with statement was added.
all(iterable)  
Return True if all elements of the iterable are true (or if the iterable is empty). Equivalent to: def all(iterable):
    for element in iterable:
        if not element:
            return False
    return True
any(iterable)  
Return True if any element of the iterable is true. If the iterable is empty, return False. Equivalent to: def any(iterable):
    for element in iterable:
        if element:
            return True
    return False
class argparse.Action(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)
class argparse.RawDescriptionHelpFormatter  
class argparse.RawTextHelpFormatter  
class argparse.ArgumentDefaultsHelpFormatter  
class argparse.MetavarTypeHelpFormatter
class argparse.ArgumentParser(prog=None, usage=None, description=None, epilog=None, parents=[], formatter_class=argparse.HelpFormatter, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True, allow_abbrev=True, exit_on_error=True)  
Create a new ArgumentParser object. All parameters should be passed as keyword arguments. Each parameter has its own more detailed description below, but in short they are:  
prog - The name of the program (default: sys.argv[0]) 
usage - The string describing the program usage (default: generated from arguments added to parser) 
description - Text to display before the argument help (default: none) 
epilog - Text to display after the argument help (default: none) 
parents - A list of ArgumentParser objects whose arguments should also be included 
formatter_class - A class for customizing the help output 
prefix_chars - The set of characters that prefix optional arguments (default: ‘-‘) 
fromfile_prefix_chars - The set of characters that prefix files from which additional arguments should be read (default: None) 
argument_default - The global default value for arguments (default: None) 
conflict_handler - The strategy for resolving conflicting optionals (usually unnecessary) 
add_help - Add a -h/--help option to the parser (default: True) 
allow_abbrev - Allows long options to be abbreviated if the abbreviation is unambiguous. (default: True) 
exit_on_error - Determines whether or not ArgumentParser exits with error info when an error occurs. (default: True)   Changed in version 3.5: allow_abbrev parameter was added.   Changed in version 3.8: In previous versions, allow_abbrev also disabled grouping of short flags such as -vv to mean -v -v.   Changed in version 3.9: exit_on_error parameter was added.
ArgumentParser.add_argument(name or flags...[, action][, nargs][, const][, default][, type][, choices][, required][, help][, metavar][, dest])  
Define how a single command-line argument should be parsed. Each parameter has its own more detailed description below, but in short they are:  
name or flags - Either a name or a list of option strings, e.g. foo or -f, --foo. 
action - The basic type of action to be taken when this argument is encountered at the command line. 
nargs - The number of command-line arguments that should be consumed. 
const - A constant value required by some action and nargs selections. 
default - The value produced if the argument is absent from the command line and if it is absent from the namespace object. 
type - The type to which the command-line argument should be converted. 
choices - A container of the allowable values for the argument. 
required - Whether or not the command-line option may be omitted (optionals only). 
help - A brief description of what the argument does. 
metavar - A name for the argument in usage messages. 
dest - The name of the attribute to be added to the object returned by parse_args().
ArgumentParser.add_argument_group(title=None, description=None)  
By default, ArgumentParser groups command-line arguments into “positional arguments” and “optional arguments” when displaying help messages. When there is a better conceptual grouping of arguments than this default one, appropriate groups can be created using the add_argument_group() method: >>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)
>>> group = parser.add_argument_group('group')
>>> group.add_argument('--foo', help='foo help')
>>> group.add_argument('bar', help='bar help')
>>> parser.print_help()
usage: PROG [--foo FOO] bar

group:
  bar    bar help
  --foo FOO  foo help
 The add_argument_group() method returns an argument group object which has an add_argument() method just like a regular ArgumentParser. When an argument is added to the group, the parser treats it just like a normal argument, but displays the argument in a separate group for help messages. The add_argument_group() method accepts title and description arguments which can be used to customize this display: >>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)
>>> group1 = parser.add_argument_group('group1', 'group1 description')
>>> group1.add_argument('foo', help='foo help')
>>> group2 = parser.add_argument_group('group2', 'group2 description')
>>> group2.add_argument('--bar', help='bar help')
>>> parser.print_help()
usage: PROG [--bar BAR] foo

group1:
  group1 description

  foo    foo help

group2:
  group2 description

  --bar BAR  bar help
 Note that any arguments not in your user-defined groups will end up back in the usual “positional arguments” and “optional arguments” sections.
ArgumentParser.add_mutually_exclusive_group(required=False)  
Create a mutually exclusive group. argparse will make sure that only one of the arguments in the mutually exclusive group was present on the command line: >>> parser = argparse.ArgumentParser(prog='PROG')
>>> group = parser.add_mutually_exclusive_group()
>>> group.add_argument('--foo', action='store_true')
>>> group.add_argument('--bar', action='store_false')
>>> parser.parse_args(['--foo'])
Namespace(bar=True, foo=True)
>>> parser.parse_args(['--bar'])
Namespace(bar=False, foo=False)
>>> parser.parse_args(['--foo', '--bar'])
usage: PROG [-h] [--foo | --bar]
PROG: error: argument --bar: not allowed with argument --foo
 The add_mutually_exclusive_group() method also accepts a required argument, to indicate that at least one of the mutually exclusive arguments is required: >>> parser = argparse.ArgumentParser(prog='PROG')
>>> group = parser.add_mutually_exclusive_group(required=True)
>>> group.add_argument('--foo', action='store_true')
>>> group.add_argument('--bar', action='store_false')
>>> parser.parse_args([])
usage: PROG [-h] (--foo | --bar)
PROG: error: one of the arguments --foo --bar is required
 Note that currently mutually exclusive argument groups do not support the title and description arguments of add_argument_group().
ArgumentParser.convert_arg_line_to_args(arg_line)  
Arguments that are read from a file (see the fromfile_prefix_chars keyword argument to the ArgumentParser constructor) are read one argument per line. convert_arg_line_to_args() can be overridden for fancier reading. This method takes a single argument arg_line which is a string read from the argument file. It returns a list of arguments parsed from this string. The method is called once per line read from the argument file, in order. A useful override of this method is one that treats each space-separated word as an argument. The following example demonstrates how to do this: class MyArgumentParser(argparse.ArgumentParser):
    def convert_arg_line_to_args(self, arg_line):
        return arg_line.split()
ArgumentParser.error(message)  
This method prints a usage message including the message to the standard error and terminates the program with a status code of 2.
ArgumentParser.exit(status=0, message=None)  
This method terminates the program, exiting with the specified status and, if given, it prints a message before that. The user can override this method to handle these steps differently: class ErrorCatchingArgumentParser(argparse.ArgumentParser):
    def exit(self, status=0, message=None):
        if status:
            raise Exception(f'Exiting because of an error: {message}')
        exit(status)
ArgumentParser.format_help()  
Return a string containing a help message, including the program usage and information about the arguments registered with the ArgumentParser.
ArgumentParser.format_usage()  
Return a string containing a brief description of how the ArgumentParser should be invoked on the command line.
ArgumentParser.get_default(dest)  
Get the default value for a namespace attribute, as set by either add_argument() or by set_defaults(): >>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', default='badger')
>>> parser.get_default('foo')
'badger'
ArgumentParser.parse_args(args=None, namespace=None)  
Convert argument strings to objects and assign them as attributes of the namespace. Return the populated namespace. Previous calls to add_argument() determine exactly what objects are created and how they are assigned. See the documentation for add_argument() for details.  
args - List of strings to parse. The default is taken from sys.argv. 
namespace - An object to take the attributes. The default is a new empty Namespace object.
ArgumentParser.print_help(file=None)  
Print a help message, including the program usage and information about the arguments registered with the ArgumentParser. If file is None, sys.stdout is assumed.
ArgumentParser.print_usage(file=None)  
Print a brief description of how the ArgumentParser should be invoked on the command line. If file is None, sys.stdout is assumed.
ArgumentParser.set_defaults(**kwargs)  
Most of the time, the attributes of the object returned by parse_args() will be fully determined by inspecting the command-line arguments and the argument actions. set_defaults() allows some additional attributes that are determined without any inspection of the command line to be added: >>> parser = argparse.ArgumentParser()
>>> parser.add_argument('foo', type=int)
>>> parser.set_defaults(bar=42, baz='badger')
>>> parser.parse_args(['736'])
Namespace(bar=42, baz='badger', foo=736)
 Note that parser-level defaults always override argument-level defaults: >>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', default='bar')
>>> parser.set_defaults(foo='spam')
>>> parser.parse_args([])
Namespace(foo='spam')
 Parser-level defaults can be particularly useful when working with multiple parsers. See the add_subparsers() method for an example of this type.
class argparse.FileType(mode='r', bufsize=-1, encoding=None, errors=None)  
The FileType factory creates objects that can be passed to the type argument of ArgumentParser.add_argument(). Arguments that have FileType objects as their type will open command-line arguments as files with the requested modes, buffer sizes, encodings and error handling (see the open() function for more details): >>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--raw', type=argparse.FileType('wb', 0))
>>> parser.add_argument('out', type=argparse.FileType('w', encoding='UTF-8'))
>>> parser.parse_args(['--raw', 'raw.dat', 'file.txt'])
Namespace(out=<_io.TextIOWrapper name='file.txt' mode='w' encoding='UTF-8'>, raw=<_io.FileIO name='raw.dat' mode='wb'>)
 FileType objects understand the pseudo-argument '-' and automatically convert this into sys.stdin for readable FileType objects and sys.stdout for writable FileType objects: >>> parser = argparse.ArgumentParser()
>>> parser.add_argument('infile', type=argparse.FileType('r'))
>>> parser.parse_args(['-'])
Namespace(infile=<_io.TextIOWrapper name='<stdin>' encoding='UTF-8'>)
  New in version 3.4: The encodings and errors keyword arguments.
class argparse.Namespace  
Simple class used by default by parse_args() to create an object holding attributes and return it.
exception ArithmeticError  
The base class for those built-in exceptions that are raised for various arithmetic errors: OverflowError, ZeroDivisionError, FloatingPointError.
class array.array(typecode[, initializer])  
A new array whose items are restricted by typecode, and initialized from the optional initializer value, which must be a list, a bytes-like object, or iterable over elements of the appropriate type. If given a list or string, the initializer is passed to the new array’s fromlist(), frombytes(), or fromunicode() method (see below) to add initial items to the array. Otherwise, the iterable initializer is passed to the extend() method. Raises an auditing event array.__new__ with arguments typecode, initializer.
array.append(x)  
Append a new item with value x to the end of the array.
array.buffer_info()  
Return a tuple (address, length) giving the current memory address and the length in elements of the buffer used to hold array’s contents. The size of the memory buffer in bytes can be computed as array.buffer_info()[1] *
array.itemsize. This is occasionally useful when working with low-level (and inherently unsafe) I/O interfaces that require memory addresses, such as certain ioctl() operations. The returned numbers are valid as long as the array exists and no length-changing operations are applied to it.  Note When using array objects from code written in C or C++ (the only way to effectively make use of this information), it makes more sense to use the buffer interface supported by array objects. This method is maintained for backward compatibility and should be avoided in new code. The buffer interface is documented in Buffer Protocol.
array.byteswap()  
“Byteswap” all items of the array. This is only supported for values which are 1, 2, 4, or 8 bytes in size; for other types of values, RuntimeError is raised. It is useful when reading data from a file written on a machine with a different byte order.
array.count(x)  
Return the number of occurrences of x in the array.
array.extend(iterable)  
Append items from iterable to the end of the array. If iterable is another array, it must have exactly the same type code; if not, TypeError will be raised. If iterable is not an array, it must be iterable and its elements must be the right type to be appended to the array.
array.frombytes(s)  
Appends items from the string, interpreting the string as an array of machine values (as if it had been read from a file using the fromfile() method).  New in version 3.2: fromstring() is renamed to frombytes() for clarity.
array.fromfile(f, n)  
Read n items (as machine values) from the file object f and append them to the end of the array. If less than n items are available, EOFError is raised, but the items that were available are still inserted into the array.
array.fromlist(list)  
Append items from the list. This is equivalent to for x in list:
a.append(x) except that if there is a type error, the array is unchanged.
array.fromunicode(s)  
Extends this array with data from the given unicode string. The array must be a type 'u' array; otherwise a ValueError is raised. Use array.frombytes(unicodestring.encode(enc)) to append Unicode data to an array of some other type.
array.index(x)  
Return the smallest i such that i is the index of the first occurrence of x in the array.
array.insert(i, x)  
Insert a new item with value x in the array before position i. Negative values are treated as being relative to the end of the array.
array.pop([i])  
Removes the item with the index i from the array and returns it. The optional argument defaults to -1, so that by default the last item is removed and returned.
array.tobytes()  
Convert the array to an array of machine values and return the bytes representation (the same sequence of bytes that would be written to a file by the tofile() method.)  New in version 3.2: tostring() is renamed to tobytes() for clarity.
array.tofile(f)  
Write all items (as machine values) to the file object f.
array.tounicode()  
Convert the array to a unicode string. The array must be a type 'u' array; otherwise a ValueError is raised. Use array.tobytes().decode(enc) to obtain a unicode string from an array of some other type.
ascii(object)  
As repr(), return a string containing a printable representation of an object, but escape the non-ASCII characters in the string returned by repr() using \x, \u or \U escapes. This generates a string similar to that returned by repr() in Python 2.
class ast.Add  
class ast.Sub  
class ast.Mult  
class ast.Div  
class ast.FloorDiv  
class ast.Mod  
class ast.Pow  
class ast.LShift  
class ast.RShift  
class ast.BitOr  
class ast.BitXor  
class ast.BitAnd  
class ast.MatMult  
Binary operator tokens.
class ast.alias(name, asname)  
Both parameters are raw strings of the names. asname can be None if the regular name is to be used. >>> print(ast.dump(ast.parse('from ..foo.bar import a as b, c'), indent=4))
Module(
    body=[
        ImportFrom(
            module='foo.bar',
            names=[
                alias(name='a', asname='b'),
                alias(name='c')],
            level=2)],
    type_ignores=[])
class ast.AnnAssign(target, annotation, value, simple)  
An assignment with a type annotation. target is a single node and can be a Name, a Attribute or a Subscript. annotation is the annotation, such as a Constant or Name node. value is a single optional node. simple is a boolean integer set to True for a Name node in target that do not appear in between parenthesis and are hence pure names and not expressions. >>> print(ast.dump(ast.parse('c: int'), indent=4))
Module(
    body=[
        AnnAssign(
            target=Name(id='c', ctx=Store()),
            annotation=Name(id='int', ctx=Load()),
            simple=1)],
    type_ignores=[])

>>> print(ast.dump(ast.parse('(a): int = 1'), indent=4)) # Annotation with parenthesis
Module(
    body=[
        AnnAssign(
            target=Name(id='a', ctx=Store()),
            annotation=Name(id='int', ctx=Load()),
            value=Constant(value=1),
            simple=0)],
    type_ignores=[])

>>> print(ast.dump(ast.parse('a.b: int'), indent=4)) # Attribute annotation
Module(
    body=[
        AnnAssign(
            target=Attribute(
                value=Name(id='a', ctx=Load()),
                attr='b',
                ctx=Store()),
            annotation=Name(id='int', ctx=Load()),
            simple=0)],
    type_ignores=[])

>>> print(ast.dump(ast.parse('a[1]: int'), indent=4)) # Subscript annotation
Module(
    body=[
        AnnAssign(
            target=Subscript(
                value=Name(id='a', ctx=Load()),
                slice=Constant(value=1),
                ctx=Store()),
            annotation=Name(id='int', ctx=Load()),
            simple=0)],
    type_ignores=[])
class ast.arg(arg, annotation, type_comment)  
A single argument in a list. arg is a raw string of the argument name, annotation is its annotation, such as a Str or Name node.  
type_comment  
type_comment is an optional string with the type annotation as a comment 
 >>> print(ast.dump(ast.parse("""\
... @decorator1
... @decorator2
... def f(a: 'annotation', b=1, c=2, *d, e, f=3, **g) -> 'return annotation':
...     pass
... """), indent=4))
Module(
    body=[
        FunctionDef(
            name='f',
            args=arguments(
                posonlyargs=[],
                args=[
                    arg(
                        arg='a',
                        annotation=Constant(value='annotation')),
                    arg(arg='b'),
                    arg(arg='c')],
                vararg=arg(arg='d'),
                kwonlyargs=[
                    arg(arg='e'),
                    arg(arg='f')],
                kw_defaults=[
                    None,
                    Constant(value=3)],
                kwarg=arg(arg='g'),
                defaults=[
                    Constant(value=1),
                    Constant(value=2)]),
            body=[
                Pass()],
            decorator_list=[
                Name(id='decorator1', ctx=Load()),
                Name(id='decorator2', ctx=Load())],
            returns=Constant(value='return annotation'))],
    type_ignores=[])
class ast.arguments(posonlyargs, args, vararg, kwonlyargs, kw_defaults, kwarg, defaults)  
The arguments for a function.  
posonlyargs, args and kwonlyargs are lists of arg nodes. 
vararg and kwarg are single arg nodes, referring to the *args, **kwargs parameters. 
kw_defaults is a list of default values for keyword-only arguments. If one is None, the corresponding argument is required. 
defaults is a list of default values for arguments that can be passed positionally. If there are fewer defaults, they correspond to the last n arguments.
class ast.Assert(test, msg)  
An assertion. test holds the condition, such as a Compare node. msg holds the failure message. >>> print(ast.dump(ast.parse('assert x,y'), indent=4))
Module(
    body=[
        Assert(
            test=Name(id='x', ctx=Load()),
            msg=Name(id='y', ctx=Load()))],
    type_ignores=[])