neulab/docprompting-conala huggingface dataset:
time.isoformat(timespec='auto')  
Return a string representing the time in ISO 8601 format, one of:  
HH:MM:SS.ffffff, if microsecond is not 0 
HH:MM:SS, if microsecond is 0 
HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]], if utcoffset() does not return None
 
HH:MM:SS+HH:MM[:SS[.ffffff]], if microsecond is 0 and utcoffset() does not return None
  The optional argument timespec specifies the number of additional components of the time to include (the default is 'auto'). It can be one of the following:  
'auto': Same as 'seconds' if microsecond is 0, same as 'microseconds' otherwise. 
'hours': Include the hour in the two-digit HH format. 
'minutes': Include hour and minute in HH:MM format. 
'seconds': Include hour, minute, and second in HH:MM:SS format. 
'milliseconds': Include full time, but truncate fractional second part to milliseconds. HH:MM:SS.sss format. 
'microseconds': Include full time in HH:MM:SS.ffffff format.   Note Excluded time components are truncated, not rounded.  ValueError will be raised on an invalid timespec argument. Example: >>> from datetime import time
>>> time(hour=12, minute=34, second=56, microsecond=123456).isoformat(timespec='minutes')
'12:34'
>>> dt = time(hour=12, minute=34, second=56, microsecond=0)
>>> dt.isoformat(timespec='microseconds')
'12:34:56.000000'
>>> dt.isoformat(timespec='auto')
'12:34:56'
  New in version 3.6: Added the timespec argument.
time.max  
The latest representable time, time(23, 59, 59, 999999).
time.min  
The earliest representable time, time(0, 0, 0, 0).
time.replace(hour=self.hour, minute=self.minute, second=self.second, microsecond=self.microsecond, tzinfo=self.tzinfo, *, fold=0)  
Return a time with the same value, except for those attributes given new values by whichever keyword arguments are specified. Note that tzinfo=None can be specified to create a naive time from an aware time, without conversion of the time data.  New in version 3.6: Added the fold argument.
time.resolution  
The smallest possible difference between non-equal time objects, timedelta(microseconds=1), although note that arithmetic on time objects is not supported.
time.strftime(format)  
Return a string representing the time, controlled by an explicit format string. For a complete list of formatting directives, see strftime() and strptime() Behavior.
time.tzinfo  
The object passed as the tzinfo argument to the time constructor, or None if none was passed.
time.tzname()  
If tzinfo is None, returns None, else returns self.tzinfo.tzname(None), or raises an exception if the latter doesn’t return None or a string object.
time.utcoffset()  
If tzinfo is None, returns None, else returns self.tzinfo.utcoffset(None), and raises an exception if the latter doesn’t return None or a timedelta object with magnitude less than one day.  Changed in version 3.7: The UTC offset is not restricted to a whole number of minutes.
time.__format__(format)  
Same as time.strftime(). This makes it possible to specify a format string for a time object in formatted string literals and when using str.format(). For a complete list of formatting directives, see strftime() and strptime() Behavior.
time.__str__()  
For a time t, str(t) is equivalent to t.isoformat().
class datetime.timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)  
All arguments are optional and default to 0. Arguments may be integers or floats, and may be positive or negative. Only days, seconds and microseconds are stored internally. Arguments are converted to those units:  A millisecond is converted to 1000 microseconds. A minute is converted to 60 seconds. An hour is converted to 3600 seconds. A week is converted to 7 days.  and days, seconds and microseconds are then normalized so that the representation is unique, with  0 <= microseconds < 1000000 
0 <= seconds < 3600*24 (the number of seconds in one day) -999999999 <= days <= 999999999  The following example illustrates how any arguments besides days, seconds and microseconds are “merged” and normalized into those three resulting attributes: >>> from datetime import timedelta
>>> delta = timedelta(
...     days=50,
...     seconds=27,
...     microseconds=10,
...     milliseconds=29000,
...     minutes=5,
...     hours=8,
...     weeks=2
... )
>>> # Only days, seconds, and microseconds remain
>>> delta
datetime.timedelta(days=64, seconds=29156, microseconds=10)
 If any argument is a float and there are fractional microseconds, the fractional microseconds left over from all arguments are combined and their sum is rounded to the nearest microsecond using round-half-to-even tiebreaker. If no argument is a float, the conversion and normalization processes are exact (no information is lost). If the normalized value of days lies outside the indicated range, OverflowError is raised. Note that normalization of negative values may be surprising at first. For example: >>> from datetime import timedelta
>>> d = timedelta(microseconds=-1)
>>> (d.days, d.seconds, d.microseconds)
(-1, 86399, 999999)
timedelta.max  
The most positive timedelta object, timedelta(days=999999999,
hours=23, minutes=59, seconds=59, microseconds=999999).
timedelta.resolution  
The smallest possible difference between non-equal timedelta objects, timedelta(microseconds=1).
timedelta.total_seconds()  
Return the total number of seconds contained in the duration. Equivalent to td / timedelta(seconds=1). For interval units other than seconds, use the division form directly (e.g. td / timedelta(microseconds=1)). Note that for very large time intervals (greater than 270 years on most platforms) this method will lose microsecond accuracy.  New in version 3.2.
class datetime.timezone(offset, name=None)  
The offset argument must be specified as a timedelta object representing the difference between the local time and UTC. It must be strictly between -timedelta(hours=24) and timedelta(hours=24), otherwise ValueError is raised. The name argument is optional. If specified it must be a string that will be used as the value returned by the datetime.tzname() method.  New in version 3.2.   Changed in version 3.7: The UTC offset is not restricted to a whole number of minutes.
timezone.fromutc(dt)  
Return dt + offset. The dt argument must be an aware datetime instance, with tzinfo set to self.
timezone.tzname(dt)  
Return the fixed value specified when the timezone instance is constructed. If name is not provided in the constructor, the name returned by tzname(dt) is generated from the value of the offset as follows. If offset is timedelta(0), the name is “UTC”, otherwise it is a string in the format UTC±HH:MM, where ± is the sign of offset, HH and MM are two digits of offset.hours and offset.minutes respectively.  Changed in version 3.6: Name generated from offset=timedelta(0) is now plain ‘UTC’, not 'UTC+00:00'.
timezone.utcoffset(dt)  
Return the fixed value specified when the timezone instance is constructed. The dt argument is ignored. The return value is a timedelta instance equal to the difference between the local time and UTC.  Changed in version 3.7: The UTC offset is not restricted to a whole number of minutes.
class datetime.tzinfo  
This is an abstract base class, meaning that this class should not be instantiated directly. Define a subclass of tzinfo to capture information about a particular time zone. An instance of (a concrete subclass of) tzinfo can be passed to the constructors for datetime and time objects. The latter objects view their attributes as being in local time, and the tzinfo object supports methods revealing offset of local time from UTC, the name of the time zone, and DST offset, all relative to a date or time object passed to them. You need to derive a concrete subclass, and (at least) supply implementations of the standard tzinfo methods needed by the datetime methods you use. The datetime module provides timezone, a simple concrete subclass of tzinfo which can represent timezones with fixed offset from UTC such as UTC itself or North American EST and EDT. Special requirement for pickling: A tzinfo subclass must have an __init__() method that can be called with no arguments, otherwise it can be pickled but possibly not unpickled again. This is a technical requirement that may be relaxed in the future. A concrete subclass of tzinfo may need to implement the following methods. Exactly which methods are needed depends on the uses made of aware datetime objects. If in doubt, simply implement all of them.
tzinfo.dst(dt)  
Return the daylight saving time (DST) adjustment, as a timedelta object or None if DST information isn’t known. Return timedelta(0) if DST is not in effect. If DST is in effect, return the offset as a timedelta object (see utcoffset() for details). Note that DST offset, if applicable, has already been added to the UTC offset returned by utcoffset(), so there’s no need to consult dst() unless you’re interested in obtaining DST info separately. For example, datetime.timetuple() calls its tzinfo attribute’s dst() method to determine how the tm_isdst flag should be set, and tzinfo.fromutc() calls dst() to account for DST changes when crossing time zones. An instance tz of a tzinfo subclass that models both standard and daylight times must be consistent in this sense: tz.utcoffset(dt) - tz.dst(dt) must return the same result for every datetime dt with dt.tzinfo ==
tz For sane tzinfo subclasses, this expression yields the time zone’s “standard offset”, which should not depend on the date or the time, but only on geographic location. The implementation of datetime.astimezone() relies on this, but cannot detect violations; it’s the programmer’s responsibility to ensure it. If a tzinfo subclass cannot guarantee this, it may be able to override the default implementation of tzinfo.fromutc() to work correctly with astimezone() regardless. Most implementations of dst() will probably look like one of these two: def dst(self, dt):
    # a fixed-offset class:  doesn't account for DST
    return timedelta(0)
 or: def dst(self, dt):
    # Code to set dston and dstoff to the time zone's DST
    # transition times based on the input dt.year, and expressed
    # in standard local time.

    if dston <= dt.replace(tzinfo=None) < dstoff:
        return timedelta(hours=1)
    else:
        return timedelta(0)
 The default implementation of dst() raises NotImplementedError.  Changed in version 3.7: The DST offset is not restricted to a whole number of minutes.
tzinfo.fromutc(dt)  
This is called from the default datetime.astimezone() implementation. When called from that, dt.tzinfo is self, and dt’s date and time data are to be viewed as expressing a UTC time. The purpose of fromutc() is to adjust the date and time data, returning an equivalent datetime in self’s local time. Most tzinfo subclasses should be able to inherit the default fromutc() implementation without problems. It’s strong enough to handle fixed-offset time zones, and time zones accounting for both standard and daylight time, and the latter even if the DST transition times differ in different years. An example of a time zone the default fromutc() implementation may not handle correctly in all cases is one where the standard offset (from UTC) depends on the specific date and time passed, which can happen for political reasons. The default implementations of astimezone() and fromutc() may not produce the result you want if the result is one of the hours straddling the moment the standard offset changes. Skipping code for error cases, the default fromutc() implementation acts like: def fromutc(self, dt):
    # raise ValueError error if dt.tzinfo is not self
    dtoff = dt.utcoffset()
    dtdst = dt.dst()
    # raise ValueError if dtoff is None or dtdst is None
    delta = dtoff - dtdst  # this is self's standard offset
    if delta:
        dt += delta   # convert to standard local time
        dtdst = dt.dst()
        # raise ValueError if dtdst is None
    if dtdst:
        return dt + dtdst
    else:
        return dt
tzinfo.tzname(dt)  
Return the time zone name corresponding to the datetime object dt, as a string. Nothing about string names is defined by the datetime module, and there’s no requirement that it mean anything in particular. For example, “GMT”, “UTC”, “-500”, “-5:00”, “EDT”, “US/Eastern”, “America/New York” are all valid replies. Return None if a string name isn’t known. Note that this is a method rather than a fixed string primarily because some tzinfo subclasses will wish to return different names depending on the specific value of dt passed, especially if the tzinfo class is accounting for daylight time. The default implementation of tzname() raises NotImplementedError.
tzinfo.utcoffset(dt)  
Return offset of local time from UTC, as a timedelta object that is positive east of UTC. If local time is west of UTC, this should be negative. This represents the total offset from UTC; for example, if a tzinfo object represents both time zone and DST adjustments, utcoffset() should return their sum. If the UTC offset isn’t known, return None. Else the value returned must be a timedelta object strictly between -timedelta(hours=24) and timedelta(hours=24) (the magnitude of the offset must be less than one day). Most implementations of utcoffset() will probably look like one of these two: return CONSTANT                 # fixed-offset class
return CONSTANT + self.dst(dt)  # daylight-aware class
 If utcoffset() does not return None, dst() should not return None either. The default implementation of utcoffset() raises NotImplementedError.  Changed in version 3.7: The UTC offset is not restricted to a whole number of minutes.
dumbdbm.sync()  
Synchronize the on-disk directory and data files. This method is called by the Shelve.sync() method.
exception dbm.dumb.error  
Raised on dbm.dumb-specific errors, such as I/O errors. KeyError is raised for general mapping errors like specifying an incorrect key.
dbm.dumb.open(filename[, flag[, mode]])  
Open a dumbdbm database and return a dumbdbm object. The filename argument is the basename of the database file (without any specific extensions). When a dumbdbm database is created, files with .dat and .dir extensions are created. The optional flag argument can be:   
Value Meaning   
'r' Open existing database for reading only (default)  
'w' Open existing database for reading and writing  
'c' Open database for reading and writing, creating it if it doesn’t exist  
'n' Always create a new, empty database, open for reading and writing   The optional mode argument is the Unix mode of the file, used only when the database has to be created. It defaults to octal 0o666 (and will be modified by the prevailing umask).  Warning It is possible to crash the Python interpreter when loading a database with a sufficiently large/complex entry due to stack depth limitations in Python’s AST compiler.   Changed in version 3.5: open() always creates a new database when the flag has the value 'n'.   Changed in version 3.8: A database opened with flags 'r' is now read-only. Opening with flags 'r' and 'w' no longer creates a database if it does not exist.  In addition to the methods provided by the collections.abc.MutableMapping class, dumbdbm objects provide the following methods:  
dumbdbm.sync()  
Synchronize the on-disk directory and data files. This method is called by the Shelve.sync() method. 
  
dumbdbm.close()  
Close the dumbdbm database.
exception dbm.error  
A tuple containing the exceptions that can be raised by each of the supported modules, with a unique exception also named dbm.error as the first item — the latter is used when dbm.error is raised.
exception dbm.gnu.error  
Raised on dbm.gnu-specific errors, such as I/O errors. KeyError is raised for general mapping errors like specifying an incorrect key.
gdbm.firstkey()  
It’s possible to loop over every key in the database using this method and the nextkey() method. The traversal is ordered by gdbm’s internal hash values, and won’t be sorted by the key values. This method returns the starting key.
gdbm.nextkey(key)  
Returns the key that follows key in the traversal. The following code prints every key in the database db, without having to create a list in memory that contains them all: k = db.firstkey()
while k != None:
    print(k)
    k = db.nextkey(k)
gdbm.reorganize()  
If you have carried out a lot of deletions and would like to shrink the space used by the gdbm file, this routine will reorganize the database. gdbm objects will not shorten the length of a database file except by using this reorganization; otherwise, deleted file space will be kept and reused as new (key, value) pairs are added.
gdbm.sync()  
When the database has been opened in fast mode, this method forces any unwritten data to be written to the disk.
dbm.gnu.open(filename[, flag[, mode]])  
Open a gdbm database and return a gdbm object. The filename argument is the name of the database file. The optional flag argument can be:   
Value Meaning   
'r' Open existing database for reading only (default)  
'w' Open existing database for reading and writing  
'c' Open database for reading and writing, creating it if it doesn’t exist  
'n' Always create a new, empty database, open for reading and writing   The following additional characters may be appended to the flag to control how the database is opened:   
Value Meaning   
'f' Open the database in fast mode. Writes to the database will not be synchronized.  
's' Synchronized mode. This will cause changes to the database to be immediately written to the file.  
'u' Do not lock database.   Not all flags are valid for all versions of gdbm. The module constant open_flags is a string of supported flag characters. The exception error is raised if an invalid flag is specified. The optional mode argument is the Unix mode of the file, used only when the database has to be created. It defaults to octal 0o666. In addition to the dictionary-like methods, gdbm objects have the following methods:  
gdbm.firstkey()  
It’s possible to loop over every key in the database using this method and the nextkey() method. The traversal is ordered by gdbm’s internal hash values, and won’t be sorted by the key values. This method returns the starting key. 
  
gdbm.nextkey(key)  
Returns the key that follows key in the traversal. The following code prints every key in the database db, without having to create a list in memory that contains them all: k = db.firstkey()
while k != None:
    print(k)
    k = db.nextkey(k)
 
  
gdbm.reorganize()  
If you have carried out a lot of deletions and would like to shrink the space used by the gdbm file, this routine will reorganize the database. gdbm objects will not shorten the length of a database file except by using this reorganization; otherwise, deleted file space will be kept and reused as new (key, value) pairs are added. 
  
gdbm.sync()  
When the database has been opened in fast mode, this method forces any unwritten data to be written to the disk. 
  
gdbm.close()  
Close the gdbm database.
exception dbm.ndbm.error  
Raised on dbm.ndbm-specific errors, such as I/O errors. KeyError is raised for general mapping errors like specifying an incorrect key.
dbm.ndbm.open(filename[, flag[, mode]])  
Open a dbm database and return a ndbm object. The filename argument is the name of the database file (without the .dir or .pag extensions). The optional flag argument must be one of these values:   
Value Meaning   
'r' Open existing database for reading only (default)  
'w' Open existing database for reading and writing  
'c' Open database for reading and writing, creating it if it doesn’t exist  
'n' Always create a new, empty database, open for reading and writing   The optional mode argument is the Unix mode of the file, used only when the database has to be created. It defaults to octal 0o666 (and will be modified by the prevailing umask). In addition to the dictionary-like methods, ndbm objects provide the following method:  
ndbm.close()  
Close the ndbm database.
dbm.open(file, flag='r', mode=0o666)  
Open the database file file and return a corresponding object. If the database file already exists, the whichdb() function is used to determine its type and the appropriate module is used; if it does not exist, the first module listed above that can be imported is used. The optional flag argument can be:   
Value Meaning   
'r' Open existing database for reading only (default)  
'w' Open existing database for reading and writing  
'c' Open database for reading and writing, creating it if it doesn’t exist  
'n' Always create a new, empty database, open for reading and writing   The optional mode argument is the Unix mode of the file, used only when the database has to be created. It defaults to octal 0o666 (and will be modified by the prevailing umask).
dbm.whichdb(filename)  
This function attempts to guess which of the several simple database modules available — dbm.gnu, dbm.ndbm or dbm.dumb — should be used to open a given file. Returns one of the following values: None if the file can’t be opened because it’s unreadable or doesn’t exist; the empty string ('') if the file’s format can’t be guessed; or a string containing the required module name, such as 'dbm.ndbm' or 'dbm.gnu'.
class decimal.BasicContext  
This is a standard context defined by the General Decimal Arithmetic Specification. Precision is set to nine. Rounding is set to ROUND_HALF_UP. All flags are cleared. All traps are enabled (treated as exceptions) except Inexact, Rounded, and Subnormal. Because many of the traps are enabled, this context is useful for debugging.
class decimal.Clamped  
Altered an exponent to fit representation constraints. Typically, clamping occurs when an exponent falls outside the context’s Emin and Emax limits. If possible, the exponent is reduced to fit by adding zeros to the coefficient.
clear_traps()  
Resets all of the traps to 0.  New in version 3.3.
compare_signal(x, y)  
Compares the values of the two operands numerically.
compare_total(x, y)  
Compares two operands using their abstract representation.
compare_total_mag(x, y)  
Compares two operands using their abstract representation, ignoring sign.
copy_abs(x)  
Returns a copy of x with the sign set to 0.
create_decimal(num)  
Creates a new Decimal instance from num but using self as context. Unlike the Decimal constructor, the context precision, rounding method, flags, and traps are applied to the conversion. This is useful because constants are often given to a greater precision than is needed by the application. Another benefit is that rounding immediately eliminates unintended effects from digits beyond the current precision. In the following example, using unrounded inputs means that adding zero to a sum can change the result: >>> getcontext().prec = 3
>>> Decimal('3.4445') + Decimal('1.0023')
Decimal('4.45')
>>> Decimal('3.4445') + Decimal(0) + Decimal('1.0023')
Decimal('4.44')
 This method implements the to-number operation of the IBM specification. If the argument is a string, no leading or trailing whitespace or underscores are permitted.
create_decimal_from_float(f)  
Creates a new Decimal instance from a float f but rounding using self as the context. Unlike the Decimal.from_float() class method, the context precision, rounding method, flags, and traps are applied to the conversion. >>> context = Context(prec=5, rounding=ROUND_DOWN)
>>> context.create_decimal_from_float(math.pi)
Decimal('3.1415')
>>> context = Context(prec=5, traps=[Inexact])
>>> context.create_decimal_from_float(math.pi)
Traceback (most recent call last):
    ...
decimal.Inexact: None
  New in version 3.1.
divide_int(x, y)  
Return x divided by y, truncated to an integer.
divmod(x, y)  
Divides two numbers and returns the integer part of the result.
Etiny()  
Returns a value equal to Emin - prec + 1 which is the minimum exponent value for subnormal results. When underflow occurs, the exponent is set to Etiny.
Etop()  
Returns a value equal to Emax - prec + 1.
fma(x, y, z)  
Returns x multiplied by y, plus z.
is_nan(x)  
Returns True if x is a qNaN or sNaN; otherwise returns False.
is_normal(x)  
Returns True if x is a normal number; otherwise returns False.
is_qnan(x)  
Returns True if x is a quiet NaN; otherwise returns False.
is_snan(x)  
Returns True if x is a signaling NaN; otherwise returns False.