Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
223
206k
<s>[INST] Write a Python game development module for 'clock.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] __all__ = ( "Clock", "FixedClock", "GLOBAL_CLOCK", "GLOBAL_FIXED_CLOCK", ) class Clock: """ A time keeping class which provides a ...
<s>[INST] Write a Python game development module for 'controller.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """ Controller API. This is basically just an alias to Pyglet's controller API. For more info on this API, see https://pyglet.readthedocs.io/en/latest...
<s>[INST] Write a Python game development module for 'earclip.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """ from: https://github.com/linuxlewis/tripy/blob/master/tripy.py """ from arcade.types import Point2, Point2List def earclip( polygon: Point2Lis...
<s>[INST] Write a Python game development module for 'exceptions.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """ Custom Arcade errors, exceptions, and warnings. """ import functools import warnings from typing import TypeVar __all__ = [ "NoArcadeWindowEr...
<s>[INST] Write a Python game development module for 'geometry.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """ Functions for handling collisions with geometry. These are the pure python versions of the functions. Point in polygon function from https://www.ge...
<s>[INST] Write a Python game development module for 'isometric.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] from arcade.shape_list import ShapeElementList, create_line from arcade.types import RGBA255 def isometric_grid_to_screen( tile_x: int, tile_y: in...
<s>[INST] Write a Python game development module for 'joysticks.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] import pyglet.input from pyglet.input import Joystick __all__ = ["get_joysticks", "get_game_controllers"] def get_joysticks() -> list[Joystick]: ...
<s>[INST] Write a Python game development module for 'math.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] import math import random from typing import TypeVar from pyglet.math import Vec2, Vec3 from arcade.types import AsFloat, HasAddSubMul, Point, Point2, Supp...
<s>[INST] Write a Python game development module for 'paths.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """ Classic A-star algorithm for path finding. """ import math from arcade import ( BasicSprite, Sprite, SpriteSequence, check_for_collisi...
<s>[INST] Write a Python game development module for 'perf_graph.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] import random import pyglet.clock # Pyright can't figure out the dynamic import for the backends in Pyglet from pyglet.graphics import Batch # type:...
<s>[INST] Write a Python game development module for 'perf_info.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """ Utility functions to keep performance information """ import time from collections import deque import pyglet # Evil globals _timings: dict[str, ...
<s>[INST] Write a Python game development module for 'screenshot.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """ Original screenshot utilities from Arcade 2. These functions are flawed because they only read from the screen. """ import PIL.Image import PIL.I...
<s>[INST] Write a Python game development module for 'sound.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """Sound Library.""" import logging import math import os from pathlib import Path import pyglet from pyglet.media import Source from arcade.resources im...
<s>[INST] Write a Python game development module for 'start_finish_data.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] from arcade.draw.rect import draw_texture_rect from arcade.texture.texture import Texture from arcade.types import LBWH, AnchorPoint from arcade...
<s>[INST] Write a Python game development module for 'uicolor.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """ This module pre-defines colors from FlatUI. https://materialui.co/flatuicolors/ """ from arcade.color import BLACK, WHITE, Color WHITE = WHITE GREEN...
<s>[INST] Write a Python game development module for 'utils.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """ Various utility functions. IMPORTANT: These should be standalone and not rely on any Arcade imports """ import platform import sys from collections.ab...
<s>[INST] Write a Python game development module for 'version.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """ Loads the Arcade version into a Python-readable ``VERSION`` string. Everyday Arcade users may prefer accessing the ``VERSION`` string from Arcade's t...
<s>[INST] Write a Python game development module for 'window_commands.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """ This submodule has functions that control opening, closing, rendering, and otherwise managing windows. It also has commands for scheduling pau...
<s>[INST] Write a Python game development module for '__init__.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """ The Arcade Library A Python simple, easy to use module for creating 2D games. """ # flake8: noqa: E402 # Error out if we import Arcade with an inco...
<s>[INST] Write a Python game development module for '__main__.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] from arcade.management import show_info if __name__ == "__main__": show_info() </s>
<s>[INST] Write a Python game development module for 'easing.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """Core easing annotations and helper functions.""" from math import cos, pi, sin, sqrt, tau from typing import Protocol, TypeVar T = TypeVar("T") # Th...
<s>[INST] Write a Python game development module for 'hit_box.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """ A simple cache for hit boxes calculated from texture. Hit box calculations are normally done at load time by inspecting the contents of a loaded image...
<s>[INST] Write a Python game development module for 'image_data.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] from __future__ import annotations from typing import TYPE_CHECKING if TYPE_CHECKING: from arcade.texture import ImageData class ImageDataCache...
<s>[INST] Write a Python game development module for 'texture.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] from pathlib import Path from typing import TYPE_CHECKING from arcade.texture.texture import Texture if TYPE_CHECKING: from arcade import Texture ...
<s>[INST] Write a Python game development module for '__init__.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] from typing import Any from .hit_box import HitBoxCache from .texture import TextureCache from .image_data import ImageDataCache def crate_str_from_val...
<s>[INST] Write a Python game development module for 'data_types.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] """Packets of data and base types supporting cameras. These are placed in their own module to simplify imports due to their wide usage throughout Arca...
<s>[INST] Write a Python game development module for 'default.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] from __future__ import annotations from collections.abc import Generator from contextlib import contextmanager from typing import TYPE_CHECKING from pyg...
<s>[INST] Write a Python game development module for 'orthographic.py' as part of the 'arcade' project. Include proper imports, class definitions, and game logic. [/INST] from __future__ import annotations from collections.abc import Generator from contextlib import contextmanager from typing import TYPE_CHECKING fro...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
1

Space using Jasonbrown1/python-gamedev-training-data 1