neulab/docprompting-conala huggingface dataset:
pygame.time.set_timer() 
 repeatedly create an event on the event queue set_timer(eventid, milliseconds) -> None set_timer(eventid, milliseconds, once) -> None  Set an event type to appear on the event queue every given number of milliseconds. The first event will not appear until the amount of time has passed. Every event type can have a separate timer attached to it. It is best to use the value between pygame.USEREVENT and pygame.NUMEVENTS. To disable the timer for an event, set the milliseconds argument to 0. If the once argument is True, then only send the timer once.  New in pygame 2.0.0.dev3: once argument added.
pygame.time.wait() 
 pause the program for an amount of time wait(milliseconds) -> time  Will pause for a given number of milliseconds. This function sleeps the process to share the processor with other programs. A program that waits for even a few milliseconds will consume very little processor time. It is slightly less accurate than the pygame.time.delay() function. This returns the actual number of milliseconds used.
pygame.transform.average_color() 
 finds the average color of a surface average_color(Surface, Rect = None) -> Color  Finds the average color of a Surface or a region of a surface specified by a Rect, and returns it as a Color.
pygame.transform.average_surfaces() 
 find the average surface from many surfaces. average_surfaces(Surfaces, DestSurface = None, palette_colors = 1) -> Surface  Takes a sequence of surfaces and returns a surface with average colors from each of the surfaces. palette_colors - if true we average the colors in palette, otherwise we average the pixel values. This is useful if the surface is actually greyscale colors, and not palette colors. Note, this function currently does not handle palette using surfaces correctly.  New in pygame 1.8.   New in pygame 1.9: palette_colors argument
pygame.transform.chop() 
 gets a copy of an image with an interior area removed chop(Surface, rect) -> Surface  Extracts a portion of an image. All vertical and horizontal pixels surrounding the given rectangle area are removed. The corner areas (diagonal to the rect) are then brought together. (The original image is not altered by this operation.) NOTE: If you want a "crop" that returns the part of an image within a rect, you can blit with a rect to a new surface or copy a subsurface.
pygame.transform.flip() 
 flip vertically and horizontally flip(Surface, xbool, ybool) -> Surface  This can flip a Surface either vertically, horizontally, or both. Flipping a Surface is non-destructive and returns a new Surface with the same dimensions.
pygame.transform.get_smoothscale_backend() 
 return smoothscale filter version in use: 'GENERIC', 'MMX', or 'SSE' get_smoothscale_backend() -> String  Shows whether or not smoothscale is using MMX or SSE acceleration. If no acceleration is available then "GENERIC" is returned. For a x86 processor the level of acceleration to use is determined at runtime. This function is provided for pygame testing and debugging.
pygame.transform.laplacian() 
 find edges in a surface laplacian(Surface, DestSurface = None) -> Surface  Finds the edges in a surface using the laplacian algorithm.  New in pygame 1.8.
pygame.transform.rotate() 
 rotate an image rotate(Surface, angle) -> Surface  Unfiltered counterclockwise rotation. The angle argument represents degrees and can be any floating point value. Negative angle amounts will rotate clockwise. Unless rotating by 90 degree increments, the image will be padded larger to hold the new size. If the image has pixel alphas, the padded area will be transparent. Otherwise pygame will pick a color that matches the Surface colorkey or the topleft pixel value.
pygame.transform.rotozoom() 
 filtered scale and rotation rotozoom(Surface, angle, scale) -> Surface  This is a combined scale and rotation transform. The resulting Surface will be a filtered 32-bit Surface. The scale argument is a floating point value that will be multiplied by the current resolution. The angle argument is a floating point value that represents the counterclockwise degrees to rotate. A negative rotation angle will rotate clockwise.
pygame.transform.scale() 
 resize to new resolution scale(Surface, (width, height), DestSurface = None) -> Surface  Resizes the Surface to a new resolution. This is a fast scale operation that does not sample the results. An optional destination surface can be used, rather than have it create a new one. This is quicker if you want to repeatedly scale something. However the destination must be the same size as the (width, height) passed in. Also the destination surface must be the same format.
pygame.transform.scale2x() 
 specialized image doubler scale2x(Surface, DestSurface = None) -> Surface  This will return a new image that is double the size of the original. It uses the AdvanceMAME Scale2X algorithm which does a 'jaggie-less' scale of bitmap graphics. This really only has an effect on simple images with solid colors. On photographic and antialiased images it will look like a regular unfiltered scale. An optional destination surface can be used, rather than have it create a new one. This is quicker if you want to repeatedly scale something. However the destination must be twice the size of the source surface passed in. Also the destination surface must be the same format.
pygame.transform.set_smoothscale_backend() 
 set smoothscale filter version to one of: 'GENERIC', 'MMX', or 'SSE' set_smoothscale_backend(type) -> None  Sets smoothscale acceleration. Takes a string argument. A value of 'GENERIC' turns off acceleration. 'MMX' uses MMX instructions only. 'SSE' allows SSE extensions as well. A value error is raised if type is not recognized or not supported by the current processor. This function is provided for pygame testing and debugging. If smoothscale causes an invalid instruction error then it is a pygame/SDL bug that should be reported. Use this function as a temporary fix only.
pygame.transform.smoothscale() 
 scale a surface to an arbitrary size smoothly smoothscale(Surface, (width, height), DestSurface = None) -> Surface  Uses one of two different algorithms for scaling each dimension of the input surface as required. For shrinkage, the output pixels are area averages of the colors they cover. For expansion, a bilinear filter is used. For the x86-64 and i686 architectures, optimized MMX routines are included and will run much faster than other machine types. The size is a 2 number sequence for (width, height). This function only works for 24-bit or 32-bit surfaces. An exception will be thrown if the input surface bit depth is less than 24.  New in pygame 1.8.
pygame.version.rev 
 repository revision of the build rev = 'a6f89747b551+'  The Mercurial node identifier of the repository checkout from which this package was built. If the identifier ends with a plus sign '+' then the package contains uncommitted changes. Please include this revision number in bug reports, especially for non-release pygame builds. Important note: pygame development has moved to github, this variable is obsolete now. As soon as development shifted to github, this variable started returning an empty string "". It has always been returning an empty string since v1.9.5.  Changed in pygame 1.9.5: Always returns an empty string "".
pygame.version.SDL 
 tupled integers of the SDL library version SDL = '(2, 0, 12)'  This is the SDL library version represented as an extended tuple. It also has attributes 'major', 'minor' & 'patch' that can be accessed like this: >>> pygame.version.SDL.major
2 printing the whole thing returns a string like this: >>> pygame.version.SDL
SDLVersion(major=2, minor=0, patch=12)  New in pygame 2.0.0.
pygame.version.ver 
 version number as a string ver = '1.2'  This is the version represented as a string. It can contain a micro release number as well, e.g. '1.5.2'
pygame.version.vernum 
 tupled integers of the version vernum = (1, 5, 3)  This version information can easily be compared with other version numbers of the same format. An example of checking pygame version numbers would look like this: if pygame.version.vernum < (1, 5):
    print('Warning, older version of pygame (%s)' %  pygame.version.ver)
    disable_advanced_features = True  New in pygame 1.9.6: Attributes major, minor, and patch.  vernum.major == vernum[0]
vernum.minor == vernum[1]
vernum.patch == vernum[2]  Changed in pygame 1.9.6: str(pygame.version.vernum) returns a string like "2.0.0" instead of "(2, 0, 0)".   Changed in pygame 1.9.6: repr(pygame.version.vernum) returns a string like "PygameVersion(major=2, minor=0, patch=0)" instead of "(2, 0, 0)".
Extensions These are primarily intended for library authors looking to extend pandas objects.       
api.extensions.register_extension_dtype(cls) Register an ExtensionType with pandas as class decorator.  
api.extensions.register_dataframe_accessor(name) Register a custom accessor on DataFrame objects.  
api.extensions.register_series_accessor(name) Register a custom accessor on Series objects.  
api.extensions.register_index_accessor(name) Register a custom accessor on Index objects.  
api.extensions.ExtensionDtype() A custom data type, to be paired with an ExtensionArray.          
api.extensions.ExtensionArray() Abstract base class for custom 1-D array types.  
arrays.PandasArray(values[, copy]) A pandas ExtensionArray for NumPy data.    Additionally, we have some utility methods for ensuring your object behaves correctly.       
api.indexers.check_array_indexer(array, indexer) Check if indexer is a valid array indexer for array.    The sentinel pandas.api.extensions.no_default is used as the default value in some methods. Use an is comparison to check if the user provides a non-default value.
pandas.api.extensions.ExtensionArray._concat_same_type   classmethodExtensionArray._concat_same_type(to_concat)[source]
 
Concatenate multiple array of this dtype.  Parameters 
 
to_concat:sequence of this type

  Returns 
 ExtensionArray
pandas.api.extensions.ExtensionArray._formatter   ExtensionArray._formatter(boxed=False)[source]
 
Formatting function for scalar values. This is used in the default ‘__repr__’. The returned formatting function receives instances of your scalar type.  Parameters 
 
boxed:bool, default False


An indicated for whether or not your array is being printed within a Series, DataFrame, or Index (True), or just by itself (False). This may be useful if you want scalar values to appear differently within a Series versus on its own (e.g. quoted or not).    Returns 
 Callable[[Any], str]

A callable that gets instances of the scalar type and returns a string. By default, repr() is used when boxed=False and str() is used when boxed=True.
pandas.api.extensions.ExtensionArray._from_factorized   classmethodExtensionArray._from_factorized(values, original)[source]
 
Reconstruct an ExtensionArray after factorization.  Parameters 
 
values:ndarray


An integer ndarray with the factorized values.  
original:ExtensionArray


The original ExtensionArray that factorize was called on.      See also  factorize

Top-level factorize method that dispatches here.  ExtensionArray.factorize

Encode the extension array as an enumerated type.
pandas.api.extensions.ExtensionArray._from_sequence   classmethodExtensionArray._from_sequence(scalars, *, dtype=None, copy=False)[source]
 
Construct a new ExtensionArray from a sequence of scalars.  Parameters 
 
scalars:Sequence


Each element will be an instance of the scalar type for this array, cls.dtype.type or be converted into this type in this method.  
dtype:dtype, optional


Construct for this particular dtype. This should be a Dtype compatible with the ExtensionArray.  
copy:bool, default False


If True, copy the underlying data.    Returns 
 ExtensionArray
pandas.api.extensions.ExtensionArray._from_sequence_of_strings   classmethodExtensionArray._from_sequence_of_strings(strings, *, dtype=None, copy=False)[source]
 
Construct a new ExtensionArray from a sequence of strings.  Parameters 
 
strings:Sequence


Each element will be an instance of the scalar type for this array, cls.dtype.type.  
dtype:dtype, optional


Construct for this particular dtype. This should be a Dtype compatible with the ExtensionArray.  
copy:bool, default False


If True, copy the underlying data.    Returns 
 ExtensionArray
pandas.api.extensions.ExtensionArray._reduce   ExtensionArray._reduce(name, *, skipna=True, **kwargs)[source]
 
Return a scalar result of performing the reduction operation.  Parameters 
 
name:str


Name of the function, supported values are: { any, all, min, max, sum, mean, median, prod, std, var, sem, kurt, skew }.  
skipna:bool, default True


If True, skip NaN values.  **kwargs

Additional keyword arguments passed to the reduction function. Currently, ddof is the only supported kwarg.    Returns 
 scalar
  Raises 
 
TypeError:subclass does not define reductions
pandas.api.extensions.ExtensionArray._values_for_argsort   ExtensionArray._values_for_argsort()[source]
 
Return values for sorting.  Returns 
 ndarray

The transformed values should maintain the ordering between values within the array.      See also  ExtensionArray.argsort

Return the indices that would sort this array.
pandas.api.extensions.ExtensionArray._values_for_factorize   ExtensionArray._values_for_factorize()[source]
 
Return an array and missing value suitable for factorization.  Returns 
 
values:ndarray


An array suitable for factorization. This should maintain order and be a supported dtype (Float64, Int64, UInt64, String, Object). By default, the extension array is cast to object dtype.  
na_value:object


The value in values to consider missing. This will be treated as NA in the factorization routines, so it will be coded as na_sentinel and not included in uniques. By default, np.nan is used.     Notes The values returned by this method are also used in pandas.util.hash_pandas_object().
pandas.api.extensions.ExtensionArray.argsort   ExtensionArray.argsort(ascending=True, kind='quicksort', na_position='last', *args, **kwargs)[source]
 
Return the indices that would sort this array.  Parameters 
 
ascending:bool, default True


Whether the indices should result in an ascending or descending sort.  
kind:{‘quicksort’, ‘mergesort’, ‘heapsort’, ‘stable’}, optional


Sorting algorithm.  *args, **kwargs:

Passed through to numpy.argsort().    Returns 
 np.ndarray[np.intp]

Array of indices that sort self. If NaN values are contained, NaN values are placed at the end.      See also  numpy.argsort

Sorting implementation used internally.
pandas.api.extensions.ExtensionArray.astype   ExtensionArray.astype(dtype, copy=True)[source]
 
Cast to a NumPy array or ExtensionArray with ‘dtype’.  Parameters 
 
dtype:str or dtype


Typecode or data-type to which the array is cast.  
copy:bool, default True


Whether to copy the data, even if not necessary. If False, a copy is made only if the old dtype does not match the new dtype.    Returns 
 
array:np.ndarray or ExtensionArray


An ExtensionArray if dtype is ExtensionDtype, Otherwise a NumPy ndarray with ‘dtype’ for its dtype.
pandas.api.extensions.ExtensionArray.copy   ExtensionArray.copy()[source]
 
Return a copy of the array.  Returns 
 ExtensionArray
pandas.api.extensions.ExtensionArray.dropna   ExtensionArray.dropna()[source]
 
Return ExtensionArray without NA values.  Returns 
 
valid:ExtensionArray
pandas.api.extensions.ExtensionArray.dtype   propertyExtensionArray.dtype
 
An instance of ‘ExtensionDtype’.
pandas.api.extensions.ExtensionArray.equals   ExtensionArray.equals(other)[source]
 
Return if another array is equivalent to this array. Equivalent means that both arrays have the same shape and dtype, and all values compare equal. Missing values in the same location are considered equal (in contrast with normal equality).  Parameters 
 
other:ExtensionArray


Array to compare to this Array.    Returns 
 boolean

Whether the arrays are equivalent.
pandas.api.extensions.ExtensionArray.factorize   ExtensionArray.factorize(na_sentinel=- 1)[source]
 
Encode the extension array as an enumerated type.  Parameters 
 
na_sentinel:int, default -1


Value to use in the codes array to indicate missing values.    Returns 
 
codes:ndarray


An integer NumPy array that’s an indexer into the original ExtensionArray.  
uniques:ExtensionArray


An ExtensionArray containing the unique values of self.  Note uniques will not contain an entry for the NA value of the ExtensionArray if there are any missing values present in self.       See also  factorize

Top-level factorize method that dispatches here.    Notes pandas.factorize() offers a sort keyword as well.
pandas.api.extensions.ExtensionArray.fillna   ExtensionArray.fillna(value=None, method=None, limit=None)[source]
 
Fill NA/NaN values using the specified method.  Parameters 
 
value:scalar, array-like


If a scalar value is passed it is used to fill all missing values. Alternatively, an array-like ‘value’ can be given. It’s expected that the array-like have the same length as ‘self’.  
method:{‘backfill’, ‘bfill’, ‘pad’, ‘ffill’, None}, default None


Method to use for filling holes in reindexed Series pad / ffill: propagate last valid observation forward to next valid backfill / bfill: use NEXT valid observation to fill gap.  
limit:int, default None


If method is specified, this is the maximum number of consecutive NaN values to forward/backward fill. In other words, if there is a gap with more than this number of consecutive NaNs, it will only be partially filled. If method is not specified, this is the maximum number of entries along the entire axis where NaNs will be filled.    Returns 
 ExtensionArray

With NA/NaN filled.
pandas.api.extensions.ExtensionArray.insert   ExtensionArray.insert(loc, item)[source]
 
Insert an item at the given position.  Parameters 
 
loc:int


item:scalar-like

  Returns 
 same type as self
   Notes This method should be both type and dtype-preserving. If the item cannot be held in an array of this type/dtype, either ValueError or TypeError should be raised. The default implementation relies on _from_sequence to raise on invalid items.
pandas.api.extensions.ExtensionArray.isin   ExtensionArray.isin(values)[source]
 
Pointwise comparison for set containment in the given values. Roughly equivalent to np.array([x in values for x in self])  Parameters 
 
values:Sequence

  Returns 
 np.ndarray[bool]
pandas.api.extensions.ExtensionArray.isna   ExtensionArray.isna()[source]
 
A 1-D array indicating if each value is missing.  Returns 
 
na_values:Union[np.ndarray, ExtensionArray]


In most cases, this should return a NumPy ndarray. For exceptional cases like SparseArray, where returning an ndarray would be expensive, an ExtensionArray may be returned.     Notes If returning an ExtensionArray, then  na_values._is_boolean should be True na_values should implement ExtensionArray._reduce() na_values.any and na_values.all should be implemented
pandas.api.extensions.ExtensionArray.nbytes   propertyExtensionArray.nbytes
 
The number of bytes needed to store this object in memory.
pandas.api.extensions.ExtensionArray.ndim   propertyExtensionArray.ndim
 
Extension Arrays are only allowed to be 1-dimensional.
pandas.api.extensions.ExtensionArray.ravel   ExtensionArray.ravel(order='C')[source]
 
Return a flattened view on this array.  Parameters 
 
order:{None, ‘C’, ‘F’, ‘A’, ‘K’}, default ‘C’

  Returns 
 ExtensionArray
   Notes  Because ExtensionArrays are 1D-only, this is a no-op. The “order” argument is ignored, is for compatibility with NumPy.
pandas.api.extensions.ExtensionArray.repeat   ExtensionArray.repeat(repeats, axis=None)[source]
 
Repeat elements of a ExtensionArray. Returns a new ExtensionArray where each element of the current ExtensionArray is repeated consecutively a given number of times.  Parameters 
 
repeats:int or array of ints


The number of repetitions for each element. This should be a non-negative integer. Repeating 0 times will return an empty ExtensionArray.  
axis:None


Must be None. Has no effect but is accepted for compatibility with numpy.    Returns 
 
repeated_array:ExtensionArray


Newly created ExtensionArray with repeated elements.      See also  Series.repeat

Equivalent function for Series.  Index.repeat

Equivalent function for Index.  numpy.repeat

Similar method for numpy.ndarray.  ExtensionArray.take

Take arbitrary positions.    Examples 
>>> cat = pd.Categorical(['a', 'b', 'c'])
>>> cat
['a', 'b', 'c']
Categories (3, object): ['a', 'b', 'c']
>>> cat.repeat(2)
['a', 'a', 'b', 'b', 'c', 'c']
Categories (3, object): ['a', 'b', 'c']
>>> cat.repeat([1, 2, 3])
['a', 'b', 'b', 'c', 'c', 'c']
Categories (3, object): ['a', 'b', 'c']
pandas.api.extensions.ExtensionArray.searchsorted   ExtensionArray.searchsorted(value, side='left', sorter=None)[source]
 
Find indices where elements should be inserted to maintain order. Find the indices into a sorted array self (a) such that, if the corresponding elements in value were inserted before the indices, the order of self would be preserved. Assuming that self is sorted:       
side returned index i satisfies    
left self[i-1] < value <= self[i]  
right self[i-1] <= value < self[i]     Parameters 
 
value:array-like, list or scalar


Value(s) to insert into self.  
side:{‘left’, ‘right’}, optional


If ‘left’, the index of the first suitable location found is given. If ‘right’, return the last such index. If there is no suitable index, return either 0 or N (where N is the length of self).  
sorter:1-D array-like, optional


Optional array of integer indices that sort array a into ascending order. They are typically the result of argsort.    Returns 
 array of ints or int

If value is array-like, array of insertion points. If value is scalar, a single integer.      See also  numpy.searchsorted

Similar method from NumPy.
pandas.api.extensions.ExtensionArray.shape   propertyExtensionArray.shape
 
Return a tuple of the array dimensions.
pandas.api.extensions.ExtensionArray.shift   ExtensionArray.shift(periods=1, fill_value=None)[source]
 
Shift values by desired number. Newly introduced missing values are filled with self.dtype.na_value.  Parameters 
 
periods:int, default 1


The number of periods to shift. Negative values are allowed for shifting backwards.  
fill_value:object, optional


The scalar value to use for newly introduced missing values. The default is self.dtype.na_value.    Returns 
 ExtensionArray

Shifted.     Notes If self is empty or periods is 0, a copy of self is returned. If periods > len(self), then an array of size len(self) is returned, with all values filled with self.dtype.na_value.