neulab/docprompting-conala huggingface dataset:
cmy 
 Gets or sets the CMY representation of the Color. cmy -> tuple  The CMY representation of the Color. The CMY components are in the ranges C = [0, 1], M = [0, 1], Y = [0, 1]. Note that this will not return the absolutely exact CMY values for the set RGB values in all cases. Due to the RGB mapping from 0-255 and the CMY mapping from 0-1 rounding errors may cause the CMY values to differ slightly from what you might expect.
correct_gamma() 
 Applies a certain gamma value to the Color. correct_gamma (gamma) -> Color  Applies a certain gamma value to the Color and returns a new Color with the adjusted RGBA values.
g 
 Gets or sets the green value of the Color. g -> int  The green value of the Color.
hsla 
 Gets or sets the HSLA representation of the Color. hsla -> tuple  The HSLA representation of the Color. The HSLA components are in the ranges H = [0, 360], S = [0, 100], V = [0, 100], A = [0, 100]. Note that this will not return the absolutely exact HSL values for the set RGB values in all cases. Due to the RGB mapping from 0-255 and the HSL mapping from 0-100 and 0-360 rounding errors may cause the HSL values to differ slightly from what you might expect.
hsva 
 Gets or sets the HSVA representation of the Color. hsva -> tuple  The HSVA representation of the Color. The HSVA components are in the ranges H = [0, 360], S = [0, 100], V = [0, 100], A = [0, 100]. Note that this will not return the absolutely exact HSV values for the set RGB values in all cases. Due to the RGB mapping from 0-255 and the HSV mapping from 0-100 and 0-360 rounding errors may cause the HSV values to differ slightly from what you might expect.
i1i2i3 
 Gets or sets the I1I2I3 representation of the Color. i1i2i3 -> tuple  The I1I2I3 representation of the Color. The I1I2I3 components are in the ranges I1 = [0, 1], I2 = [-0.5, 0.5], I3 = [-0.5, 0.5]. Note that this will not return the absolutely exact I1I2I3 values for the set RGB values in all cases. Due to the RGB mapping from 0-255 and the I1I2I3 mapping from 0-1 rounding errors may cause the I1I2I3 values to differ slightly from what you might expect.
lerp() 
 returns a linear interpolation to the given Color. lerp(Color, float) -> Color  Returns a Color which is a linear interpolation between self and the given Color in RGBA space. The second parameter determines how far between self and other the result is going to be. It must be a value between 0 and 1 where 0 means self and 1 means other will be returned.  New in pygame 2.0.1.
normalize() 
 Returns the normalized RGBA values of the Color. normalize() -> tuple  Returns the normalized RGBA values of the Color as floating point values.
premul_alpha() 
 returns a Color where the r,g,b components have been multiplied by the alpha. premul_alpha() -> Color  Returns a new Color where each of the red, green and blue colour channels have been multiplied by the alpha channel of the original color. The alpha channel remains unchanged. This is useful when working with the BLEND_PREMULTIPLIED blending mode flag for pygame.Surface.blit(), which assumes that all surfaces using it are using pre-multiplied alpha colors.  New in pygame 2.0.0.
r 
 Gets or sets the red value of the Color. r -> int  The red value of the Color.
set_length() 
 Set the number of elements in the Color to 1,2,3, or 4. set_length(len) -> None  The default Color length is 4. Colors can have lengths 1,2,3 or 4. This is useful if you want to unpack to r,g,b and not r,g,b,a. If you want to get the length of a Color do len(acolor).  New in pygame 1.9.0.
update() 
 Sets the elements of the color update(r, g, b) -> None update(r, g, b, a=255) -> None update(color_value) -> None  Sets the elements of the color. See parameters for pygame.Color() for the parameters of this function. If the alpha value was not set it will not change.  New in pygame 2.0.1.
pygame.cursors.compile() 
 create binary cursor data from simple strings compile(strings, black='X', white='.', xor='o') -> data, mask  A sequence of strings can be used to create binary cursor data for the system cursor. This returns the binary data in the form of two tuples. Those can be passed as the third and fourth arguments respectively of the pygame.mouse.set_cursor() function. If you are creating your own cursor strings, you can use any value represent the black and white pixels. Some system allow you to set a special toggle color for the system color, this is also called the xor color. If the system does not support xor cursors, that color will simply be black. The height must be divisible by 8. The width of the strings must all be equal and be divisible by 8. If these two conditions are not met, ValueError is raised. An example set of cursor strings looks like this thickarrow_strings = (               #sized 24x24
  "XX                      ",
  "XXX                     ",
  "XXXX                    ",
  "XX.XX                   ",
  "XX..XX                  ",
  "XX...XX                 ",
  "XX....XX                ",
  "XX.....XX               ",
  "XX......XX              ",
  "XX.......XX             ",
  "XX........XX            ",
  "XX........XXX           ",
  "XX......XXXXX           ",
  "XX.XXX..XX              ",
  "XXXX XX..XX             ",
  "XX   XX..XX             ",
  "     XX..XX             ",
  "      XX..XX            ",
  "      XX..XX            ",
  "       XXXX             ",
  "       XX               ",
  "                        ",
  "                        ",
  "                        ")
pygame.cursors.load_xbm() 
 load cursor data from an XBM file load_xbm(cursorfile) -> cursor_args load_xbm(cursorfile, maskfile) -> cursor_args  This loads cursors for a simple subset of XBM files. XBM files are traditionally used to store cursors on UNIX systems, they are an ASCII format used to represent simple images. Sometimes the black and white color values will be split into two separate XBM files. You can pass a second maskfile argument to load the two images into a single cursor. The cursorfile and maskfile arguments can either be filenames or file-like object with the readlines method. The return value cursor_args can be passed directly to the pygame.mouse.set_cursor() function.
pygame.display.flip() 
 Update the full display Surface to the screen flip() -> None  This will update the contents of the entire display. If your display mode is using the flags pygame.HWSURFACE and pygame.DOUBLEBUF, this will wait for a vertical retrace and swap the surfaces. If you are using a different type of display mode, it will simply update the entire contents of the surface. When using an pygame.OPENGL display mode this will perform a gl buffer swap.
pygame.display.get_active() 
 Returns True when the display is active on the screen get_active() -> bool  Returns True when the display Surface is considered actively renderable on the screen and may be visible to the user. This is the default state immediately after pygame.display.set_mode(). This method may return True even if the application is fully hidden behind another application window. This will return False if the display Surface has been iconified or minimized (either via pygame.display.iconify() or via an OS specific method such as the minimize-icon available on most desktops). The method can also return False for other reasons without the application being explicitly iconified or minimized by the user. A notable example being if the user has multiple virtual desktops and the display Surface is not on the active virtual desktop.  Note This function returning True is unrelated to whether the application has input focus. Please see pygame.key.get_focused() and pygame.mouse.get_focused() for APIs related to input focus.
pygame.display.get_allow_screensaver() 
 Return whether the screensaver is allowed to run. get_allow_screensaver() -> bool  Return whether screensaver is allowed to run whilst the app is running. Default is False. By default pygame does not allow the screensaver during game play.  Note Some platforms do not have a screensaver or support disabling the screensaver. Please see pygame.display.set_allow_screensaver() for caveats with screensaver support.   New in pygame 2.0.0.
pygame.display.get_caption() 
 Get the current window caption get_caption() -> (title, icontitle)  Returns the title and icontitle for the display Surface. These will often be the same value.
pygame.display.get_driver() 
 Get the name of the pygame display backend get_driver() -> name  Pygame chooses one of many available display backends when it is initialized. This returns the internal name used for the display backend. This can be used to provide limited information about what display capabilities might be accelerated. See the SDL_VIDEODRIVER flags in pygame.display.set_mode() to see some of the common options.
pygame.display.get_init() 
 Returns True if the display module has been initialized get_init() -> bool  Returns True if the pygame.display module is currently initialized.
pygame.display.get_num_displays() 
 Return the number of displays get_num_displays() -> int  Returns the number of available displays. This is always 1 if pygame.get_sdl_version() returns a major version number below 2.  New in pygame 1.9.5.
pygame.display.get_surface() 
 Get a reference to the currently set display surface get_surface() -> Surface  Return a reference to the currently set display Surface. If no display mode has been set this will return None.
pygame.display.get_window_size() 
 Return the size of the window or screen get_window_size() -> tuple  Returns the size of the window initialized with pygame.display.set_mode(). This may differ from the size of the display surface if SCALED is used.  New in pygame 2.0.0.
pygame.display.get_wm_info() 
 Get information about the current windowing system get_wm_info() -> dict  Creates a dictionary filled with string keys. The strings and values are arbitrarily created by the system. Some systems may have no information and an empty dictionary will be returned. Most platforms will return a "window" key with the value set to the system id for the current display.  New in pygame 1.7.1.
pygame.display.gl_get_attribute() 
 Get the value for an OpenGL flag for the current display gl_get_attribute(flag) -> value  After calling pygame.display.set_mode() with the pygame.OPENGL flag, it is a good idea to check the value of any requested OpenGL attributes. See pygame.display.gl_set_attribute() for a list of valid flags.
pygame.display.gl_set_attribute() 
 Request an OpenGL display attribute for the display mode gl_set_attribute(flag, value) -> None  When calling pygame.display.set_mode() with the pygame.OPENGL flag, Pygame automatically handles setting the OpenGL attributes like color and double-buffering. OpenGL offers several other attributes you may want control over. Pass one of these attributes as the flag, and its appropriate value. This must be called before pygame.display.set_mode(). Many settings are the requested minimum. Creating a window with an OpenGL context will fail if OpenGL cannot provide the requested attribute, but it may for example give you a stencil buffer even if you request none, or it may give you a larger one than requested. The OPENGL flags are: GL_ALPHA_SIZE, GL_DEPTH_SIZE, GL_STENCIL_SIZE, GL_ACCUM_RED_SIZE,
GL_ACCUM_GREEN_SIZE,  GL_ACCUM_BLUE_SIZE, GL_ACCUM_ALPHA_SIZE,
GL_MULTISAMPLEBUFFERS, GL_MULTISAMPLESAMPLES, GL_STEREO GL_MULTISAMPLEBUFFERS  
Whether to enable multisampling anti-aliasing. Defaults to 0 (disabled). Set GL_MULTISAMPLESAMPLES to a value above 0 to control the amount of anti-aliasing. A typical value is 2 or 3. 
 GL_STENCIL_SIZE  Minimum bit size of the stencil buffer. Defaults to 0.
 GL_DEPTH_SIZE  Minimum bit size of the depth buffer. Defaults to 16.
 GL_STEREO  1 enables stereo 3D. Defaults to 0.
 GL_BUFFER_SIZE  Minimum bit size of the frame buffer. Defaults to 0.
  New in pygame 2.0.0: Additional attributes:  GL_ACCELERATED_VISUAL,
GL_CONTEXT_MAJOR_VERSION, GL_CONTEXT_MINOR_VERSION,
GL_CONTEXT_FLAGS, GL_CONTEXT_PROFILE_MASK,
GL_SHARE_WITH_CURRENT_CONTEXT,
GL_CONTEXT_RELEASE_BEHAVIOR,
GL_FRAMEBUFFER_SRGB_CAPABLE GL_CONTEXT_PROFILE_MASK  
Sets the OpenGL profile to one of these values: GL_CONTEXT_PROFILE_CORE             disable deprecated features
GL_CONTEXT_PROFILE_COMPATIBILITY    allow deprecated features
GL_CONTEXT_PROFILE_ES               allow only the ES feature
                                    subset of OpenGL 
 GL_ACCELERATED_VISUAL  Set to 1 to require hardware acceleration, or 0 to force software render. By default, both are allowed.
pygame.display.iconify() 
 Iconify the display surface iconify() -> bool  Request the window for the display surface be iconified or hidden. Not all systems and displays support an iconified display. The function will return True if successful. When the display is iconified pygame.display.get_active() will return False. The event queue should receive an ACTIVEEVENT event when the window has been iconified. Additionally, the event queue also recieves a WINDOWEVENT_MINIMIZED event when the window has been iconified on pygame 2.
pygame.display.Info() 
 Create a video display information object Info() -> VideoInfo  Creates a simple object containing several attributes to describe the current graphics environment. If this is called before pygame.display.set_mode() some platforms can provide information about the default display mode. This can also be called after setting the display mode to verify specific display options were satisfied. The VidInfo object has several attributes: hw:         1 if the display is hardware accelerated
wm:         1 if windowed display modes can be used
video_mem:  The megabytes of video memory on the display. This is 0 if
            unknown
bitsize:    Number of bits used to store each pixel
bytesize:   Number of bytes used to store each pixel
masks:      Four values used to pack RGBA values into pixels
shifts:     Four values used to pack RGBA values into pixels
losses:     Four values used to pack RGBA values into pixels
blit_hw:    1 if hardware Surface blitting is accelerated
blit_hw_CC: 1 if hardware Surface colorkey blitting is accelerated
blit_hw_A:  1 if hardware Surface pixel alpha blitting is accelerated
blit_sw:    1 if software Surface blitting is accelerated
blit_sw_CC: 1 if software Surface colorkey blitting is accelerated
blit_sw_A:  1 if software Surface pixel alpha blitting is accelerated
current_h, current_w:  Height and width of the current video mode, or
            of the desktop mode if called before the display.set_mode
            is called. (current_h, current_w are available since
            SDL 1.2.10, and pygame 1.8.0). They are -1 on error, or if
            an old SDL is being used.
pygame.display.init() 
 Initialize the display module init() -> None  Initializes the pygame display module. The display module cannot do anything until it is initialized. This is usually handled for you automatically when you call the higher level pygame.init(). Pygame will select from one of several internal display backends when it is initialized. The display mode will be chosen depending on the platform and permissions of current user. Before the display module is initialized the environment variable SDL_VIDEODRIVER can be set to control which backend is used. The systems with multiple choices are listed here. Windows : windib, directx
Unix    : x11, dga, fbcon, directfb, ggi, vgl, svgalib, aalib On some platforms it is possible to embed the pygame display into an already existing window. To do this, the environment variable SDL_WINDOWID must be set to a string containing the window id or handle. The environment variable is checked when the pygame display is initialized. Be aware that there can be many strange side effects when running in an embedded display. It is harmless to call this more than once, repeated calls have no effect.
pygame.display.list_modes() 
 Get list of available fullscreen modes list_modes(depth=0, flags=pygame.FULLSCREEN, display=0) -> list  This function returns a list of possible sizes for a specified color depth. The return value will be an empty list if no display modes are available with the given arguments. A return value of -1 means that any requested size should work (this is likely the case for windowed modes). Mode sizes are sorted from biggest to smallest. If depth is 0, the current/best color depth for the display is used. The flags defaults to pygame.FULLSCREEN, but you may need to add additional flags for specific fullscreen modes. The display index 0 means the default display is used.  Changed in pygame 1.9.5: display argument added
pygame.display.mode_ok() 
 Pick the best color depth for a display mode mode_ok(size, flags=0, depth=0, display=0) -> depth  This function uses the same arguments as pygame.display.set_mode(). It is used to determine if a requested display mode is available. It will return 0 if the display mode cannot be set. Otherwise it will return a pixel depth that best matches the display asked for. Usually the depth argument is not passed, but some platforms can support multiple display depths. If passed it will hint to which depth is a better match. The most useful flags to pass will be pygame.HWSURFACE, pygame.DOUBLEBUF, and maybe pygame.FULLSCREEN. The function will return 0 if these display flags cannot be set. The display index 0 means the default display is used.  Changed in pygame 1.9.5: display argument added
pygame.display.quit() 
 Uninitialize the display module quit() -> None  This will shut down the entire display module. This means any active displays will be closed. This will also be handled automatically when the program exits. It is harmless to call this more than once, repeated calls have no effect.
pygame.display.set_allow_screensaver() 
 Set whether the screensaver may run set_allow_screensaver(bool) -> None  Change whether screensavers should be allowed whilst the app is running. The default is False. By default pygame does not allow the screensaver during game play. If the screensaver has been disallowed due to this function, it will automatically be allowed to run when pygame.quit() is called. It is possible to influence the default value via the environment variable SDL_HINT_VIDEO_ALLOW_SCREENSAVER, which can be set to either 0 (disable) or 1 (enable).  Note Disabling screensaver is subject to platform support. When platform support is absent, this function will silently appear to work even though the screensaver state is unchanged. The lack of feedback is due to SDL not providing any supported method for determining whether it supports changing the screensaver state. SDL_HINT_VIDEO_ALLOW_SCREENSAVER is available in SDL 2.0.2 or later. SDL1.2 does not implement this.   New in pygame 2.0.0.
pygame.display.set_caption() 
 Set the current window caption set_caption(title, icontitle=None) -> None  If the display has a window title, this function will change the name on the window. Some systems support an alternate shorter title to be used for minimized displays.
pygame.display.set_gamma() 
 Change the hardware gamma ramps set_gamma(red, green=None, blue=None) -> bool  Set the red, green, and blue gamma values on the display hardware. If the green and blue arguments are not passed, they will both be the same as red. Not all systems and hardware support gamma ramps, if the function succeeds it will return True. A gamma value of 1.0 creates a linear color table. Lower values will darken the display and higher values will brighten.
pygame.display.set_gamma_ramp() 
 Change the hardware gamma ramps with a custom lookup set_gamma_ramp(red, green, blue) -> bool  Set the red, green, and blue gamma ramps with an explicit lookup table. Each argument should be sequence of 256 integers. The integers should range between 0 and 0xffff. Not all systems and hardware support gamma ramps, if the function succeeds it will return True.
pygame.display.set_icon() 
 Change the system image for the display window set_icon(Surface) -> None  Sets the runtime icon the system will use to represent the display window. All windows default to a simple pygame logo for the window icon. You can pass any surface, but most systems want a smaller image around 32x32. The image can have colorkey transparency which will be passed to the system. Some systems do not allow the window icon to change after it has been shown. This function can be called before pygame.display.set_mode() to create the icon before the display mode is set.
pygame.display.set_palette() 
 Set the display color palette for indexed displays set_palette(palette=None) -> None  This will change the video display color palette for 8-bit displays. This does not change the palette for the actual display Surface, only the palette that is used to display the Surface. If no palette argument is passed, the system default palette will be restored. The palette is a sequence of RGB triplets.
pygame.display.toggle_fullscreen() 
 Switch between fullscreen and windowed displays toggle_fullscreen() -> int  Switches the display window between windowed and fullscreen modes. Display driver support is not great when using pygame 1, but with pygame 2 it is the most reliable method to switch to and from fullscreen. Supported display drivers in pygame 1:  
 x11 (Linux/Unix) wayland (Linux/Unix)  
 Supported display drivers in pygame 2:  
 windows (Windows) x11 (Linux/Unix) wayland (Linux/Unix) cocoa (OSX/Mac)
pygame.display.update() 
 Update portions of the screen for software displays update(rectangle=None) -> None update(rectangle_list) -> None  This function is like an optimized version of pygame.display.flip() for software displays. It allows only a portion of the screen to updated, instead of the entire area. If no argument is passed it updates the entire Surface area like pygame.display.flip(). You can pass the function a single rectangle, or a sequence of rectangles. It is more efficient to pass many rectangles at once than to call update multiple times with single or a partial list of rectangles. If passing a sequence of rectangles it is safe to include None values in the list, which will be skipped. This call cannot be used on pygame.OPENGL displays and will generate an exception.
pygame.draw.aalines() 
 draw multiple contiguous straight antialiased line segments aalines(surface, color, closed, points) -> Rect aalines(surface, color, closed, points, blend=1) -> Rect  Draws a sequence of contiguous straight antialiased lines on the given surface.     
Parameters:

 
surface (Surface) -- surface to draw on 
color (Color or int or tuple(int, int, int, [int])) -- color to draw with, the alpha value is optional if using a tuple (RGB[A])
 
closed (bool) -- if True an additional line segment is drawn between the first and last points in the points sequence 
points (tuple(coordinate) or list(coordinate)) -- a sequence of 2 or more (x, y) coordinates, where each coordinate in the sequence must be a tuple/list/pygame.math.Vector2 of 2 ints/floats and adjacent coordinates will be connected by a line segment, e.g. for the points [(x1, y1), (x2, y2), (x3, y3)] a line segment will be drawn from (x1, y1) to (x2, y2) and from (x2, y2) to (x3, y3), additionally if the closed parameter is True another line segment will be drawn from (x3, y3) to (x1, y1)
 
blend (int) -- (optional) if non-zero (default) each line will be blended with the surface's existing pixel shades, otherwise the pixels will be overwritten    
Returns:

a rect bounding the changed pixels, if nothing is drawn the bounding rect's position will be the position of the first point in the points parameter (float values will be truncated) and its width and height will be 0   
Return type:

Rect   
Raises:

 
ValueError -- if len(points) < 2 (must have at least 2 points) 
TypeError -- if points is not a sequence or points does not contain number pairs       Changed in pygame 2.0.0: Added support for keyword arguments.